diff --git a/.gitignore b/.gitignore
index 9cbd220cb1..97b376da44 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
.DS_Store
*.retry
*.pyc
-.idea
\ No newline at end of file
+.idea
diff --git a/ansible/artifacts-download.yml b/ansible/artifacts-download.yml
index feb78219b8..ce7a125bde 100644
--- a/ansible/artifacts-download.yml
+++ b/ansible/artifacts-download.yml
@@ -3,8 +3,53 @@
become: yes
vars_files:
- "{{inventory_dir}}/secrets.yml"
- environment:
- AZURE_STORAGE_ACCOUNT: "{{ sunbird_artifact_storage_account_name }}"
- AZURE_STORAGE_SAS_TOKEN: "{{ sunbird_artifact_storage_account_sas }}"
- roles:
- - artifacts-download-azure
+ tasks:
+ - name: download artifact from azure storage
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: blob-download.yml
+ vars:
+ blob_container_name: "{{ cloud_storage_artifacts_bucketname }}"
+ blob_file_name: "{{ artifact }}"
+ local_file_or_folder_path: "{{ artifact_path }}"
+ storage_account_name: "{{ cloud_artifact_storage_accountname }}"
+ storage_account_key: "{{ cloud_artifact_storage_secret }}"
+ when: cloud_service_provider == "azure"
+
+ - name: download artifact from gcloud storage
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: download.yml
+ vars:
+ gcp_storage_service_account_name: "{{ cloud_artifact_storage_accountname }}"
+ gcp_storage_key_file: "{{ cloud_artifact_storage_secret }}"
+ gcp_bucket_name: "{{ cloud_storage_artifacts_bucketname }}"
+ gcp_path: "{{ artifact }}"
+ local_file_or_folder_path: "{{ artifact_path }}"
+ when: cloud_service_provider == "gcloud"
+
+ - name: download artifact from aws s3
+ include_role:
+ name: aws-cloud-storage
+ tasks_from: download.yml
+ vars:
+ local_file_or_folder_path: "{{ artifact_path }}"
+ s3_bucket_name: "{{ cloud_storage_artifacts_bucketname }}"
+ s3_path: "{{ artifact }}"
+ aws_default_region: "{{ cloud_public_storage_region }}"
+ aws_access_key_id: "{{ cloud_artifact_storage_accountname }}"
+ aws_secret_access_key: "{{ cloud_artifact_storage_secret }}"
+ when: cloud_service_provider == "aws"
+
+ - name: download artifact from oci oss
+ include_role:
+ name: oci-cloud-storage
+ apply:
+ environment:
+ OCI_CLI_AUTH: "instance_principal"
+ tasks_from: download.yml
+ vars:
+ local_file_or_folder_path: "{{ artifact_path }}"
+ oss_bucket_name: "{{ cloud_storage_artifacts_bucketname }}"
+ oss_path: "{{ artifact }}"
+ when: cloud_service_provider == "oci"
\ No newline at end of file
diff --git a/ansible/artifacts-upload.yml b/ansible/artifacts-upload.yml
index 772ec2cca4..3e444ef163 100644
--- a/ansible/artifacts-upload.yml
+++ b/ansible/artifacts-upload.yml
@@ -3,8 +3,54 @@
become: yes
vars_files:
- "{{inventory_dir}}/secrets.yml"
- environment:
- AZURE_STORAGE_ACCOUNT: "{{ sunbird_artifact_storage_account_name }}"
- AZURE_STORAGE_SAS_TOKEN: "{{ sunbird_artifact_storage_account_sas }}"
- roles:
- - artifacts-upload-azure
+ tasks:
+ - name: upload artifact to azure storage
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: blob-upload.yml
+ vars:
+ blob_container_name: "{{ cloud_storage_artifacts_bucketname }}"
+ container_public_access: "off"
+ blob_file_name: "{{ artifact }}"
+ local_file_or_folder_path: "{{ artifact_path }}"
+ storage_account_name: "{{ cloud_artifact_storage_accountname }}"
+ storage_account_key: "{{ cloud_artifact_storage_secret }}"
+ when: cloud_service_provider == "azure"
+
+ - name: upload artifact to gcloud storage
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: upload.yml
+ vars:
+ gcp_storage_service_account_name: "{{ cloud_artifact_storage_accountname }}"
+ gcp_storage_key_file: "{{ cloud_artifact_storage_secret }}"
+ gcp_bucket_name: "{{ cloud_storage_artifacts_bucketname }}"
+ gcp_path: "{{ artifact }}"
+ local_file_or_folder_path: "{{ artifact_path }}"
+ when: cloud_service_provider == "gcloud"
+
+ - name: upload artifact to aws s3
+ include_role:
+ name: aws-cloud-storage
+ tasks_from: upload.yml
+ vars:
+ local_file_or_folder_path: "{{ artifact_path }}"
+ s3_bucket_name: "{{ cloud_storage_artifacts_bucketname }}"
+ s3_path: "{{ artifact }}"
+ aws_default_region: "{{ cloud_public_storage_region }}"
+ aws_access_key_id: "{{ cloud_artifact_storage_accountname }}"
+ aws_secret_access_key: "{{ cloud_artifact_storage_secret }}"
+ when: cloud_service_provider == "aws"
+
+ - name: upload artifact to oci oss
+ include_role:
+ name: oci-cloud-storage
+ apply:
+ environment:
+ OCI_CLI_AUTH: "instance_principal"
+ tasks_from: upload.yml
+ vars:
+ local_file_or_folder_path: "{{ artifact_path }}"
+ oss_bucket_name: "{{ cloud_storage_artifacts_bucketname }}"
+ oss_path: "{{ artifact }}"
+ when: cloud_service_provider == "oci"
\ No newline at end of file
diff --git a/ansible/artifacts/sunbird/login/login.ftl b/ansible/artifacts/sunbird/login/login.ftl
index 418ce44faf..9cb87dcd67 100644
--- a/ansible/artifacts/sunbird/login/login.ftl
+++ b/ansible/artifacts/sunbird/login/login.ftl
@@ -9,7 +9,7 @@
${msg("mergeAccountMessage")}
diff --git a/ansible/artifacts/sunbird/login/messages/messages_en.properties b/ansible/artifacts/sunbird/login/messages/messages_en.properties
index 311b7512a0..5d7f66b4ce 100644
--- a/ansible/artifacts/sunbird/login/messages/messages_en.properties
+++ b/ansible/artifacts/sunbird/login/messages/messages_en.properties
@@ -56,7 +56,7 @@ noAccount=Don''t have an account?
username=Username or Mobile number
goBack=<
= 0) {
- pdataId = "prod.diksha.portal";
-} else if (window.location.origin.indexOf("staging.ntp.net.in") >= 0) {
- pdataId = "staging.diksha.portal";
-} else if (window.location.origin.indexOf("staging.sunbirded.org") >= 0) {
+if (window.location.origin.indexOf("staging.sunbirded.org") >= 0) {
pdataId = "staging.diksha.portal";
} else if (window.location.origin.indexOf("dev.sunbirded.org") >= 0) {
pdataId = "dev.sunbird.portal";
tenantSlug = "sunbird";
} else {
- pdataId = "preprod.diksha.portal";
+ tenantSlug = "sunbird";
+ pdataId = "dev.sunbird.portal";
}
let curUrlObj = window.location;
@@ -2506,7 +2503,7 @@ if(client_id.toLowerCase() === 'android'){
"telemetry": {
"pdata": {
"id": pdataId,
- "ver": "5.0.0",
+ "ver": "6.0.0",
"pid": "sunbird-portal"
}
}
@@ -2533,7 +2530,7 @@ if(client_id.toLowerCase() === 'android'){
request: {
filters: {
isTenant: true,
- slug: id || 'ntp'
+ slug: id || 'sunbird'
}
}
}),
@@ -2687,7 +2684,6 @@ if(client_id.toLowerCase() === 'android'){
function stringToHTML(str) {
let parser = new DOMParser();
let doc = parser.parseFromString(str, 'text/html');
- console.log('Doc parse => ', doc); // TODO: log!
return doc?.body?.innerText || document.createElement('body');
}
diff --git a/ansible/assets-upload.yml b/ansible/assets-upload.yml
index b356cf9362..b39f1a4694 100644
--- a/ansible/assets-upload.yml
+++ b/ansible/assets-upload.yml
@@ -1,8 +1,105 @@
---
- hosts: localhost
- vars:
- ansible_connection: local
vars_files:
- ['{{inventory_dir}}/secrets.yml', 'secrets/{{env}}.yml']
- roles:
- - assets-upload-azure
+ # Azure
+ tasks:
+ - name: this block consists of tasks related to azure storage
+ block:
+ - name: set common azure variables
+ set_fact:
+ blob_container_name: "{{ cloud_storage_playercdn_bucketname }}"
+ container_public_access: "container"
+ blob_container_folder_path: ""
+ storage_account_name: "{{ cloud_public_storage_accountname }}"
+ storage_account_key: "{{ cloud_public_storage_secret }}"
+
+ - name: delete files and folders from azure storage using azcopy
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: delete-using-azcopy.yml
+
+ - name: upload batch of files to azure storage
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: blob-upload-batch.yml
+ vars:
+ local_file_or_folder_path: "{{ assets }}"
+ when: cloud_service_provider == "azure"
+
+##### AWS
+ - name: this block consists of tasks related to aws storage
+ block:
+ - name: set common aws variables
+ set_fact:
+ s3_bucket_name: "{{ cloud_storage_playercdn_bucketname }}"
+ s3_path: ""
+ aws_default_region: "{{ cloud_public_storage_region }}"
+ aws_access_key_id: "{{ cloud_public_storage_accountname }}"
+ aws_secret_access_key: "{{ cloud_public_storage_secret }}"
+
+ - name: delete files and folders from s3
+ include_role:
+ name: aws-cloud-storage
+ tasks_from: delete-folder.yml
+
+ - name: upload batch of files to s3
+ include_role:
+ name: aws-cloud-storage
+ tasks_from: upload-folder.yml
+ vars:
+ local_file_or_folder_path: "{{ assets }}"
+ when: cloud_service_provider == "aws"
+
+ #GCP
+ - name: this block consists of tasks related to azure storage
+ block:
+ - name: set common gcloud variables
+ set_fact:
+ gcp_storage_service_account_name: "{{ cloud_public_storage_accountname }}"
+ gcp_storage_key_file: "{{ cloud_public_storage_secret }}"
+ gcp_bucket_name: "{{ cloud_storage_playercdn_bucketname }}"
+ gcp_path: ""
+ file_delete_pattern: ""
+
+
+ - name: delete files and folders from gcloud storage
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: delete-batch.yml
+
+ - name: upload batch of files to gcloud storage
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: upload-batch.yml
+ vars:
+ local_file_or_folder_path: "{{ assets }}/*"
+ when: cloud_service_provider == "gcloud"
+
+##### OCI
+ - name: this block consists of tasks related to oci oss
+ block:
+ - name: set common oci variables
+ set_fact:
+ oss_bucket_name: "{{ cloud_storage_playercdn_bucketname }}"
+ oss_path: ""
+ oss_namespace: "{{oci_namespace}}"
+
+ - name: delete files and folders from oci oss
+ include_role:
+ name: oci-cloud-storage
+ apply:
+ environment:
+ OCI_CLI_AUTH: "instance_principal"
+ tasks_from: delete-folder.yml
+
+ - name: upload batch of files to oci oss
+ include_role:
+ name: oci-cloud-storage
+ apply:
+ environment:
+ OCI_CLI_AUTH: "instance_principal"
+ tasks_from: upload-folder.yml
+ vars:
+ local_file_or_folder_path: "{{ assets }}"
+ when: cloud_service_provider == "oci"
\ No newline at end of file
diff --git a/ansible/bootstrap.yml b/ansible/bootstrap.yml
index 429d8b7127..e77a1cb038 100644
--- a/ansible/bootstrap.yml
+++ b/ansible/bootstrap.yml
@@ -8,7 +8,7 @@
- name: Installing other packages
apt:
state: present
- name: ['python-pkg-resources', 'python2-pip']
+ name: ['python-pkg-resources', 'python-pip']
when: ansible_distribution_version | float < 18
- name: Installing other packages
apt:
@@ -19,10 +19,8 @@
- bootstrap_any
tags:
- bootstrap_any
- - all
-- hosts: "{{hosts}}"
- gather_facts: no
+- hosts: "{{ hosts }}"
become: yes
ignore_unreachable: yes
vars_files:
@@ -32,6 +30,36 @@
tags:
- azure_cli
+- hosts: "{{ hosts }}"
+ become: yes
+ ignore_unreachable: yes
+ vars_files:
+ - "{{inventory_dir}}/secrets.yml"
+ roles:
+ - role: gcloud-cli
+ tags:
+ - gcloud_cli
+
+- hosts: "{{ hosts }}"
+ become: yes
+ ignore_unreachable: yes
+ vars_files:
+ - "{{inventory_dir}}/secrets.yml"
+ roles:
+ - role: aws-cli
+ tags:
+ - aws_cli
+
+- hosts: "{{ hosts }}"
+ become: yes
+ ignore_unreachable: yes
+ vars_files:
+ - "{{inventory_dir}}/secrets.yml"
+ roles:
+ - role: oci-cli
+ tags:
+ - oci_cli
+
- hosts: "{{ hosts| default('all') }}"
become: yes
gather_facts: no
@@ -42,4 +70,3 @@
- vm-agents-nodeexporter
tags:
- node_exporter
- - all
diff --git a/ansible/cassandra-deploy.yml b/ansible/cassandra-deploy.yml
index a8d556bbc0..f4edb2c1bd 100644
--- a/ansible/cassandra-deploy.yml
+++ b/ansible/cassandra-deploy.yml
@@ -3,7 +3,8 @@
environment:
sunbird_cassandra_host: "{{ groups['cassandra'][0] }}"
sunbird_cassandra_port: 9042
- sunbird_cassandra_keyspace: sunbird
+ sunbird_cassandra_keyspace: "{{cassandra_keyspace_to_migrate}}"
+ sunbird_cassandra_migration_location: "filesystem:migration-script/{{cassandra_keyspace_to_migrate}}"
vars_files:
- ['{{inventory_dir}}/secrets.yml', 'secrets/{{env}}.yml']
roles:
diff --git a/ansible/cert-file-upload.yml b/ansible/cert-file-upload.yml
deleted file mode 100644
index e29a7b6c2b..0000000000
--- a/ansible/cert-file-upload.yml
+++ /dev/null
@@ -1,10 +0,0 @@
----
-- hosts: localhost
- become: yes
- vars_files:
- - "{{inventory_dir}}/secrets.yml"
- environment:
- AZURE_STORAGE_ACCOUNT: "{{ sunbird_public_storage_account_name }}"
- AZURE_STORAGE_KEY: "{{ sunbird_public_storage_account_key }}"
- roles:
- - cert-file-upload
diff --git a/ansible/deploy-plugins.yml b/ansible/deploy-plugins.yml
index cd2b5b512b..a96af44f5a 100644
--- a/ansible/deploy-plugins.yml
+++ b/ansible/deploy-plugins.yml
@@ -1,54 +1,301 @@
- hosts: local
- become: yes
gather_facts: no
vars_files:
- "{{inventory_dir}}/secrets.yml"
- environment:
- AZURE_STORAGE_ACCOUNT: "{{ sunbird_public_storage_account_name }}"
- AZURE_STORAGE_SAS_TOKEN: "{{ sunbird_public_storage_account_sas }}"
tasks:
- name: rename env_domain in preview_cdn.html for CDN
shell: |
- echo "{{sunbird_portal_preview_cdn_url}}"
- sed -i 's|cdn_url|{{sunbird_portal_preview_cdn_url}}|g' "{{currentws}}"/ansible/preview/preview_cdn.html
+ echo "{{ sunbird_portal_preview_cdn_url }}"
+ sed -i 's|cdn_url|{{ sunbird_portal_preview_cdn_url }}|g' "{{ currentws }}"/ansible/preview/preview_cdn.html
when: sunbird_portal_preview_cdn_url is defined
tags:
- preview
- - name: delete batch
- shell: |
- azcopy rm "https://{{ sunbird_public_storage_account_name }}.blob.core.windows.net/{{ plugin_container_name }}/{{ folder_name }}{{sunbird_public_storage_account_sas}}" --recursive=true
- async: 3600
- poll: 10
- tags:
- - content-editor
- - collection-editor
- - generic-editor
- - preview
+ - name: this block consists of tasks related to azure storage
+ block:
+ - name: set common azure variables
+ set_fact:
+ blob_container_name: "{{ cloud_storage_content_bucketname }}"
+ container_public_access: "container"
+ storage_account_name: "{{ cloud_public_storage_accountname }}"
+ storage_account_key: "{{ cloud_public_storage_secret }}"
+ tags:
+ - always
+ no_log: True
- - name: upload batch
- command: "az storage blob upload-batch --destination {{ plugin_container_name }}/{{ folder_name }} --source {{ source_name }}"
- async: 3600
- poll: 10
- tags:
- - content-editor
- - collection-editor
- - generic-editor
- - preview
- - editor
- - core-plugins
+ - block:
+ - name: delete files and folders from azure storage using azcopy
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: delete-using-azcopy.yml
+ vars:
+ blob_container_folder_path: "/{{ folder_name }}"
+ tags:
+ - content-editor
+ - collection-editor
+ - generic-editor
+ - preview
+
+ - block:
+ - name: upload batch of files to azure storage
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: blob-upload-batch.yml
+ vars:
+ blob_container_folder_path: "/{{ folder_name }}"
+ local_file_or_folder_path: "{{ source_name }}"
+ tags:
+ - content-editor
+ - collection-editor
+ - generic-editor
+ - preview
+ - editor
+ - core-plugins
+
+ - block:
+ - name: upload file to azure storage
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: blob-upload.yml
+ vars:
+ blob_file_name: "artefacts/content-player/content-player-{{ player_version_number }}.zip"
+ local_file_or_folder_path: "{{ source_file_name }}"
+ tags:
+ - preview
+ - block:
+ - name: delete and re-upload plugins
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: "{{ item[0] }}"
+ vars:
+ blob_delete_pattern: "content-plugins/{{ item[1] }}/*"
+ blob_container_folder_path: "/content-plugins/{{ item[1] }}"
+ local_file_or_folder_path: "{{ source_folder }}/{{ item[1] }}"
+ with_nested:
+ - ['blob-delete-batch-no-poll.yml', 'blob-upload-batch-no-poll.yml']
+ - "{{ lookup('file', plugins_to_delete_and_upload).split('\n') }}"
+ tags:
+ - plugins
+ when: cloud_service_provider == "azure"
+
+### GCP tasks ####
+ - name: this block consists of tasks related to gcloud storage
+ block:
+ - name: set common gcloud variables
+ set_fact:
+ gcp_bucket_name: "{{ cloud_storage_content_bucketname }}"
+ gcp_path: ""
+
+ tags:
+ - always
+ - block:
+ - name: delete files and folders from gcloud storage
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: delete-batch.yml
+ vars:
+ file_delete_pattern: "{{ folder_name }}"
+ tags:
+ - content-editor
+ - collection-editor
+ - generic-editor
+ - preview
+
+ - block:
+ - name: upload batch of files to gcloud storage
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: upload-batch.yml
+ vars:
+ gcp_path: "{{ folder_name }}"
+ local_file_or_folder_path: "{{ source_name }}"
+ tags:
+ - content-editor
+ - collection-editor
+ - generic-editor
+ - preview
+ - editor
+ - core-plugins
+
+ - block:
+ - name: upload file to gcloud storage
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: upload.yml
+ vars:
+ gcp_path: "artefacts/content-player/content-player-{{ player_version_number }}.zip"
+ local_file_or_folder_path: "{{ source_file_name }}"
+ tags:
+ - preview
- - name: upload file
- command: "az storage blob upload --container-name {{ plugin_container_name }} --file {{ source_file_name }} --name artefacts/content-player/content-player-{{ player_version_number }}.zip"
- async: 3600
- poll: 10
- tags:
- - preview
+ - block:
+ - name: Authenticate to gcloud
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: gcloud-auth.yml
- - name: run az_copy.sh
- shell: "bash {{ az_file_path }} {{ plugin_container_name }} {{ source_file }}"
- async: 3600
- poll: 10
- tags:
- - plugins
+ - name: delete and re-upload plugins
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: "{{ item[0] }}"
+ vars:
+ gcp_storage_service_account_name: "{{ cloud_public_storage_accountname }}"
+ gcp_storage_key_file: "{{ cloud_public_storage_secret }}"
+ file_delete_pattern: "content-plugins/{{ item[1] }}/*"
+ gcp_path: "content-plugins/{{ item[1] }}"
+ local_file_or_folder_path: "{{ source_folder }}/{{ item[1] }}"
+ with_nested:
+ - ['delete-batch-no-poll.yml', 'upload-batch-no-poll.yml']
+ - "{{ lookup('file', plugins_to_delete_and_upload).split('\n') }}"
+
+ - name: Revoke gcloud access
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: gcloud-revoke.yml
+ tags:
+ - plugins
+ when: cloud_service_provider == "gcloud"
+
+################################### AWS tasks #########################
+ - name: this block consists of tasks related to aws s3
+ block:
+ - name: set common aws variables
+ set_fact:
+ aws_default_region: "{{ cloud_public_storage_region }}"
+ s3_bucket_name: "{{ cloud_storage_content_bucketname }}"
+ aws_access_key_id: "{{ cloud_public_storage_accountname }}"
+ aws_secret_access_key: "{{ cloud_public_storage_secret }}"
+ tags:
+ - always
+
+ - block:
+ - name: delete files and folders from s3
+ include_role:
+ name: aws-cloud-storage
+ tasks_from: delete-folder.yml
+ vars:
+ s3_path: "{{ folder_name }}"
+ tags:
+ - content-editor
+ - collection-editor
+ - generic-editor
+ - preview
+
+ - block:
+ - name: upload folder to s3
+ include_role:
+ name: aws-cloud-storage
+ tasks_from: upload-folder.yml
+ vars:
+ s3_path: "{{ folder_name }}"
+ local_file_or_folder_path: "{{ source_name }}"
+ tags:
+ - content-editor
+ - collection-editor
+ - generic-editor
+ - preview
+ - editor
+ - core-plugins
+
+ - block:
+ - name: upload file to s3
+ include_role:
+ name: aws-cloud-storage
+ tasks_from: upload.yml
+ vars:
+ s3_path: "artefacts/content-player/content-player-{{ player_version_number }}.zip"
+ local_file_or_folder_path: "{{ source_file_name }}"
+ tags:
+ - preview
+
+ - block:
+ - name: run the s3_copy.sh script
+ shell: "bash {{ s3_file_path }} {{ source_file }} {{ cloud_public_storage_accountname }}"
+ async: 3600
+ poll: 10
+ environment:
+ AWS_DEFAULT_REGION: "{{ aws_default_region }}"
+ AWS_ACCESS_KEY_ID: "{{ aws_access_key_id }}"
+ AWS_SECRET_ACCESS_KEY: "{{ aws_secret_access_key }}"
+ tags:
+ - plugins
+ when: cloud_service_provider == "aws"
+
+
+################################### OCI tasks #########################
+ - name: this block consists of tasks related to oci oss
+ block:
+ - name: set common oci variables
+ set_fact:
+ oss_bucket_name: "{{ cloud_storage_content_bucketname }}"
+ oss_namespace: "{{ oci_namespace }}"
+ tags:
+ - always
+
+ - block:
+ - name: delete files and folders from oci oss
+ include_role:
+ name: oci-cloud-storage
+ apply:
+ environment:
+ OCI_CLI_AUTH: "instance_principal"
+ tasks_from: delete-folder.yml
+ vars:
+ oss_path: "{{ folder_name }}/"
+ tags:
+ - content-editor
+ - collection-editor
+ - generic-editor
+ - preview
+
+ - block:
+ - name: upload folder to oci oss
+ include_role:
+ name: oci-cloud-storage
+ apply:
+ environment:
+ OCI_CLI_AUTH: "instance_principal"
+ tasks_from: upload-folder.yml
+ vars:
+ oss_path: "{{ folder_name }}/"
+ local_file_or_folder_path: "{{ source_name }}"
+ tags:
+ - content-editor
+ - collection-editor
+ - generic-editor
+ - preview
+ - editor
+ - core-plugins
+
+ - block:
+ - name: upload file to oci oss
+ include_role:
+ name: oci-cloud-storage
+ apply:
+ environment:
+ OCI_CLI_AUTH: "instance_principal"
+ tasks_from: upload.yml
+ vars:
+ oss_path: "artefacts/content-player/content-player-{{ player_version_number }}.zip"
+ local_file_or_folder_path: "{{ source_file_name }}"
+ tags:
+ - preview
+
+ - block:
+ - name: delete and re-upload plugins for oci
+ include_role:
+ name: oci-cloud-storage
+ apply:
+ environment:
+ OCI_CLI_AUTH: "instance_principal"
+ tasks_from: "{{ item[0] }}"
+ vars:
+ object_prefix: "content-plugins/{{ item[1] }}/"
+ local_file_or_folder_path: "{{ source_folder }}/{{ item[1] }}"
+ with_nested:
+ - ['oss-delete-batch-no-poll.yml', 'oss-upload-batch-no-poll.yml']
+ - "{{ lookup('file', plugins_to_delete_and_upload).split('\n') }}"
+ tags:
+ - plugins
+ when: cloud_service_provider == "oci"
diff --git a/ansible/desktop-faq-upload.yml b/ansible/desktop-faq-upload.yml
index 9dbeddd1c0..77d56dbc5b 100644
--- a/ansible/desktop-faq-upload.yml
+++ b/ansible/desktop-faq-upload.yml
@@ -1,49 +1,304 @@
- hosts: localhost
- become: yes
vars_files:
- "{{inventory_dir}}/secrets.yml"
- vars:
- artifacts_container: "{{desktop_container}}"
- artifact: "{{destination_path}}"
- artifact_path: "{{playbook_dir}}/../{{src_file_path}}"
- environment:
- AZURE_STORAGE_ACCOUNT: "{{ sunbird_public_storage_account_name }}"
- AZURE_STORAGE_KEY: "{{ sunbird_public_storage_account_key }}"
- roles:
- - artifacts-upload-azure
- tags:
- - upload-desktop-faq
-
-
-- hosts: localhost
- become: yes
- vars_files:
- - "{{inventory_dir}}/secrets.yml"
- vars:
- artifacts_container: "{{desktop_container}}"
- artifact: "{{destination_path}}"
- artifact_path: "{{playbook_dir}}/../{{src_file_path}}"
- environment:
- AZURE_STORAGE_ACCOUNT: "{{ sunbird_private_storage_account_name }}"
- AZURE_STORAGE_KEY: "{{ sunbird_private_storage_account_key }}"
- roles:
- - artifacts-upload-azure
- tags:
- - upload-label
+ tasks:
+ - name: this block consists of tasks related to azure storage
+ block:
+ - name: set common azure variables
+ set_fact:
+ blob_container_name: ""
+ blob_file_name: "{{ destination_path }}"
+ blob_container_folder_path: "/{{ destination_path }}"
+ local_file_or_folder_path: "{{ playbook_dir }}/../{{ src_file_path }}"
+ tags:
+ - always
+
+ - block:
+ - name: upload file to azure storage
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: blob-upload.yml
+ vars:
+ container_public_access: "container"
+ blob_container_name: "{{ cloud_storage_public_bucketname }}"
+ storage_account_name: "{{ cloud_public_storage_accountname }}"
+ storage_account_key: "{{ cloud_public_storage_secret }}"
+ tags:
+ - upload-desktop-faq
+
+ - block:
+ - name: upload file to azure storage
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: blob-upload.yml
+ vars:
+ container_public_access: "off"
+ blob_container_name: "{{ cloud_storage_label_bucketname }}"
+ storage_account_name: "{{ cloud_private_storage_accountname }}"
+ storage_account_key: "{{ cloud_private_storage_secret }}"
+ tags:
+ - upload-label
+
+ - block:
+ - name: upload batch of files to azure storage - chatbot
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: blob-upload-batch.yml
+ vars:
+ container_public_access: "container"
+ blob_container_name: "{{ cloud_storage_chatbot_bucketname }}"
+ storage_account_name: "{{ cloud_public_storage_accountname }}"
+ storage_account_key: "{{ cloud_public_storage_secret }}"
+ tags:
+ - upload-chatbot-config
+
+ - block:
+ - name: upload batch of files to azure storage - csv-template
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: blob-upload-batch.yml
+ vars:
+ container_public_access: "container"
+ blob_container_name: "{{ cloud_storage_sourcing_bucketname }}"
+ storage_account_name: "{{ cloud_public_storage_accountname }}"
+ storage_account_key: "{{ cloud_public_storage_secret }}"
+ tags:
+ - upload-csv-template
-- hosts: localhost
- become: yes
- vars_files:
- - "{{inventory_dir}}/secrets.yml"
- vars:
- source_path: "{{playbook_dir}}/../{{src_file_path}}"
- destination_path: "{{destination_path}}"
- container_name: "{{desktop_container}}"
- environment:
- AZURE_STORAGE_ACCOUNT: "{{ sunbird_public_storage_account_name }}"
- AZURE_STORAGE_KEY: "{{ sunbird_public_storage_account_key }}"
- roles:
- - upload-batch
- tags:
- - upload-chatbot-config
- - upload-batch
+ - block:
+ - name: upload batch of files to azure storage - discussion-ui
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: blob-upload-batch.yml
+ vars:
+ container_public_access: "container"
+ blob_container_name: "{{ cloud_storage_discussionui_bucketname }}"
+ storage_account_name: "{{ cloud_public_storage_accountname }}"
+ storage_account_key: "{{ cloud_public_storage_secret }}"
+ tags:
+ - upload-discussion-ui
+ when: cloud_service_provider == "azure"
+
+### GCP tasks ###
+ - name: this block consists of tasks related to gcloud storage
+ block:
+ - name: set common gcloud variables
+ set_fact:
+ gcp_path: "{{ destination_path }}"
+ local_file_or_folder_path: "{{ playbook_dir }}/../{{ src_file_path }}"
+ tags:
+ - always
+
+ - block:
+ - name: upload file to gcloud storage
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: upload.yml
+ vars:
+ gcp_storage_service_account_name: "{{ cloud_public_storage_accountname }}"
+ gcp_storage_key_file: "{{ cloud_public_storage_secret }}"
+ gcp_bucket_name: "{{ cloud_storage_public_bucketname }}"
+ tags:
+ - upload-desktop-faq
+
+ - block:
+ - name: upload file to gcloud storage
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: upload.yml
+ vars:
+ gcp_storage_service_account_name: "{{ cloud_private_storage_accountname }}"
+ gcp_storage_key_file: "{{ cloud_private_storage_secret }}"
+ gcp_bucket_name: "{{ cloud_storage_label_bucketname }}"
+ tags:
+ - upload-label
+
+ - block:
+ - name: upload batch of files to gcloud storage - chatbot
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: upload-batch.yml
+ vars:
+ gcp_storage_service_account_name: "{{ cloud_public_storage_accountname }}"
+ gcp_storage_key_file: "{{ cloud_public_storage_secret }}"
+ gcp_bucket_name: "{{ cloud_storage_chatbot_bucketname }}"
+ tags:
+ - upload-chatbot-config
+
+ - block:
+ - name: upload batch of files to gcloud storage - csv-template
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: upload-batch.yml
+ vars:
+ gcp_storage_service_account_name: "{{ cloud_public_storage_accountname }}"
+ gcp_storage_key_file: "{{ cloud_public_storage_secret }}"
+ gcp_bucket_name: "{{ cloud_storage_sourcing_bucketname }}"
+ tags:
+ - upload-csv-template
+
+ - block:
+ - name: upload batch of files to gcloud storage - discussion-ui
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: upload-batch.yml
+ vars:
+ gcp_storage_service_account_name: "{{ cloud_public_storage_accountname }}"
+ gcp_storage_key_file: "{{ cloud_public_storage_secret }}"
+ gcp_bucket_name: "{{ cloud_storage_discussionui_bucketname }}"
+ tags:
+ - upload-discussion-ui
+ when: cloud_service_provider == "gcloud"
+
+######################## AWS tasks #########################################
+
+ - name: this block consists of tasks related to aws s3
+ block:
+ - name: set common aws variables
+ set_fact:
+ aws_default_region: "{{ cloud_public_storage_region }}"
+ local_file_or_folder_path: "{{ playbook_dir }}/../{{ src_file_path }}"
+ s3_path: "{{ destination_path }}"
+ tags:
+ - always
+
+ - block:
+ - name: upload file to aws s3 public bucket
+ include_role:
+ name: aws-cloud-storage
+ tasks_from: upload.yml
+ vars:
+ s3_bucket_name: "{{ cloud_storage_public_bucketname }}"
+ aws_access_key_id: "{{ cloud_public_storage_accountname }}"
+ aws_secret_access_key: "{{ cloud_public_storage_secret }}"
+ tags:
+ - upload-desktop-faq
+
+ - block:
+ - name: upload file to aws s3 private bucket
+ include_role:
+ name: aws-cloud-storage
+ tasks_from: upload.yml
+ vars:
+ s3_bucket_name: "{{ cloud_storage_label_bucketname }}"
+ aws_access_key_id: "{{ cloud_private_storage_accountname }}"
+ aws_secret_access_key: "{{ cloud_private_storage_secret }}"
+ tags:
+ - upload-label
+
+ - block:
+ - name: upload folder to aws s3 - chatbot
+ include_role:
+ name: aws-cloud-storage
+ tasks_from: upload-folder.yml
+ vars:
+ s3_bucket_name: "{{ cloud_storage_chatbot_bucketname }}"
+ aws_access_key_id: "{{ cloud_public_storage_accountname }}"
+ aws_secret_access_key: "{{ cloud_public_storage_secret }}"
+ tags:
+ - upload-chatbot-config
+
+ - block:
+ - name: upload folder to aws s3 - csv-template
+ include_role:
+ name: aws-cloud-storage
+ tasks_from: upload-folder.yml
+ vars:
+ s3_bucket_name: "{{ cloud_storage_sourcing_bucketname }}"
+ aws_access_key_id: "{{ cloud_public_storage_accountname }}"
+ aws_secret_access_key: "{{ cloud_public_storage_secret }}"
+ tags:
+ - upload-csv-template
+
+ - block:
+ - name: upload folder to aws s3 - discusion-ui
+ include_role:
+ name: aws-cloud-storage
+ tasks_from: upload-folder.yml
+ vars:
+ s3_bucket_name: "{{ cloud_storage_discussionui_bucketname }}"
+ aws_access_key_id: "{{ cloud_public_storage_accountname }}"
+ aws_secret_access_key: "{{ cloud_public_storage_secret }}"
+ tags:
+ - upload-discussion-ui
+ when: cloud_service_provider == "aws"
+
+
+##### OCI Tasks ####
+
+ - name: this block consists of tasks related to oci oss
+ block:
+ - name: set common oci variables
+ set_fact:
+ local_file_or_folder_path: "{{ playbook_dir }}/../{{ src_file_path }}"
+ tags:
+ - always
+
+ - block:
+ - name: upload file to oci oss public bucket
+ include_role:
+ name: oci-cloud-storage
+ apply:
+ environment:
+ OCI_CLI_AUTH: "instance_principal"
+ tasks_from: upload.yml
+ vars:
+ oss_bucket_name: "{{ cloud_storage_public_bucketname }}"
+ tags:
+ - upload-desktop-faq
+
+ - block:
+ - name: upload file to oci oss private bucket
+ include_role:
+ name: oci-cloud-storage
+ apply:
+ environment:
+ OCI_CLI_AUTH: "instance_principal"
+ tasks_from: upload.yml
+ vars:
+ oss_bucket_name: "{{ cloud_storage_label_bucketname }}"
+ tags:
+ - upload-label
+
+ - block:
+ - name: upload folder to oci oss - chatbot
+ include_role:
+ name: oci-cloud-storage
+ apply:
+ environment:
+ OCI_CLI_AUTH: "instance_principal"
+ tasks_from: upload-folder.yml
+ vars:
+ oss_path: "{{ destination_path }}/"
+ oss_bucket_name: "{{ cloud_storage_chatbot_bucketname }}"
+ tags:
+ - upload-chatbot-config
+
+ - block:
+ - name: upload folder to oci oss - csv-template
+ include_role:
+ name: oci-cloud-storage
+ apply:
+ environment:
+ OCI_CLI_AUTH: "instance_principal"
+ tasks_from: upload-folder.yml
+ vars:
+ oss_path: "{{ destination_path }}/"
+ oss_bucket_name: "{{ cloud_storage_sourcing_bucketname }}"
+ tags:
+ - upload-csv-template
+
+ - block:
+ - name: upload folder to oci oss - discussion-ui
+ include_role:
+ name: oci-cloud-storage
+ apply:
+ environment:
+ OCI_CLI_AUTH: "instance_principal"
+ tasks_from: upload-folder.yml
+ vars:
+ oss_path: "{{ destination_path }}/"
+ oss_bucket_name: "{{ cloud_storage_discussionui_bucketname }}"
+ tags:
+ - upload-discussion-ui
+ when: cloud_service_provider == "oci"
diff --git a/ansible/dial_upload-schema.yml b/ansible/dial_upload-schema.yml
index 1f510c2c92..75609bde68 100644
--- a/ansible/dial_upload-schema.yml
+++ b/ansible/dial_upload-schema.yml
@@ -1,11 +1,7 @@
- hosts: local
- become: yes
gather_facts: no
vars_files:
- "{{inventory_dir}}/secrets.yml"
- environment:
- AZURE_STORAGE_ACCOUNT: "{{ sunbird_public_storage_account_name }}"
- AZURE_STORAGE_SAS_TOKEN: "{{ sunbird_public_storage_account_sas }}"
tasks:
- name: Create directories
file:
@@ -22,9 +18,42 @@
dest: dial_schema_template_files/{{ item.path }}
with_filetree: "{{ source_name }}"
when: item.state == 'file'
-
- - name: upload batch
- command: "az storage blob upload-batch --destination {{ dial_plugin_container_name }}/schemas/local --source dial_schema_template_files"
- async: 3600
- poll: 10
+
+ - name: upload batch of files to azure storage
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: blob-upload-batch.yml
+ vars:
+ blob_container_name: "{{ cloud_storage_dial_bucketname }}"
+ container_public_access: "blob"
+ blob_container_folder_path: "/schemas/local"
+ local_file_or_folder_path: "dial_schema_template_files"
+ storage_account_name: "{{ cloud_public_storage_accountname }}"
+ storage_account_key: "{{ cloud_public_storage_secret }}"
+ when: cloud_service_provider == "azure"
+
+ - name: upload batch of files to aws s3
+ include_role:
+ name: aws-cloud-storage
+ tasks_from: upload-folder.yml
+ vars:
+ s3_bucket_name: "{{ cloud_storage_dial_bucketname }}"
+ aws_access_key_id: "{{ cloud_public_storage_accountname }}"
+ aws_secret_access_key: "{{ cloud_public_storage_secret }}"
+ aws_default_region: "{{ cloud_public_storage_region }}"
+ local_file_or_folder_path: "dial_schema_template_files"
+ s3_path: "schemas/local"
+ when: cloud_service_provider == "aws"
+
+ - name: upload batch of files to gcloud storage
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: upload-batch.yml
+ vars:
+ gcp_storage_service_account_name: "{{ cloud_public_storage_accountname }}"
+ gcp_storage_key_file: "{{ cloud_public_storage_secret }}"
+ gcp_bucket_name: "{{ cloud_storage_dial_bucketname }}"
+ gcp_path: "schemas/local"
+ local_file_or_folder_path: "dial_schema_template_files"
+ when: cloud_service_provider == "gcloud"
diff --git a/ansible/es.yml b/ansible/es.yml
index c526414f47..193f81ab27 100644
--- a/ansible/es.yml
+++ b/ansible/es.yml
@@ -12,6 +12,8 @@
when: cloud_service_provider == "aws"
- role: es-gcs-snapshot
when: cloud_service_provider == "gcloud"
+ - role: es-oci-snapshot
+ when: cloud_service_provider == "oci"
- role: es5-snapshot-purge
tags:
- es_backup
@@ -31,6 +33,8 @@
when: cloud_service_provider == "aws"
- role: es-gcs-snapshot
when: cloud_service_provider == "gcloud"
+ - role: es-oci-snapshot
+ when: cloud_service_provider == "oci"
- es5-snapshot-purge
tags:
- log_es_backup
diff --git a/ansible/functional-tests.yml b/ansible/functional-tests.yml
new file mode 100644
index 0000000000..35d318d125
--- /dev/null
+++ b/ansible/functional-tests.yml
@@ -0,0 +1,7 @@
+- hosts: local
+ gather_facts: false
+ vars_files:
+ - ['{{inventory_dir}}/secrets.yml']
+ roles:
+ - functional-tests
+ run_once: true
\ No newline at end of file
diff --git a/ansible/grafana-backup.yml b/ansible/grafana-backup.yml
index 9770875812..e5ee720b59 100644
--- a/ansible/grafana-backup.yml
+++ b/ansible/grafana-backup.yml
@@ -2,8 +2,5 @@
become: yes
vars_files:
- "{{inventory_dir}}/secrets.yml"
- environment:
- AZURE_STORAGE_ACCOUNT: "{{ sunbird_management_storage_account_name }}"
- AZURE_STORAGE_KEY: "{{ sunbird_management_storage_account_name }}"
roles:
- grafana-backup
diff --git a/ansible/inventory/env/group_vars/all.yml b/ansible/inventory/env/group_vars/all.yml
index df20586566..79d8d960a5 100644
--- a/ansible/inventory/env/group_vars/all.yml
+++ b/ansible/inventory/env/group_vars/all.yml
@@ -10,13 +10,14 @@ api_proxy_name: "api.{{proxy_server_name}}" # Domain name on which device reg
swarm_load_balancer: "{{proxy_server_name}}"
proxy_site_key: "{{ core_vault_proxy_site_key }}" #SSL certificate's site.key file contents. More details in this wiki: {{proto}}://github.com/project-sunbird/sunbird-commons/wiki/Updating-SSL-certificates-in-Sunbird-Proxy-service
proxy_site_crt: "{{ core_vault_proxy_site_crt }}" #SSL certificate's site.crt file contents. More details in this wiki: {{proto}}://github.com/project-sunbird/sunbird-commons/wiki/Updating-SSL-certificates-in-Sunbird-Proxy-service
-sunbird_environment: "{{env}}" # +content-service learner
+sunbird_environment: "{{env}}" # +content-service userorg
sunbird_installation: "{{env}}" # +keycloak
sunbird_instance: "{{env}}"
env_short_name: "{{env}}"
sunbird_env: "{{env}}" #Ekstep environment to connect to. Use `qa` for non-prod deployments, and `prod` for prod deployment.
sunbird_app_name: "{{env}}"
env_prefix: "{{env}}"
+mobile_deeplink_url: "{{mobile_deeplink_url}}"
# Keycloak
keycloak_api_management_user_first_name: "admin"
@@ -28,7 +29,7 @@ keycloak_management_user: "admin"
keycloak_management_password: "{{core_vault_keycloak_password}}"
tenant_name: sunbird
-## Learner service
+## UserOrg service
sunbird_url_shortner_access_token: "{{vault_core_url_shortner_access_token}}"
sunbird_url_shortner_enable: 'false'
@@ -36,9 +37,8 @@ sunbird_keycloak_required_action_link_expiration_seconds: 2592000
sunbird_es_port: 9300
mail_server_port: 587
-upstream_url: "{{sunbird_public_storage_account_name}}.blob.core.windows.net/{{sunbird_content_azure_storage_container}}"
-# Learner
+# UserOrg
sunbird_user_profile_field_default_visibility: private
# Player
@@ -86,7 +86,6 @@ keycloak_postgres_host: "{{groups['postgres'][0]}}" #Private IP of Postgres ser
kong_postgres_host: "{{groups['postgres'][0]}}" #Private IP of Postgres server
uci_postgres_host: "{{groups['postgres'][0]}}" #Private IP of Postgres server
sunbird_cassandra_host: "{{groups['cassandra']|join(',')}}" #Private IP of Cassandra server
-sunbird_es_host: "{{groups['es']| join(',')}}"
## Application server configurations
sunbird_analytics_api_base_url: "http://analytics-service.{{namespace}}.svc.cluster.local:9000"
@@ -130,10 +129,11 @@ cassandra_version: '3.9'
cassandra_port: 9042
cassandra_rpc_address: 0.0.0.0
cassandra_restore_dir: "/home/{{ ansible_ssh_user }}/"
-cassandra_backup_azure_container_name: cassandra-backup
cassandra_backup_dir: /data/cassandra/backup
### Release 5.0.0 ###
cassandra_multi_dc_enabled: false
+### Release-5.0.1 ###
+cloud_storage_base_url: "{{cloud_storage_base_url}}"
keycloak_realm: sunbird
sunbird_content_player_url: "http://kong:8000/"
@@ -176,7 +176,7 @@ sunbird_plugin_repo_api_base_url: "{{ sunbird_search_service_api_base_url }}"
sunbird_data_service_api_base_url: "{{sunbird_ekstep_api_base_url}}"
sunbird_data_service_api_key: "{{ core_vault_sunbird_api_auth_token }}"
sunbird_content_service_api_base_url: "http://content-service.{{namespace}}.svc.cluster.local:9000"
-sunbird_user_service_api_base_url: "http://learner-service.{{namespace}}.svc.cluster.local:9000"
+sunbird_user_service_api_base_url: "http://userorg-service.{{namespace}}.svc.cluster.local:9000"
sunbird_group_service_api_base_url: "http://groups-service:9000"
plugin_media_base_url: "{{proto}}://{{domain_name}}"
@@ -237,7 +237,7 @@ enable_scraping_docker_metrics: false
postgres_exporter_postgres_port: 5432
postgres_exporter_user: postgres_exporter
sunbird_cs_base_url: "http://{{sunbird_swarm_manager_lb_ip}}:5000"
-sunbird_user_service_base_url: "http://{{private_ingressgateway_ip}}/learner"
+sunbird_user_service_base_url: "http://{{private_ingressgateway_ip}}/userorg"
kong_admin_api_url: http://localhost:8001
@@ -340,13 +340,11 @@ kong__test_jwt: "{{ core_vault_sunbird_api_auth_token }}"
####### App ES ########
app_es_etc_cluster_name: "{{env}}"
app_es_etc_discovery_zen_minimum_master_nodes: "{{groups['es']| length | int}}"
-app_es_snapshot_host: "{{ groups['es'][0] }}"
app_es_restore_host: "{{ groups['es'][0] }}"
app_es_snapshot_base_path: application
#######Log Es
log_es_etc_cluster_name: "{{env}}-log"
-log_es_snapshot_host: "{{ groups['log-es'][0] }}"
log_es_restore_host: "{{ groups['log-es'][0] }}"
log_es_host: "{{ groups['log-es'][0] }}"
@@ -363,7 +361,7 @@ content_service_blacklisted_resourcetype: ''
content_service_whitelisted_resourcetype: ''
content_service_whitelisted_mimetype: ''
content_service_blacklisted_mimetype: ''
-sunbird_cloud_storage_urls: 'https://s3.ap-south-1.amazonaws.com/ekstep-public-{{ekstep_s3_env}}/,https://ekstep-public-{{ekstep_s3_env}}.s3-ap-south-1.amazonaws.com/,https://{{sunbird_public_storage_account_name}}.blob.core.windows.net/{{sunbird_content_azure_storage_container}}/'
+sunbird_cloud_storage_urls: 'https://s3.ap-south-1.amazonaws.com/ekstep-public-{{ekstep_s3_env}}/,https://ekstep-public-{{ekstep_s3_env}}.s3-ap-south-1.amazonaws.com/,{{ upstream_url }}/,https://files.xyz.in/contentsbucket/,https://obj.xyz.in/contentsbucket/'
sunbird_email_max_recipients_limit: 100
sunbird_cassandra_consistency_level: local_quorum
sunbird_cassandra_replication_strategy: '{"class":"SimpleStrategy","replication_factor":"1"}'
@@ -375,7 +373,6 @@ sunbird_otp_length: 6
sunbird_help_link_visibility: FALSE
# not required
-sunbird_image_storage_url: "https://{{sunbird_public_storage_account_name}}.blob.core.windows.net/dial/"
vault_auth_key: "{{core_vault_auth_key}}"
vault_sender: "{{core_vault_sender}}"
vault_country: "{{core_vault_country}}"
@@ -410,8 +407,6 @@ sunbird_health_check_enable: 'true'
## Release 1.15 ##
sunbird_keycloak_user_federation_provider_id: "{{core_vault_sunbird_keycloak_user_federation_provider_id}}"
-# Learner-service
-sunbird_course_metrics_base_url: https://{{sunbird_private_storage_account_name}}.blob.core.windows.net/
sunbird_gzip_size_threshold: 262144
prometheus_mount_point: "/root/dockerdata/prometheus/data/"
@@ -425,7 +420,7 @@ sunbird_sso_kafka_topic: "{{env_name}}.lms.sso.events"
__yarn_host__: "{{ groups['yarn-master'][0] }}"
zookeepers: "{{groups['zookeeper']|join(':2181,')}}:2181"
kafka_brokers: "{{groups['processing-cluster-kafka']|join(':9092,')}}:9092"
-__lms_host__: "http://{{private_ingressgateway_ip}}/learner"
+__lms_host__: "http://{{private_ingressgateway_ip}}/userorg"
sunbird_redis_host: "{{ groups['lp-redis'][0] }}"
### Release 2.1.0 ###
@@ -505,10 +500,14 @@ content_import_remove_props: '["downloadUrl","variants","previewUrl","streamingU
#Sunbird-Portal release-2.6.5 #
sunbird_portal_updateLoginTimeEnabled: false
-# Desktop app vars
-#sunbird_offline_azure_storage_account: "" #added this var for adopter usecase
+# SB-31155 - This should be deprecated in future in favour of offline_installer_storage
offline_installer_container_name: "{{env}}-offlineinstaller"
-cloud_storage_url: "{{ sunbird_public_storage_account_name }}.blob.core.windows.net"
+
+# SB-31155 - Adding a generalized variable which can be used for any CSP
+offline_installer_storage: "{{ offline_installer_container_name }}"
+
+# SB-31155 - Removed multiple declarations and moved here
+sunbird_offline_azure_storage_account_url: "{{ cloud_storage_url }}/{{ offline_installer_storage }}"
# Search-service
search_index_host: "{{ groups['composite-search-cluster']|join(':9200,')}}:9200"
@@ -553,5 +552,23 @@ sunbird_trampoline_android_keycloak_client_id: trampoline-android
sunbird_trampoline_desktop_keycloak_client_id: trampoline-desktop
# DIAL-service schema
+# SB-31155 - This should be deprecated in future in favour of dial_plugin_storage
dial_plugin_container_name: "sunbird-dial-{{env}}"
-dial_service_schema_base_path: "https://{{sunbird_public_storage_account_name}}.blob.core.windows.net/{{dial_plugin_container_name}}/jsonld-schema/local"
+
+# SB-31155 - Adding a generalized variable which can be used for any CSP
+dial_plugin_storage: "{{ dial_plugin_container_name }}"
+dial_service_schema_base_path: "{{ cloud_storage_url }}/{{ dial_plugin_storage }}/jsonld-schema/local"
+
+# SB-31155 - Moving few vars from private repo template to here
+content_storage: "{{ sunbird_content_azure_storage_container }}"
+upstream_url: "{{ cloud_storage_url }}/{{ content_storage }}"
+plugin_upstream_url: "{{ upstream_url }}"
+kp_schema_base_path: "{{ upstream_url }}/schemas/local"
+# SB-31155 - Moved to the installation public container for now (same place where keycloaka and java artifacts are stored)
+h5p_library_path: "https://sunbirdpublic.blob.core.windows.net/installation/h5p-standalone-1.3.4.zip"
+
+## Added default values
+cloud_public_storage_proxy: "{{cloud_storage_url}}"
+
+# Lern release-5.4.0
+sunbird_learner_service_local_base_url: "http://userorg-service:9000"
diff --git a/ansible/jenkins-backup.yml b/ansible/jenkins-backup.yml
index 4506a6bf62..acc4172c73 100644
--- a/ansible/jenkins-backup.yml
+++ b/ansible/jenkins-backup.yml
@@ -3,9 +3,5 @@
hosts: jenkins-master
vars_files:
- "{{inventory_dir}}/secrets.yml"
- environment:
- AZURE_STORAGE_ACCOUNT: "{{ sunbird_management_storage_account_name }}"
- AZURE_STORAGE_KEY: "{{ sunbird_management_storage_account_key }}"
-
roles:
- jenkins-backup-upload
diff --git a/ansible/kill_spark_jobs.yaml b/ansible/kill_spark_jobs.yaml
new file mode 100644
index 0000000000..01c01c5bcf
--- /dev/null
+++ b/ansible/kill_spark_jobs.yaml
@@ -0,0 +1,12 @@
+---
+- hosts: spark
+ become: yes
+ tasks:
+ - name: get pids of job manager which may be orphaned
+ shell: ps -ef | grep [j]ob. | awk '{print $2}'
+ register: pids_of_jobmanager
+
+ - name: kill the orphan job manager pids
+ shell: "kill -9 {{ item | int }}"
+ with_items:
+ - "{{ pids_of_jobmanager.stdout_lines }}"
diff --git a/ansible/kp_upload-schema.yml b/ansible/kp_upload-schema.yml
index 0ca52f5f02..0f57586047 100644
--- a/ansible/kp_upload-schema.yml
+++ b/ansible/kp_upload-schema.yml
@@ -1,13 +1,55 @@
- hosts: local
- become: yes
gather_facts: no
vars_files:
- "{{inventory_dir}}/secrets.yml"
- environment:
- AZURE_STORAGE_ACCOUNT: "{{ sunbird_public_storage_account_name }}"
- AZURE_STORAGE_SAS_TOKEN: "{{ sunbird_public_storage_account_sas }}"
tasks:
- - name: upload batch
- command: "az storage blob upload-batch --destination {{ plugin_container_name }}/schemas/local --source {{ source_name }}"
- async: 3600
- poll: 10
\ No newline at end of file
+ - name: upload batch of files to azure storage
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: blob-upload-batch.yml
+ vars:
+ blob_container_name: "{{ cloud_storage_content_bucketname }}"
+ container_public_access: "container"
+ blob_container_folder_path: "/schemas/local"
+ local_file_or_folder_path: "{{ source_name }}"
+ storage_account_name: "{{ cloud_public_storage_accountname }}"
+ storage_account_key: "{{ cloud_public_storage_secret }}"
+ when: cloud_service_provider == "azure"
+
+ - name: upload batch of files to aws s3
+ include_role:
+ name: aws-cloud-storage
+ tasks_from: upload-folder.yml
+ vars:
+ s3_bucket_name: "{{ cloud_storage_content_bucketname }}"
+ aws_access_key_id: "{{ cloud_public_storage_accountname }}"
+ aws_secret_access_key: "{{ cloud_public_storage_secret }}"
+ aws_default_region: "{{ cloud_public_storage_region }}"
+ local_file_or_folder_path: "{{ source_name }}"
+ s3_path: "schemas/local"
+ when: cloud_service_provider == "aws"
+
+ - name: upload batch of files to gcloud storage
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: upload-batch.yml
+ vars:
+ gcp_storage_service_account_name: "{{ cloud_public_storage_accountname }}"
+ gcp_storage_key_file: "{{ cloud_public_storage_secret }}"
+ gcp_bucket_name: "{{ cloud_storage_content_bucketname }}"
+ gcp_path: "schemas/local"
+ local_file_or_folder_path: "{{ source_name }}"
+ when: cloud_service_provider == "gcloud"
+
+ - name: upload batch of files to oci oss
+ include_role:
+ name: oci-cloud-storage
+ apply:
+ environment:
+ OCI_CLI_AUTH: "instance_principal"
+ tasks_from: upload-folder.yml
+ vars:
+ oss_bucket_name: "{{ cloud_storage_content_bucketname }}"
+ local_file_or_folder_path: "{{ source_name }}"
+ oss_path: "schemas/local/"
+ when: cloud_service_provider == "oci"
\ No newline at end of file
diff --git a/ansible/ml-analytics-adhoc.yaml b/ansible/ml-analytics-adhoc.yaml
new file mode 100644
index 0000000000..f870c5434e
--- /dev/null
+++ b/ansible/ml-analytics-adhoc.yaml
@@ -0,0 +1,4 @@
+- hosts: ml-analytics-service
+ become: yes
+ roles:
+ - ml-analytics-adhoc-jobs
diff --git a/ansible/mongodb-backup.yml b/ansible/mongodb-backup.yml
index 95ff1e7d61..4db8d263bd 100644
--- a/ansible/mongodb-backup.yml
+++ b/ansible/mongodb-backup.yml
@@ -1,9 +1,7 @@
+---
- hosts: "{{ host }}"
- become: yes
+ become: true
vars_files:
- ['{{inventory_dir}}/secrets.yml']
- environment:
- AZURE_STORAGE_ACCOUNT: "{{ sunbird_management_storage_account_name }}"
- AZURE_STORAGE_KEY: "{{ sunbird_management_storage_account_key }}"
roles:
- mongodb-backup
diff --git a/ansible/nodebbui-upload.yml b/ansible/nodebbui-upload.yml
deleted file mode 100644
index 92b484a580..0000000000
--- a/ansible/nodebbui-upload.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-- hosts: local
- become: yes
- gather_facts: no
- vars_files:
- - "{{inventory_dir}}/secrets.yml"
- environment:
- AZURE_STORAGE_ACCOUNT: "{{ sunbird_public_storage_account_name }}"
- AZURE_STORAGE_SAS_TOKEN: "{{ sunbird_public_storage_account_sas }}"
- tasks:
- - name: delete batch
- shell: |
- azcopy rm "https://{{ sunbird_public_storage_account_name }}.blob.core.windows.net/{{ nodebbui_container_name }}{{sunbird_public_storage_account_sas}}" --recursive=true
- async: 3600
- poll: 10
-
- - name: upload batch
- command: "az storage blob upload-batch --destination {{ nodebbui_container_name }} --source {{ source_name }}"
- async: 3600
- poll: 10
diff --git a/ansible/plugin.yml b/ansible/plugin.yml
deleted file mode 100644
index ac8f93b5cf..0000000000
--- a/ansible/plugin.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-- hosts: local
- become: yes
- gather_facts: no
- vars_files:
- - "{{inventory_dir}}/secrets.yml"
- environment:
- AZURE_STORAGE_ACCOUNT: "{{ sunbird_public_storage_account_name }}"
- AZURE_STORAGE_KEY: "{{ sunbird_public_storage_account_key }}"
- tasks:
- - name: delte plugin org_sunbird_questionunit_quml
- command: "az storage blob delete-batch --source {{ plugin_container_name }} --pattern content-plugins/{{ plugins_name }}"
- async: 3600
- poll: 10
- tags:
- - org_sunbird_questionunit_quml
-
- - name: upload plugin org_sunbird_questionunit_quml
- command: "az storage blob upload-batch --destination {{ plugin_container_name }}/content-plugins/{{ plugins_name }} --source {{ source_file }}"
- async: 3600
- poll: 10
- tags:
- - org_sunbird_questionunit_quml
diff --git a/ansible/plugins.yml b/ansible/plugins.yml
new file mode 100644
index 0000000000..fa5967b462
--- /dev/null
+++ b/ansible/plugins.yml
@@ -0,0 +1,56 @@
+---
+- hosts: local
+ gather_facts: false
+ vars_files:
+ - "{{inventory_dir}}/secrets.yml"
+ # The vars: section is added for the below reason
+ # 1. Introduce a common variable for various clouds. In case of azure, it refers to container name, in case of aws / gcp, it refers to folder name
+ # 2. We want to avoid too many new variable introduction / replacement in first phase. Hence we will reuse the existing variable defined in private repo
+ # or other default files and just assign the value to the newly introduced common variable
+ # 3. After few releases, we will remove the older variables and use only the new variables across the repos
+ vars:
+ plugin_storage: "{{ plugin_container_name }}"
+ tasks:
+ - name: this block consists of tasks related to azure storage
+ block:
+ - name: set common azure variables
+ set_fact:
+ blob_container_name: "{{ plugin_storage }}"
+ container_public_access: "container"
+ blob_delete_pattern: "content-plugins/{{ plugins_name }}"
+ blob_container_folder_path: "/content-plugins/{{ plugins_name }}"
+ local_file_or_folder_path: "{{ source_file }}"
+ storage_account_name: "{{ cloud_public_storage_accountname }}"
+ storage_account_key: "{{ cloud_public_storage_secret }}"
+
+ - name: delete batch of files from azure storage
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: blob-delete-batch.yml
+
+ - name: upload batch of files to azure storage
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: blob-upload-batch.yml
+ when: cloud_service_provider == "azure"
+
+### GCP tasks ###
+ - name: this block consists of tasks related to gcloud storage
+ block:
+ - name: set common gcloud variables
+ set_fact:
+ gcp_bucket_name: "{{ cloud_storage_content_bucketname }}"
+ gcp_path: "/content-plugins/{{ plugins_name }}"
+ file_delete_pattern: "content-plugins/{{ plugins_name }}"
+ local_file_or_folder_path: "{{ source_file }}"
+
+ - name: delete files and folders from gcloud storage
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: delete-batch.yml
+
+ - name: upload batch of files to gcloud storage
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: upload-batch.yml
+ when: cloud_service_provider == "gcloud"
diff --git a/ansible/postgres-managed-service-backup.yml b/ansible/postgres-managed-service-backup.yml
index 1a92efb09d..05abaf41c0 100644
--- a/ansible/postgres-managed-service-backup.yml
+++ b/ansible/postgres-managed-service-backup.yml
@@ -3,6 +3,6 @@
vars_files:
- ['{{inventory_dir}}/secrets.yml']
roles:
- - postgres-azure-managed-service-backup
+ - postgres-managed-service-backup
tags:
- - postgres-azure-managed-service
+ - postgres-managed-service
diff --git a/ansible/postgresql-patroni-cluster.yaml b/ansible/postgresql-patroni-cluster.yaml
new file mode 100644
index 0000000000..7fcae245a4
--- /dev/null
+++ b/ansible/postgresql-patroni-cluster.yaml
@@ -0,0 +1,14 @@
+- hosts: etcd
+ become: yes
+ roles:
+ - ansible-etcd
+
+- hosts: postgresql
+ become: yes
+ roles:
+ - ansible-postgres_patroni
+
+- hosts: haproxy
+ become: yes
+ roles:
+ - ansible-haproxy
diff --git a/ansible/postgresql-restore.yml b/ansible/postgresql-restore.yml
index e2d80770d1..bcec7447d6 100644
--- a/ansible/postgresql-restore.yml
+++ b/ansible/postgresql-restore.yml
@@ -3,6 +3,6 @@
vars_files:
- ['{{inventory_dir}}/secrets.yml']
roles:
- - postgres-azure-managed-service-restore
+ - postgres-managed-service-restore
tags:
- postgresql-restore
diff --git a/ansible/prometheus-backup.yml b/ansible/prometheus-backup.yml
index d31adbd125..65a87b3061 100644
--- a/ansible/prometheus-backup.yml
+++ b/ansible/prometheus-backup.yml
@@ -6,9 +6,6 @@
prometheus_url: "http://localhost:9090/prometheus"
vars_files:
- ['{{ inventory_dir }}/secrets.yml']
- environment:
- AZURE_STORAGE_ACCOUNT: "{{ sunbird_management_storage_account_name }}"
- AZURE_STORAGE_KEY: "{{ sunbird_management_storage_account_key }}"
roles:
- prometheus-backup-v2
tags:
@@ -23,8 +20,6 @@
vars_files:
- ['{{inventory_dir}}/secrets.yml']
environment:
- AZURE_STORAGE_ACCOUNT: "{{ sunbird_management_storage_account_name }}"
- AZURE_STORAGE_KEY: "{{ sunbird_management_storage_account_key }}"
roles:
- prometheus-backup-v2
tags:
@@ -39,9 +34,6 @@
prometheus_url: "http://localhost:19090/prometheus"
vars_files:
- ['{{inventory_dir}}/secrets.yml']
- environment:
- AZURE_STORAGE_ACCOUNT: "{{ sunbird_management_storage_account_name }}"
- AZURE_STORAGE_KEY: "{{ sunbird_management_storage_account_key }}"
roles:
- prometheus-backup-v2
tags:
diff --git a/ansible/prometheus-restore.yml b/ansible/prometheus-restore.yml
index 5d4bba9731..1ddf6971d5 100644
--- a/ansible/prometheus-restore.yml
+++ b/ansible/prometheus-restore.yml
@@ -6,9 +6,6 @@
prometheus_service_name: "monitor_prometheus"
vars_files:
- ['{{ inventory_dir }}/secrets.yml']
- environment:
- AZURE_STORAGE_ACCOUNT: "{{ sunbird_management_storage_account_name }}"
- AZURE_STORAGE_KEY: "{{ sunbird_management_storage_account_key }}"
roles:
- prometheus-restore
tags:
@@ -22,9 +19,6 @@
prometheus_service_name: "prometheus_fed_prometheus"
vars_files:
- ['{{ inventory_dir }}/secrets.yml']
- environment:
- AZURE_STORAGE_ACCOUNT: "{{ sunbird_management_storage_account_name }}"
- AZURE_STORAGE_KEY: "{{ sunbird_management_storage_account_key }}"
roles:
- prometheus-restore
tags:
@@ -38,9 +32,6 @@
prometheus_service_name: "monitor_stateful_prometheus"
vars_files:
- ['{{ inventory_dir }}/secrets.yml']
- environment:
- AZURE_STORAGE_ACCOUNT: "{{ sunbird_management_storage_account_name }}"
- AZURE_STORAGE_KEY: "{{ sunbird_management_storage_account_key }}"
roles:
- prometheus-restore
tags:
diff --git a/ansible/redis-backup.yml b/ansible/redis-backup.yml
index af7b1564ed..72ab28e584 100644
--- a/ansible/redis-backup.yml
+++ b/ansible/redis-backup.yml
@@ -3,9 +3,6 @@
gather_facts: false
vars_files:
- ['{{inventory_dir}}/secrets.yml']
- environment:
- AZURE_STORAGE_ACCOUNT: "{{ sunbird_management_storage_account_name }}"
- AZURE_STORAGE_KEY: "{{ sunbird_management_storage_account_key }}"
roles:
- redis-backup
run_once: true
diff --git a/ansible/roles/ansible-etcd/README.md b/ansible/roles/ansible-etcd/README.md
new file mode 100644
index 0000000000..15c49e336a
--- /dev/null
+++ b/ansible/roles/ansible-etcd/README.md
@@ -0,0 +1,100 @@
+Role Name
+=========
+```
+postgresql-cluster-ansible
+```
+Requirements
+------------
+```
+1. comment or uncomment the properties in templates of the roles available as per the requirement.
+2. provide the variables where ever required.
+```
+Role Variables
+--------------
+```
+In hosts files:
+1. etcd_ip :
+2. postgresql_origin:
+3. postgresql_1:
+4. postgresql_2:
+5. postgresql_3:
+
+
+etcd Role variables:
+postgres_patroni_etcd_name: "postgres-etcd" # cluster name
+postgres_patroni_etcd_initial_cluster: "{{ etcd_name }}=http://{{ etcd_ip }}:2380" # initial cluster
+postgres_patroni_etcd_initial_cluster_state: "postgres" # initial cluster state
+postgres_patroni_etcd_initial_cluster_token: "etcd-cluster-postgres" # initial cluster token
+postgres_patroni_etcd_initial_advertise_peer_urls: "http://{{ etcd_ip }}:2380" # initial advertise peer urls
+postgres_patroni_etcd_listen_peer_urls: "http://{{ etcd_ip }}:2380" # listen peer urls
+postgres_patroni_etcd_listen_client_urls: "http://{{ etcd_ip }}:2379,http://127.0.0.1:2379" # listen client urls
+postgres_patroni_etcd_advertise_client_urls: "http://{{ etcd_ip }}:2379" # advertise client urls
+
+Ansible-postgres_patroni role Variables:
+#patroni .yaml config
+postgres_cluster_name: postgresql-prod # Cluster name
+
+# users admin password
+postgres_patroni_admin_password: admin # Admin Password
+
+#Authentication
+# Replication
+postgres_patroni_replication_username: replicator # Replication Username
+postgres_patroni_replication_password: password # Replication password
+
+#SuperUser
+postgres_patroni_superuser_username: postgres # Superuser username
+postgres_patroni_superuser_password: password # Superuser Password
+```
+Architecture
+------------
+
+
+```
+Description:
+Ansible postgres cluter role is used to setup a postgres cluster with 1 Primary and 2 replicas where we are using the patroni as HA solution for postgres cluster.Patroni can be configured to handle tasks like replication, backups and restorations.We are also using HAProxy load Balancer to route the traffic and Etcd is a fault-tolerant, distributed key-value store that is used to store the state of the Postgres cluster. Via Patroni, all of the Postgres nodes make use of etcd to keep the Postgres cluster up and running.
+
+Users and applications can access the postgres server using Haproxy IP and Port defined in the haproxy configuration rules.
+```
+
+Inventory hosts file as shown Below
+-----------------------------------
+```
+[etcd]
+192.168.245.129 etcd_ip=192.168.245.129 ansible_ssh_user=ubuntu
+
+[postgresql]
+192.168.245.129 postgresql_origin=192.168.245.129 postgresql_1=192.168.245.129 postgresql_2=192.168.245.130 postgresql_3=192.168.245.131 etcd_ip=192.168.245.129 ansible_ssh_user=ubuntu
+ postgresql_origin= postgresql_1= postgresql_2= postgresql_3= etcd_ip=192.168.245.129 ansible_ssh_user=ubuntu
+ postgresql_origin= postgresql_1= postgresql_2= postgresql_3= etcd_ip=192.168.245.129 ansible_ssh_user=ubuntu
+
+[haproxy]
+192.168.245.129 postgresql_1=192.168.245.129 postgresql_2=192.168.245.130 postgresql_3=192.168.245.131 ansible_ssh_user=ubuntu
+```
+
+License
+-------
+```
+BSD
+```
+Author Information
+------------------
+```
+Nikhil Varma
+
+Senior DevOps Engineer
+```
+
+postgres cluster setup using ansible
+-----------------------------------
+
+```
+# Command to run Ansibe-postgresql role
+
+$ ansible-playbook -i inventory/hosts main.yaml -K --ask-pass
+
+# Commands to run postgresql roles by using the tags and skipping the tags
+
+$ ansible-playbook -i inventory/hosts main.yaml -K --ask-pass --tags=""
+$ ansible-playbook -i inventory/hosts main.yaml -K --ask-pass --skip-tags=""
+```
diff --git a/ansible/roles/ansible-etcd/defaults/main.yml b/ansible/roles/ansible-etcd/defaults/main.yml
new file mode 100644
index 0000000000..0478f26652
--- /dev/null
+++ b/ansible/roles/ansible-etcd/defaults/main.yml
@@ -0,0 +1,14 @@
+---
+# defaults file for ansible-etcd
+
+
+# etcd cluster variables
+postgres_patroni_etcd_name: "postgres-etcd"
+postgres_patroni_etcd_initial_cluster: "{{ etcd_name }}=http://{{ etcd_ip }}:2380"
+postgres_patroni_etcd_initial_cluster_state: "postgres"
+postgres_patroni_etcd_initial_cluster_token: "etcd-cluster-postgres"
+postgres_patroni_etcd_initial_advertise_peer_urls: "http://{{ etcd_ip }}:2380"
+postgres_patroni_etcd_listen_peer_urls: "http://{{ etcd_ip }}:2380"
+postgres_patroni_etcd_listen_client_urls: "http://{{ etcd_ip }}:2379,http://127.0.0.1:2379"
+postgres_patroni_etcd_advertise_client_urls: "http://{{ etcd_ip }}:2379"
+#etcd_data_dir:
\ No newline at end of file
diff --git a/ansible/roles/ansible-etcd/handlers/main.yml b/ansible/roles/ansible-etcd/handlers/main.yml
new file mode 100644
index 0000000000..33d54607a2
--- /dev/null
+++ b/ansible/roles/ansible-etcd/handlers/main.yml
@@ -0,0 +1,12 @@
+---
+# handlers file for ansible-etcd
+- name: Restart etcd systemd
+ systemd:
+ name: etcd.service
+ state: restarted
+ daemon_reload: yes
+
+- name: Restart etcd service
+ systemd:
+ name: etcd.service
+ state: restarted
\ No newline at end of file
diff --git a/ansible/roles/ansible-etcd/meta/main.yml b/ansible/roles/ansible-etcd/meta/main.yml
new file mode 100644
index 0000000000..6b5d1fd295
--- /dev/null
+++ b/ansible/roles/ansible-etcd/meta/main.yml
@@ -0,0 +1,52 @@
+galaxy_info:
+ author: Nikhil Varma
+ description: Ansible-etcd for distributed key store for postgresql cluster
+# company: your company (optional)
+
+ # If the issue tracker for your role is not on github, uncomment the
+ # next line and provide a value
+ # issue_tracker_url: http://example.com/issue/tracker
+
+ # Choose a valid license ID from https://spdx.org - some suggested licenses:
+ # - BSD-3-Clause (default)
+ # - MIT
+ # - GPL-2.0-or-later
+ # - GPL-3.0-only
+ # - Apache-2.0
+ # - CC-BY-4.0
+ license: license (GPL-2.0-or-later, MIT, etc)
+
+ min_ansible_version: 2.1
+
+ # If this a Container Enabled role, provide the minimum Ansible Container version.
+ # min_ansible_container_version:
+
+ #
+ # Provide a list of supported platforms, and for each platform a list of versions.
+ # If you don't wish to enumerate all versions for a particular platform, use 'all'.
+ # To view available platforms and versions (or releases), visit:
+ # https://galaxy.ansible.com/api/v1/platforms/
+ #
+ # platforms:
+ # - name: Fedora
+ # versions:
+ # - all
+ # - 25
+ # - name: SomePlatform
+ # versions:
+ # - all
+ # - 1.0
+ # - 7
+ # - 99.99
+
+ galaxy_tags: []
+ # List tags for your role here, one per line. A tag is a keyword that describes
+ # and categorizes the role. Users find roles by searching for tags. Be sure to
+ # remove the '[]' above, if you add tags to this list.
+ #
+ # NOTE: A tag is limited to a single word comprised of alphanumeric characters.
+ # Maximum 20 tags per role.
+
+dependencies: []
+ # List your role dependencies here, one per line. Be sure to remove the '[]' above,
+ # if you add dependencies to this list.
\ No newline at end of file
diff --git a/ansible/roles/ansible-etcd/tasks/main.yml b/ansible/roles/ansible-etcd/tasks/main.yml
new file mode 100644
index 0000000000..5e6d329bc1
--- /dev/null
+++ b/ansible/roles/ansible-etcd/tasks/main.yml
@@ -0,0 +1,19 @@
+---
+# tasks file for ansible-etcd
+- name: Install etcd after updating apt
+ apt:
+ name:
+ - etcd
+ state: present
+ update_cache: yes
+ tags:
+ - etcd Install
+
+- name: Template configuration file to etcd
+ template:
+ src: etcd.j2
+ dest: '/etc/default/etcd'
+ notify:
+ - Restart etcd service
+ tags:
+ - Restart etcd
\ No newline at end of file
diff --git a/ansible/roles/ansible-etcd/templates/etcd.j2 b/ansible/roles/ansible-etcd/templates/etcd.j2
new file mode 100644
index 0000000000..09e6ad6450
--- /dev/null
+++ b/ansible/roles/ansible-etcd/templates/etcd.j2
@@ -0,0 +1,403 @@
+## etcd(1) daemon options
+## See "/usr/share/doc/etcd-server/op-guide/configuration.md.gz"
+
+### Member flags
+
+##### --name
+## Human-readable name for this member.
+## This value is referenced as this node's own entries listed in the
+## `--initial-cluster` flag (e.g., `default=http://localhost:2380`). This
+## needs to match the key used in the flag if using static bootstrapping. When
+## using discovery, each member must have a unique name. `Hostname` or
+## `machine-id` can be a good choice.
+## default: "default"
+#ETCD_NAME="postgres-etcd"
+
+##### --data-dir
+## Path to the data directory.
+## default: "${name}.etcd"
+# ETCD_DATA_DIR="/var/lib/etcd/default"
+
+##### --wal-dir
+## Path to the dedicated wal directory. If this flag is set, etcd will write
+## the WAL files to the walDir rather than the dataDir. This allows a
+## dedicated disk to be used, and helps avoid io competition between logging
+## and other IO operations.
+## default: ""
+# ETCD_WAL_DIR
+
+##### --snapshot-count
+## Number of committed transactions to trigger a snapshot to disk.
+## default: "100000"
+# ETCD_SNAPSHOT_COUNT="100000"
+
+##### --heartbeat-interval
+## Time (in milliseconds) of a heartbeat interval.
+## default: "100"
+# ETCD_HEARTBEAT_INTERVAL="100"
+
+##### --election-timeout
+## Time (in milliseconds) for an election to timeout. See
+## /usr/share/doc/etcd-server/tuning.md.gz for details.
+## default: "1000"
+# ETCD_ELECTION_TIMEOUT="1000"
+
+##### --listen-peer-urls
+## List of URLs to listen on for peer traffic. This flag tells the etcd to
+## accept incoming requests from its peers on the specified scheme://IP:port
+## combinations. Scheme can be either http or https.If 0.0.0.0 is specified as
+## the IP, etcd listens to the given port on all interfaces. If an IP address is
+## given as well as a port, etcd will listen on the given port and interface.
+## Multiple URLs may be used to specify a number of addresses and ports to listen
+## on. The etcd will respond to requests from any of the listed addresses and
+## ports.
+## default: "http://localhost:2380"
+## example: "http://10.0.0.1:2380"
+## invalid example: "http://example.com:2380" (domain name is invalid for binding)
+#ETCD_LISTEN_PEER_URLS="http://172.51.1.29:2380"
+
+##### --listen-client-urls
+## List of URLs to listen on for client traffic. This flag tells the etcd to
+## accept incoming requests from the clients on the specified scheme://IP:port
+## combinations. Scheme can be either http or https. If 0.0.0.0 is specified as
+## the IP, etcd listens to the given port on all interfaces. If an IP address is
+## given as well as a port, etcd will listen on the given port and interface.
+## Multiple URLs may be used to specify a number of addresses and ports to listen
+## on. The etcd will respond to requests from any of the listed addresses and
+## ports.
+## default: "http://localhost:2379"
+## example: "http://10.0.0.1:2379"
+## invalid example: "http://example.com:2379" (domain name is invalid for binding)
+#ETCD_LISTEN_CLIENT_URLS="http://172.51.1.29:2379,http://127.0.0.1:2379"
+
+##### --max-snapshots
+## Maximum number of snapshot files to retain (0 is unlimited)
+## The default for users on Windows is unlimited, and manual purging down to 5
+## (or some preference for safety) is recommended.
+## default: 5
+# ETCD_MAX_SNAPSHOTS="5"
+
+##### --max-wals
+## Maximum number of wal files to retain (0 is unlimited)
+## The default for users on Windows is unlimited, and manual purging down to 5
+## (or some preference for safety) is recommended.
+## default: 5
+# ETCD_MAX_WALS="5"
+
+##### --cors
+## Comma-separated white list of origins for CORS (cross-origin resource
+## sharing).
+## default: none
+# ETCD_CORS
+
+#### --quota-backend-bytes
+## Raise alarms when backend size exceeds the given quota (0 defaults to low
+## space quota).
+## default: 0
+# ETCD_QUOTA_BACKEND_BYTES="0"
+
+#### --backend-batch-limit
+## BackendBatchLimit is the maximum operations before commit the backend
+## transaction.
+## default: 0
+# ETCD_BACKEND_BATCH_LIMIT="0"
+
+#### --backend-batch-interval
+## BackendBatchInterval is the maximum time before commit the backend
+## transaction.
+## default: 0
+# ETCD_BACKEND_BATCH_INTERVAL="0"
+
+#### --max-txn-ops
+## Maximum number of operations permitted in a transaction.
+## default: 128
+# ETCD_MAX_TXN_OPS="128"
+
+#### --max-request-bytes
+## Maximum client request size in bytes the server will accept.
+## default: 1572864
+# ETCD_MAX_REQUEST_BYTES="1572864"
+
+#### --grpc-keepalive-min-time
+## Minimum duration interval that a client should wait before pinging server.
+## default: 5s
+# ETCD_GRPC_KEEPALIVE_MIN_TIME="5"
+
+#### --grpc-keepalive-interval
+## Frequency duration of server-to-client ping to check if a connection is
+## alive (0 to disable).
+## default: 2h
+# ETCD_GRPC_KEEPALIVE_INTERVAL="2h"
+
+#### --grpc-keepalive-timeout
+## Additional duration of wait before closing a non-responsive connection
+## (0 to disable).
+## default: 20s
+# ETCD_GRPC_KEEPALIVE_TIMEOUT="20s"
+
+
+### Clustering flags
+
+# `--initial` prefix flags are used in bootstrapping (static bootstrap,
+# discovery-service bootstrap or runtime reconfiguration) a new member, and
+# ignored when restarting an existing member.
+
+# `--discovery` prefix flags need to be set when using discovery service.
+
+##### --initial-advertise-peer-urls
+
+## List of this member's peer URLs to advertise to the rest of the cluster.
+## These addresses are used for communicating etcd data around the cluster. At
+## least one must be routable to all cluster members. These URLs can contain
+## domain names.
+## default: "http://localhost:2380"
+## example: "http://example.com:2380, http://10.0.0.1:2380"
+#ETCD_INITIAL_ADVERTISE_PEER_URLS="http://172.51.1.29:2380"
+
+##### --initial-cluster
+## Initial cluster configuration for bootstrapping.
+## The key is the value of the `--name` flag for each node provided. The
+## default uses `default` for the key because this is the default for the
+## `--name` flag.
+## default: "default=http://localhost:2380"
+#ETCD_INITIAL_CLUSTER="postgres-etcd=http://172.51.1.29:2380"
+
+##### --initial-cluster-state
+## Initial cluster state ("new" or "existing"). Set to `new` for all members
+## present during initial static or DNS bootstrapping. If this option is set to
+## `existing`, etcd will attempt to join the existing cluster. If the wrong value
+## is set, etcd will attempt to start but fail safely.
+## default: "new"
+# ETCD_INITIAL_CLUSTER_STATE="new"
+
+##### --initial-cluster-token
+## Initial cluster token for the etcd cluster during bootstrap.
+## default: "etcd-cluster"
+#ETCD_INITIAL_CLUSTER_TOKEN="etcd-cluster"
+
+##### --advertise-client-urls
+## List of this member's client URLs to advertise to the rest of the cluster.
+## These URLs can contain domain names.
+## Be careful if advertising URLs such as http://localhost:2379 from a cluster
+## member and are using the proxy feature of etcd. This will cause loops, because
+## the proxy will be forwarding requests to itself until its resources (memory,
+## file descriptors) are eventually depleted.
+## default: "http://localhost:2379"
+## example: "http://example.com:2379, http://10.0.0.1:2379"
+#ETCD_ADVERTISE_CLIENT_URLS="http://172.51.1.29:2379"
+
+##### --discovery
+## Discovery URL used to bootstrap the cluster.
+## default: none
+# ETCD_DISCOVERY
+
+##### --discovery-srv
+## DNS srv domain used to bootstrap the cluster.
+## default: none
+# ETCD_DISCOVERY_SRV
+
+##### --discovery-fallback
+## Expected behavior ("exit" or "proxy") when discovery services fails. "proxy"
+## supports v2 API only.
+## default: "proxy"
+# ETCD_DISCOVERY_FALLBACK="proxy"
+
+##### --discovery-proxy
+## HTTP proxy to use for traffic to discovery service.
+## default: none
+# ETCD_DISCOVERY_PROXY
+
+##### --strict-reconfig-check
+## Reject reconfiguration requests that would cause quorum loss.
+## default: false
+# ETCD_STRICT_RECONFIG_CHECK
+
+##### --auto-compaction-retention
+## Auto compaction retention for mvcc key value store in hour. 0 means disable
+## auto compaction.
+## default: 0
+# ETCD_AUTO_COMPACTION_RETENTION="0"
+
+##### --enable-v2
+## Accept etcd V2 client requests
+## default: true
+# ETCD_ENABLE_V2="true"
+
+
+### Proxy flags
+
+# `--proxy` prefix flags configures etcd to run in proxy mode. "proxy" supports
+# v2 API only.
+
+##### --proxy
+## Proxy mode setting ("off", "readonly" or "on").
+## default: "off"
+# ETCD_PROXY="off"
+
+##### --proxy-failure-wait
+## Time (in milliseconds) an endpoint will be held in a failed state before
+## being reconsidered for proxied requests.
+## default: 5000
+# ETCD_PROXY_FAILURE_WAIT="5000"
+
+##### --proxy-refresh-interval
+## Time (in milliseconds) of the endpoints refresh interval.
+## default: 30000
+# ETCD_PROXY_REFRESH_INTERVAL="30000"
+
+##### --proxy-dial-timeout
+## Time (in milliseconds) for a dial to timeout or 0 to disable the timeout
+## default: 1000
+# ETCD_PROXY_DIAL_TIMEOUT="1000"
+
+##### --proxy-write-timeout
+## Time (in milliseconds) for a write to timeout or 0 to disable the timeout.
+## default: 5000
+# ETCD_PROXY_WRITE_TIMEOUT="5000"
+
+##### --proxy-read-timeout
+## Time (in milliseconds) for a read to timeout or 0 to disable the timeout.
+## Don't change this value if using watches because use long polling requests.
+## default: 0
+# ETCD_PROXY_READ_TIMEOUT="0"
+
+
+### Security flags
+
+# The security flags help to build a secure etcd cluster.
+
+##### --ca-file (**DEPRECATED**)
+## Path to the client server TLS CA file. `--ca-file ca.crt` could be replaced
+## by `--trusted-ca-file ca.crt --client-cert-auth` and etcd will perform the
+## same.
+## default: none
+# ETCD_CA_FILE
+
+##### --cert-file
+## Path to the client server TLS cert file.
+## default: none
+# ETCD_CERT_FILE
+
+##### --key-file
+## Path to the client server TLS key file.
+## default: none
+# ETCD_KEY_FILE
+
+##### --client-cert-auth
+## Enable client cert authentication.
+## CN authentication is not supported by gRPC-gateway.
+## default: false
+# ETCD_CLIENT_CERT_AUTH
+
+#### --client-crl-file
+## Path to the client certificate revocation list file.
+## default: ""
+# ETCD_CLIENT_CRL_FILE
+
+##### --trusted-ca-file
+## Path to the client server TLS trusted CA key file.
+## default: none
+# ETCD_TRUSTED_CA_FILE
+
+##### --auto-tls
+## Client TLS using generated certificates
+## default: false
+# ETCD_AUTO_TLS
+
+##### --peer-ca-file (**DEPRECATED**)
+## Path to the peer server TLS CA file. `--peer-ca-file ca.crt` could be
+## replaced by `--peer-trusted-ca-file ca.crt --peer-client-cert-auth` and etcd
+## will perform the same.
+## default: none
+# ETCD_PEER_CA_FILE
+
+##### --peer-cert-file
+## Path to the peer server TLS cert file.
+## default: none
+# ETCD_PEER_CERT_FILE
+
+##### --peer-key-file
+## Path to the peer server TLS key file.
+## default: none
+# ETCD_PEER_KEY_FILE
+
+##### --peer-client-cert-auth
+## Enable peer client cert authentication.
+## default: false
+# ETCD_PEER_CLIENT_CERT_AUTH
+
+#### --peer-crl-file
+## Path to the peer certificate revocation list file.
+## default: ""
+# ETCD_PEER_CRL_FILE
+
+##### --peer-trusted-ca-file
+## Path to the peer server TLS trusted CA file.
+## default: none
+# ETCD_PEER_TRUSTED_CA_FILE
+
+##### --peer-auto-tls
+## Peer TLS using generated certificates
+## default: false
+# ETCD_PEER_AUTO_TLS
+
+#### --peer-cert-allowed-cn
+## Allowed CommonName for inter peer authentication.
+## default: none
+# ETCD_PEER_CERT_ALLOWED_CN
+
+#### --cipher-suites
+## Comma-separated list of supported TLS cipher suites between server/client and
+## peers.
+## default: ""
+# ETCD_CIPHER_SUITES
+
+#### --experimental-peer-skip-client-san-verification
+## Skip verification of SAN field in client certificate for peer connections.
+## default: false
+#+ ETCD_EXPERIMENTAL_PEER_SKIP_CLIENT_SAN_VERIFICATION
+
+
+### Logging flags
+
+#### --log-outputs
+## Specify 'stdout' or 'stderr' to skip journald logging even when running
+## under systemd, or list of comma separated output targets.
+## default: default
+# ETCD_LOG_OUTPUTS
+
+##### --debug
+## Drop the default log level to DEBUG for all subpackages.
+## default: false (INFO for all packages)
+# ETCD_DEBUG
+
+##### --log-package-levels
+## Set individual etcd subpackages to specific log levels. An example being
+## `etcdserver=WARNING,security=DEBUG`
+## default: none (INFO for all packages)
+# ETCD_LOG_PACKAGE_LEVELS
+
+
+### Unsafe flags
+
+# Please be CAUTIOUS when using unsafe flags because it will break the guarantees given by the consensus protocol.
+# For example, it may panic if other members in the cluster are still alive.
+# Follow the instructions when using these flags.
+
+##### --force-new-cluster
+## Force to create a new one-member cluster. It commits configuration changes
+## forcing to remove all existing members in the cluster and add itself. It needs
+## to be set to restore a backup.
+## default: false
+# ETCD_FORCE_NEW_CLUSTER
+#
+#
+ETCD_INITIAL_CLUSTER="{{ postgres_patroni_etcd_initial_cluster }}"
+ETCD_INITIAL_CLUSTER_STATE="{{ postgres_patroni_etcd_initial_cluster_state }}"
+ETCD_INITIAL_CLUSTER_TOKEN="{{ postgres_patroni_etcd_initial_cluster_token }}"
+ETCD_INITIAL_ADVERTISE_PEER_URLS="{{ postgres_patroni_etcd_initial_advertise_peer_urls }}"
+#ETCD_DATA_DIR="/var/etcd"
+ETCD_LISTEN_PEER_URLS="{{ postgres_patroni_etcd_listen_peer_urls }}"
+ETCD_LISTEN_CLIENT_URLS="{{ postgres_patroni_etcd_listen_client_urls }}"
+ETCD_ADVERTISE_CLIENT_URLS="{{ postgres_patroni_etcd_advertise_client_urls }}"
+ETCD_NAME="{{ postgres_patroni_etcd_name }}"
\ No newline at end of file
diff --git a/ansible/roles/ansible-etcd/vars/main.yml b/ansible/roles/ansible-etcd/vars/main.yml
new file mode 100644
index 0000000000..411544ecd6
--- /dev/null
+++ b/ansible/roles/ansible-etcd/vars/main.yml
@@ -0,0 +1,2 @@
+---
+# vars file for ansible-etcd
\ No newline at end of file
diff --git a/ansible/roles/ansible-haproxy/README.md b/ansible/roles/ansible-haproxy/README.md
new file mode 100644
index 0000000000..15c49e336a
--- /dev/null
+++ b/ansible/roles/ansible-haproxy/README.md
@@ -0,0 +1,100 @@
+Role Name
+=========
+```
+postgresql-cluster-ansible
+```
+Requirements
+------------
+```
+1. comment or uncomment the properties in templates of the roles available as per the requirement.
+2. provide the variables where ever required.
+```
+Role Variables
+--------------
+```
+In hosts files:
+1. etcd_ip :
+2. postgresql_origin:
+3. postgresql_1:
+4. postgresql_2:
+5. postgresql_3:
+
+
+etcd Role variables:
+postgres_patroni_etcd_name: "postgres-etcd" # cluster name
+postgres_patroni_etcd_initial_cluster: "{{ etcd_name }}=http://{{ etcd_ip }}:2380" # initial cluster
+postgres_patroni_etcd_initial_cluster_state: "postgres" # initial cluster state
+postgres_patroni_etcd_initial_cluster_token: "etcd-cluster-postgres" # initial cluster token
+postgres_patroni_etcd_initial_advertise_peer_urls: "http://{{ etcd_ip }}:2380" # initial advertise peer urls
+postgres_patroni_etcd_listen_peer_urls: "http://{{ etcd_ip }}:2380" # listen peer urls
+postgres_patroni_etcd_listen_client_urls: "http://{{ etcd_ip }}:2379,http://127.0.0.1:2379" # listen client urls
+postgres_patroni_etcd_advertise_client_urls: "http://{{ etcd_ip }}:2379" # advertise client urls
+
+Ansible-postgres_patroni role Variables:
+#patroni .yaml config
+postgres_cluster_name: postgresql-prod # Cluster name
+
+# users admin password
+postgres_patroni_admin_password: admin # Admin Password
+
+#Authentication
+# Replication
+postgres_patroni_replication_username: replicator # Replication Username
+postgres_patroni_replication_password: password # Replication password
+
+#SuperUser
+postgres_patroni_superuser_username: postgres # Superuser username
+postgres_patroni_superuser_password: password # Superuser Password
+```
+Architecture
+------------
+
+
+```
+Description:
+Ansible postgres cluter role is used to setup a postgres cluster with 1 Primary and 2 replicas where we are using the patroni as HA solution for postgres cluster.Patroni can be configured to handle tasks like replication, backups and restorations.We are also using HAProxy load Balancer to route the traffic and Etcd is a fault-tolerant, distributed key-value store that is used to store the state of the Postgres cluster. Via Patroni, all of the Postgres nodes make use of etcd to keep the Postgres cluster up and running.
+
+Users and applications can access the postgres server using Haproxy IP and Port defined in the haproxy configuration rules.
+```
+
+Inventory hosts file as shown Below
+-----------------------------------
+```
+[etcd]
+192.168.245.129 etcd_ip=192.168.245.129 ansible_ssh_user=ubuntu
+
+[postgresql]
+192.168.245.129 postgresql_origin=192.168.245.129 postgresql_1=192.168.245.129 postgresql_2=192.168.245.130 postgresql_3=192.168.245.131 etcd_ip=192.168.245.129 ansible_ssh_user=ubuntu
+ postgresql_origin= postgresql_1= postgresql_2= postgresql_3= etcd_ip=192.168.245.129 ansible_ssh_user=ubuntu
+ postgresql_origin= postgresql_1= postgresql_2= postgresql_3= etcd_ip=192.168.245.129 ansible_ssh_user=ubuntu
+
+[haproxy]
+192.168.245.129 postgresql_1=192.168.245.129 postgresql_2=192.168.245.130 postgresql_3=192.168.245.131 ansible_ssh_user=ubuntu
+```
+
+License
+-------
+```
+BSD
+```
+Author Information
+------------------
+```
+Nikhil Varma
+
+Senior DevOps Engineer
+```
+
+postgres cluster setup using ansible
+-----------------------------------
+
+```
+# Command to run Ansibe-postgresql role
+
+$ ansible-playbook -i inventory/hosts main.yaml -K --ask-pass
+
+# Commands to run postgresql roles by using the tags and skipping the tags
+
+$ ansible-playbook -i inventory/hosts main.yaml -K --ask-pass --tags=""
+$ ansible-playbook -i inventory/hosts main.yaml -K --ask-pass --skip-tags=""
+```
diff --git a/ansible/roles/ansible-haproxy/defaults/main.yml b/ansible/roles/ansible-haproxy/defaults/main.yml
new file mode 100644
index 0000000000..2b616ee2c8
--- /dev/null
+++ b/ansible/roles/ansible-haproxy/defaults/main.yml
@@ -0,0 +1,2 @@
+---
+# defaults file for ansible-haproxy
diff --git a/ansible/roles/ansible-haproxy/handlers/main.yml b/ansible/roles/ansible-haproxy/handlers/main.yml
new file mode 100644
index 0000000000..0f55472f28
--- /dev/null
+++ b/ansible/roles/ansible-haproxy/handlers/main.yml
@@ -0,0 +1,12 @@
+---
+# handlers file for ansible-haproxy
+- name: Restart haproxy systemd
+ systemd:
+ name: haproxy.service
+ state: restarted
+ daemon_reload: yes
+
+- name: Restart haproxy service
+ systemd:
+ name: haproxy.service
+ state: restarted
\ No newline at end of file
diff --git a/ansible/roles/ansible-haproxy/meta/main.yml b/ansible/roles/ansible-haproxy/meta/main.yml
new file mode 100644
index 0000000000..bb6de485a4
--- /dev/null
+++ b/ansible/roles/ansible-haproxy/meta/main.yml
@@ -0,0 +1,52 @@
+galaxy_info:
+ author: Nikhil Varma
+ description: Ansible HAProxy for postgresql cluster
+ #company: your company (optional)
+
+ # If the issue tracker for your role is not on github, uncomment the
+ # next line and provide a value
+ # issue_tracker_url: http://example.com/issue/tracker
+
+ # Choose a valid license ID from https://spdx.org - some suggested licenses:
+ # - BSD-3-Clause (default)
+ # - MIT
+ # - GPL-2.0-or-later
+ # - GPL-3.0-only
+ # - Apache-2.0
+ # - CC-BY-4.0
+ license: license (GPL-2.0-or-later, MIT, etc)
+
+ min_ansible_version: 2.1
+
+ # If this a Container Enabled role, provide the minimum Ansible Container version.
+ # min_ansible_container_version:
+
+ #
+ # Provide a list of supported platforms, and for each platform a list of versions.
+ # If you don't wish to enumerate all versions for a particular platform, use 'all'.
+ # To view available platforms and versions (or releases), visit:
+ # https://galaxy.ansible.com/api/v1/platforms/
+ #
+ # platforms:
+ # - name: Fedora
+ # versions:
+ # - all
+ # - 25
+ # - name: SomePlatform
+ # versions:
+ # - all
+ # - 1.0
+ # - 7
+ # - 99.99
+
+ galaxy_tags: []
+ # List tags for your role here, one per line. A tag is a keyword that describes
+ # and categorizes the role. Users find roles by searching for tags. Be sure to
+ # remove the '[]' above, if you add tags to this list.
+ #
+ # NOTE: A tag is limited to a single word comprised of alphanumeric characters.
+ # Maximum 20 tags per role.
+
+dependencies: []
+ # List your role dependencies here, one per line. Be sure to remove the '[]' above,
+ # if you add dependencies to this list.
diff --git a/ansible/roles/ansible-haproxy/tasks/main.yml b/ansible/roles/ansible-haproxy/tasks/main.yml
new file mode 100644
index 0000000000..2c01238c57
--- /dev/null
+++ b/ansible/roles/ansible-haproxy/tasks/main.yml
@@ -0,0 +1,19 @@
+---
+# tasks file for ansible-haproxy
+- name: Install HaProxy after updating apt
+ apt:
+ name:
+ - haproxy
+ state: present
+ update_cache: yes
+ tags:
+ - HaProxy Install
+
+- name: Template configuration file to haproxy.cfg
+ template:
+ src: haproxy.cfg.j2
+ dest: '/etc/haproxy/haproxy.cfg'
+ notify:
+ - Restart haproxy service
+ tags:
+ - Restart haproxy
\ No newline at end of file
diff --git a/ansible/roles/ansible-haproxy/templates/haproxy.cfg.j2 b/ansible/roles/ansible-haproxy/templates/haproxy.cfg.j2
new file mode 100644
index 0000000000..0a85d2b27b
--- /dev/null
+++ b/ansible/roles/ansible-haproxy/templates/haproxy.cfg.j2
@@ -0,0 +1,26 @@
+global
+ maxconn 100
+
+defaults
+ log global
+ mode tcp
+ retries 2
+ timeout client 30m
+ timeout connect 4s
+ timeout server 30m
+ timeout check 5s
+
+listen stats
+ mode http
+ bind *:7000
+ stats enable
+ stats uri /
+
+listen postgres
+ bind *:5000
+ option httpchk
+ http-check expect status 200
+ default-server inter 3s fall 3 rise 2 on-marked-down shutdown-sessions
+ server postgresql_{{ postgresql_1 }}_5432 {{ postgresql_1 }}:5432 maxconn 100 check port 8008
+ server postgresql_{{ postgresql_2 }}_5432 {{ postgresql_2 }}:5432 maxconn 100 check port 8008
+ server postgresql_{{ postgresql_3 }}_5432 {{ postgresql_3 }}:5432 maxconn 100 check port 8008
\ No newline at end of file
diff --git a/ansible/roles/ansible-haproxy/vars/main.yml b/ansible/roles/ansible-haproxy/vars/main.yml
new file mode 100644
index 0000000000..2070e21bba
--- /dev/null
+++ b/ansible/roles/ansible-haproxy/vars/main.yml
@@ -0,0 +1,2 @@
+---
+# vars file for ansible-haproxy
diff --git a/ansible/roles/ansible-postgres_patroni/README.md b/ansible/roles/ansible-postgres_patroni/README.md
new file mode 100644
index 0000000000..37f2988184
--- /dev/null
+++ b/ansible/roles/ansible-postgres_patroni/README.md
@@ -0,0 +1,100 @@
+Role Name
+=========
+```
+postgresql-cluster-ansible
+```
+Requirements
+------------
+```
+1. comment or uncomment the properties in templates of the roles available as per the requirement.
+2. provide the variables where ever required.
+```
+Role Variables
+--------------
+```
+In hosts files:
+1. etcd_ip :
+2. postgresql_origin:
+3. postgresql_1:
+4. postgresql_2:
+5. postgresql_3:
+
+
+etcd Role variables:
+postgres_patroni_etcd_name: "postgres-etcd" # cluster name
+postgres_patroni_etcd_initial_cluster: "{{ etcd_name }}=http://{{ etcd_ip }}:2380" # initial cluster
+postgres_patroni_etcd_initial_cluster_state: "postgres" # initial cluster state
+postgres_patroni_etcd_initial_cluster_token: "etcd-cluster-postgres" # initial cluster token
+postgres_patroni_etcd_initial_advertise_peer_urls: "http://{{ etcd_ip }}:2380" # initial advertise peer urls
+postgres_patroni_etcd_listen_peer_urls: "http://{{ etcd_ip }}:2380" # listen peer urls
+postgres_patroni_etcd_listen_client_urls: "http://{{ etcd_ip }}:2379,http://127.0.0.1:2379" # listen client urls
+postgres_patroni_etcd_advertise_client_urls: "http://{{ etcd_ip }}:2379" # advertise client urls
+
+Ansible-postgres_patroni role Variables:
+#patroni .yaml config
+Postgres_cluster_name: postgresql-prod # Cluster name
+
+# users admin password
+postgres_patroni_admin_password: admin # Admin Password
+
+#Authentication
+# Replication
+postgres_patroni_replication_username: replicator # Replication Username
+postgres_patroni_replication_password: password # Replication password
+
+#SuperUser
+postgres_patroni_superuser_username: postgres # Superuser username
+postgres_patroni_superuser_password: password # Superuser Password
+```
+Architecture
+------------
+
+
+```
+Description:
+Ansible postgres cluter role is used to setup a postgres cluster with 1 Primary and 2 replicas where we are using the patroni as HA solution for postgres cluster.Patroni can be configured to handle tasks like replication, backups and restorations.We are also using HAProxy load Balancer to route the traffic and Etcd is a fault-tolerant, distributed key-value store that is used to store the state of the Postgres cluster. Via Patroni, all of the Postgres nodes make use of etcd to keep the Postgres cluster up and running.
+
+Users and applications can access the postgres server using Haproxy IP and Port defined in the haproxy configuration rules.
+```
+
+Inventory hosts file as shown Below
+-----------------------------------
+```
+[etcd]
+192.168.245.129 etcd_ip=192.168.245.129 ansible_ssh_user=ubuntu
+
+[postgresql]
+192.168.245.129 postgresql_origin=192.168.245.129 postgresql_1=192.168.245.129 postgresql_2=192.168.245.130 postgresql_3=192.168.245.131 etcd_ip=192.168.245.129 ansible_ssh_user=ubuntu
+ postgresql_origin= postgresql_1= postgresql_2= postgresql_3= etcd_ip=192.168.245.129 ansible_ssh_user=ubuntu
+ postgresql_origin= postgresql_1= postgresql_2= postgresql_3= etcd_ip=192.168.245.129 ansible_ssh_user=ubuntu
+
+[haproxy]
+192.168.245.129 postgresql_1=192.168.245.129 postgresql_2=192.168.245.130 postgresql_3=192.168.245.131 ansible_ssh_user=ubuntu
+```
+
+License
+-------
+```
+BSD
+```
+Author Information
+------------------
+```
+Nikhil Varma
+
+Senior DevOps Engineer
+```
+
+postgres cluster setup using ansible
+-----------------------------------
+
+```
+# Command to run Ansibe-postgresql role
+
+$ ansible-playbook -i inventory/hosts main.yaml -K --ask-pass
+
+# Commands to run postgresql roles by using the tags and skipping the tags
+
+$ ansible-playbook -i inventory/hosts main.yaml -K --ask-pass --tags=""
+$ ansible-playbook -i inventory/hosts main.yaml -K --ask-pass --skip-tags=""
+```
diff --git a/ansible/roles/ansible-postgres_patroni/defaults/main.yml b/ansible/roles/ansible-postgres_patroni/defaults/main.yml
new file mode 100644
index 0000000000..5257a8524d
--- /dev/null
+++ b/ansible/roles/ansible-postgres_patroni/defaults/main.yml
@@ -0,0 +1,16 @@
+---
+# defaults file for ansible-postgres_patroni
+#patroni .yaml config
+postgres_cluster_name: postgresql-prod
+
+# users admin password
+postgres_patroni_admin_password: admin
+
+#Authentication
+# Replication
+postgres_patroni_replication_username: replicator
+postgres_patroni_replication_password: password
+
+#SuperUser
+postgres_patroni_superuser_username: postgres
+postgres_patroni_superuser_password: password
\ No newline at end of file
diff --git a/ansible/roles/ansible-postgres_patroni/handlers/main.yml b/ansible/roles/ansible-postgres_patroni/handlers/main.yml
new file mode 100644
index 0000000000..91f2ff6304
--- /dev/null
+++ b/ansible/roles/ansible-postgres_patroni/handlers/main.yml
@@ -0,0 +1,18 @@
+---
+# handlers file for ansible-postgres_patroni
+- name: Restart patroni systemd
+ systemd:
+ name: patroni.service
+ state: restarted
+ daemon_reload: yes
+
+- name: Restart patroni service
+ systemd:
+ name: patroni.service
+ state: restarted
+
+- name: Start the postgresql service
+ systemd:
+ name: postgresql.service
+ state: started
+ enabled: yes
\ No newline at end of file
diff --git a/ansible/roles/ansible-postgres_patroni/meta/main.yml b/ansible/roles/ansible-postgres_patroni/meta/main.yml
new file mode 100644
index 0000000000..0538e5f1cd
--- /dev/null
+++ b/ansible/roles/ansible-postgres_patroni/meta/main.yml
@@ -0,0 +1,52 @@
+galaxy_info:
+ author: Nikhil Varma
+ description: Ansible role for setting up postgresql cluster
+ #company: your company (optional)
+
+ # If the issue tracker for your role is not on github, uncomment the
+ # next line and provide a value
+ # issue_tracker_url: http://example.com/issue/tracker
+
+ # Choose a valid license ID from https://spdx.org - some suggested licenses:
+ # - BSD-3-Clause (default)
+ # - MIT
+ # - GPL-2.0-or-later
+ # - GPL-3.0-only
+ # - Apache-2.0
+ # - CC-BY-4.0
+ license: license (GPL-2.0-or-later, MIT, etc)
+
+ min_ansible_version: 2.1
+
+ # If this a Container Enabled role, provide the minimum Ansible Container version.
+ # min_ansible_container_version:
+
+ #
+ # Provide a list of supported platforms, and for each platform a list of versions.
+ # If you don't wish to enumerate all versions for a particular platform, use 'all'.
+ # To view available platforms and versions (or releases), visit:
+ # https://galaxy.ansible.com/api/v1/platforms/
+ #
+ # platforms:
+ # - name: Fedora
+ # versions:
+ # - all
+ # - 25
+ # - name: SomePlatform
+ # versions:
+ # - all
+ # - 1.0
+ # - 7
+ # - 99.99
+
+ galaxy_tags: []
+ # List tags for your role here, one per line. A tag is a keyword that describes
+ # and categorizes the role. Users find roles by searching for tags. Be sure to
+ # remove the '[]' above, if you add tags to this list.
+ #
+ # NOTE: A tag is limited to a single word comprised of alphanumeric characters.
+ # Maximum 20 tags per role.
+
+dependencies: []
+ # List your role dependencies here, one per line. Be sure to remove the '[]' above,
+ # if you add dependencies to this list.
diff --git a/ansible/roles/ansible-postgres_patroni/tasks/main.yml b/ansible/roles/ansible-postgres_patroni/tasks/main.yml
new file mode 100644
index 0000000000..75f16a30d5
--- /dev/null
+++ b/ansible/roles/ansible-postgres_patroni/tasks/main.yml
@@ -0,0 +1,105 @@
+---
+# tasks file for ansible-postgres_patroni
+
+- name: Install postgresql after updating apt
+ apt:
+ name:
+ - postgresql
+ - postgresql-contrib
+ state: present
+ update_cache: yes
+ tags:
+ - postgresql Install
+
+- name: Stop the postgresql service
+ systemd:
+ name: postgresql.service
+ state: stopped
+ enabled: yes
+ tags:
+ - postgresql_service
+
+- name: creating softlink for postgres
+ ansible.builtin.shell:
+ cmd: ln -s /usr/lib/postgresql/15/bin/* /usr/sbin/
+ tags:
+ - softlink
+
+- name: Install and update python and pip
+ apt:
+ name:
+ - python3-pip
+ - python3-dev
+ - libpq-dev
+ state: present
+ tags:
+ - pip_python
+
+- name: Upgrade pip to latest vesion
+ pip:
+ name: pip
+ extra_args: --upgrade
+ state: latest
+ tags:
+ - upgrade_pip
+
+- name: Install patroni and dependencies
+ pip:
+ name:
+ - patroni
+ - python-etcd
+ - psycopg2
+ state: present
+ tags:
+ - install patroni
+
+- name: Creates data directory for patroni
+ file:
+ path: /data
+ state: directory
+ mode: 0700
+ owner: postgres
+ group: postgres
+ tags:
+ - create_data_dir
+
+- name: Creates data directory for patroni
+ file:
+ path: /data/patroni
+ state: directory
+ mode: 0700
+ owner: postgres
+ group: postgres
+ tags:
+ - create_patroni_dir
+
+
+- name: Template patroni systemd service file to /etc/systemd/system/patroni.service
+ template:
+ src: patroni.service.j2
+ dest: /etc/systemd/system/patroni.service
+ tags:
+ - patroni_service
+
+- name: Restart patroni systemd
+ systemd:
+ name: patroni.service
+ state: restarted
+ daemon_reload: yes
+
+- name: Template configuration file to patroni.yaml
+ template:
+ src: patroni.yaml.j2
+ dest: '/etc/patroni.yaml'
+ tags:
+ - patroni_config
+
+- name: Restart patroni service
+ systemd:
+ name: patroni.service
+ state: restarted
+
+- name: Restart postgres service
+ systemd:
+ name: postgresql.service
+ state: restarted
diff --git a/ansible/roles/ansible-postgres_patroni/templates/patroni.service.j2 b/ansible/roles/ansible-postgres_patroni/templates/patroni.service.j2
new file mode 100644
index 0000000000..d2bbe844e0
--- /dev/null
+++ b/ansible/roles/ansible-postgres_patroni/templates/patroni.service.j2
@@ -0,0 +1,17 @@
+[Unit]
+Description=Runners to orchestrate a high-availability PostgreSQL
+After=syslog.target network.target
+
+[Service]
+Type=simple
+
+User=postgres
+Group=postgres
+
+ExecStart=/usr/local/bin/patroni /etc/patroni.yaml
+KillMode=process
+TimeoutSec=30
+Restart=no
+
+[Install]
+WantedBy=multi-user.targ
\ No newline at end of file
diff --git a/ansible/roles/ansible-postgres_patroni/templates/patroni.yaml.j2 b/ansible/roles/ansible-postgres_patroni/templates/patroni.yaml.j2
new file mode 100644
index 0000000000..92d5635e46
--- /dev/null
+++ b/ansible/roles/ansible-postgres_patroni/templates/patroni.yaml.j2
@@ -0,0 +1,58 @@
+scope: postgres
+namespace: /db/
+name: {{ postgres_cluster_name }}
+
+restapi:
+ listen: {{ postgresql_origin }}:8008
+ connect_address: {{ postgresql_origin }}:8008
+
+etcd:
+ host: {{ etcd_ip }}:2379
+
+bootstrap:
+ dcs:
+ ttl: 30
+ loop_wait: 10
+ retry_timeout: 10
+ maximum_lag_on_failover: 1048576
+ postgresql:
+ use_pg_rewind: true
+
+ initdb:
+ - encoding: UTF8
+ - data-checksums
+
+ pg_hba:
+ - host replication replicator 127.0.0.1/32 md5
+ - host replication replicator {{ postgresql_1 }}/0 md5
+ - host replication replicator {{ postgresql_2 }}/0 md5
+ - host replication replicator {{ postgresql_3 }}/0 md5
+ - host all all 0.0.0.0/0 md5
+
+ users:
+ admin:
+ password: {{ postgres_patroni_admin_password }}
+ options:
+ - createrole
+ - createdb
+
+postgresql:
+ listen: {{ postgresql_origin }}:5432
+ connect_address: {{ postgresql_origin }}:5432
+ data_dir: /data/patroni
+ pgpass: /tmp/pgpass
+ authentication:
+ replication:
+ username: {{ postgres_patroni_replication_username }}
+ password: {{ postgres_patroni_replication_password }}
+ superuser:
+ username: {{ postgres_patroni_superuser_username }}
+ password: {{ postgres_patroni_superuser_password }}
+ parameters:
+ unix_socket_directories: '.'
+
+tags:
+ nofailover: false
+ noloadbalance: false
+ clonefrom: false
+ nosync: false
\ No newline at end of file
diff --git a/ansible/roles/ansible-postgres_patroni/vars/main.yml b/ansible/roles/ansible-postgres_patroni/vars/main.yml
new file mode 100644
index 0000000000..bf8074823c
--- /dev/null
+++ b/ansible/roles/ansible-postgres_patroni/vars/main.yml
@@ -0,0 +1,2 @@
+---
+# vars file for ansible-postgres_patroni
diff --git a/ansible/roles/artifacts-download-azure/tasks/main.yml b/ansible/roles/artifacts-download-azure/tasks/main.yml
deleted file mode 100644
index db79bc213f..0000000000
--- a/ansible/roles/artifacts-download-azure/tasks/main.yml
+++ /dev/null
@@ -1,8 +0,0 @@
----
-- name: Ensure azure blob storage container exists
- command: az storage container exists --name {{ artifacts_container }}
-
-- name: Download from azure blob storage
- command: az storage blob download -c {{ artifacts_container }} --name {{ artifact }} -f {{ artifact_path }}
- async: 3600
- poll: 10
diff --git a/ansible/roles/artifacts-upload-azure/tasks/main.yml b/ansible/roles/artifacts-upload-azure/tasks/main.yml
deleted file mode 100644
index 785dc1a455..0000000000
--- a/ansible/roles/artifacts-upload-azure/tasks/main.yml
+++ /dev/null
@@ -1,8 +0,0 @@
----
-- name: Ensure azure blob storage container exists
- command: az storage container create --name {{ artifacts_container }}
-
-- name: Upload to azure blob storage
- command: az storage blob upload -c {{ artifacts_container }} --name {{ artifact }} -f {{ artifact_path }}
- async: 3600
- poll: 10
diff --git a/ansible/roles/assets-upload-azure/defaults/main.yml b/ansible/roles/assets-upload-azure/defaults/main.yml
deleted file mode 100644
index 13cc322514..0000000000
--- a/ansible/roles/assets-upload-azure/defaults/main.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-delete: True
-player_cdn_container:
-player_cdn_account:
-player_cdn_account_key:
-assets:
diff --git a/ansible/roles/assets-upload-azure/tasks/main.yml b/ansible/roles/assets-upload-azure/tasks/main.yml
deleted file mode 100755
index 520641f5e3..0000000000
--- a/ansible/roles/assets-upload-azure/tasks/main.yml
+++ /dev/null
@@ -1,25 +0,0 @@
----
-- name: Deleting container before Uploding assets
- command: az storage blob delete-batch -s {{player_cdn_container}}
- environment:
- AZURE_STORAGE_ACCOUNT: "{{sunbird_public_storage_account_name}}"
- AZURE_STORAGE_SAS_TOKEN: "{{sunbird_public_storage_account_sas}}"
- async: 3600
- poll: 10
-
-- name: Ensure azure blob storage container exists
- command: az storage container create --name {{player_cdn_container}}
- ignore_errors: true
- environment:
- AZURE_STORAGE_ACCOUNT: "{{sunbird_public_storage_account_name}}"
- AZURE_STORAGE_SAS_TOKEN: "{{sunbird_public_storage_account_sas}}"
-
-
-# Upload the assets created by the job to azure
-- name: Upload to azure blob storage
- command: az storage blob upload-batch -d {{player_cdn_container}} -s {{assets}}
- environment:
- AZURE_STORAGE_ACCOUNT: "{{sunbird_public_storage_account_name}}"
- AZURE_STORAGE_SAS_TOKEN: "{{sunbird_public_storage_account_sas}}"
- async: 3600
- poll: 10
diff --git a/ansible/roles/aws-cli/defaults/main.yml b/ansible/roles/aws-cli/defaults/main.yml
new file mode 100644
index 0000000000..53d866eafa
--- /dev/null
+++ b/ansible/roles/aws-cli/defaults/main.yml
@@ -0,0 +1 @@
+aws_cli_url: https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip
\ No newline at end of file
diff --git a/ansible/roles/aws-cli/tasks/main.yml b/ansible/roles/aws-cli/tasks/main.yml
new file mode 100644
index 0000000000..5907fb1aaf
--- /dev/null
+++ b/ansible/roles/aws-cli/tasks/main.yml
@@ -0,0 +1,24 @@
+---
+- name: Download the installation file
+ get_url:
+ url: "{{ aws_cli_url }}"
+ dest: /tmp/awscliv2.zip
+
+- name: Installing unzip
+ apt:
+ name: "{{item}}"
+ state: latest
+ with_items:
+ - zip
+ - unzip
+
+- name: Unzip the installer
+ unarchive:
+ src: /tmp/awscliv2.zip
+ dest: /tmp/
+ remote_src: yes
+
+- name: install aws cli
+ shell: ./aws/install
+ args:
+ chdir: /tmp/
diff --git a/ansible/roles/aws-cloud-storage/defaults/main.yml b/ansible/roles/aws-cloud-storage/defaults/main.yml
new file mode 100644
index 0000000000..6f3f6f86d6
--- /dev/null
+++ b/ansible/roles/aws-cloud-storage/defaults/main.yml
@@ -0,0 +1,3 @@
+s3_bucket_name: ""
+s3_path: ""
+local_file_or_folder_path: ""
diff --git a/ansible/roles/aws-cloud-storage/tasks/delete-folder.yml b/ansible/roles/aws-cloud-storage/tasks/delete-folder.yml
new file mode 100644
index 0000000000..c912b14edb
--- /dev/null
+++ b/ansible/roles/aws-cloud-storage/tasks/delete-folder.yml
@@ -0,0 +1,9 @@
+---
+- name: delete files and folders recursively
+ environment:
+ AWS_DEFAULT_REGION: "{{ aws_default_region }}"
+ AWS_ACCESS_KEY_ID: "{{ aws_access_key_id }}"
+ AWS_SECRET_ACCESS_KEY: "{{ aws_secret_access_key }}"
+ shell: "aws s3 rm s3://{{ s3_bucket_name }}/{{ s3_path }} --recursive"
+ async: 3600
+ poll: 10
diff --git a/ansible/roles/aws-cloud-storage/tasks/delete.yml b/ansible/roles/aws-cloud-storage/tasks/delete.yml
new file mode 100644
index 0000000000..414ea52e6b
--- /dev/null
+++ b/ansible/roles/aws-cloud-storage/tasks/delete.yml
@@ -0,0 +1,9 @@
+---
+- name: delete files from s3
+ environment:
+ AWS_DEFAULT_REGION: "{{ aws_default_region }}"
+ AWS_ACCESS_KEY_ID: "{{ aws_access_key_id }}"
+ AWS_SECRET_ACCESS_KEY: "{{ aws_secret_access_key }}"
+ shell: "aws s3 rm s3://{{ s3_bucket_name }}/{{ s3_path }}"
+ async: 3600
+ poll: 10
diff --git a/ansible/roles/aws-cloud-storage/tasks/download.yml b/ansible/roles/aws-cloud-storage/tasks/download.yml
new file mode 100644
index 0000000000..138024af78
--- /dev/null
+++ b/ansible/roles/aws-cloud-storage/tasks/download.yml
@@ -0,0 +1,9 @@
+---
+- name: download files to s3
+ environment:
+ AWS_DEFAULT_REGION: "{{ aws_default_region }}"
+ AWS_ACCESS_KEY_ID: "{{ aws_access_key_id }}"
+ AWS_SECRET_ACCESS_KEY: "{{ aws_secret_access_key }}"
+ shell: "aws s3 cp s3://{{ s3_bucket_name }}/{{ s3_path }} {{ local_file_or_folder_path }}"
+ async: 3600
+ poll: 10
diff --git a/ansible/roles/aws-cloud-storage/tasks/main.yml b/ansible/roles/aws-cloud-storage/tasks/main.yml
new file mode 100644
index 0000000000..62f204a9d2
--- /dev/null
+++ b/ansible/roles/aws-cloud-storage/tasks/main.yml
@@ -0,0 +1,18 @@
+---
+- name: delete files from aws S3 bucket
+ include: delete.yml
+
+- name: delete folders from aws S3 bucket recursively
+ include: delete-folder.yml
+
+
+- name: download file from S3
+ include: download.yml
+
+- name: upload files from a local to aws S3
+ include: upload.yml
+
+- name: upload files and folder from local directory to aws S3
+ include: upload-folder.yml
+
+
diff --git a/ansible/roles/aws-cloud-storage/tasks/upload-folder.yml b/ansible/roles/aws-cloud-storage/tasks/upload-folder.yml
new file mode 100644
index 0000000000..3e03b068b7
--- /dev/null
+++ b/ansible/roles/aws-cloud-storage/tasks/upload-folder.yml
@@ -0,0 +1,9 @@
+---
+- name: upload folder to s3
+ environment:
+ AWS_DEFAULT_REGION: "{{ aws_default_region }}"
+ AWS_ACCESS_KEY_ID: "{{ aws_access_key_id }}"
+ AWS_SECRET_ACCESS_KEY: "{{ aws_secret_access_key }}"
+ shell: "aws s3 cp {{ local_file_or_folder_path }} s3://{{ s3_bucket_name }}/{{ s3_path }} --recursive"
+ async: 3600
+ poll: 10
diff --git a/ansible/roles/aws-cloud-storage/tasks/upload.yml b/ansible/roles/aws-cloud-storage/tasks/upload.yml
new file mode 100644
index 0000000000..af8de990e2
--- /dev/null
+++ b/ansible/roles/aws-cloud-storage/tasks/upload.yml
@@ -0,0 +1,9 @@
+---
+- name: upload files to s3
+ environment:
+ AWS_DEFAULT_REGION: "{{ aws_default_region }}"
+ AWS_ACCESS_KEY_ID: "{{ aws_access_key_id }}"
+ AWS_SECRET_ACCESS_KEY: "{{ aws_secret_access_key }}"
+ shell: "aws s3 cp {{ local_file_or_folder_path }} s3://{{ s3_bucket_name }}/{{ s3_path }}"
+ async: 3600
+ poll: 10
diff --git a/ansible/roles/azure-cli/tasks/main.yml b/ansible/roles/azure-cli/tasks/main.yml
index 484bf1f4fb..0374f6a0ec 100644
--- a/ansible/roles/azure-cli/tasks/main.yml
+++ b/ansible/roles/azure-cli/tasks/main.yml
@@ -1,9 +1,25 @@
-- name: install azure cli
- become: yes
- shell:
- which az || curl -sL https://aka.ms/InstallAzureCLIDeb | bash
-- name: install azcopy
- become: yes
+---
+- name: Add Microsfot signing key
+ apt_key:
+ url: https://packages.microsoft.com/keys/microsoft.asc
+ state: present
+
+- name: Add Microsfot repository into sources list
+ apt_repository:
+ repo: "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ {{ ansible_distribution_release | lower }} main"
+ state: present
+
+- name: Install azue cli and dependent packages
+ apt:
+ pkg:
+ - ca-certificates
+ - curl
+ - apt-transport-https
+ - lsb-release
+ - gnupg
+ - "azure-cli=2.33.1-1~{{ ansible_distribution_release | lower }}"
+
+- name: Install azcopy
shell: |
which azcopy || ( \
mkdir /tmp/azcopy && cd /tmp/azcopy && \
diff --git a/ansible/roles/azure-cloud-storage/defaults/main.yml b/ansible/roles/azure-cloud-storage/defaults/main.yml
new file mode 100644
index 0000000000..b5266cb76a
--- /dev/null
+++ b/ansible/roles/azure-cloud-storage/defaults/main.yml
@@ -0,0 +1,72 @@
+# The name of the blob container in the azure storage account
+# Example -
+# blob_container_name: "my-container"
+blob_container_name: ""
+
+# The delete pattern to delete files and folder
+# Example -
+# blob_delete_pattern: "my-drectory/*"
+# blob_delete_pattern: "my-drectory/another-directory/*"
+# blob_delete_pattern: "*"
+blob_delete_pattern: ""
+
+# The storage account name
+# Example -
+# storage_account_name: "sunbird-dev-public"
+storage_account_name: ""
+
+# The storage account key
+# Example -
+# storage_account_name: "cmFuZG9tcmFuZG9tcmFuZG9tcmFuZG9tCg=="
+storage_account_key: ""
+
+# The path to local file which has to be uploaded to azure storage
+# The local path to store the file after downloading from azure storage
+# Example -
+# local_file_or_folder_path: "/workspace/my-folder/myfile.json"
+# local_file_or_folder_path: "/workspace/my-folder"
+local_file_or_folder_path: ""
+
+# The name of the file in azure storage after uploading from local
+# The name of the file in azure storage that has to be downloaded
+# Example -
+# blob_file_name: "myfile-blob.json"
+# You can also pass folder path in order to upload / download the file from a speciic folder
+# blob_file_name "my-folder/my-file.json"
+blob_file_name: ""
+
+# The storage account sas token
+# Example -
+# storage_account_sas_token: "?sv=2022-01-01&ss=abc&srt=rws%3D"
+storage_account_sas_token: ""
+
+# The folder path in azure storage to upload the files starting from the root of the container
+# This path should alwasy start with a slash / as we are going to append this value as shown in below example
+# Example -
+# blob_container_name: "my-container"
+# blob_container_folder_path: "/my-folder-path"
+# {{ blob_container_name }}{{ blob_container_folder_path }}
+# The above translates to "my-container/my-folder-path"
+
+# The variable can also be empty as shown below, which means we will upload directly at the root path of the container
+# Example -
+# blob_container_name: "my-container"
+# blob_container_folder_path: ""
+# The above translates to "my-container"
+blob_container_folder_path: ""
+
+# At what access level the container should be created
+# Example -
+# container_public_access: "off"
+# container_public_access: "blob"
+# container_public_access: "container"
+# Allowed values are - off, blob, container
+# This variable affects only new containers and has no affect on a container if it already exists
+# If the container already exists, the access level will not be changed
+# You will need to change the access level from Azure portal or using az storage container set-permission command
+container_public_access: ""
+
+# Creates the container by default before running the specific azure blob tasks
+# If you would like to skip container creation (in case of a looped execution),
+# you can set this value to False in order to skip the contatiner creation task for every iteration
+create_container: True
diff --git a/ansible/roles/azure-cloud-storage/tasks/blob-delete-batch-no-poll.yml b/ansible/roles/azure-cloud-storage/tasks/blob-delete-batch-no-poll.yml
new file mode 100644
index 0000000000..152e3a49ad
--- /dev/null
+++ b/ansible/roles/azure-cloud-storage/tasks/blob-delete-batch-no-poll.yml
@@ -0,0 +1,5 @@
+---
+- name: delete files and folders - deleting {{ blob_container_name }}/{{ blob_delete_pattern }}
+ shell: "az storage blob delete-batch --source {{ blob_container_name }} --pattern '{{ blob_delete_pattern }}' --account-name {{ storage_account_name }} --account-key {{ storage_account_key }}"
+ async: 1800
+ poll: 0
\ No newline at end of file
diff --git a/ansible/roles/azure-cloud-storage/tasks/blob-delete-batch.yml b/ansible/roles/azure-cloud-storage/tasks/blob-delete-batch.yml
new file mode 100644
index 0000000000..e642a6f24f
--- /dev/null
+++ b/ansible/roles/azure-cloud-storage/tasks/blob-delete-batch.yml
@@ -0,0 +1,5 @@
+---
+- name: delete files and folders - deleting {{ blob_container_name }}/{{ blob_delete_pattern }}
+ shell: "az storage blob delete-batch --source {{ blob_container_name }} --pattern '{{ blob_delete_pattern }}' --account-name {{ storage_account_name }} --account-key {{ storage_account_key }}"
+ async: 3600
+ poll: 10
\ No newline at end of file
diff --git a/ansible/roles/azure-cloud-storage/tasks/blob-download.yml b/ansible/roles/azure-cloud-storage/tasks/blob-download.yml
new file mode 100644
index 0000000000..3bbf4b607a
--- /dev/null
+++ b/ansible/roles/azure-cloud-storage/tasks/blob-download.yml
@@ -0,0 +1,5 @@
+---
+- name: download a file from azure storage
+ shell: "az storage blob download --container-name {{ blob_container_name }} --file {{ local_file_or_folder_path }} --name {{ blob_file_name }} --account-name {{ storage_account_name }} --account-key {{ storage_account_key }}"
+ async: 3600
+ poll: 10
\ No newline at end of file
diff --git a/ansible/roles/azure-cloud-storage/tasks/blob-upload-batch-no-poll.yml b/ansible/roles/azure-cloud-storage/tasks/blob-upload-batch-no-poll.yml
new file mode 100644
index 0000000000..ff00854851
--- /dev/null
+++ b/ansible/roles/azure-cloud-storage/tasks/blob-upload-batch-no-poll.yml
@@ -0,0 +1,5 @@
+---
+- name: upload files and folders - uploading {{ blob_container_name }}{{ blob_container_folder_path }}
+ shell: "az storage blob upload-batch --destination {{ blob_container_name }}{{ blob_container_folder_path }} --source {{ local_file_or_folder_path }} --account-name {{ storage_account_name }} --account-key {{ storage_account_key }}"
+ async: 1800
+ poll: 0
\ No newline at end of file
diff --git a/ansible/roles/azure-cloud-storage/tasks/blob-upload-batch.yml b/ansible/roles/azure-cloud-storage/tasks/blob-upload-batch.yml
new file mode 100644
index 0000000000..900ecee515
--- /dev/null
+++ b/ansible/roles/azure-cloud-storage/tasks/blob-upload-batch.yml
@@ -0,0 +1,11 @@
+---
+- name: create container in azure storage if it doesn't exist
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: container-create.yml
+ when: create_container == True
+
+- name: upload files and folders - uploading {{ blob_container_name }}{{ blob_container_folder_path }}
+ shell: "az storage blob upload-batch --destination {{ blob_container_name }}{{ blob_container_folder_path }} --source {{ local_file_or_folder_path }} --account-name {{ storage_account_name }} --account-key {{ storage_account_key }}"
+ async: 3600
+ poll: 10
diff --git a/ansible/roles/azure-cloud-storage/tasks/blob-upload.yml b/ansible/roles/azure-cloud-storage/tasks/blob-upload.yml
new file mode 100644
index 0000000000..5430aba8fa
--- /dev/null
+++ b/ansible/roles/azure-cloud-storage/tasks/blob-upload.yml
@@ -0,0 +1,11 @@
+---
+- name: create container in azure storage if it doesn't exist
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: container-create.yml
+ when: create_container == True
+
+- name: upload file to azure storage container
+ shell: "az storage blob upload --container-name {{ blob_container_name }} --file {{ local_file_or_folder_path }} --name {{ blob_file_name }} --account-name {{ storage_account_name }} --account-key {{ storage_account_key }}"
+ async: 3600
+ poll: 10
diff --git a/ansible/roles/azure-cloud-storage/tasks/container-create.yml b/ansible/roles/azure-cloud-storage/tasks/container-create.yml
new file mode 100644
index 0000000000..847c765a33
--- /dev/null
+++ b/ansible/roles/azure-cloud-storage/tasks/container-create.yml
@@ -0,0 +1,8 @@
+---
+- name: create container if it doesn't exist
+ shell: "az storage container create --name {{ blob_container_name }} --public-access {{ container_public_access }} --account-name {{ storage_account_name }} --account-key {{ storage_account_key }}"
+ when: storage_account_key | length > 0
+
+- name: create container if it doesn't exist
+ shell: "az storage container create --name {{ blob_container_name }} --public-access {{ container_public_access }} --account-name {{ storage_account_name }} --sas-token '{{ storage_account_sas_token }}'"
+ when: storage_account_sas_token | length > 0
\ No newline at end of file
diff --git a/ansible/roles/azure-cloud-storage/tasks/delete-using-azcopy.yml b/ansible/roles/azure-cloud-storage/tasks/delete-using-azcopy.yml
new file mode 100644
index 0000000000..196de9c9b3
--- /dev/null
+++ b/ansible/roles/azure-cloud-storage/tasks/delete-using-azcopy.yml
@@ -0,0 +1,17 @@
+---
+- name: generate SAS token for azcopy
+ shell: |
+ sas_expiry=`date -u -d "1 hour" '+%Y-%m-%dT%H:%MZ'`
+ sas_token=?`az storage container generate-sas -n {{ blob_container_name }} --account-name {{ storage_account_name }} --account-key {{ storage_account_key }} --https-only --permissions dlrw --expiry $sas_expiry -o tsv`
+ echo $sas_token
+ register: sas_token
+
+- set_fact:
+ container_sas_token: "{{ sas_token.stdout}}"
+
+- name: delete files and folders from azure storage using azcopy
+ shell: "azcopy rm 'https://{{ storage_account_name }}.blob.core.windows.net/{{ blob_container_name }}{{ blob_container_folder_path }}{{ container_sas_token }}' --recursive"
+ environment:
+ AZCOPY_CONCURRENT_FILES: "10"
+ async: 10800
+ poll: 10
diff --git a/ansible/roles/azure-cloud-storage/tasks/main.yml b/ansible/roles/azure-cloud-storage/tasks/main.yml
new file mode 100644
index 0000000000..eb435ecfe2
--- /dev/null
+++ b/ansible/roles/azure-cloud-storage/tasks/main.yml
@@ -0,0 +1,21 @@
+---
+- name: delete files and folders from azure storage container recursively
+ include: blob-delete-batch.yml
+
+- name: download a file from azure storage
+ include: blob-download.yml
+
+- name: upload files and folders from a local directory to azure storage container
+ include: blob-upload-batch.yml
+
+- name: upload file to azure storage container
+ include: blob-upload.yml
+
+- name: create container in azure storage if it doesn't exist
+ include: container-create.yml
+
+- name: delete files and folders from azure storage using azcopy
+ include: delete-using-azcopy.yml
+
+- name: upload files and folders to azure storage using azcopy
+ include: upload-using-azcopy.yml
diff --git a/ansible/roles/azure-cloud-storage/tasks/upload-using-azcopy.yml b/ansible/roles/azure-cloud-storage/tasks/upload-using-azcopy.yml
new file mode 100644
index 0000000000..95da584c9b
--- /dev/null
+++ b/ansible/roles/azure-cloud-storage/tasks/upload-using-azcopy.yml
@@ -0,0 +1,23 @@
+---
+- name: generate SAS token for azcopy
+ shell: |
+ sas_expiry=`date -u -d "1 hour" '+%Y-%m-%dT%H:%MZ'`
+ sas_token=?`az storage container generate-sas -n {{ blob_container_name }} --account-name {{ storage_account_name }} --account-key {{ storage_account_key }} --https-only --permissions dlrw --expiry $sas_expiry -o tsv`
+ echo $sas_token
+ register: sas_token
+
+- set_fact:
+ container_sas_token: "{{ sas_token.stdout}}"
+
+- name: create container in azure storage if it doesn't exist
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: container-create.yml
+ when: create_container == True
+
+- name: upload files and folders to azure storage using azcopy
+ shell: "azcopy copy {{ local_file_or_folder_path }} 'https://{{ storage_account_name }}.blob.core.windows.net/{{ blob_container_name }}{{ blob_container_folder_path }}{{ container_sas_token }}' --recursive"
+ environment:
+ AZCOPY_CONCURRENT_FILES: "10"
+ async: 10800
+ poll: 10
diff --git a/ansible/roles/blob-batch-delete-azure/tasks/main.yml b/ansible/roles/blob-batch-delete-azure/tasks/main.yml
deleted file mode 100755
index 4d84085ed5..0000000000
--- a/ansible/roles/blob-batch-delete-azure/tasks/main.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-# Delete the assets in container
-- name: Upload to azure blob storage
- command: az storage blob delete-batch -s {{container}} --pattern {{blob_pattern}} --dryrun
- environment:
- AZURE_STORAGE_ACCOUNT: "{{blob_account}}"
- AZURE_STORAGE_KEY: "{{blob_account_key}}"
- async: 60
- poll: 10
diff --git a/ansible/roles/cassandra-backup/defaults/main.yml b/ansible/roles/cassandra-backup/defaults/main.yml
index 148bcf83b2..4481570cc6 100644
--- a/ansible/roles/cassandra-backup/defaults/main.yml
+++ b/ansible/roles/cassandra-backup/defaults/main.yml
@@ -1,3 +1,4 @@
cassandra_root_dir: '/etc/cassandra'
data_dir: '/var/lib/cassandra/data'
-cassandra_backup_azure_container_name: core-cassandra
\ No newline at end of file
+cloud_storage_cassandrabackup_bucketname: "{{cloud_storage_management_bucketname}}"
+cloud_storage_cassandrabackup_foldername: 'cassandra-backup'
diff --git a/ansible/roles/cassandra-backup/meta/main.yml b/ansible/roles/cassandra-backup/meta/main.yml
deleted file mode 100644
index 23b18a800a..0000000000
--- a/ansible/roles/cassandra-backup/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - azure-cli
\ No newline at end of file
diff --git a/ansible/roles/cassandra-backup/tasks/main.yml b/ansible/roles/cassandra-backup/tasks/main.yml
index a6611c8ebf..54941f8343 100755
--- a/ansible/roles/cassandra-backup/tasks/main.yml
+++ b/ansible/roles/cassandra-backup/tasks/main.yml
@@ -3,22 +3,22 @@
ignore_errors: true
- name: Create the directory
- become: yes
+ become: true
file: path=/data/cassandra/backup state=directory recurse=yes
- name: copy the backup script
- become: yes
+ become: true
template:
src: ../../../../deploy/cassandra_backup.py
dest: /data/cassandra/backup/cassandra_backup.py
mode: 0755
- set_fact:
- cassandra_backup_gzip_file_name: "cassandra-backup-{{ lookup('pipe', 'date +%Y%m%d') }}-{{ ansible_hostname }}-new"
+ cassandra_backup_folder_name: "cassandra-backup-{{ lookup('pipe', 'date +%Y%m%d') }}-{{ ansible_hostname }}-new"
- name: run the backup script
- become: yes
- shell: python3 cassandra_backup.py --snapshotname "{{ cassandra_backup_gzip_file_name }}" --snapshotdirectory "{{ cassandra_backup_gzip_file_name }}" "{{additional_arguments|d('')}}"
+ become: true
+ shell: python3 cassandra_backup.py --snapshotname "{{ cassandra_backup_folder_name }}" --snapshotdirectory "{{ cassandra_backup_folder_name }}" "{{additional_arguments|d('')}}"
args:
chdir: /data/cassandra/backup
async: 14400
@@ -32,21 +32,44 @@
debug:
var: doc_data
-- name: Ensure azure blob storage container exists
- command: az storage container create --name {{ cassandra_backup_azure_container_name }}
- ignore_errors: true
- environment:
- AZURE_STORAGE_ACCOUNT: "{{ sunbird_management_storage_account_name }}"
- AZURE_STORAGE_KEY: "{{ sunbird_management_storage_account_key }}"
-
-- name: Upload to azure blob storage
- command: "azcopy copy {{cassandra_backup_gzip_file_name}} 'https://{{sunbird_management_storage_account_name}}.blob.core.windows.net/{{cassandra_backup_azure_container_name}}{{sunbird_management_storage_account_sas}}' --recursive"
- environment:
- AZCOPY_CONCURRENT_FILES: 10 # How many files azcopy should read concurrently.
- args:
- chdir: /data/cassandra/backup
- async: 10800
- poll: 10
+- name: upload file to azure storage using azcopy
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: upload-using-azcopy.yml
+ vars:
+ blob_container_name: "{{ cloud_storage_cassandrabackup_foldername }}"
+ container_public_access: "off"
+ blob_container_folder_path: ""
+ local_file_or_folder_path: "/data/cassandra/backup/{{ cassandra_backup_folder_name }}"
+ storage_account_name: "{{ cloud_management_storage_accountname }}"
+ storage_account_key: "{{ cloud_management_storage_secret }}"
+ when: cloud_service_provider == "azure"
+- name: upload backup to S3
+ include_role:
+ name: aws-cloud-storage
+ tasks_from: upload-folder.yml
+ vars:
+ local_file_or_folder_path: "/data/cassandra/backup/{{ cassandra_backup_folder_name }}"
+ s3_bucket_name: "{{ cloud_storage_cassandrabackup_bucketname }}"
+ s3_path: "{{ cloud_storage_cassandrabackup_foldername }}"
+ aws_default_region: "{{ cloud_public_storage_region }}"
+ aws_access_key_id: "{{ cloud_management_storage_accountname }}"
+ aws_secret_access_key: "{{ cloud_management_storage_secret }}"
+ when: cloud_service_provider == "aws"
+
+- name: upload file to gcloud storage
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: upload-batch.yml
+ vars:
+ gcp_storage_service_account_name: "{{ cloud_management_storage_accountname }}"
+ gcp_storage_key_file: "{{ cloud_management_storage_secret }}"
+ gcp_bucket_name: "{{ cloud_storage_cassandrabackup_bucketname }}"
+ gcp_path: "{{ cloud_storage_cassandrabackup_foldername }}"
+ local_file_or_folder_path: "/data/cassandra/backup/{{ cassandra_backup_folder_name }}"
+ when: cloud_service_provider == "gcloud"
+
- name: clean up backup dir after upload
file: path="{{ cassandra_backup_dir }}" state=absent
+
diff --git a/ansible/roles/cassandra-cql-update/templates/cassandra.cql b/ansible/roles/cassandra-cql-update/templates/cassandra.cql
index c20e9924db..736ca5b571 100644
--- a/ansible/roles/cassandra-cql-update/templates/cassandra.cql
+++ b/ansible/roles/cassandra-cql-update/templates/cassandra.cql
@@ -501,19 +501,6 @@ CREATE TABLE IF NOT EXISTS sunbird.skills(id text,skills list, PRIMARY KEY
//25th Oct
ALTER TABLE sunbird.organisation ADD orgTypeId text;
-//Announcement apis -27th Oct
-{% if (cassandra_cluster_size | int) > 1 %}
-CREATE KEYSPACE IF NOT EXISTS sunbirdplugin WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', 'datacenter1' : 2 };
-{% else %}
-CREATE KEYSPACE IF NOT EXISTS sunbirdplugin WITH REPLICATION = {'class':'SimpleStrategy','replication_factor':1};
-{% endif %}
-//CREATE TYPE IF NOT EXISTS sunbirdplugin.attachment (id text,filename text,mimetype text);
-CREATE TABLE sunbirdplugin.announcement (id text,userid text,sourceid text,details map,links list,attachments list,target text,sentcount int,priority text,expiry text,status text,createddate text,updateddate text, PRIMARY KEY (id));
-CREATE TABLE sunbirdplugin.attachment (id text,file text,filename text,mimetype text,createdby text,status text,createddate text, PRIMARY KEY (id));
-CREATE TABLE sunbirdplugin.metrics (id text,userid text,announcementid text,activity text,channel text,createddate text, PRIMARY KEY (id));
-CREATE TABLE sunbirdplugin.announcementtype (id text,rootorgid text,name text,status text,createddate text, PRIMARY KEY (id));
-CREATE TABLE sunbirdplugin.announcementauth (id text,userid text,rootorgid text,permissions map,status text,createddate text, PRIMARY KEY (id));
-
insert into sunbird.role_group (id,name) values ('ANNOUNCEMENT_SENDER','Announcement Sender');
update sunbird.role_group set url_action_ids=['Announcement Sender'] where id='ANNOUNCEMENT_SENDER';
insert into sunbird.role (id,name,rolegroupid,status) values ('ANNOUNCEMENT_SENDER','Announcement Sender',['ANNOUNCEMENT_SENDER'],1);
@@ -543,9 +530,6 @@ ALTER TABLE sunbird.organisation ADD locationId text;
ALTER TABLE sunbird.user ADD profileVisibility map;
-// 9th Nov 2017
-ALTER TABLE sunbirdplugin.announcement DROP target ;
-ALTER TABLE sunbirdplugin.announcement ADD target map>>>>;
//adding default one Skills.
insert into skills (id,skills) values ('001',['java']);
ALTER TABLE sunbird.user_skills drop endorsers;
diff --git a/ansible/roles/cassandra-db-update/templates/inquiry_alter_table.cql b/ansible/roles/cassandra-db-update/templates/inquiry_alter_table.cql
new file mode 100644
index 0000000000..4924c1136a
--- /dev/null
+++ b/ansible/roles/cassandra-db-update/templates/inquiry_alter_table.cql
@@ -0,0 +1 @@
+ALTER TABLE {{ question_keyspace_name }}.question_data ADD (outcomeDeclaration text, feedback text);
\ No newline at end of file
diff --git a/ansible/roles/cassandra-db-update/templates/inquiry_create_table.cql b/ansible/roles/cassandra-db-update/templates/inquiry_create_table.cql
new file mode 100644
index 0000000000..c4543734e3
--- /dev/null
+++ b/ansible/roles/cassandra-db-update/templates/inquiry_create_table.cql
@@ -0,0 +1,44 @@
+CREATE KEYSPACE IF NOT EXISTS {{ hierarchy_keyspace_name }} WITH replication = {
+ 'class': 'SimpleStrategy',
+ 'replication_factor': '1'
+};
+
+CREATE KEYSPACE IF NOT EXISTS {{ question_keyspace_name }} WITH replication = {
+ 'class': 'SimpleStrategy',
+ 'replication_factor': '1'
+};
+
+CREATE TABLE IF NOT EXISTS {{ hierarchy_keyspace_name }}.questionset_hierarchy (
+ identifier text,
+ hierarchy text,
+ instructions text,
+ outcomeDeclaration text,
+ PRIMARY KEY (identifier)
+);
+
+CREATE TABLE IF NOT EXISTS {{ question_keyspace_name }}.question_data (
+ identifier text,
+ body blob,
+ editorState text,
+ answer blob,
+ solutions text,
+ instructions text,
+ hints text,
+ media text,
+ responseDeclaration text,
+ interactions text,
+ outcomeDeclaration text,
+ feedback text,
+ PRIMARY KEY (identifier)
+);
+
+{% if groups['cassandra-node-2'] is defined %}
+ALTER KEYSPACE {{ hierarchy_keyspace_name }} WITH replication = {
+ 'class': 'NetworkTopologyStrategy',
+ 'datacenter1' : 2
+};
+ALTER KEYSPACE {{ question_keyspace_name }} WITH replication = {
+ 'class': 'NetworkTopologyStrategy',
+ 'datacenter1' : 2
+};
+{% endif %}
\ No newline at end of file
diff --git a/ansible/roles/cassandra-deploy/tasks/main.yml b/ansible/roles/cassandra-deploy/tasks/main.yml
index 5025ee4612..8359bbc928 100644
--- a/ansible/roles/cassandra-deploy/tasks/main.yml
+++ b/ansible/roles/cassandra-deploy/tasks/main.yml
@@ -1,10 +1,10 @@
- name: checking for last failed migration
- shell: cqlsh -e 'SELECT version from sunbird.cassandra_migration_version where success=false ALLOW FILTERING ;' | tail -n +4 | head -n -2 | sort | tail -n1 | xargs
+ shell: cqlsh -e 'SELECT version from {{ cassandra_keyspace_to_migrate }}.cassandra_migration_version where success=false ALLOW FILTERING ;' | tail -n +4 | head -n -2 | sort | tail -n1 | xargs
register: version
run_once: true
- name: Dropping failed migration {{ version.stdout }}
- shell: cqlsh -e "delete from sunbird.cassandra_migration_version where version='{{version.stdout}}';"
+ shell: cqlsh -e "delete from {{ cassandra_keyspace_to_migrate }}.cassandra_migration_version where version='{{version.stdout}}';"
when: version.stdout
run_once: true
@@ -14,8 +14,20 @@
dest: "/home/{{ansible_ssh_user}}/"
run_once: true
+- name: Delete migration-script
+ file:
+ state: absent
+ path: "/home/{{ansible_ssh_user}}/migration-script/"
+
+- name: Copy the migration script
+ copy:
+ src: "{{ script_location }}"
+ dest: "/home/{{ansible_ssh_user}}/migration-script/"
+ run_once: true
+
- name: Run the application
shell: java -cp "cassandra-migration-0.0.1-SNAPSHOT-jar-with-dependencies.jar" com.contrastsecurity.cassandra.migration.utils.MigrationScriptEntryPoint
+# shell: java -jar -Dcassandra.migration.scripts.locations=filesystem:migration-script/{{ cassandra_keyspace_to_migrate }}/ -Dcassandra.migration.cluster.contactpoints=localhost -Dcassandra.migration.cluster.port=9042 -Dcassandra.migration.cluster.username=cassandra -Dcassandra.migration.cluster.password=cassandra -Dcassandra.migration.keyspace.name={{ cassandra_keyspace_to_migrate }} *-jar-with-dependencies.jar migrate
run_once: true
register: migration_status
diff --git a/ansible/roles/cassandra-restore/defaults/main.yml b/ansible/roles/cassandra-restore/defaults/main.yml
index 6353e09287..9ac0c38f95 100644
--- a/ansible/roles/cassandra-restore/defaults/main.yml
+++ b/ansible/roles/cassandra-restore/defaults/main.yml
@@ -1 +1,4 @@
user_home: "/home/{{ ansible_ssh_user }}/"
+
+cloud_storage_cassandrabackup_bucketname: "{{cloud_storage_management_bucketname}}"
+cloud_storage_cassandrabackup_foldername: 'cassandra-backup'
diff --git a/ansible/roles/cassandra-restore/meta/main.yml b/ansible/roles/cassandra-restore/meta/main.yml
deleted file mode 100644
index 23b18a800a..0000000000
--- a/ansible/roles/cassandra-restore/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - azure-cli
\ No newline at end of file
diff --git a/ansible/roles/cassandra-restore/tasks/main.yml b/ansible/roles/cassandra-restore/tasks/main.yml
index 6dcb7d97df..8d74c4c695 100755
--- a/ansible/roles/cassandra-restore/tasks/main.yml
+++ b/ansible/roles/cassandra-restore/tasks/main.yml
@@ -1,52 +1,79 @@
- name: Stop the cassandra
- become: yes
+ become: true
service: name=cassandra state=stopped
- set_fact:
cassandra_restore_gzip_file_path: "{{ cassandra_restore_dir }}/{{ cassandra_restore_gzip_file_name }}"
-
-- name: Download to azure blob storage
- command: az storage blob download --name {{ cassandra_restore_gzip_file_name }} --file {{ cassandra_restore_gzip_file_path }} --container-name {{ cassandra_backup_azure_container_name }}
- environment:
- AZURE_STORAGE_ACCOUNT: "{{ sunbird_management_storage_account_name }}"
- AZURE_STORAGE_KEY: "{{ sunbird_management_storage_account_key }}"
- async: 3600
- poll: 10
-
+
+- name: download a file from azure storage
+ become: true
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: blob-download.yml
+ vars:
+ blob_container_name: "{{ cloud_storage_cassandrabackup_foldername }}"
+ blob_file_name: "{{ cassandra_restore_gzip_file_name }}"
+ local_file_or_folder_path: "{{ cassandra_restore_gzip_file_path }}"
+ storage_account_name: "{{ cloud_management_storage_accountname }}"
+ storage_account_key: "{{ cloud_management_storage_secret }}"
+ when: cloud_service_provider == "azure"
+
+- name: download a file from aws s3
+ become: true
+ include_role:
+ name: aws-cloud-storage
+ tasks_from: download.yml
+ vars:
+ s3_bucket_name: "{{ cloud_storage_cassandrabackup_bucketname }}"
+ aws_access_key_id: "{{ cloud_management_storage_accountname }}"
+ aws_secret_access_key: "{{ cloud_management_storage_secret }}"
+ aws_default_region: "{{ cloud_public_storage_region }}"
+ local_file_or_folder_path: "{{ cassandra_restore_gzip_file_path }}"
+ s3_path: "{{ cloud_storage_cassandrabackup_foldername }}/{{ cassandra_restore_gzip_file_name }}"
+ when: cloud_service_provider == "aws"
+
+- name: download file from gcloud storage
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: download.yml
+ vars:
+ gcp_storage_service_account_name: "{{ cloud_management_storage_accountname }}"
+ gcp_storage_key_file: "{{ cloud_management_storage_secret }}"
+ gcp_bucket_name: "{{ cloud_storage_cassandrabackup_bucketname }}"
+ gcp_path: "{{ cloud_storage_cassandrabackup_foldername }}/{{ cassandra_restore_gzip_file_name }}"
+ local_file_or_folder_path: "{{ cassandra_restore_gzip_file_path }}"
+ when: cloud_service_provider == "gcloud"
+
- name: unarchieve restore artifact
- become: yes
+ become: true
unarchive: src={{user_home}}/{{ cassandra_restore_gzip_file_name }} dest={{user_home}}/ copy=no
- name: Remove the restroe artefact
- become: yes
+ become: true
file: path={{user_home}}/cassandra* state=absent
- name: Remove the old data
- become: yes
+ become: true
file: path=/var/lib/cassandra/data/sunbird state=absent
- name: Replace the new data
- become: yes
+ become: true
command: mv {{user_home}}/data/sunbird /var/lib/cassandra/data/
-
- name: remove data
- become: yes
+ become: true
file:
path: "/home/{{ ansible_ssh_user }}/data"
state: absent
- name: change the permissions
- become: yes
+ become: true
file: path=/var/lib/cassandra/data owner=cassandra group=cassandra recurse=yes
- name: copy the backup script
- become: yes
+ become: true
template: src=nodetool.j2 dest={{user_home}}/nodetool.sh mode=0755
-
- name: Start the cassandra
- become: yes
+ become: true
service: name=cassandra state=started
-
-
diff --git a/ansible/roles/cassandra/defaults/main.yml b/ansible/roles/cassandra/defaults/main.yml
index 33c02c17bf..8f1f0f7951 100644
--- a/ansible/roles/cassandra/defaults/main.yml
+++ b/ansible/roles/cassandra/defaults/main.yml
@@ -1,5 +1,5 @@
user_home: "/home/{{ ansible_ssh_user }}/"
-cassandra_repo: 'deb http://www.apache.org/dist/cassandra/debian 311x main'
-cassandra_repo_key: 'https://www.apache.org/dist/cassandra/KEYS'
+cassandra_repo: 'deb https://debian.cassandra.apache.org 311x main'
+cassandra_repo_key: 'https://downloads.apache.org/cassandra/KEYS'
resource_crunch: "yes" # make this value yes if heap size should be quarter of the Server Memory when you are deploying multiple databases, else make this value no to have 50% of the value as per the best practice of cassandra
cassandra_home_directory: "/var/lib/cassandra"
diff --git a/ansible/roles/cert-file-upload/defaults/main.yml b/ansible/roles/cert-file-upload/defaults/main.yml
deleted file mode 100644
index b74bef14c9..0000000000
--- a/ansible/roles/cert-file-upload/defaults/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-file_name: "certUploadedfile"
-cert_template_artifacts_container_name: "e-credentials"
diff --git a/ansible/roles/cert-file-upload/tasks/main.yml b/ansible/roles/cert-file-upload/tasks/main.yml
deleted file mode 100644
index 9fcaf6a679..0000000000
--- a/ansible/roles/cert-file-upload/tasks/main.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-- name: rename the file to the correct name as required in blobstore
- command: "mv /tmp/certUploadedfile /tmp/{{file_name}}"
-
-- name: Upload to azure blob storage
- command: "az storage blob upload -c {{ cert_template_artifacts_container_name }} --name {{ file_name }} -f /tmp/{{file_name}}"
- async: 3600
- poll: 10
diff --git a/ansible/roles/cert-templates/tasks/main.yml b/ansible/roles/cert-templates/tasks/main.yml
index b41aaef0a8..d4134d7cbd 100644
--- a/ansible/roles/cert-templates/tasks/main.yml
+++ b/ansible/roles/cert-templates/tasks/main.yml
@@ -31,30 +31,52 @@
chdir: "{{cert_location}}/cert-templates/certUtilScripts/"
when: createPublicKey is defined
-- name: Ensure azure blob storage container exists
- command: az storage container create --name {{cert_service_container_name}} --public-access off
- environment:
- AZURE_STORAGE_ACCOUNT: "{{sunbird_private_storage_account_name}}"
- AZURE_STORAGE_KEY: "{{sunbird_private_storage_account_key}}"
+- name: upload batch of files to azure storage
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: blob-upload-batch.yml
+ vars:
+ blob_container_name: "{{ cloud_storage_certservice_bucketname }}"
+ container_public_access: "off"
+ blob_container_folder_path: ""
+ local_file_or_folder_path: "{{ cert_location }}/cert-templates/certUtilScripts/out"
+ storage_account_name: "{{ cloud_private_storage_accountname }}"
+ storage_account_key: "{{ cloud_private_storage_secret }}"
+ when: cloud_service_provider == "azure"
-- name: Upload to azure blob storage
- command: az storage blob upload-batch --destination {{cert_service_container_name}} --source "out"
- args:
- chdir: "{{cert_location}}/cert-templates/certUtilScripts/"
- environment:
- AZURE_STORAGE_ACCOUNT: "{{sunbird_private_storage_account_name}}"
- AZURE_STORAGE_KEY: "{{sunbird_private_storage_account_key}}"
- async: 60
- poll: 10
-
-- name: list all the files
- shell: "ls -lR {{cert_location}}"
- register: allfiles
-
-- debug:
- var: allfiles
+- name: upload batch of files to aws s3
+ include_role:
+ name: aws-cloud-storage
+ tasks_from: upload-folder.yml
+ vars:
+ s3_bucket_name: "{{ cloud_storage_certservice_bucketname }}"
+ aws_access_key_id: "{{ cloud_private_storage_accountname }}"
+ aws_secret_access_key: "{{ cloud_private_storage_secret }}"
+ aws_default_region: "{{ cloud_public_storage_region }}"
+ local_file_or_folder_path: "{{ cert_location }}/cert-templates/certUtilScripts/out"
+ s3_path: ""
+ when: cloud_service_provider == "aws"
+
+- name: upload batch of files to gcloud storage
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: upload-batch.yml
+ vars:
+ gcp_storage_service_account_name: "{{ cloud_private_storage_accountname }}"
+ gcp_storage_key_file: "{{ cloud_private_storage_secret }}"
+ gcp_bucket_name: "{{ cloud_storage_certservice_bucketname }}"
+ gcp_path: ""
+ local_file_or_folder_path: "{{ cert_location }}/cert-templates/certUtilScripts/out"
+ when: cloud_service_provider == "gcloud"
-- name: Remove unwanted files
- file:
- path: "{{cert_location}}/cert-templates"
- state: absent
+- name: upload batch of files to oci oss
+ include_role:
+ name: oci-cloud-storage
+ apply:
+ environment:
+ OCI_CLI_AUTH: "instance_principal"
+ tasks_from: upload-folder.yml
+ vars:
+ oss_bucket_name: "{{ cert_service_container_name }}"
+ local_file_or_folder_path: "{{ cert_location }}/cert-templates/certUtilScripts/out"
+ when: cloud_service_provider == "oci"
\ No newline at end of file
diff --git a/ansible/roles/desktop-deploy/defaults/main.yml b/ansible/roles/desktop-deploy/defaults/main.yml
index d71509fd05..2cff6657c7 100644
--- a/ansible/roles/desktop-deploy/defaults/main.yml
+++ b/ansible/roles/desktop-deploy/defaults/main.yml
@@ -1,2 +1,3 @@
---
time: "YEAR-MONTH-DATE-HOUR-MINUTE-SECOND-INSTALLERTYPE"
+offline_installer_container_name: "{{env}}-offlineinstaller"
diff --git a/ansible/roles/desktop-deploy/tasks/main.yml b/ansible/roles/desktop-deploy/tasks/main.yml
index 0d301fbed0..6a01f97b0c 100644
--- a/ansible/roles/desktop-deploy/tasks/main.yml
+++ b/ansible/roles/desktop-deploy/tasks/main.yml
@@ -49,28 +49,82 @@
- name: run the installer script
shell: "bash -x {{offline_repo_location}}/build.sh"
-- name: Ensure azure blob storage container exists
- command: az storage container create --name {{offline_installer_container_name}} --public-access blob
- environment:
- AZURE_STORAGE_ACCOUNT: "{{sunbird_public_storage_account_name}}"
- AZURE_STORAGE_KEY: "{{sunbird_public_storage_account_key}}"
-
-- name: Upload to azure blob storage
- command: az storage blob upload-batch --destination {{offline_installer_container_name}} --source "desktop_uploader_assets"
- args:
- chdir: "{{offline_repo_location}}/"
- environment:
- AZURE_STORAGE_ACCOUNT: "{{sunbird_public_storage_account_name}}"
- AZURE_STORAGE_KEY: "{{sunbird_public_storage_account_key}}"
- async: 60
- poll: 10
-
-- name: Upload to latest.json file to blob
- command: az storage blob upload-batch --destination "{{offline_installer_container_name}}/latest" --source "{{offline_repo_location}}/desktop_uploader_assets/{{time}}/"
- args:
- chdir: "{{offline_repo_location}}/"
- environment:
- AZURE_STORAGE_ACCOUNT: "{{sunbird_public_storage_account_name}}"
- AZURE_STORAGE_KEY: "{{sunbird_public_storage_account_key}}"
- async: 60
- poll: 10
+- name: this block consists of tasks related to azure storage
+ block:
+ - name: set common azure variables
+ set_fact:
+ blob_container_name: "{{ cloud_storage_offlineinstaller_bucketname }}"
+ container_public_access: "blob"
+ storage_account_name: "{{ cloud_public_storage_accountname }}"
+ storage_account_key: "{{ cloud_public_storage_secret }}"
+
+ - name: upload batch of files to azure storage
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: blob-upload-batch.yml
+ vars:
+ blob_container_folder_path: ""
+ local_file_or_folder_path: "{{ offline_repo_location }}/desktop_uploader_assets"
+
+ - name: upload batch of files to azure storage
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: blob-upload-batch.yml
+ vars:
+ blob_container_folder_path: "/latest"
+ local_file_or_folder_path: "{{ offline_repo_location }}/desktop_uploader_assets/{{ time }}/"
+ when: cloud_service_provider == "azure"
+
+######################## AWS tasks ##################################
+
+- name: this block consists of tasks related to aws s3
+ block:
+ - name: set common aws variables
+ set_fact:
+ s3_bucket_name: "{{ cloud_storage_offlineinstaller_bucketname }}"
+ aws_access_key_id: "{{ cloud_public_storage_accountname }}"
+ aws_secret_access_key: "{{ cloud_public_storage_secret }}"
+ aws_default_region: "{{ cloud_public_storage_region }}"
+
+ - name: upload batch of files to aws s3
+ include_role:
+ name: aws-cloud-storage
+ tasks_from: upload-folder.yml
+ vars:
+ s3_path: "{{ offline_installer_storage }}"
+ local_file_or_folder_path: "{{ offline_repo_location }}/desktop_uploader_assets"
+
+ - name: upload batch of files to aws s3
+ include_role:
+ name: aws-cloud-storage
+ tasks_from: upload-folder.yml
+ vars:
+ s3_path: "{{ offline_installer_storage }}/latest"
+ local_file_or_folder_path: "{{ offline_repo_location }}/desktop_uploader_assets/{{ time }}/"
+ when: cloud_service_provider == "aws"
+
+### GCP Tasks ###
+- name: this block consists of tasks related to gcloud storage
+ block:
+ - name: set common gcloud variables
+ set_fact:
+ gcp_storage_service_account_name: "{{ cloud_public_storage_accountname }}"
+ gcp_storage_key_file: "{{ cloud_public_storage_secret }}"
+ gcp_bucket_name: "{{ cloud_storage_offlineinstaller_bucketname }}"
+
+ - name: upload batch of files to gcloud storage
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: upload-batch.yml
+ vars:
+ gcp_path: ""
+ local_file_or_folder_path: "{{ offline_repo_location }}/desktop_uploader_assets"
+
+ - name: upload batch of files to gcloud storage
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: upload-batch.yml
+ vars:
+ gcp_path: "latest"
+ local_file_or_folder_path: "{{ offline_repo_location }}/desktop_uploader_assets/{{ time }}/"
+ when: cloud_service_provider == "gcloud"
diff --git a/ansible/roles/desktop-deploy/templates/build.sh.j2 b/ansible/roles/desktop-deploy/templates/build.sh.j2
index 2f431915e8..1fd121f219 100644
--- a/ansible/roles/desktop-deploy/templates/build.sh.j2
+++ b/ansible/roles/desktop-deploy/templates/build.sh.j2
@@ -4,8 +4,9 @@ set -eo pipefail
cd {{offline_repo_location}}/
# Run the docker image and run the OS Specific build along with environment specific build
-docker run -d --env-file envfile --env ELECTRON_CACHE="/root/.cache/electron" --env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder" --name offline_deploy -w /project electronuserland/builder:wine sleep infinity
+docker run -d --env-file envfile --env ELECTRON_CACHE="/root/.cache/electron" --env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder" --name offline_deploy -w /project electronuserland/builder:16-wine sleep infinity
docker cp . offline_deploy:/project/
+docker exec offline_deploy npm install -g npm@9.4.1
docker exec offline_deploy bash -x /project/setupOfflineInstaller.sh
# Copy the built artifacts
diff --git a/ansible/roles/es-azure-snapshot/defaults/main.yml b/ansible/roles/es-azure-snapshot/defaults/main.yml
index 99787b0f89..df52870977 100644
--- a/ansible/roles/es-azure-snapshot/defaults/main.yml
+++ b/ansible/roles/es-azure-snapshot/defaults/main.yml
@@ -1,7 +1,7 @@
snapshot_create_request_body: {
type: azure,
settings: {
- container: "{{ es_azure_backup_folder_name }}",
+ container: "{{ cloud_storage_esbackup_foldername }}",
base_path: "{{ snapshot_base_path }}_{{ base_path_date }}"
}
}
@@ -10,4 +10,5 @@ snapshot_create_request_body: {
es_snapshot_host: "localhost"
snapshot_base_path: "default"
-es_azure_backup_folder_name: "elasticsearch-snapshots"
\ No newline at end of file
+cloud_storage_esbackup_bucketname: "{{ cloud_storage_management_bucketname }}"
+cloud_storage_esbackup_foldername: "elasticsearch-snapshots"
diff --git a/ansible/roles/es-azure-snapshot/tasks/main.yml b/ansible/roles/es-azure-snapshot/tasks/main.yml
index d2880013d5..23be535db9 100644
--- a/ansible/roles/es-azure-snapshot/tasks/main.yml
+++ b/ansible/roles/es-azure-snapshot/tasks/main.yml
@@ -4,11 +4,17 @@
- set_fact: snapshot_number="snapshot_{{ lookup('pipe','date +%s') }}"
-- name: Ensure backup folder exists in azure blob
- shell: "az storage container create --name {{ es_azure_backup_folder_name }}"
- environment:
- AZURE_STORAGE_ACCOUNT: "{{ azure_management_storage_account_name }}"
- AZURE_STORAGE_KEY: "{{ azure_management_storage_account_key }}"
+- name: create container in azure storage if it doesn't exist
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: container-create.yml
+ apply:
+ delegate_to: localhost
+ vars:
+ blob_container_name: "{{ es_backup_storage }}"
+ container_public_access: "off"
+ storage_account_name: "{{ cloud_management_storage_accountname }}"
+ storage_account_key: "{{ cloud_management_storage_secret }}"
- name: Create Azure Repository
uri:
diff --git a/ansible/roles/es-gcs-snapshot/defaults/main.yml b/ansible/roles/es-gcs-snapshot/defaults/main.yml
index 3c2efa9a7f..23fa7c5ef1 100644
--- a/ansible/roles/es-gcs-snapshot/defaults/main.yml
+++ b/ansible/roles/es-gcs-snapshot/defaults/main.yml
@@ -1,12 +1,15 @@
snapshot_create_request_body: {
type: gcs,
settings: {
- bucket: "{{ gcs_management_bucket_name }}",
- base_path: "{{ es_gcs_backup_folder_name }}/{{ snapshot_base_path }}_{{ base_path_date }}"
+ bucket: "{{ cloud_storage_management_bucketname }}",
+ base_path: "{{ cloud_storage_esbackup_foldername }}/{{ snapshot_base_path }}_{{ base_path_date }}"
}
}
# Override these values
es_snapshot_host: "localhost"
snapshot_base_path: "default"
-es_gcs_backup_folder_name: "elasticsearch-snapshots"
\ No newline at end of file
+es_backup_storage: "elasticsearch-snapshots"
+
+cloud_storage_esbackup_bucketname: "{{ cloud_storage_management_bucketname }}"
+cloud_storage_esbackup_foldername: "elasticsearch-snapshots"
diff --git a/ansible/roles/es-mapping/files/mappings/userv3-mapping.json b/ansible/roles/es-mapping/files/mappings/userv3-mapping.json
index 8b6fa174be..562119f204 100644
--- a/ansible/roles/es-mapping/files/mappings/userv3-mapping.json
+++ b/ansible/roles/es-mapping/files/mappings/userv3-mapping.json
@@ -1,5 +1,31 @@
{
- "dynamic": false,
+ "dynamic": "true",
+ "dynamic_templates": [
+ {
+ "framework_fields": {
+ "path_match": "framework.*",
+ "mapping": {
+ "fields": {
+ "raw": {
+ "type": "text",
+ "analyzer": "keylower"
+ }
+ },
+ "analyzer": "cs_search_analyzer",
+ "search_analyzer": "cs_search_analyzer"
+ }
+ }
+ },
+ {
+ "non_indexable_fields": {
+ "path_match": "*",
+ "path_unmatch": "framework.*",
+ "mapping": {
+ "index": false
+ }
+ }
+ }
+ ],
"properties": {
"managedBy": {
"type": "keyword",
diff --git a/ansible/roles/es-oci-snapshot/defaults/main.yml b/ansible/roles/es-oci-snapshot/defaults/main.yml
new file mode 100644
index 0000000000..a172208ded
--- /dev/null
+++ b/ansible/roles/es-oci-snapshot/defaults/main.yml
@@ -0,0 +1,19 @@
+snapshot_create_request_body: {
+ type: s3,
+ settings: {
+ bucket: "{{ cloud_storage_esbackup_bucketname }}",
+ path_style_access: "{{s3_path_style_access}}",
+ endpoint: "{{s3_storage_endpoint}}",
+ region: "{{s3_region}}",
+ base_path: "{{ cloud_storage_esbackup_foldername }}/{{ snapshot_base_path }}_{{ base_path_date }}",
+
+ }
+}
+
+# Override these values
+es_snapshot_host: "localhost"
+snapshot_base_path: "default"
+es_backup_storage: "elasticsearch-snapshots"
+
+cloud_storage_esbackup_bucketname: "{{ cloud_storage_management_bucketname }}"
+cloud_storage_esbackup_foldername: "elasticsearch-snapshots"
diff --git a/ansible/roles/es-oci-snapshot/tasks/main.yml b/ansible/roles/es-oci-snapshot/tasks/main.yml
new file mode 100644
index 0000000000..aee768626c
--- /dev/null
+++ b/ansible/roles/es-oci-snapshot/tasks/main.yml
@@ -0,0 +1,42 @@
+---
+
+- set_fact: base_path_date="{{ lookup('pipe','date +%Y-%m') }}"
+
+- set_fact: snapshot_number="snapshot_{{ lookup('pipe','date +%s') }}"
+
+- name: Create S3 Repository
+ uri:
+ url: "http://{{ es_snapshot_host }}:9200/_snapshot/{{ snapshot_base_path }}"
+ method: PUT
+ body: "{{ snapshot_create_request_body | to_json }}"
+ headers:
+ Content-Type: "application/json"
+
+- name: Take new snapshot
+ uri:
+ url: "http://{{ es_snapshot_host }}:9200/_snapshot/{{ snapshot_base_path }}/{{ snapshot_number }}"
+ method: PUT
+ headers:
+ Content-Type: "application/json"
+
+- name: Print all snapshots
+ uri:
+ url: "http://{{ es_snapshot_host }}:9200/_snapshot/{{ snapshot_base_path }}/_all"
+ method: GET
+
+- name: Print status of current snapshot
+ uri:
+ url: "http://{{ es_snapshot_host }}:9200/_snapshot/{{ snapshot_base_path }}/{{ snapshot_number }}"
+ method: GET
+
+- name: "Wait for backup to be completed"
+ uri:
+ url: "http://{{ es_snapshot_host }}:9200/_snapshot/{{ snapshot_base_path }}/{{ snapshot_number }}"
+ method: GET
+ return_content: yes
+ status_code: 200
+ body_format: json
+ register: result
+ until: result.json.snapshots[0].state == 'SUCCESS'
+ retries: 120
+ delay: 10
diff --git a/ansible/roles/es-s3-snapshot/defaults/main.yml b/ansible/roles/es-s3-snapshot/defaults/main.yml
index 2ca18929b4..3a55471ccf 100644
--- a/ansible/roles/es-s3-snapshot/defaults/main.yml
+++ b/ansible/roles/es-s3-snapshot/defaults/main.yml
@@ -1,12 +1,15 @@
snapshot_create_request_body: {
type: s3,
settings: {
- bucket: "{{ aws_management_bucket_name }}",
- base_path: "{{ es_s3_backup_folder_name }}/{{ snapshot_base_path }}_{{ base_path_date }}"
+ bucket: "{{ cloud_storage_esbackup_bucketname }}",
+ base_path: "{{ cloud_storage_esbackup_foldername }}/{{ snapshot_base_path }}_{{ base_path_date }}"
}
}
# Override these values
es_snapshot_host: "localhost"
snapshot_base_path: "default"
-es_s3_backup_folder_name: "elasticsearch-snapshots"
\ No newline at end of file
+es_backup_storage: "elasticsearch-snapshots"
+
+cloud_storage_esbackup_bucketname: "{{ cloud_storage_management_bucketname }}"
+cloud_storage_esbackup_foldername: "elasticsearch-snapshots"
diff --git a/ansible/roles/es6/tasks/main.yml b/ansible/roles/es6/tasks/main.yml
index 1de1eeff8e..39f915a018 100644
--- a/ansible/roles/es6/tasks/main.yml
+++ b/ansible/roles/es6/tasks/main.yml
@@ -46,7 +46,7 @@
- name: include plugins/repository-s3.yml
include: plugins/repository-s3.yml
- when: cloud_service_provider == "aws"
+ when: cloud_service_provider == "aws" or cloud_service_provider == "oci"
- name: include plugins/repository-gcs.yml
include: plugins/repository-gcs.yml
diff --git a/ansible/roles/es6/tasks/plugins/repository-azure.yml b/ansible/roles/es6/tasks/plugins/repository-azure.yml
index 170a84000e..dd7fcc3a20 100644
--- a/ansible/roles/es6/tasks/plugins/repository-azure.yml
+++ b/ansible/roles/es6/tasks/plugins/repository-azure.yml
@@ -1,7 +1,7 @@
---
- name: Add default azure account name for backups
become: yes
- shell: echo "{{ azure_management_storage_account_name }}" | {{ es_home }}/bin/elasticsearch-keystore add -f azure.client.default.account
+ shell: echo "{{ cloud_management_storage_accountname }}" | {{ es_home }}/bin/elasticsearch-keystore add -f azure.client.default.account
no_log: True
environment:
ES_PATH_CONF: "{{ conf_dir }}"
@@ -9,7 +9,7 @@
- name: Add default azure account key for backups
become: yes
- shell: echo "{{ azure_management_storage_account_key }}" | {{ es_home }}/bin/elasticsearch-keystore add -f azure.client.default.key
+ shell: echo "{{ cloud_management_storage_secret }}" | {{ es_home }}/bin/elasticsearch-keystore add -f azure.client.default.key
no_log: True
environment:
- ES_PATH_CONF: "{{ conf_dir }}"
\ No newline at end of file
+ ES_PATH_CONF: "{{ conf_dir }}"
diff --git a/ansible/roles/es6/tasks/plugins/repository-gcs.yml b/ansible/roles/es6/tasks/plugins/repository-gcs.yml
index 7d5c32e52e..6a32c0051a 100644
--- a/ansible/roles/es6/tasks/plugins/repository-gcs.yml
+++ b/ansible/roles/es6/tasks/plugins/repository-gcs.yml
@@ -3,7 +3,7 @@
become: yes
copy:
dest: "{{ conf_dir }}/gcs_management_bucket_service_account.json"
- content: "{{ gcs_management_bucket_service_account }}"
+ content: "{{ cloud_management_storage_secret }}"
- name: Add gcs service account file to keystore
become: yes
@@ -15,4 +15,4 @@
- name: Remove the service account file
file:
path: "{{ conf_dir }}/gcs_management_bucket_service_account.json"
- state: absent
\ No newline at end of file
+ state: absent
diff --git a/ansible/roles/es6/tasks/plugins/repository-s3.yml b/ansible/roles/es6/tasks/plugins/repository-s3.yml
index b5897792ab..07655d6746 100644
--- a/ansible/roles/es6/tasks/plugins/repository-s3.yml
+++ b/ansible/roles/es6/tasks/plugins/repository-s3.yml
@@ -1,14 +1,14 @@
---
- name: Add default aws account name for backups
become: yes
- shell: echo "{{ aws_management_bucket_user_access_key }}" | {{ es_home }}/bin/elasticsearch-keystore add -f s3.client.default.access_key
+ shell: echo "{{ cloud_management_storage_accountname }}" | {{ es_home }}/bin/elasticsearch-keystore add -f s3.client.default.access_key
no_log: True
environment:
ES_PATH_CONF: "{{ conf_dir }}"
- name: Add default aws account key for backups
become: yes
- shell: echo "{{ aws_management_bucket_user_secret_key }}" | {{ es_home }}/bin/elasticsearch-keystore add -f s3.client.default.secret_key
+ shell: echo "{{ cloud_management_storage_secret }}" | {{ es_home }}/bin/elasticsearch-keystore add -f s3.client.default.secret_key
no_log: True
environment:
ES_PATH_CONF: "{{ conf_dir }}"
diff --git a/ansible/roles/es6/templates/elasticsearch.yml.j2 b/ansible/roles/es6/templates/elasticsearch.yml.j2
index d6aaab45c9..880c27da2b 100644
--- a/ansible/roles/es6/templates/elasticsearch.yml.j2
+++ b/ansible/roles/es6/templates/elasticsearch.yml.j2
@@ -56,3 +56,4 @@ network.host: 0.0.0.0
{% if es_remote_reindex is defined %}
reindex.remote.whitelist: {{es_remote_host}}:9200
{% endif %}
+
diff --git a/ansible/roles/firebase_deploy/tasks/main.yml b/ansible/roles/firebase_deploy/tasks/main.yml
index 0403ff7dab..8ebd281250 100644
--- a/ansible/roles/firebase_deploy/tasks/main.yml
+++ b/ansible/roles/firebase_deploy/tasks/main.yml
@@ -9,7 +9,7 @@
src: "uploadToGdrive.sh"
dest: "./uploadToGdrive.sh"
- name: Uploading build to {{ env_name }} firebase
- shell: find ../ -maxdepth 1 -iregex ".*{{env_name}}.apk" -exec bash deployToFirebase.sh {} \;
+ shell: find ../ -maxdepth 1 -iregex ".*{{env_name}}.*.aab" -exec bash deployToFirebase.sh {} \;
when: env_name!='production'
- name: Uploading build to {{ env_name }} Gdrive
shell: find ../ -maxdepth 1 -iregex ".*[0-9].apk" -exec bash uploadToGdrive.sh -v -r {} \;
diff --git a/ansible/roles/functional-tests/defaults/main.yml b/ansible/roles/functional-tests/defaults/main.yml
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/ansible/roles/functional-tests/tasks/main.yml b/ansible/roles/functional-tests/tasks/main.yml
new file mode 100644
index 0000000000..112c621dfb
--- /dev/null
+++ b/ansible/roles/functional-tests/tasks/main.yml
@@ -0,0 +1,20 @@
+- name: Create directories
+ file:
+ path: functional-tests-files
+ state: directory
+ owner: jenkins
+ group: jenkins
+- name: Copy Test Script File
+ copy:
+ src: "{{ source_name }}/ft_question_questionset_{{ file_version }}.json"
+ dest: functional-tests-files/ft_question_questionset_{{ file_version }}.json
+- name: Template Env File
+ template:
+ src: "{{ source_name }}/env_question_questionset_{{ file_version }}.json"
+ dest: functional-tests-files/env_question_questionset_{{ file_version }}.json
+- name: Trigger Functional Test
+ environment:
+ NVM_DIR: "/var/lib/jenkins/.nvm"
+ shell:
+ cmd: . /var/lib/jenkins/.nvm/nvm.sh && nvm use 16.19.0 && newman run ft_question_questionset_{{ file_version }}.json -e env_question_questionset_{{ file_version }}.json --reporters cli,htmlextra,junit --reporter-htmlextra-export newman/report.html --reporter-junit-export newman/junit_report.xml;
+ chdir: functional-tests-files
diff --git a/ansible/roles/gcloud-cli/tasks/main.yml b/ansible/roles/gcloud-cli/tasks/main.yml
new file mode 100644
index 0000000000..4e39b7ceaf
--- /dev/null
+++ b/ansible/roles/gcloud-cli/tasks/main.yml
@@ -0,0 +1,19 @@
+---
+- name: Add gcloud signing key
+ apt_key:
+ url: https://packages.cloud.google.com/apt/doc/apt-key.gpg
+ state: present
+
+- name: Add gcloud repository into sources list
+ apt_repository:
+ repo: "deb https://packages.cloud.google.com/apt cloud-sdk main"
+ state: present
+
+- name: Install google cloud cli with specific version and dependent packages
+ apt:
+ pkg:
+ - ca-certificates
+ - curl
+ - apt-transport-https
+ - gnupg
+ - google-cloud-cli=406.0.0-0
diff --git a/ansible/roles/gcp-cloud-storage/defaults/main.yml b/ansible/roles/gcp-cloud-storage/defaults/main.yml
new file mode 100644
index 0000000000..a9f4247d42
--- /dev/null
+++ b/ansible/roles/gcp-cloud-storage/defaults/main.yml
@@ -0,0 +1,54 @@
+# GCP service account name
+# Example -
+# gcp_storage_service_account_name: test@sunbird.iam.gserviceaccount.com
+gcp_storage_service_account_name: ""
+
+# GCP bucket name
+# Example -
+# bucket_name: "sunbird-dev-public"
+gcp_bucket_name: ""
+
+# The service account key file
+# Example -
+# gcp_storage_key_file: "/tmp/gcp.json"
+gcp_storage_key_file: ""
+
+# Folder name in GCP bucket
+# Example -
+# gcp_path: "my-destination-folder"
+gcp_path: ""
+
+# The delete pattern to delete files and folder
+# Example -
+# file_delete_pattern: "my-drectory/*"
+# file_delete_pattern: "my-drectory/another-directory/*"
+# file_delete_pattern: "*"
+file_delete_pattern: ""
+
+# The path to local file which has to be uploaded to gcloud storage
+# The local path to store the file after downloading from gcloud storage
+# Example -
+# local_file_or_folder_path: "/workspace/my-folder/myfile.json"
+# local_file_or_folder_path: "/workspace/my-folder"
+local_file_or_folder_path: ""
+
+# The name of the file in gcloud storage after uploading from local path
+# The name of the file in gcloud storage that has to be downloaded
+# Example -
+# dest_file_name: "/myfile-blob.json"
+dest_file_name: ""
+
+
+# The folder path in gcloud storage to upload the files starting from the root of the bucket
+# This path should start with / if we provide a value for this variable since we are going to append this path as below
+# {{ bucket_name }}{{ gcp_path }}
+# The above translates to "my-bucket/my-folder-path"
+# Example -
+# dest_folder_path: "/my-folder/json-files-folder"
+# This variable can also be empty as shown below, which means we will upload directly at the root path of the bucket
+dest_folder_path: ""
+
+# The local folder path which has to be uploaded to gcloud storage
+# Example -
+# local_source_folder: "/workspace/my-folder/json-files-folder"
+local_source_folder: ""
diff --git a/ansible/roles/gcp-cloud-storage/tasks/delete-batch-no-poll.yml b/ansible/roles/gcp-cloud-storage/tasks/delete-batch-no-poll.yml
new file mode 100644
index 0000000000..ca02b8a064
--- /dev/null
+++ b/ansible/roles/gcp-cloud-storage/tasks/delete-batch-no-poll.yml
@@ -0,0 +1,6 @@
+---
+- name: Delete folder recursively in gcp storage
+ shell: gsutil rm -r "gs://{{ gcp_bucket_name }}/{{ file_delete_pattern }}"
+ async: 1800
+ poll: 0
+
diff --git a/ansible/roles/gcp-cloud-storage/tasks/delete-batch.yml b/ansible/roles/gcp-cloud-storage/tasks/delete-batch.yml
new file mode 100644
index 0000000000..17fe952b16
--- /dev/null
+++ b/ansible/roles/gcp-cloud-storage/tasks/delete-batch.yml
@@ -0,0 +1,11 @@
+---
+- name: Authenticate to gcloud
+ include_tasks: gcloud-auth.yml
+
+- name: Delete folder recursively in gcp storage
+ shell: gsutil rm -r "gs://{{ gcp_bucket_name }}/{{ file_delete_pattern }}"
+ async: 3600
+ poll: 10
+
+- name: Revoke gcloud access
+ include_tasks: gcloud-revoke.yml
diff --git a/ansible/roles/gcp-cloud-storage/tasks/download.yml b/ansible/roles/gcp-cloud-storage/tasks/download.yml
new file mode 100644
index 0000000000..73bf76bb04
--- /dev/null
+++ b/ansible/roles/gcp-cloud-storage/tasks/download.yml
@@ -0,0 +1,11 @@
+---
+- name: Authenticate to gcloud
+ include_tasks: gcloud-auth.yml
+
+- name: Download from gcloud storage
+ shell: gsutil cp "gs://{{ gcp_bucket_name }}/{{ gcp_path }}" "{{ local_file_or_folder_path }}"
+ async: 3600
+ poll: 10
+
+- name: Revoke gcloud access
+ include_tasks: gcloud-revoke.yml
diff --git a/ansible/roles/gcp-cloud-storage/tasks/gcloud-auth.yml b/ansible/roles/gcp-cloud-storage/tasks/gcloud-auth.yml
new file mode 100644
index 0000000000..a480bdc275
--- /dev/null
+++ b/ansible/roles/gcp-cloud-storage/tasks/gcloud-auth.yml
@@ -0,0 +1,14 @@
+---
+- name: create tmp gcp service key file
+ tempfile:
+ state: file
+ suffix: gcp
+ register: config_key
+
+- name: Copy service account key file
+ copy:
+ content: "{{ gcp_storage_key_file }}"
+ dest: "{{ config_key.path }}"
+
+- name: Configure gcloud service account
+ shell: gcloud auth activate-service-account "{{ gcp_storage_service_account_name }}" --key-file="{{ config_key.path }}"
diff --git a/ansible/roles/gcp-cloud-storage/tasks/gcloud-revoke.yml b/ansible/roles/gcp-cloud-storage/tasks/gcloud-revoke.yml
new file mode 100644
index 0000000000..8c26cd0ef0
--- /dev/null
+++ b/ansible/roles/gcp-cloud-storage/tasks/gcloud-revoke.yml
@@ -0,0 +1,8 @@
+- name: Revoke gcloud service account access
+ shell: gcloud auth revoke "{{ gcp_storage_service_account_name }}"
+
+- name: Remove key file
+ file:
+ path: "{{ config_key.path }}"
+ state: absent
+ when: config_key.path is defined
diff --git a/ansible/roles/gcp-cloud-storage/tasks/main.yml b/ansible/roles/gcp-cloud-storage/tasks/main.yml
new file mode 100644
index 0000000000..aa41c090ed
--- /dev/null
+++ b/ansible/roles/gcp-cloud-storage/tasks/main.yml
@@ -0,0 +1,20 @@
+---
+- name: upload file to gcloud storage
+ include: upload.yml
+ tags:
+ - file-upload
+
+- name: upload batch of files to gcloud storage
+ include: upload-batch.yml
+ tags:
+ - upload-batch
+
+- name: delete batch of files from gcloud storage
+ include: delete-batch.yml
+ tags:
+ - delete-batch
+
+- name: download a file from gcloud storage
+ include: download.yml
+ tags:
+ - file-download
\ No newline at end of file
diff --git a/ansible/roles/gcp-cloud-storage/tasks/upload-batch-no-poll.yml b/ansible/roles/gcp-cloud-storage/tasks/upload-batch-no-poll.yml
new file mode 100644
index 0000000000..40e9b8a66a
--- /dev/null
+++ b/ansible/roles/gcp-cloud-storage/tasks/upload-batch-no-poll.yml
@@ -0,0 +1,5 @@
+---
+- name: Upload files from a local directory gcp storage
+ shell: gsutil -m cp -r "{{ local_file_or_folder_path }}" "gs://{{ gcp_bucket_name }}/{{ gcp_path }}"
+ async: 1800
+ poll: 0
diff --git a/ansible/roles/gcp-cloud-storage/tasks/upload-batch.yml b/ansible/roles/gcp-cloud-storage/tasks/upload-batch.yml
new file mode 100644
index 0000000000..dc103969aa
--- /dev/null
+++ b/ansible/roles/gcp-cloud-storage/tasks/upload-batch.yml
@@ -0,0 +1,11 @@
+---
+- name: Authenticate to gcloud
+ include_tasks: gcloud-auth.yml
+
+- name: Upload files from a local directory gcp storage
+ shell: gsutil -m cp -r "{{ local_file_or_folder_path }}" "gs://{{ gcp_bucket_name }}/{{ gcp_path}}"
+ async: 3600
+ poll: 10
+
+- name: Revoke gcloud access
+ include_tasks: gcloud-revoke.yml
diff --git a/ansible/roles/gcp-cloud-storage/tasks/upload.yml b/ansible/roles/gcp-cloud-storage/tasks/upload.yml
new file mode 100644
index 0000000000..de766a94c7
--- /dev/null
+++ b/ansible/roles/gcp-cloud-storage/tasks/upload.yml
@@ -0,0 +1,11 @@
+---
+- name: Authenticate to gcloud
+ include_tasks: gcloud-auth.yml
+
+- name: Upload to gcloud storage
+ shell: gsutil cp "{{ local_file_or_folder_path }}" "gs://{{ gcp_bucket_name }}/{{ gcp_path }}"
+ async: 3600
+ poll: 10
+
+- name: Revoke gcloud access
+ include_tasks: gcloud-revoke.yml
diff --git a/ansible/roles/grafana-backup/defaults/main.yml b/ansible/roles/grafana-backup/defaults/main.yml
index b32dea6dde..70bd76ff82 100644
--- a/ansible/roles/grafana-backup/defaults/main.yml
+++ b/ansible/roles/grafana-backup/defaults/main.yml
@@ -4,4 +4,6 @@ grafana_data_dir: /var/dockerdata/grafana/grafana.db
# Override these values in group_vars
sunbird_management_storage_account_name:
sunbird_management_storage_account_key: ''
-grafana_backup_azure_container_name: grafana-backup
+
+cloud_storage_grafanabackup_bucketname: "{{ cloud_storage_management_bucketname }}"
+cloud_storage_grafanabackup_foldername: 'grafana-backup'
diff --git a/ansible/roles/grafana-backup/meta/main.yml b/ansible/roles/grafana-backup/meta/main.yml
deleted file mode 100644
index a124d4f7cb..0000000000
--- a/ansible/roles/grafana-backup/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - azure-cli
diff --git a/ansible/roles/grafana-backup/tasks/main.yml b/ansible/roles/grafana-backup/tasks/main.yml
index 62d4c4dfe2..a41b01c2aa 100644
--- a/ansible/roles/grafana-backup/tasks/main.yml
+++ b/ansible/roles/grafana-backup/tasks/main.yml
@@ -19,14 +19,43 @@
async: 3600
poll: 10
-- name: Ensure azure blob storage container exists
- command: az storage container create --name {{ grafana_backup_azure_container_name }}
- ignore_errors: true
-
-- name: Upload to azure blob storage
- command: az storage blob upload --name {{ grafana_backup_gzip_file_name }} --file {{ grafana_backup_gzip_file_path }} --container-name {{ grafana_backup_azure_container_name }}
- async: 5000
- poll: 10
+- name: upload file to azure storage
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: blob-upload.yml
+ vars:
+ blob_container_name: "{{ cloud_storage_grafanabackup_foldername }}"
+ container_public_access: "off"
+ blob_file_name: "{{ grafana_backup_gzip_file_name }}"
+ local_file_or_folder_path: "{{ grafana_backup_gzip_file_path }}"
+ storage_account_name: "{{ cloud_management_storage_accountname }}"
+ storage_account_key: "{{ cloud_management_storage_secret }}"
+ when: cloud_service_provider == "azure"
+
+- name: upload file to aws s3
+ include_role:
+ name: aws-cloud-storage
+ tasks_from: upload.yml
+ vars:
+ s3_bucket_name: "{{ cloud_storage_grafanabackup_bucketname }}"
+ aws_access_key_id: "{{ cloud_management_storage_accountname }}"
+ aws_secret_access_key: "{{ cloud_management_storage_secret }}"
+ aws_default_region: "{{ cloud_public_storage_region }}"
+ local_file_or_folder_path: "{{ grafana_backup_gzip_file_path }}"
+ s3_path: "{{ cloud_storage_grafanabackup_foldername }}/{{ grafana_backup_gzip_file_name }}"
+ when: cloud_service_provider == "aws"
+
+- name: upload file to gcloud storage
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: upload.yml
+ vars:
+ gcp_storage_service_account_name: "{{ cloud_management_storage_accountname }}"
+ gcp_storage_key_file: "{{ cloud_management_storage_secret }}"
+ gcp_bucket_name: "{{ cloud_storage_grafanabackup_bucketname }}"
+ gcp_path: "{{ cloud_storage_grafanabackup_foldername }}/{{ grafana_backup_gzip_file_name }}"
+ local_file_or_folder_path: "{{ grafana_backup_gzip_file_path }}"
+ when: cloud_service_provider == "gcloud"
- name: clean up backup dir after upload
file: path="{{ grafana_backup_dir }}" state=absent
diff --git a/ansible/roles/jenkins-backup-upload/defaults/main.yml b/ansible/roles/jenkins-backup-upload/defaults/main.yml
index 18ab7e816d..9fd90050bf 100644
--- a/ansible/roles/jenkins-backup-upload/defaults/main.yml
+++ b/ansible/roles/jenkins-backup-upload/defaults/main.yml
@@ -1,5 +1,7 @@
jenkins_user: jenkins
jenkins_group: jenkins
jenkins_backup_base_dir: /var/lib/jenkins/jenkins-backup
-jenkins_backup_azure_container_name: jenkins-backup
jenkins_backup_max_delay_in_days: 1
+
+cloud_storage_jenkinsbackup_bucketname: "{{cloud_storage_management_bucketname}}"
+cloud_storage_jenkinsbackup_foldername: 'jenkins-backup'
diff --git a/ansible/roles/jenkins-backup-upload/tasks/main.yml b/ansible/roles/jenkins-backup-upload/tasks/main.yml
index f5ec21c7bb..612557a61b 100644
--- a/ansible/roles/jenkins-backup-upload/tasks/main.yml
+++ b/ansible/roles/jenkins-backup-upload/tasks/main.yml
@@ -12,11 +12,41 @@
- name: Create archive of backup directory
archive: path="{{ jenkins_backup_base_dir }}/{{ LATEST_BACKUP_DIR.stdout }}" dest="/tmp/{{ LATEST_BACKUP_DIR.stdout }}.zip" format=zip
-- name: Ensure azure blob storage container exists
- command: az storage container create --name {{ jenkins_backup_azure_container_name }}
+- name: upload file to azure storage
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: blob-upload.yml
+ vars:
+ blob_container_name: "{{ cloud_storage_jenkinsbackup_foldername }}"
+ container_public_access: "off"
+ blob_file_name: "{{ LATEST_BACKUP_DIR.stdout }}.zip"
+ local_file_or_folder_path: "/tmp/{{ LATEST_BACKUP_DIR.stdout }}.zip"
+ storage_account_name: "{{ cloud_management_storage_accountname }}"
+ storage_account_key: "{{ cloud_management_storage_secret }}"
+ when: cloud_service_provider == "azure"
-- name: Upload to azure blob storage
- command: az storage blob upload -c {{ jenkins_backup_azure_container_name }} --name "{{ LATEST_BACKUP_DIR.stdout }}.zip" -f "/tmp/{{ LATEST_BACKUP_DIR.stdout }}.zip"
- async: 3600
- poll: 10
+- name: upload file to aws s3
+ include_role:
+ name: aws-cloud-storage
+ tasks_from: upload.yml
+ vars:
+ s3_bucket_name: "{{ cloud_storage_jenkinsbackup_bucketname }}"
+ aws_access_key_id: "{{ cloud_management_storage_accountname }}"
+ aws_secret_access_key: "{{ cloud_management_storage_secret }}"
+ aws_default_region: "{{ cloud_public_storage_region }}"
+ local_file_or_folder_path: "/tmp/{{ LATEST_BACKUP_DIR.stdout }}.zip"
+ s3_path: "{{ cloud_storage_jenkinsbackup_foldername }}/{{ LATEST_BACKUP_DIR.stdout }}.zip"
+ when: cloud_service_provider == "aws"
+
+- name: upload file to gcloud storage
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: upload.yml
+ vars:
+ gcp_storage_service_account_name: "{{ cloud_management_storage_accountname }}"
+ gcp_storage_key_file: "{{ cloud_management_storage_secret }}"
+ gcp_bucket_name: "{{ cloud_storage_jenkinsbackup_bucketname }}"
+ gcp_path: "{{ cloud_storage_jenkinsbackup_foldername }}/{{ LATEST_BACKUP_DIR.stdout }}.zip"
+ local_file_or_folder_path: "/tmp/{{ LATEST_BACKUP_DIR.stdout }}.zip"
+ when: cloud_service_provider == "gcloud"
diff --git a/ansible/roles/keycloak-provision/tasks/main.yml b/ansible/roles/keycloak-provision/tasks/main.yml
index bc8c3a581b..1020348520 100644
--- a/ansible/roles/keycloak-provision/tasks/main.yml
+++ b/ansible/roles/keycloak-provision/tasks/main.yml
@@ -27,3 +27,14 @@
with_items:
- zip
- unzip
+
+- name: Install pip2
+ apt:
+ name: python-pip
+ state: present
+ become: true
+
+- name: Install Certifi python package supported to python2
+ pip:
+ name: certifi==2018.1.18
+ become: true
diff --git a/ansible/roles/kong-api/defaults/main.yml b/ansible/roles/kong-api/defaults/main.yml
index 907e250460..5e3c39c940 100644
--- a/ansible/roles/kong-api/defaults/main.yml
+++ b/ansible/roles/kong-api/defaults/main.yml
@@ -123,10 +123,13 @@ uci_admin_prefix: /uci
notification_service_prefix: /notification
registry_service_prefix: /rc
assessment_prefix: /assessment
+programs_service_prefix: /programs
+resource_prefix: /resource
# Service URLs
knowledge_mw_service_url: "http://knowledge-mw-service:5000"
-learning_service_url: "http://learner-service:9000"
+userorg_service_url: "http://userorg-service:9000"
+dial_service_url: "http://dial-service:9000"
vm_learning_service_url: "http://{{learningservice_ip}}:8080/learning-service"
telemetry_service_url: "http://telemetry-service:9001"
player_service_url: "http://player:3000"
@@ -193,7 +196,7 @@ kong_apis:
- name: acceptTermsAndCondition
uris: "{{ user_service_prefix }}/v1/tnc/accept"
- upstream_url: "{{ learning_service_url }}/v1/user/tnc/accept"
+ upstream_url: "{{ userorg_service_url }}/v1/user/tnc/accept"
strip_uri: true
plugins:
- name: jwt
@@ -214,7 +217,7 @@ kong_apis:
- name: addBadgeToUser
uris: "{{ user_service_prefix }}/v1/badges/add"
- upstream_url: "{{ learning_service_url }}/v1/user/badges/add"
+ upstream_url: "{{ userorg_service_url }}/v1/user/badges/add"
strip_uri: true
plugins:
- name: jwt
@@ -235,7 +238,7 @@ kong_apis:
- name: addSystemSettings
uris: "{{ data_service_prefix }}/v1/system/settings/set"
- upstream_url: "{{ learning_service_url }}/v1/system/settings/set"
+ upstream_url: "{{ userorg_service_url }}/v1/system/settings/set"
strip_uri: true
plugins:
- name: jwt
@@ -271,30 +274,9 @@ kong_apis:
config.required: false
config.enabled: false
-- name: assignRole
- uris: "{{ user_service_prefix }}/v1/role/assign"
- upstream_url: "{{ learning_service_url }}/v1/user/assign/role"
- strip_uri: true
- plugins:
- - name: jwt
- - name: cors
- - "{{ statsd_pulgin }}"
- - name: acl
- config.whitelist:
- - userAdmin
- - name: rate-limiting
- config.policy: local
- config.hour: "{{ medium_rate_limit_per_hour }}"
- config.limit_by: credential
- - name: request-size-limiting
- config.allowed_payload_size: "{{ small_request_size_limit }}"
- - name: opa-checks
- config.required: true
- config.enabled: true
-
- name: assignRoleV2
uris: "{{ user_service_prefix }}/v2/role/assign"
- upstream_url: "{{ learning_service_url }}/v2/user/assign/role"
+ upstream_url: "{{ userorg_service_url }}/v2/user/assign/role"
strip_uri: true
plugins:
- name: jwt
@@ -357,7 +339,7 @@ kong_apis:
- name: blockUser
uris: "{{ user_service_prefix }}/v1/block"
- upstream_url: "{{ learning_service_url }}/v1/user/block"
+ upstream_url: "{{ userorg_service_url }}/v1/user/block"
strip_uri: true
plugins:
- name: jwt
@@ -378,7 +360,7 @@ kong_apis:
- name: checkUploadJobStatus
uris: "{{ data_service_prefix }}/v1/upload/status"
- upstream_url: "{{ learning_service_url }}/v1/upload/status"
+ upstream_url: "{{ userorg_service_url }}/v1/upload/status"
strip_uri: true
plugins:
- name: jwt
@@ -651,6 +633,48 @@ kong_apis:
config.required: true
config.enabled: true
+- name: exhaustSubmitProxyAPI
+ uris: "{{ course_service_prefix }}/v1/jobrequest/submit"
+ upstream_url: "{{ lms_service_url }}/v1/jobrequest/submit"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - courseAccess
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ small_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
+- name: exhaustListProxyAPI
+ uris: "{{ course_service_prefix }}/v1/jobrequest/list"
+ upstream_url: "{{ lms_service_url }}/v1/jobrequest/list"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - courseAccess
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ small_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
- name: createCertTemplate
uris: "{{ cert_service_prefix }}/v1/template/create"
upstream_url: "{{ cert_service_url }}/cert/v1/template/create"
@@ -842,7 +866,7 @@ kong_apis:
- name: createNote
uris: "{{ notes_service_prefix }}/v1/create"
- upstream_url: "{{ learning_service_url }}/v1/note/create"
+ upstream_url: "{{ userorg_service_url }}/v1/note/create"
strip_uri: true
plugins:
- name: jwt
@@ -863,7 +887,7 @@ kong_apis:
- name: createOrg
uris: "{{ org_service_prefix }}/v1/create"
- upstream_url: "{{ learning_service_url }}/v1/org/create"
+ upstream_url: "{{ userorg_service_url }}/v1/org/create"
strip_uri: true
plugins:
- name: jwt
@@ -966,114 +990,9 @@ kong_apis:
config.required: false
config.enabled: false
-- name: createUser
- uris: "{{ user_service_prefix }}/v1/create"
- upstream_url: "{{ learning_service_url }}/v1/user/create"
- strip_uri: true
- plugins:
- - name: jwt
- - name: cors
- - "{{ statsd_pulgin }}"
- - name: acl
- config.whitelist:
- - userCreate
- - name: rate-limiting
- config.policy: local
- config.hour: "{{ medium_rate_limit_per_hour }}"
- config.limit_by: credential
- - name: request-size-limiting
- config.allowed_payload_size: "{{ small_request_size_limit }}"
- - name: opa-checks
- config.required: false
- config.enabled: false
-
-- name: createUserLearnerV3
- uris: "{{ user_service_prefix }}/v1/signup"
- upstream_url: "{{ learning_service_url }}/v1/user/signup"
- strip_uri: true
- plugins:
- - name: jwt
- - name: cors
- - "{{ statsd_pulgin }}"
- - name: acl
- config.whitelist:
- - userCreate
- - name: rate-limiting
- config.policy: local
- config.hour: "{{ medium_rate_limit_per_hour }}"
- config.limit_by: credential
- - name: request-size-limiting
- config.allowed_payload_size: "{{ small_request_size_limit }}"
- - name: opa-checks
- config.required: false
- config.enabled: false
-
-- name: createUserVersion2
- uris: "{{ user_service_prefix }}/v2/create"
- upstream_url: "{{ learning_service_url }}/v2/user/create"
- strip_uri: true
- plugins:
- - name: jwt
- - name: cors
- - "{{ statsd_pulgin }}"
- - name: acl
- config.whitelist:
- - userCreate
- - name: rate-limiting
- config.policy: local
- config.hour: "{{ medium_rate_limit_per_hour }}"
- config.limit_by: credential
- - name: request-size-limiting
- config.allowed_payload_size: "{{ small_request_size_limit }}"
- - name: opa-checks
- config.required: false
- config.enabled: false
-
-- name: createUserVersion3
- uris: "{{ user_service_prefix }}/v3/create"
- upstream_url: "{{ learning_service_url }}/v3/user/create"
- strip_uri: true
- plugins:
- - name: jwt
- - name: cors
- - "{{ statsd_pulgin }}"
- - name: acl
- config.whitelist:
- - userCreate
- - name: rate-limiting
- config.policy: local
- config.hour: "{{ medium_rate_limit_per_hour }}"
- config.limit_by: credential
- - name: request-size-limiting
- config.allowed_payload_size: "{{ small_request_size_limit }}"
- - name: opa-checks
- config.required: false
- config.enabled: false
-
-- name: createUserVersion4
- uris: "{{ user_service_prefix }}/v4/create"
- upstream_url: "{{ learning_service_url }}/v4/user/create"
- strip_uri: true
- plugins:
- - name: jwt
- - name: cors
- - "{{ statsd_pulgin }}"
- - name: acl
- config.whitelist:
- - userAccess
- - name: rate-limiting
- config.policy: local
- config.hour: "{{ medium_rate_limit_per_hour }}"
- config.limit_by: credential
- - name: request-size-limiting
- config.allowed_payload_size: "{{ small_request_size_limit }}"
- - name: opa-checks
- config.required: false
- config.enabled: false
-
- name: deleteNote
uris: "{{ notes_service_prefix }}/v1/delete"
- upstream_url: "{{ learning_service_url }}/v1/note/delete"
+ upstream_url: "{{ userorg_service_url }}/v1/note/delete"
strip_uri: true
plugins:
- name: jwt
@@ -1361,30 +1280,9 @@ kong_apis:
config.required: false
config.enabled: false
-- name: generateOtp
- uris: "{{ otp_service_prefix }}/v1/generate"
- upstream_url: "{{ learning_service_url }}/v1/otp/generate"
- strip_uri: true
- plugins:
- - name: jwt
- - name: cors
- - "{{ statsd_pulgin }}"
- - name: acl
- config.whitelist:
- - anonymousUserAccess
- - name: rate-limiting
- config.policy: local
- config.hour: "{{ medium_rate_limit_per_hour }}"
- config.limit_by: credential
- - name: request-size-limiting
- config.allowed_payload_size: "{{ small_request_size_limit }}"
- - name: opa-checks
- config.required: false
- config.enabled: false
-
- name: generateOtpV2
uris: "{{ otp_service_prefix }}/v2/generate"
- upstream_url: "{{ learning_service_url }}/v2/otp/generate"
+ upstream_url: "{{ userorg_service_url }}/v2/otp/generate"
strip_uri: true
plugins:
- name: jwt
@@ -1527,7 +1425,7 @@ kong_apis:
- name: getSystemSettings
uris: "{{ data_service_prefix }}/v1/system/settings/get"
- upstream_url: "{{ learning_service_url }}/v1/system/settings/get"
+ upstream_url: "{{ userorg_service_url }}/v1/system/settings/get"
strip_uri: true
plugins:
- name: jwt
@@ -1567,30 +1465,9 @@ kong_apis:
config.required: false
config.enabled: false
-- name: getUserByKey
- uris: "{{ user_service_prefix }}/v1/get"
- upstream_url: "{{ learning_service_url }}/v1/user/get"
- strip_uri: true
- plugins:
- - name: jwt
- - name: cors
- - "{{ statsd_pulgin }}"
- - name: acl
- config.whitelist:
- - anonymousUserAccess
- - name: rate-limiting
- config.policy: local
- config.hour: "{{ medium_rate_limit_per_hour }}"
- config.limit_by: credential
- - name: request-size-limiting
- config.allowed_payload_size: "{{ small_request_size_limit }}"
- - name: opa-checks
- config.required: false
- config.enabled: false
-
- name: getUserByKeyV2
uris: "{{ user_service_prefix }}/v2/get"
- upstream_url: "{{ learning_service_url }}/v2/user/get"
+ upstream_url: "{{ userorg_service_url }}/v2/user/get"
strip_uri: true
plugins:
- name: jwt
@@ -1609,51 +1486,9 @@ kong_apis:
config.required: false
config.enabled: false
-- name: getUserProfile
- uris: "{{ user_service_prefix }}/v1/read"
- upstream_url: "{{ learning_service_url }}/v1/user/read"
- strip_uri: true
- plugins:
- - name: jwt
- - name: cors
- - "{{ statsd_pulgin }}"
- - name: acl
- config.whitelist:
- - userAccess
- - name: rate-limiting
- config.policy: local
- config.hour: "{{ medium_rate_limit_per_hour }}"
- config.limit_by: credential
- - name: request-size-limiting
- config.allowed_payload_size: "{{ small_request_size_limit }}"
- - name: opa-checks
- config.required: true
- config.enabled: true
-
-- name: getUserProfileV2
- uris: "{{ user_service_prefix }}/v2/read"
- upstream_url: "{{ learning_service_url }}/v2/user/read"
- strip_uri: true
- plugins:
- - name: jwt
- - name: cors
- - "{{ statsd_pulgin }}"
- - name: acl
- config.whitelist:
- - userAccess
- - name: rate-limiting
- config.policy: local
- config.hour: "{{ medium_rate_limit_per_hour }}"
- config.limit_by: credential
- - name: request-size-limiting
- config.allowed_payload_size: "{{ small_request_size_limit }}"
- - name: opa-checks
- config.required: true
- config.enabled: true
-
- name: indexSync
uris: "{{ data_service_prefix }}/v1/index/sync"
- upstream_url: "{{ learning_service_url }}/v1/data/sync"
+ upstream_url: "{{ userorg_service_url }}/v1/data/sync"
strip_uri: true
plugins:
- name: jwt
@@ -1759,7 +1594,7 @@ kong_apis:
- name: listAllBadges
uris: "{{ org_service_prefix }}/v1/badges/list"
- upstream_url: "{{ learning_service_url }}/v1/badges/list"
+ upstream_url: "{{ userorg_service_url }}/v1/badges/list"
strip_uri: true
plugins:
- name: jwt
@@ -2032,7 +1867,7 @@ kong_apis:
- name: listSystemSettings
uris: "{{ data_service_prefix }}/v1/system/settings/list"
- upstream_url: "{{ learning_service_url }}/v1/system/settings/list"
+ upstream_url: "{{ userorg_service_url }}/v1/system/settings/list"
strip_uri: true
plugins:
- name: jwt
@@ -2074,7 +1909,7 @@ kong_apis:
- name: masterLocationCreate
uris: "{{ data_service_prefix }}/v1/location/create"
- upstream_url: "{{ learning_service_url }}/v1/location/create"
+ upstream_url: "{{ userorg_service_url }}/v1/location/create"
strip_uri: true
plugins:
- name: jwt
@@ -2095,7 +1930,7 @@ kong_apis:
- name: masterLocationDelete
uris: "{{ data_service_prefix }}/v1/location/delete"
- upstream_url: "{{ learning_service_url }}/v1/location/delete"
+ upstream_url: "{{ userorg_service_url }}/v1/location/delete"
strip_uri: true
plugins:
- name: jwt
@@ -2116,7 +1951,7 @@ kong_apis:
- name: masterLocationSearch
uris: "{{ data_service_prefix }}/v1/location/search"
- upstream_url: "{{ learning_service_url }}/v1/location/search"
+ upstream_url: "{{ userorg_service_url }}/v1/location/search"
strip_uri: true
plugins:
- name: jwt
@@ -2137,7 +1972,7 @@ kong_apis:
- name: masterLocationUpdate
uris: "{{ data_service_prefix }}/v1/location/update"
- upstream_url: "{{ learning_service_url }}/v1/location/update"
+ upstream_url: "{{ userorg_service_url }}/v1/location/update"
strip_uri: true
plugins:
- name: jwt
@@ -2158,7 +1993,7 @@ kong_apis:
- name: masterLocationUpload
uris: "{{ data_service_prefix }}/v1/bulk/location/upload"
- upstream_url: "{{ learning_service_url }}/v1/bulk/location/upload"
+ upstream_url: "{{ userorg_service_url }}/v1/bulk/location/upload"
strip_uri: true
plugins:
- name: jwt
@@ -2179,7 +2014,7 @@ kong_apis:
- name: mergeUserAccounts
uris: "{{ user_service_prefix }}/v1/account/merge"
- upstream_url: "{{ learning_service_url }}/private/user/v1/account/merge"
+ upstream_url: "{{ userorg_service_url }}/private/user/v1/account/merge"
strip_uri: true
plugins:
- name: jwt
@@ -2200,7 +2035,7 @@ kong_apis:
- name: orgAssignKeys
uris: "{{ org_service_prefix }}/v1/assign/key"
- upstream_url: "{{ learning_service_url }}/v1/org/assign/key"
+ upstream_url: "{{ userorg_service_url }}/v1/org/assign/key"
strip_uri: true
plugins:
- name: jwt
@@ -2219,9 +2054,30 @@ kong_apis:
config.required: false
config.enabled: false
+- name: orgAddEncryptionKey
+ uris: "{{ org_service_prefix }}/v1/update/encryptionkey"
+ upstream_url: "{{ userorg_service_url }}/v1/org/update/encryptionkey"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - orgSuperAdmin
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ small_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
- name: orgBulkUpload
uris: "{{ org_service_prefix }}/v1/upload"
- upstream_url: "{{ learning_service_url }}/v1/org/upload"
+ upstream_url: "{{ userorg_service_url }}/v1/org/upload"
strip_uri: true
plugins:
- name: jwt
@@ -2450,30 +2306,9 @@ kong_apis:
config.required: false
config.enabled: false
-- name: privateUserAssignRole
- uris: "{{ user_service_prefix }}/private/v1/assign/role"
- upstream_url: "{{ learning_service_url }}/private/user/v1/assign/role"
- strip_uri: true
- plugins:
- - name: jwt
- - name: cors
- - "{{ statsd_pulgin }}"
- - name: acl
- config.whitelist:
- - userSuperAdmin
- - name: rate-limiting
- config.policy: local
- config.hour: "{{ medium_rate_limit_per_hour }}"
- config.limit_by: credential
- - name: request-size-limiting
- config.allowed_payload_size: "{{ small_request_size_limit }}"
- - name: opa-checks
- config.required: false
- config.enabled: false
-
- name: privateUserRead
uris: "{{ user_service_prefix }}/private/v1/read"
- upstream_url: "{{ learning_service_url }}/private/user/v1/read"
+ upstream_url: "{{ userorg_service_url }}/private/user/v1/read"
strip_uri: true
plugins:
- name: jwt
@@ -2494,7 +2329,7 @@ kong_apis:
- name: publishContent
uris: "{{ content_prefix }}/v1/publish"
- upstream_url: "{{ knowledge_mw_service_url }}/v1/content/publish"
+ upstream_url: "{{ content_service_url }}/content/v3/publish"
strip_uri: true
plugins:
- name: jwt
@@ -2599,7 +2434,7 @@ kong_apis:
- name: qrCodeBatchProcessStatus
uris: "{{ dialcode_service_prefix }}/v1/process/status"
- upstream_url: "{{ knowledge_mw_service_url }}/v1/dialcode/process/status"
+ upstream_url: "{{ content_service_url }}/content/v3/process/status"
strip_uri: true
plugins:
- name: jwt
@@ -2915,7 +2750,7 @@ kong_apis:
- name: readNote
uris: "{{ notes_service_prefix }}/v1/read"
- upstream_url: "{{ learning_service_url }}/v1/note/read"
+ upstream_url: "{{ userorg_service_url }}/v1/note/read"
strip_uri: true
plugins:
- name: jwt
@@ -2936,7 +2771,7 @@ kong_apis:
- name: readOrg
uris: "{{ org_service_prefix }}/v1/read"
- upstream_url: "{{ learning_service_url }}/v1/org/read"
+ upstream_url: "{{ userorg_service_url }}/v1/org/read"
strip_uri: true
plugins:
- name: jwt
@@ -2999,7 +2834,7 @@ kong_apis:
- name: readRoleMapping
uris: "{{ data_service_prefix }}/v1/role/read"
- upstream_url: "{{ learning_service_url }}/v1/role/read"
+ upstream_url: "{{ userorg_service_url }}/v1/role/read"
strip_uri: true
plugins:
- name: jwt
@@ -3020,7 +2855,7 @@ kong_apis:
- name: readUserSpecificRole
uris: "{{ user_service_prefix }}/v1/role/read"
- upstream_url: "{{ learning_service_url }}/v1/user/role/read"
+ upstream_url: "{{ userorg_service_url }}/v1/user/role/read"
strip_uri: true
plugins:
- name: jwt
@@ -3041,7 +2876,7 @@ kong_apis:
- name: readUserProfile
uris: "{{ user_service_prefix }}/v1/profile/read"
- upstream_url: "{{ learning_service_url }}/v1/user/getuser"
+ upstream_url: "{{ userorg_service_url }}/v1/user/getuser"
strip_uri: true
plugins:
- name: jwt
@@ -3419,7 +3254,7 @@ kong_apis:
- name: reserveDialcode
uris: "{{ dialcode_service_prefix }}/v1/reserve"
- upstream_url: "{{ knowledge_mw_service_url }}/v1/dialcode/reserve"
+ upstream_url: "{{ content_service_url }}/content/v3/dialcode/reserve"
strip_uri: true
plugins:
- name: jwt
@@ -3625,7 +3460,7 @@ kong_apis:
- name: searchNotes
uris: "{{ notes_service_prefix }}/v1/search"
- upstream_url: "{{ learning_service_url }}/v1/note/search"
+ upstream_url: "{{ userorg_service_url }}/v1/note/search"
strip_uri: true
plugins:
- name: jwt
@@ -3644,72 +3479,17 @@ kong_apis:
config.required: false
config.enabled: false
-- name: searchOrgExtended
- uris: "{{ org_service_prefix }}/v1/ext/search"
- upstream_url: "{{ learning_service_url }}/v1/org/search"
+- name: sendEmailNotification
+ uris: "{{ user_service_prefix }}/v1/notification/email"
+ upstream_url: "{{ userorg_service_url }}/v1/notification/email"
strip_uri: true
plugins:
+ - name: jwt
- name: cors
- "{{ statsd_pulgin }}"
- - name: rate-limiting
- config.policy: local
- config.hour: "{{ medium_rate_limit_per_hour }}"
- config.limit_by: ip
- - name: request-size-limiting
- config.allowed_payload_size: "{{ small_request_size_limit }}"
- - name: opa-checks
- config.required: false
- config.enabled: false
-
-- name: searchOrg
- uris: "{{ org_service_prefix }}/v1/search"
- upstream_url: "{{ learning_service_url }}/v1/org/search"
- strip_uri: true
- plugins:
- - name: cors
- - "{{ statsd_pulgin }}"
- - name: rate-limiting
- config.policy: local
- config.hour: "{{ medium_rate_limit_per_hour }}"
- config.limit_by: ip
- - name: request-size-limiting
- config.allowed_payload_size: "{{ small_request_size_limit }}"
- - name: opa-checks
- config.required: false
- config.enabled: false
-
-- name: searchUser
- uris: "{{ user_service_prefix }}/v1/search"
- upstream_url: "{{ learning_service_url }}/v1/user/search"
- strip_uri: true
- plugins:
- - name: jwt
- - name: cors
- - "{{ statsd_pulgin }}"
- - name: acl
- config.whitelist:
- - userTempAdmin
- - name: rate-limiting
- config.policy: local
- config.hour: "{{ medium_rate_limit_per_hour }}"
- config.limit_by: credential
- - name: request-size-limiting
- config.allowed_payload_size: "{{ small_request_size_limit }}"
- - name: opa-checks
- config.required: false
- config.enabled: false
-
-- name: sendEmailNotification
- uris: "{{ user_service_prefix }}/v1/notification/email"
- upstream_url: "{{ learning_service_url }}/v1/notification/email"
- strip_uri: true
- plugins:
- - name: jwt
- - name: cors
- - "{{ statsd_pulgin }}"
- - name: acl
- config.whitelist:
- - appUpdate
+ - name: acl
+ config.whitelist:
+ - appUpdate
- name: rate-limiting
config.policy: local
config.hour: "{{ medium_rate_limit_per_hour }}"
@@ -3806,7 +3586,7 @@ kong_apis:
- name: unblockUser
uris: "{{ user_service_prefix }}/v1/unblock"
- upstream_url: "{{ learning_service_url }}/v1/user/unblock"
+ upstream_url: "{{ userorg_service_url }}/v1/user/unblock"
strip_uri: true
plugins:
- name: jwt
@@ -4184,7 +3964,7 @@ kong_apis:
- name: updateNote
uris: "{{ notes_service_prefix }}/v1/update"
- upstream_url: "{{ learning_service_url }}/v1/note/update"
+ upstream_url: "{{ userorg_service_url }}/v1/note/update"
strip_uri: true
plugins:
- name: jwt
@@ -4205,7 +3985,7 @@ kong_apis:
- name: updateOrg
uris: "{{ org_service_prefix }}/v1/update"
- upstream_url: "{{ learning_service_url }}/v1/org/update"
+ upstream_url: "{{ userorg_service_url }}/v1/org/update"
strip_uri: true
plugins:
- name: jwt
@@ -4226,7 +4006,7 @@ kong_apis:
- name: updateOrgStatus
uris: "{{ org_service_prefix }}/v1/status/update"
- upstream_url: "{{ learning_service_url }}/v1/org/status/update"
+ upstream_url: "{{ userorg_service_url }}/v1/org/status/update"
strip_uri: true
plugins:
- name: jwt
@@ -4308,27 +4088,6 @@ kong_apis:
config.required: false
config.enabled: false
-- name: updateUser
- uris: "{{ user_service_prefix }}/v1/update"
- upstream_url: "{{ learning_service_url }}/v1/user/update"
- strip_uri: true
- plugins:
- - name: jwt
- - name: cors
- - "{{ statsd_pulgin }}"
- - name: acl
- config.whitelist:
- - userUpdate
- - name: rate-limiting
- config.policy: local
- config.hour: "{{ medium_rate_limit_per_hour }}"
- config.limit_by: credential
- - name: request-size-limiting
- config.allowed_payload_size: "{{ medium_request_size_limit }}"
- - name: opa-checks
- config.required: true
- config.enabled: true
-
- name: uploadContent
uris: "{{ content_prefix }}/v1/upload"
upstream_url: "{{ knowledge_mw_service_url }}/v1/content/upload"
@@ -4394,7 +4153,7 @@ kong_apis:
- name: userBulkUpload
uris: "{{ user_service_prefix }}/v1/upload"
- upstream_url: "{{ learning_service_url }}/v1/user/upload"
+ upstream_url: "{{ userorg_service_url }}/v1/user/upload"
strip_uri: true
plugins:
- name: jwt
@@ -4413,114 +4172,9 @@ kong_apis:
config.required: false
config.enabled: false
-- name: userExistenceApi
- uris: "{{ user_service_prefix }}/v1/exists"
- upstream_url: "{{ learning_service_url }}/v1/user/exists"
- strip_uri: true
- plugins:
- - name: jwt
- - name: cors
- - "{{ statsd_pulgin }}"
- - name: acl
- config.whitelist:
- - anonymousUserAccess
- - name: rate-limiting
- config.policy: local
- config.hour: "{{ medium_rate_limit_per_hour }}"
- config.limit_by: credential
- - name: request-size-limiting
- config.allowed_payload_size: "{{ small_request_size_limit }}"
- - name: opa-checks
- config.required: false
- config.enabled: false
-
- name: userExistenceApiV2
uris: "{{ user_service_prefix }}/v2/exists"
- upstream_url: "{{ learning_service_url }}/v2/user/exists"
- strip_uri: true
- plugins:
- - name: jwt
- - name: cors
- - "{{ statsd_pulgin }}"
- - name: acl
- config.whitelist:
- - userAccess
- - name: rate-limiting
- config.policy: local
- config.hour: "{{ medium_rate_limit_per_hour }}"
- config.limit_by: credential
- - name: request-size-limiting
- config.allowed_payload_size: "{{ small_request_size_limit }}"
- - name: opa-checks
- config.required: false
- config.enabled: false
-
-- name: userFeed
- uris: "{{ user_service_prefix }}/v1/feed"
- upstream_url: "{{ learning_service_url }}/v1/user/feed"
- strip_uri: true
- plugins:
- - name: jwt
- - name: cors
- - "{{ statsd_pulgin }}"
- - name: acl
- config.whitelist:
- - userAccess
- - name: rate-limiting
- config.policy: local
- config.hour: "{{ medium_rate_limit_per_hour }}"
- config.limit_by: credential
- - name: request-size-limiting
- config.allowed_payload_size: "{{ small_request_size_limit }}"
- - name: opa-checks
- config.required: true
- config.enabled: true
-
-- name: userFeedCreate
- uris: "{{ user_service_prefix }}/feed/v1/create"
- upstream_url: "{{ learning_service_url }}/v1/user/feed/create"
- strip_uri: true
- plugins:
- - name: jwt
- - name: cors
- - "{{ statsd_pulgin }}"
- - name: acl
- config.whitelist:
- - userAccess
- - name: rate-limiting
- config.policy: local
- config.hour: "{{ medium_rate_limit_per_hour }}"
- config.limit_by: credential
- - name: request-size-limiting
- config.allowed_payload_size: "{{ small_request_size_limit }}"
- - name: opa-checks
- config.required: false
- config.enabled: false
-
-- name: userFeedDelete
- uris: "{{ user_service_prefix }}/feed/v1/delete"
- upstream_url: "{{ learning_service_url }}/v1/user/feed/delete"
- strip_uri: true
- plugins:
- - name: jwt
- - name: cors
- - "{{ statsd_pulgin }}"
- - name: acl
- config.whitelist:
- - userAccess
- - name: rate-limiting
- config.policy: local
- config.hour: "{{ medium_rate_limit_per_hour }}"
- config.limit_by: credential
- - name: request-size-limiting
- config.allowed_payload_size: "{{ small_request_size_limit }}"
- - name: opa-checks
- config.required: false
- config.enabled: false
-
-- name: userFeedUpdate
- uris: "{{ user_service_prefix }}/feed/v1/update"
- upstream_url: "{{ learning_service_url }}/v1/user/feed/update"
+ upstream_url: "{{ userorg_service_url }}/v2/user/exists"
strip_uri: true
plugins:
- name: jwt
@@ -4541,7 +4195,7 @@ kong_apis:
- name: userMigrate
uris: "{{ user_service_prefix }}/v1/migrate"
- upstream_url: "{{ learning_service_url }}/v1/user/migrate"
+ upstream_url: "{{ userorg_service_url }}/v1/user/migrate"
strip_uri: true
plugins:
- name: jwt
@@ -4581,30 +4235,9 @@ kong_apis:
config.required: false
config.enabled: false
-- name: verifyOtp
- uris: "{{ otp_service_prefix }}/v1/verify"
- upstream_url: "{{ learning_service_url }}/v1/otp/verify"
- strip_uri: true
- plugins:
- - name: jwt
- - name: cors
- - "{{ statsd_pulgin }}"
- - name: acl
- config.whitelist:
- - anonymousUserAccess
- - name: rate-limiting
- config.policy: local
- config.hour: "{{ medium_rate_limit_per_hour }}"
- config.limit_by: credential
- - name: request-size-limiting
- config.allowed_payload_size: "{{ small_request_size_limit }}"
- - name: opa-checks
- config.required: false
- config.enabled: false
-
- name: verifyOtpV2
uris: "{{ otp_service_prefix }}/v2/verify"
- upstream_url: "{{ learning_service_url }}/v2/otp/verify"
+ upstream_url: "{{ userorg_service_url }}/v2/otp/verify"
strip_uri: true
plugins:
- name: jwt
@@ -4919,7 +4552,7 @@ kong_apis:
- name: forgotPassword
uris: "{{ learner_private_route_prefix }}/user/v1/password/reset"
- upstream_url: "{{ learning_service_url }}/private/user/v1/password/reset"
+ upstream_url: "{{ userorg_service_url }}/private/user/v1/password/reset"
strip_uri: true
plugins:
- name: jwt
@@ -4982,7 +4615,7 @@ kong_apis:
- name: searchManagedUser
uris: "{{ user_service_prefix }}/v1/managed"
- upstream_url: "{{ learning_service_url }}/v1/user/managed"
+ upstream_url: "{{ userorg_service_url }}/v1/user/managed"
strip_uri: true
plugins:
- name: jwt
@@ -5169,30 +4802,9 @@ kong_apis:
config.required: false
config.enabled: false
-- name: getUserProfileV3
- uris: "{{ user_service_prefix }}/v3/read"
- upstream_url: "{{ learning_service_url }}/v3/user/read"
- strip_uri: true
- plugins:
- - name: jwt
- - name: cors
- - "{{ statsd_pulgin }}"
- - name: acl
- config.whitelist:
- - userAccess
- - name: rate-limiting
- config.policy: local
- config.hour: "{{ medium_rate_limit_per_hour }}"
- config.limit_by: credential
- - name: request-size-limiting
- config.allowed_payload_size: "{{ small_request_size_limit }}"
- - name: opa-checks
- config.required: true
- config.enabled: true
-
- name: updateUserDeclarations
uris: "{{ user_service_prefix }}/v1/declarations"
- upstream_url: "{{ learning_service_url }}/v1/user/declarations"
+ upstream_url: "{{ userorg_service_url }}/v1/user/declarations"
strip_uri: true
plugins:
- name: jwt
@@ -5213,7 +4825,7 @@ kong_apis:
- name: updateUserConsent
uris: "{{ user_service_prefix }}/v1/consent/update"
- upstream_url: "{{ learning_service_url }}/v1/user/consent/update"
+ upstream_url: "{{ userorg_service_url }}/v1/user/consent/update"
strip_uri: true
plugins:
- name: jwt
@@ -5232,30 +4844,9 @@ kong_apis:
config.required: true
config.enabled: true
-- name: readUserConsent
- uris: "{{ user_service_prefix }}/v1/consent/read"
- upstream_url: "{{ learning_service_url }}/v1/user/consent/read"
- strip_uri: true
- plugins:
- - name: jwt
- - name: cors
- - "{{ statsd_pulgin }}"
- - name: acl
- config.whitelist:
- - userAccess
- - name: rate-limiting
- config.policy: local
- config.hour: "{{ medium_rate_limit_per_hour }}"
- config.limit_by: credential
- - name: request-size-limiting
- config.allowed_payload_size: "{{ medium_request_size_limit }}"
- - name: opa-checks
- config.required: true
- config.enabled: true
-
- name: readUserConsentV2
uris: "{{ user_service_prefix }}/v2/consent/read"
- upstream_url: "{{ learning_service_url }}/v2/user/consent/read"
+ upstream_url: "{{ userorg_service_url }}/v2/user/consent/read"
strip_uri: true
plugins:
- name: jwt
@@ -5419,7 +5010,7 @@ kong_apis:
- name: createTenantPreferences
uris: "{{ org_service_prefix }}/v2/preferences/create"
- upstream_url: "{{ learning_service_url }}/v2/org/preferences/create"
+ upstream_url: "{{ userorg_service_url }}/v2/org/preferences/create"
strip_uri: true
plugins:
- name: jwt
@@ -5440,7 +5031,7 @@ kong_apis:
- name: updateTenantPreferences
uris: "{{ org_service_prefix }}/v2/preferences/update"
- upstream_url: "{{ learning_service_url }}/v2/org/preferences/update"
+ upstream_url: "{{ userorg_service_url }}/v2/org/preferences/update"
strip_uri: true
plugins:
- name: jwt
@@ -5461,7 +5052,7 @@ kong_apis:
- name: readTenantPreferencess
uris: "{{ org_service_prefix }}/v2/preferences/read"
- upstream_url: "{{ learning_service_url }}/v2/org/preferences/read"
+ upstream_url: "{{ userorg_service_url }}/v2/org/preferences/read"
strip_uri: true
plugins:
- name: jwt
@@ -7188,27 +6779,6 @@ kong_apis:
config.required: false
config.enabled: false
-- name: updateUserV2
- uris: "{{ user_service_prefix }}/v2/update"
- upstream_url: "{{ learning_service_url }}/v2/user/update"
- strip_uri: true
- plugins:
- - name: jwt
- - name: cors
- - "{{ statsd_pulgin }}"
- - name: acl
- config.whitelist:
- - userUpdate
- - name: rate-limiting
- config.policy: local
- config.hour: "{{ medium_rate_limit_per_hour }}"
- config.limit_by: credential
- - name: request-size-limiting
- config.allowed_payload_size: "{{ medium_request_size_limit }}"
- - name: opa-checks
- config.required: true
- config.enabled: true
-
- name: questionImportAPI
uris: "{{ question_prefix }}/v1/import"
upstream_url: "{{ assessment_service_url }}/question/v4/import"
@@ -7230,30 +6800,9 @@ kong_apis:
config.required: false
config.enabled: false
-- name: managedUserV1Create
- uris: "{{ user_service_prefix }}/v1/managed/create"
- upstream_url: "{{ learning_service_url }}/v1/manageduser/create"
- strip_uri: true
- plugins:
- - name: jwt
- - name: cors
- - "{{ statsd_pulgin }}"
- - name: acl
- config.whitelist:
- - userAccess
- - name: rate-limiting
- config.policy: local
- config.hour: "{{ medium_rate_limit_per_hour }}"
- config.limit_by: credential
- - name: request-size-limiting
- config.allowed_payload_size: "{{ medium_request_size_limit }}"
- - name: opa-checks
- config.required: true
- config.enabled: true
-
- name: managedUserV2Create
uris: "{{ user_service_prefix }}/v2/managed/create"
- upstream_url: "{{ learning_service_url }}/v2/manageduser/create"
+ upstream_url: "{{ userorg_service_url }}/v2/manageduser/create"
strip_uri: true
plugins:
- name: jwt
@@ -7274,7 +6823,7 @@ kong_apis:
- name: ssoUserV1Create
uris: "{{ user_service_prefix }}/v1/sso/create"
- upstream_url: "{{ learning_service_url }}/v1/ssouser/create"
+ upstream_url: "{{ userorg_service_url }}/v1/ssouser/create"
strip_uri: true
plugins:
- name: jwt
@@ -7295,7 +6844,7 @@ kong_apis:
- name: ssoUserV2Create
uris: "{{ user_service_prefix }}/v2/signup"
- upstream_url: "{{ learning_service_url }}/v2/user/signup"
+ upstream_url: "{{ userorg_service_url }}/v2/user/signup"
strip_uri: true
plugins:
- name: jwt
@@ -7314,9 +6863,9 @@ kong_apis:
config.required: false
config.enabled: false
-- name: getUserProfileV4
- uris: "{{ user_service_prefix }}/v4/read"
- upstream_url: "{{ learning_service_url }}/v4/user/read"
+- name: getUserProfileV5
+ uris: "{{ user_service_prefix }}/v5/read"
+ upstream_url: "{{ userorg_service_url }}/v5/user/read"
strip_uri: true
plugins:
- name: jwt
@@ -7335,9 +6884,9 @@ kong_apis:
config.required: true
config.enabled: true
-- name: getUserProfileV5
- uris: "{{ user_service_prefix }}/v5/read"
- upstream_url: "{{ learning_service_url }}/v5/user/read"
+- name: searchUserV3
+ uris: "{{ user_service_prefix }}/v3/search"
+ upstream_url: "{{ userorg_service_url }}/v3/user/search"
strip_uri: true
plugins:
- name: jwt
@@ -7345,7 +6894,7 @@ kong_apis:
- "{{ statsd_pulgin }}"
- name: acl
config.whitelist:
- - userAccess
+ - userTempAdmin
- name: rate-limiting
config.policy: local
config.hour: "{{ medium_rate_limit_per_hour }}"
@@ -7353,33 +6902,29 @@ kong_apis:
- name: request-size-limiting
config.allowed_payload_size: "{{ small_request_size_limit }}"
- name: opa-checks
- config.required: true
- config.enabled: true
+ config.required: false
+ config.enabled: false
-- name: searchUserV2
- uris: "{{ user_service_prefix }}/v2/search"
- upstream_url: "{{ learning_service_url }}/v2/user/search"
+- name: searchOrgV2
+ uris: "{{ org_service_prefix }}/v2/search"
+ upstream_url: "{{ userorg_service_url }}/v2/org/search"
strip_uri: true
plugins:
- - name: jwt
- name: cors
- "{{ statsd_pulgin }}"
- - name: acl
- config.whitelist:
- - userTempAdmin
- name: rate-limiting
config.policy: local
config.hour: "{{ medium_rate_limit_per_hour }}"
- config.limit_by: credential
+ config.limit_by: ip
- name: request-size-limiting
config.allowed_payload_size: "{{ small_request_size_limit }}"
- name: opa-checks
config.required: false
config.enabled: false
-- name: searchUserV3
- uris: "{{ user_service_prefix }}/v3/search"
- upstream_url: "{{ learning_service_url }}/v3/user/search"
+- name: integrationAppRead
+ uris: "{{ integration_app_prefix }}/v1/read"
+ upstream_url: "{{ content_service_url }}/app/v4/read"
strip_uri: true
plugins:
- name: jwt
@@ -7387,10 +6932,10 @@ kong_apis:
- "{{ statsd_pulgin }}"
- name: acl
config.whitelist:
- - userTempAdmin
+ - contentAccess
- name: rate-limiting
config.policy: local
- config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.hour: "{{ small_request_size_limit }}"
config.limit_by: credential
- name: request-size-limiting
config.allowed_payload_size: "{{ small_request_size_limit }}"
@@ -7398,26 +6943,30 @@ kong_apis:
config.required: false
config.enabled: false
-- name: searchOrgV2
- uris: "{{ org_service_prefix }}/v2/search"
- upstream_url: "{{ learning_service_url }}/v2/org/search"
+- name: questionsetImportAPI
+ uris: "{{ questionset_prefix }}/v1/import"
+ upstream_url: "{{ assessment_service_url }}/questionset/v4/import"
strip_uri: true
plugins:
+ - name: jwt
- name: cors
- "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - contentCreate
- name: rate-limiting
config.policy: local
config.hour: "{{ medium_rate_limit_per_hour }}"
- config.limit_by: ip
+ config.limit_by: credential
- name: request-size-limiting
- config.allowed_payload_size: "{{ small_request_size_limit }}"
+ config.allowed_payload_size: "{{ medium_request_size_limit }}"
- name: opa-checks
config.required: false
config.enabled: false
-- name: integrationAppRead
- uris: "{{ integration_app_prefix }}/v1/read"
- upstream_url: "{{ content_service_url }}/app/v4/read"
+- name: questionsetCopy
+ uris: "{{ questionset_prefix }}/v1/copy"
+ upstream_url: "{{ assessment_service_url }}/questionset/v4/copy"
strip_uri: true
plugins:
- name: jwt
@@ -7425,20 +6974,20 @@ kong_apis:
- "{{ statsd_pulgin }}"
- name: acl
config.whitelist:
- - contentAccess
+ - 'contentCreate'
- name: rate-limiting
config.policy: local
- config.hour: "{{ small_request_size_limit }}"
+ config.hour: "{{ medium_rate_limit_per_hour }}"
config.limit_by: credential
- name: request-size-limiting
- config.allowed_payload_size: "{{ small_request_size_limit }}"
+ config.allowed_payload_size: "{{ medium_request_size_limit }}"
- name: opa-checks
config.required: false
config.enabled: false
-- name: questionsetImportAPI
- uris: "{{ questionset_prefix }}/v1/import"
- upstream_url: "{{ assessment_service_url }}/questionset/v4/import"
+- name: questionCopy
+ uris: "{{ question_prefix }}/v1/copy"
+ upstream_url: "{{ assessment_service_url }}/question/v4/copy"
strip_uri: true
plugins:
- name: jwt
@@ -7446,7 +6995,7 @@ kong_apis:
- "{{ statsd_pulgin }}"
- name: acl
config.whitelist:
- - contentCreate
+ - 'contentCreate'
- name: rate-limiting
config.policy: local
config.hour: "{{ medium_rate_limit_per_hour }}"
@@ -7521,8 +7070,8 @@ kong_apis:
config.enabled: false
- name: getSolutionReportInformation
- uris: "{{ solutions_service_prefix }}/mlcore/v1/read"
- upstream_url: "{{ ml_core_service_url }}/v1/solutions/read"
+ uris: "{{ resource_prefix }}/mlreports/v1/filtervalues"
+ upstream_url: "{{ ml_reports_service_url }}/v1/resource/filtervalues"
strip_uri: true
plugins:
- name: jwt
@@ -9096,7 +8645,49 @@ kong_apis:
- name: updateUserV3
uris: "{{ user_service_prefix }}/v3/update"
- upstream_url: "{{ learning_service_url }}/v3/user/update"
+ upstream_url: "{{ userorg_service_url }}/v3/user/update"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - userUpdate
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ medium_request_size_limit }}"
+ - name: opa-checks
+ config.required: true
+ config.enabled: true
+
+- name: deleteUser
+ uris: "{{ user_service_prefix }}/v1/delete"
+ upstream_url: "{{ userorg_service_url }}/v1/user/delete"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - userUpdate
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ medium_request_size_limit }}"
+ - name: opa-checks
+ config.required: true
+ config.enabled: true
+
+- name: ownershipTransfer
+ uris: "{{ user_service_prefix }}/v1/ownership/transfer"
+ upstream_url: "{{ userorg_service_url }}/v1/user/ownership/transfer"
strip_uri: true
plugins:
- name: jwt
@@ -9748,3 +9339,939 @@ kong_apis:
- name: opa-checks
config.required: true
config.enabled: true
+
+- name: projectCertificateList
+ uris: "{{ userProjects_service_prefix }}/mlprojects/v1/certificates"
+ upstream_url: "{{ ml_project_service_url }}/v1/userProjects/certificates"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - projectAccess
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ small_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
+- name: createRCProjectCertificate
+ uris: "{{ registry_service_prefix }}/certificate/v1/create"
+ upstream_url: "{{ registry_service_url }}/api/v1/ProjectCertificate"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - certificateCreate
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ small_request_size_limit }}"
+ - name: request-transformer
+ config.remove.headers: Authorization
+ - name: opa-checks
+ config.required: true
+ config.enabled: true
+
+- name: getProjectRCCertificate
+ uris: "{{ registry_service_prefix }}/projectCertificate/v1/download"
+ upstream_url: "{{ registry_service_url }}/api/v1/ProjectCertificate"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - anonymousCertificateAccess
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ small_request_size_limit }}"
+ - name: request-transformer
+ config.remove.headers: Authorization
+ - name: opa-checks
+ config.required: true
+ config.enabled: true
+
+- name: fetchAllForm
+ uris: "{{ data_service_prefix }}/v1/form/fetchAll"
+ upstream_url: "{{ player_service_url }}/plugin/v1/form/fetchAll"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - formUpdate
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ small_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ medium_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
+- name: releaseDialcodeContentV2
+ uris: "{{ content_prefix }}/v2/dialcode/release"
+ upstream_url: "{{ content_service_url }}/content/v4/dialcode/release"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - contentUpdate
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ small_request_size_limit }}"
+ - name: opa-checks
+ config.required: true
+ config.enabled: true
+
+- name: releaseDialcodeCollection
+ uris: "{{ collection_prefix }}/v1/dialcode/release"
+ upstream_url: "{{ content_service_url }}/collection/v4/dialcode/release"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - contentUpdate
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ small_request_size_limit }}"
+ - name: opa-checks
+ config.required: true
+ config.enabled: true
+
+- name: publishContentV2
+ uris: "{{ content_prefix }}/v2/publish"
+ upstream_url: "{{ content_service_url }}/content/v4/publish"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - contentAdmin
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ small_request_size_limit }}"
+ - name: opa-checks
+ config.required: true
+ config.enabled: true
+
+- name: unlistedPublishContent
+ uris: "{{ content_prefix }}/v1/unlisted/publish"
+ upstream_url: "{{ content_service_url }}/content/v3/unlisted/publish"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - contentAdmin
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ small_request_size_limit }}"
+ - name: opa-checks
+ config.required: true
+ config.enabled: true
+
+- name: unlistedPublishContentV2
+ uris: "{{ content_prefix }}/v2/unlisted/publish"
+ upstream_url: "{{ content_service_url }}/content/v4/unlisted/publish"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - contentAdmin
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ small_request_size_limit }}"
+ - name: opa-checks
+ config.required: true
+ config.enabled: true
+
+- name: publishCollection
+ uris: "{{ collection_prefix }}/v1/publish"
+ upstream_url: "{{ content_service_url }}/collection/v4/publish"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - contentAdmin
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ small_request_size_limit }}"
+ - name: opa-checks
+ config.required: true
+ config.enabled: true
+
+- name: unlistedPublishCollection
+ uris: "{{ collection_prefix }}/v1/unlisted/publish"
+ upstream_url: "{{ content_service_url }}/collection/v4/unlisted/publish"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - contentAdmin
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ small_request_size_limit }}"
+ - name: opa-checks
+ config.required: true
+ config.enabled: true
+
+- name: readDIALCodesBatchInfo
+ uris: "{{ dialcode_service_prefix }}/v2/read/batch"
+ upstream_url: "{{ dial_service_url }}/dialcode/v4/batch/read"
+ strip_uri: true
+ plugins:
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: ip
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ small_request_size_limit }}"
+ - name: opa-checks
+ config.required: true
+ config.enabled: true
+
+- name: joinProgramByUser
+ uris: "{{ programs_service_prefix }}/mlcore/v1/join"
+ upstream_url: "{{ ml_core_service_url }}/v1/programs/join"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - programAccess
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ small_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
+#Lern release-5.3.0
+
+- name: exhaustSubmitProxyAPI
+ uris: "{{ course_service_prefix }}/v1/jobrequest/submit"
+ upstream_url: "{{ lms_service_url }}/v1/jobrequest/submit"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - courseAccess
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ small_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
+- name: exhaustListProxyAPI
+ uris: "{{ course_service_prefix }}/v1/jobrequest/list"
+ upstream_url: "{{ lms_service_url }}/v1/jobrequest/list"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - courseAccess
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ small_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
+- name: orgAddEncryptionKey
+ uris: "{{ org_service_prefix }}/v1/update/encryptionkey"
+ upstream_url: "{{ userorg_service_url }}/v1/org/update/encryptionkey"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - orgSuperAdmin
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ small_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+#Lern release-5.3.0
+
+## inQuiry release-6.0.0
+
+- name: questionCreateV2
+ uris: "{{ question_prefix }}/v2/create"
+ upstream_url: "{{ assessment_service_url }}/question/v5/create"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - contentCreate
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ medium_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
+- name: questionReadV2
+ uris: "{{ question_prefix }}/v2/read"
+ upstream_url: "{{ assessment_service_url }}/question/v5/read"
+ strip_uri: true
+ plugins:
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: ip
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ medium_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
+- name: questionPrivateReadV2
+ uris: "{{ question_prefix }}/v2/private/read"
+ upstream_url: "{{ assessment_service_url }}/question/v5/private/read"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - contentAccess
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ medium_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
+- name: questionUpdateV2
+ uris: "{{ question_prefix }}/v2/update"
+ upstream_url: "{{ assessment_service_url }}/question/v5/update"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - contentUpdate
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ medium_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
+- name: questionRetireV2
+ uris: "{{ question_prefix }}/v2/retire"
+ upstream_url: "{{ assessment_service_url }}/question/v5/retire"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - contentAdmin
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ medium_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
+- name: questionReviewV2
+ uris: "{{ question_prefix }}/v2/review"
+ upstream_url: "{{ assessment_service_url }}/question/v5/review"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - contentAdmin
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ medium_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
+- name: questionPublishV2
+ uris: "{{ question_prefix }}/v2/publish"
+ upstream_url: "{{ assessment_service_url }}/question/v5/publish"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - contentCreate
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ medium_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
+- name: questionListV2
+ uris: "{{ question_prefix }}/v2/list"
+ upstream_url: "{{ assessment_service_url }}/question/v5/list"
+ strip_uri: true
+ plugins:
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: ip
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ medium_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
+- name: questionRejectV2
+ uris: "{{ question_prefix }}/v2/reject"
+ upstream_url: "{{ assessment_service_url }}/question/v5/reject"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - contentAdmin
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ medium_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
+- name: copyQuestionV2
+ uris: "{{ question_prefix }}/v2/copy"
+ upstream_url: "{{ assessment_service_url }}/question/v5/copy"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - contentCreate
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ medium_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
+- name: questionSetCreateV2
+ uris: "{{ questionset_prefix }}/v2/create"
+ upstream_url: "{{ assessment_service_url }}/questionset/v5/create"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - contentCreate
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ medium_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
+- name: questionSetReadV2
+ uris: "{{ questionset_prefix }}/v2/read"
+ upstream_url: "{{ assessment_service_url }}/questionset/v5/read"
+ strip_uri: true
+ plugins:
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: ip
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ medium_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
+- name: questionSetPrivateReadV2
+ uris: "{{ questionset_prefix }}/v2/private/read"
+ upstream_url: "{{ assessment_service_url }}/questionset/v5/private/read"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - contentAccess
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ medium_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
+- name: questionSetUpdateV2
+ uris: "{{ questionset_prefix }}/v2/update"
+ upstream_url: "{{ assessment_service_url }}/questionset/v5/update"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - contentUpdate
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ medium_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
+- name: questionSetAddQuestionV2
+ uris: "{{ questionset_prefix }}/v2/add"
+ upstream_url: "{{ assessment_service_url }}/questionset/v5/add"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - 'contentUpdate'
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ medium_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
+- name: questionSetRemoveQuestionV2
+ uris: "{{ questionset_prefix }}/v2/remove"
+ upstream_url: "{{ assessment_service_url }}/questionset/v5/remove"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - 'contentUpdate'
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ medium_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
+- name: questionSetRetireV2
+ uris: "{{ questionset_prefix }}/v2/retire"
+ upstream_url: "{{ assessment_service_url }}/questionset/v5/retire"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - contentAdmin
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ medium_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
+- name: questionSetReviewV2
+ uris: "{{ questionset_prefix }}/v2/review"
+ upstream_url: "{{ assessment_service_url }}/questionset/v5/review"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - contentAdmin
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ medium_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
+- name: questionSetPublishV2
+ uris: "{{ questionset_prefix }}/v2/publish"
+ upstream_url: "{{ assessment_service_url }}/questionset/v5/publish"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - contentAdmin
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ medium_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
+- name: questionSetUpdateHierarchyV2
+ uris: "{{ questionset_prefix }}/v2/hierarchy/update"
+ upstream_url: "{{ assessment_service_url }}/questionset/v5/hierarchy/update"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - contentUpdate
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ medium_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
+- name: questionSetReadHierarchyV2
+ uris: "{{ questionset_prefix }}/v2/hierarchy"
+ upstream_url: "{{ assessment_service_url }}/questionset/v5/hierarchy"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - anonymousContentAccess
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ medium_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
+- name: questionSetRejectV2
+ uris: "{{ questionset_prefix }}/v2/reject"
+ upstream_url: "{{ assessment_service_url }}/questionset/v5/reject"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - contentAdmin
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ medium_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
+- name: questionImportAPIV2
+ uris: "{{ question_prefix }}/v2/import"
+ upstream_url: "{{ assessment_service_url }}/question/v5/import"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - contentCreate
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ medium_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
+- name: questionsetImportAPIV2
+ uris: "{{ questionset_prefix }}/v2/import"
+ upstream_url: "{{ assessment_service_url }}/questionset/v5/import"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - contentCreate
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ medium_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
+- name: copyQuestionSetV2
+ uris: "{{ questionset_prefix }}/v2/copy"
+ upstream_url: "{{ assessment_service_url }}/questionset/v5/copy"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - contentCreate
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ medium_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
+- name: questionSetUpdateComment
+ uris: "{{ questionset_prefix }}/v1/comment/update"
+ upstream_url: "{{ assessment_service_url }}/questionset/v4/comment/update"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - contentAdmin
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ medium_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
+- name: questionSetUpdateCommentV2
+ uris: "{{ questionset_prefix }}/v2/comment/update"
+ upstream_url: "{{ assessment_service_url }}/questionset/v5/comment/update"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - contentAdmin
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ medium_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
+- name: questionSetReadComment
+ uris: "{{ questionset_prefix }}/v1/comment/read"
+ upstream_url: "{{ assessment_service_url }}/questionset/v4/comment/read"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - contentAccess
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ medium_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
+
+- name: questionSetReadCommentV2
+ uris: "{{ questionset_prefix }}/v2/comment/read"
+ upstream_url: "{{ assessment_service_url }}/questionset/v5/comment/read"
+ strip_uri: true
+ plugins:
+ - name: jwt
+ - name: cors
+ - "{{ statsd_pulgin }}"
+ - name: acl
+ config.whitelist:
+ - contentAccess
+ - name: rate-limiting
+ config.policy: local
+ config.hour: "{{ medium_rate_limit_per_hour }}"
+ config.limit_by: credential
+ - name: request-size-limiting
+ config.allowed_payload_size: "{{ medium_request_size_limit }}"
+ - name: opa-checks
+ config.required: false
+ config.enabled: false
diff --git a/ansible/roles/kong-consumer/defaults/main.yml b/ansible/roles/kong-consumer/defaults/main.yml
index 9acffb2f50..a28f773309 100644
--- a/ansible/roles/kong-consumer/defaults/main.yml
+++ b/ansible/roles/kong-consumer/defaults/main.yml
@@ -68,6 +68,9 @@ anonymous_user_groups:
- anonymousAppAccess
- anonymousUserCreate
+userAccess:
+ - userAccess
+
kong_all_consumer_groups:
- announcementAccess
- appAccess
diff --git a/ansible/roles/log-es6/tasks/main.yml b/ansible/roles/log-es6/tasks/main.yml
index 646947abee..8ac712117c 100644
--- a/ansible/roles/log-es6/tasks/main.yml
+++ b/ansible/roles/log-es6/tasks/main.yml
@@ -68,12 +68,16 @@
- name: include plugins/repository-s3.yml
include: plugins/repository-s3.yml
- when: cloud_service_provider == "aws"
+ when: cloud_service_provider == "aws" or cloud_service_provider == "oci"
- name: include plugins/repository-gcs.yml
include: plugins/repository-gcs.yml
when: cloud_service_provider == "gcloud"
+- name: include plugins/repository-oci.yml
+ include: plugins/repository-oci.yml
+ when: cloud_service_provider == "oci"
+
- name: include elasticsearch-ssl.yml
include: elasticsearch-ssl.yml
when: es_enable_http_ssl or es_enable_transport_ssl
diff --git a/ansible/roles/log-es6/tasks/plugins/repository-azure.yml b/ansible/roles/log-es6/tasks/plugins/repository-azure.yml
index 9c3b9d3774..43d512803f 100644
--- a/ansible/roles/log-es6/tasks/plugins/repository-azure.yml
+++ b/ansible/roles/log-es6/tasks/plugins/repository-azure.yml
@@ -1,7 +1,7 @@
---
- name: Add default azure account name for backups
become: yes
- shell: echo "{{ azure_management_storage_account_name }}" | {{ es_home }}/bin/elasticsearch-keystore add -f azure.client.default.account
+ shell: echo "{{ cloud_management_storage_accountname }}" | {{ es_home }}/bin/elasticsearch-keystore add -f azure.client.default.account
no_log: True
environment:
ES_PATH_CONF: "{{ es_conf_dir }}"
@@ -9,7 +9,7 @@
- name: Add default azure account key for backups
become: yes
- shell: echo "{{ azure_management_storage_account_key }}" | {{ es_home }}/bin/elasticsearch-keystore add -f azure.client.default.key
+ shell: echo "{{ cloud_management_storage_secret }}" | {{ es_home }}/bin/elasticsearch-keystore add -f azure.client.default.key
no_log: True
environment:
- ES_PATH_CONF: "{{ es_conf_dir }}"
\ No newline at end of file
+ ES_PATH_CONF: "{{ es_conf_dir }}"
diff --git a/ansible/roles/log-es6/tasks/plugins/repository-gcs.yml b/ansible/roles/log-es6/tasks/plugins/repository-gcs.yml
index 81078e173d..7d1c1fbd4a 100644
--- a/ansible/roles/log-es6/tasks/plugins/repository-gcs.yml
+++ b/ansible/roles/log-es6/tasks/plugins/repository-gcs.yml
@@ -3,7 +3,7 @@
become: yes
copy:
dest: "{{ es_conf_dir }}/gcs_management_bucket_service_account.json"
- content: "{{ gcs_management_bucket_service_account }}"
+ content: "{{ cloud_management_storage_secret }}"
- name: Add gcs service account file to keystore
become: yes
@@ -15,4 +15,4 @@
- name: Remove the service account file
file:
path: "{{ es_conf_dir }}/gcs_management_bucket_service_account.json"
- state: absent
\ No newline at end of file
+ state: absent
diff --git a/ansible/roles/log-es6/tasks/plugins/repository-oci.yml b/ansible/roles/log-es6/tasks/plugins/repository-oci.yml
new file mode 100644
index 0000000000..02a2b45f45
--- /dev/null
+++ b/ansible/roles/log-es6/tasks/plugins/repository-oci.yml
@@ -0,0 +1,36 @@
+---
+- name: Add default oci account name for backups
+ become: yes
+ shell: echo "{{ cloud_management_storage_accountname }}" | {{ es_home }}/bin/elasticsearch-keystore add -f s3.client.default.access_key
+ no_log: True
+ environment:
+ ES_PATH_CONF: "{{ conf_dir }}"
+
+- name: Add default oci account key for backups
+ become: yes
+ shell: echo "{{ cloud_management_storage_secret }}" | {{ es_home }}/bin/elasticsearch-keystore add -f s3.client.default.secret_key
+ no_log: True
+ environment:
+ ES_PATH_CONF: "{{ conf_dir }}"
+
+
+- name: Add default oci endpoint for backups
+ become: yes
+ shell: echo "{{ cloud_management_storage_endpoint }}" | {{ es_home }}/bin/elasticsearch-keystore add -f s3.client.default.endpoint
+ no_log: True
+ environment:
+ ES_PATH_CONF: "{{ conf_dir }}"
+
+- name: Add default oci region for backups
+ become: yes
+ shell: echo "{{ cloud_management_storage_region }}" | {{ es_home }}/bin/elasticsearch-keystore add -f s3.client.default.region
+ no_log: True
+ environment:
+ ES_PATH_CONF: "{{ conf_dir }}"
+
+- name: Add default path-style access for backups
+ become: yes
+ shell: echo "{{ cloud_management_storage_path_style_access }}" | {{ es_home }}/bin/elasticsearch-keystore add -f s3.client.default.path_style_access
+ no_log: True
+ environment:
+ ES_PATH_CONF: "{{ conf_dir }}"
\ No newline at end of file
diff --git a/ansible/roles/log-es6/tasks/plugins/repository-s3.yml b/ansible/roles/log-es6/tasks/plugins/repository-s3.yml
index 344af29e6e..2c05927255 100644
--- a/ansible/roles/log-es6/tasks/plugins/repository-s3.yml
+++ b/ansible/roles/log-es6/tasks/plugins/repository-s3.yml
@@ -1,14 +1,14 @@
---
- name: Add default aws account name for backups
become: yes
- shell: echo "{{ aws_management_bucket_user_access_key }}" | {{ es_home }}/bin/elasticsearch-keystore add -f s3.client.default.access_key
+ shell: echo "{{ cloud_management_storage_accountname }}" | {{ es_home }}/bin/elasticsearch-keystore add -f s3.client.default.access_key
no_log: True
environment:
ES_PATH_CONF: "{{ es_conf_dir }}"
- name: Add default aws account key for backups
become: yes
- shell: echo "{{ aws_management_bucket_user_secret_key }}" | {{ es_home }}/bin/elasticsearch-keystore add -f s3.client.default.secret_key
+ shell: echo "{{ cloud_management_storage_secret }}" | {{ es_home }}/bin/elasticsearch-keystore add -f s3.client.default.secret_key
no_log: True
environment:
ES_PATH_CONF: "{{ es_conf_dir }}"
diff --git a/ansible/roles/ml-analytics-adhoc-jobs/tasks/main.yaml b/ansible/roles/ml-analytics-adhoc-jobs/tasks/main.yaml
new file mode 100644
index 0000000000..abfb50e3bb
--- /dev/null
+++ b/ansible/roles/ml-analytics-adhoc-jobs/tasks/main.yaml
@@ -0,0 +1,106 @@
+- name: Fetch Config file
+ synchronize: src="{{ item }}" dest="../output/" mode=pull recursive=yes rsync_path=rsync
+ with_items:
+ - "/opt/sparkjobs/ml-analytics-service/config.ini"
+ tags:
+ - fetch-config
+
+- name: Execute run.sh
+ become: yes
+ become_user: data-pipeline
+ shell: "/opt/sparkjobs/ml-analytics-service/run.sh > /opt/sparkjobs/ml-analytics-service/run_job.log"
+ tags:
+ - run-job
+
+- name: Fetch run_job.log
+ synchronize: src="{{ item }}" dest="../output/" mode=pull recursive=yes rsync_path=rsync
+ with_items:
+ - "/opt/sparkjobs/ml-analytics-service/run_job.log"
+ tags:
+ - run-job
+
+- name: Execute run_weekly.sh
+ become: yes
+ become_user: data-pipeline
+ shell: "/opt/sparkjobs/ml-analytics-service/run_weekly.sh > /opt/sparkjobs/ml-analytics-service/run_weekly_job.log"
+ tags:
+ - run-weekly
+
+- name: Fetch run_weekly.log
+ synchronize: src="{{ item }}" dest="../output/" mode=pull recursive=yes rsync_path=rsync
+ with_items:
+ - "/opt/sparkjobs/ml-analytics-service/run_weekly_job.log"
+ tags:
+ - run-weekly
+
+- name: Execute run_program.sh
+ become: yes
+ become_user: data-pipeline
+ shell: "/opt/sparkjobs/ml-analytics-service/run_program.sh > /opt/sparkjobs/ml-analytics-service/run_program_job.log"
+ tags:
+ - run-program
+
+- name: Fetch run_program_job.log
+ synchronize: src="{{ item }}" dest="../output/" mode=pull recursive=yes rsync_path=rsync
+ with_items:
+ - "/opt/sparkjobs/ml-analytics-service/run_program_job.log"
+ tags:
+ - run-program
+
+- name: Execute Observation ingest/refresh
+ become: yes
+ become_user: data-pipeline
+ shell: "source /opt/sparkjobs/spark_venv/bin/activate && /opt/sparkjobs/spark_venv/lib/python3.8/site-packages/pyspark/bin/spark-submit --driver-memory 50g --executor-memory 50g /opt/sparkjobs/ml-analytics-service/observations/pyspark_observation_status_batch.py"
+ register: out
+ tags:
+ - observation-refresh-ingest
+
+- debug:
+ var: out.stdout_lines
+ tags:
+ - observation-refresh-ingest
+
+- name: Execute Survey ingest/refresh
+ become: yes
+ become_user: data-pipeline
+ shell: "source /opt/sparkjobs/spark_venv/bin/activate && /opt/sparkjobs/spark_venv/lib/python3.8/site-packages/pyspark/bin/spark-submit --driver-memory 50g --executor-memory 50g /opt/sparkjobs/ml-analytics-service/survey/pyspark_survey_status.py"
+ register: out
+ args:
+ executable: /bin/bash
+ tags:
+ - survey-refresh-ingest
+
+- debug:
+ var: out.stdout_lines
+ tags:
+ - survey-refresh-ingest
+
+- name: Execute Project Refresh
+ become: yes
+ become_user: data-pipeline
+ shell: "source /opt/sparkjobs/spark_venv/bin/activate && /opt/sparkjobs/spark_venv/lib/python3.8/site-packages/pyspark/bin/spark-submit --driver-memory 50g --executor-memory 50g /opt/sparkjobs/ml-analytics-service/projects/pyspark_project_deletion_batch.py"
+ register: out
+ args:
+ executable: /bin/bash
+ tags:
+ - project-refresh
+
+- debug:
+ var: out.stdout_lines
+ tags:
+ - project-refresh
+
+- name: Execute Project ingest
+ become: yes
+ become_user: data-pipeline
+ shell: "source /opt/sparkjobs/spark_venv/bin/activate && /opt/sparkjobs/spark_venv/lib/python3.8/site-packages/pyspark/bin/spark-submit --driver-memory 50g --executor-memory 50g /opt/sparkjobs/ml-analytics-service/projects/pyspark_project_batch.py"
+ register: out
+ args:
+ executable: /bin/bash
+ tags:
+ - project-ingest
+
+- debug:
+ var: out.stdout_lines
+ tags:
+ - project-ingest
diff --git a/ansible/roles/ml-analytics-service/defaults/main.yml b/ansible/roles/ml-analytics-service/defaults/main.yml
index 5c5d87dace..a67906b1f8 100755
--- a/ansible/roles/ml-analytics-service/defaults/main.yml
+++ b/ansible/roles/ml-analytics-service/defaults/main.yml
@@ -10,8 +10,15 @@ ml_analytics_survey_app_name: "{{ ml_survey_app_name | default('sunbirdsurvey')
ml_analytics_integrated_app_name: "{{ ml_integrated_app_name | default('sunbird') }}"
ml_analytics_integrated_portal: "{{ ml_integrated_portal | default('dev.sunbird.portal') }}"
ml_analytics_survey_service: "http://{{private_ingressgateway_ip}}/ml-survey"
+ml_analytics_core_service: "http://{{private_ingressgateway_ip}}/ml-core"
+
+# SB-31155
+# This should be deprecated in future in favour of ml_analytics_public_storage
ml_analytics_public_container: "{{ ml_analytics_container | default('samiksha') }}"
-ml_analytics_evidence_base_url: "https://{{ sunbird_public_storage_account_name }}.blob.core.windows.net/{{ ml_analytics_public_container }}/"
+
+# SB-31155 - Adding a generalized variable which can be used for any CSP
+ml_analytics_public_storage: "{{ ml_analytics_public_container }}"
+ml_analytics_evidence_base_url: "{{ cloud_storage_url }}/{{ ml_analytics_public_storage }}/"
ml_analytics_mongodb_url: "{{ml_mongodb_host | default(groups['mongo_master'][0]+':27017')}}"
ml_analytics_mongo_db_name: "{{ml_mongodb | default('ml-survey')}}"
ml_analytics_mongo_observation_submission_collection: "observationSubmissions"
@@ -38,10 +45,8 @@ ml_analytics_kafka_survey_druid_topic_name: "{{ env_name }}.ml.survey.druid"
ml_analytics_observation_log_folder_path: "{{ WORKDIR }}/logs/observation"
ml_analytics_project_log_folder_path: "{{ WORKDIR }}/logs/project"
ml_analytics_survey_log_folder_path: "{{ WORKDIR }}/logs/survey"
-ml_analytics_azure_account_name: "{{ sunbird_private_storage_account_name }}"
-ml_analytics_azure_container_name: "telemetry-data-store"
-ml_analytics_observation_azure_blob_path: "observation/status/"
-ml_analytics_project_azure_blob_path: "projects/"
+ml_analytics_observation_cloud_blob_path: "observation/status/"
+ml_analytics_project_cloud_blob_path: "projects/"
ml_analytics_redis_host: "{{ml_redis_host | default(groups['dp-redis'][0])}}"
ml_analytics_redis_port: "{{ ml_redis_device_port | default('6379') }}"
ml_analytics_redis_db_name: "12"
@@ -49,53 +54,87 @@ ml_analytics_project_output_dir: "{{ WORKDIR }}/source/projects/output"
ml_analytics_observation_status_output_dir: "{{ WORKDIR }}/source/observations/status/output"
ml_analytics_api_authorization_key: "{{ml_api_auth_token | default('sunbird_api_auth_token')}}"
ml_analytics_api_access_token: "{{ml_api_access_token | default('ml_core_internal_access_token')}}"
-ml_analytics_druid_observation_status_injestion_spec : '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type": "azure","uris": ["azure://telemetry-data-store/observation/status/sl_observation_status.json"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"sl-observation-status","granularitySpec":{"type":"uniform","queryGranularity":"DAY","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"updatedAt","format":"auto"},"dimensionsSpec":{"dimensions":["status","entity_externalId","entity_id","entity_type","solution_id","solution_externalId","submission_id","entity_name","solution_name","role_title","school_name","school_code","school_externalId","state_name","state_code","state_externalId","district_name","district_code","district_externalId","block_name","block_code","block_externalId","cluster_name","cluster_code","cluster_externalId","completedDate","channel","parent_channel","program_id","program_externalId","program_name","app_name","user_id","private_program","solution_type","organisation_name","ecm_marked_na","board_name","updatedAt","organisation_id","user_type","observed_school_name","observed_school_id","observed_school_code","observed_state_name","observed_state_id","observed_state_code","observed_district_name","observed_district_id","observed_district_code","observed_block_name","observed_block_id","observed_block_code","observed_cluster_name","observed_cluster_id","observed_cluster_code"]},"metricsSpec":[]}}}'
-ml_analytics_druid_project_injestion_spec : '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type": "azure","uris": ["azure://telemetry-data-store/projects/sl_projects.json"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"sl-project","granularitySpec":{"type":"uniform","queryGranularity":"DAY","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"project_updated_date","format":"auto"},"dimensionsSpec":{"dimensions":[]},"metricsSpec":[]}}}'
-ml_analytics_azure_sas_token: "{{ sunbird_private_storage_account_key }}"
-ml_analytics_druid_distinctCnt_obs_injestion_spec: '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type":"azure","uris":["azure://telemetry-data-store/observation/distinctCount/ml_observation_distinctCount_status.json"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"ml-obs-status","granularitySpec":{"type":"uniform","queryGranularity":"none","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"time_stamp","format":"auto"},"dimensionsSpec":{"dimensions":[{"type":"string","name":"program_name"},{"type":"string","name":"program_id"},{"type":"string","name":"solution_name"},{"type":"string","name":"solution_id"},{"type":"string","name":"status"},{"type":"string","name":"state_name"},{"type":"string","name":"state_externalId"},{"type":"string","name":"district_name"},{"type":"string","name":"district_externalId"},{"type":"string","name":"block_name"},{"type":"string","name":"block_externalId"},{"type":"string","name":"organisation_name"},{"type":"string","name":"organisation_id"},{"type":"string","name":"parent_channel"},{"type":"string","name":"solution_type"},{"type":"string","name":"private_program"},{"type":"long","name":"unique_submissions"},{"type":"long","name":"unique_entities"},{"type":"long","name":"unique_users"},{"type":"long","name":"unique_solution"},{"type":"string","name":"time_stamp"}]},"metricsSpec":[]}}}'
-ml_analytics_druid_distinctCnt_obs_domain_injestion_spec: '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type":"azure","uris":["azure://telemetry-data-store/observation/distinctCount_domain/ml_observation_distinctCount_domain.json"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"ml-obs-domain","granularitySpec":{"type":"uniform","queryGranularity":"none","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"time_stamp","format":"auto"},"dimensionsSpec":{"dimensions":[{"type":"string","name":"program_name"},{"type":"string","name":"program_id"},{"type":"string","name":"solution_name"},{"type":"string","name":"solution_id"},{"type":"string","name":"state_name"},{"type":"string","name":"state_externalId"},{"type":"string","name":"district_name"},{"type":"string","name":"district_externalId"},{"type":"string","name":"block_name"},{"type":"string","name":"block_externalId"},{"type":"string","name":"organisation_name"},{"type":"string","name":"organisation_id"},{"type":"string","name":"parent_channel"},{"type":"string","name":"solution_type"},{"type":"string","name":"private_program"},{"type":"string","name":"domain_name"},{"type":"string","name":"domain_externalId"},{"type":"string","name":"domain_level"},{"type":"long","name":"unique_submissions"},{"type":"long","name":"unique_entities"},{"type":"long","name":"unique_users"},{"type":"long","name":"unique_solution"},{"type":"string","name":"time_stamp"}]},"metricsSpec":[]}}}'
-ml_analytics_druid_distinctCnt_obs_domain_criteria_injestion_spec: '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type":"azure","uris":["azure://telemetry-data-store/observation/distinctCount_domain_criteria/ml_observation_distinctCount_domain_criteria.json"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"ml-obs-domain-criteria","granularitySpec":{"type":"uniform","queryGranularity":"none","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"time_stamp","format":"auto"},"dimensionsSpec":{"dimensions":[{"type":"string","name":"program_name"},{"type":"string","name":"program_id"},{"type":"string","name":"solution_name"},{"type":"string","name":"solution_id"},{"type":"string","name":"state_name"},{"type":"string","name":"state_externalId"},{"type":"string","name":"district_name"},{"type":"string","name":"district_externalId"},{"type":"string","name":"block_name"},{"type":"string","name":"block_externalId"},{"type":"string","name":"organisation_name"},{"type":"string","name":"organisation_id"},{"type":"string","name":"parent_channel"},{"type":"string","name":"solution_type"},{"type":"string","name":"private_program"},{"type":"string","name":"domain_name"},{"type":"string","name":"domain_externalId"},{"type":"string","name":"domain_level"},{"type":"string","name":"criteria_name"},{"type":"string","name":"criteria_score"},{"type":"string","name":"criteria_id"},{"type":"long","name":"unique_submissions"},{"type":"long","name":"unique_entities"},{"type":"long","name":"unique_users"},{"type":"long","name":"unique_solution"},{"type":"string","name":"time_stamp"}]},"metricsSpec":[]}}}'
-ml_analytics_druid_distinctCnt_projects_status_injestion_spec: '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type":"azure","uris":["azure://telemetry-data-store/projects/distinctCount/ml_projects_distinctCount.json"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"ml-project-status","granularitySpec":{"type":"uniform","queryGranularity":"none","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"time_stamp","format":"auto"},"dimensionsSpec":{"dimensions":[{"type":"string","name":"program_name"},{"type":"string","name":"program_id"},{"type":"string","name":"project_title"},{"type":"string","name":"solution_id"},{"type":"string","name":"status_of_project"},{"type":"string","name":"state_name"},{"type":"string","name":"state_externalId"},{"type":"string","name":"district_name"},{"type":"string","name":"district_externalId"},{"type":"string","name":"block_name"},{"type":"string","name":"block_externalId"},{"type":"string","name":"organisation_name"},{"type":"string","name":"organisation_id"},{"type":"string","name":"private_program"},{"type":"string","name":"project_created_type"},{"type":"string","name":"parent_channel"},{"type":"long","name":"unique_projects"},{"type":"long","name":"unique_users"},{"type":"long","name":"unique_solution"},{"type":"long","name":"no_of_imp_with_evidence"},{"type":"string","name":"time_stamp"}]},"metricsSpec":[]}}}'
-ml_analytics_obs_distinctCnt_azure_blob_path: "observation/distinctCount/"
-ml_analytics_obs_distinctCnt_domain_azure_blob_path: "observation/distinctCount_domain/"
-ml_analytics_obs_distinctCnt_domain_criteria_azure_blob_path: "observation/distinctCount_domain_criteria/"
-ml_analytics_projects_distinctCnt_azure_blob_path: "projects/distinctCount/"
+ml_analytics_druid_observation_status_injestion_spec: '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type": "CloudType","uris": ["CloudURI"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"sl-observation-status","granularitySpec":{"type":"uniform","queryGranularity":"DAY","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"updatedAt","format":"auto"},"dimensionsSpec":{"dimensions":["status","entity_externalId","entity_id","entity_type","solution_id","solution_externalId","submission_id","entity_name","solution_name","role_title","school_name","school_code","school_externalId","state_name","state_code","state_externalId","district_name","district_code","district_externalId","block_name","block_code","block_externalId","cluster_name","cluster_code","cluster_externalId","completedDate","channel","parent_channel","program_id","program_externalId","program_name","app_name","user_id","private_program","solution_type","organisation_name","ecm_marked_na","board_name","updatedAt","organisation_id","user_type","observed_school_name","observed_school_id","observed_school_code","observed_state_name","observed_state_id","observed_state_code","observed_district_name","observed_district_id","observed_district_code","observed_block_name","observed_block_id","observed_block_code","observed_cluster_name","observed_cluster_id","observed_cluster_code","isRubricDriven","criteriaLevelReport"]},"metricsSpec":[]}}}'
+ml_analytics_druid_project_injestion_spec: '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type": "CloudType","uris": ["CloudURI"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"sl-project","granularitySpec":{"type":"uniform","queryGranularity":"DAY","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"project_updated_date","format":"auto"},"dimensionsSpec":{"dimensions":[]},"metricsSpec":[]}}}'
+ml_analytics_druid_distinctCnt_obs_injestion_spec: '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type":"CloudType","uris":["CloudURI"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"ml-obs-status","granularitySpec":{"type":"uniform","queryGranularity":"none","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"time_stamp","format":"auto"},"dimensionsSpec":{"dimensions":[{"type":"string","name":"program_name"},{"type":"string","name":"program_id"},{"type":"string","name":"solution_name"},{"type":"string","name":"solution_id"},{"type":"string","name":"status"},{"type":"string","name":"state_name"},{"type":"string","name":"state_externalId"},{"type":"string","name":"district_name"},{"type":"string","name":"district_externalId"},{"type":"string","name":"block_name"},{"type":"string","name":"block_externalId"},{"type":"string","name":"organisation_name"},{"type":"string","name":"organisation_id"},{"type":"string","name":"parent_channel"},{"type":"string","name":"solution_type"},{"type":"string","name":"private_program"},{"type":"long","name":"unique_submissions"},{"type":"long","name":"unique_entities"},{"type":"long","name":"unique_users"},{"type":"long","name":"unique_solution"},{"type":"string","name":"time_stamp"}]},"metricsSpec":[]}}}'
+ml_analytics_druid_distinctCnt_obs_domain_injestion_spec: '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type":"CloudType","uris":["CloudURI"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"ml-obs-domain","granularitySpec":{"type":"uniform","queryGranularity":"none","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"time_stamp","format":"auto"},"dimensionsSpec":{"dimensions":[{"type":"string","name":"program_name"},{"type":"string","name":"program_id"},{"type":"string","name":"solution_name"},{"type":"string","name":"solution_id"},{"type":"string","name":"state_name"},{"type":"string","name":"state_externalId"},{"type":"string","name":"district_name"},{"type":"string","name":"district_externalId"},{"type":"string","name":"block_name"},{"type":"string","name":"block_externalId"},{"type":"string","name":"organisation_name"},{"type":"string","name":"organisation_id"},{"type":"string","name":"parent_channel"},{"type":"string","name":"solution_type"},{"type":"string","name":"private_program"},{"type":"string","name":"domain_name"},{"type":"string","name":"domain_externalId"},{"type":"string","name":"domain_level"},{"type":"long","name":"unique_submissions"},{"type":"long","name":"unique_entities"},{"type":"long","name":"unique_users"},{"type":"long","name":"unique_solution"},{"type":"string","name":"time_stamp"}]},"metricsSpec":[]}}}'
+ml_analytics_druid_distinctCnt_obs_domain_criteria_injestion_spec: '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type":"CloudType","uris":["CloudURI"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"ml-obs-domain-criteria","granularitySpec":{"type":"uniform","queryGranularity":"none","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"time_stamp","format":"auto"},"dimensionsSpec":{"dimensions":[{"type":"string","name":"program_name"},{"type":"string","name":"program_id"},{"type":"string","name":"solution_name"},{"type":"string","name":"solution_id"},{"type":"string","name":"state_name"},{"type":"string","name":"state_externalId"},{"type":"string","name":"district_name"},{"type":"string","name":"district_externalId"},{"type":"string","name":"block_name"},{"type":"string","name":"block_externalId"},{"type":"string","name":"organisation_name"},{"type":"string","name":"organisation_id"},{"type":"string","name":"parent_channel"},{"type":"string","name":"solution_type"},{"type":"string","name":"private_program"},{"type":"string","name":"domain_name"},{"type":"string","name":"domain_externalId"},{"type":"string","name":"domain_level"},{"type":"string","name":"criteria_name"},{"type":"string","name":"criteria_score"},{"type":"string","name":"criteria_id"},{"type":"long","name":"unique_submissions"},{"type":"long","name":"unique_entities"},{"type":"long","name":"unique_users"},{"type":"long","name":"unique_solution"},{"type":"string","name":"time_stamp"}]},"metricsSpec":[]}}}'
+ml_analytics_druid_distinctCnt_projects_status_injestion_spec: '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type":"CloudType","uris":["CloudURI"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"ml-project-status","granularitySpec":{"type":"uniform","queryGranularity":"none","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"time_stamp","format":"auto"},"dimensionsSpec":{"dimensions":[{"type":"string","name":"program_name"},{"type":"string","name":"program_id"},{"type":"string","name":"project_title"},{"type":"string","name":"solution_id"},{"type":"string","name":"status_of_project"},{"type":"string","name":"state_name"},{"type":"string","name":"state_externalId"},{"type":"string","name":"district_name"},{"type":"string","name":"district_externalId"},{"type":"string","name":"block_name"},{"type":"string","name":"block_externalId"},{"type":"string","name":"organisation_name"},{"type":"string","name":"organisation_id"},{"type":"string","name":"private_program"},{"type":"string","name":"project_created_type"},{"type":"string","name":"parent_channel"},{"type":"long","name":"unique_projects"},{"type":"long","name":"unique_users"},{"type":"long","name":"unique_solution"},{"type":"long","name":"no_of_imp_with_evidence"},{"type":"long","name":"no_of_imp_with_evidence_inprogress"},{"type":"string","name":"time_stamp"},{"type":"long","name":"no_of_certificate_issued"}]},"metricsSpec":[]}}}'
+ml_analytics_druid_distinctCnt_survey_injestion_spec: '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type":"CloudType","uris":["CloudURI"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"ml-surveydistinctCount-status","granularitySpec":{"type":"uniform","queryGranularity":"none","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"time_stamp","format":"auto"},"dimensionsSpec":{"dimensions":[{"type":"string","name":"program_name"},{"type":"string","name":"program_id"},{"type":"string","name":"survey_name"},{"type":"string","name":"survey_id"},{"type":"string","name":"submission_status"},{"type":"string","name":"state_name"},{"type":"string","name":"state_externalId"},{"type":"string","name":"district_name"},{"type":"string","name":"district_externalId"},{"type":"string","name":"block_name"},{"type":"string","name":"block_externalId"},{"type":"string","name":"organisation_name"},{"type":"string","name":"organisation_id"},{"type":"string","name":"private_program"},{"type":"string","name":"parent_channel"},{"type":"long","name":"unique_users"},{"type":"long","name":"unique_submissions"},{"type":"string","name":"time_stamp"}]},"metricsSpec":[]}}}'
+ml_analytics_obs_distinctCnt_cloud_blob_path: "observation/distinctCount/"
+ml_analytics_obs_distinctCnt_domain_cloud_blob_path: "observation/distinctCount_domain/"
+ml_analytics_obs_distinctCnt_domain_criteria_cloud_blob_path: "observation/distinctCount_domain_criteria/"
+ml_analytics_projects_distinctCnt_cloud_blob_path: "projects/distinctCount/"
ml_analytics_obs_distinctCnt_output_dir: "{{ WORKDIR }}/source/observations/distinctCount/output"
ml_analytics_obs_distinctCnt_domain_output_dir: "{{ WORKDIR }}/source/observations/distinctCount_domain/output"
ml_analytics_obs_distinctCnt_domain_criteria_output_dir: "{{ WORKDIR }}/source/observations/distinctCount_domain_criteria/output"
ml_analytics_projects_distinctCnt_output_dir: "{{ WORKDIR }}/source/projects/distinctCount/output"
-ml_analytics_survey_rollup_azure_blob_path: "survey/rollup/"
-ml_analytics_druid_survey_rollup_injestion_spec: '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type":"azure","uris":["azure://telemetry-data-store/survey/rollup/sl_survey_rollup.json"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"ml-survey-status-rollup","granularitySpec":{"type":"uniform","queryGranularity":"DAY","rollup":true,"segmentGranularity":"DAY"},"timestampSpec":{"column":"updatedAt","format":"iso"},"dimensionsSpec":{"dimensions":["survey_submission_id", "submission_status", "user_id", "user_sub_type", "user_type", "state_externalId", "block_externalId", "district_externalId", "cluster_externalId", "school_externalId", "state_name", "block_name", "district_name", "cluster_name", "school_name", "board_name", "organisation_id", "organisation_name", "program_externalId", "program_id", "program_name", "survey_name", "survey_id", "survey_externalId", "created_date", "submission_date", "updatedAt", "parent_channel",{"type":"long","name":"status_code"}, "solution_name", "solution_id"]},"metricsSpec":[{"name":"count","type":"count"},{"name":"sum___v","type":"longSum","fieldName":"__v"},{"name":"sum_status_code","type":"longMax","fieldName":"status_code"},{"type":"HLLSketchBuild","name":"count_of_user_id","fieldName":"user_id"},{"type":"HLLSketchBuild","name":"count_of_survey_submission_id","fieldName":"survey_submission_id"},{"type":"HLLSketchBuild","name":"count_of_solution_id","fieldName":"solution_id"},{"type":"HLLSketchBuild","name":"count_of_program_id","fieldName":"program_id"}]}}}'
+ml_analytics_survey_distinctCnt_output_dir: "{{ WORKDIR }}/source/survey/distinctCount/output"
+ml_analytics_survey_rollup_cloud_blob_path: "survey/rollup/"
+ml_analytics_druid_survey_rollup_injestion_spec: '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type":"CloudType","uris":["CloudURI"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"ml-survey-status-rollup","granularitySpec":{"type":"uniform","queryGranularity":"DAY","rollup":true,"segmentGranularity":"DAY"},"timestampSpec":{"column":"updatedAt","format":"iso"},"dimensionsSpec":{"dimensions":["survey_submission_id", "submission_status", "user_id", "user_sub_type", "user_type", "state_externalId", "block_externalId", "district_externalId", "cluster_externalId", "school_externalId", "state_name", "block_name", "district_name", "cluster_name", "school_name", "board_name", "organisation_id", "organisation_name", "program_externalId", "program_id", "program_name", "survey_name", "survey_id", "survey_externalId", "created_date", "submission_date", "updatedAt", "parent_channel",{"type":"long","name":"status_code"}, "solution_name", "solution_id"]},"metricsSpec":[{"name":"count","type":"count"},{"name":"sum___v","type":"longSum","fieldName":"__v"},{"name":"sum_status_code","type":"longMax","fieldName":"status_code"},{"type":"HLLSketchBuild","name":"count_of_user_id","fieldName":"user_id"},{"type":"HLLSketchBuild","name":"count_of_survey_submission_id","fieldName":"survey_submission_id"},{"type":"HLLSketchBuild","name":"count_of_solution_id","fieldName":"solution_id"},{"type":"HLLSketchBuild","name":"count_of_program_id","fieldName":"program_id"}]}}}'
ml_analytics_survey_rollup_output_dir: "/opt/sparkjobs/source/survey/output"
-ml_analytics_project_rollup_azure_blob_path: "projects/rollup"
-ml_analytics_observation_rollup_azure_blob_path: "observation/rollup"
+ml_analytics_project_rollup_cloud_blob_path: "projects/rollup"
+ml_analytics_observation_rollup_cloud_blob_path: "observation/rollup"
ml_analytics_project_rollup_output_dir: "/opt/sparkjobs/source/projects/output_rollup"
ml_analytics_observation_status_rollup_output_dir: "/opt/sparkjobs/source/observations/output_rollup"
-ml_analytics_druid_project_rollup_injestion_spec: '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type":"azure","uris":["azure://telemetry-data-store/projects/rollup/projects_rollup.json"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"ml-project-status-rollup","granularitySpec":{"type":"uniform","queryGranularity":"DAY","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"project_updated_date","format":"iso"},"dimensionsSpec":{"dimensions":["project_title","project_goal","area_of_improvement","status_of_project","tasks_name","tasks_status","designation","task_evidence_status","project_id","task_id","project_created_type","parent_channel","program_id","program_name","project_updated_date","createdBy","program_externalId","private_program","task_deleted_flag","project_terms_and_condition","state_externalId","block_externalId","district_externalId","cluster_externalId","school_externalId","state_name","block_name","district_name","cluster_name","school_name","board_name","organisation_name","solution_id","organisation_id",{"name":"status_code","type":"long"}]},"metricsSpec":[{"name":"count","type":"count"},{"name":"sum___v","type":"longSum","fieldName":"__v"},{"name":"sum_status_code","type":"longMax","fieldName":"status_code"},{"type":"HLLSketchBuild","name":"count_of_createBy","fieldName":"createdBy"},{"type":"HLLSketchBuild","name":"count_of_project_id","fieldName":"project_id"},{"type":"HLLSketchBuild","name":"count_of_solution_id","fieldName":"solution_id"},{"type":"HLLSketchBuild","name":"count_of_program_id","fieldName":"program_id"}]}}}'
-ml_analytics_druid_observation_status_rollup_injestion_spec: '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type":"azure","uris":["azure://telemetry-data-store/observation/rollup/observation_status_rollup.json"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"ml-observation-status-rollup","granularitySpec":{"type":"uniform","queryGranularity":"DAY","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"updatedAt","format":"iso"},"dimensionsSpec":{"dimensions":["status","user_id","solution_id","submission_id","entity_name","completedDate","program_id","private_program","solution_type","updatedAt","role_title","solution_name","program_name","channel","parent_channel","block_name","district_name","school_name","cluster_name","state_name","organisation_name","board_name","district_externalId","state_externalId","block_externalId","cluster_externalId","school_externalId","organisation_id",{"type":"long","name":"status_code"}]},"metricsSpec":[{"type":"count","name":"count"},{"type":"longSum","name":"sum___v","fieldName":"__v","expression":null},{"type":"HLLSketchBuild","name":"count_distinct_solution","fieldName":"solution_id","lgK":12,"tgtHllType":"HLL_4","round":false},{"type":"HLLSketchBuild","name":"count_distinct_submission_id","fieldName":"submission_id","lgK":12,"tgtHllType":"HLL_4","round":false},{"type":"HLLSketchBuild","name":"count_distinct_user_id","fieldName":"user_id","lgK":12,"tgtHllType":"HLL_4","round":false}]}}}'
+ml_analytics_druid_project_rollup_injestion_spec: '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type":"CloudType","uris":["CloudURI"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"ml-project-status-rollup","granularitySpec":{"type":"uniform","queryGranularity":"DAY","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"project_updated_date","format":"iso"},"dimensionsSpec":{"dimensions":["project_title","project_goal","area_of_improvement","status_of_project","tasks_name","tasks_status","designation","task_evidence_status","project_id","task_id","project_created_type","parent_channel","program_id","program_name","project_updated_date","createdBy","program_externalId","private_program","task_deleted_flag","project_terms_and_condition","state_externalId","block_externalId","district_externalId","cluster_externalId","school_externalId","state_name","block_name","district_name","cluster_name","school_name","board_name","organisation_name","solution_id","organisation_id",{"name":"status_code","type":"long"}]},"metricsSpec":[{"name":"count","type":"count"},{"name":"sum___v","type":"longSum","fieldName":"__v"},{"name":"sum_status_code","type":"longMax","fieldName":"status_code"},{"type":"HLLSketchBuild","name":"count_of_createBy","fieldName":"createdBy"},{"type":"HLLSketchBuild","name":"count_of_project_id","fieldName":"project_id"},{"type":"HLLSketchBuild","name":"count_of_solution_id","fieldName":"solution_id"},{"type":"HLLSketchBuild","name":"count_of_program_id","fieldName":"program_id"}]}}}'
+ml_analytics_druid_observation_status_rollup_injestion_spec: '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type":"CloudType","uris":["CloudURI"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"ml-observation-status-rollup","granularitySpec":{"type":"uniform","queryGranularity":"DAY","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"updatedAt","format":"iso"},"dimensionsSpec":{"dimensions":["status","user_id","solution_id","submission_id","entity_name","completedDate","program_id","private_program","solution_type","updatedAt","role_title","solution_name","program_name","channel","parent_channel","block_name","district_name","school_name","cluster_name","state_name","organisation_name","board_name","district_externalId","state_externalId","block_externalId","cluster_externalId","school_externalId","organisation_id",{"type":"long","name":"status_code"}]},"metricsSpec":[{"type":"count","name":"count"},{"type":"longSum","name":"sum___v","fieldName":"__v","expression":null},{"type":"HLLSketchBuild","name":"count_distinct_solution","fieldName":"solution_id","lgK":12,"tgtHllType":"HLL_4","round":false},{"type":"HLLSketchBuild","name":"count_distinct_submission_id","fieldName":"submission_id","lgK":12,"tgtHllType":"HLL_4","round":false},{"type":"HLLSketchBuild","name":"count_distinct_user_id","fieldName":"user_id","lgK":12,"tgtHllType":"HLL_4","round":false}]}}}'
ml_analytics_druid_rollup_url: "{{groups['druid'][0]}}:8081"
-ml_analytics_AWS_service_name: "{{ ml_AWS_service_name | default('') }}"
-ml_analytics_AWS_access_key: "{{ ml_AWS_access_key | default('') }}"
-ml_analytics_AWS_secret_access_key: "{{ ml_AWS_secret_access_key | default('') }}"
-ml_analytics_AWS_region_name: "{{ ml_AWS_region_name | default('') }}"
-ml_analytics_AWS_bucket_name: "{{ ml_AWS_bucket_name | default('') }}"
-ml_analytics_druid_distinctCnt_prglevel_projects_status_injestion_spec : '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type":"azure","uris":["azure://telemetry-data-store/projects/distinctCountPrglevel/ml_projects_distinctCount_prgmlevel.json"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"ml-project-programLevel-status","granularitySpec":{"type":"uniform","queryGranularity":"none","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"time_stamp","format":"auto"},"dimensionsSpec":{"dimensions":[{"type":"string","name":"program_name"},{"type":"string","name":"program_id"},{"type":"string","name":"status_of_project"},{"type":"string","name":"state_name"},{"type":"string","name":"state_externalId"},{"type":"string","name":"private_program"},{"type":"string","name":"project_created_type"},{"type":"string","name":"parent_channel"},{"type":"long","name":"unique_projects"},{"type":"long","name":"unique_users"},{"type":"long","name":"no_of_imp_with_evidence"},{"type":"string","name":"time_stamp"}]},"metricsSpec":[]}}}'
+ml_analytics_druid_distinctCnt_prglevel_projects_status_injestion_spec : '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type":"CloudType","uris":["CloudURI"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"ml-project-programLevel-status","granularitySpec":{"type":"uniform","queryGranularity":"none","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"time_stamp","format":"auto"},"dimensionsSpec":{"dimensions":[{"type":"string","name":"program_name"},{"type":"string","name":"program_id"},{"type":"string","name":"status_of_project"},{"type":"string","name":"state_name"},{"type":"string","name":"state_externalId"},{"type":"string","name":"private_program"},{"type":"string","name":"project_created_type"},{"type":"string","name":"parent_channel"},{"type":"long","name":"unique_projects"},{"type":"long","name":"unique_users"},{"type":"long","name":"no_of_imp_with_evidence"},{"type":"string","name":"time_stamp"},{"type":"long","name":"no_of_certificate_issued"}]},"metricsSpec":[]}}}'
ml_analytics_projects_distinctCnt_prglevel_output_dir: "{{ WORKDIR }}/source/projects/distinctCountPrglevel/output"
-ml_analytics_projects_distinctCnt_prglevel_azure_blob_path: "projects/distinctCountPrglevel/"
+ml_analytics_projects_distinctCnt_prglevel_cloud_blob_path: "projects/distinctCountPrglevel/"
ml_analytics_survey_status_output_dir : "{{ WORKDIR }}/source/survey/status/output"
-ml_analytics_survey_azure_blob_path : "survey/status/"
-ml_analytics_druid_survey_status_injestion_spec : '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type":"azure","uris":["azure://telemetry-data-store/survey/status/sl_survey_status.json"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"ml-survey-status","granularitySpec":{"type":"uniform","queryGranularity":"DAY","rollup":true,"segmentGranularity":"DAY"},"timestampSpec":{"column":"updatedAt","format":"iso"},"dimensionsSpec":{"dimensions":["survey_submission_id", "submission_status", "user_id", "user_sub_type", "user_type", "state_externalId", "block_externalId", "district_externalId", "cluster_externalId", "school_externalId", "state_name", "block_name", "district_name", "cluster_name", "school_name", "board_name", "organisation_id", "organisation_name", "program_externalId", "program_id", "program_name", "survey_name", "survey_id", "survey_externalId", "created_date", "submission_date", "updatedAt", "parent_channel", "solution_name", "solution_id","private_program"]},"metricsSpec":[]}}}'
-ml_analytics_slack_token: "{{ ml_slack_token | default('') }}"
-ml_analytics_channel_name: "{{ ml_slack_channel | default('') }}"
-ml_analytics_public_azure_account_name: "{{ ml_public_azure_account | default('') }}"
-ml_analytics_public_azure_access_key: "{{ ml_public_azure_key | default('') }}"
-ml_analytics_public_azure_container_name: "{{ ml_public_azure_container | default('') }}"
-ml_analytics_program_dashboard_azure_blob_path: "{{ ml_program_blob_path | default('') }}"
+ml_analytics_survey_cloud_blob_path: "survey/status/"
+ml_analytics_survey_distinctCnt_cloud_blob_path: "survey/distinctCount/"
+ml_analytics_druid_survey_status_injestion_spec : '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type":"CloudType","uris":["CloudURI"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"ml-survey-status","granularitySpec":{"type":"uniform","queryGranularity":"DAY","rollup":true,"segmentGranularity":"DAY"},"timestampSpec":{"column":"updatedAt","format":"iso"},"dimensionsSpec":{"dimensions":["survey_submission_id", "submission_status", "user_id", "user_sub_type", "user_type", "state_externalId", "block_externalId", "district_externalId", "cluster_externalId", "school_externalId", "state_name", "block_name", "district_name", "cluster_name", "school_name", "board_name", "organisation_id", "organisation_name", "program_externalId", "program_id", "program_name", "survey_name", "survey_id", "survey_externalId", "created_date", "submission_date", "updatedAt", "parent_channel", "solution_name", "solution_id","private_program","state_code","school_code","district_code","block_code","cluster_code"]},"metricsSpec":[]}}}'
+ml_slack_token: "{{ ml_analytics_slack_token | default('') }}"
+ml_slack_channel: "{{ ml_analytics_slack_channel | default('') }}"
+ml_analytics_program_dashboard_cloud_blob_path: "{{ ml_program_blob_path | default('') }}"
ml_druid_query_data: "{{ ml_druid_query | default('') }}"
ml_program_dashboard_data: "{{ ml_program_data | default('') }}"
ml_analytics_druid_query_url: "{{groups['druid'][0]}}:8082"
ml_analytics_druid_observation_query_spec: '{"queryType":"scan","dataSource":"sl-observation","resultFormat":"list","columns":["completedDate","createdAt","createdBy","criteriaExternalId","criteriaId","criteriaName","entityType","entityTypeId","observationId","observationName","observationSubmissionId","questionAnswer","questionECM","questionExternalId","questionId","questionName","questionResponseLabel","questionResponseType","solutionExternalId","solutionId","solutionName","updatedAt","instanceParentId","instanceId","instanceParentResponsetype","instanceParentQuestion","questionSequenceByEcm","maxScore","minScore","percentageScore","pointsBasedScoreInParent","totalScore","scoreAchieved","totalpercentage","instanceParentExternalId","instanceParentEcmSequence","remarks","total_evidences","evidence_count","school","block","district","cluster","state","schoolName","blockName","districtName","clusterName","stateName","schoolExternalId","blockExternalId","districtExternalId","clusterExternalId","stateExternalId","schoolTypes","administrationTypes","instanceParentCriteriaId","instanceParentCriteriaExternalId","instanceParentCriteriaName","role_title","location_validated_with_geotag","distance_in_meters","entity","entityExternalId","entityName","isAPrivateProgram","programId","programName","programExternalId","questionResponseLabel_number","criteriaLevel","criteriaScore","submissionNumber","submissionTitle","channel","parent_channel","user_districtName","user_blockName","user_clusterName","appName","evidences","user_stateName","domainName","domainExternalId","childName","childType","childExternalid","level","criteriaDescription","programDescription","solutionDescription","label","imp_project_id","imp_project_title","imp_project_goal","imp_project_externalId","ancestorName","scoringSystem","domainLevel","domainScore","criteriaLevelReport","user_schoolName","user_schoolId","user_schoolUDISE_code","solution_type","organisation_name","user_boardName","district_externalId","state_externalId","block_externalId","cluster_externalId","organisation_id","user_type"],"intervals":["1901-01-01T00:00:00+00:00/2101-01-01T00:00:00+00:00"]}'
-ml_analytics_druid_observation_batch_ingestion_spec: '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type": "azure","uris": ["azure://telemetry-data-store/observation/batchDeletion/druidData.json"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"sl-observation","granularitySpec":{"type":"uniform","queryGranularity":"DAY","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"completedDate","format":"auto"},"dimensionsSpec":{"dimensions":[{"type":"string","name":"completedDate"},{"type":"string","name":"createdAt"},{"type":"string","name":"createdBy"},{"type":"string","name":"criteriaExternalId"},{"type":"string","name":"criteriaId"},{"type":"string","name":"criteriaName"},{"type":"string","name":"entityType"},{"type":"string","name":"entityTypeId"},{"type":"string","name":"observationId"},{"type":"string","name":"observationName"},{"type":"string","name":"observationSubmissionId"},{"type":"string","name":"questionAnswer"},{"type":"string","name":"questionECM"},{"type":"string","name":"questionExternalId"},{"type":"string","name":"questionId"},{"type":"string","name":"questionName"},{"type":"string","name":"questionResponseLabel"},{"type":"string","name":"questionResponseType"},{"type":"string","name":"solutionExternalId"},{"type":"string","name":"solutionId"},{"type":"string","name":"solutionName"},{"type":"string","name":"updatedAt"},{"type":"string","name":"instanceParentId"},{"type":"string","name":"instanceId"},{"type":"string","name":"instanceParentResponsetype"},{"type":"string","name":"instanceParentQuestion"},{"type":"string","name":"questionSequenceByEcm"},{"type":"string","name":"maxScore"},{"type":"string","name":"minScore"},{"type":"string","name":"percentageScore"},{"type":"string","name":"pointsBasedScoreInParent"},{"type":"string","name":"totalScore"},{"type":"string","name":"scoreAchieved"},{"type":"string","name":"totalpercentage"},{"type":"string","name":"instanceParentExternalId"},{"type":"string","name":"instanceParentEcmSequence"},{"type":"string","name":"remarks"},{"type":"string","name":"total_evidences"},{"type":"string","name":"evidence_count"},{"type":"string","name":"school"},{"type":"string","name":"block"},{"type":"string","name":"district"},{"type":"string","name":"cluster"},{"type":"string","name":"state"},{"type":"string","name":"schoolName"},{"type":"string","name":"blockName"},{"type":"string","name":"districtName"},{"type":"string","name":"clusterName"},{"type":"string","name":"stateName"},{"type":"string","name":"schoolExternalId"},{"type":"string","name":"blockExternalId"},{"type":"string","name":"districtExternalId"},{"type":"string","name":"clusterExternalId"},{"type":"string","name":"stateExternalId"},{"type":"string","name":"schoolTypes"},{"type":"string","name":"administrationTypes"},{"type":"string","name":"instanceParentCriteriaId"},{"type":"string","name":"instanceParentCriteriaExternalId"},{"type":"string","name":"instanceParentCriteriaName"},{"type":"string","name":"role_title"},{"type":"string","name":"location_validated_with_geotag"},{"type":"string","name":"distance_in_meters"},{"type":"string","name":"entity"},{"type":"string","name":"entityExternalId"},{"type":"string","name":"entityName"},{"type":"string","name":"isAPrivateProgram"},{"type":"string","name":"programId"},{"type":"string","name":"programName"},{"type":"string","name":"programExternalId"},{"name":"questionResponseLabel_number","type":"float"},{"type":"string","name":"criteriaLevel"},{"type":"string","name":"criteriaScore"},{"type":"string","name":"submissionNumber"},{"type":"string","name":"submissionTitle"},{"type":"string","name":"channel"},{"type":"string","name":"parent_channel"},{"type":"string","name":"user_districtName"},{"type":"string","name":"user_blockName"},{"type":"string","name":"user_clusterName"},{"type":"string","name":"appName"},{"type":"string","name":"evidences"},{"type":"string","name":"user_stateName"},{"type":"string","name":"domainName"},{"type":"string","name":"domainExternalId"},{"type":"string","name":"childName"},{"type":"string","name":"childType"},{"type":"string","name":"childExternalid"},{"type":"string","name":"level"},{"type":"string","name":"criteriaDescription"},{"type":"string","name":"programDescription"},{"type":"string","name":"solutionDescription"},{"type":"string","name":"label"},{"type":"string","name":"imp_project_id"},{"type":"string","name":"imp_project_title"},{"type":"string","name":"imp_project_goal"},{"type":"string","name":"imp_project_externalId"},{"type":"string","name":"ancestorName"},{"type":"string","name":"scoringSystem"},{"type":"string","name":"domainLevel"},{"type":"string","name":"domainScore"},{"name":"criteriaLevelReport","type":"boolean"},{"type":"string","name":"user_schoolName"},{"type":"string","name":"user_schoolId"},{"type":"string","name":"user_schoolUDISE_code"},{"type":"string","name":"solution_type"},{"type":"string","name":"organisation_name"},{"type":"string","name":"user_boardName"},{"type":"string","name":"district_externalId"},{"type":"string","name":"state_externalId"},{"type":"string","name":"block_externalId"},{"type":"string","name":"cluster_externalId"},{"type":"string","name":"organisation_id"},{"type":"string","name":"user_type"},{"type":"string","name":"isSubmissionDeleted"}]},"metricsSpec":[{"type":"floatSum","name":"question_response_number","fieldName":"questionResponseLabel_number"}]}}}'
-ml_analytics_observation_batchupdate_azure_blob_path: "observation/batchDeletion"
+ml_analytics_druid_observation_batch_ingestion_spec: '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type": "CloudType","uris": ["CloudURI"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"sl-observation","granularitySpec":{"type":"uniform","queryGranularity":"DAY","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"completedDate","format":"auto"},"dimensionsSpec":{"dimensions":[{"type":"string","name":"completedDate"},{"type":"string","name":"createdAt"},{"type":"string","name":"createdBy"},{"type":"string","name":"criteriaExternalId"},{"type":"string","name":"criteriaId"},{"type":"string","name":"criteriaName"},{"type":"string","name":"entityType"},{"type":"string","name":"entityTypeId"},{"type":"string","name":"observationId"},{"type":"string","name":"observationName"},{"type":"string","name":"observationSubmissionId"},{"type":"string","name":"questionAnswer"},{"type":"string","name":"questionECM"},{"type":"string","name":"questionExternalId"},{"type":"string","name":"questionId"},{"type":"string","name":"questionName"},{"type":"string","name":"questionResponseLabel"},{"type":"string","name":"questionResponseType"},{"type":"string","name":"solutionExternalId"},{"type":"string","name":"solutionId"},{"type":"string","name":"solutionName"},{"type":"string","name":"updatedAt"},{"type":"string","name":"instanceParentId"},{"type":"string","name":"instanceId"},{"type":"string","name":"instanceParentResponsetype"},{"type":"string","name":"instanceParentQuestion"},{"type":"string","name":"questionSequenceByEcm"},{"type":"string","name":"maxScore"},{"type":"string","name":"minScore"},{"type":"string","name":"percentageScore"},{"type":"string","name":"pointsBasedScoreInParent"},{"type":"string","name":"totalScore"},{"type":"string","name":"scoreAchieved"},{"type":"string","name":"totalpercentage"},{"type":"string","name":"instanceParentExternalId"},{"type":"string","name":"instanceParentEcmSequence"},{"type":"string","name":"remarks"},{"type":"string","name":"total_evidences"},{"type":"string","name":"evidence_count"},{"type":"string","name":"school"},{"type":"string","name":"block"},{"type":"string","name":"district"},{"type":"string","name":"cluster"},{"type":"string","name":"state"},{"type":"string","name":"schoolName"},{"type":"string","name":"blockName"},{"type":"string","name":"districtName"},{"type":"string","name":"clusterName"},{"type":"string","name":"stateName"},{"type":"string","name":"schoolExternalId"},{"type":"string","name":"blockExternalId"},{"type":"string","name":"districtExternalId"},{"type":"string","name":"clusterExternalId"},{"type":"string","name":"stateExternalId"},{"type":"string","name":"schoolTypes"},{"type":"string","name":"administrationTypes"},{"type":"string","name":"instanceParentCriteriaId"},{"type":"string","name":"instanceParentCriteriaExternalId"},{"type":"string","name":"instanceParentCriteriaName"},{"type":"string","name":"role_title"},{"type":"string","name":"location_validated_with_geotag"},{"type":"string","name":"distance_in_meters"},{"type":"string","name":"entity"},{"type":"string","name":"entityExternalId"},{"type":"string","name":"entityName"},{"type":"string","name":"isAPrivateProgram"},{"type":"string","name":"programId"},{"type":"string","name":"programName"},{"type":"string","name":"programExternalId"},{"name":"questionResponseLabel_number","type":"float"},{"type":"string","name":"criteriaLevel"},{"type":"string","name":"criteriaScore"},{"type":"string","name":"submissionNumber"},{"type":"string","name":"submissionTitle"},{"type":"string","name":"channel"},{"type":"string","name":"parent_channel"},{"type":"string","name":"user_districtName"},{"type":"string","name":"user_blockName"},{"type":"string","name":"user_clusterName"},{"type":"string","name":"appName"},{"type":"string","name":"evidences"},{"type":"string","name":"user_stateName"},{"type":"string","name":"domainName"},{"type":"string","name":"domainExternalId"},{"type":"string","name":"childName"},{"type":"string","name":"childType"},{"type":"string","name":"childExternalid"},{"type":"string","name":"level"},{"type":"string","name":"criteriaDescription"},{"type":"string","name":"programDescription"},{"type":"string","name":"solutionDescription"},{"type":"string","name":"label"},{"type":"string","name":"imp_project_id"},{"type":"string","name":"imp_project_title"},{"type":"string","name":"imp_project_goal"},{"type":"string","name":"imp_project_externalId"},{"type":"string","name":"ancestorName"},{"type":"string","name":"scoringSystem"},{"type":"string","name":"domainLevel"},{"type":"string","name":"domainScore"},{"name":"criteriaLevelReport","type":"boolean"},{"type":"string","name":"user_schoolName"},{"type":"string","name":"user_schoolId"},{"type":"string","name":"user_schoolUDISE_code"},{"type":"string","name":"solution_type"},{"type":"string","name":"organisation_name"},{"type":"string","name":"user_boardName"},{"type":"string","name":"district_externalId"},{"type":"string","name":"state_externalId"},{"type":"string","name":"block_externalId"},{"type":"string","name":"cluster_externalId"},{"type":"string","name":"organisation_id"},{"type":"string","name":"user_type"},{"type":"string","name":"isSubmissionDeleted"}]},"metricsSpec":[{"type":"floatSum","name":"question_response_number","fieldName":"questionResponseLabel_number"}]}}}'
+ml_analytics_observation_batchupdate_cloud_blob_path: "observation/batchDeletion"
ml_analytics_observation_submission_id_filepath: "{{ WORKDIR }}/ml-analytics-service/observations/submissions.csv"
ml_analytics_observation_batchupdate_output_dir: "{{ WORKDIR }}/source/observations/"
+ml_analytics_druid_survey_query_spec : '{"queryType":"scan","dataSource":"sl-survey","resultFormat":"list","columns":["completedDate","createdAt","createdBy","criteriaExternalId","criteriaId","criteriaName","surveyId","surveyName","surveySubmissionId","questionAnswer","questionECM","questionExternalId","questionId","questionName","questionResponseLabel","questionResponseType","solutionExternalId","solutionId","solutionName","updatedAt","instanceParentId","instanceId","instanceParentResponsetype","instanceParentQuestion","questionSequenceByEcm","maxScore","minScore","percentageScore","pointsBasedScoreInParent","totalScore","scoreAchieved","totalpercentage","instanceParentExternalId","instanceParentEcmSequence","remarks","total_evidences","evidence_count","instanceParentCriteriaId","instanceParentCriteriaExternalId","instanceParentCriteriaName","isAPrivateProgram","programId","programName","programExternalId","questionResponseLabel_number","channel","parent_channel","appName","organisation_name","user_subtype","user_type","board_name","district_code","district_name","district_externalId","block_code","block_name","block_externalId","school_code","school_name","school_externalId","cluster_code","cluster_name","cluster_externalId","state_code","state_name","state_externalId","organisation_id","evidences"],"intervals":["1901-01-01T00:00:00+00:00/2101-01-01T00:00:00+00:00"]}'
+ml_analytics_druid_survey_batch_ingestion_spec : '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type":"CloudType","uris": ["CloudURI"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"sl-survey","granularitySpec":{"type":"uniform","queryGranularity":"DAY","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"completedDate","format":"auto"},"dimensionsSpec":{"dimensions":[{"type":"string","name":"completedDate"},{"type":"string","name":"createdAt"},{"type":"string","name":"createdBy"},{"type":"string","name":"criteriaExternalId"},{"type":"string","name":"criteriaId"},{"type":"string","name":"criteriaName"},{"type":"string","name":"surveyId"},{"type":"string","name":"surveyName"},{"type":"string","name":"surveySubmissionId"},{"type":"string","name":"questionAnswer"},{"type":"string","name":"questionECM"},{"type":"string","name":"questionExternalId"},{"type":"string","name":"questionId"},{"type":"string","name":"questionName"},{"type":"string","name":"questionResponseLabel"},{"type":"string","name":"questionResponseType"},{"type":"string","name":"solutionExternalId"},{"type":"string","name":"solutionId"},{"type":"string","name":"solutionName"},{"type":"string","name":"updatedAt"},{"type":"string","name":"instanceParentId"},{"type":"string","name":"instanceId"},{"type":"string","name":"instanceParentResponsetype"},{"type":"string","name":"instanceParentQuestion"},{"type":"string","name":"questionSequenceByEcm"},{"type":"string","name":"maxScore"},{"type":"string","name":"minScore"},{"type":"string","name":"percentageScore"},{"type":"string","name":"pointsBasedScoreInParent"},{"type":"string","name":"totalScore"},{"type":"string","name":"scoreAchieved"},{"type":"string","name":"totalpercentage"},{"type":"string","name":"instanceParentExternalId"},{"type":"string","name":"instanceParentEcmSequence"},{"type":"string","name":"remarks"},{"type":"string","name":"total_evidences"},{"type":"string","name":"evidence_count"},{"type":"string","name":"evidences"},{"type":"string","name":"instanceParentCriteriaId"},{"type":"string","name":"instanceParentCriteriaExternalId"},{"type":"string","name":"instanceParentCriteriaName"},{"type":"string","name":"isAPrivateProgram"},{"type":"string","name":"programId"},{"type":"string","name":"programName"},{"type":"string","name":"programExternalId"},{"name":"questionResponseLabel_number","type":"float"},{"type":"string","name":"channel"},{"type":"string","name":"parent_channel"},{"type":"string","name":"appName"},{"type":"string","name":"organisation_name"},{"type":"string","name":"user_subtype"},{"type":"string","name":"user_type"},{"type":"string","name":"board_name"},{"type":"string","name":"district_code"},{"type":"string","name":"district_name"},{"type":"string","name":"district_externalId"},{"type":"string","name":"block_code"},{"type":"string","name":"block_name"},{"type":"string","name":"block_externalId"},{"type":"string","name":"school_code"},{"type":"string","name":"school_name"},{"type":"string","name":"school_externalId"},{"type":"string","name":"cluster_code"},{"type":"string","name":"cluster_name"},{"type":"string","name":"cluster_externalId"},{"type":"string","name":"state_code"},{"type":"string","name":"state_name"},{"type":"string","name":"state_externalId"},{"type":"string","name":"organisation_id"},{"type":"string","name":"isSubmissionDeleted"}]},"metricsSpec":[{"type":"floatSum","name":"question_response_number","fieldName":"questionResponseLabel_number"}]}}}'
+ml_analytics_survey_batchupdate_cloud_blob_path: "survey/batchDeletion"
+ml_analytics_survey_submission_id_filepath: "{{ WORKDIR }}/ml-analytics-service/survey/submissions.csv"
+ml_analytics_survey_batchupdate_output_dir: "{{ WORKDIR }}/source/survey/"
+ml_analytics_druid_interval_list: '["1901-01-01T00:00:00+00:00/2020-01-01T00:00:00+00:00","2020-01-01T00:00:00+00:00/2020-06-01T00:00:00+00:00","2020-06-01T00:00:00+00:00/2021-01-01T00:00:00+00:00","2021-01-01T00:00:00+00:00/2021-06-01T00:00:00+00:00","2021-06-01T00:00:00+00:00/2022-01-01T00:00:00+00:00","2022-01-01T00:00:00+00:00/2022-03-01T00:00:00+00:00","2022-03-01T00:00:00+00:00/2022-06-01T00:00:00+00:00","2022-06-01T00:00:00+00:00/2022-09-01T00:00:00+00:00","2022-09-01T00:00:00+00:00/2023-01-01T00:00:00+00:00"]'
+ML_Cloud_Service_Provider: "{{ cloud_service_provider | default('azure') }}" ## Valid options - ORACLE, gcloud, aws & azure
+ml_analytics_cloud_package_path: "{{ config_path }}/cloud_storage"
+ml_analytics_cname_url: "{{ cloud_storage_url }}/{{ cloud_storage_samiksha_bucketname }}"
+ml_Cloud_secret_json_file: "cloud_secrets.json"
+ml_Cloud_Secrets:
+ account_name: "{{ cloud_public_storage_accountname }}"
+ account_key: "{{ cloud_public_storage_secret }}"
+cloud_public_storage_accountname: "{{ cloud_public_storage_accountname }}"
+cloud_storage_telemetry_bucketname: "{{ cloud_storage_telemetry_bucketname }}"
+cloud_public_storage_secret: "{{ cloud_public_storage_secret }}"
+cloud_public_storage_region: "{{ cloud_public_storage_region }}"
+cloud_public_storage_endpoint: "{{ cloud_public_storage_endpoint }}"
+ml_analytics_project_program : "{{ WORKDIR }}/ml-analytics-service/projects/program_ids.txt"
+ml_analytics_projects_program_filename: "{{ config_path }}/projects/program_ids.txt"
+ml_analytics_nvsk_imp_projects_data_local_path: "{{ config_path }}/urgent_data_metrics/output/"
+ml_analytics_nvsk_imp_projects_data_blob_path: "Manage_Learn_Data/micro_improvement/"
+ml_analytics_nvsk_imp_projects_state_data_local_path: "{{ config_path }}/urgent_data_metrics/output_state/"
+ml_analytics_nvsk_imp_projects_state_data_blob_path: "Manage_Learn_Data/micro_improvement_state/"
+ml_analytics_authorization_access_token: "{{ ml_analytics_authorization_access_token }}"
+ml_analytics_client_id: "{{ ml_analytics_client_id }}"
+ml_analytics_client_secret: "{{ ml_analytics_client_secret }}"
+ml_analytics_username: "{{ ml_analytics_username }}"
+ml_analytics_password: "{{ ml_analytics_password }}"
+ml_analytics_createdBy: "{{ ml_analytics_createdBy }}"
+ml_analytics_api_base_url: "https://{{ domain_name }}/"
+ml_analytics_reports_store: "{{ cloud_service_provider }}"
+ml_analytics_reports_container: "{{ cloud_storage_privatereports_bucketname }}"
+ml_analytics_driver_memory: "{{ ml_analytics_default_driver_memory | default('5g') }}"
+ml_analytics_executor_memory: "{{ ml_analytics_default_executor_memory | default('5g') }}"
+ml_analytics_batch_cron_minute: "{{ ml_batch_cron_minute | default('30') }}"
+ml_analytics_batch_cron_hour: "{{ ml_batch_cron_hour | default('18') }}"
+ml_analytics_nvsk_cron_minute: "{{ ml_nvsk_cron_minute | default('30') }}"
+ml_analytics_nvsk_cron_hour: "{{ ml_nvsk_cron_hour | default('7') }}"
+ml_analytics_nvsk_cron_weekday: "{{ ml_nvsk_cron_weekday | default('4') }}"
diff --git a/ansible/roles/ml-analytics-service/tasks/main.yml b/ansible/roles/ml-analytics-service/tasks/main.yml
index 0998cf8188..7fbd3fe1ba 100755
--- a/ansible/roles/ml-analytics-service/tasks/main.yml
+++ b/ansible/roles/ml-analytics-service/tasks/main.yml
@@ -26,6 +26,7 @@
- python3-virtualenv
- zip
- unzip
+ - acl
state: present
- name: CHANGE THE OWNERSHIP FOR THIS {{ BASEPATH }} DIRECTORY
@@ -42,21 +43,12 @@
- "{{ WORKDIR }}/faust_as_service"
- name: Delete the virtualenv DIR
- shell: "rm -rf {{ WORKDIR }}/spark_env"
+ shell: "rm -rf {{ WORKDIR }}/spark_venv"
become: true
- name: Install python virtual environment
shell: "cd {{ WORKDIR }} && virtualenv --python=python3.8 spark_venv"
become: true
-
-- name: Change the ownership of virtual env
- become: yes
- file:
- path: "{{ WORKDIR }}/spark_env"
- state: directory
- owner: "{{ USER }}"
- group: "{{ USER }}"
- mode: "0755"
- name: Create necessary logs folders for pipeline
become: yes
@@ -80,6 +72,16 @@
requirements: "{{ WORKDIR }}/ml-analytics-service/requirements.txt"
extra_args: --upgrade
+- name: Change the ownership of virtual env
+ become: yes
+ file:
+ path: "{{ WORKDIR }}/spark_venv"
+ state: directory
+ recurse: yes
+ owner: "{{ USER }}"
+ group: "{{ USER }}"
+ mode: "0755"
+
- name: Creating a faust service shell file in executable mode
copy:
src: files/faust.sh
@@ -105,6 +107,10 @@
dest: "{{ config_path }}/config.ini"
backup: yes
+- name: Copy GCP Secrets to JSON file
+ copy: dest="{{config_path}}/{{ml_Cloud_secret_json_file}}" content="{{ ml_Cloud_Secrets | to_nice_json}}" mode=0400 owner="{{ USER }}"
+ when: ML_Cloud_Service_Provider == 'gcloud'
+
- name: Templating the shell_script_config.j2 to shell_script_config
template:
src: "shell_script_config.j2"
@@ -130,15 +136,15 @@
cron:
name: "Run Batch Ingestion Job"
user: "{{ USER }}"
- minute: "30"
- hour: "18"
+ minute: "{{ ml_analytics_batch_cron_minute }}"
+ hour: "{{ ml_analytics_batch_cron_hour }}"
job: "{{ BASEPATH }}/ml-analytics-service/run.sh > {{ BASEPATH }}/ml-analytics-service/crontab_job.log"
- name: CREATE THE CRON NVSK Data Upload
cron:
name: "NVSK Data Upload JOB"
user: "{{ USER }}"
- minute: "30"
- hour: "7"
- weekday: "4"
- job: "{{ BASEPATH }}/run_weekly.sh > {{ BASEPATH }}/ml-analytics-service/nvsk_data_weekly.logs"
+ minute: "{{ ml_analytics_nvsk_cron_minute }}"
+ hour: "{{ ml_analytics_nvsk_cron_hour }}"
+ weekday: "{{ ml_analytics_nvsk_cron_weekday }}"
+ job: "{{ BASEPATH }}/ml-analytics-service/run_weekly.sh > {{ BASEPATH }}/ml-analytics-service/nvsk_data_weekly.logs"
diff --git a/ansible/roles/ml-analytics-service/templates/config.j2 b/ansible/roles/ml-analytics-service/templates/config.j2
index b4945675d3..935085d36a 100644
--- a/ansible/roles/ml-analytics-service/templates/config.j2
+++ b/ansible/roles/ml-analytics-service/templates/config.j2
@@ -6,6 +6,12 @@ integrated_app = {{ ml_analytics_integrated_app_name }}
integrated_portal = {{ ml_analytics_integrated_portal }}
+
+[API_ENDPOINTS]
+
+base_url = {{ ml_analytics_api_base_url }}
+
+
[API_HEADERS]
content_type = application/json
@@ -14,6 +20,8 @@ authorization = {{ ml_analytics_api_authorization_key }}
internal_access_token = {{ ml_analytics_api_access_token }}
+authorization_access_token = {{ ml_analytics_authorization_access_token }}
+
[ML_SURVEY_SERVICE_URL]
url = {{ ml_analytics_survey_service }}
@@ -24,24 +32,15 @@ user_profile_end_point = assessment/api/v1/userExtension/getProfile/
evidence_base_url = {{ ml_analytics_evidence_base_url }}
-[MONGO]
-
-# --------------
-# Mongo url
-#---------------
-mongo_url = mongodb://{{ ml_analytics_mongodb_url }}
+[MONGO]
-# -----------------------
-# Mongo database name
-# -----------------------
+url = mongodb://{{ ml_analytics_mongodb_url }}
database_name = {{ ml_analytics_mongo_db_name }}
-# -------------------
-# Mongo Collections
-# -------------------
+# ------ Mongo Collections ------- #
observation_sub_collection = {{ ml_analytics_mongo_observation_submission_collection }}
solutions_collection = {{ ml_analytics_mongo_solution_collection }}
@@ -84,13 +83,17 @@ observation_status_injestion_spec = {{ ml_analytics_druid_observation_status_inj
project_injestion_spec = {{ ml_analytics_druid_project_injestion_spec }}
-ml_distinctCnt_obs_status_spec = {{ ml_analytics_druid_distinctCnt_obs_injestion_spec }}
+ml_distinctCnt_obs_status_spec = {{ ml_analytics_druid_distinctCnt_obs_injestion_spec }}
+
+ml_distinctCnt_obs_domain_spec = {{ ml_analytics_druid_distinctCnt_obs_domain_injestion_spec }}
+
+ml_distinctCnt_obs_domain_criteria_spec = {{ ml_analytics_druid_distinctCnt_obs_domain_criteria_injestion_spec }}
-ml_distinctCnt_obs_domain_spec = {{ ml_analytics_druid_distinctCnt_obs_domain_injestion_spec }}
+ml_distinctCnt_projects_status_spec = {{ ml_analytics_druid_distinctCnt_projects_status_injestion_spec }}
-ml_distinctCnt_obs_domain_criteria_spec = {{ ml_analytics_druid_distinctCnt_obs_domain_criteria_injestion_spec }}
+ml_distinctCnt_prglevel_projects_status_spec = {{ ml_analytics_druid_distinctCnt_prglevel_projects_status_injestion_spec }}
-ml_distinctCnt_projects_status_spec = {{ ml_analytics_druid_distinctCnt_projects_status_injestion_spec }}
+ml_distinctCnt_survey_status_spec ={{ ml_analytics_druid_distinctCnt_survey_injestion_spec }}
observation_status_rollup_injestion_spec = {{ ml_analytics_druid_observation_status_rollup_injestion_spec }}
@@ -98,14 +101,19 @@ project_rollup_injestion_spec = {{ ml_analytics_druid_project_rollup_injestion_s
ml_survey_rollup_spec = {{ml_analytics_druid_survey_rollup_injestion_spec}}
-ml_distinctCnt_prglevel_projects_status_spec = {{ ml_analytics_druid_distinctCnt_prglevel_projects_status_injestion_spec}}
-
survey_status_injestion_spec = {{ ml_analytics_druid_survey_status_injestion_spec }}
observation_query_spec = {{ ml_analytics_druid_observation_query_spec }}
observation_injestion_spec = {{ml_analytics_druid_observation_batch_ingestion_spec}}
+survey_query_spec = {{ml_analytics_druid_survey_query_spec}}
+
+survey_injestion_spec = {{ml_analytics_druid_survey_batch_ingestion_spec}}
+
+intervals = {{ml_analytics_druid_interval_list}}
+
+
[KAFKA]
url = {{ ml_analytics_kafka_url }}
@@ -122,128 +130,136 @@ survey_raw_topic = {{ ml_analytics_kafka_survey_topic_name }}
survey_druid_topic = {{ ml_analytics_kafka_survey_druid_topic_name }}
+
[LOGS]
-observation_streaming_success = {{ ml_analytics_observation_log_folder_path }}/success.log
+observation_streaming_success_error = {{ ml_analytics_observation_log_folder_path }}/
-observation_streaming_error = {{ ml_analytics_observation_log_folder_path }}/error.log
+observation_streaming_evidence_success_error = {{ ml_analytics_observation_log_folder_path }}/evidence/
-observation_streaming_evidence_success = {{ ml_analytics_observation_log_folder_path }}/evidence/success.log
+observation_status_success_error = {{ ml_analytics_observation_log_folder_path }}/status/
-observation_streaming_evidence_error = {{ ml_analytics_observation_log_folder_path }}/evidence/error.log
+project_success_error = {{ ml_analytics_project_log_folder_path }}/
-observation_status_success = {{ ml_analytics_observation_log_folder_path }}/status/success.log
+survey_evidence_streaming_success_error = {{ ml_analytics_survey_log_folder_path }}/evidence/
-observation_status_error = {{ ml_analytics_observation_log_folder_path }}/status/error.log
+survey_streaming_success_error = {{ ml_analytics_survey_log_folder_path }}/
-project_success = {{ ml_analytics_project_log_folder_path }}/success.log
+survey_status_success_error = {{ ml_analytics_survey_log_folder_path }}/status/
-project_error = {{ ml_analytics_project_log_folder_path }}/error.log
-survey_evidence_streaming_success = {{ ml_analytics_survey_log_folder_path }}/evidence/success.log
+[CLOUD]
-survey_evidence_streaming_error = {{ ml_analytics_survey_log_folder_path }}/evidence/error.log
+container_name = {{ cloud_storage_telemetry_bucketname }}
-survey_streaming_success = {{ ml_analytics_survey_log_folder_path }}/success.log
+[OUTPUT_DIR]
-survey_streaming_error = {{ ml_analytics_survey_log_folder_path }}/error.log
+project = {{ ml_analytics_project_output_dir }}
-[AZURE]
+observation_status = {{ ml_analytics_observation_status_output_dir }}
-account_name = {{ ml_analytics_azure_account_name }}
+observation_distinctCount_status = {{ ml_analytics_obs_distinctCnt_output_dir }}
-sas_token = {{ ml_analytics_azure_sas_token }}
+observation_distinctCount_domain = {{ ml_analytics_obs_distinctCnt_domain_output_dir }}
-container_name = {{ ml_analytics_azure_container_name }}
+observation_distinctCount_domain_criteria = {{ ml_analytics_obs_distinctCnt_domain_criteria_output_dir }}
-observation_blob_path = {{ ml_analytics_observation_azure_blob_path }}
+projects_distinctCount = {{ ml_analytics_projects_distinctCnt_output_dir }}
-projects_blob_path = {{ ml_analytics_project_azure_blob_path }}
+projects_distinctCount_prgmlevel = {{ ml_analytics_projects_distinctCnt_prglevel_output_dir }}
-observation_distinctCount_blob_path = {{ ml_analytics_obs_distinctCnt_azure_blob_path }}
+survey_distinctCount_status = {{ ml_analytics_survey_distinctCnt_output_dir }}
-observation_distinctCount_domain_blob_path = {{ ml_analytics_obs_distinctCnt_domain_azure_blob_path }}
+project_rollup = {{ ml_analytics_project_rollup_output_dir }}
-observation_distinctCount_domain_criteria_blob_path = {{ ml_analytics_obs_distinctCnt_domain_criteria_azure_blob_path }}
+observation_status_rollup = {{ ml_analytics_observation_status_rollup_output_dir }}
-projects_distinctCnt_blob_path = {{ ml_analytics_projects_distinctCnt_azure_blob_path }}
+survey_rollup = {{ ml_analytics_survey_rollup_output_dir }}
-projects_rollup_blob_path = {{ ml_analytics_project_rollup_azure_blob_path }}
+survey_status = {{ ml_analytics_survey_status_output_dir }}
-observation_rollup_blob_path = {{ ml_analytics_observation_rollup_azure_blob_path }}
+observation_sub_ids = {{ ml_analytics_observation_submission_id_filepath }}
-survey_rollup_blob_path = {{ ml_analytics_survey_rollup_azure_blob_path }}
+observation_druid_data = {{ ml_analytics_observation_batchupdate_output_dir }}
-projects_distinctCnt_prgmlevel_blob_path = {{ml_analytics_projects_distinctCnt_prglevel_azure_blob_path}}
+survey_sub_ids = {{ml_analytics_survey_submission_id_filepath}}
-survey_blob_path = {{ ml_analytics_survey_azure_blob_path }}
+survey_druid_data = {{ml_analytics_survey_batchupdate_output_dir}}
-public_account_name = {{ ml_analytics_public_azure_account_name }}
+program_text_file = {{ml_analytics_project_program}}
-public_access_key = {{ ml_analytics_public_azure_access_key }}
+[SLACK]
-public_container_name = {{ ml_analytics_public_azure_container_name }}
+token = {{ml_slack_token}}
-projects_program_csv = {{ ml_analytics_program_dashboard_azure_blob_path }}
+channel = {{ml_slack_channel}}
-observation_batch_ingestion_data_del = {{ ml_analytics_observation_batchupdate_azure_blob_path }}
-[REDIS]
+[VAM]
-host = {{ ml_analytics_redis_host }}
+druid_query_url = {{ ml_druid_query_data }}
-port = {{ ml_analytics_redis_port }}
+program_dashboard_data = {{ ml_program_dashboard_data }}
-db_name = {{ ml_analytics_redis_db_name }}
-[OUTPUT_DIR]
+[COMMON]
-project = {{ ml_analytics_project_output_dir }}
+cloud_module_path = {{ ml_analytics_cloud_package_path }}
-observation_status = {{ ml_analytics_observation_status_output_dir }}
+observation_blob_path = {{ ml_analytics_observation_cloud_blob_path }}
-observation_distinctCount_status = {{ ml_analytics_obs_distinctCnt_output_dir }}
+projects_blob_path = {{ ml_analytics_project_cloud_blob_path }}
-observation_distinctCount_domain = {{ ml_analytics_obs_distinctCnt_domain_output_dir }}
+observation_distinctCount_blob_path = {{ ml_analytics_obs_distinctCnt_cloud_blob_path }}
-observation_distinctCount_domain_criteria = {{ ml_analytics_obs_distinctCnt_domain_criteria_output_dir }}
+observation_distinctCount_domain_blob_path = {{ ml_analytics_obs_distinctCnt_domain_cloud_blob_path }}
-projects_distinctCount = {{ ml_analytics_projects_distinctCnt_output_dir }}
+observation_distinctCount_domain_criteria_blob_path = {{ ml_analytics_obs_distinctCnt_domain_criteria_cloud_blob_path }}
-project_rollup = {{ ml_analytics_project_rollup_output_dir }}
+projects_distinctCnt_blob_path = {{ ml_analytics_projects_distinctCnt_cloud_blob_path }}
-observation_status_rollup = {{ ml_analytics_observation_status_rollup_output_dir }}
+projects_distinctCnt_prgmlevel_blob_path = {{ ml_analytics_projects_distinctCnt_prglevel_cloud_blob_path }}
-survey_rollup = {{ ml_analytics_survey_rollup_output_dir }}
+survey_distinctCount_blob_path = {{ ml_analytics_survey_distinctCnt_cloud_blob_path }}
-projects_distinctCount_prgmlevel = {{ml_analytics_projects_distinctCnt_prglevel_output_dir}}
+projects_rollup_blob_path = {{ ml_analytics_project_rollup_cloud_blob_path }}
-survey_status = {{ ml_analytics_survey_status_output_dir }}
+observation_rollup_blob_path = {{ ml_analytics_observation_rollup_cloud_blob_path }}
-observation_sub_ids = {{ ml_analytics_observation_submission_id_filepath }}
+survey_rollup_blob_path = {{ ml_analytics_survey_rollup_cloud_blob_path }}
-observation_druid_data = {{ ml_analytics_observation_batchupdate_output_dir }}
+survey_blob_path = {{ ml_analytics_survey_cloud_blob_path }}
-[CLOUD_STORAGE]
+projects_program_csv = {{ ml_analytics_program_dashboard_cloud_blob_path }}
-service_name = {{ ml_analytics_AWS_service_name }}
+observation_batch_ingestion_data_del = {{ ml_analytics_observation_batchupdate_cloud_blob_path }}
-access_key = {{ ml_analytics_AWS_access_key }}
+survey_batch_ingestion_data_del = {{ ml_analytics_survey_batchupdate_cloud_blob_path}}
-secret_access_key = {{ ml_analytics_AWS_secret_access_key }}
+cname_url = {{ ml_analytics_cname_url }}
-region_name = {{ ml_analytics_AWS_region_name }}
+nvsk_imp_projects_data_local_path = {{ ml_analytics_nvsk_imp_projects_data_local_path }}
-bucket_name = {{ ml_analytics_AWS_bucket_name }}
+nvsk_imp_projects_data_blob_path = {{ ml_analytics_nvsk_imp_projects_data_blob_path }}
-[SLACK]
+[API_CREDENTIALS]
-token = {{ ml_analytics_slack_token }}
+client_id = {{ ml_analytics_client_id }}
-channel = {{ ml_analytics_channel_name }}
+client_secret = {{ ml_analytics_client_secret }}
-[VAM]
+username = {{ ml_analytics_username }}
-druid_query_url = {{ ml_druid_query_data }}
+password = {{ ml_analytics_password }}
-program_dashboard_data = {{ ml_program_dashboard_data }}
+[JSON_VARIABLE]
+
+createdBy = {{ ml_analytics_createdBy }}
+
+container = {{ ml_analytics_reports_container }}
+
+store = {{ ml_analytics_reports_store }}
+
+[ML_CORE_SERVICE_URL]
+
+url = {{ ml_analytics_core_service }}
diff --git a/ansible/roles/ml-analytics-service/templates/shell_script_config.j2 b/ansible/roles/ml-analytics-service/templates/shell_script_config.j2
index 6ecdeba31a..e04fbd4418 100644
--- a/ansible/roles/ml-analytics-service/templates/shell_script_config.j2
+++ b/ansible/roles/ml-analytics-service/templates/shell_script_config.j2
@@ -1,2 +1,3 @@
-mongo_url={{ ml_analytics_mongodb_url }}
-mongo_db_name={{ ml_analytics_mongo_db_name }}
+projects_program_filename={{ ml_analytics_projects_program_filename }}
+driver_memory={{ml_analytics_driver_memory}}
+executor_memory={{ml_analytics_executor_memory}}
diff --git a/ansible/roles/mongodb-backup/defaults/main.yml b/ansible/roles/mongodb-backup/defaults/main.yml
index 82a51650a5..547137f0ca 100644
--- a/ansible/roles/mongodb-backup/defaults/main.yml
+++ b/ansible/roles/mongodb-backup/defaults/main.yml
@@ -1,2 +1,4 @@
mongo_backup_dir: '/tmp/mongo-backup'
-mongo_backup_azure_container_name: "{{ mongo_backup_azure_container_name }}"
+
+cloud_storage_mongodbbackup_bucketname: "{{cloud_storage_management_bucketname}}"
+cloud_storage_mongodbbackup_foldername: 'mongodb-backup'
diff --git a/ansible/roles/mongodb-backup/meta/main.yml b/ansible/roles/mongodb-backup/meta/main.yml
deleted file mode 100644
index a124d4f7cb..0000000000
--- a/ansible/roles/mongodb-backup/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - azure-cli
diff --git a/ansible/roles/mongodb-backup/tasks/main.yml b/ansible/roles/mongodb-backup/tasks/main.yml
index 219ced55ea..fe0aa286bd 100644
--- a/ansible/roles/mongodb-backup/tasks/main.yml
+++ b/ansible/roles/mongodb-backup/tasks/main.yml
@@ -1,3 +1,4 @@
+---
- name: Create the directory
file: path={{ mongo_backup_dir }} state=directory recurse=yes
@@ -13,13 +14,43 @@
- name: Compress the backup file
shell: "tar -czf {{ mongo_backup_file_path }}.tar.gz {{ mongo_backup_file_path }}"
-- name: upload to azure
+- name: upload file to azure storage
include_role:
- name: artifacts-upload-azure
+ name: azure-cloud-storage
+ tasks_from: blob-upload.yml
vars:
- artifact: "{{ mongo_backup_file_name }}.tar.gz"
- artifact_path: "{{ mongo_backup_file_path }}.tar.gz"
- artifacts_container: "{{ mongo_backup_azure_container_name }}"
+ blob_container_name: "{{ cloud_storage_mongodbbackup_foldername }}"
+ container_public_access: "off"
+ blob_file_name: "{{ mongo_backup_file_name }}.tar.gz"
+ local_file_or_folder_path: "{{ mongo_backup_file_path }}.tar.gz"
+ storage_account_name: "{{ cloud_management_storage_accountname }}"
+ storage_account_key: "{{ cloud_management_storage_secret }}"
+ when: cloud_service_provider == "azure"
+
+- name: upload file to aws s3
+ include_role:
+ name: aws-cloud-storage
+ tasks_from: upload.yml
+ vars:
+ s3_bucket_name: "{{ cloud_storage_mongodbbackup_bucketname }}"
+ aws_access_key_id: "{{ cloud_management_storage_accountname }}"
+ aws_secret_access_key: "{{ cloud_management_storage_secret }}"
+ aws_default_region: "{{ cloud_public_storage_region }}"
+ local_file_or_folder_path: "{{ mongo_backup_file_path }}.tar.gz"
+ s3_path: "{{ mongo_backup_storage }}/{{ mongo_backup_file_name }}.tar.gz"
+ when: cloud_service_provider == "aws"
+
+- name: upload file to gcloud storage
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: upload.yml
+ vars:
+ gcp_storage_service_account_name: "{{ cloud_management_storage_accountname }}"
+ gcp_storage_key_file: "{{ cloud_management_storage_secret }}"
+ gcp_bucket_name: "{{ cloud_storage_mongodbbackup_bucketname }}"
+ gcp_path: "{{ cloud_storage_mongodbbackup_foldername }}/{{ mongo_backup_file_name }}.tar.gz"
+ local_file_or_folder_path: "{{ mongo_backup_file_path }}.tar.gz"
+ when: cloud_service_provider == "gcloud"
- name: clean up backup dir after upload
file: path={{ mongo_backup_dir }} state=absent
diff --git a/ansible/roles/oci-cli/defaults/main.yml b/ansible/roles/oci-cli/defaults/main.yml
new file mode 100644
index 0000000000..00a8940a29
--- /dev/null
+++ b/ansible/roles/oci-cli/defaults/main.yml
@@ -0,0 +1 @@
+oci_cli_url: https://github.com/oracle/oci-cli/releases/download/v3.22.0/oci-cli-3.22.0-Ubuntu-18.04-Offline.zip
diff --git a/ansible/roles/oci-cli/tasks/main.yml b/ansible/roles/oci-cli/tasks/main.yml
new file mode 100644
index 0000000000..8f21263672
--- /dev/null
+++ b/ansible/roles/oci-cli/tasks/main.yml
@@ -0,0 +1,24 @@
+---
+- name: Download the installation file
+ get_url:
+ url: "{{ oci_cli_url }}"
+ dest: /tmp/ocicli.zip
+
+- name: Installing unzip
+ apt:
+ name: "{{item}}"
+ state: latest
+ with_items:
+ - zip
+ - unzip
+
+- name: Unzip the installer
+ unarchive:
+ src: /tmp/ocicli.zip
+ dest: /tmp/
+ remote_src: yes
+
+- name: install oci cli
+ shell: ./oci-cli-installation/install.sh --install-dir {{ ansible_env.HOME }} --exec-dir {{ ansible_env.HOME }} --script-dir {{ ansible_env.HOME }} --accept-all-defaults
+ args:
+ chdir: /tmp/
diff --git a/ansible/roles/oci-cloud-storage/defaults/main.yml b/ansible/roles/oci-cloud-storage/defaults/main.yml
new file mode 100644
index 0000000000..72727de167
--- /dev/null
+++ b/ansible/roles/oci-cloud-storage/defaults/main.yml
@@ -0,0 +1,3 @@
+oss_bucket_name: ""
+oss_path: ""
+local_file_or_folder_path: ""
diff --git a/ansible/roles/oci-cloud-storage/tasks/delete-folder.yml b/ansible/roles/oci-cloud-storage/tasks/delete-folder.yml
new file mode 100644
index 0000000000..6ed4e6b8b4
--- /dev/null
+++ b/ansible/roles/oci-cloud-storage/tasks/delete-folder.yml
@@ -0,0 +1,5 @@
+---
+- name: delete files and folders recursively
+ shell: "oci os object bulk-delete -ns {{oss_namespace}} -bn {{oss_bucket_name}} --prefix {{oss_path}} --force"
+ async: 3600
+ poll: 10
diff --git a/ansible/roles/oci-cloud-storage/tasks/delete.yml b/ansible/roles/oci-cloud-storage/tasks/delete.yml
new file mode 100644
index 0000000000..65d18843ca
--- /dev/null
+++ b/ansible/roles/oci-cloud-storage/tasks/delete.yml
@@ -0,0 +1,7 @@
+- name: Ensure oci oss bucket exists
+ command: oci os bucket get --name {{ oss_bucket_name }}
+
+- name: Upload to oci oss bucket
+ command: oci os object delete -bn {{ oss_bucket_name }} --name {{ oss_path }} --force
+ async: 3600
+ poll: 10
\ No newline at end of file
diff --git a/ansible/roles/oci-cloud-storage/tasks/download.yml b/ansible/roles/oci-cloud-storage/tasks/download.yml
new file mode 100644
index 0000000000..63e776c348
--- /dev/null
+++ b/ansible/roles/oci-cloud-storage/tasks/download.yml
@@ -0,0 +1,7 @@
+- name: Ensure oci oss bucket exists
+ command: oci os bucket get --name {{ oss_bucket_name }}
+
+- name: download files from oci oss bucket
+ command: oci os object bulk-download -bn {{ oss_bucket_name }} --prefix {{ oss_path }} --dest-dir {{ local_file_or_folder_path }}
+ async: 3600
+ poll: 10
\ No newline at end of file
diff --git a/ansible/roles/oci-cloud-storage/tasks/main.yml b/ansible/roles/oci-cloud-storage/tasks/main.yml
new file mode 100644
index 0000000000..6f9dca6b63
--- /dev/null
+++ b/ansible/roles/oci-cloud-storage/tasks/main.yml
@@ -0,0 +1,18 @@
+---
+- name: delete files from oci oss bucket
+ include: delete.yml
+
+- name: delete folders from oci oss bucket recursively
+ include: delete-folder.yml
+
+
+- name: download file from oss
+ include: download.yml
+
+- name: upload files from a local to oci oss
+ include: upload.yml
+
+- name: upload files and folder from local directory to oci oss
+ include: upload-folder.yml
+
+
diff --git a/ansible/roles/oci-cloud-storage/tasks/oss-delete-batch-no-poll.yml b/ansible/roles/oci-cloud-storage/tasks/oss-delete-batch-no-poll.yml
new file mode 100644
index 0000000000..8ad3f257e3
--- /dev/null
+++ b/ansible/roles/oci-cloud-storage/tasks/oss-delete-batch-no-poll.yml
@@ -0,0 +1,5 @@
+---
+- name: delete files and folders - deleting {{ oss_bucket_name }}/{{ object_prefix }}
+ shell: oci os object bulk-delete -bn {{oss_bucket_name}} --prefix {{object_prefix}} --force
+ async: 1800
+ poll: 0
\ No newline at end of file
diff --git a/ansible/roles/oci-cloud-storage/tasks/oss-upload-batch-no-poll.yml b/ansible/roles/oci-cloud-storage/tasks/oss-upload-batch-no-poll.yml
new file mode 100644
index 0000000000..31794e73e8
--- /dev/null
+++ b/ansible/roles/oci-cloud-storage/tasks/oss-upload-batch-no-poll.yml
@@ -0,0 +1,5 @@
+---
+- name: upload files and folders - uploading {{ oss_bucket_name }}/{{ object_prefix }}
+ shell: oci os object bulk-upload -bn {{oss_bucket_name}} --prefix {{object_prefix}} --src-dir {{local_file_or_folder_path}} --overwrite --content-type auto
+ async: 1800
+ poll: 0
diff --git a/ansible/roles/oci-cloud-storage/tasks/upload-folder.yml b/ansible/roles/oci-cloud-storage/tasks/upload-folder.yml
new file mode 100644
index 0000000000..2e0d45bcb7
--- /dev/null
+++ b/ansible/roles/oci-cloud-storage/tasks/upload-folder.yml
@@ -0,0 +1,15 @@
+---
+- name: Ensure oci oss bucket exists
+ command: oci os bucket get --name {{ oss_bucket_name }}
+
+- name: Upload folder to oci oss bucket
+ command: oci os object bulk-upload -bn {{ oss_bucket_name }} --src-dir {{ local_file_or_folder_path }} --content-type auto --overwrite
+ async: 3600
+ poll: 10
+ when: oss_path|length == 0
+
+- name: Upload folder to oci oss bucket
+ command: oci os object bulk-upload -bn {{ oss_bucket_name }} --prefix {{oss_path}} --src-dir {{ local_file_or_folder_path }} --content-type auto --overwrite
+ async: 3600
+ poll: 10
+ when: oss_path|length > 0
diff --git a/ansible/roles/oci-cloud-storage/tasks/upload.yml b/ansible/roles/oci-cloud-storage/tasks/upload.yml
new file mode 100644
index 0000000000..9e1ceb4289
--- /dev/null
+++ b/ansible/roles/oci-cloud-storage/tasks/upload.yml
@@ -0,0 +1,8 @@
+---
+- name: Ensure oci oss bucket exists
+ command: oci os bucket get --name {{ oss_bucket_name }}
+
+- name: Upload to oci oss bucket
+ command: oci os object put -bn {{ oss_bucket_name }} --name {{ oss_path }} --file {{ local_file_or_folder_path }} --content-type auto --force
+ async: 3600
+ poll: 10
diff --git a/ansible/roles/offline-installer/defaults/main.yml b/ansible/roles/offline-installer/defaults/main.yml
deleted file mode 100644
index d71509fd05..0000000000
--- a/ansible/roles/offline-installer/defaults/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-time: "YEAR-MONTH-DATE-HOUR-MINUTE-SECOND-INSTALLERTYPE"
diff --git a/ansible/roles/offline-installer/tasks/main.yml b/ansible/roles/offline-installer/tasks/main.yml
deleted file mode 100644
index 31bc47f627..0000000000
--- a/ansible/roles/offline-installer/tasks/main.yml
+++ /dev/null
@@ -1,50 +0,0 @@
----
-- name: get the date and time for the artifact
- set_fact:
- time: "{{ lookup('pipe', 'date +\"%Y-%b-%d-%H-%M-%S\"') }}-{{offline_installer_type}}"
- when: uploadInstaller is not defined
-
-- name: copy the env.json file to the repo
- template:
- src: "{{item}}.j2"
- dest: "{{offline_repo_location}}/offline-installer-repo/src/{{item}}"
- mode: '0755'
- with_items:
- - env.json
- when: uploadInstaller is not defined
-
-- name: copy the installer script file and build script for building offline installer
- template:
- src: "{{item}}.j2"
- dest: "{{offline_repo_location}}/offline-installer-repo/{{item}}"
- mode: '0755'
- with_items:
- - build.sh
- - envfile
- - 32-bit-prerequisite.sh
- when: uploadInstaller is not defined
-
-- name: create a directory to store artifacts
- file:
- path: "{{offline_repo_location}}/offline-installer-repo/offline_artifacts/{{time}}"
- state: directory
- recurse: yes
- when: uploadInstaller is not defined
-
-- name: copy the installer script file and build script for building offline installer
- template:
- src: "{{item}}.j2"
- dest: "{{offline_repo_location}}/offline-installer-repo/{{item}}"
- mode: '0755'
- with_items:
- - setupOfflineInstaller.sh
- when: uploadInstaller is not defined
-
-- name: upload to azure
- include: uploadToAzure.yml
- when: uploadInstaller is defined
-
-- name: Delete offline installer folder if any issue
- include: remove.yml
- when: removeOfflineInstallerFolder is defined
-
diff --git a/ansible/roles/offline-installer/tasks/remove.yml b/ansible/roles/offline-installer/tasks/remove.yml
deleted file mode 100644
index da1512de90..0000000000
--- a/ansible/roles/offline-installer/tasks/remove.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-- name: Delete offline installer repo
- file:
- path: "{{offline_repo_location}}/offline-installer-repo/"
- state: absent
-
-- name: Notify build failure
- fail:
- msg: "Please check the build script, it had been failed"
diff --git a/ansible/roles/offline-installer/tasks/uploadToAzure.yml b/ansible/roles/offline-installer/tasks/uploadToAzure.yml
deleted file mode 100644
index 62d4378d10..0000000000
--- a/ansible/roles/offline-installer/tasks/uploadToAzure.yml
+++ /dev/null
@@ -1,102 +0,0 @@
-- name: Ensure azure blob storage container exists
- command: az storage container create --name {{offline_installer_container_name}} --public-access blob
- environment:
- AZURE_STORAGE_ACCOUNT: "{{sunbird_public_storage_account_name}}"
- AZURE_STORAGE_KEY: "{{sunbird_public_storage_account_key}}"
-
-- name: Get the environment name for the artifact name
- shell: "cat {{offline_repo_location}}/offline-installer-repo/src/package.json | jq -r '.name'"
- register: env_name
-
-- name: Display the environment name of the installer
- debug:
- msg: "{{env_name.stdout}}"
-
-- name: Create a variable to inject environment name to upload to azure blob
- set_fact:
- environment_name: "{{ env_name.stdout }}"
-
-- name: Get the version from the package.json file
- shell: "cat {{offline_repo_location}}/offline-installer-repo/src/package.json | jq -r '.version'"
- register: version
-
-- name: Display the version number of the installer
- debug:
- msg: "{{version.stdout}}"
-
-- name: Create a variable to inject version in the template
- set_fact:
- installer_version: "{{ version.stdout }}"
-
-- name: get the directory name
- shell: "ls {{offline_repo_location}}/offline-installer-repo/offline_artifacts/"
- register: folderName
-
-- debug:
- msg: "{{folderName.stdout}}"
-
-- name: set the folder name to copy the artifacts
- set_fact:
- time: "{{folderName.stdout}}"
-
-- name: copy the installer artifacts and metadata files to upload it to azure blob and generate latest.json file
- template:
- src: "{{item}}.j2"
- dest: "{{offline_repo_location}}/offline-installer-repo/{{item}}"
- mode: '0755'
- with_items:
- - artifacts.sh
- - metadata.sh
-
-- name: copy the artifacts and generate the metadata file
- shell: "bash {{offline_repo_location}}/offline-installer-repo/{{item}}"
- args:
- chdir: "{{offline_repo_location}}/offline-installer-repo/"
- with_items:
- - artifacts.sh
- - metadata.sh
-
-- name: Upload to azure blob storage
- command: az storage blob upload-batch --destination {{offline_installer_container_name}} --source "offline_artifacts"
- args:
- chdir: "{{offline_repo_location}}/offline-installer-repo/"
- environment:
- AZURE_STORAGE_ACCOUNT: "{{sunbird_public_storage_account_name}}"
- AZURE_STORAGE_KEY: "{{sunbird_public_storage_account_key}}"
- async: 60
- poll: 10
-
-- name: Upload to latest.json file to blob
- command: az storage blob upload-batch --destination "{{offline_installer_container_name}}/latest" --source "{{folderName.stdout}}"
- args:
- chdir: "{{offline_repo_location}}/offline-installer-repo/offline_artifacts/"
- environment:
- AZURE_STORAGE_ACCOUNT: "{{sunbird_public_storage_account_name}}"
- AZURE_STORAGE_KEY: "{{sunbird_public_storage_account_key}}"
- async: 60
- poll: 10
-
-- name: Create a zip of the folder to archieve the artifact
- archive:
- path:
- - "{{offline_repo_location}}/offline-installer-repo/offline_artifacts/{{folderName.stdout}}"
- dest: "{{offline_repo_location}}/{{offline_installer_type}}.zip"
- owner: jenkins
- group: jenkins
- format: zip
-
-- name: copy latest.json file to archieve it in jenkins
- copy:
- src: "{{offline_repo_location}}/offline-installer-repo/offline_artifacts/{{folderName.stdout}}/latest.json"
- dest: "{{offline_repo_location}}/latest.json"
- owner: jenkins
- group: jenkins
- remote_src: yes
-
-- name: change the ownership of the directory to jenkins user
- file:
- path: "{{offline_repo_location}}"
- state: directory
- recurse: yes
- owner: jenkins
- group: jenkins
\ No newline at end of file
diff --git a/ansible/roles/offline-installer/templates/32-bit-prerequisite.sh.j2 b/ansible/roles/offline-installer/templates/32-bit-prerequisite.sh.j2
deleted file mode 100644
index cbfa755b0e..0000000000
--- a/ansible/roles/offline-installer/templates/32-bit-prerequisite.sh.j2
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-#Build the offline installer
-cd /private/src/
-rm -rf node_modules
-npm install leveldown --verbose
-npm run dist
diff --git a/ansible/roles/offline-installer/templates/Dockerfile.j2 b/ansible/roles/offline-installer/templates/Dockerfile.j2
deleted file mode 100644
index 348c4c6e0a..0000000000
--- a/ansible/roles/offline-installer/templates/Dockerfile.j2
+++ /dev/null
@@ -1,13 +0,0 @@
-#FROM electronuserland/builder:wine
-#MAINTAINER "S M Y ALTAMASH" ""
-#ENV ELECTRON_CACHE="/root/.cache/electron"
-#ENV ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder"
-#ENV GITHUB_ACCESS_TOKEN={{offline_git_access_token}}
-#ENV GITHUB_PRIVATE_REPO={{offline_git_private_repo}}
-#ENV TARGET_ENVIRONMENT={{offline_target_env}}
-#WORKDIR /private/
-#ADD . /private/
-#WORKDIR /private/src/
-#CMD npm install && npm run dist
-#CMD npm run dist-win64
-#CMD npm run dist-linux
diff --git a/ansible/roles/offline-installer/templates/artifacts.sh.j2 b/ansible/roles/offline-installer/templates/artifacts.sh.j2
deleted file mode 100644
index ea5db269de..0000000000
--- a/ansible/roles/offline-installer/templates/artifacts.sh.j2
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/bash
-
-
-if [ "{{offline_installer_type}}" == "windows32bit" ];
-then
- cp '{{offline_repo_location}}/offline-installer-repo/src/dist/{{installer_version}}/win/ia32/{{environment_name}} Setup {{installer_version}}.exe' offline_artifacts/{{time}}/{{environment_name}}_{{installer_version}}_windows32bit.exe
-elif [ "{{offline_installer_type}}" == "windows64bit" ];
-then
- cp '{{offline_repo_location}}/offline-installer-repo/src/dist/{{installer_version}}/win/x64/{{environment_name}} Setup {{installer_version}}.exe' offline_artifacts/{{time}}/{{environment_name}}_{{installer_version}}_windows64bit.exe
-elif [ "{{offline_installer_type}}" == "linux64bit" ];
-then
- cp '{{offline_repo_location}}/offline-installer-repo/src/dist/{{installer_version}}/linux/x64/{{environment_name}}_{{installer_version}}_amd64.deb' offline_artifacts/{{time}}/{{environment_name}}_{{installer_version}}_linux64bit.deb
-fi
-
-
diff --git a/ansible/roles/offline-installer/templates/build.sh.j2 b/ansible/roles/offline-installer/templates/build.sh.j2
deleted file mode 100644
index 720b64b8c6..0000000000
--- a/ansible/roles/offline-installer/templates/build.sh.j2
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/bash
-
-echo "Offline Installer for Sunbird"
-
-# Build script
-set -eo pipefail
-
-if [ "{{offline_installer_type}}" == "windows32bit" ];
-then
-
- docker run --rm -v ${PWD}:/private/ i386/node:8.16.2-stretch bash -x /private/32-bit-prerequisite.sh
-
-fi
-
-#chmod +x setupOfflineInstaller.sh
-docker run --rm --env-file envfile --env ELECTRON_CACHE="/root/.cache/electron" --env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder" -v ${PWD}:/project electronuserland/builder:wine bash -x setupOfflineInstaller.sh
-
-echo "Build the installer succesfully"
diff --git a/ansible/roles/offline-installer/templates/env.json.j2 b/ansible/roles/offline-installer/templates/env.json.j2
deleted file mode 100644
index 8705f96ab9..0000000000
--- a/ansible/roles/offline-installer/templates/env.json.j2
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "APP_BASE_URL": "https://sunbird.org",
- "CHANNEL": "sunbird",
- "TELEMETRY_SYNC_INTERVAL_IN_SECS": 30,
- "APP_ID": "local.sunbird.desktop",
- "TELEMETRY_PACKET_SIZE": 200,
- "APP_BASE_URL_TOKEN": "{{offline_app_base_url_token}}",
- "APP_NAME": "SUNBIRD",
- "MODE": "standalone"
-}
diff --git a/ansible/roles/offline-installer/templates/envfile.j2 b/ansible/roles/offline-installer/templates/envfile.j2
deleted file mode 100644
index 9b98165e0b..0000000000
--- a/ansible/roles/offline-installer/templates/envfile.j2
+++ /dev/null
@@ -1,3 +0,0 @@
-GITHUB_ACCESS_TOKEN={{offline_git_access_token}}
-GITHUB_PRIVATE_REPO={{offline_git_private_repo}}
-TARGET_ENVIRONMENT={{offline_target_env}}
diff --git a/ansible/roles/offline-installer/templates/metadata.sh.j2 b/ansible/roles/offline-installer/templates/metadata.sh.j2
deleted file mode 100644
index 9d7e7a0dd7..0000000000
--- a/ansible/roles/offline-installer/templates/metadata.sh.j2
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/bash
-
-env_name={{environment_name}}
-version={{installer_version}}
-artifactFolder=$(find offline_artifacts/* -type d)
-
-# constructing the latest.json file
-echo "{\"version\":\"${version}\",\"windows\":{\"32bit\":\"${env_name}_${version}_windows32bit.exe\",\"64bit\":\"${env_name}_${version}_windows64bit.exe\"},\"linux\":{\"64bit\":\"${env_name}_${version}_linux64bit.deb\"}}" | jq '.' | tee -a {{offline_repo_location}}/offline-installer-repo/${artifactFolder}/latest.json
diff --git a/ansible/roles/offline-installer/templates/setupOfflineInstaller.sh.j2 b/ansible/roles/offline-installer/templates/setupOfflineInstaller.sh.j2
deleted file mode 100644
index 64b5a019b8..0000000000
--- a/ansible/roles/offline-installer/templates/setupOfflineInstaller.sh.j2
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/bash
-
-# Downgrade the node version
-npm install -g n
-n 8.16
-cd /project/src
-
-if [ "{{offline_installer_type}}" != "windows32bit" ];
-then
-#Build the offline installer
- npm install
- npm run dist
-fi
-
-if [ "{{offline_installer_type}}" == "windows32bit" ];
-then
-# npm run dist
- npm run dist-win32
-elif [ "{{offline_installer_type}}" == "windows64bit" ];
-then
- npm run dist-win64
-elif [ "{{offline_installer_type}}" == "linux64bit" ];
-then
- npm run dist-linux
-fi
diff --git a/ansible/roles/post-install/tasks/knowledge_platform_tasks.yaml b/ansible/roles/post-install/tasks/knowledge_platform_tasks.yaml
index f7a788d417..d88878755d 100644
--- a/ansible/roles/post-install/tasks/knowledge_platform_tasks.yaml
+++ b/ansible/roles/post-install/tasks/knowledge_platform_tasks.yaml
@@ -11,7 +11,7 @@
}
}
with_items: "{{ master_category }}"
- delegate_to: "{{ learning_vm_ip }}"
+ delegate_to: "{{ learningservice_ip }}"
- name: Create Object category
uri:
@@ -73,7 +73,7 @@
}
}
}
- delegate_to: "{{ learning_vm_ip }}"
+ delegate_to: "{{ learningservice_ip }}"
- name: Create framework category
uri:
@@ -89,7 +89,7 @@
}
}
with_items: "{{ framework_category }}"
- delegate_to: "{{ learning_vm_ip }}"
+ delegate_to: "{{ learningservice_ip }}"
- name: Create framework terms
uri:
@@ -105,7 +105,7 @@
}
}
with_items: "{{ framework_terms }}"
- delegate_to: "{{ learning_vm_ip }}"
+ delegate_to: "{{ learningservice_ip }}"
- name: Publish Framework
uri:
@@ -116,7 +116,7 @@
X-Channel-Id: "{{ sunbird_custodian_org_id }}"
body: |-
{}
- delegate_to: "{{ learning_vm_ip }}"
+ delegate_to: "{{ learningservice_ip }}"
- name: Assosiating framework with channel
uri:
@@ -153,7 +153,7 @@
"fields": ["name","identifier","code","description"]
}
}
- delegate_to: "{{ learning_vm_ip }}"
+ delegate_to: "{{ learningservice_ip }}"
register: created_framework
- name: Printing the output
debug:
diff --git a/ansible/roles/post-install/tasks/main.yml b/ansible/roles/post-install/tasks/main.yml
index 121e4d0653..84513e9d84 100644
--- a/ansible/roles/post-install/tasks/main.yml
+++ b/ansible/roles/post-install/tasks/main.yml
@@ -65,6 +65,6 @@
}
}
-# - import_tasks: knowledge_platform_tasks.yaml
-# - import_tasks: user_org.yaml
-# - import_tasks: forms.yaml
+- import_tasks: knowledge_platform_tasks.yaml
+- import_tasks: user_org.yaml
+- import_tasks: forms.yaml
diff --git a/ansible/roles/post-install/tasks/user_org.yaml b/ansible/roles/post-install/tasks/user_org.yaml
index caee5ebaa7..e8460545cb 100644
--- a/ansible/roles/post-install/tasks/user_org.yaml
+++ b/ansible/roles/post-install/tasks/user_org.yaml
@@ -13,10 +13,10 @@
}
with_items: "{{ custodian_org_data }}"
-- name: Restarting leaner service
+- name: Restarting userorg service
shell: |
- kubectl rollout restart deployment -n {{ namespace }} learner
- kubectl rollout status deployment -n {{ namespace }} learner
+ kubectl rollout restart deployment -n {{ namespace }} userorg
+ kubectl rollout status deployment -n {{ namespace }} userorg
- name: Crating Users
uri:
@@ -72,11 +72,6 @@
"operation":"add",
"scope": [{ "organisationId": "{{ sunbird_custodian_org_id }}" }]
},
- {
- "role": "OFFICIAL_TEXTBOOK_BADGE_ISSUER",
- "operation":"add",
- "scope": [{ "organisationId": "{{ sunbird_custodian_org_id }}" }]
- },
{
"role": "PUBLIC",
"operation":"add",
@@ -87,11 +82,6 @@
"operation":"add",
"scope": [{ "organisationId": "{{ sunbird_custodian_org_id }}" }]
},
- {
- "role": "TEACHER_BADGE_ISSUER",
- "operation":"add",
- "scope": [{ "organisationId": "{{ sunbird_custodian_org_id }}" }]
- },
{
"role": "CONTENT_CREATOR",
"operation":"add",
@@ -103,12 +93,7 @@
"scope": [{ "organisationId": "{{ sunbird_custodian_org_id }}" }]
},
{
- "role": "SYSTEM_ADMINISTRATION",
- "operation":"add",
- "scope": [{ "organisationId": "{{ sunbird_custodian_org_id }}" }]
- },
- {
- "role": "ANNOUNCEMENT_SENDER",
+ "role": "SYSTEM_ADMINISTRATION",
"operation":"add",
"scope": [{ "organisationId": "{{ sunbird_custodian_org_id }}" }]
},
@@ -127,26 +112,11 @@
"operation":"add",
"scope": [{ "organisationId": "{{ sunbird_custodian_org_id }}" }]
},
- {
- "role": "CONTENT_REVIEW",
- "operation":"add",
- "scope": [{ "organisationId": "{{ sunbird_custodian_org_id }}" }]
- },
- {
- "role": "CONTENT_CREATION",
- "operation":"add",
- "scope": [{ "organisationId": "{{ sunbird_custodian_org_id }}" }]
- },
{
"role": "MEMBERSHIP_MANAGEMENT",
"operation":"add",
"scope": [{ "organisationId": "{{ sunbird_custodian_org_id }}" }]
},
- {
- "role": "COURSE_CREATOR",
- "operation":"add",
- "scope": [{ "organisationId": "{{ sunbird_custodian_org_id }}" }]
- },
{
"role": "BOOK_CREATOR",
"operation":"add",
diff --git a/ansible/roles/postgres-azure-managed-service-backup/meta/main.yml b/ansible/roles/postgres-azure-managed-service-backup/meta/main.yml
deleted file mode 100644
index 5927f82724..0000000000
--- a/ansible/roles/postgres-azure-managed-service-backup/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- #- azure-cli
\ No newline at end of file
diff --git a/ansible/roles/postgres-azure-managed-service-backup/tasks/main.yml b/ansible/roles/postgres-azure-managed-service-backup/tasks/main.yml
deleted file mode 100644
index cc5ede8e0e..0000000000
--- a/ansible/roles/postgres-azure-managed-service-backup/tasks/main.yml
+++ /dev/null
@@ -1,61 +0,0 @@
-- name: install psycopg2
- package:
- name: python-psycopg2
- state: present
-- name: ensure backup dir exists
- file: path="{{ postgresql_backup_dir }}" state=directory mode=0777
-
-- set_fact:
- postgresql_backup_gzip_file_name: "postgresql_backup_{{ lookup('pipe', 'date +%Z-%Y-%m-%d-%H-%M-%S') }}"
-
-- set_fact:
- postgresql_backup_gzip_file_path: "{{ postgresql_backup_dir }}/{{ postgresql_backup_gzip_file_name }}.zip"
-
-
-- name: Dump an existing database to a file
- postgresql_db:
- login_user: "{{ sunbird_pg_user }}"
- login_password: "{{ postgres_password }}"
- login_host: "{{ postgres_hostname }}"
- name: "{{ item }}"
- state: dump
- target: "{{ postgresql_backup_dir }}/{{ item }}.sql"
- with_items: "{{ db_name.db }}"
- async: 3600
- poll: 10
-
-- name: Dump api manager database to a file
- postgresql_db:
- login_user: "{{ kong_postgres_user }}"
- login_password: "{{ kong_postgres_password }}"
- login_host: "{{ kong_postgres_host }}"
- name: "{{ item }}"
- state: dump
- target: "{{ postgresql_backup_dir }}/{{ item }}_new.sql"
- with_items: "{{ db_name.db[1] }}"
- when: postgres_db_count is defined
- async: 3600
- poll: 10
-
-- name: Create archive of backup directory
- archive: path="{{ postgresql_backup_dir }}/*" dest="{{ postgresql_backup_dir }}/{{ postgresql_backup_gzip_file_name }}.zip" format=zip
- async: 500
- poll: 10
-
-- name: Ensure azure blob storage container exists
- command: az storage container create --name {{ postgresql_backup_azure_container_name }}
- ignore_errors: true
- environment:
- AZURE_STORAGE_ACCOUNT: "{{ sunbird_management_storage_account_name }}"
- AZURE_STORAGE_KEY: "{{ sunbird_management_storage_account_key }}"
-
-- name: Upload to azure blob storage
- command: az storage blob upload --name {{ postgresql_backup_gzip_file_name }}.zip --file {{ postgresql_backup_gzip_file_path }} --container-name {{ postgresql_backup_azure_container_name }}
- environment:
- AZURE_STORAGE_ACCOUNT: "{{ sunbird_management_storage_account_name }}"
- AZURE_STORAGE_KEY: "{{ sunbird_management_storage_account_key }}"
- async: 3600
- poll: 10
-
-- name: clean up backup dir after upload
- file: path="{{ postgresql_backup_dir }}" state=absent
diff --git a/ansible/roles/postgres-azure-managed-service-restore/tasks/main.yml b/ansible/roles/postgres-azure-managed-service-restore/tasks/main.yml
deleted file mode 100644
index ba413e7943..0000000000
--- a/ansible/roles/postgres-azure-managed-service-restore/tasks/main.yml
+++ /dev/null
@@ -1,70 +0,0 @@
-- name: install psycopg2
- package:
- name: python-psycopg2
- state: present
-
-- name: ensure restore dir exists
- file: path="{{ postgresql_restore_dir }}" state=directory mode=0777
-
-- set_fact:
- postgres_backup_filepath: "{{ postgresql_restore_dir }}/{{ postgres_backup_filename }}"
-
-- name: Download backup from azure
- command: az storage blob download -c {{ postgres_backup_azure_container_name }} --name {{ postgres_backup_filename }} -f {{ postgres_backup_filepath }}
- args:
- chdir: "{{ postgres_restore_dir }}"
- async: 100
- poll: 10
-
-- name: unarchive artifact
- unarchive: src={{ postgresql_restore_dir }}/{{ postgres_backup_filename }} dest={{ postgresql_restore_dir }}/ copy=no
-
-- name: Create db's
- postgresql_db:
- login_user: "{{ postgres_user }}"
- login_password: "{{ postgres_password }}"
- login_host: "{{ postgres_hostname }}"
- name: "{{ item }}"
- state: present
- with_items: "{{ db.name }}"
- async: 1000
- poll: 10
-
-- name: Create role and grant access to db's
- postgresql_user:
- login_user: "{{ postgres_user }}"
- login_password: "{{ postgres_password }}"
- login_host: "{{ postgres_hostname }}"
- db: "{{ item[0] }}"
- name: "{{ item[1] }}"
- priv: ALL
- state: present
- role_attr_flags: CREATEROLE
- with_nested:
- - "{{ db.name }}"
- - "{{ db.role }}"
- async: 1000
- poll: 10
-
-- name: create user
- postgresql_user:
- login_user: "{{ postgres_user }}"
- login_password: "{{ postgres_password }}"
- login_host: "{{ postgres_hostname }}"
- name: "{{ item }}"
- with_items: "{{ db.user }}"
- async: 1000
- poll: 10
-
-- name: Restore db's
- postgresql_db:
- login_user: "{{ postgres_user }}"
- login_password: "{{ postgres_password }}"
- login_host: "{{ postgres_hostname }}"
- name: "{{ item }}"
- state: restore
- target: "{{ item }}.sql"
- args:
- chdir: "{{ postgres_restore_dir }}"
- with_items: "{{ db.name }}"
-
diff --git a/ansible/roles/postgres-azure-managed-service-backup/defaults/main.yml b/ansible/roles/postgres-managed-service-backup/defaults/main.yml
similarity index 65%
rename from ansible/roles/postgres-azure-managed-service-backup/defaults/main.yml
rename to ansible/roles/postgres-managed-service-backup/defaults/main.yml
index bf43091813..ed62efd66b 100644
--- a/ansible/roles/postgres-azure-managed-service-backup/defaults/main.yml
+++ b/ansible/roles/postgres-managed-service-backup/defaults/main.yml
@@ -1,10 +1,11 @@
postgresql_user: postgres
postgresql_backup_dir: /tmp/postgres
-postgresql_backup_azure_container_name: postgresql-backup
-
db_name:
db: ['keycloak', 'api_manager_{{ postgres_env }}', 'quartz']
postgres_admin_user: "{{sunbird_pg_user}}"
postgres_hostname: "{{groups['postgresql-master-1'][0]}}"
postgres_password: "{{postgres_password}}"
+
+cloud_storage_postgresqlbackup_bucketname: "{{ cloud_storage_management_bucketname }}"
+cloud_storage_postgresqlbackup_foldername: postgresql-backup
diff --git a/ansible/roles/postgres-managed-service-backup/tasks/main.yml b/ansible/roles/postgres-managed-service-backup/tasks/main.yml
new file mode 100644
index 0000000000..588b8fc5b5
--- /dev/null
+++ b/ansible/roles/postgres-managed-service-backup/tasks/main.yml
@@ -0,0 +1,83 @@
+- name: install psycopg2
+ package:
+ name: python-psycopg2
+ state: present
+- name: ensure backup dir exists
+ file: path="{{ postgresql_backup_dir }}" state=directory mode=0777
+
+- set_fact:
+ postgresql_backup_gzip_file_name: "postgresql_backup_{{ lookup('pipe', 'date +%Z-%Y-%m-%d-%H-%M-%S') }}"
+
+- set_fact:
+ postgresql_backup_gzip_file_path: "{{ postgresql_backup_dir }}/{{ postgresql_backup_gzip_file_name }}.zip"
+
+- name: Dump an existing database to a file
+ postgresql_db:
+ login_user: "{{ sunbird_pg_user }}"
+ login_password: "{{ postgres_password }}"
+ login_host: "{{ postgres_hostname }}"
+ name: "{{ item }}"
+ state: dump
+ target: "{{ postgresql_backup_dir }}/{{ item }}.sql"
+ with_items: "{{ db_name.db }}"
+ async: 3600
+ poll: 10
+
+- name: Dump api manager database to a file
+ postgresql_db:
+ login_user: "{{ kong_postgres_user }}"
+ login_password: "{{ kong_postgres_password }}"
+ login_host: "{{ kong_postgres_host }}"
+ name: "{{ item }}"
+ state: dump
+ target: "{{ postgresql_backup_dir }}/{{ item }}_new.sql"
+ with_items: "{{ db_name.db[1] }}"
+ when: postgres_db_count is defined
+ async: 3600
+ poll: 10
+
+- name: Create archive of backup directory
+ archive: path="{{ postgresql_backup_dir }}/*" dest="{{ postgresql_backup_dir }}/{{ postgresql_backup_gzip_file_name }}.zip" format=zip
+ async: 500
+ poll: 10
+
+- name: upload file to azure storage
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: blob-upload.yml
+ vars:
+ blob_container_name: "{{ cloud_storage_postgresqlbackup_foldername }}"
+ container_public_access: "off"
+ blob_file_name: "{{ postgresql_backup_gzip_file_name }}.zip"
+ local_file_or_folder_path: "{{ postgresql_backup_gzip_file_path }}"
+ storage_account_name: "{{ cloud_management_storage_accountname }}"
+ storage_account_key: "{{ cloud_management_storage_secret }}"
+ when: cloud_service_provider == "azure"
+
+- name: upload file to aws s3
+ include_role:
+ name: aws-cloud-storage
+ tasks_from: upload.yml
+ vars:
+ s3_bucket_name: "{{ cloud_storage_postgresqlbackup_bucketname }}"
+ aws_access_key_id: "{{ cloud_management_storage_accountname }}"
+ aws_secret_access_key: "{{ cloud_management_storage_secret }}"
+ aws_default_region: "{{ cloud_public_storage_region }}"
+ local_file_or_folder_path: "{{ postgresql_backup_gzip_file_path }}"
+ s3_path: "{{ cloud_storage_postgresqlbackup_foldername }}/{{ postgresql_backup_gzip_file_name }}.zip"
+ when: cloud_service_provider == "aws"
+
+- name: upload file to gcloud storage
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: upload.yml
+ vars:
+ gcp_storage_service_account_name: "{{ cloud_management_storage_accountname }}"
+ gcp_storage_key_file: "{{ cloud_management_storage_secret }}"
+ gcp_bucket_name: "{{ cloud_storage_postgresqlbackup_bucketname }}"
+ gcp_path: "{{ cloud_storage_postgresqlbackup_foldername }}/{{ postgresql_backup_gzip_file_name }}.zip"
+ local_file_or_folder_path: "{{ postgresql_backup_gzip_file_path }}"
+ when: cloud_service_provider == "gcloud"
+
+- name: clean up backup dir after upload
+ file: path="{{ postgresql_backup_dir }}" state=absent
diff --git a/ansible/roles/postgres-azure-managed-service-restore/defaults/main.yml b/ansible/roles/postgres-managed-service-restore/defaults/main.yml
similarity index 71%
rename from ansible/roles/postgres-azure-managed-service-restore/defaults/main.yml
rename to ansible/roles/postgres-managed-service-restore/defaults/main.yml
index 6a634e3bfd..8893425000 100644
--- a/ansible/roles/postgres-azure-managed-service-restore/defaults/main.yml
+++ b/ansible/roles/postgres-managed-service-restore/defaults/main.yml
@@ -1,6 +1,4 @@
postgresql_restore_dir: /tmp/postgres-restore
-postgres_backup_azure_container_name: postgresql-backup
-
db:
name: ['keycloak', 'api_manager_{{ postgres_env }}', 'quartz']
role: ['keycloak', 'api_manager_{{ postgres_env }}', 'quartz']
@@ -12,3 +10,6 @@ postgres_user:
postgres_password:
postgres_hostname:
postgres_env:
+
+cloud_storage_postgresqlbackup_bucketname: "{{ cloud_storage_management_bucketname }}"
+cloud_storage_postgresqlbackup_foldername: postgresql-backup
diff --git a/ansible/roles/postgres-managed-service-restore/tasks/main.yml b/ansible/roles/postgres-managed-service-restore/tasks/main.yml
new file mode 100644
index 0000000000..1b499e338f
--- /dev/null
+++ b/ansible/roles/postgres-managed-service-restore/tasks/main.yml
@@ -0,0 +1,100 @@
+- name: install psycopg2
+ package:
+ name: python-psycopg2
+ state: present
+
+- name: ensure restore dir exists
+ file: path="{{ postgresql_restore_dir }}" state=directory mode=0777
+
+- set_fact:
+ postgres_backup_filepath: "{{ postgresql_restore_dir }}/{{ postgres_backup_filename }}"
+
+- name: download a file from azure storage
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: blob-download.yml
+ vars:
+ blob_container_name: "{{ cloud_storage_postgresqlbackup_foldername }}"
+ blob_file_name: "{{ postgres_backup_filename }}"
+ local_file_or_folder_path: "{{ postgres_restore_dir }}/{{ postgres_backup_filepath }}"
+ storage_account_name: "{{ cloud_management_storage_accountname }}"
+ storage_account_key: "{{ cloud_management_storage_secret }}"
+ when: cloud_service_provider == "azure"
+
+- name: download a file from aws s3
+ include_role:
+ name: aws-cloud-storage
+ tasks_from: download.yml
+ vars:
+ s3_bucket_name: "{{ cloud_storage_postgresqlbackup_bucketname }}"
+ aws_access_key_id: "{{ cloud_management_storage_accountname }}"
+ aws_secret_access_key: "{{ cloud_management_storage_secret }}"
+ aws_default_region: "{{ cloud_public_storage_region }}"
+ local_file_or_folder_path: "{{ postgres_restore_dir }}/{{ postgres_backup_filepath }}"
+ s3_path: "{{ cloud_storage_postgresqlbackup_foldername }}/{{ postgres_backup_filename }}"
+ when: cloud_service_provider == "aws"
+
+- name: download file from gcloud storage
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: download.yml
+ vars:
+ gcp_storage_service_account_name: "{{ cloud_management_storage_accountname }}"
+ gcp_storage_key_file: "{{ cloud_management_storage_secret }}"
+ gcp_bucket_name: "{{ cloud_storage_postgresqlbackup_bucketname }}"
+ gcp_path: "{{ cloud_storage_postgresqlbackup_foldername }}/{{ postgres_backup_filename }}"
+ local_file_or_folder_path: "{{ postgres_restore_dir }}/{{ postgres_backup_filepath }}"
+ when: cloud_service_provider == "gcloud"
+
+- name: unarchive artifact
+ unarchive: src={{ postgresql_restore_dir }}/{{ postgres_backup_filename }} dest={{ postgresql_restore_dir }}/ copy=no
+
+- name: Create db's
+ postgresql_db:
+ login_user: "{{ postgres_user }}"
+ login_password: "{{ postgres_password }}"
+ login_host: "{{ postgres_hostname }}"
+ name: "{{ item }}"
+ state: present
+ with_items: "{{ db.name }}"
+ async: 1000
+ poll: 10
+
+- name: Create role and grant access to db's
+ postgresql_user:
+ login_user: "{{ postgres_user }}"
+ login_password: "{{ postgres_password }}"
+ login_host: "{{ postgres_hostname }}"
+ db: "{{ item[0] }}"
+ name: "{{ item[1] }}"
+ priv: ALL
+ state: present
+ role_attr_flags: CREATEROLE
+ with_nested:
+ - "{{ db.name }}"
+ - "{{ db.role }}"
+ async: 1000
+ poll: 10
+
+- name: create user
+ postgresql_user:
+ login_user: "{{ postgres_user }}"
+ login_password: "{{ postgres_password }}"
+ login_host: "{{ postgres_hostname }}"
+ name: "{{ item }}"
+ with_items: "{{ db.user }}"
+ async: 1000
+ poll: 10
+
+- name: Restore db's
+ postgresql_db:
+ login_user: "{{ postgres_user }}"
+ login_password: "{{ postgres_password }}"
+ login_host: "{{ postgres_hostname }}"
+ name: "{{ item }}"
+ state: restore
+ target: "{{ item }}.sql"
+ args:
+ chdir: "{{ postgres_restore_dir }}"
+ with_items: "{{ db.name }}"
+
diff --git a/ansible/roles/postgres-migration/files/sunbird_programs/V5.1.0.sql b/ansible/roles/postgres-migration/files/sunbird_programs/V5.1.0.sql
new file mode 100644
index 0000000000..1780b3118b
--- /dev/null
+++ b/ansible/roles/postgres-migration/files/sunbird_programs/V5.1.0.sql
@@ -0,0 +1 @@
+INSERT INTO "public"."configuration" ("key", "value", "status") VALUES ('PrashnavaliReminder', ' VidyaDaan: Reminder to kindly create or review pending questions for the Project:$projectName by $projectDate. Log in via https://vdn.diksha.gov.in/contribute. Please ignore if work has already been completed.', 'active');
diff --git a/ansible/roles/postgresql-backup/defaults/main.yml b/ansible/roles/postgresql-backup/defaults/main.yml
index d64be512d8..341b1c23ed 100644
--- a/ansible/roles/postgresql-backup/defaults/main.yml
+++ b/ansible/roles/postgresql-backup/defaults/main.yml
@@ -1,5 +1,5 @@
postgresql_backup_dir: /tmp/postgresql-backup
postgresql_user: postgres
-postgresql_backup_azure_container_name: postgresql-backup
-# Set these vars per environment as show in example below
+cloud_storage_postgresqlbackup_bucketname: "{{ cloud_storage_management_bucketname }}"
+cloud_storage_postgresqlbackup_foldername: postgresql-backup
diff --git a/ansible/roles/postgresql-backup/meta/main.yml b/ansible/roles/postgresql-backup/meta/main.yml
deleted file mode 100644
index 23b18a800a..0000000000
--- a/ansible/roles/postgresql-backup/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - azure-cli
\ No newline at end of file
diff --git a/ansible/roles/postgresql-backup/tasks/main.yml b/ansible/roles/postgresql-backup/tasks/main.yml
index c71f15510f..fd4da5b8cc 100644
--- a/ansible/roles/postgresql-backup/tasks/main.yml
+++ b/ansible/roles/postgresql-backup/tasks/main.yml
@@ -13,20 +13,43 @@
async: 3600
poll: 10
-- name: Ensure azure blob storage container exists
- command: az storage container create --name {{ postgresql_backup_azure_container_name }}
- ignore_errors: true
- environment:
- AZURE_STORAGE_ACCOUNT: "{{ sunbird_management_storage_account_name }}"
- AZURE_STORAGE_KEY: "{{ sunbird_management_storage_account_key }}"
+- name: upload file to azure storage
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: blob-upload.yml
+ vars:
+ blob_container_name: "{{ cloud_storage_postgresqlbackup_foldername }}"
+ container_public_access: "off"
+ blob_file_name: "{{ postgresql_backup_gzip_file_name }}"
+ local_file_or_folder_path: "{{ postgresql_backup_gzip_file_path }}"
+ storage_account_name: "{{ cloud_management_storage_accountname }}"
+ storage_account_key: "{{ cloud_management_storage_secret }}"
+ when: cloud_service_provider == "azure"
-- name: Upload to azure blob storage
- command: az storage blob upload --name {{ postgresql_backup_gzip_file_name }} --file {{ postgresql_backup_gzip_file_path }} --container-name {{ postgresql_backup_azure_container_name }}
- environment:
- AZURE_STORAGE_ACCOUNT: "{{ sunbird_management_storage_account_name }}"
- AZURE_STORAGE_KEY: "{{ sunbird_management_storage_account_key }}"
- async: 3600
- poll: 10
+- name: upload file to aws s3
+ include_role:
+ name: aws-cloud-storage
+ tasks_from: upload.yml
+ vars:
+ s3_bucket_name: "{{ cloud_storage_postgresqlbackup_bucketname }}"
+ aws_access_key_id: "{{ cloud_management_storage_accountname }}"
+ aws_secret_access_key: "{{ cloud_management_storage_secret }}"
+ aws_default_region: "{{ cloud_public_storage_region }}"
+ local_file_or_folder_path: "{{ postgresql_backup_gzip_file_path }}"
+ s3_path: "{{ cloud_storage_postgresqlbackup_foldername }}/{{ postgresql_backup_gzip_file_name }}"
+ when: cloud_service_provider == "aws"
+
+- name: upload file to gcloud storage
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: upload.yml
+ vars:
+ gcp_storage_service_account_name: "{{ cloud_management_storage_accountname }}"
+ gcp_storage_key_file: "{{ cloud_management_storage_secret }}"
+ gcp_bucket_name: "{{ cloud_storage_postgresqlbackup_bucketname }}"
+ gcp_path: "{{ cloud_storage_postgresqlbackup_foldername }}/{{ postgresql_backup_gzip_file_name }}"
+ local_file_or_folder_path: "{{ postgresql_backup_gzip_file_path }}"
+ when: cloud_service_provider == "gcloud"
- name: clean up backup dir after upload
file: path="{{ postgresql_backup_dir }}" state=absent
diff --git a/ansible/roles/postgresql-restore/defaults/main.yml b/ansible/roles/postgresql-restore/defaults/main.yml
index 0c6b17f851..feeed7d6bb 100644
--- a/ansible/roles/postgresql-restore/defaults/main.yml
+++ b/ansible/roles/postgresql-restore/defaults/main.yml
@@ -3,10 +3,6 @@ postgresql_user: postgres
postgresql_port: 5432
postgresql_cluster_version: 9.5
postgresql_cluster_name: main
-postgresql_restore_azure_container_name: postgresql-backup
-# Set these vars per environment as show in example below
-# postgresql_restore_azure_storage_account_name: ntpbackupsstaging
-
-# Pass the parameter
-# postgresql_restore_gzip_file_name:
+cloud_storage_postgresqlbackup_bucketname: "{{ cloud_storage_management_bucketname }}"
+cloud_storage_postgresqlbackup_foldername: postgresql-backup
diff --git a/ansible/roles/postgresql-restore/meta/main.yml b/ansible/roles/postgresql-restore/meta/main.yml
deleted file mode 100644
index 23b18a800a..0000000000
--- a/ansible/roles/postgresql-restore/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - azure-cli
\ No newline at end of file
diff --git a/ansible/roles/postgresql-restore/tasks/main.yml b/ansible/roles/postgresql-restore/tasks/main.yml
index 47f9aa0f05..e57a321a29 100644
--- a/ansible/roles/postgresql-restore/tasks/main.yml
+++ b/ansible/roles/postgresql-restore/tasks/main.yml
@@ -4,13 +4,42 @@
- set_fact:
postgresql_restore_gzip_file_path: "{{ postgresql_restore_dir }}/{{ postgresql_restore_gzip_file_name }}"
-- name: Download restore file from azure
- command: az storage blob download --container-name {{ postgresql_restore_azure_container_name }} --name {{ postgresql_restore_gzip_file_name }} --file {{ postgresql_restore_gzip_file_path }}
- environment:
- AZURE_STORAGE_ACCOUNT: "{{ postgresql_restore_azure_storage_account_name }}"
- AZURE_STORAGE_KEY: "{{ postgresql_restore_azure_storage_access_key }}"
- async: 3600
- poll: 10
+- name: download a file from azure storage
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: blob-download.yml
+ vars:
+ blob_container_name: "{{ cloud_storage_postgresqlbackup_foldername }}"
+ blob_file_name: "{{ postgresql_restore_gzip_file_name }}"
+ local_file_or_folder_path: "{{ postgresql_restore_gzip_file_path }}"
+ storage_account_name: "{{ cloud_management_storage_accountname }}"
+ storage_account_key: "{{ cloud_management_storage_secret }}"
+ when: cloud_service_provider == "azure"
+
+- name: download a file from aws s3
+ include_role:
+ name: aws-cloud-storage
+ tasks_from: download.yml
+ vars:
+ s3_bucket_name: "{{ cloud_storage_postgresqlbackup_bucketname }}"
+ aws_access_key_id: "{{ cloud_management_storage_accountname }}"
+ aws_secret_access_key: "{{ cloud_management_storage_secret }}"
+ aws_default_region: "{{ cloud_public_storage_region }}"
+ local_file_or_folder_path: "{{ postgresql_restore_gzip_file_path }}"
+ s3_path: "{{ cloud_storage_postgresqlbackup_foldername }}/{{ postgresql_restore_gzip_file_name }}"
+ when: cloud_service_provider == "aws"
+
+- name: download file from gcloud storage
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: download.yml
+ vars:
+ gcp_storage_service_account_name: "{{ cloud_management_storage_accountname }}"
+ gcp_storage_key_file: "{{ cloud_management_storage_secret }}"
+ gcp_bucket_name: "{{ cloud_storage_postgresqlbackup_bucketname }}"
+ gcp_path: "{{ cloud_storage_postgresqlbackup_foldername }}/{{ postgresql_restore_gzip_file_name }}"
+ local_file_or_folder_path: "{{ postgresql_restore_gzip_file_path }}"
+ when: cloud_service_provider == "gcloud"
- name: ensure postgresql service is stopped
service: name=postgresql state=stopped
@@ -18,15 +47,6 @@
- name: wait for postgresql to be stopped
wait_for: port={{ postgresql_port }} state=stopped
-- name: drop cluster
- command: pg_dropcluster {{ postgresql_cluster_version }} {{ postgresql_cluster_name }}
- become_user: "{{ postgresql_user }}"
- ignore_errors: true
-
-- name: create cluster
- command: pg_createcluster {{ postgresql_cluster_version }} {{ postgresql_cluster_name }}
- become_user: "{{ postgresql_user }}"
-
- name: ensure postgresql service is started
service: name=postgresql state=started
diff --git a/ansible/roles/prometheus-backup-v2/defaults/main.yml b/ansible/roles/prometheus-backup-v2/defaults/main.yml
index 0cd66df647..919dcd82d9 100644
--- a/ansible/roles/prometheus-backup-v2/defaults/main.yml
+++ b/ansible/roles/prometheus-backup-v2/defaults/main.yml
@@ -1,3 +1,5 @@
---
# defaults file for ansible/roles/prometheus-backup-v2
-prometheus_backup_azure_container_name: prometheus-backup
\ No newline at end of file
+
+cloud_storage_prometheusbackup_bucketname: "{{ cloud_storage_management_bucketname }}"
+cloud_storage_prometheusbackup_foldername: prometheus-backup
diff --git a/ansible/roles/prometheus-backup-v2/tasks/main.yml b/ansible/roles/prometheus-backup-v2/tasks/main.yml
index af34edddad..0323ed4d84 100644
--- a/ansible/roles/prometheus-backup-v2/tasks/main.yml
+++ b/ansible/roles/prometheus-backup-v2/tasks/main.yml
@@ -16,13 +16,43 @@
path: "{{ prometheus_data_dir }}/snapshots/{{ snapshot_name }}"
dest: "/tmp/{{ prometheus_backup_prefix }}_{{ snapshot_name }}.tar.gz"
-- name: upload to azure
+- name: upload file to azure storage
include_role:
- name: artifacts-upload-azure
+ name: azure-cloud-storage
+ tasks_from: blob-upload.yml
vars:
- artifact: "{{ prometheus_backup_prefix }}_{{ snapshot_name }}.tar.gz"
- artifact_path: "/tmp/{{ prometheus_backup_prefix }}_{{ snapshot_name }}.tar.gz"
- artifacts_container: "{{ prometheus_backup_azure_container_name }}"
+ blob_container_name: "{{ prometheus_backup_storage }}"
+ container_public_access: "off"
+ blob_file_name: "{{ prometheus_backup_prefix }}_{{ snapshot_name }}.tar.gz"
+ local_file_or_folder_path: "/tmp/{{ prometheus_backup_prefix }}_{{ snapshot_name }}.tar.gz"
+ storage_account_name: "{{ cloud_management_storage_accountname }}"
+ storage_account_key: "{{ cloud_management_storage_secret }}"
+ when: cloud_service_provider == "azure"
+
+- name: upload file to aws s3
+ include_role:
+ name: aws-cloud-storage
+ tasks_from: upload.yml
+ vars:
+ s3_bucket_name: "{{ cloud_storage_prometheusbackup_bucketname }}"
+ aws_access_key_id: "{{ cloud_management_storage_accountname }}"
+ aws_secret_access_key: "{{ cloud_management_storage_secret }}"
+ aws_default_region: "{{ cloud_public_storage_region }}"
+ local_file_or_folder_path: "/tmp/{{ prometheus_backup_prefix }}_{{ snapshot_name }}.tar.gz"
+ s3_path: "{{ cloud_storage_prometheusbackup_foldername }}/{{ prometheus_backup_prefix }}_{{ snapshot_name }}.tar.gz"
+ when: cloud_service_provider == "aws"
+
+- name: upload file to gcloud storage
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: upload.yml
+ vars:
+ gcp_storage_service_account_name: "{{ cloud_management_storage_accountname }}"
+ gcp_storage_key_file: "{{ cloud_management_storage_secret }}"
+ gcp_bucket_name: "{{ cloud_storage_prometheusbackup_bucketname }}"
+ gcp_path: "{{ cloud_storage_prometheusbackup_foldername }}/{{ prometheus_backup_prefix }}_{{ snapshot_name }}.tar.gz"
+ local_file_or_folder_path: "/tmp/{{ prometheus_backup_prefix }}_{{ snapshot_name }}.tar.gz"
+ when: cloud_service_provider == "gcloud"
- name: Deleting snapshot
file:
diff --git a/ansible/roles/prometheus-backup/defaults/main.yml b/ansible/roles/prometheus-backup/defaults/main.yml
index dd43fbf572..e5a4ecdcb3 100644
--- a/ansible/roles/prometheus-backup/defaults/main.yml
+++ b/ansible/roles/prometheus-backup/defaults/main.yml
@@ -1,7 +1,8 @@
prometheus_backup_dir: /tmp/prometheus-backup
-prometheus_backup_azure_container_name: prometheus-backup
-
# Set these vars per environment as show in example below
# Override these values in group_vars
backup_storage_name: backups
-backup_storage_key: ''
\ No newline at end of file
+backup_storage_key: ''
+
+cloud_storage_prometheusbackup_bucketname: "{{ cloud_storage_management_bucketname }}"
+cloud_storage_prometheusbackup_foldername: prometheus-backup
diff --git a/ansible/roles/prometheus-backup/meta/main.yml b/ansible/roles/prometheus-backup/meta/main.yml
deleted file mode 100644
index bb605fa878..0000000000
--- a/ansible/roles/prometheus-backup/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - azure-cli
diff --git a/ansible/roles/prometheus-backup/tasks/main.yml b/ansible/roles/prometheus-backup/tasks/main.yml
index 712dd6faf3..a665540f8a 100644
--- a/ansible/roles/prometheus-backup/tasks/main.yml
+++ b/ansible/roles/prometheus-backup/tasks/main.yml
@@ -25,20 +25,43 @@
shell: "docker service scale monitor_prometheus=1"
delegate_to: "{{groups['swarm-bootstrap-manager'][0]}}"
-- name: Ensure azure blob storage container exists
- command: az storage container create --name {{ prometheus_backup_azure_container_name }}
- ignore_errors: true
- environment:
- AZURE_STORAGE_ACCOUNT: "{{ sunbird_management_storage_account_name }}"
- AZURE_STORAGE_KEY: "{{ sunbird_management_storage_account_key }}"
-
-- name: Upload to azure blob storage
- command: az storage blob upload --name {{ prometheus_backup_gzip_file_name }} --file {{ prometheus_backup_gzip_file_path }} --container-name {{ prometheus_backup_azure_container_name }}
- environment:
- AZURE_STORAGE_ACCOUNT: "{{ sunbird_management_storage_account_name }}"
- AZURE_STORAGE_KEY: "{{ sunbird_management_storage_account_key }}"
- async: 3600
- poll: 10
+- name: upload file to azure storage
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: blob-upload.yml
+ vars:
+ blob_container_name: "{{ cloud_storage_prometheusbackup_foldername }}"
+ container_public_access: "off"
+ blob_file_name: "{{ prometheus_backup_gzip_file_name }}"
+ local_file_or_folder_path: "{{ prometheus_backup_gzip_file_path }}"
+ storage_account_name: "{{ cloud_management_storage_accountname }}"
+ storage_account_key: "{{ cloud_management_storage_secret }}"
+ when: cloud_service_provider == "azure"
+
+- name: upload file to aws s3
+ include_role:
+ name: aws-cloud-storage
+ tasks_from: upload.yml
+ vars:
+ s3_bucket_name: "{{ cloud_storage_prometheusbackup_bucketname }}"
+ aws_access_key_id: "{{ cloud_management_storage_accountname }}"
+ aws_secret_access_key: "{{ cloud_management_storage_secret }}"
+ aws_default_region: "{{ cloud_public_storage_region }}"
+ local_file_or_folder_path: "{{ prometheus_backup_gzip_file_path }}"
+ s3_path: "{{ cloud_storage_prometheusbackup_foldername }}/{{ prometheus_backup_gzip_file_name }}"
+ when: cloud_service_provider == "aws"
+
+- name: upload file to gcloud storage
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: upload.yml
+ vars:
+ gcp_storage_service_account_name: "{{ cloud_management_storage_accountname }}"
+ gcp_storage_key_file: "{{ cloud_management_storage_secret }}"
+ gcp_bucket_name: "{{ cloud_storage_prometheusbackup_bucketname }}"
+ gcp_path: "{{ cloud_storage_prometheusbackup_foldername }}/{{ prometheus_backup_gzip_file_name }}"
+ local_file_or_folder_path: "{{ prometheus_backup_gzip_file_path }}"
+ when: cloud_service_provider == "gcloud"
- name: clean up backup dir after upload
file: path="{{ prometheus_backup_dir }}" state=absent
diff --git a/ansible/roles/prometheus-restore/defaults/main.yml b/ansible/roles/prometheus-restore/defaults/main.yml
index eba83809ca..f5f1511216 100644
--- a/ansible/roles/prometheus-restore/defaults/main.yml
+++ b/ansible/roles/prometheus-restore/defaults/main.yml
@@ -1,2 +1,3 @@
prometheus_backup_dir: /tmp/prometheus-backup
-prometheus_backup_azure_container_name: prometheus-backup
\ No newline at end of file
+cloud_storage_prometheusbackup_bucketname: "{{ cloud_storage_management_bucketname }}"
+cloud_storage_prometheusbackup_foldername: prometheus-backup
diff --git a/ansible/roles/prometheus-restore/tasks/main.yml b/ansible/roles/prometheus-restore/tasks/main.yml
index 686d60e195..60d9bd39bd 100644
--- a/ansible/roles/prometheus-restore/tasks/main.yml
+++ b/ansible/roles/prometheus-restore/tasks/main.yml
@@ -1,20 +1,50 @@
- name: ensure backup dir exists
file: path="{{ prometheus_backup_dir }}" state=directory
-- name: Download backup from azure
- command: az storage blob download -c {{ prometheus_backup_azure_container_name }} --name {{ prometheus_backup_filename }} -f {{ prometheus_backup_filepath }}
- args:
- chdir: "{{ prometheus_backup_dir }}"
- async: 100
- poll: 10
+- name: download a file from azure storage
+ become: true
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: blob-download.yml
+ vars:
+ blob_container_name: "{{ cloud_storage_prometheusbackup_foldername }}"
+ blob_file_name: "{{ prometheus_backup_filename }}"
+ local_file_or_folder_path: "{{ prometheus_backup_dir }}/{{ prometheus_backup_filepath }}"
+ storage_account_name: "{{ cloud_management_storage_accountname }}"
+ storage_account_key: "{{ cloud_management_storage_secret }}"
+ when: cloud_service_provider == "azure"
+
+- name: download a file from aws s3
+ include_role:
+ name: aws-cloud-storage
+ tasks_from: download.yml
+ vars:
+ s3_bucket_name: "{{ cloud_storage_prometheusbackup_bucketname }}"
+ aws_access_key_id: "{{ cloud_management_storage_accountname }}"
+ aws_secret_access_key: "{{ cloud_management_storage_secret }}"
+ aws_default_region: "{{ cloud_public_storage_region }}"
+ local_file_or_folder_path: "{{ prometheus_backup_dir }}/{{ prometheus_backup_filepath }}"
+ s3_path: "{{ cloud_storage_prometheusbackup_foldername }}/{{ prometheus_backup_filename }}"
+ when: cloud_service_provider == "aws"
+
+- name: download file from gcloud storage
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: download.yml
+ vars:
+ gcp_storage_service_account_name: "{{ cloud_management_storage_accountname }}"
+ gcp_storage_key_file: "{{ cloud_management_storage_secret }}"
+ gcp_bucket_name: "{{ cloud_storage_prometheusbackup_bucketname }}"
+ gcp_path: "{{ cloud_storage_prometheusbackup_foldername }}/{{ prometheus_backup_filename }}"
+ local_file_or_folder_path: "{{ prometheus_backup_dir }}/{{ prometheus_backup_filepath }}"
+ when: cloud_service_provider == "gcloud"
- name: ensure prometheus is stopped
shell: "docker service scale {{prometheus_service_name}}=0 && sleep 10"
delegate_to: "{{manager_host}}" #variable is passed as extra vars from jenkins
-
- name: Unarchive backup
- become: yes
+ become: true
unarchive:
src: "{{ prometheus_backup_dir }}/{{ prometheus_backup_filename }}"
dest: "{{prometheus_data_dir}}/"
@@ -29,4 +59,3 @@
- name: clean up backup dir
file: path="{{ prometheus_backup_dir }}" state=absent
-
diff --git a/ansible/roles/redis-backup/defaults/main.yml b/ansible/roles/redis-backup/defaults/main.yml
index e00b84ce4b..54b7c60a89 100644
--- a/ansible/roles/redis-backup/defaults/main.yml
+++ b/ansible/roles/redis-backup/defaults/main.yml
@@ -1,3 +1,5 @@
redis_backup_dir: /tmp/redis-backup
-nodebb_redis_backup_azure_container_name: nodebb-redis-backup
learner_user: learning
+
+cloud_storage_redisbackup_bucketname: "{{ cloud_storage_management_bucketname }}"
+cloud_storage_redisbackup_foldername: nodebb-redis-backup
diff --git a/ansible/roles/redis-backup/meta/main.yml b/ansible/roles/redis-backup/meta/main.yml
deleted file mode 100644
index a124d4f7cb..0000000000
--- a/ansible/roles/redis-backup/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - azure-cli
diff --git a/ansible/roles/redis-backup/tasks/main.yml b/ansible/roles/redis-backup/tasks/main.yml
index 3519bb1ea9..9863fe5f28 100644
--- a/ansible/roles/redis-backup/tasks/main.yml
+++ b/ansible/roles/redis-backup/tasks/main.yml
@@ -1,6 +1,5 @@
- name: Create the directory
file: path={{ redis_backup_dir }} state=directory recurse=yes
-
- set_fact:
redis_backup_file_name: "redis-backup-{{ lookup('pipe', 'date +%Y-%m-%d-%T') }}.rdb"
@@ -8,22 +7,50 @@
- set_fact:
redis_backup_file_path: "{{ redis_backup_dir }}/{{ redis_backup_file_name }}"
-
- name: copy dump.rdb file
copy:
src: /home/learning/redis-stable/dump.rdb
dest: "{{ redis_backup_dir }}/{{ redis_backup_file_name }}"
remote_src: yes
-
-- name: upload to azure
+- name: upload file to azure storage
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: blob-upload.yml
+ vars:
+ blob_container_name: "{{ cloud_storage_redisbackup_foldername }}"
+ container_public_access: "off"
+ blob_file_name: "{{ redis_backup_file_name }}"
+ local_file_or_folder_path: "{{ redis_backup_file_path }}"
+ storage_account_name: "{{ cloud_management_storage_accountname }}"
+ storage_account_key: "{{ cloud_management_storage_secret }}"
+ when: cloud_service_provider == "azure"
+
+- name: upload file to aws s3
include_role:
- name: artifacts-upload-azure
+ name: aws-cloud-storage
+ tasks_from: upload.yml
vars:
- artifact: "{{ redis_backup_file_name }}"
- artifact_path: "{{ redis_backup_file_path }}"
- artifacts_container: "{{ nodebb_redis_backup_azure_container_name }}"
+ s3_bucket_name: "{{ cloud_storage_redisbackup_bucketname }}"
+ aws_access_key_id: "{{ cloud_management_storage_accountname }}"
+ aws_secret_access_key: "{{ cloud_management_storage_secret }}"
+ aws_default_region: "{{ cloud_public_storage_region }}"
+ local_file_or_folder_path: "{{ redis_backup_file_path }}"
+ s3_path: "{{ cloud_storage_redisbackup_foldername }}/{{ redis_backup_file_name }}"
+ when: cloud_service_provider == "aws"
+- name: upload file to gcloud storage
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: upload.yml
+ vars:
+ gcp_storage_service_account_name: "{{ cloud_management_storage_accountname }}"
+ gcp_storage_key_file: "{{ cloud_management_storage_secret }}"
+ gcp_bucket_name: "{{ cloud_storage_redisbackup_bucketname }}"
+ gcp_path: "{{ cloud_storage_redisbackup_foldername }}/{{ redis_backup_file_name }}"
+ local_file_or_folder_path: "{{ redis_backup_file_path }}"
+ when: cloud_service_provider == "gcloud"
+
- name: clean up backup dir after upload
file: path={{ redis_backup_dir }} state=absent
diff --git a/ansible/roles/reset-docker/tasks/main.yml b/ansible/roles/reset-docker/tasks/main.yml
index bdc4ebc59f..12eb38609d 100644
--- a/ansible/roles/reset-docker/tasks/main.yml
+++ b/ansible/roles/reset-docker/tasks/main.yml
@@ -2,8 +2,8 @@
shell: "docker service rm actor-service"
ignore_errors: yes
-- name: Remove learner service
- shell: "docker service rm learner-service"
+- name: Remove userorg service
+ shell: "docker service rm userorg-service"
ignore_errors: yes
- name: Remove player service
diff --git a/ansible/roles/setup-kafka/defaults/main.yml b/ansible/roles/setup-kafka/defaults/main.yml
index cb2bb2f38f..fe276ab941 100644
--- a/ansible/roles/setup-kafka/defaults/main.yml
+++ b/ansible/roles/setup-kafka/defaults/main.yml
@@ -3,7 +3,7 @@ env: dev
ml_kafka_topic_create: false
uci_kafka_topic_create: false
av_kafka_topic_create: false
-
+zookeeper_host: "{{ groups['zookeeper'][0] | default('localhost')}}"
processing_kafka_overriden_topics:
- name: lms.audit.events
retention_time: 172800000
@@ -83,6 +83,10 @@ ml_service_topics:
retention_time: 172800000
replication_factor: 1
num_of_partitions: 1
+ - name: programuser.info
+ retention_time: 172800000
+ replication_factor: 1
+ num_of_partitions: 1
uci_service_topics:
- name: inbound-error
diff --git a/ansible/roles/setup-kafka/tasks/main.yml b/ansible/roles/setup-kafka/tasks/main.yml
index 502c627bdc..28ef75f422 100644
--- a/ansible/roles/setup-kafka/tasks/main.yml
+++ b/ansible/roles/setup-kafka/tasks/main.yml
@@ -1,5 +1,5 @@
- name: create topics
- command: /opt/kafka/bin/kafka-topics.sh --zookeeper localhost:2181 --create --topic {{env_name}}.{{item.name}} --partitions {{ item.num_of_partitions }} --replication-factor {{ item.replication_factor }}
+ command: /opt/kafka/bin/kafka-topics.sh --zookeeper {{zookeeper_host}}:2181 --create --topic {{env_name}}.{{item.name}} --partitions {{ item.num_of_partitions }} --replication-factor {{ item.replication_factor }}
with_items: "{{processing_kafka_topics}}"
ignore_errors: true
when: kafka_id=="1"
@@ -7,14 +7,14 @@
- processing-kafka
- name: override retention time
- command: /opt/kafka/bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic {{env_name}}.{{item.name}} --config retention.ms={{ item.retention_time }}
+ command: /opt/kafka/bin/kafka-topics.sh --zookeeper {{zookeeper_host}}:2181 --alter --topic {{env_name}}.{{item.name}} --config retention.ms={{ item.retention_time }}
with_items: "{{processing_kafka_overriden_topics}}"
when: kafka_id=="1" and item.retention_time is defined
tags:
- processing-kafka
- name: create topics
- command: /opt/kafka/bin/kafka-topics.sh --zookeeper localhost:2181 --create --topic {{env_name}}.{{item.name}} --partitions {{ item.num_of_partitions }} --replication-factor {{ item.replication_factor }}
+ command: /opt/kafka/bin/kafka-topics.sh --zookeeper {{zookeeper_host}}:2181 --create --topic {{env_name}}.{{item.name}} --partitions {{ item.num_of_partitions }} --replication-factor {{ item.replication_factor }}
with_items: "{{ml_service_topics}}"
ignore_errors: true
when: kafka_id=="1" and ml_kafka_topic_create
@@ -22,7 +22,7 @@
- processing-kafka
- name: create topics
- command: /opt/kafka/bin/kafka-topics.sh --zookeeper localhost:2181 --create --topic {{env_name}}.{{item.name}} --partitions {{ item.num_of_partitions }} --replication-factor {{ item.replication_factor }}
+ command: /opt/kafka/bin/kafka-topics.sh --zookeeper {{zookeeper_host}}:2181 --create --topic {{env_name}}.{{item.name}} --partitions {{ item.num_of_partitions }} --replication-factor {{ item.replication_factor }}
with_items: "{{uci_service_topics}}"
ignore_errors: true
when: kafka_id=="1" and uci_kafka_topic_create
@@ -30,7 +30,7 @@
- processing-kafka
- name: create topics
- command: /opt/kafka/bin/kafka-topics.sh --zookeeper localhost:2181 --create --topic {{env_name}}.{{item.name}} --partitions {{ item.num_of_partitions }} --replication-factor {{ item.replication_factor }}
+ command: /opt/kafka/bin/kafka-topics.sh --zookeeper {{zookeeper_host}}:2181 --create --topic {{env_name}}.{{item.name}} --partitions {{ item.num_of_partitions }} --replication-factor {{ item.replication_factor }}
with_items: "{{av_service_topics}}"
ignore_errors: true
when: kafka_id=="1" and av_kafka_topic_create
diff --git a/ansible/roles/stack-keycloak/tasks/common.yml b/ansible/roles/stack-keycloak/tasks/common.yml
index 14291ed1f3..1440dcb0dd 100644
--- a/ansible/roles/stack-keycloak/tasks/common.yml
+++ b/ansible/roles/stack-keycloak/tasks/common.yml
@@ -19,7 +19,7 @@
# - name: Save content configurations into an env file
# template: src=sunbird_content.env dest=/home/deployer/env/sunbird_content.env mode=0644
-# - name: Save learner configurations into an env file
+# - name: Save userorg configurations into an env file
# template: src=sunbird_learner.env dest=/home/deployer/env/sunbird_learner.env mode=0644
# - name: Save player configurations into an env file
diff --git a/ansible/roles/stack-monitor-stateful/defaults/main.yml b/ansible/roles/stack-monitor-stateful/defaults/main.yml
index 09f83cce2b..ad3e2323fa 100644
--- a/ansible/roles/stack-monitor-stateful/defaults/main.yml
+++ b/ansible/roles/stack-monitor-stateful/defaults/main.yml
@@ -106,7 +106,7 @@ service_teams:
alerts_mailing_list: "{{ app_alerts_mailing_list | default(devops_alerts_mailing_list) }}"
services:
- actor-service
- - learner-service
+ - userorg-service
- lms-service
- content-service
- player_player
diff --git a/ansible/roles/stack-monitor/defaults/main.yml b/ansible/roles/stack-monitor/defaults/main.yml
index 457e201b76..3eb2b5ba26 100644
--- a/ansible/roles/stack-monitor/defaults/main.yml
+++ b/ansible/roles/stack-monitor/defaults/main.yml
@@ -95,7 +95,7 @@ service_teams:
alerts_mailing_list: "{{ app_alerts_mailing_list | default(devops_alerts_mailing_list) }}"
services:
- actor-service
- - learner-service
+ - userorg-service
- lms-service
- content-service
- player_player
diff --git a/ansible/roles/stack-proxy-private/templates/proxy-default.conf b/ansible/roles/stack-proxy-private/templates/proxy-default.conf
index 60433f936f..81a96a985c 100644
--- a/ansible/roles/stack-proxy-private/templates/proxy-default.conf
+++ b/ansible/roles/stack-proxy-private/templates/proxy-default.conf
@@ -4,9 +4,9 @@ server {
resolver 127.0.0.11 valid=5s;
- location /learner/ {
- rewrite ^/learner/(.*) /$1 break;
- proxy_pass http://learner-service:9000;
+ location /userorg/ {
+ rewrite ^/userorg/(.*) /$1 break;
+ proxy_pass http://userorg-service:9000;
}
location /api/ {
rewrite ^/api/(.*) /$1 break;
diff --git a/ansible/roles/stack-proxy/defaults/main.yml b/ansible/roles/stack-proxy/defaults/main.yml
index 579709e412..ab1524cf72 100644
--- a/ansible/roles/stack-proxy/defaults/main.yml
+++ b/ansible/roles/stack-proxy/defaults/main.yml
@@ -37,8 +37,4 @@ prometheus_route_prefix: prometheus
prometheus_alertmanager_route_prefix: alertmanager
ekstep_s3_env: "{{sunbird_env}}"
registry_url: "{{proto}}://{{proxy_server_name}}/registry"
-kibana_service: "{{swarm_dashboard}}:5601"
-
-upstream_url: "ekstep-public-{{ekstep_s3_env}}.s3-ap-south-1.amazonaws.com"
-plugin_upstream_url: "ekstep-public-{{ekstep_s3_env}}.s3-ap-south-1.amazonaws.com"
-sunbird_offline_azure_storage_account_url: "{{ sunbird_public_storage_account_name }}.blob.core.windows.net/{{ offline_installer_container_name }}"
+kibana_service: "{{swarm_dashboard}}:5601"
\ No newline at end of file
diff --git a/ansible/roles/stack-proxy/templates/proxy-default.conf b/ansible/roles/stack-proxy/templates/proxy-default.conf
index f98ba2aae9..752ba73c05 100644
--- a/ansible/roles/stack-proxy/templates/proxy-default.conf
+++ b/ansible/roles/stack-proxy/templates/proxy-default.conf
@@ -306,7 +306,7 @@ server {
set $bucket "{{upstream_url}}";
set $url_full '$1';
proxy_http_version 1.1;
- proxy_set_header Host "{{upstream_url.split('/')[0]|lower}}";
+ proxy_set_header Host "{{upstream_url.split('/')[2]|lower}}";
proxy_set_header Authorization '';
proxy_hide_header Access-Control-Allow-Origin;
proxy_hide_header Access-Control-Allow-Methods;
@@ -318,7 +318,7 @@ server {
proxy_intercept_errors on;
add_header Access-Control-Allow-Origin "*";
add_header Access-Control-Allow-Methods GET;
- proxy_pass https://$bucket/$url_full;
+ proxy_pass $bucket/$url_full;
}
@@ -339,10 +339,10 @@ server {
return 200;
}
- set $s3_bucket "{{plugin_upstream_url}}";
+ set $bucket "{{plugin_upstream_url}}";
set $url_full '$1';
proxy_http_version 1.1;
- proxy_set_header Host "{{plugin_upstream_url.split('/')[0]|lower}}";
+ proxy_set_header Host "{{plugin_upstream_url.split('/')[2]|lower}}";
proxy_set_header Authorization '';
proxy_hide_header Access-Control-Allow-Origin;
proxy_hide_header Access-Control-Allow-Methods;
@@ -354,7 +354,7 @@ server {
proxy_intercept_errors on;
add_header Access-Control-Allow-Origin "*" ;
add_header Access-Control-Allow-Methods GET;
- proxy_pass https://$s3_bucket/v3/preview/$url_full;
+ proxy_pass $bucket/v3/preview/$url_full;
}
location ~* ^/content-plugins/(.*) {
@@ -378,11 +378,11 @@ location ~* ^/content-plugins/(.*) {
add_header Content-Type text/plain;
return 200;
}
- set $s3_bucket "{{plugin_upstream_url}}";
+ set $bucket "{{plugin_upstream_url}}";
set $url_full '$1';
proxy_http_version 1.1;
- proxy_set_header Host "{{plugin_upstream_url.split('/')[0]|lower}}";
+ proxy_set_header Host "{{plugin_upstream_url.split('/')[2]|lower}}";
proxy_set_header Authorization '';
proxy_hide_header Access-Control-Allow-Origin;
proxy_hide_header Access-Control-Allow-Methods;
@@ -394,7 +394,7 @@ location ~* ^/content-plugins/(.*) {
proxy_intercept_errors on;
add_header Access-Control-Allow-Origin "*";
add_header Access-Control-Allow-Methods GET;
- proxy_pass https://$s3_bucket/content-plugins/$url_full;
+ proxy_pass $bucket/content-plugins/$url_full;
}
location /thirdparty {
@@ -448,7 +448,7 @@ location ~* ^/desktop/(.*) {
set $url_full '$1';
proxy_http_version 1.1;
- proxy_set_header Host "{{sunbird_offline_azure_storage_account_url.split('/')[0]|lower}}";
+ proxy_set_header Host "{{sunbird_offline_azure_storage_account_url.split('/')[2]|lower}}";
proxy_set_header Authorization '';
proxy_hide_header Access-Control-Allow-Origin;
proxy_hide_header Access-Control-Allow-Methods;
@@ -460,7 +460,7 @@ location ~* ^/desktop/(.*) {
proxy_intercept_errors on;
add_header Access-Control-Allow-Origin "*";
add_header Access-Control-Allow-Methods GET;
- proxy_pass https://$offline_bucket/$url_full;
+ proxy_pass $offline_bucket/$url_full;
}
location / {
@@ -506,7 +506,7 @@ location ~* ^/desktop/(.*) {
proxy_read_timeout 70;
}
- location ~ /resourcebundles/v1/read|/learner/data/v1/(role/read|system/settings/get)|/v1/tenant/info {
+ location ~ /resourcebundles/v1/read|/userorg/data/v1/(role/read|system/settings/get)|/v1/tenant/info {
proxy_cache_key $proxy_host$request_uri;
proxy_cache proxy_cache;
add_header X-Proxy-Cache $upstream_cache_status;
diff --git a/ansible/roles/stack-sunbird/defaults/main.yml b/ansible/roles/stack-sunbird/defaults/main.yml
index 12d98086b3..da8ac4dae2 100644
--- a/ansible/roles/stack-sunbird/defaults/main.yml
+++ b/ansible/roles/stack-sunbird/defaults/main.yml
@@ -16,12 +16,12 @@ actor_replicas: 1
actor_reservation_memory: 768M
actor_limit_memory: 1024M
-learner_replicas: 1
-learner_reservation_memory: 512M
-learner_limit_memory: 1024M
-learner_reservation_cpu: 0.2
-learner_limit_cpu: 1
-learner_java_mem_limit: '-Xmx600m'
+userorg_replicas: 1
+userorg_reservation_memory: 512M
+userorg_limit_memory: 1024M
+userorg_reservation_cpu: 0.2
+userorg_limit_cpu: 1
+userorg_java_mem_limit: '-Xmx600m'
#Config Service Vars
config_replicas: 1
@@ -51,8 +51,8 @@ player_limit_memory: 750M
player_reserve_cpu: 0.1
player_limit_cpu: 1
-# This variable is not to access learner service but to call the api
-# learner-service:9000/org/v1/search
+# This variable is not to access userorg service but to call the api
+# userorg-service:9000/org/v1/search
sunbird_learner_service_base_url: http://kong:8000/
telemetry_replicas: 1
@@ -73,17 +73,19 @@ sunbird_keycloak_client_id: 'portal'
vault_sunbird_api_auth_token:
sunbird_public_storage_account_name:
sunbird_public_storage_account_key:
+cloud_private_storage_accountname:
+cloud_private_storage_secret:
+cloud_private_storage_endpoint:
sunbird_container_name:
sunbird_portal_cdn_url:
sunbird_dataservice_url:
sunbird_background_actor_port:
sunbird_app_url:
-sunbird_image_storage_url:
sunbird_telemetry_dispatchers: kafka
content_service_whitelisted_channels:
content_service_blacklisted_channels:
sunbird_env_logo_url:
-desktop_app_storage_url: "https://{{sunbird_public_storage_account_name}}.blob.core.windows.net/{{offline_installer_container_name}}"
+desktop_app_storage_url: "{{ sunbird_offline_azure_storage_account_url }}"
telemetry_logstash_heap_size: 512m
telemetry_logstash_replicas: 1
@@ -127,7 +129,7 @@ telemetry_kafka_broker_list:
telemetry_kafka_topic:
# Encryption service
-# Learner
+# UserOrg
sunbird_keycloak_required_action_link_expiration_seconds: 2592000
sunbird_time_zone: "Asia/Kolkata"
# Content-service
@@ -138,9 +140,6 @@ sunbird_response_cache_ttl: 180
adminutil_base_url: http://adminutil:4000/
adminutil_sign_endpoint: v1/sign/payload
-#learner
-sunbird_time_zone: "Asia/Kolkata"
-
# Telemetry-logstash-datapipline
max_kafka_message_size: "5242880"
sunbird_gzip_enable: true
@@ -212,9 +211,6 @@ prometheus_alertmanager_route_prefix: alertmanager
ekstep_s3_env: "{{sunbird_env}}"
registry_url: "{{proto}}://{{proxy_server_name}}/registry"
-upstream_url: "ekstep-public-{{ekstep_s3_env}}.s3-ap-south-1.amazonaws.com"
-plugin_upstream_url: "ekstep-public-{{ekstep_s3_env}}.s3-ap-south-1.amazonaws.com"
-sunbird_offline_azure_storage_account_url: "{{ sunbird_public_storage_account_name }}.blob.core.windows.net/{{ offline_installer_container_name }}"
# Override this dictionary in your common.yaml
proxy:
# repository: 'proxy'
@@ -225,9 +221,9 @@ sunbird_cert_qr_container_name: "certqr"
service_env:
groups: ../../../../ansible/roles/stack-sunbird/templates/sunbird_groups-service.env
- learner:
- - ../../../../ansible/roles/stack-sunbird/templates/sunbird_learner-service.env
- - ../../../../ansible/roles/stack-sunbird/templates/learner-service_logback.xml
+ userorg:
+ - ../../../../ansible/roles/stack-sunbird/templates/userorg-service.env
+ - ../../../../ansible/roles/stack-sunbird/templates/userorg-service_logback.xml
lms:
- ../../../../ansible/roles/stack-sunbird/templates/sunbird_lms-service.env
- ../../../../ansible/roles/stack-sunbird/templates/lms-service_logback.xml
@@ -248,7 +244,6 @@ service_env:
enc: ../../../../ansible/roles/stack-sunbird/templates/sunbird_enc-service.env
notification: ../../../../ansible/roles/stack-sunbird/templates/sunbird_notification-service.env
telemetry: ../../../../ansible/roles/stack-sunbird/templates/sunbird_telemetry-service.env
- userorg: ../../../../ansible/roles/stack-sunbird/templates/sunbird_user-org-service.env
player: ../../../../ansible/roles/stack-sunbird/templates/sunbird_player.env
print: ../../../../ansible/roles/stack-sunbird/templates/sunbird_print-service.env
search:
@@ -982,7 +977,7 @@ adminutil_access_values:
role_to_run:
- decrypt.yml
- generate-keys.yml
- - copy-to-helm-public.yml
+ - copy-to-helm.yml
# analytics-service related vars
cassandra:
@@ -1004,8 +999,8 @@ dataset_metadata: "{{ env_name }}_dataset_metadata"
#### Exhuats API consumer
exhaust_api_consumer_ids: ["273f3b18-5dda-4a27-984a-060c7cd398d3"] # being used in analytics api to access the analytics exhaust api
-user_profile_read_url: "http://learner-service:9000/v1/user/read/" # being used in analytics api to get user details
-org_search_url: "http://learner-service:9000/v1/org/search" # being used in analytics api to get mhrd tenant id
+user_profile_read_url: "http://userorg-service:9000/v1/user/read/" # being used in analytics api to get user details
+org_search_url: "http://userorg-service:9000/v1/org/search" # being used in analytics api to get mhrd tenant id
dataexhaust_super_admin_channel: "sunbird" # being used in analytics api for authorizing user with super admin channel
#### public exhausts
@@ -1015,7 +1010,7 @@ public_exhaust_datasets: ["public-data-exhaust"]
data_exhaust_batch_limit: 20
mount_keycloak_key_apps:
- - learner
+ - userorg
- lms
- groups
- knowledgemw
@@ -1040,7 +1035,7 @@ analytics_opa_enabled: true
certregistry_opa_enabled: true
content_opa_enabled: true
knowledgemw_opa_enabled: true
-learner_opa_enabled: true
+userorg_opa_enabled: true
lms_opa_enabled: true
notification_opa_enabled: true
report_opa_enabled: true
@@ -1052,3 +1047,30 @@ kong_desktop_device_consumer_names_for_opa: '["desktop"]'
# Audience claim check is disabled as of now
# List of keycloak clients as these can come in audience field of a JWT token
# keycloak_allowed_aud: '"{{ keycloak_auth_server_url }}/realms/{{ keycloak_realm }}", "account", "realm-management"'
+
+
+cloudstorage_relative_path_prefix_content: "CONTENT_STORAGE_BASE_PATH"
+cloudstorage_relative_path_prefix_dial: "DIAL_STORAGE_BASE_PATH"
+cloudstorage_metadata_list: '["appIcon", "artifactUrl", "posterImage", "previewUrl", "thumbnail", "assetsMap", "certTemplate", "itemSetPreviewUrl", "grayScaleAppIcon", "sourceURL", "variants", "downloadUrl", "streamingUrl", "toc_url", "data", "question", "solutions", "editorState", "media", "pdfUrl", "transcripts"]'
+
+### inQuiry assessment service default values
+inquiry_schema_path: "{{ kp_schema_base_path }}"
+inquiry_kafka_urls: "{{ kafka_urls }}"
+inquiry_assessment_import_kafka_topic_name: "{{ env_name }}.object.import.request"
+inquiry_assessment_publish_kafka_topic_name: "{{ env_name }}.assessment.publish.request"
+inquiry_cassandra_connection: "{{ lp_cassandra_connection }}"
+inquiry_cassandra_keyspace_prefix: "{{ lp_cassandra_keyspace_prefix }}"
+inquiry_redis_host: "{{ sunbird_lp_redis_host }}"
+inquiry_search_service_base_url: "{{ sunbird_search_service_api_base_url }}/v3/search"
+
+### LERN Release-5.0.1
+cloud_store_base_path_placeholder: "CLOUD_BASE_PATH"
+
+#Youtube Standard Licence Validation
+youtube_app_name: fetch-youtube-license
+youtube_api_key: "{{ lp_vault_youtube_api_key }}"
+pgssl: "false"
+
+#Knowlg Release-6.1.0
+dailcode_keyspace_name: "dialcodes"
+cloud_storage_dial_container_name: "dial"
diff --git a/ansible/roles/stack-sunbird/tasks/learner_service.yml b/ansible/roles/stack-sunbird/tasks/learner_service.yml
deleted file mode 100644
index 3320ee97dd..0000000000
--- a/ansible/roles/stack-sunbird/tasks/learner_service.yml
+++ /dev/null
@@ -1,9 +0,0 @@
----
-- name: Remove learner service
- shell: "docker service rm learner-service"
- ignore_errors: yes
-
-- name: Deploy learner service
- shell: "docker service create --with-registry-auth --replicas {{ learner_replicas }} -p 9000:9000 --name learner-service --hostname learner-service --reserve-memory {{ learner_reservation_memory }} --limit-memory {{ learner_limit_memory }} --limit-cpu {{ learner_limit_cpu }} --reserve-cpu {{ learner_reservation_cpu }} --health-cmd 'wget -qO- learner-service:9000/service/health || exit 1' --health-timeout 10s --health-retries 5 --network application_default --env JAVA_OPTIONS={{ learner_java_mem_limit }} --env-file /home/deployer/env/sunbird_learner-service.env {{hub_org}}/{{image_name}}:{{image_tag}}"
- args:
- chdir: /home/deployer/stack
diff --git a/ansible/roles/stack-sunbird/tasks/main.yml b/ansible/roles/stack-sunbird/tasks/main.yml
index 6e5c025544..b686c9e580 100644
--- a/ansible/roles/stack-sunbird/tasks/main.yml
+++ b/ansible/roles/stack-sunbird/tasks/main.yml
@@ -4,8 +4,8 @@
- include: service_stack.yml
when: deploy_stack is defined
- - include: learner_service.yml
- when: deploy_learner is defined
+ - include: userorg-service.yml
+ when: deploy_userorg is defined
- include: lms_service.yml
when: deploy_lms is defined
@@ -13,9 +13,6 @@
- include: enc_service.yml
when: deploy_enc is defined
- - include: user_org_service.yml
- when: deploy_user_org is defined
-
- include: cert_service.yml
when: deploy_cert is defined
diff --git a/ansible/roles/stack-sunbird/tasks/user_org_service.yml b/ansible/roles/stack-sunbird/tasks/user_org_service.yml
deleted file mode 100644
index 52accff451..0000000000
--- a/ansible/roles/stack-sunbird/tasks/user_org_service.yml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-- name: Remove user org service
- shell: "docker service rm user-org-service"
- ignore_errors: yes
-
-- name: Deploy user org service
- shell: "docker service create --with-registry-auth --replicas {{ user_org_replicas }} -p 9009:9000 --name user-org-service --hostname user-org-service --limit-memory {{ user_org_limit_memory }} --limit-cpu {{ user_org_limit_cpu }} --health-cmd 'wget -qO- user-org-service:9000/service/health || exit 1' --health-timeout 10s --health-retries 5 --network application_default --env-file /home/deployer/env/sunbird_user-org-service.env {{hub_org}}/{{image_name}}:{{image_tag}}"
diff --git a/ansible/roles/stack-sunbird/tasks/userorg-service.yml b/ansible/roles/stack-sunbird/tasks/userorg-service.yml
new file mode 100644
index 0000000000..c72e755750
--- /dev/null
+++ b/ansible/roles/stack-sunbird/tasks/userorg-service.yml
@@ -0,0 +1,9 @@
+---
+- name: Remove userorg service
+ shell: "docker service rm userorg-service"
+ ignore_errors: yes
+
+- name: Deploy userorg service
+ shell: "docker service create --with-registry-auth --replicas {{ userorg_replicas }} -p 9000:9000 --name userorg-service --hostname userorg-service --reserve-memory {{ userorg_reservation_memory }} --limit-memory {{ userorg_limit_memory }} --limit-cpu {{ userorg_limit_cpu }} --reserve-cpu {{ userorg_reservation_cpu }} --health-cmd 'wget -qO- userorg-service:9000/service/health || exit 1' --health-timeout 10s --health-retries 5 --network application_default --env JAVA_OPTIONS={{ userorg_java_mem_limit }} --env-file /home/deployer/env/userorg-service.env {{hub_org}}/{{image_name}}:{{image_tag}}"
+ args:
+ chdir: /home/deployer/stack
diff --git a/ansible/roles/stack-sunbird/templates/analytics_api_service.conf b/ansible/roles/stack-sunbird/templates/analytics_api_service.conf
index 2afb0291de..8bdcd63467 100644
--- a/ansible/roles/stack-sunbird/templates/analytics_api_service.conf
+++ b/ansible/roles/stack-sunbird/templates/analytics_api_service.conf
@@ -7,7 +7,7 @@ data_exhaust.retry.limit="3"
data_exhaust.dataset.list=["eks-consumption-raw", "eks-consumption-summary", "eks-consumption-metrics","eks-creation-raw", "eks-creation-summary", "eks-creation-metrics"]
data_exhaust.dataset.default="eks-consumption-raw"
data_exhaust.output_format="json"
-data_exhaust.bucket="reports"
+data_exhaust.bucket="{{ cloud_storage_privatereports_bucketname }}"
cassandra.service.embedded.enable=false
cassandra.keyspace_prefix="{{ cassandra.keyspace_prefix }}"
device-register-controller-dispatcher {
@@ -200,11 +200,12 @@ public {
}
}
}
-cloud_storage_type="azure"
-storage.key.config="azure_storage_key"
-storage.secret.config="azure_storage_secret"
-public.storage.key.config="public_azure_storage_key"
-public.storage.secret.config="public_azure_storage_secret"
+cloud_storage_type="{{cloud_service_provider}}"
+storage.key.config="{{cloud_public_storage_accountname}}"
+storage.secret.config="{{cloud_public_storage_secret}}"
+public.storage.key.config="{{cloud_public_storage_accountname}}"
+public.storage.secret.config="{{cloud_public_storage_secret}}"
+cloud_storage_endpoint_with_protocol="{{cloud_storage_url}}"
metrics.time.interval.min=30
cache.refresh.time.interval.min=1440
redis.host="{{metadata_redis_host}}"
diff --git a/ansible/roles/stack-sunbird/templates/assessment-service_application.conf b/ansible/roles/stack-sunbird/templates/assessment-service_application.conf
index 851433f160..3e127b78ca 100644
--- a/ansible/roles/stack-sunbird/templates/assessment-service_application.conf
+++ b/ansible/roles/stack-sunbird/templates/assessment-service_application.conf
@@ -89,6 +89,18 @@ akka {
nr-of-instances = 5
dispatcher = actors-dispatcher
}
+ /questionV5Actor
+ {
+ router = smallest-mailbox-pool
+ nr-of-instances = 5
+ dispatcher = actors-dispatcher
+ }
+ /questionSetV5Actor
+ {
+ router = smallest-mailbox-pool
+ nr-of-instances = 5
+ dispatcher = actors-dispatcher
+ }
}
}
}
@@ -336,14 +348,13 @@ play.filters {
play.http.parser.maxMemoryBuffer = 50MB
akka.http.parsing.max-content-length = 50MB
-schema.base_path="{{ kp_schema_base_path | default('/home/sunbird/assessment-service-1.0-SNAPSHOT/schemas')}}"
+schema.base_path="{{ inquiry_schema_path | default('/home/sunbird/assessment-service-1.0-SNAPSHOT/schemas')}}"
# Cassandra Configuration
-cassandra.lp.connection="{{ lp_cassandra_connection }}"
-content.keyspace = "{{ lp_cassandra_keyspace_prefix }}_content_store"
+cassandra.lp.connection="{{ inquiry_cassandra_connection }}"
# Redis Configuration
-redis.host="{{ sunbird_lp_redis_host }}"
+redis.host="{{ inquiry_redis_host }}"
redis.port=6379
redis.maxConnections=128
@@ -383,29 +394,24 @@ languageCode {
telugu : "te"
}
-cloud_storage_type: "azure"
-azure_storage_key: "{{ sunbird_public_storage_account_name }}"
-azure_storage_secret: "{{ sunbird_public_storage_account_key }}"
-azure_storage_container: "{{ sunbird_content_azure_storage_container }}"
-
kafka {
- urls : "{{ kafka_urls }}"
+ urls : "{{ inquiry_kafka_urls }}"
topic.send.enable : true
- topics.instruction : "{{ env_name }}.assessment.publish.request"
+ topics.instruction : "{{ inquiry_assessment_publish_kafka_topic_name }}"
}
-objectcategorydefinition.keyspace="{{ lp_cassandra_keyspace_prefix }}_category_store"
-question.keyspace="{{ lp_cassandra_keyspace_prefix }}_question_store"
-questionset.keyspace="{{ lp_cassandra_keyspace_prefix }}_hierarchy_store"
+objectcategorydefinition.keyspace="{{ inquiry_cassandra_keyspace_prefix }}_category_store"
+question.keyspace="{{ inquiry_cassandra_keyspace_prefix }}_question_store"
+questionset.keyspace="{{ inquiry_cassandra_keyspace_prefix }}_hierarchy_store"
composite {
search {
- url : "{{ sunbird_search_service_api_base_url }}/v3/search"
+ url : "{{ inquiry_search_service_base_url }}"
}
}
import {
request_size_limit : 300
- output_topic_name : "{{ env_name }}.object.import.request"
+ output_topic_name : "{{ inquiry_assessment_import_kafka_topic_name }}"
required_props {
question : ["name", "code", "mimeType", "framework", "channel"]
questionset : ["name", "code", "mimeType", "framework", "channel"]
@@ -425,4 +431,23 @@ assessment.copy.props_to_remove=["downloadUrl", "artifactUrl", "variants",
"LastPublishedBy", "rejectReasons", "rejectComment", "gradeLevel", "subject",
"medium", "board", "topic", "purpose", "subtopic", "contentCredits",
"owner", "collaborators", "creators", "contributors", "badgeAssertions", "dialcodes",
- "concepts", "keywords", "reservedDialcodes", "dialcodeRequired", "leafNodes", "sYS_INTERNAL_LAST_UPDATED_ON", "prevStatus", "lastPublishedBy", "streamingUrl"]
\ No newline at end of file
+ "concepts", "keywords", "reservedDialcodes", "dialcodeRequired", "leafNodes", "sYS_INTERNAL_LAST_UPDATED_ON", "prevStatus", "lastPublishedBy", "streamingUrl", "publish_type", "migrationVersion"]
+
+cloud_storage_container: "{{ cloud_storage_content_bucketname }}"
+
+cloudstorage {
+ metadata.replace_absolute_path={{ cloudstorage_replace_absolute_path | default('false') }}
+ metadata.list={{ cloudstorage_metadata_list }}
+ relative_path_prefix="{{ cloudstorage_relative_path_prefix_content | default('CLOUD_STORAGE_BASE_PATH') }}"
+ read_base_path="{{ cloudstorage_base_path }}"
+ write_base_path={{ valid_cloudstorage_base_urls }}
+}
+
+#Inquiry-release-5.6.0
+question.list.limit={{ question_list_api_request_limit | default('20') }}
+
+# V5 API Configurations
+v5_supported_qumlVersions=[1.1]
+v5_default_qumlVersion=1.1
+
+
diff --git a/ansible/roles/stack-sunbird/templates/content-service_application.conf b/ansible/roles/stack-sunbird/templates/content-service_application.conf
index d33dbecf6f..b7d3d9b683 100644
--- a/ansible/roles/stack-sunbird/templates/content-service_application.conf
+++ b/ansible/roles/stack-sunbird/templates/content-service_application.conf
@@ -481,18 +481,32 @@ composite {
url : "{{ sunbird_search_service_api_base_url }}/v3/search"
}
}
-cloud_storage_type: "azure"
-azure_storage_key: "{{ sunbird_public_storage_account_name }}"
-azure_storage_secret: "{{ sunbird_public_storage_account_key }}"
-azure_storage_container: "{{ sunbird_content_azure_storage_container }}"
+cloud_storage_type: "{{ cloud_service_provider }}"
+cloud_storage_key: "{{ cloud_public_storage_accountname }}"
+cloud_storage_secret: "{{ cloud_public_storage_secret }}"
+cloud_storage_endpoint: "{{ cloud_public_storage_endpoint }}"
+cloud_storage_proxy_host: "{{ cloud_public_storage_proxy }}"
+cloud_storage_container: "{{ cloud_storage_content_bucketname }}"
+cloud_storage_client_id: "{{ cloud_public_storage_client_id | default('') }}"
+cloud_storage_private_key_id: "{{ cloud_public_storage_private_key_id | default('') }}"
+cloud_storage_project_id: "{{ cloud_public_storage_project | default('') }}"
# Google Drive APIKEY
learning_content_drive_apiKey = "{{ learning_content_drive_apiKey }}"
+#Youtube Standard Licence Validation
+learning.content.youtube.application.name="{{ youtube_app_name }}"
+learning_content_youtube_apikey="{{ youtube_api_key }}"
+youtube.license.regex.pattern=["\\?vi?=([^&]*)", "watch\\?.*v=([^&]*)", "(?:embed|vi?)/([^/?]*)","^([A-Za-z0-9\\-\\_]*)"]
+learning.valid_license=["creativeCommon"]
+
kafka {
urls : "{{ kafka_urls }}"
topic.send.enable : true
topics.instruction : "{{ env_name }}.learning.job.request"
+ publish.request.topic : "{{ env_name }}.publish.job.request"
+ topics.graph.event : "{{ env_name }}.learning.graph.events"
+ dial.request.topic : "{{ env_name }}.qrimage.request"
}
# DIAL Link Config
@@ -636,3 +650,15 @@ collection {
}
plugin.media.base.url="{{ plugin_media_base_url }}"
+
+cloudstorage {
+ metadata.replace_absolute_path={{ cloudstorage_replace_absolute_path | default('false') }}
+ relative_path_prefix={{ cloudstorage_relative_path_prefix_content }}
+ metadata.list={{ cloudstorage_metadata_list }}
+ read_base_path="{{ cloudstorage_base_path }}"
+ write_base_path={{ valid_cloudstorage_base_urls }}
+}
+#Knowlg Release-6.1.0
+dialcode.keyspace="{{ dailcode_keyspace_name }}"
+dialcode_image.keyspace="{{ dailcode_keyspace_name }}"
+cloud_storage_dial_container="{{ cloud_storage_dial_container_name }}"
\ No newline at end of file
diff --git a/ansible/roles/stack-sunbird/templates/dial-service_application.conf b/ansible/roles/stack-sunbird/templates/dial-service_application.conf
index 745a8b9bfe..dd7b11dbeb 100644
--- a/ansible/roles/stack-sunbird/templates/dial-service_application.conf
+++ b/ansible/roles/stack-sunbird/templates/dial-service_application.conf
@@ -150,6 +150,10 @@ system.config.table="system_config"
publisher.keyspace.name="{{ env_name }}_dialcode_store"
publisher.keyspace.table="publisher"
+#QRCodes Configuration
+qrcodes.keyspace.name="dialcodes"
+qrcodes.keyspace.table="dialcode_batch"
+
#DIAL Code Generator Configuration
dialcode.strip.chars="0"
dialcode.length=6.0
@@ -191,3 +195,9 @@ jsonld {
sb_schema = ["http://store.knowlg.sunbird.org/dial/specs/sb/schema.jsonld"]
}
+cloudstorage {
+ metadata.replace_absolute_path="{{ cloudstorage_replace_absolute_path | default('false') }}"
+ relative_path_prefix="{{ cloudstorage_relative_path_prefix_dial | default('DIAL_STORAGE_BASE_PATH') }}"
+ read_base_path="{{ cloudstorage_base_path }}"
+}
+cloud_storage_container="{{ cloud_storage_dial_bucketname | default('dial') }}"
diff --git a/ansible/roles/stack-sunbird/templates/inbound.env b/ansible/roles/stack-sunbird/templates/inbound.env
index c8ed1a5157..1104836d93 100644
--- a/ansible/roles/stack-sunbird/templates/inbound.env
+++ b/ansible/roles/stack-sunbird/templates/inbound.env
@@ -53,14 +53,16 @@ REDIS_PASS={{sunbird_redis_pass | default('')}}
REDIS_PORT={{sunbird_redis_port | default(6379)}}
REDIS_DB_INDEX={{redis_db_index_uci | default('7')}}
-#Azure Config
-AZURE_BLOB_STORE_CONTAINER={{sunbird_azure_uci_container_name | default('uci-' + env )}}
-AZURE_BLOB_STORE_ACCOUNT_KEY={{sunbird_private_storage_account_name}}
-AZURE_BLOB_STORE_ACCOUNT_NAME={{sunbird_private_storage_account_key}}
-SELECTED_FILE_CDN=azure
-
#Netcore
NETCORE_WHATSAPP_AUTH_TOKEN={{uci_netcore_whatsapp_token}}
NETCORE_WHATSAPP_SOURCE={{uci_netcore_whatsapp_source}}
NETCORE_WHATSAPP_URI={{uci_netcore_whatsapp_uri | default('https://waapi.pepipost.com/api/v2/')}}
+#Sunbird CDN Configuration
+SUNBIRD_CLOUD_MEDIA_STORAGE_TYPE={{cloud_service_provider}}
+SUNBIRD_CLOUD_MEDIA_STORAGE_KEY={{cloud_private_storage_accountname}}
+SUNBIRD_CLOUD_MEDIA_STORAGE_SECRET={{cloud_private_storage_secret}}
+SUNBIRD_CLOUD_MEDIA_STORAGE_CONTAINER={{cloud_storage_uci_bucketname | default('uci-' + env )}}
+
+#Selected CDN Configuration
+SELECTED_FILE_CDN=sunbird
diff --git a/ansible/roles/stack-sunbird/templates/ml-core-service.env b/ansible/roles/stack-sunbird/templates/ml-core-service.env
index 6bf2405d86..d067b5bd50 100755
--- a/ansible/roles/stack-sunbird/templates/ml-core-service.env
+++ b/ansible/roles/stack-sunbird/templates/ml-core-service.env
@@ -19,42 +19,15 @@ INTERNAL_ACCESS_TOKEN={{ml_core_internal_access_token}}
#Gotenberg configuration
GOTENBERG_SERVICE_URL={{ml_gotenberg_url | default("http://gotenberg-service:3000")}}
-## Cloud Environment platform
-# which will be templatized from the above variable (default)
-
-# Cloud configuration for assesment service
-# Options available
-#
-## Azure Cloud Configuration
-#
-# CLOUD_STORAGE=AZURE
-# AZURE_ACCOUNT_NAME=
-# AZURE_ACCOUNT_KEY=
-# AZURE_STORAGE_CONTAINER=
-#
-## Google Cloud Configuration
-#
-# CLOUD_STORAGE=GCP
-# GCP_PATH=
-# GCP_BUCKET_NAME=
-#
-## AWS Cloud Configuration
-#
-# CLOUD_STORAGE=AWS
-# AWS_ACCESS_KEY_ID=
-# AWS_SECRET_ACCESS_KEY=
-# AWS_BUCKET_NAME=
-# AWS_BUCKET_ENDPOINT=
-# AWS_BUCKET_REGION=
-# To change the cloud config for azure, override below variable in common.yaml
-# For Example,
-# ml_survey_cloud_config: |
-# CLOUD_STORAGE=AZURE
-# AZURE_ACCOUNT_NAME=mystorageaccount
-# AZURE_ACCOUNT_KEY=xx123supersecretpassword
-# AZURE_STORAGE_CONTAINER=slassessmentscontainer
-
-{{ml_cloud_config}}
+
+# CLOUD STORAGE
+CLOUD_STORAGE_PROVIDER={{cloud_service_provider}}
+CLOUD_STORAGE_ACCOUNTNAME={{cloud_public_storage_accountname | default("")}}
+CLOUD_STORAGE_SECRET={{cloud_public_storage_secret | default("")}}
+CLOUD_STORAGE_BUCKETNAME={{ml_container | default("")}}
+CLOUD_STORAGE_REGION={{cloud_public_storage_region | default("")}}
+CLOUD_STORAGE_PROJECT={{cloud_public_storage_project | default("")}}
+CLOUD_ENDPOINT={{cloud_public_storage_endpoint | default("")}}
# OFFLINE TOKEN VALIDATION
@@ -78,7 +51,48 @@ ELASTICSEARCH_HOST_URL={{ml_core_elasticsearch_host_url | default("")}}
ELASTICSEARCH_ENTITIES_INDEX={{ml_core_elasticsearch_user_extension_index_type | default ("")}}
# Base url of the sunbird enviornment
-USER_SERVICE_URL={{ml_core_user_service_URL | default("http://learner-service:9000")}}
+USER_SERVICE_URL={{ml_core_user_service_URL | default("http://userorg-service:9000")}}
## portal url of env
APP_PORTAL_BASE_URL={{ proto }}://{{ domain_name }}
+
+# Kafka enable or disable communication flag
+KAFKA_COMMUNICATIONS_ON_OFF={{ml_core_kafka_communications_on_off | default("ON")}}
+
+# IP address of kafka server with port without HTTP
+KAFKA_URL={{ml_core_kafka_url | default(groups['processing-cluster-kafka'][0]+':9092')}}
+
+# Kafka consumer group for ML Core Service
+KAFKA_GROUP_ID={{ml_core_kafka_group_id | default("ml-core-service")}}
+
+#Kafka topic name for pushing programUsers
+PROGRAM_USERS_JOINED_TOPIC={{ml_core_program_users_joined_topic | default (env_name+".programuser.info")}}
+
+#TimeOffset with respect to UTC
+TIMEZONE_DIFFRENECE_BETWEEN_LOCAL_TIME_AND_UTC={{ml_core_timezone_diffrenece_between_local_time_and_utc | default ("+05:30")}}
+
+#Validate Entities enable/Disable
+VALIDATE_ENTITIES={{ml_service_validate_entities | default ("ON")}}
+
+#User Delete on and off flow
+USER_DELETE_ON_OFF={{manage_learn_user_delete_on_off | default("ON")}}
+
+#Topic name for user delete event consumer Topic Name
+USER_DELETE_TOPIC={{user_delete_topic_name | default(env_name+".delete.user")}}
+
+#ml core service id
+ID={{ml_core_service_id | default(env_name+"."+sunbird_instance+".ml.core.service")}}
+
+#Telemetry enable/disbale service
+TELEMETRY_ON_OFF={{manage_learn_telemetry_on_off | default("ON")}}
+
+#Topic name for telemetry
+TELEMETRY_TOPIC={{telemetry_raw_topic_name | default(env_name+".telemetry.raw")}}
+
+#Ownership Transfer on and off flow
+OWNERSHIP_TRANSFER_ON_OFF={{ownership_transfer_on_off | default("ON")}}
+
+#Topic name for ownership transfer event consumer Topic Name
+OWNERSHIP_TRANSFER_TOPIC={{ownership_transfer_topic_name | default(env_name+".transfer.ownership.job")}}
+
+
diff --git a/ansible/roles/stack-sunbird/templates/ml-projects-service.env b/ansible/roles/stack-sunbird/templates/ml-projects-service.env
index eeca6c4d70..47ecd3471b 100644
--- a/ansible/roles/stack-sunbird/templates/ml-projects-service.env
+++ b/ansible/roles/stack-sunbird/templates/ml-projects-service.env
@@ -38,4 +38,22 @@ KAFKA_GROUP_ID={{ml_project_kafka_group_id | default("ml-project-service")}}
PROJECT_SUBMISSION_TOPIC={{ml_project_submission_topic | default (env_name+".ml.projects.submissions")}}
# Base url of the sunbird enviornment
-USER_SERVICE_URL={{ml_project_user_service_URL | default("http://learner-service:9000")}}
+USER_SERVICE_URL={{ml_project_user_service_URL | default("http://userorg-service:9000")}}
+
+# certificate issuer KID value
+CERTIFICATE_ISSUER_KID={{certificate_issuer_kid | default("")}}
+
+#User Delete on and off flow
+USER_DELETE_ON_OFF={{manage_learn_user_delete_on_off | default("ON")}}
+
+#Topic name for user delete event consumer Topic Name
+USER_DELETE_TOPIC={{user_delete_topic_name | default(env_name+".delete.user")}}
+
+#ml core service id
+ID={{ml_core_service_id | default(env_name+"."+sunbird_instance+".ml.project.service")}}
+
+#Telemetry enable/disbale service
+TELEMETRY_ON_OFF={{manage_learn_telemetry_on_off | default("ON")}}
+
+#Topic name for telemetry
+TELEMETRY_TOPIC={{telemetry_raw_topic_name | default(env_name+".telemetry.raw")}}
\ No newline at end of file
diff --git a/ansible/roles/stack-sunbird/templates/ml-reports-service.env b/ansible/roles/stack-sunbird/templates/ml-reports-service.env
index 6df09e49c6..cd6754ac01 100644
--- a/ansible/roles/stack-sunbird/templates/ml-reports-service.env
+++ b/ansible/roles/stack-sunbird/templates/ml-reports-service.env
@@ -20,6 +20,19 @@ SURVEY_DATASOURCE_NAME={{ml_report_survey_datasource_name | default("sl-survey")
# Survey evidence data source name
SURVEY_EVIDENCE_DATASOURCE_NAME={{ml_report_survey_evidence_datasource_name | default("sl-survey-evidence")}}
+# Project Solution Resource data source name
+PROJECT_RESOURCE_DATASOURCE_NAME={{ml_project_resource_datasource_name | default("ml-project-status")}}
+
+# Observation Solution Resource data source name
+OBSERVATION_RESOURCE_DATASOURCE_NAME={{ml_observation_resource_datasource_name | default("ml-obs-status")}}
+
+# Survey Solution Resource data source name
+SURVEY_RESOURCE_DATASOURCE_NAME={{ml_survey_resource_datasource_name | default("ml-survey-status")}}
+
+
+# Program Resource data source name
+PROGRAM_RESOURCE_DATASOURCE_NAME={{ml_program_resource_datasource_name | default("ml-user-program")}}
+
# Dhiti Thresold Values
#Restrict number of records to be shown for container reports
CONTENT_REPORT_THRESHOLD={{ml_report_content_report_threshold | default("5")}}
diff --git a/ansible/roles/stack-sunbird/templates/ml-survey-service.env b/ansible/roles/stack-sunbird/templates/ml-survey-service.env
index ccda45606e..277da9b836 100644
--- a/ansible/roles/stack-sunbird/templates/ml-survey-service.env
+++ b/ansible/roles/stack-sunbird/templates/ml-survey-service.env
@@ -9,7 +9,7 @@ APPLICATION_ENV={{ env }}
MONGODB_URL=mongodb://{{ml_mongodb_host | default(groups['mongo_master'][0]+':27017')}}/{{ ml_mongodb | default("ml-survey") }}
# Base url of the sunbird enviornment
-USER_SERVICE_URL={{ml_survey_user_service_URL | default("http://learner-service:9000")}}
+USER_SERVICE_URL={{ml_survey_user_service_URL | default("http://userorg-service:9000")}}
# Secure token access Admin related API's
# The value of internal access token can be generated by command - "openssl rand -hex 10"
@@ -65,3 +65,24 @@ KEYCLOAK_PUBLIC_KEY_PATH={{ml_survey_keycloak_public_key_path|default("keycloak-
## portal url of env
APP_PORTAL_BASE_URL={{ proto }}://{{ domain_name }}
+
+#Program join enable/disable
+PROGRAM_JOIN_ON_OFF={{ml_program_join_on_off | default ("ON")}}
+
+#validate entities enable/disable
+VALIDATE_ENTITIES={{ml_service_validate_entities | default ("ON")}}
+
+#User Delete on and off flow
+USER_DELETE_ON_OFF={{manage_learn_user_delete_on_off | default("ON")}}
+
+#Topic name for user delete event consumer Topic Name
+USER_DELETE_TOPIC={{user_delete_topic_name | default(env_name+".delete.user")}}
+
+#ml core service id
+ID={{ml_core_service_id | default(env_name+"."+sunbird_instance+".ml.survey.service")}}
+
+#Telemetry enable/disbale service
+TELEMETRY_ON_OFF={{manage_learn_telemetry_on_off | default("ON")}}
+
+#Topic name for telemetry
+TELEMETRY_TOPIC={{telemetry_raw_topic_name | default(env_name+".telemetry.raw")}}
diff --git a/ansible/roles/stack-sunbird/templates/odk.env b/ansible/roles/stack-sunbird/templates/odk.env
index 64ca86b1ec..5fcd16ddd4 100644
--- a/ansible/roles/stack-sunbird/templates/odk.env
+++ b/ansible/roles/stack-sunbird/templates/odk.env
@@ -1,7 +1,11 @@
-DB_URL=jdbc:postgresql://{{uci_postgres_host}}:5432/{{uci_odk_postgres_database}}?user={{uci_postgres_user}}&password={{uci_postgres_password}}
DB_USERNAME={{uci_postgres_user}}
DB_PASSWORD={{uci_postgres_password}}
DB_SCHEMA=public
DB_NAME={{uci_odk_postgres_database}}
DB_PORT=5432
-AGGREGATE_HOST=
\ No newline at end of file
+AGGREGATE_HOST=
+{% if pgssl == "true" %}
+DB_URL=jdbc:postgresql://{{uci_postgres_host}}:5432/{{uci_odk_postgres_database}}?user={{uci_postgres_user}}&password={{uci_postgres_password}}&sslmode=require
+{% else %}
+DB_URL=jdbc:postgresql://{{uci_postgres_host}}:5432/{{uci_odk_postgres_database}}?user={{uci_postgres_user}}&password={{uci_postgres_password}}
+{% endif %}
\ No newline at end of file
diff --git a/ansible/roles/stack-sunbird/templates/stack_learner_service.yml b/ansible/roles/stack-sunbird/templates/stack_userorg_service.yml
similarity index 64%
rename from ansible/roles/stack-sunbird/templates/stack_learner_service.yml
rename to ansible/roles/stack-sunbird/templates/stack_userorg_service.yml
index 47e3dae181..2a93ef2f9e 100644
--- a/ansible/roles/stack-sunbird/templates/stack_learner_service.yml
+++ b/ansible/roles/stack-sunbird/templates/stack_userorg_service.yml
@@ -1,16 +1,16 @@
version: '3.1'
services:
- learner_service:
+ userorg_service:
image: "{{hub_org}}/{{image_name}}:{{image_tag}}"
env_file:
- /home/deployer/env/sunbird_learner_service.env
+ /home/deployer/env/userorg-service.env
deploy:
- replicas: {{ learner_replicas | default(1) }}
+ replicas: {{ userorg_replicas | default(1) }}
resources:
reservations:
- memory: "{{ learner_reservation_memory | default('256M') }}"
+ memory: "{{ userorg_reservation_memory | default('256M') }}"
limits:
- memory: "{{ learner_limit_memory | default('512M') }}"
+ memory: "{{ userorg_limit_memory | default('512M') }}"
# healthcheck:
# test: curl -f http://localhost:9000/health || exit 1
interval: 10s
diff --git a/ansible/roles/stack-sunbird/templates/sunbird_cert-service.env b/ansible/roles/stack-sunbird/templates/sunbird_cert-service.env
index c43c23171b..2008cb28dc 100644
--- a/ansible/roles/stack-sunbird/templates/sunbird_cert-service.env
+++ b/ansible/roles/stack-sunbird/templates/sunbird_cert-service.env
@@ -1,13 +1,14 @@
-CONTAINER_NAME={{cert_service_container_name}}
+CONTAINER_NAME={{cloud_storage_certservice_bucketname}}
CLOUD_STORAGE_TYPE={{cloud_service_provider}}
-PRIVATE_CLOUD_STORAGE_SECRET={{sunbird_private_storage_account_key}}
-PRIVATE_CLOUD_STORAGE_KEY={{sunbird_private_storage_account_name}}
+PRIVATE_CLOUD_STORAGE_SECRET={{cloud_private_storage_secret}}
+PRIVATE_CLOUD_STORAGE_KEY={{cloud_private_storage_accountname}}
sunbird_cert_domain_url={{proto}}://{{proxy_server_name}}
sunbird_cert_enc_service_url=http://enc-service:8013
download_link_expiry_timeout=600
es_conn_info={{groups['es']|join(':9200,')}}:9200
ITEXT_LICENSE_ENABLED={{itext_license_enabled}}
ITEXT_LICENSE_PATH=/home/sunbird/itext_trail_license.xml
-PUBLIC_CLOUD_STORAGE_KEY={{sunbird_public_storage_account_name}}
-PUBLIC_CLOUD_STORAGE_SECRET={{sunbird_public_storage_account_key}}
-PUBLIC_CONTAINER_NAME={{sunbird_cert_qr_container_name}}
+PUBLIC_CLOUD_STORAGE_KEY={{cloud_public_storage_accountname}}
+PUBLIC_CLOUD_STORAGE_SECRET={{cloud_public_storage_secret}}
+PUBLIC_CONTAINER_NAME={{cloud_storage_certqr_bucketname}}
+CLOUD_STORAGE_ENDPOINT={{cloud_public_storage_endpoint}}
diff --git a/ansible/roles/stack-sunbird/templates/sunbird_groups-service.env b/ansible/roles/stack-sunbird/templates/sunbird_groups-service.env
index 2c1e2fe83d..83f3262daf 100644
--- a/ansible/roles/stack-sunbird/templates/sunbird_groups-service.env
+++ b/ansible/roles/stack-sunbird/templates/sunbird_groups-service.env
@@ -8,9 +8,11 @@ sunbird_cassandra_port=9042
sunbird_cassandra_password={{sunbird_cassandra_password|d('password')}}
sunbird_cassandra_username={{sunbird_cassandra_username|d('cassandra')}}
sunbird_cassandra_consistency_level={{sunbird_cassandra_consistency_level}}
-LEARNER_SERVICE_PORT=http://learner-service:9000
+LEARNER_SERVICE_PORT=http://userorg-service:9000
sunbird_redis_host={{sunbird_redis_host}}
sunbird_redis_port={{sunbird_redis_port|default(6379)}}
+# Release-5.3.0 LR-512
+sunbird_redis_db_index={{sunbird_redis_db_index|default(0)}}
CONTENT_SERVICE_PORT=http://search-service:9000
sunbird_sso_publickey={{sunbird_sso_publickey}}
sunbird_sso_url={{keycloak_auth_server_url}}/
diff --git a/ansible/roles/stack-sunbird/templates/sunbird_knowledge-mw-service.env b/ansible/roles/stack-sunbird/templates/sunbird_knowledge-mw-service.env
index 6a13ddadfd..63c4c55c9e 100644
--- a/ansible/roles/stack-sunbird/templates/sunbird_knowledge-mw-service.env
+++ b/ansible/roles/stack-sunbird/templates/sunbird_knowledge-mw-service.env
@@ -7,7 +7,6 @@ sunbird_keycloak_client_id={{sunbird_keycloak_client_id}}
sunbird_keycloak_public={{sunbird_keycloak_public}}
sunbird_cache_store={{sunbird_cache_store}}
sunbird_cache_ttl={{sunbird_cache_ttl}}
-sunbird_image_storage_url={{sunbird_image_storage_url}}
sunbird_azure_account_name={{sunbird_public_storage_account_name}}
sunbird_azure_account_key={{sunbird_public_storage_account_key}}
sunbird_dial_code_registry_url=https://{{proxy_server_name}}/dial/
@@ -23,6 +22,7 @@ sunbird_search_service_api_base_url={{knowledge_mw_sunbird_search_service_api_ba
sunbird_search_service_api_key={{sunbird_search_service_api_key}}
sunbird_dial_repo_api_base_url=http://dial-service.{{namespace}}.svc.cluster.local:9000
sunbird_dial_repo_api_key={{sunbird_dial_repo_api_key}}
+sunbird_learner_service_local_base_url={{ sunbird_learner_service_local_base_url }}
sunbird_plugin_repo_api_base_url={{knowledge_mw_sunbird_plugin_repo_api_base_url | default('http://search-service:9000')}}
sunbird_plugin_repo_api_key={{sunbird_plugin_repo_api_key}}
sunbird_data_service_api_base_url={{sunbird_data_service_api_base_url}}
@@ -58,3 +58,9 @@ sunbird_cassandra_consistency_level={{sunbird_cassandra_consistency_level}}
sunbird_health_check_enable={{sunbird_health_check_enable}}
# Release-3.0.0
sunbird_keycloak_public_key={{core_vault_sunbird_sso_publickey}}
+
+#Release-5.0.0
+enable_user_token_validation={{knowledge_mw_enable_user_token_validation | default('false')}}
+
+#Release-5.6.0
+sunbird_taxonomy_service_api_base_url={{sunbird_taxonomy_service_api_base_url | default('http://taxonomy-service:9000')}}
diff --git a/ansible/roles/stack-sunbird/templates/sunbird_lms-service.env b/ansible/roles/stack-sunbird/templates/sunbird_lms-service.env
index 6b790eb735..f2cbc5c61e 100644
--- a/ansible/roles/stack-sunbird/templates/sunbird_lms-service.env
+++ b/ansible/roles/stack-sunbird/templates/sunbird_lms-service.env
@@ -20,7 +20,7 @@ sunbird_pg_password={{sunbird_pg_password}}
sunbird_installation={{sunbird_installation}}
sunbird_analytics_api_base_url={{sunbird_analytics_api_base_url}}
sunbird_search_service_api_base_url={{ lms_search_service_api_base_url | default('http://search-service:9000') }}
-ekstep_api_base_url={{ lms_ekstep_api_base_url | default('http://content-service:9000') }}
+content_service_base_url={{ content_service_base_url | default('http://content-service:9000') }}
sunbird_group_service_api_base_url={{sunbird_group_service_api_base_url}}
sunbird_mail_server_host={{sunbird_mail_server_host}}
sunbird_mail_server_port={{sunbird_mail_server_port}}
@@ -29,8 +29,9 @@ sunbird_mail_server_password={{sunbird_mail_server_password}}
sunbird_mail_server_from_email={{sunbird_mail_server_from_email}}
sunbird_encryption_key={{sunbird_encryption_key}}
sunbird_encryption_mode={{sunbird_encryption_mode}}
-sunbird_account_name={{sunbird_public_storage_account_name}}
-sunbird_account_key={{sunbird_public_storage_account_key}}
+sunbird_account_name={{cloud_public_storage_accountname}}
+sunbird_account_key={{cloud_public_storage_secret}}
+sunbird_account_endpoint={{cloud_public_storage_endpoint}}
sunbird_quartz_mode={{sunbird_sunbird_quartz_mode}}
sunbird_web_url={{sunbird_web_url}}
sunbird_msg_91_auth={{sunbird_msg_91_auth}}
@@ -80,17 +81,17 @@ sunbird_course_batch_notification_enabled={{sunbird_course_batch_notification_en
sunbird_course_batch_notification_signature={{sunbird_course_batch_notification_signature}}
sunbird_otp_expiration={{sunbird_otp_expiration}}
sunbird_otp_length={{sunbird_otp_length}}
-sunbird_content_azure_storage_container={{sunbird_content_azure_storage_container}}
+sunbird_content_cloud_storage_container={{cloud_storage_content_bucketname}}
# Release-1.14
sunbird_time_zone={{sunbird_time_zone}}
# Release-1.15
sunbird_health_check_enable={{sunbird_health_check_enable}}
sunbird_keycloak_user_federation_provider_id={{core_vault_sunbird_keycloak_user_federation_provider_id}}
sunbird_gzip_enable={{sunbird_gzip_enable}}
-sunbird_course_metrics_base_url={{sunbird_course_metrics_base_url}}
sunbird_gzip_size_threshold={{sunbird_gzip_size_threshold | default(262144)}}
-sunbird_analytics_blob_account_name={{sunbird_private_storage_account_name}}
-sunbird_analytics_blob_account_key={{sunbird_private_storage_account_key}}
+sunbird_analytics_blob_account_name={{cloud_private_storage_accountname}}
+sunbird_analytics_blob_account_key={{cloud_private_storage_secret}}
+sunbird_analytics_blob_account_endpoint={{cloud_private_storage_account_endpoint}}
# Optional for caching
sunbird_cache_enable={{sunbird_cache_enable | default(false)}}
# Set below variables if above true
@@ -107,7 +108,6 @@ kafka_enrolment_sync_topic={{kafka_enrolment_sync_topic}}
# Required by lms service to call cert service
sunbird_cert_service_base_url=http://cert-service:9000
-learning_service_base_url={{sunbird_content_repo_api_base_url}}
sunbird_user_search_cretordetails_fields=id,firstName,lastName
sunbird_user_service_api_base_url={{ sunbird_user_service_api_base_url }}
@@ -144,4 +144,33 @@ enrollment_list_size={{ enrollment_list_size | default(1000) }}
# Release-5.0.0
sunbird_cloud_service_provider={{cloud_service_provider}}
-isMultiDCEnabled={{cassandra_multi_dc_enabled}}
\ No newline at end of file
+isMultiDCEnabled={{cassandra_multi_dc_enabled}}
+
+# Release-5.0.1
+cloud_storage_base_url={{cloud_storage_base_url}}
+cloud_storage_cname_url={{ cloud_storage_cname_url | default('') }}
+cloud_storage_dial_bucketname={{ cloud_storage_dial_bucketname | default('dial') }}
+cloud_storage_path_prefix_dial={{ cloudstorage_relative_path_prefix_dial | default('DIAL_STORAGE_BASE_PATH') }}
+cloud_store_base_path_placeholder={{ cloud_store_base_path_placeholder | default('CLOUD_BASE_PATH') }}
+
+# Release-5.2.0 LR-325
+sunbird_dial_service_base_url={{ dial_service_url | default('http://dial-service:9000') }}
+sunbird_dial_service_search_url=/dialcode/v3/search
+
+# Release-5.3.0 LR-539
+exhaust_api_base_url={{ analytics_service_url | default('http://analytics-service:9000') }}
+exhaust_api_submit_endpoint=/request/submit
+exhaust_api_list_endpoint=/request/list/
+
+# Release-5.3.0 LR-324
+content_read_url=/content/v3/read/
+
+# Release-5.4.0 - LR-511
+sunbird_userorg_keyspace=sunbird
+sunbird_course_keyspace=sunbird_courses
+sunbird_redis_db_index={{sunbird_redis_db_index|default(0)}}
+es_course_index=cbatch
+es_course_batch_index=course-batch
+es_user_index=user
+es_organisation_index=org
+es_user_courses_index=user-courses
\ No newline at end of file
diff --git a/ansible/roles/stack-sunbird/templates/sunbird_notification-service.env b/ansible/roles/stack-sunbird/templates/sunbird_notification-service.env
index 19b9d2607c..9ae9675705 100644
--- a/ansible/roles/stack-sunbird/templates/sunbird_notification-service.env
+++ b/ansible/roles/stack-sunbird/templates/sunbird_notification-service.env
@@ -31,9 +31,11 @@ sunbird_keycloak_user_federation_provider_id={{core_vault_sunbird_keycloak_user_
sunbird_keycloak_required_action_link_expiration_seconds={{sunbird_keycloak_required_action_link_expiration_seconds}}
accesstoken.publickey.basepath={{notification_access_basepath | default('/keys/')}}
ENV_NAME={{env_name}}
-LEARNER_SERVICE_PORT=http://learner-service:9000
+LEARNER_SERVICE_PORT=http://userorg-service:9000
sunbird_us_system_setting_url=/api/data/v1/system/settings/list
sunbird_us_org_read_url=/v1/org/read
notification_category_type_config=certificateUpdate
# Release-5.0.0
isMultiDCEnabled={{cassandra_multi_dc_enabled}}
+# Release-5.4.0 - LR-512
+sunbird_notification_keyspace=sunbird_notifications
diff --git a/ansible/roles/stack-sunbird/templates/sunbird_player.env b/ansible/roles/stack-sunbird/templates/sunbird_player.env
index 0d1c34f45b..ba18a81df0 100644
--- a/ansible/roles/stack-sunbird/templates/sunbird_player.env
+++ b/ansible/roles/stack-sunbird/templates/sunbird_player.env
@@ -15,8 +15,6 @@ sunbird_api_auth_token={{sunbird_api_auth_token}}
sunbird_enable_permission_check=1
sunbird_cassandra_urls={{sunbird_cassandra_urls}}
sunbird_session_store_type={{sunbird_session_store_type}}
-AZURE_STORAGE_ACCOUNT={{sunbird_public_storage_account_name}}
-AZURE_STORAGE_KEY={{sunbird_public_storage_account_key}}
sunbird_dataservice_url={{sunbird_dataservice_url}}
sunbird_telemetry_packet_size={{sunbird_telemetry_packet_size}}
sunbird_environment={{sunbird_environment}}
@@ -42,9 +40,6 @@ sunbird_google_captcha_site_key={{sunbird_google_captcha_site_key}}
sunbird_google_keycloak_client_id={{sunbird_google_keycloak_client_id}}
sunbird_google_keycloak_secret={{sunbird_google_keycloak_secret}}
sunbird_help_link_visibility={{sunbird_help_link_visibility|default('FALSE')}}
-sunbird_azure_report_container_name={{sunbird_azure_report_container_name}}
-sunbird_azure_account_name={{sunbird_private_storage_account_name}}
-sunbird_azure_account_key={{sunbird_private_storage_account_key}}
sunbird_response_cache_ttl={{sunbird_response_cache_ttl}}
sunbird_portal_preview_cdn_url={{sunbird_portal_preview_cdn_url}}
@@ -162,7 +157,7 @@ sunbird_base_proto={{sunbird_base_proto | default(proto)}}
ml_survey_url={{ml_survey_url|default(proto+'://' +domain_name) }}
#Release-4.1.0
-sunbird_azure_storage_account_name=https://{{sunbird_public_storage_account_name}}.blob.core.windows.net/
+sunbird_public_storage_account_name={{ cloud_storage_url }}/
#Release-4.1.0
sunbird_google_oauth_ios_clientId={{sunbird_google_oauth_ios_clientId | default("")}}
@@ -195,7 +190,7 @@ sunbird_telemetry_service_local_url={{sunbird_telemetry_service_local_url | defa
#Release-4.4.0
sunbird_portal_video_max_size={{sunbird_portal_video_max_size | default(150)}}
sunbird_default_file_size={{sunbird_default_file_size | default(150)}}
-sunbird_portal_uci_blob_url={{ sunbird_portal_uci_blob_url | default('https://' + cloud_storage_url + '/uci') }}
+sunbird_portal_uci_blob_url={{ sunbird_portal_uci_blob_url | default(cloud_storage_url + '/uci') }}
portal_redirect_error_callback_domain={{portal_redirect_error_callback_domain | default("https://"+domain_name)}}
sunbird_portal_uci_bot_phone_number={{sunbird_portal_uci_bot_phone_number | default(+912249757677)}}
@@ -205,20 +200,22 @@ sunbird_questionset_children_limit={{ sunbird_questionset_children_limit | defau
#release-5.0.0
-#AWS config for storage access
-#To be reverted post testing
sunbird_cloud_storage_provider={{cloud_service_provider}}
-sunbird_aws_bucket_name={{aws_private_bucket_name | default("")}}
-sunbird_aws_reports={{aws_reports_folder_name | default("reports")}}
-sunbird_aws_labels={{aws_labels_folder_name | default("labels")}}
-sunbird_aws_access_key={{aws_private_bucket_access_key | default("")}}
-sunbird_aws_secret_key={{aws_private_bucket_secret_key | default("")}}
-sunbird_aws_region={{aws_private_bucket_region | default("ap-south-1")}}
-
-#GCLOUD config for storage access
-sunbird_gcloud_bucket_name={{gcloud_private_bucket_name | default("")}}
-sunbird_gcloud_reports={{gcloud_reports_folder_name | default("reports")}}
-sunbird_gcloud_labels={{gcloud_labels_folder_name | default("labels")}}
-sunbird_gcloud_client_email={{gcloud_private_bucket_client_email | default("")}}
-sunbird_gcloud_private_key={{gcloud_private_bucket_private_key | default("")}}
-sunbird_gcloud_projectId={{gcloud_private_bucket_projectId | default("")}}
+
+#release-5.1.0
+#CSP configuration variables changes
+cloud_private_storage_accountname={{cloud_private_storage_accountname | default("")}}
+cloud_private_storage_secret={{cloud_private_storage_secret | default("")}}
+cloud_private_storage_region={{cloud_private_storage_region | default("ap-south-1")}}
+cloud_private_storage_project={{cloud_private_storage_project | default("")}}
+cloud_private_storage_endpoint={{cloud_private_storage_endpoint | default("")}}
+cloud_storage_privatereports_bucketname={{cloud_storage_privatereports_bucketname | default("reports")}}
+cloud_storage_resourceBundle_bucketname={{cloud_storage_label_bucketname | default("label")}}
+cloud_storage_desktopCrash_bucketname={{cloud_storage_desktopcrash_bucketname | default("desktopappcrashlogs")}}
+
+#release-6.0.0
+sunbird_default_board={{sunbird_default_board | default("")}}
+
+#release-8.0.0
+sunbird_uci_configured={{sunbird_uci_configured | default('false')}}
+
diff --git a/ansible/roles/stack-sunbird/templates/sunbird_user-org-service.env b/ansible/roles/stack-sunbird/templates/sunbird_userorg-service.env
similarity index 100%
rename from ansible/roles/stack-sunbird/templates/sunbird_user-org-service.env
rename to ansible/roles/stack-sunbird/templates/sunbird_userorg-service.env
diff --git a/ansible/roles/stack-sunbird/templates/taxonomy-service_application.conf b/ansible/roles/stack-sunbird/templates/taxonomy-service_application.conf
index 1c3714fbe8..9ad06d30f8 100644
--- a/ansible/roles/stack-sunbird/templates/taxonomy-service_application.conf
+++ b/ansible/roles/stack-sunbird/templates/taxonomy-service_application.conf
@@ -366,10 +366,11 @@ platform {
}
# Cloud Storage Config
-cloud_storage_type: "azure"
-azure_storage_key: "{{ sunbird_public_storage_account_name }}"
-azure_storage_secret: "{{ sunbird_public_storage_account_key }}"
-azure_storage_container: "{{ sunbird_content_azure_storage_container }}"
+cloud_storage_type: "{{ cloud_service_provider }}"
+cloud_storage_key: "{{ cloud_public_storage_accountname }}"
+cloud_storage_secret: "{{ cloud_public_storage_secret }}"
+cloud_storage_endpoint: "{{ cloud_public_storage_endpoint }}"
+cloud_storage_container: "{{ cloud_storage_content_bucketname }}"
installation.id: ekstep
@@ -397,3 +398,21 @@ objectcategorydefinition.keyspace="{{ lp_cassandra_keyspace_prefix }}_category_s
# Framework master category validation Supported values are Yes/No
master.category.validation.enabled="{{ master_category_validation_enabled | default('Yes') }}"
+
+cloudstorage {
+ metadata.replace_absolute_path={{ cloudstorage_replace_absolute_path | default('false') }}
+ relative_path_prefix={{ cloudstorage_relative_path_prefix_content }}
+ metadata.list={{ cloudstorage_metadata_list }}
+ read_base_path="{{ cloudstorage_base_path }}"
+ write_base_path={{ valid_cloudstorage_base_urls }}
+}
+
+framework {
+ keyspace: "{{ lp_cassandra_keyspace_prefix }}_hierarchy_store"
+ cache {
+ ttl: 86400
+ enable: true
+ }
+ categories_cached: ["subject", "medium", "gradeLevel", "board"]
+ max_term_creation_limit: 200
+}
diff --git a/ansible/roles/stack-sunbird/templates/transformer.env b/ansible/roles/stack-sunbird/templates/transformer.env
index fd2e6d00aa..9c96eb97da 100644
--- a/ansible/roles/stack-sunbird/templates/transformer.env
+++ b/ansible/roles/stack-sunbird/templates/transformer.env
@@ -15,6 +15,7 @@ KAFKA_ODK_TRANSFORMER_TOPIC_PATTERN={{env_name}}.odk.*
KAFKA_LOGS_TOPIC={{env_name}}.inbound-unprocessed
KAFKA_PROCESS_OUTBOUND={{env_name}}.process-outbound
KAFKA_BROADCAST_TRANSFORMER_TOPIC={{env_name}}.broadcast-transformer
+KAFKA_GENERIC_TRANSFORMER_TOPIC={{env_name}}.generic-transformer
#FormsDB
FORMS_DB_URL=postgresql://{{uci_postgres_host}}:5432/{{uci_forms_postgres_database}}
@@ -70,8 +71,25 @@ REDIS_DB_INDEX={{redis_db_index_uci | default('7')}}
EXHAUST_TELEMETRY_ENABLED=TRUE
POSTHOG_EVENT_ENABLED=FALSE
-#Azure Config
-AZURE_BLOB_STORE_CONTAINER={{sunbird_azure_uci_container_name | default('uci-' + env )}}
-AZURE_BLOB_STORE_ACCOUNT_KEY={{sunbird_private_storage_account_name}}
-AZURE_BLOB_STORE_ACCOUNT_NAME={{sunbird_private_storage_account_key}}
-SELECTED_FILE_CDN=azure
\ No newline at end of file
+#Sunbird CDN Configuration
+SUNBIRD_CLOUD_MEDIA_STORAGE_TYPE={{cloud_service_provider}}
+SUNBIRD_CLOUD_MEDIA_STORAGE_KEY={{cloud_private_storage_accountname}}
+SUNBIRD_CLOUD_MEDIA_STORAGE_SECRET={{cloud_private_storage_secret}}
+SUNBIRD_CLOUD_MEDIA_STORAGE_CONTAINER={{cloud_storage_uci_bucketname | default('uci-' + env )}}
+
+#Selected CDN Configuration
+SELECTED_FILE_CDN=sunbird
+
+#Doubtnut config
+DOUBTNUT_BASE_URL={{doubtnut_base_url | default("") }}
+DOUBTNUT_AUTH_KEY={{doubtnut_auth_key | default("") }}
+DOUBTNUT_WELCOME_MSG={{doubtnut_bot_welcome_msg | default("Welcome to doubtnut") }}
+DOUBTNUT_WELCOME_VIDEO={{doubtnut_bot_video_url | default("") }}
+
+
+#nl app url
+NLAPP_USER_URL={{nlapp_user_url | default("") }}
+NLAPP_USER_AUTH={{nl_user_auth | default("") }}
+NLAPP_USER_XAPPID={{nlapp_user_xappid | default("") }}
+
+
diff --git a/ansible/roles/stack-sunbird/templates/sunbird_learner-service.env b/ansible/roles/stack-sunbird/templates/userorg-service.env
similarity index 86%
rename from ansible/roles/stack-sunbird/templates/sunbird_learner-service.env
rename to ansible/roles/stack-sunbird/templates/userorg-service.env
index 79d0bfe1e3..baf242268f 100644
--- a/ansible/roles/stack-sunbird/templates/sunbird_learner-service.env
+++ b/ansible/roles/stack-sunbird/templates/userorg-service.env
@@ -11,7 +11,6 @@ sunbird_cassandra_username=cassandra
sunbird_cassandra_password=password
actor_hostname=actor-service
bind_hostname=0.0.0.0
-ekstep_authorization={{sunbird_ekstep_api_key}}
sunbird_pg_host={{sunbird_pg_host}}
sunbird_pg_port={{sunbird_pg_port}}
sunbird_pg_db={{sunbird_pg_db}}
@@ -20,7 +19,7 @@ sunbird_pg_password={{sunbird_pg_password}}
sunbird_installation={{sunbird_installation}}
sunbird_analytics_api_base_url={{sunbird_analytics_api_base_url}}
sunbird_search_service_api_base_url={{sunbird_search_service_api_base_url}}
-ekstep_api_base_url={{sunbird_content_repo_api_base_url}}
+sunbird_content_service_api_base_url={{sunbird_content_service_api_base_url}}
sunbird_mail_server_host={{sunbird_mail_server_host}}
sunbird_mail_server_port={{sunbird_mail_server_port}}
sunbird_mail_server_username={{sunbird_mail_server_username}}
@@ -28,8 +27,8 @@ sunbird_mail_server_password={{sunbird_mail_server_password}}
sunbird_mail_server_from_email={{sunbird_mail_server_from_email}}
sunbird_encryption_key={{sunbird_encryption_key}}
sunbird_encryption_mode={{sunbird_encryption_mode}}
-sunbird_account_name={{sunbird_public_storage_account_name}}
-sunbird_account_key={{sunbird_public_storage_account_key}}
+sunbird_account_name={{cloud_public_storage_accountname}}
+sunbird_account_key={{cloud_public_storage_secret}}
sunbird_quartz_mode={{sunbird_sunbird_quartz_mode}}
sunbird_env_logo_url={{sunbird_env_logo_url}}
sunbird_web_url={{sunbird_web_url}}
@@ -44,7 +43,7 @@ sunbird_cassandra_host={{sunbird_cassandra_host}}
sunbird_cassandra_port=9042
{% endif %}
sunbird_cassandra_consistency_level={{sunbird_cassandra_consistency_level}}
-sunbird_mw_system_host=learner-service
+sunbird_mw_system_host=userorg-service
sunbird_mw_system_port=8088
background_actor_provider=local
api_actor_provider=local
@@ -54,12 +53,10 @@ sunbird_remote_bg_req_router_path=akka.tcp://SunbirdMWSystem@actor-service:8088/
sunbird_api_base_url=http://knowledge-mw-service:5000
sunbird_authorization={{sunbird_api_auth_token}}
telemetry_pdata_id={{sunbird_telemetry_pdata_id}}
-telemetry_pdata_pid=learner-service
+telemetry_pdata_pid=userorg-service
sunbird_telemetry_base_url=http://telemetry-service:9001
telemetry_queue_threshold_value=100
sunbird_default_channel={{sunbird_default_channel}}
-sunbird_api_mgr_base_url=http://knowledge-mw-service:5000
-sunbird_cs_base_url=http://knowledge-mw-service:5000
sunbird_cs_search_path=/v1/content/search
sunbird_user_bulk_upload_size={{sunbird_user_bulk_upload_size}}
@@ -79,17 +76,16 @@ sunbird_course_batch_notification_enabled={{sunbird_course_batch_notification_en
sunbird_course_batch_notification_signature={{sunbird_course_batch_notification_signature}}
sunbird_otp_expiration={{sunbird_otp_expiration}}
sunbird_otp_length={{sunbird_otp_length}}
-sunbird_content_azure_storage_container={{sunbird_content_azure_storage_container}}
+sunbird_content_cloud_storage_container={{cloud_storage_content_bucketname}}
# Release-1.14
sunbird_time_zone={{sunbird_time_zone}}
# Release-1.15
sunbird_health_check_enable={{sunbird_health_check_enable}}
sunbird_keycloak_user_federation_provider_id={{core_vault_sunbird_keycloak_user_federation_provider_id}}
sunbird_gzip_enable={{sunbird_gzip_enable}}
-sunbird_course_metrics_base_url={{sunbird_course_metrics_base_url}}
sunbird_gzip_size_threshold={{sunbird_gzip_size_threshold | default(262144)}}
-sunbird_analytics_blob_account_name={{sunbird_private_storage_account_name}}
-sunbird_analytics_blob_account_key={{sunbird_private_storage_account_key}}
+sunbird_analytics_blob_account_name={{cloud_private_storage_accountname}}
+sunbird_analytics_blob_account_key={{cloud_private_storage_secret}}
# Optional for caching
sunbird_cache_enable={{sunbird_cache_enable | default(false)}}
# Set below variables if above true
@@ -102,7 +98,7 @@ sunbird_user_cert_kafka_topic={{kafka_topic_lms_user_account}}
sunbird_reset_pass_msg={{sunbird_reset_pass_msg | d('You have requested to reset password. Click on the link to set a password: {0}')}}
sunbird_fuzzy_search_threshold={{sunbird_fuzzy_search_threshold | d('0.5')}}
sunbird_subdomain_keycloak_base_url={{sunbird_subdomain_keycloak_base_url | d('')}}/
-#Required by Learner-service to call cert service
+#Required by userorg-service to call cert service
sunbird_cert_service_base_url=http://cert-service:9000
quartz_shadow_user_migration_timer={{sunbird_quartz_shadow_user_migration_timer}}
sunbird_otp_allowed_attempt={{sunbird_otp_allowed_attempt|default(2)}}
@@ -126,9 +122,21 @@ form_api_endpoint={{form_api_endpoint | default('/plugin/v1/form/read')}}
learner_in_memory_cache_ttl={{learner_in_memory_cache_ttl | default(600)}}
user_index_alias={{user_index_alias | default('user_alias')}}
org_index_alias={{org_index_alias | default('org_alias')}}
-sunbird_installation_display_name_for_sms=DIKSHA
+sunbird_installation_display_name_for_sms=SUNBIRD
sunbird_sso_lb_ip={{keycloak_url}}
# Release-5.0.0
sunbird_cloud_service_provider={{cloud_service_provider}}
isMultiDCEnabled={{cassandra_multi_dc_enabled}}
+
+# Release 5.4.0 LR-102
+es_user_notes_index=usernotes
+es_location_index=location
+es_user_feed_index=userfeed
+sunbird_userorg_keyspace=sunbird
+
+# Release-7.0.0
+user-deletion-roles=public
+user-deletion-broadcast-topic={{env_name}}.delete.user
+sunbird_support_email={{ sunbird_mail_server_from_email }}
+user-ownership-transfer-topic={{env_name}}.user.ownership.transfer
\ No newline at end of file
diff --git a/ansible/roles/stack-sunbird/templates/learner-service_logback.xml b/ansible/roles/stack-sunbird/templates/userorg-service_logback.xml
similarity index 100%
rename from ansible/roles/stack-sunbird/templates/learner-service_logback.xml
rename to ansible/roles/stack-sunbird/templates/userorg-service_logback.xml
diff --git a/ansible/roles/upload-batch/tasks/main.yml b/ansible/roles/upload-batch/tasks/main.yml
deleted file mode 100644
index 1055bdb7f4..0000000000
--- a/ansible/roles/upload-batch/tasks/main.yml
+++ /dev/null
@@ -1,8 +0,0 @@
----
-- name: Ensure azure blob storage container exists
- command: az storage container create --name {{ container_name }} --public-access container
-
-- name: Upload to azure blob storage
- command: az storage blob upload-batch --destination {{ destination_path }} --source {{ source_path }}
- async: 3600
- poll: 10
diff --git a/ansible/static-files/health.sh b/ansible/static-files/health.sh
index 575fd669e2..6b62b7dfb3 100755
--- a/ansible/static-files/health.sh
+++ b/ansible/static-files/health.sh
@@ -6,7 +6,7 @@
#apk add jq
outpt1=$(curl -s content-service:5000/health | jq '.result.healthy')
outpt2=$(curl -s player_player:3000/health| jq '.result.healthy')
-outpt3=$(curl -s learner-service:9000/health | jq '.result.response.checks[0].healthy')
+outpt3=$(curl -s userorg-service:9000/health | jq '.result.response.checks[0].healthy')
outpt4=$(curl -s lms-service:9005/health | jq '.result.response.checks[0].healthy')
echo ""
echo ""
@@ -29,9 +29,9 @@ echo ""
echo ""
if [ "$outpt3" == "true" ];then
- echo "Learner Service is Healthy"
+ echo "UserOrg Service is Healthy"
else
- echo "Learner Service is unhealthy"
+ echo "UserOrg Service is unhealthy"
fi
echo ""
diff --git a/ansible/uploadFAQs.yml b/ansible/uploadFAQs.yml
index 1cc8fdbe8f..9913741938 100644
--- a/ansible/uploadFAQs.yml
+++ b/ansible/uploadFAQs.yml
@@ -1,47 +1,140 @@
- hosts: localhost
- become: yes
vars_files:
- "{{inventory_dir}}/secrets.yml"
- vars:
- container_name: "{{ blob_container }}"
- destination_path: "{{ blob_container }}"
- environment:
- AZURE_STORAGE_ACCOUNT: "{{ sunbird_public_storage_account_name }}"
- AZURE_STORAGE_KEY: "{{ sunbird_public_storage_account_key }}"
tasks:
- - name: upload files
- include_role:
- name: upload-batch
- vars:
- source_path: "{{ playbook_dir }}/../utils/{{ item }}"
- with_items:
- - "{{ source_folder.split(',') }}"
+ - name: template schema files
+ template:
+ src: "{{ item }}"
+ dest: "{{ item }}"
+ with_fileglob:
+ - "{{ playbook_dir }}/../utils/sunbird-RC/schema/*.json"
tags:
- - upload-faqs
+ - upload-RC-schema
+
+- hosts: localhost
+ vars_files:
+ - "{{inventory_dir}}/secrets.yml"
+ tasks:
+ - name: upload batch of files to azure storage
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: blob-upload-batch.yml
+ vars:
+ blob_container_name: "{{ cloud_storage_public_bucketname }}"
+ container_public_access: "container"
+ blob_container_folder_path: ""
+ local_file_or_folder_path: "{{ playbook_dir }}/../utils/{{ item }}"
+ storage_account_name: "{{ cloud_public_storage_accountname }}"
+ storage_account_key: "{{ cloud_public_storage_secret }}"
+ with_items:
+ - "{{ source_folder.split(',') }}"
+ when: cloud_service_provider == "azure"
+ - name: upload batch of files to s3
+ include_role:
+ name: aws-cloud-storage
+ tasks_from: upload-folder.yml
+ vars:
+ s3_bucket_name: "{{ cloud_storage_public_bucketname }}"
+ aws_default_region: "{{ cloud_public_storage_region }}"
+ aws_access_key_id: "{{ cloud_public_storage_accountname }}"
+ aws_secret_access_key: "{{ cloud_public_storage_secret }}"
+ local_file_or_folder_path: "{{ playbook_dir }}/../utils/{{ item }}"
+ s3_path: ""
+ with_items:
+ - "{{ source_folder.split(',') }}"
+ when: cloud_service_provider == "aws"
+
+ - name: upload batch of files to gcloud storage
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: upload-batch.yml
+ vars:
+ gcp_storage_service_account_name: "{{ cloud_public_storage_accountname }}"
+ gcp_storage_key_file: "{{ cloud_public_storage_secret }}"
+ gcp_bucket_name: "{{ cloud_storage_public_bucketname }}"
+ dest_folder_path: ""
+ local_file_or_folder_path: "{{ playbook_dir }}/../utils/{{ item }}"
+ with_items:
+ - "{{ source_folder.split(',') }}"
+ when: cloud_service_provider == "gcloud"
+
+ - name: upload batch of files to oci oss
+ include_role:
+ name: oci-cloud-storage
+ apply:
+ environment:
+ OCI_CLI_AUTH: "instance_principal"
+ tasks_from: upload-folder.yml
+ vars:
+ oss_bucket_name: "{{ cloud_storage_public_bucketname }}"
+ oss_path: ""
+ local_file_or_folder_path: "{{ playbook_dir }}/../utils/{{ item }}"
+ with_items:
+ - "{{ source_folder.split(',') }}"
+ when: cloud_service_provider == "oci"
+ tags:
+ - upload-faqs
+
- hosts: localhost
- become: yes
vars_files:
- "{{inventory_dir}}/secrets.yml"
- vars:
- container_name: "{{ blob_container }}"
- destination_path: "{{ blob_container }}"
- environment:
- AZURE_STORAGE_ACCOUNT: "{{ sunbird_public_storage_account_name }}"
- AZURE_STORAGE_KEY: "{{ sunbird_public_storage_account_key }}"
tasks:
- - name: template schema files
- template:
- src: "{{ item }}"
- dest: "{{ item }}"
- with_fileglob:
- - "{{ playbook_dir }}/../utils/sunbird-RC/schema/*.json"
- - name: upload files
- include_role:
- name: upload-batch
- vars:
- source_path: "{{ playbook_dir }}/../utils/{{ item }}"
- with_items:
- - "{{ source_folder.split(',') }}"
+ - name: upload batch of files to azure storage
+ include_role:
+ name: azure-cloud-storage
+ tasks_from: blob-upload-batch.yml
+ vars:
+ blob_container_name: "{{ cloud_storage_content_bucketname }}"
+ container_public_access: "container"
+ blob_container_folder_path: ""
+ local_file_or_folder_path: "{{ playbook_dir }}/../utils/{{ item }}"
+ storage_account_name: "{{ cloud_public_storage_accountname }}"
+ storage_account_key: "{{ cloud_public_storage_secret }}"
+ with_items:
+ - "{{ source_folder.split(',') }}"
+ when: cloud_service_provider == "azure"
+
+ - name: upload batch of files to s3
+ include_role:
+ name: aws-cloud-storage
+ tasks_from: upload-folder.yml
+ vars:
+ s3_bucket_name: "{{ cloud_storage_content_bucketname }}"
+ aws_default_region: "{{ cloud_public_storage_region }}"
+ aws_access_key_id: "{{ cloud_public_storage_accountname }}"
+ aws_secret_access_key: "{{ cloud_public_storage_secret }}"
+ local_file_or_folder_path: "{{ playbook_dir }}/../utils/{{ item }}"
+ s3_path: ""
+ with_items:
+ - "{{ source_folder.split(',') }}"
+ when: cloud_service_provider == "aws"
+
+ - name: upload batch of files to gcloud storage
+ include_role:
+ name: gcp-cloud-storage
+ tasks_from: upload-batch.yml
+ vars:
+ gcp_bucket_name: "{{ cloud_storage_content_bucketname }}"
+ dest_folder_path: ""
+ local_file_or_folder_path: "{{ playbook_dir }}/../utils/{{ item }}"
+ with_items:
+ - "{{ source_folder.split(',') }}"
+ when: cloud_service_provider == "gcloud"
+
+ - name: upload batch of files to oci oss
+ include_role:
+ name: oci-cloud-storage
+ apply:
+ environment:
+ OCI_CLI_AUTH: "instance_principal"
+ tasks_from: upload-folder.yml
+ vars:
+ oss_bucket_name: "{{ cloud_storage_content_bucketname }}"
+ oss_path: ""
+ local_file_or_folder_path: "{{ playbook_dir }}/../utils/{{ item }}"
+ with_items:
+ - "{{ source_folder.split(',') }}"
+ when: cloud_service_provider == "oci"
tags:
- - upload-RC-schema
+ - upload-RC-schema
diff --git a/deploy/config.yml b/deploy/config.yml
index 2a273eb222..2904731e2e 100755
--- a/deploy/config.yml
+++ b/deploy/config.yml
@@ -68,7 +68,7 @@ sunbird_root_user_email: # email address of the Sunb
sunbird_root_user_phone: # mobile number of the Sunbird admin user
# After Running ./sunbird_install.sh get the sso_publickey from keycloak and update in config,then follow the below Steps:
-# 1> run `./sunbird_install.sh -s core` this script will install all the core services(Player, Content, Learner, Badger)
+# 1> run `./sunbird_install.sh -s core` this script will install all the core services(Player, Content, UserOrg, Badger)
# 2> run `./sunbird_install.sh -s systeminit` this script will configure the default channel and create user to login to sunbird
# 3> run `./sunbird_install.sh -s posttest` this script will validate the sunbird installation and check whether all services are running
diff --git a/deploy/deploy-core.sh b/deploy/deploy-core.sh
index f5c9fc1a7f..65f24fa50b 100755
--- a/deploy/deploy-core.sh
+++ b/deploy/deploy-core.sh
@@ -32,9 +32,9 @@ badger_token=$(cat ~/badger_token.txt | cut -d '"' -f 4)
echo "@@@@@@@@@ Redeploy player service"
ansible-playbook -i $INVENTORY_PATH ../ansible/deploy.yml --tags "stack-sunbird" --extra-vars "hub_org=${ORG} image_name=player image_tag=${PLAYER_VERSION} service_name=player deploy_stack=True sunbird_api_auth_token=${sunbird_api_auth_token} vault_badging_authorization_key=${badger_token}" --extra-vars @config.yml
-# Re-deploy Learner service
-echo "Redeploy learner service"
-ansible-playbook -i $INVENTORY_PATH ../ansible/deploy.yml --tags "stack-sunbird" --extra-vars "hub_org=${ORG} image_name=learner_service image_tag=${LEARNER_SERVICE_VERSION} service_name=learner-service deploy_learner=True sunbird_api_auth_token=${sunbird_api_auth_token} vault_badging_authorization_key=${badger_token}" --extra-vars @config.yml -v
+# Re-deploy UserOrg service
+echo "Redeploy UserOrg service"
+ansible-playbook -i $INVENTORY_PATH ../ansible/deploy.yml --tags "stack-sunbird" --extra-vars "hub_org=${ORG} image_name=userorg-service image_tag=${USERORG_SERVICE_VERSION} service_name=userorg-service deploy_userorg=True sunbird_api_auth_token=${sunbird_api_auth_token} vault_badging_authorization_key=${badger_token}" --extra-vars @config.yml -v
# Re-deploy Content service
echo "Redeploy content service"
diff --git a/deploy/gitOPS/github.csv b/deploy/gitOPS/github.csv
index 64bf495ac6..4148fc6bfb 100644
--- a/deploy/gitOPS/github.csv
+++ b/deploy/gitOPS/github.csv
@@ -1,5 +1,5 @@
#REPO_NAME,BRANCH_NAME,MERGE_ACCESS_USERS(;),CHECKS
-sunbird-lms-service,jenkins-test,harshavardhanc;abcb,3
+userorg-service,jenkins-test,harshavardhanc;abcb,3
diff --git a/deploy/grafana/dashboards/General/service-memory-usage-ds1.json b/deploy/grafana/dashboards/General/service-memory-usage-ds1.json
index 62618d9a42..6f7fd973e4 100644
--- a/deploy/grafana/dashboards/General/service-memory-usage-ds1.json
+++ b/deploy/grafana/dashboards/General/service-memory-usage-ds1.json
@@ -224,7 +224,7 @@
"steppedLine": false,
"targets": [
{
- "expr": "max(container_memory_usage_bytes{container_label_com_docker_swarm_service_name=~\"learner-service\"})",
+ "expr": "max(container_memory_usage_bytes{container_label_com_docker_swarm_service_name=~\"userorg-service\"})",
"format": "time_series",
"intervalFactor": 2,
"refId": "A",
@@ -235,7 +235,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
- "title": "learner-service",
+ "title": "userorg-service",
"tooltip": {
"shared": true,
"sort": 0,
diff --git a/deploy/jenkins/jenkins-mobile-slave-setup.sh b/deploy/jenkins/jenkins-mobile-slave-setup.sh
new file mode 100644
index 0000000000..38e8369bba
--- /dev/null
+++ b/deploy/jenkins/jenkins-mobile-slave-setup.sh
@@ -0,0 +1,47 @@
+#!/bin/bash
+bold=$(tput bold)
+normal=$(tput sgr0)
+
+echo -e "\n\e[0;32m${bold}Updating the apt repo${normal}\n"
+apt update
+
+echo -e "\n\e[0;32m${bold}Installating JDK11${normal}\n"
+apt install -y openjdk-11-jdk
+
+echo -e "\n\e[0;32m${bold}Installating Git ${normal}"
+apt install -y git
+
+echo -e "\n\e[0;32m${bold}Installating zip unzip${normal}"
+apt install -y unzip zip
+
+echo -e "\n\e[0;32m${bold}Installating JQ${normal}"
+apt install -y jq
+
+echo -e "\n\e[0;32m${bold}Installating Gradle-6.5.1${normal}"
+wget -O gradle-6.5.1.zip https://services.gradle.org/distributions/gradle-6.5.1-all.zip
+unzip -q gradle-6.5.1.zip
+mkdir -p /usr/lib/gradle
+mv gradle-6.5.1 6.5.1
+sudo mv 6.5.1 /usr/lib/gradle/
+
+echo -e "\n\e[0;32m${bold}Installating Gradle-7.4.1${normal}"
+wget -O gradle-7.4.1.zip 'https://services.gradle.org/distributions/gradle-7.4.1-all.zip'
+unzip -q gradle-7.4.1.zip
+mkdir -p /opt/gradle
+mv gradle-7.4.1 /opt/gradle/
+
+echo -e "\n\e[0;32m${bold}Installating node"
+wget https://nodejs.org/download/release/v12.20.0/node-v12.20.0-linux-x64.tar.gz
+tar -xvf node-v12.20.0-linux-x64.tar.gz
+mv node-v12.20.0-linux-x64 /usr/local/lib/
+ln -s /usr/local/lib/node-v12.20.0-linux-x64/bin/node /usr/bin/node
+ln -s /usr/local/lib/node-v12.20.0-linux-x64/bin/npm /usr/bin/npm
+
+echo -e "\n\e[0;32m${bold}Installating node modules"
+npm install -g ionic
+npm install -g cordova@10.0.0
+npm install -g cordova-res
+ln -s /usr/local/lib/node-v12.20.0-linux-x64/bin/ionic /usr/bin/ionic
+ln -s /usr/local/lib/node-v12.20.0-linux-x64/bin/cordova /usr/bin/cordova
+
+echo -e "\n\e[0;32m${bold}Jenkins slave installation complete..${normal}"
\ No newline at end of file
diff --git a/deploy/jenkins/jenkins-plugins-setup.sh b/deploy/jenkins/jenkins-plugins-setup.sh
index ed9a8c1756..c4256b3620 100755
--- a/deploy/jenkins/jenkins-plugins-setup.sh
+++ b/deploy/jenkins/jenkins-plugins-setup.sh
@@ -17,13 +17,13 @@ fi
echo -e "\n\e[0;32m${bold}Downloading and copying jenkins plugin directory to Jenkins ${normal}"
if [[ ! -d /var/lib/jenkins/plugins ]]; then
-wget https://sunbirdpublic.blob.core.windows.net/installation/plugins.tar
-tar -xf plugins.tar
+wget https://sunbirdpublic.blob.core.windows.net/installation/plugins-2-319-3.tar
+tar -xf plugins-2-319-3.tar
mv plugins /var/lib/jenkins/
chown -R jenkins:jenkins /var/lib/jenkins/plugins
else
-wget https://sunbirdpublic.blob.core.windows.net/installation/plugins.tar
-tar -xf plugins.tar
+wget https://sunbirdpublic.blob.core.windows.net/installation/plugins-2-319-3.tar
+tar -xf plugins-2-319-3.tar
cp -rf plugins/* /var/lib/jenkins/plugins/
chown -R jenkins:jenkins /var/lib/jenkins/plugins
fi
diff --git a/deploy/jenkins/jenkins-server-setup.sh b/deploy/jenkins/jenkins-server-setup.sh
index ad2b361671..2c7516a57a 100755
--- a/deploy/jenkins/jenkins-server-setup.sh
+++ b/deploy/jenkins/jenkins-server-setup.sh
@@ -12,10 +12,10 @@ echo -e "\n\e[0;32m${bold}Installating JDK8${normal}\n"
apt-get install -y openjdk-8-jdk
echo -e "\n\e[0;32m${bold}Installating Jenkins${normal}"
-wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | apt-key add -
+wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key | apt-key add -
apt-add-repository "deb https://pkg.jenkins.io/debian-stable binary/"
apt-get update
-apt-get install -y jenkins=2.277.4
+apt-get install -y jenkins=2.346.3
echo -e "\n\e[0;32m${bold}Installating PIP${normal}"
apt-get install -y python-pip
@@ -89,6 +89,7 @@ apt update
wget https://aka.ms/downloadazcopy-v10-linux
tar -xf downloadazcopy-v10-linux
cp ./azcopy_linux_amd64_*/azcopy /usr/bin/
+chmod +x /usr/bin/azcopy
rm -rf downloadazcopy-v10-linux* azcopy_linux_amd*
###
@@ -114,6 +115,7 @@ su jenkins bash -c "curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.
echo -e "\n\e[0;32m${bold}Installing jmespath${normal}"
sudo apt install -y python3-jmespath
+sudo apt install python-jmespath #python2
#### Kubernetes Tools ####
@@ -145,9 +147,16 @@ mv jdk-11 java-11-openjdk-amd64
cp -r java-11-openjdk-amd64 /usr/lib/jvm/
rm -rf java-11-openjdk-amd64 openjdk-11+28_linux-x64_bin.tar.gz
+#Install openjdk-11.0.2 # needed for DP jobs
+echo -e "\n\e[0;32m${bold}Installating openjdk 11.0.2${normal}"
+wget https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_linux-x64_bin.tar.gz
+tar -xf openjdk-11.0.2_linux-x64_bin.tar.gz
+mv jdk-11.0.2 /usr/lib/jvm/
+rm openjdk-11.0.2_linux-x64_bin.tar.gz
+
#Install maven 3.6.3
echo -e "\n\e[0;32m${bold}Installating maven 3.6.3${normal}"
-wget https://downloads.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
+wget https://archive.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
tar -xf apache-maven-3.6.3-bin.tar.gz
mv apache-maven-3.6.3 /opt/
mv /opt/apache-maven-3.6.3/bin/mvn /opt/apache-maven-3.6.3/bin/mvn3.6
diff --git a/deploy/jenkins/jenkins.yaml b/deploy/jenkins/jenkins.yaml
index 5f4b9523f0..6833b9be97 100644
--- a/deploy/jenkins/jenkins.yaml
+++ b/deploy/jenkins/jenkins.yaml
@@ -46,6 +46,10 @@ jenkins:
value: "${GH_PRIVATE_REPO_URL}"
- key: public_repo_branch
value: "${GH_PUBLIC_REPO_BRANCH}"
+ - key: kp_public_repo_branch
+ value: "${KP_PUBLIC_REPO_BRANCH}" # branch of https://github.com/project-sunbird/sunbird-learning-platform
+ - key: dp_public_repo_branch
+ value: "${DP_PUBLIC_REPO_BRANCH}" # branch of https://github.com/project-sunbird/sunbird-data-pipeline.git
- key: override_private_branch
value: "true"
- key: override_public_branch
diff --git a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/Core/jobs/OfflineInstaller/config.xml b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/Core/jobs/OfflineInstaller/config.xml
new file mode 100644
index 0000000000..cbff43d2d0
--- /dev/null
+++ b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/Core/jobs/OfflineInstaller/config.xml
@@ -0,0 +1,108 @@
+
+
+
+
+ hudson.model.ParametersDefinitionProperty
+ com.sonyericsson.rebuild.RebuildSettings
+
+
+
+
+ false
+
+
+
+ -1
+ -1
+ -1
+ 5
+
+
+
+
+ false
+ false
+
+
+
+
+ absolute_job_path
+ <font color=dimgray size=2><b>Do not change this value! The metadata.json will be copied from this job.</b></font>
+ Build/Core/OfflineInstaller
+ false
+
+
+ build_number
+ <font color=darkgreen size=2><b>OPTIONAL: Specify the build job number to upload / copy the artifact built in that job.</b></font>
+ lastSuccessfulBuild
+ false
+
+
+ artifact_source
+ <font color=dimgray size=2><b>
+ArtifactRepo - Upload and keep a copy of the artifact in Jenkins, JenkinsJob - Just keep a copy of the artifact in Jenkins.</b></font>
+
+
+ ArtifactRepo
+ JenkinsJob
+
+
+
+
+
+
+ 0
+ 0
+
+ false
+ project
+ false
+
+
+
+
+
+
+
+ Build/Core/OfflineInstaller
+
+ SUCCESS
+ 0
+ BLUE
+ true
+
+
+
+
+
+
+
+ 2
+
+
+ https://github.com/project-sunbird/sunbird-devops.git
+
+
+
+
+ ${public_repo_branch}
+
+
+ false
+
+
+
+ true
+ false
+
+ 0
+ false
+
+
+
+ pipelines/upload/artifacts/Jenkinsfile
+ false
+
+
+ false
+
diff --git a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/Core/jobs/Learner/config.xml b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/Core/jobs/UserOrg/config.xml
similarity index 97%
rename from deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/Core/jobs/Learner/config.xml
rename to deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/Core/jobs/UserOrg/config.xml
index a0f41171e9..103b8d979e 100644
--- a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/Core/jobs/Learner/config.xml
+++ b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/Core/jobs/UserOrg/config.xml
@@ -28,7 +28,7 @@
absolute_job_path
<font color=dimgray size=2><b>Do not change this value! The metadata.json will be copied from this job.</b></font>
- Build/Core/Learner
+ Build/Core/UserOrg
false
@@ -64,7 +64,7 @@ ArtifactRepo - Push the docker image to container registry.
- /Build/Core/Learner
+ /Build/Core/UserOrg
SUCCESS
0
diff --git a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/AdhocScripts/config.xml b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/AdhocScripts/config.xml
index 9a042704ae..8b38850fbf 100644
--- a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/AdhocScripts/config.xml
+++ b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/AdhocScripts/config.xml
@@ -85,7 +85,7 @@ ArtifactRepo - Upload and keep a copy of the artifact in Jenkins, JenkinsJob - J
- ${public_repo_branch}
+ ${dp_public_repo_branch}
false
diff --git a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/Analytics/config.xml b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/Analytics/config.xml
index b4458fb7cd..a43fba3f1a 100644
--- a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/Analytics/config.xml
+++ b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/Analytics/config.xml
@@ -85,7 +85,7 @@ ArtifactRepo - Upload and keep a copy of the artifact in Jenkins, JenkinsJob - J
- ${public_repo_branch}
+ ${dp_public_repo_branch}
false
diff --git a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/AnalyticsCore/config.xml b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/AnalyticsCore/config.xml
index 6de1a96449..fbc389f9d2 100644
--- a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/AnalyticsCore/config.xml
+++ b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/AnalyticsCore/config.xml
@@ -85,7 +85,7 @@ ArtifactRepo - Upload and keep a copy of the artifact in Jenkins, JenkinsJob - J
- ${public_repo_branch}
+ ${dp_public_repo_branch}
false
diff --git a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/ApiModule/config.xml b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/ApiModule/config.xml
index af4862b0f2..af16918b5d 100644
--- a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/ApiModule/config.xml
+++ b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/ApiModule/config.xml
@@ -86,7 +86,7 @@ ArtifactRepo - Push the docker image to container registry.
- ${public_repo_branch}
+ ${dp_public_repo_branch}
false
diff --git a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/CoreDataProducts/config.xml b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/CoreDataProducts/config.xml
index f93395f5e0..5951bbf3c0 100644
--- a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/CoreDataProducts/config.xml
+++ b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/CoreDataProducts/config.xml
@@ -85,7 +85,7 @@ ArtifactRepo - Upload and keep a copy of the artifact in Jenkins, JenkinsJob - J
- ${public_repo_branch}
+ ${dp_public_repo_branch}
false
diff --git a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/DataReplay/config.xml b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/DataReplay/config.xml
index fa45925735..ac8b00eeec 100644
--- a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/DataReplay/config.xml
+++ b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/DataReplay/config.xml
@@ -85,7 +85,7 @@ ArtifactRepo - Upload and keep a copy of the artifact in Jenkins, JenkinsJob - J
- ${public_repo_branch}
+ ${dp_public_repo_branch}
false
diff --git a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/DruidAnomalyDetection/config.xml b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/DruidAnomalyDetection/config.xml
index a0fd3c44f9..6e6adfc2e7 100644
--- a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/DruidAnomalyDetection/config.xml
+++ b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/DruidAnomalyDetection/config.xml
@@ -85,7 +85,7 @@ ArtifactRepo - Upload and keep a copy of the artifact in Jenkins, JenkinsJob - J
- ${public_repo_branch}
+ ${dp_public_repo_branch}
false
diff --git a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/ETLJobs/config.xml b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/ETLJobs/config.xml
index bd031ec623..0629551eab 100644
--- a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/ETLJobs/config.xml
+++ b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/ETLJobs/config.xml
@@ -85,7 +85,7 @@ ArtifactRepo - Upload and keep a copy of the artifact in Jenkins, JenkinsJob - J
- ${public_repo_branch}
+ ${dp_public_repo_branch}
false
diff --git a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/EdDataProducts/config.xml b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/EdDataProducts/config.xml
index 6e67c63781..fc0724ce71 100644
--- a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/EdDataProducts/config.xml
+++ b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/EdDataProducts/config.xml
@@ -85,7 +85,7 @@ ArtifactRepo - Upload and keep a copy of the artifact in Jenkins, JenkinsJob - J
- ${public_repo_branch}
+ ${dp_public_repo_branch}
false
diff --git a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/FlinkPipelineJobs/config.xml b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/FlinkPipelineJobs/config.xml
index 78602a563a..045ac15dd5 100644
--- a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/FlinkPipelineJobs/config.xml
+++ b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/FlinkPipelineJobs/config.xml
@@ -85,7 +85,7 @@ ArtifactRepo - Push the docker image to container registry.
- ${public_repo_branch}
+ ${dp_public_repo_branch}
false
diff --git a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/MLWorkbench/config.xml b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/MLWorkbench/config.xml
index 590eab1e26..d083cc3b47 100644
--- a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/MLWorkbench/config.xml
+++ b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/MLWorkbench/config.xml
@@ -85,7 +85,7 @@ ArtifactRepo - Push the docker image to container registry.
- ${public_repo_branch}
+ ${dp_public_repo_branch}
false
diff --git a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/Secor/config.xml b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/Secor/config.xml
index d39e2833b0..15dbf5cc52 100644
--- a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/Secor/config.xml
+++ b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/DataPipeline/jobs/Secor/config.xml
@@ -86,7 +86,7 @@ ArtifactRepo - Push the docker image to container registry.
- ${public_repo_branch}
+ ${dp_public_repo_branch}
false
diff --git a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/KnowledgePlatform/jobs/CassandraTrigger/config.xml b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/KnowledgePlatform/jobs/CassandraTrigger/config.xml
index f954ac1cbe..4b0d6ba729 100644
--- a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/KnowledgePlatform/jobs/CassandraTrigger/config.xml
+++ b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/KnowledgePlatform/jobs/CassandraTrigger/config.xml
@@ -85,7 +85,7 @@ ArtifactRepo - Upload and keep a copy of the artifact in Jenkins, JenkinsJob - J
- ${public_repo_branch}
+ ${kp_public_repo_branch}
false
diff --git a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/KnowledgePlatform/jobs/CoKreatFlinkJob/config.xml b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/KnowledgePlatform/jobs/CoKreatFlinkJob/config.xml
new file mode 100644
index 0000000000..ad9ca9100c
--- /dev/null
+++ b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/KnowledgePlatform/jobs/CoKreatFlinkJob/config.xml
@@ -0,0 +1,120 @@
+
+
+
+
+
+ hudson.model.ParametersDefinitionProperty
+ com.sonyericsson.rebuild.RebuildSettings
+
+
+
+
+ false
+
+
+
+
+ -1
+ 10
+ -1
+ 5
+
+
+
+ false
+
+
+ false
+ false
+
+
+
+
+ absolute_job_path
+
+
+ Do not change this value! The metadata.json will be copied from this job.
+
+
+ Build/KnowledgePlatform/CoKreatFlinkJob
+ false
+
+
+ image_tag
+
+
+ OPTIONAL: Specify the tag to upload a specific image version to the container registry.
+
+
+ false
+
+
+ artifact_source
+
+
+ ArtifactRepo - Push the docker image to container registry.
+
+
+
+
+ ArtifactRepo
+
+
+
+
+
+
+ 0
+ 0
+
+ false
+ project
+ false
+
+
+
+
+
+
+ Build/KnowledgePlatform/CoKreatFlinkJob
+
+ SUCCESS
+ 0
+ BLUE
+ true
+
+
+
+
+
+
+
+ 2
+
+
+ https://github.com/Sunbird-coKreat/coKreat-jobs.git
+
+
+
+
+ ${public_repo_branch}
+
+
+ false
+
+
+
+ true
+ false
+
+ 1
+ false
+
+
+
+ kubernetes/pipelines/upload/Jenkinsfile
+ false
+
+
+ false
+
\ No newline at end of file
diff --git a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/KnowledgePlatform/jobs/FlinkJobs/config.xml b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/KnowledgePlatform/jobs/FlinkJobs/config.xml
index 1aa83cd9de..5df283b12c 100644
--- a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/KnowledgePlatform/jobs/FlinkJobs/config.xml
+++ b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/KnowledgePlatform/jobs/FlinkJobs/config.xml
@@ -85,7 +85,7 @@ ArtifactRepo - Push the docker image to container registry.
- ${public_repo_branch}
+ ${kp_public_repo_branch}
false
diff --git a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/KnowledgePlatform/jobs/InquiryFlinkJob/config.xml b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/KnowledgePlatform/jobs/InquiryFlinkJob/config.xml
new file mode 100644
index 0000000000..28b220559d
--- /dev/null
+++ b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/KnowledgePlatform/jobs/InquiryFlinkJob/config.xml
@@ -0,0 +1,108 @@
+
+
+
+
+ hudson.model.ParametersDefinitionProperty
+ com.sonyericsson.rebuild.RebuildSettings
+
+
+
+
+ false
+
+
+
+ -1
+ 10
+ -1
+ 1
+
+
+
+
+ false
+ false
+
+
+
+
+ absolute_job_path
+ <font color=dimgray size=2><b>Do not change this value! The metadata.json will be copied from this job.</b></font>
+ Build/KnowledgePlatform/InquiryFlinkJob
+ false
+
+
+ image_tag
+ <font color=darkgreen size=2><b>OPTIONAL: Specify the tag to upload a specific image version to the container registry.</b></font>
+
+ false
+
+
+ artifact_source
+ <font color=dimgray size=2><b>
+ArtifactRepo - Push the docker image to container registry.
+</b></font>
+
+
+ ArtifactRepo
+
+
+
+
+
+
+ 0
+ 0
+
+ false
+ project
+ false
+
+
+
+
+
+
+
+ Build/KnowledgePlatform/InquiryFlinkJob
+
+ SUCCESS
+ 0
+ BLUE
+ true
+
+
+
+
+
+
+
+ 2
+
+
+ https://github.com/Sunbird-inQuiry/data-pipeline.git
+
+
+
+
+ ${inquiry_pipeline_branch_or_tag}
+
+
+ false
+
+
+
+ true
+ false
+
+ 0
+ false
+
+
+
+ kubernetes/pipelines/upload/Jenkinsfile
+ false
+
+
+ false
+
diff --git a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/KnowledgePlatform/jobs/Learning/config.xml b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/KnowledgePlatform/jobs/Learning/config.xml
index 6611070f09..5422f59573 100644
--- a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/KnowledgePlatform/jobs/Learning/config.xml
+++ b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/KnowledgePlatform/jobs/Learning/config.xml
@@ -85,7 +85,7 @@ ArtifactRepo - Upload and keep a copy of the artifact in Jenkins, JenkinsJob - J
- ${public_repo_branch}
+ ${kp_public_repo_branch}
false
diff --git a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/KnowledgePlatform/jobs/Neo4j/config.xml b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/KnowledgePlatform/jobs/Neo4j/config.xml
index fd7ef60977..24395bb70a 100644
--- a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/KnowledgePlatform/jobs/Neo4j/config.xml
+++ b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/KnowledgePlatform/jobs/Neo4j/config.xml
@@ -85,7 +85,7 @@ ArtifactRepo - Upload and keep a copy of the artifact in Jenkins, JenkinsJob - J
- ${public_repo_branch}
+ ${kp_public_repo_branch}
false
diff --git a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/KnowledgePlatform/jobs/SyncTool/config.xml b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/KnowledgePlatform/jobs/SyncTool/config.xml
index 6a9af8f80c..65cf0a8657 100644
--- a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/KnowledgePlatform/jobs/SyncTool/config.xml
+++ b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/KnowledgePlatform/jobs/SyncTool/config.xml
@@ -85,7 +85,7 @@ ArtifactRepo - Upload and keep a copy of the artifact in Jenkins, JenkinsJob - J
- ${public_repo_branch}
+ ${kp_public_repo_branch}
false
diff --git a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/KnowledgePlatform/jobs/Yarn/config.xml b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/KnowledgePlatform/jobs/Yarn/config.xml
index ab7ab56194..eb90f787aa 100644
--- a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/KnowledgePlatform/jobs/Yarn/config.xml
+++ b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/KnowledgePlatform/jobs/Yarn/config.xml
@@ -85,7 +85,7 @@ ArtifactRepo - Upload and keep a copy of the artifact in Jenkins, JenkinsJob - J
- ${public_repo_branch}
+ ${kp_public_repo_branch}
false
diff --git a/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/UCI/jobs/uci-transport-socket/config.xml b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/UCI/jobs/uci-transport-socket/config.xml
new file mode 100644
index 0000000000..afba1c3fa0
--- /dev/null
+++ b/deploy/jenkins/jobs/ArtifactUpload/jobs/dev/jobs/UCI/jobs/uci-transport-socket/config.xml
@@ -0,0 +1,108 @@
+
+
+
+
+ hudson.model.ParametersDefinitionProperty
+ com.sonyericsson.rebuild.RebuildSettings
+
+
+
+
+ false
+
+
+
+ -1
+ 10
+ -1
+ 1
+
+
+
+
+ false
+ false
+
+
+
+
+ absolute_job_path
+ <font color=dimgray size=2><b>Do not change this value! The metadata.json will be copied from this job.</b></font>
+ Build/UCI/uci-transport-socket
+ false
+
+
+ image_tag
+ <font color=darkgreen size=2><b>OPTIONAL: Specify the tag to upload a specific image version to the container registry.</b></font>
+
+ false
+
+
+ artifact_source
+ <font color=dimgray size=2><b>
+ArtifactRepo - Push the docker image to container registry.
+</b></font>
+
+
+ ArtifactRepo
+
+
+
+
+
+
+ 0
+ 0
+
+ false
+ project
+ false
+
+
+
+
+
+
+
+ Build/UCI/uci-transport-socket
+
+ SUCCESS
+ 0
+ BLUE
+ true
+
+
+
+
+
+
+
+ 2
+
+
+ https://github.com/project-sunbird/sunbird-devops.git
+
+
+
+
+ ${public_repo_branch}
+
+
+ false
+
+
+
+ true
+ false
+
+ 0
+ false
+
+
+
+ pipelines/upload/docker/Jenkinsfile
+ false
+
+
+ false
+
diff --git a/deploy/jenkins/jobs/Build/jobs/Core/jobs/Analytics/config.xml b/deploy/jenkins/jobs/Build/jobs/Core/jobs/Analytics/config.xml
index 5bc1fe4d34..c6304ef3b4 100644
--- a/deploy/jenkins/jobs/Build/jobs/Core/jobs/Analytics/config.xml
+++ b/deploy/jenkins/jobs/Build/jobs/Core/jobs/Analytics/config.xml
@@ -35,6 +35,30 @@
refs/heads/${public_repo_branch}
true
+
+ CLOUD_STORE_GROUP_ID
+ <font style="color:dimgray;font-size:14px;"><b>
+<li>Mention the cloud storage sdk group id</li>
+</b></font>
+ org.sunbird
+ false
+
+
+ CLOUD_STORE_ARTIFACT_ID
+ <font style="color:dimgray;font-size:14px;"><b>
+<li>Mention the cloud storage sdk artifact id</li>
+</b></font>
+ cloud-store-sdk_2.12
+ false
+
+
+ CLOUD_STORE_VERSION
+ <font style="color:dimgray;font-size:14px;"><b>
+<li>Mention the cloud storage sdk version</li>
+</b></font>
+ 1.4.0
+ false
+
@@ -48,12 +72,7 @@
-
-
- H/15 * * * *
- false
-
-
+
diff --git a/deploy/jenkins/jobs/Build/jobs/Core/jobs/Assessment/config.xml b/deploy/jenkins/jobs/Build/jobs/Core/jobs/Assessment/config.xml
index d2c038b5fa..b4deb5e46b 100644
--- a/deploy/jenkins/jobs/Build/jobs/Core/jobs/Assessment/config.xml
+++ b/deploy/jenkins/jobs/Build/jobs/Core/jobs/Assessment/config.xml
@@ -1,6 +1,6 @@
-
+
hudson.model.ParametersDefinitionProperty
com.sonyericsson.rebuild.RebuildSettings
@@ -19,26 +19,47 @@
-
+
false
false
- github_release_tag
+ inquiry_release_tag
<font style="color:dimgray;font-size:14px;"><b>
<li>To build from a tag, use refs/tags/github_tag</li>
<li>To build from a branch, use refs/heads/github_branch</li>
-<li>The default value of ${public_repo_branch} will be the release / tag version set in global configuration</li>
-<li>To build from a differnt branch, replace the ${public_repo_branch} with your branch</li>
+<li>The default value of ${inquiry_service_build_branch_or_tag} will be the release / tag version set in global configuration</li>
+<li>To build from a differnt branch, replace the ${inquiry_service_build_branch_or_tag} with your branch</li>
</b></font>
- refs/heads/${public_repo_branch}
+ refs/heads/${inquiry_service_build_branch_or_tag}
true
+
+ core_release_tag
+ <font style="color:dimgray;font-size:14px;"><b>
+<li>Provide this value to build core components from Knowlg BB</li>
+<li>To build from a tag, use refs/tags/github_tag</li>
+<li>To build from a branch, use refs/heads/github_branch</li>
+<li>The default value of ${inquiry_core_build_branch_or_tag} will be the release / tag version set in global configuration</li>
+<li>To build from a differnt branch, replace the ${inquiry_core_build_branch_or_tag} with your branch</li>
+</b></font>
+ refs/heads/${inquiry_core_build_branch_or_tag}
+ false
+
+
+ core_repo_link
+ Knowlg Core Repo
+
+
+ https://github.com/project-sunbird/knowledge-platform.git
+
+
+
-
+
0
0
@@ -49,31 +70,29 @@
-
-
- H/15 * * * *
- false
-
-
+
-
-
+
+
2
- https://github.com/project-sunbird/knowledge-platform.git
+ https://github.com/Sunbird-inQuiry/inquiry-api-service.git
- ${github_release_tag}
+ ${inquiry_release_tag}
+ false
+
+
build/assessment-service/Jenkinsfile
false
false
-
\ No newline at end of file
+
diff --git a/deploy/jenkins/jobs/Build/jobs/Core/jobs/Content/config.xml b/deploy/jenkins/jobs/Build/jobs/Core/jobs/Content/config.xml
index 7b47e1972e..f3f5d6477c 100644
--- a/deploy/jenkins/jobs/Build/jobs/Core/jobs/Content/config.xml
+++ b/deploy/jenkins/jobs/Build/jobs/Core/jobs/Content/config.xml
@@ -36,6 +36,24 @@
refs/heads/${public_repo_branch}
true
+
+ CLOUD_STORE_GROUP_ID
+ Set the Cloud store sdk group id. e.g. org.sunbird
+ ${cloud_store_group_id}
+ false
+
+
+ CLOUD_STORE_ARTIFACT_ID
+ Set the Cloud store sdk artifact id. e.g. cloud-store-sdk_2.12
+ ${cloud_store_artifact_id}
+ false
+
+
+ CLOUD_STORE_VERSION
+ Set the Cloud store sdk version. e.g. 1.4.6
+ ${cloud_store_version}
+ false
+
diff --git a/deploy/jenkins/jobs/Build/jobs/Core/jobs/Lms/config.xml b/deploy/jenkins/jobs/Build/jobs/Core/jobs/Lms/config.xml
index 89116c8406..4eecb95a61 100644
--- a/deploy/jenkins/jobs/Build/jobs/Core/jobs/Lms/config.xml
+++ b/deploy/jenkins/jobs/Build/jobs/Core/jobs/Lms/config.xml
@@ -36,6 +36,24 @@
refs/heads/${public_repo_branch}
true
+
+ cloud_store_group_id
+ Set the Cloud store sdk group id. e.g. org.sunbird
+ ${cloud_store_group_id}
+ false
+
+
+ cloud_store_artifact_id
+ Set the Cloud store sdk artifact id. e.g. cloud-store-sdk
+ ${cloud_store_artifact_id}
+ false
+
+
+ cloud_store_version
+ Set the Cloud store sdk version. e.g 1.4.6
+ ${cloud_store_version}
+ false
+
diff --git a/deploy/jenkins/jobs/Build/jobs/Core/jobs/UserOrg/config.xml b/deploy/jenkins/jobs/Build/jobs/Core/jobs/UserOrg/config.xml
new file mode 100644
index 0000000000..a12dd235f1
--- /dev/null
+++ b/deploy/jenkins/jobs/Build/jobs/Core/jobs/UserOrg/config.xml
@@ -0,0 +1,97 @@
+
+
+
+
+ hudson.model.ParametersDefinitionProperty
+ com.sonyericsson.rebuild.RebuildSettings
+
+
+
+
+ false
+
+
+
+ -1
+ 10
+ -1
+ 1
+
+
+
+
+ false
+ false
+
+
+
+
+ github_release_tag
+ <font style="color:dimgray;font-size:14px;"><b>
+<li>To build from a tag, use refs/tags/github_tag</li>
+<li>To build from a branch, use refs/heads/github_branch</li>
+<li>The default value of ${public_repo_branch} will be the release / tag version set in global configuration</li>
+<li>To build from a differnt branch, replace the ${public_repo_branch} with your branch</li>
+</b></font>
+ refs/heads/${public_repo_branch}
+ true
+
+
+ cloud_store_group_id
+ Set the Cloud store sdk group id. e.g. org.sunbird
+ ${cloud_store_group_id}
+ false
+
+
+ cloud_store_artifact_id
+ Set the Cloud store sdk artifact id. e.g. cloud-store-sdk
+ ${cloud_store_artifact_id}
+ false
+
+
+ cloud_store_version
+ Set the Cloud store sdk version. e.g. 1.4.6
+ ${cloud_store_version}
+ false
+
+
+
+
+ 0
+ 0
+
+ false
+ project
+ false
+
+
+
+
+
+
+
+ false
+
+
+
+
+
+
+ 2
+
+
+ https://github.com/project-sunbird/sunbird-lms-service.git
+
+
+
+
+ ${github_release_tag}
+
+
+
+ Jenkinsfile
+ false
+
+
+ false
+
\ No newline at end of file
diff --git a/deploy/jenkins/jobs/Build/jobs/DataPipeline/jobs/AnalyticsCore/config.xml b/deploy/jenkins/jobs/Build/jobs/DataPipeline/jobs/AnalyticsCore/config.xml
index 2b9e72c45c..5c202a759c 100644
--- a/deploy/jenkins/jobs/Build/jobs/DataPipeline/jobs/AnalyticsCore/config.xml
+++ b/deploy/jenkins/jobs/Build/jobs/DataPipeline/jobs/AnalyticsCore/config.xml
@@ -36,6 +36,30 @@
refs/heads/${public_repo_branch}
true
+
+ CLOUD_STORE_GROUP_ID
+ <font style="color:dimgray;font-size:14px;"><b>
+<li>Mention the cloud storage sdk group id</li>
+</b></font>
+ org.sunbird
+ false
+
+
+ CLOUD_STORE_ARTIFACT_ID
+ <font style="color:dimgray;font-size:14px;"><b>
+<li>Mention the cloud storage sdk artifact id</li>
+</b></font>
+ cloud-store-sdk_2.12
+ false
+
+
+ CLOUD_STORE_VERSION
+ <font style="color:dimgray;font-size:14px;"><b>
+<li>Mention the cloud storage sdk version</li>
+</b></font>
+ 1.4.0
+ false
+
@@ -51,7 +75,7 @@
- H/15 * * * *
+
false
diff --git a/deploy/jenkins/jobs/Build/jobs/DataPipeline/jobs/CoreDataProducts/config.xml b/deploy/jenkins/jobs/Build/jobs/DataPipeline/jobs/CoreDataProducts/config.xml
index a458418b24..8ff4dc5426 100644
--- a/deploy/jenkins/jobs/Build/jobs/DataPipeline/jobs/CoreDataProducts/config.xml
+++ b/deploy/jenkins/jobs/Build/jobs/DataPipeline/jobs/CoreDataProducts/config.xml
@@ -27,6 +27,27 @@
github_release_tag
+ <font color=red size=2><b>CAUTION: If the value is blank, latest code will be built. Specify github tag name to build from a tag.</b></font>
+ false
+
+
+ CLOUD_STORE_GROUP_ID
+ <font style="color:dimgray;font-size:14px;"><b>
+<li>Mention the cloud storage sdk group id</li>
+</b></font>
+ org.sunbird
+ false
+
+
+ CLOUD_STORE_ARTIFACT_ID
+ <font style="color:dimgray;font-size:14px;"><b>
+<li>Mention the cloud storage sdk artifact id</li>
+</b></font>
+ cloud-store-sdk_2.12
+ false
+
+
+ CLOUD_STORE_VERSION
<font style="color:dimgray;font-size:14px;"><b>
<li>To build from a tag, use refs/tags/github_tag</li>
<li>To build from a branch, use refs/heads/github_branch</li>
@@ -51,7 +72,7 @@
- H/15 * * * *
+
false
diff --git a/deploy/jenkins/jobs/Build/jobs/KnowledgePlatform/jobs/CoKreatFlinkJob/config.xml b/deploy/jenkins/jobs/Build/jobs/KnowledgePlatform/jobs/CoKreatFlinkJob/config.xml
new file mode 100644
index 0000000000..4a22394a38
--- /dev/null
+++ b/deploy/jenkins/jobs/Build/jobs/KnowledgePlatform/jobs/CoKreatFlinkJob/config.xml
@@ -0,0 +1,108 @@
+
+
+
+
+
+ hudson.model.ParametersDefinitionProperty
+ com.sonyericsson.rebuild.RebuildSettings
+
+
+
+
+ false
+
+
+
+
+ -1
+ 10
+ -1
+ 1
+
+
+
+ false
+
+
+ false
+ false
+
+
+
+
+ cokreat_release_tag
+
+
+
+ To build from a tag, use refs/tags/github_tag
+ To build from a branch, use refs/heads/github_branch
+ The default value of ${public_repo_branch} will be the release / tag version set in global configuration
+ To build from a differnt branch, replace the ${public_repo_branch} with your branch
+
+
+
+ refs/heads/${public_repo_branch}
+ true
+
+
+ CLOUD_STORE_GROUP_ID
+ Set the Cloud store sdk group id. e.g. org.sunbird
+ ${cloud_store_group_id}
+ true
+
+
+ CLOUD_STORE_ARTIFACT_ID
+ Set the Cloud store sdk artifact id. e.g. cloud-store-sdk_2.12
+ ${cloud_store_artifact_id}
+ true
+
+
+ CLOUD_STORE_VERSION
+ Set the Cloud store sdk version. e.g. 1.4.6
+ ${cloud_store_version}
+ false
+
+
+
+
+ 0
+ 0
+
+ false
+ project
+ false
+
+
+
+
+
+ H/15 * * * *
+ false
+
+
+
+
+
+
+ 2
+
+
+ https://github.com/Sunbird-coKreat/coKreat-jobs.git
+ githubPassword
+
+
+
+
+ ${cokreat_release_tag}
+
+
+ false
+
+
+
+ kubernetes/pipelines/build/Jenkinsfile
+ false
+
+
+ false
+
\ No newline at end of file
diff --git a/deploy/jenkins/jobs/Build/jobs/KnowledgePlatform/jobs/FlinkJobs/config.xml b/deploy/jenkins/jobs/Build/jobs/KnowledgePlatform/jobs/FlinkJobs/config.xml
index 11f30a0d33..62a0cd1f68 100644
--- a/deploy/jenkins/jobs/Build/jobs/KnowledgePlatform/jobs/FlinkJobs/config.xml
+++ b/deploy/jenkins/jobs/Build/jobs/KnowledgePlatform/jobs/FlinkJobs/config.xml
@@ -36,6 +36,24 @@
refs/heads/${public_repo_branch}
true
+
+ CLOUD_STORE_GROUP_ID
+ Set the Cloud store sdk group id. e.g. org.sunbird
+ ${cloud_store_group_id}
+ false
+
+
+ CLOUD_STORE_ARTIFACT_ID
+ Set the Cloud store sdk artifact id. e.g. cloud-store-sdk_2.12
+ ${cloud_store_artifact_id}
+ false
+
+
+ CLOUD_STORE_VERSION
+ Set the Cloud store sdk version. e.g. 1.4.6
+ ${cloud_store_version}
+ false
+
diff --git a/deploy/jenkins/jobs/Build/jobs/KnowledgePlatform/jobs/InquiryFlinkJob/config.xml b/deploy/jenkins/jobs/Build/jobs/KnowledgePlatform/jobs/InquiryFlinkJob/config.xml
new file mode 100644
index 0000000000..93b0eba8f7
--- /dev/null
+++ b/deploy/jenkins/jobs/Build/jobs/KnowledgePlatform/jobs/InquiryFlinkJob/config.xml
@@ -0,0 +1,77 @@
+
+
+
+
+ hudson.model.ParametersDefinitionProperty
+ com.sonyericsson.rebuild.RebuildSettings
+
+
+
+
+ false
+
+
+
+ -1
+ 10
+ -1
+ 1
+
+
+
+
+ false
+ false
+
+
+
+
+ inquiry_release_tag
+ <font style="color:dimgray;font-size:14px;"><b>
+<li>To build from a tag, use refs/tags/github_tag</li>
+<li>To build from a branch, use refs/heads/github_branch</li>
+<li>The default value of ${inquiry_pipeline_branch_or_tag} will be the release / tag version set in global configuration</li>
+<li>To build from a differnt branch, replace the ${inquiry_pipeline_branch_or_tag} with your branch</li>
+</b></font>
+ refs/heads/${inquiry_pipeline_branch_or_tag}
+ true
+
+
+
+
+ 0
+ 0
+
+ false
+ project
+ false
+
+
+
+
+
+
+
+
+
+ 2
+
+
+ https://github.com/Sunbird-inQuiry/data-pipeline.git
+
+
+
+
+ ${inquiry_release_tag}
+
+
+ false
+
+
+
+ kubernetes/pipelines/build/Jenkinsfile
+ false
+
+
+ false
+
diff --git a/deploy/jenkins/jobs/Build/jobs/Lern/jobs/LernDataProducts/config.xml b/deploy/jenkins/jobs/Build/jobs/Lern/jobs/LernDataProducts/config.xml
index 088b9fa27f..9b997d2ce1 100644
--- a/deploy/jenkins/jobs/Build/jobs/Lern/jobs/LernDataProducts/config.xml
+++ b/deploy/jenkins/jobs/Build/jobs/Lern/jobs/LernDataProducts/config.xml
@@ -36,6 +36,24 @@
refs/heads/${public_repo_branch}
true
+
+ cloud_store_group_id
+ Set the Cloud store sdk group id. e.g. org.sunbird
+ ${cloud_store_group_id}
+ false
+
+
+ cloud_store_artifact_id
+ Set the Cloud store sdk artifact id. e.g. cloud-store-sdk_2.12
+ ${cloud_store_artifact_id}
+ false
+
+
+ cloud_store_version
+ Set the Cloud store sdk version. e.g. 1.4.6
+ ${cloud_store_version}
+ false
+
@@ -49,12 +67,7 @@
-
-
- H/15 * * * *
- false
-
-
+
diff --git a/deploy/jenkins/jobs/Build/jobs/Lern/jobs/LernFlinkJobs/config.xml b/deploy/jenkins/jobs/Build/jobs/Lern/jobs/LernFlinkJobs/config.xml
index df82bece0b..f8041941e2 100644
--- a/deploy/jenkins/jobs/Build/jobs/Lern/jobs/LernFlinkJobs/config.xml
+++ b/deploy/jenkins/jobs/Build/jobs/Lern/jobs/LernFlinkJobs/config.xml
@@ -36,6 +36,24 @@
refs/heads/${public_repo_branch}
true
+
+ cloud_store_group_id
+ Set the Cloud store sdk group id. e.g. org.sunbird
+ ${cloud_store_group_id}
+ false
+
+
+ cloud_store_artifact_id
+ Set the Cloud store sdk artifact id. e.g. cloud-store-sdk_2.12
+ ${cloud_store_artifact_id}
+ false
+
+
+ cloud_store_version
+ Set the Cloud store sdk version. e.g. 1.4.6
+ ${cloud_store_version}
+ false
+
diff --git a/deploy/jenkins/jobs/Build/jobs/Core/jobs/Learner/config.xml b/deploy/jenkins/jobs/Build/jobs/UCI/jobs/uci-transport-socket/config.xml
similarity index 84%
rename from deploy/jenkins/jobs/Build/jobs/Core/jobs/Learner/config.xml
rename to deploy/jenkins/jobs/Build/jobs/UCI/jobs/uci-transport-socket/config.xml
index 2cdac260ad..c63ac79a73 100644
--- a/deploy/jenkins/jobs/Build/jobs/Core/jobs/Learner/config.xml
+++ b/deploy/jenkins/jobs/Build/jobs/UCI/jobs/uci-transport-socket/config.xml
@@ -1,6 +1,6 @@
-
+
hudson.model.ParametersDefinitionProperty
com.sonyericsson.rebuild.RebuildSettings
@@ -19,7 +19,7 @@
-
+
false
false
@@ -38,7 +38,7 @@
-
+
0
0
@@ -49,31 +49,29 @@
-
-
- H/15 * * * *
- false
-
-
+
-
-
+
+
2
- https://github.com/project-sunbird/sunbird-lms-service.git
+ https://github.com/samagra-comms/transport-socket.git
- ${github_release_tag}
+ master
+ false
+
+
- Jenkinsfile
+ build/Jenkinsfile
false
false
-
\ No newline at end of file
+
diff --git a/deploy/jenkins/jobs/Deploy/jobs/Vidyadaan/jobs/Kubernetes/jobs/UploadCollectionHierarchyCSV/config.xml b/deploy/jenkins/jobs/Deploy/jobs/Vidyadaan/jobs/Kubernetes/jobs/UploadCollectionHierarchyCSV/config.xml
index 0272d155c6..1363bd3fcf 100644
--- a/deploy/jenkins/jobs/Deploy/jobs/Vidyadaan/jobs/Kubernetes/jobs/UploadCollectionHierarchyCSV/config.xml
+++ b/deploy/jenkins/jobs/Deploy/jobs/Vidyadaan/jobs/Kubernetes/jobs/UploadCollectionHierarchyCSV/config.xml
@@ -83,7 +83,7 @@ return """<b>This parameter is not used</b>"""
- upload-batch
+ upload-csv-template
@@ -102,15 +102,6 @@ return """<b>This parameter is not used</b>"""
false
-
- container_name
-
-
-
- content-service
-
-
-
source_path
diff --git a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/DataPipeline/jobs/AnalyticsReplayJobs/config.xml b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/DataPipeline/jobs/AnalyticsReplayJobs/config.xml
index 95b1f8c7e4..b65594e17b 100644
--- a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/DataPipeline/jobs/AnalyticsReplayJobs/config.xml
+++ b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/DataPipeline/jobs/AnalyticsReplayJobs/config.xml
@@ -48,12 +48,8 @@
<font color=dimgray size=2><b>Specify the job id.</b></font>
- collection-summary-report-v2
- collection-summary-report
program-collection-summary-report
audit-metrics-report
- admin-user-reports
- admin-geo-reports
district-weekly
district-monthly
desktop-consumption-report
@@ -61,18 +57,10 @@
content-rating-updater
druid-query-processor
monitor-job-summ
- course-enrollment-report
textbook-progress-report
etb-metrics
daily-metrics
- progress-exhaust
- userinfo-exhaust
- response-exhaust
- progress-exhaust-v2
- response-exhaust-v2
- course-batch-status-updater
- cassandra-migration
- druid-dataset
+ druid-dataset
uci-response-exhaust
uci-private-exhaust
diff --git a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/DataPipeline/jobs/FlinkPipelineJobs/config.xml b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/DataPipeline/jobs/FlinkPipelineJobs/config.xml
index 8daf73245a..96881ee988 100644
--- a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/DataPipeline/jobs/FlinkPipelineJobs/config.xml
+++ b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/DataPipeline/jobs/FlinkPipelineJobs/config.xml
@@ -102,7 +102,6 @@ return """<b>This parameter is not used</b>"""
'de-normalization-primary',
'de-normalization-secondary',
'druid-validator',
-'assessment-aggregator',
'content-cache-updater',
'user-cache-updater-v2',
'summary-denormalization',
@@ -170,4 +169,4 @@ return """<b>This parameter is not used</b>"""
false
-
\ No newline at end of file
+
diff --git a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/KnowledgePlatform/jobs/CoKreatFlinkJob/config.xml b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/KnowledgePlatform/jobs/CoKreatFlinkJob/config.xml
new file mode 100644
index 0000000000..2cbb5f7142
--- /dev/null
+++ b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/KnowledgePlatform/jobs/CoKreatFlinkJob/config.xml
@@ -0,0 +1,168 @@
+
+
+
+
+
+ hudson.model.ParametersDefinitionProperty
+ com.sonyericsson.rebuild.RebuildSettings
+
+
+
+
+ false
+
+
+
+
+ -1
+ 10
+ -1
+ 2
+
+
+
+ false
+
+
+ false
+ false
+
+
+
+
+ private_branch
+ choice-parameter-2544395024638227
+ 1
+
+ true
+
+
+
+ true
+
+
+ CoKreatFlinkJob
+ Deploy/dev/KnowledgePlatform/CoKreatFlinkJob
+
+
+ ET_FORMATTED_HTML
+ true
+
+
+ cokreat_release_tag
+
+
+
+ To build from a tag, use refs/tags/github_tag
+ To build from a branch, use refs/heads/github_branch
+ The default value of ${inquiry_pipeline_branch_or_tag} will be the release / tag version set in global configuration
+ To build from a differnt branch, replace the ${inquiry_pipeline_branch_or_tag} with your branch
+
+
+
+ refs/heads/${kokreat_pipeline_branch_or_tag}
+ false
+
+
+ image_tag
+
+
+ CAUTION: If the value is blank, image tag will be taken from the latest metadata.json.
+
+
+ false
+
+
+ absolute_job_path
+
+
+ Do not change this value! The metadata.json will be copied from this job.
+
+
+ ArtifactUpload/dev/KnowledgePlatform/CoKreatFlinkJob
+ false
+
+
+ job_names_to_deploy
+
+
+ Choose the job names to deploy. Multi-selection is available.
+
+
+ choice-parameter-1273072434092073
+ 1
+
+ true
+
+
+
+ true
+
+
+ CoKreatFlinkJob
+ Deploy/dev/KnowledgePlatform/CoKreatFlinkJob
+
+
+ PT_MULTI_SELECT
+ false
+ 1
+
+
+
+
+ 0
+ 0
+
+ false
+ project
+ false
+
+
+
+
+
+
+
+
+ 2
+
+
+ https://github.com/Sunbird-coKreat/coKreat-jobs.git
+
+
+
+
+ ${cokreat_release_tag}
+
+
+ false
+
+
+
+ false
+ true
+
+ 0
+ false
+
+
+
+ kubernetes/pipelines/deploy/Jenkinsfile
+ false
+
+
+ false
+
\ No newline at end of file
diff --git a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/KnowledgePlatform/jobs/FlinkJobs/config.xml b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/KnowledgePlatform/jobs/FlinkJobs/config.xml
index cb98de88c1..ea3f456189 100644
--- a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/KnowledgePlatform/jobs/FlinkJobs/config.xml
+++ b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/KnowledgePlatform/jobs/FlinkJobs/config.xml
@@ -99,13 +99,10 @@ return """<b>This parameter is not used</b>"""
+ true
+
+
+
+ true
+
+
+ InquiryFlinkJob
+ Deploy/dev/KnowledgePlatform/InquiryFlinkJob
+
+
+ ET_FORMATTED_HTML
+ true
+
+
+ inquiry_release_tag
+ <font style="color:dimgray;font-size:14px;"><b>
+<li>To build from a tag, use refs/tags/github_tag</li>
+<li>To build from a branch, use refs/heads/github_branch</li>
+<li>The default value of ${inquiry_pipeline_branch_or_tag} will be the release / tag version set in global configuration</li>
+<li>To build from a differnt branch, replace the ${inquiry_pipeline_branch_or_tag} with your branch</li>
+</b></font>
+ refs/heads/${inquiry_pipeline_branch_or_tag}
+ false
+
+
+ image_tag
+ <font color=red size=2><b>CAUTION: If the value is blank, image tag will be taken from the latest metadata.json.</b></font>
+
+ false
+
+
+ absolute_job_path
+ <font color=dimgray size=2><b>Do not change this value! The metadata.json will be copied from this job.</b></font>
+ ArtifactUpload/dev/KnowledgePlatform/InquiryFlinkJob
+ false
+
+
+ job_names_to_deploy
+ <font color=green size=2><b>Choose the job names to deploy. Multi-selection is available.</b></font>
+ choice-parameter-1273072434092073
+ 1
+
+ true
+
+
+
+ true
+
+
+ InquiryFlinkJob
+ Deploy/dev/KnowledgePlatform/InquiryFlinkJob
+
+
+ PT_MULTI_SELECT
+ false
+ 1
+
+
+
+
+ 0
+ 0
+
+ false
+ project
+ false
+
+
+
+
+
+
+
+
+
+ 2
+
+
+ https://github.com/Sunbird-inQuiry/data-pipeline.git
+
+
+
+
+ ${inquiry_release_tag}
+
+
+ false
+
+
+
+ true
+ false
+
+ 0
+ false
+
+
+
+ kubernetes/pipelines/deploy/Jenkinsfile
+ false
+
+
+ false
+
diff --git a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/Cassandra/config.xml b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/Cassandra/config.xml
index 1e9db63132..3304f15fad 100644
--- a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/Cassandra/config.xml
+++ b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/Cassandra/config.xml
@@ -1,219 +1,261 @@
-
-
- false
-
-
-
- -1
- 10
- -1
- 2
-
-
-
-
- false
- false
-
-
-
-
- absolute_job_path
- <font color=dimgray size=2><b>Do not change this value! The metadata.json will be copied from this job.</b></font>
- ArtifactUpload/dev/Core/Cassandra
- false
-
-
- artifact_source
- <font color=dimgray size=2><b>
-ArtifactRepo - Download the artifact from azure blob, JenkinsJob - Use the atrifact from Jenkins job.</b></font>
- choice-parameter-9600649228560
- 1
-
- true
-
-
-
- true
-
-
- Cassandra
- Deploy/dev/Kubernetes/Cassandra
-
-
- PT_SINGLE_SELECT
- false
- 1
-
-
- build_number
-
- choice-parameter-9600651313765
- 1
-
- true
-
-
-
- true
-
-
- Cassandra
- Deploy/dev/Kubernetes/Cassandra
-
- artifact_source
- ET_FORMATTED_HTML
- true
-
-
- artifact_version
-
- choice-parameter-9600653373369
- 1
-
- true
-
-
-
- true
-
-
- Cassandra
- Deploy/dev/Kubernetes/Cassandra
-
- artifact_source
- ET_FORMATTED_HTML
- true
-
-
- private_branch
-
- choice-parameter-2544395024638227
- 1
-
- true
-
-
-
- true
-
-
- Cassandra
- Deploy/dev/Kubernetes/Cassandra
-
-
- ET_FORMATTED_HTML
- true
-
-
- branch_or_tag
-
- choice-parameter-2620434998790477
- 1
-
+ true
+
+
+
+ false
+
+
+ Cassandra
+ Deploy/dev/Kubernetes/Cassandra
+
+
+ PT_SINGLE_SELECT
+ false
+ 1
+
+
+ build_number
+ choice-parameter-591902397549104
+ 1
+
+ true
+
+
+
+ true
+
+
+ Cassandra
+ Deploy/dev/Kubernetes/Cassandra
+
+ artifact_source
+ ET_FORMATTED_HTML
+ true
+
+
+ artifact_version
+ choice-parameter-591902398907654
+ 1
+
+ true
+
+
+
+ true
+
+
+ Cassandra
+ Deploy/dev/Kubernetes/Cassandra
+
+ artifact_source
+ ET_FORMATTED_HTML
+ false
+
+
+ private_branch
+ choice-parameter-2544395024638227
+ 1
+
+ true
+
+
+
+ true
+
+
+ Cassandra
+ Deploy/dev/Kubernetes/Cassandra
+
+
+ ET_FORMATTED_HTML
+ true
+
+
+ branch_or_tag
+ choice-parameter-2620434998790477
+ 1
+
- true
-
-
-
- true
-
-
- Cassandra
- Deploy/dev/Kubernetes/Cassandra
-
-
- ET_FORMATTED_HTML
- true
-
-
-
-
- 0
- 0
-
- false
- project
- false
-
-
-
-
-
-
-
- ArtifactUpload/dev/Core/Cassandra
-
- SUCCESS
- 0
- BLUE
- true
-
-
-
-
-
-
-
- 2
-
-
- https://github.com/project-sunbird/sunbird-devops.git
-
-
-
-
- ${branch_or_tag}
-
-
- false
-
-
-
- true
- false
-
- 0
- false
-
-
-
- pipelines/deploy/cassandra-deploy/Jenkinsfile
- false
-
-
- false
+ }
+ else
+ return """<b>This parameter is not used</b>"""
+ true
+
+
+
+ true
+
+
+ Cassandra
+ Deploy/dev/Kubernetes/Cassandra
+
+
+ ET_FORMATTED_HTML
+ true
+
+
+ script_repo
+ Enter the repo url from which keyspace script folder to be uploaded
+ https://github.com/Sunbird-Lern/sunbird-utils.git
+ false
+
+
+ script_repo_branch_or_tag
+ Enter the branch or tag for keyspace script repo
+ ${branch_or_tag}
+ false
+
+
+ cassandra_keyspace_to_migrate
+ choice-parameter-598043621453772
+ 1
+
+ true
+
+
+
+ true
+
+
+ Cassandra
+ Deploy/dev/Kubernetes/Cassandra
+
+
+ PT_SINGLE_SELECT
+ false
+ 1
+
+
+
+
+ 0
+ 0
+
+ false
+ project
+ false
+
+
+
+
+
+
+
+ ArtifactUpload/dev/Core/Cassandra
+
+ SUCCESS
+ 0
+ BLUE
+ true
+
+
+
+
+
+
+
+ 2
+
+
+ https://github.com/project-sunbird/sunbird-devops.git
+
+
+
+
+ ${public_repo_branch}
+
+
+ false
+
+
+
+ true
+ false
+
+ 0
+ false
+
+
+
+ pipelines/deploy/cassandra-deploy/Jenkinsfile
+ false
+
+
+ false
\ No newline at end of file
diff --git a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/InquiryUploadSchema/config.xml b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/InquiryUploadSchema/config.xml
new file mode 100644
index 0000000000..1735ad1e56
--- /dev/null
+++ b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/InquiryUploadSchema/config.xml
@@ -0,0 +1,139 @@
+
+
+
+
+ hudson.model.ParametersDefinitionProperty
+ com.sonyericsson.rebuild.RebuildSettings
+
+
+
+
+ false
+
+
+
+
+ -1
+ -1
+ -1
+ 5
+
+
+
+ false
+
+
+ false
+ false
+
+
+
+
+ private_branch
+ choice-parameter-2544395024638227
+ 1
+
+ true
+
+
+
+ true
+
+
+ InquiryUploadSchema
+ Deploy/dev/Kubernetes/InquiryUploadSchema
+
+
+ ET_FORMATTED_HTML
+ true
+
+
+ branch_or_tag
+ choice-parameter-2620434998790477
+ 1
+
+ true
+
+
+
+ true
+
+
+ InquiryUploadSchema
+ Deploy/dev/Kubernetes/InquiryUploadSchema
+
+
+ ET_FORMATTED_HTML
+ true
+
+
+ schema_repo
+ Enter the repo url from which schema folder to be uploaded
+ https://github.com/Sunbird-inQuiry/inquiry-api-service.git
+ false
+
+
+ schema_repo_branch_or_tag
+ Enter the branch or tag for schema repo
+ false
+
+
+
+
+ 0
+ 0
+
+ false
+ project
+ false
+
+
+
+
+
+
+
+
+
+ 2
+
+
+ https://github.com/project-sunbird/sunbird-devops.git
+
+
+
+
+ ${branch_or_tag}
+
+
+ false
+
+
+
+ true
+ false
+
+ 0
+ false
+
+
+
+ pipelines/upload/schema/inquiry/Jenkinsfile
+ false
+
+
+ false
+
\ No newline at end of file
diff --git a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/OfflineInstaller/config.xml b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/OfflineInstaller/config.xml
new file mode 100644
index 0000000000..0544e9948d
--- /dev/null
+++ b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/OfflineInstaller/config.xml
@@ -0,0 +1,235 @@
+
+
+
+ false
+
+
+
+ -1
+ -1
+ -1
+ 5
+
+
+
+
+
+ ArtifactUpload/dev/Core/OfflineInstaller
+
+
+
+ false
+ false
+
+
+
+
+ absolute_job_path
+ <font color=dimgray size=2><b>Do not change this value! The metadata.json will be copied from this job.</b></font>
+ ArtifactUpload/dev/Core/OfflineInstaller
+ false
+
+
+ private_branch
+
+ choice-parameter-2544395024638227
+ 1
+
+ true
+
+
+
+ true
+
+
+ OfflineInstaller
+ Deploy/dev/Kubernetes/OfflineInstaller
+
+
+ ET_FORMATTED_HTML
+ true
+
+
+ branch_or_tag
+
+ choice-parameter-2620434998790477
+ 1
+
+ true
+
+
+
+ true
+
+
+ OfflineInstaller
+ Deploy/dev/Kubernetes/OfflineInstaller
+
+
+ ET_FORMATTED_HTML
+ true
+
+
+ offline_installer_type
+ <font color=dimgray size=2><b>Choose the type of installer you wanted to build</b></font>
+
+
+ windows64bit
+ linux64bit
+ windows32bit
+
+
+
+
+ artifact_source
+ <font color=dimgray size=2><b>
+ArtifactRepo - Download the artifact from azure blob, JenkinsJob - Use the atrifact from Jenkins job.</b></font>
+ choice-parameter-1754928650096303
+ 1
+
+ true
+
+
+
+ true
+
+
+ OfflineInstaller
+ Deploy/dev/Kubernetes/OfflineInstaller
+
+
+ PT_SINGLE_SELECT
+ false
+ 1
+
+
+ build_number
+
+ choice-parameter-1754928651800681
+ 1
+
+ true
+
+
+
+ true
+
+
+ OfflineInstaller
+ Deploy/dev/Kubernetes/OfflineInstaller
+
+ artifact_source
+ ET_FORMATTED_HTML
+ true
+
+
+ artifact_version
+
+ choice-parameter-1754928653885653
+ 1
+
+ true
+
+
+
+ true
+
+
+ OfflineInstaller
+ Deploy/dev/Kubernetes/OfflineInstaller
+
+ artifact_source
+ ET_FORMATTED_HTML
+ true
+
+
+
+
+ 0
+ 0
+
+ false
+ project
+ false
+
+
+
+
+
+
+
+ ArtifactUpload/dev/Core/OfflineInstaller
+
+ SUCCESS
+ 0
+ BLUE
+ true
+
+
+
+
+
+
+
+ 2
+
+
+ https://github.com/project-sunbird/sunbird-devops.git
+
+
+
+
+ ${branch_or_tag}
+
+
+ false
+
+
+
+ true
+ false
+
+ 1
+ false
+
+
+
+ pipelines/offlineinstaller/Jenkinsfile
+ false
+
+
+ false
+
diff --git a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/UploadChatbotConfig/config.xml b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/UploadChatbotConfig/config.xml
index c0289cf30f..79d963a0e7 100644
--- a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/UploadChatbotConfig/config.xml
+++ b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/UploadChatbotConfig/config.xml
@@ -84,15 +84,6 @@ return """<b>This parameter is not used</b>"""
master
false
-
- container_name
-
-
-
- chatbot
-
-
-
source_path
@@ -102,7 +93,7 @@ return """<b>This parameter is not used</b>"""
destination_path
- chatbot/router/config
+ router/config
false
@@ -169,4 +160,4 @@ return """<b>This parameter is not used</b>"""
false
-
\ No newline at end of file
+
diff --git a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/Upload_CollectionHierarchy_CSV/config.xml b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/UploadCollectionHierarchyCSV/config.xml
similarity index 94%
rename from deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/Upload_CollectionHierarchy_CSV/config.xml
rename to deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/UploadCollectionHierarchyCSV/config.xml
index 4818cfc99b..72d310489e 100644
--- a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/Upload_CollectionHierarchy_CSV/config.xml
+++ b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/UploadCollectionHierarchyCSV/config.xml
@@ -83,7 +83,7 @@ return """<b>This parameter is not used</b>"""
- upload-batch
+ upload-csv-template
@@ -102,15 +102,6 @@ return """<b>This parameter is not used</b>"""
false
-
- container_name
-
-
-
- sourcing
-
-
-
source_path
@@ -125,7 +116,7 @@ return """<b>This parameter is not used</b>"""
- sourcing/collection-hierarchy
+ collection-hierarchy
@@ -175,4 +166,4 @@ return """<b>This parameter is not used</b>"""
false
-
\ No newline at end of file
+
diff --git a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/UploadDiscussionUIDocs/config.xml b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/UploadDiscussionUIDocs/config.xml
new file mode 100644
index 0000000000..66d749e86a
--- /dev/null
+++ b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/UploadDiscussionUIDocs/config.xml
@@ -0,0 +1,235 @@
+
+
+
+ false
+
+
+
+ -1
+ 10
+ -1
+ 2
+
+
+
+
+ false
+ false
+
+
+
+
+ absolute_job_path
+ <font color=dimgray size=2><b>Do not change this value! The metadata.json will be copied from this job.</b></font>
+ ArtifactUpload/dev/Core/DiscussionsUI
+ false
+
+
+ artifact_source
+ <font color=dimgray size=2><b>
+ArtifactRepo - Download the artifact from azure blob, JenkinsJob - Use the atrifact from Jenkins job.</b></font>
+ choice-parameter-9600649228560
+ 1
+
+ true
+
+
+
+ true
+
+
+ UploadDiscussionUIDocs
+ Deploy/dev/Kubernetes/UploadDiscussionUIDocs
+
+
+ PT_SINGLE_SELECT
+ false
+ 1
+
+
+ build_number
+
+ choice-parameter-9600651313765
+ 1
+
+ true
+
+
+
+ true
+
+
+ UploadDiscussionUIDocs
+ Deploy/dev/Kubernetes/UploadDiscussionUIDocs
+
+ artifact_source
+ ET_FORMATTED_HTML
+ true
+
+
+ artifact_version
+
+ choice-parameter-9600653373369
+ 1
+
+ true
+
+
+
+ true
+
+
+ UploadDiscussionUIDocs
+ Deploy/dev/Kubernetes/UploadDiscussionUIDocs
+
+ artifact_source
+ ET_FORMATTED_HTML
+ true
+
+
+ private_branch
+
+ choice-parameter-2544395024638227
+ 1
+
+ true
+
+
+
+ true
+
+
+ UploadDiscussionUIDocs
+ Deploy/dev/Kubernetes/UploadDiscussionUIDocs
+
+
+ ET_FORMATTED_HTML
+ true
+
+
+ branch_or_tag
+
+ choice-parameter-2620434998790477
+ 1
+
+ true
+
+
+
+ true
+
+
+ UploadDiscussionUIDocs
+ Deploy/dev/Kubernetes/UploadDiscussionUIDocs
+
+
+ ET_FORMATTED_HTML
+ true
+
+
+ source_path
+
+
+
+ documentation
+
+
+
+
+ destination_path
+
+
+
+ documentation
+
+
+
+
+ tag
+
+
+
+ upload-discussion-ui
+
+
+
+
+
+
+ 0
+ 0
+
+ false
+ project
+ false
+
+
+
+
+
+
+
+
+
+ 2
+
+
+ https://github.com/project-sunbird/sunbird-devops.git
+
+
+
+
+ ${branch_or_tag}
+
+
+ false
+
+
+
+ true
+ false
+
+ 0
+ false
+
+
+
+ pipelines/upload/discussion-UI/Jenkinsfile
+ false
+
+
+ false
+
diff --git a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/UploadFAQs/config.xml b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/UploadFAQs/config.xml
index c476a3de0f..9a6fccc4b5 100644
--- a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/UploadFAQs/config.xml
+++ b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/UploadFAQs/config.xml
@@ -71,15 +71,6 @@ return """<b>This parameter is not used</b>"""
ET_FORMATTED_HTML
true
-
- blob_container
-
-
-
- public
-
-
-
tag
diff --git a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/UploadPortalLabel/config.xml b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/UploadPortalLabel/config.xml
new file mode 100644
index 0000000000..a1b8680986
--- /dev/null
+++ b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/UploadPortalLabel/config.xml
@@ -0,0 +1,180 @@
+
+
+
+ false
+
+
+
+ -1
+ -1
+ -1
+ 5
+
+
+
+
+ false
+ false
+
+
+
+
+ private_branch
+
+ choice-parameter-2544395024638227
+ 1
+
+ true
+
+
+
+ true
+
+
+ UploadPortalLabel
+ Deploy/dev/Kubernetes/UploadPortalLabel
+
+
+ ET_FORMATTED_HTML
+ true
+
+
+ branch_or_tag
+
+ choice-parameter-2620434998790477
+ 1
+
+ true
+
+
+
+ true
+
+
+ UploadPortalLabel
+ Deploy/dev/Kubernetes/UploadPortalLabel
+
+
+ ET_FORMATTED_HTML
+ true
+
+
+ destination_path
+
+
+
+ all_labels_ta.json
+ all_labels_bn.json
+ all_labels_en.json
+ all_labels_hi.json
+ all_labels_kn.json
+ all_labels_mr.json
+ all_labels_te.json
+ all_labels_ur.json
+ all_labels_gu.json
+ all_labels_ml.json
+ all_labels_as.json
+ all_labels_or.json
+
+
+
+
+ src_file_path
+
+
+
+ utils/portal/labels/all_labels_ta.json
+ utils/portal/labels/all_labels_bn.json
+ utils/portal/labels/all_labels_en.json
+ utils/portal/labels/all_labels_hi.json
+ utils/portal/labels/all_labels_kn.json
+ utils/portal/labels/all_labels_mr.json
+ utils/portal/labels/all_labels_te.json
+ utils/portal/labels/all_labels_ur.json
+ utils/portal/labels/all_labels_gu.json
+ utils/portal/labels/all_labels_ml.json
+ utils/portal/labels/all_labels_as.json
+ utils/portal/labels/all_labels_or.json
+
+
+
+
+ tag
+
+
+
+ upload-label
+
+
+
+
+
+
+ 0
+ 0
+
+ false
+ project
+ false
+
+
+
+
+
+
+
+
+
+ SUCCESS
+ 0
+ BLUE
+ true
+
+
+
+
+
+
+
+ 2
+
+
+ https://github.com/project-sunbird/sunbird-devops.git
+
+
+
+
+ ${branch_or_tag}
+
+
+ false
+
+
+
+ true
+ false
+
+ 0
+ false
+
+
+
+ pipelines/deploy/desktop-faq/Jenkinsfile
+ false
+
+
+ false
+
diff --git a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/Learner/config.xml b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/UserOrg/config.xml
similarity index 95%
rename from deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/Learner/config.xml
rename to deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/UserOrg/config.xml
index c9f4410fc9..202befc446 100644
--- a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/Learner/config.xml
+++ b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Kubernetes/jobs/UserOrg/config.xml
@@ -28,7 +28,7 @@
absolute_job_path
<font color=dimgray size=2><b>Do not change this value! The metadata.json will be copied from this job.</b></font>
- ArtifactUpload/dev/Core/Learner
+ ArtifactUpload/dev/Core/UserOrg
false
@@ -56,8 +56,8 @@ return """<b>This parameter is not used</b>"""
true
- Learner
- Deploy/dev/Kubernetes/Learner
+ UserOrg
+ Deploy/dev/Kubernetes/UserOrg
ET_FORMATTED_HTML
@@ -83,8 +83,8 @@ return """<b>This parameter is not used</b>"""
true
- Learner
- Deploy/dev/Kubernetes/Learner
+ UserOrg
+ Deploy/dev/Kubernetes/UserOrg
ET_FORMATTED_HTML
@@ -115,7 +115,7 @@ return """<b>This parameter is not used</b>"""
- ArtifactUpload/dev/Core/Learner
+ ArtifactUpload/dev/Core/UserOrg
SUCCESS
0
diff --git a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Lern/jobs/LernAnalyticsReplayJobs/config.xml b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Lern/jobs/LernAnalyticsReplayJobs/config.xml
index cd2ac8b2d1..c5f7e8926d 100644
--- a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Lern/jobs/LernAnalyticsReplayJobs/config.xml
+++ b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Lern/jobs/LernAnalyticsReplayJobs/config.xml
@@ -1,209 +1,222 @@
-
-
-
-
- hudson.model.ParametersDefinitionProperty
- com.sonyericsson.rebuild.RebuildSettings
-
-
-
-
- false
-
-
-
- -1
- 10
- -1
- 2
-
-
-
-
- false
- false
-
-
-
-
- cql_query
- <font color=dimgray size=2><b>Specify cql_query if any tables needs to be truncated.<b></font>
- 0
- false
-
-
- job_type
- <font color=dimgray size=2><b>Specify the job type - Replay or Run.</b></font>
-
-
- run-job
- replay-job
- generate-metrics
- submit-job
-
-
-
-
- job_id
- <font color=dimgray size=2><b>Specify the job id.</b></font>
-
-
- collection-summary-report-v2
- collection-summary-report
- program-collection-summary-report
- audit-metrics-report
- admin-user-reports
- admin-geo-reports
- district-weekly
- district-monthly
- desktop-consumption-report
- wfs
- content-rating-updater
- druid-query-processor
- monitor-job-summ
- cassandra-migration
- course-enrollment-report
- textbook-progress-report
- etb-metrics
- daily-metrics
- progress-exhaust
- userinfo-exhaust
- response-exhaust
- progress-exhaust-v2
- response-exhaust-v2
- course-batch-status-updater
- druid-dataset
- score-metric-migration-job
- uci-response-exhaust
- uci-private-exhaust
-
-
-
-
- batch_identifier
- <font color=dimgray size=2><b>Specify The BatchId to Generate report for specific batch</b></font>
-<font color=dimgray size=2><b>NOTE: Only Applicable if you are running course-metrics and assessment metrics job</b></font>
-
- false
-
-
- start_date
- <font color=dimgray size=2><b>Specify the start date. The default value is just a placeholder which can be changed as per need.</b></font>
- 2017-05-01
- false
-
-
- end_date
- <font color=dimgray size=2><b>Specify the end date. The default value is just a placeholder which can be changed as per need.</b></font>
- 2017-07-11
- false
-
-
- pause_min
- <font color=dimgray size=2><b>Specify the # of minutes to pause. The default value is just a placeholder which can be changed as per need.</b></font>
- 30
- false
-
-
- private_branch
-
- choice-parameter-2544395024638227
- 1
-
- true
-
-
-
- true
-
-
- LernAnalyticsReplayJobs
- Deploy/dev/Lern/LernAnalyticsReplayJobs
-
-
- ET_FORMATTED_HTML
- true
-
-
- branch_or_tag
-
- choice-parameter-2620434998790477
- 1
-
+ true
+
+
+
+ true
+
+
+ LernAnalyticsReplayJobs
+ Deploy/dev/Lern/LernAnalyticsReplayJobs
+
+
+ ET_FORMATTED_HTML
+ true
+
+
+ branch_or_tag
+ choice-parameter-2620434998790477
+ 1
+
- true
-
-
-
- true
-
-
- LernAnalyticsReplayJobs
- Deploy/dev/Lern/LernAnalyticsReplayJobs
-
-
- ET_FORMATTED_HTML
- true
-
-
- keyword
- <font color=dimgray size=2><b>Optional - Enter a keyword to generate a report for the "program-collection-summary-report"</b></font>
-
- false
-
-
-
-
- 0
- 0
-
- false
- project
- false
-
-
-
-
-
-
- 2
-
-
- https://github.com/Sunbird-Lern/data-products
-
-
-
-
- ${branch_or_tag}
-
-
- false
-
-
-
- true
- false
-
- 0
- false
-
-
-
- pipelines/deploy/replay-jobs/Jenkinsfile
- false
-
-
- false
+ }
+ else
+ return """<b>This parameter is not used</b>"""
+ true
+
+
+
+ true
+
+
+ LernAnalyticsReplayJobs
+ Deploy/dev/Lern/LernAnalyticsReplayJobs
+
+
+ ET_FORMATTED_HTML
+ true
+
+
+
+
+ 0
+ 0
+
+ false
+ project
+ false
+
+
+
+
+
+
+ 2
+
+
+ https://github.com/Sunbird-Lern/data-products.git
+
+
+
+
+ ${branch_or_tag}
+
+
+ false
+
+
+
+ true
+ false
+
+ 0
+ false
+
+
+
+ pipelines/deploy/replay-jobs/Jenkinsfile
+ false
+
+
+ false
\ No newline at end of file
diff --git a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Lern/jobs/LernDataProducts/config.xml b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Lern/jobs/LernDataProducts/config.xml
index 6f8fd449c2..4fa8dea65d 100644
--- a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Lern/jobs/LernDataProducts/config.xml
+++ b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Lern/jobs/LernDataProducts/config.xml
@@ -169,7 +169,7 @@ return """<b>This parameter is not used</b>"""
module
<font color=dimgray size=2><b>It will deploy only lpa_core_dp_artifacts(batch-models & job-manager) jar.</b></font>
- ed-dataproducts
+ lern-dataproducts
false
@@ -230,7 +230,7 @@ return """<b>This parameter is not used</b>"""
- pipelines/deploy/ed-dataproducts/Jenkinsfile
+ pipelines/deploy/lern-dataproducts/Jenkinsfile
false
diff --git a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Lern/jobs/LernFlinkJobs/config.xml b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Lern/jobs/LernFlinkJobs/config.xml
index 19322ba1a4..396590af95 100644
--- a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Lern/jobs/LernFlinkJobs/config.xml
+++ b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Lern/jobs/LernFlinkJobs/config.xml
@@ -105,7 +105,8 @@ return """<b>This parameter is not used</b>"""
'merge-user-courses',
'assessment-aggregator',
'enrolment-reconciliation',
-'notification-job']
+'notification-job',
+'program-user-info']
true
@@ -167,4 +168,4 @@ return """<b>This parameter is not used</b>"""
false
-
\ No newline at end of file
+
diff --git a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Summary/jobs/DeployedVersions/config.xml b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Summary/jobs/DeployedVersions/config.xml
index 85388922e1..04b4f8cdf5 100644
--- a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Summary/jobs/DeployedVersions/config.xml
+++ b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Summary/jobs/DeployedVersions/config.xml
@@ -30,7 +30,7 @@
- Deploy/dev/Core/Content,Deploy/dev/Core/Player,Deploy/dev/Core/Learner,Deploy/dev/Core/Telemetry,Deploy/dev/Core/Proxy,Deploy/dev/KnowledgePlatform/Search,Deploy/dev/KnowledgePlatform/Learning,Deploy/dev/KnowledgePlatform/Yarn,Deploy/dev/DataPipeline/Secor,Deploy/dev/DataPipeline/Yarn,Deploy/dev/DataPipeline/AnalyticsAPI,Deploy/dev/DataPipeline/DataProducts
+ Deploy/dev/Core/Content,Deploy/dev/Core/Player,Deploy/dev/Core/UserOrg,Deploy/dev/Core/Telemetry,Deploy/dev/Core/Proxy,Deploy/dev/KnowledgePlatform/Search,Deploy/dev/KnowledgePlatform/Learning,Deploy/dev/KnowledgePlatform/Yarn,Deploy/dev/DataPipeline/Secor,Deploy/dev/DataPipeline/Yarn,Deploy/dev/DataPipeline/AnalyticsAPI,Deploy/dev/DataPipeline/DataProducts
SUCCESS
0
diff --git a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Sunbird-RC/jobs/Upload_RC_Schema/config.xml b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Sunbird-RC/jobs/UploadRCSchema/config.xml
similarity index 95%
rename from deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Sunbird-RC/jobs/Upload_RC_Schema/config.xml
rename to deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Sunbird-RC/jobs/UploadRCSchema/config.xml
index 997794c6dc..1ff2974d6d 100644
--- a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Sunbird-RC/jobs/Upload_RC_Schema/config.xml
+++ b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/Sunbird-RC/jobs/UploadRCSchema/config.xml
@@ -71,15 +71,6 @@ return """<b>This parameter is not used</b>"""
ET_FORMATTED_HTML
true
-
- blob_container
-
-
-
- sunbird-content-dev
-
-
-
tag
diff --git a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/UCI/jobs/uci-transport-socket/config.xml b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/UCI/jobs/uci-transport-socket/config.xml
new file mode 100644
index 0000000000..b418c503df
--- /dev/null
+++ b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/UCI/jobs/uci-transport-socket/config.xml
@@ -0,0 +1,159 @@
+
+
+
+
+ hudson.model.ParametersDefinitionProperty
+ com.sonyericsson.rebuild.RebuildSettings
+
+
+
+
+ false
+
+
+
+ -1
+ 10
+ -1
+ 2
+
+
+
+
+ false
+ false
+
+
+
+
+ absolute_job_path
+ <font color=dimgray size=2><b>Do not change this value! The metadata.json will be copied from this job.</b></font>
+ ArtifactUpload/dev/UCI/uci-transport-socket
+ false
+
+
+ image_tag
+ <font color=red size=2><b>CAUTION: If the value is blank, image tag will be taken from the latest metadata.json.</b></font>
+
+ false
+
+
+ private_branch
+
+ choice-parameter-2544395024638227
+ 1
+
+ true
+
+
+
+ true
+
+
+ uci-transport-socket
+ Deploy/dev/UCI/uci-transport-socket
+
+
+ ET_FORMATTED_HTML
+ true
+
+
+ branch_or_tag
+
+ choice-parameter-2620434998790477
+ 1
+
+ true
+
+
+
+ true
+
+
+ uci-transport-socket
+ Deploy/dev/UCI/uci-transport-socket
+
+
+ ET_FORMATTED_HTML
+ true
+
+
+ role_name
+
+
+
+ sunbird-deploy
+
+
+
+
+
+
+ 0
+ 0
+
+ false
+ project
+ false
+
+
+
+
+
+
+
+ ArtifactUpload/dev/UCI/uci-transport-socket
+
+ SUCCESS
+ 0
+ BLUE
+ true
+
+
+
+
+
+
+
+ 2
+
+
+ https://github.com/project-sunbird/sunbird-devops.git
+
+
+
+
+ uci-transport-socket
+
+
+ false
+
+
+
+ true
+ false
+
+ 0
+ false
+
+
+
+ kubernetes/pipelines/deploy_core/Jenkinsfile
+ false
+
+
+ false
+
diff --git a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/managed-learn/jobs/ml-analytics-adhoc/config.xml b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/managed-learn/jobs/ml-analytics-adhoc/config.xml
new file mode 100644
index 0000000000..eeb6fdfe2b
--- /dev/null
+++ b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/managed-learn/jobs/ml-analytics-adhoc/config.xml
@@ -0,0 +1,130 @@
+
+
+
+ false
+
+
+ false
+ false
+
+
+
+
+ private_branch
+ choice-parameter-3803648169564146
+ 1
+
+ true
+
+
+
+ true
+
+
+ ml-analytics-adhoc
+ Deploy/dev/managed-learn/ml-analytics-adhoc
+
+
+ ET_FORMATTED_HTML
+ true
+
+
+ branch_or_tag
+ choice-parameter-3803648170694062
+ 1
+
+ true
+
+
+
+ true
+
+
+ ml-analytics-adhoc
+ Deploy/dev/managed-learn/ml-analytics-adhoc
+
+
+ ET_FORMATTED_HTML
+ true
+
+
+ action
+ <font color=green size=2><b>Choose the job names to run. Multi-selection is available.</b></font>
+ choice-parameter-3812862131559945
+ 1
+
+ true
+
+
+
+ true
+
+
+ ml-analytics-adhoc
+ Deploy/dev/managed-learn/ml-analytics-adhoc
+
+
+ PT_MULTI_SELECT
+ false
+ 1
+
+
+
+
+ 0
+ 0
+
+ false
+ project
+ false
+
+
+
+
+
+
+ 2
+
+
+ https://github.com/project-sunbird/sunbird-devops.git
+ github-cred
+
+
+
+
+ ${branch_or_tag}
+
+
+ false
+
+
+
+ pipelines/deploy/ml-analytics-adhoc/Jenkinsfile
+ false
+
+
+ false
+
diff --git a/deploy/jenkins/jobs/OpsAdministration/jobs/dev/jobs/Core/jobs/Bootstrap/config.xml b/deploy/jenkins/jobs/OpsAdministration/jobs/dev/jobs/Core/jobs/Bootstrap/config.xml
index 7663c96890..9235e1a246 100644
--- a/deploy/jenkins/jobs/OpsAdministration/jobs/dev/jobs/Core/jobs/Bootstrap/config.xml
+++ b/deploy/jenkins/jobs/OpsAdministration/jobs/dev/jobs/Core/jobs/Bootstrap/config.xml
@@ -94,6 +94,9 @@ return """<b>This parameter is not used</b>"""
true
@@ -121,7 +124,7 @@ return """<b>This parameter is not used</b>"""
false
-
+
@@ -153,4 +156,4 @@ return """<b>This parameter is not used</b>"""
false
-
\ No newline at end of file
+
diff --git a/deploy/jenkins/jobs/OpsAdministration/jobs/dev/jobs/Core/jobs/GraylogMongoDbBackup/config.xml b/deploy/jenkins/jobs/OpsAdministration/jobs/dev/jobs/Core/jobs/GraylogMongoDbBackup/config.xml
new file mode 100644
index 0000000000..f1e05c88a9
--- /dev/null
+++ b/deploy/jenkins/jobs/OpsAdministration/jobs/dev/jobs/Core/jobs/GraylogMongoDbBackup/config.xml
@@ -0,0 +1,130 @@
+
+
+
+ false
+
+
+
+ -1
+ 10
+ -1
+ 2
+
+
+
+
+ false
+ false
+
+
+
+
+ private_branch
+
+ choice-parameter-189743214208409
+ 1
+
+ true
+
+
+
+ true
+
+
+ GraylogMongoDbBackup
+ OpsAdministration/dev/Core/GraylogMongoDbBackup
+
+
+ ET_FORMATTED_HTML
+ true
+
+
+ branch_or_tag
+
+ choice-parameter-189743216959018
+ 1
+
+ true
+
+
+
+ true
+
+
+ GraylogMongoDbBackup
+ OpsAdministration/dev/Core/GraylogMongoDbBackup
+
+
+ ET_FORMATTED_HTML
+ true
+
+
+ host
+
+ graylog
+ false
+
+
+
+
+ 0
+ 0
+
+ false
+ project
+ false
+
+
+
+
+
+
+ 00 4 * * *
+
+
+
+
+
+
+ 2
+
+
+ https://github.com/keshavprasadms/sunbird-devops.git
+
+
+
+
+ ${branch_or_tag}
+
+
+ false
+
+
+
+ true
+ false
+
+ 0
+ false
+
+
+
+ pipelines/backup/mongodb-backup/Jenkinsfile
+ false
+
+
+ false
+
diff --git a/deploy/jenkins/jobs/OpsAdministration/jobs/dev/jobs/Core/jobs/MongoDbBackup/config.xml b/deploy/jenkins/jobs/OpsAdministration/jobs/dev/jobs/Core/jobs/MongoDbBackup/config.xml
new file mode 100644
index 0000000000..ff3d4bd8f3
--- /dev/null
+++ b/deploy/jenkins/jobs/OpsAdministration/jobs/dev/jobs/Core/jobs/MongoDbBackup/config.xml
@@ -0,0 +1,130 @@
+
+
+
+ false
+
+
+
+ -1
+ 10
+ -1
+ 2
+
+
+
+
+ false
+ false
+
+
+
+
+ private_branch
+
+ choice-parameter-189743214208409
+ 1
+
+ true
+
+
+
+ true
+
+
+ MongoDbBackup
+ OpsAdministration/dev/Core/MongoDbBackup
+
+
+ ET_FORMATTED_HTML
+ true
+
+
+ branch_or_tag
+
+ choice-parameter-189743216959018
+ 1
+
+ true
+
+
+
+ true
+
+
+ MongoDbBackup
+ OpsAdministration/dev/Core/MongoDbBackup
+
+
+ ET_FORMATTED_HTML
+ true
+
+
+ host
+
+ mongo_master
+ false
+
+
+
+
+ 0
+ 0
+
+ false
+ project
+ false
+
+
+
+
+
+
+ 30 3 * * *
+
+
+
+
+
+
+ 2
+
+
+ https://github.com/keshavprasadms/sunbird-devops.git
+
+
+
+
+ ${branch_or_tag}
+
+
+ false
+
+
+
+ true
+ false
+
+ 0
+ false
+
+
+
+ pipelines/backup/mongodb-backup/Jenkinsfile
+ false
+
+
+ false
+
diff --git a/deploy/jenkins/jobs/OpsAdministration/jobs/dev/jobs/DataPipeline/jobs/Bootstrap/config.xml b/deploy/jenkins/jobs/OpsAdministration/jobs/dev/jobs/DataPipeline/jobs/Bootstrap/config.xml
index 39884cf71a..8c82b404e9 100644
--- a/deploy/jenkins/jobs/OpsAdministration/jobs/dev/jobs/DataPipeline/jobs/Bootstrap/config.xml
+++ b/deploy/jenkins/jobs/OpsAdministration/jobs/dev/jobs/DataPipeline/jobs/Bootstrap/config.xml
@@ -94,6 +94,7 @@ return """<b>This parameter is not used</b>"""
true
diff --git a/deploy/jenkins/jobs/OpsAdministration/jobs/dev/jobs/KnowledgePlatform/jobs/Bootstrap/config.xml b/deploy/jenkins/jobs/OpsAdministration/jobs/dev/jobs/KnowledgePlatform/jobs/Bootstrap/config.xml
index 9f26dbf9d9..b3132dfd16 100644
--- a/deploy/jenkins/jobs/OpsAdministration/jobs/dev/jobs/KnowledgePlatform/jobs/Bootstrap/config.xml
+++ b/deploy/jenkins/jobs/OpsAdministration/jobs/dev/jobs/KnowledgePlatform/jobs/Bootstrap/config.xml
@@ -94,6 +94,7 @@ return """<b>This parameter is not used</b>"""
true
diff --git a/deploy/jenkins/jobs/Provision/jobs/dev/jobs/Core/jobs/ApplicationElasticSearch/config.xml b/deploy/jenkins/jobs/Provision/jobs/dev/jobs/Core/jobs/ApplicationElasticSearch/config.xml
index 859b804b88..f669caa862 100644
--- a/deploy/jenkins/jobs/Provision/jobs/dev/jobs/Core/jobs/ApplicationElasticSearch/config.xml
+++ b/deploy/jenkins/jobs/Provision/jobs/dev/jobs/Core/jobs/ApplicationElasticSearch/config.xml
@@ -26,7 +26,7 @@
@@ -114,4 +114,4 @@ return """<b>This parameter is not used</b>"""
false
-
\ No newline at end of file
+
diff --git a/deploy/postInstallation.sh b/deploy/postInstallation.sh
index 009bb75c1f..951bac5512 100755
--- a/deploy/postInstallation.sh
+++ b/deploy/postInstallation.sh
@@ -134,7 +134,7 @@ check_cassandra_keyspaces() {
}
check_version() {
- list=(actor-service player_player learner-service content-service proxy_proxy api-manager_kong)
+ list=(actor-service player_player userorg-service content-service proxy_proxy api-manager_kong)
versionReq=$(git branch | grep \* | cut -d '-' -f2)
echo -e "The Sunbird Version being used is $versionReq \n"
if [ $(git branch | grep \* | cut -d '-' -f2 | grep -Ewo '.' | wc -l) -ne 3 ]; then
@@ -155,7 +155,7 @@ get_logs() {
mkdir -p $ServiceLogsFolder
echo "Storing logs of core services in $ServiceLogsFolder"
echo "-----------------------------------------"
- serviceNames=(player_player learner-service content-service proxy_proxy api-manager_kong)
+ serviceNames=(player_player userorg-service content-service proxy_proxy api-manager_kong)
for service in ${serviceNames[@]}; do
echo -e "\nexporting $service logs to $ServiceLogsFolder"
sudo docker service logs $service --tail 10000 > $ServiceLogsFolder/$service
diff --git a/deploy/version.env b/deploy/version.env
index 4e6ac911e3..c7d8020919 100755
--- a/deploy/version.env
+++ b/deploy/version.env
@@ -1,6 +1,6 @@
PLAYER_VERSION=1.11.0-gold
CONTENT_SERVICE_VERSION=1.11.0-gold
-LEARNER_SERVICE_VERSION=1.11.0-gold
+USERORG_SERVICE_VERSION=1.11.0-gold
PROXY_VERSION=1.8.0-gold
BADGER_SERVICE_VERSION=1.8.0-gold
KONG_VERSION=1.8.0-gold
diff --git a/kubernetes/ansible/bootstrap.yaml b/kubernetes/ansible/bootstrap.yaml
index 0fa7e0acfe..72f1beacff 100644
--- a/kubernetes/ansible/bootstrap.yaml
+++ b/kubernetes/ansible/bootstrap.yaml
@@ -39,7 +39,7 @@
- name: "Tagging {{ namespace }} to enable istio"
shell: "kubectl label namespaces {{ namespace }} istio-injection=enabled --overwrite"
- name: Creating docker secrets
- shell: "kubectl create secret docker-registry {{ imagepullsecrets }} --namespace {{ namespace }} --docker-server {{ vault_docker_registry_url }} --docker-username {{ vault_docker_registry_user }} --docker-password {{ vault_docker_registry_password }} --dry-run=client -o=yaml | kubectl apply -f -"
+ shell: "kubectl create secret docker-registry {{ imagepullsecrets }} --namespace {{ namespace }} --docker-server {{ vault_docker_registry_url }} --docker-username {{ vault_docker_registry_user }} --docker-password '{{ vault_docker_registry_password }}' --dry-run=client -o=yaml | kubectl apply -f -"
- name: Installing reloader for configmaps reload
shell: helm upgrade --install --atomic reloader ../helm_charts/core/reloader --namespace "{{ namespace }}" -f /tmp/helm_vars.yaml
roles:
diff --git a/kubernetes/ansible/bootstrap_minimal.yaml b/kubernetes/ansible/bootstrap_minimal.yaml
index 44170246ae..cdb145423e 100644
--- a/kubernetes/ansible/bootstrap_minimal.yaml
+++ b/kubernetes/ansible/bootstrap_minimal.yaml
@@ -30,7 +30,7 @@
- logging
ignore_errors: yes
- name: Creating docker secrets
- shell: "kubectl create secret docker-registry {{ imagepullsecrets }} --namespace {{ item }} --docker-server {{ vault_docker_registry_url }} --docker-username {{ vault_docker_registry_user }} --docker-password {{ vault_docker_registry_password }} --dry-run=client -o=yaml | kubectl apply -f -"
+ shell: "kubectl create secret docker-registry {{ imagepullsecrets }} --namespace {{ item }} --docker-server {{ vault_docker_registry_url }} --docker-username {{ vault_docker_registry_user }} --docker-password '{{ vault_docker_registry_password }}' --dry-run=client -o=yaml | kubectl apply -f -"
when: imagepullsecrets|length > 0
with_items:
- "{{ bootstrap_namespace.split(',') }}"
diff --git a/kubernetes/ansible/namespace.yml b/kubernetes/ansible/namespace.yml
index bc62234c2c..bc38fab7d8 100644
--- a/kubernetes/ansible/namespace.yml
+++ b/kubernetes/ansible/namespace.yml
@@ -28,7 +28,7 @@
- "{{ bootstrap_namespace.split(',') }}"
ignore_errors: yes
- name: Creating docker secrets
- shell: "kubectl create secret docker-registry {{ imagepullsecrets }} --namespace {{ item }} --docker-server {{ vault_docker_registry_url }} --docker-username {{ vault_docker_registry_user }} --docker-password {{ vault_docker_registry_password }} --dry-run=client -o=yaml | kubectl apply -f -"
+ shell: "kubectl create secret docker-registry {{ imagepullsecrets }} --namespace {{ item }} --docker-server {{ vault_docker_registry_url }} --docker-username {{ vault_docker_registry_user }} --docker-password '{{ vault_docker_registry_password }}' --dry-run=client -o=yaml | kubectl apply -f -"
when: imagepullsecrets|length > 0
with_items:
- "{{ bootstrap_namespace.split(',') }}"
diff --git a/kubernetes/ansible/roles/deploy-player/tasks/main.yml b/kubernetes/ansible/roles/deploy-player/tasks/main.yml
index 5abdc85449..28a757f224 100644
--- a/kubernetes/ansible/roles/deploy-player/tasks/main.yml
+++ b/kubernetes/ansible/roles/deploy-player/tasks/main.yml
@@ -48,7 +48,7 @@
loop_control:
loop_var: outer_item
-- name: Create the token pubic key file
+- name: Create the token public key file
copy:
dest: "{{ chart_path }}/keys/{{ adminutil_refresh_token_public_key_kid }}"
content: "{{ core_vault_sunbird_sso_publickey }}"
@@ -74,9 +74,10 @@
delay: 30
- name: Get deployed image name
- shell: kubectl get deployments.apps {{ release_name }} -o json -n {{ namespace }} | jq -r '.spec.template.spec.containers[0].image | split("/")[1]'
+ shell: kubectl get deployments.apps {{ release_name }} -o json -n {{ namespace }} | jq -r '.spec.template.spec.containers[0].image | split("/")[-1]'
register: deployed_image
+
- set_fact:
metadata_image: "{{ image_name }}:{{ image_tag }}"
diff --git a/kubernetes/ansible/roles/helm-daemonset/defaults/main.yml b/kubernetes/ansible/roles/helm-daemonset/defaults/main.yml
index 59eb136773..511f5c2acd 100644
--- a/kubernetes/ansible/roles/helm-daemonset/defaults/main.yml
+++ b/kubernetes/ansible/roles/helm-daemonset/defaults/main.yml
@@ -32,7 +32,3 @@ prometheus_alertmanager_route_prefix: alertmanager
ekstep_s3_env: "{{sunbird_env}}"
registry_url: "{{proto}}://{{proxy_server_name}}/registry"
ep_es_host:
-
-upstream_url: "ekstep-public-{{ekstep_s3_env}}.s3-ap-south-1.amazonaws.com"
-plugin_upstream_url: "ekstep-public-{{ekstep_s3_env}}.s3-ap-south-1.amazonaws.com"
-sunbird_offline_azure_storage_account_url: "{{ sunbird_public_storage_account_name }}.blob.core.windows.net/{{ offline_installer_container_name }}"
diff --git a/kubernetes/ansible/roles/helm-daemonset/tasks/main.yml b/kubernetes/ansible/roles/helm-daemonset/tasks/main.yml
index e04c4f137f..91fcc9f979 100644
--- a/kubernetes/ansible/roles/helm-daemonset/tasks/main.yml
+++ b/kubernetes/ansible/roles/helm-daemonset/tasks/main.yml
@@ -25,7 +25,7 @@
delay: 30
- name: Get deployed image name
- shell: "kubectl get daemonsets {{ release_name }} -o json -n {{ namespace }} | jq '.spec.template.spec.containers | .[].image' -r | awk -F/ '{print $2}'"
+ shell: "kubectl get daemonsets {{ release_name }} -o json -n {{ namespace }} | jq -r '.spec.template.spec.containers[].image | split("/")[-1]'"
register: deployed_image
- set_fact:
diff --git a/kubernetes/ansible/roles/helm-deploy/defaults/main.yml b/kubernetes/ansible/roles/helm-deploy/defaults/main.yml
index 0dcb0e8d3a..6c5c925747 100644
--- a/kubernetes/ansible/roles/helm-deploy/defaults/main.yml
+++ b/kubernetes/ansible/roles/helm-deploy/defaults/main.yml
@@ -32,10 +32,7 @@ registry_url: "{{proto}}://{{proxy_server_name}}/registry"
ep_es_host:
proxy_custom_config:
-upstream_url: "ekstep-public-{{ekstep_s3_env}}.s3-ap-south-1.amazonaws.com"
-plugin_upstream_url: "ekstep-public-{{ekstep_s3_env}}.s3-ap-south-1.amazonaws.com"
-discussion_upstream_url: "{{ sunbird_public_storage_account_name }}.blob.core.windows.net"
-sunbird_offline_azure_storage_account_url: "{{ sunbird_public_storage_account_name }}.blob.core.windows.net/{{ offline_installer_container_name }}"
+discussion_upstream_url: "{{ cloud_storage_url }}"
proxy_cache_path:
large_cache:
@@ -238,7 +235,7 @@ adminutil_access_values:
role_to_run:
- decrypt.yml
- generate-keys.yml
- - copy-to-helm-public.yml
+ - copy-to-helm.yml
opa_policies_path: ../../../opa
# Cannot remove common.rego from common_opa_policy_files yet
diff --git a/kubernetes/ansible/roles/helm-deploy/tasks/main.yml b/kubernetes/ansible/roles/helm-deploy/tasks/main.yml
index a0dba8e709..e960145c7a 100644
--- a/kubernetes/ansible/roles/helm-deploy/tasks/main.yml
+++ b/kubernetes/ansible/roles/helm-deploy/tasks/main.yml
@@ -22,6 +22,14 @@
- "{{ chart_path }}/schemas/*.json"
when: release_name == "registry"
+- name: template config json
+ template:
+ src: "{{ item }}"
+ dest: "{{ item }}"
+ with_fileglob:
+ - "{{ chart_path }}/configs/*.json"
+ when: release_name == "certificatesign"
+
- name: Load role to decrypt private keys, copy to private keys helm chart
include_role:
name: mount-keys
@@ -31,20 +39,20 @@
private_key_prefix: "{{ outer_item.0.values_to_pass.keyprefix }}"
private_key_sign_start: "{{ outer_item.0.values_to_pass.keystart }}"
private_key_sign_end: "{{ outer_item.0.values_to_pass.keycount if outer_item.0.values_to_pass.keycount > '0' else '1' }}"
- when: release_name == "adminutils" or release_name == "gotenberg"
+ when: release_name == "adminutils"
with_subelements:
- "{{adminutil_keys_values}}"
- role_to_run
loop_control:
loop_var: outer_item
-- name: Create the token pubic key file
+- name: Create the token public key file
copy:
dest: "{{ chart_path }}/keys/{{ adminutil_refresh_token_public_key_prefix }}"
content: "{{ core_vault_sunbird_sso_publickey }}"
when: release_name == "adminutils"
-- name: Create the token pubic key file for ML Services
+- name: Create the token public key file for ML Services
copy:
dest: "{{ chart_path }}/keys/{{ adminutil_refresh_token_public_key_kid }}"
content: "{{ core_vault_sunbird_sso_publickey }}"
@@ -107,10 +115,10 @@
args:
executable: /bin/bash
register: deployment_result
- ignore_errors: yes
+ ignore_errors: true
- name: Get deployed image name - deployments
- shell: kubectl get deployments.apps {{ release_name }} -o json -n {{ namespace }} | jq -r '.spec.template.spec.containers[0].image | split("/")[1]'
+ shell: kubectl get deployments.apps {{ release_name }} -o json -n {{ namespace }} | jq -r '.spec.template.spec.containers[0].image | split("/")[-1]'
register: image
- set_fact:
@@ -121,12 +129,13 @@
args:
executable: /bin/bash
register: daemonset_result
- ignore_errors: yes
+ ignore_errors: true
- name: Get deployed image name - daemonsets
- shell: "kubectl get daemonsets {{ release_name }} -o json -n {{ namespace }} | jq '.spec.template.spec.containers | .[].image' -r | awk -F/ '{print $2}'"
+ shell: kubectl get daemonsets {{ release_name }} -o json -n {{ namespace }} | jq -r '.spec.template.spec.containers[].image | split("/")[-1]'
register: image
+
- set_fact:
deployed_image: "{{ image if image.stdout_lines | length > 0 else deployed_image }}"
@@ -135,10 +144,10 @@
args:
executable: /bin/bash
register: statefulset_result
- ignore_errors: yes
+ ignore_errors: true
- name: Get deployed image name - statefulsets
- shell: "kubectl get statefulsets {{ release_name }} -o json -n {{ namespace }} | jq '.spec.template.spec.containers | .[].image' -r | awk -F/ '{print $2}'"
+ shell: kubectl get statefulsets {{ release_name }} -o json -n {{ namespace }} | jq -r '.spec.template.spec.containers[].image | split("/")[-1]'
register: image
- set_fact:
diff --git a/kubernetes/ansible/roles/mount-keys/tasks/copy-to-helm-public.yml b/kubernetes/ansible/roles/mount-keys/tasks/copy-to-helm-public.yml
deleted file mode 100644
index 4320bccfd3..0000000000
--- a/kubernetes/ansible/roles/mount-keys/tasks/copy-to-helm-public.yml
+++ /dev/null
@@ -1,14 +0,0 @@
----
-- name: Create the keys directory in case user is overriding the private_key_path
- file:
- path: "{{chart_path}}/keys"
- state: directory
- mode: 0755
-
-- name: Copy keys directory to chart path
- vars:
- private_key_path: "{{private_key_path | regex_replace('^\\/|\\/$', '')}}"
- copy: "src={{inventory_dir}}{{private_key_path}}{{private_key_prefix}}{{item}} dest={{chart_path}}/keys/"
- with_sequence: start={{private_key_sign_start}} end={{private_key_sign_start|int + private_key_sign_end|int - 1}} stride={{private_key_sign_incr}}
- when: (private_key_sign_start|int + private_key_sign_end|int - 1) > 0
-
diff --git a/kubernetes/ansible/roles/sunbird-deploy/tasks/main.yml b/kubernetes/ansible/roles/sunbird-deploy/tasks/main.yml
index 33fba6fb42..6d0b7ef387 100644
--- a/kubernetes/ansible/roles/sunbird-deploy/tasks/main.yml
+++ b/kubernetes/ansible/roles/sunbird-deploy/tasks/main.yml
@@ -39,7 +39,7 @@
loop_control:
loop_var: outer_item
-- name: Create the token pubic key file
+- name: Create the token public key file
copy:
dest: "{{ chart_path }}/keys/{{ adminutil_refresh_token_public_key_kid }}"
content: "{{ core_vault_sunbird_sso_publickey }}"
@@ -89,7 +89,7 @@
delay: 30
- name: Get deployed image name
- shell: kubectl get deployments.apps {{ release_name }} -o json -n {{ namespace }} | jq -r '.spec.template.spec.containers[0].image | split("/")[1]'
+ shell: kubectl get deployments.apps {{ release_name }} -o json -n {{ namespace }} | jq -r '.spec.template.spec.containers[0].image | split("/")[-1]'
register: deployed_image
- set_fact:
diff --git a/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml b/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml
index b8aaa5bd92..3ce5e1bed7 100644
--- a/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml
+++ b/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml
@@ -266,8 +266,8 @@ service_health_checks:
targets: "http://content-service.{{ namespace }}.svc.cluster.local:9000/health"
- service_name: 'lms'
targets: "http://lms-service.{{ namespace }}.svc.cluster.local:9000/health"
- - service_name: 'learner'
- targets: "http://learner-service.{{ namespace }}.svc.cluster.local:9000/health"
+ - service_name: 'userorg'
+ targets: "http://userorg-service.{{ namespace }}.svc.cluster.local:9000/health"
api_response_upward_trend_threshold: 0.3
diff --git a/kubernetes/ansible/roles/sunbird-monitoring/templates/additional-scrape-configs.yaml b/kubernetes/ansible/roles/sunbird-monitoring/templates/additional-scrape-configs.yaml
index a28d39c9b2..0938226302 100644
--- a/kubernetes/ansible/roles/sunbird-monitoring/templates/additional-scrape-configs.yaml
+++ b/kubernetes/ansible/roles/sunbird-monitoring/templates/additional-scrape-configs.yaml
@@ -140,6 +140,31 @@ services:
es:
port: 9200
address: ["{{ groups['es'] | join('","') }}"]
+ postgres:
+ port: 5432
+ address: ["{{ groups['postgres'] | join('","') }}"]
+ neo4j:
+ port: 7687
+ address: ["{{ groups['learning-neo4j-node1'] | join('","') }}"]
+ mongo:
+ port: 27017
+ address: ["{{ groups['mongo'] | join('","') }}"]
+ druid-coordinator:
+ port: 8081
+ address: ["{{ groups['raw-coordinator'] | join('","') }}"]
+ druid-broker:
+ port: 8082
+ address: ["{{ groups['raw-broker'] | join('","') }}"]
+ druid-middlemanager:
+ port: 8091
+ address: ["{{ groups['raw-middlemanager'] | join('","') }}"]
+ druid-overlord:
+ port: 8090
+ address: ["{{ groups['raw-overlord'] | join('","') }}"]
+ spark:
+ port: 22
+ address: ["{{ groups['dp-spark-ps'] | join('","') }}"]
+
{% if additional_blackbox_scrapeconfigs is defined and additional_blackbox_scrapeconfigs %}
{{ additional_blackbox_scrapeconfigs | to_nice_yaml(indent=2) | indent( width=2) }}
{% endif %}
diff --git a/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-operator.yaml b/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-operator.yaml
index 9092bcbacb..04fcec6666 100644
--- a/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-operator.yaml
+++ b/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-operator.yaml
@@ -49,6 +49,10 @@ alertmanager_spec_overrides: &alertmanager_spec_overrides
# Enabling external prometheus scrape config
prometheus:
prometheusSpec:
+ additionalScrapeConfigsSecret:
+ enabled: true
+ name: {{ fullnameOverride }}-prometheus-scrape-confg
+ key: additional-scrape-configs.yaml
thanos:
version: {{ thanos_sidecar_version | d('v0.11.0') }}
additionalScrapeConfigsExternal: true
diff --git a/kubernetes/ansible/static-files/health.sh b/kubernetes/ansible/static-files/health.sh
index 575fd669e2..6b62b7dfb3 100755
--- a/kubernetes/ansible/static-files/health.sh
+++ b/kubernetes/ansible/static-files/health.sh
@@ -6,7 +6,7 @@
#apk add jq
outpt1=$(curl -s content-service:5000/health | jq '.result.healthy')
outpt2=$(curl -s player_player:3000/health| jq '.result.healthy')
-outpt3=$(curl -s learner-service:9000/health | jq '.result.response.checks[0].healthy')
+outpt3=$(curl -s userorg-service:9000/health | jq '.result.response.checks[0].healthy')
outpt4=$(curl -s lms-service:9005/health | jq '.result.response.checks[0].healthy')
echo ""
echo ""
@@ -29,9 +29,9 @@ echo ""
echo ""
if [ "$outpt3" == "true" ];then
- echo "Learner Service is Healthy"
+ echo "UserOrg Service is Healthy"
else
- echo "Learner Service is unhealthy"
+ echo "UserOrg Service is unhealthy"
fi
echo ""
diff --git a/kubernetes/helm_charts/core/adminutils/templates/hpa.yaml b/kubernetes/helm_charts/core/adminutils/templates/hpa.yaml
index 39a0140656..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/adminutils/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/adminutils/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,13 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
-{{- end }}
-
+{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/analytics/templates/hpa.yaml b/kubernetes/helm_charts/core/analytics/templates/hpa.yaml
index 1ba4f89a8b..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/analytics/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/analytics/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/analytics/values.j2 b/kubernetes/helm_charts/core/analytics/values.j2
index 354dcab3d3..277f840947 100644
--- a/kubernetes/helm_charts/core/analytics/values.j2
+++ b/kubernetes/helm_charts/core/analytics/values.j2
@@ -8,11 +8,10 @@ env:
javaoptions: {{analytics_java_mem_limit|default('-Xmx600m')}}
min_heap: {{analytics_min_heap_limit|default('-Xms1g')}}
max_heap: {{analytics_max_heap_limit|default('-Xmx2g')}}
- azure_private_account_secret: {{ sunbird_private_storage_account_key }}
- azure_private_account_name: {{ sunbird_private_storage_account_name }}
- azure_public_account_secret: {{ sunbird_public_storage_account_key }}
- azure_public_account_name: {{ sunbird_public_storage_account_name }}
-
+ azure_private_account_secret: {{ cloud_private_storage_secret }}
+ azure_private_account_name: {{ cloud_private_storage_accountname }}
+ azure_public_account_secret: {{ cloud_public_storage_secret }}
+ azure_public_account_name: {{ cloud_public_storage_accountname }}
replicaCount: {{analytics_replicacount|default(1)}}
repository: {{analytics_repository|default('sunbird-analytics-service')}}
image_tag: {{ image_tag }}
diff --git a/kubernetes/helm_charts/core/apimanager/templates/hpa.yaml b/kubernetes/helm_charts/core/apimanager/templates/hpa.yaml
index 1ba4f89a8b..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/apimanager/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/apimanager/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/apimanagerecho/templates/hpa.yaml b/kubernetes/helm_charts/core/apimanagerecho/templates/hpa.yaml
index 1ba4f89a8b..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/apimanagerecho/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/apimanagerecho/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/assessment/templates/hpa.yaml b/kubernetes/helm_charts/core/assessment/templates/hpa.yaml
index 1ba4f89a8b..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/assessment/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/assessment/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/assessment/values.j2 b/kubernetes/helm_charts/core/assessment/values.j2
index 1c6a66f67a..1b4722f55d 100644
--- a/kubernetes/helm_charts/core/assessment/values.j2
+++ b/kubernetes/helm_charts/core/assessment/values.j2
@@ -14,11 +14,11 @@ repository: {{assessment_repository|default('assessment-service')}}
image_tag: {{ image_tag }}
resources:
requests:
- cpu: {{assessment_cpu_req|default('50m')}}
- memory: {{assessment_mem_req|default('50Mi')}}
+ cpu: {{assessment_cpu_req|default('100m')}}
+ memory: {{assessment_mem_req|default('100Mi')}}
limits:
cpu: {{assessment_cpu_limit|default('1')}}
- memory: {{assessment_mem_limit|default('500Mi')}}
+ memory: {{assessment_mem_limit|default('1024Mi')}}
network:
port: 9003
targetport: 9000
diff --git a/kubernetes/helm_charts/core/cert/templates/hpa.yaml b/kubernetes/helm_charts/core/cert/templates/hpa.yaml
index 1ba4f89a8b..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/cert/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/cert/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/certregistry/templates/hpa.yaml b/kubernetes/helm_charts/core/certregistry/templates/hpa.yaml
index 1ba4f89a8b..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/certregistry/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/certregistry/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/content/templates/hpa.yaml b/kubernetes/helm_charts/core/content/templates/hpa.yaml
index 1ba4f89a8b..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/content/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/content/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/dial/templates/hpa.yaml b/kubernetes/helm_charts/core/dial/templates/hpa.yaml
index 1ba4f89a8b..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/dial/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/dial/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/discussionsmw/templates/hpa.yaml b/kubernetes/helm_charts/core/discussionsmw/templates/hpa.yaml
index cb527919ea..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/discussionsmw/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/discussionsmw/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
-{{- end }}
+{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/enc/templates/hpa.yaml b/kubernetes/helm_charts/core/enc/templates/hpa.yaml
index 1ba4f89a8b..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/enc/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/enc/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/gotenberg/templates/hpa.yaml b/kubernetes/helm_charts/core/gotenberg/templates/hpa.yaml
index 1ba4f89a8b..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/gotenberg/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/gotenberg/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/gql/templates/hpa.yaml b/kubernetes/helm_charts/core/gql/templates/hpa.yaml
index 0fef8ca0e7..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/gql/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/gql/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
- {{- end }}
\ No newline at end of file
+{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/groups/templates/hpa.yaml b/kubernetes/helm_charts/core/groups/templates/hpa.yaml
index 1ba4f89a8b..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/groups/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/groups/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/hawkeyesuperset/templates/service.yaml b/kubernetes/helm_charts/core/hawkeyesuperset/templates/service.yaml
index 5921bf6a1d..7621962310 100644
--- a/kubernetes/helm_charts/core/hawkeyesuperset/templates/service.yaml
+++ b/kubernetes/helm_charts/core/hawkeyesuperset/templates/service.yaml
@@ -16,7 +16,7 @@ spec:
ports:
- port: {{ .Values.service.port }}
targetPort: http
- nodePort: 31566
+ nodePort: 31966
protocol: TCP
name: http
selector:
diff --git a/kubernetes/helm_charts/core/inbound/templates/hpa.yaml b/kubernetes/helm_charts/core/inbound/templates/hpa.yaml
index 0fef8ca0e7..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/inbound/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/inbound/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
- {{- end }}
\ No newline at end of file
+{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/knowledgemw/templates/hpa.yaml b/kubernetes/helm_charts/core/knowledgemw/templates/hpa.yaml
index 1ba4f89a8b..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/knowledgemw/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/knowledgemw/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/learner/Chart.yaml b/kubernetes/helm_charts/core/learner/Chart.yaml
deleted file mode 100644
index d2c54a936b..0000000000
--- a/kubernetes/helm_charts/core/learner/Chart.yaml
+++ /dev/null
@@ -1,5 +0,0 @@
-apiVersion: v1
-appVersion: "1.0"
-description: A Helm chart for Kubernetes
-name: learner
-version: 0.1.0
diff --git a/kubernetes/helm_charts/core/learner/templates/configmap.yaml b/kubernetes/helm_charts/core/learner/templates/configmap.yaml
deleted file mode 100644
index 7c91ec6cca..0000000000
--- a/kubernetes/helm_charts/core/learner/templates/configmap.yaml
+++ /dev/null
@@ -1,25 +0,0 @@
----
-{{- $keys := .Files.Glob "keys/*" }}
-{{ if $keys }}
-apiVersion: v1
-kind: Secret
-metadata:
- name: {{ .Chart.Name }}-access-keys
-type: Opaque
-data:
-{{ (.Files.Glob "keys/*").AsSecrets | indent 2 }}
-{{ end }}
-
----
-{{- if .Values.learner_opa_enabled }}
-{{- $bundle := .Files.Glob "bundle/*" }}
-{{ if $bundle }}
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: {{ .Chart.Name }}-opa-policy
- namespace: {{ .Values.namespace }}
-binaryData:
- bundle.tar.gz: {{ (.Files.Get "bundle/bundle.tar.gz") | b64enc }}
-{{ end }}
-{{ end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/learner/templates/deployment.yaml b/kubernetes/helm_charts/core/learner/templates/deployment.yaml
deleted file mode 100644
index a9068341e4..0000000000
--- a/kubernetes/helm_charts/core/learner/templates/deployment.yaml
+++ /dev/null
@@ -1,170 +0,0 @@
----
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- name: {{ .Chart.Name }}
- namespace: {{ .Values.namespace }}
- annotations:
- reloader.stakater.com/auto: "true"
-spec:
- replicas: {{ .Values.replicaCount }}
- strategy:
- rollingUpdate:
- maxSurge: {{ .Values.strategy.maxsurge }}
- maxUnavailable: {{ .Values.strategy.maxunavailable }}
- selector:
- matchLabels:
- app: {{ .Chart.Name }}
- template:
- metadata:
- labels:
- app: {{ .Chart.Name }}
- spec:
-{{- if .Values.imagepullsecrets }}
- imagePullSecrets:
- - name: {{ .Values.imagepullsecrets }}
-{{- end }}
- containers:
- - name: {{ .Chart.Name }}
- image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}"
- imagePullPolicy: Always
- env:
- - name: JAVA_OPTIONS
- value: {{ .Values.env.javaoptions | quote }}
- - name: _JAVA_OPTIONS
- value: -Dlog4j2.formatMsgNoLookups=true
- envFrom:
- - configMapRef:
- name: {{ .Chart.Name }}-config
- resources:
-{{ toYaml .Values.resources | indent 10 }}
- ports:
- - containerPort: {{ .Values.network.port }}
- {{- if .Values.healthcheck }}
- livenessProbe:
-{{ toYaml .Values.livenessProbe | indent 10 }}
- readinessProbe:
-{{ toYaml .Values.readinessProbe | indent 10 }}
- {{- end }}
- volumeMounts:
- - name: {{ .Chart.Name }}-xml-config
- mountPath: /home/sunbird/learner/learning-service-1.0-SNAPSHOT/config/logback.xml
- subPath: learner-service_logback.xml
-{{- $keys := .Files.Glob "keys/*" }}
-{{- if $keys }}
- - mountPath: {{ .Values.learner_access_basepath }}
- name: access-keys
-{{- end }}
-{{- if .Values.learner_opa_enabled }}
- - args:
- - envoy
- - --config-path
- - /config/envoy-config.yaml
- env:
- - name: ENVOY_UID
- value: "1111"
- image: envoyproxy/envoy:v1.20.0
- imagePullPolicy: IfNotPresent
- name: envoy
- {{- if .Values.envoy_healthcheck }}
- livenessProbe:
-{{ toYaml .Values.envoy_livenessProbe | indent 10 }}
- readinessProbe:
-{{ toYaml .Values.envoy_readinessProbe | indent 10 }}
- {{- end }}
- resources:
-{{ toYaml .Values.envoy_resources | indent 10 }}
- volumeMounts:
- - mountPath: /config
- name: envoy-config
- readOnly: true
- - args:
- - run
- - --server
- - /bundle
- - --addr=localhost:8181
- - --diagnostic-addr=0.0.0.0:8282
- - --set=plugins.envoy_ext_authz_grpc.addr=:9191
- - --set=plugins.envoy_ext_authz_grpc.path=main/allow
- - --set=decision_logs.plugin=print_decision_logs_on_failure
- - --set=plugins.print_decision_logs_on_failure.stdout=true
- - --log-level=error
- - --ignore=.*
- image: sunbird/opa:0.34.2-envoy
- imagePullPolicy: IfNotPresent
- name: opa
- {{- if .Values.opa_healthcheck }}
- livenessProbe:
-{{ toYaml .Values.opa_livenessProbe | indent 10 }}
- readinessProbe:
-{{ toYaml .Values.opa_readinessProbe | indent 10 }}
- {{- end }}
- resources:
-{{ toYaml .Values.opa_resources | indent 10 }}
- volumeMounts:
- - mountPath: /bundle
- name: opa-policy
- readOnly: true
- initContainers:
- - args:
- - -p
- - "9999"
- - -u
- - "1111"
- - -w
- - "8282,10000"
- image: openpolicyagent/proxy_init:v5
- imagePullPolicy: IfNotPresent
- name: proxy-init
- resources:
-{{ toYaml .Values.initcontainer_resources | indent 10 }}
- securityContext:
- capabilities:
- add:
- - NET_ADMIN
- runAsNonRoot: false
- runAsUser: 0
-{{- end }}
- volumes:
- - name: {{ .Chart.Name }}-xml-config
- configMap:
- name: {{ .Chart.Name }}-xml-config
-{{- $keys := .Files.Glob "keys/*" }}
-{{- if $keys }}
- - name: access-keys
- secret:
- secretName: {{ .Chart.Name }}-access-keys
-{{- end }}
-{{- if .Values.learner_opa_enabled }}
- - name: envoy-config
- configMap:
- name: {{ .Chart.Name }}-envoy-config
- - name: opa-policy
- configMap:
- name: {{ .Chart.Name }}-opa-policy
-{{- end }}
----
-apiVersion: v1
-kind: Service
-metadata:
- name: {{ .Chart.Name }}-service
- namespace: {{ .Values.namespace }}
- labels:
- app: {{ .Chart.Name }}
-spec:
- ports:
- - name: http-{{ .Chart.Name }}
- protocol: TCP
- port: {{ .Values.network.targetport }}
-{{- if .Values.learner_opa_enabled }}
- - name: opa-metrics
- port: 8181
- protocol: TCP
- targetPort: 8181
- - name: envoy-metrics
- port: 10000
- protocol: TCP
- targetPort: 10000
-{{- end }}
- selector:
- app: {{ .Chart.Name }}
diff --git a/kubernetes/helm_charts/core/learner/templates/hpa.yaml b/kubernetes/helm_charts/core/learner/templates/hpa.yaml
index 1ba4f89a8b..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/learner/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/learner/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/learner/values.j2 b/kubernetes/helm_charts/core/learner/values.j2
deleted file mode 100644
index 752feb8f69..0000000000
--- a/kubernetes/helm_charts/core/learner/values.j2
+++ /dev/null
@@ -1,72 +0,0 @@
-
-### Default variable file for learner-service ###
-
-namespace: {{ namespace }}
-imagepullsecrets: {{ imagepullsecrets }}
-dockerhub: {{ dockerhub }}
-
-env:
- javaoptions: {{learner_java_mem_limit|default('-Xmx600m')}}
-
-replicaCount: {{learner_replicacount|default(1)}}
-repository: {{learner_repository|default('learner_service')}}
-image_tag: {{ image_tag }}
-resources:
- requests:
- cpu: {{learner_cpu_req|default('100m')}}
- memory: {{learner_mem_req|default('100Mi')}}
- limits:
- cpu: {{learner_cpu_limit|default('1')}}
- memory: {{learner_mem_limit|default('1024Mi')}}
-network:
- port: 9000
- targetport: 9000
-strategy:
- type: RollingUpdate
- maxsurge: {{ learner_maxsurge|default('25%') }}
- maxunavailable: {{ learner_maxunavailable|default('25%') }}
-
-{{ learner_liveness_readiness | to_nice_yaml }}
-{{ opa_liveness_readiness | to_nice_yaml }}
-{{ envoy_liveness_readiness | to_nice_yaml }}
-
-learner_opa_enabled: {{ learner_opa_enabled | default('true') }}
-
-envoy_resources:
- requests:
- cpu: "{{ learner_envoy_cpu_req | default('100m') }}"
- memory: "{{ learner_envoy_mem_req | default('100Mi') }}"
- limits:
- cpu: "{{ learner_envoy_cpu_limit | default('1') }}"
- memory: "{{ learner_envoy_mem_limit | default('1024Mi') }}"
-
-opa_resources:
- requests:
- cpu: "{{ learner_opa_cpu_req | default('100m') }}"
- memory: "{{ learner_opa_mem_req | default('100Mi') }}"
- limits:
- cpu: "{{ learner_opa_cpu_limit | default('1') }}"
- memory: "{{ learner_opa_mem_limit | default('1024Mi') }}"
-
-initcontainer_resources:
- requests:
- cpu: "{{ learner_initcontainer_cpu_req | default('100m') }}"
- memory: "{{ learner_initcontainer_mem_req | default('100Mi') }}"
- limits:
- cpu: "{{ learner_initcontainer_cpu_limit | default('100m') }}"
- memory: "{{ learner_initcontainer_mem_limit | default('100Mi') }}"
-
-learner_access_basepath: {{ learner_access_basepath | default('/keys/') }}
-
-serviceMonitor:
- enabled: true
- labels: # labels with which the prometheus choose the serviceMonitor
- app: prometheus-operator
- release: prometheus-operator
-
-autoscaling:
- enabled: {{ learner_autoscaling_enabled | default('false') }}
- minReplicas: {{ learner_autoscaling_minReplicas|default(1) }}
- maxReplicas: {{ learner_autoscaling_maxReplicas|default(2) }}
- targetCPUUtilizationPercentage: {{ learner_autoscaling_targetCPUUtilizationPercentage|default(60) }}
- targetMemoryUtilizationPercentage: {{ learner_autoscaling_targetMemoryUtilizationPercentage|default('') }}
diff --git a/kubernetes/helm_charts/core/lms/templates/hpa.yaml b/kubernetes/helm_charts/core/lms/templates/hpa.yaml
index 1ba4f89a8b..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/lms/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/lms/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/ml-core-service/templates/hpa.yaml b/kubernetes/helm_charts/core/ml-core-service/templates/hpa.yaml
index 1ba4f89a8b..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/ml-core-service/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/ml-core-service/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/ml-projects-service/templates/hpa.yaml b/kubernetes/helm_charts/core/ml-projects-service/templates/hpa.yaml
index 1ba4f89a8b..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/ml-projects-service/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/ml-projects-service/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/ml-reports-service/templates/hpa.yaml b/kubernetes/helm_charts/core/ml-reports-service/templates/hpa.yaml
index 1ba4f89a8b..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/ml-reports-service/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/ml-reports-service/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/ml-survey-service/templates/hpa.yaml b/kubernetes/helm_charts/core/ml-survey-service/templates/hpa.yaml
index 1ba4f89a8b..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/ml-survey-service/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/ml-survey-service/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/nginx-private-ingress/templates/configmap.yaml b/kubernetes/helm_charts/core/nginx-private-ingress/templates/configmap.yaml
index 0dd8167be2..5b9fa2540e 100644
--- a/kubernetes/helm_charts/core/nginx-private-ingress/templates/configmap.yaml
+++ b/kubernetes/helm_charts/core/nginx-private-ingress/templates/configmap.yaml
@@ -39,13 +39,14 @@ data:
server {
listen 80;
listen [::]:80;
+{{- if and .Values.nginx_private_ingress_ip (ne .Values.csp "oci") }}
server_name {{ .Values.nginx_private_ingress_ip }};
-
+{{- end }}
resolver {{ .Values.kube_dns_ip }};
- location /learner/ {
- set $target http://learner-service.{{ .Values.namespace }}.svc.cluster.local:9000;
- rewrite ^/learner/(.*) /$1 break;
+ location /userorg/ {
+ set $target http://userorg-service.{{ .Values.namespace }}.svc.cluster.local:9000;
+ rewrite ^/userorg/(.*) /$1 break;
proxy_http_version 1.1;
proxy_pass $target;
}
@@ -125,7 +126,9 @@ data:
set $target http://report-service.{{ .Values.namespace }}.svc.cluster.local:3030;
rewrite ^/report/(.*) /$1 break;
proxy_http_version 1.1;
+{{- if and .Values.nginx_private_ingress_ip (ne .Values.csp "oci") }}
proxy_set_header Host $server_name;
+{{- end }}
proxy_pass $target;
}
location /search/ {
@@ -244,7 +247,9 @@ data:
set $target http://registry-service.{{ .Values.namespace }}.svc.cluster.local:8081;
rewrite ^/registry-service/(.*) /$1 break;
proxy_http_version 1.1;
+{{- if and .Values.nginx_private_ingress_ip (ne .Values.csp "oci") }}
proxy_set_header Host $server_name;
+{{- end }}
proxy_pass $target;
}
location /ml-projects/ {
diff --git a/kubernetes/helm_charts/core/nginx-private-ingress/templates/hpa.yaml b/kubernetes/helm_charts/core/nginx-private-ingress/templates/hpa.yaml
index 1ba4f89a8b..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/nginx-private-ingress/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/nginx-private-ingress/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/nginx-private-ingress/values.j2 b/kubernetes/helm_charts/core/nginx-private-ingress/values.j2
index c1c2491446..393476d491 100644
--- a/kubernetes/helm_charts/core/nginx-private-ingress/values.j2
+++ b/kubernetes/helm_charts/core/nginx-private-ingress/values.j2
@@ -38,3 +38,4 @@ autoscaling:
targetCPUUtilizationPercentage: {{ nginx_private_ingress_autoscaling_targetCPUUtilizationPercentage|default(60) }}
targetMemoryUtilizationPercentage: {{ nginx_private_ingress_autoscaling_targetMemoryUtilizationPercentage|default('') }}
+csp: {{cloud_service_provider}}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 b/kubernetes/helm_charts/core/nginx-public-ingress/values.j2
index c1331e76a5..8d5ce97115 100644
--- a/kubernetes/helm_charts/core/nginx-public-ingress/values.j2
+++ b/kubernetes/helm_charts/core/nginx-public-ingress/values.j2
@@ -184,7 +184,7 @@ proxyconfig: |-
proxy_pass http://keycloak;
}
# This is Caching mechanism for POST requests location search
- location ~ /learner/data/v1/location/search {
+ location ~ /userorg/data/v1/location/search {
# Enabling compression
include /etc/nginx/defaults.d/compression.conf;
# Enabling caching
@@ -511,7 +511,7 @@ proxyconfig: |-
set $bucket "{{upstream_url}}";
set $url_full '$1';
proxy_http_version 1.1;
- proxy_set_header Host "{{upstream_url.split('/')[0]|lower}}";
+ proxy_set_header Host "{{upstream_url.split('/')[2]|lower}}";
proxy_set_header Authorization '';
proxy_hide_header Access-Control-Allow-Origin;
proxy_hide_header Access-Control-Allow-Methods;
@@ -524,7 +524,7 @@ proxyconfig: |-
add_header Access-Control-Allow-Origin "*";
add_header Access-Control-Allow-Methods GET;
proxy_set_header X-Request-ID $sb_request_id;
- proxy_pass https://$bucket/$url_full;
+ proxy_pass $bucket/$url_full;
}
location ~* ^/content/preview/(.*) {
# Enabling compression
@@ -541,10 +541,10 @@ proxyconfig: |-
add_header Content-Type text/plain;
return 200;
}
- set $s3_bucket "{{plugin_upstream_url}}";
+ set $bucket "{{plugin_upstream_url}}";
set $url_full '$1';
proxy_http_version 1.1;
- proxy_set_header Host "{{plugin_upstream_url.split('/')[0]|lower}}";
+ proxy_set_header Host "{{plugin_upstream_url.split('/')[2]|lower}}";
proxy_set_header Authorization '';
proxy_hide_header Access-Control-Allow-Origin;
proxy_hide_header Access-Control-Allow-Methods;
@@ -557,7 +557,7 @@ proxyconfig: |-
add_header Access-Control-Allow-Origin "*" ;
add_header Access-Control-Allow-Methods GET;
proxy_set_header X-Request-ID $sb_request_id;
- proxy_pass https://$s3_bucket/v3/preview/$url_full;
+ proxy_pass $bucket/v3/preview/$url_full;
}
location ~ /content-editor/telemetry|collection-editor/telemetry {
rewrite ^/(.*) /$1 break;
@@ -588,10 +588,10 @@ proxyconfig: |-
add_header Content-Type text/plain;
return 200;
}
- set $s3_bucket "{{plugin_upstream_url}}";
+ set $bucket "{{plugin_upstream_url}}";
set $url_full '$1';
proxy_http_version 1.1;
- proxy_set_header Host "{{plugin_upstream_url.split('/')[0]|lower}}";
+ proxy_set_header Host "{{plugin_upstream_url.split('/')[2]|lower}}";
proxy_set_header Authorization '';
proxy_hide_header Access-Control-Allow-Origin;
proxy_hide_header Access-Control-Allow-Methods;
@@ -604,7 +604,7 @@ proxyconfig: |-
add_header Access-Control-Allow-Origin "*" ;
add_header Access-Control-Allow-Methods GET;
proxy_set_header X-Request-ID $sb_request_id;
- proxy_pass https://$s3_bucket/content-editor/$url_full;
+ proxy_pass $bucket/content-editor/$url_full;
}
location ~* ^/discussion-ui/(.*) {
# Enabling compression
@@ -612,10 +612,10 @@ proxyconfig: |-
gzip_min_length 100000;
gzip_proxied expired no-cache no-store private auth;
gzip_types application/javascript application/x-javascript text/css text/javascript;
- set $s3_bucket "{{discussion_upstream_url}}";
+ set $bucket "{{discussion_upstream_url}}";
set $url_full '$1';
proxy_http_version 1.1;
- proxy_set_header Host "{{discussion_upstream_url.split('/')[0]|lower}}";
+ proxy_set_header Host "{{discussion_upstream_url.split('/')[2]|lower}}";
proxy_set_header Authorization '';
proxy_hide_header Access-Control-Allow-Origin;
proxy_hide_header Access-Control-Allow-Methods;
@@ -628,7 +628,7 @@ proxyconfig: |-
add_header Access-Control-Allow-Origin "*" ;
add_header Access-Control-Allow-Methods GET;
proxy_set_header X-Request-ID $sb_request_id;
- proxy_pass https://$s3_bucket/discussion-ui/$url_full;
+ proxy_pass $bucket/discussion-ui/$url_full;
}
location ~* ^/collection-editor/(.*) {
# Enabling compression
@@ -645,10 +645,10 @@ proxyconfig: |-
add_header Content-Type text/plain;
return 200;
}
- set $s3_bucket "{{plugin_upstream_url}}";
+ set $bucket "{{plugin_upstream_url}}";
set $url_full '$1';
proxy_http_version 1.1;
- proxy_set_header Host "{{plugin_upstream_url.split('/')[0]|lower}}";
+ proxy_set_header Host "{{plugin_upstream_url.split('/')[2]|lower}}";
proxy_set_header Authorization '';
proxy_hide_header Access-Control-Allow-Origin;
proxy_hide_header Access-Control-Allow-Methods;
@@ -661,7 +661,7 @@ proxyconfig: |-
add_header Access-Control-Allow-Origin "*" ;
add_header Access-Control-Allow-Methods GET;
proxy_set_header X-Request-ID $sb_request_id;
- proxy_pass https://$s3_bucket/collection-editor/$url_full;
+ proxy_pass $bucket/collection-editor/$url_full;
}
location ~* ^/generic-editor/(.*) {
# Enabling compression
@@ -678,10 +678,10 @@ proxyconfig: |-
add_header Content-Type text/plain;
return 200;
}
- set $s3_bucket "{{plugin_upstream_url}}";
+ set $bucket "{{plugin_upstream_url}}";
set $url_full '$1';
proxy_http_version 1.1;
- proxy_set_header Host "{{plugin_upstream_url.split('/')[0]|lower}}";
+ proxy_set_header Host "{{plugin_upstream_url.split('/')[2]|lower}}";
proxy_set_header Authorization '';
proxy_hide_header Access-Control-Allow-Origin;
proxy_hide_header Access-Control-Allow-Methods;
@@ -694,7 +694,7 @@ proxyconfig: |-
add_header Access-Control-Allow-Origin "*" ;
add_header Access-Control-Allow-Methods GET;
proxy_set_header X-Request-ID $sb_request_id;
- proxy_pass https://$s3_bucket/generic-editor/$url_full;
+ proxy_pass $bucket/generic-editor/$url_full;
}
location ~* ^/content-plugins/(.*) {
# Enabling cache for Response code 200
@@ -715,10 +715,10 @@ proxyconfig: |-
add_header Content-Type text/plain;
return 200;
}
- set $s3_bucket "{{plugin_upstream_url}}";
+ set $bucket "{{plugin_upstream_url}}";
set $url_full '$1';
proxy_http_version 1.1;
- proxy_set_header Host "{{plugin_upstream_url.split('/')[0]|lower}}";
+ proxy_set_header Host "{{plugin_upstream_url.split('/')[2]|lower}}";
proxy_set_header Authorization '';
proxy_hide_header Access-Control-Allow-Origin;
proxy_hide_header Access-Control-Allow-Methods;
@@ -731,7 +731,7 @@ proxyconfig: |-
add_header Access-Control-Allow-Origin "*";
add_header Access-Control-Allow-Methods GET;
proxy_set_header X-Request-ID $sb_request_id;
- proxy_pass https://$s3_bucket/content-plugins/$url_full;
+ proxy_pass $bucket/content-plugins/$url_full;
}
location /thirdparty {
# Enabling cache for Response code 200
@@ -756,6 +756,43 @@ proxyconfig: |-
proxy_set_header X-Request-ID $sb_request_id;
proxy_pass http://player;
}
+ location ~* ^/.well-known/assetlinks.json {
+ # Enabling cache for Response code 200
+ expires 1M;
+ add_header Pragma public;
+ add_header Cache-Control "public";
+ # Enabling compression
+ gzip on;
+ gzip_min_length 100000;
+ gzip_proxied expired no-cache no-store private auth;
+ gzip_types application/javascript application/x-javascript text/css text/javascript;
+ if ($request_method = OPTIONS ) {
+ add_header Access-Control-Allow-Origin "*" ;
+ add_header Access-Control-Allow-Methods "GET, OPTIONS, PATCH, POST";
+ add_header Access-Control-Allow-Headers "Access-Control-Allow-Origin, Authorization, Content-Type, user-id";
+ # add_header Access-Control-Allow-Credentials "true";
+ add_header Content-Length 0;
+ add_header Content-Type text/plain;
+ return 200;
+ }
+ set $bucket "{{ mobile_deeplink_url }}";
+ set $url_full '$1';
+ proxy_http_version 1.1;
+ proxy_set_header Host "{{mobile_deeplink_url.split('/')[2]|lower}}";
+ proxy_set_header Authorization '';
+ proxy_hide_header Access-Control-Allow-Origin;
+ proxy_hide_header Access-Control-Allow-Methods;
+ proxy_hide_header x-amz-id-2;
+ proxy_hide_header x-amz-request-id;
+ proxy_hide_header Set-Cookie;
+ proxy_ignore_headers "Set-Cookie";
+ proxy_buffering off;
+ proxy_intercept_errors on;
+ add_header Access-Control-Allow-Origin "*";
+ add_header Access-Control-Allow-Methods GET;
+ proxy_set_header X-Request-ID $sb_request_id;
+ proxy_pass $bucket;
+ }
location ~* ^/desktop/(.*) {
# Enabling cache for Response code 200
expires 1M;
@@ -778,7 +815,7 @@ proxyconfig: |-
set $offline_bucket "{{ sunbird_offline_azure_storage_account_url }}";
set $url_full '$1';
proxy_http_version 1.1;
- proxy_set_header Host "{{sunbird_offline_azure_storage_account_url.split('/')[0]|lower}}";
+ proxy_set_header Host "{{sunbird_offline_azure_storage_account_url.split('/')[2]|lower}}";
proxy_set_header Authorization '';
proxy_hide_header Access-Control-Allow-Origin;
proxy_hide_header Access-Control-Allow-Methods;
@@ -791,7 +828,7 @@ proxyconfig: |-
add_header Access-Control-Allow-Origin "*";
add_header Access-Control-Allow-Methods GET;
proxy_set_header X-Request-ID $sb_request_id;
- proxy_pass https://$offline_bucket/$url_full;
+ proxy_pass $offline_bucket/$url_full;
}
# compression for svg certs download
location /api/certreg/v2/certs/download {
@@ -809,7 +846,7 @@ proxyconfig: |-
proxy_set_header X-Request-ID $sb_request_id;
proxy_pass http://kong;
}
- location /learner/certreg/v2/certs/download {
+ location /userorg/certreg/v2/certs/download {
# Compression
gzip on;
gzip_comp_level 5;
@@ -890,7 +927,7 @@ proxyconfig: |-
proxy_send_timeout 60;
proxy_read_timeout 70;
}
- location ~ /resourcebundles/v1/read|/learner/data/v1/(role/read|system/settings/get)|/v1/tenant/info {
+ location ~ /resourcebundles/v1/read|/userorg/data/v1/(role/read|system/settings/get)|/v1/tenant/info {
# Enabling compression
include /etc/nginx/defaults.d/compression.conf;
# Enabling caching
@@ -1074,10 +1111,6 @@ nginxconfig: |
server kong:8000;
keepalive 1000;
}
- upstream encryption {
- server enc-service:8013;
- keepalive 1000;
- }
upstream keycloak {
server {{ keycloak_url.split('//')[-1] }};
keepalive 1000;
@@ -1265,4 +1298,4 @@ serviceMonitor:
{# Add the apple site association json contents in a single line within single quotes as shown below in Core/common.yml #}
{# apple_app_site_association: '{"applinks":{"apps":[],"details":[{"appID":"123456.dev.sunbird.app","paths":["/explore","/dial/*","/get/dial","/play/content","/play/collection","/learn/course","/explore-course/course","/explore-course","/search","/search/Library","/faq","/profile","/play/quiz","/explore","/learn","/resources"]}]}}' #}
-apple_universal_links: '{{ apple_app_site_association | default("") }}'
\ No newline at end of file
+apple_universal_links: '{{ apple_app_site_association | default("") }}'
diff --git a/kubernetes/helm_charts/core/nodebb/templates/hpa.yaml b/kubernetes/helm_charts/core/nodebb/templates/hpa.yaml
index 1ba4f89a8b..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/nodebb/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/nodebb/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/notification/templates/hpa.yaml b/kubernetes/helm_charts/core/notification/templates/hpa.yaml
index 1ba4f89a8b..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/notification/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/notification/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/odk/templates/hpa.yaml b/kubernetes/helm_charts/core/odk/templates/hpa.yaml
index 0fef8ca0e7..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/odk/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/odk/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
- {{- end }}
\ No newline at end of file
+{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/orchestrator/templates/hpa.yaml b/kubernetes/helm_charts/core/orchestrator/templates/hpa.yaml
index 0fef8ca0e7..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/orchestrator/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/orchestrator/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
- {{- end }}
\ No newline at end of file
+{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/outbound/templates/hpa.yaml b/kubernetes/helm_charts/core/outbound/templates/hpa.yaml
index 0fef8ca0e7..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/outbound/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/outbound/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
- {{- end }}
\ No newline at end of file
+{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/player/templates/hpa.yaml b/kubernetes/helm_charts/core/player/templates/hpa.yaml
index 1ba4f89a8b..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/player/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/player/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/print/templates/hpa.yaml b/kubernetes/helm_charts/core/print/templates/hpa.yaml
index 1ba4f89a8b..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/print/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/print/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/report/templates/hpa.yaml b/kubernetes/helm_charts/core/report/templates/hpa.yaml
index 1ba4f89a8b..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/report/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/report/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/search/templates/hpa.yaml b/kubernetes/helm_charts/core/search/templates/hpa.yaml
index 1ba4f89a8b..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/search/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/search/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/taxonomy/templates/hpa.yaml b/kubernetes/helm_charts/core/taxonomy/templates/hpa.yaml
index 1ba4f89a8b..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/taxonomy/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/taxonomy/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/telemetry/templates/hpa.yaml b/kubernetes/helm_charts/core/telemetry/templates/hpa.yaml
index 1ba4f89a8b..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/telemetry/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/telemetry/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/transformer/templates/hpa.yaml b/kubernetes/helm_charts/core/transformer/templates/hpa.yaml
index 0fef8ca0e7..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/transformer/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/transformer/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
- {{- end }}
\ No newline at end of file
+{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/uci/templates/hpa.yaml b/kubernetes/helm_charts/core/uci/templates/hpa.yaml
index 0fef8ca0e7..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/uci/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/uci/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
- {{- end }}
\ No newline at end of file
+{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/learner/.helmignore b/kubernetes/helm_charts/core/userorg/.helmignore
similarity index 100%
rename from kubernetes/helm_charts/core/learner/.helmignore
rename to kubernetes/helm_charts/core/userorg/.helmignore
diff --git a/kubernetes/helm_charts/core/learner/templates/_helpers.tpl b/kubernetes/helm_charts/core/userorg/templates/_helpers.tpl
similarity index 83%
rename from kubernetes/helm_charts/core/learner/templates/_helpers.tpl
rename to kubernetes/helm_charts/core/userorg/templates/_helpers.tpl
index 420ba79439..d7fef3727e 100644
--- a/kubernetes/helm_charts/core/learner/templates/_helpers.tpl
+++ b/kubernetes/helm_charts/core/userorg/templates/_helpers.tpl
@@ -2,7 +2,7 @@
{{/*
Expand the name of the chart.
*/}}
-{{- define "learner.name" -}}
+{{- define "userorg.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
@@ -11,7 +11,7 @@ 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 "learner.fullname" -}}
+{{- define "userorg.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
@@ -27,16 +27,16 @@ If release name contains chart name it will be used as a full name.
{{/*
Create chart name and version as used by the chart label.
*/}}
-{{- define "learner.chart" -}}
+{{- define "userorg.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
-{{- define "learner.labels" -}}
-app.kubernetes.io/name: {{ include "learner.name" . }}
-helm.sh/chart: {{ include "learner.chart" . }}
+{{- define "userorg.labels" -}}
+app.kubernetes.io/name: {{ include "userorg.name" . }}
+helm.sh/chart: {{ include "userorg.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
diff --git a/kubernetes/helm_charts/core/userorg/templates/configmap.yaml b/kubernetes/helm_charts/core/userorg/templates/configmap.yaml
index 94fd443c77..d806c1d5ab 100644
--- a/kubernetes/helm_charts/core/userorg/templates/configmap.yaml
+++ b/kubernetes/helm_charts/core/userorg/templates/configmap.yaml
@@ -1,10 +1,25 @@
-#apiVersion: v1
-#data:
-# {{- range $key, $val := .Values.userorgenv }}
-# {{ $key }}: {{ $val }}
-# {{- end }}
-#kind: ConfigMap
-#metadata:
-# creationTimestamp: null
-# name: {{ .Chart.Name }}-config
-# namespace: {{ .Values.namespace }}
+---
+{{- $keys := .Files.Glob "keys/*" }}
+{{ if $keys }}
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ .Chart.Name }}-access-keys
+type: Opaque
+data:
+{{ (.Files.Glob "keys/*").AsSecrets | indent 2 }}
+{{ end }}
+
+---
+{{- if .Values.userorg_opa_enabled }}
+{{- $bundle := .Files.Glob "bundle/*" }}
+{{ if $bundle }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ .Chart.Name }}-opa-policy
+ namespace: {{ .Values.namespace }}
+binaryData:
+ bundle.tar.gz: {{ (.Files.Get "bundle/bundle.tar.gz") | b64enc }}
+{{ end }}
+{{ end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/userorg/templates/deployment.yaml b/kubernetes/helm_charts/core/userorg/templates/deployment.yaml
index d3f83edaf7..1ff7e4a69e 100644
--- a/kubernetes/helm_charts/core/userorg/templates/deployment.yaml
+++ b/kubernetes/helm_charts/core/userorg/templates/deployment.yaml
@@ -28,6 +28,11 @@ spec:
- name: {{ .Chart.Name }}
image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}"
imagePullPolicy: Always
+ env:
+ - name: JAVA_OPTIONS
+ value: {{ .Values.env.javaoptions | quote }}
+ - name: _JAVA_OPTIONS
+ value: -Dlog4j2.formatMsgNoLookups=true
envFrom:
- configMapRef:
name: {{ .Chart.Name }}-config
@@ -41,12 +46,108 @@ spec:
readinessProbe:
{{ toYaml .Values.readinessProbe | indent 10 }}
{{- end }}
-
+ volumeMounts:
+ - name: {{ .Chart.Name }}-xml-config
+ mountPath: /home/sunbird/userorg-service-1.0-SNAPSHOT/config/logback.xml
+ subPath: userorg-service_logback.xml
+{{- $keys := .Files.Glob "keys/*" }}
+{{- if $keys }}
+ - mountPath: {{ .Values.userorg_access_basepath }}
+ name: access-keys
+{{- end }}
+{{- if .Values.userorg_opa_enabled }}
+ - args:
+ - envoy
+ - --config-path
+ - /config/envoy-config.yaml
+ env:
+ - name: ENVOY_UID
+ value: "1111"
+ image: envoyproxy/envoy:v1.20.0
+ imagePullPolicy: IfNotPresent
+ name: envoy
+ {{- if .Values.envoy_healthcheck }}
+ livenessProbe:
+{{ toYaml .Values.envoy_livenessProbe | indent 10 }}
+ readinessProbe:
+{{ toYaml .Values.envoy_readinessProbe | indent 10 }}
+ {{- end }}
+ resources:
+{{ toYaml .Values.envoy_resources | indent 10 }}
+ volumeMounts:
+ - mountPath: /config
+ name: envoy-config
+ readOnly: true
+ - args:
+ - run
+ - --server
+ - /bundle
+ - --addr=localhost:8181
+ - --diagnostic-addr=0.0.0.0:8282
+ - --set=plugins.envoy_ext_authz_grpc.addr=:9191
+ - --set=plugins.envoy_ext_authz_grpc.path=main/allow
+ - --set=decision_logs.plugin=print_decision_logs_on_failure
+ - --set=plugins.print_decision_logs_on_failure.stdout=true
+ - --log-level=error
+ - --ignore=.*
+ image: sunbird/opa:0.34.2-envoy
+ imagePullPolicy: IfNotPresent
+ name: opa
+ {{- if .Values.opa_healthcheck }}
+ livenessProbe:
+{{ toYaml .Values.opa_livenessProbe | indent 10 }}
+ readinessProbe:
+{{ toYaml .Values.opa_readinessProbe | indent 10 }}
+ {{- end }}
+ resources:
+{{ toYaml .Values.opa_resources | indent 10 }}
+ volumeMounts:
+ - mountPath: /bundle
+ name: opa-policy
+ readOnly: true
+ initContainers:
+ - args:
+ - -p
+ - "9999"
+ - -u
+ - "1111"
+ - -w
+ - "8282,10000"
+ image: openpolicyagent/proxy_init:v5
+ imagePullPolicy: IfNotPresent
+ name: proxy-init
+ resources:
+{{ toYaml .Values.initcontainer_resources | indent 10 }}
+ securityContext:
+ capabilities:
+ add:
+ - NET_ADMIN
+ runAsNonRoot: false
+ runAsUser: 0
+{{- end }}
+ volumes:
+ - name: {{ .Chart.Name }}-xml-config
+ configMap:
+ name: {{ .Chart.Name }}-xml-config
+{{- $keys := .Files.Glob "keys/*" }}
+{{- if $keys }}
+ - name: access-keys
+ secret:
+ secretName: {{ .Chart.Name }}-access-keys
+{{- end }}
+{{- if .Values.userorg_opa_enabled }}
+ - name: envoy-config
+ configMap:
+ name: {{ .Chart.Name }}-envoy-config
+ - name: opa-policy
+ configMap:
+ name: {{ .Chart.Name }}-opa-policy
+{{- end }}
---
apiVersion: v1
kind: Service
metadata:
- name: user-org-service
+ name: {{ .Chart.Name }}-service
namespace: {{ .Values.namespace }}
labels:
app: {{ .Chart.Name }}
@@ -55,5 +156,15 @@ spec:
- name: http-{{ .Chart.Name }}
protocol: TCP
port: {{ .Values.network.targetport }}
+{{- if .Values.userorg_opa_enabled }}
+ - name: opa-metrics
+ port: 8181
+ protocol: TCP
+ targetPort: 8181
+ - name: envoy-metrics
+ port: 10000
+ protocol: TCP
+ targetPort: 10000
+{{- end }}
selector:
app: {{ .Chart.Name }}
diff --git a/kubernetes/helm_charts/core/learner/templates/envoy-config.yaml b/kubernetes/helm_charts/core/userorg/templates/envoy-config.yaml
similarity index 99%
rename from kubernetes/helm_charts/core/learner/templates/envoy-config.yaml
rename to kubernetes/helm_charts/core/userorg/templates/envoy-config.yaml
index 3fc1bfc45a..0465d1653d 100644
--- a/kubernetes/helm_charts/core/learner/templates/envoy-config.yaml
+++ b/kubernetes/helm_charts/core/userorg/templates/envoy-config.yaml
@@ -1,5 +1,5 @@
---
-{{- if .Values.learner_opa_enabled }}
+{{- if .Values.userorg_opa_enabled }}
apiVersion: v1
data:
envoy-config.yaml: |
diff --git a/kubernetes/helm_charts/core/userorg/templates/hpa.yaml b/kubernetes/helm_charts/core/userorg/templates/hpa.yaml
index 1ba4f89a8b..fd75ba3280 100644
--- a/kubernetes/helm_charts/core/userorg/templates/hpa.yaml
+++ b/kubernetes/helm_charts/core/userorg/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/core/learner/templates/serviceMonitor.yaml b/kubernetes/helm_charts/core/userorg/templates/serviceMonitor.yaml
similarity index 95%
rename from kubernetes/helm_charts/core/learner/templates/serviceMonitor.yaml
rename to kubernetes/helm_charts/core/userorg/templates/serviceMonitor.yaml
index 5d659175ce..d54263a5bf 100644
--- a/kubernetes/helm_charts/core/learner/templates/serviceMonitor.yaml
+++ b/kubernetes/helm_charts/core/userorg/templates/serviceMonitor.yaml
@@ -1,4 +1,4 @@
-{{- if .Values.learner_opa_enabled }}
+{{- if .Values.userorg_opa_enabled }}
{{- if .Values.serviceMonitor.enabled }}
{{- if and ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) ( .Values.serviceMonitor.enabled ) }}
apiVersion: monitoring.coreos.com/v1
diff --git a/kubernetes/helm_charts/core/userorg/values.j2 b/kubernetes/helm_charts/core/userorg/values.j2
index 2b0a36cc24..a0f25da4e4 100644
--- a/kubernetes/helm_charts/core/userorg/values.j2
+++ b/kubernetes/helm_charts/core/userorg/values.j2
@@ -1,11 +1,15 @@
+
### Default variable file for userorg-service ###
namespace: {{ namespace }}
imagepullsecrets: {{ imagepullsecrets }}
dockerhub: {{ dockerhub }}
+env:
+ javaoptions: {{userorg_java_mem_limit|default('-Xmx600m')}}
+
replicaCount: {{userorg_replicacount|default(1)}}
-repository: {{userorg_repository|default('user_org_service')}}
+repository: {{userorg_repository|default('userorg-service')}}
image_tag: {{ image_tag }}
resources:
requests:
@@ -15,7 +19,7 @@ resources:
cpu: {{userorg_cpu_limit|default('1')}}
memory: {{userorg_mem_limit|default('1024Mi')}}
network:
- port: 9008
+ port: 9000
targetport: 9000
strategy:
type: RollingUpdate
@@ -23,10 +27,46 @@ strategy:
maxunavailable: {{ userorg_maxunavailable|default('25%') }}
{{ userorg_liveness_readiness | to_nice_yaml }}
+{{ opa_liveness_readiness | to_nice_yaml }}
+{{ envoy_liveness_readiness | to_nice_yaml }}
+
+userorg_opa_enabled: {{ userorg_opa_enabled | default('true') }}
+
+envoy_resources:
+ requests:
+ cpu: "{{ userorg_envoy_cpu_req | default('100m') }}"
+ memory: "{{ userorg_envoy_mem_req | default('100Mi') }}"
+ limits:
+ cpu: "{{ userorg_envoy_cpu_limit | default('1') }}"
+ memory: "{{ userorg_envoy_mem_limit | default('1024Mi') }}"
+
+opa_resources:
+ requests:
+ cpu: "{{ userorg_opa_cpu_req | default('100m') }}"
+ memory: "{{ userorg_opa_mem_req | default('100Mi') }}"
+ limits:
+ cpu: "{{ userorg_opa_cpu_limit | default('1') }}"
+ memory: "{{ userorg_opa_mem_limit | default('1024Mi') }}"
+
+initcontainer_resources:
+ requests:
+ cpu: "{{ userorg_initcontainer_cpu_req | default('100m') }}"
+ memory: "{{ userorg_initcontainer_mem_req | default('100Mi') }}"
+ limits:
+ cpu: "{{ userorg_initcontainer_cpu_limit | default('100m') }}"
+ memory: "{{ userorg_initcontainer_mem_limit | default('100Mi') }}"
+
+userorg_access_basepath: {{ userorg_access_basepath | default('/keys/') }}
+
+serviceMonitor:
+ enabled: true
+ labels: # labels with which the prometheus choose the serviceMonitor
+ app: prometheus-operator
+ release: prometheus-operator
autoscaling:
enabled: {{ userorg_autoscaling_enabled | default('false') }}
minReplicas: {{ userorg_autoscaling_minReplicas|default(1) }}
maxReplicas: {{ userorg_autoscaling_maxReplicas|default(2) }}
targetCPUUtilizationPercentage: {{ userorg_autoscaling_targetCPUUtilizationPercentage|default(60) }}
- targetMemoryUtilizationPercentage: {{ userorg_autoscaling_targetMemoryUtilizationPercentage|default('') }}
\ No newline at end of file
+ targetMemoryUtilizationPercentage: {{ userorg_autoscaling_targetMemoryUtilizationPercentage|default('') }}
diff --git a/kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/autoscale.yaml b/kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/autoscale.yaml
index 2455ac3450..80f8b03711 100755
--- a/kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/autoscale.yaml
+++ b/kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/autoscale.yaml
@@ -1,7 +1,7 @@
{{- range $key, $spec := .Values }}
{{- if ne $key "enabled" }}
{{- if and $spec.enabled $spec.autoscaleEnabled $spec.autoscaleMin $spec.autoscaleMax }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ $key }}
diff --git a/kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/autoscale.yaml b/kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/autoscale.yaml
index 377b47d033..bf000b678d 100755
--- a/kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/autoscale.yaml
+++ b/kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/autoscale.yaml
@@ -1,7 +1,7 @@
{{- range $key, $spec := .Values }}
{{- if or (eq $key "policy") (eq $key "telemetry") }}
{{- if and $spec.enabled $spec.autoscaleEnabled $spec.autoscaleMin $spec.autoscaleMax }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: istio-{{ $key }}
diff --git a/kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/autoscale.yaml b/kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/autoscale.yaml
index 1a9945136a..8d1c109380 100755
--- a/kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/autoscale.yaml
+++ b/kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/autoscale.yaml
@@ -1,5 +1,5 @@
{{- if and .Values.autoscaleEnabled .Values.autoscaleMin .Values.autoscaleMax }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: istio-pilot
diff --git a/kubernetes/helm_charts/logging/fluent-bit/templates/serviceaccount.yaml b/kubernetes/helm_charts/logging/fluent-bit/templates/serviceaccount.yaml
index f162d2bc28..83329448f6 100644
--- a/kubernetes/helm_charts/logging/fluent-bit/templates/serviceaccount.yaml
+++ b/kubernetes/helm_charts/logging/fluent-bit/templates/serviceaccount.yaml
@@ -4,7 +4,11 @@ metadata:
name: fluent-bit
namespace: {{ default .Values.namespace .Release.Namespace }}
---
+{{- if (.Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1") }}
+apiVersion: rbac.authorization.k8s.io/v1
+{{ else }}
apiVersion: rbac.authorization.k8s.io/v1beta1
+{{- end }}
kind: ClusterRole
metadata:
name: fluent-bit-read
@@ -15,7 +19,11 @@ rules:
- pods
verbs: ["get", "list", "watch"]
---
+{{- if (.Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1") }}
+apiVersion: rbac.authorization.k8s.io/v1
+{{ else }}
apiVersion: rbac.authorization.k8s.io/v1beta1
+{{- end }}
kind: ClusterRoleBinding
metadata:
name: fluent-bit-read
diff --git a/kubernetes/helm_charts/monitoring/alertrules/templates/custom_promrules_k8s.yml b/kubernetes/helm_charts/monitoring/alertrules/templates/custom_promrules_k8s.yml
index 9ac3fabd67..f6eaf4fd01 100644
--- a/kubernetes/helm_charts/monitoring/alertrules/templates/custom_promrules_k8s.yml
+++ b/kubernetes/helm_charts/monitoring/alertrules/templates/custom_promrules_k8s.yml
@@ -15,7 +15,7 @@ spec:
- alert: TargetDown
annotations:
message: '{{`{{`}} printf "%.4g" $value {{`}}`}}% of the {{`{{`}} $labels.job {{`}}`}}/{{`{{`}} $labels.service {{`}}`}} targets in {{`{{`}} $labels.namespace {{`}}`}} namespace are down.'
- expr: 100 * (count(up == 0) BY (job, namespace, service) / count(up) BY (job, namespace, service)) > 10
+ expr: 100 * (count(up == 0) BY (namespace, service) / count(up) BY (namespace, service)) > 10
for: 10m
labels:
severity: critical
diff --git a/kubernetes/helm_charts/monitoring/alertrules/templates/promrulesNode.yml b/kubernetes/helm_charts/monitoring/alertrules/templates/promrulesNode.yml
index d36e7d6823..ae52b2aa1b 100644
--- a/kubernetes/helm_charts/monitoring/alertrules/templates/promrulesNode.yml
+++ b/kubernetes/helm_charts/monitoring/alertrules/templates/promrulesNode.yml
@@ -85,12 +85,12 @@ spec:
message: {{`'{{ $labels.nodename }} ({{ $labels.host }}) has a high load average. Load average is {{ $value }}%.'`}}
summary: {{`'HIGH LOAD AVERAGE warning ON {{ $labels.nodename }}'`}}
- alert: node_exporter_down_critical
- expr: up == 0
+ expr: up{job="vm-node-exporter"} == 0
for: 1m
labels:
severity: critical
annotations:
- message: {{`The node exporter '{{ $labels.job }}' is down.`}}
+ message: {{`'The node exporter {{ $labels.job }} is down.'`}}
summary: {{`'NODE EXPORTER SERVICE critical: NODE ''{{ $labels.host }}'''`}}
- alert: node_running_out_of_disk_space_warning
expr: sum by(nodename) (((node_filesystem_size_bytes{mountpoint="/"} - node_filesystem_free_bytes{mountpoint="/"}) * 100 / node_filesystem_size_bytes{mountpoint="/"} * on(instance) group_left(nodename) node_uname_info) >= {{ .Values.node_disk_usage_percentage_threshold_Warning }} and ((node_filesystem_size_bytes{mountpoint="/"} - node_filesystem_free_bytes{mountpoint="/"}) * 100 / node_filesystem_size_bytes{mountpoint="/"} * on(instance) group_left(nodename) node_uname_info) < {{ .Values.node_disk_usage_percentage_threshold_Critical }} )
diff --git a/kubernetes/helm_charts/monitoring/blackbox-exporter/templates/poddisruptionbudget.yaml b/kubernetes/helm_charts/monitoring/blackbox-exporter/templates/poddisruptionbudget.yaml
index 8d54718ed0..1d9644fd6b 100755
--- a/kubernetes/helm_charts/monitoring/blackbox-exporter/templates/poddisruptionbudget.yaml
+++ b/kubernetes/helm_charts/monitoring/blackbox-exporter/templates/poddisruptionbudget.yaml
@@ -1,4 +1,4 @@
-apiVersion: policy/v1beta1
+apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ template "prometheus-blackbox-exporter.fullname" . }}
diff --git a/kubernetes/helm_charts/monitoring/dashboards/dashboards/ed_infra_status.json b/kubernetes/helm_charts/monitoring/dashboards/dashboards/ed_infra_status.json
new file mode 100644
index 0000000000..09b9199cac
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/dashboards/dashboards/ed_infra_status.json
@@ -0,0 +1,990 @@
+{
+ "annotations": {
+ "list": [
+ {
+ "builtIn": 1,
+ "datasource": {
+ "type": "datasource",
+ "uid": "grafana"
+ },
+ "enable": true,
+ "hide": true,
+ "iconColor": "rgba(0, 211, 255, 1)",
+ "name": "Annotations & Alerts",
+ "type": "dashboard"
+ }
+ ]
+ },
+ "editable": true,
+ "gnetId": null,
+ "graphTooltip": 0,
+ "id": 64,
+ "iteration": 1716177526650,
+ "links": [
+ {
+ "$$hashKey": "object:116",
+ "icon": "dashboard",
+ "includeVars": true,
+ "tags": [],
+ "title": "",
+ "type": "link",
+ "url": "https://staging.sunbirded.org/grafana/d/QNgevzV7k/health?orgId=1&refresh=1m&from=1714381645257&to=1714381945258"
+ },
+ {
+ "$$hashKey": "object:105",
+ "icon": "external link",
+ "tags": [
+ "http://11.3.16.225/grafana/d/85a562078cdf77779eaa1add43ccec1e/kubernetes-compute-resources-namespace-pods?orgId=1&refresh=10s&var-datasource=Prometheus&var-cluster=&var-namespace=staging&from=1714378436868&to=1714382036868&viewPanel=5"
+ ],
+ "type": "dashboards"
+ }
+ ],
+ "panels": [
+ {
+ "datasource": "Prometheus",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "custom": {
+ "align": "auto",
+ "cellOptions": {
+ "type": "color-background"
+ },
+ "filterable": false,
+ "inspect": false
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "red",
+ "value": null
+ }
+ ]
+ }
+ },
+ "overrides": [
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "job_name"
+ },
+ "properties": [
+ {
+ "id": "custom.displayMode",
+ "value": "color-background"
+ },
+ {
+ "id": "thresholds",
+ "value": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "dark-red",
+ "value": null
+ }
+ ]
+ }
+ }
+ ]
+ },
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "deployment"
+ },
+ "properties": [
+ {
+ "id": "custom.displayMode",
+ "value": "color-background"
+ },
+ {
+ "id": "thresholds",
+ "value": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "dark-red",
+ "value": null
+ }
+ ]
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "gridPos": {
+ "h": 10,
+ "w": 8,
+ "x": 0,
+ "y": 0
+ },
+ "id": 14,
+ "options": {
+ "cellHeight": "sm",
+ "footer": {
+ "countRows": false,
+ "fields": "",
+ "reducer": [
+ "sum"
+ ],
+ "show": false
+ },
+ "frameIndex": 1,
+ "showHeader": false
+ },
+ "pluginVersion": "7.0.6",
+ "targets": [
+ {
+ "expr": "kube_deployment_status_replicas{namespace=\"$namespace\"} == 0 or kube_job_status_active{namespace=~\"$namespace\"} == 0\n",
+ "format": "table",
+ "instant": true,
+ "interval": "",
+ "legendFormat": "",
+ "refId": "A"
+ }
+ ],
+ "timeFrom": null,
+ "timeShift": null,
+ "title": "Pods DOWN",
+ "transformations": [
+ {
+ "id": "organize",
+ "options": {
+ "excludeByName": {
+ "Time": true,
+ "Value": true,
+ "__name__": true,
+ "container": true,
+ "endpoint": true,
+ "instance": true,
+ "job": true,
+ "namespace": true,
+ "pod": true,
+ "service": true
+ },
+ "indexByName": {},
+ "renameByName": {}
+ }
+ }
+ ],
+ "type": "table"
+ },
+ {
+ "datasource": "Prometheus",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "custom": {
+ "align": "center",
+ "cellOptions": {
+ "type": "auto"
+ },
+ "filterable": false,
+ "inspect": false
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "green",
+ "value": 1
+ }
+ ]
+ }
+ },
+ "overrides": [
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "service"
+ },
+ "properties": [
+ {
+ "id": "custom.cellOptions",
+ "value": {
+ "mode": "gradient",
+ "type": "color-background"
+ }
+ },
+ {
+ "id": "custom.displayMode",
+ "value": "color-background"
+ },
+ {
+ "id": "thresholds",
+ "value": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "green",
+ "value": 1
+ }
+ ]
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "gridPos": {
+ "h": 10,
+ "w": 13,
+ "x": 8,
+ "y": 0
+ },
+ "id": 9,
+ "options": {
+ "cellHeight": "sm",
+ "footer": {
+ "countRows": false,
+ "fields": "",
+ "reducer": [
+ "sum"
+ ],
+ "show": false
+ },
+ "showHeader": false,
+ "sortBy": [
+ {
+ "desc": false,
+ "displayName": "Value"
+ }
+ ]
+ },
+ "pluginVersion": "7.0.6",
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "prometheus"
+ },
+ "exemplar": true,
+ "expr": "probe_success == 0",
+ "format": "table",
+ "instant": true,
+ "interval": "",
+ "legendFormat": "",
+ "refId": "A"
+ }
+ ],
+ "title": "VMs Down",
+ "transformations": [
+ {
+ "id": "organize",
+ "options": {
+ "excludeByName": {
+ "Time": true,
+ "Value": true,
+ "__name__": true,
+ "endpoint": true,
+ "instance": true,
+ "job": true,
+ "namespace": true
+ },
+ "indexByName": {},
+ "renameByName": {
+ "Value": ""
+ }
+ }
+ }
+ ],
+ "type": "table"
+ },
+ {
+ "datasource": "Prometheus",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "custom": {
+ "align": "auto",
+ "cellOptions": {
+ "type": "auto"
+ },
+ "filterable": false,
+ "inspect": false
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "semi-dark-red",
+ "value": 0
+ },
+ {
+ "color": "green",
+ "value": 1
+ }
+ ]
+ }
+ },
+ "overrides": [
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "deployment"
+ },
+ "properties": [
+ {
+ "id": "custom.cellOptions",
+ "value": {
+ "mode": "gradient",
+ "type": "color-background"
+ }
+ },
+ {
+ "id": "custom.displayMode",
+ "value": "color-background"
+ },
+ {
+ "id": "thresholds",
+ "value": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "gridPos": {
+ "h": 22,
+ "w": 9,
+ "x": 0,
+ "y": 10
+ },
+ "id": 3,
+ "options": {
+ "cellHeight": "sm",
+ "footer": {
+ "countRows": false,
+ "fields": "",
+ "reducer": [
+ "sum"
+ ],
+ "show": false
+ },
+ "showHeader": false
+ },
+ "pluginVersion": "7.0.6",
+ "targets": [
+ {
+ "$$hashKey": "object:33",
+ "aggregation": "Last",
+ "crit": 0,
+ "datasource": {
+ "type": "prometheus",
+ "uid": "prometheus"
+ },
+ "decimals": 1,
+ "displayAliasType": "Warning / Critical",
+ "displayType": "Regular",
+ "displayValueWithAlias": "Never",
+ "editorMode": "code",
+ "exemplar": false,
+ "expr": "kube_deployment_status_replicas{namespace=\"$namespace\"} !=0",
+ "format": "table",
+ "instant": true,
+ "interval": "",
+ "legendFormat": "__auto",
+ "range": false,
+ "refId": "A",
+ "units": "none",
+ "valueHandler": "Number Threshold",
+ "warn": 2
+ }
+ ],
+ "title": "Pods UP",
+ "transformations": [
+ {
+ "id": "organize",
+ "options": {
+ "excludeByName": {
+ "Time": true,
+ "Value": true,
+ "__name__": true,
+ "container": true,
+ "endpoint": true,
+ "instance": true,
+ "job": true,
+ "namespace": true,
+ "pod": true,
+ "service": true
+ },
+ "indexByName": {},
+ "renameByName": {}
+ }
+ }
+ ],
+ "type": "table"
+ },
+ {
+ "datasource": "Prometheus",
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "custom": {
+ "align": "center",
+ "cellOptions": {
+ "type": "auto"
+ },
+ "filterable": false,
+ "inspect": false
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "green",
+ "value": 1
+ }
+ ]
+ }
+ },
+ "overrides": [
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "service"
+ },
+ "properties": [
+ {
+ "id": "custom.cellOptions",
+ "value": {
+ "mode": "gradient",
+ "type": "color-background"
+ }
+ },
+ {
+ "id": "custom.displayMode",
+ "value": "color-background"
+ },
+ {
+ "id": "thresholds",
+ "value": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "green",
+ "value": 1
+ }
+ ]
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "gridPos": {
+ "h": 14,
+ "w": 13,
+ "x": 9,
+ "y": 10
+ },
+ "id": 19,
+ "options": {
+ "cellHeight": "sm",
+ "footer": {
+ "countRows": false,
+ "fields": "",
+ "reducer": [
+ "sum"
+ ],
+ "show": false
+ },
+ "showHeader": false,
+ "sortBy": [
+ {
+ "desc": false,
+ "displayName": "Value"
+ }
+ ]
+ },
+ "pluginVersion": "7.0.6",
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "prometheus"
+ },
+ "exemplar": true,
+ "expr": "probe_success == 1",
+ "format": "table",
+ "instant": true,
+ "interval": "",
+ "legendFormat": "",
+ "refId": "A"
+ }
+ ],
+ "title": "VMs UP",
+ "transformations": [
+ {
+ "id": "organize",
+ "options": {
+ "excludeByName": {
+ "Time": true,
+ "Value": true,
+ "__name__": true,
+ "endpoint": true,
+ "instance": true,
+ "job": true,
+ "namespace": true
+ },
+ "indexByName": {},
+ "renameByName": {
+ "Value": ""
+ }
+ }
+ }
+ ],
+ "type": "table"
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "Prometheus",
+ "fieldConfig": {
+ "defaults": {
+ "custom": {
+ "align": null
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "fill": 10,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 7,
+ "w": 24,
+ "x": 0,
+ "y": 32
+ },
+ "hiddenSeries": false,
+ "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",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pluginVersion": "7.0.6",
+ "pointradius": 5,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [
+ {
+ "$$hashKey": "object:463",
+ "alias": "quota - requests",
+ "color": "#F2495C",
+ "dashes": true,
+ "fill": 0,
+ "hiddenSeries": true,
+ "hideTooltip": true,
+ "legend": true,
+ "linewidth": 2,
+ "stack": false
+ },
+ {
+ "$$hashKey": "object:464",
+ "alias": "quota - limits",
+ "color": "#FF9830",
+ "dashes": true,
+ "fill": 0,
+ "hiddenSeries": true,
+ "hideTooltip": true,
+ "legend": true,
+ "linewidth": 2,
+ "stack": false
+ }
+ ],
+ "spaceLength": 10,
+ "stack": true,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)",
+ "format": "time_series",
+ "intervalFactor": 2,
+ "legendFormat": "{{pod}}",
+ "legendLink": null,
+ "refId": "A"
+ },
+ {
+ "expr": "scalar(kube_resourcequota{cluster=\"$cluster\", namespace=\"$namespace\", type=\"hard\",resource=\"requests.cpu\"})",
+ "format": "time_series",
+ "intervalFactor": 2,
+ "legendFormat": "quota - requests",
+ "legendLink": null,
+ "refId": "B"
+ },
+ {
+ "expr": "scalar(kube_resourcequota{cluster=\"$cluster\", namespace=\"$namespace\", type=\"hard\",resource=\"limits.cpu\"})",
+ "format": "time_series",
+ "intervalFactor": 2,
+ "legendFormat": "quota - limits",
+ "legendLink": null,
+ "refId": "C"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "POD 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
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "$datasource",
+ "decimals": 2,
+ "fieldConfig": {
+ "defaults": {
+ "custom": {
+ "align": null
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ }
+ },
+ "overrides": []
+ },
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 8,
+ "w": 24,
+ "x": 0,
+ "y": 39
+ },
+ "hiddenSeries": false,
+ "id": 18,
+ "legend": {
+ "alignAsTable": true,
+ "avg": true,
+ "current": true,
+ "max": true,
+ "min": false,
+ "rightSide": true,
+ "show": true,
+ "sort": "current",
+ "sortDesc": true,
+ "total": false,
+ "values": true
+ },
+ "lines": true,
+ "linewidth": 1,
+ "links": [],
+ "nullPointMode": "null",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pluginVersion": "7.0.6",
+ "pointradius": 5,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "expr": "(node_load1) * on (instance) group_left(nodename) node_uname_info{job=~\".*node-exporter\", nodename=~\"$nodename\"}",
+ "format": "time_series",
+ "hide": false,
+ "interval": "",
+ "intervalFactor": 2,
+ "legendFormat": "{{nodename}}",
+ "refId": "B",
+ "step": 2
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Load avg on VM's",
+ "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
+ }
+ }
+ ],
+ "refresh": "5s",
+ "schemaVersion": 25,
+ "style": "dark",
+ "tags": [],
+ "templating": {
+ "list": [
+ {
+ "current": {
+ "selected": false,
+ "text": "Prometheus",
+ "value": "Prometheus"
+ },
+ "hide": 0,
+ "includeAll": false,
+ "label": "",
+ "multi": false,
+ "name": "datasource",
+ "options": [],
+ "query": "prometheus",
+ "queryValue": "",
+ "refresh": 1,
+ "regex": "",
+ "skipUrlSync": false,
+ "type": "datasource"
+ },
+ {
+ "allValue": null,
+ "current": {
+ "isNone": true,
+ "selected": false,
+ "text": "None",
+ "value": ""
+ },
+ "datasource": "$datasource",
+ "definition": "label_values(up{job=\"kube-state-metrics\"}, cluster)",
+ "hide": 2,
+ "includeAll": false,
+ "label": null,
+ "multi": false,
+ "name": "cluster",
+ "options": [],
+ "query": "label_values(up{job=\"kube-state-metrics\"}, cluster)",
+ "refresh": 2,
+ "regex": "",
+ "skipUrlSync": false,
+ "sort": 1,
+ "tagValuesQuery": "",
+ "tags": [],
+ "tagsQuery": "",
+ "type": "query",
+ "useTags": false
+ },
+ {
+ "allValue": null,
+ "current": {
+ "selected": false,
+ "text": "flink-kp-staging",
+ "value": "flink-kp-staging"
+ },
+ "datasource": "Prometheus",
+ "definition": "label_values(kube_namespace_status_phase{job=\"kube-state-metrics\", cluster=\"$cluster\"}, namespace)",
+ "hide": 0,
+ "includeAll": false,
+ "label": null,
+ "multi": false,
+ "name": "namespace",
+ "options": [],
+ "query": "label_values(kube_namespace_status_phase{job=\"kube-state-metrics\", cluster=\"$cluster\"}, namespace)",
+ "refresh": 1,
+ "regex": "",
+ "skipUrlSync": false,
+ "sort": 0,
+ "tagValuesQuery": "",
+ "tags": [],
+ "tagsQuery": "",
+ "type": "query",
+ "useTags": false
+ },
+ {
+ "allValue": null,
+ "current": {
+ "selected": true,
+ "tags": [],
+ "text": "All",
+ "value": [
+ "$__all"
+ ]
+ },
+ "datasource": "Prometheus",
+ "definition": "label_values(node_uname_info{job=~\".*node-exporter\"},nodename)",
+ "hide": 0,
+ "includeAll": true,
+ "label": null,
+ "multi": true,
+ "name": "nodename",
+ "options": [],
+ "query": "label_values(node_uname_info{job=~\".*node-exporter\"},nodename)",
+ "refresh": 1,
+ "regex": "",
+ "skipUrlSync": false,
+ "sort": 0,
+ "tagValuesQuery": "",
+ "tags": [],
+ "tagsQuery": "",
+ "type": "query",
+ "useTags": false
+ }
+ ]
+ },
+ "time": {
+ "from": "now-5m",
+ "to": "now"
+ },
+ "timepicker": {
+ "refresh_intervals": [
+ "10s",
+ "30s",
+ "1m",
+ "5m",
+ "15m",
+ "30m",
+ "1h",
+ "2h",
+ "1d"
+ ]
+ },
+ "timezone": "",
+ "title": "ED Infra Status",
+ "uid": "gMMvJZPSk",
+ "version": 5
+}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/dashboards/dashboards/service-memory.json b/kubernetes/helm_charts/monitoring/dashboards/dashboards/service-memory.json
index 2b046edb2c..aa9bf99675 100644
--- a/kubernetes/helm_charts/monitoring/dashboards/dashboards/service-memory.json
+++ b/kubernetes/helm_charts/monitoring/dashboards/dashboards/service-memory.json
@@ -225,7 +225,7 @@
"steppedLine": false,
"targets": [
{
- "expr": "max(container_memory_usage_bytes{container_label_com_docker_swarm_service_name=~\"learner-service\"})",
+ "expr": "max(container_memory_usage_bytes{container_label_com_docker_swarm_service_name=~\"userorg-service\"})",
"format": "time_series",
"intervalFactor": 2,
"refId": "A",
@@ -236,7 +236,7 @@
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
- "title": "learner-service",
+ "title": "userorg-service",
"tooltip": {
"shared": true,
"sort": 0,
diff --git a/kubernetes/helm_charts/monitoring/dashboards/dashboards/values.yaml b/kubernetes/helm_charts/monitoring/dashboards/dashboards/values.yaml
index b3c41a72f0..8e198d3da9 100644
--- a/kubernetes/helm_charts/monitoring/dashboards/dashboards/values.yaml
+++ b/kubernetes/helm_charts/monitoring/dashboards/dashboards/values.yaml
@@ -1,6 +1,6 @@
rbac:
create: true
- pspEnabled: true
+ pspEnabled: false
pspUseAppArmor: true
namespaced: false
extraRoleRules: []
diff --git a/kubernetes/helm_charts/monitoring/dashboards/values.yaml b/kubernetes/helm_charts/monitoring/dashboards/values.yaml
index 7e7f42d74e..7c986427cb 100644
--- a/kubernetes/helm_charts/monitoring/dashboards/values.yaml
+++ b/kubernetes/helm_charts/monitoring/dashboards/values.yaml
@@ -1,6 +1,6 @@
rbac:
- create: true
- pspEnabled: true
+ create: false
+ pspEnabled: false
pspUseAppArmor: true
namespaced: false
extraRoleRules: []
@@ -435,6 +435,9 @@ dashboards2:
graylog:
graylogmetrics:
file: dashboards/graylog-dashboard.json
+ edinfra:
+ edinframetrics:
+ file: dashboards/ed_infra_status.json
# prometheus-stats:
# gnetId: 2
diff --git a/kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/podsecuritypolicies.yaml b/kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/podsecuritypolicies.yaml
index fc7c2b6325..f08dd64343 100755
--- a/kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/podsecuritypolicies.yaml
+++ b/kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/podsecuritypolicies.yaml
@@ -1,5 +1,5 @@
{{- if .Values.podSecurityPolicies.enabled -}}
-apiVersion: policy/v1beta1
+apiVersion: policy/v1
kind: PodSecurityPolicy
metadata:
name: {{ template "elasticsearch-exporter.fullname" . }}
diff --git a/kubernetes/helm_charts/monitoring/oauth2-proxy/charts/redis/templates/_helpers.tpl b/kubernetes/helm_charts/monitoring/oauth2-proxy/charts/redis/templates/_helpers.tpl
index 47f52a3345..53e2d8c7ad 100644
--- a/kubernetes/helm_charts/monitoring/oauth2-proxy/charts/redis/templates/_helpers.tpl
+++ b/kubernetes/helm_charts/monitoring/oauth2-proxy/charts/redis/templates/_helpers.tpl
@@ -36,7 +36,7 @@ Return the appropriate apiVersion for networkpolicy.
*/}}
{{- define "networkPolicy.apiVersion" -}}
{{- if semverCompare ">=1.4-0, <1.7-0" .Capabilities.KubeVersion.GitVersion -}}
-{{- print "extensions/v1beta1" -}}
+{{- print "extensions/v1" -}}
{{- else -}}
{{- print "networking.k8s.io/v1" -}}
{{- end -}}
@@ -58,9 +58,9 @@ Return the appropriate apiVersion for PodSecurityPolicy.
*/}}
{{- define "podSecurityPolicy.apiVersion" -}}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
-{{- print "policy/v1beta1" -}}
+{{- print "policy/v1" -}}
{{- else -}}
-{{- print "extensions/v1beta1" -}}
+{{- print "extensions/v1" -}}
{{- end -}}
{{- end -}}
diff --git a/kubernetes/helm_charts/monitoring/oauth2-proxy/templates/poddisruptionbudget.yaml b/kubernetes/helm_charts/monitoring/oauth2-proxy/templates/poddisruptionbudget.yaml
index a837fb31ab..902b90819f 100644
--- a/kubernetes/helm_charts/monitoring/oauth2-proxy/templates/poddisruptionbudget.yaml
+++ b/kubernetes/helm_charts/monitoring/oauth2-proxy/templates/poddisruptionbudget.yaml
@@ -1,5 +1,5 @@
{{- if and .Values.podDisruptionBudget.enabled (gt (.Values.replicaCount | int) 1) }}
-apiVersion: policy/v1beta1
+apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
labels:
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/.gitignore b/kubernetes/helm_charts/monitoring/prometheus-operator/.gitignore
new file mode 100644
index 0000000000..d4230e6f3f
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/.gitignore
@@ -0,0 +1,9 @@
+# Python development for hack
+venv
+pyvenv.cfg
+!**
+charts/*
+!charts/crds/
+!charts/crds/**
+Chart.lock
+hack/*.git
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/.helmignore b/kubernetes/helm_charts/monitoring/prometheus-operator/.helmignore
old mode 100755
new mode 100644
index aba2fa8ce4..1937f42c7f
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/.helmignore
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/.helmignore
@@ -23,4 +23,6 @@
OWNERS
hack/
ci/
-prometheus-operator-*.tgz
+kube-prometheus-*.tgz
+
+unittests/
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/CONTRIBUTING.md b/kubernetes/helm_charts/monitoring/prometheus-operator/CONTRIBUTING.md
old mode 100755
new mode 100644
index 44533af6e5..f6ce2a3235
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/CONTRIBUTING.md
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/CONTRIBUTING.md
@@ -1,10 +1,12 @@
# Contributing Guidelines
+
## How to contribute to this chart
+
1. Fork this repository, develop and test your Chart.
1. Bump the chart version for every change.
-1. Ensure PR title has the prefix `[stable/prometheus-operator]`
+1. Ensure PR title has the prefix `[kube-prometheus-stack]`
1. When making changes to rules or dashboards, see the README.md section on how to sync data from upstream repositories
1. Check the `hack/minikube` folder has scripts to set up minikube and components of this chart that will allow all components to be scraped. You can use this configuration when validating your changes.
1. Check for changes of RBAC rules.
1. Check for changes in CRD specs.
-1. PR must pass the linter (`helm lint`)
\ No newline at end of file
+1. PR must pass the linter (`helm lint`)
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/Chart.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/Chart.yaml
old mode 100755
new mode 100644
index e4079a2c58..9039aeb3e0
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/Chart.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/Chart.yaml
@@ -1,22 +1,56 @@
-apiVersion: v1
-appVersion: 0.38.1
-description: Provides easy monitoring definitions for Kubernetes services, and deployment
- and management of Prometheus instances.
-engine: gotpl
-home: https://github.com/coreos/prometheus-operator
+apiVersion: v2
+description: kube-prometheus-stack collects Kubernetes manifests, Grafana dashboards, and Prometheus rules combined with documentation and scripts to provide easy to operate end-to-end Kubernetes cluster monitoring with Prometheus using the Prometheus Operator.
icon: https://raw.githubusercontent.com/prometheus/prometheus.github.io/master/assets/prometheus_logo-cb55bb5c346.png
-keywords:
-- operator
-- prometheus
+type: application
maintainers:
-- name: vsliouniaev
-- name: bismarck
-- email: gianrubio@gmail.com
- name: gianrubio
-name: prometheus-operator
+ - name: andrewgkew
+ email: andrew@quadcorps.co.uk
+ - name: gianrubio
+ email: gianrubio@gmail.com
+ - name: gkarthiks
+ email: github.gkarthiks@gmail.com
+ - name: GMartinez-Sisti
+ email: kube-prometheus-stack@sisti.pt
+ - name: scottrigby
+ email: scott@r6by.com
+ - name: Xtigyro
+ email: miroslav.hadzhiev@gmail.com
+ - name: QuentinBisson
+ email: quentin.bisson@gmail.com
+name: kube-prometheus-stack
sources:
-- https://github.com/coreos/kube-prometheus
-- https://github.com/coreos/prometheus-operator
-- https://coreos.com/operators/prometheus
-tillerVersion: '>=2.12.0'
-version: 8.13.7
+ - https://github.com/prometheus-community/helm-charts
+ - https://github.com/prometheus-operator/kube-prometheus
+version: 51.9.0
+appVersion: v0.68.0
+kubeVersion: ">=1.19.0-0"
+home: https://github.com/prometheus-operator/kube-prometheus
+keywords:
+ - operator
+ - prometheus
+ - kube-prometheus
+annotations:
+ "artifacthub.io/license": Apache-2.0
+ "artifacthub.io/operator": "true"
+ "artifacthub.io/links": |
+ - name: Chart Source
+ url: https://github.com/prometheus-community/helm-charts
+ - name: Upstream Project
+ url: https://github.com/prometheus-operator/kube-prometheus
+
+dependencies:
+ - name: crds
+ version: "0.0.0"
+ condition: crds.enabled
+ - name: kube-state-metrics
+ version: "5.14.*"
+ repository: https://prometheus-community.github.io/helm-charts
+ condition: kubeStateMetrics.enabled
+ - name: prometheus-node-exporter
+ version: "4.23.*"
+ repository: https://prometheus-community.github.io/helm-charts
+ condition: nodeExporter.enabled
+ - name: grafana
+ version: "6.60.*"
+ repository: https://grafana.github.io/helm-charts
+ condition: grafana.enabled
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/README.md b/kubernetes/helm_charts/monitoring/prometheus-operator/README.md
old mode 100755
new mode 100644
index f2a1914bbd..2888b976f3
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/README.md
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/README.md
@@ -1,614 +1,801 @@
-# prometheus-operator
+# kube-prometheus-stack
-Installs [prometheus-operator](https://github.com/coreos/prometheus-operator) to create/configure/manage Prometheus clusters atop Kubernetes. This chart includes multiple components and is suitable for a variety of use-cases.
+Installs the [kube-prometheus stack](https://github.com/prometheus-operator/kube-prometheus), 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 cluster monitoring with [Prometheus](https://prometheus.io/) using the [Prometheus Operator](https://github.com/prometheus-operator/prometheus-operator).
-The default installation is intended to suit monitoring a kubernetes cluster the chart is deployed onto. It closely matches the kube-prometheus project.
-- [prometheus-operator](https://github.com/coreos/prometheus-operator)
-- [prometheus](https://prometheus.io/)
-- [alertmanager](https://prometheus.io/)
-- [node-exporter](https://github.com/helm/charts/tree/master/stable/prometheus-node-exporter)
-- [kube-state-metrics](https://github.com/helm/charts/tree/master/stable/kube-state-metrics)
-- [grafana](https://github.com/helm/charts/tree/master/stable/grafana)
-- service monitors to scrape internal kubernetes components
- - kube-apiserver
- - kube-scheduler
- - kube-controller-manager
- - etcd
- - kube-dns/coredns
- - kube-proxy
+See the [kube-prometheus](https://github.com/prometheus-operator/kube-prometheus) README for details about components, dashboards, and alerts.
-With the installation, the chart also includes dashboards and alerts.
+_Note: This chart was formerly named `prometheus-operator` chart, now renamed to more clearly reflect that it installs the `kube-prometheus` project stack, within which Prometheus Operator is only one component._
-The same chart can be used to run multiple prometheus instances in the same cluster if required. To achieve this, the other components need to be disabled - it is necessary to run only one instance of prometheus-operator and a pair of alertmanager pods for an HA configuration.
+## Prerequisites
+
+- Kubernetes 1.19+
+- Helm 3+
-## TL;DR;
+## Get Helm Repository Info
```console
-$ helm install stable/prometheus-operator
+helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
+helm repo update
```
-## Introduction
+_See [`helm repo`](https://helm.sh/docs/helm/helm_repo/) for command documentation._
-This chart bootstraps a [prometheus-operator](https://github.com/coreos/prometheus-operator) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. The chart can be installed multiple times to create separate Prometheus instances managed by Prometheus Operator.
+## Install Helm Chart
-## Prerequisites
- - Kubernetes 1.10+ with Beta APIs
- - Helm 2.12+ (If using Helm < 2.14, [see below for CRD workaround](#Helm-fails-to-create-CRDs))
+```console
+helm install [RELEASE_NAME] prometheus-community/kube-prometheus-stack
+```
-## Installing the Chart
+_See [configuration](#configuration) below._
-To install the chart with the release name `my-release`:
+_See [helm install](https://helm.sh/docs/helm/helm_install/) for command documentation._
-```console
-$ helm install --name my-release stable/prometheus-operator
-```
+## Dependencies
+
+By default this chart installs additional, dependent charts:
-The command deploys prometheus-operator on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
+- [prometheus-community/kube-state-metrics](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-state-metrics)
+- [prometheus-community/prometheus-node-exporter](https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus-node-exporter)
+- [grafana/grafana](https://github.com/grafana/helm-charts/tree/main/charts/grafana)
-The default installation includes Prometheus Operator, Alertmanager, Grafana, and configuration for scraping Kubernetes infrastructure.
+To disable dependencies during installation, see [multiple releases](#multiple-releases) below.
-## Uninstalling the Chart
+_See [helm dependency](https://helm.sh/docs/helm/helm_dependency/) for command documentation._
-To uninstall/delete the `my-release` deployment:
+## Uninstall Helm Chart
```console
-$ helm delete my-release
+helm uninstall [RELEASE_NAME]
```
-The command removes all the Kubernetes components associated with the chart and deletes the release.
+This removes all the Kubernetes components associated with the chart and deletes the release.
+
+_See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall/) for command documentation._
CRDs created by this chart are not removed by default and should be manually cleaned up:
```console
+kubectl delete crd alertmanagerconfigs.monitoring.coreos.com
+kubectl delete crd alertmanagers.monitoring.coreos.com
+kubectl delete crd podmonitors.monitoring.coreos.com
+kubectl delete crd probes.monitoring.coreos.com
+kubectl delete crd prometheusagents.monitoring.coreos.com
kubectl delete crd prometheuses.monitoring.coreos.com
kubectl delete crd prometheusrules.monitoring.coreos.com
+kubectl delete crd scrapeconfigs.monitoring.coreos.com
kubectl delete crd servicemonitors.monitoring.coreos.com
-kubectl delete crd podmonitors.monitoring.coreos.com
-kubectl delete crd alertmanagers.monitoring.coreos.com
kubectl delete crd thanosrulers.monitoring.coreos.com
```
-## Work-Arounds for Known Issues
+## Upgrading Chart
-### Running on private GKE clusters
-When Google configure the control plane for private clusters, they automatically configure VPC peering between your Kubernetes cluster’s network and a separate Google managed project. In order to restrict what Google are able to access within your cluster, the firewall rules configured restrict access to your Kubernetes pods. This means that in order to use the webhook component with a GKE private cluster, you must configure an additional firewall rule to allow the GKE control plane access to your webhook pod.
+```console
+helm upgrade [RELEASE_NAME] prometheus-community/kube-prometheus-stack
+```
-You can read more information on how to add firewall rules for the GKE control plane nodes in the [GKE docs](https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#add_firewall_rules)
+With Helm v3, CRDs created by this chart are not updated by default and should be manually updated.
+Consult also the [Helm Documentation on CRDs](https://helm.sh/docs/chart_best_practices/custom_resource_definitions).
-Alternatively, you can disable the hooks by setting `prometheusOperator.admissionWebhooks.enabled=false`.
+_See [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/) for command documentation._
+
+### 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.
+
+### From 50.x to 51.x
+
+This version upgrades Prometheus-Operator to v0.68.0, Prometheus to 2.47.0 and Thanos to v0.32.2
+
+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.68.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.68.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.68.0/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.68.0/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.68.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheusagents.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.68.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.68.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.68.0/example/prometheus-operator-crd/monitoring.coreos.com_scrapeconfigs.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.68.0/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.68.0/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml
+```
+
+### From 49.x to 50.x
+
+This version requires Kubernetes 1.19+.
+
+We do not expect any breaking changes in this version.
+
+### From 48.x to 49.x
+
+This version upgrades Prometheus-Operator to v0.67.1, 0, Alertmanager to v0.26.0, Prometheus to 2.46.0 and Thanos to v0.32.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.67.1/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.67.1/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.67.1/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.67.1/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.67.1/example/prometheus-operator-crd/monitoring.coreos.com_prometheusagents.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.67.1/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.67.1/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.67.1/example/prometheus-operator-crd/monitoring.coreos.com_scrapeconfigs.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.67.1/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.67.1/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml
+```
+
+### From 47.x to 48.x
+
+This version moved all CRDs into a dedicated sub-chart. No new CRDs are introduced in this version.
+See [#3548](https://github.com/prometheus-community/helm-charts/issues/3548) for more context.
+
+We do not expect any breaking changes in this version.
+
+### From 46.x to 47.x
+
+This version upgrades Prometheus-Operator to v0.66.0 with new CRDs (PrometheusAgent and ScrapeConfig).
+
+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.66.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.66.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.66.0/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.66.0/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.66.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheusagents.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.66.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.66.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.66.0/example/prometheus-operator-crd/monitoring.coreos.com_scrapeconfigs.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.66.0/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.66.0/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml
+```
+
+### From 45.x to 46.x
+
+This version upgrades Prometheus-Operator to v0.65.1 with new CRDs (PrometheusAgent and ScrapeConfig), Prometheus to v2.44.0 and Thanos to v0.31.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.65.1/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.65.1/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.65.1/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.65.1/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.65.1/example/prometheus-operator-crd/monitoring.coreos.com_prometheusagents.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.65.1/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.65.1/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.65.1/example/prometheus-operator-crd/monitoring.coreos.com_scrapeconfigs.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.65.1/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.65.1/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml
+```
+
+### From 44.x to 45.x
+
+This version upgrades Prometheus-Operator to v0.63.0, Prometheus to v2.42.0 and Thanos to v0.30.2.
+
+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.63.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.63.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.63.0/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.63.0/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.63.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.63.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.63.0/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.63.0/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml
+```
+
+### From 43.x to 44.x
+
+This version upgrades Prometheus-Operator to v0.62.0, Prometheus to v2.41.0 and Thanos to v0.30.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.62.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.62.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.62.0/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.62.0/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.62.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.62.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.62.0/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.62.0/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml
+```
+
+If you have explicitly set `prometheusOperator.admissionWebhooks.failurePolicy`, this value is now always used even when `.prometheusOperator.admissionWebhooks.patch.enabled` is `true` (the default).
+
+The values for `prometheusOperator.image.tag` & `prometheusOperator.prometheusConfigReloader.image.tag` are now empty by default and the Chart.yaml `appVersion` field is used instead.
+
+### From 42.x to 43.x
+
+This version upgrades Prometheus-Operator to v0.61.1, Prometheus to v2.40.5 and Thanos to v0.29.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.61.1/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.61.1/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.61.1/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.61.1/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.61.1/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.61.1/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.61.1/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.61.1/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml
+```
+
+### From 41.x to 42.x
+
+This includes the overridability of container registry for all containers at the global level using `global.imageRegistry` or per container image. The defaults have not changed but if you were using a custom image, you will have to override the registry of said custom container image before you upgrade.
+
+For instance, the prometheus-config-reloader used to be configured as follow:
+
+```yaml
+ image:
+ repository: quay.io/prometheus-operator/prometheus-config-reloader
+ tag: v0.60.1
+ sha: ""
+```
+
+But it now moved to:
+
+```yaml
+ image:
+ registry: quay.io
+ repository: prometheus-operator/prometheus-config-reloader
+ tag: v0.60.1
+ sha: ""
+```
+
+### From 40.x to 41.x
+
+This version upgrades Prometheus-Operator to v0.60.1, Prometheus to v2.39.1 and Thanos to v0.28.1.
+This version also upgrades the Helm charts of kube-state-metrics to 4.20.2, prometheus-node-exporter to 4.3.0 and Grafana to 6.40.4.
+
+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.60.1/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.60.1/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.60.1/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.60.1/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.60.1/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.60.1/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.60.1/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
+kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.60.1/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml
+```
+
+This version splits kubeScheduler recording and altering rules in separate config values.
+Instead of `defaultRules.rules.kubeScheduler` the 2 new variables `defaultRules.rules.kubeSchedulerAlerting` and `defaultRules.rules.kubeSchedulerRecording` are used.
+
+### 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`.
-### Helm fails to create CRDs
-You should upgrade to Helm 2.14 + in order to avoid this issue. However, if you are stuck with an earlier Helm release you should instead use the following approach: Due to a bug in helm, it is possible for the 5 CRDs that are created by this chart to fail to get fully deployed before Helm attempts to create resources that require them. This affects all versions of Helm with a [potential fix pending](https://github.com/helm/helm/pull/5112). In order to work around this issue when installing the chart you will need to make sure all 5 CRDs exist in the cluster first and disable their previsioning by the chart:
+### 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.
+Please use `kube-state-metrics.namespaceOverride` instead.
+
+### From 17.x to 18.x
+
+Version 18 upgrades prometheus-operator from 0.49.x to 0.50.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.50.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml
+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.50.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml
+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.50.0/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml
+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.50.0/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml
+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.50.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml
+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.50.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml
+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.50.0/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.50.0/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml
+```
+
+### From 16.x to 17.x
+
+Version 17 upgrades prometheus-operator from 0.48.x to 0.49.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.49.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml
+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.49.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml
+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.49.0/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml
+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.49.0/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml
+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.49.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml
+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.49.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml
+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.49.0/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.49.0/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml
+```
+
+### From 15.x to 16.x
+
+Version 16 upgrades kube-state-metrics to v2.0.0. This includes changed command-line arguments and removed metrics, see this [blog post](https://kubernetes.io/blog/2021/04/13/kube-state-metrics-v-2-0/). This version also removes Grafana dashboards that supported Kubernetes 1.14 or earlier.
+
+### From 14.x to 15.x
+
+Version 15 upgrades prometheus-operator from 0.46.x to 0.47.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.47.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml
+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.47.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml
+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.47.0/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml
+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.47.0/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml
+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.47.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml
+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.47.0/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.47.0/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml
+```
+
+### From 13.x to 14.x
+
+Version 14 upgrades prometheus-operator from 0.45.x to 0.46.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.46.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml
+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.46.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml
+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.46.0/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml
+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.46.0/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml
+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.46.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml
+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.46.0/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.46.0/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml
+```
+
+### From 12.x to 13.x
+
+Version 13 upgrades prometheus-operator from 0.44.x to 0.45.x. Helm does not automatically upgrade or install new CRDs on a chart upgrade, so you have to install the CRD manually before updating:
+
+```console
+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.45.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml
+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.45.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml
+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.45.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml
+```
+
+### From 11.x to 12.x
+
+Version 12 upgrades prometheus-operator from 0.43.x to 0.44.x. Helm does not automatically upgrade or install new CRDs on a chart upgrade, so you have to install the CRD manually before updating:
-1. Create CRDs
```console
-kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/release-0.38/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml
-kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/release-0.38/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml
-kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/release-0.38/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml
-kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/release-0.38/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml
-kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/release-0.38/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
-kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/release-0.38/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml
+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/release-0.44/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml
+```
+
+The chart was migrated to support only helm v3 and later.
+
+### From 10.x to 11.x
+
+Version 11 upgrades prometheus-operator from 0.42.x to 0.43.x. Starting with 0.43.x an additional `AlertmanagerConfigs` CRD is introduced. Helm does not automatically upgrade or install new CRDs on a chart upgrade, so you have to install the CRD manually before updating:
+```console
+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/release-0.43/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml
```
-2. Wait for CRDs to be created, which should only take a few seconds
+Version 11 removes the deprecated tlsProxy via ghostunnel in favor of native TLS support the prometheus-operator gained with v0.39.0.
+
+### From 9.x to 10.x
+
+Version 10 upgrades prometheus-operator from 0.38.x to 0.42.x. Starting with 0.40.x an additional `Probes` CRD is introduced. Helm does not automatically upgrade or install new CRDs on a chart upgrade, so you have to install the CRD manually before updating:
-3. Install the chart, but disable the CRD provisioning by setting `prometheusOperator.createCustomResource=false`
```console
-$ helm install --name my-release stable/prometheus-operator --set prometheusOperator.createCustomResource=false
+kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/release-0.42/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml
```
-## Upgrading an existing Release to a new major version
+### From 8.x to 9.x
+
+Version 9 of the helm chart removes the existing `additionalScrapeConfigsExternal` in favour of `additionalScrapeConfigsSecret`. This change lets users specify the secret name and secret key to use for the additional scrape configuration of prometheus. This is useful for users that have prometheus-operator as a subchart and also have a template that creates the additional scrape configuration.
+
+### From 7.x to 8.x
-A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an
-incompatible breaking change needing manual actions.
+Due to new template functions being used in the rules in version 8.x.x of the chart, an upgrade to Prometheus Operator and Prometheus is necessary in order to support them. First, upgrade to the latest version of 7.x.x
-### Upgrading from 7.x.x to 8.x.x
-Due to new template functions being used in the rules in version 8.x.x of the chart, an upgrade to Prometheus Operator and Prometheus is necessary in order to support them.
-First, upgrade to the latest version of 7.x.x
-```sh
-helm upgrade stable/prometheus-operator --version 7.4.0
+```console
+helm upgrade [RELEASE_NAME] prometheus-community/kube-prometheus-stack --version 7.5.0
```
+
Then upgrade to 8.x.x
-```sh
-helm upgrade stable/prometheus-operator
+
+```console
+helm upgrade [RELEASE_NAME] prometheus-community/kube-prometheus-stack --version [8.x.x]
```
+
Minimal recommended Prometheus version for this chart release is `2.12.x`
-### Upgrading from 6.x.x to 7.x.x
+### From 6.x to 7.x
+
Due to a change in grafana subchart, version 7.x.x now requires Helm >= 2.12.0.
-### Upgrading from 5.x.x to 6.x.x
+### From 5.x to 6.x
+
Due to a change in deployment labels of kube-state-metrics, the upgrade requires `helm upgrade --force` in order to re-create the deployment. If this is not done an error will occur indicating that the deployment cannot be modified:
-```
+```console
invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"app.kubernetes.io/name":"kube-state-metrics"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable
```
+
If this error has already been encountered, a `helm history` command can be used to determine which release has worked, then `helm rollback` to the release, then `helm upgrade --force` to this new one
-## prometheus.io/scrape
-The prometheus operator does not support annotation-based discovery of services, using the `serviceMonitor` CRD in its place as it provides far more configuration options. For information on how to use servicemonitors, please see the documentation on the coreos/prometheus-operator documentation here: [Running Exporters](https://github.com/coreos/prometheus-operator/blob/master/Documentation/user-guides/running-exporters.md)
+## Configuration
-By default, Prometheus discovers ServiceMonitors within its namespace, that are labeled with the same release tag as the prometheus-operator release.
-Sometimes, you may need to discover custom ServiceMonitors, for example used to scrape data from third-party applications. An easy way of doing this, without compromising the default ServiceMonitors discovery, is allowing Prometheus to discover all ServiceMonitors within its namespace, without applying label filtering. To do so, you can set `prometheus.prometheusSpec.serviceMonitorSelectorNilUsesHelmValues` to `false`.
+See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing). To see all configurable options with detailed comments:
-## Configuration
+```console
+helm show values prometheus-community/kube-prometheus-stack
+```
+
+You may also `helm show values` on this chart's [dependencies](#dependencies) for additional options.
-The following tables list the configurable parameters of the prometheus-operator chart and their default values.
-
-### General
-| Parameter | Description | Default |
-| ----- | ----------- | ------ |
-| `additionalPrometheusRulesMap` | Map of `prometheusRule` objects to create with the key used as the name of the rule spec. If defined, this will take precedence over `additionalPrometheusRules`. See https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#prometheusrulespec. | `nil` |
-| `additionalPrometheusRules` | *DEPRECATED* Will be removed in a future release. Please use **additionalPrometheusRulesMap** instead. List of `prometheusRule` objects to create. See https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#prometheusrulespec. | `[]` |
-| `commonLabels` | Labels to apply to all resources | `[]` |
-| `defaultRules.annotations` | Annotations for default rules for monitoring the cluster | `{}` |
-| `defaultRules.appNamespacesTarget` | Specify target Namespaces for app alerts | `".*"` |
-| `defaultRules.create` | Create default rules for monitoring the cluster | `true` |
-| `defaultRules.labels` | Labels for default rules for monitoring the cluster | `{}` |
-| `defaultRules.runbookUrl` | URL prefix for default rule runbook_url annotations | `https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#` |
-| `defaultRules.rules.PrometheusOperator` | Create Prometheus Operator default rules| `true` |
-| `defaultRules.rules.alertmanager` | Create default rules for Alert Manager | `true` |
-| `defaultRules.rules.etcd` | Create default rules for ETCD | `true` |
-| `defaultRules.rules.general` | Create General default rules| `true` |
-| `defaultRules.rules.k8s` | Create K8S default rules| `true` |
-| `defaultRules.rules.kubeApiserver` | Create Api Server default rules| `true` |
-| `defaultRules.rules.kubeApiserverError` | Create Api Server Error default rules| `true` |
-| `defaultRules.rules.kubePrometheusNodeAlerting` | Create Node Alerting default rules| `true` |
-| `defaultRules.rules.kubePrometheusNodeRecording` | Create Node Recording default rules| `true` |
-| `defaultRules.rules.kubeScheduler` | Create Kubernetes Scheduler default rules| `true` |
-| `defaultRules.rules.kubernetesAbsent` | Create Kubernetes Absent (example API Server down) default rules| `true` |
-| `defaultRules.rules.kubernetesApps` | Create Kubernetes Apps default rules| `true` |
-| `defaultRules.rules.kubernetesResources` | Create Kubernetes Resources default rules| `true` |
-| `defaultRules.rules.kubernetesStorage` | Create Kubernetes Storage default rules| `true` |
-| `defaultRules.rules.kubernetesSystem` | Create Kubernetes System default rules| `true` |
-| `defaultRules.rules.network` | Create networking default rules | `true` |
-| `defaultRules.rules.node` | Create Node default rules | `true` |
-| `defaultRules.rules.prometheus` | Create Prometheus default rules| `true` |
-| `defaultRules.rules.time` | Create time default rules | `true` |
-| `fullnameOverride` | Provide a name to substitute for the full names of resources |`""`|
-| `global.imagePullSecrets` | Reference to one or more secrets to be used when pulling images | `[]` |
-| `global.rbac.create` | Create RBAC resources | `true` |
-| `global.rbac.pspEnabled` | Create pod security policy resources | `true` |
-| `global.rbac.pspAnnotations` | Add annotations to the PSP configurations | `{}` |
-| `kubeTargetVersionOverride` | Provide a target gitVersion of K8S, in case .Capabilites.KubeVersion is not available (e.g. `helm template`) |`""`|
-| `nameOverride` | Provide a name in place of `prometheus-operator` |`""`|
-| `kubeTargetVersionOverride` | Provide a k8s version |`""`|
-
-### Prometheus Operator
-| Parameter | Description | Default |
-| ----- | ----------- | ------ |
-| `prometheusOperator.admissionWebhooks.enabled` | Create PrometheusRules admission webhooks. Mutating webhook will patch PrometheusRules objects indicating they were validated. Validating webhook will check the rules syntax. | `true` |
-| `prometheusOperator.admissionWebhooks.failurePolicy` | Failure policy for admission webhooks | `Fail` |
-| `prometheusOperator.admissionWebhooks.patch.enabled` | If true, will use a pre and post install hooks to generate a CA and certificate to use for the prometheus operator tls proxy, and patch the created webhooks with the CA. | `true` |
-| `prometheusOperator.admissionWebhooks.patch.image.pullPolicy` | Image pull policy for the webhook integration jobs | `IfNotPresent` |
-| `prometheusOperator.admissionWebhooks.patch.image.repository` | Repository to use for the webhook integration jobs | `jettech/kube-webhook-certgen` |
-| `prometheusOperator.admissionWebhooks.patch.image.tag` | Tag to use for the webhook integration jobs | `v1.2.0` |
-| `prometheusOperator.admissionWebhooks.patch.resources` | Resource limits for admission webhook | `{}` |
-| `prometheusOperator.admissionWebhooks.patch.nodeSelector` | Node selector for running admission hook patch jobs | `nil` |
-| `prometheusOperator.admissionWebhooks.patch.podAnnotations` | Annotations for the webhook job pods | `nil` |
-| `prometheusOperator.admissionWebhooks.patch.priorityClassName` | Priority class for the webhook integration jobs | `nil` |
-| `prometheusOperator.affinity` | Assign custom affinity rules to the prometheus operator https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ | `{}` |
-| `prometheusOperator.cleanupCustomResource` | Attempt to delete CRDs when the release is removed. This option may be useful while testing but is not recommended, as deleting the CRD definition will delete resources and prevent the operator from being able to clean up resources that it manages | `false` |
-| `prometheusOperator.configReloaderCpu` | Set the prometheus config reloader side-car CPU limit. If unset, uses the prometheus-operator project default | `nil` |
-| `prometheusOperator.configReloaderMemory` | Set the prometheus config reloader side-car memory limit. If unset, uses the prometheus-operator project default | `nil` |
-| `prometheusOperator.configmapReloadImage.repository` | Repository for configmapReload image | `quay.io/coreos/configmap-reload` |
-| `prometheusOperator.configmapReloadImage.tag` | Tag for configmapReload image | `v0.0.1` |
-| `prometheusOperator.createCustomResource` | Create CRDs. Required if deploying anything besides the operator itself as part of the release. The operator will create / update these on startup. If your Helm version < 2.10 you will have to either create the CRDs first or deploy the operator first, then the rest of the resources. Regardless of value of this, Helm v3+ will install the CRDs if those are not present already. Use `--skip-crds` with `helm install` if you want to skip CRD creation | `true` |
-| `prometheusOperator.namespaces` | Namespaces to scope the interaction of the Prometheus Operator and the apiserver (allow list). This is mutually exclusive with `denyNamespaces`. Setting this to an empty object will disable the configuration | `{}` |
-| `prometheusOperator.namespaces.releaseNamespace` | Include the release namespace | `false` |
-| `prometheusOperator.namespaces.additional` | Include additional namespaces besides the release namespace | `[]` |
-| `prometheusOperator.manageCrds` |If true prometheus operator will create and update its CRDs on startup | `true` |
-| `prometheusOperator.denyNamespaces` | Namespaces not to scope the interaction of the Prometheus Operator (deny list). This is mutually exclusive with `namespaces` | `[]` |
-| `prometheusOperator.enabled` | Deploy Prometheus Operator. Only one of these should be deployed into the cluster | `true` |
-| `prometheusOperator.hyperkubeImage.pullPolicy` | Image pull policy for hyperkube image used to perform maintenance tasks | `IfNotPresent` |
-| `prometheusOperator.hyperkubeImage.repository` | Repository for hyperkube image used to perform maintenance tasks | `k8s.gcr.io/hyperkube` |
-| `prometheusOperator.hyperkubeImage.tag` | Tag for hyperkube image used to perform maintenance tasks | `v1.12.1` |
-| `prometheusOperator.image.pullPolicy` | Pull policy for prometheus operator image | `IfNotPresent` |
-| `prometheusOperator.image.repository` | Repository for prometheus operator image | `quay.io/coreos/prometheus-operator` |
-| `prometheusOperator.image.tag` | Tag for prometheus operator image | `v0.38.1` |
-| `prometheusOperator.kubeletService.enabled` | If true, the operator will create and maintain a service for scraping kubelets | `true` |
-| `prometheusOperator.kubeletService.namespace` | Namespace to deploy kubelet service | `kube-system` |
-| `prometheusOperator.logFormat` | Operator log output formatting | `"logfmt"` |
-| `prometheusOperator.logLevel` | Operator log level. Possible values: "all", "debug", "info", "warn", "error", "none" | `"info"` |
-| `prometheusOperator.nodeSelector` | Prometheus operator node selector https://kubernetes.io/docs/user-guide/node-selection/ | `{}` |
-| `prometheusOperator.podAnnotations` | Annotations to add to the operator pod | `{}` |
-| `prometheusOperator.podLabels` | Labels to add to the operator pod | `{}` |
-| `prometheusOperator.priorityClassName` | Name of Priority Class to assign pods | `nil` |
-| `prometheusOperator.prometheusConfigReloaderImage.repository` | Repository for config-reloader image | `quay.io/coreos/prometheus-config-reloader` |
-| `prometheusOperator.prometheusConfigReloaderImage.tag` | Tag for config-reloader image | `v0.38.1` |
-| `prometheusOperator.resources` | Resource limits for prometheus operator | `{}` |
-| `prometheusOperator.securityContext` | SecurityContext for prometheus operator | `{"runAsNonRoot": true, "runAsUser": 65534}` |
-| `prometheusOperator.service.annotations` | Annotations to be added to the prometheus operator service | `{}` |
-| `prometheusOperator.service.clusterIP` | Prometheus operator service clusterIP IP | `""` |
-| `prometheusOperator.service.externalIPs` | List of IP addresses at which the Prometheus Operator server service is available | `[]` |
-| `prometheusOperator.service.labels` | Prometheus Operator Service Labels | `{}` |
-| `prometheusOperator.service.loadBalancerIP` | Prometheus Operator Loadbalancer IP | `""` |
-| `prometheusOperator.service.loadBalancerSourceRanges` | Prometheus Operator Load Balancer Source Ranges | `[]` |
-| `prometheusOperator.service.nodePortTls` | TLS port to expose prometheus operator service on each node | `30443` |
-| `prometheusOperator.service.nodePort` | Port to expose prometheus operator service on each node | `30080` |
-| `prometheusOperator.service.type` | Prometheus operator service type | `ClusterIP` |
-| `prometheusOperator.serviceAccount.create` | Create a serviceaccount for the operator | `true` |
-| `prometheusOperator.serviceAccount.name` | Operator serviceAccount name | `""` |
-| `prometheusOperator.serviceMonitor.interval` | Scrape interval. If not set, the Prometheus default scrape interval is used | `nil` |
-| `prometheusOperator.serviceMonitor.metricRelabelings` | The `metric_relabel_configs` for scraping the operator instance. | `` |
-| `prometheusOperator.serviceMonitor.relabelings` | The `relabel_configs` for scraping the operator instance. | `` |
-| `prometheusOperator.serviceMonitor.selfMonitor` | Enable monitoring of prometheus operator | `true` |
-| `prometheusOperator.tlsProxy.enabled` | Enable a TLS proxy container. Only the `squareup/ghostunnel` command line arguments are currently supported and the secret where the cert is loaded from is expected to be provided by the admission webhook | `true` |
-| `prometheusOperator.tlsProxy.image.repository` | Repository for the TLS proxy container | `squareup/ghostunnel` |
-| `prometheusOperator.tlsProxy.image.tag` | Repository for the TLS proxy container | `v1.5.2` |
-| `prometheusOperator.tlsProxy.image.pullPolicy` | Image pull policy for the TLS proxy container | `IfNotPresent` |
-| `prometheusOperator.tlsProxy.resources` | Resource requests and limits for the TLS proxy container | `{}` |
-| `prometheusOperator.tolerations` | Tolerations for use with node taints https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ | `[]` |
-
-
-### Prometheus
-| Parameter | Description | Default |
-| ----- | ----------- | ------ |
-| `prometheus.additionalServiceMonitors` | List of `ServiceMonitor` objects to create. See https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#servicemonitorspec | `[]` |
-| `prometheus.enabled` | Deploy prometheus | `true` |
-| `prometheus.annotations` | Prometheus annotations | `{}` |
-| `prometheus.ingress.annotations` | Prometheus Ingress annotations | `{}` |
-| `prometheus.ingress.enabled` | If true, Prometheus Ingress will be created | `false` |
-| `prometheus.ingress.hosts` | Prometheus Ingress hostnames | `[]` |
-| `prometheus.ingress.labels` | Prometheus Ingress additional labels | `{}` |
-| `prometheus.ingress.paths` | Prometheus Ingress paths | `[]` |
-| `prometheus.ingress.tls` | Prometheus Ingress TLS configuration (YAML) | `[]` |
-| `prometheus.ingressPerReplica.annotations` | Prometheus pre replica Ingress annotations | `{}` |
-| `prometheus.ingressPerReplica.enabled` | If true, create an Ingress for each Prometheus server replica in the StatefulSet | `false` |
-| `prometheus.ingressPerReplica.hostPrefix` | | `""` |
-| `prometheus.ingressPerReplica.hostDomain` | | `""` |
-| `prometheus.ingressPerReplica.labels` | Prometheus per replica Ingress additional labels | `{}` |
-| `prometheus.ingressPerReplica.paths` | Prometheus per replica Ingress paths | `[]` |
-| `prometheus.ingressPerReplica.tlsSecretName` | Secret name containing the TLS certificate for Prometheus per replica ingress | `[]` |
-| `prometheus.ingressPerReplica.tlsSecretPerReplica.enabled` | If true, create an secret for TLS certificate for each Ingress | `false` |
-| `prometheus.ingressPerReplica.tlsSecretPerReplica.prefix` | Secret name prefix | `""` |
-| `prometheus.podDisruptionBudget.enabled` | If true, create a pod disruption budget for prometheus pods. The created resource cannot be modified once created - it must be deleted to perform a change | `false` |
-| `prometheus.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `""` |
-| `prometheus.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` |
-| `prometheus.podSecurityPolicy.allowedCapabilities` | Prometheus Pod Security Policy allowed capabilities | `""` |
-| `prometheus.prometheusSpec.additionalAlertManagerConfigs` | AdditionalAlertManagerConfigs allows for manual configuration of alertmanager jobs in the form as specified in the official Prometheus documentation: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#. AlertManager configurations specified are appended to the configurations generated by the Prometheus Operator. As AlertManager configs are 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 AlertManager configs are going to break Prometheus after the upgrade. | `{}` |
-| `prometheus.prometheusSpec.additionalAlertRelabelConfigs` | AdditionalAlertRelabelConfigs allows specifying additional 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 official Prometheus documentation: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alert_relabel_configs. As alert relabel configs are 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 alert relabel configs are going to break Prometheus after the upgrade. | `[]` |
-| `prometheus.prometheusSpec.additionalScrapeConfigsExternal` | Enable additional scrape configs that are managed externally to this chart. This option requires a secret in the same namespace as Prometheus with the name, `prometheus-operator-prometheus-scrape-confg` and a key of `additional-scrape-configs.yaml`. Note that the prometheus will fail to provision if the correct secret does not exist. | `false` |
-| `prometheus.prometheusSpec.additionalScrapeConfigs` | AdditionalScrapeConfigs allows specifying additional Prometheus scrape configurations. Scrape configurations are appended to the configurations generated by the Prometheus Operator. Job configurations must have the form as specified in the official Prometheus documentation: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#. As scrape configs are 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. | `[]` |
-| `prometheus.prometheusSpec.additionalPrometheusSecretsAnnotations` | additionalPrometheusSecretsAnnotations allows to add annotations to the kubernetes secret. This can be useful when deploying via spinnaker to disable versioning on the secret, strategy.spinnaker.io/versioned: 'false' | `{}` |
-| `prometheus.prometheusSpec.affinity` | Assign custom affinity rules to the prometheus instance https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ | `{}` |
-| `prometheus.prometheusSpec.alertingEndpoints` | Alertmanagers to which alerts will be sent https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#alertmanagerendpoints Default configuration will connect to the alertmanager deployed as part of this release | `[]` |
-| `prometheus.prometheusSpec.apiserverConfig` | Custom `kubernetes_sd_config` https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#apiserverconfig Default configuration will connect to current Kubernetes cluster | `{}` |
-| `prometheus.prometheusSpec.configMaps` | 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/ | `[]` |
-| `prometheus.prometheusSpec.containers` | Containers allows injecting additional containers. This is meant to allow adding an authentication proxy to a Prometheus pod. |`[]`|
-| `prometheus.prometheusSpec.initContainers` | InitContainers allows injecting specialized containers that run before app containers. This is meant to pre-configure and tune mounted volume permissions. |`[]`|
-| `prometheus.prometheusSpec.disableCompaction` | If true, pass --storage.tsdb.max-block-duration=2h to prometheus. This is already done if using Thanos |`false`|
-| `prometheus.prometheusSpec.enableAdminAPI` | EnableAdminAPI enables Prometheus the administrative HTTP API which includes functionality such as deleting time series. | `false` |
-| `prometheus.prometheusSpec.enforcedNamespaceLabel` | enforces adding a namespace label of origin for each alert and metric that is user created. | `""` |
-| `prometheus.prometheusSpec.evaluationInterval` | Interval between consecutive evaluations. | `""` |
-| `prometheus.prometheusSpec.externalLabels` | The labels to add to any time series or alerts when communicating with external systems (federation, remote storage, Alertmanager). | `{}` |
-| `prometheus.prometheusSpec.externalUrl` | The external URL the Prometheus instances will be available under. This is necessary to generate correct URLs. This is necessary if Prometheus is not served from root of a DNS name. | `""` |
-| `prometheus.prometheusSpec.image.repository` | Base image to use for a Prometheus deployment. | `quay.io/prometheus/prometheus` |
-| `prometheus.prometheusSpec.image.tag` | Tag of Prometheus container image to be deployed. | `v2.17.2` |
-| `prometheus.prometheusSpec.listenLocal` | ListenLocal makes the Prometheus server listen on loopback, so that it does not bind against the Pod IP. | `false` |
-| `prometheus.prometheusSpec.logFormat` | Log format for Prometheus to be configured with. | `logfmt` |
-| `prometheus.prometheusSpec.logLevel` | Log level for Prometheus to be configured with. | `info` |
-| `prometheus.prometheusSpec.nodeSelector` | Define which Nodes the Pods are scheduled on. | `{}` |
-| `prometheus.prometheusSpec.paused` | When a Prometheus deployment is paused, no actions except for deletion will be performed on the underlying objects. | `false` |
-| `prometheus.prometheusSpec.podAntiAffinityTopologyKey` | 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`| `kubernetes.io/hostname` |
-| `prometheus.prometheusSpec.podAntiAffinity` | 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. | `""` |
-| `prometheus.prometheusSpec.podMetadata` | Standard object’s metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata Metadata Labels and Annotations gets propagated to the prometheus pods. | `{}` |
-| `prometheus.prometheusSpec.priorityClassName` | Priority class assigned to the Pods | `""` |
-| `prometheus.prometheusSpec.prometheusExternalLabelNameClear` | If true, the Operator won't add the external label used to denote Prometheus instance name. | `false` |
-| `prometheus.prometheusSpec.prometheusExternalLabelName` | Name of the external label used to denote Prometheus instance name. | `""` |
-| `prometheus.prometheusSpec.query` | QuerySpec defines the query command line flags when starting Prometheus. Not all parameters are supported by the operator - [see coreos documentation](https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#queryspec) | `{}` |
-| `prometheus.prometheusSpec.remoteRead` | If specified, the remote_read spec. This is an experimental feature, it may change in any upcoming release in a breaking way. | `[]` |
-| `prometheus.prometheusSpec.remoteWrite` | If specified, the remote_write spec. This is an experimental feature, it may change in any upcoming release in a breaking way. | `[]` |
-| `prometheus.prometheusSpec.remoteWriteDashboards` | Enable/Disable Grafana dashboards provisioning for prometheus remote write feature | `false` |
-| `prometheus.prometheusSpec.replicaExternalLabelNameClear` | If true, the Operator won't add the external label used to denote replica name. | `false` |
-| `prometheus.prometheusSpec.replicaExternalLabelName` | Name of the external label used to denote replica name. | `""` |
-| `prometheus.prometheusSpec.replicas` | Number of instances to deploy for a Prometheus deployment. | `1` |
-| `prometheus.prometheusSpec.resources` | Define resources requests and limits for single Pods. | `{}` |
-| `prometheus.prometheusSpec.retentionSize` | Used Storage Prometheus shall retain data for. Example 50GiB (50 Gigabyte). Can be combined with prometheus.prometheusSpec.retention | `""` |
-| `prometheus.prometheusSpec.walCompression` | Enable compression of the write-ahead log using Snappy. This flag is only available in versions of Prometheus >= 2.11.0. | `false` |
-| `prometheus.prometheusSpec.retention` | Time duration Prometheus shall retain data for. Must match the regular expression `[0-9]+(ms\|s\|m\|h\|d\|w\|y)` (milliseconds seconds minutes hours days weeks years). | `10d` |
-| `prometheus.prometheusSpec.routePrefix` | The route prefix Prometheus 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`. | `/` |
-| `prometheus.prometheusSpec.ruleNamespaceSelector` | Namespaces to be selected for PrometheusRules discovery. If nil, select own namespace. See [namespaceSelector](https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#namespaceselector) for usage | `{}` |
-| `prometheus.prometheusSpec.ruleSelectorNilUsesHelmValues` | 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. | `true` |
-| `prometheus.prometheusSpec.ruleSelector` | A selector to select which PrometheusRules to mount for loading alerting rules from. Until (excluding) Prometheus Operator v0.24.0 Prometheus Operator will migrate any legacy rule ConfigMaps to PrometheusRule custom resources selected by RuleSelector. Make sure it does not match any config maps that you do not want to be migrated. If {}, select all PrometheusRules | `{}` |
-| `prometheus.prometheusSpec.scrapeInterval` | Interval between consecutive scrapes. | `""` |
-| `prometheus.prometheusSpec.secrets` | 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. | `[]` |
-| `prometheus.prometheusSpec.securityContext` | SecurityContext holds pod-level security attributes and common container settings. This defaults to non root user with uid 1000 and gid 2000 in order to support migration from operator version <0.26. | `{"runAsNonRoot": true, "runAsUser": 1000, "fsGroup": 2000}` |
-| `prometheus.prometheusSpec.serviceMonitorNamespaceSelector` | Namespaces to be selected for ServiceMonitor discovery. See [metav1.LabelSelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#labelselector-v1-meta) for usage | `{}` |
-| `prometheus.prometheusSpec.serviceMonitorSelectorNilUsesHelmValues` | 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 | `true` |
-| `prometheus.prometheusSpec.serviceMonitorSelector` | ServiceMonitors to be selected for target discovery. If {}, select all ServiceMonitors | `{}` |
-| `prometheus.additionalPodMonitors` | List of `PodMonitor` objects to create. See https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#podmonitorspec | `[]` |
-| `prometheus.prometheusSpec.podMonitorSelectorNilUsesHelmValues` | 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 | `true` |
-| `prometheus.prometheusSpec.podMonitorSelector` | PodMonitors to be selected for target discovery. If {}, select all PodMonitors | `{}` |
-| `prometheus.prometheusSpec.podMonitorNamespaceSelector` | Namespaces to be selected for PodMonitor discovery. See [metav1.LabelSelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#labelselector-v1-meta) for usage | `{}` |
-| `prometheus.prometheusSpec.storageSpec` | Storage spec to specify how storage shall be used. | `{}` |
-| `prometheus.prometheusSpec.thanos` | 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. See https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#thanosspec | `{}` |
-| `prometheus.prometheusSpec.tolerations` | If specified, the pod's tolerations. | `[]` |
-| `prometheus.service.additionalPorts` | Additional Prometheus Service ports to add for NodePort service type | `[]` |
-| `prometheus.service.annotations` | Prometheus Service Annotations | `{}` |
-| `prometheus.service.clusterIP` | Prometheus service clusterIP IP | `""` |
-| `prometheus.service.externalIPs` | List of IP addresses at which the Prometheus server service is available | `[]` |
-| `prometheus.service.labels` | Prometheus Service Labels | `{}` |
-| `prometheus.service.loadBalancerIP` | Prometheus Loadbalancer IP | `""` |
-| `prometheus.service.loadBalancerSourceRanges` | Prometheus Load Balancer Source Ranges | `[]` |
-| `prometheus.service.nodePort` | Prometheus Service port for NodePort service type | `30090` |
-| `prometheus.service.port` | Port for Prometheus Service to listen on | `9090` |
-| `prometheus.service.sessionAffinity` | Prometheus Service Session Affinity | `""` |
-| `prometheus.service.targetPort` | Prometheus Service internal port | `9090` |
-| `prometheus.service.type` | Prometheus Service type | `ClusterIP` |
-| `prometheus.serviceAccount.create` | Create a default serviceaccount for prometheus to use | `true` |
-| `prometheus.serviceAccount.name` | Name for prometheus serviceaccount | `""` |
-| `prometheus.serviceAccount.annotations` | Annotations to add to the serviceaccount | `""` |
-| `prometheus.serviceMonitor.interval` | Scrape interval. If not set, the Prometheus default scrape interval is used | `""` |
-| `prometheus.serviceMonitor.scheme` | HTTP scheme to use for scraping. Can be used with `tlsConfig` for example if using istio mTLS. | `""` |
-| `prometheus.serviceMonitor.tlsConfig` | TLS configuration to use when scraping the endpoint. For example if using istio mTLS. Of type: [*TLSConfig](https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#tlsconfig). | `{}` |
-| `prometheus.serviceMonitor.bearerTokenFile` | Bearer token used to scrape the Prometheus server | `nil` |
-| `prometheus.serviceMonitor.metricRelabelings` | The `metric_relabel_configs` for scraping the prometheus instance. | `` |
-| `prometheus.serviceMonitor.relabelings` | The `relabel_configs` for scraping the prometheus instance. | `` |
-| `prometheus.serviceMonitor.selfMonitor` | Create a `serviceMonitor` to automatically monitor the prometheus instance | `true` |
-| `prometheus.servicePerReplica.annotations` | Prometheus per replica Service Annotations | `{}` |
-| `prometheus.servicePerReplica.enabled` | If true, create a Service for each Prometheus server replica in the StatefulSet | `false` |
-| `prometheus.servicePerReplica.labels` | Prometheus per replica Service Labels | `{}` |
-| `prometheus.servicePerReplica.loadBalancerSourceRanges` | Prometheus per replica Service Loadbalancer Source Ranges | `[]` |
-| `prometheus.servicePerReplica.nodePort` | Prometheus per replica Service port for NodePort Service type | `30091` |
-| `prometheus.servicePerReplica.port` | Port for Prometheus per replica Service to listen on | `9090` |
-| `prometheus.servicePerReplica.targetPort` | Prometheus per replica Service internal port | `9090` |
-| `prometheus.servicePerReplica.type` | Prometheus per replica Service type | `ClusterIP` |
-
-### Alertmanager
-| Parameter | Description | Default |
-| ----- | ----------- | ------ |
-| `alertmanager.alertmanagerSpec.additionalPeers` | AdditionalPeers allows injecting a set of additional Alertmanagers to peer with to form a highly available cluster. | `[]` |
-| `alertmanager.alertmanagerSpec.affinity` | Assign custom affinity rules to the alertmanager instance https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ | `{}` |
-| `alertmanager.alertmanagerSpec.configMaps` | 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/ | `[]` |
-| `alertmanager.alertmanagerSpec.`configSecret | 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. | `""` |
-| `alertmanager.alertmanagerSpec.containers` | Containers allows injecting additional containers. This is meant to allow adding an authentication proxy to an Alertmanager pod. | `[]` |
-| `alertmanager.alertmanagerSpec.externalUrl` | 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. | `""` |
-| `alertmanager.alertmanagerSpec.image.repository` | Base image that is used to deploy pods, without tag. | `quay.io/prometheus/alertmanager` |
-| `alertmanager.alertmanagerSpec.image.tag` | Tag of Alertmanager container image to be deployed. | `v0.20.0` |
-| `alertmanager.alertmanagerSpec.listenLocal` | 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. | `false` |
-| `alertmanager.alertmanagerSpec.logFormat` | Log format for Alertmanager to be configured with. | `logfmt` |
-| `alertmanager.alertmanagerSpec.logLevel` | Log level for Alertmanager to be configured with. | `info` |
-| `alertmanager.alertmanagerSpec.nodeSelector` | Define which Nodes the Pods are scheduled on. | `{}` |
-| `alertmanager.alertmanagerSpec.paused` | If set to true all actions on the underlying managed objects are not going to be performed, except for delete actions. | `false` |
-| `alertmanager.alertmanagerSpec.podAntiAffinityTopologyKey` | 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`| `kubernetes.io/hostname` |
-| `alertmanager.alertmanagerSpec.podAntiAffinity` | 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. | `""` |
-| `alertmanager.alertmanagerSpec.podMetadata` | Standard object’s metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata Metadata Labels and Annotations gets propagated to the prometheus pods. | `{}` |
-| `alertmanager.alertmanagerSpec.priorityClassName` | Priority class assigned to the Pods | `""` |
-| `alertmanager.alertmanagerSpec.replicas` | 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. | `1` |
-| `alertmanager.alertmanagerSpec.resources` | Define resources requests and limits for single Pods. | `{}` |
-| `alertmanager.alertmanagerSpec.retention` | Time duration Alertmanager shall retain data for. Value must match the regular expression `[0-9]+(ms\|s\|m\|h)` (milliseconds seconds minutes hours). | `120h` |
-| `alertmanager.alertmanagerSpec.routePrefix` | 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`. | `/` |
-| `alertmanager.alertmanagerSpec.secrets` | 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/. | `[]` |
-| `alertmanager.alertmanagerSpec.securityContext` | SecurityContext holds pod-level security attributes and common container settings. This defaults to non root user with uid 1000 and gid 2000 in order to support migration from operator version < 0.26 | `{"runAsNonRoot": true, "runAsUser": 1000, "fsGroup": 2000}` |
-| `alertmanager.alertmanagerSpec.storage` | Storage is the definition of how storage will be used by the Alertmanager instances. | `{}` |
-| `alertmanager.alertmanagerSpec.tolerations` | If specified, the pod's tolerations. | `[]` |
-| `alertmanager.alertmanagerSpec.useExistingSecret` | Use an existing secret for configuration (all defined config from values.yaml will be ignored) | `false` |
-| `alertmanager.apiVersion` | Api that prometheus will use to communicate with alertmanager. Possible values are v1, v2 | `v2` |
-| `alertmanager.config` | Provide YAML to configure Alertmanager. See https://prometheus.io/docs/alerting/configuration/#configuration-file. The default provided works to suppress the Watchdog alert from `defaultRules.create` | `{"global":{"resolve_timeout":"5m"},"route":{"group_by":["job"],"group_wait":"30s","group_interval":"5m","repeat_interval":"12h","receiver":"null","routes":[{"match":{"alertname":"Watchdog"},"receiver":"null"}]},"receivers":[{"name":"null"}]}` |
-| `alertmanager.enabled` | Deploy alertmanager | `true` |
-| `alertmanager.ingress.annotations` | Alertmanager Ingress annotations | `{}` |
-| `alertmanager.ingress.enabled` | If true, Alertmanager Ingress will be created | `false` |
-| `alertmanager.ingress.hosts` | Alertmanager Ingress hostnames | `[]` |
-| `alertmanager.ingress.labels` | Alertmanager Ingress additional labels | `{}` |
-| `alertmanager.ingress.paths` | Alertmanager Ingress paths | `[]` |
-| `alertmanager.ingress.tls` | Alertmanager Ingress TLS configuration (YAML) | `[]` |
-| `alertmanager.ingressPerReplica.annotations` | Alertmanager pre replica Ingress annotations | `{}` |
-| `alertmanager.ingressPerReplica.enabled` | If true, create an Ingress for each Alertmanager replica in the StatefulSet | `false` |
-| `alertmanager.ingressPerReplica.hostPrefix` | | `""` |
-| `alertmanager.ingressPerReplica.hostDomain` | | `""` |
-| `alertmanager.ingressPerReplica.labels` | Alertmanager per replica Ingress additional labels | `{}` |
-| `alertmanager.ingressPerReplica.paths` | Alertmanager per replica Ingress paths | `[]` |
-| `alertmanager.ingressPerReplica.tlsSecretName` | Secret name containing the TLS certificate for Alertmanager per replica ingress | `[]` |
-| `alertmanager.ingressPerReplica.tlsSecretPerReplica.enabled` | If true, create an secret for TLS certificate for each Ingress | `false` |
-| `alertmanager.ingressPerReplica.tlsSecretPerReplica.prefix` | Secret name prefix | `""` |
-| `alertmanager.podDisruptionBudget.enabled` | If true, create a pod disruption budget for Alertmanager pods. The created resource cannot be modified once created - it must be deleted to perform a change | `false` |
-| `alertmanager.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `""` |
-| `alertmanager.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` |
-| `alertmanager.secret.annotations` | Alertmanager Secret annotations | `{}` |
-| `alertmanager.service.annotations` | Alertmanager Service annotations | `{}` |
-| `alertmanager.service.clusterIP` | Alertmanager service clusterIP IP | `""` |
-| `alertmanager.service.externalIPs` | List of IP addresses at which the Alertmanager server service is available | `[]` |
-| `alertmanager.service.labels` | Alertmanager Service Labels | `{}` |
-| `alertmanager.service.loadBalancerIP` | Alertmanager Loadbalancer IP | `""` |
-| `alertmanager.service.loadBalancerSourceRanges` | Alertmanager Load Balancer Source Ranges | `[]` |
-| `alertmanager.service.nodePort` | Alertmanager Service port for NodePort service type | `30903` |
-| `alertmanager.service.port` | Port for Alertmanager Service to listen on | `9093` |
-| `alertmanager.service.targetPort` | AlertManager Service internal port | `9093` |
-| `alertmanager.service.type` | Alertmanager Service type | `ClusterIP` |
-| `alertmanager.servicePerReplica.annotations` | Alertmanager per replica Service Annotations | `{}` |
-| `alertmanager.servicePerReplica.enabled` | If true, create a Service for each Alertmanager replica in the StatefulSet | `false` |
-| `alertmanager.servicePerReplica.labels` | Alertmanager per replica Service Labels | `{}` |
-| `alertmanager.servicePerReplica.loadBalancerSourceRanges` | Alertmanager per replica Service Loadbalancer Source Ranges | `[]` |
-| `alertmanager.servicePerReplica.nodePort` | Alertmanager per replica Service port for NodePort Service type | `30904` |
-| `alertmanager.servicePerReplica.port` | Port for Alertmanager per replica Service to listen on | `9093` |
-| `alertmanager.servicePerReplica.targetPort` | Alertmanager per replica Service internal port | `9093` |
-| `alertmanager.servicePerReplica.type` | Alertmanager per replica Service type | `ClusterIP` |
-| `alertmanager.serviceAccount.create` | Create a `serviceAccount` for alertmanager | `true` |
-| `alertmanager.serviceAccount.name` | Name for Alertmanager service account | `""` |
-| `alertmanager.serviceMonitor.interval` | Scrape interval. If not set, the Prometheus default scrape interval is used | `nil` |
-| `alertmanager.serviceMonitor.metricRelabelings` | The `metric_relabel_configs` for scraping the alertmanager instance. | `` |
-| `alertmanager.serviceMonitor.relabelings` | The `relabel_configs` for scraping the alertmanager instance. | `` |
-| `alertmanager.serviceMonitor.selfMonitor` | Create a `serviceMonitor` to automatically monitor the alartmanager instance | `true` |
-| `alertmanager.tplConfig` | 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 | `false` |
-
-### Grafana
-This is not a full list of the possible values.
-
-For a full list of configurable values please refer to the [Grafana chart](https://github.com/helm/charts/tree/master/stable/grafana#configuration).
-
-| Parameter | Description | Default |
-| ----- | ----------- | ------ |
-| `grafana.additionalDataSources` | Configure additional grafana datasources | `[]` |
-| `grafana.adminPassword` | Admin password to log into the grafana UI | "prom-operator" |
-| `grafana.defaultDashboardsEnabled` | Deploy default dashboards. These are loaded using the sidecar | `true` |
-| `grafana.enabled` | If true, deploy the grafana sub-chart | `true` |
-| `grafana.extraConfigmapMounts` | Additional grafana server configMap volume mounts | `[]` |
-| `grafana.grafana.ini` | Grafana's primary configuration | `{}`
-| `grafana.image.tag` | Image tag. (`Must be >= 5.0.0`) | `6.2.5` |
-| `grafana.ingress.annotations` | Ingress annotations for Grafana | `{}` |
-| `grafana.ingress.enabled` | Enables Ingress for Grafana | `false` |
-| `grafana.ingress.hosts` | Ingress accepted hostnames for Grafana| `[]` |
-| `grafana.ingress.labels` | Custom labels for Grafana Ingress | `{}` |
-| `grafana.ingress.tls` | Ingress TLS configuration for Grafana | `[]` |
-| `grafana.rbac.pspUseAppArmor` | Enforce AppArmor in created PodSecurityPolicy (requires rbac.pspEnabled) | `true` |
-| `grafana.service.portName` | Allow to customize Grafana service portname. Will be used by servicemonitor as well | `service` |
-| `grafana.serviceMonitor.metricRelabelings` | The `metric_relabel_configs` for scraping the grafana instance. | `` |
-| `grafana.serviceMonitor.relabelings` | The `relabel_configs` for scraping the grafana instance. | `` |
-| `grafana.serviceMonitor.selfMonitor` | Create a `serviceMonitor` to automatically monitor the grafana instance | `true` |
-| `grafana.sidecar.dashboards.enabled` | Enable the Grafana sidecar to automatically load dashboards with a label `{{ grafana.sidecar.dashboards.label }}=1` | `true` |
-| `grafana.sidecar.dashboards.label` | If the sidecar is enabled, configmaps with this label will be loaded into Grafana as dashboards | `grafana_dashboard` |
-| `grafana.sidecar.datasources.annotations` | Create annotations on datasource configmaps | `{}` |
-| `grafana.sidecar.datasources.createPrometheusReplicasDatasources` | Create datasource for each Pod of Prometheus StatefulSet i.e. `Prometheus-0`, `Prometheus-1` | `false` |
-| `grafana.sidecar.datasources.defaultDatasourceEnabled` | Enable Grafana `Prometheus` default datasource | `true` |
-| `grafana.sidecar.datasources.enabled` | Enable the Grafana sidecar to automatically load datasources with a label `{{ grafana.sidecar.datasources.label }}=1` | `true` |
-| `grafana.sidecar.datasources.label` | If the sidecar is enabled, configmaps with this label will be loaded into Grafana as datasources configurations | `grafana_datasource` |
-
-### Exporters
-| Parameter | Description | Default |
-| ----- | ----------- | ------ |
-| `coreDns.enabled` | Deploy coreDns scraping components. Use either this or kubeDns | true |
-| `coreDns.service.port` | CoreDns port | `9153` |
-| `coreDns.service.selector` | CoreDns service selector | `{"k8s-app" : "kube-dns" }` |
-| `coreDns.service.targetPort` | CoreDns targetPort | `9153` |
-| `coreDns.serviceMonitor.interval` | Scrape interval. If not set, the Prometheus default scrape interval is used | `nil` |
-| `coreDns.serviceMonitor.metricRelabelings` | The `metric_relabel_configs` for scraping CoreDns. | `` |
-| `coreDns.serviceMonitor.relabelings` | The `relabel_configs` for scraping CoreDNS. | `` |
-| `kube-state-metrics.podSecurityPolicy.enabled` | Create pod security policy resource for kube-state-metrics. | `true` |
-| `kube-state-metrics.rbac.create` | Create RBAC components in kube-state-metrics. See `global.rbac.create` | `true` |
-| `kubeApiServer.enabled` | Deploy `serviceMonitor` to scrape the Kubernetes API server | `true` |
-| `kubeApiServer.relabelings` | Relablings for the API Server ServiceMonitor | `[]` |
-| `kubeApiServer.serviceMonitor.interval` | Scrape interval. If not set, the Prometheus default scrape interval is used | `nil` |
-| `kubeApiServer.serviceMonitor.jobLabel` | The name of the label on the target service to use as the job name in prometheus | `component` |
-| `kubeApiServer.serviceMonitor.metricRelabelings` | The `metric_relabel_configs` for scraping the Kubernetes API server. | `` |
-| `kubeApiServer.serviceMonitor.relabelings` | The `relabel_configs` for scraping the Kubernetes API server. | `` |
-| `kubeApiServer.serviceMonitor.selector` | The service selector | `{"matchLabels":{"component":"apiserver","provider":"kubernetes"}}` |
-| `kubeApiServer.tlsConfig.insecureSkipVerify` | Skip TLS certificate validation when scraping | `false` |
-| `kubeApiServer.tlsConfig.serverName` | Name of the server to use when validating TLS certificate | `kubernetes` |
-| `kubeControllerManager.enabled` | Deploy a `service` and `serviceMonitor` to scrape the Kubernetes controller-manager | `true` |
-| `kubeControllerManager.endpoints` | Endpoints where Controller-manager runs. Provide this if running Controller-manager outside the cluster | `[]` |
-| `kubeControllerManager.service.port` | Controller-manager port for the service runs on | `10252` |
-| `kubeControllerManager.service.selector` | Controller-manager service selector | `{"component" : "kube-controller-manager" }` |
-| `kubeControllerManager.service.targetPort` | Controller-manager targetPort for the service runs on | `10252` |
-| `kubeControllerManager.serviceMonitor.https` | Controller-manager service scrape over https | `false` |
-| `kubeControllerManager.serviceMonitor.insecureSkipVerify` | Skip TLS certificate validation when scraping | `null` |
-| `kubeControllerManager.serviceMonitor.interval` | Scrape interval. If not set, the Prometheus default scrape interval is used | `nil` |
-| `kubeControllerManager.serviceMonitor.metricRelabelings` | The `metric_relabel_configs` for scraping the scheduler. | `` |
-| `kubeControllerManager.serviceMonitor.relabelings` | The `relabel_configs` for scraping the scheduler. | `` |
-| `kubeControllerManager.serviceMonitor.serverName` | Name of the server to use when validating TLS certificate | `null` |
-| `kubeDns.enabled` | Deploy kubeDns scraping components. Use either this or coreDns| `false` |
-| `kubeDns.service.dnsmasq.port` | Dnsmasq service port | `10054` |
-| `kubeDns.service.dnsmasq.targetPort` | Dnsmasq service targetPort | `10054` |
-| `kubeDns.service.skydns.port` | Skydns service port | `10055` |
-| `kubeDns.service.skydns.targetPort` | Skydns service targetPort | `10055` |
-| `kubeDns.service.selector` | kubeDns service selector | `{"k8s-app" : "kube-dns" }` |
-| `kubeDns.serviceMonitor.dnsmasqMetricRelabelings` | The `metric_relabel_configs` for scraping dnsmasq kubeDns. | `` |
-| `kubeDns.serviceMonitor.dnsmasqRelabelings` | The `relabel_configs` for scraping dnsmasq kubeDns. | `` |
-| `kubeDns.serviceMonitor.interval` | Scrape interval. If not set, the Prometheus default scrape interval is used | `nil` |
-| `kubeDns.serviceMonitor.metricRelabelings` | The `metric_relabel_configs` for scraping kubeDns. | `` |
-| `kubeDns.serviceMonitor.relabelings` | The `relabel_configs` for scraping kubeDns. | `` |
-| `kubeEtcd.enabled` | Deploy components to scrape etcd | `true` |
-| `kubeEtcd.endpoints` | Endpoints where etcd runs. Provide this if running etcd outside the cluster | `[]` |
-| `kubeEtcd.service.port` | Etcd port | `4001` |
-| `kubeEtcd.service.selector` | Selector for etcd if running inside the cluster | `{"component":"etcd"}` |
-| `kubeEtcd.service.targetPort` | Etcd targetPort | `4001` |
-| `kubeEtcd.serviceMonitor.caFile` | Certificate authority file to use when connecting to etcd. See `prometheus.prometheusSpec.secrets` | `""` |
-| `kubeEtcd.serviceMonitor.certFile` | Client certificate file to use when connecting to etcd. See `prometheus.prometheusSpec.secrets` | `""` |
-| `kubeEtcd.serviceMonitor.insecureSkipVerify` | Skip validating etcd TLS certificate when scraping | `false` |
-| `kubeEtcd.serviceMonitor.interval` | Scrape interval. If not set, the Prometheus default scrape interval is used | `nil` |
-| `kubeEtcd.serviceMonitor.keyFile` | Client key file to use when connecting to etcd. See `prometheus.prometheusSpec.secrets` | `""` |
-| `kubeEtcd.serviceMonitor.metricRelabelings` | The `metric_relabel_configs` for scraping Etcd. | `` |
-| `kubeEtcd.serviceMonitor.relabelings` | The `relabel_configs` for scraping Etcd. | `` |
-| `kubeEtcd.serviceMonitor.scheme` | Etcd servicemonitor scheme | `http` |
-| `kubeEtcd.serviceMonitor.serverName` | Etcd server name to validate certificate against when scraping | `""` |
-| `kubeProxy.enabled` | Deploy a `service` and `serviceMonitor` to scrape the Kubernetes proxy | `true` |
-| `kubeProxy.endpoints` | Endpoints where proxy runs. Provide this if running proxy outside the cluster | `[]` |
-| `kubeProxy.service.port` | Kubernetes proxy port for the service runs on | `10249` |
-| `kubeProxy.service.selector` | Kubernetes proxy service selector | `{"k8s-app" : "kube-proxy" }` |
-| `kubeProxy.service.targetPort` | Kubernetes proxy targetPort for the service runs on | `10249` |
-| `kubeProxy.serviceMonitor.https` | Kubernetes proxy service scrape over https | `false` |
-| `kubeProxy.serviceMonitor.interval` | Scrape interval. If not set, the Prometheus default scrape interval is used | `nil` |
-| `kubeProxy.serviceMonitor.metricRelabelings` | The `metric_relabel_configs` for scraping the Kubernetes proxy. | `` |
-| `kubeProxy.serviceMonitor.relabelings` | The `relabel_configs` for scraping the Kubernetes proxy. | `` |
-| `kubeScheduler.enabled` | Deploy a `service` and `serviceMonitor` to scrape the Kubernetes scheduler | `true` |
-| `kubeScheduler.endpoints` | Endpoints where scheduler runs. Provide this if running scheduler outside the cluster | `[]` |
-| `kubeScheduler.service.port` | Scheduler port for the service runs on | `10251` |
-| `kubeScheduler.service.selector` | Scheduler service selector | `{"component" : "kube-scheduler" }` |
-| `kubeScheduler.service.targetPort` | Scheduler targetPort for the service runs on | `10251` |
-| `kubeScheduler.serviceMonitor.https` | Scheduler service scrape over https | `false` |
-| `kubeScheduler.serviceMonitor.insecureSkipVerify` | Skip TLS certificate validation when scraping | `null` |
-| `kubeScheduler.serviceMonitor.interval` | Scrape interval. If not set, the Prometheus default scrape interval is used | `nil` |
-| `kubeScheduler.serviceMonitor.metricRelabelings` | The `metric_relabel_configs` for scraping the Kubernetes scheduler. | `` |
-| `kubeScheduler.serviceMonitor.relabelings` | The `relabel_configs` for scraping the Kubernetes scheduler. | `` |
-| `kubeScheduler.serviceMonitor.serverName` | Name of the server to use when validating TLS certificate | `null` |
-| `kubeStateMetrics.enabled` | Deploy the `kube-state-metrics` chart and configure a servicemonitor to scrape | `true` |
-| `kubeStateMetrics.serviceMonitor.interval` | Scrape interval. If not set, the Prometheus default scrape interval is used | `nil` |
-| `kubeStateMetrics.serviceMonitor.metricRelabelings` | Metric relablings for the `kube-state-metrics` ServiceMonitor | `[]` |
-| `kubeStateMetrics.serviceMonitor.relabelings` | The `relabel_configs` for scraping `kube-state-metrics`. | `` |
-| `kubelet.enabled` | Deploy servicemonitor to scrape the kubelet service. See also `prometheusOperator.kubeletService` | `true` |
-| `kubelet.namespace` | Namespace where the kubelet is deployed. See also `prometheusOperator.kubeletService.namespace` | `kube-system` |
-| `kubelet.serviceMonitor.cAdvisor` | Enable scraping `/metrics/cadvisor` from kubelet's service | `true` |
-| `kubelet.serviceMonitor.cAdvisorMetricRelabelings` | The `metric_relabel_configs` for scraping cAdvisor. | `` |
-| `kubelet.serviceMonitor.cAdvisorRelabelings` | The `relabel_configs` for scraping cAdvisor. | `[{"sourceLabels":["__metrics_path__"], "targetLabel":"metrics_path"}]` |
-| `kubelet.serviceMonitor.https` | Enable scraping of the kubelet over HTTPS. For more information, see https://github.com/coreos/prometheus-operator/issues/926 | `true` |
-| `kubelet.serviceMonitor.interval` | Scrape interval. If not set, the Prometheus default scrape interval is used | `nil` |
-| `kubelet.serviceMonitor.metricRelabelings` | The `metric_relabel_configs` for scraping kubelet. | `` |
-| `kubelet.serviceMonitor.relabelings` | The `relabel_configs` for scraping kubelet. | `[{"sourceLabels":["__metrics_path__"], "targetLabel":"metrics_path"}]` |
-| `nodeExporter.enabled` | Deploy the `prometheus-node-exporter` and scrape it | `true` |
-| `nodeExporter.jobLabel` | The name of the label on the target service to use as the job name in prometheus. See `prometheus-node-exporter.podLabels.jobLabel=node-exporter` default | `jobLabel` |
-| `nodeExporter.serviceMonitor.interval` | Scrape interval. If not set, the Prometheus default scrape interval is used | `nil` |
-| `nodeExporter.serviceMonitor.scrapeTimeout` | How long until a scrape request times out. If not set, the Prometheus default scape timeout is used | `nil` |
-| `nodeExporter.serviceMonitor.metricRelabelings` | Metric relablings for the `prometheus-node-exporter` ServiceMonitor | `[]` |
-| `nodeExporter.serviceMonitor.relabelings` | The `relabel_configs` for scraping the `prometheus-node-exporter`. | `` |
-| `prometheus-node-exporter.extraArgs` | Additional arguments for the node exporter container | `["--collector.filesystem.ignored-mount-points=^/(dev|proc|sys|var/lib/docker/.+)($|/)", "--collector.filesystem.ignored-fs-types=^(autofs|binfmt_misc|cgroup|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|mqueue|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|sysfs|tracefs)$"]` |
-| `prometheus-node-exporter.podLabels` | Additional labels for pods in the DaemonSet | `{"jobLabel":"node-exporter"}` |
-
-
-Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
-
-```console
-$ helm install --name my-release stable/prometheus-operator --set prometheusOperator.enabled=true
-```
-
-Alternatively, one or more YAML files that specify the values for the above parameters can be provided while installing the chart. For example,
-
-```console
-$ helm install --name my-release stable/prometheus-operator -f values1.yaml,values2.yaml
-```
-
-> **Tip**: You can use the default [values.yaml](values.yaml)
+### Multiple releases
+The same chart can be used to run multiple Prometheus instances in the same cluster if required. To achieve this, it is necessary to run only one instance of prometheus-operator and a pair of alertmanager pods for an HA configuration, while all other components need to be disabled. To disable a dependency during installation, set `kubeStateMetrics.enabled`, `nodeExporter.enabled` and `grafana.enabled` to `false`.
+
+## Work-Arounds for Known Issues
+
+### Running on private GKE clusters
+
+When Google configure the control plane for private clusters, they automatically configure VPC peering between your Kubernetes cluster’s network and a separate Google managed project. In order to restrict what Google are able to access within your cluster, the firewall rules configured restrict access to your Kubernetes pods. This means that in order to use the webhook component with a GKE private cluster, you must configure an additional firewall rule to allow the GKE control plane access to your webhook pod.
+
+You can read more information on how to add firewall rules for the GKE control plane nodes in the [GKE docs](https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#add_firewall_rules)
+
+Alternatively, you can disable the hooks by setting `prometheusOperator.admissionWebhooks.enabled=false`.
## PrometheusRules Admission Webhooks
With Prometheus Operator version 0.30+, the core Prometheus Operator pod exposes an endpoint that will integrate with the `validatingwebhookconfiguration` Kubernetes feature to prevent malformed rules from being added to the cluster.
### How the Chart Configures the Hooks
+
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
### Alternatives
+
It should be possible to use [jetstack/cert-manager](https://github.com/jetstack/cert-manager) if a more complete solution is required, but it has not been tested.
+You can enable automatic self-signed TLS certificate provisioning via cert-manager by setting the `prometheusOperator.admissionWebhooks.certManager.enabled` value to true.
+
### Limitations
+
Because the operator can only run as a single pod, there is potential for this component failure to cause rule deployment failure. Because this risk is outweighed by the benefit of having validation, the feature is enabled by default.
## Developing Prometheus Rules and Grafana Dashboards
-This chart Grafana Dashboards and Prometheus Rules are just a copy from coreos/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/coreos/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
For more in-depth documentation of configuration options meanings, please see
-- [Prometheus Operator](https://github.com/coreos/prometheus-operator)
+
+- [Prometheus Operator](https://github.com/prometheus-operator/prometheus-operator)
- [Prometheus](https://prometheus.io/docs/introduction/overview/)
-- [Grafana](https://github.com/helm/charts/tree/master/stable/grafana#grafana-helm-chart)
+- [Grafana](https://github.com/grafana/helm-charts/tree/main/charts/grafana#grafana-helm-chart)
+
+## prometheus.io/scrape
+
+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/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.
+An easy way of doing this, without compromising the default PodMonitors/ServiceMonitors discovery, is allowing Prometheus to discover all PodMonitors/ServiceMonitors within its namespace, without applying label filtering.
+To do so, you can set `prometheus.prometheusSpec.podMonitorSelectorNilUsesHelmValues` and `prometheus.prometheusSpec.serviceMonitorSelectorNilUsesHelmValues` to `false`.
+
+## Migrating from stable/prometheus-operator chart
+
+## Zero downtime
+
+Since `kube-prometheus-stack` is fully compatible with the `stable/prometheus-operator` chart, a migration without downtime can be achieved.
+However, the old name prefix needs to be kept. If you want the new name please follow the step by step guide below (with downtime).
+
+You can override the name to achieve this:
+
+```console
+helm upgrade prometheus-operator prometheus-community/kube-prometheus-stack -n monitoring --reuse-values --set nameOverride=prometheus-operator
+```
+
+**Note**: It is recommended to run this first with `--dry-run --debug`.
+
+## Redeploy with new name (downtime)
+
+If the **prometheus-operator** values are compatible with the new **kube-prometheus-stack** chart, please follow the below steps for migration:
-# Migrating from coreos/prometheus-operator chart
+> The guide presumes that chart is deployed in `monitoring` namespace and the deployments are running there. If in other namespace, please replace the `monitoring` to the deployed namespace.
+
+1. Patch the PersistenceVolume created/used by the prometheus-operator chart to `Retain` claim policy:
+
+ ```console
+ kubectl patch pv/ -p '{"spec":{"persistentVolumeReclaimPolicy":"Retain"}}'
+ ```
+
+ **Note:** To execute the above command, the user must have a cluster wide permission. Please refer [Kubernetes RBAC](https://kubernetes.io/docs/reference/access-authn-authz/rbac/)
+
+2. Uninstall the **prometheus-operator** release and delete the existing PersistentVolumeClaim, and verify PV become Released.
+
+ ```console
+ helm uninstall prometheus-operator -n monitoring
+ kubectl delete pvc/ -n monitoring
+ ```
+
+ Additionally, you have to manually remove the remaining `prometheus-operator-kubelet` service.
+
+ ```console
+ kubectl delete service/prometheus-operator-kubelet -n kube-system
+ ```
+
+ You can choose to remove all your existing CRDs (ServiceMonitors, Podmonitors, etc.) if you want to.
+
+3. Remove current `spec.claimRef` values to change the PV's status from Released to Available.
+
+ ```console
+ kubectl patch pv/ --type json -p='[{"op": "remove", "path": "/spec/claimRef"}]' -n monitoring
+ ```
+
+**Note:** To execute the above command, the user must have a cluster wide permission. Please refer to [Kubernetes RBAC](https://kubernetes.io/docs/reference/access-authn-authz/rbac/)
+
+After these steps, proceed to a fresh **kube-prometheus-stack** installation and make sure the current release of **kube-prometheus-stack** matching the `volumeClaimTemplate` values in the `values.yaml`.
+
+The binding is done via matching a specific amount of storage requested and with certain access modes.
+
+For example, if you had storage specified as this with **prometheus-operator**:
+
+```yaml
+volumeClaimTemplate:
+ spec:
+ storageClassName: gp2
+ accessModes: ["ReadWriteOnce"]
+ resources:
+ requests:
+ storage: 50Gi
+```
+
+You have to specify matching `volumeClaimTemplate` with 50Gi storage and `ReadWriteOnce` access mode.
+
+Additionally, you should check the current AZ of your legacy installation's PV, and configure the fresh release to use the same AZ as the old one. If the pods are in a different AZ than the PV, the release will fail to bind the existing one, hence creating a new PV.
+
+This can be achieved either by specifying the labels through `values.yaml`, e.g. setting `prometheus.prometheusSpec.nodeSelector` to:
+
+```yaml
+nodeSelector:
+ failure-domain.beta.kubernetes.io/zone: east-west-1a
+```
+
+or passing these values as `--set` overrides during installation.
+
+The new release should now re-attach your previously released PV with its content.
+
+## Migrating from coreos/prometheus-operator chart
The multiple charts have been combined into a single chart that installs prometheus operator, prometheus, alertmanager, grafana as well as the multitude of exporters necessary to monitor a cluster.
@@ -616,27 +803,26 @@ There is no simple and direct migration path between the charts as the changes a
The capabilities of the old chart are all available in the new chart, including the ability to run multiple prometheus instances on a single cluster - you will need to disable the parts of the chart you do not wish to deploy.
-You can check out the tickets for this change [here](https://github.com/coreos/prometheus-operator/issues/592) and [here](https://github.com/helm/charts/pull/6765).
+You can check out the tickets for this change [here](https://github.com/prometheus-operator/prometheus-operator/issues/592) and [here](https://github.com/helm/charts/pull/6765).
-## High-level overview of Changes
-The chart has 3 dependencies, that can be seen in the chart's requirements file:
-https://github.com/helm/charts/blob/master/stable/prometheus-operator/requirements.yaml
+### High-level overview of Changes
-### Node-Exporter, Kube-State-Metrics
-These components are loaded as dependencies into the chart. The source for both charts is found in the same repository. They are relatively simple components.
+#### Added dependencies
-### Grafana
-The Grafana chart is more feature-rich than this chart - it contains a sidecar that is able to load data sources and dashboards from configmaps deployed into the same cluster. For more information check out the [documentation for the chart](https://github.com/helm/charts/tree/master/stable/grafana)
+The chart has added 3 [dependencies](#dependencies).
-### Coreos CRDs
-The CRDs are provisioned using crd-install hooks, rather than relying on a separate chart installation. If you already have these CRDs provisioned and don't want to remove them, you can disable the CRD creation by these hooks by passing `prometheusOperator.createCustomResource=false` (not required if using Helm v3).
+- Node-Exporter, Kube-State-Metrics: These components are loaded as dependencies into the chart, and are relatively simple components
+- Grafana: The Grafana chart is more feature-rich than this chart - it contains a sidecar that is able to load data sources and dashboards from configmaps deployed into the same cluster. For more information check out the [documentation for the chart](https://github.com/grafana/helm-charts/blob/main/charts/grafana/README.md)
+
+#### Kubelet Service
-### Kubelet Service
Because the kubelet service has a new name in the chart, make sure to clean up the old kubelet service in the `kube-system` namespace to prevent counting container metrics twice.
-### Persistent Volumes
+#### Persistent Volumes
+
If you would like to keep the data of the current persistent volumes, it should be possible to attach existing volumes to new PVCs and PVs that are created using the conventions in the new chart. For example, in order to use an existing Azure disk for a helm release called `prometheus-migration` the following resources can be created:
-```
+
+```yaml
apiVersion: v1
kind: PersistentVolume
metadata:
@@ -657,45 +843,40 @@ spec:
storageClassName: prometheus
volumeMode: Filesystem
```
-```
+
+```yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
- app: prometheus
+ app.kubernetes.io/name: prometheus
prometheus: prometheus-migration-prometheus
name: prometheus-prometheus-migration-prometheus-db-prometheus-prometheus-migration-prometheus-0
namespace: monitoring
spec:
accessModes:
- ReadWriteOnce
- dataSource: null
resources:
requests:
storage: 1Gi
storageClassName: prometheus
volumeMode: Filesystem
volumeName: pvc-prometheus-migration-prometheus-0
-status:
- accessModes:
- - ReadWriteOnce
- capacity:
- storage: 1Gi
```
The PVC will take ownership of the PV and when you create a release using a persistent volume claim template it will use the existing PVCs as they match the naming convention used by the chart. For other cloud providers similar approaches can be used.
-### KubeProxy
+#### KubeProxy
The metrics bind address of kube-proxy is default to `127.0.0.1:10249` that prometheus instances **cannot** access to. You should expose metrics by changing `metricsBindAddress` field value to `0.0.0.0:10249` if you want to collect them.
Depending on the cluster, the relevant part `config.conf` will be in ConfigMap `kube-system/kube-proxy` or `kube-system/kube-proxy-config`. For example:
-```
+```console
kubectl -n kube-system edit cm kube-proxy
```
-```
+```yaml
apiVersion: v1
data:
config.conf: |-
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/Chart.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/Chart.yaml
new file mode 100644
index 0000000000..adb9e4a5d3
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/Chart.yaml
@@ -0,0 +1,3 @@
+apiVersion: v2
+name: crds
+version: 0.0.0
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/README.md b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/README.md
new file mode 100644
index 0000000000..02092b9642
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/README.md
@@ -0,0 +1,3 @@
+# crds subchart
+
+See: [https://github.com/prometheus-community/helm-charts/issues/3548](https://github.com/prometheus-community/helm-charts/issues/3548)
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/crds/crd-alertmanagerconfigs.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/crds/crd-alertmanagerconfigs.yaml
new file mode 100644
index 0000000000..5081e805d6
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/crds/crd-alertmanagerconfigs.yaml
@@ -0,0 +1,5270 @@
+# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.68.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml
+---
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+ annotations:
+ controller-gen.kubebuilder.io/version: v0.11.1
+ creationTimestamp: null
+ name: alertmanagerconfigs.monitoring.coreos.com
+spec:
+ group: monitoring.coreos.com
+ names:
+ categories:
+ - prometheus-operator
+ kind: AlertmanagerConfig
+ listKind: AlertmanagerConfigList
+ plural: alertmanagerconfigs
+ shortNames:
+ - amcfg
+ singular: alertmanagerconfig
+ scope: Namespaced
+ versions:
+ - name: v1alpha1
+ schema:
+ openAPIV3Schema:
+ description: AlertmanagerConfig defines a namespaced AlertmanagerConfig to
+ be aggregated across multiple namespaces configuring one Alertmanager cluster.
+ properties:
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation
+ of an object. Servers should convert recognized schemas to the latest
+ internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this
+ object represents. Servers may infer this from the endpoint the client
+ submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: AlertmanagerConfigSpec is a specification of the desired
+ behavior of the Alertmanager configuration. By definition, the Alertmanager
+ configuration only applies to alerts for which the `namespace` label
+ is equal to the namespace of the AlertmanagerConfig resource.
+ properties:
+ inhibitRules:
+ description: List of inhibition rules. The rules will only apply to
+ alerts matching the resource's namespace.
+ items:
+ description: InhibitRule defines an inhibition rule that allows
+ to mute alerts when other alerts are already firing. See https://prometheus.io/docs/alerting/latest/configuration/#inhibit_rule
+ properties:
+ equal:
+ description: Labels that must have an equal value in the source
+ and target alert for the inhibition to take effect.
+ items:
+ type: string
+ type: array
+ sourceMatch:
+ description: Matchers for which one or more alerts have to exist
+ for the inhibition to take effect. The operator enforces that
+ the alert matches the resource's namespace.
+ items:
+ description: Matcher defines how to match on alert's labels.
+ properties:
+ matchType:
+ description: Match operation available with AlertManager
+ >= v0.22.0 and takes precedence over Regex (deprecated)
+ if non-empty.
+ enum:
+ - '!='
+ - =
+ - =~
+ - '!~'
+ type: string
+ name:
+ description: Label to match.
+ minLength: 1
+ type: string
+ regex:
+ description: Whether to match on equality (false) or regular-expression
+ (true). Deprecated as of AlertManager >= v0.22.0 where
+ a user should use MatchType instead.
+ type: boolean
+ value:
+ description: Label value to match.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ targetMatch:
+ description: Matchers that have to be fulfilled in the alerts
+ to be muted. The operator enforces that the alert matches
+ the resource's namespace.
+ items:
+ description: Matcher defines how to match on alert's labels.
+ properties:
+ matchType:
+ description: Match operation available with AlertManager
+ >= v0.22.0 and takes precedence over Regex (deprecated)
+ if non-empty.
+ enum:
+ - '!='
+ - =
+ - =~
+ - '!~'
+ type: string
+ name:
+ description: Label to match.
+ minLength: 1
+ type: string
+ regex:
+ description: Whether to match on equality (false) or regular-expression
+ (true). Deprecated as of AlertManager >= v0.22.0 where
+ a user should use MatchType instead.
+ type: boolean
+ value:
+ description: Label value to match.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ type: object
+ type: array
+ muteTimeIntervals:
+ description: List of MuteTimeInterval specifying when the routes should
+ be muted.
+ items:
+ description: MuteTimeInterval specifies the periods in time when
+ notifications will be muted
+ properties:
+ name:
+ description: Name of the time interval
+ type: string
+ timeIntervals:
+ description: TimeIntervals is a list of TimeInterval
+ items:
+ description: TimeInterval describes intervals of time
+ properties:
+ daysOfMonth:
+ description: DaysOfMonth is a list of DayOfMonthRange
+ items:
+ description: DayOfMonthRange is an inclusive range of
+ days of the month beginning at 1
+ properties:
+ end:
+ description: End of the inclusive range
+ maximum: 31
+ minimum: -31
+ type: integer
+ start:
+ description: Start of the inclusive range
+ maximum: 31
+ minimum: -31
+ type: integer
+ type: object
+ type: array
+ months:
+ description: Months is a list of MonthRange
+ items:
+ description: MonthRange is an inclusive range of months
+ of the year beginning in January Months can be specified
+ by name (e.g 'January') by numerical month (e.g '1')
+ or as an inclusive range (e.g 'January:March', '1:3',
+ '1:March')
+ pattern: ^((?i)january|february|march|april|may|june|july|august|september|october|november|december|[1-12])(?:((:((?i)january|february|march|april|may|june|july|august|september|october|november|december|[1-12]))$)|$)
+ type: string
+ type: array
+ times:
+ description: Times is a list of TimeRange
+ items:
+ description: TimeRange defines a start and end time
+ in 24hr format
+ properties:
+ endTime:
+ description: EndTime is the end time in 24hr format.
+ pattern: ^((([01][0-9])|(2[0-3])):[0-5][0-9])$|(^24:00$)
+ type: string
+ startTime:
+ description: StartTime is the start time in 24hr
+ format.
+ pattern: ^((([01][0-9])|(2[0-3])):[0-5][0-9])$|(^24:00$)
+ type: string
+ type: object
+ type: array
+ weekdays:
+ description: Weekdays is a list of WeekdayRange
+ items:
+ description: WeekdayRange is an inclusive range of days
+ of the week beginning on Sunday Days can be specified
+ by name (e.g 'Sunday') or as an inclusive range (e.g
+ 'Monday:Friday')
+ pattern: ^((?i)sun|mon|tues|wednes|thurs|fri|satur)day(?:((:(sun|mon|tues|wednes|thurs|fri|satur)day)$)|$)
+ type: string
+ type: array
+ years:
+ description: Years is a list of YearRange
+ items:
+ description: YearRange is an inclusive range of years
+ pattern: ^2\d{3}(?::2\d{3}|$)
+ type: string
+ type: array
+ type: object
+ type: array
+ type: object
+ type: array
+ receivers:
+ description: List of receivers.
+ items:
+ description: Receiver defines one or more notification integrations.
+ properties:
+ discordConfigs:
+ description: List of Discord configurations.
+ items:
+ description: DiscordConfig configures notifications via Discord.
+ See https://prometheus.io/docs/alerting/latest/configuration/#discord_config
+ properties:
+ apiURL:
+ description: The secret's key that contains the Discord
+ webhook URL. The secret needs to be in the same namespace
+ as the AlertmanagerConfig object and accessible by the
+ Prometheus Operator.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ httpConfig:
+ description: HTTP client configuration.
+ properties:
+ authorization:
+ description: Authorization header configuration for
+ the client. This is mutually exclusive with BasicAuth
+ and is only available starting from Alertmanager
+ v0.22+.
+ properties:
+ credentials:
+ description: Selects a key of a Secret in the
+ namespace that contains the credentials for
+ authentication.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type:
+ description: "Defines the authentication type.
+ The value is case-insensitive. \n \"Basic\"
+ is not a supported value. \n Default: \"Bearer\""
+ type: string
+ type: object
+ basicAuth:
+ description: BasicAuth for the client. This is mutually
+ exclusive with Authorization. If both are defined,
+ BasicAuth takes precedence.
+ properties:
+ password:
+ description: The secret in the service monitor
+ namespace that contains the password for authentication.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ username:
+ description: The secret in the service monitor
+ namespace that contains the username for authentication.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ bearerTokenSecret:
+ description: The secret's key that contains the bearer
+ token to be used by the client for authentication.
+ The secret needs to be in the same namespace as
+ the AlertmanagerConfig object and accessible by
+ the Prometheus Operator.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ followRedirects:
+ description: FollowRedirects specifies whether the
+ client should follow HTTP 3xx redirects.
+ type: boolean
+ oauth2:
+ description: OAuth2 client credentials used to fetch
+ a token for the targets.
+ properties:
+ clientId:
+ description: The secret or configmap containing
+ the OAuth2 client id
+ properties:
+ configMap:
+ description: ConfigMap containing data to
+ use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key of the secret to
+ select from. Must be a valid secret
+ key.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ clientSecret:
+ description: The secret containing the OAuth2
+ client secret
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ endpointParams:
+ additionalProperties:
+ type: string
+ description: Parameters to append to the token
+ URL
+ type: object
+ scopes:
+ description: OAuth2 scopes used for the token
+ request
+ items:
+ type: string
+ type: array
+ tokenUrl:
+ description: The URL to fetch the token from
+ minLength: 1
+ type: string
+ required:
+ - clientId
+ - clientSecret
+ - tokenUrl
+ type: object
+ proxyURL:
+ description: Optional proxy URL.
+ type: string
+ tlsConfig:
+ description: TLS configuration for the client.
+ properties:
+ ca:
+ description: Certificate authority used when verifying
+ server certificates.
+ properties:
+ configMap:
+ description: ConfigMap containing data to
+ use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key of the secret to
+ select from. Must be a valid secret
+ key.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ cert:
+ description: Client certificate to present when
+ doing client-authentication.
+ properties:
+ configMap:
+ description: ConfigMap containing data to
+ use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key of the secret to
+ select from. Must be a valid secret
+ key.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ insecureSkipVerify:
+ description: Disable target certificate validation.
+ type: boolean
+ keySecret:
+ description: Secret containing the client key
+ file for the targets.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ serverName:
+ description: Used to verify the hostname for the
+ targets.
+ type: string
+ type: object
+ type: object
+ message:
+ description: The template of the message's body.
+ type: string
+ sendResolved:
+ description: Whether or not to notify about resolved alerts.
+ type: boolean
+ title:
+ description: The template of the message's title.
+ type: string
+ required:
+ - apiURL
+ type: object
+ type: array
+ emailConfigs:
+ description: List of Email configurations.
+ items:
+ description: EmailConfig configures notifications via Email.
+ properties:
+ authIdentity:
+ description: The identity to use for authentication.
+ type: string
+ authPassword:
+ description: The secret's key that contains the password
+ to use for authentication. The secret needs to be in
+ the same namespace as the AlertmanagerConfig object
+ and accessible by the Prometheus Operator.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ authSecret:
+ description: The secret's key that contains the CRAM-MD5
+ secret. The secret needs to be in the same namespace
+ as the AlertmanagerConfig object and accessible by the
+ Prometheus Operator.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ authUsername:
+ description: The username to use for authentication.
+ type: string
+ from:
+ description: The sender address.
+ type: string
+ headers:
+ description: Further headers email header key/value pairs.
+ Overrides any headers previously set by the notification
+ implementation.
+ items:
+ description: KeyValue defines a (key, value) tuple.
+ properties:
+ key:
+ description: Key of the tuple.
+ minLength: 1
+ type: string
+ value:
+ description: Value of the tuple.
+ type: string
+ required:
+ - key
+ - value
+ type: object
+ type: array
+ hello:
+ description: The hostname to identify to the SMTP server.
+ type: string
+ html:
+ description: The HTML body of the email notification.
+ type: string
+ requireTLS:
+ description: The SMTP TLS requirement. Note that Go does
+ not support unencrypted connections to remote SMTP endpoints.
+ type: boolean
+ sendResolved:
+ description: Whether or not to notify about resolved alerts.
+ type: boolean
+ smarthost:
+ description: The SMTP host and port through which emails
+ are sent. E.g. example.com:25
+ type: string
+ text:
+ description: The text body of the email notification.
+ type: string
+ tlsConfig:
+ description: TLS configuration
+ properties:
+ ca:
+ description: Certificate authority used when verifying
+ server certificates.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for
+ the targets.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ cert:
+ description: Client certificate to present when doing
+ client-authentication.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for
+ the targets.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ insecureSkipVerify:
+ description: Disable target certificate validation.
+ type: boolean
+ keySecret:
+ description: Secret containing the client key file
+ for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ serverName:
+ description: Used to verify the hostname for the targets.
+ type: string
+ type: object
+ to:
+ description: The email address to send notifications to.
+ type: string
+ type: object
+ type: array
+ name:
+ description: Name of the receiver. Must be unique across all
+ items from the list.
+ minLength: 1
+ type: string
+ opsgenieConfigs:
+ description: List of OpsGenie configurations.
+ items:
+ description: OpsGenieConfig configures notifications via OpsGenie.
+ See https://prometheus.io/docs/alerting/latest/configuration/#opsgenie_config
+ properties:
+ actions:
+ description: Comma separated list of actions that will
+ be available for the alert.
+ type: string
+ apiKey:
+ description: The secret's key that contains the OpsGenie
+ API key. The secret needs to be in the same namespace
+ as the AlertmanagerConfig object and accessible by the
+ Prometheus Operator.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ apiURL:
+ description: The URL to send OpsGenie API requests to.
+ type: string
+ description:
+ description: Description of the incident.
+ type: string
+ details:
+ description: A set of arbitrary key/value pairs that provide
+ further detail about the incident.
+ items:
+ description: KeyValue defines a (key, value) tuple.
+ properties:
+ key:
+ description: Key of the tuple.
+ minLength: 1
+ type: string
+ value:
+ description: Value of the tuple.
+ type: string
+ required:
+ - key
+ - value
+ type: object
+ type: array
+ entity:
+ description: Optional field that can be used to specify
+ which domain alert is related to.
+ type: string
+ httpConfig:
+ description: HTTP client configuration.
+ properties:
+ authorization:
+ description: Authorization header configuration for
+ the client. This is mutually exclusive with BasicAuth
+ and is only available starting from Alertmanager
+ v0.22+.
+ properties:
+ credentials:
+ description: Selects a key of a Secret in the
+ namespace that contains the credentials for
+ authentication.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type:
+ description: "Defines the authentication type.
+ The value is case-insensitive. \n \"Basic\"
+ is not a supported value. \n Default: \"Bearer\""
+ type: string
+ type: object
+ basicAuth:
+ description: BasicAuth for the client. This is mutually
+ exclusive with Authorization. If both are defined,
+ BasicAuth takes precedence.
+ properties:
+ password:
+ description: The secret in the service monitor
+ namespace that contains the password for authentication.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ username:
+ description: The secret in the service monitor
+ namespace that contains the username for authentication.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ bearerTokenSecret:
+ description: The secret's key that contains the bearer
+ token to be used by the client for authentication.
+ The secret needs to be in the same namespace as
+ the AlertmanagerConfig object and accessible by
+ the Prometheus Operator.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ followRedirects:
+ description: FollowRedirects specifies whether the
+ client should follow HTTP 3xx redirects.
+ type: boolean
+ oauth2:
+ description: OAuth2 client credentials used to fetch
+ a token for the targets.
+ properties:
+ clientId:
+ description: The secret or configmap containing
+ the OAuth2 client id
+ properties:
+ configMap:
+ description: ConfigMap containing data to
+ use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key of the secret to
+ select from. Must be a valid secret
+ key.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ clientSecret:
+ description: The secret containing the OAuth2
+ client secret
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ endpointParams:
+ additionalProperties:
+ type: string
+ description: Parameters to append to the token
+ URL
+ type: object
+ scopes:
+ description: OAuth2 scopes used for the token
+ request
+ items:
+ type: string
+ type: array
+ tokenUrl:
+ description: The URL to fetch the token from
+ minLength: 1
+ type: string
+ required:
+ - clientId
+ - clientSecret
+ - tokenUrl
+ type: object
+ proxyURL:
+ description: Optional proxy URL.
+ type: string
+ tlsConfig:
+ description: TLS configuration for the client.
+ properties:
+ ca:
+ description: Certificate authority used when verifying
+ server certificates.
+ properties:
+ configMap:
+ description: ConfigMap containing data to
+ use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key of the secret to
+ select from. Must be a valid secret
+ key.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ cert:
+ description: Client certificate to present when
+ doing client-authentication.
+ properties:
+ configMap:
+ description: ConfigMap containing data to
+ use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key of the secret to
+ select from. Must be a valid secret
+ key.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ insecureSkipVerify:
+ description: Disable target certificate validation.
+ type: boolean
+ keySecret:
+ description: Secret containing the client key
+ file for the targets.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ serverName:
+ description: Used to verify the hostname for the
+ targets.
+ type: string
+ type: object
+ type: object
+ message:
+ description: Alert text limited to 130 characters.
+ type: string
+ note:
+ description: Additional alert note.
+ type: string
+ priority:
+ description: Priority level of alert. Possible values
+ are P1, P2, P3, P4, and P5.
+ type: string
+ responders:
+ description: List of responders responsible for notifications.
+ items:
+ description: OpsGenieConfigResponder defines a responder
+ to an incident. One of `id`, `name` or `username`
+ has to be defined.
+ properties:
+ id:
+ description: ID of the responder.
+ type: string
+ name:
+ description: Name of the responder.
+ type: string
+ type:
+ description: Type of responder.
+ enum:
+ - team
+ - teams
+ - user
+ - escalation
+ - schedule
+ minLength: 1
+ type: string
+ username:
+ description: Username of the responder.
+ type: string
+ required:
+ - type
+ type: object
+ type: array
+ sendResolved:
+ description: Whether or not to notify about resolved alerts.
+ type: boolean
+ source:
+ description: Backlink to the sender of the notification.
+ type: string
+ tags:
+ description: Comma separated list of tags attached to
+ the notifications.
+ type: string
+ updateAlerts:
+ description: Whether to update message and description
+ of the alert in OpsGenie if it already exists By default,
+ the alert is never updated in OpsGenie, the new message
+ only appears in activity log.
+ type: boolean
+ type: object
+ type: array
+ pagerdutyConfigs:
+ description: List of PagerDuty configurations.
+ items:
+ description: PagerDutyConfig configures notifications via
+ PagerDuty. See https://prometheus.io/docs/alerting/latest/configuration/#pagerduty_config
+ properties:
+ class:
+ description: The class/type of the event.
+ type: string
+ client:
+ description: Client identification.
+ type: string
+ clientURL:
+ description: Backlink to the sender of notification.
+ type: string
+ component:
+ description: The part or component of the affected system
+ that is broken.
+ type: string
+ description:
+ description: Description of the incident.
+ type: string
+ details:
+ description: Arbitrary key/value pairs that provide further
+ detail about the incident.
+ items:
+ description: KeyValue defines a (key, value) tuple.
+ properties:
+ key:
+ description: Key of the tuple.
+ minLength: 1
+ type: string
+ value:
+ description: Value of the tuple.
+ type: string
+ required:
+ - key
+ - value
+ type: object
+ type: array
+ group:
+ description: A cluster or grouping of sources.
+ type: string
+ httpConfig:
+ description: HTTP client configuration.
+ properties:
+ authorization:
+ description: Authorization header configuration for
+ the client. This is mutually exclusive with BasicAuth
+ and is only available starting from Alertmanager
+ v0.22+.
+ properties:
+ credentials:
+ description: Selects a key of a Secret in the
+ namespace that contains the credentials for
+ authentication.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type:
+ description: "Defines the authentication type.
+ The value is case-insensitive. \n \"Basic\"
+ is not a supported value. \n Default: \"Bearer\""
+ type: string
+ type: object
+ basicAuth:
+ description: BasicAuth for the client. This is mutually
+ exclusive with Authorization. If both are defined,
+ BasicAuth takes precedence.
+ properties:
+ password:
+ description: The secret in the service monitor
+ namespace that contains the password for authentication.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ username:
+ description: The secret in the service monitor
+ namespace that contains the username for authentication.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ bearerTokenSecret:
+ description: The secret's key that contains the bearer
+ token to be used by the client for authentication.
+ The secret needs to be in the same namespace as
+ the AlertmanagerConfig object and accessible by
+ the Prometheus Operator.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ followRedirects:
+ description: FollowRedirects specifies whether the
+ client should follow HTTP 3xx redirects.
+ type: boolean
+ oauth2:
+ description: OAuth2 client credentials used to fetch
+ a token for the targets.
+ properties:
+ clientId:
+ description: The secret or configmap containing
+ the OAuth2 client id
+ properties:
+ configMap:
+ description: ConfigMap containing data to
+ use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key of the secret to
+ select from. Must be a valid secret
+ key.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ clientSecret:
+ description: The secret containing the OAuth2
+ client secret
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ endpointParams:
+ additionalProperties:
+ type: string
+ description: Parameters to append to the token
+ URL
+ type: object
+ scopes:
+ description: OAuth2 scopes used for the token
+ request
+ items:
+ type: string
+ type: array
+ tokenUrl:
+ description: The URL to fetch the token from
+ minLength: 1
+ type: string
+ required:
+ - clientId
+ - clientSecret
+ - tokenUrl
+ type: object
+ proxyURL:
+ description: Optional proxy URL.
+ type: string
+ tlsConfig:
+ description: TLS configuration for the client.
+ properties:
+ ca:
+ description: Certificate authority used when verifying
+ server certificates.
+ properties:
+ configMap:
+ description: ConfigMap containing data to
+ use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key of the secret to
+ select from. Must be a valid secret
+ key.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ cert:
+ description: Client certificate to present when
+ doing client-authentication.
+ properties:
+ configMap:
+ description: ConfigMap containing data to
+ use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key of the secret to
+ select from. Must be a valid secret
+ key.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ insecureSkipVerify:
+ description: Disable target certificate validation.
+ type: boolean
+ keySecret:
+ description: Secret containing the client key
+ file for the targets.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ serverName:
+ description: Used to verify the hostname for the
+ targets.
+ type: string
+ type: object
+ type: object
+ pagerDutyImageConfigs:
+ description: A list of image details to attach that provide
+ further detail about an incident.
+ items:
+ description: PagerDutyImageConfig attaches images to
+ an incident
+ properties:
+ alt:
+ description: Alt is the optional alternative text
+ for the image.
+ type: string
+ href:
+ description: Optional URL; makes the image a clickable
+ link.
+ type: string
+ src:
+ description: Src of the image being attached to
+ the incident
+ type: string
+ type: object
+ type: array
+ pagerDutyLinkConfigs:
+ description: A list of link details to attach that provide
+ further detail about an incident.
+ items:
+ description: PagerDutyLinkConfig attaches text links
+ to an incident
+ properties:
+ alt:
+ description: Text that describes the purpose of
+ the link, and can be used as the link's text.
+ type: string
+ href:
+ description: Href is the URL of the link to be attached
+ type: string
+ type: object
+ type: array
+ routingKey:
+ description: The secret's key that contains the PagerDuty
+ integration key (when using Events API v2). Either this
+ field or `serviceKey` needs to be defined. The secret
+ needs to be in the same namespace as the AlertmanagerConfig
+ object and accessible by the Prometheus Operator.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ sendResolved:
+ description: Whether or not to notify about resolved alerts.
+ type: boolean
+ serviceKey:
+ description: The secret's key that contains the PagerDuty
+ service key (when using integration type "Prometheus").
+ Either this field or `routingKey` needs to be defined.
+ The secret needs to be in the same namespace as the
+ AlertmanagerConfig object and accessible by the Prometheus
+ Operator.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ severity:
+ description: Severity of the incident.
+ type: string
+ url:
+ description: The URL to send requests to.
+ type: string
+ type: object
+ type: array
+ pushoverConfigs:
+ description: List of Pushover configurations.
+ items:
+ description: PushoverConfig configures notifications via Pushover.
+ See https://prometheus.io/docs/alerting/latest/configuration/#pushover_config
+ properties:
+ expire:
+ description: How long your notification will continue
+ to be retried for, unless the user acknowledges the
+ notification.
+ pattern: ^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$
+ type: string
+ html:
+ description: Whether notification message is HTML or plain
+ text.
+ type: boolean
+ httpConfig:
+ description: HTTP client configuration.
+ properties:
+ authorization:
+ description: Authorization header configuration for
+ the client. This is mutually exclusive with BasicAuth
+ and is only available starting from Alertmanager
+ v0.22+.
+ properties:
+ credentials:
+ description: Selects a key of a Secret in the
+ namespace that contains the credentials for
+ authentication.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type:
+ description: "Defines the authentication type.
+ The value is case-insensitive. \n \"Basic\"
+ is not a supported value. \n Default: \"Bearer\""
+ type: string
+ type: object
+ basicAuth:
+ description: BasicAuth for the client. This is mutually
+ exclusive with Authorization. If both are defined,
+ BasicAuth takes precedence.
+ properties:
+ password:
+ description: The secret in the service monitor
+ namespace that contains the password for authentication.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ username:
+ description: The secret in the service monitor
+ namespace that contains the username for authentication.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ bearerTokenSecret:
+ description: The secret's key that contains the bearer
+ token to be used by the client for authentication.
+ The secret needs to be in the same namespace as
+ the AlertmanagerConfig object and accessible by
+ the Prometheus Operator.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ followRedirects:
+ description: FollowRedirects specifies whether the
+ client should follow HTTP 3xx redirects.
+ type: boolean
+ oauth2:
+ description: OAuth2 client credentials used to fetch
+ a token for the targets.
+ properties:
+ clientId:
+ description: The secret or configmap containing
+ the OAuth2 client id
+ properties:
+ configMap:
+ description: ConfigMap containing data to
+ use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key of the secret to
+ select from. Must be a valid secret
+ key.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ clientSecret:
+ description: The secret containing the OAuth2
+ client secret
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ endpointParams:
+ additionalProperties:
+ type: string
+ description: Parameters to append to the token
+ URL
+ type: object
+ scopes:
+ description: OAuth2 scopes used for the token
+ request
+ items:
+ type: string
+ type: array
+ tokenUrl:
+ description: The URL to fetch the token from
+ minLength: 1
+ type: string
+ required:
+ - clientId
+ - clientSecret
+ - tokenUrl
+ type: object
+ proxyURL:
+ description: Optional proxy URL.
+ type: string
+ tlsConfig:
+ description: TLS configuration for the client.
+ properties:
+ ca:
+ description: Certificate authority used when verifying
+ server certificates.
+ properties:
+ configMap:
+ description: ConfigMap containing data to
+ use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key of the secret to
+ select from. Must be a valid secret
+ key.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ cert:
+ description: Client certificate to present when
+ doing client-authentication.
+ properties:
+ configMap:
+ description: ConfigMap containing data to
+ use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key of the secret to
+ select from. Must be a valid secret
+ key.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ insecureSkipVerify:
+ description: Disable target certificate validation.
+ type: boolean
+ keySecret:
+ description: Secret containing the client key
+ file for the targets.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ serverName:
+ description: Used to verify the hostname for the
+ targets.
+ type: string
+ type: object
+ type: object
+ message:
+ description: Notification message.
+ type: string
+ priority:
+ description: Priority, see https://pushover.net/api#priority
+ type: string
+ retry:
+ description: How often the Pushover servers will send
+ the same notification to the user. Must be at least
+ 30 seconds.
+ pattern: ^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$
+ type: string
+ sendResolved:
+ description: Whether or not to notify about resolved alerts.
+ type: boolean
+ sound:
+ description: The name of one of the sounds supported by
+ device clients to override the user's default sound
+ choice
+ type: string
+ title:
+ description: Notification title.
+ type: string
+ token:
+ description: The secret's key that contains the registered
+ application's API token, see https://pushover.net/apps.
+ The secret needs to be in the same namespace as the
+ AlertmanagerConfig object and accessible by the Prometheus
+ Operator.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ url:
+ description: A supplementary URL shown alongside the message.
+ type: string
+ urlTitle:
+ description: A title for supplementary URL, otherwise
+ just the URL is shown
+ type: string
+ userKey:
+ description: The secret's key that contains the recipient
+ user's user key. The secret needs to be in the same
+ namespace as the AlertmanagerConfig object and accessible
+ by the Prometheus Operator.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ type: object
+ type: array
+ slackConfigs:
+ description: List of Slack configurations.
+ items:
+ description: SlackConfig configures notifications via Slack.
+ See https://prometheus.io/docs/alerting/latest/configuration/#slack_config
+ properties:
+ actions:
+ description: A list of Slack actions that are sent with
+ each notification.
+ items:
+ description: SlackAction configures a single Slack action
+ that is sent with each notification. See https://api.slack.com/docs/message-attachments#action_fields
+ and https://api.slack.com/docs/message-buttons for
+ more information.
+ properties:
+ confirm:
+ description: SlackConfirmationField protect users
+ from destructive actions or particularly distinguished
+ decisions by asking them to confirm their button
+ click one more time. See https://api.slack.com/docs/interactive-message-field-guide#confirmation_fields
+ for more information.
+ properties:
+ dismissText:
+ type: string
+ okText:
+ type: string
+ text:
+ minLength: 1
+ type: string
+ title:
+ type: string
+ required:
+ - text
+ type: object
+ name:
+ type: string
+ style:
+ type: string
+ text:
+ minLength: 1
+ type: string
+ type:
+ minLength: 1
+ type: string
+ url:
+ type: string
+ value:
+ type: string
+ required:
+ - text
+ - type
+ type: object
+ type: array
+ apiURL:
+ description: The secret's key that contains the Slack
+ webhook URL. The secret needs to be in the same namespace
+ as the AlertmanagerConfig object and accessible by the
+ Prometheus Operator.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ callbackId:
+ type: string
+ channel:
+ description: The channel or user to send notifications
+ to.
+ type: string
+ color:
+ type: string
+ fallback:
+ type: string
+ fields:
+ description: A list of Slack fields that are sent with
+ each notification.
+ items:
+ description: SlackField configures a single Slack field
+ that is sent with each notification. Each field must
+ contain a title, value, and optionally, a boolean
+ value to indicate if the field is short enough to
+ be displayed next to other fields designated as short.
+ See https://api.slack.com/docs/message-attachments#fields
+ for more information.
+ properties:
+ short:
+ type: boolean
+ title:
+ minLength: 1
+ type: string
+ value:
+ minLength: 1
+ type: string
+ required:
+ - title
+ - value
+ type: object
+ type: array
+ footer:
+ type: string
+ httpConfig:
+ description: HTTP client configuration.
+ properties:
+ authorization:
+ description: Authorization header configuration for
+ the client. This is mutually exclusive with BasicAuth
+ and is only available starting from Alertmanager
+ v0.22+.
+ properties:
+ credentials:
+ description: Selects a key of a Secret in the
+ namespace that contains the credentials for
+ authentication.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type:
+ description: "Defines the authentication type.
+ The value is case-insensitive. \n \"Basic\"
+ is not a supported value. \n Default: \"Bearer\""
+ type: string
+ type: object
+ basicAuth:
+ description: BasicAuth for the client. This is mutually
+ exclusive with Authorization. If both are defined,
+ BasicAuth takes precedence.
+ properties:
+ password:
+ description: The secret in the service monitor
+ namespace that contains the password for authentication.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ username:
+ description: The secret in the service monitor
+ namespace that contains the username for authentication.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ bearerTokenSecret:
+ description: The secret's key that contains the bearer
+ token to be used by the client for authentication.
+ The secret needs to be in the same namespace as
+ the AlertmanagerConfig object and accessible by
+ the Prometheus Operator.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ followRedirects:
+ description: FollowRedirects specifies whether the
+ client should follow HTTP 3xx redirects.
+ type: boolean
+ oauth2:
+ description: OAuth2 client credentials used to fetch
+ a token for the targets.
+ properties:
+ clientId:
+ description: The secret or configmap containing
+ the OAuth2 client id
+ properties:
+ configMap:
+ description: ConfigMap containing data to
+ use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key of the secret to
+ select from. Must be a valid secret
+ key.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ clientSecret:
+ description: The secret containing the OAuth2
+ client secret
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ endpointParams:
+ additionalProperties:
+ type: string
+ description: Parameters to append to the token
+ URL
+ type: object
+ scopes:
+ description: OAuth2 scopes used for the token
+ request
+ items:
+ type: string
+ type: array
+ tokenUrl:
+ description: The URL to fetch the token from
+ minLength: 1
+ type: string
+ required:
+ - clientId
+ - clientSecret
+ - tokenUrl
+ type: object
+ proxyURL:
+ description: Optional proxy URL.
+ type: string
+ tlsConfig:
+ description: TLS configuration for the client.
+ properties:
+ ca:
+ description: Certificate authority used when verifying
+ server certificates.
+ properties:
+ configMap:
+ description: ConfigMap containing data to
+ use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key of the secret to
+ select from. Must be a valid secret
+ key.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ cert:
+ description: Client certificate to present when
+ doing client-authentication.
+ properties:
+ configMap:
+ description: ConfigMap containing data to
+ use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key of the secret to
+ select from. Must be a valid secret
+ key.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ insecureSkipVerify:
+ description: Disable target certificate validation.
+ type: boolean
+ keySecret:
+ description: Secret containing the client key
+ file for the targets.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ serverName:
+ description: Used to verify the hostname for the
+ targets.
+ type: string
+ type: object
+ type: object
+ iconEmoji:
+ type: string
+ iconURL:
+ type: string
+ imageURL:
+ type: string
+ linkNames:
+ type: boolean
+ mrkdwnIn:
+ items:
+ type: string
+ type: array
+ pretext:
+ type: string
+ sendResolved:
+ description: Whether or not to notify about resolved alerts.
+ type: boolean
+ shortFields:
+ type: boolean
+ text:
+ type: string
+ thumbURL:
+ type: string
+ title:
+ type: string
+ titleLink:
+ type: string
+ username:
+ type: string
+ type: object
+ type: array
+ snsConfigs:
+ description: List of SNS configurations
+ items:
+ description: SNSConfig configures notifications via AWS SNS.
+ See https://prometheus.io/docs/alerting/latest/configuration/#sns_configs
+ properties:
+ apiURL:
+ description: The SNS API URL i.e. https://sns.us-east-2.amazonaws.com.
+ If not specified, the SNS API URL from the SNS SDK will
+ be used.
+ type: string
+ attributes:
+ additionalProperties:
+ type: string
+ description: SNS message attributes.
+ type: object
+ httpConfig:
+ description: HTTP client configuration.
+ properties:
+ authorization:
+ description: Authorization header configuration for
+ the client. This is mutually exclusive with BasicAuth
+ and is only available starting from Alertmanager
+ v0.22+.
+ properties:
+ credentials:
+ description: Selects a key of a Secret in the
+ namespace that contains the credentials for
+ authentication.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type:
+ description: "Defines the authentication type.
+ The value is case-insensitive. \n \"Basic\"
+ is not a supported value. \n Default: \"Bearer\""
+ type: string
+ type: object
+ basicAuth:
+ description: BasicAuth for the client. This is mutually
+ exclusive with Authorization. If both are defined,
+ BasicAuth takes precedence.
+ properties:
+ password:
+ description: The secret in the service monitor
+ namespace that contains the password for authentication.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ username:
+ description: The secret in the service monitor
+ namespace that contains the username for authentication.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ bearerTokenSecret:
+ description: The secret's key that contains the bearer
+ token to be used by the client for authentication.
+ The secret needs to be in the same namespace as
+ the AlertmanagerConfig object and accessible by
+ the Prometheus Operator.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ followRedirects:
+ description: FollowRedirects specifies whether the
+ client should follow HTTP 3xx redirects.
+ type: boolean
+ oauth2:
+ description: OAuth2 client credentials used to fetch
+ a token for the targets.
+ properties:
+ clientId:
+ description: The secret or configmap containing
+ the OAuth2 client id
+ properties:
+ configMap:
+ description: ConfigMap containing data to
+ use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key of the secret to
+ select from. Must be a valid secret
+ key.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ clientSecret:
+ description: The secret containing the OAuth2
+ client secret
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ endpointParams:
+ additionalProperties:
+ type: string
+ description: Parameters to append to the token
+ URL
+ type: object
+ scopes:
+ description: OAuth2 scopes used for the token
+ request
+ items:
+ type: string
+ type: array
+ tokenUrl:
+ description: The URL to fetch the token from
+ minLength: 1
+ type: string
+ required:
+ - clientId
+ - clientSecret
+ - tokenUrl
+ type: object
+ proxyURL:
+ description: Optional proxy URL.
+ type: string
+ tlsConfig:
+ description: TLS configuration for the client.
+ properties:
+ ca:
+ description: Certificate authority used when verifying
+ server certificates.
+ properties:
+ configMap:
+ description: ConfigMap containing data to
+ use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key of the secret to
+ select from. Must be a valid secret
+ key.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ cert:
+ description: Client certificate to present when
+ doing client-authentication.
+ properties:
+ configMap:
+ description: ConfigMap containing data to
+ use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key of the secret to
+ select from. Must be a valid secret
+ key.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ insecureSkipVerify:
+ description: Disable target certificate validation.
+ type: boolean
+ keySecret:
+ description: Secret containing the client key
+ file for the targets.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ serverName:
+ description: Used to verify the hostname for the
+ targets.
+ type: string
+ type: object
+ type: object
+ message:
+ description: The message content of the SNS notification.
+ type: string
+ phoneNumber:
+ description: Phone number if message is delivered via
+ SMS in E.164 format. If you don't specify this value,
+ you must specify a value for the TopicARN or TargetARN.
+ type: string
+ sendResolved:
+ description: Whether or not to notify about resolved alerts.
+ type: boolean
+ sigv4:
+ description: Configures AWS's Signature Verification 4
+ signing process to sign requests.
+ properties:
+ accessKey:
+ description: AccessKey is the AWS API key. If not
+ specified, the environment variable `AWS_ACCESS_KEY_ID`
+ is used.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ profile:
+ description: Profile is the named AWS profile used
+ to authenticate.
+ type: string
+ region:
+ description: Region is the AWS region. If blank, the
+ region from the default credentials chain used.
+ type: string
+ roleArn:
+ description: RoleArn is the named AWS profile used
+ to authenticate.
+ type: string
+ secretKey:
+ description: SecretKey is the AWS API secret. If not
+ specified, the environment variable `AWS_SECRET_ACCESS_KEY`
+ is used.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ subject:
+ description: Subject line when the message is delivered
+ to email endpoints.
+ type: string
+ targetARN:
+ description: The mobile platform endpoint ARN if message
+ is delivered via mobile notifications. If you don't
+ specify this value, you must specify a value for the
+ topic_arn or PhoneNumber.
+ type: string
+ topicARN:
+ description: SNS topic ARN, i.e. arn:aws:sns:us-east-2:698519295917:My-Topic
+ If you don't specify this value, you must specify a
+ value for the PhoneNumber or TargetARN.
+ type: string
+ type: object
+ type: array
+ telegramConfigs:
+ description: List of Telegram configurations.
+ items:
+ description: TelegramConfig configures notifications via Telegram.
+ See https://prometheus.io/docs/alerting/latest/configuration/#telegram_config
+ properties:
+ apiURL:
+ description: The Telegram API URL i.e. https://api.telegram.org.
+ If not specified, default API URL will be used.
+ type: string
+ botToken:
+ description: "Telegram bot token. It is mutually exclusive
+ with `botTokenFile`. The secret needs to be in the same
+ namespace as the AlertmanagerConfig object and accessible
+ by the Prometheus Operator. \n Either `botToken` or
+ `botTokenFile` is required."
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ botTokenFile:
+ description: "File to read the Telegram bot token from.
+ It is mutually exclusive with `botToken`. Either `botToken`
+ or `botTokenFile` is required. \n It requires Alertmanager
+ >= v0.26.0."
+ type: string
+ chatID:
+ description: The Telegram chat ID.
+ format: int64
+ type: integer
+ disableNotifications:
+ description: Disable telegram notifications
+ type: boolean
+ httpConfig:
+ description: HTTP client configuration.
+ properties:
+ authorization:
+ description: Authorization header configuration for
+ the client. This is mutually exclusive with BasicAuth
+ and is only available starting from Alertmanager
+ v0.22+.
+ properties:
+ credentials:
+ description: Selects a key of a Secret in the
+ namespace that contains the credentials for
+ authentication.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type:
+ description: "Defines the authentication type.
+ The value is case-insensitive. \n \"Basic\"
+ is not a supported value. \n Default: \"Bearer\""
+ type: string
+ type: object
+ basicAuth:
+ description: BasicAuth for the client. This is mutually
+ exclusive with Authorization. If both are defined,
+ BasicAuth takes precedence.
+ properties:
+ password:
+ description: The secret in the service monitor
+ namespace that contains the password for authentication.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ username:
+ description: The secret in the service monitor
+ namespace that contains the username for authentication.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ bearerTokenSecret:
+ description: The secret's key that contains the bearer
+ token to be used by the client for authentication.
+ The secret needs to be in the same namespace as
+ the AlertmanagerConfig object and accessible by
+ the Prometheus Operator.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ followRedirects:
+ description: FollowRedirects specifies whether the
+ client should follow HTTP 3xx redirects.
+ type: boolean
+ oauth2:
+ description: OAuth2 client credentials used to fetch
+ a token for the targets.
+ properties:
+ clientId:
+ description: The secret or configmap containing
+ the OAuth2 client id
+ properties:
+ configMap:
+ description: ConfigMap containing data to
+ use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key of the secret to
+ select from. Must be a valid secret
+ key.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ clientSecret:
+ description: The secret containing the OAuth2
+ client secret
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ endpointParams:
+ additionalProperties:
+ type: string
+ description: Parameters to append to the token
+ URL
+ type: object
+ scopes:
+ description: OAuth2 scopes used for the token
+ request
+ items:
+ type: string
+ type: array
+ tokenUrl:
+ description: The URL to fetch the token from
+ minLength: 1
+ type: string
+ required:
+ - clientId
+ - clientSecret
+ - tokenUrl
+ type: object
+ proxyURL:
+ description: Optional proxy URL.
+ type: string
+ tlsConfig:
+ description: TLS configuration for the client.
+ properties:
+ ca:
+ description: Certificate authority used when verifying
+ server certificates.
+ properties:
+ configMap:
+ description: ConfigMap containing data to
+ use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key of the secret to
+ select from. Must be a valid secret
+ key.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ cert:
+ description: Client certificate to present when
+ doing client-authentication.
+ properties:
+ configMap:
+ description: ConfigMap containing data to
+ use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key of the secret to
+ select from. Must be a valid secret
+ key.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ insecureSkipVerify:
+ description: Disable target certificate validation.
+ type: boolean
+ keySecret:
+ description: Secret containing the client key
+ file for the targets.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ serverName:
+ description: Used to verify the hostname for the
+ targets.
+ type: string
+ type: object
+ type: object
+ message:
+ description: Message template
+ type: string
+ parseMode:
+ description: Parse mode for telegram message
+ enum:
+ - MarkdownV2
+ - Markdown
+ - HTML
+ type: string
+ sendResolved:
+ description: Whether to notify about resolved alerts.
+ type: boolean
+ type: object
+ type: array
+ victoropsConfigs:
+ description: List of VictorOps configurations.
+ items:
+ description: VictorOpsConfig configures notifications via
+ VictorOps. See https://prometheus.io/docs/alerting/latest/configuration/#victorops_config
+ properties:
+ apiKey:
+ description: The secret's key that contains the API key
+ to use when talking to the VictorOps API. The secret
+ needs to be in the same namespace as the AlertmanagerConfig
+ object and accessible by the Prometheus Operator.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ apiUrl:
+ description: The VictorOps API URL.
+ type: string
+ customFields:
+ description: Additional custom fields for notification.
+ items:
+ description: KeyValue defines a (key, value) tuple.
+ properties:
+ key:
+ description: Key of the tuple.
+ minLength: 1
+ type: string
+ value:
+ description: Value of the tuple.
+ type: string
+ required:
+ - key
+ - value
+ type: object
+ type: array
+ entityDisplayName:
+ description: Contains summary of the alerted problem.
+ type: string
+ httpConfig:
+ description: The HTTP client's configuration.
+ properties:
+ authorization:
+ description: Authorization header configuration for
+ the client. This is mutually exclusive with BasicAuth
+ and is only available starting from Alertmanager
+ v0.22+.
+ properties:
+ credentials:
+ description: Selects a key of a Secret in the
+ namespace that contains the credentials for
+ authentication.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type:
+ description: "Defines the authentication type.
+ The value is case-insensitive. \n \"Basic\"
+ is not a supported value. \n Default: \"Bearer\""
+ type: string
+ type: object
+ basicAuth:
+ description: BasicAuth for the client. This is mutually
+ exclusive with Authorization. If both are defined,
+ BasicAuth takes precedence.
+ properties:
+ password:
+ description: The secret in the service monitor
+ namespace that contains the password for authentication.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ username:
+ description: The secret in the service monitor
+ namespace that contains the username for authentication.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ bearerTokenSecret:
+ description: The secret's key that contains the bearer
+ token to be used by the client for authentication.
+ The secret needs to be in the same namespace as
+ the AlertmanagerConfig object and accessible by
+ the Prometheus Operator.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ followRedirects:
+ description: FollowRedirects specifies whether the
+ client should follow HTTP 3xx redirects.
+ type: boolean
+ oauth2:
+ description: OAuth2 client credentials used to fetch
+ a token for the targets.
+ properties:
+ clientId:
+ description: The secret or configmap containing
+ the OAuth2 client id
+ properties:
+ configMap:
+ description: ConfigMap containing data to
+ use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key of the secret to
+ select from. Must be a valid secret
+ key.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ clientSecret:
+ description: The secret containing the OAuth2
+ client secret
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ endpointParams:
+ additionalProperties:
+ type: string
+ description: Parameters to append to the token
+ URL
+ type: object
+ scopes:
+ description: OAuth2 scopes used for the token
+ request
+ items:
+ type: string
+ type: array
+ tokenUrl:
+ description: The URL to fetch the token from
+ minLength: 1
+ type: string
+ required:
+ - clientId
+ - clientSecret
+ - tokenUrl
+ type: object
+ proxyURL:
+ description: Optional proxy URL.
+ type: string
+ tlsConfig:
+ description: TLS configuration for the client.
+ properties:
+ ca:
+ description: Certificate authority used when verifying
+ server certificates.
+ properties:
+ configMap:
+ description: ConfigMap containing data to
+ use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key of the secret to
+ select from. Must be a valid secret
+ key.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ cert:
+ description: Client certificate to present when
+ doing client-authentication.
+ properties:
+ configMap:
+ description: ConfigMap containing data to
+ use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key of the secret to
+ select from. Must be a valid secret
+ key.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ insecureSkipVerify:
+ description: Disable target certificate validation.
+ type: boolean
+ keySecret:
+ description: Secret containing the client key
+ file for the targets.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ serverName:
+ description: Used to verify the hostname for the
+ targets.
+ type: string
+ type: object
+ type: object
+ messageType:
+ description: Describes the behavior of the alert (CRITICAL,
+ WARNING, INFO).
+ type: string
+ monitoringTool:
+ description: The monitoring tool the state message is
+ from.
+ type: string
+ routingKey:
+ description: A key used to map the alert to a team.
+ type: string
+ sendResolved:
+ description: Whether or not to notify about resolved alerts.
+ type: boolean
+ stateMessage:
+ description: Contains long explanation of the alerted
+ problem.
+ type: string
+ type: object
+ type: array
+ webexConfigs:
+ description: List of Webex configurations.
+ items:
+ description: WebexConfig configures notification via Cisco
+ Webex See https://prometheus.io/docs/alerting/latest/configuration/#webex_config
+ properties:
+ apiURL:
+ description: The Webex Teams API URL i.e. https://webexapis.com/v1/messages
+ Provide if different from the default API URL.
+ pattern: ^https?://.+$
+ type: string
+ httpConfig:
+ description: The HTTP client's configuration. You must
+ supply the bot token via the `httpConfig.authorization`
+ field.
+ properties:
+ authorization:
+ description: Authorization header configuration for
+ the client. This is mutually exclusive with BasicAuth
+ and is only available starting from Alertmanager
+ v0.22+.
+ properties:
+ credentials:
+ description: Selects a key of a Secret in the
+ namespace that contains the credentials for
+ authentication.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type:
+ description: "Defines the authentication type.
+ The value is case-insensitive. \n \"Basic\"
+ is not a supported value. \n Default: \"Bearer\""
+ type: string
+ type: object
+ basicAuth:
+ description: BasicAuth for the client. This is mutually
+ exclusive with Authorization. If both are defined,
+ BasicAuth takes precedence.
+ properties:
+ password:
+ description: The secret in the service monitor
+ namespace that contains the password for authentication.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ username:
+ description: The secret in the service monitor
+ namespace that contains the username for authentication.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ bearerTokenSecret:
+ description: The secret's key that contains the bearer
+ token to be used by the client for authentication.
+ The secret needs to be in the same namespace as
+ the AlertmanagerConfig object and accessible by
+ the Prometheus Operator.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ followRedirects:
+ description: FollowRedirects specifies whether the
+ client should follow HTTP 3xx redirects.
+ type: boolean
+ oauth2:
+ description: OAuth2 client credentials used to fetch
+ a token for the targets.
+ properties:
+ clientId:
+ description: The secret or configmap containing
+ the OAuth2 client id
+ properties:
+ configMap:
+ description: ConfigMap containing data to
+ use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key of the secret to
+ select from. Must be a valid secret
+ key.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ clientSecret:
+ description: The secret containing the OAuth2
+ client secret
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ endpointParams:
+ additionalProperties:
+ type: string
+ description: Parameters to append to the token
+ URL
+ type: object
+ scopes:
+ description: OAuth2 scopes used for the token
+ request
+ items:
+ type: string
+ type: array
+ tokenUrl:
+ description: The URL to fetch the token from
+ minLength: 1
+ type: string
+ required:
+ - clientId
+ - clientSecret
+ - tokenUrl
+ type: object
+ proxyURL:
+ description: Optional proxy URL.
+ type: string
+ tlsConfig:
+ description: TLS configuration for the client.
+ properties:
+ ca:
+ description: Certificate authority used when verifying
+ server certificates.
+ properties:
+ configMap:
+ description: ConfigMap containing data to
+ use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key of the secret to
+ select from. Must be a valid secret
+ key.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ cert:
+ description: Client certificate to present when
+ doing client-authentication.
+ properties:
+ configMap:
+ description: ConfigMap containing data to
+ use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key of the secret to
+ select from. Must be a valid secret
+ key.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ insecureSkipVerify:
+ description: Disable target certificate validation.
+ type: boolean
+ keySecret:
+ description: Secret containing the client key
+ file for the targets.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ serverName:
+ description: Used to verify the hostname for the
+ targets.
+ type: string
+ type: object
+ type: object
+ message:
+ description: Message template
+ type: string
+ roomID:
+ description: ID of the Webex Teams room where to send
+ the messages.
+ minLength: 1
+ type: string
+ sendResolved:
+ description: Whether to notify about resolved alerts.
+ type: boolean
+ required:
+ - roomID
+ type: object
+ type: array
+ webhookConfigs:
+ description: List of webhook configurations.
+ items:
+ description: WebhookConfig configures notifications via a
+ generic receiver supporting the webhook payload. See https://prometheus.io/docs/alerting/latest/configuration/#webhook_config
+ properties:
+ httpConfig:
+ description: HTTP client configuration.
+ properties:
+ authorization:
+ description: Authorization header configuration for
+ the client. This is mutually exclusive with BasicAuth
+ and is only available starting from Alertmanager
+ v0.22+.
+ properties:
+ credentials:
+ description: Selects a key of a Secret in the
+ namespace that contains the credentials for
+ authentication.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type:
+ description: "Defines the authentication type.
+ The value is case-insensitive. \n \"Basic\"
+ is not a supported value. \n Default: \"Bearer\""
+ type: string
+ type: object
+ basicAuth:
+ description: BasicAuth for the client. This is mutually
+ exclusive with Authorization. If both are defined,
+ BasicAuth takes precedence.
+ properties:
+ password:
+ description: The secret in the service monitor
+ namespace that contains the password for authentication.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ username:
+ description: The secret in the service monitor
+ namespace that contains the username for authentication.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ bearerTokenSecret:
+ description: The secret's key that contains the bearer
+ token to be used by the client for authentication.
+ The secret needs to be in the same namespace as
+ the AlertmanagerConfig object and accessible by
+ the Prometheus Operator.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ followRedirects:
+ description: FollowRedirects specifies whether the
+ client should follow HTTP 3xx redirects.
+ type: boolean
+ oauth2:
+ description: OAuth2 client credentials used to fetch
+ a token for the targets.
+ properties:
+ clientId:
+ description: The secret or configmap containing
+ the OAuth2 client id
+ properties:
+ configMap:
+ description: ConfigMap containing data to
+ use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key of the secret to
+ select from. Must be a valid secret
+ key.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ clientSecret:
+ description: The secret containing the OAuth2
+ client secret
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ endpointParams:
+ additionalProperties:
+ type: string
+ description: Parameters to append to the token
+ URL
+ type: object
+ scopes:
+ description: OAuth2 scopes used for the token
+ request
+ items:
+ type: string
+ type: array
+ tokenUrl:
+ description: The URL to fetch the token from
+ minLength: 1
+ type: string
+ required:
+ - clientId
+ - clientSecret
+ - tokenUrl
+ type: object
+ proxyURL:
+ description: Optional proxy URL.
+ type: string
+ tlsConfig:
+ description: TLS configuration for the client.
+ properties:
+ ca:
+ description: Certificate authority used when verifying
+ server certificates.
+ properties:
+ configMap:
+ description: ConfigMap containing data to
+ use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key of the secret to
+ select from. Must be a valid secret
+ key.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ cert:
+ description: Client certificate to present when
+ doing client-authentication.
+ properties:
+ configMap:
+ description: ConfigMap containing data to
+ use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key of the secret to
+ select from. Must be a valid secret
+ key.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ insecureSkipVerify:
+ description: Disable target certificate validation.
+ type: boolean
+ keySecret:
+ description: Secret containing the client key
+ file for the targets.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ serverName:
+ description: Used to verify the hostname for the
+ targets.
+ type: string
+ type: object
+ type: object
+ maxAlerts:
+ description: Maximum number of alerts to be sent per webhook
+ message. When 0, all alerts are included.
+ format: int32
+ minimum: 0
+ type: integer
+ sendResolved:
+ description: Whether or not to notify about resolved alerts.
+ type: boolean
+ url:
+ description: The URL to send HTTP POST requests to. `urlSecret`
+ takes precedence over `url`. One of `urlSecret` and
+ `url` should be defined.
+ type: string
+ urlSecret:
+ description: The secret's key that contains the webhook
+ URL to send HTTP requests to. `urlSecret` takes precedence
+ over `url`. One of `urlSecret` and `url` should be defined.
+ The secret needs to be in the same namespace as the
+ AlertmanagerConfig object and accessible by the Prometheus
+ Operator.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ type: object
+ type: array
+ wechatConfigs:
+ description: List of WeChat configurations.
+ items:
+ description: WeChatConfig configures notifications via WeChat.
+ See https://prometheus.io/docs/alerting/latest/configuration/#wechat_config
+ properties:
+ agentID:
+ type: string
+ apiSecret:
+ description: The secret's key that contains the WeChat
+ API key. The secret needs to be in the same namespace
+ as the AlertmanagerConfig object and accessible by the
+ Prometheus Operator.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ apiURL:
+ description: The WeChat API URL.
+ type: string
+ corpID:
+ description: The corp id for authentication.
+ type: string
+ httpConfig:
+ description: HTTP client configuration.
+ properties:
+ authorization:
+ description: Authorization header configuration for
+ the client. This is mutually exclusive with BasicAuth
+ and is only available starting from Alertmanager
+ v0.22+.
+ properties:
+ credentials:
+ description: Selects a key of a Secret in the
+ namespace that contains the credentials for
+ authentication.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type:
+ description: "Defines the authentication type.
+ The value is case-insensitive. \n \"Basic\"
+ is not a supported value. \n Default: \"Bearer\""
+ type: string
+ type: object
+ basicAuth:
+ description: BasicAuth for the client. This is mutually
+ exclusive with Authorization. If both are defined,
+ BasicAuth takes precedence.
+ properties:
+ password:
+ description: The secret in the service monitor
+ namespace that contains the password for authentication.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ username:
+ description: The secret in the service monitor
+ namespace that contains the username for authentication.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ bearerTokenSecret:
+ description: The secret's key that contains the bearer
+ token to be used by the client for authentication.
+ The secret needs to be in the same namespace as
+ the AlertmanagerConfig object and accessible by
+ the Prometheus Operator.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ followRedirects:
+ description: FollowRedirects specifies whether the
+ client should follow HTTP 3xx redirects.
+ type: boolean
+ oauth2:
+ description: OAuth2 client credentials used to fetch
+ a token for the targets.
+ properties:
+ clientId:
+ description: The secret or configmap containing
+ the OAuth2 client id
+ properties:
+ configMap:
+ description: ConfigMap containing data to
+ use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key of the secret to
+ select from. Must be a valid secret
+ key.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ clientSecret:
+ description: The secret containing the OAuth2
+ client secret
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ endpointParams:
+ additionalProperties:
+ type: string
+ description: Parameters to append to the token
+ URL
+ type: object
+ scopes:
+ description: OAuth2 scopes used for the token
+ request
+ items:
+ type: string
+ type: array
+ tokenUrl:
+ description: The URL to fetch the token from
+ minLength: 1
+ type: string
+ required:
+ - clientId
+ - clientSecret
+ - tokenUrl
+ type: object
+ proxyURL:
+ description: Optional proxy URL.
+ type: string
+ tlsConfig:
+ description: TLS configuration for the client.
+ properties:
+ ca:
+ description: Certificate authority used when verifying
+ server certificates.
+ properties:
+ configMap:
+ description: ConfigMap containing data to
+ use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key of the secret to
+ select from. Must be a valid secret
+ key.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ cert:
+ description: Client certificate to present when
+ doing client-authentication.
+ properties:
+ configMap:
+ description: ConfigMap containing data to
+ use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key of the secret to
+ select from. Must be a valid secret
+ key.
+ type: string
+ name:
+ description: 'Name of the referent. More
+ info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ insecureSkipVerify:
+ description: Disable target certificate validation.
+ type: boolean
+ keySecret:
+ description: Secret containing the client key
+ file for the targets.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ serverName:
+ description: Used to verify the hostname for the
+ targets.
+ type: string
+ type: object
+ type: object
+ message:
+ description: API request data as defined by the WeChat
+ API.
+ type: string
+ messageType:
+ type: string
+ sendResolved:
+ description: Whether or not to notify about resolved alerts.
+ type: boolean
+ toParty:
+ type: string
+ toTag:
+ type: string
+ toUser:
+ type: string
+ type: object
+ type: array
+ required:
+ - name
+ type: object
+ type: array
+ route:
+ description: The Alertmanager route definition for alerts matching
+ the resource's namespace. If present, it will be added to the generated
+ Alertmanager configuration as a first-level route.
+ properties:
+ activeTimeIntervals:
+ description: ActiveTimeIntervals is a list of MuteTimeInterval
+ names when this route should be active.
+ items:
+ type: string
+ type: array
+ continue:
+ description: Boolean indicating whether an alert should continue
+ matching subsequent sibling nodes. It will always be overridden
+ to true for the first-level route by the Prometheus operator.
+ type: boolean
+ groupBy:
+ description: List of labels to group by. Labels must not be repeated
+ (unique list). Special label "..." (aggregate by all possible
+ labels), if provided, must be the only element in the list.
+ items:
+ type: string
+ type: array
+ groupInterval:
+ description: 'How long to wait before sending an updated notification.
+ Must match the regular expression`^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$`
+ Example: "5m"'
+ type: string
+ groupWait:
+ description: 'How long to wait before sending the initial notification.
+ Must match the regular expression`^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$`
+ Example: "30s"'
+ type: string
+ matchers:
+ description: 'List of matchers that the alert''s labels should
+ match. For the first level route, the operator removes any existing
+ equality and regexp matcher on the `namespace` label and adds
+ a `namespace: ` matcher.'
+ items:
+ description: Matcher defines how to match on alert's labels.
+ properties:
+ matchType:
+ description: Match operation available with AlertManager
+ >= v0.22.0 and takes precedence over Regex (deprecated)
+ if non-empty.
+ enum:
+ - '!='
+ - =
+ - =~
+ - '!~'
+ type: string
+ name:
+ description: Label to match.
+ minLength: 1
+ type: string
+ regex:
+ description: Whether to match on equality (false) or regular-expression
+ (true). Deprecated as of AlertManager >= v0.22.0 where
+ a user should use MatchType instead.
+ type: boolean
+ value:
+ description: Label value to match.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ muteTimeIntervals:
+ description: 'Note: this comment applies to the field definition
+ above but appears below otherwise it gets included in the generated
+ manifest. CRD schema doesn''t support self-referential types
+ for now (see https://github.com/kubernetes/kubernetes/issues/62872).
+ We have to use an alternative type to circumvent the limitation.
+ The downside is that the Kube API can''t validate the data beyond
+ the fact that it is a valid JSON representation. MuteTimeIntervals
+ is a list of MuteTimeInterval names that will mute this route
+ when matched,'
+ items:
+ type: string
+ type: array
+ receiver:
+ description: Name of the receiver for this route. If not empty,
+ it should be listed in the `receivers` field.
+ type: string
+ repeatInterval:
+ description: 'How long to wait before repeating the last notification.
+ Must match the regular expression`^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$`
+ Example: "4h"'
+ type: string
+ routes:
+ description: Child routes.
+ items:
+ x-kubernetes-preserve-unknown-fields: true
+ type: array
+ type: object
+ type: object
+ required:
+ - spec
+ type: object
+ served: true
+ storage: true
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/crds/crd-alertmanagers.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/crds/crd-alertmanagers.yaml
new file mode 100644
index 0000000000..3cc6d45dc5
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/crds/crd-alertmanagers.yaml
@@ -0,0 +1,7411 @@
+# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.68.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml
+---
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+ annotations:
+ controller-gen.kubebuilder.io/version: v0.11.1
+ creationTimestamp: null
+ name: alertmanagers.monitoring.coreos.com
+spec:
+ group: monitoring.coreos.com
+ names:
+ categories:
+ - prometheus-operator
+ kind: Alertmanager
+ listKind: AlertmanagerList
+ plural: alertmanagers
+ shortNames:
+ - am
+ singular: alertmanager
+ scope: Namespaced
+ versions:
+ - additionalPrinterColumns:
+ - description: The version of Alertmanager
+ jsonPath: .spec.version
+ name: Version
+ type: string
+ - description: The number of desired replicas
+ jsonPath: .spec.replicas
+ name: Replicas
+ type: integer
+ - description: The number of ready replicas
+ jsonPath: .status.availableReplicas
+ name: Ready
+ type: integer
+ - jsonPath: .status.conditions[?(@.type == 'Reconciled')].status
+ name: Reconciled
+ type: string
+ - jsonPath: .status.conditions[?(@.type == 'Available')].status
+ name: Available
+ type: string
+ - jsonPath: .metadata.creationTimestamp
+ name: Age
+ type: date
+ - description: Whether the resource reconciliation is paused or not
+ jsonPath: .status.paused
+ name: Paused
+ priority: 1
+ type: boolean
+ name: v1
+ schema:
+ openAPIV3Schema:
+ description: Alertmanager describes an Alertmanager cluster.
+ properties:
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation
+ of an object. Servers should convert recognized schemas to the latest
+ internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this
+ object represents. Servers may infer this from the endpoint the client
+ submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: 'Specification of the desired behavior of the Alertmanager
+ cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status'
+ properties:
+ additionalPeers:
+ description: AdditionalPeers allows injecting a set of additional
+ Alertmanagers to peer with to form a highly available cluster.
+ items:
+ type: string
+ type: array
+ affinity:
+ description: If specified, the pod's scheduling constraints.
+ properties:
+ nodeAffinity:
+ description: Describes node affinity scheduling rules for the
+ pod.
+ properties:
+ preferredDuringSchedulingIgnoredDuringExecution:
+ description: The scheduler will prefer to schedule pods to
+ nodes that satisfy the affinity expressions specified by
+ this field, but it may choose a node that violates one or
+ more of the expressions. The node that is most preferred
+ is the one with the greatest sum of weights, i.e. for each
+ node that meets all of the scheduling requirements (resource
+ request, requiredDuringScheduling affinity expressions,
+ etc.), compute a sum by iterating through the elements of
+ this field and adding "weight" to the sum if the node matches
+ the corresponding matchExpressions; the node(s) with the
+ highest sum are the most preferred.
+ items:
+ description: An empty preferred scheduling term matches
+ all objects with implicit weight 0 (i.e. it's a no-op).
+ A null preferred scheduling term matches no objects (i.e.
+ is also a no-op).
+ properties:
+ preference:
+ description: A node selector term, associated with the
+ corresponding weight.
+ properties:
+ matchExpressions:
+ description: A list of node selector requirements
+ by node's labels.
+ items:
+ description: A node selector requirement is a
+ selector that contains values, a key, and an
+ operator that relates the key and values.
+ properties:
+ key:
+ description: The label key that the selector
+ applies to.
+ type: string
+ operator:
+ description: Represents a key's relationship
+ to a set of values. Valid operators are
+ In, NotIn, Exists, DoesNotExist. Gt, and
+ Lt.
+ type: string
+ values:
+ description: An array of string values. If
+ the operator is In or NotIn, the values
+ array must be non-empty. If the operator
+ is Exists or DoesNotExist, the values array
+ must be empty. If the operator is Gt or
+ Lt, the values array must have a single
+ element, which will be interpreted as an
+ integer. This array is replaced during a
+ strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchFields:
+ description: A list of node selector requirements
+ by node's fields.
+ items:
+ description: A node selector requirement is a
+ selector that contains values, a key, and an
+ operator that relates the key and values.
+ properties:
+ key:
+ description: The label key that the selector
+ applies to.
+ type: string
+ operator:
+ description: Represents a key's relationship
+ to a set of values. Valid operators are
+ In, NotIn, Exists, DoesNotExist. Gt, and
+ Lt.
+ type: string
+ values:
+ description: An array of string values. If
+ the operator is In or NotIn, the values
+ array must be non-empty. If the operator
+ is Exists or DoesNotExist, the values array
+ must be empty. If the operator is Gt or
+ Lt, the values array must have a single
+ element, which will be interpreted as an
+ integer. This array is replaced during a
+ strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ type: object
+ x-kubernetes-map-type: atomic
+ weight:
+ description: Weight associated with matching the corresponding
+ nodeSelectorTerm, in the range 1-100.
+ format: int32
+ type: integer
+ required:
+ - preference
+ - weight
+ type: object
+ type: array
+ requiredDuringSchedulingIgnoredDuringExecution:
+ description: If the affinity requirements specified by this
+ field are not met at scheduling time, the pod will not be
+ scheduled onto the node. If the affinity requirements specified
+ by this field cease to be met at some point during pod execution
+ (e.g. due to an update), the system may or may not try to
+ eventually evict the pod from its node.
+ properties:
+ nodeSelectorTerms:
+ description: Required. A list of node selector terms.
+ The terms are ORed.
+ items:
+ description: A null or empty node selector term matches
+ no objects. The requirements of them are ANDed. The
+ TopologySelectorTerm type implements a subset of the
+ NodeSelectorTerm.
+ properties:
+ matchExpressions:
+ description: A list of node selector requirements
+ by node's labels.
+ items:
+ description: A node selector requirement is a
+ selector that contains values, a key, and an
+ operator that relates the key and values.
+ properties:
+ key:
+ description: The label key that the selector
+ applies to.
+ type: string
+ operator:
+ description: Represents a key's relationship
+ to a set of values. Valid operators are
+ In, NotIn, Exists, DoesNotExist. Gt, and
+ Lt.
+ type: string
+ values:
+ description: An array of string values. If
+ the operator is In or NotIn, the values
+ array must be non-empty. If the operator
+ is Exists or DoesNotExist, the values array
+ must be empty. If the operator is Gt or
+ Lt, the values array must have a single
+ element, which will be interpreted as an
+ integer. This array is replaced during a
+ strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchFields:
+ description: A list of node selector requirements
+ by node's fields.
+ items:
+ description: A node selector requirement is a
+ selector that contains values, a key, and an
+ operator that relates the key and values.
+ properties:
+ key:
+ description: The label key that the selector
+ applies to.
+ type: string
+ operator:
+ description: Represents a key's relationship
+ to a set of values. Valid operators are
+ In, NotIn, Exists, DoesNotExist. Gt, and
+ Lt.
+ type: string
+ values:
+ description: An array of string values. If
+ the operator is In or NotIn, the values
+ array must be non-empty. If the operator
+ is Exists or DoesNotExist, the values array
+ must be empty. If the operator is Gt or
+ Lt, the values array must have a single
+ element, which will be interpreted as an
+ integer. This array is replaced during a
+ strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
+ required:
+ - nodeSelectorTerms
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ podAffinity:
+ description: Describes pod affinity scheduling rules (e.g. co-locate
+ this pod in the same node, zone, etc. as some other pod(s)).
+ properties:
+ preferredDuringSchedulingIgnoredDuringExecution:
+ description: The scheduler will prefer to schedule pods to
+ nodes that satisfy the affinity expressions specified by
+ this field, but it may choose a node that violates one or
+ more of the expressions. The node that is most preferred
+ is the one with the greatest sum of weights, i.e. for each
+ node that meets all of the scheduling requirements (resource
+ request, requiredDuringScheduling affinity expressions,
+ etc.), compute a sum by iterating through the elements of
+ this field and adding "weight" to the sum if the node has
+ pods which matches the corresponding podAffinityTerm; the
+ node(s) with the highest sum are the most preferred.
+ items:
+ description: The weights of all of the matched WeightedPodAffinityTerm
+ fields are added per-node to find the most preferred node(s)
+ properties:
+ podAffinityTerm:
+ description: Required. A pod affinity term, associated
+ with the corresponding weight.
+ properties:
+ labelSelector:
+ description: A label query over a set of resources,
+ in this case pods.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: A label selector requirement
+ is a selector that contains values, a key,
+ and an operator that relates the key and
+ values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's
+ relationship to a set of values. Valid
+ operators are In, NotIn, Exists and
+ DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty.
+ If the operator is Exists or DoesNotExist,
+ the values array must be empty. This
+ array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is
+ "In", and the values array contains only "value".
+ The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ namespaceSelector:
+ description: A label query over the set of namespaces
+ that the term applies to. The term is applied
+ to the union of the namespaces selected by this
+ field and the ones listed in the namespaces field.
+ null selector and null or empty namespaces list
+ means "this pod's namespace". An empty selector
+ ({}) matches all namespaces.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: A label selector requirement
+ is a selector that contains values, a key,
+ and an operator that relates the key and
+ values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's
+ relationship to a set of values. Valid
+ operators are In, NotIn, Exists and
+ DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty.
+ If the operator is Exists or DoesNotExist,
+ the values array must be empty. This
+ array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is
+ "In", and the values array contains only "value".
+ The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ namespaces:
+ description: namespaces specifies a static list
+ of namespace names that the term applies to. The
+ term is applied to the union of the namespaces
+ listed in this field and the ones selected by
+ namespaceSelector. null or empty namespaces list
+ and null namespaceSelector means "this pod's namespace".
+ items:
+ type: string
+ type: array
+ topologyKey:
+ description: This pod should be co-located (affinity)
+ or not co-located (anti-affinity) with the pods
+ matching the labelSelector in the specified namespaces,
+ where co-located is defined as running on a node
+ whose value of the label with key topologyKey
+ matches that of any node on which any of the selected
+ pods is running. Empty topologyKey is not allowed.
+ type: string
+ required:
+ - topologyKey
+ type: object
+ weight:
+ description: weight associated with matching the corresponding
+ podAffinityTerm, in the range 1-100.
+ format: int32
+ type: integer
+ required:
+ - podAffinityTerm
+ - weight
+ type: object
+ type: array
+ requiredDuringSchedulingIgnoredDuringExecution:
+ description: If the affinity requirements specified by this
+ field are not met at scheduling time, the pod will not be
+ scheduled onto the node. If the affinity requirements specified
+ by this field cease to be met at some point during pod execution
+ (e.g. due to a pod label update), the system may or may
+ not try to eventually evict the pod from its node. When
+ there are multiple elements, the lists of nodes corresponding
+ to each podAffinityTerm are intersected, i.e. all terms
+ must be satisfied.
+ items:
+ description: Defines a set of pods (namely those matching
+ the labelSelector relative to the given namespace(s))
+ that this pod should be co-located (affinity) or not co-located
+ (anti-affinity) with, where co-located is defined as running
+ on a node whose value of the label with key
+ matches that of any node on which a pod of the set of
+ pods is running
+ properties:
+ labelSelector:
+ description: A label query over a set of resources,
+ in this case pods.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are ANDed.
+ items:
+ description: A label selector requirement is a
+ selector that contains values, a key, and an
+ operator that relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's relationship
+ to a set of values. Valid operators are
+ In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty. If the
+ operator is Exists or DoesNotExist, the
+ values array must be empty. This array is
+ replaced during a strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is "In",
+ and the values array contains only "value". The
+ requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ namespaceSelector:
+ description: A label query over the set of namespaces
+ that the term applies to. The term is applied to the
+ union of the namespaces selected by this field and
+ the ones listed in the namespaces field. null selector
+ and null or empty namespaces list means "this pod's
+ namespace". An empty selector ({}) matches all namespaces.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are ANDed.
+ items:
+ description: A label selector requirement is a
+ selector that contains values, a key, and an
+ operator that relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's relationship
+ to a set of values. Valid operators are
+ In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty. If the
+ operator is Exists or DoesNotExist, the
+ values array must be empty. This array is
+ replaced during a strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is "In",
+ and the values array contains only "value". The
+ requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ namespaces:
+ description: namespaces specifies a static list of namespace
+ names that the term applies to. The term is applied
+ to the union of the namespaces listed in this field
+ and the ones selected by namespaceSelector. null or
+ empty namespaces list and null namespaceSelector means
+ "this pod's namespace".
+ items:
+ type: string
+ type: array
+ topologyKey:
+ description: This pod should be co-located (affinity)
+ or not co-located (anti-affinity) with the pods matching
+ the labelSelector in the specified namespaces, where
+ co-located is defined as running on a node whose value
+ of the label with key topologyKey matches that of
+ any node on which any of the selected pods is running.
+ Empty topologyKey is not allowed.
+ type: string
+ required:
+ - topologyKey
+ type: object
+ type: array
+ type: object
+ podAntiAffinity:
+ description: Describes pod anti-affinity scheduling rules (e.g.
+ avoid putting this pod in the same node, zone, etc. as some
+ other pod(s)).
+ properties:
+ preferredDuringSchedulingIgnoredDuringExecution:
+ description: The scheduler will prefer to schedule pods to
+ nodes that satisfy the anti-affinity expressions specified
+ by this field, but it may choose a node that violates one
+ or more of the expressions. The node that is most preferred
+ is the one with the greatest sum of weights, i.e. for each
+ node that meets all of the scheduling requirements (resource
+ request, requiredDuringScheduling anti-affinity expressions,
+ etc.), compute a sum by iterating through the elements of
+ this field and adding "weight" to the sum if the node has
+ pods which matches the corresponding podAffinityTerm; the
+ node(s) with the highest sum are the most preferred.
+ items:
+ description: The weights of all of the matched WeightedPodAffinityTerm
+ fields are added per-node to find the most preferred node(s)
+ properties:
+ podAffinityTerm:
+ description: Required. A pod affinity term, associated
+ with the corresponding weight.
+ properties:
+ labelSelector:
+ description: A label query over a set of resources,
+ in this case pods.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: A label selector requirement
+ is a selector that contains values, a key,
+ and an operator that relates the key and
+ values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's
+ relationship to a set of values. Valid
+ operators are In, NotIn, Exists and
+ DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty.
+ If the operator is Exists or DoesNotExist,
+ the values array must be empty. This
+ array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is
+ "In", and the values array contains only "value".
+ The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ namespaceSelector:
+ description: A label query over the set of namespaces
+ that the term applies to. The term is applied
+ to the union of the namespaces selected by this
+ field and the ones listed in the namespaces field.
+ null selector and null or empty namespaces list
+ means "this pod's namespace". An empty selector
+ ({}) matches all namespaces.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: A label selector requirement
+ is a selector that contains values, a key,
+ and an operator that relates the key and
+ values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's
+ relationship to a set of values. Valid
+ operators are In, NotIn, Exists and
+ DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty.
+ If the operator is Exists or DoesNotExist,
+ the values array must be empty. This
+ array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is
+ "In", and the values array contains only "value".
+ The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ namespaces:
+ description: namespaces specifies a static list
+ of namespace names that the term applies to. The
+ term is applied to the union of the namespaces
+ listed in this field and the ones selected by
+ namespaceSelector. null or empty namespaces list
+ and null namespaceSelector means "this pod's namespace".
+ items:
+ type: string
+ type: array
+ topologyKey:
+ description: This pod should be co-located (affinity)
+ or not co-located (anti-affinity) with the pods
+ matching the labelSelector in the specified namespaces,
+ where co-located is defined as running on a node
+ whose value of the label with key topologyKey
+ matches that of any node on which any of the selected
+ pods is running. Empty topologyKey is not allowed.
+ type: string
+ required:
+ - topologyKey
+ type: object
+ weight:
+ description: weight associated with matching the corresponding
+ podAffinityTerm, in the range 1-100.
+ format: int32
+ type: integer
+ required:
+ - podAffinityTerm
+ - weight
+ type: object
+ type: array
+ requiredDuringSchedulingIgnoredDuringExecution:
+ description: If the anti-affinity requirements specified by
+ this field are not met at scheduling time, the pod will
+ not be scheduled onto the node. If the anti-affinity requirements
+ specified by this field cease to be met at some point during
+ pod execution (e.g. due to a pod label update), the system
+ may or may not try to eventually evict the pod from its
+ node. When there are multiple elements, the lists of nodes
+ corresponding to each podAffinityTerm are intersected, i.e.
+ all terms must be satisfied.
+ items:
+ description: Defines a set of pods (namely those matching
+ the labelSelector relative to the given namespace(s))
+ that this pod should be co-located (affinity) or not co-located
+ (anti-affinity) with, where co-located is defined as running
+ on a node whose value of the label with key
+ matches that of any node on which a pod of the set of
+ pods is running
+ properties:
+ labelSelector:
+ description: A label query over a set of resources,
+ in this case pods.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are ANDed.
+ items:
+ description: A label selector requirement is a
+ selector that contains values, a key, and an
+ operator that relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's relationship
+ to a set of values. Valid operators are
+ In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty. If the
+ operator is Exists or DoesNotExist, the
+ values array must be empty. This array is
+ replaced during a strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is "In",
+ and the values array contains only "value". The
+ requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ namespaceSelector:
+ description: A label query over the set of namespaces
+ that the term applies to. The term is applied to the
+ union of the namespaces selected by this field and
+ the ones listed in the namespaces field. null selector
+ and null or empty namespaces list means "this pod's
+ namespace". An empty selector ({}) matches all namespaces.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are ANDed.
+ items:
+ description: A label selector requirement is a
+ selector that contains values, a key, and an
+ operator that relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's relationship
+ to a set of values. Valid operators are
+ In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty. If the
+ operator is Exists or DoesNotExist, the
+ values array must be empty. This array is
+ replaced during a strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is "In",
+ and the values array contains only "value". The
+ requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ namespaces:
+ description: namespaces specifies a static list of namespace
+ names that the term applies to. The term is applied
+ to the union of the namespaces listed in this field
+ and the ones selected by namespaceSelector. null or
+ empty namespaces list and null namespaceSelector means
+ "this pod's namespace".
+ items:
+ type: string
+ type: array
+ topologyKey:
+ description: This pod should be co-located (affinity)
+ or not co-located (anti-affinity) with the pods matching
+ the labelSelector in the specified namespaces, where
+ co-located is defined as running on a node whose value
+ of the label with key topologyKey matches that of
+ any node on which any of the selected pods is running.
+ Empty topologyKey is not allowed.
+ type: string
+ required:
+ - topologyKey
+ type: object
+ type: array
+ type: object
+ type: object
+ alertmanagerConfigMatcherStrategy:
+ description: The AlertmanagerConfigMatcherStrategy defines how AlertmanagerConfig
+ objects match the alerts. In the future more options may be added.
+ properties:
+ type:
+ default: OnNamespace
+ description: If set to `OnNamespace`, the operator injects a label
+ matcher matching the namespace of the AlertmanagerConfig object
+ for all its routes and inhibition rules. `None` will not add
+ any additional matchers other than the ones specified in the
+ AlertmanagerConfig. Default is `OnNamespace`.
+ enum:
+ - OnNamespace
+ - None
+ type: string
+ type: object
+ alertmanagerConfigNamespaceSelector:
+ description: Namespaces to be selected for AlertmanagerConfig discovery.
+ If nil, only check own namespace.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements.
+ The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector that
+ contains values, a key, and an operator that relates the key
+ and values.
+ properties:
+ key:
+ description: key is the label key that the selector applies
+ to.
+ type: string
+ operator:
+ description: operator represents a key's relationship to
+ a set of values. Valid operators are In, NotIn, Exists
+ and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values. If the
+ operator is In or NotIn, the values array must be non-empty.
+ If the operator is Exists or DoesNotExist, the values
+ array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs. A single
+ {key,value} in the matchLabels map is equivalent to an element
+ of matchExpressions, whose key field is "key", the operator
+ is "In", and the values array contains only "value". The requirements
+ are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ alertmanagerConfigSelector:
+ description: AlertmanagerConfigs to be selected for to merge and configure
+ Alertmanager with.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements.
+ The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector that
+ contains values, a key, and an operator that relates the key
+ and values.
+ properties:
+ key:
+ description: key is the label key that the selector applies
+ to.
+ type: string
+ operator:
+ description: operator represents a key's relationship to
+ a set of values. Valid operators are In, NotIn, Exists
+ and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values. If the
+ operator is In or NotIn, the values array must be non-empty.
+ If the operator is Exists or DoesNotExist, the values
+ array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs. A single
+ {key,value} in the matchLabels map is equivalent to an element
+ of matchExpressions, whose key field is "key", the operator
+ is "In", and the values array contains only "value". The requirements
+ are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ alertmanagerConfiguration:
+ description: 'EXPERIMENTAL: alertmanagerConfiguration specifies the
+ configuration of Alertmanager. If defined, it takes precedence over
+ the `configSecret` field. This field may change in future releases.'
+ properties:
+ global:
+ description: Defines the global parameters of the Alertmanager
+ configuration.
+ properties:
+ httpConfig:
+ description: HTTP client configuration.
+ properties:
+ authorization:
+ description: Authorization header configuration for the
+ client. This is mutually exclusive with BasicAuth and
+ is only available starting from Alertmanager v0.22+.
+ properties:
+ credentials:
+ description: Selects a key of a Secret in the namespace
+ that contains the credentials for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type:
+ description: "Defines the authentication type. The
+ value is case-insensitive. \n \"Basic\" is not a
+ supported value. \n Default: \"Bearer\""
+ type: string
+ type: object
+ basicAuth:
+ description: BasicAuth for the client. This is mutually
+ exclusive with Authorization. If both are defined, BasicAuth
+ takes precedence.
+ properties:
+ password:
+ description: The secret in the service monitor namespace
+ that contains the password for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ username:
+ description: The secret in the service monitor namespace
+ that contains the username for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ bearerTokenSecret:
+ description: The secret's key that contains the bearer
+ token to be used by the client for authentication. The
+ secret needs to be in the same namespace as the Alertmanager
+ object and accessible by the Prometheus Operator.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ followRedirects:
+ description: FollowRedirects specifies whether the client
+ should follow HTTP 3xx redirects.
+ type: boolean
+ oauth2:
+ description: OAuth2 client credentials used to fetch a
+ token for the targets.
+ properties:
+ clientId:
+ description: The secret or configmap containing the
+ OAuth2 client id
+ properties:
+ configMap:
+ description: ConfigMap containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for
+ the targets.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ clientSecret:
+ description: The secret containing the OAuth2 client
+ secret
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ endpointParams:
+ additionalProperties:
+ type: string
+ description: Parameters to append to the token URL
+ type: object
+ scopes:
+ description: OAuth2 scopes used for the token request
+ items:
+ type: string
+ type: array
+ tokenUrl:
+ description: The URL to fetch the token from
+ minLength: 1
+ type: string
+ required:
+ - clientId
+ - clientSecret
+ - tokenUrl
+ type: object
+ proxyURL:
+ description: Optional proxy URL.
+ type: string
+ tlsConfig:
+ description: TLS configuration for the client.
+ properties:
+ ca:
+ description: Certificate authority used when verifying
+ server certificates.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for
+ the targets.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ cert:
+ description: Client certificate to present when doing
+ client-authentication.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use
+ for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap
+ or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for
+ the targets.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ insecureSkipVerify:
+ description: Disable target certificate validation.
+ type: boolean
+ keySecret:
+ description: Secret containing the client key file
+ for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ serverName:
+ description: Used to verify the hostname for the targets.
+ type: string
+ type: object
+ type: object
+ opsGenieApiKey:
+ description: The default OpsGenie API Key.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ opsGenieApiUrl:
+ description: The default OpsGenie API URL.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ pagerdutyUrl:
+ description: The default Pagerduty URL.
+ type: string
+ resolveTimeout:
+ description: ResolveTimeout is the default value used by alertmanager
+ if the alert does not include EndsAt, after this time passes
+ it can declare the alert as resolved if it has not been
+ updated. This has no impact on alerts from Prometheus, as
+ they always include EndsAt.
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ slackApiUrl:
+ description: The default Slack API URL.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ smtp:
+ description: Configures global SMTP parameters.
+ properties:
+ authIdentity:
+ description: SMTP Auth using PLAIN
+ type: string
+ authPassword:
+ description: SMTP Auth using LOGIN and PLAIN.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ authSecret:
+ description: SMTP Auth using CRAM-MD5.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ authUsername:
+ description: SMTP Auth using CRAM-MD5, LOGIN and PLAIN.
+ If empty, Alertmanager doesn't authenticate to the SMTP
+ server.
+ type: string
+ from:
+ description: The default SMTP From header field.
+ type: string
+ hello:
+ description: The default hostname to identify to the SMTP
+ server.
+ type: string
+ requireTLS:
+ description: The default SMTP TLS requirement. Note that
+ Go does not support unencrypted connections to remote
+ SMTP endpoints.
+ type: boolean
+ smartHost:
+ description: The default SMTP smarthost used for sending
+ emails.
+ properties:
+ host:
+ description: Defines the host's address, it can be
+ a DNS name or a literal IP address.
+ minLength: 1
+ type: string
+ port:
+ description: Defines the host's port, it can be a
+ literal port number or a port name.
+ minLength: 1
+ type: string
+ required:
+ - host
+ - port
+ type: object
+ type: object
+ type: object
+ name:
+ description: The name of the AlertmanagerConfig resource which
+ is used to generate the Alertmanager configuration. It must
+ be defined in the same namespace as the Alertmanager object.
+ The operator will not enforce a `namespace` label for routes
+ and inhibition rules.
+ minLength: 1
+ type: string
+ templates:
+ description: Custom notification templates.
+ items:
+ description: SecretOrConfigMap allows to specify data as a Secret
+ or ConfigMap. Fields are mutually exclusive.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ type: object
+ automountServiceAccountToken:
+ description: 'AutomountServiceAccountToken indicates whether a service
+ account token should be automatically mounted in the pod. If the
+ service account has `automountServiceAccountToken: true`, set the
+ field to `false` to opt out of automounting API credentials.'
+ type: boolean
+ baseImage:
+ description: 'Base image that is used to deploy pods, without tag.
+ Deprecated: use ''image'' instead'
+ type: string
+ clusterAdvertiseAddress:
+ description: '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'
+ type: string
+ clusterGossipInterval:
+ description: Interval between gossip attempts.
+ pattern: ^(0|(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ clusterPeerTimeout:
+ description: Timeout for cluster peering.
+ pattern: ^(0|(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ clusterPushpullInterval:
+ description: Interval between pushpull attempts.
+ pattern: ^(0|(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ configMaps:
+ description: ConfigMaps is a list of ConfigMaps in the same namespace
+ as the Alertmanager object, which shall be mounted into the Alertmanager
+ Pods. Each ConfigMap is added to the StatefulSet definition as a
+ volume named `configmap-`. The ConfigMaps are mounted
+ into `/etc/alertmanager/configmaps/` in the 'alertmanager'
+ container.
+ items:
+ type: string
+ type: array
+ configSecret:
+ description: "ConfigSecret is the name of a Kubernetes Secret in the
+ same namespace as the Alertmanager object, which contains the configuration
+ for this Alertmanager instance. If empty, it defaults to `alertmanager-`.
+ \n The Alertmanager configuration should be available under the
+ `alertmanager.yaml` key. Additional keys from the original secret
+ are copied to the generated secret and mounted into the `/etc/alertmanager/config`
+ directory in the `alertmanager` container. \n If either the secret
+ or the `alertmanager.yaml` key is missing, the operator provisions
+ a minimal Alertmanager configuration with one empty receiver (effectively
+ dropping alert notifications)."
+ type: string
+ containers:
+ description: 'Containers allows injecting additional containers. This
+ is meant to allow adding an authentication proxy to an Alertmanager
+ pod. Containers described here modify an operator generated container
+ if they share the same name and modifications are done via a strategic
+ merge patch. The current container names are: `alertmanager` and
+ `config-reloader`. Overriding containers is entirely outside the
+ scope of what the maintainers will support and by doing so, you
+ accept that this behaviour may break at any time without notice.'
+ items:
+ description: A single application container that you want to run
+ within a pod.
+ properties:
+ args:
+ description: 'Arguments to the entrypoint. The container image''s
+ CMD is used if this is not provided. Variable references $(VAR_NAME)
+ are expanded using the container''s environment. If a variable
+ cannot be resolved, the reference in the input string will
+ be unchanged. Double $$ are reduced to a single $, which allows
+ for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will
+ produce the string literal "$(VAR_NAME)". Escaped references
+ will never be expanded, regardless of whether the variable
+ exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'
+ items:
+ type: string
+ type: array
+ command:
+ description: 'Entrypoint array. Not executed within a shell.
+ The container image''s ENTRYPOINT is used if this is not provided.
+ Variable references $(VAR_NAME) are expanded using the container''s
+ environment. If a variable cannot be resolved, the reference
+ in the input string will be unchanged. Double $$ are reduced
+ to a single $, which allows for escaping the $(VAR_NAME) syntax:
+ i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)".
+ Escaped references will never be expanded, regardless of whether
+ the variable exists or not. Cannot be updated. More info:
+ https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'
+ items:
+ type: string
+ type: array
+ env:
+ description: List of environment variables to set in the container.
+ Cannot be updated.
+ items:
+ description: EnvVar represents an environment variable present
+ in a Container.
+ properties:
+ name:
+ description: Name of the environment variable. Must be
+ a C_IDENTIFIER.
+ type: string
+ value:
+ description: 'Variable references $(VAR_NAME) are expanded
+ using the previously defined environment variables in
+ the container and any service environment variables.
+ If a variable cannot be resolved, the reference in the
+ input string will be unchanged. Double $$ are reduced
+ to a single $, which allows for escaping the $(VAR_NAME)
+ syntax: i.e. "$$(VAR_NAME)" will produce the string
+ literal "$(VAR_NAME)". Escaped references will never
+ be expanded, regardless of whether the variable exists
+ or not. Defaults to "".'
+ type: string
+ valueFrom:
+ description: Source for the environment variable's value.
+ Cannot be used if value is not empty.
+ properties:
+ configMapKeyRef:
+ description: Selects a key of a ConfigMap.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ fieldRef:
+ description: 'Selects a field of the pod: supports
+ metadata.name, metadata.namespace, `metadata.labels['''']`,
+ `metadata.annotations['''']`, spec.nodeName,
+ spec.serviceAccountName, status.hostIP, status.podIP,
+ status.podIPs.'
+ properties:
+ apiVersion:
+ description: Version of the schema the FieldPath
+ is written in terms of, defaults to "v1".
+ type: string
+ fieldPath:
+ description: Path of the field to select in the
+ specified API version.
+ type: string
+ required:
+ - fieldPath
+ type: object
+ x-kubernetes-map-type: atomic
+ resourceFieldRef:
+ description: 'Selects a resource of the container:
+ only resources limits and requests (limits.cpu,
+ limits.memory, limits.ephemeral-storage, requests.cpu,
+ requests.memory and requests.ephemeral-storage)
+ are currently supported.'
+ properties:
+ containerName:
+ description: 'Container name: required for volumes,
+ optional for env vars'
+ type: string
+ divisor:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Specifies the output format of the
+ exposed resources, defaults to "1"
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ resource:
+ description: 'Required: resource to select'
+ type: string
+ required:
+ - resource
+ type: object
+ x-kubernetes-map-type: atomic
+ secretKeyRef:
+ description: Selects a key of a secret in the pod's
+ namespace
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ required:
+ - name
+ type: object
+ type: array
+ envFrom:
+ description: List of sources to populate environment variables
+ in the container. The keys defined within a source must be
+ a C_IDENTIFIER. All invalid keys will be reported as an event
+ when the container is starting. When a key exists in multiple
+ sources, the value associated with the last source will take
+ precedence. Values defined by an Env with a duplicate key
+ will take precedence. Cannot be updated.
+ items:
+ description: EnvFromSource represents the source of a set
+ of ConfigMaps
+ properties:
+ configMapRef:
+ description: The ConfigMap to select from
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap must be
+ defined
+ type: boolean
+ type: object
+ x-kubernetes-map-type: atomic
+ prefix:
+ description: An optional identifier to prepend to each
+ key in the ConfigMap. Must be a C_IDENTIFIER.
+ type: string
+ secretRef:
+ description: The Secret to select from
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret must be defined
+ type: boolean
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ image:
+ description: 'Container image name. More info: https://kubernetes.io/docs/concepts/containers/images
+ This field is optional to allow higher level config management
+ to default or override container images in workload controllers
+ like Deployments and StatefulSets.'
+ type: string
+ imagePullPolicy:
+ description: 'Image pull policy. One of Always, Never, IfNotPresent.
+ Defaults to Always if :latest tag is specified, or IfNotPresent
+ otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images'
+ type: string
+ lifecycle:
+ description: Actions that the management system should take
+ in response to container lifecycle events. Cannot be updated.
+ properties:
+ postStart:
+ description: 'PostStart is called immediately after a container
+ is created. If the handler fails, the container is terminated
+ and restarted according to its restart policy. Other management
+ of the container blocks until the hook completes. More
+ info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for
+ the command is root ('/') in the container's
+ filesystem. The command is simply exec'd, it is
+ not run inside a shell, so traditional shell instructions
+ ('|', etc) won't work. To use a shell, you need
+ to explicitly call out to that shell. Exit status
+ of 0 is treated as live/healthy and non-zero is
+ unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to
+ the pod IP. You probably want to set "Host" in
+ httpHeaders instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request.
+ HTTP allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access
+ on the container. Number must be in the range
+ 1 to 65535. Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the
+ host. Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ tcpSocket:
+ description: Deprecated. TCPSocket is NOT supported
+ as a LifecycleHandler and kept for the backward compatibility.
+ There are no validation of this field and lifecycle
+ hooks will fail in runtime when tcp handler is specified.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to,
+ defaults to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access
+ on the container. Number must be in the range
+ 1 to 65535. Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ type: object
+ preStop:
+ description: 'PreStop is called immediately before a container
+ is terminated due to an API request or management event
+ such as liveness/startup probe failure, preemption, resource
+ contention, etc. The handler is not called if the container
+ crashes or exits. The Pod''s termination grace period
+ countdown begins before the PreStop hook is executed.
+ Regardless of the outcome of the handler, the container
+ will eventually terminate within the Pod''s termination
+ grace period (unless delayed by finalizers). Other management
+ of the container blocks until the hook completes or until
+ the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for
+ the command is root ('/') in the container's
+ filesystem. The command is simply exec'd, it is
+ not run inside a shell, so traditional shell instructions
+ ('|', etc) won't work. To use a shell, you need
+ to explicitly call out to that shell. Exit status
+ of 0 is treated as live/healthy and non-zero is
+ unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to
+ the pod IP. You probably want to set "Host" in
+ httpHeaders instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request.
+ HTTP allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access
+ on the container. Number must be in the range
+ 1 to 65535. Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the
+ host. Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ tcpSocket:
+ description: Deprecated. TCPSocket is NOT supported
+ as a LifecycleHandler and kept for the backward compatibility.
+ There are no validation of this field and lifecycle
+ hooks will fail in runtime when tcp handler is specified.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to,
+ defaults to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access
+ on the container. Number must be in the range
+ 1 to 65535. Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ type: object
+ type: object
+ livenessProbe:
+ description: 'Periodic probe of container liveness. Container
+ will be restarted if the probe fails. Cannot be updated. More
+ info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for the
+ command is root ('/') in the container's filesystem.
+ The command is simply exec'd, it is not run inside
+ a shell, so traditional shell instructions ('|', etc)
+ won't work. To use a shell, you need to explicitly
+ call out to that shell. Exit status of 0 is treated
+ as live/healthy and non-zero is unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ failureThreshold:
+ description: Minimum consecutive failures for the probe
+ to be considered failed after having succeeded. Defaults
+ to 3. Minimum value is 1.
+ format: int32
+ type: integer
+ grpc:
+ description: GRPC specifies an action involving a GRPC port.
+ properties:
+ port:
+ description: Port number of the gRPC service. Number
+ must be in the range 1 to 65535.
+ format: int32
+ type: integer
+ service:
+ description: "Service is the name of the service to
+ place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
+ \n If this is not specified, the default behavior
+ is defined by gRPC."
+ type: string
+ required:
+ - port
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to the
+ pod IP. You probably want to set "Host" in httpHeaders
+ instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request. HTTP
+ allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the host.
+ Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ initialDelaySeconds:
+ description: 'Number of seconds after the container has
+ started before liveness probes are initiated. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ periodSeconds:
+ description: How often (in seconds) to perform the probe.
+ Default to 10 seconds. Minimum value is 1.
+ format: int32
+ type: integer
+ successThreshold:
+ description: Minimum consecutive successes for the probe
+ to be considered successful after having failed. Defaults
+ to 1. Must be 1 for liveness and startup. Minimum value
+ is 1.
+ format: int32
+ type: integer
+ tcpSocket:
+ description: TCPSocket specifies an action involving a TCP
+ port.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to, defaults
+ to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ terminationGracePeriodSeconds:
+ description: Optional duration in seconds the pod needs
+ to terminate gracefully upon probe failure. The grace
+ period is the duration in seconds after the processes
+ running in the pod are sent a termination signal and the
+ time when the processes are forcibly halted with a kill
+ signal. Set this value longer than the expected cleanup
+ time for your process. If this value is nil, the pod's
+ terminationGracePeriodSeconds will be used. Otherwise,
+ this value overrides the value provided by the pod spec.
+ Value must be non-negative integer. The value zero indicates
+ stop immediately via the kill signal (no opportunity to
+ shut down). This is a beta field and requires enabling
+ ProbeTerminationGracePeriod feature gate. Minimum value
+ is 1. spec.terminationGracePeriodSeconds is used if unset.
+ format: int64
+ type: integer
+ timeoutSeconds:
+ description: 'Number of seconds after which the probe times
+ out. Defaults to 1 second. Minimum value is 1. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ type: object
+ name:
+ description: Name of the container specified as a DNS_LABEL.
+ Each container in a pod must have a unique name (DNS_LABEL).
+ Cannot be updated.
+ type: string
+ ports:
+ description: List of ports to expose from the container. Not
+ specifying a port here DOES NOT prevent that port from being
+ exposed. Any port which is listening on the default "0.0.0.0"
+ address inside a container will be accessible from the network.
+ Modifying this array with strategic merge patch may corrupt
+ the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255.
+ Cannot be updated.
+ items:
+ description: ContainerPort represents a network port in a
+ single container.
+ properties:
+ containerPort:
+ description: Number of port to expose on the pod's IP
+ address. This must be a valid port number, 0 < x < 65536.
+ format: int32
+ type: integer
+ hostIP:
+ description: What host IP to bind the external port to.
+ type: string
+ hostPort:
+ description: Number of port to expose on the host. If
+ specified, this must be a valid port number, 0 < x <
+ 65536. If HostNetwork is specified, this must match
+ ContainerPort. Most containers do not need this.
+ format: int32
+ type: integer
+ name:
+ description: If specified, this must be an IANA_SVC_NAME
+ and unique within the pod. Each named port in a pod
+ must have a unique name. Name for the port that can
+ be referred to by services.
+ type: string
+ protocol:
+ default: TCP
+ description: Protocol for port. Must be UDP, TCP, or SCTP.
+ Defaults to "TCP".
+ type: string
+ required:
+ - containerPort
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - containerPort
+ - protocol
+ x-kubernetes-list-type: map
+ readinessProbe:
+ description: 'Periodic probe of container service readiness.
+ Container will be removed from service endpoints if the probe
+ fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for the
+ command is root ('/') in the container's filesystem.
+ The command is simply exec'd, it is not run inside
+ a shell, so traditional shell instructions ('|', etc)
+ won't work. To use a shell, you need to explicitly
+ call out to that shell. Exit status of 0 is treated
+ as live/healthy and non-zero is unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ failureThreshold:
+ description: Minimum consecutive failures for the probe
+ to be considered failed after having succeeded. Defaults
+ to 3. Minimum value is 1.
+ format: int32
+ type: integer
+ grpc:
+ description: GRPC specifies an action involving a GRPC port.
+ properties:
+ port:
+ description: Port number of the gRPC service. Number
+ must be in the range 1 to 65535.
+ format: int32
+ type: integer
+ service:
+ description: "Service is the name of the service to
+ place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
+ \n If this is not specified, the default behavior
+ is defined by gRPC."
+ type: string
+ required:
+ - port
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to the
+ pod IP. You probably want to set "Host" in httpHeaders
+ instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request. HTTP
+ allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the host.
+ Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ initialDelaySeconds:
+ description: 'Number of seconds after the container has
+ started before liveness probes are initiated. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ periodSeconds:
+ description: How often (in seconds) to perform the probe.
+ Default to 10 seconds. Minimum value is 1.
+ format: int32
+ type: integer
+ successThreshold:
+ description: Minimum consecutive successes for the probe
+ to be considered successful after having failed. Defaults
+ to 1. Must be 1 for liveness and startup. Minimum value
+ is 1.
+ format: int32
+ type: integer
+ tcpSocket:
+ description: TCPSocket specifies an action involving a TCP
+ port.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to, defaults
+ to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ terminationGracePeriodSeconds:
+ description: Optional duration in seconds the pod needs
+ to terminate gracefully upon probe failure. The grace
+ period is the duration in seconds after the processes
+ running in the pod are sent a termination signal and the
+ time when the processes are forcibly halted with a kill
+ signal. Set this value longer than the expected cleanup
+ time for your process. If this value is nil, the pod's
+ terminationGracePeriodSeconds will be used. Otherwise,
+ this value overrides the value provided by the pod spec.
+ Value must be non-negative integer. The value zero indicates
+ stop immediately via the kill signal (no opportunity to
+ shut down). This is a beta field and requires enabling
+ ProbeTerminationGracePeriod feature gate. Minimum value
+ is 1. spec.terminationGracePeriodSeconds is used if unset.
+ format: int64
+ type: integer
+ timeoutSeconds:
+ description: 'Number of seconds after which the probe times
+ out. Defaults to 1 second. Minimum value is 1. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ type: object
+ resizePolicy:
+ description: Resources resize policy for the container.
+ items:
+ description: ContainerResizePolicy represents resource resize
+ policy for the container.
+ properties:
+ resourceName:
+ description: 'Name of the resource to which this resource
+ resize policy applies. Supported values: cpu, memory.'
+ type: string
+ restartPolicy:
+ description: Restart policy to apply when specified resource
+ is resized. If not specified, it defaults to NotRequired.
+ type: string
+ required:
+ - resourceName
+ - restartPolicy
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ resources:
+ description: 'Compute Resources required by this container.
+ Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ properties:
+ claims:
+ description: "Claims lists the names of resources, defined
+ in spec.resourceClaims, that are used by this container.
+ \n This is an alpha field and requires enabling the DynamicResourceAllocation
+ feature gate. \n This field is immutable. It can only
+ be set for containers."
+ items:
+ description: ResourceClaim references one entry in PodSpec.ResourceClaims.
+ properties:
+ name:
+ description: Name must match the name of one entry
+ in pod.spec.resourceClaims of the Pod where this
+ field is used. It makes that resource available
+ inside a container.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - name
+ x-kubernetes-list-type: map
+ limits:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Limits describes the maximum amount of compute
+ resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ requests:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Requests describes the minimum amount of compute
+ resources required. If Requests is omitted for a container,
+ it defaults to Limits if that is explicitly specified,
+ otherwise to an implementation-defined value. Requests
+ cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ type: object
+ restartPolicy:
+ description: 'RestartPolicy defines the restart behavior of
+ individual containers in a pod. This field may only be set
+ for init containers, and the only allowed value is "Always".
+ For non-init containers or when this field is not specified,
+ the restart behavior is defined by the Pod''s restart policy
+ and the container type. Setting the RestartPolicy as "Always"
+ for the init container will have the following effect: this
+ init container will be continually restarted on exit until
+ all regular containers have terminated. Once all regular containers
+ have completed, all init containers with restartPolicy "Always"
+ will be shut down. This lifecycle differs from normal init
+ containers and is often referred to as a "sidecar" container.
+ Although this init container still starts in the init container
+ sequence, it does not wait for the container to complete before
+ proceeding to the next init container. Instead, the next init
+ container starts immediately after this init container is
+ started, or after any startupProbe has successfully completed.'
+ type: string
+ securityContext:
+ description: 'SecurityContext defines the security options the
+ container should be run with. If set, the fields of SecurityContext
+ override the equivalent fields of PodSecurityContext. More
+ info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/'
+ properties:
+ allowPrivilegeEscalation:
+ description: 'AllowPrivilegeEscalation controls whether
+ a process can gain more privileges than its parent process.
+ This bool directly controls if the no_new_privs flag will
+ be set on the container process. AllowPrivilegeEscalation
+ is true always when the container is: 1) run as Privileged
+ 2) has CAP_SYS_ADMIN Note that this field cannot be set
+ when spec.os.name is windows.'
+ type: boolean
+ capabilities:
+ description: The capabilities to add/drop when running containers.
+ Defaults to the default set of capabilities granted by
+ the container runtime. Note that this field cannot be
+ set when spec.os.name is windows.
+ properties:
+ add:
+ description: Added capabilities
+ items:
+ description: Capability represent POSIX capabilities
+ type
+ type: string
+ type: array
+ drop:
+ description: Removed capabilities
+ items:
+ description: Capability represent POSIX capabilities
+ type
+ type: string
+ type: array
+ type: object
+ privileged:
+ description: Run container in privileged mode. Processes
+ in privileged containers are essentially equivalent to
+ root on the host. Defaults to false. Note that this field
+ cannot be set when spec.os.name is windows.
+ type: boolean
+ procMount:
+ description: procMount denotes the type of proc mount to
+ use for the containers. The default is DefaultProcMount
+ which uses the container runtime defaults for readonly
+ paths and masked paths. This requires the ProcMountType
+ feature flag to be enabled. Note that this field cannot
+ be set when spec.os.name is windows.
+ type: string
+ readOnlyRootFilesystem:
+ description: Whether this container has a read-only root
+ filesystem. Default is false. Note that this field cannot
+ be set when spec.os.name is windows.
+ type: boolean
+ runAsGroup:
+ description: The GID to run the entrypoint of the container
+ process. Uses runtime default if unset. May also be set
+ in PodSecurityContext. If set in both SecurityContext
+ and PodSecurityContext, the value specified in SecurityContext
+ takes precedence. Note that this field cannot be set when
+ spec.os.name is windows.
+ format: int64
+ type: integer
+ runAsNonRoot:
+ description: Indicates that the container must run as a
+ non-root user. If true, the Kubelet will validate the
+ image at runtime to ensure that it does not run as UID
+ 0 (root) and fail to start the container if it does. If
+ unset or false, no such validation will be performed.
+ May also be set in PodSecurityContext. If set in both
+ SecurityContext and PodSecurityContext, the value specified
+ in SecurityContext takes precedence.
+ type: boolean
+ runAsUser:
+ description: The UID to run the entrypoint of the container
+ process. Defaults to user specified in image metadata
+ if unspecified. May also be set in PodSecurityContext. If
+ set in both SecurityContext and PodSecurityContext, the
+ value specified in SecurityContext takes precedence. Note
+ that this field cannot be set when spec.os.name is windows.
+ format: int64
+ type: integer
+ seLinuxOptions:
+ description: The SELinux context to be applied to the container.
+ If unspecified, the container runtime will allocate a
+ random SELinux context for each container. May also be
+ set in PodSecurityContext. If set in both SecurityContext
+ and PodSecurityContext, the value specified in SecurityContext
+ takes precedence. Note that this field cannot be set when
+ spec.os.name is windows.
+ properties:
+ level:
+ description: Level is SELinux level label that applies
+ to the container.
+ type: string
+ role:
+ description: Role is a SELinux role label that applies
+ to the container.
+ type: string
+ type:
+ description: Type is a SELinux type label that applies
+ to the container.
+ type: string
+ user:
+ description: User is a SELinux user label that applies
+ to the container.
+ type: string
+ type: object
+ seccompProfile:
+ description: The seccomp options to use by this container.
+ If seccomp options are provided at both the pod & container
+ level, the container options override the pod options.
+ Note that this field cannot be set when spec.os.name is
+ windows.
+ properties:
+ localhostProfile:
+ description: localhostProfile indicates a profile defined
+ in a file on the node should be used. The profile
+ must be preconfigured on the node to work. Must be
+ a descending path, relative to the kubelet's configured
+ seccomp profile location. Must be set if type is "Localhost".
+ Must NOT be set for any other type.
+ type: string
+ type:
+ description: "type indicates which kind of seccomp profile
+ will be applied. Valid options are: \n Localhost -
+ a profile defined in a file on the node should be
+ used. RuntimeDefault - the container runtime default
+ profile should be used. Unconfined - no profile should
+ be applied."
+ type: string
+ required:
+ - type
+ type: object
+ windowsOptions:
+ description: The Windows specific settings applied to all
+ containers. If unspecified, the options from the PodSecurityContext
+ will be used. If set in both SecurityContext and PodSecurityContext,
+ the value specified in SecurityContext takes precedence.
+ Note that this field cannot be set when spec.os.name is
+ linux.
+ properties:
+ gmsaCredentialSpec:
+ description: GMSACredentialSpec is where the GMSA admission
+ webhook (https://github.com/kubernetes-sigs/windows-gmsa)
+ inlines the contents of the GMSA credential spec named
+ by the GMSACredentialSpecName field.
+ type: string
+ gmsaCredentialSpecName:
+ description: GMSACredentialSpecName is the name of the
+ GMSA credential spec to use.
+ type: string
+ hostProcess:
+ description: HostProcess determines if a container should
+ be run as a 'Host Process' container. All of a Pod's
+ containers must have the same effective HostProcess
+ value (it is not allowed to have a mix of HostProcess
+ containers and non-HostProcess containers). In addition,
+ if HostProcess is true then HostNetwork must also
+ be set to true.
+ type: boolean
+ runAsUserName:
+ description: The UserName in Windows to run the entrypoint
+ of the container process. Defaults to the user specified
+ in image metadata if unspecified. May also be set
+ in PodSecurityContext. If set in both SecurityContext
+ and PodSecurityContext, the value specified in SecurityContext
+ takes precedence.
+ type: string
+ type: object
+ type: object
+ startupProbe:
+ description: 'StartupProbe indicates that the Pod has successfully
+ initialized. If specified, no other probes are executed until
+ this completes successfully. If this probe fails, the Pod
+ will be restarted, just as if the livenessProbe failed. This
+ can be used to provide different probe parameters at the beginning
+ of a Pod''s lifecycle, when it might take a long time to load
+ data or warm a cache, than during steady-state operation.
+ This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for the
+ command is root ('/') in the container's filesystem.
+ The command is simply exec'd, it is not run inside
+ a shell, so traditional shell instructions ('|', etc)
+ won't work. To use a shell, you need to explicitly
+ call out to that shell. Exit status of 0 is treated
+ as live/healthy and non-zero is unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ failureThreshold:
+ description: Minimum consecutive failures for the probe
+ to be considered failed after having succeeded. Defaults
+ to 3. Minimum value is 1.
+ format: int32
+ type: integer
+ grpc:
+ description: GRPC specifies an action involving a GRPC port.
+ properties:
+ port:
+ description: Port number of the gRPC service. Number
+ must be in the range 1 to 65535.
+ format: int32
+ type: integer
+ service:
+ description: "Service is the name of the service to
+ place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
+ \n If this is not specified, the default behavior
+ is defined by gRPC."
+ type: string
+ required:
+ - port
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to the
+ pod IP. You probably want to set "Host" in httpHeaders
+ instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request. HTTP
+ allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the host.
+ Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ initialDelaySeconds:
+ description: 'Number of seconds after the container has
+ started before liveness probes are initiated. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ periodSeconds:
+ description: How often (in seconds) to perform the probe.
+ Default to 10 seconds. Minimum value is 1.
+ format: int32
+ type: integer
+ successThreshold:
+ description: Minimum consecutive successes for the probe
+ to be considered successful after having failed. Defaults
+ to 1. Must be 1 for liveness and startup. Minimum value
+ is 1.
+ format: int32
+ type: integer
+ tcpSocket:
+ description: TCPSocket specifies an action involving a TCP
+ port.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to, defaults
+ to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ terminationGracePeriodSeconds:
+ description: Optional duration in seconds the pod needs
+ to terminate gracefully upon probe failure. The grace
+ period is the duration in seconds after the processes
+ running in the pod are sent a termination signal and the
+ time when the processes are forcibly halted with a kill
+ signal. Set this value longer than the expected cleanup
+ time for your process. If this value is nil, the pod's
+ terminationGracePeriodSeconds will be used. Otherwise,
+ this value overrides the value provided by the pod spec.
+ Value must be non-negative integer. The value zero indicates
+ stop immediately via the kill signal (no opportunity to
+ shut down). This is a beta field and requires enabling
+ ProbeTerminationGracePeriod feature gate. Minimum value
+ is 1. spec.terminationGracePeriodSeconds is used if unset.
+ format: int64
+ type: integer
+ timeoutSeconds:
+ description: 'Number of seconds after which the probe times
+ out. Defaults to 1 second. Minimum value is 1. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ type: object
+ stdin:
+ description: Whether this container should allocate a buffer
+ for stdin in the container runtime. If this is not set, reads
+ from stdin in the container will always result in EOF. Default
+ is false.
+ type: boolean
+ stdinOnce:
+ description: Whether the container runtime should close the
+ stdin channel after it has been opened by a single attach.
+ When stdin is true the stdin stream will remain open across
+ multiple attach sessions. If stdinOnce is set to true, stdin
+ is opened on container start, is empty until the first client
+ attaches to stdin, and then remains open and accepts data
+ until the client disconnects, at which time stdin is closed
+ and remains closed until the container is restarted. If this
+ flag is false, a container processes that reads from stdin
+ will never receive an EOF. Default is false
+ type: boolean
+ terminationMessagePath:
+ description: 'Optional: Path at which the file to which the
+ container''s termination message will be written is mounted
+ into the container''s filesystem. Message written is intended
+ to be brief final status, such as an assertion failure message.
+ Will be truncated by the node if greater than 4096 bytes.
+ The total message length across all containers will be limited
+ to 12kb. Defaults to /dev/termination-log. Cannot be updated.'
+ type: string
+ terminationMessagePolicy:
+ description: Indicate how the termination message should be
+ populated. File will use the contents of terminationMessagePath
+ to populate the container status message on both success and
+ failure. FallbackToLogsOnError will use the last chunk of
+ container log output if the termination message file is empty
+ and the container exited with an error. The log output is
+ limited to 2048 bytes or 80 lines, whichever is smaller. Defaults
+ to File. Cannot be updated.
+ type: string
+ tty:
+ description: Whether this container should allocate a TTY for
+ itself, also requires 'stdin' to be true. Default is false.
+ type: boolean
+ volumeDevices:
+ description: volumeDevices is the list of block devices to be
+ used by the container.
+ items:
+ description: volumeDevice describes a mapping of a raw block
+ device within a container.
+ properties:
+ devicePath:
+ description: devicePath is the path inside of the container
+ that the device will be mapped to.
+ type: string
+ name:
+ description: name must match the name of a persistentVolumeClaim
+ in the pod
+ type: string
+ required:
+ - devicePath
+ - name
+ type: object
+ type: array
+ volumeMounts:
+ description: Pod volumes to mount into the container's filesystem.
+ Cannot be updated.
+ items:
+ description: VolumeMount describes a mounting of a Volume
+ within a container.
+ properties:
+ mountPath:
+ description: Path within the container at which the volume
+ should be mounted. Must not contain ':'.
+ type: string
+ mountPropagation:
+ description: mountPropagation determines how mounts are
+ propagated from the host to container and the other
+ way around. When not set, MountPropagationNone is used.
+ This field is beta in 1.10.
+ type: string
+ name:
+ description: This must match the Name of a Volume.
+ type: string
+ readOnly:
+ description: Mounted read-only if true, read-write otherwise
+ (false or unspecified). Defaults to false.
+ type: boolean
+ subPath:
+ description: Path within the volume from which the container's
+ volume should be mounted. Defaults to "" (volume's root).
+ type: string
+ subPathExpr:
+ description: Expanded path within the volume from which
+ the container's volume should be mounted. Behaves similarly
+ to SubPath but environment variable references $(VAR_NAME)
+ are expanded using the container's environment. Defaults
+ to "" (volume's root). SubPathExpr and SubPath are mutually
+ exclusive.
+ type: string
+ required:
+ - mountPath
+ - name
+ type: object
+ type: array
+ workingDir:
+ description: Container's working directory. If not specified,
+ the container runtime's default will be used, which might
+ be configured in the container image. Cannot be updated.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ externalUrl:
+ description: 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.
+ type: string
+ forceEnableClusterMode:
+ description: 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.
+ type: boolean
+ hostAliases:
+ description: Pods' hostAliases configuration
+ items:
+ description: HostAlias holds the mapping between IP and hostnames
+ that will be injected as an entry in the pod's hosts file.
+ properties:
+ hostnames:
+ description: Hostnames for the above IP address.
+ items:
+ type: string
+ type: array
+ ip:
+ description: IP address of the host file entry.
+ type: string
+ required:
+ - hostnames
+ - ip
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - ip
+ x-kubernetes-list-type: map
+ image:
+ description: Image if specified has precedence over baseImage, tag
+ and sha combinations. Specifying the version is still necessary
+ to ensure the Prometheus Operator knows what version of Alertmanager
+ is being configured.
+ type: string
+ imagePullPolicy:
+ description: Image pull policy for the 'alertmanager', 'init-config-reloader'
+ and 'config-reloader' containers. See https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy
+ for more details.
+ enum:
+ - ""
+ - Always
+ - Never
+ - IfNotPresent
+ type: string
+ imagePullSecrets:
+ description: An optional list of references to secrets in the same
+ namespace to use for pulling prometheus and alertmanager images
+ from registries see http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod
+ items:
+ description: LocalObjectReference contains enough information to
+ let you locate the referenced object inside the same namespace.
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
+ initContainers:
+ description: 'InitContainers allows adding initContainers to the pod
+ definition. Those can be used to e.g. fetch secrets for injection
+ into the Alertmanager configuration from external sources. Any errors
+ during the execution of an initContainer will lead to a restart
+ of the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
+ InitContainers described here modify an operator generated init
+ containers if they share the same name and modifications are done
+ via a strategic merge patch. The current init container name is:
+ `init-config-reloader`. Overriding init containers is entirely outside
+ the scope of what the maintainers will support and by doing so,
+ you accept that this behaviour may break at any time without notice.'
+ items:
+ description: A single application container that you want to run
+ within a pod.
+ properties:
+ args:
+ description: 'Arguments to the entrypoint. The container image''s
+ CMD is used if this is not provided. Variable references $(VAR_NAME)
+ are expanded using the container''s environment. If a variable
+ cannot be resolved, the reference in the input string will
+ be unchanged. Double $$ are reduced to a single $, which allows
+ for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will
+ produce the string literal "$(VAR_NAME)". Escaped references
+ will never be expanded, regardless of whether the variable
+ exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'
+ items:
+ type: string
+ type: array
+ command:
+ description: 'Entrypoint array. Not executed within a shell.
+ The container image''s ENTRYPOINT is used if this is not provided.
+ Variable references $(VAR_NAME) are expanded using the container''s
+ environment. If a variable cannot be resolved, the reference
+ in the input string will be unchanged. Double $$ are reduced
+ to a single $, which allows for escaping the $(VAR_NAME) syntax:
+ i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)".
+ Escaped references will never be expanded, regardless of whether
+ the variable exists or not. Cannot be updated. More info:
+ https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'
+ items:
+ type: string
+ type: array
+ env:
+ description: List of environment variables to set in the container.
+ Cannot be updated.
+ items:
+ description: EnvVar represents an environment variable present
+ in a Container.
+ properties:
+ name:
+ description: Name of the environment variable. Must be
+ a C_IDENTIFIER.
+ type: string
+ value:
+ description: 'Variable references $(VAR_NAME) are expanded
+ using the previously defined environment variables in
+ the container and any service environment variables.
+ If a variable cannot be resolved, the reference in the
+ input string will be unchanged. Double $$ are reduced
+ to a single $, which allows for escaping the $(VAR_NAME)
+ syntax: i.e. "$$(VAR_NAME)" will produce the string
+ literal "$(VAR_NAME)". Escaped references will never
+ be expanded, regardless of whether the variable exists
+ or not. Defaults to "".'
+ type: string
+ valueFrom:
+ description: Source for the environment variable's value.
+ Cannot be used if value is not empty.
+ properties:
+ configMapKeyRef:
+ description: Selects a key of a ConfigMap.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ fieldRef:
+ description: 'Selects a field of the pod: supports
+ metadata.name, metadata.namespace, `metadata.labels['''']`,
+ `metadata.annotations['''']`, spec.nodeName,
+ spec.serviceAccountName, status.hostIP, status.podIP,
+ status.podIPs.'
+ properties:
+ apiVersion:
+ description: Version of the schema the FieldPath
+ is written in terms of, defaults to "v1".
+ type: string
+ fieldPath:
+ description: Path of the field to select in the
+ specified API version.
+ type: string
+ required:
+ - fieldPath
+ type: object
+ x-kubernetes-map-type: atomic
+ resourceFieldRef:
+ description: 'Selects a resource of the container:
+ only resources limits and requests (limits.cpu,
+ limits.memory, limits.ephemeral-storage, requests.cpu,
+ requests.memory and requests.ephemeral-storage)
+ are currently supported.'
+ properties:
+ containerName:
+ description: 'Container name: required for volumes,
+ optional for env vars'
+ type: string
+ divisor:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Specifies the output format of the
+ exposed resources, defaults to "1"
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ resource:
+ description: 'Required: resource to select'
+ type: string
+ required:
+ - resource
+ type: object
+ x-kubernetes-map-type: atomic
+ secretKeyRef:
+ description: Selects a key of a secret in the pod's
+ namespace
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ required:
+ - name
+ type: object
+ type: array
+ envFrom:
+ description: List of sources to populate environment variables
+ in the container. The keys defined within a source must be
+ a C_IDENTIFIER. All invalid keys will be reported as an event
+ when the container is starting. When a key exists in multiple
+ sources, the value associated with the last source will take
+ precedence. Values defined by an Env with a duplicate key
+ will take precedence. Cannot be updated.
+ items:
+ description: EnvFromSource represents the source of a set
+ of ConfigMaps
+ properties:
+ configMapRef:
+ description: The ConfigMap to select from
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap must be
+ defined
+ type: boolean
+ type: object
+ x-kubernetes-map-type: atomic
+ prefix:
+ description: An optional identifier to prepend to each
+ key in the ConfigMap. Must be a C_IDENTIFIER.
+ type: string
+ secretRef:
+ description: The Secret to select from
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret must be defined
+ type: boolean
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ image:
+ description: 'Container image name. More info: https://kubernetes.io/docs/concepts/containers/images
+ This field is optional to allow higher level config management
+ to default or override container images in workload controllers
+ like Deployments and StatefulSets.'
+ type: string
+ imagePullPolicy:
+ description: 'Image pull policy. One of Always, Never, IfNotPresent.
+ Defaults to Always if :latest tag is specified, or IfNotPresent
+ otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images'
+ type: string
+ lifecycle:
+ description: Actions that the management system should take
+ in response to container lifecycle events. Cannot be updated.
+ properties:
+ postStart:
+ description: 'PostStart is called immediately after a container
+ is created. If the handler fails, the container is terminated
+ and restarted according to its restart policy. Other management
+ of the container blocks until the hook completes. More
+ info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for
+ the command is root ('/') in the container's
+ filesystem. The command is simply exec'd, it is
+ not run inside a shell, so traditional shell instructions
+ ('|', etc) won't work. To use a shell, you need
+ to explicitly call out to that shell. Exit status
+ of 0 is treated as live/healthy and non-zero is
+ unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to
+ the pod IP. You probably want to set "Host" in
+ httpHeaders instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request.
+ HTTP allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access
+ on the container. Number must be in the range
+ 1 to 65535. Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the
+ host. Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ tcpSocket:
+ description: Deprecated. TCPSocket is NOT supported
+ as a LifecycleHandler and kept for the backward compatibility.
+ There are no validation of this field and lifecycle
+ hooks will fail in runtime when tcp handler is specified.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to,
+ defaults to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access
+ on the container. Number must be in the range
+ 1 to 65535. Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ type: object
+ preStop:
+ description: 'PreStop is called immediately before a container
+ is terminated due to an API request or management event
+ such as liveness/startup probe failure, preemption, resource
+ contention, etc. The handler is not called if the container
+ crashes or exits. The Pod''s termination grace period
+ countdown begins before the PreStop hook is executed.
+ Regardless of the outcome of the handler, the container
+ will eventually terminate within the Pod''s termination
+ grace period (unless delayed by finalizers). Other management
+ of the container blocks until the hook completes or until
+ the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for
+ the command is root ('/') in the container's
+ filesystem. The command is simply exec'd, it is
+ not run inside a shell, so traditional shell instructions
+ ('|', etc) won't work. To use a shell, you need
+ to explicitly call out to that shell. Exit status
+ of 0 is treated as live/healthy and non-zero is
+ unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to
+ the pod IP. You probably want to set "Host" in
+ httpHeaders instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request.
+ HTTP allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access
+ on the container. Number must be in the range
+ 1 to 65535. Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the
+ host. Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ tcpSocket:
+ description: Deprecated. TCPSocket is NOT supported
+ as a LifecycleHandler and kept for the backward compatibility.
+ There are no validation of this field and lifecycle
+ hooks will fail in runtime when tcp handler is specified.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to,
+ defaults to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access
+ on the container. Number must be in the range
+ 1 to 65535. Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ type: object
+ type: object
+ livenessProbe:
+ description: 'Periodic probe of container liveness. Container
+ will be restarted if the probe fails. Cannot be updated. More
+ info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for the
+ command is root ('/') in the container's filesystem.
+ The command is simply exec'd, it is not run inside
+ a shell, so traditional shell instructions ('|', etc)
+ won't work. To use a shell, you need to explicitly
+ call out to that shell. Exit status of 0 is treated
+ as live/healthy and non-zero is unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ failureThreshold:
+ description: Minimum consecutive failures for the probe
+ to be considered failed after having succeeded. Defaults
+ to 3. Minimum value is 1.
+ format: int32
+ type: integer
+ grpc:
+ description: GRPC specifies an action involving a GRPC port.
+ properties:
+ port:
+ description: Port number of the gRPC service. Number
+ must be in the range 1 to 65535.
+ format: int32
+ type: integer
+ service:
+ description: "Service is the name of the service to
+ place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
+ \n If this is not specified, the default behavior
+ is defined by gRPC."
+ type: string
+ required:
+ - port
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to the
+ pod IP. You probably want to set "Host" in httpHeaders
+ instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request. HTTP
+ allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the host.
+ Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ initialDelaySeconds:
+ description: 'Number of seconds after the container has
+ started before liveness probes are initiated. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ periodSeconds:
+ description: How often (in seconds) to perform the probe.
+ Default to 10 seconds. Minimum value is 1.
+ format: int32
+ type: integer
+ successThreshold:
+ description: Minimum consecutive successes for the probe
+ to be considered successful after having failed. Defaults
+ to 1. Must be 1 for liveness and startup. Minimum value
+ is 1.
+ format: int32
+ type: integer
+ tcpSocket:
+ description: TCPSocket specifies an action involving a TCP
+ port.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to, defaults
+ to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ terminationGracePeriodSeconds:
+ description: Optional duration in seconds the pod needs
+ to terminate gracefully upon probe failure. The grace
+ period is the duration in seconds after the processes
+ running in the pod are sent a termination signal and the
+ time when the processes are forcibly halted with a kill
+ signal. Set this value longer than the expected cleanup
+ time for your process. If this value is nil, the pod's
+ terminationGracePeriodSeconds will be used. Otherwise,
+ this value overrides the value provided by the pod spec.
+ Value must be non-negative integer. The value zero indicates
+ stop immediately via the kill signal (no opportunity to
+ shut down). This is a beta field and requires enabling
+ ProbeTerminationGracePeriod feature gate. Minimum value
+ is 1. spec.terminationGracePeriodSeconds is used if unset.
+ format: int64
+ type: integer
+ timeoutSeconds:
+ description: 'Number of seconds after which the probe times
+ out. Defaults to 1 second. Minimum value is 1. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ type: object
+ name:
+ description: Name of the container specified as a DNS_LABEL.
+ Each container in a pod must have a unique name (DNS_LABEL).
+ Cannot be updated.
+ type: string
+ ports:
+ description: List of ports to expose from the container. Not
+ specifying a port here DOES NOT prevent that port from being
+ exposed. Any port which is listening on the default "0.0.0.0"
+ address inside a container will be accessible from the network.
+ Modifying this array with strategic merge patch may corrupt
+ the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255.
+ Cannot be updated.
+ items:
+ description: ContainerPort represents a network port in a
+ single container.
+ properties:
+ containerPort:
+ description: Number of port to expose on the pod's IP
+ address. This must be a valid port number, 0 < x < 65536.
+ format: int32
+ type: integer
+ hostIP:
+ description: What host IP to bind the external port to.
+ type: string
+ hostPort:
+ description: Number of port to expose on the host. If
+ specified, this must be a valid port number, 0 < x <
+ 65536. If HostNetwork is specified, this must match
+ ContainerPort. Most containers do not need this.
+ format: int32
+ type: integer
+ name:
+ description: If specified, this must be an IANA_SVC_NAME
+ and unique within the pod. Each named port in a pod
+ must have a unique name. Name for the port that can
+ be referred to by services.
+ type: string
+ protocol:
+ default: TCP
+ description: Protocol for port. Must be UDP, TCP, or SCTP.
+ Defaults to "TCP".
+ type: string
+ required:
+ - containerPort
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - containerPort
+ - protocol
+ x-kubernetes-list-type: map
+ readinessProbe:
+ description: 'Periodic probe of container service readiness.
+ Container will be removed from service endpoints if the probe
+ fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for the
+ command is root ('/') in the container's filesystem.
+ The command is simply exec'd, it is not run inside
+ a shell, so traditional shell instructions ('|', etc)
+ won't work. To use a shell, you need to explicitly
+ call out to that shell. Exit status of 0 is treated
+ as live/healthy and non-zero is unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ failureThreshold:
+ description: Minimum consecutive failures for the probe
+ to be considered failed after having succeeded. Defaults
+ to 3. Minimum value is 1.
+ format: int32
+ type: integer
+ grpc:
+ description: GRPC specifies an action involving a GRPC port.
+ properties:
+ port:
+ description: Port number of the gRPC service. Number
+ must be in the range 1 to 65535.
+ format: int32
+ type: integer
+ service:
+ description: "Service is the name of the service to
+ place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
+ \n If this is not specified, the default behavior
+ is defined by gRPC."
+ type: string
+ required:
+ - port
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to the
+ pod IP. You probably want to set "Host" in httpHeaders
+ instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request. HTTP
+ allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the host.
+ Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ initialDelaySeconds:
+ description: 'Number of seconds after the container has
+ started before liveness probes are initiated. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ periodSeconds:
+ description: How often (in seconds) to perform the probe.
+ Default to 10 seconds. Minimum value is 1.
+ format: int32
+ type: integer
+ successThreshold:
+ description: Minimum consecutive successes for the probe
+ to be considered successful after having failed. Defaults
+ to 1. Must be 1 for liveness and startup. Minimum value
+ is 1.
+ format: int32
+ type: integer
+ tcpSocket:
+ description: TCPSocket specifies an action involving a TCP
+ port.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to, defaults
+ to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ terminationGracePeriodSeconds:
+ description: Optional duration in seconds the pod needs
+ to terminate gracefully upon probe failure. The grace
+ period is the duration in seconds after the processes
+ running in the pod are sent a termination signal and the
+ time when the processes are forcibly halted with a kill
+ signal. Set this value longer than the expected cleanup
+ time for your process. If this value is nil, the pod's
+ terminationGracePeriodSeconds will be used. Otherwise,
+ this value overrides the value provided by the pod spec.
+ Value must be non-negative integer. The value zero indicates
+ stop immediately via the kill signal (no opportunity to
+ shut down). This is a beta field and requires enabling
+ ProbeTerminationGracePeriod feature gate. Minimum value
+ is 1. spec.terminationGracePeriodSeconds is used if unset.
+ format: int64
+ type: integer
+ timeoutSeconds:
+ description: 'Number of seconds after which the probe times
+ out. Defaults to 1 second. Minimum value is 1. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ type: object
+ resizePolicy:
+ description: Resources resize policy for the container.
+ items:
+ description: ContainerResizePolicy represents resource resize
+ policy for the container.
+ properties:
+ resourceName:
+ description: 'Name of the resource to which this resource
+ resize policy applies. Supported values: cpu, memory.'
+ type: string
+ restartPolicy:
+ description: Restart policy to apply when specified resource
+ is resized. If not specified, it defaults to NotRequired.
+ type: string
+ required:
+ - resourceName
+ - restartPolicy
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ resources:
+ description: 'Compute Resources required by this container.
+ Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ properties:
+ claims:
+ description: "Claims lists the names of resources, defined
+ in spec.resourceClaims, that are used by this container.
+ \n This is an alpha field and requires enabling the DynamicResourceAllocation
+ feature gate. \n This field is immutable. It can only
+ be set for containers."
+ items:
+ description: ResourceClaim references one entry in PodSpec.ResourceClaims.
+ properties:
+ name:
+ description: Name must match the name of one entry
+ in pod.spec.resourceClaims of the Pod where this
+ field is used. It makes that resource available
+ inside a container.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - name
+ x-kubernetes-list-type: map
+ limits:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Limits describes the maximum amount of compute
+ resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ requests:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Requests describes the minimum amount of compute
+ resources required. If Requests is omitted for a container,
+ it defaults to Limits if that is explicitly specified,
+ otherwise to an implementation-defined value. Requests
+ cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ type: object
+ restartPolicy:
+ description: 'RestartPolicy defines the restart behavior of
+ individual containers in a pod. This field may only be set
+ for init containers, and the only allowed value is "Always".
+ For non-init containers or when this field is not specified,
+ the restart behavior is defined by the Pod''s restart policy
+ and the container type. Setting the RestartPolicy as "Always"
+ for the init container will have the following effect: this
+ init container will be continually restarted on exit until
+ all regular containers have terminated. Once all regular containers
+ have completed, all init containers with restartPolicy "Always"
+ will be shut down. This lifecycle differs from normal init
+ containers and is often referred to as a "sidecar" container.
+ Although this init container still starts in the init container
+ sequence, it does not wait for the container to complete before
+ proceeding to the next init container. Instead, the next init
+ container starts immediately after this init container is
+ started, or after any startupProbe has successfully completed.'
+ type: string
+ securityContext:
+ description: 'SecurityContext defines the security options the
+ container should be run with. If set, the fields of SecurityContext
+ override the equivalent fields of PodSecurityContext. More
+ info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/'
+ properties:
+ allowPrivilegeEscalation:
+ description: 'AllowPrivilegeEscalation controls whether
+ a process can gain more privileges than its parent process.
+ This bool directly controls if the no_new_privs flag will
+ be set on the container process. AllowPrivilegeEscalation
+ is true always when the container is: 1) run as Privileged
+ 2) has CAP_SYS_ADMIN Note that this field cannot be set
+ when spec.os.name is windows.'
+ type: boolean
+ capabilities:
+ description: The capabilities to add/drop when running containers.
+ Defaults to the default set of capabilities granted by
+ the container runtime. Note that this field cannot be
+ set when spec.os.name is windows.
+ properties:
+ add:
+ description: Added capabilities
+ items:
+ description: Capability represent POSIX capabilities
+ type
+ type: string
+ type: array
+ drop:
+ description: Removed capabilities
+ items:
+ description: Capability represent POSIX capabilities
+ type
+ type: string
+ type: array
+ type: object
+ privileged:
+ description: Run container in privileged mode. Processes
+ in privileged containers are essentially equivalent to
+ root on the host. Defaults to false. Note that this field
+ cannot be set when spec.os.name is windows.
+ type: boolean
+ procMount:
+ description: procMount denotes the type of proc mount to
+ use for the containers. The default is DefaultProcMount
+ which uses the container runtime defaults for readonly
+ paths and masked paths. This requires the ProcMountType
+ feature flag to be enabled. Note that this field cannot
+ be set when spec.os.name is windows.
+ type: string
+ readOnlyRootFilesystem:
+ description: Whether this container has a read-only root
+ filesystem. Default is false. Note that this field cannot
+ be set when spec.os.name is windows.
+ type: boolean
+ runAsGroup:
+ description: The GID to run the entrypoint of the container
+ process. Uses runtime default if unset. May also be set
+ in PodSecurityContext. If set in both SecurityContext
+ and PodSecurityContext, the value specified in SecurityContext
+ takes precedence. Note that this field cannot be set when
+ spec.os.name is windows.
+ format: int64
+ type: integer
+ runAsNonRoot:
+ description: Indicates that the container must run as a
+ non-root user. If true, the Kubelet will validate the
+ image at runtime to ensure that it does not run as UID
+ 0 (root) and fail to start the container if it does. If
+ unset or false, no such validation will be performed.
+ May also be set in PodSecurityContext. If set in both
+ SecurityContext and PodSecurityContext, the value specified
+ in SecurityContext takes precedence.
+ type: boolean
+ runAsUser:
+ description: The UID to run the entrypoint of the container
+ process. Defaults to user specified in image metadata
+ if unspecified. May also be set in PodSecurityContext. If
+ set in both SecurityContext and PodSecurityContext, the
+ value specified in SecurityContext takes precedence. Note
+ that this field cannot be set when spec.os.name is windows.
+ format: int64
+ type: integer
+ seLinuxOptions:
+ description: The SELinux context to be applied to the container.
+ If unspecified, the container runtime will allocate a
+ random SELinux context for each container. May also be
+ set in PodSecurityContext. If set in both SecurityContext
+ and PodSecurityContext, the value specified in SecurityContext
+ takes precedence. Note that this field cannot be set when
+ spec.os.name is windows.
+ properties:
+ level:
+ description: Level is SELinux level label that applies
+ to the container.
+ type: string
+ role:
+ description: Role is a SELinux role label that applies
+ to the container.
+ type: string
+ type:
+ description: Type is a SELinux type label that applies
+ to the container.
+ type: string
+ user:
+ description: User is a SELinux user label that applies
+ to the container.
+ type: string
+ type: object
+ seccompProfile:
+ description: The seccomp options to use by this container.
+ If seccomp options are provided at both the pod & container
+ level, the container options override the pod options.
+ Note that this field cannot be set when spec.os.name is
+ windows.
+ properties:
+ localhostProfile:
+ description: localhostProfile indicates a profile defined
+ in a file on the node should be used. The profile
+ must be preconfigured on the node to work. Must be
+ a descending path, relative to the kubelet's configured
+ seccomp profile location. Must be set if type is "Localhost".
+ Must NOT be set for any other type.
+ type: string
+ type:
+ description: "type indicates which kind of seccomp profile
+ will be applied. Valid options are: \n Localhost -
+ a profile defined in a file on the node should be
+ used. RuntimeDefault - the container runtime default
+ profile should be used. Unconfined - no profile should
+ be applied."
+ type: string
+ required:
+ - type
+ type: object
+ windowsOptions:
+ description: The Windows specific settings applied to all
+ containers. If unspecified, the options from the PodSecurityContext
+ will be used. If set in both SecurityContext and PodSecurityContext,
+ the value specified in SecurityContext takes precedence.
+ Note that this field cannot be set when spec.os.name is
+ linux.
+ properties:
+ gmsaCredentialSpec:
+ description: GMSACredentialSpec is where the GMSA admission
+ webhook (https://github.com/kubernetes-sigs/windows-gmsa)
+ inlines the contents of the GMSA credential spec named
+ by the GMSACredentialSpecName field.
+ type: string
+ gmsaCredentialSpecName:
+ description: GMSACredentialSpecName is the name of the
+ GMSA credential spec to use.
+ type: string
+ hostProcess:
+ description: HostProcess determines if a container should
+ be run as a 'Host Process' container. All of a Pod's
+ containers must have the same effective HostProcess
+ value (it is not allowed to have a mix of HostProcess
+ containers and non-HostProcess containers). In addition,
+ if HostProcess is true then HostNetwork must also
+ be set to true.
+ type: boolean
+ runAsUserName:
+ description: The UserName in Windows to run the entrypoint
+ of the container process. Defaults to the user specified
+ in image metadata if unspecified. May also be set
+ in PodSecurityContext. If set in both SecurityContext
+ and PodSecurityContext, the value specified in SecurityContext
+ takes precedence.
+ type: string
+ type: object
+ type: object
+ startupProbe:
+ description: 'StartupProbe indicates that the Pod has successfully
+ initialized. If specified, no other probes are executed until
+ this completes successfully. If this probe fails, the Pod
+ will be restarted, just as if the livenessProbe failed. This
+ can be used to provide different probe parameters at the beginning
+ of a Pod''s lifecycle, when it might take a long time to load
+ data or warm a cache, than during steady-state operation.
+ This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for the
+ command is root ('/') in the container's filesystem.
+ The command is simply exec'd, it is not run inside
+ a shell, so traditional shell instructions ('|', etc)
+ won't work. To use a shell, you need to explicitly
+ call out to that shell. Exit status of 0 is treated
+ as live/healthy and non-zero is unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ failureThreshold:
+ description: Minimum consecutive failures for the probe
+ to be considered failed after having succeeded. Defaults
+ to 3. Minimum value is 1.
+ format: int32
+ type: integer
+ grpc:
+ description: GRPC specifies an action involving a GRPC port.
+ properties:
+ port:
+ description: Port number of the gRPC service. Number
+ must be in the range 1 to 65535.
+ format: int32
+ type: integer
+ service:
+ description: "Service is the name of the service to
+ place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
+ \n If this is not specified, the default behavior
+ is defined by gRPC."
+ type: string
+ required:
+ - port
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to the
+ pod IP. You probably want to set "Host" in httpHeaders
+ instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request. HTTP
+ allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the host.
+ Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ initialDelaySeconds:
+ description: 'Number of seconds after the container has
+ started before liveness probes are initiated. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ periodSeconds:
+ description: How often (in seconds) to perform the probe.
+ Default to 10 seconds. Minimum value is 1.
+ format: int32
+ type: integer
+ successThreshold:
+ description: Minimum consecutive successes for the probe
+ to be considered successful after having failed. Defaults
+ to 1. Must be 1 for liveness and startup. Minimum value
+ is 1.
+ format: int32
+ type: integer
+ tcpSocket:
+ description: TCPSocket specifies an action involving a TCP
+ port.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to, defaults
+ to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ terminationGracePeriodSeconds:
+ description: Optional duration in seconds the pod needs
+ to terminate gracefully upon probe failure. The grace
+ period is the duration in seconds after the processes
+ running in the pod are sent a termination signal and the
+ time when the processes are forcibly halted with a kill
+ signal. Set this value longer than the expected cleanup
+ time for your process. If this value is nil, the pod's
+ terminationGracePeriodSeconds will be used. Otherwise,
+ this value overrides the value provided by the pod spec.
+ Value must be non-negative integer. The value zero indicates
+ stop immediately via the kill signal (no opportunity to
+ shut down). This is a beta field and requires enabling
+ ProbeTerminationGracePeriod feature gate. Minimum value
+ is 1. spec.terminationGracePeriodSeconds is used if unset.
+ format: int64
+ type: integer
+ timeoutSeconds:
+ description: 'Number of seconds after which the probe times
+ out. Defaults to 1 second. Minimum value is 1. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ type: object
+ stdin:
+ description: Whether this container should allocate a buffer
+ for stdin in the container runtime. If this is not set, reads
+ from stdin in the container will always result in EOF. Default
+ is false.
+ type: boolean
+ stdinOnce:
+ description: Whether the container runtime should close the
+ stdin channel after it has been opened by a single attach.
+ When stdin is true the stdin stream will remain open across
+ multiple attach sessions. If stdinOnce is set to true, stdin
+ is opened on container start, is empty until the first client
+ attaches to stdin, and then remains open and accepts data
+ until the client disconnects, at which time stdin is closed
+ and remains closed until the container is restarted. If this
+ flag is false, a container processes that reads from stdin
+ will never receive an EOF. Default is false
+ type: boolean
+ terminationMessagePath:
+ description: 'Optional: Path at which the file to which the
+ container''s termination message will be written is mounted
+ into the container''s filesystem. Message written is intended
+ to be brief final status, such as an assertion failure message.
+ Will be truncated by the node if greater than 4096 bytes.
+ The total message length across all containers will be limited
+ to 12kb. Defaults to /dev/termination-log. Cannot be updated.'
+ type: string
+ terminationMessagePolicy:
+ description: Indicate how the termination message should be
+ populated. File will use the contents of terminationMessagePath
+ to populate the container status message on both success and
+ failure. FallbackToLogsOnError will use the last chunk of
+ container log output if the termination message file is empty
+ and the container exited with an error. The log output is
+ limited to 2048 bytes or 80 lines, whichever is smaller. Defaults
+ to File. Cannot be updated.
+ type: string
+ tty:
+ description: Whether this container should allocate a TTY for
+ itself, also requires 'stdin' to be true. Default is false.
+ type: boolean
+ volumeDevices:
+ description: volumeDevices is the list of block devices to be
+ used by the container.
+ items:
+ description: volumeDevice describes a mapping of a raw block
+ device within a container.
+ properties:
+ devicePath:
+ description: devicePath is the path inside of the container
+ that the device will be mapped to.
+ type: string
+ name:
+ description: name must match the name of a persistentVolumeClaim
+ in the pod
+ type: string
+ required:
+ - devicePath
+ - name
+ type: object
+ type: array
+ volumeMounts:
+ description: Pod volumes to mount into the container's filesystem.
+ Cannot be updated.
+ items:
+ description: VolumeMount describes a mounting of a Volume
+ within a container.
+ properties:
+ mountPath:
+ description: Path within the container at which the volume
+ should be mounted. Must not contain ':'.
+ type: string
+ mountPropagation:
+ description: mountPropagation determines how mounts are
+ propagated from the host to container and the other
+ way around. When not set, MountPropagationNone is used.
+ This field is beta in 1.10.
+ type: string
+ name:
+ description: This must match the Name of a Volume.
+ type: string
+ readOnly:
+ description: Mounted read-only if true, read-write otherwise
+ (false or unspecified). Defaults to false.
+ type: boolean
+ subPath:
+ description: Path within the volume from which the container's
+ volume should be mounted. Defaults to "" (volume's root).
+ type: string
+ subPathExpr:
+ description: Expanded path within the volume from which
+ the container's volume should be mounted. Behaves similarly
+ to SubPath but environment variable references $(VAR_NAME)
+ are expanded using the container's environment. Defaults
+ to "" (volume's root). SubPathExpr and SubPath are mutually
+ exclusive.
+ type: string
+ required:
+ - mountPath
+ - name
+ type: object
+ type: array
+ workingDir:
+ description: Container's working directory. If not specified,
+ the container runtime's default will be used, which might
+ be configured in the container image. Cannot be updated.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ listenLocal:
+ description: 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.
+ type: boolean
+ logFormat:
+ description: Log format for Alertmanager to be configured with.
+ enum:
+ - ""
+ - logfmt
+ - json
+ type: string
+ logLevel:
+ description: Log level for Alertmanager to be configured with.
+ enum:
+ - ""
+ - debug
+ - info
+ - warn
+ - error
+ type: string
+ minReadySeconds:
+ description: 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) This is an alpha field from kubernetes 1.22
+ until 1.24 which requires enabling the StatefulSetMinReadySeconds
+ feature gate.
+ format: int32
+ type: integer
+ nodeSelector:
+ additionalProperties:
+ type: string
+ description: Define which Nodes the Pods are scheduled on.
+ type: object
+ paused:
+ description: If set to true all actions on the underlying managed
+ objects are not goint to be performed, except for delete actions.
+ type: boolean
+ podMetadata:
+ description: PodMetadata configures Labels and Annotations which are
+ propagated to the alertmanager pods.
+ properties:
+ annotations:
+ additionalProperties:
+ type: string
+ description: 'Annotations is an unstructured key value map stored
+ with a resource that may be set by external tools to store and
+ retrieve arbitrary metadata. They are not queryable and should
+ be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations'
+ type: object
+ labels:
+ additionalProperties:
+ type: string
+ description: 'Map of string keys and values that can be used to
+ organize and categorize (scope and select) objects. May match
+ selectors of replication controllers and services. More info:
+ http://kubernetes.io/docs/user-guide/labels'
+ type: object
+ name:
+ description: 'Name must be unique within a namespace. Is required
+ when creating resources, although some resources may allow a
+ client to request the generation of an appropriate name automatically.
+ Name is primarily intended for creation idempotence and configuration
+ definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names'
+ type: string
+ type: object
+ portName:
+ default: web
+ description: Port name used for the pods and governing service. Defaults
+ to `web`.
+ type: string
+ priorityClassName:
+ description: Priority class assigned to the Pods
+ type: string
+ replicas:
+ description: 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.
+ format: int32
+ type: integer
+ resources:
+ description: Define resources requests and limits for single Pods.
+ properties:
+ claims:
+ description: "Claims lists the names of resources, defined in
+ spec.resourceClaims, that are used by this container. \n This
+ is an alpha field and requires enabling the DynamicResourceAllocation
+ feature gate. \n This field is immutable. It can only be set
+ for containers."
+ items:
+ description: ResourceClaim references one entry in PodSpec.ResourceClaims.
+ properties:
+ name:
+ description: Name must match the name of one entry in pod.spec.resourceClaims
+ of the Pod where this field is used. It makes that resource
+ available inside a container.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - name
+ x-kubernetes-list-type: map
+ limits:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Limits describes the maximum amount of compute resources
+ allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ requests:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Requests describes the minimum amount of compute
+ resources required. If Requests is omitted for a container,
+ it defaults to Limits if that is explicitly specified, otherwise
+ to an implementation-defined value. Requests cannot exceed Limits.
+ More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ type: object
+ retention:
+ default: 120h
+ description: 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).
+ pattern: ^(0|(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ routePrefix:
+ description: 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`.
+ type: string
+ secrets:
+ description: Secrets is a list of Secrets in the same namespace as
+ the Alertmanager object, which shall be mounted into the Alertmanager
+ Pods. Each Secret is added to the StatefulSet definition as a volume
+ named `secret-`. The Secrets are mounted into `/etc/alertmanager/secrets/`
+ in the 'alertmanager' container.
+ items:
+ type: string
+ type: array
+ securityContext:
+ description: SecurityContext holds pod-level security attributes and
+ common container settings. This defaults to the default PodSecurityContext.
+ properties:
+ fsGroup:
+ description: "A special supplemental group that applies to all
+ containers in a pod. Some volume types allow the Kubelet to
+ change the ownership of that volume to be owned by the pod:
+ \n 1. The owning GID will be the FSGroup 2. The setgid bit is
+ set (new files created in the volume will be owned by FSGroup)
+ 3. The permission bits are OR'd with rw-rw---- \n If unset,
+ the Kubelet will not modify the ownership and permissions of
+ any volume. Note that this field cannot be set when spec.os.name
+ is windows."
+ format: int64
+ type: integer
+ fsGroupChangePolicy:
+ description: 'fsGroupChangePolicy defines behavior of changing
+ ownership and permission of the volume before being exposed
+ inside Pod. This field will only apply to volume types which
+ support fsGroup based ownership(and permissions). It will have
+ no effect on ephemeral volume types such as: secret, configmaps
+ and emptydir. Valid values are "OnRootMismatch" and "Always".
+ If not specified, "Always" is used. Note that this field cannot
+ be set when spec.os.name is windows.'
+ type: string
+ runAsGroup:
+ description: The GID to run the entrypoint of the container process.
+ Uses runtime default if unset. May also be set in SecurityContext. If
+ set in both SecurityContext and PodSecurityContext, the value
+ specified in SecurityContext takes precedence for that container.
+ Note that this field cannot be set when spec.os.name is windows.
+ format: int64
+ type: integer
+ runAsNonRoot:
+ description: Indicates that the container must run as a non-root
+ user. If true, the Kubelet will validate the image at runtime
+ to ensure that it does not run as UID 0 (root) and fail to start
+ the container if it does. If unset or false, no such validation
+ will be performed. May also be set in SecurityContext. If set
+ in both SecurityContext and PodSecurityContext, the value specified
+ in SecurityContext takes precedence.
+ type: boolean
+ runAsUser:
+ description: The UID to run the entrypoint of the container process.
+ Defaults to user specified in image metadata if unspecified.
+ May also be set in SecurityContext. If set in both SecurityContext
+ and PodSecurityContext, the value specified in SecurityContext
+ takes precedence for that container. Note that this field cannot
+ be set when spec.os.name is windows.
+ format: int64
+ type: integer
+ seLinuxOptions:
+ description: The SELinux context to be applied to all containers.
+ If unspecified, the container runtime will allocate a random
+ SELinux context for each container. May also be set in SecurityContext. If
+ set in both SecurityContext and PodSecurityContext, the value
+ specified in SecurityContext takes precedence for that container.
+ Note that this field cannot be set when spec.os.name is windows.
+ properties:
+ level:
+ description: Level is SELinux level label that applies to
+ the container.
+ type: string
+ role:
+ description: Role is a SELinux role label that applies to
+ the container.
+ type: string
+ type:
+ description: Type is a SELinux type label that applies to
+ the container.
+ type: string
+ user:
+ description: User is a SELinux user label that applies to
+ the container.
+ type: string
+ type: object
+ seccompProfile:
+ description: The seccomp options to use by the containers in this
+ pod. Note that this field cannot be set when spec.os.name is
+ windows.
+ properties:
+ localhostProfile:
+ description: localhostProfile indicates a profile defined
+ in a file on the node should be used. The profile must be
+ preconfigured on the node to work. Must be a descending
+ path, relative to the kubelet's configured seccomp profile
+ location. Must be set if type is "Localhost". Must NOT be
+ set for any other type.
+ type: string
+ type:
+ description: "type indicates which kind of seccomp profile
+ will be applied. Valid options are: \n Localhost - a profile
+ defined in a file on the node should be used. RuntimeDefault
+ - the container runtime default profile should be used.
+ Unconfined - no profile should be applied."
+ type: string
+ required:
+ - type
+ type: object
+ supplementalGroups:
+ description: A list of groups applied to the first process run
+ in each container, in addition to the container's primary GID,
+ the fsGroup (if specified), and group memberships defined in
+ the container image for the uid of the container process. If
+ unspecified, no additional groups are added to any container.
+ Note that group memberships defined in the container image for
+ the uid of the container process are still effective, even if
+ they are not included in this list. Note that this field cannot
+ be set when spec.os.name is windows.
+ items:
+ format: int64
+ type: integer
+ type: array
+ sysctls:
+ description: Sysctls hold a list of namespaced sysctls used for
+ the pod. Pods with unsupported sysctls (by the container runtime)
+ might fail to launch. Note that this field cannot be set when
+ spec.os.name is windows.
+ items:
+ description: Sysctl defines a kernel parameter to be set
+ properties:
+ name:
+ description: Name of a property to set
+ type: string
+ value:
+ description: Value of a property to set
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ windowsOptions:
+ description: The Windows specific settings applied to all containers.
+ If unspecified, the options within a container's SecurityContext
+ will be used. If set in both SecurityContext and PodSecurityContext,
+ the value specified in SecurityContext takes precedence. Note
+ that this field cannot be set when spec.os.name is linux.
+ properties:
+ gmsaCredentialSpec:
+ description: GMSACredentialSpec is where the GMSA admission
+ webhook (https://github.com/kubernetes-sigs/windows-gmsa)
+ inlines the contents of the GMSA credential spec named by
+ the GMSACredentialSpecName field.
+ type: string
+ gmsaCredentialSpecName:
+ description: GMSACredentialSpecName is the name of the GMSA
+ credential spec to use.
+ type: string
+ hostProcess:
+ description: HostProcess determines if a container should
+ be run as a 'Host Process' container. All of a Pod's containers
+ must have the same effective HostProcess value (it is not
+ allowed to have a mix of HostProcess containers and non-HostProcess
+ containers). In addition, if HostProcess is true then HostNetwork
+ must also be set to true.
+ type: boolean
+ runAsUserName:
+ description: The UserName in Windows to run the entrypoint
+ of the container process. Defaults to the user specified
+ in image metadata if unspecified. May also be set in PodSecurityContext.
+ If set in both SecurityContext and PodSecurityContext, the
+ value specified in SecurityContext takes precedence.
+ type: string
+ type: object
+ type: object
+ serviceAccountName:
+ description: ServiceAccountName is the name of the ServiceAccount
+ to use to run the Prometheus Pods.
+ type: string
+ sha:
+ description: 'SHA of Alertmanager container image to be deployed.
+ Defaults to the value of `version`. Similar to a tag, but the SHA
+ explicitly deploys an immutable container image. Version and Tag
+ are ignored if SHA is set. Deprecated: use ''image'' instead. The
+ image digest can be specified as part of the image URL.'
+ type: string
+ storage:
+ description: Storage is the definition of how storage will be used
+ by the Alertmanager instances.
+ properties:
+ disableMountSubPath:
+ description: '*Deprecated: subPath usage will be removed in a
+ future release.*'
+ type: boolean
+ emptyDir:
+ description: 'EmptyDirVolumeSource to be used by the StatefulSet.
+ If specified, it takes precedence over `ephemeral` and `volumeClaimTemplate`.
+ More info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir'
+ properties:
+ medium:
+ description: 'medium represents what type of storage medium
+ should back this directory. The default is "" which means
+ to use the node''s default medium. Must be an empty string
+ (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir'
+ type: string
+ sizeLimit:
+ anyOf:
+ - type: integer
+ - type: string
+ description: 'sizeLimit is the total amount of local storage
+ required for this EmptyDir volume. The size limit is also
+ applicable for memory medium. 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. The default is nil which means that the limit
+ is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir'
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ type: object
+ ephemeral:
+ description: 'EphemeralVolumeSource to be used by the StatefulSet.
+ This is a beta field in k8s 1.21 and GA in 1.15. For lower versions,
+ starting with k8s 1.19, it requires enabling the GenericEphemeralVolume
+ feature gate. More info: https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes'
+ properties:
+ volumeClaimTemplate:
+ description: "Will be used to create a stand-alone PVC to
+ provision the volume. The pod in which this EphemeralVolumeSource
+ is embedded will be the owner of the PVC, i.e. the PVC will
+ be deleted together with the pod. The name of the PVC will
+ be `-` where `` is the
+ name from the `PodSpec.Volumes` array entry. Pod validation
+ will reject the pod if the concatenated name is not valid
+ for a PVC (for example, too long). \n An existing PVC with
+ that name that is not owned by the pod will *not* be used
+ for the pod to avoid using an unrelated volume by mistake.
+ Starting the pod is then blocked until the unrelated PVC
+ is removed. If such a pre-created PVC is meant to be used
+ by the pod, the PVC has to updated with an owner reference
+ to the pod once the pod exists. Normally this should not
+ be necessary, but it may be useful when manually reconstructing
+ a broken cluster. \n This field is read-only and no changes
+ will be made by Kubernetes to the PVC after it has been
+ created. \n Required, must not be nil."
+ properties:
+ metadata:
+ description: May contain labels and annotations that will
+ be copied into the PVC when creating it. No other fields
+ are allowed and will be rejected during validation.
+ type: object
+ spec:
+ description: The specification for the PersistentVolumeClaim.
+ The entire content is copied unchanged into the PVC
+ that gets created from this template. The same fields
+ as in a PersistentVolumeClaim are also valid here.
+ properties:
+ accessModes:
+ description: 'accessModes contains the desired access
+ modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1'
+ items:
+ type: string
+ type: array
+ dataSource:
+ description: 'dataSource field can be used to specify
+ either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot)
+ * An existing PVC (PersistentVolumeClaim) If the
+ provisioner or an external controller can support
+ the specified data source, it will create a new
+ volume based on the contents of the specified data
+ source. When the AnyVolumeDataSource feature gate
+ is enabled, dataSource contents will be copied to
+ dataSourceRef, and dataSourceRef contents will be
+ copied to dataSource when dataSourceRef.namespace
+ is not specified. If the namespace is specified,
+ then dataSourceRef will not be copied to dataSource.'
+ properties:
+ apiGroup:
+ description: APIGroup is the group for the resource
+ being referenced. If APIGroup is not specified,
+ the specified Kind must be in the core API group.
+ For any other third-party types, APIGroup is
+ required.
+ type: string
+ kind:
+ description: Kind is the type of resource being
+ referenced
+ type: string
+ name:
+ description: Name is the name of resource being
+ referenced
+ type: string
+ required:
+ - kind
+ - name
+ type: object
+ x-kubernetes-map-type: atomic
+ dataSourceRef:
+ description: 'dataSourceRef specifies the object from
+ which to populate the volume with data, if a non-empty
+ volume is desired. This may be any object from a
+ non-empty API group (non core object) or a PersistentVolumeClaim
+ object. When this field is specified, volume binding
+ will only succeed if the type of the specified object
+ matches some installed volume populator or dynamic
+ provisioner. This field will replace the functionality
+ of the dataSource field and as such if both fields
+ are non-empty, they must have the same value. For
+ backwards compatibility, when namespace isn''t specified
+ in dataSourceRef, both fields (dataSource and dataSourceRef)
+ will be set to the same value automatically if one
+ of them is empty and the other is non-empty. When
+ namespace is specified in dataSourceRef, dataSource
+ isn''t set to the same value and must be empty.
+ There are three important differences between dataSource
+ and dataSourceRef: * While dataSource only allows
+ two specific types of objects, dataSourceRef allows
+ any non-core object, as well as PersistentVolumeClaim
+ objects. * While dataSource ignores disallowed values
+ (dropping them), dataSourceRef preserves all values,
+ and generates an error if a disallowed value is
+ specified. * While dataSource only allows local
+ objects, dataSourceRef allows objects in any namespaces.
+ (Beta) Using this field requires the AnyVolumeDataSource
+ feature gate to be enabled. (Alpha) Using the namespace
+ field of dataSourceRef requires the CrossNamespaceVolumeDataSource
+ feature gate to be enabled.'
+ properties:
+ apiGroup:
+ description: APIGroup is the group for the resource
+ being referenced. If APIGroup is not specified,
+ the specified Kind must be in the core API group.
+ For any other third-party types, APIGroup is
+ required.
+ type: string
+ kind:
+ description: Kind is the type of resource being
+ referenced
+ type: string
+ name:
+ description: Name is the name of resource being
+ referenced
+ type: string
+ namespace:
+ description: Namespace is the namespace of resource
+ being referenced Note that when a namespace
+ is specified, a gateway.networking.k8s.io/ReferenceGrant
+ object is required in the referent namespace
+ to allow that namespace's owner to accept the
+ reference. See the ReferenceGrant documentation
+ for details. (Alpha) This field requires the
+ CrossNamespaceVolumeDataSource feature gate
+ to be enabled.
+ type: string
+ required:
+ - kind
+ - name
+ type: object
+ resources:
+ description: 'resources represents the minimum resources
+ the volume should have. If RecoverVolumeExpansionFailure
+ feature is enabled users are allowed to specify
+ resource requirements that are lower than previous
+ value but must still be higher than capacity recorded
+ in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources'
+ properties:
+ claims:
+ description: "Claims lists the names of resources,
+ defined in spec.resourceClaims, that are used
+ by this container. \n This is an alpha field
+ and requires enabling the DynamicResourceAllocation
+ feature gate. \n This field is immutable. It
+ can only be set for containers."
+ items:
+ description: ResourceClaim references one entry
+ in PodSpec.ResourceClaims.
+ properties:
+ name:
+ description: Name must match the name of
+ one entry in pod.spec.resourceClaims of
+ the Pod where this field is used. It makes
+ that resource available inside a container.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - name
+ x-kubernetes-list-type: map
+ limits:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Limits describes the maximum amount
+ of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ requests:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Requests describes the minimum amount
+ of compute resources required. If Requests is
+ omitted for a container, it defaults to Limits
+ if that is explicitly specified, otherwise to
+ an implementation-defined value. Requests cannot
+ exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ type: object
+ selector:
+ description: selector is a label query over volumes
+ to consider for binding.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: A label selector requirement is
+ a selector that contains values, a key, and
+ an operator that relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's
+ relationship to a set of values. Valid
+ operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty. If
+ the operator is Exists or DoesNotExist,
+ the values array must be empty. This array
+ is replaced during a strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is "In",
+ and the values array contains only "value".
+ The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ storageClassName:
+ description: 'storageClassName is the name of the
+ StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1'
+ type: string
+ volumeMode:
+ description: volumeMode defines what type of volume
+ is required by the claim. Value of Filesystem is
+ implied when not included in claim spec.
+ type: string
+ volumeName:
+ description: volumeName is the binding reference to
+ the PersistentVolume backing this claim.
+ type: string
+ type: object
+ required:
+ - spec
+ type: object
+ type: object
+ volumeClaimTemplate:
+ description: Defines the PVC spec to be used by the Prometheus
+ StatefulSets. The easiest way to use a volume that cannot be
+ automatically provisioned is to use a label selector alongside
+ manually created PersistentVolumes.
+ properties:
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this
+ representation of an object. Servers should convert recognized
+ schemas to the latest internal value, and may reject unrecognized
+ values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST
+ resource this object represents. Servers may infer this
+ from the endpoint the client submits requests to. Cannot
+ be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ description: EmbeddedMetadata contains metadata relevant to
+ an EmbeddedResource.
+ properties:
+ annotations:
+ additionalProperties:
+ type: string
+ description: 'Annotations is an unstructured key value
+ map stored with a resource that may be set by external
+ tools to store and retrieve arbitrary metadata. They
+ are not queryable and should be preserved when modifying
+ objects. More info: http://kubernetes.io/docs/user-guide/annotations'
+ type: object
+ labels:
+ additionalProperties:
+ type: string
+ description: 'Map of string keys and values that can be
+ used to organize and categorize (scope and select) objects.
+ May match selectors of replication controllers and services.
+ More info: http://kubernetes.io/docs/user-guide/labels'
+ type: object
+ name:
+ description: 'Name must be unique within a namespace.
+ Is required when creating resources, although some resources
+ may allow a client to request the generation of an appropriate
+ name automatically. Name is primarily intended for creation
+ idempotence and configuration definition. Cannot be
+ updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names'
+ type: string
+ type: object
+ spec:
+ description: 'Defines the desired characteristics of a volume
+ requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
+ properties:
+ accessModes:
+ description: 'accessModes contains the desired access
+ modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1'
+ items:
+ type: string
+ type: array
+ dataSource:
+ description: 'dataSource field can be used to specify
+ either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot)
+ * An existing PVC (PersistentVolumeClaim) If the provisioner
+ or an external controller can support the specified
+ data source, it will create a new volume based on the
+ contents of the specified data source. When the AnyVolumeDataSource
+ feature gate is enabled, dataSource contents will be
+ copied to dataSourceRef, and dataSourceRef contents
+ will be copied to dataSource when dataSourceRef.namespace
+ is not specified. If the namespace is specified, then
+ dataSourceRef will not be copied to dataSource.'
+ properties:
+ apiGroup:
+ description: APIGroup is the group for the resource
+ being referenced. If APIGroup is not specified,
+ the specified Kind must be in the core API group.
+ For any other third-party types, APIGroup is required.
+ type: string
+ kind:
+ description: Kind is the type of resource being referenced
+ type: string
+ name:
+ description: Name is the name of resource being referenced
+ type: string
+ required:
+ - kind
+ - name
+ type: object
+ x-kubernetes-map-type: atomic
+ dataSourceRef:
+ description: 'dataSourceRef specifies the object from
+ which to populate the volume with data, if a non-empty
+ volume is desired. This may be any object from a non-empty
+ API group (non core object) or a PersistentVolumeClaim
+ object. When this field is specified, volume binding
+ will only succeed if the type of the specified object
+ matches some installed volume populator or dynamic provisioner.
+ This field will replace the functionality of the dataSource
+ field and as such if both fields are non-empty, they
+ must have the same value. For backwards compatibility,
+ when namespace isn''t specified in dataSourceRef, both
+ fields (dataSource and dataSourceRef) will be set to
+ the same value automatically if one of them is empty
+ and the other is non-empty. When namespace is specified
+ in dataSourceRef, dataSource isn''t set to the same
+ value and must be empty. There are three important differences
+ between dataSource and dataSourceRef: * While dataSource
+ only allows two specific types of objects, dataSourceRef
+ allows any non-core object, as well as PersistentVolumeClaim
+ objects. * While dataSource ignores disallowed values
+ (dropping them), dataSourceRef preserves all values,
+ and generates an error if a disallowed value is specified.
+ * While dataSource only allows local objects, dataSourceRef
+ allows objects in any namespaces. (Beta) Using this
+ field requires the AnyVolumeDataSource feature gate
+ to be enabled. (Alpha) Using the namespace field of
+ dataSourceRef requires the CrossNamespaceVolumeDataSource
+ feature gate to be enabled.'
+ properties:
+ apiGroup:
+ description: APIGroup is the group for the resource
+ being referenced. If APIGroup is not specified,
+ the specified Kind must be in the core API group.
+ For any other third-party types, APIGroup is required.
+ type: string
+ kind:
+ description: Kind is the type of resource being referenced
+ type: string
+ name:
+ description: Name is the name of resource being referenced
+ type: string
+ namespace:
+ description: Namespace is the namespace of resource
+ being referenced Note that when a namespace is specified,
+ a gateway.networking.k8s.io/ReferenceGrant object
+ is required in the referent namespace to allow that
+ namespace's owner to accept the reference. See the
+ ReferenceGrant documentation for details. (Alpha)
+ This field requires the CrossNamespaceVolumeDataSource
+ feature gate to be enabled.
+ type: string
+ required:
+ - kind
+ - name
+ type: object
+ resources:
+ description: 'resources represents the minimum resources
+ the volume should have. If RecoverVolumeExpansionFailure
+ feature is enabled users are allowed to specify resource
+ requirements that are lower than previous value but
+ must still be higher than capacity recorded in the status
+ field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources'
+ properties:
+ claims:
+ description: "Claims lists the names of resources,
+ defined in spec.resourceClaims, that are used by
+ this container. \n This is an alpha field and requires
+ enabling the DynamicResourceAllocation feature gate.
+ \n This field is immutable. It can only be set for
+ containers."
+ items:
+ description: ResourceClaim references one entry
+ in PodSpec.ResourceClaims.
+ properties:
+ name:
+ description: Name must match the name of one
+ entry in pod.spec.resourceClaims of the Pod
+ where this field is used. It makes that resource
+ available inside a container.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - name
+ x-kubernetes-list-type: map
+ limits:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Limits describes the maximum amount
+ of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ requests:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Requests describes the minimum amount
+ of compute resources required. If Requests is omitted
+ for a container, it defaults to Limits if that is
+ explicitly specified, otherwise to an implementation-defined
+ value. Requests cannot exceed Limits. More info:
+ https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ type: object
+ selector:
+ description: selector is a label query over volumes to
+ consider for binding.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector
+ requirements. The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector
+ that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the selector
+ applies to.
+ type: string
+ operator:
+ description: operator represents a key's relationship
+ to a set of values. Valid operators are In,
+ NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values.
+ If the operator is In or NotIn, the values
+ array must be non-empty. If the operator is
+ Exists or DoesNotExist, the values array must
+ be empty. This array is replaced during a
+ strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs.
+ A single {key,value} in the matchLabels map is equivalent
+ to an element of matchExpressions, whose key field
+ is "key", the operator is "In", and the values array
+ contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ storageClassName:
+ description: 'storageClassName is the name of the StorageClass
+ required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1'
+ type: string
+ volumeMode:
+ description: volumeMode defines what type of volume is
+ required by the claim. Value of Filesystem is implied
+ when not included in claim spec.
+ type: string
+ volumeName:
+ description: volumeName is the binding reference to the
+ PersistentVolume backing this claim.
+ type: string
+ type: object
+ status:
+ description: '*Deprecated: this field is never set.*'
+ properties:
+ accessModes:
+ description: 'accessModes contains the actual access modes
+ the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1'
+ items:
+ type: string
+ type: array
+ allocatedResourceStatuses:
+ additionalProperties:
+ description: When a controller receives persistentvolume
+ claim update with ClaimResourceStatus for a resource
+ that it does not recognizes, then it should ignore
+ that update and let other controllers handle it.
+ type: string
+ description: "allocatedResourceStatuses stores status
+ of resource being resized for the given PVC. Key names
+ follow standard Kubernetes label syntax. Valid values
+ are either: * Un-prefixed keys: - storage - the capacity
+ of the volume. * Custom resources must use implementation-defined
+ prefixed names such as \"example.com/my-custom-resource\"
+ Apart from above values - keys that are unprefixed or
+ have kubernetes.io prefix are considered reserved and
+ hence may not be used. \n ClaimResourceStatus can be
+ in any of following states: - ControllerResizeInProgress:
+ State set when resize controller starts resizing the
+ volume in control-plane. - ControllerResizeFailed: State
+ set when resize has failed in resize controller with
+ a terminal error. - NodeResizePending: State set when
+ resize controller has finished resizing the volume but
+ further resizing of volume is needed on the node. -
+ NodeResizeInProgress: State set when kubelet starts
+ resizing the volume. - NodeResizeFailed: State set when
+ resizing has failed in kubelet with a terminal error.
+ Transient errors don't set NodeResizeFailed. For example:
+ if expanding a PVC for more capacity - this field can
+ be one of the following states: - pvc.status.allocatedResourceStatus['storage']
+ = \"ControllerResizeInProgress\" - pvc.status.allocatedResourceStatus['storage']
+ = \"ControllerResizeFailed\" - pvc.status.allocatedResourceStatus['storage']
+ = \"NodeResizePending\" - pvc.status.allocatedResourceStatus['storage']
+ = \"NodeResizeInProgress\" - pvc.status.allocatedResourceStatus['storage']
+ = \"NodeResizeFailed\" When this field is not set, it
+ means that no resize operation is in progress for the
+ given PVC. \n A controller that receives PVC update
+ with previously unknown resourceName or ClaimResourceStatus
+ should ignore the update for the purpose it was designed.
+ For example - a controller that only is responsible
+ for resizing capacity of the volume, should ignore PVC
+ updates that change other valid resources associated
+ with PVC. \n This is an alpha field and requires enabling
+ RecoverVolumeExpansionFailure feature."
+ type: object
+ x-kubernetes-map-type: granular
+ allocatedResources:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: "allocatedResources tracks the resources
+ allocated to a PVC including its capacity. Key names
+ follow standard Kubernetes label syntax. Valid values
+ are either: * Un-prefixed keys: - storage - the capacity
+ of the volume. * Custom resources must use implementation-defined
+ prefixed names such as \"example.com/my-custom-resource\"
+ Apart from above values - keys that are unprefixed or
+ have kubernetes.io prefix are considered reserved and
+ hence may not be used. \n Capacity reported here may
+ be larger than the actual capacity when a volume expansion
+ operation is requested. For storage quota, the larger
+ value from allocatedResources and PVC.spec.resources
+ is used. If allocatedResources is not set, PVC.spec.resources
+ alone is used for quota calculation. If a volume expansion
+ capacity request is lowered, allocatedResources is only
+ lowered if there are no expansion operations in progress
+ and if the actual volume capacity is equal or lower
+ than the requested capacity. \n A controller that receives
+ PVC update with previously unknown resourceName should
+ ignore the update for the purpose it was designed. For
+ example - a controller that only is responsible for
+ resizing capacity of the volume, should ignore PVC updates
+ that change other valid resources associated with PVC.
+ \n This is an alpha field and requires enabling RecoverVolumeExpansionFailure
+ feature."
+ type: object
+ capacity:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: capacity represents the actual resources
+ of the underlying volume.
+ type: object
+ conditions:
+ description: conditions is the current Condition of persistent
+ volume claim. If underlying persistent volume is being
+ resized then the Condition will be set to 'ResizeStarted'.
+ items:
+ description: PersistentVolumeClaimCondition contains
+ details about state of pvc
+ properties:
+ lastProbeTime:
+ description: lastProbeTime is the time we probed
+ the condition.
+ format: date-time
+ type: string
+ lastTransitionTime:
+ description: lastTransitionTime is the time the
+ condition transitioned from one status to another.
+ format: date-time
+ type: string
+ message:
+ description: message is the human-readable message
+ indicating details about last transition.
+ type: string
+ reason:
+ description: reason is a unique, this should be
+ a short, machine understandable string that gives
+ the reason for condition's last transition. If
+ it reports "ResizeStarted" that means the underlying
+ persistent volume is being resized.
+ type: string
+ status:
+ type: string
+ type:
+ description: PersistentVolumeClaimConditionType
+ is a valid value of PersistentVolumeClaimCondition.Type
+ type: string
+ required:
+ - status
+ - type
+ type: object
+ type: array
+ phase:
+ description: phase represents the current phase of PersistentVolumeClaim.
+ type: string
+ type: object
+ type: object
+ type: object
+ tag:
+ description: 'Tag of Alertmanager container image to be deployed.
+ Defaults to the value of `version`. Version is ignored if Tag is
+ set. Deprecated: use ''image'' instead. The image tag can be specified
+ as part of the image URL.'
+ type: string
+ tolerations:
+ description: If specified, the pod's tolerations.
+ items:
+ description: The pod this Toleration is attached to tolerates any
+ taint that matches the triple using the matching
+ operator .
+ properties:
+ effect:
+ description: Effect indicates the taint effect to match. Empty
+ means match all taint effects. When specified, allowed values
+ are NoSchedule, PreferNoSchedule and NoExecute.
+ type: string
+ key:
+ description: Key is the taint key that the toleration applies
+ to. Empty means match all taint keys. If the key is empty,
+ operator must be Exists; this combination means to match all
+ values and all keys.
+ type: string
+ operator:
+ description: Operator represents a key's relationship to the
+ value. Valid operators are Exists and Equal. Defaults to Equal.
+ Exists is equivalent to wildcard for value, so that a pod
+ can tolerate all taints of a particular category.
+ type: string
+ tolerationSeconds:
+ description: TolerationSeconds represents the period of time
+ the toleration (which must be of effect NoExecute, otherwise
+ this field is ignored) tolerates the taint. By default, it
+ is not set, which means tolerate the taint forever (do not
+ evict). Zero and negative values will be treated as 0 (evict
+ immediately) by the system.
+ format: int64
+ type: integer
+ value:
+ description: Value is the taint value the toleration matches
+ to. If the operator is Exists, the value should be empty,
+ otherwise just a regular string.
+ type: string
+ type: object
+ type: array
+ topologySpreadConstraints:
+ description: If specified, the pod's topology spread constraints.
+ items:
+ description: TopologySpreadConstraint specifies how to spread matching
+ pods among the given topology.
+ properties:
+ labelSelector:
+ description: LabelSelector is used to find matching pods. Pods
+ that match this label selector are counted to determine the
+ number of pods in their corresponding topology domain.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector
+ requirements. The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector
+ that contains values, a key, and an operator that relates
+ the key and values.
+ properties:
+ key:
+ description: key is the label key that the selector
+ applies to.
+ type: string
+ operator:
+ description: operator represents a key's relationship
+ to a set of values. Valid operators are In, NotIn,
+ Exists and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values.
+ If the operator is In or NotIn, the values array
+ must be non-empty. If the operator is Exists or
+ DoesNotExist, the values array must be empty. This
+ array is replaced during a strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs.
+ A single {key,value} in the matchLabels map is equivalent
+ to an element of matchExpressions, whose key field is
+ "key", the operator is "In", and the values array contains
+ only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ matchLabelKeys:
+ description: "MatchLabelKeys is a set of pod label keys to select
+ the pods over which spreading will be calculated. The keys
+ are used to lookup values from the incoming pod labels, those
+ key-value labels are ANDed with labelSelector to select the
+ group of existing pods over which spreading will be calculated
+ for the incoming pod. The same key is forbidden to exist in
+ both MatchLabelKeys and LabelSelector. MatchLabelKeys cannot
+ be set when LabelSelector isn't set. Keys that don't exist
+ in the incoming pod labels will be ignored. A null or empty
+ list means only match against labelSelector. \n This is a
+ beta field and requires the MatchLabelKeysInPodTopologySpread
+ feature gate to be enabled (enabled by default)."
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ maxSkew:
+ description: 'MaxSkew describes the degree to which pods may
+ be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`,
+ it is the maximum permitted difference between the number
+ of matching pods in the target topology and the global minimum.
+ The global minimum is the minimum number of matching pods
+ in an eligible domain or zero if the number of eligible domains
+ is less than MinDomains. For example, in a 3-zone cluster,
+ MaxSkew is set to 1, and pods with the same labelSelector
+ spread as 2/2/1: In this case, the global minimum is 1. |
+ zone1 | zone2 | zone3 | | P P | P P | P | - if MaxSkew
+ is 1, incoming pod can only be scheduled to zone3 to become
+ 2/2/2; scheduling it onto zone1(zone2) would make the ActualSkew(3-1)
+ on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming
+ pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`,
+ it is used to give higher precedence to topologies that satisfy
+ it. It''s a required field. Default value is 1 and 0 is not
+ allowed.'
+ format: int32
+ type: integer
+ minDomains:
+ description: "MinDomains indicates a minimum number of eligible
+ domains. When the number of eligible domains with matching
+ topology keys is less than minDomains, Pod Topology Spread
+ treats \"global minimum\" as 0, and then the calculation of
+ Skew is performed. And when the number of eligible domains
+ with matching topology keys equals or greater than minDomains,
+ this value has no effect on scheduling. As a result, when
+ the number of eligible domains is less than minDomains, scheduler
+ won't schedule more than maxSkew Pods to those domains. If
+ value is nil, the constraint behaves as if MinDomains is equal
+ to 1. Valid values are integers greater than 0. When value
+ is not nil, WhenUnsatisfiable must be DoNotSchedule. \n For
+ example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains
+ is set to 5 and pods with the same labelSelector spread as
+ 2/2/2: | zone1 | zone2 | zone3 | | P P | P P | P P |
+ The number of domains is less than 5(MinDomains), so \"global
+ minimum\" is treated as 0. In this situation, new pod with
+ the same labelSelector cannot be scheduled, because computed
+ skew will be 3(3 - 0) if new Pod is scheduled to any of the
+ three zones, it will violate MaxSkew. \n This is a beta field
+ and requires the MinDomainsInPodTopologySpread feature gate
+ to be enabled (enabled by default)."
+ format: int32
+ type: integer
+ nodeAffinityPolicy:
+ description: "NodeAffinityPolicy indicates how we will treat
+ Pod's nodeAffinity/nodeSelector when calculating pod topology
+ spread skew. Options are: - Honor: only nodes matching nodeAffinity/nodeSelector
+ are included in the calculations. - Ignore: nodeAffinity/nodeSelector
+ are ignored. All nodes are included in the calculations. \n
+ If this value is nil, the behavior is equivalent to the Honor
+ policy. This is a beta-level feature default enabled by the
+ NodeInclusionPolicyInPodTopologySpread feature flag."
+ type: string
+ nodeTaintsPolicy:
+ description: "NodeTaintsPolicy indicates how we will treat node
+ taints when calculating pod topology spread skew. Options
+ are: - Honor: nodes without taints, along with tainted nodes
+ for which the incoming pod has a toleration, are included.
+ - Ignore: node taints are ignored. All nodes are included.
+ \n If this value is nil, the behavior is equivalent to the
+ Ignore policy. This is a beta-level feature default enabled
+ by the NodeInclusionPolicyInPodTopologySpread feature flag."
+ type: string
+ topologyKey:
+ description: TopologyKey is the key of node labels. Nodes that
+ have a label with this key and identical values are considered
+ to be in the same topology. We consider each
+ as a "bucket", and try to put balanced number of pods into
+ each bucket. We define a domain as a particular instance of
+ a topology. Also, we define an eligible domain as a domain
+ whose nodes meet the requirements of nodeAffinityPolicy and
+ nodeTaintsPolicy. e.g. If TopologyKey is "kubernetes.io/hostname",
+ each Node is a domain of that topology. And, if TopologyKey
+ is "topology.kubernetes.io/zone", each zone is a domain of
+ that topology. It's a required field.
+ type: string
+ whenUnsatisfiable:
+ description: 'WhenUnsatisfiable indicates how to deal with a
+ pod if it doesn''t satisfy the spread constraint. - DoNotSchedule
+ (default) tells the scheduler not to schedule it. - ScheduleAnyway
+ tells the scheduler to schedule the pod in any location, but
+ giving higher precedence to topologies that would help reduce
+ the skew. A constraint is considered "Unsatisfiable" for an
+ incoming pod if and only if every possible node assignment
+ for that pod would violate "MaxSkew" on some topology. For
+ example, in a 3-zone cluster, MaxSkew is set to 1, and pods
+ with the same labelSelector spread as 3/1/1: | zone1 | zone2
+ | zone3 | | P P P | P | P | If WhenUnsatisfiable is
+ set to DoNotSchedule, incoming pod can only be scheduled to
+ zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on
+ zone2(zone3) satisfies MaxSkew(1). In other words, the cluster
+ can still be imbalanced, but scheduler won''t make it *more*
+ imbalanced. It''s a required field.'
+ type: string
+ required:
+ - maxSkew
+ - topologyKey
+ - whenUnsatisfiable
+ type: object
+ type: array
+ version:
+ description: Version the cluster should be on.
+ type: string
+ volumeMounts:
+ description: VolumeMounts allows configuration of additional VolumeMounts
+ on the output StatefulSet definition. VolumeMounts specified will
+ be appended to other VolumeMounts in the alertmanager container,
+ that are generated as a result of StorageSpec objects.
+ items:
+ description: VolumeMount describes a mounting of a Volume within
+ a container.
+ properties:
+ mountPath:
+ description: Path within the container at which the volume should
+ be mounted. Must not contain ':'.
+ type: string
+ mountPropagation:
+ description: mountPropagation determines how mounts are propagated
+ from the host to container and the other way around. When
+ not set, MountPropagationNone is used. This field is beta
+ in 1.10.
+ type: string
+ name:
+ description: This must match the Name of a Volume.
+ type: string
+ readOnly:
+ description: Mounted read-only if true, read-write otherwise
+ (false or unspecified). Defaults to false.
+ type: boolean
+ subPath:
+ description: Path within the volume from which the container's
+ volume should be mounted. Defaults to "" (volume's root).
+ type: string
+ subPathExpr:
+ description: Expanded path within the volume from which the
+ container's volume should be mounted. Behaves similarly to
+ SubPath but environment variable references $(VAR_NAME) are
+ expanded using the container's environment. Defaults to ""
+ (volume's root). SubPathExpr and SubPath are mutually exclusive.
+ type: string
+ required:
+ - mountPath
+ - name
+ type: object
+ type: array
+ volumes:
+ description: Volumes allows configuration of additional volumes on
+ the output StatefulSet definition. Volumes specified will be appended
+ to other volumes that are generated as a result of StorageSpec objects.
+ items:
+ description: Volume represents a named volume in a pod that may
+ be accessed by any container in the pod.
+ properties:
+ awsElasticBlockStore:
+ description: 'awsElasticBlockStore represents an AWS Disk resource
+ that is attached to a kubelet''s host machine and then exposed
+ to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore'
+ properties:
+ fsType:
+ description: 'fsType is the filesystem type of the volume
+ that you want to mount. Tip: Ensure that the filesystem
+ type is supported by the host operating system. Examples:
+ "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4"
+ if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
+ TODO: how do we prevent errors in the filesystem from
+ compromising the machine'
+ type: string
+ partition:
+ description: 'partition is the partition in the volume that
+ you want to mount. If omitted, the default is to mount
+ by volume name. Examples: For volume /dev/sda1, you specify
+ the partition as "1". Similarly, the volume partition
+ for /dev/sda is "0" (or you can leave the property empty).'
+ format: int32
+ type: integer
+ readOnly:
+ description: 'readOnly value true will force the readOnly
+ setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore'
+ type: boolean
+ volumeID:
+ description: 'volumeID is unique ID of the persistent disk
+ resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore'
+ type: string
+ required:
+ - volumeID
+ type: object
+ azureDisk:
+ description: azureDisk represents an Azure Data Disk mount on
+ the host and bind mount to the pod.
+ properties:
+ cachingMode:
+ description: 'cachingMode is the Host Caching mode: None,
+ Read Only, Read Write.'
+ type: string
+ diskName:
+ description: diskName is the Name of the data disk in the
+ blob storage
+ type: string
+ diskURI:
+ description: diskURI is the URI of data disk in the blob
+ storage
+ type: string
+ fsType:
+ description: fsType is Filesystem type to mount. Must be
+ a filesystem type supported by the host operating system.
+ Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4"
+ if unspecified.
+ type: string
+ kind:
+ description: 'kind expected values are Shared: multiple
+ blob disks per storage account Dedicated: single blob
+ disk per storage account Managed: azure managed data
+ disk (only in managed availability set). defaults to shared'
+ type: string
+ readOnly:
+ description: readOnly Defaults to false (read/write). ReadOnly
+ here will force the ReadOnly setting in VolumeMounts.
+ type: boolean
+ required:
+ - diskName
+ - diskURI
+ type: object
+ azureFile:
+ description: azureFile represents an Azure File Service mount
+ on the host and bind mount to the pod.
+ properties:
+ readOnly:
+ description: readOnly defaults to false (read/write). ReadOnly
+ here will force the ReadOnly setting in VolumeMounts.
+ type: boolean
+ secretName:
+ description: secretName is the name of secret that contains
+ Azure Storage Account Name and Key
+ type: string
+ shareName:
+ description: shareName is the azure share Name
+ type: string
+ required:
+ - secretName
+ - shareName
+ type: object
+ cephfs:
+ description: cephFS represents a Ceph FS mount on the host that
+ shares a pod's lifetime
+ properties:
+ monitors:
+ description: 'monitors is Required: Monitors is a collection
+ of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it'
+ items:
+ type: string
+ type: array
+ path:
+ description: 'path is Optional: Used as the mounted root,
+ rather than the full Ceph tree, default is /'
+ type: string
+ readOnly:
+ description: 'readOnly is Optional: Defaults to false (read/write).
+ ReadOnly here will force the ReadOnly setting in VolumeMounts.
+ More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it'
+ type: boolean
+ secretFile:
+ description: 'secretFile is Optional: SecretFile is the
+ path to key ring for User, default is /etc/ceph/user.secret
+ More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it'
+ type: string
+ secretRef:
+ description: 'secretRef is Optional: SecretRef is reference
+ to the authentication secret for User, default is empty.
+ More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it'
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ user:
+ description: 'user is optional: User is the rados user name,
+ default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it'
+ type: string
+ required:
+ - monitors
+ type: object
+ cinder:
+ description: 'cinder represents a cinder volume attached and
+ mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md'
+ properties:
+ fsType:
+ description: 'fsType is the filesystem type to mount. Must
+ be a filesystem type supported by the host operating system.
+ Examples: "ext4", "xfs", "ntfs". Implicitly inferred to
+ be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md'
+ type: string
+ readOnly:
+ description: 'readOnly defaults to false (read/write). ReadOnly
+ here will force the ReadOnly setting in VolumeMounts.
+ More info: https://examples.k8s.io/mysql-cinder-pd/README.md'
+ type: boolean
+ secretRef:
+ description: 'secretRef is optional: points to a secret
+ object containing parameters used to connect to OpenStack.'
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ volumeID:
+ description: 'volumeID used to identify the volume in cinder.
+ More info: https://examples.k8s.io/mysql-cinder-pd/README.md'
+ type: string
+ required:
+ - volumeID
+ type: object
+ configMap:
+ description: configMap represents a configMap that should populate
+ this volume
+ properties:
+ defaultMode:
+ description: 'defaultMode is optional: mode bits used to
+ set permissions on created files by default. Must be an
+ octal value between 0000 and 0777 or a decimal value between
+ 0 and 511. YAML accepts both octal and decimal values,
+ JSON requires decimal values for mode bits. Defaults to
+ 0644. Directories within the path are not affected by
+ this setting. This might be in conflict with other options
+ that affect the file mode, like fsGroup, and the result
+ can be other mode bits set.'
+ format: int32
+ type: integer
+ items:
+ description: items if unspecified, each key-value pair in
+ the Data field of the referenced ConfigMap will be projected
+ into the volume as a file whose name is the key and content
+ is the value. If specified, the listed keys will be projected
+ into the specified paths, and unlisted keys will not be
+ present. If a key is specified which is not present in
+ the ConfigMap, the volume setup will error unless it is
+ marked optional. Paths must be relative and may not contain
+ the '..' path or start with '..'.
+ items:
+ description: Maps a string key to a path within a volume.
+ properties:
+ key:
+ description: key is the key to project.
+ type: string
+ mode:
+ description: 'mode is Optional: mode bits used to
+ set permissions on this file. Must be an octal value
+ between 0000 and 0777 or a decimal value between
+ 0 and 511. YAML accepts both octal and decimal values,
+ JSON requires decimal values for mode bits. If not
+ specified, the volume defaultMode will be used.
+ This might be in conflict with other options that
+ affect the file mode, like fsGroup, and the result
+ can be other mode bits set.'
+ format: int32
+ type: integer
+ path:
+ description: path is the relative path of the file
+ to map the key to. May not be an absolute path.
+ May not contain the path element '..'. May not start
+ with the string '..'.
+ type: string
+ required:
+ - key
+ - path
+ type: object
+ type: array
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: optional specify whether the ConfigMap or its
+ keys must be defined
+ type: boolean
+ type: object
+ x-kubernetes-map-type: atomic
+ csi:
+ description: csi (Container Storage Interface) represents ephemeral
+ storage that is handled by certain external CSI drivers (Beta
+ feature).
+ properties:
+ driver:
+ description: driver is the name of the CSI driver that handles
+ this volume. Consult with your admin for the correct name
+ as registered in the cluster.
+ type: string
+ fsType:
+ description: fsType to mount. Ex. "ext4", "xfs", "ntfs".
+ If not provided, the empty value is passed to the associated
+ CSI driver which will determine the default filesystem
+ to apply.
+ type: string
+ nodePublishSecretRef:
+ description: nodePublishSecretRef is a reference to the
+ secret object containing sensitive information to pass
+ to the CSI driver to complete the CSI NodePublishVolume
+ and NodeUnpublishVolume calls. This field is optional,
+ and may be empty if no secret is required. If the secret
+ object contains more than one secret, all secret references
+ are passed.
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ readOnly:
+ description: readOnly specifies a read-only configuration
+ for the volume. Defaults to false (read/write).
+ type: boolean
+ volumeAttributes:
+ additionalProperties:
+ type: string
+ description: volumeAttributes stores driver-specific properties
+ that are passed to the CSI driver. Consult your driver's
+ documentation for supported values.
+ type: object
+ required:
+ - driver
+ type: object
+ downwardAPI:
+ description: downwardAPI represents downward API about the pod
+ that should populate this volume
+ properties:
+ defaultMode:
+ description: 'Optional: mode bits to use on created files
+ by default. Must be a Optional: mode bits used to set
+ permissions on created files by default. Must be an octal
+ value between 0000 and 0777 or a decimal value between
+ 0 and 511. YAML accepts both octal and decimal values,
+ JSON requires decimal values for mode bits. Defaults to
+ 0644. Directories within the path are not affected by
+ this setting. This might be in conflict with other options
+ that affect the file mode, like fsGroup, and the result
+ can be other mode bits set.'
+ format: int32
+ type: integer
+ items:
+ description: Items is a list of downward API volume file
+ items:
+ description: DownwardAPIVolumeFile represents information
+ to create the file containing the pod field
+ properties:
+ fieldRef:
+ description: 'Required: Selects a field of the pod:
+ only annotations, labels, name and namespace are
+ supported.'
+ properties:
+ apiVersion:
+ description: Version of the schema the FieldPath
+ is written in terms of, defaults to "v1".
+ type: string
+ fieldPath:
+ description: Path of the field to select in the
+ specified API version.
+ type: string
+ required:
+ - fieldPath
+ type: object
+ x-kubernetes-map-type: atomic
+ mode:
+ description: 'Optional: mode bits used to set permissions
+ on this file, must be an octal value between 0000
+ and 0777 or a decimal value between 0 and 511. YAML
+ accepts both octal and decimal values, JSON requires
+ decimal values for mode bits. If not specified,
+ the volume defaultMode will be used. This might
+ be in conflict with other options that affect the
+ file mode, like fsGroup, and the result can be other
+ mode bits set.'
+ format: int32
+ type: integer
+ path:
+ description: 'Required: Path is the relative path
+ name of the file to be created. Must not be absolute
+ or contain the ''..'' path. Must be utf-8 encoded.
+ The first item of the relative path must not start
+ with ''..'''
+ type: string
+ resourceFieldRef:
+ description: 'Selects a resource of the container:
+ only resources limits and requests (limits.cpu,
+ limits.memory, requests.cpu and requests.memory)
+ are currently supported.'
+ properties:
+ containerName:
+ description: 'Container name: required for volumes,
+ optional for env vars'
+ type: string
+ divisor:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Specifies the output format of the
+ exposed resources, defaults to "1"
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ resource:
+ description: 'Required: resource to select'
+ type: string
+ required:
+ - resource
+ type: object
+ x-kubernetes-map-type: atomic
+ required:
+ - path
+ type: object
+ type: array
+ type: object
+ emptyDir:
+ description: 'emptyDir represents a temporary directory that
+ shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir'
+ properties:
+ medium:
+ description: 'medium represents what type of storage medium
+ should back this directory. The default is "" which means
+ to use the node''s default medium. Must be an empty string
+ (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir'
+ type: string
+ sizeLimit:
+ anyOf:
+ - type: integer
+ - type: string
+ description: 'sizeLimit is the total amount of local storage
+ required for this EmptyDir volume. The size limit is also
+ applicable for memory medium. 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. The default is nil which means
+ that the limit is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir'
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ type: object
+ ephemeral:
+ description: "ephemeral represents a volume that is handled
+ by a cluster storage driver. The volume's lifecycle is tied
+ to the pod that defines it - it will be created before the
+ pod starts, and deleted when the pod is removed. \n Use this
+ if: a) the volume is only needed while the pod runs, b) features
+ of normal volumes like restoring from snapshot or capacity
+ tracking are needed, c) the storage driver is specified through
+ a storage class, and d) the storage driver supports dynamic
+ volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource
+ for more information on the connection between this volume
+ type and PersistentVolumeClaim). \n Use PersistentVolumeClaim
+ or one of the vendor-specific APIs for volumes that persist
+ for longer than the lifecycle of an individual pod. \n Use
+ CSI for light-weight local ephemeral volumes if the CSI driver
+ is meant to be used that way - see the documentation of the
+ driver for more information. \n A pod can use both types of
+ ephemeral volumes and persistent volumes at the same time."
+ properties:
+ volumeClaimTemplate:
+ description: "Will be used to create a stand-alone PVC to
+ provision the volume. The pod in which this EphemeralVolumeSource
+ is embedded will be the owner of the PVC, i.e. the PVC
+ will be deleted together with the pod. The name of the
+ PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry.
+ Pod validation will reject the pod if the concatenated
+ name is not valid for a PVC (for example, too long). \n
+ An existing PVC with that name that is not owned by the
+ pod will *not* be used for the pod to avoid using an unrelated
+ volume by mistake. Starting the pod is then blocked until
+ the unrelated PVC is removed. If such a pre-created PVC
+ is meant to be used by the pod, the PVC has to updated
+ with an owner reference to the pod once the pod exists.
+ Normally this should not be necessary, but it may be useful
+ when manually reconstructing a broken cluster. \n This
+ field is read-only and no changes will be made by Kubernetes
+ to the PVC after it has been created. \n Required, must
+ not be nil."
+ properties:
+ metadata:
+ description: May contain labels and annotations that
+ will be copied into the PVC when creating it. No other
+ fields are allowed and will be rejected during validation.
+ type: object
+ spec:
+ description: The specification for the PersistentVolumeClaim.
+ The entire content is copied unchanged into the PVC
+ that gets created from this template. The same fields
+ as in a PersistentVolumeClaim are also valid here.
+ properties:
+ accessModes:
+ description: 'accessModes contains the desired access
+ modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1'
+ items:
+ type: string
+ type: array
+ dataSource:
+ description: 'dataSource field can be used to specify
+ either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot)
+ * An existing PVC (PersistentVolumeClaim) If the
+ provisioner or an external controller can support
+ the specified data source, it will create a new
+ volume based on the contents of the specified
+ data source. When the AnyVolumeDataSource feature
+ gate is enabled, dataSource contents will be copied
+ to dataSourceRef, and dataSourceRef contents will
+ be copied to dataSource when dataSourceRef.namespace
+ is not specified. If the namespace is specified,
+ then dataSourceRef will not be copied to dataSource.'
+ properties:
+ apiGroup:
+ description: APIGroup is the group for the resource
+ being referenced. If APIGroup is not specified,
+ the specified Kind must be in the core API
+ group. For any other third-party types, APIGroup
+ is required.
+ type: string
+ kind:
+ description: Kind is the type of resource being
+ referenced
+ type: string
+ name:
+ description: Name is the name of resource being
+ referenced
+ type: string
+ required:
+ - kind
+ - name
+ type: object
+ x-kubernetes-map-type: atomic
+ dataSourceRef:
+ description: 'dataSourceRef specifies the object
+ from which to populate the volume with data, if
+ a non-empty volume is desired. This may be any
+ object from a non-empty API group (non core object)
+ or a PersistentVolumeClaim object. When this field
+ is specified, volume binding will only succeed
+ if the type of the specified object matches some
+ installed volume populator or dynamic provisioner.
+ This field will replace the functionality of the
+ dataSource field and as such if both fields are
+ non-empty, they must have the same value. For
+ backwards compatibility, when namespace isn''t
+ specified in dataSourceRef, both fields (dataSource
+ and dataSourceRef) will be set to the same value
+ automatically if one of them is empty and the
+ other is non-empty. When namespace is specified
+ in dataSourceRef, dataSource isn''t set to the
+ same value and must be empty. There are three
+ important differences between dataSource and dataSourceRef:
+ * While dataSource only allows two specific types
+ of objects, dataSourceRef allows any non-core
+ object, as well as PersistentVolumeClaim objects.
+ * While dataSource ignores disallowed values (dropping
+ them), dataSourceRef preserves all values, and
+ generates an error if a disallowed value is specified.
+ * While dataSource only allows local objects,
+ dataSourceRef allows objects in any namespaces.
+ (Beta) Using this field requires the AnyVolumeDataSource
+ feature gate to be enabled. (Alpha) Using the
+ namespace field of dataSourceRef requires the
+ CrossNamespaceVolumeDataSource feature gate to
+ be enabled.'
+ properties:
+ apiGroup:
+ description: APIGroup is the group for the resource
+ being referenced. If APIGroup is not specified,
+ the specified Kind must be in the core API
+ group. For any other third-party types, APIGroup
+ is required.
+ type: string
+ kind:
+ description: Kind is the type of resource being
+ referenced
+ type: string
+ name:
+ description: Name is the name of resource being
+ referenced
+ type: string
+ namespace:
+ description: Namespace is the namespace of resource
+ being referenced Note that when a namespace
+ is specified, a gateway.networking.k8s.io/ReferenceGrant
+ object is required in the referent namespace
+ to allow that namespace's owner to accept
+ the reference. See the ReferenceGrant documentation
+ for details. (Alpha) This field requires the
+ CrossNamespaceVolumeDataSource feature gate
+ to be enabled.
+ type: string
+ required:
+ - kind
+ - name
+ type: object
+ resources:
+ description: 'resources represents the minimum resources
+ the volume should have. If RecoverVolumeExpansionFailure
+ feature is enabled users are allowed to specify
+ resource requirements that are lower than previous
+ value but must still be higher than capacity recorded
+ in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources'
+ properties:
+ claims:
+ description: "Claims lists the names of resources,
+ defined in spec.resourceClaims, that are used
+ by this container. \n This is an alpha field
+ and requires enabling the DynamicResourceAllocation
+ feature gate. \n This field is immutable.
+ It can only be set for containers."
+ items:
+ description: ResourceClaim references one
+ entry in PodSpec.ResourceClaims.
+ properties:
+ name:
+ description: Name must match the name
+ of one entry in pod.spec.resourceClaims
+ of the Pod where this field is used.
+ It makes that resource available inside
+ a container.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - name
+ x-kubernetes-list-type: map
+ limits:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Limits describes the maximum amount
+ of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ requests:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Requests describes the minimum
+ amount of compute resources required. If Requests
+ is omitted for a container, it defaults to
+ Limits if that is explicitly specified, otherwise
+ to an implementation-defined value. Requests
+ cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ type: object
+ selector:
+ description: selector is a label query over volumes
+ to consider for binding.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: A label selector requirement
+ is a selector that contains values, a key,
+ and an operator that relates the key and
+ values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's
+ relationship to a set of values. Valid
+ operators are In, NotIn, Exists and
+ DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty.
+ If the operator is Exists or DoesNotExist,
+ the values array must be empty. This
+ array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is
+ "In", and the values array contains only "value".
+ The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ storageClassName:
+ description: 'storageClassName is the name of the
+ StorageClass required by the claim. More info:
+ https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1'
+ type: string
+ volumeMode:
+ description: volumeMode defines what type of volume
+ is required by the claim. Value of Filesystem
+ is implied when not included in claim spec.
+ type: string
+ volumeName:
+ description: volumeName is the binding reference
+ to the PersistentVolume backing this claim.
+ type: string
+ type: object
+ required:
+ - spec
+ type: object
+ type: object
+ fc:
+ description: fc represents a Fibre Channel resource that is
+ attached to a kubelet's host machine and then exposed to the
+ pod.
+ properties:
+ fsType:
+ description: 'fsType is the filesystem type to mount. Must
+ be a filesystem type supported by the host operating system.
+ Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4"
+ if unspecified. TODO: how do we prevent errors in the
+ filesystem from compromising the machine'
+ type: string
+ lun:
+ description: 'lun is Optional: FC target lun number'
+ format: int32
+ type: integer
+ readOnly:
+ description: 'readOnly is Optional: Defaults to false (read/write).
+ ReadOnly here will force the ReadOnly setting in VolumeMounts.'
+ type: boolean
+ targetWWNs:
+ description: 'targetWWNs is Optional: FC target worldwide
+ names (WWNs)'
+ items:
+ type: string
+ type: array
+ wwids:
+ description: 'wwids Optional: FC volume world wide identifiers
+ (wwids) Either wwids or combination of targetWWNs and
+ lun must be set, but not both simultaneously.'
+ items:
+ type: string
+ type: array
+ type: object
+ flexVolume:
+ description: flexVolume represents a generic volume resource
+ that is provisioned/attached using an exec based plugin.
+ properties:
+ driver:
+ description: driver is the name of the driver to use for
+ this volume.
+ type: string
+ fsType:
+ description: fsType is the filesystem type to mount. Must
+ be a filesystem type supported by the host operating system.
+ Ex. "ext4", "xfs", "ntfs". The default filesystem depends
+ on FlexVolume script.
+ type: string
+ options:
+ additionalProperties:
+ type: string
+ description: 'options is Optional: this field holds extra
+ command options if any.'
+ type: object
+ readOnly:
+ description: 'readOnly is Optional: defaults to false (read/write).
+ ReadOnly here will force the ReadOnly setting in VolumeMounts.'
+ type: boolean
+ secretRef:
+ description: 'secretRef is Optional: secretRef is reference
+ to the secret object containing sensitive information
+ to pass to the plugin scripts. This may be empty if no
+ secret object is specified. If the secret object contains
+ more than one secret, all secrets are passed to the plugin
+ scripts.'
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ required:
+ - driver
+ type: object
+ flocker:
+ description: flocker represents a Flocker volume attached to
+ a kubelet's host machine. This depends on the Flocker control
+ service being running
+ properties:
+ datasetName:
+ description: datasetName is Name of the dataset stored as
+ metadata -> name on the dataset for Flocker should be
+ considered as deprecated
+ type: string
+ datasetUUID:
+ description: datasetUUID is the UUID of the dataset. This
+ is unique identifier of a Flocker dataset
+ type: string
+ type: object
+ gcePersistentDisk:
+ description: 'gcePersistentDisk represents a GCE Disk resource
+ that is attached to a kubelet''s host machine and then exposed
+ to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk'
+ properties:
+ fsType:
+ description: 'fsType is filesystem type of the volume that
+ you want to mount. Tip: Ensure that the filesystem type
+ is supported by the host operating system. Examples: "ext4",
+ "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+ TODO: how do we prevent errors in the filesystem from
+ compromising the machine'
+ type: string
+ partition:
+ description: 'partition is the partition in the volume that
+ you want to mount. If omitted, the default is to mount
+ by volume name. Examples: For volume /dev/sda1, you specify
+ the partition as "1". Similarly, the volume partition
+ for /dev/sda is "0" (or you can leave the property empty).
+ More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk'
+ format: int32
+ type: integer
+ pdName:
+ description: 'pdName is unique name of the PD resource in
+ GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk'
+ type: string
+ readOnly:
+ description: 'readOnly here will force the ReadOnly setting
+ in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk'
+ type: boolean
+ required:
+ - pdName
+ type: object
+ gitRepo:
+ description: 'gitRepo represents a git repository at a particular
+ revision. DEPRECATED: GitRepo is deprecated. To provision
+ a container with a git repo, mount an EmptyDir into an InitContainer
+ that clones the repo using git, then mount the EmptyDir into
+ the Pod''s container.'
+ properties:
+ directory:
+ description: directory is the target directory name. Must
+ not contain or start with '..'. If '.' is supplied, the
+ volume directory will be the git repository. Otherwise,
+ if specified, the volume will contain the git repository
+ in the subdirectory with the given name.
+ type: string
+ repository:
+ description: repository is the URL
+ type: string
+ revision:
+ description: revision is the commit hash for the specified
+ revision.
+ type: string
+ required:
+ - repository
+ type: object
+ glusterfs:
+ description: 'glusterfs represents a Glusterfs mount on the
+ host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md'
+ properties:
+ endpoints:
+ description: 'endpoints is the endpoint name that details
+ Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod'
+ type: string
+ path:
+ description: 'path is the Glusterfs volume path. More info:
+ https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod'
+ type: string
+ readOnly:
+ description: 'readOnly here will force the Glusterfs volume
+ to be mounted with read-only permissions. Defaults to
+ false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod'
+ type: boolean
+ required:
+ - endpoints
+ - path
+ type: object
+ hostPath:
+ description: 'hostPath represents a pre-existing file or directory
+ on the host machine that is directly exposed to the container.
+ This is generally used for system agents or other privileged
+ things that are allowed to see the host machine. Most containers
+ will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
+ --- TODO(jonesdl) We need to restrict who can use host directory
+ mounts and who can/can not mount host directories as read/write.'
+ properties:
+ path:
+ description: 'path of the directory on the host. If the
+ path is a symlink, it will follow the link to the real
+ path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath'
+ type: string
+ type:
+ description: 'type for HostPath Volume Defaults to "" More
+ info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath'
+ type: string
+ required:
+ - path
+ type: object
+ iscsi:
+ description: 'iscsi represents an ISCSI Disk resource that is
+ attached to a kubelet''s host machine and then exposed to
+ the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md'
+ properties:
+ chapAuthDiscovery:
+ description: chapAuthDiscovery defines whether support iSCSI
+ Discovery CHAP authentication
+ type: boolean
+ chapAuthSession:
+ description: chapAuthSession defines whether support iSCSI
+ Session CHAP authentication
+ type: boolean
+ fsType:
+ description: 'fsType is the filesystem type of the volume
+ that you want to mount. Tip: Ensure that the filesystem
+ type is supported by the host operating system. Examples:
+ "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4"
+ if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi
+ TODO: how do we prevent errors in the filesystem from
+ compromising the machine'
+ type: string
+ initiatorName:
+ description: initiatorName is the custom iSCSI Initiator
+ Name. If initiatorName is specified with iscsiInterface
+ simultaneously, new iSCSI interface : will be created for the connection.
+ type: string
+ iqn:
+ description: iqn is the target iSCSI Qualified Name.
+ type: string
+ iscsiInterface:
+ description: iscsiInterface is the interface Name that uses
+ an iSCSI transport. Defaults to 'default' (tcp).
+ type: string
+ lun:
+ description: lun represents iSCSI Target Lun number.
+ format: int32
+ type: integer
+ portals:
+ description: portals is the iSCSI Target Portal List. The
+ portal is either an IP or ip_addr:port if the port is
+ other than default (typically TCP ports 860 and 3260).
+ items:
+ type: string
+ type: array
+ readOnly:
+ description: readOnly here will force the ReadOnly setting
+ in VolumeMounts. Defaults to false.
+ type: boolean
+ secretRef:
+ description: secretRef is the CHAP Secret for iSCSI target
+ and initiator authentication
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ targetPortal:
+ description: targetPortal is iSCSI Target Portal. The Portal
+ is either an IP or ip_addr:port if the port is other than
+ default (typically TCP ports 860 and 3260).
+ type: string
+ required:
+ - iqn
+ - lun
+ - targetPortal
+ type: object
+ name:
+ description: 'name of the volume. Must be a DNS_LABEL and unique
+ within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
+ type: string
+ nfs:
+ description: 'nfs represents an NFS mount on the host that shares
+ a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs'
+ properties:
+ path:
+ description: 'path that is exported by the NFS server. More
+ info: https://kubernetes.io/docs/concepts/storage/volumes#nfs'
+ type: string
+ readOnly:
+ description: 'readOnly here will force the NFS export to
+ be mounted with read-only permissions. Defaults to false.
+ More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs'
+ type: boolean
+ server:
+ description: 'server is the hostname or IP address of the
+ NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs'
+ type: string
+ required:
+ - path
+ - server
+ type: object
+ persistentVolumeClaim:
+ description: 'persistentVolumeClaimVolumeSource represents a
+ reference to a PersistentVolumeClaim in the same namespace.
+ More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
+ properties:
+ claimName:
+ description: 'claimName is the name of a PersistentVolumeClaim
+ in the same namespace as the pod using this volume. More
+ info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
+ type: string
+ readOnly:
+ description: readOnly Will force the ReadOnly setting in
+ VolumeMounts. Default false.
+ type: boolean
+ required:
+ - claimName
+ type: object
+ photonPersistentDisk:
+ description: photonPersistentDisk represents a PhotonController
+ persistent disk attached and mounted on kubelets host machine
+ properties:
+ fsType:
+ description: fsType is the filesystem type to mount. Must
+ be a filesystem type supported by the host operating system.
+ Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4"
+ if unspecified.
+ type: string
+ pdID:
+ description: pdID is the ID that identifies Photon Controller
+ persistent disk
+ type: string
+ required:
+ - pdID
+ type: object
+ portworxVolume:
+ description: portworxVolume represents a portworx volume attached
+ and mounted on kubelets host machine
+ properties:
+ fsType:
+ description: fSType represents the filesystem type to mount
+ Must be a filesystem type supported by the host operating
+ system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4"
+ if unspecified.
+ type: string
+ readOnly:
+ description: readOnly defaults to false (read/write). ReadOnly
+ here will force the ReadOnly setting in VolumeMounts.
+ type: boolean
+ volumeID:
+ description: volumeID uniquely identifies a Portworx volume
+ type: string
+ required:
+ - volumeID
+ type: object
+ projected:
+ description: projected items for all in one resources secrets,
+ configmaps, and downward API
+ properties:
+ defaultMode:
+ description: defaultMode are the mode bits used to set permissions
+ on created files by default. Must be an octal value between
+ 0000 and 0777 or a decimal value between 0 and 511. YAML
+ accepts both octal and decimal values, JSON requires decimal
+ values for mode bits. Directories within the path are
+ not affected by this setting. This might be in conflict
+ with other options that affect the file mode, like fsGroup,
+ and the result can be other mode bits set.
+ format: int32
+ type: integer
+ sources:
+ description: sources is the list of volume projections
+ items:
+ description: Projection that may be projected along with
+ other supported volume types
+ properties:
+ configMap:
+ description: configMap information about the configMap
+ data to project
+ properties:
+ items:
+ description: items if unspecified, each key-value
+ pair in the Data field of the referenced ConfigMap
+ will be projected into the volume as a file
+ whose name is the key and content is the value.
+ If specified, the listed keys will be projected
+ into the specified paths, and unlisted keys
+ will not be present. If a key is specified which
+ is not present in the ConfigMap, the volume
+ setup will error unless it is marked optional.
+ Paths must be relative and may not contain the
+ '..' path or start with '..'.
+ items:
+ description: Maps a string key to a path within
+ a volume.
+ properties:
+ key:
+ description: key is the key to project.
+ type: string
+ mode:
+ description: 'mode is Optional: mode bits
+ used to set permissions on this file.
+ Must be an octal value between 0000 and
+ 0777 or a decimal value between 0 and
+ 511. YAML accepts both octal and decimal
+ values, JSON requires decimal values for
+ mode bits. If not specified, the volume
+ defaultMode will be used. This might be
+ in conflict with other options that affect
+ the file mode, like fsGroup, and the result
+ can be other mode bits set.'
+ format: int32
+ type: integer
+ path:
+ description: path is the relative path of
+ the file to map the key to. May not be
+ an absolute path. May not contain the
+ path element '..'. May not start with
+ the string '..'.
+ type: string
+ required:
+ - key
+ - path
+ type: object
+ type: array
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: optional specify whether the ConfigMap
+ or its keys must be defined
+ type: boolean
+ type: object
+ x-kubernetes-map-type: atomic
+ downwardAPI:
+ description: downwardAPI information about the downwardAPI
+ data to project
+ properties:
+ items:
+ description: Items is a list of DownwardAPIVolume
+ file
+ items:
+ description: DownwardAPIVolumeFile represents
+ information to create the file containing
+ the pod field
+ properties:
+ fieldRef:
+ description: 'Required: Selects a field
+ of the pod: only annotations, labels,
+ name and namespace are supported.'
+ properties:
+ apiVersion:
+ description: Version of the schema the
+ FieldPath is written in terms of,
+ defaults to "v1".
+ type: string
+ fieldPath:
+ description: Path of the field to select
+ in the specified API version.
+ type: string
+ required:
+ - fieldPath
+ type: object
+ x-kubernetes-map-type: atomic
+ mode:
+ description: 'Optional: mode bits used to
+ set permissions on this file, must be
+ an octal value between 0000 and 0777 or
+ a decimal value between 0 and 511. YAML
+ accepts both octal and decimal values,
+ JSON requires decimal values for mode
+ bits. If not specified, the volume defaultMode
+ will be used. This might be in conflict
+ with other options that affect the file
+ mode, like fsGroup, and the result can
+ be other mode bits set.'
+ format: int32
+ type: integer
+ path:
+ description: 'Required: Path is the relative
+ path name of the file to be created. Must
+ not be absolute or contain the ''..''
+ path. Must be utf-8 encoded. The first
+ item of the relative path must not start
+ with ''..'''
+ type: string
+ resourceFieldRef:
+ description: 'Selects a resource of the
+ container: only resources limits and requests
+ (limits.cpu, limits.memory, requests.cpu
+ and requests.memory) are currently supported.'
+ properties:
+ containerName:
+ description: 'Container name: required
+ for volumes, optional for env vars'
+ type: string
+ divisor:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Specifies the output format
+ of the exposed resources, defaults
+ to "1"
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ resource:
+ description: 'Required: resource to
+ select'
+ type: string
+ required:
+ - resource
+ type: object
+ x-kubernetes-map-type: atomic
+ required:
+ - path
+ type: object
+ type: array
+ type: object
+ secret:
+ description: secret information about the secret data
+ to project
+ properties:
+ items:
+ description: items if unspecified, each key-value
+ pair in the Data field of the referenced Secret
+ will be projected into the volume as a file
+ whose name is the key and content is the value.
+ If specified, the listed keys will be projected
+ into the specified paths, and unlisted keys
+ will not be present. If a key is specified which
+ is not present in the Secret, the volume setup
+ will error unless it is marked optional. Paths
+ must be relative and may not contain the '..'
+ path or start with '..'.
+ items:
+ description: Maps a string key to a path within
+ a volume.
+ properties:
+ key:
+ description: key is the key to project.
+ type: string
+ mode:
+ description: 'mode is Optional: mode bits
+ used to set permissions on this file.
+ Must be an octal value between 0000 and
+ 0777 or a decimal value between 0 and
+ 511. YAML accepts both octal and decimal
+ values, JSON requires decimal values for
+ mode bits. If not specified, the volume
+ defaultMode will be used. This might be
+ in conflict with other options that affect
+ the file mode, like fsGroup, and the result
+ can be other mode bits set.'
+ format: int32
+ type: integer
+ path:
+ description: path is the relative path of
+ the file to map the key to. May not be
+ an absolute path. May not contain the
+ path element '..'. May not start with
+ the string '..'.
+ type: string
+ required:
+ - key
+ - path
+ type: object
+ type: array
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: optional field specify whether the
+ Secret or its key must be defined
+ type: boolean
+ type: object
+ x-kubernetes-map-type: atomic
+ serviceAccountToken:
+ description: serviceAccountToken is information about
+ the serviceAccountToken data to project
+ properties:
+ audience:
+ description: audience is the intended audience
+ of the token. A recipient of a token must identify
+ itself with an identifier specified in the audience
+ of the token, and otherwise should reject the
+ token. The audience defaults to the identifier
+ of the apiserver.
+ type: string
+ expirationSeconds:
+ description: expirationSeconds is the requested
+ duration of validity of the service account
+ token. As the token approaches expiration, the
+ kubelet volume plugin will proactively rotate
+ the service account token. The kubelet will
+ start trying to rotate the token if the token
+ is older than 80 percent of its time to live
+ or if the token is older than 24 hours.Defaults
+ to 1 hour and must be at least 10 minutes.
+ format: int64
+ type: integer
+ path:
+ description: path is the path relative to the
+ mount point of the file to project the token
+ into.
+ type: string
+ required:
+ - path
+ type: object
+ type: object
+ type: array
+ type: object
+ quobyte:
+ description: quobyte represents a Quobyte mount on the host
+ that shares a pod's lifetime
+ properties:
+ group:
+ description: group to map volume access to Default is no
+ group
+ type: string
+ readOnly:
+ description: readOnly here will force the Quobyte volume
+ to be mounted with read-only permissions. Defaults to
+ false.
+ type: boolean
+ registry:
+ description: registry represents a single or multiple Quobyte
+ Registry services specified as a string as host:port pair
+ (multiple entries are separated with commas) which acts
+ as the central registry for volumes
+ type: string
+ tenant:
+ description: tenant owning the given Quobyte volume in the
+ Backend Used with dynamically provisioned Quobyte volumes,
+ value is set by the plugin
+ type: string
+ user:
+ description: user to map volume access to Defaults to serivceaccount
+ user
+ type: string
+ volume:
+ description: volume is a string that references an already
+ created Quobyte volume by name.
+ type: string
+ required:
+ - registry
+ - volume
+ type: object
+ rbd:
+ description: 'rbd represents a Rados Block Device mount on the
+ host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md'
+ properties:
+ fsType:
+ description: 'fsType is the filesystem type of the volume
+ that you want to mount. Tip: Ensure that the filesystem
+ type is supported by the host operating system. Examples:
+ "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4"
+ if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd
+ TODO: how do we prevent errors in the filesystem from
+ compromising the machine'
+ type: string
+ image:
+ description: 'image is the rados image name. More info:
+ https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
+ type: string
+ keyring:
+ description: 'keyring is the path to key ring for RBDUser.
+ Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
+ type: string
+ monitors:
+ description: 'monitors is a collection of Ceph monitors.
+ More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
+ items:
+ type: string
+ type: array
+ pool:
+ description: 'pool is the rados pool name. Default is rbd.
+ More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
+ type: string
+ readOnly:
+ description: 'readOnly here will force the ReadOnly setting
+ in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
+ type: boolean
+ secretRef:
+ description: 'secretRef is name of the authentication secret
+ for RBDUser. If provided overrides keyring. Default is
+ nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ user:
+ description: 'user is the rados user name. Default is admin.
+ More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
+ type: string
+ required:
+ - image
+ - monitors
+ type: object
+ scaleIO:
+ description: scaleIO represents a ScaleIO persistent volume
+ attached and mounted on Kubernetes nodes.
+ properties:
+ fsType:
+ description: fsType is the filesystem type to mount. Must
+ be a filesystem type supported by the host operating system.
+ Ex. "ext4", "xfs", "ntfs". Default is "xfs".
+ type: string
+ gateway:
+ description: gateway is the host address of the ScaleIO
+ API Gateway.
+ type: string
+ protectionDomain:
+ description: protectionDomain is the name of the ScaleIO
+ Protection Domain for the configured storage.
+ type: string
+ readOnly:
+ description: readOnly Defaults to false (read/write). ReadOnly
+ here will force the ReadOnly setting in VolumeMounts.
+ type: boolean
+ secretRef:
+ description: secretRef references to the secret for ScaleIO
+ user and other sensitive information. If this is not provided,
+ Login operation will fail.
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ sslEnabled:
+ description: sslEnabled Flag enable/disable SSL communication
+ with Gateway, default false
+ type: boolean
+ storageMode:
+ description: storageMode indicates whether the storage for
+ a volume should be ThickProvisioned or ThinProvisioned.
+ Default is ThinProvisioned.
+ type: string
+ storagePool:
+ description: storagePool is the ScaleIO Storage Pool associated
+ with the protection domain.
+ type: string
+ system:
+ description: system is the name of the storage system as
+ configured in ScaleIO.
+ type: string
+ volumeName:
+ description: volumeName is the name of a volume already
+ created in the ScaleIO system that is associated with
+ this volume source.
+ type: string
+ required:
+ - gateway
+ - secretRef
+ - system
+ type: object
+ secret:
+ description: 'secret represents a secret that should populate
+ this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret'
+ properties:
+ defaultMode:
+ description: 'defaultMode is Optional: mode bits used to
+ set permissions on created files by default. Must be an
+ octal value between 0000 and 0777 or a decimal value between
+ 0 and 511. YAML accepts both octal and decimal values,
+ JSON requires decimal values for mode bits. Defaults to
+ 0644. Directories within the path are not affected by
+ this setting. This might be in conflict with other options
+ that affect the file mode, like fsGroup, and the result
+ can be other mode bits set.'
+ format: int32
+ type: integer
+ items:
+ description: items If unspecified, each key-value pair in
+ the Data field of the referenced Secret will be projected
+ into the volume as a file whose name is the key and content
+ is the value. If specified, the listed keys will be projected
+ into the specified paths, and unlisted keys will not be
+ present. If a key is specified which is not present in
+ the Secret, the volume setup will error unless it is marked
+ optional. Paths must be relative and may not contain the
+ '..' path or start with '..'.
+ items:
+ description: Maps a string key to a path within a volume.
+ properties:
+ key:
+ description: key is the key to project.
+ type: string
+ mode:
+ description: 'mode is Optional: mode bits used to
+ set permissions on this file. Must be an octal value
+ between 0000 and 0777 or a decimal value between
+ 0 and 511. YAML accepts both octal and decimal values,
+ JSON requires decimal values for mode bits. If not
+ specified, the volume defaultMode will be used.
+ This might be in conflict with other options that
+ affect the file mode, like fsGroup, and the result
+ can be other mode bits set.'
+ format: int32
+ type: integer
+ path:
+ description: path is the relative path of the file
+ to map the key to. May not be an absolute path.
+ May not contain the path element '..'. May not start
+ with the string '..'.
+ type: string
+ required:
+ - key
+ - path
+ type: object
+ type: array
+ optional:
+ description: optional field specify whether the Secret or
+ its keys must be defined
+ type: boolean
+ secretName:
+ description: 'secretName is the name of the secret in the
+ pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret'
+ type: string
+ type: object
+ storageos:
+ description: storageOS represents a StorageOS volume attached
+ and mounted on Kubernetes nodes.
+ properties:
+ fsType:
+ description: fsType is the filesystem type to mount. Must
+ be a filesystem type supported by the host operating system.
+ Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4"
+ if unspecified.
+ type: string
+ readOnly:
+ description: readOnly defaults to false (read/write). ReadOnly
+ here will force the ReadOnly setting in VolumeMounts.
+ type: boolean
+ secretRef:
+ description: secretRef specifies the secret to use for obtaining
+ the StorageOS API credentials. If not specified, default
+ values will be attempted.
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ volumeName:
+ description: volumeName is the human-readable name of the
+ StorageOS volume. Volume names are only unique within
+ a namespace.
+ type: string
+ volumeNamespace:
+ description: volumeNamespace specifies the scope of the
+ volume within StorageOS. If no namespace is specified
+ then the Pod's namespace will be used. This allows the
+ Kubernetes name scoping to be mirrored within StorageOS
+ for tighter integration. Set VolumeName to any name to
+ override the default behaviour. Set to "default" if you
+ are not using namespaces within StorageOS. Namespaces
+ that do not pre-exist within StorageOS will be created.
+ type: string
+ type: object
+ vsphereVolume:
+ description: vsphereVolume represents a vSphere volume attached
+ and mounted on kubelets host machine
+ properties:
+ fsType:
+ description: fsType is filesystem type to mount. Must be
+ a filesystem type supported by the host operating system.
+ Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4"
+ if unspecified.
+ type: string
+ storagePolicyID:
+ description: storagePolicyID is the storage Policy Based
+ Management (SPBM) profile ID associated with the StoragePolicyName.
+ type: string
+ storagePolicyName:
+ description: storagePolicyName is the storage Policy Based
+ Management (SPBM) profile name.
+ type: string
+ volumePath:
+ description: volumePath is the path that identifies vSphere
+ volume vmdk
+ type: string
+ required:
+ - volumePath
+ type: object
+ required:
+ - name
+ type: object
+ type: array
+ web:
+ description: Defines the web command line flags when starting Alertmanager.
+ properties:
+ getConcurrency:
+ description: Maximum number of GET requests processed concurrently.
+ This corresponds to the Alertmanager's `--web.get-concurrency`
+ flag.
+ format: int32
+ type: integer
+ httpConfig:
+ description: Defines HTTP parameters for web server.
+ properties:
+ headers:
+ description: List of headers that can be added to HTTP responses.
+ properties:
+ contentSecurityPolicy:
+ description: Set the Content-Security-Policy header to
+ HTTP responses. Unset if blank.
+ type: string
+ strictTransportSecurity:
+ description: Set the Strict-Transport-Security header
+ to HTTP responses. Unset if blank. Please make sure
+ that you use this with care as this header might force
+ browsers to load Prometheus and the other applications
+ hosted on the same domain and subdomains over HTTPS.
+ https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
+ type: string
+ xContentTypeOptions:
+ description: Set the X-Content-Type-Options header to
+ HTTP responses. Unset if blank. Accepted value is nosniff.
+ https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options
+ enum:
+ - ""
+ - NoSniff
+ type: string
+ xFrameOptions:
+ description: Set the X-Frame-Options header to HTTP responses.
+ Unset if blank. Accepted values are deny and sameorigin.
+ https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
+ enum:
+ - ""
+ - Deny
+ - SameOrigin
+ type: string
+ xXSSProtection:
+ description: Set the X-XSS-Protection header to all responses.
+ Unset if blank. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection
+ type: string
+ type: object
+ http2:
+ description: Enable HTTP/2 support. Note that HTTP/2 is only
+ supported with TLS. When TLSConfig is not configured, HTTP/2
+ will be disabled. Whenever the value of the field changes,
+ a rolling update will be triggered.
+ type: boolean
+ type: object
+ timeout:
+ description: Timeout for HTTP requests. This corresponds to the
+ Alertmanager's `--web.timeout` flag.
+ format: int32
+ type: integer
+ tlsConfig:
+ description: Defines the TLS parameters for HTTPS.
+ properties:
+ cert:
+ description: Contains the TLS certificate for the server.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ cipherSuites:
+ description: 'List of supported cipher suites for TLS versions
+ up to TLS 1.2. If empty, Go default cipher suites are used.
+ Available cipher suites are documented in the go documentation:
+ https://golang.org/pkg/crypto/tls/#pkg-constants'
+ items:
+ type: string
+ type: array
+ client_ca:
+ description: Contains the CA certificate for client certificate
+ authentication to the server.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ clientAuthType:
+ description: 'Server policy for client authentication. Maps
+ to ClientAuth Policies. For more detail on clientAuth options:
+ https://golang.org/pkg/crypto/tls/#ClientAuthType'
+ type: string
+ curvePreferences:
+ description: 'Elliptic curves that will be used in an ECDHE
+ handshake, in preference order. Available curves are documented
+ in the go documentation: https://golang.org/pkg/crypto/tls/#CurveID'
+ items:
+ type: string
+ type: array
+ keySecret:
+ description: Secret containing the TLS key for the server.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ maxVersion:
+ description: Maximum TLS version that is acceptable. Defaults
+ to TLS13.
+ type: string
+ minVersion:
+ description: Minimum TLS version that is acceptable. Defaults
+ to TLS12.
+ type: string
+ preferServerCipherSuites:
+ description: Controls whether the server selects the client's
+ most preferred cipher suite, or the server's most preferred
+ cipher suite. If true then the server's preference, as expressed
+ in the order of elements in cipherSuites, is used.
+ type: boolean
+ required:
+ - cert
+ - keySecret
+ type: object
+ type: object
+ type: object
+ status:
+ description: 'Most recent observed status of the Alertmanager cluster.
+ Read-only. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status'
+ properties:
+ availableReplicas:
+ description: Total number of available pods (ready for at least minReadySeconds)
+ targeted by this Alertmanager cluster.
+ format: int32
+ type: integer
+ conditions:
+ description: The current state of the Alertmanager object.
+ items:
+ description: Condition represents the state of the resources associated
+ with the Prometheus, Alertmanager or ThanosRuler resource.
+ properties:
+ lastTransitionTime:
+ description: lastTransitionTime is the time of the last update
+ to the current status property.
+ format: date-time
+ type: string
+ message:
+ description: Human-readable message indicating details for the
+ condition's last transition.
+ type: string
+ observedGeneration:
+ description: ObservedGeneration represents the .metadata.generation
+ that the condition was set based upon. For instance, if `.metadata.generation`
+ is currently 12, but the `.status.conditions[].observedGeneration`
+ is 9, the condition is out of date with respect to the current
+ state of the instance.
+ format: int64
+ type: integer
+ reason:
+ description: Reason for the condition's last transition.
+ type: string
+ status:
+ description: Status of the condition.
+ type: string
+ type:
+ description: Type of the condition being reported.
+ type: string
+ required:
+ - lastTransitionTime
+ - status
+ - type
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - type
+ x-kubernetes-list-type: map
+ paused:
+ description: Represents whether any actions on the underlying managed
+ objects are being performed. Only delete actions will be performed.
+ type: boolean
+ replicas:
+ description: Total number of non-terminated pods targeted by this
+ Alertmanager object (their labels match the selector).
+ format: int32
+ type: integer
+ unavailableReplicas:
+ description: Total number of unavailable pods targeted by this Alertmanager
+ object.
+ format: int32
+ type: integer
+ updatedReplicas:
+ description: Total number of non-terminated pods targeted by this
+ Alertmanager object that have the desired version spec.
+ format: int32
+ type: integer
+ required:
+ - availableReplicas
+ - paused
+ - replicas
+ - unavailableReplicas
+ - updatedReplicas
+ type: object
+ required:
+ - spec
+ type: object
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/crds/crd-podmonitors.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/crds/crd-podmonitors.yaml
new file mode 100644
index 0000000000..ceaf19e9e8
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/crds/crd-podmonitors.yaml
@@ -0,0 +1,691 @@
+# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.68.0/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml
+---
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+ annotations:
+ controller-gen.kubebuilder.io/version: v0.11.1
+ creationTimestamp: null
+ name: podmonitors.monitoring.coreos.com
+spec:
+ group: monitoring.coreos.com
+ names:
+ categories:
+ - prometheus-operator
+ kind: PodMonitor
+ listKind: PodMonitorList
+ plural: podmonitors
+ shortNames:
+ - pmon
+ singular: podmonitor
+ scope: Namespaced
+ versions:
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: PodMonitor defines monitoring for a set of pods.
+ properties:
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation
+ of an object. Servers should convert recognized schemas to the latest
+ internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this
+ object represents. Servers may infer this from the endpoint the client
+ submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: Specification of desired Pod selection for target discovery
+ by Prometheus.
+ properties:
+ attachMetadata:
+ description: Attaches node metadata to discovered targets. Requires
+ Prometheus v2.35.0 and above.
+ properties:
+ node:
+ description: When set to true, Prometheus must have permissions
+ to get Nodes.
+ type: boolean
+ type: object
+ jobLabel:
+ description: The label to use to retrieve the job name from.
+ type: string
+ keepDroppedTargets:
+ description: "Per-scrape limit on the number of targets dropped by
+ relabeling that will be kept in memory. 0 means no limit. \n It
+ requires Prometheus >= v2.47.0."
+ format: int64
+ type: integer
+ labelLimit:
+ description: Per-scrape limit on number of labels that will be accepted
+ for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ format: int64
+ type: integer
+ labelNameLengthLimit:
+ description: Per-scrape limit on length of labels name that will be
+ accepted for a sample. Only valid in Prometheus versions 2.27.0
+ and newer.
+ format: int64
+ type: integer
+ labelValueLengthLimit:
+ description: Per-scrape limit on length of labels value that will
+ be accepted for a sample. Only valid in Prometheus versions 2.27.0
+ and newer.
+ format: int64
+ type: integer
+ namespaceSelector:
+ description: Selector to select which namespaces the Endpoints objects
+ are discovered from.
+ properties:
+ any:
+ description: Boolean describing whether all namespaces are selected
+ in contrast to a list restricting them.
+ type: boolean
+ matchNames:
+ description: List of namespace names to select from.
+ items:
+ type: string
+ type: array
+ type: object
+ podMetricsEndpoints:
+ description: A list of endpoints allowed as part of this PodMonitor.
+ items:
+ description: PodMetricsEndpoint defines a scrapeable endpoint of
+ a Kubernetes Pod serving Prometheus metrics.
+ properties:
+ authorization:
+ description: Authorization section for this endpoint
+ properties:
+ credentials:
+ description: Selects a key of a Secret in the namespace
+ that contains the credentials for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type:
+ description: "Defines the authentication type. The value
+ is case-insensitive. \n \"Basic\" is not a supported value.
+ \n Default: \"Bearer\""
+ type: string
+ type: object
+ basicAuth:
+ description: 'BasicAuth allow an endpoint to authenticate over
+ basic authentication. More info: https://prometheus.io/docs/operating/configuration/#endpoint'
+ properties:
+ password:
+ description: The secret in the service monitor namespace
+ that contains the password for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ username:
+ description: The secret in the service monitor namespace
+ that contains the username for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ bearerTokenSecret:
+ description: Secret to mount to read bearer token for scraping
+ targets. The secret needs to be in the same namespace as the
+ pod monitor and accessible by the Prometheus Operator.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ enableHttp2:
+ description: Whether to enable HTTP2.
+ type: boolean
+ filterRunning:
+ description: 'Drop pods that are not running. (Failed, Succeeded).
+ Enabled by default. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase'
+ type: boolean
+ followRedirects:
+ description: FollowRedirects configures whether scrape requests
+ follow HTTP 3xx redirects.
+ type: boolean
+ honorLabels:
+ description: HonorLabels chooses the metric's labels on collisions
+ with target labels.
+ type: boolean
+ honorTimestamps:
+ description: HonorTimestamps controls whether Prometheus respects
+ the timestamps present in scraped data.
+ type: boolean
+ interval:
+ description: Interval at which metrics should be scraped If
+ not specified Prometheus' global scrape interval is used.
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ metricRelabelings:
+ description: MetricRelabelConfigs to apply to samples before
+ ingestion.
+ items:
+ description: "RelabelConfig allows dynamic rewriting of the
+ label set for targets, alerts, scraped samples and remote
+ write samples. \n More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config"
+ properties:
+ action:
+ default: replace
+ description: "Action to perform based on the regex matching.
+ \n `Uppercase` and `Lowercase` actions require Prometheus
+ >= v2.36.0. `DropEqual` and `KeepEqual` actions require
+ Prometheus >= v2.41.0. \n Default: \"Replace\""
+ enum:
+ - replace
+ - Replace
+ - keep
+ - Keep
+ - drop
+ - Drop
+ - hashmod
+ - HashMod
+ - labelmap
+ - LabelMap
+ - labeldrop
+ - LabelDrop
+ - labelkeep
+ - LabelKeep
+ - lowercase
+ - Lowercase
+ - uppercase
+ - Uppercase
+ - keepequal
+ - KeepEqual
+ - dropequal
+ - DropEqual
+ type: string
+ modulus:
+ description: "Modulus to take of the hash of the source
+ label values. \n Only applicable when the action is
+ `HashMod`."
+ format: int64
+ type: integer
+ regex:
+ description: Regular expression against which the extracted
+ value is matched.
+ type: string
+ replacement:
+ description: "Replacement value against which a Replace
+ action is performed if the regular expression matches.
+ \n Regex capture groups are available."
+ type: string
+ separator:
+ description: Separator is the string between concatenated
+ SourceLabels.
+ type: string
+ sourceLabels:
+ description: The source labels select values from existing
+ labels. Their content is concatenated using the configured
+ Separator and matched against the configured regular
+ expression.
+ items:
+ description: LabelName is a valid Prometheus label name
+ which may only contain ASCII letters, numbers, as
+ well as underscores.
+ pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$
+ type: string
+ type: array
+ targetLabel:
+ description: "Label to which the resulting string is written
+ in a replacement. \n It is mandatory for `Replace`,
+ `HashMod`, `Lowercase`, `Uppercase`, `KeepEqual` and
+ `DropEqual` actions. \n Regex capture groups are available."
+ type: string
+ type: object
+ type: array
+ oauth2:
+ description: OAuth2 for the URL. Only valid in Prometheus versions
+ 2.27.0 and newer.
+ properties:
+ clientId:
+ description: The secret or configmap containing the OAuth2
+ client id
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ clientSecret:
+ description: The secret containing the OAuth2 client secret
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ endpointParams:
+ additionalProperties:
+ type: string
+ description: Parameters to append to the token URL
+ type: object
+ scopes:
+ description: OAuth2 scopes used for the token request
+ items:
+ type: string
+ type: array
+ tokenUrl:
+ description: The URL to fetch the token from
+ minLength: 1
+ type: string
+ required:
+ - clientId
+ - clientSecret
+ - tokenUrl
+ type: object
+ params:
+ additionalProperties:
+ items:
+ type: string
+ type: array
+ description: Optional HTTP URL parameters
+ type: object
+ path:
+ description: HTTP path to scrape for metrics. If empty, Prometheus
+ uses the default value (e.g. `/metrics`).
+ type: string
+ port:
+ description: Name of the pod port this endpoint refers to. Mutually
+ exclusive with targetPort.
+ type: string
+ proxyUrl:
+ description: ProxyURL eg http://proxyserver:2195 Directs scrapes
+ to proxy through this endpoint.
+ type: string
+ relabelings:
+ description: 'RelabelConfigs to apply to samples before scraping.
+ Prometheus Operator automatically adds relabelings for a few
+ standard Kubernetes fields. The original scrape job''s name
+ is available via the `__tmp_prometheus_job_name` label. More
+ info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config'
+ items:
+ description: "RelabelConfig allows dynamic rewriting of the
+ label set for targets, alerts, scraped samples and remote
+ write samples. \n More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config"
+ properties:
+ action:
+ default: replace
+ description: "Action to perform based on the regex matching.
+ \n `Uppercase` and `Lowercase` actions require Prometheus
+ >= v2.36.0. `DropEqual` and `KeepEqual` actions require
+ Prometheus >= v2.41.0. \n Default: \"Replace\""
+ enum:
+ - replace
+ - Replace
+ - keep
+ - Keep
+ - drop
+ - Drop
+ - hashmod
+ - HashMod
+ - labelmap
+ - LabelMap
+ - labeldrop
+ - LabelDrop
+ - labelkeep
+ - LabelKeep
+ - lowercase
+ - Lowercase
+ - uppercase
+ - Uppercase
+ - keepequal
+ - KeepEqual
+ - dropequal
+ - DropEqual
+ type: string
+ modulus:
+ description: "Modulus to take of the hash of the source
+ label values. \n Only applicable when the action is
+ `HashMod`."
+ format: int64
+ type: integer
+ regex:
+ description: Regular expression against which the extracted
+ value is matched.
+ type: string
+ replacement:
+ description: "Replacement value against which a Replace
+ action is performed if the regular expression matches.
+ \n Regex capture groups are available."
+ type: string
+ separator:
+ description: Separator is the string between concatenated
+ SourceLabels.
+ type: string
+ sourceLabels:
+ description: The source labels select values from existing
+ labels. Their content is concatenated using the configured
+ Separator and matched against the configured regular
+ expression.
+ items:
+ description: LabelName is a valid Prometheus label name
+ which may only contain ASCII letters, numbers, as
+ well as underscores.
+ pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$
+ type: string
+ type: array
+ targetLabel:
+ description: "Label to which the resulting string is written
+ in a replacement. \n It is mandatory for `Replace`,
+ `HashMod`, `Lowercase`, `Uppercase`, `KeepEqual` and
+ `DropEqual` actions. \n Regex capture groups are available."
+ type: string
+ type: object
+ type: array
+ scheme:
+ description: HTTP scheme to use for scraping. `http` and `https`
+ are the expected values unless you rewrite the `__scheme__`
+ label via relabeling. If empty, Prometheus uses the default
+ value `http`.
+ enum:
+ - http
+ - https
+ type: string
+ scrapeTimeout:
+ description: Timeout after which the scrape is ended If not
+ specified, the Prometheus global scrape interval is used.
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ targetPort:
+ anyOf:
+ - type: integer
+ - type: string
+ description: 'Deprecated: Use ''port'' instead.'
+ x-kubernetes-int-or-string: true
+ tlsConfig:
+ description: TLS configuration to use when scraping the endpoint.
+ properties:
+ ca:
+ description: Certificate authority used when verifying server
+ certificates.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ cert:
+ description: Client certificate to present when doing client-authentication.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ insecureSkipVerify:
+ description: Disable target certificate validation.
+ type: boolean
+ keySecret:
+ description: Secret containing the client key file for the
+ targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ serverName:
+ description: Used to verify the hostname for the targets.
+ type: string
+ type: object
+ type: object
+ type: array
+ podTargetLabels:
+ description: PodTargetLabels transfers labels on the Kubernetes Pod
+ onto the target.
+ items:
+ type: string
+ type: array
+ sampleLimit:
+ description: SampleLimit defines per-scrape limit on number of scraped
+ samples that will be accepted.
+ format: int64
+ type: integer
+ selector:
+ description: Selector to select Pod objects.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements.
+ The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector that
+ contains values, a key, and an operator that relates the key
+ and values.
+ properties:
+ key:
+ description: key is the label key that the selector applies
+ to.
+ type: string
+ operator:
+ description: operator represents a key's relationship to
+ a set of values. Valid operators are In, NotIn, Exists
+ and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values. If the
+ operator is In or NotIn, the values array must be non-empty.
+ If the operator is Exists or DoesNotExist, the values
+ array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs. A single
+ {key,value} in the matchLabels map is equivalent to an element
+ of matchExpressions, whose key field is "key", the operator
+ is "In", and the values array contains only "value". The requirements
+ are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ targetLimit:
+ description: TargetLimit defines a limit on the number of scraped
+ targets that will be accepted.
+ format: int64
+ type: integer
+ required:
+ - podMetricsEndpoints
+ - selector
+ type: object
+ required:
+ - spec
+ type: object
+ served: true
+ storage: true
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/crds/crd-probes.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/crds/crd-probes.yaml
new file mode 100644
index 0000000000..1ebe86f1fa
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/crds/crd-probes.yaml
@@ -0,0 +1,733 @@
+# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.68.0/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml
+---
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+ annotations:
+ controller-gen.kubebuilder.io/version: v0.11.1
+ creationTimestamp: null
+ name: probes.monitoring.coreos.com
+spec:
+ group: monitoring.coreos.com
+ names:
+ categories:
+ - prometheus-operator
+ kind: Probe
+ listKind: ProbeList
+ plural: probes
+ shortNames:
+ - prb
+ singular: probe
+ scope: Namespaced
+ versions:
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: Probe defines monitoring for a set of static targets or ingresses.
+ properties:
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation
+ of an object. Servers should convert recognized schemas to the latest
+ internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this
+ object represents. Servers may infer this from the endpoint the client
+ submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: Specification of desired Ingress selection for target discovery
+ by Prometheus.
+ properties:
+ authorization:
+ description: Authorization section for this endpoint
+ properties:
+ credentials:
+ description: Selects a key of a Secret in the namespace that contains
+ the credentials for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must be
+ a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must be
+ defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type:
+ description: "Defines the authentication type. The value is case-insensitive.
+ \n \"Basic\" is not a supported value. \n Default: \"Bearer\""
+ type: string
+ type: object
+ basicAuth:
+ description: 'BasicAuth allow an endpoint to authenticate over basic
+ authentication. More info: https://prometheus.io/docs/operating/configuration/#endpoint'
+ properties:
+ password:
+ description: The secret in the service monitor namespace that
+ contains the password for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must be
+ a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must be
+ defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ username:
+ description: The secret in the service monitor namespace that
+ contains the username for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must be
+ a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must be
+ defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ bearerTokenSecret:
+ description: Secret to mount to read bearer token for scraping targets.
+ The secret needs to be in the same namespace as the probe and accessible
+ by the Prometheus Operator.
+ properties:
+ key:
+ description: The key of the secret to select from. Must be a
+ valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ interval:
+ description: Interval at which targets are probed using the configured
+ prober. If not specified Prometheus' global scrape interval is used.
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ jobName:
+ description: The job name assigned to scraped metrics by default.
+ type: string
+ keepDroppedTargets:
+ description: "Per-scrape limit on the number of targets dropped by
+ relabeling that will be kept in memory. 0 means no limit. \n It
+ requires Prometheus >= v2.47.0."
+ format: int64
+ type: integer
+ labelLimit:
+ description: Per-scrape limit on number of labels that will be accepted
+ for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ format: int64
+ type: integer
+ labelNameLengthLimit:
+ description: Per-scrape limit on length of labels name that will be
+ accepted for a sample. Only valid in Prometheus versions 2.27.0
+ and newer.
+ format: int64
+ type: integer
+ labelValueLengthLimit:
+ description: Per-scrape limit on length of labels value that will
+ be accepted for a sample. Only valid in Prometheus versions 2.27.0
+ and newer.
+ format: int64
+ type: integer
+ metricRelabelings:
+ description: MetricRelabelConfigs to apply to samples before ingestion.
+ items:
+ description: "RelabelConfig allows dynamic rewriting of the label
+ set for targets, alerts, scraped samples and remote write samples.
+ \n More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config"
+ properties:
+ action:
+ default: replace
+ description: "Action to perform based on the regex matching.
+ \n `Uppercase` and `Lowercase` actions require Prometheus
+ >= v2.36.0. `DropEqual` and `KeepEqual` actions require Prometheus
+ >= v2.41.0. \n Default: \"Replace\""
+ enum:
+ - replace
+ - Replace
+ - keep
+ - Keep
+ - drop
+ - Drop
+ - hashmod
+ - HashMod
+ - labelmap
+ - LabelMap
+ - labeldrop
+ - LabelDrop
+ - labelkeep
+ - LabelKeep
+ - lowercase
+ - Lowercase
+ - uppercase
+ - Uppercase
+ - keepequal
+ - KeepEqual
+ - dropequal
+ - DropEqual
+ type: string
+ modulus:
+ description: "Modulus to take of the hash of the source label
+ values. \n Only applicable when the action is `HashMod`."
+ format: int64
+ type: integer
+ regex:
+ description: Regular expression against which the extracted
+ value is matched.
+ type: string
+ replacement:
+ description: "Replacement value against which a Replace action
+ is performed if the regular expression matches. \n Regex capture
+ groups are available."
+ type: string
+ separator:
+ description: Separator is the string between concatenated SourceLabels.
+ type: string
+ sourceLabels:
+ description: The source labels select values from existing labels.
+ Their content is concatenated using the configured Separator
+ and matched against the configured regular expression.
+ items:
+ description: LabelName is a valid Prometheus label name which
+ may only contain ASCII letters, numbers, as well as underscores.
+ pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$
+ type: string
+ type: array
+ targetLabel:
+ description: "Label to which the resulting string is written
+ in a replacement. \n It is mandatory for `Replace`, `HashMod`,
+ `Lowercase`, `Uppercase`, `KeepEqual` and `DropEqual` actions.
+ \n Regex capture groups are available."
+ type: string
+ type: object
+ type: array
+ module:
+ description: 'The module to use for probing specifying how to probe
+ the target. Example module configuring in the blackbox exporter:
+ https://github.com/prometheus/blackbox_exporter/blob/master/example.yml'
+ type: string
+ oauth2:
+ description: OAuth2 for the URL. Only valid in Prometheus versions
+ 2.27.0 and newer.
+ properties:
+ clientId:
+ description: The secret or configmap containing the OAuth2 client
+ id
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ clientSecret:
+ description: The secret containing the OAuth2 client secret
+ properties:
+ key:
+ description: The key of the secret to select from. Must be
+ a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must be
+ defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ endpointParams:
+ additionalProperties:
+ type: string
+ description: Parameters to append to the token URL
+ type: object
+ scopes:
+ description: OAuth2 scopes used for the token request
+ items:
+ type: string
+ type: array
+ tokenUrl:
+ description: The URL to fetch the token from
+ minLength: 1
+ type: string
+ required:
+ - clientId
+ - clientSecret
+ - tokenUrl
+ type: object
+ prober:
+ description: Specification for the prober to use for probing targets.
+ The prober.URL parameter is required. Targets cannot be probed if
+ left empty.
+ properties:
+ path:
+ default: /probe
+ description: Path to collect metrics from. Defaults to `/probe`.
+ type: string
+ proxyUrl:
+ description: Optional ProxyURL.
+ type: string
+ scheme:
+ description: HTTP scheme to use for scraping. `http` and `https`
+ are the expected values unless you rewrite the `__scheme__`
+ label via relabeling. If empty, Prometheus uses the default
+ value `http`.
+ enum:
+ - http
+ - https
+ type: string
+ url:
+ description: Mandatory URL of the prober.
+ type: string
+ required:
+ - url
+ type: object
+ sampleLimit:
+ description: SampleLimit defines per-scrape limit on number of scraped
+ samples that will be accepted.
+ format: int64
+ type: integer
+ scrapeTimeout:
+ description: Timeout for scraping metrics from the Prometheus exporter.
+ If not specified, the Prometheus global scrape timeout is used.
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ targetLimit:
+ description: TargetLimit defines a limit on the number of scraped
+ targets that will be accepted.
+ format: int64
+ type: integer
+ targets:
+ description: Targets defines a set of static or dynamically discovered
+ targets to probe.
+ properties:
+ ingress:
+ description: ingress defines the Ingress objects to probe and
+ the relabeling configuration. If `staticConfig` is also defined,
+ `staticConfig` takes precedence.
+ properties:
+ namespaceSelector:
+ description: From which namespaces to select Ingress objects.
+ properties:
+ any:
+ description: Boolean describing whether all namespaces
+ are selected in contrast to a list restricting them.
+ type: boolean
+ matchNames:
+ description: List of namespace names to select from.
+ items:
+ type: string
+ type: array
+ type: object
+ relabelingConfigs:
+ description: 'RelabelConfigs to apply to the label set of
+ the target before it gets scraped. The original ingress
+ address is available via the `__tmp_prometheus_ingress_address`
+ label. It can be used to customize the probed URL. The original
+ scrape job''s name is available via the `__tmp_prometheus_job_name`
+ label. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config'
+ items:
+ description: "RelabelConfig allows dynamic rewriting of
+ the label set for targets, alerts, scraped samples and
+ remote write samples. \n More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config"
+ properties:
+ action:
+ default: replace
+ description: "Action to perform based on the regex matching.
+ \n `Uppercase` and `Lowercase` actions require Prometheus
+ >= v2.36.0. `DropEqual` and `KeepEqual` actions require
+ Prometheus >= v2.41.0. \n Default: \"Replace\""
+ enum:
+ - replace
+ - Replace
+ - keep
+ - Keep
+ - drop
+ - Drop
+ - hashmod
+ - HashMod
+ - labelmap
+ - LabelMap
+ - labeldrop
+ - LabelDrop
+ - labelkeep
+ - LabelKeep
+ - lowercase
+ - Lowercase
+ - uppercase
+ - Uppercase
+ - keepequal
+ - KeepEqual
+ - dropequal
+ - DropEqual
+ type: string
+ modulus:
+ description: "Modulus to take of the hash of the source
+ label values. \n Only applicable when the action is
+ `HashMod`."
+ format: int64
+ type: integer
+ regex:
+ description: Regular expression against which the extracted
+ value is matched.
+ type: string
+ replacement:
+ description: "Replacement value against which a Replace
+ action is performed if the regular expression matches.
+ \n Regex capture groups are available."
+ type: string
+ separator:
+ description: Separator is the string between concatenated
+ SourceLabels.
+ type: string
+ sourceLabels:
+ description: The source labels select values from existing
+ labels. Their content is concatenated using the configured
+ Separator and matched against the configured regular
+ expression.
+ items:
+ description: LabelName is a valid Prometheus label
+ name which may only contain ASCII letters, numbers,
+ as well as underscores.
+ pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$
+ type: string
+ type: array
+ targetLabel:
+ description: "Label to which the resulting string is
+ written in a replacement. \n It is mandatory for `Replace`,
+ `HashMod`, `Lowercase`, `Uppercase`, `KeepEqual` and
+ `DropEqual` actions. \n Regex capture groups are available."
+ type: string
+ type: object
+ type: array
+ selector:
+ description: Selector to select the Ingress objects.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector
+ requirements. The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector
+ that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the selector
+ applies to.
+ type: string
+ operator:
+ description: operator represents a key's relationship
+ to a set of values. Valid operators are In, NotIn,
+ Exists and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values.
+ If the operator is In or NotIn, the values array
+ must be non-empty. If the operator is Exists or
+ DoesNotExist, the values array must be empty.
+ This array is replaced during a strategic merge
+ patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs.
+ A single {key,value} in the matchLabels map is equivalent
+ to an element of matchExpressions, whose key field is
+ "key", the operator is "In", and the values array contains
+ only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ staticConfig:
+ description: 'staticConfig defines the static list of targets
+ to probe and the relabeling configuration. If `ingress` is also
+ defined, `staticConfig` takes precedence. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#static_config.'
+ properties:
+ labels:
+ additionalProperties:
+ type: string
+ description: Labels assigned to all metrics scraped from the
+ targets.
+ type: object
+ relabelingConfigs:
+ description: 'RelabelConfigs to apply to the label set of
+ the targets before it gets scraped. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config'
+ items:
+ description: "RelabelConfig allows dynamic rewriting of
+ the label set for targets, alerts, scraped samples and
+ remote write samples. \n More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config"
+ properties:
+ action:
+ default: replace
+ description: "Action to perform based on the regex matching.
+ \n `Uppercase` and `Lowercase` actions require Prometheus
+ >= v2.36.0. `DropEqual` and `KeepEqual` actions require
+ Prometheus >= v2.41.0. \n Default: \"Replace\""
+ enum:
+ - replace
+ - Replace
+ - keep
+ - Keep
+ - drop
+ - Drop
+ - hashmod
+ - HashMod
+ - labelmap
+ - LabelMap
+ - labeldrop
+ - LabelDrop
+ - labelkeep
+ - LabelKeep
+ - lowercase
+ - Lowercase
+ - uppercase
+ - Uppercase
+ - keepequal
+ - KeepEqual
+ - dropequal
+ - DropEqual
+ type: string
+ modulus:
+ description: "Modulus to take of the hash of the source
+ label values. \n Only applicable when the action is
+ `HashMod`."
+ format: int64
+ type: integer
+ regex:
+ description: Regular expression against which the extracted
+ value is matched.
+ type: string
+ replacement:
+ description: "Replacement value against which a Replace
+ action is performed if the regular expression matches.
+ \n Regex capture groups are available."
+ type: string
+ separator:
+ description: Separator is the string between concatenated
+ SourceLabels.
+ type: string
+ sourceLabels:
+ description: The source labels select values from existing
+ labels. Their content is concatenated using the configured
+ Separator and matched against the configured regular
+ expression.
+ items:
+ description: LabelName is a valid Prometheus label
+ name which may only contain ASCII letters, numbers,
+ as well as underscores.
+ pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$
+ type: string
+ type: array
+ targetLabel:
+ description: "Label to which the resulting string is
+ written in a replacement. \n It is mandatory for `Replace`,
+ `HashMod`, `Lowercase`, `Uppercase`, `KeepEqual` and
+ `DropEqual` actions. \n Regex capture groups are available."
+ type: string
+ type: object
+ type: array
+ static:
+ description: The list of hosts to probe.
+ items:
+ type: string
+ type: array
+ type: object
+ type: object
+ tlsConfig:
+ description: TLS configuration to use when scraping the endpoint.
+ properties:
+ ca:
+ description: Certificate authority used when verifying server
+ certificates.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ cert:
+ description: Client certificate to present when doing client-authentication.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ insecureSkipVerify:
+ description: Disable target certificate validation.
+ type: boolean
+ keySecret:
+ description: Secret containing the client key file for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must be
+ a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must be
+ defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ serverName:
+ description: Used to verify the hostname for the targets.
+ type: string
+ type: object
+ type: object
+ required:
+ - spec
+ type: object
+ served: true
+ storage: true
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/crds/crd-prometheusagents.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/crds/crd-prometheusagents.yaml
new file mode 100644
index 0000000000..3359beebff
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/crds/crd-prometheusagents.yaml
@@ -0,0 +1,8405 @@
+# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.68.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheusagents.yaml
+---
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+ annotations:
+ controller-gen.kubebuilder.io/version: v0.11.1
+ creationTimestamp: null
+ name: prometheusagents.monitoring.coreos.com
+spec:
+ group: monitoring.coreos.com
+ names:
+ categories:
+ - prometheus-operator
+ kind: PrometheusAgent
+ listKind: PrometheusAgentList
+ plural: prometheusagents
+ shortNames:
+ - promagent
+ singular: prometheusagent
+ scope: Namespaced
+ versions:
+ - additionalPrinterColumns:
+ - description: The version of Prometheus agent
+ jsonPath: .spec.version
+ name: Version
+ type: string
+ - description: The number of desired replicas
+ jsonPath: .spec.replicas
+ name: Desired
+ type: integer
+ - description: The number of ready replicas
+ jsonPath: .status.availableReplicas
+ name: Ready
+ type: integer
+ - jsonPath: .status.conditions[?(@.type == 'Reconciled')].status
+ name: Reconciled
+ type: string
+ - jsonPath: .status.conditions[?(@.type == 'Available')].status
+ name: Available
+ type: string
+ - jsonPath: .metadata.creationTimestamp
+ name: Age
+ type: date
+ - description: Whether the resource reconciliation is paused or not
+ jsonPath: .status.paused
+ name: Paused
+ priority: 1
+ type: boolean
+ name: v1alpha1
+ schema:
+ openAPIV3Schema:
+ description: PrometheusAgent defines a Prometheus agent deployment.
+ properties:
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation
+ of an object. Servers should convert recognized schemas to the latest
+ internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this
+ object represents. Servers may infer this from the endpoint the client
+ submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: 'Specification of the desired behavior of the Prometheus
+ agent. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status'
+ properties:
+ additionalArgs:
+ description: "AdditionalArgs allows setting additional arguments for
+ the 'prometheus' container. \n It is intended for e.g. activating
+ hidden flags which are not supported by the dedicated configuration
+ options yet. The arguments are passed as-is to the Prometheus container
+ which may cause issues if they are invalid or not supported by the
+ given Prometheus version. \n In case of an argument conflict (e.g.
+ an argument which is already set by the operator itself) or when
+ providing an invalid argument, the reconciliation will fail and
+ an error will be logged."
+ items:
+ description: Argument as part of the AdditionalArgs list.
+ properties:
+ name:
+ description: Name of the argument, e.g. "scrape.discovery-reload-interval".
+ minLength: 1
+ type: string
+ value:
+ description: Argument value, e.g. 30s. Can be empty for name-only
+ arguments (e.g. --storage.tsdb.no-lockfile)
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ additionalScrapeConfigs:
+ description: 'AdditionalScrapeConfigs allows specifying a key of a
+ Secret containing additional Prometheus scrape configurations. Scrape
+ configurations specified are appended to the configurations generated
+ by the Prometheus Operator. Job configurations specified must have
+ the form as specified in the official Prometheus documentation:
+ https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config.
+ As scrape configs are 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.'
+ properties:
+ key:
+ description: The key of the secret to select from. Must be a
+ valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ affinity:
+ description: Defines the Pods' affinity scheduling rules if specified.
+ properties:
+ nodeAffinity:
+ description: Describes node affinity scheduling rules for the
+ pod.
+ properties:
+ preferredDuringSchedulingIgnoredDuringExecution:
+ description: The scheduler will prefer to schedule pods to
+ nodes that satisfy the affinity expressions specified by
+ this field, but it may choose a node that violates one or
+ more of the expressions. The node that is most preferred
+ is the one with the greatest sum of weights, i.e. for each
+ node that meets all of the scheduling requirements (resource
+ request, requiredDuringScheduling affinity expressions,
+ etc.), compute a sum by iterating through the elements of
+ this field and adding "weight" to the sum if the node matches
+ the corresponding matchExpressions; the node(s) with the
+ highest sum are the most preferred.
+ items:
+ description: An empty preferred scheduling term matches
+ all objects with implicit weight 0 (i.e. it's a no-op).
+ A null preferred scheduling term matches no objects (i.e.
+ is also a no-op).
+ properties:
+ preference:
+ description: A node selector term, associated with the
+ corresponding weight.
+ properties:
+ matchExpressions:
+ description: A list of node selector requirements
+ by node's labels.
+ items:
+ description: A node selector requirement is a
+ selector that contains values, a key, and an
+ operator that relates the key and values.
+ properties:
+ key:
+ description: The label key that the selector
+ applies to.
+ type: string
+ operator:
+ description: Represents a key's relationship
+ to a set of values. Valid operators are
+ In, NotIn, Exists, DoesNotExist. Gt, and
+ Lt.
+ type: string
+ values:
+ description: An array of string values. If
+ the operator is In or NotIn, the values
+ array must be non-empty. If the operator
+ is Exists or DoesNotExist, the values array
+ must be empty. If the operator is Gt or
+ Lt, the values array must have a single
+ element, which will be interpreted as an
+ integer. This array is replaced during a
+ strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchFields:
+ description: A list of node selector requirements
+ by node's fields.
+ items:
+ description: A node selector requirement is a
+ selector that contains values, a key, and an
+ operator that relates the key and values.
+ properties:
+ key:
+ description: The label key that the selector
+ applies to.
+ type: string
+ operator:
+ description: Represents a key's relationship
+ to a set of values. Valid operators are
+ In, NotIn, Exists, DoesNotExist. Gt, and
+ Lt.
+ type: string
+ values:
+ description: An array of string values. If
+ the operator is In or NotIn, the values
+ array must be non-empty. If the operator
+ is Exists or DoesNotExist, the values array
+ must be empty. If the operator is Gt or
+ Lt, the values array must have a single
+ element, which will be interpreted as an
+ integer. This array is replaced during a
+ strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ type: object
+ x-kubernetes-map-type: atomic
+ weight:
+ description: Weight associated with matching the corresponding
+ nodeSelectorTerm, in the range 1-100.
+ format: int32
+ type: integer
+ required:
+ - preference
+ - weight
+ type: object
+ type: array
+ requiredDuringSchedulingIgnoredDuringExecution:
+ description: If the affinity requirements specified by this
+ field are not met at scheduling time, the pod will not be
+ scheduled onto the node. If the affinity requirements specified
+ by this field cease to be met at some point during pod execution
+ (e.g. due to an update), the system may or may not try to
+ eventually evict the pod from its node.
+ properties:
+ nodeSelectorTerms:
+ description: Required. A list of node selector terms.
+ The terms are ORed.
+ items:
+ description: A null or empty node selector term matches
+ no objects. The requirements of them are ANDed. The
+ TopologySelectorTerm type implements a subset of the
+ NodeSelectorTerm.
+ properties:
+ matchExpressions:
+ description: A list of node selector requirements
+ by node's labels.
+ items:
+ description: A node selector requirement is a
+ selector that contains values, a key, and an
+ operator that relates the key and values.
+ properties:
+ key:
+ description: The label key that the selector
+ applies to.
+ type: string
+ operator:
+ description: Represents a key's relationship
+ to a set of values. Valid operators are
+ In, NotIn, Exists, DoesNotExist. Gt, and
+ Lt.
+ type: string
+ values:
+ description: An array of string values. If
+ the operator is In or NotIn, the values
+ array must be non-empty. If the operator
+ is Exists or DoesNotExist, the values array
+ must be empty. If the operator is Gt or
+ Lt, the values array must have a single
+ element, which will be interpreted as an
+ integer. This array is replaced during a
+ strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchFields:
+ description: A list of node selector requirements
+ by node's fields.
+ items:
+ description: A node selector requirement is a
+ selector that contains values, a key, and an
+ operator that relates the key and values.
+ properties:
+ key:
+ description: The label key that the selector
+ applies to.
+ type: string
+ operator:
+ description: Represents a key's relationship
+ to a set of values. Valid operators are
+ In, NotIn, Exists, DoesNotExist. Gt, and
+ Lt.
+ type: string
+ values:
+ description: An array of string values. If
+ the operator is In or NotIn, the values
+ array must be non-empty. If the operator
+ is Exists or DoesNotExist, the values array
+ must be empty. If the operator is Gt or
+ Lt, the values array must have a single
+ element, which will be interpreted as an
+ integer. This array is replaced during a
+ strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
+ required:
+ - nodeSelectorTerms
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ podAffinity:
+ description: Describes pod affinity scheduling rules (e.g. co-locate
+ this pod in the same node, zone, etc. as some other pod(s)).
+ properties:
+ preferredDuringSchedulingIgnoredDuringExecution:
+ description: The scheduler will prefer to schedule pods to
+ nodes that satisfy the affinity expressions specified by
+ this field, but it may choose a node that violates one or
+ more of the expressions. The node that is most preferred
+ is the one with the greatest sum of weights, i.e. for each
+ node that meets all of the scheduling requirements (resource
+ request, requiredDuringScheduling affinity expressions,
+ etc.), compute a sum by iterating through the elements of
+ this field and adding "weight" to the sum if the node has
+ pods which matches the corresponding podAffinityTerm; the
+ node(s) with the highest sum are the most preferred.
+ items:
+ description: The weights of all of the matched WeightedPodAffinityTerm
+ fields are added per-node to find the most preferred node(s)
+ properties:
+ podAffinityTerm:
+ description: Required. A pod affinity term, associated
+ with the corresponding weight.
+ properties:
+ labelSelector:
+ description: A label query over a set of resources,
+ in this case pods.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: A label selector requirement
+ is a selector that contains values, a key,
+ and an operator that relates the key and
+ values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's
+ relationship to a set of values. Valid
+ operators are In, NotIn, Exists and
+ DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty.
+ If the operator is Exists or DoesNotExist,
+ the values array must be empty. This
+ array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is
+ "In", and the values array contains only "value".
+ The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ namespaceSelector:
+ description: A label query over the set of namespaces
+ that the term applies to. The term is applied
+ to the union of the namespaces selected by this
+ field and the ones listed in the namespaces field.
+ null selector and null or empty namespaces list
+ means "this pod's namespace". An empty selector
+ ({}) matches all namespaces.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: A label selector requirement
+ is a selector that contains values, a key,
+ and an operator that relates the key and
+ values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's
+ relationship to a set of values. Valid
+ operators are In, NotIn, Exists and
+ DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty.
+ If the operator is Exists or DoesNotExist,
+ the values array must be empty. This
+ array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is
+ "In", and the values array contains only "value".
+ The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ namespaces:
+ description: namespaces specifies a static list
+ of namespace names that the term applies to. The
+ term is applied to the union of the namespaces
+ listed in this field and the ones selected by
+ namespaceSelector. null or empty namespaces list
+ and null namespaceSelector means "this pod's namespace".
+ items:
+ type: string
+ type: array
+ topologyKey:
+ description: This pod should be co-located (affinity)
+ or not co-located (anti-affinity) with the pods
+ matching the labelSelector in the specified namespaces,
+ where co-located is defined as running on a node
+ whose value of the label with key topologyKey
+ matches that of any node on which any of the selected
+ pods is running. Empty topologyKey is not allowed.
+ type: string
+ required:
+ - topologyKey
+ type: object
+ weight:
+ description: weight associated with matching the corresponding
+ podAffinityTerm, in the range 1-100.
+ format: int32
+ type: integer
+ required:
+ - podAffinityTerm
+ - weight
+ type: object
+ type: array
+ requiredDuringSchedulingIgnoredDuringExecution:
+ description: If the affinity requirements specified by this
+ field are not met at scheduling time, the pod will not be
+ scheduled onto the node. If the affinity requirements specified
+ by this field cease to be met at some point during pod execution
+ (e.g. due to a pod label update), the system may or may
+ not try to eventually evict the pod from its node. When
+ there are multiple elements, the lists of nodes corresponding
+ to each podAffinityTerm are intersected, i.e. all terms
+ must be satisfied.
+ items:
+ description: Defines a set of pods (namely those matching
+ the labelSelector relative to the given namespace(s))
+ that this pod should be co-located (affinity) or not co-located
+ (anti-affinity) with, where co-located is defined as running
+ on a node whose value of the label with key
+ matches that of any node on which a pod of the set of
+ pods is running
+ properties:
+ labelSelector:
+ description: A label query over a set of resources,
+ in this case pods.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are ANDed.
+ items:
+ description: A label selector requirement is a
+ selector that contains values, a key, and an
+ operator that relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's relationship
+ to a set of values. Valid operators are
+ In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty. If the
+ operator is Exists or DoesNotExist, the
+ values array must be empty. This array is
+ replaced during a strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is "In",
+ and the values array contains only "value". The
+ requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ namespaceSelector:
+ description: A label query over the set of namespaces
+ that the term applies to. The term is applied to the
+ union of the namespaces selected by this field and
+ the ones listed in the namespaces field. null selector
+ and null or empty namespaces list means "this pod's
+ namespace". An empty selector ({}) matches all namespaces.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are ANDed.
+ items:
+ description: A label selector requirement is a
+ selector that contains values, a key, and an
+ operator that relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's relationship
+ to a set of values. Valid operators are
+ In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty. If the
+ operator is Exists or DoesNotExist, the
+ values array must be empty. This array is
+ replaced during a strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is "In",
+ and the values array contains only "value". The
+ requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ namespaces:
+ description: namespaces specifies a static list of namespace
+ names that the term applies to. The term is applied
+ to the union of the namespaces listed in this field
+ and the ones selected by namespaceSelector. null or
+ empty namespaces list and null namespaceSelector means
+ "this pod's namespace".
+ items:
+ type: string
+ type: array
+ topologyKey:
+ description: This pod should be co-located (affinity)
+ or not co-located (anti-affinity) with the pods matching
+ the labelSelector in the specified namespaces, where
+ co-located is defined as running on a node whose value
+ of the label with key topologyKey matches that of
+ any node on which any of the selected pods is running.
+ Empty topologyKey is not allowed.
+ type: string
+ required:
+ - topologyKey
+ type: object
+ type: array
+ type: object
+ podAntiAffinity:
+ description: Describes pod anti-affinity scheduling rules (e.g.
+ avoid putting this pod in the same node, zone, etc. as some
+ other pod(s)).
+ properties:
+ preferredDuringSchedulingIgnoredDuringExecution:
+ description: The scheduler will prefer to schedule pods to
+ nodes that satisfy the anti-affinity expressions specified
+ by this field, but it may choose a node that violates one
+ or more of the expressions. The node that is most preferred
+ is the one with the greatest sum of weights, i.e. for each
+ node that meets all of the scheduling requirements (resource
+ request, requiredDuringScheduling anti-affinity expressions,
+ etc.), compute a sum by iterating through the elements of
+ this field and adding "weight" to the sum if the node has
+ pods which matches the corresponding podAffinityTerm; the
+ node(s) with the highest sum are the most preferred.
+ items:
+ description: The weights of all of the matched WeightedPodAffinityTerm
+ fields are added per-node to find the most preferred node(s)
+ properties:
+ podAffinityTerm:
+ description: Required. A pod affinity term, associated
+ with the corresponding weight.
+ properties:
+ labelSelector:
+ description: A label query over a set of resources,
+ in this case pods.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: A label selector requirement
+ is a selector that contains values, a key,
+ and an operator that relates the key and
+ values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's
+ relationship to a set of values. Valid
+ operators are In, NotIn, Exists and
+ DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty.
+ If the operator is Exists or DoesNotExist,
+ the values array must be empty. This
+ array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is
+ "In", and the values array contains only "value".
+ The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ namespaceSelector:
+ description: A label query over the set of namespaces
+ that the term applies to. The term is applied
+ to the union of the namespaces selected by this
+ field and the ones listed in the namespaces field.
+ null selector and null or empty namespaces list
+ means "this pod's namespace". An empty selector
+ ({}) matches all namespaces.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: A label selector requirement
+ is a selector that contains values, a key,
+ and an operator that relates the key and
+ values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's
+ relationship to a set of values. Valid
+ operators are In, NotIn, Exists and
+ DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty.
+ If the operator is Exists or DoesNotExist,
+ the values array must be empty. This
+ array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is
+ "In", and the values array contains only "value".
+ The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ namespaces:
+ description: namespaces specifies a static list
+ of namespace names that the term applies to. The
+ term is applied to the union of the namespaces
+ listed in this field and the ones selected by
+ namespaceSelector. null or empty namespaces list
+ and null namespaceSelector means "this pod's namespace".
+ items:
+ type: string
+ type: array
+ topologyKey:
+ description: This pod should be co-located (affinity)
+ or not co-located (anti-affinity) with the pods
+ matching the labelSelector in the specified namespaces,
+ where co-located is defined as running on a node
+ whose value of the label with key topologyKey
+ matches that of any node on which any of the selected
+ pods is running. Empty topologyKey is not allowed.
+ type: string
+ required:
+ - topologyKey
+ type: object
+ weight:
+ description: weight associated with matching the corresponding
+ podAffinityTerm, in the range 1-100.
+ format: int32
+ type: integer
+ required:
+ - podAffinityTerm
+ - weight
+ type: object
+ type: array
+ requiredDuringSchedulingIgnoredDuringExecution:
+ description: If the anti-affinity requirements specified by
+ this field are not met at scheduling time, the pod will
+ not be scheduled onto the node. If the anti-affinity requirements
+ specified by this field cease to be met at some point during
+ pod execution (e.g. due to a pod label update), the system
+ may or may not try to eventually evict the pod from its
+ node. When there are multiple elements, the lists of nodes
+ corresponding to each podAffinityTerm are intersected, i.e.
+ all terms must be satisfied.
+ items:
+ description: Defines a set of pods (namely those matching
+ the labelSelector relative to the given namespace(s))
+ that this pod should be co-located (affinity) or not co-located
+ (anti-affinity) with, where co-located is defined as running
+ on a node whose value of the label with key
+ matches that of any node on which a pod of the set of
+ pods is running
+ properties:
+ labelSelector:
+ description: A label query over a set of resources,
+ in this case pods.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are ANDed.
+ items:
+ description: A label selector requirement is a
+ selector that contains values, a key, and an
+ operator that relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's relationship
+ to a set of values. Valid operators are
+ In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty. If the
+ operator is Exists or DoesNotExist, the
+ values array must be empty. This array is
+ replaced during a strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is "In",
+ and the values array contains only "value". The
+ requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ namespaceSelector:
+ description: A label query over the set of namespaces
+ that the term applies to. The term is applied to the
+ union of the namespaces selected by this field and
+ the ones listed in the namespaces field. null selector
+ and null or empty namespaces list means "this pod's
+ namespace". An empty selector ({}) matches all namespaces.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are ANDed.
+ items:
+ description: A label selector requirement is a
+ selector that contains values, a key, and an
+ operator that relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's relationship
+ to a set of values. Valid operators are
+ In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty. If the
+ operator is Exists or DoesNotExist, the
+ values array must be empty. This array is
+ replaced during a strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is "In",
+ and the values array contains only "value". The
+ requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ namespaces:
+ description: namespaces specifies a static list of namespace
+ names that the term applies to. The term is applied
+ to the union of the namespaces listed in this field
+ and the ones selected by namespaceSelector. null or
+ empty namespaces list and null namespaceSelector means
+ "this pod's namespace".
+ items:
+ type: string
+ type: array
+ topologyKey:
+ description: This pod should be co-located (affinity)
+ or not co-located (anti-affinity) with the pods matching
+ the labelSelector in the specified namespaces, where
+ co-located is defined as running on a node whose value
+ of the label with key topologyKey matches that of
+ any node on which any of the selected pods is running.
+ Empty topologyKey is not allowed.
+ type: string
+ required:
+ - topologyKey
+ type: object
+ type: array
+ type: object
+ type: object
+ apiserverConfig:
+ description: 'APIServerConfig allows specifying a host and auth methods
+ to access the Kuberntees API server. If null, Prometheus is assumed
+ to run inside of the cluster: it will discover the API servers automatically
+ and use the Pod''s CA certificate and bearer token file at /var/run/secrets/kubernetes.io/serviceaccount/.'
+ properties:
+ authorization:
+ description: "Authorization section for the API server. \n Cannot
+ be set at the same time as `basicAuth`, `bearerToken`, or `bearerTokenFile`."
+ properties:
+ credentials:
+ description: Selects a key of a Secret in the namespace that
+ contains the credentials for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ credentialsFile:
+ description: File to read a secret from, mutually exclusive
+ with `credentials`.
+ type: string
+ type:
+ description: "Defines the authentication type. The value is
+ case-insensitive. \n \"Basic\" is not a supported value.
+ \n Default: \"Bearer\""
+ type: string
+ type: object
+ basicAuth:
+ description: "BasicAuth configuration for the API server. \n Cannot
+ be set at the same time as `authorization`, `bearerToken`, or
+ `bearerTokenFile`."
+ properties:
+ password:
+ description: The secret in the service monitor namespace that
+ contains the password for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ username:
+ description: The secret in the service monitor namespace that
+ contains the username for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ bearerToken:
+ description: "*Warning: this field shouldn't be used because the
+ token value appears in clear-text. Prefer using `authorization`.*
+ \n *Deprecated: this will be removed in a future release.*"
+ type: string
+ bearerTokenFile:
+ description: "File to read bearer token for accessing apiserver.
+ \n Cannot be set at the same time as `basicAuth`, `authorization`,
+ or `bearerToken`. \n *Deprecated: this will be removed in a
+ future release. Prefer using `authorization`.*"
+ type: string
+ host:
+ description: Kubernetes API address consisting of a hostname or
+ IP address followed by an optional port number.
+ type: string
+ tlsConfig:
+ description: TLS Config to use for the API server.
+ properties:
+ ca:
+ description: Certificate authority used when verifying server
+ certificates.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ caFile:
+ description: Path to the CA cert in the Prometheus container
+ to use for the targets.
+ type: string
+ cert:
+ description: Client certificate to present when doing client-authentication.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ certFile:
+ description: Path to the client cert file in the Prometheus
+ container for the targets.
+ type: string
+ insecureSkipVerify:
+ description: Disable target certificate validation.
+ type: boolean
+ keyFile:
+ description: Path to the client key file in the Prometheus
+ container for the targets.
+ type: string
+ keySecret:
+ description: Secret containing the client key file for the
+ targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ serverName:
+ description: Used to verify the hostname for the targets.
+ type: string
+ type: object
+ required:
+ - host
+ type: object
+ arbitraryFSAccessThroughSMs:
+ description: When true, ServiceMonitor, PodMonitor and Probe object
+ are forbidden to reference arbitrary files on the file system of
+ the 'prometheus' container. When a ServiceMonitor's endpoint specifies
+ a `bearerTokenFile` value (e.g. '/var/run/secrets/kubernetes.io/serviceaccount/token'),
+ a malicious target can get access to the Prometheus service account's
+ token in the Prometheus' scrape request. Setting `spec.arbitraryFSAccessThroughSM`
+ to 'true' would prevent the attack. Users should instead provide
+ the credentials using the `spec.bearerTokenSecret` field.
+ properties:
+ deny:
+ type: boolean
+ type: object
+ bodySizeLimit:
+ description: BodySizeLimit defines per-scrape on response body size.
+ Only valid in Prometheus versions 2.45.0 and newer.
+ pattern: (^0|([0-9]*[.])?[0-9]+((K|M|G|T|E|P)i?)?B)$
+ type: string
+ configMaps:
+ description: ConfigMaps is a list of ConfigMaps in the same namespace
+ as the Prometheus object, which shall be mounted into the Prometheus
+ Pods. Each ConfigMap is added to the StatefulSet definition as a
+ volume named `configmap-`. The ConfigMaps are mounted
+ into /etc/prometheus/configmaps/ in the 'prometheus'
+ container.
+ items:
+ type: string
+ type: array
+ containers:
+ description: "Containers allows injecting additional containers or
+ modifying operator generated containers. This can be used to allow
+ adding an authentication proxy to the Pods or to change the behavior
+ of an operator generated container. Containers described here modify
+ an operator generated container if they share the same name and
+ modifications are done via a strategic merge patch. \n The names
+ of containers managed by the operator are: * `prometheus` * `config-reloader`
+ * `thanos-sidecar` \n Overriding containers is entirely outside
+ the scope of what the maintainers will support and by doing so,
+ you accept that this behaviour may break at any time without notice."
+ items:
+ description: A single application container that you want to run
+ within a pod.
+ properties:
+ args:
+ description: 'Arguments to the entrypoint. The container image''s
+ CMD is used if this is not provided. Variable references $(VAR_NAME)
+ are expanded using the container''s environment. If a variable
+ cannot be resolved, the reference in the input string will
+ be unchanged. Double $$ are reduced to a single $, which allows
+ for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will
+ produce the string literal "$(VAR_NAME)". Escaped references
+ will never be expanded, regardless of whether the variable
+ exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'
+ items:
+ type: string
+ type: array
+ command:
+ description: 'Entrypoint array. Not executed within a shell.
+ The container image''s ENTRYPOINT is used if this is not provided.
+ Variable references $(VAR_NAME) are expanded using the container''s
+ environment. If a variable cannot be resolved, the reference
+ in the input string will be unchanged. Double $$ are reduced
+ to a single $, which allows for escaping the $(VAR_NAME) syntax:
+ i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)".
+ Escaped references will never be expanded, regardless of whether
+ the variable exists or not. Cannot be updated. More info:
+ https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'
+ items:
+ type: string
+ type: array
+ env:
+ description: List of environment variables to set in the container.
+ Cannot be updated.
+ items:
+ description: EnvVar represents an environment variable present
+ in a Container.
+ properties:
+ name:
+ description: Name of the environment variable. Must be
+ a C_IDENTIFIER.
+ type: string
+ value:
+ description: 'Variable references $(VAR_NAME) are expanded
+ using the previously defined environment variables in
+ the container and any service environment variables.
+ If a variable cannot be resolved, the reference in the
+ input string will be unchanged. Double $$ are reduced
+ to a single $, which allows for escaping the $(VAR_NAME)
+ syntax: i.e. "$$(VAR_NAME)" will produce the string
+ literal "$(VAR_NAME)". Escaped references will never
+ be expanded, regardless of whether the variable exists
+ or not. Defaults to "".'
+ type: string
+ valueFrom:
+ description: Source for the environment variable's value.
+ Cannot be used if value is not empty.
+ properties:
+ configMapKeyRef:
+ description: Selects a key of a ConfigMap.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ fieldRef:
+ description: 'Selects a field of the pod: supports
+ metadata.name, metadata.namespace, `metadata.labels['''']`,
+ `metadata.annotations['''']`, spec.nodeName,
+ spec.serviceAccountName, status.hostIP, status.podIP,
+ status.podIPs.'
+ properties:
+ apiVersion:
+ description: Version of the schema the FieldPath
+ is written in terms of, defaults to "v1".
+ type: string
+ fieldPath:
+ description: Path of the field to select in the
+ specified API version.
+ type: string
+ required:
+ - fieldPath
+ type: object
+ x-kubernetes-map-type: atomic
+ resourceFieldRef:
+ description: 'Selects a resource of the container:
+ only resources limits and requests (limits.cpu,
+ limits.memory, limits.ephemeral-storage, requests.cpu,
+ requests.memory and requests.ephemeral-storage)
+ are currently supported.'
+ properties:
+ containerName:
+ description: 'Container name: required for volumes,
+ optional for env vars'
+ type: string
+ divisor:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Specifies the output format of the
+ exposed resources, defaults to "1"
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ resource:
+ description: 'Required: resource to select'
+ type: string
+ required:
+ - resource
+ type: object
+ x-kubernetes-map-type: atomic
+ secretKeyRef:
+ description: Selects a key of a secret in the pod's
+ namespace
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ required:
+ - name
+ type: object
+ type: array
+ envFrom:
+ description: List of sources to populate environment variables
+ in the container. The keys defined within a source must be
+ a C_IDENTIFIER. All invalid keys will be reported as an event
+ when the container is starting. When a key exists in multiple
+ sources, the value associated with the last source will take
+ precedence. Values defined by an Env with a duplicate key
+ will take precedence. Cannot be updated.
+ items:
+ description: EnvFromSource represents the source of a set
+ of ConfigMaps
+ properties:
+ configMapRef:
+ description: The ConfigMap to select from
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap must be
+ defined
+ type: boolean
+ type: object
+ x-kubernetes-map-type: atomic
+ prefix:
+ description: An optional identifier to prepend to each
+ key in the ConfigMap. Must be a C_IDENTIFIER.
+ type: string
+ secretRef:
+ description: The Secret to select from
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret must be defined
+ type: boolean
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ image:
+ description: 'Container image name. More info: https://kubernetes.io/docs/concepts/containers/images
+ This field is optional to allow higher level config management
+ to default or override container images in workload controllers
+ like Deployments and StatefulSets.'
+ type: string
+ imagePullPolicy:
+ description: 'Image pull policy. One of Always, Never, IfNotPresent.
+ Defaults to Always if :latest tag is specified, or IfNotPresent
+ otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images'
+ type: string
+ lifecycle:
+ description: Actions that the management system should take
+ in response to container lifecycle events. Cannot be updated.
+ properties:
+ postStart:
+ description: 'PostStart is called immediately after a container
+ is created. If the handler fails, the container is terminated
+ and restarted according to its restart policy. Other management
+ of the container blocks until the hook completes. More
+ info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for
+ the command is root ('/') in the container's
+ filesystem. The command is simply exec'd, it is
+ not run inside a shell, so traditional shell instructions
+ ('|', etc) won't work. To use a shell, you need
+ to explicitly call out to that shell. Exit status
+ of 0 is treated as live/healthy and non-zero is
+ unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to
+ the pod IP. You probably want to set "Host" in
+ httpHeaders instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request.
+ HTTP allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access
+ on the container. Number must be in the range
+ 1 to 65535. Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the
+ host. Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ tcpSocket:
+ description: Deprecated. TCPSocket is NOT supported
+ as a LifecycleHandler and kept for the backward compatibility.
+ There are no validation of this field and lifecycle
+ hooks will fail in runtime when tcp handler is specified.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to,
+ defaults to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access
+ on the container. Number must be in the range
+ 1 to 65535. Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ type: object
+ preStop:
+ description: 'PreStop is called immediately before a container
+ is terminated due to an API request or management event
+ such as liveness/startup probe failure, preemption, resource
+ contention, etc. The handler is not called if the container
+ crashes or exits. The Pod''s termination grace period
+ countdown begins before the PreStop hook is executed.
+ Regardless of the outcome of the handler, the container
+ will eventually terminate within the Pod''s termination
+ grace period (unless delayed by finalizers). Other management
+ of the container blocks until the hook completes or until
+ the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for
+ the command is root ('/') in the container's
+ filesystem. The command is simply exec'd, it is
+ not run inside a shell, so traditional shell instructions
+ ('|', etc) won't work. To use a shell, you need
+ to explicitly call out to that shell. Exit status
+ of 0 is treated as live/healthy and non-zero is
+ unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to
+ the pod IP. You probably want to set "Host" in
+ httpHeaders instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request.
+ HTTP allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access
+ on the container. Number must be in the range
+ 1 to 65535. Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the
+ host. Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ tcpSocket:
+ description: Deprecated. TCPSocket is NOT supported
+ as a LifecycleHandler and kept for the backward compatibility.
+ There are no validation of this field and lifecycle
+ hooks will fail in runtime when tcp handler is specified.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to,
+ defaults to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access
+ on the container. Number must be in the range
+ 1 to 65535. Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ type: object
+ type: object
+ livenessProbe:
+ description: 'Periodic probe of container liveness. Container
+ will be restarted if the probe fails. Cannot be updated. More
+ info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for the
+ command is root ('/') in the container's filesystem.
+ The command is simply exec'd, it is not run inside
+ a shell, so traditional shell instructions ('|', etc)
+ won't work. To use a shell, you need to explicitly
+ call out to that shell. Exit status of 0 is treated
+ as live/healthy and non-zero is unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ failureThreshold:
+ description: Minimum consecutive failures for the probe
+ to be considered failed after having succeeded. Defaults
+ to 3. Minimum value is 1.
+ format: int32
+ type: integer
+ grpc:
+ description: GRPC specifies an action involving a GRPC port.
+ properties:
+ port:
+ description: Port number of the gRPC service. Number
+ must be in the range 1 to 65535.
+ format: int32
+ type: integer
+ service:
+ description: "Service is the name of the service to
+ place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
+ \n If this is not specified, the default behavior
+ is defined by gRPC."
+ type: string
+ required:
+ - port
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to the
+ pod IP. You probably want to set "Host" in httpHeaders
+ instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request. HTTP
+ allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the host.
+ Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ initialDelaySeconds:
+ description: 'Number of seconds after the container has
+ started before liveness probes are initiated. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ periodSeconds:
+ description: How often (in seconds) to perform the probe.
+ Default to 10 seconds. Minimum value is 1.
+ format: int32
+ type: integer
+ successThreshold:
+ description: Minimum consecutive successes for the probe
+ to be considered successful after having failed. Defaults
+ to 1. Must be 1 for liveness and startup. Minimum value
+ is 1.
+ format: int32
+ type: integer
+ tcpSocket:
+ description: TCPSocket specifies an action involving a TCP
+ port.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to, defaults
+ to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ terminationGracePeriodSeconds:
+ description: Optional duration in seconds the pod needs
+ to terminate gracefully upon probe failure. The grace
+ period is the duration in seconds after the processes
+ running in the pod are sent a termination signal and the
+ time when the processes are forcibly halted with a kill
+ signal. Set this value longer than the expected cleanup
+ time for your process. If this value is nil, the pod's
+ terminationGracePeriodSeconds will be used. Otherwise,
+ this value overrides the value provided by the pod spec.
+ Value must be non-negative integer. The value zero indicates
+ stop immediately via the kill signal (no opportunity to
+ shut down). This is a beta field and requires enabling
+ ProbeTerminationGracePeriod feature gate. Minimum value
+ is 1. spec.terminationGracePeriodSeconds is used if unset.
+ format: int64
+ type: integer
+ timeoutSeconds:
+ description: 'Number of seconds after which the probe times
+ out. Defaults to 1 second. Minimum value is 1. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ type: object
+ name:
+ description: Name of the container specified as a DNS_LABEL.
+ Each container in a pod must have a unique name (DNS_LABEL).
+ Cannot be updated.
+ type: string
+ ports:
+ description: List of ports to expose from the container. Not
+ specifying a port here DOES NOT prevent that port from being
+ exposed. Any port which is listening on the default "0.0.0.0"
+ address inside a container will be accessible from the network.
+ Modifying this array with strategic merge patch may corrupt
+ the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255.
+ Cannot be updated.
+ items:
+ description: ContainerPort represents a network port in a
+ single container.
+ properties:
+ containerPort:
+ description: Number of port to expose on the pod's IP
+ address. This must be a valid port number, 0 < x < 65536.
+ format: int32
+ type: integer
+ hostIP:
+ description: What host IP to bind the external port to.
+ type: string
+ hostPort:
+ description: Number of port to expose on the host. If
+ specified, this must be a valid port number, 0 < x <
+ 65536. If HostNetwork is specified, this must match
+ ContainerPort. Most containers do not need this.
+ format: int32
+ type: integer
+ name:
+ description: If specified, this must be an IANA_SVC_NAME
+ and unique within the pod. Each named port in a pod
+ must have a unique name. Name for the port that can
+ be referred to by services.
+ type: string
+ protocol:
+ default: TCP
+ description: Protocol for port. Must be UDP, TCP, or SCTP.
+ Defaults to "TCP".
+ type: string
+ required:
+ - containerPort
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - containerPort
+ - protocol
+ x-kubernetes-list-type: map
+ readinessProbe:
+ description: 'Periodic probe of container service readiness.
+ Container will be removed from service endpoints if the probe
+ fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for the
+ command is root ('/') in the container's filesystem.
+ The command is simply exec'd, it is not run inside
+ a shell, so traditional shell instructions ('|', etc)
+ won't work. To use a shell, you need to explicitly
+ call out to that shell. Exit status of 0 is treated
+ as live/healthy and non-zero is unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ failureThreshold:
+ description: Minimum consecutive failures for the probe
+ to be considered failed after having succeeded. Defaults
+ to 3. Minimum value is 1.
+ format: int32
+ type: integer
+ grpc:
+ description: GRPC specifies an action involving a GRPC port.
+ properties:
+ port:
+ description: Port number of the gRPC service. Number
+ must be in the range 1 to 65535.
+ format: int32
+ type: integer
+ service:
+ description: "Service is the name of the service to
+ place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
+ \n If this is not specified, the default behavior
+ is defined by gRPC."
+ type: string
+ required:
+ - port
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to the
+ pod IP. You probably want to set "Host" in httpHeaders
+ instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request. HTTP
+ allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the host.
+ Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ initialDelaySeconds:
+ description: 'Number of seconds after the container has
+ started before liveness probes are initiated. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ periodSeconds:
+ description: How often (in seconds) to perform the probe.
+ Default to 10 seconds. Minimum value is 1.
+ format: int32
+ type: integer
+ successThreshold:
+ description: Minimum consecutive successes for the probe
+ to be considered successful after having failed. Defaults
+ to 1. Must be 1 for liveness and startup. Minimum value
+ is 1.
+ format: int32
+ type: integer
+ tcpSocket:
+ description: TCPSocket specifies an action involving a TCP
+ port.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to, defaults
+ to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ terminationGracePeriodSeconds:
+ description: Optional duration in seconds the pod needs
+ to terminate gracefully upon probe failure. The grace
+ period is the duration in seconds after the processes
+ running in the pod are sent a termination signal and the
+ time when the processes are forcibly halted with a kill
+ signal. Set this value longer than the expected cleanup
+ time for your process. If this value is nil, the pod's
+ terminationGracePeriodSeconds will be used. Otherwise,
+ this value overrides the value provided by the pod spec.
+ Value must be non-negative integer. The value zero indicates
+ stop immediately via the kill signal (no opportunity to
+ shut down). This is a beta field and requires enabling
+ ProbeTerminationGracePeriod feature gate. Minimum value
+ is 1. spec.terminationGracePeriodSeconds is used if unset.
+ format: int64
+ type: integer
+ timeoutSeconds:
+ description: 'Number of seconds after which the probe times
+ out. Defaults to 1 second. Minimum value is 1. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ type: object
+ resizePolicy:
+ description: Resources resize policy for the container.
+ items:
+ description: ContainerResizePolicy represents resource resize
+ policy for the container.
+ properties:
+ resourceName:
+ description: 'Name of the resource to which this resource
+ resize policy applies. Supported values: cpu, memory.'
+ type: string
+ restartPolicy:
+ description: Restart policy to apply when specified resource
+ is resized. If not specified, it defaults to NotRequired.
+ type: string
+ required:
+ - resourceName
+ - restartPolicy
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ resources:
+ description: 'Compute Resources required by this container.
+ Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ properties:
+ claims:
+ description: "Claims lists the names of resources, defined
+ in spec.resourceClaims, that are used by this container.
+ \n This is an alpha field and requires enabling the DynamicResourceAllocation
+ feature gate. \n This field is immutable. It can only
+ be set for containers."
+ items:
+ description: ResourceClaim references one entry in PodSpec.ResourceClaims.
+ properties:
+ name:
+ description: Name must match the name of one entry
+ in pod.spec.resourceClaims of the Pod where this
+ field is used. It makes that resource available
+ inside a container.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - name
+ x-kubernetes-list-type: map
+ limits:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Limits describes the maximum amount of compute
+ resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ requests:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Requests describes the minimum amount of compute
+ resources required. If Requests is omitted for a container,
+ it defaults to Limits if that is explicitly specified,
+ otherwise to an implementation-defined value. Requests
+ cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ type: object
+ restartPolicy:
+ description: 'RestartPolicy defines the restart behavior of
+ individual containers in a pod. This field may only be set
+ for init containers, and the only allowed value is "Always".
+ For non-init containers or when this field is not specified,
+ the restart behavior is defined by the Pod''s restart policy
+ and the container type. Setting the RestartPolicy as "Always"
+ for the init container will have the following effect: this
+ init container will be continually restarted on exit until
+ all regular containers have terminated. Once all regular containers
+ have completed, all init containers with restartPolicy "Always"
+ will be shut down. This lifecycle differs from normal init
+ containers and is often referred to as a "sidecar" container.
+ Although this init container still starts in the init container
+ sequence, it does not wait for the container to complete before
+ proceeding to the next init container. Instead, the next init
+ container starts immediately after this init container is
+ started, or after any startupProbe has successfully completed.'
+ type: string
+ securityContext:
+ description: 'SecurityContext defines the security options the
+ container should be run with. If set, the fields of SecurityContext
+ override the equivalent fields of PodSecurityContext. More
+ info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/'
+ properties:
+ allowPrivilegeEscalation:
+ description: 'AllowPrivilegeEscalation controls whether
+ a process can gain more privileges than its parent process.
+ This bool directly controls if the no_new_privs flag will
+ be set on the container process. AllowPrivilegeEscalation
+ is true always when the container is: 1) run as Privileged
+ 2) has CAP_SYS_ADMIN Note that this field cannot be set
+ when spec.os.name is windows.'
+ type: boolean
+ capabilities:
+ description: The capabilities to add/drop when running containers.
+ Defaults to the default set of capabilities granted by
+ the container runtime. Note that this field cannot be
+ set when spec.os.name is windows.
+ properties:
+ add:
+ description: Added capabilities
+ items:
+ description: Capability represent POSIX capabilities
+ type
+ type: string
+ type: array
+ drop:
+ description: Removed capabilities
+ items:
+ description: Capability represent POSIX capabilities
+ type
+ type: string
+ type: array
+ type: object
+ privileged:
+ description: Run container in privileged mode. Processes
+ in privileged containers are essentially equivalent to
+ root on the host. Defaults to false. Note that this field
+ cannot be set when spec.os.name is windows.
+ type: boolean
+ procMount:
+ description: procMount denotes the type of proc mount to
+ use for the containers. The default is DefaultProcMount
+ which uses the container runtime defaults for readonly
+ paths and masked paths. This requires the ProcMountType
+ feature flag to be enabled. Note that this field cannot
+ be set when spec.os.name is windows.
+ type: string
+ readOnlyRootFilesystem:
+ description: Whether this container has a read-only root
+ filesystem. Default is false. Note that this field cannot
+ be set when spec.os.name is windows.
+ type: boolean
+ runAsGroup:
+ description: The GID to run the entrypoint of the container
+ process. Uses runtime default if unset. May also be set
+ in PodSecurityContext. If set in both SecurityContext
+ and PodSecurityContext, the value specified in SecurityContext
+ takes precedence. Note that this field cannot be set when
+ spec.os.name is windows.
+ format: int64
+ type: integer
+ runAsNonRoot:
+ description: Indicates that the container must run as a
+ non-root user. If true, the Kubelet will validate the
+ image at runtime to ensure that it does not run as UID
+ 0 (root) and fail to start the container if it does. If
+ unset or false, no such validation will be performed.
+ May also be set in PodSecurityContext. If set in both
+ SecurityContext and PodSecurityContext, the value specified
+ in SecurityContext takes precedence.
+ type: boolean
+ runAsUser:
+ description: The UID to run the entrypoint of the container
+ process. Defaults to user specified in image metadata
+ if unspecified. May also be set in PodSecurityContext. If
+ set in both SecurityContext and PodSecurityContext, the
+ value specified in SecurityContext takes precedence. Note
+ that this field cannot be set when spec.os.name is windows.
+ format: int64
+ type: integer
+ seLinuxOptions:
+ description: The SELinux context to be applied to the container.
+ If unspecified, the container runtime will allocate a
+ random SELinux context for each container. May also be
+ set in PodSecurityContext. If set in both SecurityContext
+ and PodSecurityContext, the value specified in SecurityContext
+ takes precedence. Note that this field cannot be set when
+ spec.os.name is windows.
+ properties:
+ level:
+ description: Level is SELinux level label that applies
+ to the container.
+ type: string
+ role:
+ description: Role is a SELinux role label that applies
+ to the container.
+ type: string
+ type:
+ description: Type is a SELinux type label that applies
+ to the container.
+ type: string
+ user:
+ description: User is a SELinux user label that applies
+ to the container.
+ type: string
+ type: object
+ seccompProfile:
+ description: The seccomp options to use by this container.
+ If seccomp options are provided at both the pod & container
+ level, the container options override the pod options.
+ Note that this field cannot be set when spec.os.name is
+ windows.
+ properties:
+ localhostProfile:
+ description: localhostProfile indicates a profile defined
+ in a file on the node should be used. The profile
+ must be preconfigured on the node to work. Must be
+ a descending path, relative to the kubelet's configured
+ seccomp profile location. Must be set if type is "Localhost".
+ Must NOT be set for any other type.
+ type: string
+ type:
+ description: "type indicates which kind of seccomp profile
+ will be applied. Valid options are: \n Localhost -
+ a profile defined in a file on the node should be
+ used. RuntimeDefault - the container runtime default
+ profile should be used. Unconfined - no profile should
+ be applied."
+ type: string
+ required:
+ - type
+ type: object
+ windowsOptions:
+ description: The Windows specific settings applied to all
+ containers. If unspecified, the options from the PodSecurityContext
+ will be used. If set in both SecurityContext and PodSecurityContext,
+ the value specified in SecurityContext takes precedence.
+ Note that this field cannot be set when spec.os.name is
+ linux.
+ properties:
+ gmsaCredentialSpec:
+ description: GMSACredentialSpec is where the GMSA admission
+ webhook (https://github.com/kubernetes-sigs/windows-gmsa)
+ inlines the contents of the GMSA credential spec named
+ by the GMSACredentialSpecName field.
+ type: string
+ gmsaCredentialSpecName:
+ description: GMSACredentialSpecName is the name of the
+ GMSA credential spec to use.
+ type: string
+ hostProcess:
+ description: HostProcess determines if a container should
+ be run as a 'Host Process' container. All of a Pod's
+ containers must have the same effective HostProcess
+ value (it is not allowed to have a mix of HostProcess
+ containers and non-HostProcess containers). In addition,
+ if HostProcess is true then HostNetwork must also
+ be set to true.
+ type: boolean
+ runAsUserName:
+ description: The UserName in Windows to run the entrypoint
+ of the container process. Defaults to the user specified
+ in image metadata if unspecified. May also be set
+ in PodSecurityContext. If set in both SecurityContext
+ and PodSecurityContext, the value specified in SecurityContext
+ takes precedence.
+ type: string
+ type: object
+ type: object
+ startupProbe:
+ description: 'StartupProbe indicates that the Pod has successfully
+ initialized. If specified, no other probes are executed until
+ this completes successfully. If this probe fails, the Pod
+ will be restarted, just as if the livenessProbe failed. This
+ can be used to provide different probe parameters at the beginning
+ of a Pod''s lifecycle, when it might take a long time to load
+ data or warm a cache, than during steady-state operation.
+ This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for the
+ command is root ('/') in the container's filesystem.
+ The command is simply exec'd, it is not run inside
+ a shell, so traditional shell instructions ('|', etc)
+ won't work. To use a shell, you need to explicitly
+ call out to that shell. Exit status of 0 is treated
+ as live/healthy and non-zero is unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ failureThreshold:
+ description: Minimum consecutive failures for the probe
+ to be considered failed after having succeeded. Defaults
+ to 3. Minimum value is 1.
+ format: int32
+ type: integer
+ grpc:
+ description: GRPC specifies an action involving a GRPC port.
+ properties:
+ port:
+ description: Port number of the gRPC service. Number
+ must be in the range 1 to 65535.
+ format: int32
+ type: integer
+ service:
+ description: "Service is the name of the service to
+ place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
+ \n If this is not specified, the default behavior
+ is defined by gRPC."
+ type: string
+ required:
+ - port
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to the
+ pod IP. You probably want to set "Host" in httpHeaders
+ instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request. HTTP
+ allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the host.
+ Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ initialDelaySeconds:
+ description: 'Number of seconds after the container has
+ started before liveness probes are initiated. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ periodSeconds:
+ description: How often (in seconds) to perform the probe.
+ Default to 10 seconds. Minimum value is 1.
+ format: int32
+ type: integer
+ successThreshold:
+ description: Minimum consecutive successes for the probe
+ to be considered successful after having failed. Defaults
+ to 1. Must be 1 for liveness and startup. Minimum value
+ is 1.
+ format: int32
+ type: integer
+ tcpSocket:
+ description: TCPSocket specifies an action involving a TCP
+ port.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to, defaults
+ to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ terminationGracePeriodSeconds:
+ description: Optional duration in seconds the pod needs
+ to terminate gracefully upon probe failure. The grace
+ period is the duration in seconds after the processes
+ running in the pod are sent a termination signal and the
+ time when the processes are forcibly halted with a kill
+ signal. Set this value longer than the expected cleanup
+ time for your process. If this value is nil, the pod's
+ terminationGracePeriodSeconds will be used. Otherwise,
+ this value overrides the value provided by the pod spec.
+ Value must be non-negative integer. The value zero indicates
+ stop immediately via the kill signal (no opportunity to
+ shut down). This is a beta field and requires enabling
+ ProbeTerminationGracePeriod feature gate. Minimum value
+ is 1. spec.terminationGracePeriodSeconds is used if unset.
+ format: int64
+ type: integer
+ timeoutSeconds:
+ description: 'Number of seconds after which the probe times
+ out. Defaults to 1 second. Minimum value is 1. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ type: object
+ stdin:
+ description: Whether this container should allocate a buffer
+ for stdin in the container runtime. If this is not set, reads
+ from stdin in the container will always result in EOF. Default
+ is false.
+ type: boolean
+ stdinOnce:
+ description: Whether the container runtime should close the
+ stdin channel after it has been opened by a single attach.
+ When stdin is true the stdin stream will remain open across
+ multiple attach sessions. If stdinOnce is set to true, stdin
+ is opened on container start, is empty until the first client
+ attaches to stdin, and then remains open and accepts data
+ until the client disconnects, at which time stdin is closed
+ and remains closed until the container is restarted. If this
+ flag is false, a container processes that reads from stdin
+ will never receive an EOF. Default is false
+ type: boolean
+ terminationMessagePath:
+ description: 'Optional: Path at which the file to which the
+ container''s termination message will be written is mounted
+ into the container''s filesystem. Message written is intended
+ to be brief final status, such as an assertion failure message.
+ Will be truncated by the node if greater than 4096 bytes.
+ The total message length across all containers will be limited
+ to 12kb. Defaults to /dev/termination-log. Cannot be updated.'
+ type: string
+ terminationMessagePolicy:
+ description: Indicate how the termination message should be
+ populated. File will use the contents of terminationMessagePath
+ to populate the container status message on both success and
+ failure. FallbackToLogsOnError will use the last chunk of
+ container log output if the termination message file is empty
+ and the container exited with an error. The log output is
+ limited to 2048 bytes or 80 lines, whichever is smaller. Defaults
+ to File. Cannot be updated.
+ type: string
+ tty:
+ description: Whether this container should allocate a TTY for
+ itself, also requires 'stdin' to be true. Default is false.
+ type: boolean
+ volumeDevices:
+ description: volumeDevices is the list of block devices to be
+ used by the container.
+ items:
+ description: volumeDevice describes a mapping of a raw block
+ device within a container.
+ properties:
+ devicePath:
+ description: devicePath is the path inside of the container
+ that the device will be mapped to.
+ type: string
+ name:
+ description: name must match the name of a persistentVolumeClaim
+ in the pod
+ type: string
+ required:
+ - devicePath
+ - name
+ type: object
+ type: array
+ volumeMounts:
+ description: Pod volumes to mount into the container's filesystem.
+ Cannot be updated.
+ items:
+ description: VolumeMount describes a mounting of a Volume
+ within a container.
+ properties:
+ mountPath:
+ description: Path within the container at which the volume
+ should be mounted. Must not contain ':'.
+ type: string
+ mountPropagation:
+ description: mountPropagation determines how mounts are
+ propagated from the host to container and the other
+ way around. When not set, MountPropagationNone is used.
+ This field is beta in 1.10.
+ type: string
+ name:
+ description: This must match the Name of a Volume.
+ type: string
+ readOnly:
+ description: Mounted read-only if true, read-write otherwise
+ (false or unspecified). Defaults to false.
+ type: boolean
+ subPath:
+ description: Path within the volume from which the container's
+ volume should be mounted. Defaults to "" (volume's root).
+ type: string
+ subPathExpr:
+ description: Expanded path within the volume from which
+ the container's volume should be mounted. Behaves similarly
+ to SubPath but environment variable references $(VAR_NAME)
+ are expanded using the container's environment. Defaults
+ to "" (volume's root). SubPathExpr and SubPath are mutually
+ exclusive.
+ type: string
+ required:
+ - mountPath
+ - name
+ type: object
+ type: array
+ workingDir:
+ description: Container's working directory. If not specified,
+ the container runtime's default will be used, which might
+ be configured in the container image. Cannot be updated.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ enableFeatures:
+ description: "Enable access to Prometheus feature flags. By default,
+ no features are enabled. \n Enabling features which are disabled
+ by default is entirely outside the scope of what the maintainers
+ will support and by doing so, you accept that this behaviour may
+ break at any time without notice. \n For more information see https://prometheus.io/docs/prometheus/latest/feature_flags/"
+ items:
+ type: string
+ type: array
+ enableRemoteWriteReceiver:
+ description: "Enable Prometheus to be used as a receiver for the Prometheus
+ remote write protocol. \n WARNING: This is not considered an efficient
+ way of ingesting samples. Use it with caution for specific low-volume
+ use cases. It is not suitable for replacing the ingestion via scraping
+ and turning Prometheus into a push-based metrics collection system.
+ For more information see https://prometheus.io/docs/prometheus/latest/querying/api/#remote-write-receiver
+ \n It requires Prometheus >= v2.33.0."
+ type: boolean
+ enforcedBodySizeLimit:
+ description: "When defined, enforcedBodySizeLimit specifies a global
+ limit on the size of uncompressed response body that will be accepted
+ by Prometheus. Targets responding with a body larger than this many
+ bytes will cause the scrape to fail. \n It requires Prometheus >=
+ v2.28.0."
+ pattern: (^0|([0-9]*[.])?[0-9]+((K|M|G|T|E|P)i?)?B)$
+ type: string
+ enforcedKeepDroppedTargets:
+ description: "When defined, enforcedKeepDroppedTargets specifies a
+ global limit on the number of targets dropped by relabeling that
+ will be kept in memory. The value overrides any `spec.keepDroppedTargets`
+ set by ServiceMonitor, PodMonitor, Probe objects unless `spec.keepDroppedTargets`
+ is greater than zero and less than `spec.enforcedKeepDroppedTargets`.
+ \n It requires Prometheus >= v2.47.0."
+ format: int64
+ type: integer
+ enforcedLabelLimit:
+ description: "When defined, enforcedLabelLimit specifies a global
+ limit on the number of labels per sample. The value overrides any
+ `spec.labelLimit` set by ServiceMonitor, PodMonitor, Probe objects
+ unless `spec.labelLimit` is greater than zero and less than `spec.enforcedLabelLimit`.
+ \n It requires Prometheus >= v2.27.0."
+ format: int64
+ type: integer
+ enforcedLabelNameLengthLimit:
+ description: "When defined, enforcedLabelNameLengthLimit specifies
+ a global limit on the length of labels name per sample. The value
+ overrides any `spec.labelNameLengthLimit` set by ServiceMonitor,
+ PodMonitor, Probe objects unless `spec.labelNameLengthLimit` is
+ greater than zero and less than `spec.enforcedLabelNameLengthLimit`.
+ \n It requires Prometheus >= v2.27.0."
+ format: int64
+ type: integer
+ enforcedLabelValueLengthLimit:
+ description: "When not null, enforcedLabelValueLengthLimit defines
+ a global limit on the length of labels value per sample. The value
+ overrides any `spec.labelValueLengthLimit` set by ServiceMonitor,
+ PodMonitor, Probe objects unless `spec.labelValueLengthLimit` is
+ greater than zero and less than `spec.enforcedLabelValueLengthLimit`.
+ \n It requires Prometheus >= v2.27.0."
+ format: int64
+ type: integer
+ enforcedNamespaceLabel:
+ description: "When not empty, a label will be added to \n 1. All metrics
+ scraped from `ServiceMonitor`, `PodMonitor`, `Probe` and `ScrapeConfig`
+ objects. 2. All metrics generated from recording rules defined in
+ `PrometheusRule` objects. 3. All alerts generated from alerting
+ rules defined in `PrometheusRule` objects. 4. All vector selectors
+ of PromQL expressions defined in `PrometheusRule` objects. \n The
+ label will not added for objects referenced in `spec.excludedFromEnforcement`.
+ \n The label's name is this field's value. The label's value is
+ the namespace of the `ServiceMonitor`, `PodMonitor`, `Probe` or
+ `PrometheusRule` object."
+ type: string
+ enforcedSampleLimit:
+ description: "When defined, enforcedSampleLimit specifies a global
+ limit on the number of scraped samples that will be accepted. This
+ overrides any `spec.sampleLimit` set by ServiceMonitor, PodMonitor,
+ Probe objects unless `spec.sampleLimit` is greater than zero and
+ less than than `spec.enforcedSampleLimit`. \n It is meant to be
+ used by admins to keep the overall number of samples/series under
+ a desired limit."
+ format: int64
+ type: integer
+ enforcedTargetLimit:
+ description: "When defined, enforcedTargetLimit specifies a global
+ limit on the number of scraped targets. The value overrides any
+ `spec.targetLimit` set by ServiceMonitor, PodMonitor, Probe objects
+ unless `spec.targetLimit` is greater than zero and less than `spec.enforcedTargetLimit`.
+ \n It is meant to be used by admins to to keep the overall number
+ of targets under a desired limit."
+ format: int64
+ type: integer
+ excludedFromEnforcement:
+ description: "List of references to PodMonitor, ServiceMonitor, Probe
+ and PrometheusRule objects to be excluded from enforcing a namespace
+ label of origin. \n It is only applicable if `spec.enforcedNamespaceLabel`
+ set to true."
+ items:
+ description: ObjectReference references a PodMonitor, ServiceMonitor,
+ Probe or PrometheusRule object.
+ properties:
+ group:
+ default: monitoring.coreos.com
+ description: Group of the referent. When not specified, it defaults
+ to `monitoring.coreos.com`
+ enum:
+ - monitoring.coreos.com
+ type: string
+ name:
+ description: Name of the referent. When not set, all resources
+ in the namespace are matched.
+ type: string
+ namespace:
+ description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
+ minLength: 1
+ type: string
+ resource:
+ description: Resource of the referent.
+ enum:
+ - prometheusrules
+ - servicemonitors
+ - podmonitors
+ - probes
+ - scrapeconfigs
+ type: string
+ required:
+ - namespace
+ - resource
+ type: object
+ type: array
+ externalLabels:
+ additionalProperties:
+ type: string
+ description: The labels to add to any time series or alerts when communicating
+ with external systems (federation, remote storage, Alertmanager).
+ Labels defined by `spec.replicaExternalLabelName` and `spec.prometheusExternalLabelName`
+ take precedence over this list.
+ type: object
+ externalUrl:
+ description: The external URL under which the Prometheus service is
+ externally available. This is necessary to generate correct URLs
+ (for instance if Prometheus is accessible behind an Ingress resource).
+ type: string
+ hostAliases:
+ description: Optional list of hosts and IPs that will be injected
+ into the Pod's hosts file if specified.
+ items:
+ description: HostAlias holds the mapping between IP and hostnames
+ that will be injected as an entry in the pod's hosts file.
+ properties:
+ hostnames:
+ description: Hostnames for the above IP address.
+ items:
+ type: string
+ type: array
+ ip:
+ description: IP address of the host file entry.
+ type: string
+ required:
+ - hostnames
+ - ip
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - ip
+ x-kubernetes-list-type: map
+ hostNetwork:
+ description: "Use the host's network namespace if true. \n Make sure
+ to understand the security implications if you want to enable it
+ (https://kubernetes.io/docs/concepts/configuration/overview/). \n
+ When hostNetwork is enabled, this will set the DNS policy to `ClusterFirstWithHostNet`
+ automatically."
+ type: boolean
+ ignoreNamespaceSelectors:
+ description: When true, `spec.namespaceSelector` from all PodMonitor,
+ ServiceMonitor and Probe objects will be ignored. They will only
+ discover targets within the namespace of the PodMonitor, ServiceMonitor
+ and Probe objec.
+ type: boolean
+ image:
+ description: "Container image name for Prometheus. If specified, it
+ takes precedence over the `spec.baseImage`, `spec.tag` and `spec.sha`
+ fields. \n Specifying `spec.version` is still necessary to ensure
+ the Prometheus Operator knows which version of Prometheus is being
+ configured. \n If neither `spec.image` nor `spec.baseImage` are
+ defined, the operator will use the latest upstream version of Prometheus
+ available at the time when the operator was released."
+ type: string
+ imagePullPolicy:
+ description: Image pull policy for the 'prometheus', 'init-config-reloader'
+ and 'config-reloader' containers. See https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy
+ for more details.
+ enum:
+ - ""
+ - Always
+ - Never
+ - IfNotPresent
+ type: string
+ imagePullSecrets:
+ description: An optional list of references to Secrets in the same
+ namespace to use for pulling images from registries. See http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod
+ items:
+ description: LocalObjectReference contains enough information to
+ let you locate the referenced object inside the same namespace.
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
+ initContainers:
+ description: "InitContainers allows injecting initContainers to the
+ Pod definition. Those can be used to e.g. fetch secrets for injection
+ into the Prometheus configuration from external sources. Any errors
+ during the execution of an initContainer will lead to a restart
+ of the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
+ InitContainers described here modify an operator generated init
+ containers if they share the same name and modifications are done
+ via a strategic merge patch. \n The names of init container name
+ managed by the operator are: * `init-config-reloader`. \n Overriding
+ init containers is entirely outside the scope of what the maintainers
+ will support and by doing so, you accept that this behaviour may
+ break at any time without notice."
+ items:
+ description: A single application container that you want to run
+ within a pod.
+ properties:
+ args:
+ description: 'Arguments to the entrypoint. The container image''s
+ CMD is used if this is not provided. Variable references $(VAR_NAME)
+ are expanded using the container''s environment. If a variable
+ cannot be resolved, the reference in the input string will
+ be unchanged. Double $$ are reduced to a single $, which allows
+ for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will
+ produce the string literal "$(VAR_NAME)". Escaped references
+ will never be expanded, regardless of whether the variable
+ exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'
+ items:
+ type: string
+ type: array
+ command:
+ description: 'Entrypoint array. Not executed within a shell.
+ The container image''s ENTRYPOINT is used if this is not provided.
+ Variable references $(VAR_NAME) are expanded using the container''s
+ environment. If a variable cannot be resolved, the reference
+ in the input string will be unchanged. Double $$ are reduced
+ to a single $, which allows for escaping the $(VAR_NAME) syntax:
+ i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)".
+ Escaped references will never be expanded, regardless of whether
+ the variable exists or not. Cannot be updated. More info:
+ https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'
+ items:
+ type: string
+ type: array
+ env:
+ description: List of environment variables to set in the container.
+ Cannot be updated.
+ items:
+ description: EnvVar represents an environment variable present
+ in a Container.
+ properties:
+ name:
+ description: Name of the environment variable. Must be
+ a C_IDENTIFIER.
+ type: string
+ value:
+ description: 'Variable references $(VAR_NAME) are expanded
+ using the previously defined environment variables in
+ the container and any service environment variables.
+ If a variable cannot be resolved, the reference in the
+ input string will be unchanged. Double $$ are reduced
+ to a single $, which allows for escaping the $(VAR_NAME)
+ syntax: i.e. "$$(VAR_NAME)" will produce the string
+ literal "$(VAR_NAME)". Escaped references will never
+ be expanded, regardless of whether the variable exists
+ or not. Defaults to "".'
+ type: string
+ valueFrom:
+ description: Source for the environment variable's value.
+ Cannot be used if value is not empty.
+ properties:
+ configMapKeyRef:
+ description: Selects a key of a ConfigMap.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ fieldRef:
+ description: 'Selects a field of the pod: supports
+ metadata.name, metadata.namespace, `metadata.labels['''']`,
+ `metadata.annotations['''']`, spec.nodeName,
+ spec.serviceAccountName, status.hostIP, status.podIP,
+ status.podIPs.'
+ properties:
+ apiVersion:
+ description: Version of the schema the FieldPath
+ is written in terms of, defaults to "v1".
+ type: string
+ fieldPath:
+ description: Path of the field to select in the
+ specified API version.
+ type: string
+ required:
+ - fieldPath
+ type: object
+ x-kubernetes-map-type: atomic
+ resourceFieldRef:
+ description: 'Selects a resource of the container:
+ only resources limits and requests (limits.cpu,
+ limits.memory, limits.ephemeral-storage, requests.cpu,
+ requests.memory and requests.ephemeral-storage)
+ are currently supported.'
+ properties:
+ containerName:
+ description: 'Container name: required for volumes,
+ optional for env vars'
+ type: string
+ divisor:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Specifies the output format of the
+ exposed resources, defaults to "1"
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ resource:
+ description: 'Required: resource to select'
+ type: string
+ required:
+ - resource
+ type: object
+ x-kubernetes-map-type: atomic
+ secretKeyRef:
+ description: Selects a key of a secret in the pod's
+ namespace
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ required:
+ - name
+ type: object
+ type: array
+ envFrom:
+ description: List of sources to populate environment variables
+ in the container. The keys defined within a source must be
+ a C_IDENTIFIER. All invalid keys will be reported as an event
+ when the container is starting. When a key exists in multiple
+ sources, the value associated with the last source will take
+ precedence. Values defined by an Env with a duplicate key
+ will take precedence. Cannot be updated.
+ items:
+ description: EnvFromSource represents the source of a set
+ of ConfigMaps
+ properties:
+ configMapRef:
+ description: The ConfigMap to select from
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap must be
+ defined
+ type: boolean
+ type: object
+ x-kubernetes-map-type: atomic
+ prefix:
+ description: An optional identifier to prepend to each
+ key in the ConfigMap. Must be a C_IDENTIFIER.
+ type: string
+ secretRef:
+ description: The Secret to select from
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret must be defined
+ type: boolean
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ image:
+ description: 'Container image name. More info: https://kubernetes.io/docs/concepts/containers/images
+ This field is optional to allow higher level config management
+ to default or override container images in workload controllers
+ like Deployments and StatefulSets.'
+ type: string
+ imagePullPolicy:
+ description: 'Image pull policy. One of Always, Never, IfNotPresent.
+ Defaults to Always if :latest tag is specified, or IfNotPresent
+ otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images'
+ type: string
+ lifecycle:
+ description: Actions that the management system should take
+ in response to container lifecycle events. Cannot be updated.
+ properties:
+ postStart:
+ description: 'PostStart is called immediately after a container
+ is created. If the handler fails, the container is terminated
+ and restarted according to its restart policy. Other management
+ of the container blocks until the hook completes. More
+ info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for
+ the command is root ('/') in the container's
+ filesystem. The command is simply exec'd, it is
+ not run inside a shell, so traditional shell instructions
+ ('|', etc) won't work. To use a shell, you need
+ to explicitly call out to that shell. Exit status
+ of 0 is treated as live/healthy and non-zero is
+ unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to
+ the pod IP. You probably want to set "Host" in
+ httpHeaders instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request.
+ HTTP allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access
+ on the container. Number must be in the range
+ 1 to 65535. Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the
+ host. Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ tcpSocket:
+ description: Deprecated. TCPSocket is NOT supported
+ as a LifecycleHandler and kept for the backward compatibility.
+ There are no validation of this field and lifecycle
+ hooks will fail in runtime when tcp handler is specified.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to,
+ defaults to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access
+ on the container. Number must be in the range
+ 1 to 65535. Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ type: object
+ preStop:
+ description: 'PreStop is called immediately before a container
+ is terminated due to an API request or management event
+ such as liveness/startup probe failure, preemption, resource
+ contention, etc. The handler is not called if the container
+ crashes or exits. The Pod''s termination grace period
+ countdown begins before the PreStop hook is executed.
+ Regardless of the outcome of the handler, the container
+ will eventually terminate within the Pod''s termination
+ grace period (unless delayed by finalizers). Other management
+ of the container blocks until the hook completes or until
+ the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for
+ the command is root ('/') in the container's
+ filesystem. The command is simply exec'd, it is
+ not run inside a shell, so traditional shell instructions
+ ('|', etc) won't work. To use a shell, you need
+ to explicitly call out to that shell. Exit status
+ of 0 is treated as live/healthy and non-zero is
+ unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to
+ the pod IP. You probably want to set "Host" in
+ httpHeaders instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request.
+ HTTP allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access
+ on the container. Number must be in the range
+ 1 to 65535. Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the
+ host. Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ tcpSocket:
+ description: Deprecated. TCPSocket is NOT supported
+ as a LifecycleHandler and kept for the backward compatibility.
+ There are no validation of this field and lifecycle
+ hooks will fail in runtime when tcp handler is specified.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to,
+ defaults to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access
+ on the container. Number must be in the range
+ 1 to 65535. Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ type: object
+ type: object
+ livenessProbe:
+ description: 'Periodic probe of container liveness. Container
+ will be restarted if the probe fails. Cannot be updated. More
+ info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for the
+ command is root ('/') in the container's filesystem.
+ The command is simply exec'd, it is not run inside
+ a shell, so traditional shell instructions ('|', etc)
+ won't work. To use a shell, you need to explicitly
+ call out to that shell. Exit status of 0 is treated
+ as live/healthy and non-zero is unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ failureThreshold:
+ description: Minimum consecutive failures for the probe
+ to be considered failed after having succeeded. Defaults
+ to 3. Minimum value is 1.
+ format: int32
+ type: integer
+ grpc:
+ description: GRPC specifies an action involving a GRPC port.
+ properties:
+ port:
+ description: Port number of the gRPC service. Number
+ must be in the range 1 to 65535.
+ format: int32
+ type: integer
+ service:
+ description: "Service is the name of the service to
+ place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
+ \n If this is not specified, the default behavior
+ is defined by gRPC."
+ type: string
+ required:
+ - port
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to the
+ pod IP. You probably want to set "Host" in httpHeaders
+ instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request. HTTP
+ allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the host.
+ Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ initialDelaySeconds:
+ description: 'Number of seconds after the container has
+ started before liveness probes are initiated. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ periodSeconds:
+ description: How often (in seconds) to perform the probe.
+ Default to 10 seconds. Minimum value is 1.
+ format: int32
+ type: integer
+ successThreshold:
+ description: Minimum consecutive successes for the probe
+ to be considered successful after having failed. Defaults
+ to 1. Must be 1 for liveness and startup. Minimum value
+ is 1.
+ format: int32
+ type: integer
+ tcpSocket:
+ description: TCPSocket specifies an action involving a TCP
+ port.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to, defaults
+ to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ terminationGracePeriodSeconds:
+ description: Optional duration in seconds the pod needs
+ to terminate gracefully upon probe failure. The grace
+ period is the duration in seconds after the processes
+ running in the pod are sent a termination signal and the
+ time when the processes are forcibly halted with a kill
+ signal. Set this value longer than the expected cleanup
+ time for your process. If this value is nil, the pod's
+ terminationGracePeriodSeconds will be used. Otherwise,
+ this value overrides the value provided by the pod spec.
+ Value must be non-negative integer. The value zero indicates
+ stop immediately via the kill signal (no opportunity to
+ shut down). This is a beta field and requires enabling
+ ProbeTerminationGracePeriod feature gate. Minimum value
+ is 1. spec.terminationGracePeriodSeconds is used if unset.
+ format: int64
+ type: integer
+ timeoutSeconds:
+ description: 'Number of seconds after which the probe times
+ out. Defaults to 1 second. Minimum value is 1. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ type: object
+ name:
+ description: Name of the container specified as a DNS_LABEL.
+ Each container in a pod must have a unique name (DNS_LABEL).
+ Cannot be updated.
+ type: string
+ ports:
+ description: List of ports to expose from the container. Not
+ specifying a port here DOES NOT prevent that port from being
+ exposed. Any port which is listening on the default "0.0.0.0"
+ address inside a container will be accessible from the network.
+ Modifying this array with strategic merge patch may corrupt
+ the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255.
+ Cannot be updated.
+ items:
+ description: ContainerPort represents a network port in a
+ single container.
+ properties:
+ containerPort:
+ description: Number of port to expose on the pod's IP
+ address. This must be a valid port number, 0 < x < 65536.
+ format: int32
+ type: integer
+ hostIP:
+ description: What host IP to bind the external port to.
+ type: string
+ hostPort:
+ description: Number of port to expose on the host. If
+ specified, this must be a valid port number, 0 < x <
+ 65536. If HostNetwork is specified, this must match
+ ContainerPort. Most containers do not need this.
+ format: int32
+ type: integer
+ name:
+ description: If specified, this must be an IANA_SVC_NAME
+ and unique within the pod. Each named port in a pod
+ must have a unique name. Name for the port that can
+ be referred to by services.
+ type: string
+ protocol:
+ default: TCP
+ description: Protocol for port. Must be UDP, TCP, or SCTP.
+ Defaults to "TCP".
+ type: string
+ required:
+ - containerPort
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - containerPort
+ - protocol
+ x-kubernetes-list-type: map
+ readinessProbe:
+ description: 'Periodic probe of container service readiness.
+ Container will be removed from service endpoints if the probe
+ fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for the
+ command is root ('/') in the container's filesystem.
+ The command is simply exec'd, it is not run inside
+ a shell, so traditional shell instructions ('|', etc)
+ won't work. To use a shell, you need to explicitly
+ call out to that shell. Exit status of 0 is treated
+ as live/healthy and non-zero is unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ failureThreshold:
+ description: Minimum consecutive failures for the probe
+ to be considered failed after having succeeded. Defaults
+ to 3. Minimum value is 1.
+ format: int32
+ type: integer
+ grpc:
+ description: GRPC specifies an action involving a GRPC port.
+ properties:
+ port:
+ description: Port number of the gRPC service. Number
+ must be in the range 1 to 65535.
+ format: int32
+ type: integer
+ service:
+ description: "Service is the name of the service to
+ place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
+ \n If this is not specified, the default behavior
+ is defined by gRPC."
+ type: string
+ required:
+ - port
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to the
+ pod IP. You probably want to set "Host" in httpHeaders
+ instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request. HTTP
+ allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the host.
+ Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ initialDelaySeconds:
+ description: 'Number of seconds after the container has
+ started before liveness probes are initiated. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ periodSeconds:
+ description: How often (in seconds) to perform the probe.
+ Default to 10 seconds. Minimum value is 1.
+ format: int32
+ type: integer
+ successThreshold:
+ description: Minimum consecutive successes for the probe
+ to be considered successful after having failed. Defaults
+ to 1. Must be 1 for liveness and startup. Minimum value
+ is 1.
+ format: int32
+ type: integer
+ tcpSocket:
+ description: TCPSocket specifies an action involving a TCP
+ port.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to, defaults
+ to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ terminationGracePeriodSeconds:
+ description: Optional duration in seconds the pod needs
+ to terminate gracefully upon probe failure. The grace
+ period is the duration in seconds after the processes
+ running in the pod are sent a termination signal and the
+ time when the processes are forcibly halted with a kill
+ signal. Set this value longer than the expected cleanup
+ time for your process. If this value is nil, the pod's
+ terminationGracePeriodSeconds will be used. Otherwise,
+ this value overrides the value provided by the pod spec.
+ Value must be non-negative integer. The value zero indicates
+ stop immediately via the kill signal (no opportunity to
+ shut down). This is a beta field and requires enabling
+ ProbeTerminationGracePeriod feature gate. Minimum value
+ is 1. spec.terminationGracePeriodSeconds is used if unset.
+ format: int64
+ type: integer
+ timeoutSeconds:
+ description: 'Number of seconds after which the probe times
+ out. Defaults to 1 second. Minimum value is 1. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ type: object
+ resizePolicy:
+ description: Resources resize policy for the container.
+ items:
+ description: ContainerResizePolicy represents resource resize
+ policy for the container.
+ properties:
+ resourceName:
+ description: 'Name of the resource to which this resource
+ resize policy applies. Supported values: cpu, memory.'
+ type: string
+ restartPolicy:
+ description: Restart policy to apply when specified resource
+ is resized. If not specified, it defaults to NotRequired.
+ type: string
+ required:
+ - resourceName
+ - restartPolicy
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ resources:
+ description: 'Compute Resources required by this container.
+ Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ properties:
+ claims:
+ description: "Claims lists the names of resources, defined
+ in spec.resourceClaims, that are used by this container.
+ \n This is an alpha field and requires enabling the DynamicResourceAllocation
+ feature gate. \n This field is immutable. It can only
+ be set for containers."
+ items:
+ description: ResourceClaim references one entry in PodSpec.ResourceClaims.
+ properties:
+ name:
+ description: Name must match the name of one entry
+ in pod.spec.resourceClaims of the Pod where this
+ field is used. It makes that resource available
+ inside a container.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - name
+ x-kubernetes-list-type: map
+ limits:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Limits describes the maximum amount of compute
+ resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ requests:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Requests describes the minimum amount of compute
+ resources required. If Requests is omitted for a container,
+ it defaults to Limits if that is explicitly specified,
+ otherwise to an implementation-defined value. Requests
+ cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ type: object
+ restartPolicy:
+ description: 'RestartPolicy defines the restart behavior of
+ individual containers in a pod. This field may only be set
+ for init containers, and the only allowed value is "Always".
+ For non-init containers or when this field is not specified,
+ the restart behavior is defined by the Pod''s restart policy
+ and the container type. Setting the RestartPolicy as "Always"
+ for the init container will have the following effect: this
+ init container will be continually restarted on exit until
+ all regular containers have terminated. Once all regular containers
+ have completed, all init containers with restartPolicy "Always"
+ will be shut down. This lifecycle differs from normal init
+ containers and is often referred to as a "sidecar" container.
+ Although this init container still starts in the init container
+ sequence, it does not wait for the container to complete before
+ proceeding to the next init container. Instead, the next init
+ container starts immediately after this init container is
+ started, or after any startupProbe has successfully completed.'
+ type: string
+ securityContext:
+ description: 'SecurityContext defines the security options the
+ container should be run with. If set, the fields of SecurityContext
+ override the equivalent fields of PodSecurityContext. More
+ info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/'
+ properties:
+ allowPrivilegeEscalation:
+ description: 'AllowPrivilegeEscalation controls whether
+ a process can gain more privileges than its parent process.
+ This bool directly controls if the no_new_privs flag will
+ be set on the container process. AllowPrivilegeEscalation
+ is true always when the container is: 1) run as Privileged
+ 2) has CAP_SYS_ADMIN Note that this field cannot be set
+ when spec.os.name is windows.'
+ type: boolean
+ capabilities:
+ description: The capabilities to add/drop when running containers.
+ Defaults to the default set of capabilities granted by
+ the container runtime. Note that this field cannot be
+ set when spec.os.name is windows.
+ properties:
+ add:
+ description: Added capabilities
+ items:
+ description: Capability represent POSIX capabilities
+ type
+ type: string
+ type: array
+ drop:
+ description: Removed capabilities
+ items:
+ description: Capability represent POSIX capabilities
+ type
+ type: string
+ type: array
+ type: object
+ privileged:
+ description: Run container in privileged mode. Processes
+ in privileged containers are essentially equivalent to
+ root on the host. Defaults to false. Note that this field
+ cannot be set when spec.os.name is windows.
+ type: boolean
+ procMount:
+ description: procMount denotes the type of proc mount to
+ use for the containers. The default is DefaultProcMount
+ which uses the container runtime defaults for readonly
+ paths and masked paths. This requires the ProcMountType
+ feature flag to be enabled. Note that this field cannot
+ be set when spec.os.name is windows.
+ type: string
+ readOnlyRootFilesystem:
+ description: Whether this container has a read-only root
+ filesystem. Default is false. Note that this field cannot
+ be set when spec.os.name is windows.
+ type: boolean
+ runAsGroup:
+ description: The GID to run the entrypoint of the container
+ process. Uses runtime default if unset. May also be set
+ in PodSecurityContext. If set in both SecurityContext
+ and PodSecurityContext, the value specified in SecurityContext
+ takes precedence. Note that this field cannot be set when
+ spec.os.name is windows.
+ format: int64
+ type: integer
+ runAsNonRoot:
+ description: Indicates that the container must run as a
+ non-root user. If true, the Kubelet will validate the
+ image at runtime to ensure that it does not run as UID
+ 0 (root) and fail to start the container if it does. If
+ unset or false, no such validation will be performed.
+ May also be set in PodSecurityContext. If set in both
+ SecurityContext and PodSecurityContext, the value specified
+ in SecurityContext takes precedence.
+ type: boolean
+ runAsUser:
+ description: The UID to run the entrypoint of the container
+ process. Defaults to user specified in image metadata
+ if unspecified. May also be set in PodSecurityContext. If
+ set in both SecurityContext and PodSecurityContext, the
+ value specified in SecurityContext takes precedence. Note
+ that this field cannot be set when spec.os.name is windows.
+ format: int64
+ type: integer
+ seLinuxOptions:
+ description: The SELinux context to be applied to the container.
+ If unspecified, the container runtime will allocate a
+ random SELinux context for each container. May also be
+ set in PodSecurityContext. If set in both SecurityContext
+ and PodSecurityContext, the value specified in SecurityContext
+ takes precedence. Note that this field cannot be set when
+ spec.os.name is windows.
+ properties:
+ level:
+ description: Level is SELinux level label that applies
+ to the container.
+ type: string
+ role:
+ description: Role is a SELinux role label that applies
+ to the container.
+ type: string
+ type:
+ description: Type is a SELinux type label that applies
+ to the container.
+ type: string
+ user:
+ description: User is a SELinux user label that applies
+ to the container.
+ type: string
+ type: object
+ seccompProfile:
+ description: The seccomp options to use by this container.
+ If seccomp options are provided at both the pod & container
+ level, the container options override the pod options.
+ Note that this field cannot be set when spec.os.name is
+ windows.
+ properties:
+ localhostProfile:
+ description: localhostProfile indicates a profile defined
+ in a file on the node should be used. The profile
+ must be preconfigured on the node to work. Must be
+ a descending path, relative to the kubelet's configured
+ seccomp profile location. Must be set if type is "Localhost".
+ Must NOT be set for any other type.
+ type: string
+ type:
+ description: "type indicates which kind of seccomp profile
+ will be applied. Valid options are: \n Localhost -
+ a profile defined in a file on the node should be
+ used. RuntimeDefault - the container runtime default
+ profile should be used. Unconfined - no profile should
+ be applied."
+ type: string
+ required:
+ - type
+ type: object
+ windowsOptions:
+ description: The Windows specific settings applied to all
+ containers. If unspecified, the options from the PodSecurityContext
+ will be used. If set in both SecurityContext and PodSecurityContext,
+ the value specified in SecurityContext takes precedence.
+ Note that this field cannot be set when spec.os.name is
+ linux.
+ properties:
+ gmsaCredentialSpec:
+ description: GMSACredentialSpec is where the GMSA admission
+ webhook (https://github.com/kubernetes-sigs/windows-gmsa)
+ inlines the contents of the GMSA credential spec named
+ by the GMSACredentialSpecName field.
+ type: string
+ gmsaCredentialSpecName:
+ description: GMSACredentialSpecName is the name of the
+ GMSA credential spec to use.
+ type: string
+ hostProcess:
+ description: HostProcess determines if a container should
+ be run as a 'Host Process' container. All of a Pod's
+ containers must have the same effective HostProcess
+ value (it is not allowed to have a mix of HostProcess
+ containers and non-HostProcess containers). In addition,
+ if HostProcess is true then HostNetwork must also
+ be set to true.
+ type: boolean
+ runAsUserName:
+ description: The UserName in Windows to run the entrypoint
+ of the container process. Defaults to the user specified
+ in image metadata if unspecified. May also be set
+ in PodSecurityContext. If set in both SecurityContext
+ and PodSecurityContext, the value specified in SecurityContext
+ takes precedence.
+ type: string
+ type: object
+ type: object
+ startupProbe:
+ description: 'StartupProbe indicates that the Pod has successfully
+ initialized. If specified, no other probes are executed until
+ this completes successfully. If this probe fails, the Pod
+ will be restarted, just as if the livenessProbe failed. This
+ can be used to provide different probe parameters at the beginning
+ of a Pod''s lifecycle, when it might take a long time to load
+ data or warm a cache, than during steady-state operation.
+ This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for the
+ command is root ('/') in the container's filesystem.
+ The command is simply exec'd, it is not run inside
+ a shell, so traditional shell instructions ('|', etc)
+ won't work. To use a shell, you need to explicitly
+ call out to that shell. Exit status of 0 is treated
+ as live/healthy and non-zero is unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ failureThreshold:
+ description: Minimum consecutive failures for the probe
+ to be considered failed after having succeeded. Defaults
+ to 3. Minimum value is 1.
+ format: int32
+ type: integer
+ grpc:
+ description: GRPC specifies an action involving a GRPC port.
+ properties:
+ port:
+ description: Port number of the gRPC service. Number
+ must be in the range 1 to 65535.
+ format: int32
+ type: integer
+ service:
+ description: "Service is the name of the service to
+ place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
+ \n If this is not specified, the default behavior
+ is defined by gRPC."
+ type: string
+ required:
+ - port
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to the
+ pod IP. You probably want to set "Host" in httpHeaders
+ instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request. HTTP
+ allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the host.
+ Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ initialDelaySeconds:
+ description: 'Number of seconds after the container has
+ started before liveness probes are initiated. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ periodSeconds:
+ description: How often (in seconds) to perform the probe.
+ Default to 10 seconds. Minimum value is 1.
+ format: int32
+ type: integer
+ successThreshold:
+ description: Minimum consecutive successes for the probe
+ to be considered successful after having failed. Defaults
+ to 1. Must be 1 for liveness and startup. Minimum value
+ is 1.
+ format: int32
+ type: integer
+ tcpSocket:
+ description: TCPSocket specifies an action involving a TCP
+ port.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to, defaults
+ to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ terminationGracePeriodSeconds:
+ description: Optional duration in seconds the pod needs
+ to terminate gracefully upon probe failure. The grace
+ period is the duration in seconds after the processes
+ running in the pod are sent a termination signal and the
+ time when the processes are forcibly halted with a kill
+ signal. Set this value longer than the expected cleanup
+ time for your process. If this value is nil, the pod's
+ terminationGracePeriodSeconds will be used. Otherwise,
+ this value overrides the value provided by the pod spec.
+ Value must be non-negative integer. The value zero indicates
+ stop immediately via the kill signal (no opportunity to
+ shut down). This is a beta field and requires enabling
+ ProbeTerminationGracePeriod feature gate. Minimum value
+ is 1. spec.terminationGracePeriodSeconds is used if unset.
+ format: int64
+ type: integer
+ timeoutSeconds:
+ description: 'Number of seconds after which the probe times
+ out. Defaults to 1 second. Minimum value is 1. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ type: object
+ stdin:
+ description: Whether this container should allocate a buffer
+ for stdin in the container runtime. If this is not set, reads
+ from stdin in the container will always result in EOF. Default
+ is false.
+ type: boolean
+ stdinOnce:
+ description: Whether the container runtime should close the
+ stdin channel after it has been opened by a single attach.
+ When stdin is true the stdin stream will remain open across
+ multiple attach sessions. If stdinOnce is set to true, stdin
+ is opened on container start, is empty until the first client
+ attaches to stdin, and then remains open and accepts data
+ until the client disconnects, at which time stdin is closed
+ and remains closed until the container is restarted. If this
+ flag is false, a container processes that reads from stdin
+ will never receive an EOF. Default is false
+ type: boolean
+ terminationMessagePath:
+ description: 'Optional: Path at which the file to which the
+ container''s termination message will be written is mounted
+ into the container''s filesystem. Message written is intended
+ to be brief final status, such as an assertion failure message.
+ Will be truncated by the node if greater than 4096 bytes.
+ The total message length across all containers will be limited
+ to 12kb. Defaults to /dev/termination-log. Cannot be updated.'
+ type: string
+ terminationMessagePolicy:
+ description: Indicate how the termination message should be
+ populated. File will use the contents of terminationMessagePath
+ to populate the container status message on both success and
+ failure. FallbackToLogsOnError will use the last chunk of
+ container log output if the termination message file is empty
+ and the container exited with an error. The log output is
+ limited to 2048 bytes or 80 lines, whichever is smaller. Defaults
+ to File. Cannot be updated.
+ type: string
+ tty:
+ description: Whether this container should allocate a TTY for
+ itself, also requires 'stdin' to be true. Default is false.
+ type: boolean
+ volumeDevices:
+ description: volumeDevices is the list of block devices to be
+ used by the container.
+ items:
+ description: volumeDevice describes a mapping of a raw block
+ device within a container.
+ properties:
+ devicePath:
+ description: devicePath is the path inside of the container
+ that the device will be mapped to.
+ type: string
+ name:
+ description: name must match the name of a persistentVolumeClaim
+ in the pod
+ type: string
+ required:
+ - devicePath
+ - name
+ type: object
+ type: array
+ volumeMounts:
+ description: Pod volumes to mount into the container's filesystem.
+ Cannot be updated.
+ items:
+ description: VolumeMount describes a mounting of a Volume
+ within a container.
+ properties:
+ mountPath:
+ description: Path within the container at which the volume
+ should be mounted. Must not contain ':'.
+ type: string
+ mountPropagation:
+ description: mountPropagation determines how mounts are
+ propagated from the host to container and the other
+ way around. When not set, MountPropagationNone is used.
+ This field is beta in 1.10.
+ type: string
+ name:
+ description: This must match the Name of a Volume.
+ type: string
+ readOnly:
+ description: Mounted read-only if true, read-write otherwise
+ (false or unspecified). Defaults to false.
+ type: boolean
+ subPath:
+ description: Path within the volume from which the container's
+ volume should be mounted. Defaults to "" (volume's root).
+ type: string
+ subPathExpr:
+ description: Expanded path within the volume from which
+ the container's volume should be mounted. Behaves similarly
+ to SubPath but environment variable references $(VAR_NAME)
+ are expanded using the container's environment. Defaults
+ to "" (volume's root). SubPathExpr and SubPath are mutually
+ exclusive.
+ type: string
+ required:
+ - mountPath
+ - name
+ type: object
+ type: array
+ workingDir:
+ description: Container's working directory. If not specified,
+ the container runtime's default will be used, which might
+ be configured in the container image. Cannot be updated.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ keepDroppedTargets:
+ description: "Per-scrape limit on the number of targets dropped by
+ relabeling that will be kept in memory. 0 means no limit. \n It
+ requires Prometheus >= v2.47.0."
+ format: int64
+ type: integer
+ labelLimit:
+ description: Per-scrape limit on number of labels that will be accepted
+ for a sample. Only valid in Prometheus versions 2.45.0 and newer.
+ format: int64
+ type: integer
+ labelNameLengthLimit:
+ description: Per-scrape limit on length of labels name that will be
+ accepted for a sample. Only valid in Prometheus versions 2.45.0
+ and newer.
+ format: int64
+ type: integer
+ labelValueLengthLimit:
+ description: Per-scrape limit on length of labels value that will
+ be accepted for a sample. Only valid in Prometheus versions 2.45.0
+ and newer.
+ format: int64
+ type: integer
+ listenLocal:
+ description: When true, the Prometheus server listens on the loopback
+ address instead of the Pod IP's address.
+ type: boolean
+ logFormat:
+ description: Log format for Log level for Prometheus and the config-reloader
+ sidecar.
+ enum:
+ - ""
+ - logfmt
+ - json
+ type: string
+ logLevel:
+ description: Log level for Prometheus and the config-reloader sidecar.
+ enum:
+ - ""
+ - debug
+ - info
+ - warn
+ - error
+ type: string
+ minReadySeconds:
+ description: "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) \n This is an alpha field from
+ kubernetes 1.22 until 1.24 which requires enabling the StatefulSetMinReadySeconds
+ feature gate."
+ format: int32
+ type: integer
+ nodeSelector:
+ additionalProperties:
+ type: string
+ description: Defines on which Nodes the Pods are scheduled.
+ type: object
+ overrideHonorLabels:
+ description: When true, Prometheus resolves label conflicts by renaming
+ the labels in the scraped data to "exported_" for all
+ targets created from service and pod monitors. Otherwise the HonorLabels
+ field of the service or pod monitor applies.
+ type: boolean
+ overrideHonorTimestamps:
+ description: When true, Prometheus ignores the timestamps for all
+ the targets created from service and pod monitors. Otherwise the
+ HonorTimestamps field of the service or pod monitor applies.
+ type: boolean
+ paused:
+ description: When a Prometheus deployment is paused, no actions except
+ for deletion will be performed on the underlying objects.
+ type: boolean
+ podMetadata:
+ description: PodMetadata configures labels and annotations which are
+ propagated to the Prometheus pods.
+ properties:
+ annotations:
+ additionalProperties:
+ type: string
+ description: 'Annotations is an unstructured key value map stored
+ with a resource that may be set by external tools to store and
+ retrieve arbitrary metadata. They are not queryable and should
+ be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations'
+ type: object
+ labels:
+ additionalProperties:
+ type: string
+ description: 'Map of string keys and values that can be used to
+ organize and categorize (scope and select) objects. May match
+ selectors of replication controllers and services. More info:
+ http://kubernetes.io/docs/user-guide/labels'
+ type: object
+ name:
+ description: 'Name must be unique within a namespace. Is required
+ when creating resources, although some resources may allow a
+ client to request the generation of an appropriate name automatically.
+ Name is primarily intended for creation idempotence and configuration
+ definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names'
+ type: string
+ type: object
+ podMonitorNamespaceSelector:
+ description: Namespaces to match for PodMonitors discovery. An empty
+ label selector matches all namespaces. A null label selector matches
+ the current namespace only.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements.
+ The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector that
+ contains values, a key, and an operator that relates the key
+ and values.
+ properties:
+ key:
+ description: key is the label key that the selector applies
+ to.
+ type: string
+ operator:
+ description: operator represents a key's relationship to
+ a set of values. Valid operators are In, NotIn, Exists
+ and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values. If the
+ operator is In or NotIn, the values array must be non-empty.
+ If the operator is Exists or DoesNotExist, the values
+ array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs. A single
+ {key,value} in the matchLabels map is equivalent to an element
+ of matchExpressions, whose key field is "key", the operator
+ is "In", and the values array contains only "value". The requirements
+ are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podMonitorSelector:
+ description: "*Experimental* PodMonitors to be selected for target
+ discovery. An empty label selector matches all objects. A null label
+ selector matches no objects. \n If `spec.serviceMonitorSelector`,
+ `spec.podMonitorSelector`, `spec.probeSelector` and `spec.scrapeConfigSelector`
+ are null, the Prometheus configuration is unmanaged. The Prometheus
+ operator will ensure that the Prometheus configuration's Secret
+ exists, but it is the responsibility of the user to provide the
+ raw gzipped Prometheus configuration under the `prometheus.yaml.gz`
+ key. This behavior is *deprecated* and will be removed in the next
+ major version of the custom resource definition. It is recommended
+ to use `spec.additionalScrapeConfigs` instead."
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements.
+ The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector that
+ contains values, a key, and an operator that relates the key
+ and values.
+ properties:
+ key:
+ description: key is the label key that the selector applies
+ to.
+ type: string
+ operator:
+ description: operator represents a key's relationship to
+ a set of values. Valid operators are In, NotIn, Exists
+ and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values. If the
+ operator is In or NotIn, the values array must be non-empty.
+ If the operator is Exists or DoesNotExist, the values
+ array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs. A single
+ {key,value} in the matchLabels map is equivalent to an element
+ of matchExpressions, whose key field is "key", the operator
+ is "In", and the values array contains only "value". The requirements
+ are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podTargetLabels:
+ description: PodTargetLabels are appended to the `spec.podTargetLabels`
+ field of all PodMonitor and ServiceMonitor objects.
+ items:
+ type: string
+ type: array
+ portName:
+ default: web
+ description: 'Port name used for the pods and governing service. Default:
+ "web"'
+ type: string
+ priorityClassName:
+ description: Priority class assigned to the Pods.
+ type: string
+ probeNamespaceSelector:
+ description: '*Experimental* Namespaces to match for Probe discovery.
+ An empty label selector matches all namespaces. A null label selector
+ matches the current namespace only.'
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements.
+ The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector that
+ contains values, a key, and an operator that relates the key
+ and values.
+ properties:
+ key:
+ description: key is the label key that the selector applies
+ to.
+ type: string
+ operator:
+ description: operator represents a key's relationship to
+ a set of values. Valid operators are In, NotIn, Exists
+ and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values. If the
+ operator is In or NotIn, the values array must be non-empty.
+ If the operator is Exists or DoesNotExist, the values
+ array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs. A single
+ {key,value} in the matchLabels map is equivalent to an element
+ of matchExpressions, whose key field is "key", the operator
+ is "In", and the values array contains only "value". The requirements
+ are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ probeSelector:
+ description: "*Experimental* Probes to be selected for target discovery.
+ An empty label selector matches all objects. A null label selector
+ matches no objects. \n If `spec.serviceMonitorSelector`, `spec.podMonitorSelector`,
+ `spec.probeSelector` and `spec.scrapeConfigSelector` are null, the
+ Prometheus configuration is unmanaged. The Prometheus operator will
+ ensure that the Prometheus configuration's Secret exists, but it
+ is the responsibility of the user to provide the raw gzipped Prometheus
+ configuration under the `prometheus.yaml.gz` key. This behavior
+ is *deprecated* and will be removed in the next major version of
+ the custom resource definition. It is recommended to use `spec.additionalScrapeConfigs`
+ instead."
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements.
+ The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector that
+ contains values, a key, and an operator that relates the key
+ and values.
+ properties:
+ key:
+ description: key is the label key that the selector applies
+ to.
+ type: string
+ operator:
+ description: operator represents a key's relationship to
+ a set of values. Valid operators are In, NotIn, Exists
+ and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values. If the
+ operator is In or NotIn, the values array must be non-empty.
+ If the operator is Exists or DoesNotExist, the values
+ array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs. A single
+ {key,value} in the matchLabels map is equivalent to an element
+ of matchExpressions, whose key field is "key", the operator
+ is "In", and the values array contains only "value". The requirements
+ are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ prometheusExternalLabelName:
+ description: "Name of Prometheus external label used to denote the
+ Prometheus instance name. The external label will _not_ be added
+ when the field is set to the empty string (`\"\"`). \n Default:
+ \"prometheus\""
+ type: string
+ remoteWrite:
+ description: Defines the list of remote write configurations.
+ items:
+ description: RemoteWriteSpec defines the configuration to write
+ samples from Prometheus to a remote endpoint.
+ properties:
+ authorization:
+ description: "Authorization section for the URL. \n It requires
+ Prometheus >= v2.26.0. \n Cannot be set at the same time as
+ `sigv4`, `basicAuth`, or `oauth2`."
+ properties:
+ credentials:
+ description: Selects a key of a Secret in the namespace
+ that contains the credentials for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ credentialsFile:
+ description: File to read a secret from, mutually exclusive
+ with `credentials`.
+ type: string
+ type:
+ description: "Defines the authentication type. The value
+ is case-insensitive. \n \"Basic\" is not a supported value.
+ \n Default: \"Bearer\""
+ type: string
+ type: object
+ basicAuth:
+ description: "BasicAuth configuration for the URL. \n Cannot
+ be set at the same time as `sigv4`, `authorization`, or `oauth2`."
+ properties:
+ password:
+ description: The secret in the service monitor namespace
+ that contains the password for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ username:
+ description: The secret in the service monitor namespace
+ that contains the username for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ bearerToken:
+ description: "*Warning: this field shouldn't be used because
+ the token value appears in clear-text. Prefer using `authorization`.*
+ \n *Deprecated: this will be removed in a future release.*"
+ type: string
+ bearerTokenFile:
+ description: "File from which to read bearer token for the URL.
+ \n *Deprecated: this will be removed in a future release.
+ Prefer using `authorization`.*"
+ type: string
+ headers:
+ additionalProperties:
+ type: string
+ description: "Custom HTTP headers to be sent along with each
+ remote write request. Be aware that headers that are set by
+ Prometheus itself can't be overwritten. \n It requires Prometheus
+ >= v2.25.0."
+ type: object
+ metadataConfig:
+ description: MetadataConfig configures the sending of series
+ metadata to the remote storage.
+ properties:
+ send:
+ description: Defines whether metric metadata is sent to
+ the remote storage or not.
+ type: boolean
+ sendInterval:
+ description: Defines how frequently metric metadata is sent
+ to the remote storage.
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ type: object
+ name:
+ description: "The name of the remote write queue, it must be
+ unique if specified. The name is used in metrics and logging
+ in order to differentiate queues. \n It requires Prometheus
+ >= v2.15.0."
+ type: string
+ oauth2:
+ description: "OAuth2 configuration for the URL. \n It requires
+ Prometheus >= v2.27.0. \n Cannot be set at the same time as
+ `sigv4`, `authorization`, or `basicAuth`."
+ properties:
+ clientId:
+ description: The secret or configmap containing the OAuth2
+ client id
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ clientSecret:
+ description: The secret containing the OAuth2 client secret
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ endpointParams:
+ additionalProperties:
+ type: string
+ description: Parameters to append to the token URL
+ type: object
+ scopes:
+ description: OAuth2 scopes used for the token request
+ items:
+ type: string
+ type: array
+ tokenUrl:
+ description: The URL to fetch the token from
+ minLength: 1
+ type: string
+ required:
+ - clientId
+ - clientSecret
+ - tokenUrl
+ type: object
+ proxyUrl:
+ description: Optional ProxyURL.
+ type: string
+ queueConfig:
+ description: QueueConfig allows tuning of the remote write queue
+ parameters.
+ properties:
+ batchSendDeadline:
+ description: BatchSendDeadline is the maximum time a sample
+ will wait in buffer.
+ type: string
+ capacity:
+ description: Capacity is the number of samples to buffer
+ per shard before we start dropping them.
+ type: integer
+ maxBackoff:
+ description: MaxBackoff is the maximum retry delay.
+ type: string
+ maxRetries:
+ description: MaxRetries is the maximum number of times to
+ retry a batch on recoverable errors.
+ type: integer
+ maxSamplesPerSend:
+ description: MaxSamplesPerSend is the maximum number of
+ samples per send.
+ type: integer
+ maxShards:
+ description: MaxShards is the maximum number of shards,
+ i.e. amount of concurrency.
+ type: integer
+ minBackoff:
+ description: MinBackoff is the initial retry delay. Gets
+ doubled for every retry.
+ type: string
+ minShards:
+ description: MinShards is the minimum number of shards,
+ i.e. amount of concurrency.
+ type: integer
+ retryOnRateLimit:
+ description: Retry upon receiving a 429 status code from
+ the remote-write storage. This is experimental feature
+ and might change in the future.
+ type: boolean
+ type: object
+ remoteTimeout:
+ description: Timeout for requests to the remote write endpoint.
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ sendExemplars:
+ description: "Enables sending of exemplars over remote write.
+ Note that exemplar-storage itself must be enabled using the
+ `spec.enableFeature` option for exemplars to be scraped in
+ the first place. \n It requires Prometheus >= v2.27.0."
+ type: boolean
+ sendNativeHistograms:
+ description: "Enables sending of native histograms, also known
+ as sparse histograms over remote write. \n It requires Prometheus
+ >= v2.40.0."
+ type: boolean
+ sigv4:
+ description: "Sigv4 allows to configures AWS's Signature Verification
+ 4 for the URL. \n It requires Prometheus >= v2.26.0. \n Cannot
+ be set at the same time as `authorization`, `basicAuth`, or
+ `oauth2`."
+ properties:
+ accessKey:
+ description: AccessKey is the AWS API key. If not specified,
+ the environment variable `AWS_ACCESS_KEY_ID` is used.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ profile:
+ description: Profile is the named AWS profile used to authenticate.
+ type: string
+ region:
+ description: Region is the AWS region. If blank, the region
+ from the default credentials chain used.
+ type: string
+ roleArn:
+ description: RoleArn is the named AWS profile used to authenticate.
+ type: string
+ secretKey:
+ description: SecretKey is the AWS API secret. If not specified,
+ the environment variable `AWS_SECRET_ACCESS_KEY` is used.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ tlsConfig:
+ description: TLS Config to use for the URL.
+ properties:
+ ca:
+ description: Certificate authority used when verifying server
+ certificates.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ caFile:
+ description: Path to the CA cert in the Prometheus container
+ to use for the targets.
+ type: string
+ cert:
+ description: Client certificate to present when doing client-authentication.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ certFile:
+ description: Path to the client cert file in the Prometheus
+ container for the targets.
+ type: string
+ insecureSkipVerify:
+ description: Disable target certificate validation.
+ type: boolean
+ keyFile:
+ description: Path to the client key file in the Prometheus
+ container for the targets.
+ type: string
+ keySecret:
+ description: Secret containing the client key file for the
+ targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ serverName:
+ description: Used to verify the hostname for the targets.
+ type: string
+ type: object
+ url:
+ description: The URL of the endpoint to send samples to.
+ type: string
+ writeRelabelConfigs:
+ description: The list of remote write relabel configurations.
+ items:
+ description: "RelabelConfig allows dynamic rewriting of the
+ label set for targets, alerts, scraped samples and remote
+ write samples. \n More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config"
+ properties:
+ action:
+ default: replace
+ description: "Action to perform based on the regex matching.
+ \n `Uppercase` and `Lowercase` actions require Prometheus
+ >= v2.36.0. `DropEqual` and `KeepEqual` actions require
+ Prometheus >= v2.41.0. \n Default: \"Replace\""
+ enum:
+ - replace
+ - Replace
+ - keep
+ - Keep
+ - drop
+ - Drop
+ - hashmod
+ - HashMod
+ - labelmap
+ - LabelMap
+ - labeldrop
+ - LabelDrop
+ - labelkeep
+ - LabelKeep
+ - lowercase
+ - Lowercase
+ - uppercase
+ - Uppercase
+ - keepequal
+ - KeepEqual
+ - dropequal
+ - DropEqual
+ type: string
+ modulus:
+ description: "Modulus to take of the hash of the source
+ label values. \n Only applicable when the action is
+ `HashMod`."
+ format: int64
+ type: integer
+ regex:
+ description: Regular expression against which the extracted
+ value is matched.
+ type: string
+ replacement:
+ description: "Replacement value against which a Replace
+ action is performed if the regular expression matches.
+ \n Regex capture groups are available."
+ type: string
+ separator:
+ description: Separator is the string between concatenated
+ SourceLabels.
+ type: string
+ sourceLabels:
+ description: The source labels select values from existing
+ labels. Their content is concatenated using the configured
+ Separator and matched against the configured regular
+ expression.
+ items:
+ description: LabelName is a valid Prometheus label name
+ which may only contain ASCII letters, numbers, as
+ well as underscores.
+ pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$
+ type: string
+ type: array
+ targetLabel:
+ description: "Label to which the resulting string is written
+ in a replacement. \n It is mandatory for `Replace`,
+ `HashMod`, `Lowercase`, `Uppercase`, `KeepEqual` and
+ `DropEqual` actions. \n Regex capture groups are available."
+ type: string
+ type: object
+ type: array
+ required:
+ - url
+ type: object
+ type: array
+ replicaExternalLabelName:
+ description: "Name of Prometheus external label used to denote the
+ replica name. The external label will _not_ be added when the field
+ is set to the empty string (`\"\"`). \n Default: \"prometheus_replica\""
+ type: string
+ replicas:
+ description: "Number of replicas of each shard to deploy for a Prometheus
+ deployment. `spec.replicas` multiplied by `spec.shards` is the total
+ number of Pods created. \n Default: 1"
+ format: int32
+ type: integer
+ resources:
+ description: Defines the resources requests and limits of the 'prometheus'
+ container.
+ properties:
+ claims:
+ description: "Claims lists the names of resources, defined in
+ spec.resourceClaims, that are used by this container. \n This
+ is an alpha field and requires enabling the DynamicResourceAllocation
+ feature gate. \n This field is immutable. It can only be set
+ for containers."
+ items:
+ description: ResourceClaim references one entry in PodSpec.ResourceClaims.
+ properties:
+ name:
+ description: Name must match the name of one entry in pod.spec.resourceClaims
+ of the Pod where this field is used. It makes that resource
+ available inside a container.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - name
+ x-kubernetes-list-type: map
+ limits:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Limits describes the maximum amount of compute resources
+ allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ requests:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Requests describes the minimum amount of compute
+ resources required. If Requests is omitted for a container,
+ it defaults to Limits if that is explicitly specified, otherwise
+ to an implementation-defined value. Requests cannot exceed Limits.
+ More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ type: object
+ routePrefix:
+ description: "The route prefix Prometheus registers HTTP handlers
+ for. \n This is useful when using `spec.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`."
+ type: string
+ sampleLimit:
+ description: SampleLimit defines per-scrape limit on number of scraped
+ samples that will be accepted. Only valid in Prometheus versions
+ 2.45.0 and newer.
+ format: int64
+ type: integer
+ scrapeConfigNamespaceSelector:
+ description: Namespaces to match for ScrapeConfig discovery. An empty
+ label selector matches all namespaces. A null label selector matches
+ the current current namespace only.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements.
+ The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector that
+ contains values, a key, and an operator that relates the key
+ and values.
+ properties:
+ key:
+ description: key is the label key that the selector applies
+ to.
+ type: string
+ operator:
+ description: operator represents a key's relationship to
+ a set of values. Valid operators are In, NotIn, Exists
+ and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values. If the
+ operator is In or NotIn, the values array must be non-empty.
+ If the operator is Exists or DoesNotExist, the values
+ array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs. A single
+ {key,value} in the matchLabels map is equivalent to an element
+ of matchExpressions, whose key field is "key", the operator
+ is "In", and the values array contains only "value". The requirements
+ are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ scrapeConfigSelector:
+ description: "*Experimental* ScrapeConfigs to be selected for target
+ discovery. An empty label selector matches all objects. A null label
+ selector matches no objects. \n If `spec.serviceMonitorSelector`,
+ `spec.podMonitorSelector`, `spec.probeSelector` and `spec.scrapeConfigSelector`
+ are null, the Prometheus configuration is unmanaged. The Prometheus
+ operator will ensure that the Prometheus configuration's Secret
+ exists, but it is the responsibility of the user to provide the
+ raw gzipped Prometheus configuration under the `prometheus.yaml.gz`
+ key. This behavior is *deprecated* and will be removed in the next
+ major version of the custom resource definition. It is recommended
+ to use `spec.additionalScrapeConfigs` instead."
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements.
+ The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector that
+ contains values, a key, and an operator that relates the key
+ and values.
+ properties:
+ key:
+ description: key is the label key that the selector applies
+ to.
+ type: string
+ operator:
+ description: operator represents a key's relationship to
+ a set of values. Valid operators are In, NotIn, Exists
+ and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values. If the
+ operator is In or NotIn, the values array must be non-empty.
+ If the operator is Exists or DoesNotExist, the values
+ array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs. A single
+ {key,value} in the matchLabels map is equivalent to an element
+ of matchExpressions, whose key field is "key", the operator
+ is "In", and the values array contains only "value". The requirements
+ are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ scrapeInterval:
+ default: 30s
+ description: "Interval between consecutive scrapes. \n Default: \"30s\""
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ scrapeTimeout:
+ description: Number of seconds to wait until a scrape request times
+ out.
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ secrets:
+ description: Secrets is a list of Secrets in the same namespace as
+ the Prometheus object, which shall be mounted into the Prometheus
+ Pods. Each Secret is added to the StatefulSet definition as a volume
+ named `secret-`. The Secrets are mounted into /etc/prometheus/secrets/
+ in the 'prometheus' container.
+ items:
+ type: string
+ type: array
+ securityContext:
+ description: SecurityContext holds pod-level security attributes and
+ common container settings. This defaults to the default PodSecurityContext.
+ properties:
+ fsGroup:
+ description: "A special supplemental group that applies to all
+ containers in a pod. Some volume types allow the Kubelet to
+ change the ownership of that volume to be owned by the pod:
+ \n 1. The owning GID will be the FSGroup 2. The setgid bit is
+ set (new files created in the volume will be owned by FSGroup)
+ 3. The permission bits are OR'd with rw-rw---- \n If unset,
+ the Kubelet will not modify the ownership and permissions of
+ any volume. Note that this field cannot be set when spec.os.name
+ is windows."
+ format: int64
+ type: integer
+ fsGroupChangePolicy:
+ description: 'fsGroupChangePolicy defines behavior of changing
+ ownership and permission of the volume before being exposed
+ inside Pod. This field will only apply to volume types which
+ support fsGroup based ownership(and permissions). It will have
+ no effect on ephemeral volume types such as: secret, configmaps
+ and emptydir. Valid values are "OnRootMismatch" and "Always".
+ If not specified, "Always" is used. Note that this field cannot
+ be set when spec.os.name is windows.'
+ type: string
+ runAsGroup:
+ description: The GID to run the entrypoint of the container process.
+ Uses runtime default if unset. May also be set in SecurityContext. If
+ set in both SecurityContext and PodSecurityContext, the value
+ specified in SecurityContext takes precedence for that container.
+ Note that this field cannot be set when spec.os.name is windows.
+ format: int64
+ type: integer
+ runAsNonRoot:
+ description: Indicates that the container must run as a non-root
+ user. If true, the Kubelet will validate the image at runtime
+ to ensure that it does not run as UID 0 (root) and fail to start
+ the container if it does. If unset or false, no such validation
+ will be performed. May also be set in SecurityContext. If set
+ in both SecurityContext and PodSecurityContext, the value specified
+ in SecurityContext takes precedence.
+ type: boolean
+ runAsUser:
+ description: The UID to run the entrypoint of the container process.
+ Defaults to user specified in image metadata if unspecified.
+ May also be set in SecurityContext. If set in both SecurityContext
+ and PodSecurityContext, the value specified in SecurityContext
+ takes precedence for that container. Note that this field cannot
+ be set when spec.os.name is windows.
+ format: int64
+ type: integer
+ seLinuxOptions:
+ description: The SELinux context to be applied to all containers.
+ If unspecified, the container runtime will allocate a random
+ SELinux context for each container. May also be set in SecurityContext. If
+ set in both SecurityContext and PodSecurityContext, the value
+ specified in SecurityContext takes precedence for that container.
+ Note that this field cannot be set when spec.os.name is windows.
+ properties:
+ level:
+ description: Level is SELinux level label that applies to
+ the container.
+ type: string
+ role:
+ description: Role is a SELinux role label that applies to
+ the container.
+ type: string
+ type:
+ description: Type is a SELinux type label that applies to
+ the container.
+ type: string
+ user:
+ description: User is a SELinux user label that applies to
+ the container.
+ type: string
+ type: object
+ seccompProfile:
+ description: The seccomp options to use by the containers in this
+ pod. Note that this field cannot be set when spec.os.name is
+ windows.
+ properties:
+ localhostProfile:
+ description: localhostProfile indicates a profile defined
+ in a file on the node should be used. The profile must be
+ preconfigured on the node to work. Must be a descending
+ path, relative to the kubelet's configured seccomp profile
+ location. Must be set if type is "Localhost". Must NOT be
+ set for any other type.
+ type: string
+ type:
+ description: "type indicates which kind of seccomp profile
+ will be applied. Valid options are: \n Localhost - a profile
+ defined in a file on the node should be used. RuntimeDefault
+ - the container runtime default profile should be used.
+ Unconfined - no profile should be applied."
+ type: string
+ required:
+ - type
+ type: object
+ supplementalGroups:
+ description: A list of groups applied to the first process run
+ in each container, in addition to the container's primary GID,
+ the fsGroup (if specified), and group memberships defined in
+ the container image for the uid of the container process. If
+ unspecified, no additional groups are added to any container.
+ Note that group memberships defined in the container image for
+ the uid of the container process are still effective, even if
+ they are not included in this list. Note that this field cannot
+ be set when spec.os.name is windows.
+ items:
+ format: int64
+ type: integer
+ type: array
+ sysctls:
+ description: Sysctls hold a list of namespaced sysctls used for
+ the pod. Pods with unsupported sysctls (by the container runtime)
+ might fail to launch. Note that this field cannot be set when
+ spec.os.name is windows.
+ items:
+ description: Sysctl defines a kernel parameter to be set
+ properties:
+ name:
+ description: Name of a property to set
+ type: string
+ value:
+ description: Value of a property to set
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ windowsOptions:
+ description: The Windows specific settings applied to all containers.
+ If unspecified, the options within a container's SecurityContext
+ will be used. If set in both SecurityContext and PodSecurityContext,
+ the value specified in SecurityContext takes precedence. Note
+ that this field cannot be set when spec.os.name is linux.
+ properties:
+ gmsaCredentialSpec:
+ description: GMSACredentialSpec is where the GMSA admission
+ webhook (https://github.com/kubernetes-sigs/windows-gmsa)
+ inlines the contents of the GMSA credential spec named by
+ the GMSACredentialSpecName field.
+ type: string
+ gmsaCredentialSpecName:
+ description: GMSACredentialSpecName is the name of the GMSA
+ credential spec to use.
+ type: string
+ hostProcess:
+ description: HostProcess determines if a container should
+ be run as a 'Host Process' container. All of a Pod's containers
+ must have the same effective HostProcess value (it is not
+ allowed to have a mix of HostProcess containers and non-HostProcess
+ containers). In addition, if HostProcess is true then HostNetwork
+ must also be set to true.
+ type: boolean
+ runAsUserName:
+ description: The UserName in Windows to run the entrypoint
+ of the container process. Defaults to the user specified
+ in image metadata if unspecified. May also be set in PodSecurityContext.
+ If set in both SecurityContext and PodSecurityContext, the
+ value specified in SecurityContext takes precedence.
+ type: string
+ type: object
+ type: object
+ serviceAccountName:
+ description: ServiceAccountName is the name of the ServiceAccount
+ to use to run the Prometheus Pods.
+ type: string
+ serviceMonitorNamespaceSelector:
+ description: Namespaces to match for ServicedMonitors discovery. An
+ empty label selector matches all namespaces. A null label selector
+ matches the current namespace only.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements.
+ The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector that
+ contains values, a key, and an operator that relates the key
+ and values.
+ properties:
+ key:
+ description: key is the label key that the selector applies
+ to.
+ type: string
+ operator:
+ description: operator represents a key's relationship to
+ a set of values. Valid operators are In, NotIn, Exists
+ and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values. If the
+ operator is In or NotIn, the values array must be non-empty.
+ If the operator is Exists or DoesNotExist, the values
+ array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs. A single
+ {key,value} in the matchLabels map is equivalent to an element
+ of matchExpressions, whose key field is "key", the operator
+ is "In", and the values array contains only "value". The requirements
+ are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ serviceMonitorSelector:
+ description: "ServiceMonitors to be selected for target discovery.
+ An empty label selector matches all objects. A null label selector
+ matches no objects. \n If `spec.serviceMonitorSelector`, `spec.podMonitorSelector`,
+ `spec.probeSelector` and `spec.scrapeConfigSelector` are null, the
+ Prometheus configuration is unmanaged. The Prometheus operator will
+ ensure that the Prometheus configuration's Secret exists, but it
+ is the responsibility of the user to provide the raw gzipped Prometheus
+ configuration under the `prometheus.yaml.gz` key. This behavior
+ is *deprecated* and will be removed in the next major version of
+ the custom resource definition. It is recommended to use `spec.additionalScrapeConfigs`
+ instead."
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements.
+ The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector that
+ contains values, a key, and an operator that relates the key
+ and values.
+ properties:
+ key:
+ description: key is the label key that the selector applies
+ to.
+ type: string
+ operator:
+ description: operator represents a key's relationship to
+ a set of values. Valid operators are In, NotIn, Exists
+ and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values. If the
+ operator is In or NotIn, the values array must be non-empty.
+ If the operator is Exists or DoesNotExist, the values
+ array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs. A single
+ {key,value} in the matchLabels map is equivalent to an element
+ of matchExpressions, whose key field is "key", the operator
+ is "In", and the values array contains only "value". The requirements
+ are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ shards:
+ description: "EXPERIMENTAL: Number of shards to distribute targets
+ onto. `spec.replicas` multiplied by `spec.shards` is the total number
+ of Pods created. \n 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. \n Sharding
+ is performed on the content of the `__address__` target meta-label
+ for PodMonitors and ServiceMonitors and `__param_target__` for Probes.
+ \n Default: 1"
+ format: int32
+ type: integer
+ storage:
+ description: Storage defines the storage used by Prometheus.
+ properties:
+ disableMountSubPath:
+ description: '*Deprecated: subPath usage will be removed in a
+ future release.*'
+ type: boolean
+ emptyDir:
+ description: 'EmptyDirVolumeSource to be used by the StatefulSet.
+ If specified, it takes precedence over `ephemeral` and `volumeClaimTemplate`.
+ More info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir'
+ properties:
+ medium:
+ description: 'medium represents what type of storage medium
+ should back this directory. The default is "" which means
+ to use the node''s default medium. Must be an empty string
+ (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir'
+ type: string
+ sizeLimit:
+ anyOf:
+ - type: integer
+ - type: string
+ description: 'sizeLimit is the total amount of local storage
+ required for this EmptyDir volume. The size limit is also
+ applicable for memory medium. 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. The default is nil which means that the limit
+ is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir'
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ type: object
+ ephemeral:
+ description: 'EphemeralVolumeSource to be used by the StatefulSet.
+ This is a beta field in k8s 1.21 and GA in 1.15. For lower versions,
+ starting with k8s 1.19, it requires enabling the GenericEphemeralVolume
+ feature gate. More info: https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes'
+ properties:
+ volumeClaimTemplate:
+ description: "Will be used to create a stand-alone PVC to
+ provision the volume. The pod in which this EphemeralVolumeSource
+ is embedded will be the owner of the PVC, i.e. the PVC will
+ be deleted together with the pod. The name of the PVC will
+ be `-` where `` is the
+ name from the `PodSpec.Volumes` array entry. Pod validation
+ will reject the pod if the concatenated name is not valid
+ for a PVC (for example, too long). \n An existing PVC with
+ that name that is not owned by the pod will *not* be used
+ for the pod to avoid using an unrelated volume by mistake.
+ Starting the pod is then blocked until the unrelated PVC
+ is removed. If such a pre-created PVC is meant to be used
+ by the pod, the PVC has to updated with an owner reference
+ to the pod once the pod exists. Normally this should not
+ be necessary, but it may be useful when manually reconstructing
+ a broken cluster. \n This field is read-only and no changes
+ will be made by Kubernetes to the PVC after it has been
+ created. \n Required, must not be nil."
+ properties:
+ metadata:
+ description: May contain labels and annotations that will
+ be copied into the PVC when creating it. No other fields
+ are allowed and will be rejected during validation.
+ type: object
+ spec:
+ description: The specification for the PersistentVolumeClaim.
+ The entire content is copied unchanged into the PVC
+ that gets created from this template. The same fields
+ as in a PersistentVolumeClaim are also valid here.
+ properties:
+ accessModes:
+ description: 'accessModes contains the desired access
+ modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1'
+ items:
+ type: string
+ type: array
+ dataSource:
+ description: 'dataSource field can be used to specify
+ either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot)
+ * An existing PVC (PersistentVolumeClaim) If the
+ provisioner or an external controller can support
+ the specified data source, it will create a new
+ volume based on the contents of the specified data
+ source. When the AnyVolumeDataSource feature gate
+ is enabled, dataSource contents will be copied to
+ dataSourceRef, and dataSourceRef contents will be
+ copied to dataSource when dataSourceRef.namespace
+ is not specified. If the namespace is specified,
+ then dataSourceRef will not be copied to dataSource.'
+ properties:
+ apiGroup:
+ description: APIGroup is the group for the resource
+ being referenced. If APIGroup is not specified,
+ the specified Kind must be in the core API group.
+ For any other third-party types, APIGroup is
+ required.
+ type: string
+ kind:
+ description: Kind is the type of resource being
+ referenced
+ type: string
+ name:
+ description: Name is the name of resource being
+ referenced
+ type: string
+ required:
+ - kind
+ - name
+ type: object
+ x-kubernetes-map-type: atomic
+ dataSourceRef:
+ description: 'dataSourceRef specifies the object from
+ which to populate the volume with data, if a non-empty
+ volume is desired. This may be any object from a
+ non-empty API group (non core object) or a PersistentVolumeClaim
+ object. When this field is specified, volume binding
+ will only succeed if the type of the specified object
+ matches some installed volume populator or dynamic
+ provisioner. This field will replace the functionality
+ of the dataSource field and as such if both fields
+ are non-empty, they must have the same value. For
+ backwards compatibility, when namespace isn''t specified
+ in dataSourceRef, both fields (dataSource and dataSourceRef)
+ will be set to the same value automatically if one
+ of them is empty and the other is non-empty. When
+ namespace is specified in dataSourceRef, dataSource
+ isn''t set to the same value and must be empty.
+ There are three important differences between dataSource
+ and dataSourceRef: * While dataSource only allows
+ two specific types of objects, dataSourceRef allows
+ any non-core object, as well as PersistentVolumeClaim
+ objects. * While dataSource ignores disallowed values
+ (dropping them), dataSourceRef preserves all values,
+ and generates an error if a disallowed value is
+ specified. * While dataSource only allows local
+ objects, dataSourceRef allows objects in any namespaces.
+ (Beta) Using this field requires the AnyVolumeDataSource
+ feature gate to be enabled. (Alpha) Using the namespace
+ field of dataSourceRef requires the CrossNamespaceVolumeDataSource
+ feature gate to be enabled.'
+ properties:
+ apiGroup:
+ description: APIGroup is the group for the resource
+ being referenced. If APIGroup is not specified,
+ the specified Kind must be in the core API group.
+ For any other third-party types, APIGroup is
+ required.
+ type: string
+ kind:
+ description: Kind is the type of resource being
+ referenced
+ type: string
+ name:
+ description: Name is the name of resource being
+ referenced
+ type: string
+ namespace:
+ description: Namespace is the namespace of resource
+ being referenced Note that when a namespace
+ is specified, a gateway.networking.k8s.io/ReferenceGrant
+ object is required in the referent namespace
+ to allow that namespace's owner to accept the
+ reference. See the ReferenceGrant documentation
+ for details. (Alpha) This field requires the
+ CrossNamespaceVolumeDataSource feature gate
+ to be enabled.
+ type: string
+ required:
+ - kind
+ - name
+ type: object
+ resources:
+ description: 'resources represents the minimum resources
+ the volume should have. If RecoverVolumeExpansionFailure
+ feature is enabled users are allowed to specify
+ resource requirements that are lower than previous
+ value but must still be higher than capacity recorded
+ in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources'
+ properties:
+ claims:
+ description: "Claims lists the names of resources,
+ defined in spec.resourceClaims, that are used
+ by this container. \n This is an alpha field
+ and requires enabling the DynamicResourceAllocation
+ feature gate. \n This field is immutable. It
+ can only be set for containers."
+ items:
+ description: ResourceClaim references one entry
+ in PodSpec.ResourceClaims.
+ properties:
+ name:
+ description: Name must match the name of
+ one entry in pod.spec.resourceClaims of
+ the Pod where this field is used. It makes
+ that resource available inside a container.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - name
+ x-kubernetes-list-type: map
+ limits:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Limits describes the maximum amount
+ of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ requests:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Requests describes the minimum amount
+ of compute resources required. If Requests is
+ omitted for a container, it defaults to Limits
+ if that is explicitly specified, otherwise to
+ an implementation-defined value. Requests cannot
+ exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ type: object
+ selector:
+ description: selector is a label query over volumes
+ to consider for binding.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: A label selector requirement is
+ a selector that contains values, a key, and
+ an operator that relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's
+ relationship to a set of values. Valid
+ operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty. If
+ the operator is Exists or DoesNotExist,
+ the values array must be empty. This array
+ is replaced during a strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is "In",
+ and the values array contains only "value".
+ The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ storageClassName:
+ description: 'storageClassName is the name of the
+ StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1'
+ type: string
+ volumeMode:
+ description: volumeMode defines what type of volume
+ is required by the claim. Value of Filesystem is
+ implied when not included in claim spec.
+ type: string
+ volumeName:
+ description: volumeName is the binding reference to
+ the PersistentVolume backing this claim.
+ type: string
+ type: object
+ required:
+ - spec
+ type: object
+ type: object
+ volumeClaimTemplate:
+ description: Defines the PVC spec to be used by the Prometheus
+ StatefulSets. The easiest way to use a volume that cannot be
+ automatically provisioned is to use a label selector alongside
+ manually created PersistentVolumes.
+ properties:
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this
+ representation of an object. Servers should convert recognized
+ schemas to the latest internal value, and may reject unrecognized
+ values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST
+ resource this object represents. Servers may infer this
+ from the endpoint the client submits requests to. Cannot
+ be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ description: EmbeddedMetadata contains metadata relevant to
+ an EmbeddedResource.
+ properties:
+ annotations:
+ additionalProperties:
+ type: string
+ description: 'Annotations is an unstructured key value
+ map stored with a resource that may be set by external
+ tools to store and retrieve arbitrary metadata. They
+ are not queryable and should be preserved when modifying
+ objects. More info: http://kubernetes.io/docs/user-guide/annotations'
+ type: object
+ labels:
+ additionalProperties:
+ type: string
+ description: 'Map of string keys and values that can be
+ used to organize and categorize (scope and select) objects.
+ May match selectors of replication controllers and services.
+ More info: http://kubernetes.io/docs/user-guide/labels'
+ type: object
+ name:
+ description: 'Name must be unique within a namespace.
+ Is required when creating resources, although some resources
+ may allow a client to request the generation of an appropriate
+ name automatically. Name is primarily intended for creation
+ idempotence and configuration definition. Cannot be
+ updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names'
+ type: string
+ type: object
+ spec:
+ description: 'Defines the desired characteristics of a volume
+ requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
+ properties:
+ accessModes:
+ description: 'accessModes contains the desired access
+ modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1'
+ items:
+ type: string
+ type: array
+ dataSource:
+ description: 'dataSource field can be used to specify
+ either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot)
+ * An existing PVC (PersistentVolumeClaim) If the provisioner
+ or an external controller can support the specified
+ data source, it will create a new volume based on the
+ contents of the specified data source. When the AnyVolumeDataSource
+ feature gate is enabled, dataSource contents will be
+ copied to dataSourceRef, and dataSourceRef contents
+ will be copied to dataSource when dataSourceRef.namespace
+ is not specified. If the namespace is specified, then
+ dataSourceRef will not be copied to dataSource.'
+ properties:
+ apiGroup:
+ description: APIGroup is the group for the resource
+ being referenced. If APIGroup is not specified,
+ the specified Kind must be in the core API group.
+ For any other third-party types, APIGroup is required.
+ type: string
+ kind:
+ description: Kind is the type of resource being referenced
+ type: string
+ name:
+ description: Name is the name of resource being referenced
+ type: string
+ required:
+ - kind
+ - name
+ type: object
+ x-kubernetes-map-type: atomic
+ dataSourceRef:
+ description: 'dataSourceRef specifies the object from
+ which to populate the volume with data, if a non-empty
+ volume is desired. This may be any object from a non-empty
+ API group (non core object) or a PersistentVolumeClaim
+ object. When this field is specified, volume binding
+ will only succeed if the type of the specified object
+ matches some installed volume populator or dynamic provisioner.
+ This field will replace the functionality of the dataSource
+ field and as such if both fields are non-empty, they
+ must have the same value. For backwards compatibility,
+ when namespace isn''t specified in dataSourceRef, both
+ fields (dataSource and dataSourceRef) will be set to
+ the same value automatically if one of them is empty
+ and the other is non-empty. When namespace is specified
+ in dataSourceRef, dataSource isn''t set to the same
+ value and must be empty. There are three important differences
+ between dataSource and dataSourceRef: * While dataSource
+ only allows two specific types of objects, dataSourceRef
+ allows any non-core object, as well as PersistentVolumeClaim
+ objects. * While dataSource ignores disallowed values
+ (dropping them), dataSourceRef preserves all values,
+ and generates an error if a disallowed value is specified.
+ * While dataSource only allows local objects, dataSourceRef
+ allows objects in any namespaces. (Beta) Using this
+ field requires the AnyVolumeDataSource feature gate
+ to be enabled. (Alpha) Using the namespace field of
+ dataSourceRef requires the CrossNamespaceVolumeDataSource
+ feature gate to be enabled.'
+ properties:
+ apiGroup:
+ description: APIGroup is the group for the resource
+ being referenced. If APIGroup is not specified,
+ the specified Kind must be in the core API group.
+ For any other third-party types, APIGroup is required.
+ type: string
+ kind:
+ description: Kind is the type of resource being referenced
+ type: string
+ name:
+ description: Name is the name of resource being referenced
+ type: string
+ namespace:
+ description: Namespace is the namespace of resource
+ being referenced Note that when a namespace is specified,
+ a gateway.networking.k8s.io/ReferenceGrant object
+ is required in the referent namespace to allow that
+ namespace's owner to accept the reference. See the
+ ReferenceGrant documentation for details. (Alpha)
+ This field requires the CrossNamespaceVolumeDataSource
+ feature gate to be enabled.
+ type: string
+ required:
+ - kind
+ - name
+ type: object
+ resources:
+ description: 'resources represents the minimum resources
+ the volume should have. If RecoverVolumeExpansionFailure
+ feature is enabled users are allowed to specify resource
+ requirements that are lower than previous value but
+ must still be higher than capacity recorded in the status
+ field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources'
+ properties:
+ claims:
+ description: "Claims lists the names of resources,
+ defined in spec.resourceClaims, that are used by
+ this container. \n This is an alpha field and requires
+ enabling the DynamicResourceAllocation feature gate.
+ \n This field is immutable. It can only be set for
+ containers."
+ items:
+ description: ResourceClaim references one entry
+ in PodSpec.ResourceClaims.
+ properties:
+ name:
+ description: Name must match the name of one
+ entry in pod.spec.resourceClaims of the Pod
+ where this field is used. It makes that resource
+ available inside a container.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - name
+ x-kubernetes-list-type: map
+ limits:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Limits describes the maximum amount
+ of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ requests:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Requests describes the minimum amount
+ of compute resources required. If Requests is omitted
+ for a container, it defaults to Limits if that is
+ explicitly specified, otherwise to an implementation-defined
+ value. Requests cannot exceed Limits. More info:
+ https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ type: object
+ selector:
+ description: selector is a label query over volumes to
+ consider for binding.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector
+ requirements. The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector
+ that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the selector
+ applies to.
+ type: string
+ operator:
+ description: operator represents a key's relationship
+ to a set of values. Valid operators are In,
+ NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values.
+ If the operator is In or NotIn, the values
+ array must be non-empty. If the operator is
+ Exists or DoesNotExist, the values array must
+ be empty. This array is replaced during a
+ strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs.
+ A single {key,value} in the matchLabels map is equivalent
+ to an element of matchExpressions, whose key field
+ is "key", the operator is "In", and the values array
+ contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ storageClassName:
+ description: 'storageClassName is the name of the StorageClass
+ required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1'
+ type: string
+ volumeMode:
+ description: volumeMode defines what type of volume is
+ required by the claim. Value of Filesystem is implied
+ when not included in claim spec.
+ type: string
+ volumeName:
+ description: volumeName is the binding reference to the
+ PersistentVolume backing this claim.
+ type: string
+ type: object
+ status:
+ description: '*Deprecated: this field is never set.*'
+ properties:
+ accessModes:
+ description: 'accessModes contains the actual access modes
+ the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1'
+ items:
+ type: string
+ type: array
+ allocatedResourceStatuses:
+ additionalProperties:
+ description: When a controller receives persistentvolume
+ claim update with ClaimResourceStatus for a resource
+ that it does not recognizes, then it should ignore
+ that update and let other controllers handle it.
+ type: string
+ description: "allocatedResourceStatuses stores status
+ of resource being resized for the given PVC. Key names
+ follow standard Kubernetes label syntax. Valid values
+ are either: * Un-prefixed keys: - storage - the capacity
+ of the volume. * Custom resources must use implementation-defined
+ prefixed names such as \"example.com/my-custom-resource\"
+ Apart from above values - keys that are unprefixed or
+ have kubernetes.io prefix are considered reserved and
+ hence may not be used. \n ClaimResourceStatus can be
+ in any of following states: - ControllerResizeInProgress:
+ State set when resize controller starts resizing the
+ volume in control-plane. - ControllerResizeFailed: State
+ set when resize has failed in resize controller with
+ a terminal error. - NodeResizePending: State set when
+ resize controller has finished resizing the volume but
+ further resizing of volume is needed on the node. -
+ NodeResizeInProgress: State set when kubelet starts
+ resizing the volume. - NodeResizeFailed: State set when
+ resizing has failed in kubelet with a terminal error.
+ Transient errors don't set NodeResizeFailed. For example:
+ if expanding a PVC for more capacity - this field can
+ be one of the following states: - pvc.status.allocatedResourceStatus['storage']
+ = \"ControllerResizeInProgress\" - pvc.status.allocatedResourceStatus['storage']
+ = \"ControllerResizeFailed\" - pvc.status.allocatedResourceStatus['storage']
+ = \"NodeResizePending\" - pvc.status.allocatedResourceStatus['storage']
+ = \"NodeResizeInProgress\" - pvc.status.allocatedResourceStatus['storage']
+ = \"NodeResizeFailed\" When this field is not set, it
+ means that no resize operation is in progress for the
+ given PVC. \n A controller that receives PVC update
+ with previously unknown resourceName or ClaimResourceStatus
+ should ignore the update for the purpose it was designed.
+ For example - a controller that only is responsible
+ for resizing capacity of the volume, should ignore PVC
+ updates that change other valid resources associated
+ with PVC. \n This is an alpha field and requires enabling
+ RecoverVolumeExpansionFailure feature."
+ type: object
+ x-kubernetes-map-type: granular
+ allocatedResources:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: "allocatedResources tracks the resources
+ allocated to a PVC including its capacity. Key names
+ follow standard Kubernetes label syntax. Valid values
+ are either: * Un-prefixed keys: - storage - the capacity
+ of the volume. * Custom resources must use implementation-defined
+ prefixed names such as \"example.com/my-custom-resource\"
+ Apart from above values - keys that are unprefixed or
+ have kubernetes.io prefix are considered reserved and
+ hence may not be used. \n Capacity reported here may
+ be larger than the actual capacity when a volume expansion
+ operation is requested. For storage quota, the larger
+ value from allocatedResources and PVC.spec.resources
+ is used. If allocatedResources is not set, PVC.spec.resources
+ alone is used for quota calculation. If a volume expansion
+ capacity request is lowered, allocatedResources is only
+ lowered if there are no expansion operations in progress
+ and if the actual volume capacity is equal or lower
+ than the requested capacity. \n A controller that receives
+ PVC update with previously unknown resourceName should
+ ignore the update for the purpose it was designed. For
+ example - a controller that only is responsible for
+ resizing capacity of the volume, should ignore PVC updates
+ that change other valid resources associated with PVC.
+ \n This is an alpha field and requires enabling RecoverVolumeExpansionFailure
+ feature."
+ type: object
+ capacity:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: capacity represents the actual resources
+ of the underlying volume.
+ type: object
+ conditions:
+ description: conditions is the current Condition of persistent
+ volume claim. If underlying persistent volume is being
+ resized then the Condition will be set to 'ResizeStarted'.
+ items:
+ description: PersistentVolumeClaimCondition contains
+ details about state of pvc
+ properties:
+ lastProbeTime:
+ description: lastProbeTime is the time we probed
+ the condition.
+ format: date-time
+ type: string
+ lastTransitionTime:
+ description: lastTransitionTime is the time the
+ condition transitioned from one status to another.
+ format: date-time
+ type: string
+ message:
+ description: message is the human-readable message
+ indicating details about last transition.
+ type: string
+ reason:
+ description: reason is a unique, this should be
+ a short, machine understandable string that gives
+ the reason for condition's last transition. If
+ it reports "ResizeStarted" that means the underlying
+ persistent volume is being resized.
+ type: string
+ status:
+ type: string
+ type:
+ description: PersistentVolumeClaimConditionType
+ is a valid value of PersistentVolumeClaimCondition.Type
+ type: string
+ required:
+ - status
+ - type
+ type: object
+ type: array
+ phase:
+ description: phase represents the current phase of PersistentVolumeClaim.
+ type: string
+ type: object
+ type: object
+ type: object
+ targetLimit:
+ description: TargetLimit defines a limit on the number of scraped
+ targets that will be accepted. Only valid in Prometheus versions
+ 2.45.0 and newer.
+ format: int64
+ type: integer
+ tolerations:
+ description: Defines the Pods' tolerations if specified.
+ items:
+ description: The pod this Toleration is attached to tolerates any
+ taint that matches the triple using the matching
+ operator .
+ properties:
+ effect:
+ description: Effect indicates the taint effect to match. Empty
+ means match all taint effects. When specified, allowed values
+ are NoSchedule, PreferNoSchedule and NoExecute.
+ type: string
+ key:
+ description: Key is the taint key that the toleration applies
+ to. Empty means match all taint keys. If the key is empty,
+ operator must be Exists; this combination means to match all
+ values and all keys.
+ type: string
+ operator:
+ description: Operator represents a key's relationship to the
+ value. Valid operators are Exists and Equal. Defaults to Equal.
+ Exists is equivalent to wildcard for value, so that a pod
+ can tolerate all taints of a particular category.
+ type: string
+ tolerationSeconds:
+ description: TolerationSeconds represents the period of time
+ the toleration (which must be of effect NoExecute, otherwise
+ this field is ignored) tolerates the taint. By default, it
+ is not set, which means tolerate the taint forever (do not
+ evict). Zero and negative values will be treated as 0 (evict
+ immediately) by the system.
+ format: int64
+ type: integer
+ value:
+ description: Value is the taint value the toleration matches
+ to. If the operator is Exists, the value should be empty,
+ otherwise just a regular string.
+ type: string
+ type: object
+ type: array
+ topologySpreadConstraints:
+ description: Defines the pod's topology spread constraints if specified.
+ items:
+ description: TopologySpreadConstraint specifies how to spread matching
+ pods among the given topology.
+ properties:
+ labelSelector:
+ description: LabelSelector is used to find matching pods. Pods
+ that match this label selector are counted to determine the
+ number of pods in their corresponding topology domain.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector
+ requirements. The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector
+ that contains values, a key, and an operator that relates
+ the key and values.
+ properties:
+ key:
+ description: key is the label key that the selector
+ applies to.
+ type: string
+ operator:
+ description: operator represents a key's relationship
+ to a set of values. Valid operators are In, NotIn,
+ Exists and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values.
+ If the operator is In or NotIn, the values array
+ must be non-empty. If the operator is Exists or
+ DoesNotExist, the values array must be empty. This
+ array is replaced during a strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs.
+ A single {key,value} in the matchLabels map is equivalent
+ to an element of matchExpressions, whose key field is
+ "key", the operator is "In", and the values array contains
+ only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ matchLabelKeys:
+ description: "MatchLabelKeys is a set of pod label keys to select
+ the pods over which spreading will be calculated. The keys
+ are used to lookup values from the incoming pod labels, those
+ key-value labels are ANDed with labelSelector to select the
+ group of existing pods over which spreading will be calculated
+ for the incoming pod. The same key is forbidden to exist in
+ both MatchLabelKeys and LabelSelector. MatchLabelKeys cannot
+ be set when LabelSelector isn't set. Keys that don't exist
+ in the incoming pod labels will be ignored. A null or empty
+ list means only match against labelSelector. \n This is a
+ beta field and requires the MatchLabelKeysInPodTopologySpread
+ feature gate to be enabled (enabled by default)."
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ maxSkew:
+ description: 'MaxSkew describes the degree to which pods may
+ be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`,
+ it is the maximum permitted difference between the number
+ of matching pods in the target topology and the global minimum.
+ The global minimum is the minimum number of matching pods
+ in an eligible domain or zero if the number of eligible domains
+ is less than MinDomains. For example, in a 3-zone cluster,
+ MaxSkew is set to 1, and pods with the same labelSelector
+ spread as 2/2/1: In this case, the global minimum is 1. |
+ zone1 | zone2 | zone3 | | P P | P P | P | - if MaxSkew
+ is 1, incoming pod can only be scheduled to zone3 to become
+ 2/2/2; scheduling it onto zone1(zone2) would make the ActualSkew(3-1)
+ on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming
+ pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`,
+ it is used to give higher precedence to topologies that satisfy
+ it. It''s a required field. Default value is 1 and 0 is not
+ allowed.'
+ format: int32
+ type: integer
+ minDomains:
+ description: "MinDomains indicates a minimum number of eligible
+ domains. When the number of eligible domains with matching
+ topology keys is less than minDomains, Pod Topology Spread
+ treats \"global minimum\" as 0, and then the calculation of
+ Skew is performed. And when the number of eligible domains
+ with matching topology keys equals or greater than minDomains,
+ this value has no effect on scheduling. As a result, when
+ the number of eligible domains is less than minDomains, scheduler
+ won't schedule more than maxSkew Pods to those domains. If
+ value is nil, the constraint behaves as if MinDomains is equal
+ to 1. Valid values are integers greater than 0. When value
+ is not nil, WhenUnsatisfiable must be DoNotSchedule. \n For
+ example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains
+ is set to 5 and pods with the same labelSelector spread as
+ 2/2/2: | zone1 | zone2 | zone3 | | P P | P P | P P |
+ The number of domains is less than 5(MinDomains), so \"global
+ minimum\" is treated as 0. In this situation, new pod with
+ the same labelSelector cannot be scheduled, because computed
+ skew will be 3(3 - 0) if new Pod is scheduled to any of the
+ three zones, it will violate MaxSkew. \n This is a beta field
+ and requires the MinDomainsInPodTopologySpread feature gate
+ to be enabled (enabled by default)."
+ format: int32
+ type: integer
+ nodeAffinityPolicy:
+ description: "NodeAffinityPolicy indicates how we will treat
+ Pod's nodeAffinity/nodeSelector when calculating pod topology
+ spread skew. Options are: - Honor: only nodes matching nodeAffinity/nodeSelector
+ are included in the calculations. - Ignore: nodeAffinity/nodeSelector
+ are ignored. All nodes are included in the calculations. \n
+ If this value is nil, the behavior is equivalent to the Honor
+ policy. This is a beta-level feature default enabled by the
+ NodeInclusionPolicyInPodTopologySpread feature flag."
+ type: string
+ nodeTaintsPolicy:
+ description: "NodeTaintsPolicy indicates how we will treat node
+ taints when calculating pod topology spread skew. Options
+ are: - Honor: nodes without taints, along with tainted nodes
+ for which the incoming pod has a toleration, are included.
+ - Ignore: node taints are ignored. All nodes are included.
+ \n If this value is nil, the behavior is equivalent to the
+ Ignore policy. This is a beta-level feature default enabled
+ by the NodeInclusionPolicyInPodTopologySpread feature flag."
+ type: string
+ topologyKey:
+ description: TopologyKey is the key of node labels. Nodes that
+ have a label with this key and identical values are considered
+ to be in the same topology. We consider each
+ as a "bucket", and try to put balanced number of pods into
+ each bucket. We define a domain as a particular instance of
+ a topology. Also, we define an eligible domain as a domain
+ whose nodes meet the requirements of nodeAffinityPolicy and
+ nodeTaintsPolicy. e.g. If TopologyKey is "kubernetes.io/hostname",
+ each Node is a domain of that topology. And, if TopologyKey
+ is "topology.kubernetes.io/zone", each zone is a domain of
+ that topology. It's a required field.
+ type: string
+ whenUnsatisfiable:
+ description: 'WhenUnsatisfiable indicates how to deal with a
+ pod if it doesn''t satisfy the spread constraint. - DoNotSchedule
+ (default) tells the scheduler not to schedule it. - ScheduleAnyway
+ tells the scheduler to schedule the pod in any location, but
+ giving higher precedence to topologies that would help reduce
+ the skew. A constraint is considered "Unsatisfiable" for an
+ incoming pod if and only if every possible node assignment
+ for that pod would violate "MaxSkew" on some topology. For
+ example, in a 3-zone cluster, MaxSkew is set to 1, and pods
+ with the same labelSelector spread as 3/1/1: | zone1 | zone2
+ | zone3 | | P P P | P | P | If WhenUnsatisfiable is
+ set to DoNotSchedule, incoming pod can only be scheduled to
+ zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on
+ zone2(zone3) satisfies MaxSkew(1). In other words, the cluster
+ can still be imbalanced, but scheduler won''t make it *more*
+ imbalanced. It''s a required field.'
+ type: string
+ required:
+ - maxSkew
+ - topologyKey
+ - whenUnsatisfiable
+ type: object
+ type: array
+ tracingConfig:
+ description: 'EXPERIMENTAL: TracingConfig configures tracing in Prometheus.
+ This is an experimental feature, it may change in any upcoming release
+ in a breaking way.'
+ properties:
+ clientType:
+ description: Client used to export the traces. Supported values
+ are `http` or `grpc`.
+ enum:
+ - http
+ - grpc
+ type: string
+ compression:
+ description: Compression key for supported compression types.
+ The only supported value is `gzip`.
+ enum:
+ - gzip
+ type: string
+ endpoint:
+ description: Endpoint to send the traces to. Should be provided
+ in format :.
+ minLength: 1
+ type: string
+ headers:
+ additionalProperties:
+ type: string
+ description: Key-value pairs to be used as headers associated
+ with gRPC or HTTP requests.
+ type: object
+ insecure:
+ description: If disabled, the client will use a secure connection.
+ type: boolean
+ samplingFraction:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Sets the probability a given trace will be sampled.
+ Must be a float from 0 through 1.
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ timeout:
+ description: Maximum time the exporter will wait for each batch
+ export.
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ tlsConfig:
+ description: TLS Config to use when sending traces.
+ properties:
+ ca:
+ description: Certificate authority used when verifying server
+ certificates.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ caFile:
+ description: Path to the CA cert in the Prometheus container
+ to use for the targets.
+ type: string
+ cert:
+ description: Client certificate to present when doing client-authentication.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ certFile:
+ description: Path to the client cert file in the Prometheus
+ container for the targets.
+ type: string
+ insecureSkipVerify:
+ description: Disable target certificate validation.
+ type: boolean
+ keyFile:
+ description: Path to the client key file in the Prometheus
+ container for the targets.
+ type: string
+ keySecret:
+ description: Secret containing the client key file for the
+ targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ serverName:
+ description: Used to verify the hostname for the targets.
+ type: string
+ type: object
+ required:
+ - endpoint
+ type: object
+ version:
+ description: "Version of Prometheus being deployed. The operator uses
+ this information to generate the Prometheus StatefulSet + configuration
+ files. \n If not specified, the operator assumes the latest upstream
+ version of Prometheus available at the time when the version of
+ the operator was released."
+ type: string
+ volumeMounts:
+ description: "VolumeMounts allows the configuration of additional
+ VolumeMounts. \n VolumeMounts will be appended to other VolumeMounts
+ in the 'prometheus' container, that are generated as a result of
+ StorageSpec objects."
+ items:
+ description: VolumeMount describes a mounting of a Volume within
+ a container.
+ properties:
+ mountPath:
+ description: Path within the container at which the volume should
+ be mounted. Must not contain ':'.
+ type: string
+ mountPropagation:
+ description: mountPropagation determines how mounts are propagated
+ from the host to container and the other way around. When
+ not set, MountPropagationNone is used. This field is beta
+ in 1.10.
+ type: string
+ name:
+ description: This must match the Name of a Volume.
+ type: string
+ readOnly:
+ description: Mounted read-only if true, read-write otherwise
+ (false or unspecified). Defaults to false.
+ type: boolean
+ subPath:
+ description: Path within the volume from which the container's
+ volume should be mounted. Defaults to "" (volume's root).
+ type: string
+ subPathExpr:
+ description: Expanded path within the volume from which the
+ container's volume should be mounted. Behaves similarly to
+ SubPath but environment variable references $(VAR_NAME) are
+ expanded using the container's environment. Defaults to ""
+ (volume's root). SubPathExpr and SubPath are mutually exclusive.
+ type: string
+ required:
+ - mountPath
+ - name
+ type: object
+ type: array
+ volumes:
+ description: Volumes allows the configuration of additional volumes
+ on the output StatefulSet definition. Volumes specified will be
+ appended to other volumes that are generated as a result of StorageSpec
+ objects.
+ items:
+ description: Volume represents a named volume in a pod that may
+ be accessed by any container in the pod.
+ properties:
+ awsElasticBlockStore:
+ description: 'awsElasticBlockStore represents an AWS Disk resource
+ that is attached to a kubelet''s host machine and then exposed
+ to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore'
+ properties:
+ fsType:
+ description: 'fsType is the filesystem type of the volume
+ that you want to mount. Tip: Ensure that the filesystem
+ type is supported by the host operating system. Examples:
+ "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4"
+ if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
+ TODO: how do we prevent errors in the filesystem from
+ compromising the machine'
+ type: string
+ partition:
+ description: 'partition is the partition in the volume that
+ you want to mount. If omitted, the default is to mount
+ by volume name. Examples: For volume /dev/sda1, you specify
+ the partition as "1". Similarly, the volume partition
+ for /dev/sda is "0" (or you can leave the property empty).'
+ format: int32
+ type: integer
+ readOnly:
+ description: 'readOnly value true will force the readOnly
+ setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore'
+ type: boolean
+ volumeID:
+ description: 'volumeID is unique ID of the persistent disk
+ resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore'
+ type: string
+ required:
+ - volumeID
+ type: object
+ azureDisk:
+ description: azureDisk represents an Azure Data Disk mount on
+ the host and bind mount to the pod.
+ properties:
+ cachingMode:
+ description: 'cachingMode is the Host Caching mode: None,
+ Read Only, Read Write.'
+ type: string
+ diskName:
+ description: diskName is the Name of the data disk in the
+ blob storage
+ type: string
+ diskURI:
+ description: diskURI is the URI of data disk in the blob
+ storage
+ type: string
+ fsType:
+ description: fsType is Filesystem type to mount. Must be
+ a filesystem type supported by the host operating system.
+ Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4"
+ if unspecified.
+ type: string
+ kind:
+ description: 'kind expected values are Shared: multiple
+ blob disks per storage account Dedicated: single blob
+ disk per storage account Managed: azure managed data
+ disk (only in managed availability set). defaults to shared'
+ type: string
+ readOnly:
+ description: readOnly Defaults to false (read/write). ReadOnly
+ here will force the ReadOnly setting in VolumeMounts.
+ type: boolean
+ required:
+ - diskName
+ - diskURI
+ type: object
+ azureFile:
+ description: azureFile represents an Azure File Service mount
+ on the host and bind mount to the pod.
+ properties:
+ readOnly:
+ description: readOnly defaults to false (read/write). ReadOnly
+ here will force the ReadOnly setting in VolumeMounts.
+ type: boolean
+ secretName:
+ description: secretName is the name of secret that contains
+ Azure Storage Account Name and Key
+ type: string
+ shareName:
+ description: shareName is the azure share Name
+ type: string
+ required:
+ - secretName
+ - shareName
+ type: object
+ cephfs:
+ description: cephFS represents a Ceph FS mount on the host that
+ shares a pod's lifetime
+ properties:
+ monitors:
+ description: 'monitors is Required: Monitors is a collection
+ of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it'
+ items:
+ type: string
+ type: array
+ path:
+ description: 'path is Optional: Used as the mounted root,
+ rather than the full Ceph tree, default is /'
+ type: string
+ readOnly:
+ description: 'readOnly is Optional: Defaults to false (read/write).
+ ReadOnly here will force the ReadOnly setting in VolumeMounts.
+ More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it'
+ type: boolean
+ secretFile:
+ description: 'secretFile is Optional: SecretFile is the
+ path to key ring for User, default is /etc/ceph/user.secret
+ More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it'
+ type: string
+ secretRef:
+ description: 'secretRef is Optional: SecretRef is reference
+ to the authentication secret for User, default is empty.
+ More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it'
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ user:
+ description: 'user is optional: User is the rados user name,
+ default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it'
+ type: string
+ required:
+ - monitors
+ type: object
+ cinder:
+ description: 'cinder represents a cinder volume attached and
+ mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md'
+ properties:
+ fsType:
+ description: 'fsType is the filesystem type to mount. Must
+ be a filesystem type supported by the host operating system.
+ Examples: "ext4", "xfs", "ntfs". Implicitly inferred to
+ be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md'
+ type: string
+ readOnly:
+ description: 'readOnly defaults to false (read/write). ReadOnly
+ here will force the ReadOnly setting in VolumeMounts.
+ More info: https://examples.k8s.io/mysql-cinder-pd/README.md'
+ type: boolean
+ secretRef:
+ description: 'secretRef is optional: points to a secret
+ object containing parameters used to connect to OpenStack.'
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ volumeID:
+ description: 'volumeID used to identify the volume in cinder.
+ More info: https://examples.k8s.io/mysql-cinder-pd/README.md'
+ type: string
+ required:
+ - volumeID
+ type: object
+ configMap:
+ description: configMap represents a configMap that should populate
+ this volume
+ properties:
+ defaultMode:
+ description: 'defaultMode is optional: mode bits used to
+ set permissions on created files by default. Must be an
+ octal value between 0000 and 0777 or a decimal value between
+ 0 and 511. YAML accepts both octal and decimal values,
+ JSON requires decimal values for mode bits. Defaults to
+ 0644. Directories within the path are not affected by
+ this setting. This might be in conflict with other options
+ that affect the file mode, like fsGroup, and the result
+ can be other mode bits set.'
+ format: int32
+ type: integer
+ items:
+ description: items if unspecified, each key-value pair in
+ the Data field of the referenced ConfigMap will be projected
+ into the volume as a file whose name is the key and content
+ is the value. If specified, the listed keys will be projected
+ into the specified paths, and unlisted keys will not be
+ present. If a key is specified which is not present in
+ the ConfigMap, the volume setup will error unless it is
+ marked optional. Paths must be relative and may not contain
+ the '..' path or start with '..'.
+ items:
+ description: Maps a string key to a path within a volume.
+ properties:
+ key:
+ description: key is the key to project.
+ type: string
+ mode:
+ description: 'mode is Optional: mode bits used to
+ set permissions on this file. Must be an octal value
+ between 0000 and 0777 or a decimal value between
+ 0 and 511. YAML accepts both octal and decimal values,
+ JSON requires decimal values for mode bits. If not
+ specified, the volume defaultMode will be used.
+ This might be in conflict with other options that
+ affect the file mode, like fsGroup, and the result
+ can be other mode bits set.'
+ format: int32
+ type: integer
+ path:
+ description: path is the relative path of the file
+ to map the key to. May not be an absolute path.
+ May not contain the path element '..'. May not start
+ with the string '..'.
+ type: string
+ required:
+ - key
+ - path
+ type: object
+ type: array
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: optional specify whether the ConfigMap or its
+ keys must be defined
+ type: boolean
+ type: object
+ x-kubernetes-map-type: atomic
+ csi:
+ description: csi (Container Storage Interface) represents ephemeral
+ storage that is handled by certain external CSI drivers (Beta
+ feature).
+ properties:
+ driver:
+ description: driver is the name of the CSI driver that handles
+ this volume. Consult with your admin for the correct name
+ as registered in the cluster.
+ type: string
+ fsType:
+ description: fsType to mount. Ex. "ext4", "xfs", "ntfs".
+ If not provided, the empty value is passed to the associated
+ CSI driver which will determine the default filesystem
+ to apply.
+ type: string
+ nodePublishSecretRef:
+ description: nodePublishSecretRef is a reference to the
+ secret object containing sensitive information to pass
+ to the CSI driver to complete the CSI NodePublishVolume
+ and NodeUnpublishVolume calls. This field is optional,
+ and may be empty if no secret is required. If the secret
+ object contains more than one secret, all secret references
+ are passed.
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ readOnly:
+ description: readOnly specifies a read-only configuration
+ for the volume. Defaults to false (read/write).
+ type: boolean
+ volumeAttributes:
+ additionalProperties:
+ type: string
+ description: volumeAttributes stores driver-specific properties
+ that are passed to the CSI driver. Consult your driver's
+ documentation for supported values.
+ type: object
+ required:
+ - driver
+ type: object
+ downwardAPI:
+ description: downwardAPI represents downward API about the pod
+ that should populate this volume
+ properties:
+ defaultMode:
+ description: 'Optional: mode bits to use on created files
+ by default. Must be a Optional: mode bits used to set
+ permissions on created files by default. Must be an octal
+ value between 0000 and 0777 or a decimal value between
+ 0 and 511. YAML accepts both octal and decimal values,
+ JSON requires decimal values for mode bits. Defaults to
+ 0644. Directories within the path are not affected by
+ this setting. This might be in conflict with other options
+ that affect the file mode, like fsGroup, and the result
+ can be other mode bits set.'
+ format: int32
+ type: integer
+ items:
+ description: Items is a list of downward API volume file
+ items:
+ description: DownwardAPIVolumeFile represents information
+ to create the file containing the pod field
+ properties:
+ fieldRef:
+ description: 'Required: Selects a field of the pod:
+ only annotations, labels, name and namespace are
+ supported.'
+ properties:
+ apiVersion:
+ description: Version of the schema the FieldPath
+ is written in terms of, defaults to "v1".
+ type: string
+ fieldPath:
+ description: Path of the field to select in the
+ specified API version.
+ type: string
+ required:
+ - fieldPath
+ type: object
+ x-kubernetes-map-type: atomic
+ mode:
+ description: 'Optional: mode bits used to set permissions
+ on this file, must be an octal value between 0000
+ and 0777 or a decimal value between 0 and 511. YAML
+ accepts both octal and decimal values, JSON requires
+ decimal values for mode bits. If not specified,
+ the volume defaultMode will be used. This might
+ be in conflict with other options that affect the
+ file mode, like fsGroup, and the result can be other
+ mode bits set.'
+ format: int32
+ type: integer
+ path:
+ description: 'Required: Path is the relative path
+ name of the file to be created. Must not be absolute
+ or contain the ''..'' path. Must be utf-8 encoded.
+ The first item of the relative path must not start
+ with ''..'''
+ type: string
+ resourceFieldRef:
+ description: 'Selects a resource of the container:
+ only resources limits and requests (limits.cpu,
+ limits.memory, requests.cpu and requests.memory)
+ are currently supported.'
+ properties:
+ containerName:
+ description: 'Container name: required for volumes,
+ optional for env vars'
+ type: string
+ divisor:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Specifies the output format of the
+ exposed resources, defaults to "1"
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ resource:
+ description: 'Required: resource to select'
+ type: string
+ required:
+ - resource
+ type: object
+ x-kubernetes-map-type: atomic
+ required:
+ - path
+ type: object
+ type: array
+ type: object
+ emptyDir:
+ description: 'emptyDir represents a temporary directory that
+ shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir'
+ properties:
+ medium:
+ description: 'medium represents what type of storage medium
+ should back this directory. The default is "" which means
+ to use the node''s default medium. Must be an empty string
+ (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir'
+ type: string
+ sizeLimit:
+ anyOf:
+ - type: integer
+ - type: string
+ description: 'sizeLimit is the total amount of local storage
+ required for this EmptyDir volume. The size limit is also
+ applicable for memory medium. 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. The default is nil which means
+ that the limit is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir'
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ type: object
+ ephemeral:
+ description: "ephemeral represents a volume that is handled
+ by a cluster storage driver. The volume's lifecycle is tied
+ to the pod that defines it - it will be created before the
+ pod starts, and deleted when the pod is removed. \n Use this
+ if: a) the volume is only needed while the pod runs, b) features
+ of normal volumes like restoring from snapshot or capacity
+ tracking are needed, c) the storage driver is specified through
+ a storage class, and d) the storage driver supports dynamic
+ volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource
+ for more information on the connection between this volume
+ type and PersistentVolumeClaim). \n Use PersistentVolumeClaim
+ or one of the vendor-specific APIs for volumes that persist
+ for longer than the lifecycle of an individual pod. \n Use
+ CSI for light-weight local ephemeral volumes if the CSI driver
+ is meant to be used that way - see the documentation of the
+ driver for more information. \n A pod can use both types of
+ ephemeral volumes and persistent volumes at the same time."
+ properties:
+ volumeClaimTemplate:
+ description: "Will be used to create a stand-alone PVC to
+ provision the volume. The pod in which this EphemeralVolumeSource
+ is embedded will be the owner of the PVC, i.e. the PVC
+ will be deleted together with the pod. The name of the
+ PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry.
+ Pod validation will reject the pod if the concatenated
+ name is not valid for a PVC (for example, too long). \n
+ An existing PVC with that name that is not owned by the
+ pod will *not* be used for the pod to avoid using an unrelated
+ volume by mistake. Starting the pod is then blocked until
+ the unrelated PVC is removed. If such a pre-created PVC
+ is meant to be used by the pod, the PVC has to updated
+ with an owner reference to the pod once the pod exists.
+ Normally this should not be necessary, but it may be useful
+ when manually reconstructing a broken cluster. \n This
+ field is read-only and no changes will be made by Kubernetes
+ to the PVC after it has been created. \n Required, must
+ not be nil."
+ properties:
+ metadata:
+ description: May contain labels and annotations that
+ will be copied into the PVC when creating it. No other
+ fields are allowed and will be rejected during validation.
+ type: object
+ spec:
+ description: The specification for the PersistentVolumeClaim.
+ The entire content is copied unchanged into the PVC
+ that gets created from this template. The same fields
+ as in a PersistentVolumeClaim are also valid here.
+ properties:
+ accessModes:
+ description: 'accessModes contains the desired access
+ modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1'
+ items:
+ type: string
+ type: array
+ dataSource:
+ description: 'dataSource field can be used to specify
+ either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot)
+ * An existing PVC (PersistentVolumeClaim) If the
+ provisioner or an external controller can support
+ the specified data source, it will create a new
+ volume based on the contents of the specified
+ data source. When the AnyVolumeDataSource feature
+ gate is enabled, dataSource contents will be copied
+ to dataSourceRef, and dataSourceRef contents will
+ be copied to dataSource when dataSourceRef.namespace
+ is not specified. If the namespace is specified,
+ then dataSourceRef will not be copied to dataSource.'
+ properties:
+ apiGroup:
+ description: APIGroup is the group for the resource
+ being referenced. If APIGroup is not specified,
+ the specified Kind must be in the core API
+ group. For any other third-party types, APIGroup
+ is required.
+ type: string
+ kind:
+ description: Kind is the type of resource being
+ referenced
+ type: string
+ name:
+ description: Name is the name of resource being
+ referenced
+ type: string
+ required:
+ - kind
+ - name
+ type: object
+ x-kubernetes-map-type: atomic
+ dataSourceRef:
+ description: 'dataSourceRef specifies the object
+ from which to populate the volume with data, if
+ a non-empty volume is desired. This may be any
+ object from a non-empty API group (non core object)
+ or a PersistentVolumeClaim object. When this field
+ is specified, volume binding will only succeed
+ if the type of the specified object matches some
+ installed volume populator or dynamic provisioner.
+ This field will replace the functionality of the
+ dataSource field and as such if both fields are
+ non-empty, they must have the same value. For
+ backwards compatibility, when namespace isn''t
+ specified in dataSourceRef, both fields (dataSource
+ and dataSourceRef) will be set to the same value
+ automatically if one of them is empty and the
+ other is non-empty. When namespace is specified
+ in dataSourceRef, dataSource isn''t set to the
+ same value and must be empty. There are three
+ important differences between dataSource and dataSourceRef:
+ * While dataSource only allows two specific types
+ of objects, dataSourceRef allows any non-core
+ object, as well as PersistentVolumeClaim objects.
+ * While dataSource ignores disallowed values (dropping
+ them), dataSourceRef preserves all values, and
+ generates an error if a disallowed value is specified.
+ * While dataSource only allows local objects,
+ dataSourceRef allows objects in any namespaces.
+ (Beta) Using this field requires the AnyVolumeDataSource
+ feature gate to be enabled. (Alpha) Using the
+ namespace field of dataSourceRef requires the
+ CrossNamespaceVolumeDataSource feature gate to
+ be enabled.'
+ properties:
+ apiGroup:
+ description: APIGroup is the group for the resource
+ being referenced. If APIGroup is not specified,
+ the specified Kind must be in the core API
+ group. For any other third-party types, APIGroup
+ is required.
+ type: string
+ kind:
+ description: Kind is the type of resource being
+ referenced
+ type: string
+ name:
+ description: Name is the name of resource being
+ referenced
+ type: string
+ namespace:
+ description: Namespace is the namespace of resource
+ being referenced Note that when a namespace
+ is specified, a gateway.networking.k8s.io/ReferenceGrant
+ object is required in the referent namespace
+ to allow that namespace's owner to accept
+ the reference. See the ReferenceGrant documentation
+ for details. (Alpha) This field requires the
+ CrossNamespaceVolumeDataSource feature gate
+ to be enabled.
+ type: string
+ required:
+ - kind
+ - name
+ type: object
+ resources:
+ description: 'resources represents the minimum resources
+ the volume should have. If RecoverVolumeExpansionFailure
+ feature is enabled users are allowed to specify
+ resource requirements that are lower than previous
+ value but must still be higher than capacity recorded
+ in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources'
+ properties:
+ claims:
+ description: "Claims lists the names of resources,
+ defined in spec.resourceClaims, that are used
+ by this container. \n This is an alpha field
+ and requires enabling the DynamicResourceAllocation
+ feature gate. \n This field is immutable.
+ It can only be set for containers."
+ items:
+ description: ResourceClaim references one
+ entry in PodSpec.ResourceClaims.
+ properties:
+ name:
+ description: Name must match the name
+ of one entry in pod.spec.resourceClaims
+ of the Pod where this field is used.
+ It makes that resource available inside
+ a container.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - name
+ x-kubernetes-list-type: map
+ limits:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Limits describes the maximum amount
+ of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ requests:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Requests describes the minimum
+ amount of compute resources required. If Requests
+ is omitted for a container, it defaults to
+ Limits if that is explicitly specified, otherwise
+ to an implementation-defined value. Requests
+ cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ type: object
+ selector:
+ description: selector is a label query over volumes
+ to consider for binding.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: A label selector requirement
+ is a selector that contains values, a key,
+ and an operator that relates the key and
+ values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's
+ relationship to a set of values. Valid
+ operators are In, NotIn, Exists and
+ DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty.
+ If the operator is Exists or DoesNotExist,
+ the values array must be empty. This
+ array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is
+ "In", and the values array contains only "value".
+ The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ storageClassName:
+ description: 'storageClassName is the name of the
+ StorageClass required by the claim. More info:
+ https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1'
+ type: string
+ volumeMode:
+ description: volumeMode defines what type of volume
+ is required by the claim. Value of Filesystem
+ is implied when not included in claim spec.
+ type: string
+ volumeName:
+ description: volumeName is the binding reference
+ to the PersistentVolume backing this claim.
+ type: string
+ type: object
+ required:
+ - spec
+ type: object
+ type: object
+ fc:
+ description: fc represents a Fibre Channel resource that is
+ attached to a kubelet's host machine and then exposed to the
+ pod.
+ properties:
+ fsType:
+ description: 'fsType is the filesystem type to mount. Must
+ be a filesystem type supported by the host operating system.
+ Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4"
+ if unspecified. TODO: how do we prevent errors in the
+ filesystem from compromising the machine'
+ type: string
+ lun:
+ description: 'lun is Optional: FC target lun number'
+ format: int32
+ type: integer
+ readOnly:
+ description: 'readOnly is Optional: Defaults to false (read/write).
+ ReadOnly here will force the ReadOnly setting in VolumeMounts.'
+ type: boolean
+ targetWWNs:
+ description: 'targetWWNs is Optional: FC target worldwide
+ names (WWNs)'
+ items:
+ type: string
+ type: array
+ wwids:
+ description: 'wwids Optional: FC volume world wide identifiers
+ (wwids) Either wwids or combination of targetWWNs and
+ lun must be set, but not both simultaneously.'
+ items:
+ type: string
+ type: array
+ type: object
+ flexVolume:
+ description: flexVolume represents a generic volume resource
+ that is provisioned/attached using an exec based plugin.
+ properties:
+ driver:
+ description: driver is the name of the driver to use for
+ this volume.
+ type: string
+ fsType:
+ description: fsType is the filesystem type to mount. Must
+ be a filesystem type supported by the host operating system.
+ Ex. "ext4", "xfs", "ntfs". The default filesystem depends
+ on FlexVolume script.
+ type: string
+ options:
+ additionalProperties:
+ type: string
+ description: 'options is Optional: this field holds extra
+ command options if any.'
+ type: object
+ readOnly:
+ description: 'readOnly is Optional: defaults to false (read/write).
+ ReadOnly here will force the ReadOnly setting in VolumeMounts.'
+ type: boolean
+ secretRef:
+ description: 'secretRef is Optional: secretRef is reference
+ to the secret object containing sensitive information
+ to pass to the plugin scripts. This may be empty if no
+ secret object is specified. If the secret object contains
+ more than one secret, all secrets are passed to the plugin
+ scripts.'
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ required:
+ - driver
+ type: object
+ flocker:
+ description: flocker represents a Flocker volume attached to
+ a kubelet's host machine. This depends on the Flocker control
+ service being running
+ properties:
+ datasetName:
+ description: datasetName is Name of the dataset stored as
+ metadata -> name on the dataset for Flocker should be
+ considered as deprecated
+ type: string
+ datasetUUID:
+ description: datasetUUID is the UUID of the dataset. This
+ is unique identifier of a Flocker dataset
+ type: string
+ type: object
+ gcePersistentDisk:
+ description: 'gcePersistentDisk represents a GCE Disk resource
+ that is attached to a kubelet''s host machine and then exposed
+ to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk'
+ properties:
+ fsType:
+ description: 'fsType is filesystem type of the volume that
+ you want to mount. Tip: Ensure that the filesystem type
+ is supported by the host operating system. Examples: "ext4",
+ "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+ TODO: how do we prevent errors in the filesystem from
+ compromising the machine'
+ type: string
+ partition:
+ description: 'partition is the partition in the volume that
+ you want to mount. If omitted, the default is to mount
+ by volume name. Examples: For volume /dev/sda1, you specify
+ the partition as "1". Similarly, the volume partition
+ for /dev/sda is "0" (or you can leave the property empty).
+ More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk'
+ format: int32
+ type: integer
+ pdName:
+ description: 'pdName is unique name of the PD resource in
+ GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk'
+ type: string
+ readOnly:
+ description: 'readOnly here will force the ReadOnly setting
+ in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk'
+ type: boolean
+ required:
+ - pdName
+ type: object
+ gitRepo:
+ description: 'gitRepo represents a git repository at a particular
+ revision. DEPRECATED: GitRepo is deprecated. To provision
+ a container with a git repo, mount an EmptyDir into an InitContainer
+ that clones the repo using git, then mount the EmptyDir into
+ the Pod''s container.'
+ properties:
+ directory:
+ description: directory is the target directory name. Must
+ not contain or start with '..'. If '.' is supplied, the
+ volume directory will be the git repository. Otherwise,
+ if specified, the volume will contain the git repository
+ in the subdirectory with the given name.
+ type: string
+ repository:
+ description: repository is the URL
+ type: string
+ revision:
+ description: revision is the commit hash for the specified
+ revision.
+ type: string
+ required:
+ - repository
+ type: object
+ glusterfs:
+ description: 'glusterfs represents a Glusterfs mount on the
+ host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md'
+ properties:
+ endpoints:
+ description: 'endpoints is the endpoint name that details
+ Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod'
+ type: string
+ path:
+ description: 'path is the Glusterfs volume path. More info:
+ https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod'
+ type: string
+ readOnly:
+ description: 'readOnly here will force the Glusterfs volume
+ to be mounted with read-only permissions. Defaults to
+ false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod'
+ type: boolean
+ required:
+ - endpoints
+ - path
+ type: object
+ hostPath:
+ description: 'hostPath represents a pre-existing file or directory
+ on the host machine that is directly exposed to the container.
+ This is generally used for system agents or other privileged
+ things that are allowed to see the host machine. Most containers
+ will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
+ --- TODO(jonesdl) We need to restrict who can use host directory
+ mounts and who can/can not mount host directories as read/write.'
+ properties:
+ path:
+ description: 'path of the directory on the host. If the
+ path is a symlink, it will follow the link to the real
+ path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath'
+ type: string
+ type:
+ description: 'type for HostPath Volume Defaults to "" More
+ info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath'
+ type: string
+ required:
+ - path
+ type: object
+ iscsi:
+ description: 'iscsi represents an ISCSI Disk resource that is
+ attached to a kubelet''s host machine and then exposed to
+ the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md'
+ properties:
+ chapAuthDiscovery:
+ description: chapAuthDiscovery defines whether support iSCSI
+ Discovery CHAP authentication
+ type: boolean
+ chapAuthSession:
+ description: chapAuthSession defines whether support iSCSI
+ Session CHAP authentication
+ type: boolean
+ fsType:
+ description: 'fsType is the filesystem type of the volume
+ that you want to mount. Tip: Ensure that the filesystem
+ type is supported by the host operating system. Examples:
+ "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4"
+ if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi
+ TODO: how do we prevent errors in the filesystem from
+ compromising the machine'
+ type: string
+ initiatorName:
+ description: initiatorName is the custom iSCSI Initiator
+ Name. If initiatorName is specified with iscsiInterface
+ simultaneously, new iSCSI interface : will be created for the connection.
+ type: string
+ iqn:
+ description: iqn is the target iSCSI Qualified Name.
+ type: string
+ iscsiInterface:
+ description: iscsiInterface is the interface Name that uses
+ an iSCSI transport. Defaults to 'default' (tcp).
+ type: string
+ lun:
+ description: lun represents iSCSI Target Lun number.
+ format: int32
+ type: integer
+ portals:
+ description: portals is the iSCSI Target Portal List. The
+ portal is either an IP or ip_addr:port if the port is
+ other than default (typically TCP ports 860 and 3260).
+ items:
+ type: string
+ type: array
+ readOnly:
+ description: readOnly here will force the ReadOnly setting
+ in VolumeMounts. Defaults to false.
+ type: boolean
+ secretRef:
+ description: secretRef is the CHAP Secret for iSCSI target
+ and initiator authentication
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ targetPortal:
+ description: targetPortal is iSCSI Target Portal. The Portal
+ is either an IP or ip_addr:port if the port is other than
+ default (typically TCP ports 860 and 3260).
+ type: string
+ required:
+ - iqn
+ - lun
+ - targetPortal
+ type: object
+ name:
+ description: 'name of the volume. Must be a DNS_LABEL and unique
+ within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
+ type: string
+ nfs:
+ description: 'nfs represents an NFS mount on the host that shares
+ a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs'
+ properties:
+ path:
+ description: 'path that is exported by the NFS server. More
+ info: https://kubernetes.io/docs/concepts/storage/volumes#nfs'
+ type: string
+ readOnly:
+ description: 'readOnly here will force the NFS export to
+ be mounted with read-only permissions. Defaults to false.
+ More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs'
+ type: boolean
+ server:
+ description: 'server is the hostname or IP address of the
+ NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs'
+ type: string
+ required:
+ - path
+ - server
+ type: object
+ persistentVolumeClaim:
+ description: 'persistentVolumeClaimVolumeSource represents a
+ reference to a PersistentVolumeClaim in the same namespace.
+ More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
+ properties:
+ claimName:
+ description: 'claimName is the name of a PersistentVolumeClaim
+ in the same namespace as the pod using this volume. More
+ info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
+ type: string
+ readOnly:
+ description: readOnly Will force the ReadOnly setting in
+ VolumeMounts. Default false.
+ type: boolean
+ required:
+ - claimName
+ type: object
+ photonPersistentDisk:
+ description: photonPersistentDisk represents a PhotonController
+ persistent disk attached and mounted on kubelets host machine
+ properties:
+ fsType:
+ description: fsType is the filesystem type to mount. Must
+ be a filesystem type supported by the host operating system.
+ Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4"
+ if unspecified.
+ type: string
+ pdID:
+ description: pdID is the ID that identifies Photon Controller
+ persistent disk
+ type: string
+ required:
+ - pdID
+ type: object
+ portworxVolume:
+ description: portworxVolume represents a portworx volume attached
+ and mounted on kubelets host machine
+ properties:
+ fsType:
+ description: fSType represents the filesystem type to mount
+ Must be a filesystem type supported by the host operating
+ system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4"
+ if unspecified.
+ type: string
+ readOnly:
+ description: readOnly defaults to false (read/write). ReadOnly
+ here will force the ReadOnly setting in VolumeMounts.
+ type: boolean
+ volumeID:
+ description: volumeID uniquely identifies a Portworx volume
+ type: string
+ required:
+ - volumeID
+ type: object
+ projected:
+ description: projected items for all in one resources secrets,
+ configmaps, and downward API
+ properties:
+ defaultMode:
+ description: defaultMode are the mode bits used to set permissions
+ on created files by default. Must be an octal value between
+ 0000 and 0777 or a decimal value between 0 and 511. YAML
+ accepts both octal and decimal values, JSON requires decimal
+ values for mode bits. Directories within the path are
+ not affected by this setting. This might be in conflict
+ with other options that affect the file mode, like fsGroup,
+ and the result can be other mode bits set.
+ format: int32
+ type: integer
+ sources:
+ description: sources is the list of volume projections
+ items:
+ description: Projection that may be projected along with
+ other supported volume types
+ properties:
+ configMap:
+ description: configMap information about the configMap
+ data to project
+ properties:
+ items:
+ description: items if unspecified, each key-value
+ pair in the Data field of the referenced ConfigMap
+ will be projected into the volume as a file
+ whose name is the key and content is the value.
+ If specified, the listed keys will be projected
+ into the specified paths, and unlisted keys
+ will not be present. If a key is specified which
+ is not present in the ConfigMap, the volume
+ setup will error unless it is marked optional.
+ Paths must be relative and may not contain the
+ '..' path or start with '..'.
+ items:
+ description: Maps a string key to a path within
+ a volume.
+ properties:
+ key:
+ description: key is the key to project.
+ type: string
+ mode:
+ description: 'mode is Optional: mode bits
+ used to set permissions on this file.
+ Must be an octal value between 0000 and
+ 0777 or a decimal value between 0 and
+ 511. YAML accepts both octal and decimal
+ values, JSON requires decimal values for
+ mode bits. If not specified, the volume
+ defaultMode will be used. This might be
+ in conflict with other options that affect
+ the file mode, like fsGroup, and the result
+ can be other mode bits set.'
+ format: int32
+ type: integer
+ path:
+ description: path is the relative path of
+ the file to map the key to. May not be
+ an absolute path. May not contain the
+ path element '..'. May not start with
+ the string '..'.
+ type: string
+ required:
+ - key
+ - path
+ type: object
+ type: array
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: optional specify whether the ConfigMap
+ or its keys must be defined
+ type: boolean
+ type: object
+ x-kubernetes-map-type: atomic
+ downwardAPI:
+ description: downwardAPI information about the downwardAPI
+ data to project
+ properties:
+ items:
+ description: Items is a list of DownwardAPIVolume
+ file
+ items:
+ description: DownwardAPIVolumeFile represents
+ information to create the file containing
+ the pod field
+ properties:
+ fieldRef:
+ description: 'Required: Selects a field
+ of the pod: only annotations, labels,
+ name and namespace are supported.'
+ properties:
+ apiVersion:
+ description: Version of the schema the
+ FieldPath is written in terms of,
+ defaults to "v1".
+ type: string
+ fieldPath:
+ description: Path of the field to select
+ in the specified API version.
+ type: string
+ required:
+ - fieldPath
+ type: object
+ x-kubernetes-map-type: atomic
+ mode:
+ description: 'Optional: mode bits used to
+ set permissions on this file, must be
+ an octal value between 0000 and 0777 or
+ a decimal value between 0 and 511. YAML
+ accepts both octal and decimal values,
+ JSON requires decimal values for mode
+ bits. If not specified, the volume defaultMode
+ will be used. This might be in conflict
+ with other options that affect the file
+ mode, like fsGroup, and the result can
+ be other mode bits set.'
+ format: int32
+ type: integer
+ path:
+ description: 'Required: Path is the relative
+ path name of the file to be created. Must
+ not be absolute or contain the ''..''
+ path. Must be utf-8 encoded. The first
+ item of the relative path must not start
+ with ''..'''
+ type: string
+ resourceFieldRef:
+ description: 'Selects a resource of the
+ container: only resources limits and requests
+ (limits.cpu, limits.memory, requests.cpu
+ and requests.memory) are currently supported.'
+ properties:
+ containerName:
+ description: 'Container name: required
+ for volumes, optional for env vars'
+ type: string
+ divisor:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Specifies the output format
+ of the exposed resources, defaults
+ to "1"
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ resource:
+ description: 'Required: resource to
+ select'
+ type: string
+ required:
+ - resource
+ type: object
+ x-kubernetes-map-type: atomic
+ required:
+ - path
+ type: object
+ type: array
+ type: object
+ secret:
+ description: secret information about the secret data
+ to project
+ properties:
+ items:
+ description: items if unspecified, each key-value
+ pair in the Data field of the referenced Secret
+ will be projected into the volume as a file
+ whose name is the key and content is the value.
+ If specified, the listed keys will be projected
+ into the specified paths, and unlisted keys
+ will not be present. If a key is specified which
+ is not present in the Secret, the volume setup
+ will error unless it is marked optional. Paths
+ must be relative and may not contain the '..'
+ path or start with '..'.
+ items:
+ description: Maps a string key to a path within
+ a volume.
+ properties:
+ key:
+ description: key is the key to project.
+ type: string
+ mode:
+ description: 'mode is Optional: mode bits
+ used to set permissions on this file.
+ Must be an octal value between 0000 and
+ 0777 or a decimal value between 0 and
+ 511. YAML accepts both octal and decimal
+ values, JSON requires decimal values for
+ mode bits. If not specified, the volume
+ defaultMode will be used. This might be
+ in conflict with other options that affect
+ the file mode, like fsGroup, and the result
+ can be other mode bits set.'
+ format: int32
+ type: integer
+ path:
+ description: path is the relative path of
+ the file to map the key to. May not be
+ an absolute path. May not contain the
+ path element '..'. May not start with
+ the string '..'.
+ type: string
+ required:
+ - key
+ - path
+ type: object
+ type: array
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: optional field specify whether the
+ Secret or its key must be defined
+ type: boolean
+ type: object
+ x-kubernetes-map-type: atomic
+ serviceAccountToken:
+ description: serviceAccountToken is information about
+ the serviceAccountToken data to project
+ properties:
+ audience:
+ description: audience is the intended audience
+ of the token. A recipient of a token must identify
+ itself with an identifier specified in the audience
+ of the token, and otherwise should reject the
+ token. The audience defaults to the identifier
+ of the apiserver.
+ type: string
+ expirationSeconds:
+ description: expirationSeconds is the requested
+ duration of validity of the service account
+ token. As the token approaches expiration, the
+ kubelet volume plugin will proactively rotate
+ the service account token. The kubelet will
+ start trying to rotate the token if the token
+ is older than 80 percent of its time to live
+ or if the token is older than 24 hours.Defaults
+ to 1 hour and must be at least 10 minutes.
+ format: int64
+ type: integer
+ path:
+ description: path is the path relative to the
+ mount point of the file to project the token
+ into.
+ type: string
+ required:
+ - path
+ type: object
+ type: object
+ type: array
+ type: object
+ quobyte:
+ description: quobyte represents a Quobyte mount on the host
+ that shares a pod's lifetime
+ properties:
+ group:
+ description: group to map volume access to Default is no
+ group
+ type: string
+ readOnly:
+ description: readOnly here will force the Quobyte volume
+ to be mounted with read-only permissions. Defaults to
+ false.
+ type: boolean
+ registry:
+ description: registry represents a single or multiple Quobyte
+ Registry services specified as a string as host:port pair
+ (multiple entries are separated with commas) which acts
+ as the central registry for volumes
+ type: string
+ tenant:
+ description: tenant owning the given Quobyte volume in the
+ Backend Used with dynamically provisioned Quobyte volumes,
+ value is set by the plugin
+ type: string
+ user:
+ description: user to map volume access to Defaults to serivceaccount
+ user
+ type: string
+ volume:
+ description: volume is a string that references an already
+ created Quobyte volume by name.
+ type: string
+ required:
+ - registry
+ - volume
+ type: object
+ rbd:
+ description: 'rbd represents a Rados Block Device mount on the
+ host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md'
+ properties:
+ fsType:
+ description: 'fsType is the filesystem type of the volume
+ that you want to mount. Tip: Ensure that the filesystem
+ type is supported by the host operating system. Examples:
+ "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4"
+ if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd
+ TODO: how do we prevent errors in the filesystem from
+ compromising the machine'
+ type: string
+ image:
+ description: 'image is the rados image name. More info:
+ https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
+ type: string
+ keyring:
+ description: 'keyring is the path to key ring for RBDUser.
+ Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
+ type: string
+ monitors:
+ description: 'monitors is a collection of Ceph monitors.
+ More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
+ items:
+ type: string
+ type: array
+ pool:
+ description: 'pool is the rados pool name. Default is rbd.
+ More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
+ type: string
+ readOnly:
+ description: 'readOnly here will force the ReadOnly setting
+ in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
+ type: boolean
+ secretRef:
+ description: 'secretRef is name of the authentication secret
+ for RBDUser. If provided overrides keyring. Default is
+ nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ user:
+ description: 'user is the rados user name. Default is admin.
+ More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
+ type: string
+ required:
+ - image
+ - monitors
+ type: object
+ scaleIO:
+ description: scaleIO represents a ScaleIO persistent volume
+ attached and mounted on Kubernetes nodes.
+ properties:
+ fsType:
+ description: fsType is the filesystem type to mount. Must
+ be a filesystem type supported by the host operating system.
+ Ex. "ext4", "xfs", "ntfs". Default is "xfs".
+ type: string
+ gateway:
+ description: gateway is the host address of the ScaleIO
+ API Gateway.
+ type: string
+ protectionDomain:
+ description: protectionDomain is the name of the ScaleIO
+ Protection Domain for the configured storage.
+ type: string
+ readOnly:
+ description: readOnly Defaults to false (read/write). ReadOnly
+ here will force the ReadOnly setting in VolumeMounts.
+ type: boolean
+ secretRef:
+ description: secretRef references to the secret for ScaleIO
+ user and other sensitive information. If this is not provided,
+ Login operation will fail.
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ sslEnabled:
+ description: sslEnabled Flag enable/disable SSL communication
+ with Gateway, default false
+ type: boolean
+ storageMode:
+ description: storageMode indicates whether the storage for
+ a volume should be ThickProvisioned or ThinProvisioned.
+ Default is ThinProvisioned.
+ type: string
+ storagePool:
+ description: storagePool is the ScaleIO Storage Pool associated
+ with the protection domain.
+ type: string
+ system:
+ description: system is the name of the storage system as
+ configured in ScaleIO.
+ type: string
+ volumeName:
+ description: volumeName is the name of a volume already
+ created in the ScaleIO system that is associated with
+ this volume source.
+ type: string
+ required:
+ - gateway
+ - secretRef
+ - system
+ type: object
+ secret:
+ description: 'secret represents a secret that should populate
+ this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret'
+ properties:
+ defaultMode:
+ description: 'defaultMode is Optional: mode bits used to
+ set permissions on created files by default. Must be an
+ octal value between 0000 and 0777 or a decimal value between
+ 0 and 511. YAML accepts both octal and decimal values,
+ JSON requires decimal values for mode bits. Defaults to
+ 0644. Directories within the path are not affected by
+ this setting. This might be in conflict with other options
+ that affect the file mode, like fsGroup, and the result
+ can be other mode bits set.'
+ format: int32
+ type: integer
+ items:
+ description: items If unspecified, each key-value pair in
+ the Data field of the referenced Secret will be projected
+ into the volume as a file whose name is the key and content
+ is the value. If specified, the listed keys will be projected
+ into the specified paths, and unlisted keys will not be
+ present. If a key is specified which is not present in
+ the Secret, the volume setup will error unless it is marked
+ optional. Paths must be relative and may not contain the
+ '..' path or start with '..'.
+ items:
+ description: Maps a string key to a path within a volume.
+ properties:
+ key:
+ description: key is the key to project.
+ type: string
+ mode:
+ description: 'mode is Optional: mode bits used to
+ set permissions on this file. Must be an octal value
+ between 0000 and 0777 or a decimal value between
+ 0 and 511. YAML accepts both octal and decimal values,
+ JSON requires decimal values for mode bits. If not
+ specified, the volume defaultMode will be used.
+ This might be in conflict with other options that
+ affect the file mode, like fsGroup, and the result
+ can be other mode bits set.'
+ format: int32
+ type: integer
+ path:
+ description: path is the relative path of the file
+ to map the key to. May not be an absolute path.
+ May not contain the path element '..'. May not start
+ with the string '..'.
+ type: string
+ required:
+ - key
+ - path
+ type: object
+ type: array
+ optional:
+ description: optional field specify whether the Secret or
+ its keys must be defined
+ type: boolean
+ secretName:
+ description: 'secretName is the name of the secret in the
+ pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret'
+ type: string
+ type: object
+ storageos:
+ description: storageOS represents a StorageOS volume attached
+ and mounted on Kubernetes nodes.
+ properties:
+ fsType:
+ description: fsType is the filesystem type to mount. Must
+ be a filesystem type supported by the host operating system.
+ Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4"
+ if unspecified.
+ type: string
+ readOnly:
+ description: readOnly defaults to false (read/write). ReadOnly
+ here will force the ReadOnly setting in VolumeMounts.
+ type: boolean
+ secretRef:
+ description: secretRef specifies the secret to use for obtaining
+ the StorageOS API credentials. If not specified, default
+ values will be attempted.
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ volumeName:
+ description: volumeName is the human-readable name of the
+ StorageOS volume. Volume names are only unique within
+ a namespace.
+ type: string
+ volumeNamespace:
+ description: volumeNamespace specifies the scope of the
+ volume within StorageOS. If no namespace is specified
+ then the Pod's namespace will be used. This allows the
+ Kubernetes name scoping to be mirrored within StorageOS
+ for tighter integration. Set VolumeName to any name to
+ override the default behaviour. Set to "default" if you
+ are not using namespaces within StorageOS. Namespaces
+ that do not pre-exist within StorageOS will be created.
+ type: string
+ type: object
+ vsphereVolume:
+ description: vsphereVolume represents a vSphere volume attached
+ and mounted on kubelets host machine
+ properties:
+ fsType:
+ description: fsType is filesystem type to mount. Must be
+ a filesystem type supported by the host operating system.
+ Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4"
+ if unspecified.
+ type: string
+ storagePolicyID:
+ description: storagePolicyID is the storage Policy Based
+ Management (SPBM) profile ID associated with the StoragePolicyName.
+ type: string
+ storagePolicyName:
+ description: storagePolicyName is the storage Policy Based
+ Management (SPBM) profile name.
+ type: string
+ volumePath:
+ description: volumePath is the path that identifies vSphere
+ volume vmdk
+ type: string
+ required:
+ - volumePath
+ type: object
+ required:
+ - name
+ type: object
+ type: array
+ walCompression:
+ description: "Configures compression of the write-ahead log (WAL)
+ using Snappy. \n WAL compression is enabled by default for Prometheus
+ >= 2.20.0 \n Requires Prometheus v2.11.0 and above."
+ type: boolean
+ web:
+ description: Defines the configuration of the Prometheus web server.
+ properties:
+ httpConfig:
+ description: Defines HTTP parameters for web server.
+ properties:
+ headers:
+ description: List of headers that can be added to HTTP responses.
+ properties:
+ contentSecurityPolicy:
+ description: Set the Content-Security-Policy header to
+ HTTP responses. Unset if blank.
+ type: string
+ strictTransportSecurity:
+ description: Set the Strict-Transport-Security header
+ to HTTP responses. Unset if blank. Please make sure
+ that you use this with care as this header might force
+ browsers to load Prometheus and the other applications
+ hosted on the same domain and subdomains over HTTPS.
+ https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
+ type: string
+ xContentTypeOptions:
+ description: Set the X-Content-Type-Options header to
+ HTTP responses. Unset if blank. Accepted value is nosniff.
+ https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options
+ enum:
+ - ""
+ - NoSniff
+ type: string
+ xFrameOptions:
+ description: Set the X-Frame-Options header to HTTP responses.
+ Unset if blank. Accepted values are deny and sameorigin.
+ https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
+ enum:
+ - ""
+ - Deny
+ - SameOrigin
+ type: string
+ xXSSProtection:
+ description: Set the X-XSS-Protection header to all responses.
+ Unset if blank. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection
+ type: string
+ type: object
+ http2:
+ description: Enable HTTP/2 support. Note that HTTP/2 is only
+ supported with TLS. When TLSConfig is not configured, HTTP/2
+ will be disabled. Whenever the value of the field changes,
+ a rolling update will be triggered.
+ type: boolean
+ type: object
+ maxConnections:
+ description: Defines the maximum number of simultaneous connections
+ A zero value means that Prometheus doesn't accept any incoming
+ connection.
+ format: int32
+ minimum: 0
+ type: integer
+ pageTitle:
+ description: The prometheus web page title.
+ type: string
+ tlsConfig:
+ description: Defines the TLS parameters for HTTPS.
+ properties:
+ cert:
+ description: Contains the TLS certificate for the server.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ cipherSuites:
+ description: 'List of supported cipher suites for TLS versions
+ up to TLS 1.2. If empty, Go default cipher suites are used.
+ Available cipher suites are documented in the go documentation:
+ https://golang.org/pkg/crypto/tls/#pkg-constants'
+ items:
+ type: string
+ type: array
+ client_ca:
+ description: Contains the CA certificate for client certificate
+ authentication to the server.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ clientAuthType:
+ description: 'Server policy for client authentication. Maps
+ to ClientAuth Policies. For more detail on clientAuth options:
+ https://golang.org/pkg/crypto/tls/#ClientAuthType'
+ type: string
+ curvePreferences:
+ description: 'Elliptic curves that will be used in an ECDHE
+ handshake, in preference order. Available curves are documented
+ in the go documentation: https://golang.org/pkg/crypto/tls/#CurveID'
+ items:
+ type: string
+ type: array
+ keySecret:
+ description: Secret containing the TLS key for the server.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ maxVersion:
+ description: Maximum TLS version that is acceptable. Defaults
+ to TLS13.
+ type: string
+ minVersion:
+ description: Minimum TLS version that is acceptable. Defaults
+ to TLS12.
+ type: string
+ preferServerCipherSuites:
+ description: Controls whether the server selects the client's
+ most preferred cipher suite, or the server's most preferred
+ cipher suite. If true then the server's preference, as expressed
+ in the order of elements in cipherSuites, is used.
+ type: boolean
+ required:
+ - cert
+ - keySecret
+ type: object
+ type: object
+ type: object
+ status:
+ description: 'Most recent observed status of the Prometheus cluster. Read-only.
+ More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status'
+ properties:
+ availableReplicas:
+ description: Total number of available pods (ready for at least minReadySeconds)
+ targeted by this Prometheus deployment.
+ format: int32
+ type: integer
+ conditions:
+ description: The current state of the Prometheus deployment.
+ items:
+ description: Condition represents the state of the resources associated
+ with the Prometheus, Alertmanager or ThanosRuler resource.
+ properties:
+ lastTransitionTime:
+ description: lastTransitionTime is the time of the last update
+ to the current status property.
+ format: date-time
+ type: string
+ message:
+ description: Human-readable message indicating details for the
+ condition's last transition.
+ type: string
+ observedGeneration:
+ description: ObservedGeneration represents the .metadata.generation
+ that the condition was set based upon. For instance, if `.metadata.generation`
+ is currently 12, but the `.status.conditions[].observedGeneration`
+ is 9, the condition is out of date with respect to the current
+ state of the instance.
+ format: int64
+ type: integer
+ reason:
+ description: Reason for the condition's last transition.
+ type: string
+ status:
+ description: Status of the condition.
+ type: string
+ type:
+ description: Type of the condition being reported.
+ type: string
+ required:
+ - lastTransitionTime
+ - status
+ - type
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - type
+ x-kubernetes-list-type: map
+ paused:
+ description: Represents whether any actions on the underlying managed
+ objects are being performed. Only delete actions will be performed.
+ type: boolean
+ replicas:
+ description: Total number of non-terminated pods targeted by this
+ Prometheus deployment (their labels match the selector).
+ format: int32
+ type: integer
+ shardStatuses:
+ description: The list has one entry per shard. Each entry provides
+ a summary of the shard status.
+ items:
+ properties:
+ availableReplicas:
+ description: Total number of available pods (ready for at least
+ minReadySeconds) targeted by this shard.
+ format: int32
+ type: integer
+ replicas:
+ description: Total number of pods targeted by this shard.
+ format: int32
+ type: integer
+ shardID:
+ description: Identifier of the shard.
+ type: string
+ unavailableReplicas:
+ description: Total number of unavailable pods targeted by this
+ shard.
+ format: int32
+ type: integer
+ updatedReplicas:
+ description: Total number of non-terminated pods targeted by
+ this shard that have the desired spec.
+ format: int32
+ type: integer
+ required:
+ - availableReplicas
+ - replicas
+ - shardID
+ - unavailableReplicas
+ - updatedReplicas
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - shardID
+ x-kubernetes-list-type: map
+ unavailableReplicas:
+ description: Total number of unavailable pods targeted by this Prometheus
+ deployment.
+ format: int32
+ type: integer
+ updatedReplicas:
+ description: Total number of non-terminated pods targeted by this
+ Prometheus deployment that have the desired version spec.
+ format: int32
+ type: integer
+ required:
+ - availableReplicas
+ - paused
+ - replicas
+ - unavailableReplicas
+ - updatedReplicas
+ type: object
+ required:
+ - spec
+ type: object
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/crds/crd-prometheuses.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/crds/crd-prometheuses.yaml
new file mode 100644
index 0000000000..200d033eea
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/crds/crd-prometheuses.yaml
@@ -0,0 +1,9741 @@
+# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.68.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml
+---
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+ annotations:
+ controller-gen.kubebuilder.io/version: v0.11.1
+ creationTimestamp: null
+ name: prometheuses.monitoring.coreos.com
+spec:
+ group: monitoring.coreos.com
+ names:
+ categories:
+ - prometheus-operator
+ kind: Prometheus
+ listKind: PrometheusList
+ plural: prometheuses
+ shortNames:
+ - prom
+ singular: prometheus
+ scope: Namespaced
+ versions:
+ - additionalPrinterColumns:
+ - description: The version of Prometheus
+ jsonPath: .spec.version
+ name: Version
+ type: string
+ - description: The number of desired replicas
+ jsonPath: .spec.replicas
+ name: Desired
+ type: integer
+ - description: The number of ready replicas
+ jsonPath: .status.availableReplicas
+ name: Ready
+ type: integer
+ - jsonPath: .status.conditions[?(@.type == 'Reconciled')].status
+ name: Reconciled
+ type: string
+ - jsonPath: .status.conditions[?(@.type == 'Available')].status
+ name: Available
+ type: string
+ - jsonPath: .metadata.creationTimestamp
+ name: Age
+ type: date
+ - description: Whether the resource reconciliation is paused or not
+ jsonPath: .status.paused
+ name: Paused
+ priority: 1
+ type: boolean
+ name: v1
+ schema:
+ openAPIV3Schema:
+ description: Prometheus defines a Prometheus deployment.
+ properties:
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation
+ of an object. Servers should convert recognized schemas to the latest
+ internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this
+ object represents. Servers may infer this from the endpoint the client
+ submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: 'Specification of the desired behavior of the Prometheus
+ cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status'
+ properties:
+ additionalAlertManagerConfigs:
+ description: "AdditionalAlertManagerConfigs specifies a key of a Secret
+ containing additional Prometheus Alertmanager configurations. The
+ Alertmanager configurations are appended to the configuration generated
+ by the Prometheus Operator. They must be formatted according to
+ the official Prometheus documentation: \n https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alertmanager_config
+ \n The user is responsible for making sure that the configurations
+ are valid \n 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 AlertManager configs
+ are going to break Prometheus after the upgrade."
+ properties:
+ key:
+ description: The key of the secret to select from. Must be a
+ valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ additionalAlertRelabelConfigs:
+ description: "AdditionalAlertRelabelConfigs specifies a key of a Secret
+ containing additional Prometheus alert relabel configurations. The
+ alert relabel configurations are appended to the configuration generated
+ by the Prometheus Operator. They must be formatted according to
+ the official Prometheus documentation: \n https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alert_relabel_configs
+ \n The user is responsible for making sure that the configurations
+ are valid \n 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 alert relabel configs
+ are going to break Prometheus after the upgrade."
+ properties:
+ key:
+ description: The key of the secret to select from. Must be a
+ valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ additionalArgs:
+ description: "AdditionalArgs allows setting additional arguments for
+ the 'prometheus' container. \n It is intended for e.g. activating
+ hidden flags which are not supported by the dedicated configuration
+ options yet. The arguments are passed as-is to the Prometheus container
+ which may cause issues if they are invalid or not supported by the
+ given Prometheus version. \n In case of an argument conflict (e.g.
+ an argument which is already set by the operator itself) or when
+ providing an invalid argument, the reconciliation will fail and
+ an error will be logged."
+ items:
+ description: Argument as part of the AdditionalArgs list.
+ properties:
+ name:
+ description: Name of the argument, e.g. "scrape.discovery-reload-interval".
+ minLength: 1
+ type: string
+ value:
+ description: Argument value, e.g. 30s. Can be empty for name-only
+ arguments (e.g. --storage.tsdb.no-lockfile)
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ additionalScrapeConfigs:
+ description: 'AdditionalScrapeConfigs allows specifying a key of a
+ Secret containing additional Prometheus scrape configurations. Scrape
+ configurations specified are appended to the configurations generated
+ by the Prometheus Operator. Job configurations specified must have
+ the form as specified in the official Prometheus documentation:
+ https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config.
+ As scrape configs are 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.'
+ properties:
+ key:
+ description: The key of the secret to select from. Must be a
+ valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ affinity:
+ description: Defines the Pods' affinity scheduling rules if specified.
+ properties:
+ nodeAffinity:
+ description: Describes node affinity scheduling rules for the
+ pod.
+ properties:
+ preferredDuringSchedulingIgnoredDuringExecution:
+ description: The scheduler will prefer to schedule pods to
+ nodes that satisfy the affinity expressions specified by
+ this field, but it may choose a node that violates one or
+ more of the expressions. The node that is most preferred
+ is the one with the greatest sum of weights, i.e. for each
+ node that meets all of the scheduling requirements (resource
+ request, requiredDuringScheduling affinity expressions,
+ etc.), compute a sum by iterating through the elements of
+ this field and adding "weight" to the sum if the node matches
+ the corresponding matchExpressions; the node(s) with the
+ highest sum are the most preferred.
+ items:
+ description: An empty preferred scheduling term matches
+ all objects with implicit weight 0 (i.e. it's a no-op).
+ A null preferred scheduling term matches no objects (i.e.
+ is also a no-op).
+ properties:
+ preference:
+ description: A node selector term, associated with the
+ corresponding weight.
+ properties:
+ matchExpressions:
+ description: A list of node selector requirements
+ by node's labels.
+ items:
+ description: A node selector requirement is a
+ selector that contains values, a key, and an
+ operator that relates the key and values.
+ properties:
+ key:
+ description: The label key that the selector
+ applies to.
+ type: string
+ operator:
+ description: Represents a key's relationship
+ to a set of values. Valid operators are
+ In, NotIn, Exists, DoesNotExist. Gt, and
+ Lt.
+ type: string
+ values:
+ description: An array of string values. If
+ the operator is In or NotIn, the values
+ array must be non-empty. If the operator
+ is Exists or DoesNotExist, the values array
+ must be empty. If the operator is Gt or
+ Lt, the values array must have a single
+ element, which will be interpreted as an
+ integer. This array is replaced during a
+ strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchFields:
+ description: A list of node selector requirements
+ by node's fields.
+ items:
+ description: A node selector requirement is a
+ selector that contains values, a key, and an
+ operator that relates the key and values.
+ properties:
+ key:
+ description: The label key that the selector
+ applies to.
+ type: string
+ operator:
+ description: Represents a key's relationship
+ to a set of values. Valid operators are
+ In, NotIn, Exists, DoesNotExist. Gt, and
+ Lt.
+ type: string
+ values:
+ description: An array of string values. If
+ the operator is In or NotIn, the values
+ array must be non-empty. If the operator
+ is Exists or DoesNotExist, the values array
+ must be empty. If the operator is Gt or
+ Lt, the values array must have a single
+ element, which will be interpreted as an
+ integer. This array is replaced during a
+ strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ type: object
+ x-kubernetes-map-type: atomic
+ weight:
+ description: Weight associated with matching the corresponding
+ nodeSelectorTerm, in the range 1-100.
+ format: int32
+ type: integer
+ required:
+ - preference
+ - weight
+ type: object
+ type: array
+ requiredDuringSchedulingIgnoredDuringExecution:
+ description: If the affinity requirements specified by this
+ field are not met at scheduling time, the pod will not be
+ scheduled onto the node. If the affinity requirements specified
+ by this field cease to be met at some point during pod execution
+ (e.g. due to an update), the system may or may not try to
+ eventually evict the pod from its node.
+ properties:
+ nodeSelectorTerms:
+ description: Required. A list of node selector terms.
+ The terms are ORed.
+ items:
+ description: A null or empty node selector term matches
+ no objects. The requirements of them are ANDed. The
+ TopologySelectorTerm type implements a subset of the
+ NodeSelectorTerm.
+ properties:
+ matchExpressions:
+ description: A list of node selector requirements
+ by node's labels.
+ items:
+ description: A node selector requirement is a
+ selector that contains values, a key, and an
+ operator that relates the key and values.
+ properties:
+ key:
+ description: The label key that the selector
+ applies to.
+ type: string
+ operator:
+ description: Represents a key's relationship
+ to a set of values. Valid operators are
+ In, NotIn, Exists, DoesNotExist. Gt, and
+ Lt.
+ type: string
+ values:
+ description: An array of string values. If
+ the operator is In or NotIn, the values
+ array must be non-empty. If the operator
+ is Exists or DoesNotExist, the values array
+ must be empty. If the operator is Gt or
+ Lt, the values array must have a single
+ element, which will be interpreted as an
+ integer. This array is replaced during a
+ strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchFields:
+ description: A list of node selector requirements
+ by node's fields.
+ items:
+ description: A node selector requirement is a
+ selector that contains values, a key, and an
+ operator that relates the key and values.
+ properties:
+ key:
+ description: The label key that the selector
+ applies to.
+ type: string
+ operator:
+ description: Represents a key's relationship
+ to a set of values. Valid operators are
+ In, NotIn, Exists, DoesNotExist. Gt, and
+ Lt.
+ type: string
+ values:
+ description: An array of string values. If
+ the operator is In or NotIn, the values
+ array must be non-empty. If the operator
+ is Exists or DoesNotExist, the values array
+ must be empty. If the operator is Gt or
+ Lt, the values array must have a single
+ element, which will be interpreted as an
+ integer. This array is replaced during a
+ strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
+ required:
+ - nodeSelectorTerms
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ podAffinity:
+ description: Describes pod affinity scheduling rules (e.g. co-locate
+ this pod in the same node, zone, etc. as some other pod(s)).
+ properties:
+ preferredDuringSchedulingIgnoredDuringExecution:
+ description: The scheduler will prefer to schedule pods to
+ nodes that satisfy the affinity expressions specified by
+ this field, but it may choose a node that violates one or
+ more of the expressions. The node that is most preferred
+ is the one with the greatest sum of weights, i.e. for each
+ node that meets all of the scheduling requirements (resource
+ request, requiredDuringScheduling affinity expressions,
+ etc.), compute a sum by iterating through the elements of
+ this field and adding "weight" to the sum if the node has
+ pods which matches the corresponding podAffinityTerm; the
+ node(s) with the highest sum are the most preferred.
+ items:
+ description: The weights of all of the matched WeightedPodAffinityTerm
+ fields are added per-node to find the most preferred node(s)
+ properties:
+ podAffinityTerm:
+ description: Required. A pod affinity term, associated
+ with the corresponding weight.
+ properties:
+ labelSelector:
+ description: A label query over a set of resources,
+ in this case pods.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: A label selector requirement
+ is a selector that contains values, a key,
+ and an operator that relates the key and
+ values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's
+ relationship to a set of values. Valid
+ operators are In, NotIn, Exists and
+ DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty.
+ If the operator is Exists or DoesNotExist,
+ the values array must be empty. This
+ array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is
+ "In", and the values array contains only "value".
+ The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ namespaceSelector:
+ description: A label query over the set of namespaces
+ that the term applies to. The term is applied
+ to the union of the namespaces selected by this
+ field and the ones listed in the namespaces field.
+ null selector and null or empty namespaces list
+ means "this pod's namespace". An empty selector
+ ({}) matches all namespaces.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: A label selector requirement
+ is a selector that contains values, a key,
+ and an operator that relates the key and
+ values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's
+ relationship to a set of values. Valid
+ operators are In, NotIn, Exists and
+ DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty.
+ If the operator is Exists or DoesNotExist,
+ the values array must be empty. This
+ array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is
+ "In", and the values array contains only "value".
+ The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ namespaces:
+ description: namespaces specifies a static list
+ of namespace names that the term applies to. The
+ term is applied to the union of the namespaces
+ listed in this field and the ones selected by
+ namespaceSelector. null or empty namespaces list
+ and null namespaceSelector means "this pod's namespace".
+ items:
+ type: string
+ type: array
+ topologyKey:
+ description: This pod should be co-located (affinity)
+ or not co-located (anti-affinity) with the pods
+ matching the labelSelector in the specified namespaces,
+ where co-located is defined as running on a node
+ whose value of the label with key topologyKey
+ matches that of any node on which any of the selected
+ pods is running. Empty topologyKey is not allowed.
+ type: string
+ required:
+ - topologyKey
+ type: object
+ weight:
+ description: weight associated with matching the corresponding
+ podAffinityTerm, in the range 1-100.
+ format: int32
+ type: integer
+ required:
+ - podAffinityTerm
+ - weight
+ type: object
+ type: array
+ requiredDuringSchedulingIgnoredDuringExecution:
+ description: If the affinity requirements specified by this
+ field are not met at scheduling time, the pod will not be
+ scheduled onto the node. If the affinity requirements specified
+ by this field cease to be met at some point during pod execution
+ (e.g. due to a pod label update), the system may or may
+ not try to eventually evict the pod from its node. When
+ there are multiple elements, the lists of nodes corresponding
+ to each podAffinityTerm are intersected, i.e. all terms
+ must be satisfied.
+ items:
+ description: Defines a set of pods (namely those matching
+ the labelSelector relative to the given namespace(s))
+ that this pod should be co-located (affinity) or not co-located
+ (anti-affinity) with, where co-located is defined as running
+ on a node whose value of the label with key
+ matches that of any node on which a pod of the set of
+ pods is running
+ properties:
+ labelSelector:
+ description: A label query over a set of resources,
+ in this case pods.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are ANDed.
+ items:
+ description: A label selector requirement is a
+ selector that contains values, a key, and an
+ operator that relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's relationship
+ to a set of values. Valid operators are
+ In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty. If the
+ operator is Exists or DoesNotExist, the
+ values array must be empty. This array is
+ replaced during a strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is "In",
+ and the values array contains only "value". The
+ requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ namespaceSelector:
+ description: A label query over the set of namespaces
+ that the term applies to. The term is applied to the
+ union of the namespaces selected by this field and
+ the ones listed in the namespaces field. null selector
+ and null or empty namespaces list means "this pod's
+ namespace". An empty selector ({}) matches all namespaces.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are ANDed.
+ items:
+ description: A label selector requirement is a
+ selector that contains values, a key, and an
+ operator that relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's relationship
+ to a set of values. Valid operators are
+ In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty. If the
+ operator is Exists or DoesNotExist, the
+ values array must be empty. This array is
+ replaced during a strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is "In",
+ and the values array contains only "value". The
+ requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ namespaces:
+ description: namespaces specifies a static list of namespace
+ names that the term applies to. The term is applied
+ to the union of the namespaces listed in this field
+ and the ones selected by namespaceSelector. null or
+ empty namespaces list and null namespaceSelector means
+ "this pod's namespace".
+ items:
+ type: string
+ type: array
+ topologyKey:
+ description: This pod should be co-located (affinity)
+ or not co-located (anti-affinity) with the pods matching
+ the labelSelector in the specified namespaces, where
+ co-located is defined as running on a node whose value
+ of the label with key topologyKey matches that of
+ any node on which any of the selected pods is running.
+ Empty topologyKey is not allowed.
+ type: string
+ required:
+ - topologyKey
+ type: object
+ type: array
+ type: object
+ podAntiAffinity:
+ description: Describes pod anti-affinity scheduling rules (e.g.
+ avoid putting this pod in the same node, zone, etc. as some
+ other pod(s)).
+ properties:
+ preferredDuringSchedulingIgnoredDuringExecution:
+ description: The scheduler will prefer to schedule pods to
+ nodes that satisfy the anti-affinity expressions specified
+ by this field, but it may choose a node that violates one
+ or more of the expressions. The node that is most preferred
+ is the one with the greatest sum of weights, i.e. for each
+ node that meets all of the scheduling requirements (resource
+ request, requiredDuringScheduling anti-affinity expressions,
+ etc.), compute a sum by iterating through the elements of
+ this field and adding "weight" to the sum if the node has
+ pods which matches the corresponding podAffinityTerm; the
+ node(s) with the highest sum are the most preferred.
+ items:
+ description: The weights of all of the matched WeightedPodAffinityTerm
+ fields are added per-node to find the most preferred node(s)
+ properties:
+ podAffinityTerm:
+ description: Required. A pod affinity term, associated
+ with the corresponding weight.
+ properties:
+ labelSelector:
+ description: A label query over a set of resources,
+ in this case pods.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: A label selector requirement
+ is a selector that contains values, a key,
+ and an operator that relates the key and
+ values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's
+ relationship to a set of values. Valid
+ operators are In, NotIn, Exists and
+ DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty.
+ If the operator is Exists or DoesNotExist,
+ the values array must be empty. This
+ array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is
+ "In", and the values array contains only "value".
+ The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ namespaceSelector:
+ description: A label query over the set of namespaces
+ that the term applies to. The term is applied
+ to the union of the namespaces selected by this
+ field and the ones listed in the namespaces field.
+ null selector and null or empty namespaces list
+ means "this pod's namespace". An empty selector
+ ({}) matches all namespaces.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: A label selector requirement
+ is a selector that contains values, a key,
+ and an operator that relates the key and
+ values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's
+ relationship to a set of values. Valid
+ operators are In, NotIn, Exists and
+ DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty.
+ If the operator is Exists or DoesNotExist,
+ the values array must be empty. This
+ array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is
+ "In", and the values array contains only "value".
+ The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ namespaces:
+ description: namespaces specifies a static list
+ of namespace names that the term applies to. The
+ term is applied to the union of the namespaces
+ listed in this field and the ones selected by
+ namespaceSelector. null or empty namespaces list
+ and null namespaceSelector means "this pod's namespace".
+ items:
+ type: string
+ type: array
+ topologyKey:
+ description: This pod should be co-located (affinity)
+ or not co-located (anti-affinity) with the pods
+ matching the labelSelector in the specified namespaces,
+ where co-located is defined as running on a node
+ whose value of the label with key topologyKey
+ matches that of any node on which any of the selected
+ pods is running. Empty topologyKey is not allowed.
+ type: string
+ required:
+ - topologyKey
+ type: object
+ weight:
+ description: weight associated with matching the corresponding
+ podAffinityTerm, in the range 1-100.
+ format: int32
+ type: integer
+ required:
+ - podAffinityTerm
+ - weight
+ type: object
+ type: array
+ requiredDuringSchedulingIgnoredDuringExecution:
+ description: If the anti-affinity requirements specified by
+ this field are not met at scheduling time, the pod will
+ not be scheduled onto the node. If the anti-affinity requirements
+ specified by this field cease to be met at some point during
+ pod execution (e.g. due to a pod label update), the system
+ may or may not try to eventually evict the pod from its
+ node. When there are multiple elements, the lists of nodes
+ corresponding to each podAffinityTerm are intersected, i.e.
+ all terms must be satisfied.
+ items:
+ description: Defines a set of pods (namely those matching
+ the labelSelector relative to the given namespace(s))
+ that this pod should be co-located (affinity) or not co-located
+ (anti-affinity) with, where co-located is defined as running
+ on a node whose value of the label with key
+ matches that of any node on which a pod of the set of
+ pods is running
+ properties:
+ labelSelector:
+ description: A label query over a set of resources,
+ in this case pods.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are ANDed.
+ items:
+ description: A label selector requirement is a
+ selector that contains values, a key, and an
+ operator that relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's relationship
+ to a set of values. Valid operators are
+ In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty. If the
+ operator is Exists or DoesNotExist, the
+ values array must be empty. This array is
+ replaced during a strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is "In",
+ and the values array contains only "value". The
+ requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ namespaceSelector:
+ description: A label query over the set of namespaces
+ that the term applies to. The term is applied to the
+ union of the namespaces selected by this field and
+ the ones listed in the namespaces field. null selector
+ and null or empty namespaces list means "this pod's
+ namespace". An empty selector ({}) matches all namespaces.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are ANDed.
+ items:
+ description: A label selector requirement is a
+ selector that contains values, a key, and an
+ operator that relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's relationship
+ to a set of values. Valid operators are
+ In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty. If the
+ operator is Exists or DoesNotExist, the
+ values array must be empty. This array is
+ replaced during a strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is "In",
+ and the values array contains only "value". The
+ requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ namespaces:
+ description: namespaces specifies a static list of namespace
+ names that the term applies to. The term is applied
+ to the union of the namespaces listed in this field
+ and the ones selected by namespaceSelector. null or
+ empty namespaces list and null namespaceSelector means
+ "this pod's namespace".
+ items:
+ type: string
+ type: array
+ topologyKey:
+ description: This pod should be co-located (affinity)
+ or not co-located (anti-affinity) with the pods matching
+ the labelSelector in the specified namespaces, where
+ co-located is defined as running on a node whose value
+ of the label with key topologyKey matches that of
+ any node on which any of the selected pods is running.
+ Empty topologyKey is not allowed.
+ type: string
+ required:
+ - topologyKey
+ type: object
+ type: array
+ type: object
+ type: object
+ alerting:
+ description: Defines the settings related to Alertmanager.
+ properties:
+ alertmanagers:
+ description: AlertmanagerEndpoints Prometheus should fire alerts
+ against.
+ items:
+ description: AlertmanagerEndpoints defines a selection of a
+ single Endpoints object containing Alertmanager IPs to fire
+ alerts against.
+ properties:
+ apiVersion:
+ description: Version of the Alertmanager API that Prometheus
+ uses to send alerts. It can be "v1" or "v2".
+ type: string
+ authorization:
+ description: "Authorization section for Alertmanager. \n
+ Cannot be set at the same time as `basicAuth`, or `bearerTokenFile`."
+ properties:
+ credentials:
+ description: Selects a key of a Secret in the namespace
+ that contains the credentials for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type:
+ description: "Defines the authentication type. The value
+ is case-insensitive. \n \"Basic\" is not a supported
+ value. \n Default: \"Bearer\""
+ type: string
+ type: object
+ basicAuth:
+ description: "BasicAuth configuration for Alertmanager.
+ \n Cannot be set at the same time as `bearerTokenFile`,
+ or `authorization`."
+ properties:
+ password:
+ description: The secret in the service monitor namespace
+ that contains the password for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ username:
+ description: The secret in the service monitor namespace
+ that contains the username for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ bearerTokenFile:
+ description: "File to read bearer token for Alertmanager.
+ \n Cannot be set at the same time as `basicAuth`, or `authorization`.
+ \n *Deprecated: this will be removed in a future release.
+ Prefer using `authorization`.*"
+ type: string
+ enableHttp2:
+ description: Whether to enable HTTP2.
+ type: boolean
+ name:
+ description: Name of the Endpoints object in the namespace.
+ type: string
+ namespace:
+ description: Namespace of the Endpoints object.
+ type: string
+ pathPrefix:
+ description: Prefix for the HTTP path alerts are pushed
+ to.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Port on which the Alertmanager API is exposed.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use when firing alerts.
+ type: string
+ timeout:
+ description: Timeout is a per-target Alertmanager timeout
+ when pushing alerts.
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ tlsConfig:
+ description: TLS Config to use for Alertmanager.
+ properties:
+ ca:
+ description: Certificate authority used when verifying
+ server certificates.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for
+ the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ caFile:
+ description: Path to the CA cert in the Prometheus container
+ to use for the targets.
+ type: string
+ cert:
+ description: Client certificate to present when doing
+ client-authentication.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for
+ the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key of the secret to select
+ from. Must be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion,
+ kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ certFile:
+ description: Path to the client cert file in the Prometheus
+ container for the targets.
+ type: string
+ insecureSkipVerify:
+ description: Disable target certificate validation.
+ type: boolean
+ keyFile:
+ description: Path to the client key file in the Prometheus
+ container for the targets.
+ type: string
+ keySecret:
+ description: Secret containing the client key file for
+ the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ serverName:
+ description: Used to verify the hostname for the targets.
+ type: string
+ type: object
+ required:
+ - name
+ - namespace
+ - port
+ type: object
+ type: array
+ required:
+ - alertmanagers
+ type: object
+ allowOverlappingBlocks:
+ description: "AllowOverlappingBlocks enables vertical compaction and
+ vertical query merge in Prometheus. \n *Deprecated: this flag has
+ no effect for Prometheus >= 2.39.0 where overlapping blocks are
+ enabled by default.*"
+ type: boolean
+ apiserverConfig:
+ description: 'APIServerConfig allows specifying a host and auth methods
+ to access the Kuberntees API server. If null, Prometheus is assumed
+ to run inside of the cluster: it will discover the API servers automatically
+ and use the Pod''s CA certificate and bearer token file at /var/run/secrets/kubernetes.io/serviceaccount/.'
+ properties:
+ authorization:
+ description: "Authorization section for the API server. \n Cannot
+ be set at the same time as `basicAuth`, `bearerToken`, or `bearerTokenFile`."
+ properties:
+ credentials:
+ description: Selects a key of a Secret in the namespace that
+ contains the credentials for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ credentialsFile:
+ description: File to read a secret from, mutually exclusive
+ with `credentials`.
+ type: string
+ type:
+ description: "Defines the authentication type. The value is
+ case-insensitive. \n \"Basic\" is not a supported value.
+ \n Default: \"Bearer\""
+ type: string
+ type: object
+ basicAuth:
+ description: "BasicAuth configuration for the API server. \n Cannot
+ be set at the same time as `authorization`, `bearerToken`, or
+ `bearerTokenFile`."
+ properties:
+ password:
+ description: The secret in the service monitor namespace that
+ contains the password for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ username:
+ description: The secret in the service monitor namespace that
+ contains the username for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ bearerToken:
+ description: "*Warning: this field shouldn't be used because the
+ token value appears in clear-text. Prefer using `authorization`.*
+ \n *Deprecated: this will be removed in a future release.*"
+ type: string
+ bearerTokenFile:
+ description: "File to read bearer token for accessing apiserver.
+ \n Cannot be set at the same time as `basicAuth`, `authorization`,
+ or `bearerToken`. \n *Deprecated: this will be removed in a
+ future release. Prefer using `authorization`.*"
+ type: string
+ host:
+ description: Kubernetes API address consisting of a hostname or
+ IP address followed by an optional port number.
+ type: string
+ tlsConfig:
+ description: TLS Config to use for the API server.
+ properties:
+ ca:
+ description: Certificate authority used when verifying server
+ certificates.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ caFile:
+ description: Path to the CA cert in the Prometheus container
+ to use for the targets.
+ type: string
+ cert:
+ description: Client certificate to present when doing client-authentication.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ certFile:
+ description: Path to the client cert file in the Prometheus
+ container for the targets.
+ type: string
+ insecureSkipVerify:
+ description: Disable target certificate validation.
+ type: boolean
+ keyFile:
+ description: Path to the client key file in the Prometheus
+ container for the targets.
+ type: string
+ keySecret:
+ description: Secret containing the client key file for the
+ targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ serverName:
+ description: Used to verify the hostname for the targets.
+ type: string
+ type: object
+ required:
+ - host
+ type: object
+ arbitraryFSAccessThroughSMs:
+ description: When true, ServiceMonitor, PodMonitor and Probe object
+ are forbidden to reference arbitrary files on the file system of
+ the 'prometheus' container. When a ServiceMonitor's endpoint specifies
+ a `bearerTokenFile` value (e.g. '/var/run/secrets/kubernetes.io/serviceaccount/token'),
+ a malicious target can get access to the Prometheus service account's
+ token in the Prometheus' scrape request. Setting `spec.arbitraryFSAccessThroughSM`
+ to 'true' would prevent the attack. Users should instead provide
+ the credentials using the `spec.bearerTokenSecret` field.
+ properties:
+ deny:
+ type: boolean
+ type: object
+ baseImage:
+ description: '*Deprecated: use ''spec.image'' instead.*'
+ type: string
+ bodySizeLimit:
+ description: BodySizeLimit defines per-scrape on response body size.
+ Only valid in Prometheus versions 2.45.0 and newer.
+ pattern: (^0|([0-9]*[.])?[0-9]+((K|M|G|T|E|P)i?)?B)$
+ type: string
+ configMaps:
+ description: ConfigMaps is a list of ConfigMaps in the same namespace
+ as the Prometheus object, which shall be mounted into the Prometheus
+ Pods. Each ConfigMap is added to the StatefulSet definition as a
+ volume named `configmap-`. The ConfigMaps are mounted
+ into /etc/prometheus/configmaps/ in the 'prometheus'
+ container.
+ items:
+ type: string
+ type: array
+ containers:
+ description: "Containers allows injecting additional containers or
+ modifying operator generated containers. This can be used to allow
+ adding an authentication proxy to the Pods or to change the behavior
+ of an operator generated container. Containers described here modify
+ an operator generated container if they share the same name and
+ modifications are done via a strategic merge patch. \n The names
+ of containers managed by the operator are: * `prometheus` * `config-reloader`
+ * `thanos-sidecar` \n Overriding containers is entirely outside
+ the scope of what the maintainers will support and by doing so,
+ you accept that this behaviour may break at any time without notice."
+ items:
+ description: A single application container that you want to run
+ within a pod.
+ properties:
+ args:
+ description: 'Arguments to the entrypoint. The container image''s
+ CMD is used if this is not provided. Variable references $(VAR_NAME)
+ are expanded using the container''s environment. If a variable
+ cannot be resolved, the reference in the input string will
+ be unchanged. Double $$ are reduced to a single $, which allows
+ for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will
+ produce the string literal "$(VAR_NAME)". Escaped references
+ will never be expanded, regardless of whether the variable
+ exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'
+ items:
+ type: string
+ type: array
+ command:
+ description: 'Entrypoint array. Not executed within a shell.
+ The container image''s ENTRYPOINT is used if this is not provided.
+ Variable references $(VAR_NAME) are expanded using the container''s
+ environment. If a variable cannot be resolved, the reference
+ in the input string will be unchanged. Double $$ are reduced
+ to a single $, which allows for escaping the $(VAR_NAME) syntax:
+ i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)".
+ Escaped references will never be expanded, regardless of whether
+ the variable exists or not. Cannot be updated. More info:
+ https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'
+ items:
+ type: string
+ type: array
+ env:
+ description: List of environment variables to set in the container.
+ Cannot be updated.
+ items:
+ description: EnvVar represents an environment variable present
+ in a Container.
+ properties:
+ name:
+ description: Name of the environment variable. Must be
+ a C_IDENTIFIER.
+ type: string
+ value:
+ description: 'Variable references $(VAR_NAME) are expanded
+ using the previously defined environment variables in
+ the container and any service environment variables.
+ If a variable cannot be resolved, the reference in the
+ input string will be unchanged. Double $$ are reduced
+ to a single $, which allows for escaping the $(VAR_NAME)
+ syntax: i.e. "$$(VAR_NAME)" will produce the string
+ literal "$(VAR_NAME)". Escaped references will never
+ be expanded, regardless of whether the variable exists
+ or not. Defaults to "".'
+ type: string
+ valueFrom:
+ description: Source for the environment variable's value.
+ Cannot be used if value is not empty.
+ properties:
+ configMapKeyRef:
+ description: Selects a key of a ConfigMap.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ fieldRef:
+ description: 'Selects a field of the pod: supports
+ metadata.name, metadata.namespace, `metadata.labels['''']`,
+ `metadata.annotations['''']`, spec.nodeName,
+ spec.serviceAccountName, status.hostIP, status.podIP,
+ status.podIPs.'
+ properties:
+ apiVersion:
+ description: Version of the schema the FieldPath
+ is written in terms of, defaults to "v1".
+ type: string
+ fieldPath:
+ description: Path of the field to select in the
+ specified API version.
+ type: string
+ required:
+ - fieldPath
+ type: object
+ x-kubernetes-map-type: atomic
+ resourceFieldRef:
+ description: 'Selects a resource of the container:
+ only resources limits and requests (limits.cpu,
+ limits.memory, limits.ephemeral-storage, requests.cpu,
+ requests.memory and requests.ephemeral-storage)
+ are currently supported.'
+ properties:
+ containerName:
+ description: 'Container name: required for volumes,
+ optional for env vars'
+ type: string
+ divisor:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Specifies the output format of the
+ exposed resources, defaults to "1"
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ resource:
+ description: 'Required: resource to select'
+ type: string
+ required:
+ - resource
+ type: object
+ x-kubernetes-map-type: atomic
+ secretKeyRef:
+ description: Selects a key of a secret in the pod's
+ namespace
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ required:
+ - name
+ type: object
+ type: array
+ envFrom:
+ description: List of sources to populate environment variables
+ in the container. The keys defined within a source must be
+ a C_IDENTIFIER. All invalid keys will be reported as an event
+ when the container is starting. When a key exists in multiple
+ sources, the value associated with the last source will take
+ precedence. Values defined by an Env with a duplicate key
+ will take precedence. Cannot be updated.
+ items:
+ description: EnvFromSource represents the source of a set
+ of ConfigMaps
+ properties:
+ configMapRef:
+ description: The ConfigMap to select from
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap must be
+ defined
+ type: boolean
+ type: object
+ x-kubernetes-map-type: atomic
+ prefix:
+ description: An optional identifier to prepend to each
+ key in the ConfigMap. Must be a C_IDENTIFIER.
+ type: string
+ secretRef:
+ description: The Secret to select from
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret must be defined
+ type: boolean
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ image:
+ description: 'Container image name. More info: https://kubernetes.io/docs/concepts/containers/images
+ This field is optional to allow higher level config management
+ to default or override container images in workload controllers
+ like Deployments and StatefulSets.'
+ type: string
+ imagePullPolicy:
+ description: 'Image pull policy. One of Always, Never, IfNotPresent.
+ Defaults to Always if :latest tag is specified, or IfNotPresent
+ otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images'
+ type: string
+ lifecycle:
+ description: Actions that the management system should take
+ in response to container lifecycle events. Cannot be updated.
+ properties:
+ postStart:
+ description: 'PostStart is called immediately after a container
+ is created. If the handler fails, the container is terminated
+ and restarted according to its restart policy. Other management
+ of the container blocks until the hook completes. More
+ info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for
+ the command is root ('/') in the container's
+ filesystem. The command is simply exec'd, it is
+ not run inside a shell, so traditional shell instructions
+ ('|', etc) won't work. To use a shell, you need
+ to explicitly call out to that shell. Exit status
+ of 0 is treated as live/healthy and non-zero is
+ unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to
+ the pod IP. You probably want to set "Host" in
+ httpHeaders instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request.
+ HTTP allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access
+ on the container. Number must be in the range
+ 1 to 65535. Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the
+ host. Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ tcpSocket:
+ description: Deprecated. TCPSocket is NOT supported
+ as a LifecycleHandler and kept for the backward compatibility.
+ There are no validation of this field and lifecycle
+ hooks will fail in runtime when tcp handler is specified.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to,
+ defaults to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access
+ on the container. Number must be in the range
+ 1 to 65535. Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ type: object
+ preStop:
+ description: 'PreStop is called immediately before a container
+ is terminated due to an API request or management event
+ such as liveness/startup probe failure, preemption, resource
+ contention, etc. The handler is not called if the container
+ crashes or exits. The Pod''s termination grace period
+ countdown begins before the PreStop hook is executed.
+ Regardless of the outcome of the handler, the container
+ will eventually terminate within the Pod''s termination
+ grace period (unless delayed by finalizers). Other management
+ of the container blocks until the hook completes or until
+ the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for
+ the command is root ('/') in the container's
+ filesystem. The command is simply exec'd, it is
+ not run inside a shell, so traditional shell instructions
+ ('|', etc) won't work. To use a shell, you need
+ to explicitly call out to that shell. Exit status
+ of 0 is treated as live/healthy and non-zero is
+ unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to
+ the pod IP. You probably want to set "Host" in
+ httpHeaders instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request.
+ HTTP allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access
+ on the container. Number must be in the range
+ 1 to 65535. Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the
+ host. Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ tcpSocket:
+ description: Deprecated. TCPSocket is NOT supported
+ as a LifecycleHandler and kept for the backward compatibility.
+ There are no validation of this field and lifecycle
+ hooks will fail in runtime when tcp handler is specified.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to,
+ defaults to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access
+ on the container. Number must be in the range
+ 1 to 65535. Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ type: object
+ type: object
+ livenessProbe:
+ description: 'Periodic probe of container liveness. Container
+ will be restarted if the probe fails. Cannot be updated. More
+ info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for the
+ command is root ('/') in the container's filesystem.
+ The command is simply exec'd, it is not run inside
+ a shell, so traditional shell instructions ('|', etc)
+ won't work. To use a shell, you need to explicitly
+ call out to that shell. Exit status of 0 is treated
+ as live/healthy and non-zero is unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ failureThreshold:
+ description: Minimum consecutive failures for the probe
+ to be considered failed after having succeeded. Defaults
+ to 3. Minimum value is 1.
+ format: int32
+ type: integer
+ grpc:
+ description: GRPC specifies an action involving a GRPC port.
+ properties:
+ port:
+ description: Port number of the gRPC service. Number
+ must be in the range 1 to 65535.
+ format: int32
+ type: integer
+ service:
+ description: "Service is the name of the service to
+ place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
+ \n If this is not specified, the default behavior
+ is defined by gRPC."
+ type: string
+ required:
+ - port
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to the
+ pod IP. You probably want to set "Host" in httpHeaders
+ instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request. HTTP
+ allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the host.
+ Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ initialDelaySeconds:
+ description: 'Number of seconds after the container has
+ started before liveness probes are initiated. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ periodSeconds:
+ description: How often (in seconds) to perform the probe.
+ Default to 10 seconds. Minimum value is 1.
+ format: int32
+ type: integer
+ successThreshold:
+ description: Minimum consecutive successes for the probe
+ to be considered successful after having failed. Defaults
+ to 1. Must be 1 for liveness and startup. Minimum value
+ is 1.
+ format: int32
+ type: integer
+ tcpSocket:
+ description: TCPSocket specifies an action involving a TCP
+ port.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to, defaults
+ to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ terminationGracePeriodSeconds:
+ description: Optional duration in seconds the pod needs
+ to terminate gracefully upon probe failure. The grace
+ period is the duration in seconds after the processes
+ running in the pod are sent a termination signal and the
+ time when the processes are forcibly halted with a kill
+ signal. Set this value longer than the expected cleanup
+ time for your process. If this value is nil, the pod's
+ terminationGracePeriodSeconds will be used. Otherwise,
+ this value overrides the value provided by the pod spec.
+ Value must be non-negative integer. The value zero indicates
+ stop immediately via the kill signal (no opportunity to
+ shut down). This is a beta field and requires enabling
+ ProbeTerminationGracePeriod feature gate. Minimum value
+ is 1. spec.terminationGracePeriodSeconds is used if unset.
+ format: int64
+ type: integer
+ timeoutSeconds:
+ description: 'Number of seconds after which the probe times
+ out. Defaults to 1 second. Minimum value is 1. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ type: object
+ name:
+ description: Name of the container specified as a DNS_LABEL.
+ Each container in a pod must have a unique name (DNS_LABEL).
+ Cannot be updated.
+ type: string
+ ports:
+ description: List of ports to expose from the container. Not
+ specifying a port here DOES NOT prevent that port from being
+ exposed. Any port which is listening on the default "0.0.0.0"
+ address inside a container will be accessible from the network.
+ Modifying this array with strategic merge patch may corrupt
+ the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255.
+ Cannot be updated.
+ items:
+ description: ContainerPort represents a network port in a
+ single container.
+ properties:
+ containerPort:
+ description: Number of port to expose on the pod's IP
+ address. This must be a valid port number, 0 < x < 65536.
+ format: int32
+ type: integer
+ hostIP:
+ description: What host IP to bind the external port to.
+ type: string
+ hostPort:
+ description: Number of port to expose on the host. If
+ specified, this must be a valid port number, 0 < x <
+ 65536. If HostNetwork is specified, this must match
+ ContainerPort. Most containers do not need this.
+ format: int32
+ type: integer
+ name:
+ description: If specified, this must be an IANA_SVC_NAME
+ and unique within the pod. Each named port in a pod
+ must have a unique name. Name for the port that can
+ be referred to by services.
+ type: string
+ protocol:
+ default: TCP
+ description: Protocol for port. Must be UDP, TCP, or SCTP.
+ Defaults to "TCP".
+ type: string
+ required:
+ - containerPort
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - containerPort
+ - protocol
+ x-kubernetes-list-type: map
+ readinessProbe:
+ description: 'Periodic probe of container service readiness.
+ Container will be removed from service endpoints if the probe
+ fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for the
+ command is root ('/') in the container's filesystem.
+ The command is simply exec'd, it is not run inside
+ a shell, so traditional shell instructions ('|', etc)
+ won't work. To use a shell, you need to explicitly
+ call out to that shell. Exit status of 0 is treated
+ as live/healthy and non-zero is unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ failureThreshold:
+ description: Minimum consecutive failures for the probe
+ to be considered failed after having succeeded. Defaults
+ to 3. Minimum value is 1.
+ format: int32
+ type: integer
+ grpc:
+ description: GRPC specifies an action involving a GRPC port.
+ properties:
+ port:
+ description: Port number of the gRPC service. Number
+ must be in the range 1 to 65535.
+ format: int32
+ type: integer
+ service:
+ description: "Service is the name of the service to
+ place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
+ \n If this is not specified, the default behavior
+ is defined by gRPC."
+ type: string
+ required:
+ - port
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to the
+ pod IP. You probably want to set "Host" in httpHeaders
+ instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request. HTTP
+ allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the host.
+ Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ initialDelaySeconds:
+ description: 'Number of seconds after the container has
+ started before liveness probes are initiated. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ periodSeconds:
+ description: How often (in seconds) to perform the probe.
+ Default to 10 seconds. Minimum value is 1.
+ format: int32
+ type: integer
+ successThreshold:
+ description: Minimum consecutive successes for the probe
+ to be considered successful after having failed. Defaults
+ to 1. Must be 1 for liveness and startup. Minimum value
+ is 1.
+ format: int32
+ type: integer
+ tcpSocket:
+ description: TCPSocket specifies an action involving a TCP
+ port.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to, defaults
+ to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ terminationGracePeriodSeconds:
+ description: Optional duration in seconds the pod needs
+ to terminate gracefully upon probe failure. The grace
+ period is the duration in seconds after the processes
+ running in the pod are sent a termination signal and the
+ time when the processes are forcibly halted with a kill
+ signal. Set this value longer than the expected cleanup
+ time for your process. If this value is nil, the pod's
+ terminationGracePeriodSeconds will be used. Otherwise,
+ this value overrides the value provided by the pod spec.
+ Value must be non-negative integer. The value zero indicates
+ stop immediately via the kill signal (no opportunity to
+ shut down). This is a beta field and requires enabling
+ ProbeTerminationGracePeriod feature gate. Minimum value
+ is 1. spec.terminationGracePeriodSeconds is used if unset.
+ format: int64
+ type: integer
+ timeoutSeconds:
+ description: 'Number of seconds after which the probe times
+ out. Defaults to 1 second. Minimum value is 1. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ type: object
+ resizePolicy:
+ description: Resources resize policy for the container.
+ items:
+ description: ContainerResizePolicy represents resource resize
+ policy for the container.
+ properties:
+ resourceName:
+ description: 'Name of the resource to which this resource
+ resize policy applies. Supported values: cpu, memory.'
+ type: string
+ restartPolicy:
+ description: Restart policy to apply when specified resource
+ is resized. If not specified, it defaults to NotRequired.
+ type: string
+ required:
+ - resourceName
+ - restartPolicy
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ resources:
+ description: 'Compute Resources required by this container.
+ Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ properties:
+ claims:
+ description: "Claims lists the names of resources, defined
+ in spec.resourceClaims, that are used by this container.
+ \n This is an alpha field and requires enabling the DynamicResourceAllocation
+ feature gate. \n This field is immutable. It can only
+ be set for containers."
+ items:
+ description: ResourceClaim references one entry in PodSpec.ResourceClaims.
+ properties:
+ name:
+ description: Name must match the name of one entry
+ in pod.spec.resourceClaims of the Pod where this
+ field is used. It makes that resource available
+ inside a container.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - name
+ x-kubernetes-list-type: map
+ limits:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Limits describes the maximum amount of compute
+ resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ requests:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Requests describes the minimum amount of compute
+ resources required. If Requests is omitted for a container,
+ it defaults to Limits if that is explicitly specified,
+ otherwise to an implementation-defined value. Requests
+ cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ type: object
+ restartPolicy:
+ description: 'RestartPolicy defines the restart behavior of
+ individual containers in a pod. This field may only be set
+ for init containers, and the only allowed value is "Always".
+ For non-init containers or when this field is not specified,
+ the restart behavior is defined by the Pod''s restart policy
+ and the container type. Setting the RestartPolicy as "Always"
+ for the init container will have the following effect: this
+ init container will be continually restarted on exit until
+ all regular containers have terminated. Once all regular containers
+ have completed, all init containers with restartPolicy "Always"
+ will be shut down. This lifecycle differs from normal init
+ containers and is often referred to as a "sidecar" container.
+ Although this init container still starts in the init container
+ sequence, it does not wait for the container to complete before
+ proceeding to the next init container. Instead, the next init
+ container starts immediately after this init container is
+ started, or after any startupProbe has successfully completed.'
+ type: string
+ securityContext:
+ description: 'SecurityContext defines the security options the
+ container should be run with. If set, the fields of SecurityContext
+ override the equivalent fields of PodSecurityContext. More
+ info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/'
+ properties:
+ allowPrivilegeEscalation:
+ description: 'AllowPrivilegeEscalation controls whether
+ a process can gain more privileges than its parent process.
+ This bool directly controls if the no_new_privs flag will
+ be set on the container process. AllowPrivilegeEscalation
+ is true always when the container is: 1) run as Privileged
+ 2) has CAP_SYS_ADMIN Note that this field cannot be set
+ when spec.os.name is windows.'
+ type: boolean
+ capabilities:
+ description: The capabilities to add/drop when running containers.
+ Defaults to the default set of capabilities granted by
+ the container runtime. Note that this field cannot be
+ set when spec.os.name is windows.
+ properties:
+ add:
+ description: Added capabilities
+ items:
+ description: Capability represent POSIX capabilities
+ type
+ type: string
+ type: array
+ drop:
+ description: Removed capabilities
+ items:
+ description: Capability represent POSIX capabilities
+ type
+ type: string
+ type: array
+ type: object
+ privileged:
+ description: Run container in privileged mode. Processes
+ in privileged containers are essentially equivalent to
+ root on the host. Defaults to false. Note that this field
+ cannot be set when spec.os.name is windows.
+ type: boolean
+ procMount:
+ description: procMount denotes the type of proc mount to
+ use for the containers. The default is DefaultProcMount
+ which uses the container runtime defaults for readonly
+ paths and masked paths. This requires the ProcMountType
+ feature flag to be enabled. Note that this field cannot
+ be set when spec.os.name is windows.
+ type: string
+ readOnlyRootFilesystem:
+ description: Whether this container has a read-only root
+ filesystem. Default is false. Note that this field cannot
+ be set when spec.os.name is windows.
+ type: boolean
+ runAsGroup:
+ description: The GID to run the entrypoint of the container
+ process. Uses runtime default if unset. May also be set
+ in PodSecurityContext. If set in both SecurityContext
+ and PodSecurityContext, the value specified in SecurityContext
+ takes precedence. Note that this field cannot be set when
+ spec.os.name is windows.
+ format: int64
+ type: integer
+ runAsNonRoot:
+ description: Indicates that the container must run as a
+ non-root user. If true, the Kubelet will validate the
+ image at runtime to ensure that it does not run as UID
+ 0 (root) and fail to start the container if it does. If
+ unset or false, no such validation will be performed.
+ May also be set in PodSecurityContext. If set in both
+ SecurityContext and PodSecurityContext, the value specified
+ in SecurityContext takes precedence.
+ type: boolean
+ runAsUser:
+ description: The UID to run the entrypoint of the container
+ process. Defaults to user specified in image metadata
+ if unspecified. May also be set in PodSecurityContext. If
+ set in both SecurityContext and PodSecurityContext, the
+ value specified in SecurityContext takes precedence. Note
+ that this field cannot be set when spec.os.name is windows.
+ format: int64
+ type: integer
+ seLinuxOptions:
+ description: The SELinux context to be applied to the container.
+ If unspecified, the container runtime will allocate a
+ random SELinux context for each container. May also be
+ set in PodSecurityContext. If set in both SecurityContext
+ and PodSecurityContext, the value specified in SecurityContext
+ takes precedence. Note that this field cannot be set when
+ spec.os.name is windows.
+ properties:
+ level:
+ description: Level is SELinux level label that applies
+ to the container.
+ type: string
+ role:
+ description: Role is a SELinux role label that applies
+ to the container.
+ type: string
+ type:
+ description: Type is a SELinux type label that applies
+ to the container.
+ type: string
+ user:
+ description: User is a SELinux user label that applies
+ to the container.
+ type: string
+ type: object
+ seccompProfile:
+ description: The seccomp options to use by this container.
+ If seccomp options are provided at both the pod & container
+ level, the container options override the pod options.
+ Note that this field cannot be set when spec.os.name is
+ windows.
+ properties:
+ localhostProfile:
+ description: localhostProfile indicates a profile defined
+ in a file on the node should be used. The profile
+ must be preconfigured on the node to work. Must be
+ a descending path, relative to the kubelet's configured
+ seccomp profile location. Must be set if type is "Localhost".
+ Must NOT be set for any other type.
+ type: string
+ type:
+ description: "type indicates which kind of seccomp profile
+ will be applied. Valid options are: \n Localhost -
+ a profile defined in a file on the node should be
+ used. RuntimeDefault - the container runtime default
+ profile should be used. Unconfined - no profile should
+ be applied."
+ type: string
+ required:
+ - type
+ type: object
+ windowsOptions:
+ description: The Windows specific settings applied to all
+ containers. If unspecified, the options from the PodSecurityContext
+ will be used. If set in both SecurityContext and PodSecurityContext,
+ the value specified in SecurityContext takes precedence.
+ Note that this field cannot be set when spec.os.name is
+ linux.
+ properties:
+ gmsaCredentialSpec:
+ description: GMSACredentialSpec is where the GMSA admission
+ webhook (https://github.com/kubernetes-sigs/windows-gmsa)
+ inlines the contents of the GMSA credential spec named
+ by the GMSACredentialSpecName field.
+ type: string
+ gmsaCredentialSpecName:
+ description: GMSACredentialSpecName is the name of the
+ GMSA credential spec to use.
+ type: string
+ hostProcess:
+ description: HostProcess determines if a container should
+ be run as a 'Host Process' container. All of a Pod's
+ containers must have the same effective HostProcess
+ value (it is not allowed to have a mix of HostProcess
+ containers and non-HostProcess containers). In addition,
+ if HostProcess is true then HostNetwork must also
+ be set to true.
+ type: boolean
+ runAsUserName:
+ description: The UserName in Windows to run the entrypoint
+ of the container process. Defaults to the user specified
+ in image metadata if unspecified. May also be set
+ in PodSecurityContext. If set in both SecurityContext
+ and PodSecurityContext, the value specified in SecurityContext
+ takes precedence.
+ type: string
+ type: object
+ type: object
+ startupProbe:
+ description: 'StartupProbe indicates that the Pod has successfully
+ initialized. If specified, no other probes are executed until
+ this completes successfully. If this probe fails, the Pod
+ will be restarted, just as if the livenessProbe failed. This
+ can be used to provide different probe parameters at the beginning
+ of a Pod''s lifecycle, when it might take a long time to load
+ data or warm a cache, than during steady-state operation.
+ This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for the
+ command is root ('/') in the container's filesystem.
+ The command is simply exec'd, it is not run inside
+ a shell, so traditional shell instructions ('|', etc)
+ won't work. To use a shell, you need to explicitly
+ call out to that shell. Exit status of 0 is treated
+ as live/healthy and non-zero is unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ failureThreshold:
+ description: Minimum consecutive failures for the probe
+ to be considered failed after having succeeded. Defaults
+ to 3. Minimum value is 1.
+ format: int32
+ type: integer
+ grpc:
+ description: GRPC specifies an action involving a GRPC port.
+ properties:
+ port:
+ description: Port number of the gRPC service. Number
+ must be in the range 1 to 65535.
+ format: int32
+ type: integer
+ service:
+ description: "Service is the name of the service to
+ place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
+ \n If this is not specified, the default behavior
+ is defined by gRPC."
+ type: string
+ required:
+ - port
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to the
+ pod IP. You probably want to set "Host" in httpHeaders
+ instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request. HTTP
+ allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the host.
+ Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ initialDelaySeconds:
+ description: 'Number of seconds after the container has
+ started before liveness probes are initiated. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ periodSeconds:
+ description: How often (in seconds) to perform the probe.
+ Default to 10 seconds. Minimum value is 1.
+ format: int32
+ type: integer
+ successThreshold:
+ description: Minimum consecutive successes for the probe
+ to be considered successful after having failed. Defaults
+ to 1. Must be 1 for liveness and startup. Minimum value
+ is 1.
+ format: int32
+ type: integer
+ tcpSocket:
+ description: TCPSocket specifies an action involving a TCP
+ port.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to, defaults
+ to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ terminationGracePeriodSeconds:
+ description: Optional duration in seconds the pod needs
+ to terminate gracefully upon probe failure. The grace
+ period is the duration in seconds after the processes
+ running in the pod are sent a termination signal and the
+ time when the processes are forcibly halted with a kill
+ signal. Set this value longer than the expected cleanup
+ time for your process. If this value is nil, the pod's
+ terminationGracePeriodSeconds will be used. Otherwise,
+ this value overrides the value provided by the pod spec.
+ Value must be non-negative integer. The value zero indicates
+ stop immediately via the kill signal (no opportunity to
+ shut down). This is a beta field and requires enabling
+ ProbeTerminationGracePeriod feature gate. Minimum value
+ is 1. spec.terminationGracePeriodSeconds is used if unset.
+ format: int64
+ type: integer
+ timeoutSeconds:
+ description: 'Number of seconds after which the probe times
+ out. Defaults to 1 second. Minimum value is 1. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ type: object
+ stdin:
+ description: Whether this container should allocate a buffer
+ for stdin in the container runtime. If this is not set, reads
+ from stdin in the container will always result in EOF. Default
+ is false.
+ type: boolean
+ stdinOnce:
+ description: Whether the container runtime should close the
+ stdin channel after it has been opened by a single attach.
+ When stdin is true the stdin stream will remain open across
+ multiple attach sessions. If stdinOnce is set to true, stdin
+ is opened on container start, is empty until the first client
+ attaches to stdin, and then remains open and accepts data
+ until the client disconnects, at which time stdin is closed
+ and remains closed until the container is restarted. If this
+ flag is false, a container processes that reads from stdin
+ will never receive an EOF. Default is false
+ type: boolean
+ terminationMessagePath:
+ description: 'Optional: Path at which the file to which the
+ container''s termination message will be written is mounted
+ into the container''s filesystem. Message written is intended
+ to be brief final status, such as an assertion failure message.
+ Will be truncated by the node if greater than 4096 bytes.
+ The total message length across all containers will be limited
+ to 12kb. Defaults to /dev/termination-log. Cannot be updated.'
+ type: string
+ terminationMessagePolicy:
+ description: Indicate how the termination message should be
+ populated. File will use the contents of terminationMessagePath
+ to populate the container status message on both success and
+ failure. FallbackToLogsOnError will use the last chunk of
+ container log output if the termination message file is empty
+ and the container exited with an error. The log output is
+ limited to 2048 bytes or 80 lines, whichever is smaller. Defaults
+ to File. Cannot be updated.
+ type: string
+ tty:
+ description: Whether this container should allocate a TTY for
+ itself, also requires 'stdin' to be true. Default is false.
+ type: boolean
+ volumeDevices:
+ description: volumeDevices is the list of block devices to be
+ used by the container.
+ items:
+ description: volumeDevice describes a mapping of a raw block
+ device within a container.
+ properties:
+ devicePath:
+ description: devicePath is the path inside of the container
+ that the device will be mapped to.
+ type: string
+ name:
+ description: name must match the name of a persistentVolumeClaim
+ in the pod
+ type: string
+ required:
+ - devicePath
+ - name
+ type: object
+ type: array
+ volumeMounts:
+ description: Pod volumes to mount into the container's filesystem.
+ Cannot be updated.
+ items:
+ description: VolumeMount describes a mounting of a Volume
+ within a container.
+ properties:
+ mountPath:
+ description: Path within the container at which the volume
+ should be mounted. Must not contain ':'.
+ type: string
+ mountPropagation:
+ description: mountPropagation determines how mounts are
+ propagated from the host to container and the other
+ way around. When not set, MountPropagationNone is used.
+ This field is beta in 1.10.
+ type: string
+ name:
+ description: This must match the Name of a Volume.
+ type: string
+ readOnly:
+ description: Mounted read-only if true, read-write otherwise
+ (false or unspecified). Defaults to false.
+ type: boolean
+ subPath:
+ description: Path within the volume from which the container's
+ volume should be mounted. Defaults to "" (volume's root).
+ type: string
+ subPathExpr:
+ description: Expanded path within the volume from which
+ the container's volume should be mounted. Behaves similarly
+ to SubPath but environment variable references $(VAR_NAME)
+ are expanded using the container's environment. Defaults
+ to "" (volume's root). SubPathExpr and SubPath are mutually
+ exclusive.
+ type: string
+ required:
+ - mountPath
+ - name
+ type: object
+ type: array
+ workingDir:
+ description: Container's working directory. If not specified,
+ the container runtime's default will be used, which might
+ be configured in the container image. Cannot be updated.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ disableCompaction:
+ description: When true, the Prometheus compaction is disabled.
+ type: boolean
+ enableAdminAPI:
+ description: "Enables access to the Prometheus web admin API. \n WARNING:
+ Enabling the admin APIs enables mutating endpoints, to delete data,
+ shutdown Prometheus, and more. Enabling this should be done with
+ care and the user is advised to add additional authentication authorization
+ via a proxy to ensure only clients authorized to perform these actions
+ can do so. \n For more information: https://prometheus.io/docs/prometheus/latest/querying/api/#tsdb-admin-apis"
+ type: boolean
+ enableFeatures:
+ description: "Enable access to Prometheus feature flags. By default,
+ no features are enabled. \n Enabling features which are disabled
+ by default is entirely outside the scope of what the maintainers
+ will support and by doing so, you accept that this behaviour may
+ break at any time without notice. \n For more information see https://prometheus.io/docs/prometheus/latest/feature_flags/"
+ items:
+ type: string
+ type: array
+ enableRemoteWriteReceiver:
+ description: "Enable Prometheus to be used as a receiver for the Prometheus
+ remote write protocol. \n WARNING: This is not considered an efficient
+ way of ingesting samples. Use it with caution for specific low-volume
+ use cases. It is not suitable for replacing the ingestion via scraping
+ and turning Prometheus into a push-based metrics collection system.
+ For more information see https://prometheus.io/docs/prometheus/latest/querying/api/#remote-write-receiver
+ \n It requires Prometheus >= v2.33.0."
+ type: boolean
+ enforcedBodySizeLimit:
+ description: "When defined, enforcedBodySizeLimit specifies a global
+ limit on the size of uncompressed response body that will be accepted
+ by Prometheus. Targets responding with a body larger than this many
+ bytes will cause the scrape to fail. \n It requires Prometheus >=
+ v2.28.0."
+ pattern: (^0|([0-9]*[.])?[0-9]+((K|M|G|T|E|P)i?)?B)$
+ type: string
+ enforcedKeepDroppedTargets:
+ description: "When defined, enforcedKeepDroppedTargets specifies a
+ global limit on the number of targets dropped by relabeling that
+ will be kept in memory. The value overrides any `spec.keepDroppedTargets`
+ set by ServiceMonitor, PodMonitor, Probe objects unless `spec.keepDroppedTargets`
+ is greater than zero and less than `spec.enforcedKeepDroppedTargets`.
+ \n It requires Prometheus >= v2.47.0."
+ format: int64
+ type: integer
+ enforcedLabelLimit:
+ description: "When defined, enforcedLabelLimit specifies a global
+ limit on the number of labels per sample. The value overrides any
+ `spec.labelLimit` set by ServiceMonitor, PodMonitor, Probe objects
+ unless `spec.labelLimit` is greater than zero and less than `spec.enforcedLabelLimit`.
+ \n It requires Prometheus >= v2.27.0."
+ format: int64
+ type: integer
+ enforcedLabelNameLengthLimit:
+ description: "When defined, enforcedLabelNameLengthLimit specifies
+ a global limit on the length of labels name per sample. The value
+ overrides any `spec.labelNameLengthLimit` set by ServiceMonitor,
+ PodMonitor, Probe objects unless `spec.labelNameLengthLimit` is
+ greater than zero and less than `spec.enforcedLabelNameLengthLimit`.
+ \n It requires Prometheus >= v2.27.0."
+ format: int64
+ type: integer
+ enforcedLabelValueLengthLimit:
+ description: "When not null, enforcedLabelValueLengthLimit defines
+ a global limit on the length of labels value per sample. The value
+ overrides any `spec.labelValueLengthLimit` set by ServiceMonitor,
+ PodMonitor, Probe objects unless `spec.labelValueLengthLimit` is
+ greater than zero and less than `spec.enforcedLabelValueLengthLimit`.
+ \n It requires Prometheus >= v2.27.0."
+ format: int64
+ type: integer
+ enforcedNamespaceLabel:
+ description: "When not empty, a label will be added to \n 1. All metrics
+ scraped from `ServiceMonitor`, `PodMonitor`, `Probe` and `ScrapeConfig`
+ objects. 2. All metrics generated from recording rules defined in
+ `PrometheusRule` objects. 3. All alerts generated from alerting
+ rules defined in `PrometheusRule` objects. 4. All vector selectors
+ of PromQL expressions defined in `PrometheusRule` objects. \n The
+ label will not added for objects referenced in `spec.excludedFromEnforcement`.
+ \n The label's name is this field's value. The label's value is
+ the namespace of the `ServiceMonitor`, `PodMonitor`, `Probe` or
+ `PrometheusRule` object."
+ type: string
+ enforcedSampleLimit:
+ description: "When defined, enforcedSampleLimit specifies a global
+ limit on the number of scraped samples that will be accepted. This
+ overrides any `spec.sampleLimit` set by ServiceMonitor, PodMonitor,
+ Probe objects unless `spec.sampleLimit` is greater than zero and
+ less than than `spec.enforcedSampleLimit`. \n It is meant to be
+ used by admins to keep the overall number of samples/series under
+ a desired limit."
+ format: int64
+ type: integer
+ enforcedTargetLimit:
+ description: "When defined, enforcedTargetLimit specifies a global
+ limit on the number of scraped targets. The value overrides any
+ `spec.targetLimit` set by ServiceMonitor, PodMonitor, Probe objects
+ unless `spec.targetLimit` is greater than zero and less than `spec.enforcedTargetLimit`.
+ \n It is meant to be used by admins to to keep the overall number
+ of targets under a desired limit."
+ format: int64
+ type: integer
+ evaluationInterval:
+ default: 30s
+ description: 'Interval between rule evaluations. Default: "30s"'
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ excludedFromEnforcement:
+ description: "List of references to PodMonitor, ServiceMonitor, Probe
+ and PrometheusRule objects to be excluded from enforcing a namespace
+ label of origin. \n It is only applicable if `spec.enforcedNamespaceLabel`
+ set to true."
+ items:
+ description: ObjectReference references a PodMonitor, ServiceMonitor,
+ Probe or PrometheusRule object.
+ properties:
+ group:
+ default: monitoring.coreos.com
+ description: Group of the referent. When not specified, it defaults
+ to `monitoring.coreos.com`
+ enum:
+ - monitoring.coreos.com
+ type: string
+ name:
+ description: Name of the referent. When not set, all resources
+ in the namespace are matched.
+ type: string
+ namespace:
+ description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
+ minLength: 1
+ type: string
+ resource:
+ description: Resource of the referent.
+ enum:
+ - prometheusrules
+ - servicemonitors
+ - podmonitors
+ - probes
+ - scrapeconfigs
+ type: string
+ required:
+ - namespace
+ - resource
+ type: object
+ type: array
+ exemplars:
+ description: Exemplars related settings that are runtime reloadable.
+ It requires to enable the `exemplar-storage` feature flag to be
+ effective.
+ properties:
+ maxSize:
+ description: "Maximum number of exemplars stored in memory for
+ all series. \n exemplar-storage itself must be enabled using
+ the `spec.enableFeature` option for exemplars to be scraped
+ in the first place. \n If not set, Prometheus uses its default
+ value. A value of zero or less than zero disables the storage."
+ format: int64
+ type: integer
+ type: object
+ externalLabels:
+ additionalProperties:
+ type: string
+ description: The labels to add to any time series or alerts when communicating
+ with external systems (federation, remote storage, Alertmanager).
+ Labels defined by `spec.replicaExternalLabelName` and `spec.prometheusExternalLabelName`
+ take precedence over this list.
+ type: object
+ externalUrl:
+ description: The external URL under which the Prometheus service is
+ externally available. This is necessary to generate correct URLs
+ (for instance if Prometheus is accessible behind an Ingress resource).
+ type: string
+ hostAliases:
+ description: Optional list of hosts and IPs that will be injected
+ into the Pod's hosts file if specified.
+ items:
+ description: HostAlias holds the mapping between IP and hostnames
+ that will be injected as an entry in the pod's hosts file.
+ properties:
+ hostnames:
+ description: Hostnames for the above IP address.
+ items:
+ type: string
+ type: array
+ ip:
+ description: IP address of the host file entry.
+ type: string
+ required:
+ - hostnames
+ - ip
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - ip
+ x-kubernetes-list-type: map
+ hostNetwork:
+ description: "Use the host's network namespace if true. \n Make sure
+ to understand the security implications if you want to enable it
+ (https://kubernetes.io/docs/concepts/configuration/overview/). \n
+ When hostNetwork is enabled, this will set the DNS policy to `ClusterFirstWithHostNet`
+ automatically."
+ type: boolean
+ ignoreNamespaceSelectors:
+ description: When true, `spec.namespaceSelector` from all PodMonitor,
+ ServiceMonitor and Probe objects will be ignored. They will only
+ discover targets within the namespace of the PodMonitor, ServiceMonitor
+ and Probe objec.
+ type: boolean
+ image:
+ description: "Container image name for Prometheus. If specified, it
+ takes precedence over the `spec.baseImage`, `spec.tag` and `spec.sha`
+ fields. \n Specifying `spec.version` is still necessary to ensure
+ the Prometheus Operator knows which version of Prometheus is being
+ configured. \n If neither `spec.image` nor `spec.baseImage` are
+ defined, the operator will use the latest upstream version of Prometheus
+ available at the time when the operator was released."
+ type: string
+ imagePullPolicy:
+ description: Image pull policy for the 'prometheus', 'init-config-reloader'
+ and 'config-reloader' containers. See https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy
+ for more details.
+ enum:
+ - ""
+ - Always
+ - Never
+ - IfNotPresent
+ type: string
+ imagePullSecrets:
+ description: An optional list of references to Secrets in the same
+ namespace to use for pulling images from registries. See http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod
+ items:
+ description: LocalObjectReference contains enough information to
+ let you locate the referenced object inside the same namespace.
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
+ initContainers:
+ description: "InitContainers allows injecting initContainers to the
+ Pod definition. Those can be used to e.g. fetch secrets for injection
+ into the Prometheus configuration from external sources. Any errors
+ during the execution of an initContainer will lead to a restart
+ of the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
+ InitContainers described here modify an operator generated init
+ containers if they share the same name and modifications are done
+ via a strategic merge patch. \n The names of init container name
+ managed by the operator are: * `init-config-reloader`. \n Overriding
+ init containers is entirely outside the scope of what the maintainers
+ will support and by doing so, you accept that this behaviour may
+ break at any time without notice."
+ items:
+ description: A single application container that you want to run
+ within a pod.
+ properties:
+ args:
+ description: 'Arguments to the entrypoint. The container image''s
+ CMD is used if this is not provided. Variable references $(VAR_NAME)
+ are expanded using the container''s environment. If a variable
+ cannot be resolved, the reference in the input string will
+ be unchanged. Double $$ are reduced to a single $, which allows
+ for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will
+ produce the string literal "$(VAR_NAME)". Escaped references
+ will never be expanded, regardless of whether the variable
+ exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'
+ items:
+ type: string
+ type: array
+ command:
+ description: 'Entrypoint array. Not executed within a shell.
+ The container image''s ENTRYPOINT is used if this is not provided.
+ Variable references $(VAR_NAME) are expanded using the container''s
+ environment. If a variable cannot be resolved, the reference
+ in the input string will be unchanged. Double $$ are reduced
+ to a single $, which allows for escaping the $(VAR_NAME) syntax:
+ i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)".
+ Escaped references will never be expanded, regardless of whether
+ the variable exists or not. Cannot be updated. More info:
+ https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'
+ items:
+ type: string
+ type: array
+ env:
+ description: List of environment variables to set in the container.
+ Cannot be updated.
+ items:
+ description: EnvVar represents an environment variable present
+ in a Container.
+ properties:
+ name:
+ description: Name of the environment variable. Must be
+ a C_IDENTIFIER.
+ type: string
+ value:
+ description: 'Variable references $(VAR_NAME) are expanded
+ using the previously defined environment variables in
+ the container and any service environment variables.
+ If a variable cannot be resolved, the reference in the
+ input string will be unchanged. Double $$ are reduced
+ to a single $, which allows for escaping the $(VAR_NAME)
+ syntax: i.e. "$$(VAR_NAME)" will produce the string
+ literal "$(VAR_NAME)". Escaped references will never
+ be expanded, regardless of whether the variable exists
+ or not. Defaults to "".'
+ type: string
+ valueFrom:
+ description: Source for the environment variable's value.
+ Cannot be used if value is not empty.
+ properties:
+ configMapKeyRef:
+ description: Selects a key of a ConfigMap.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ fieldRef:
+ description: 'Selects a field of the pod: supports
+ metadata.name, metadata.namespace, `metadata.labels['''']`,
+ `metadata.annotations['''']`, spec.nodeName,
+ spec.serviceAccountName, status.hostIP, status.podIP,
+ status.podIPs.'
+ properties:
+ apiVersion:
+ description: Version of the schema the FieldPath
+ is written in terms of, defaults to "v1".
+ type: string
+ fieldPath:
+ description: Path of the field to select in the
+ specified API version.
+ type: string
+ required:
+ - fieldPath
+ type: object
+ x-kubernetes-map-type: atomic
+ resourceFieldRef:
+ description: 'Selects a resource of the container:
+ only resources limits and requests (limits.cpu,
+ limits.memory, limits.ephemeral-storage, requests.cpu,
+ requests.memory and requests.ephemeral-storage)
+ are currently supported.'
+ properties:
+ containerName:
+ description: 'Container name: required for volumes,
+ optional for env vars'
+ type: string
+ divisor:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Specifies the output format of the
+ exposed resources, defaults to "1"
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ resource:
+ description: 'Required: resource to select'
+ type: string
+ required:
+ - resource
+ type: object
+ x-kubernetes-map-type: atomic
+ secretKeyRef:
+ description: Selects a key of a secret in the pod's
+ namespace
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ required:
+ - name
+ type: object
+ type: array
+ envFrom:
+ description: List of sources to populate environment variables
+ in the container. The keys defined within a source must be
+ a C_IDENTIFIER. All invalid keys will be reported as an event
+ when the container is starting. When a key exists in multiple
+ sources, the value associated with the last source will take
+ precedence. Values defined by an Env with a duplicate key
+ will take precedence. Cannot be updated.
+ items:
+ description: EnvFromSource represents the source of a set
+ of ConfigMaps
+ properties:
+ configMapRef:
+ description: The ConfigMap to select from
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap must be
+ defined
+ type: boolean
+ type: object
+ x-kubernetes-map-type: atomic
+ prefix:
+ description: An optional identifier to prepend to each
+ key in the ConfigMap. Must be a C_IDENTIFIER.
+ type: string
+ secretRef:
+ description: The Secret to select from
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret must be defined
+ type: boolean
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ image:
+ description: 'Container image name. More info: https://kubernetes.io/docs/concepts/containers/images
+ This field is optional to allow higher level config management
+ to default or override container images in workload controllers
+ like Deployments and StatefulSets.'
+ type: string
+ imagePullPolicy:
+ description: 'Image pull policy. One of Always, Never, IfNotPresent.
+ Defaults to Always if :latest tag is specified, or IfNotPresent
+ otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images'
+ type: string
+ lifecycle:
+ description: Actions that the management system should take
+ in response to container lifecycle events. Cannot be updated.
+ properties:
+ postStart:
+ description: 'PostStart is called immediately after a container
+ is created. If the handler fails, the container is terminated
+ and restarted according to its restart policy. Other management
+ of the container blocks until the hook completes. More
+ info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for
+ the command is root ('/') in the container's
+ filesystem. The command is simply exec'd, it is
+ not run inside a shell, so traditional shell instructions
+ ('|', etc) won't work. To use a shell, you need
+ to explicitly call out to that shell. Exit status
+ of 0 is treated as live/healthy and non-zero is
+ unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to
+ the pod IP. You probably want to set "Host" in
+ httpHeaders instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request.
+ HTTP allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access
+ on the container. Number must be in the range
+ 1 to 65535. Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the
+ host. Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ tcpSocket:
+ description: Deprecated. TCPSocket is NOT supported
+ as a LifecycleHandler and kept for the backward compatibility.
+ There are no validation of this field and lifecycle
+ hooks will fail in runtime when tcp handler is specified.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to,
+ defaults to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access
+ on the container. Number must be in the range
+ 1 to 65535. Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ type: object
+ preStop:
+ description: 'PreStop is called immediately before a container
+ is terminated due to an API request or management event
+ such as liveness/startup probe failure, preemption, resource
+ contention, etc. The handler is not called if the container
+ crashes or exits. The Pod''s termination grace period
+ countdown begins before the PreStop hook is executed.
+ Regardless of the outcome of the handler, the container
+ will eventually terminate within the Pod''s termination
+ grace period (unless delayed by finalizers). Other management
+ of the container blocks until the hook completes or until
+ the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for
+ the command is root ('/') in the container's
+ filesystem. The command is simply exec'd, it is
+ not run inside a shell, so traditional shell instructions
+ ('|', etc) won't work. To use a shell, you need
+ to explicitly call out to that shell. Exit status
+ of 0 is treated as live/healthy and non-zero is
+ unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to
+ the pod IP. You probably want to set "Host" in
+ httpHeaders instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request.
+ HTTP allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access
+ on the container. Number must be in the range
+ 1 to 65535. Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the
+ host. Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ tcpSocket:
+ description: Deprecated. TCPSocket is NOT supported
+ as a LifecycleHandler and kept for the backward compatibility.
+ There are no validation of this field and lifecycle
+ hooks will fail in runtime when tcp handler is specified.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to,
+ defaults to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access
+ on the container. Number must be in the range
+ 1 to 65535. Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ type: object
+ type: object
+ livenessProbe:
+ description: 'Periodic probe of container liveness. Container
+ will be restarted if the probe fails. Cannot be updated. More
+ info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for the
+ command is root ('/') in the container's filesystem.
+ The command is simply exec'd, it is not run inside
+ a shell, so traditional shell instructions ('|', etc)
+ won't work. To use a shell, you need to explicitly
+ call out to that shell. Exit status of 0 is treated
+ as live/healthy and non-zero is unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ failureThreshold:
+ description: Minimum consecutive failures for the probe
+ to be considered failed after having succeeded. Defaults
+ to 3. Minimum value is 1.
+ format: int32
+ type: integer
+ grpc:
+ description: GRPC specifies an action involving a GRPC port.
+ properties:
+ port:
+ description: Port number of the gRPC service. Number
+ must be in the range 1 to 65535.
+ format: int32
+ type: integer
+ service:
+ description: "Service is the name of the service to
+ place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
+ \n If this is not specified, the default behavior
+ is defined by gRPC."
+ type: string
+ required:
+ - port
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to the
+ pod IP. You probably want to set "Host" in httpHeaders
+ instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request. HTTP
+ allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the host.
+ Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ initialDelaySeconds:
+ description: 'Number of seconds after the container has
+ started before liveness probes are initiated. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ periodSeconds:
+ description: How often (in seconds) to perform the probe.
+ Default to 10 seconds. Minimum value is 1.
+ format: int32
+ type: integer
+ successThreshold:
+ description: Minimum consecutive successes for the probe
+ to be considered successful after having failed. Defaults
+ to 1. Must be 1 for liveness and startup. Minimum value
+ is 1.
+ format: int32
+ type: integer
+ tcpSocket:
+ description: TCPSocket specifies an action involving a TCP
+ port.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to, defaults
+ to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ terminationGracePeriodSeconds:
+ description: Optional duration in seconds the pod needs
+ to terminate gracefully upon probe failure. The grace
+ period is the duration in seconds after the processes
+ running in the pod are sent a termination signal and the
+ time when the processes are forcibly halted with a kill
+ signal. Set this value longer than the expected cleanup
+ time for your process. If this value is nil, the pod's
+ terminationGracePeriodSeconds will be used. Otherwise,
+ this value overrides the value provided by the pod spec.
+ Value must be non-negative integer. The value zero indicates
+ stop immediately via the kill signal (no opportunity to
+ shut down). This is a beta field and requires enabling
+ ProbeTerminationGracePeriod feature gate. Minimum value
+ is 1. spec.terminationGracePeriodSeconds is used if unset.
+ format: int64
+ type: integer
+ timeoutSeconds:
+ description: 'Number of seconds after which the probe times
+ out. Defaults to 1 second. Minimum value is 1. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ type: object
+ name:
+ description: Name of the container specified as a DNS_LABEL.
+ Each container in a pod must have a unique name (DNS_LABEL).
+ Cannot be updated.
+ type: string
+ ports:
+ description: List of ports to expose from the container. Not
+ specifying a port here DOES NOT prevent that port from being
+ exposed. Any port which is listening on the default "0.0.0.0"
+ address inside a container will be accessible from the network.
+ Modifying this array with strategic merge patch may corrupt
+ the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255.
+ Cannot be updated.
+ items:
+ description: ContainerPort represents a network port in a
+ single container.
+ properties:
+ containerPort:
+ description: Number of port to expose on the pod's IP
+ address. This must be a valid port number, 0 < x < 65536.
+ format: int32
+ type: integer
+ hostIP:
+ description: What host IP to bind the external port to.
+ type: string
+ hostPort:
+ description: Number of port to expose on the host. If
+ specified, this must be a valid port number, 0 < x <
+ 65536. If HostNetwork is specified, this must match
+ ContainerPort. Most containers do not need this.
+ format: int32
+ type: integer
+ name:
+ description: If specified, this must be an IANA_SVC_NAME
+ and unique within the pod. Each named port in a pod
+ must have a unique name. Name for the port that can
+ be referred to by services.
+ type: string
+ protocol:
+ default: TCP
+ description: Protocol for port. Must be UDP, TCP, or SCTP.
+ Defaults to "TCP".
+ type: string
+ required:
+ - containerPort
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - containerPort
+ - protocol
+ x-kubernetes-list-type: map
+ readinessProbe:
+ description: 'Periodic probe of container service readiness.
+ Container will be removed from service endpoints if the probe
+ fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for the
+ command is root ('/') in the container's filesystem.
+ The command is simply exec'd, it is not run inside
+ a shell, so traditional shell instructions ('|', etc)
+ won't work. To use a shell, you need to explicitly
+ call out to that shell. Exit status of 0 is treated
+ as live/healthy and non-zero is unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ failureThreshold:
+ description: Minimum consecutive failures for the probe
+ to be considered failed after having succeeded. Defaults
+ to 3. Minimum value is 1.
+ format: int32
+ type: integer
+ grpc:
+ description: GRPC specifies an action involving a GRPC port.
+ properties:
+ port:
+ description: Port number of the gRPC service. Number
+ must be in the range 1 to 65535.
+ format: int32
+ type: integer
+ service:
+ description: "Service is the name of the service to
+ place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
+ \n If this is not specified, the default behavior
+ is defined by gRPC."
+ type: string
+ required:
+ - port
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to the
+ pod IP. You probably want to set "Host" in httpHeaders
+ instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request. HTTP
+ allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the host.
+ Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ initialDelaySeconds:
+ description: 'Number of seconds after the container has
+ started before liveness probes are initiated. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ periodSeconds:
+ description: How often (in seconds) to perform the probe.
+ Default to 10 seconds. Minimum value is 1.
+ format: int32
+ type: integer
+ successThreshold:
+ description: Minimum consecutive successes for the probe
+ to be considered successful after having failed. Defaults
+ to 1. Must be 1 for liveness and startup. Minimum value
+ is 1.
+ format: int32
+ type: integer
+ tcpSocket:
+ description: TCPSocket specifies an action involving a TCP
+ port.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to, defaults
+ to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ terminationGracePeriodSeconds:
+ description: Optional duration in seconds the pod needs
+ to terminate gracefully upon probe failure. The grace
+ period is the duration in seconds after the processes
+ running in the pod are sent a termination signal and the
+ time when the processes are forcibly halted with a kill
+ signal. Set this value longer than the expected cleanup
+ time for your process. If this value is nil, the pod's
+ terminationGracePeriodSeconds will be used. Otherwise,
+ this value overrides the value provided by the pod spec.
+ Value must be non-negative integer. The value zero indicates
+ stop immediately via the kill signal (no opportunity to
+ shut down). This is a beta field and requires enabling
+ ProbeTerminationGracePeriod feature gate. Minimum value
+ is 1. spec.terminationGracePeriodSeconds is used if unset.
+ format: int64
+ type: integer
+ timeoutSeconds:
+ description: 'Number of seconds after which the probe times
+ out. Defaults to 1 second. Minimum value is 1. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ type: object
+ resizePolicy:
+ description: Resources resize policy for the container.
+ items:
+ description: ContainerResizePolicy represents resource resize
+ policy for the container.
+ properties:
+ resourceName:
+ description: 'Name of the resource to which this resource
+ resize policy applies. Supported values: cpu, memory.'
+ type: string
+ restartPolicy:
+ description: Restart policy to apply when specified resource
+ is resized. If not specified, it defaults to NotRequired.
+ type: string
+ required:
+ - resourceName
+ - restartPolicy
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ resources:
+ description: 'Compute Resources required by this container.
+ Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ properties:
+ claims:
+ description: "Claims lists the names of resources, defined
+ in spec.resourceClaims, that are used by this container.
+ \n This is an alpha field and requires enabling the DynamicResourceAllocation
+ feature gate. \n This field is immutable. It can only
+ be set for containers."
+ items:
+ description: ResourceClaim references one entry in PodSpec.ResourceClaims.
+ properties:
+ name:
+ description: Name must match the name of one entry
+ in pod.spec.resourceClaims of the Pod where this
+ field is used. It makes that resource available
+ inside a container.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - name
+ x-kubernetes-list-type: map
+ limits:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Limits describes the maximum amount of compute
+ resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ requests:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Requests describes the minimum amount of compute
+ resources required. If Requests is omitted for a container,
+ it defaults to Limits if that is explicitly specified,
+ otherwise to an implementation-defined value. Requests
+ cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ type: object
+ restartPolicy:
+ description: 'RestartPolicy defines the restart behavior of
+ individual containers in a pod. This field may only be set
+ for init containers, and the only allowed value is "Always".
+ For non-init containers or when this field is not specified,
+ the restart behavior is defined by the Pod''s restart policy
+ and the container type. Setting the RestartPolicy as "Always"
+ for the init container will have the following effect: this
+ init container will be continually restarted on exit until
+ all regular containers have terminated. Once all regular containers
+ have completed, all init containers with restartPolicy "Always"
+ will be shut down. This lifecycle differs from normal init
+ containers and is often referred to as a "sidecar" container.
+ Although this init container still starts in the init container
+ sequence, it does not wait for the container to complete before
+ proceeding to the next init container. Instead, the next init
+ container starts immediately after this init container is
+ started, or after any startupProbe has successfully completed.'
+ type: string
+ securityContext:
+ description: 'SecurityContext defines the security options the
+ container should be run with. If set, the fields of SecurityContext
+ override the equivalent fields of PodSecurityContext. More
+ info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/'
+ properties:
+ allowPrivilegeEscalation:
+ description: 'AllowPrivilegeEscalation controls whether
+ a process can gain more privileges than its parent process.
+ This bool directly controls if the no_new_privs flag will
+ be set on the container process. AllowPrivilegeEscalation
+ is true always when the container is: 1) run as Privileged
+ 2) has CAP_SYS_ADMIN Note that this field cannot be set
+ when spec.os.name is windows.'
+ type: boolean
+ capabilities:
+ description: The capabilities to add/drop when running containers.
+ Defaults to the default set of capabilities granted by
+ the container runtime. Note that this field cannot be
+ set when spec.os.name is windows.
+ properties:
+ add:
+ description: Added capabilities
+ items:
+ description: Capability represent POSIX capabilities
+ type
+ type: string
+ type: array
+ drop:
+ description: Removed capabilities
+ items:
+ description: Capability represent POSIX capabilities
+ type
+ type: string
+ type: array
+ type: object
+ privileged:
+ description: Run container in privileged mode. Processes
+ in privileged containers are essentially equivalent to
+ root on the host. Defaults to false. Note that this field
+ cannot be set when spec.os.name is windows.
+ type: boolean
+ procMount:
+ description: procMount denotes the type of proc mount to
+ use for the containers. The default is DefaultProcMount
+ which uses the container runtime defaults for readonly
+ paths and masked paths. This requires the ProcMountType
+ feature flag to be enabled. Note that this field cannot
+ be set when spec.os.name is windows.
+ type: string
+ readOnlyRootFilesystem:
+ description: Whether this container has a read-only root
+ filesystem. Default is false. Note that this field cannot
+ be set when spec.os.name is windows.
+ type: boolean
+ runAsGroup:
+ description: The GID to run the entrypoint of the container
+ process. Uses runtime default if unset. May also be set
+ in PodSecurityContext. If set in both SecurityContext
+ and PodSecurityContext, the value specified in SecurityContext
+ takes precedence. Note that this field cannot be set when
+ spec.os.name is windows.
+ format: int64
+ type: integer
+ runAsNonRoot:
+ description: Indicates that the container must run as a
+ non-root user. If true, the Kubelet will validate the
+ image at runtime to ensure that it does not run as UID
+ 0 (root) and fail to start the container if it does. If
+ unset or false, no such validation will be performed.
+ May also be set in PodSecurityContext. If set in both
+ SecurityContext and PodSecurityContext, the value specified
+ in SecurityContext takes precedence.
+ type: boolean
+ runAsUser:
+ description: The UID to run the entrypoint of the container
+ process. Defaults to user specified in image metadata
+ if unspecified. May also be set in PodSecurityContext. If
+ set in both SecurityContext and PodSecurityContext, the
+ value specified in SecurityContext takes precedence. Note
+ that this field cannot be set when spec.os.name is windows.
+ format: int64
+ type: integer
+ seLinuxOptions:
+ description: The SELinux context to be applied to the container.
+ If unspecified, the container runtime will allocate a
+ random SELinux context for each container. May also be
+ set in PodSecurityContext. If set in both SecurityContext
+ and PodSecurityContext, the value specified in SecurityContext
+ takes precedence. Note that this field cannot be set when
+ spec.os.name is windows.
+ properties:
+ level:
+ description: Level is SELinux level label that applies
+ to the container.
+ type: string
+ role:
+ description: Role is a SELinux role label that applies
+ to the container.
+ type: string
+ type:
+ description: Type is a SELinux type label that applies
+ to the container.
+ type: string
+ user:
+ description: User is a SELinux user label that applies
+ to the container.
+ type: string
+ type: object
+ seccompProfile:
+ description: The seccomp options to use by this container.
+ If seccomp options are provided at both the pod & container
+ level, the container options override the pod options.
+ Note that this field cannot be set when spec.os.name is
+ windows.
+ properties:
+ localhostProfile:
+ description: localhostProfile indicates a profile defined
+ in a file on the node should be used. The profile
+ must be preconfigured on the node to work. Must be
+ a descending path, relative to the kubelet's configured
+ seccomp profile location. Must be set if type is "Localhost".
+ Must NOT be set for any other type.
+ type: string
+ type:
+ description: "type indicates which kind of seccomp profile
+ will be applied. Valid options are: \n Localhost -
+ a profile defined in a file on the node should be
+ used. RuntimeDefault - the container runtime default
+ profile should be used. Unconfined - no profile should
+ be applied."
+ type: string
+ required:
+ - type
+ type: object
+ windowsOptions:
+ description: The Windows specific settings applied to all
+ containers. If unspecified, the options from the PodSecurityContext
+ will be used. If set in both SecurityContext and PodSecurityContext,
+ the value specified in SecurityContext takes precedence.
+ Note that this field cannot be set when spec.os.name is
+ linux.
+ properties:
+ gmsaCredentialSpec:
+ description: GMSACredentialSpec is where the GMSA admission
+ webhook (https://github.com/kubernetes-sigs/windows-gmsa)
+ inlines the contents of the GMSA credential spec named
+ by the GMSACredentialSpecName field.
+ type: string
+ gmsaCredentialSpecName:
+ description: GMSACredentialSpecName is the name of the
+ GMSA credential spec to use.
+ type: string
+ hostProcess:
+ description: HostProcess determines if a container should
+ be run as a 'Host Process' container. All of a Pod's
+ containers must have the same effective HostProcess
+ value (it is not allowed to have a mix of HostProcess
+ containers and non-HostProcess containers). In addition,
+ if HostProcess is true then HostNetwork must also
+ be set to true.
+ type: boolean
+ runAsUserName:
+ description: The UserName in Windows to run the entrypoint
+ of the container process. Defaults to the user specified
+ in image metadata if unspecified. May also be set
+ in PodSecurityContext. If set in both SecurityContext
+ and PodSecurityContext, the value specified in SecurityContext
+ takes precedence.
+ type: string
+ type: object
+ type: object
+ startupProbe:
+ description: 'StartupProbe indicates that the Pod has successfully
+ initialized. If specified, no other probes are executed until
+ this completes successfully. If this probe fails, the Pod
+ will be restarted, just as if the livenessProbe failed. This
+ can be used to provide different probe parameters at the beginning
+ of a Pod''s lifecycle, when it might take a long time to load
+ data or warm a cache, than during steady-state operation.
+ This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for the
+ command is root ('/') in the container's filesystem.
+ The command is simply exec'd, it is not run inside
+ a shell, so traditional shell instructions ('|', etc)
+ won't work. To use a shell, you need to explicitly
+ call out to that shell. Exit status of 0 is treated
+ as live/healthy and non-zero is unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ failureThreshold:
+ description: Minimum consecutive failures for the probe
+ to be considered failed after having succeeded. Defaults
+ to 3. Minimum value is 1.
+ format: int32
+ type: integer
+ grpc:
+ description: GRPC specifies an action involving a GRPC port.
+ properties:
+ port:
+ description: Port number of the gRPC service. Number
+ must be in the range 1 to 65535.
+ format: int32
+ type: integer
+ service:
+ description: "Service is the name of the service to
+ place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
+ \n If this is not specified, the default behavior
+ is defined by gRPC."
+ type: string
+ required:
+ - port
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to the
+ pod IP. You probably want to set "Host" in httpHeaders
+ instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request. HTTP
+ allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the host.
+ Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ initialDelaySeconds:
+ description: 'Number of seconds after the container has
+ started before liveness probes are initiated. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ periodSeconds:
+ description: How often (in seconds) to perform the probe.
+ Default to 10 seconds. Minimum value is 1.
+ format: int32
+ type: integer
+ successThreshold:
+ description: Minimum consecutive successes for the probe
+ to be considered successful after having failed. Defaults
+ to 1. Must be 1 for liveness and startup. Minimum value
+ is 1.
+ format: int32
+ type: integer
+ tcpSocket:
+ description: TCPSocket specifies an action involving a TCP
+ port.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to, defaults
+ to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ terminationGracePeriodSeconds:
+ description: Optional duration in seconds the pod needs
+ to terminate gracefully upon probe failure. The grace
+ period is the duration in seconds after the processes
+ running in the pod are sent a termination signal and the
+ time when the processes are forcibly halted with a kill
+ signal. Set this value longer than the expected cleanup
+ time for your process. If this value is nil, the pod's
+ terminationGracePeriodSeconds will be used. Otherwise,
+ this value overrides the value provided by the pod spec.
+ Value must be non-negative integer. The value zero indicates
+ stop immediately via the kill signal (no opportunity to
+ shut down). This is a beta field and requires enabling
+ ProbeTerminationGracePeriod feature gate. Minimum value
+ is 1. spec.terminationGracePeriodSeconds is used if unset.
+ format: int64
+ type: integer
+ timeoutSeconds:
+ description: 'Number of seconds after which the probe times
+ out. Defaults to 1 second. Minimum value is 1. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ type: object
+ stdin:
+ description: Whether this container should allocate a buffer
+ for stdin in the container runtime. If this is not set, reads
+ from stdin in the container will always result in EOF. Default
+ is false.
+ type: boolean
+ stdinOnce:
+ description: Whether the container runtime should close the
+ stdin channel after it has been opened by a single attach.
+ When stdin is true the stdin stream will remain open across
+ multiple attach sessions. If stdinOnce is set to true, stdin
+ is opened on container start, is empty until the first client
+ attaches to stdin, and then remains open and accepts data
+ until the client disconnects, at which time stdin is closed
+ and remains closed until the container is restarted. If this
+ flag is false, a container processes that reads from stdin
+ will never receive an EOF. Default is false
+ type: boolean
+ terminationMessagePath:
+ description: 'Optional: Path at which the file to which the
+ container''s termination message will be written is mounted
+ into the container''s filesystem. Message written is intended
+ to be brief final status, such as an assertion failure message.
+ Will be truncated by the node if greater than 4096 bytes.
+ The total message length across all containers will be limited
+ to 12kb. Defaults to /dev/termination-log. Cannot be updated.'
+ type: string
+ terminationMessagePolicy:
+ description: Indicate how the termination message should be
+ populated. File will use the contents of terminationMessagePath
+ to populate the container status message on both success and
+ failure. FallbackToLogsOnError will use the last chunk of
+ container log output if the termination message file is empty
+ and the container exited with an error. The log output is
+ limited to 2048 bytes or 80 lines, whichever is smaller. Defaults
+ to File. Cannot be updated.
+ type: string
+ tty:
+ description: Whether this container should allocate a TTY for
+ itself, also requires 'stdin' to be true. Default is false.
+ type: boolean
+ volumeDevices:
+ description: volumeDevices is the list of block devices to be
+ used by the container.
+ items:
+ description: volumeDevice describes a mapping of a raw block
+ device within a container.
+ properties:
+ devicePath:
+ description: devicePath is the path inside of the container
+ that the device will be mapped to.
+ type: string
+ name:
+ description: name must match the name of a persistentVolumeClaim
+ in the pod
+ type: string
+ required:
+ - devicePath
+ - name
+ type: object
+ type: array
+ volumeMounts:
+ description: Pod volumes to mount into the container's filesystem.
+ Cannot be updated.
+ items:
+ description: VolumeMount describes a mounting of a Volume
+ within a container.
+ properties:
+ mountPath:
+ description: Path within the container at which the volume
+ should be mounted. Must not contain ':'.
+ type: string
+ mountPropagation:
+ description: mountPropagation determines how mounts are
+ propagated from the host to container and the other
+ way around. When not set, MountPropagationNone is used.
+ This field is beta in 1.10.
+ type: string
+ name:
+ description: This must match the Name of a Volume.
+ type: string
+ readOnly:
+ description: Mounted read-only if true, read-write otherwise
+ (false or unspecified). Defaults to false.
+ type: boolean
+ subPath:
+ description: Path within the volume from which the container's
+ volume should be mounted. Defaults to "" (volume's root).
+ type: string
+ subPathExpr:
+ description: Expanded path within the volume from which
+ the container's volume should be mounted. Behaves similarly
+ to SubPath but environment variable references $(VAR_NAME)
+ are expanded using the container's environment. Defaults
+ to "" (volume's root). SubPathExpr and SubPath are mutually
+ exclusive.
+ type: string
+ required:
+ - mountPath
+ - name
+ type: object
+ type: array
+ workingDir:
+ description: Container's working directory. If not specified,
+ the container runtime's default will be used, which might
+ be configured in the container image. Cannot be updated.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ keepDroppedTargets:
+ description: "Per-scrape limit on the number of targets dropped by
+ relabeling that will be kept in memory. 0 means no limit. \n It
+ requires Prometheus >= v2.47.0."
+ format: int64
+ type: integer
+ labelLimit:
+ description: Per-scrape limit on number of labels that will be accepted
+ for a sample. Only valid in Prometheus versions 2.45.0 and newer.
+ format: int64
+ type: integer
+ labelNameLengthLimit:
+ description: Per-scrape limit on length of labels name that will be
+ accepted for a sample. Only valid in Prometheus versions 2.45.0
+ and newer.
+ format: int64
+ type: integer
+ labelValueLengthLimit:
+ description: Per-scrape limit on length of labels value that will
+ be accepted for a sample. Only valid in Prometheus versions 2.45.0
+ and newer.
+ format: int64
+ type: integer
+ listenLocal:
+ description: When true, the Prometheus server listens on the loopback
+ address instead of the Pod IP's address.
+ type: boolean
+ logFormat:
+ description: Log format for Log level for Prometheus and the config-reloader
+ sidecar.
+ enum:
+ - ""
+ - logfmt
+ - json
+ type: string
+ logLevel:
+ description: Log level for Prometheus and the config-reloader sidecar.
+ enum:
+ - ""
+ - debug
+ - info
+ - warn
+ - error
+ type: string
+ minReadySeconds:
+ description: "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) \n This is an alpha field from
+ kubernetes 1.22 until 1.24 which requires enabling the StatefulSetMinReadySeconds
+ feature gate."
+ format: int32
+ type: integer
+ nodeSelector:
+ additionalProperties:
+ type: string
+ description: Defines on which Nodes the Pods are scheduled.
+ type: object
+ overrideHonorLabels:
+ description: When true, Prometheus resolves label conflicts by renaming
+ the labels in the scraped data to "exported_" for all
+ targets created from service and pod monitors. Otherwise the HonorLabels
+ field of the service or pod monitor applies.
+ type: boolean
+ overrideHonorTimestamps:
+ description: When true, Prometheus ignores the timestamps for all
+ the targets created from service and pod monitors. Otherwise the
+ HonorTimestamps field of the service or pod monitor applies.
+ type: boolean
+ paused:
+ description: When a Prometheus deployment is paused, no actions except
+ for deletion will be performed on the underlying objects.
+ type: boolean
+ podMetadata:
+ description: PodMetadata configures labels and annotations which are
+ propagated to the Prometheus pods.
+ properties:
+ annotations:
+ additionalProperties:
+ type: string
+ description: 'Annotations is an unstructured key value map stored
+ with a resource that may be set by external tools to store and
+ retrieve arbitrary metadata. They are not queryable and should
+ be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations'
+ type: object
+ labels:
+ additionalProperties:
+ type: string
+ description: 'Map of string keys and values that can be used to
+ organize and categorize (scope and select) objects. May match
+ selectors of replication controllers and services. More info:
+ http://kubernetes.io/docs/user-guide/labels'
+ type: object
+ name:
+ description: 'Name must be unique within a namespace. Is required
+ when creating resources, although some resources may allow a
+ client to request the generation of an appropriate name automatically.
+ Name is primarily intended for creation idempotence and configuration
+ definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names'
+ type: string
+ type: object
+ podMonitorNamespaceSelector:
+ description: Namespaces to match for PodMonitors discovery. An empty
+ label selector matches all namespaces. A null label selector matches
+ the current namespace only.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements.
+ The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector that
+ contains values, a key, and an operator that relates the key
+ and values.
+ properties:
+ key:
+ description: key is the label key that the selector applies
+ to.
+ type: string
+ operator:
+ description: operator represents a key's relationship to
+ a set of values. Valid operators are In, NotIn, Exists
+ and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values. If the
+ operator is In or NotIn, the values array must be non-empty.
+ If the operator is Exists or DoesNotExist, the values
+ array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs. A single
+ {key,value} in the matchLabels map is equivalent to an element
+ of matchExpressions, whose key field is "key", the operator
+ is "In", and the values array contains only "value". The requirements
+ are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podMonitorSelector:
+ description: "*Experimental* PodMonitors to be selected for target
+ discovery. An empty label selector matches all objects. A null label
+ selector matches no objects. \n If `spec.serviceMonitorSelector`,
+ `spec.podMonitorSelector`, `spec.probeSelector` and `spec.scrapeConfigSelector`
+ are null, the Prometheus configuration is unmanaged. The Prometheus
+ operator will ensure that the Prometheus configuration's Secret
+ exists, but it is the responsibility of the user to provide the
+ raw gzipped Prometheus configuration under the `prometheus.yaml.gz`
+ key. This behavior is *deprecated* and will be removed in the next
+ major version of the custom resource definition. It is recommended
+ to use `spec.additionalScrapeConfigs` instead."
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements.
+ The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector that
+ contains values, a key, and an operator that relates the key
+ and values.
+ properties:
+ key:
+ description: key is the label key that the selector applies
+ to.
+ type: string
+ operator:
+ description: operator represents a key's relationship to
+ a set of values. Valid operators are In, NotIn, Exists
+ and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values. If the
+ operator is In or NotIn, the values array must be non-empty.
+ If the operator is Exists or DoesNotExist, the values
+ array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs. A single
+ {key,value} in the matchLabels map is equivalent to an element
+ of matchExpressions, whose key field is "key", the operator
+ is "In", and the values array contains only "value". The requirements
+ are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ podTargetLabels:
+ description: PodTargetLabels are appended to the `spec.podTargetLabels`
+ field of all PodMonitor and ServiceMonitor objects.
+ items:
+ type: string
+ type: array
+ portName:
+ default: web
+ description: 'Port name used for the pods and governing service. Default:
+ "web"'
+ type: string
+ priorityClassName:
+ description: Priority class assigned to the Pods.
+ type: string
+ probeNamespaceSelector:
+ description: '*Experimental* Namespaces to match for Probe discovery.
+ An empty label selector matches all namespaces. A null label selector
+ matches the current namespace only.'
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements.
+ The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector that
+ contains values, a key, and an operator that relates the key
+ and values.
+ properties:
+ key:
+ description: key is the label key that the selector applies
+ to.
+ type: string
+ operator:
+ description: operator represents a key's relationship to
+ a set of values. Valid operators are In, NotIn, Exists
+ and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values. If the
+ operator is In or NotIn, the values array must be non-empty.
+ If the operator is Exists or DoesNotExist, the values
+ array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs. A single
+ {key,value} in the matchLabels map is equivalent to an element
+ of matchExpressions, whose key field is "key", the operator
+ is "In", and the values array contains only "value". The requirements
+ are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ probeSelector:
+ description: "*Experimental* Probes to be selected for target discovery.
+ An empty label selector matches all objects. A null label selector
+ matches no objects. \n If `spec.serviceMonitorSelector`, `spec.podMonitorSelector`,
+ `spec.probeSelector` and `spec.scrapeConfigSelector` are null, the
+ Prometheus configuration is unmanaged. The Prometheus operator will
+ ensure that the Prometheus configuration's Secret exists, but it
+ is the responsibility of the user to provide the raw gzipped Prometheus
+ configuration under the `prometheus.yaml.gz` key. This behavior
+ is *deprecated* and will be removed in the next major version of
+ the custom resource definition. It is recommended to use `spec.additionalScrapeConfigs`
+ instead."
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements.
+ The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector that
+ contains values, a key, and an operator that relates the key
+ and values.
+ properties:
+ key:
+ description: key is the label key that the selector applies
+ to.
+ type: string
+ operator:
+ description: operator represents a key's relationship to
+ a set of values. Valid operators are In, NotIn, Exists
+ and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values. If the
+ operator is In or NotIn, the values array must be non-empty.
+ If the operator is Exists or DoesNotExist, the values
+ array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs. A single
+ {key,value} in the matchLabels map is equivalent to an element
+ of matchExpressions, whose key field is "key", the operator
+ is "In", and the values array contains only "value". The requirements
+ are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ prometheusExternalLabelName:
+ description: "Name of Prometheus external label used to denote the
+ Prometheus instance name. The external label will _not_ be added
+ when the field is set to the empty string (`\"\"`). \n Default:
+ \"prometheus\""
+ type: string
+ prometheusRulesExcludedFromEnforce:
+ description: 'Defines the list of PrometheusRule objects to which
+ the namespace label enforcement doesn''t apply. This is only relevant
+ when `spec.enforcedNamespaceLabel` is set to true. *Deprecated:
+ use `spec.excludedFromEnforcement` instead.*'
+ items:
+ description: PrometheusRuleExcludeConfig enables users to configure
+ excluded PrometheusRule names and their namespaces to be ignored
+ while enforcing namespace label for alerts and metrics.
+ properties:
+ ruleName:
+ description: Name of the excluded PrometheusRule object.
+ type: string
+ ruleNamespace:
+ description: Namespace of the excluded PrometheusRule object.
+ type: string
+ required:
+ - ruleName
+ - ruleNamespace
+ type: object
+ type: array
+ query:
+ description: QuerySpec defines the configuration of the Promethus
+ query service.
+ properties:
+ lookbackDelta:
+ description: The delta difference allowed for retrieving metrics
+ during expression evaluations.
+ type: string
+ maxConcurrency:
+ description: Number of concurrent queries that can be run at once.
+ format: int32
+ minimum: 1
+ type: integer
+ maxSamples:
+ description: Maximum number of samples a single query can load
+ into memory. Note that queries will fail if they would load
+ more samples than this into memory, so this also limits the
+ number of samples a query can return.
+ format: int32
+ type: integer
+ timeout:
+ description: Maximum time a query may take before being aborted.
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ type: object
+ queryLogFile:
+ description: "queryLogFile specifies where the file to which PromQL
+ queries are logged. \n If the filename has an empty path, e.g. 'query.log',
+ The Prometheus Pods will mount the file into an emptyDir volume
+ at `/var/log/prometheus`. If a full path is provided, e.g. '/var/log/prometheus/query.log',
+ you must mount a volume in the specified directory and it must be
+ writable. This is because the prometheus container runs with a read-only
+ root filesystem for security reasons. Alternatively, the location
+ can be set to a standard I/O stream, e.g. `/dev/stdout`, to log
+ query information to the default Prometheus log stream."
+ type: string
+ remoteRead:
+ description: Defines the list of remote read configurations.
+ items:
+ description: RemoteReadSpec defines the configuration for Prometheus
+ to read back samples from a remote endpoint.
+ properties:
+ authorization:
+ description: "Authorization section for the URL. \n It requires
+ Prometheus >= v2.26.0. \n Cannot be set at the same time as
+ `basicAuth`, or `oauth2`."
+ properties:
+ credentials:
+ description: Selects a key of a Secret in the namespace
+ that contains the credentials for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ credentialsFile:
+ description: File to read a secret from, mutually exclusive
+ with `credentials`.
+ type: string
+ type:
+ description: "Defines the authentication type. The value
+ is case-insensitive. \n \"Basic\" is not a supported value.
+ \n Default: \"Bearer\""
+ type: string
+ type: object
+ basicAuth:
+ description: "BasicAuth configuration for the URL. \n Cannot
+ be set at the same time as `authorization`, or `oauth2`."
+ properties:
+ password:
+ description: The secret in the service monitor namespace
+ that contains the password for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ username:
+ description: The secret in the service monitor namespace
+ that contains the username for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ bearerToken:
+ description: "*Warning: this field shouldn't be used because
+ the token value appears in clear-text. Prefer using `authorization`.*
+ \n *Deprecated: this will be removed in a future release.*"
+ type: string
+ bearerTokenFile:
+ description: "File from which to read the bearer token for the
+ URL. \n *Deprecated: this will be removed in a future release.
+ Prefer using `authorization`.*"
+ type: string
+ filterExternalLabels:
+ description: "Whether to use the external labels as selectors
+ for the remote read endpoint. \n It requires Prometheus >=
+ v2.34.0."
+ type: boolean
+ followRedirects:
+ description: "Configure whether HTTP requests follow HTTP 3xx
+ redirects. \n It requires Prometheus >= v2.26.0."
+ type: boolean
+ headers:
+ additionalProperties:
+ type: string
+ description: Custom HTTP headers to be sent along with each
+ remote read request. Be aware that headers that are set by
+ Prometheus itself can't be overwritten. Only valid in Prometheus
+ versions 2.26.0 and newer.
+ type: object
+ name:
+ description: "The name of the remote read queue, it must be
+ unique if specified. The name is used in metrics and logging
+ in order to differentiate read configurations. \n It requires
+ Prometheus >= v2.15.0."
+ type: string
+ oauth2:
+ description: "OAuth2 configuration for the URL. \n It requires
+ Prometheus >= v2.27.0. \n Cannot be set at the same time as
+ `authorization`, or `basicAuth`."
+ properties:
+ clientId:
+ description: The secret or configmap containing the OAuth2
+ client id
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ clientSecret:
+ description: The secret containing the OAuth2 client secret
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ endpointParams:
+ additionalProperties:
+ type: string
+ description: Parameters to append to the token URL
+ type: object
+ scopes:
+ description: OAuth2 scopes used for the token request
+ items:
+ type: string
+ type: array
+ tokenUrl:
+ description: The URL to fetch the token from
+ minLength: 1
+ type: string
+ required:
+ - clientId
+ - clientSecret
+ - tokenUrl
+ type: object
+ proxyUrl:
+ description: Optional ProxyURL.
+ type: string
+ readRecent:
+ description: Whether reads should be made for queries for time
+ ranges that the local storage should have complete data for.
+ type: boolean
+ remoteTimeout:
+ description: Timeout for requests to the remote read endpoint.
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ requiredMatchers:
+ additionalProperties:
+ type: string
+ description: An optional list of equality matchers which have
+ to be present in a selector to query the remote read endpoint.
+ type: object
+ tlsConfig:
+ description: TLS Config to use for the URL.
+ properties:
+ ca:
+ description: Certificate authority used when verifying server
+ certificates.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ caFile:
+ description: Path to the CA cert in the Prometheus container
+ to use for the targets.
+ type: string
+ cert:
+ description: Client certificate to present when doing client-authentication.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ certFile:
+ description: Path to the client cert file in the Prometheus
+ container for the targets.
+ type: string
+ insecureSkipVerify:
+ description: Disable target certificate validation.
+ type: boolean
+ keyFile:
+ description: Path to the client key file in the Prometheus
+ container for the targets.
+ type: string
+ keySecret:
+ description: Secret containing the client key file for the
+ targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ serverName:
+ description: Used to verify the hostname for the targets.
+ type: string
+ type: object
+ url:
+ description: The URL of the endpoint to query from.
+ type: string
+ required:
+ - url
+ type: object
+ type: array
+ remoteWrite:
+ description: Defines the list of remote write configurations.
+ items:
+ description: RemoteWriteSpec defines the configuration to write
+ samples from Prometheus to a remote endpoint.
+ properties:
+ authorization:
+ description: "Authorization section for the URL. \n It requires
+ Prometheus >= v2.26.0. \n Cannot be set at the same time as
+ `sigv4`, `basicAuth`, or `oauth2`."
+ properties:
+ credentials:
+ description: Selects a key of a Secret in the namespace
+ that contains the credentials for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ credentialsFile:
+ description: File to read a secret from, mutually exclusive
+ with `credentials`.
+ type: string
+ type:
+ description: "Defines the authentication type. The value
+ is case-insensitive. \n \"Basic\" is not a supported value.
+ \n Default: \"Bearer\""
+ type: string
+ type: object
+ basicAuth:
+ description: "BasicAuth configuration for the URL. \n Cannot
+ be set at the same time as `sigv4`, `authorization`, or `oauth2`."
+ properties:
+ password:
+ description: The secret in the service monitor namespace
+ that contains the password for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ username:
+ description: The secret in the service monitor namespace
+ that contains the username for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ bearerToken:
+ description: "*Warning: this field shouldn't be used because
+ the token value appears in clear-text. Prefer using `authorization`.*
+ \n *Deprecated: this will be removed in a future release.*"
+ type: string
+ bearerTokenFile:
+ description: "File from which to read bearer token for the URL.
+ \n *Deprecated: this will be removed in a future release.
+ Prefer using `authorization`.*"
+ type: string
+ headers:
+ additionalProperties:
+ type: string
+ description: "Custom HTTP headers to be sent along with each
+ remote write request. Be aware that headers that are set by
+ Prometheus itself can't be overwritten. \n It requires Prometheus
+ >= v2.25.0."
+ type: object
+ metadataConfig:
+ description: MetadataConfig configures the sending of series
+ metadata to the remote storage.
+ properties:
+ send:
+ description: Defines whether metric metadata is sent to
+ the remote storage or not.
+ type: boolean
+ sendInterval:
+ description: Defines how frequently metric metadata is sent
+ to the remote storage.
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ type: object
+ name:
+ description: "The name of the remote write queue, it must be
+ unique if specified. The name is used in metrics and logging
+ in order to differentiate queues. \n It requires Prometheus
+ >= v2.15.0."
+ type: string
+ oauth2:
+ description: "OAuth2 configuration for the URL. \n It requires
+ Prometheus >= v2.27.0. \n Cannot be set at the same time as
+ `sigv4`, `authorization`, or `basicAuth`."
+ properties:
+ clientId:
+ description: The secret or configmap containing the OAuth2
+ client id
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ clientSecret:
+ description: The secret containing the OAuth2 client secret
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ endpointParams:
+ additionalProperties:
+ type: string
+ description: Parameters to append to the token URL
+ type: object
+ scopes:
+ description: OAuth2 scopes used for the token request
+ items:
+ type: string
+ type: array
+ tokenUrl:
+ description: The URL to fetch the token from
+ minLength: 1
+ type: string
+ required:
+ - clientId
+ - clientSecret
+ - tokenUrl
+ type: object
+ proxyUrl:
+ description: Optional ProxyURL.
+ type: string
+ queueConfig:
+ description: QueueConfig allows tuning of the remote write queue
+ parameters.
+ properties:
+ batchSendDeadline:
+ description: BatchSendDeadline is the maximum time a sample
+ will wait in buffer.
+ type: string
+ capacity:
+ description: Capacity is the number of samples to buffer
+ per shard before we start dropping them.
+ type: integer
+ maxBackoff:
+ description: MaxBackoff is the maximum retry delay.
+ type: string
+ maxRetries:
+ description: MaxRetries is the maximum number of times to
+ retry a batch on recoverable errors.
+ type: integer
+ maxSamplesPerSend:
+ description: MaxSamplesPerSend is the maximum number of
+ samples per send.
+ type: integer
+ maxShards:
+ description: MaxShards is the maximum number of shards,
+ i.e. amount of concurrency.
+ type: integer
+ minBackoff:
+ description: MinBackoff is the initial retry delay. Gets
+ doubled for every retry.
+ type: string
+ minShards:
+ description: MinShards is the minimum number of shards,
+ i.e. amount of concurrency.
+ type: integer
+ retryOnRateLimit:
+ description: Retry upon receiving a 429 status code from
+ the remote-write storage. This is experimental feature
+ and might change in the future.
+ type: boolean
+ type: object
+ remoteTimeout:
+ description: Timeout for requests to the remote write endpoint.
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ sendExemplars:
+ description: "Enables sending of exemplars over remote write.
+ Note that exemplar-storage itself must be enabled using the
+ `spec.enableFeature` option for exemplars to be scraped in
+ the first place. \n It requires Prometheus >= v2.27.0."
+ type: boolean
+ sendNativeHistograms:
+ description: "Enables sending of native histograms, also known
+ as sparse histograms over remote write. \n It requires Prometheus
+ >= v2.40.0."
+ type: boolean
+ sigv4:
+ description: "Sigv4 allows to configures AWS's Signature Verification
+ 4 for the URL. \n It requires Prometheus >= v2.26.0. \n Cannot
+ be set at the same time as `authorization`, `basicAuth`, or
+ `oauth2`."
+ properties:
+ accessKey:
+ description: AccessKey is the AWS API key. If not specified,
+ the environment variable `AWS_ACCESS_KEY_ID` is used.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ profile:
+ description: Profile is the named AWS profile used to authenticate.
+ type: string
+ region:
+ description: Region is the AWS region. If blank, the region
+ from the default credentials chain used.
+ type: string
+ roleArn:
+ description: RoleArn is the named AWS profile used to authenticate.
+ type: string
+ secretKey:
+ description: SecretKey is the AWS API secret. If not specified,
+ the environment variable `AWS_SECRET_ACCESS_KEY` is used.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ tlsConfig:
+ description: TLS Config to use for the URL.
+ properties:
+ ca:
+ description: Certificate authority used when verifying server
+ certificates.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ caFile:
+ description: Path to the CA cert in the Prometheus container
+ to use for the targets.
+ type: string
+ cert:
+ description: Client certificate to present when doing client-authentication.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ certFile:
+ description: Path to the client cert file in the Prometheus
+ container for the targets.
+ type: string
+ insecureSkipVerify:
+ description: Disable target certificate validation.
+ type: boolean
+ keyFile:
+ description: Path to the client key file in the Prometheus
+ container for the targets.
+ type: string
+ keySecret:
+ description: Secret containing the client key file for the
+ targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ serverName:
+ description: Used to verify the hostname for the targets.
+ type: string
+ type: object
+ url:
+ description: The URL of the endpoint to send samples to.
+ type: string
+ writeRelabelConfigs:
+ description: The list of remote write relabel configurations.
+ items:
+ description: "RelabelConfig allows dynamic rewriting of the
+ label set for targets, alerts, scraped samples and remote
+ write samples. \n More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config"
+ properties:
+ action:
+ default: replace
+ description: "Action to perform based on the regex matching.
+ \n `Uppercase` and `Lowercase` actions require Prometheus
+ >= v2.36.0. `DropEqual` and `KeepEqual` actions require
+ Prometheus >= v2.41.0. \n Default: \"Replace\""
+ enum:
+ - replace
+ - Replace
+ - keep
+ - Keep
+ - drop
+ - Drop
+ - hashmod
+ - HashMod
+ - labelmap
+ - LabelMap
+ - labeldrop
+ - LabelDrop
+ - labelkeep
+ - LabelKeep
+ - lowercase
+ - Lowercase
+ - uppercase
+ - Uppercase
+ - keepequal
+ - KeepEqual
+ - dropequal
+ - DropEqual
+ type: string
+ modulus:
+ description: "Modulus to take of the hash of the source
+ label values. \n Only applicable when the action is
+ `HashMod`."
+ format: int64
+ type: integer
+ regex:
+ description: Regular expression against which the extracted
+ value is matched.
+ type: string
+ replacement:
+ description: "Replacement value against which a Replace
+ action is performed if the regular expression matches.
+ \n Regex capture groups are available."
+ type: string
+ separator:
+ description: Separator is the string between concatenated
+ SourceLabels.
+ type: string
+ sourceLabels:
+ description: The source labels select values from existing
+ labels. Their content is concatenated using the configured
+ Separator and matched against the configured regular
+ expression.
+ items:
+ description: LabelName is a valid Prometheus label name
+ which may only contain ASCII letters, numbers, as
+ well as underscores.
+ pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$
+ type: string
+ type: array
+ targetLabel:
+ description: "Label to which the resulting string is written
+ in a replacement. \n It is mandatory for `Replace`,
+ `HashMod`, `Lowercase`, `Uppercase`, `KeepEqual` and
+ `DropEqual` actions. \n Regex capture groups are available."
+ type: string
+ type: object
+ type: array
+ required:
+ - url
+ type: object
+ type: array
+ replicaExternalLabelName:
+ description: "Name of Prometheus external label used to denote the
+ replica name. The external label will _not_ be added when the field
+ is set to the empty string (`\"\"`). \n Default: \"prometheus_replica\""
+ type: string
+ replicas:
+ description: "Number of replicas of each shard to deploy for a Prometheus
+ deployment. `spec.replicas` multiplied by `spec.shards` is the total
+ number of Pods created. \n Default: 1"
+ format: int32
+ type: integer
+ resources:
+ description: Defines the resources requests and limits of the 'prometheus'
+ container.
+ properties:
+ claims:
+ description: "Claims lists the names of resources, defined in
+ spec.resourceClaims, that are used by this container. \n This
+ is an alpha field and requires enabling the DynamicResourceAllocation
+ feature gate. \n This field is immutable. It can only be set
+ for containers."
+ items:
+ description: ResourceClaim references one entry in PodSpec.ResourceClaims.
+ properties:
+ name:
+ description: Name must match the name of one entry in pod.spec.resourceClaims
+ of the Pod where this field is used. It makes that resource
+ available inside a container.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - name
+ x-kubernetes-list-type: map
+ limits:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Limits describes the maximum amount of compute resources
+ allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ requests:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Requests describes the minimum amount of compute
+ resources required. If Requests is omitted for a container,
+ it defaults to Limits if that is explicitly specified, otherwise
+ to an implementation-defined value. Requests cannot exceed Limits.
+ More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ type: object
+ retention:
+ description: "How long to retain the Prometheus data. \n Default:
+ \"24h\" if `spec.retention` and `spec.retentionSize` are empty."
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ retentionSize:
+ description: Maximum number of bytes used by the Prometheus data.
+ pattern: (^0|([0-9]*[.])?[0-9]+((K|M|G|T|E|P)i?)?B)$
+ type: string
+ routePrefix:
+ description: "The route prefix Prometheus registers HTTP handlers
+ for. \n This is useful when using `spec.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`."
+ type: string
+ ruleNamespaceSelector:
+ description: Namespaces to match for PrometheusRule discovery. An
+ empty label selector matches all namespaces. A null label selector
+ matches the current namespace only.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements.
+ The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector that
+ contains values, a key, and an operator that relates the key
+ and values.
+ properties:
+ key:
+ description: key is the label key that the selector applies
+ to.
+ type: string
+ operator:
+ description: operator represents a key's relationship to
+ a set of values. Valid operators are In, NotIn, Exists
+ and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values. If the
+ operator is In or NotIn, the values array must be non-empty.
+ If the operator is Exists or DoesNotExist, the values
+ array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs. A single
+ {key,value} in the matchLabels map is equivalent to an element
+ of matchExpressions, whose key field is "key", the operator
+ is "In", and the values array contains only "value". The requirements
+ are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ ruleSelector:
+ description: PrometheusRule objects to be selected for rule evaluation.
+ An empty label selector matches all objects. A null label selector
+ matches no objects.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements.
+ The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector that
+ contains values, a key, and an operator that relates the key
+ and values.
+ properties:
+ key:
+ description: key is the label key that the selector applies
+ to.
+ type: string
+ operator:
+ description: operator represents a key's relationship to
+ a set of values. Valid operators are In, NotIn, Exists
+ and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values. If the
+ operator is In or NotIn, the values array must be non-empty.
+ If the operator is Exists or DoesNotExist, the values
+ array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs. A single
+ {key,value} in the matchLabels map is equivalent to an element
+ of matchExpressions, whose key field is "key", the operator
+ is "In", and the values array contains only "value". The requirements
+ are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ rules:
+ description: Defines the configuration of the Prometheus rules' engine.
+ properties:
+ alert:
+ description: "Defines the parameters of the Prometheus rules'
+ engine. \n Any update to these parameters trigger a restart
+ of the pods."
+ properties:
+ forGracePeriod:
+ description: "Minimum duration between alert and restored
+ 'for' state. \n This is maintained only for alerts with
+ a configured 'for' time greater than the grace period."
+ type: string
+ forOutageTolerance:
+ description: Max time to tolerate prometheus outage for restoring
+ 'for' state of alert.
+ type: string
+ resendDelay:
+ description: Minimum amount of time to wait before resending
+ an alert to Alertmanager.
+ type: string
+ type: object
+ type: object
+ sampleLimit:
+ description: SampleLimit defines per-scrape limit on number of scraped
+ samples that will be accepted. Only valid in Prometheus versions
+ 2.45.0 and newer.
+ format: int64
+ type: integer
+ scrapeConfigNamespaceSelector:
+ description: Namespaces to match for ScrapeConfig discovery. An empty
+ label selector matches all namespaces. A null label selector matches
+ the current current namespace only.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements.
+ The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector that
+ contains values, a key, and an operator that relates the key
+ and values.
+ properties:
+ key:
+ description: key is the label key that the selector applies
+ to.
+ type: string
+ operator:
+ description: operator represents a key's relationship to
+ a set of values. Valid operators are In, NotIn, Exists
+ and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values. If the
+ operator is In or NotIn, the values array must be non-empty.
+ If the operator is Exists or DoesNotExist, the values
+ array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs. A single
+ {key,value} in the matchLabels map is equivalent to an element
+ of matchExpressions, whose key field is "key", the operator
+ is "In", and the values array contains only "value". The requirements
+ are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ scrapeConfigSelector:
+ description: "*Experimental* ScrapeConfigs to be selected for target
+ discovery. An empty label selector matches all objects. A null label
+ selector matches no objects. \n If `spec.serviceMonitorSelector`,
+ `spec.podMonitorSelector`, `spec.probeSelector` and `spec.scrapeConfigSelector`
+ are null, the Prometheus configuration is unmanaged. The Prometheus
+ operator will ensure that the Prometheus configuration's Secret
+ exists, but it is the responsibility of the user to provide the
+ raw gzipped Prometheus configuration under the `prometheus.yaml.gz`
+ key. This behavior is *deprecated* and will be removed in the next
+ major version of the custom resource definition. It is recommended
+ to use `spec.additionalScrapeConfigs` instead."
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements.
+ The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector that
+ contains values, a key, and an operator that relates the key
+ and values.
+ properties:
+ key:
+ description: key is the label key that the selector applies
+ to.
+ type: string
+ operator:
+ description: operator represents a key's relationship to
+ a set of values. Valid operators are In, NotIn, Exists
+ and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values. If the
+ operator is In or NotIn, the values array must be non-empty.
+ If the operator is Exists or DoesNotExist, the values
+ array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs. A single
+ {key,value} in the matchLabels map is equivalent to an element
+ of matchExpressions, whose key field is "key", the operator
+ is "In", and the values array contains only "value". The requirements
+ are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ scrapeInterval:
+ default: 30s
+ description: "Interval between consecutive scrapes. \n Default: \"30s\""
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ scrapeTimeout:
+ description: Number of seconds to wait until a scrape request times
+ out.
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ secrets:
+ description: Secrets is a list of Secrets in the same namespace as
+ the Prometheus object, which shall be mounted into the Prometheus
+ Pods. Each Secret is added to the StatefulSet definition as a volume
+ named `secret-`. The Secrets are mounted into /etc/prometheus/secrets/
+ in the 'prometheus' container.
+ items:
+ type: string
+ type: array
+ securityContext:
+ description: SecurityContext holds pod-level security attributes and
+ common container settings. This defaults to the default PodSecurityContext.
+ properties:
+ fsGroup:
+ description: "A special supplemental group that applies to all
+ containers in a pod. Some volume types allow the Kubelet to
+ change the ownership of that volume to be owned by the pod:
+ \n 1. The owning GID will be the FSGroup 2. The setgid bit is
+ set (new files created in the volume will be owned by FSGroup)
+ 3. The permission bits are OR'd with rw-rw---- \n If unset,
+ the Kubelet will not modify the ownership and permissions of
+ any volume. Note that this field cannot be set when spec.os.name
+ is windows."
+ format: int64
+ type: integer
+ fsGroupChangePolicy:
+ description: 'fsGroupChangePolicy defines behavior of changing
+ ownership and permission of the volume before being exposed
+ inside Pod. This field will only apply to volume types which
+ support fsGroup based ownership(and permissions). It will have
+ no effect on ephemeral volume types such as: secret, configmaps
+ and emptydir. Valid values are "OnRootMismatch" and "Always".
+ If not specified, "Always" is used. Note that this field cannot
+ be set when spec.os.name is windows.'
+ type: string
+ runAsGroup:
+ description: The GID to run the entrypoint of the container process.
+ Uses runtime default if unset. May also be set in SecurityContext. If
+ set in both SecurityContext and PodSecurityContext, the value
+ specified in SecurityContext takes precedence for that container.
+ Note that this field cannot be set when spec.os.name is windows.
+ format: int64
+ type: integer
+ runAsNonRoot:
+ description: Indicates that the container must run as a non-root
+ user. If true, the Kubelet will validate the image at runtime
+ to ensure that it does not run as UID 0 (root) and fail to start
+ the container if it does. If unset or false, no such validation
+ will be performed. May also be set in SecurityContext. If set
+ in both SecurityContext and PodSecurityContext, the value specified
+ in SecurityContext takes precedence.
+ type: boolean
+ runAsUser:
+ description: The UID to run the entrypoint of the container process.
+ Defaults to user specified in image metadata if unspecified.
+ May also be set in SecurityContext. If set in both SecurityContext
+ and PodSecurityContext, the value specified in SecurityContext
+ takes precedence for that container. Note that this field cannot
+ be set when spec.os.name is windows.
+ format: int64
+ type: integer
+ seLinuxOptions:
+ description: The SELinux context to be applied to all containers.
+ If unspecified, the container runtime will allocate a random
+ SELinux context for each container. May also be set in SecurityContext. If
+ set in both SecurityContext and PodSecurityContext, the value
+ specified in SecurityContext takes precedence for that container.
+ Note that this field cannot be set when spec.os.name is windows.
+ properties:
+ level:
+ description: Level is SELinux level label that applies to
+ the container.
+ type: string
+ role:
+ description: Role is a SELinux role label that applies to
+ the container.
+ type: string
+ type:
+ description: Type is a SELinux type label that applies to
+ the container.
+ type: string
+ user:
+ description: User is a SELinux user label that applies to
+ the container.
+ type: string
+ type: object
+ seccompProfile:
+ description: The seccomp options to use by the containers in this
+ pod. Note that this field cannot be set when spec.os.name is
+ windows.
+ properties:
+ localhostProfile:
+ description: localhostProfile indicates a profile defined
+ in a file on the node should be used. The profile must be
+ preconfigured on the node to work. Must be a descending
+ path, relative to the kubelet's configured seccomp profile
+ location. Must be set if type is "Localhost". Must NOT be
+ set for any other type.
+ type: string
+ type:
+ description: "type indicates which kind of seccomp profile
+ will be applied. Valid options are: \n Localhost - a profile
+ defined in a file on the node should be used. RuntimeDefault
+ - the container runtime default profile should be used.
+ Unconfined - no profile should be applied."
+ type: string
+ required:
+ - type
+ type: object
+ supplementalGroups:
+ description: A list of groups applied to the first process run
+ in each container, in addition to the container's primary GID,
+ the fsGroup (if specified), and group memberships defined in
+ the container image for the uid of the container process. If
+ unspecified, no additional groups are added to any container.
+ Note that group memberships defined in the container image for
+ the uid of the container process are still effective, even if
+ they are not included in this list. Note that this field cannot
+ be set when spec.os.name is windows.
+ items:
+ format: int64
+ type: integer
+ type: array
+ sysctls:
+ description: Sysctls hold a list of namespaced sysctls used for
+ the pod. Pods with unsupported sysctls (by the container runtime)
+ might fail to launch. Note that this field cannot be set when
+ spec.os.name is windows.
+ items:
+ description: Sysctl defines a kernel parameter to be set
+ properties:
+ name:
+ description: Name of a property to set
+ type: string
+ value:
+ description: Value of a property to set
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ windowsOptions:
+ description: The Windows specific settings applied to all containers.
+ If unspecified, the options within a container's SecurityContext
+ will be used. If set in both SecurityContext and PodSecurityContext,
+ the value specified in SecurityContext takes precedence. Note
+ that this field cannot be set when spec.os.name is linux.
+ properties:
+ gmsaCredentialSpec:
+ description: GMSACredentialSpec is where the GMSA admission
+ webhook (https://github.com/kubernetes-sigs/windows-gmsa)
+ inlines the contents of the GMSA credential spec named by
+ the GMSACredentialSpecName field.
+ type: string
+ gmsaCredentialSpecName:
+ description: GMSACredentialSpecName is the name of the GMSA
+ credential spec to use.
+ type: string
+ hostProcess:
+ description: HostProcess determines if a container should
+ be run as a 'Host Process' container. All of a Pod's containers
+ must have the same effective HostProcess value (it is not
+ allowed to have a mix of HostProcess containers and non-HostProcess
+ containers). In addition, if HostProcess is true then HostNetwork
+ must also be set to true.
+ type: boolean
+ runAsUserName:
+ description: The UserName in Windows to run the entrypoint
+ of the container process. Defaults to the user specified
+ in image metadata if unspecified. May also be set in PodSecurityContext.
+ If set in both SecurityContext and PodSecurityContext, the
+ value specified in SecurityContext takes precedence.
+ type: string
+ type: object
+ type: object
+ serviceAccountName:
+ description: ServiceAccountName is the name of the ServiceAccount
+ to use to run the Prometheus Pods.
+ type: string
+ serviceMonitorNamespaceSelector:
+ description: Namespaces to match for ServicedMonitors discovery. An
+ empty label selector matches all namespaces. A null label selector
+ matches the current namespace only.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements.
+ The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector that
+ contains values, a key, and an operator that relates the key
+ and values.
+ properties:
+ key:
+ description: key is the label key that the selector applies
+ to.
+ type: string
+ operator:
+ description: operator represents a key's relationship to
+ a set of values. Valid operators are In, NotIn, Exists
+ and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values. If the
+ operator is In or NotIn, the values array must be non-empty.
+ If the operator is Exists or DoesNotExist, the values
+ array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs. A single
+ {key,value} in the matchLabels map is equivalent to an element
+ of matchExpressions, whose key field is "key", the operator
+ is "In", and the values array contains only "value". The requirements
+ are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ serviceMonitorSelector:
+ description: "ServiceMonitors to be selected for target discovery.
+ An empty label selector matches all objects. A null label selector
+ matches no objects. \n If `spec.serviceMonitorSelector`, `spec.podMonitorSelector`,
+ `spec.probeSelector` and `spec.scrapeConfigSelector` are null, the
+ Prometheus configuration is unmanaged. The Prometheus operator will
+ ensure that the Prometheus configuration's Secret exists, but it
+ is the responsibility of the user to provide the raw gzipped Prometheus
+ configuration under the `prometheus.yaml.gz` key. This behavior
+ is *deprecated* and will be removed in the next major version of
+ the custom resource definition. It is recommended to use `spec.additionalScrapeConfigs`
+ instead."
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements.
+ The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector that
+ contains values, a key, and an operator that relates the key
+ and values.
+ properties:
+ key:
+ description: key is the label key that the selector applies
+ to.
+ type: string
+ operator:
+ description: operator represents a key's relationship to
+ a set of values. Valid operators are In, NotIn, Exists
+ and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values. If the
+ operator is In or NotIn, the values array must be non-empty.
+ If the operator is Exists or DoesNotExist, the values
+ array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs. A single
+ {key,value} in the matchLabels map is equivalent to an element
+ of matchExpressions, whose key field is "key", the operator
+ is "In", and the values array contains only "value". The requirements
+ are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ sha:
+ description: '*Deprecated: use ''spec.image'' instead. The image''s
+ digest can be specified as part of the image name.*'
+ type: string
+ shards:
+ description: "EXPERIMENTAL: Number of shards to distribute targets
+ onto. `spec.replicas` multiplied by `spec.shards` is the total number
+ of Pods created. \n 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. \n Sharding
+ is performed on the content of the `__address__` target meta-label
+ for PodMonitors and ServiceMonitors and `__param_target__` for Probes.
+ \n Default: 1"
+ format: int32
+ type: integer
+ storage:
+ description: Storage defines the storage used by Prometheus.
+ properties:
+ disableMountSubPath:
+ description: '*Deprecated: subPath usage will be removed in a
+ future release.*'
+ type: boolean
+ emptyDir:
+ description: 'EmptyDirVolumeSource to be used by the StatefulSet.
+ If specified, it takes precedence over `ephemeral` and `volumeClaimTemplate`.
+ More info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir'
+ properties:
+ medium:
+ description: 'medium represents what type of storage medium
+ should back this directory. The default is "" which means
+ to use the node''s default medium. Must be an empty string
+ (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir'
+ type: string
+ sizeLimit:
+ anyOf:
+ - type: integer
+ - type: string
+ description: 'sizeLimit is the total amount of local storage
+ required for this EmptyDir volume. The size limit is also
+ applicable for memory medium. 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. The default is nil which means that the limit
+ is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir'
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ type: object
+ ephemeral:
+ description: 'EphemeralVolumeSource to be used by the StatefulSet.
+ This is a beta field in k8s 1.21 and GA in 1.15. For lower versions,
+ starting with k8s 1.19, it requires enabling the GenericEphemeralVolume
+ feature gate. More info: https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes'
+ properties:
+ volumeClaimTemplate:
+ description: "Will be used to create a stand-alone PVC to
+ provision the volume. The pod in which this EphemeralVolumeSource
+ is embedded will be the owner of the PVC, i.e. the PVC will
+ be deleted together with the pod. The name of the PVC will
+ be `-` where `` is the
+ name from the `PodSpec.Volumes` array entry. Pod validation
+ will reject the pod if the concatenated name is not valid
+ for a PVC (for example, too long). \n An existing PVC with
+ that name that is not owned by the pod will *not* be used
+ for the pod to avoid using an unrelated volume by mistake.
+ Starting the pod is then blocked until the unrelated PVC
+ is removed. If such a pre-created PVC is meant to be used
+ by the pod, the PVC has to updated with an owner reference
+ to the pod once the pod exists. Normally this should not
+ be necessary, but it may be useful when manually reconstructing
+ a broken cluster. \n This field is read-only and no changes
+ will be made by Kubernetes to the PVC after it has been
+ created. \n Required, must not be nil."
+ properties:
+ metadata:
+ description: May contain labels and annotations that will
+ be copied into the PVC when creating it. No other fields
+ are allowed and will be rejected during validation.
+ type: object
+ spec:
+ description: The specification for the PersistentVolumeClaim.
+ The entire content is copied unchanged into the PVC
+ that gets created from this template. The same fields
+ as in a PersistentVolumeClaim are also valid here.
+ properties:
+ accessModes:
+ description: 'accessModes contains the desired access
+ modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1'
+ items:
+ type: string
+ type: array
+ dataSource:
+ description: 'dataSource field can be used to specify
+ either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot)
+ * An existing PVC (PersistentVolumeClaim) If the
+ provisioner or an external controller can support
+ the specified data source, it will create a new
+ volume based on the contents of the specified data
+ source. When the AnyVolumeDataSource feature gate
+ is enabled, dataSource contents will be copied to
+ dataSourceRef, and dataSourceRef contents will be
+ copied to dataSource when dataSourceRef.namespace
+ is not specified. If the namespace is specified,
+ then dataSourceRef will not be copied to dataSource.'
+ properties:
+ apiGroup:
+ description: APIGroup is the group for the resource
+ being referenced. If APIGroup is not specified,
+ the specified Kind must be in the core API group.
+ For any other third-party types, APIGroup is
+ required.
+ type: string
+ kind:
+ description: Kind is the type of resource being
+ referenced
+ type: string
+ name:
+ description: Name is the name of resource being
+ referenced
+ type: string
+ required:
+ - kind
+ - name
+ type: object
+ x-kubernetes-map-type: atomic
+ dataSourceRef:
+ description: 'dataSourceRef specifies the object from
+ which to populate the volume with data, if a non-empty
+ volume is desired. This may be any object from a
+ non-empty API group (non core object) or a PersistentVolumeClaim
+ object. When this field is specified, volume binding
+ will only succeed if the type of the specified object
+ matches some installed volume populator or dynamic
+ provisioner. This field will replace the functionality
+ of the dataSource field and as such if both fields
+ are non-empty, they must have the same value. For
+ backwards compatibility, when namespace isn''t specified
+ in dataSourceRef, both fields (dataSource and dataSourceRef)
+ will be set to the same value automatically if one
+ of them is empty and the other is non-empty. When
+ namespace is specified in dataSourceRef, dataSource
+ isn''t set to the same value and must be empty.
+ There are three important differences between dataSource
+ and dataSourceRef: * While dataSource only allows
+ two specific types of objects, dataSourceRef allows
+ any non-core object, as well as PersistentVolumeClaim
+ objects. * While dataSource ignores disallowed values
+ (dropping them), dataSourceRef preserves all values,
+ and generates an error if a disallowed value is
+ specified. * While dataSource only allows local
+ objects, dataSourceRef allows objects in any namespaces.
+ (Beta) Using this field requires the AnyVolumeDataSource
+ feature gate to be enabled. (Alpha) Using the namespace
+ field of dataSourceRef requires the CrossNamespaceVolumeDataSource
+ feature gate to be enabled.'
+ properties:
+ apiGroup:
+ description: APIGroup is the group for the resource
+ being referenced. If APIGroup is not specified,
+ the specified Kind must be in the core API group.
+ For any other third-party types, APIGroup is
+ required.
+ type: string
+ kind:
+ description: Kind is the type of resource being
+ referenced
+ type: string
+ name:
+ description: Name is the name of resource being
+ referenced
+ type: string
+ namespace:
+ description: Namespace is the namespace of resource
+ being referenced Note that when a namespace
+ is specified, a gateway.networking.k8s.io/ReferenceGrant
+ object is required in the referent namespace
+ to allow that namespace's owner to accept the
+ reference. See the ReferenceGrant documentation
+ for details. (Alpha) This field requires the
+ CrossNamespaceVolumeDataSource feature gate
+ to be enabled.
+ type: string
+ required:
+ - kind
+ - name
+ type: object
+ resources:
+ description: 'resources represents the minimum resources
+ the volume should have. If RecoverVolumeExpansionFailure
+ feature is enabled users are allowed to specify
+ resource requirements that are lower than previous
+ value but must still be higher than capacity recorded
+ in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources'
+ properties:
+ claims:
+ description: "Claims lists the names of resources,
+ defined in spec.resourceClaims, that are used
+ by this container. \n This is an alpha field
+ and requires enabling the DynamicResourceAllocation
+ feature gate. \n This field is immutable. It
+ can only be set for containers."
+ items:
+ description: ResourceClaim references one entry
+ in PodSpec.ResourceClaims.
+ properties:
+ name:
+ description: Name must match the name of
+ one entry in pod.spec.resourceClaims of
+ the Pod where this field is used. It makes
+ that resource available inside a container.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - name
+ x-kubernetes-list-type: map
+ limits:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Limits describes the maximum amount
+ of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ requests:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Requests describes the minimum amount
+ of compute resources required. If Requests is
+ omitted for a container, it defaults to Limits
+ if that is explicitly specified, otherwise to
+ an implementation-defined value. Requests cannot
+ exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ type: object
+ selector:
+ description: selector is a label query over volumes
+ to consider for binding.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: A label selector requirement is
+ a selector that contains values, a key, and
+ an operator that relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's
+ relationship to a set of values. Valid
+ operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty. If
+ the operator is Exists or DoesNotExist,
+ the values array must be empty. This array
+ is replaced during a strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is "In",
+ and the values array contains only "value".
+ The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ storageClassName:
+ description: 'storageClassName is the name of the
+ StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1'
+ type: string
+ volumeMode:
+ description: volumeMode defines what type of volume
+ is required by the claim. Value of Filesystem is
+ implied when not included in claim spec.
+ type: string
+ volumeName:
+ description: volumeName is the binding reference to
+ the PersistentVolume backing this claim.
+ type: string
+ type: object
+ required:
+ - spec
+ type: object
+ type: object
+ volumeClaimTemplate:
+ description: Defines the PVC spec to be used by the Prometheus
+ StatefulSets. The easiest way to use a volume that cannot be
+ automatically provisioned is to use a label selector alongside
+ manually created PersistentVolumes.
+ properties:
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this
+ representation of an object. Servers should convert recognized
+ schemas to the latest internal value, and may reject unrecognized
+ values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST
+ resource this object represents. Servers may infer this
+ from the endpoint the client submits requests to. Cannot
+ be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ description: EmbeddedMetadata contains metadata relevant to
+ an EmbeddedResource.
+ properties:
+ annotations:
+ additionalProperties:
+ type: string
+ description: 'Annotations is an unstructured key value
+ map stored with a resource that may be set by external
+ tools to store and retrieve arbitrary metadata. They
+ are not queryable and should be preserved when modifying
+ objects. More info: http://kubernetes.io/docs/user-guide/annotations'
+ type: object
+ labels:
+ additionalProperties:
+ type: string
+ description: 'Map of string keys and values that can be
+ used to organize and categorize (scope and select) objects.
+ May match selectors of replication controllers and services.
+ More info: http://kubernetes.io/docs/user-guide/labels'
+ type: object
+ name:
+ description: 'Name must be unique within a namespace.
+ Is required when creating resources, although some resources
+ may allow a client to request the generation of an appropriate
+ name automatically. Name is primarily intended for creation
+ idempotence and configuration definition. Cannot be
+ updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names'
+ type: string
+ type: object
+ spec:
+ description: 'Defines the desired characteristics of a volume
+ requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
+ properties:
+ accessModes:
+ description: 'accessModes contains the desired access
+ modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1'
+ items:
+ type: string
+ type: array
+ dataSource:
+ description: 'dataSource field can be used to specify
+ either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot)
+ * An existing PVC (PersistentVolumeClaim) If the provisioner
+ or an external controller can support the specified
+ data source, it will create a new volume based on the
+ contents of the specified data source. When the AnyVolumeDataSource
+ feature gate is enabled, dataSource contents will be
+ copied to dataSourceRef, and dataSourceRef contents
+ will be copied to dataSource when dataSourceRef.namespace
+ is not specified. If the namespace is specified, then
+ dataSourceRef will not be copied to dataSource.'
+ properties:
+ apiGroup:
+ description: APIGroup is the group for the resource
+ being referenced. If APIGroup is not specified,
+ the specified Kind must be in the core API group.
+ For any other third-party types, APIGroup is required.
+ type: string
+ kind:
+ description: Kind is the type of resource being referenced
+ type: string
+ name:
+ description: Name is the name of resource being referenced
+ type: string
+ required:
+ - kind
+ - name
+ type: object
+ x-kubernetes-map-type: atomic
+ dataSourceRef:
+ description: 'dataSourceRef specifies the object from
+ which to populate the volume with data, if a non-empty
+ volume is desired. This may be any object from a non-empty
+ API group (non core object) or a PersistentVolumeClaim
+ object. When this field is specified, volume binding
+ will only succeed if the type of the specified object
+ matches some installed volume populator or dynamic provisioner.
+ This field will replace the functionality of the dataSource
+ field and as such if both fields are non-empty, they
+ must have the same value. For backwards compatibility,
+ when namespace isn''t specified in dataSourceRef, both
+ fields (dataSource and dataSourceRef) will be set to
+ the same value automatically if one of them is empty
+ and the other is non-empty. When namespace is specified
+ in dataSourceRef, dataSource isn''t set to the same
+ value and must be empty. There are three important differences
+ between dataSource and dataSourceRef: * While dataSource
+ only allows two specific types of objects, dataSourceRef
+ allows any non-core object, as well as PersistentVolumeClaim
+ objects. * While dataSource ignores disallowed values
+ (dropping them), dataSourceRef preserves all values,
+ and generates an error if a disallowed value is specified.
+ * While dataSource only allows local objects, dataSourceRef
+ allows objects in any namespaces. (Beta) Using this
+ field requires the AnyVolumeDataSource feature gate
+ to be enabled. (Alpha) Using the namespace field of
+ dataSourceRef requires the CrossNamespaceVolumeDataSource
+ feature gate to be enabled.'
+ properties:
+ apiGroup:
+ description: APIGroup is the group for the resource
+ being referenced. If APIGroup is not specified,
+ the specified Kind must be in the core API group.
+ For any other third-party types, APIGroup is required.
+ type: string
+ kind:
+ description: Kind is the type of resource being referenced
+ type: string
+ name:
+ description: Name is the name of resource being referenced
+ type: string
+ namespace:
+ description: Namespace is the namespace of resource
+ being referenced Note that when a namespace is specified,
+ a gateway.networking.k8s.io/ReferenceGrant object
+ is required in the referent namespace to allow that
+ namespace's owner to accept the reference. See the
+ ReferenceGrant documentation for details. (Alpha)
+ This field requires the CrossNamespaceVolumeDataSource
+ feature gate to be enabled.
+ type: string
+ required:
+ - kind
+ - name
+ type: object
+ resources:
+ description: 'resources represents the minimum resources
+ the volume should have. If RecoverVolumeExpansionFailure
+ feature is enabled users are allowed to specify resource
+ requirements that are lower than previous value but
+ must still be higher than capacity recorded in the status
+ field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources'
+ properties:
+ claims:
+ description: "Claims lists the names of resources,
+ defined in spec.resourceClaims, that are used by
+ this container. \n This is an alpha field and requires
+ enabling the DynamicResourceAllocation feature gate.
+ \n This field is immutable. It can only be set for
+ containers."
+ items:
+ description: ResourceClaim references one entry
+ in PodSpec.ResourceClaims.
+ properties:
+ name:
+ description: Name must match the name of one
+ entry in pod.spec.resourceClaims of the Pod
+ where this field is used. It makes that resource
+ available inside a container.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - name
+ x-kubernetes-list-type: map
+ limits:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Limits describes the maximum amount
+ of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ requests:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Requests describes the minimum amount
+ of compute resources required. If Requests is omitted
+ for a container, it defaults to Limits if that is
+ explicitly specified, otherwise to an implementation-defined
+ value. Requests cannot exceed Limits. More info:
+ https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ type: object
+ selector:
+ description: selector is a label query over volumes to
+ consider for binding.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector
+ requirements. The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector
+ that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the selector
+ applies to.
+ type: string
+ operator:
+ description: operator represents a key's relationship
+ to a set of values. Valid operators are In,
+ NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values.
+ If the operator is In or NotIn, the values
+ array must be non-empty. If the operator is
+ Exists or DoesNotExist, the values array must
+ be empty. This array is replaced during a
+ strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs.
+ A single {key,value} in the matchLabels map is equivalent
+ to an element of matchExpressions, whose key field
+ is "key", the operator is "In", and the values array
+ contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ storageClassName:
+ description: 'storageClassName is the name of the StorageClass
+ required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1'
+ type: string
+ volumeMode:
+ description: volumeMode defines what type of volume is
+ required by the claim. Value of Filesystem is implied
+ when not included in claim spec.
+ type: string
+ volumeName:
+ description: volumeName is the binding reference to the
+ PersistentVolume backing this claim.
+ type: string
+ type: object
+ status:
+ description: '*Deprecated: this field is never set.*'
+ properties:
+ accessModes:
+ description: 'accessModes contains the actual access modes
+ the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1'
+ items:
+ type: string
+ type: array
+ allocatedResourceStatuses:
+ additionalProperties:
+ description: When a controller receives persistentvolume
+ claim update with ClaimResourceStatus for a resource
+ that it does not recognizes, then it should ignore
+ that update and let other controllers handle it.
+ type: string
+ description: "allocatedResourceStatuses stores status
+ of resource being resized for the given PVC. Key names
+ follow standard Kubernetes label syntax. Valid values
+ are either: * Un-prefixed keys: - storage - the capacity
+ of the volume. * Custom resources must use implementation-defined
+ prefixed names such as \"example.com/my-custom-resource\"
+ Apart from above values - keys that are unprefixed or
+ have kubernetes.io prefix are considered reserved and
+ hence may not be used. \n ClaimResourceStatus can be
+ in any of following states: - ControllerResizeInProgress:
+ State set when resize controller starts resizing the
+ volume in control-plane. - ControllerResizeFailed: State
+ set when resize has failed in resize controller with
+ a terminal error. - NodeResizePending: State set when
+ resize controller has finished resizing the volume but
+ further resizing of volume is needed on the node. -
+ NodeResizeInProgress: State set when kubelet starts
+ resizing the volume. - NodeResizeFailed: State set when
+ resizing has failed in kubelet with a terminal error.
+ Transient errors don't set NodeResizeFailed. For example:
+ if expanding a PVC for more capacity - this field can
+ be one of the following states: - pvc.status.allocatedResourceStatus['storage']
+ = \"ControllerResizeInProgress\" - pvc.status.allocatedResourceStatus['storage']
+ = \"ControllerResizeFailed\" - pvc.status.allocatedResourceStatus['storage']
+ = \"NodeResizePending\" - pvc.status.allocatedResourceStatus['storage']
+ = \"NodeResizeInProgress\" - pvc.status.allocatedResourceStatus['storage']
+ = \"NodeResizeFailed\" When this field is not set, it
+ means that no resize operation is in progress for the
+ given PVC. \n A controller that receives PVC update
+ with previously unknown resourceName or ClaimResourceStatus
+ should ignore the update for the purpose it was designed.
+ For example - a controller that only is responsible
+ for resizing capacity of the volume, should ignore PVC
+ updates that change other valid resources associated
+ with PVC. \n This is an alpha field and requires enabling
+ RecoverVolumeExpansionFailure feature."
+ type: object
+ x-kubernetes-map-type: granular
+ allocatedResources:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: "allocatedResources tracks the resources
+ allocated to a PVC including its capacity. Key names
+ follow standard Kubernetes label syntax. Valid values
+ are either: * Un-prefixed keys: - storage - the capacity
+ of the volume. * Custom resources must use implementation-defined
+ prefixed names such as \"example.com/my-custom-resource\"
+ Apart from above values - keys that are unprefixed or
+ have kubernetes.io prefix are considered reserved and
+ hence may not be used. \n Capacity reported here may
+ be larger than the actual capacity when a volume expansion
+ operation is requested. For storage quota, the larger
+ value from allocatedResources and PVC.spec.resources
+ is used. If allocatedResources is not set, PVC.spec.resources
+ alone is used for quota calculation. If a volume expansion
+ capacity request is lowered, allocatedResources is only
+ lowered if there are no expansion operations in progress
+ and if the actual volume capacity is equal or lower
+ than the requested capacity. \n A controller that receives
+ PVC update with previously unknown resourceName should
+ ignore the update for the purpose it was designed. For
+ example - a controller that only is responsible for
+ resizing capacity of the volume, should ignore PVC updates
+ that change other valid resources associated with PVC.
+ \n This is an alpha field and requires enabling RecoverVolumeExpansionFailure
+ feature."
+ type: object
+ capacity:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: capacity represents the actual resources
+ of the underlying volume.
+ type: object
+ conditions:
+ description: conditions is the current Condition of persistent
+ volume claim. If underlying persistent volume is being
+ resized then the Condition will be set to 'ResizeStarted'.
+ items:
+ description: PersistentVolumeClaimCondition contains
+ details about state of pvc
+ properties:
+ lastProbeTime:
+ description: lastProbeTime is the time we probed
+ the condition.
+ format: date-time
+ type: string
+ lastTransitionTime:
+ description: lastTransitionTime is the time the
+ condition transitioned from one status to another.
+ format: date-time
+ type: string
+ message:
+ description: message is the human-readable message
+ indicating details about last transition.
+ type: string
+ reason:
+ description: reason is a unique, this should be
+ a short, machine understandable string that gives
+ the reason for condition's last transition. If
+ it reports "ResizeStarted" that means the underlying
+ persistent volume is being resized.
+ type: string
+ status:
+ type: string
+ type:
+ description: PersistentVolumeClaimConditionType
+ is a valid value of PersistentVolumeClaimCondition.Type
+ type: string
+ required:
+ - status
+ - type
+ type: object
+ type: array
+ phase:
+ description: phase represents the current phase of PersistentVolumeClaim.
+ type: string
+ type: object
+ type: object
+ type: object
+ tag:
+ description: '*Deprecated: use ''spec.image'' instead. The image''s
+ tag can be specified as part of the image name.*'
+ type: string
+ targetLimit:
+ description: TargetLimit defines a limit on the number of scraped
+ targets that will be accepted. Only valid in Prometheus versions
+ 2.45.0 and newer.
+ format: int64
+ type: integer
+ thanos:
+ description: "Defines the configuration of the optional Thanos sidecar.
+ \n This section is experimental, it may change significantly without
+ deprecation notice in any release."
+ properties:
+ additionalArgs:
+ description: AdditionalArgs allows setting additional arguments
+ for the Thanos container. The arguments are passed as-is to
+ the Thanos container which may cause issues if they are invalid
+ or not supported the given Thanos version. In case of an argument
+ conflict (e.g. an argument which is already set by the operator
+ itself) or when providing an invalid argument, the reconciliation
+ will fail and an error will be logged.
+ items:
+ description: Argument as part of the AdditionalArgs list.
+ properties:
+ name:
+ description: Name of the argument, e.g. "scrape.discovery-reload-interval".
+ minLength: 1
+ type: string
+ value:
+ description: Argument value, e.g. 30s. Can be empty for
+ name-only arguments (e.g. --storage.tsdb.no-lockfile)
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ baseImage:
+ description: '*Deprecated: use ''image'' instead.*'
+ type: string
+ blockSize:
+ default: 2h
+ description: "BlockDuration controls the size of TSDB blocks produced
+ by Prometheus. The default value is 2h to match the upstream
+ Prometheus defaults. \n WARNING: Changing the block duration
+ can impact the performance and efficiency of the entire Prometheus/Thanos
+ stack due to how it interacts with memory and Thanos compactors.
+ It is recommended to keep this value set to a multiple of 120
+ times your longest scrape or rule interval. For example, 30s
+ * 120 = 1h."
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ getConfigInterval:
+ description: How often to retrieve the Prometheus configuration.
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ getConfigTimeout:
+ description: Maximum time to wait when retrieving the Prometheus
+ configuration.
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ grpcListenLocal:
+ description: "When true, the Thanos sidecar listens on the loopback
+ interface instead of the Pod IP's address for the gRPC endpoints.
+ \n It has no effect if `listenLocal` is true."
+ type: boolean
+ grpcServerTlsConfig:
+ description: "Configures the TLS parameters for the gRPC server
+ providing the StoreAPI. \n Note: Currently only the `caFile`,
+ `certFile`, and `keyFile` fields are supported."
+ properties:
+ ca:
+ description: Certificate authority used when verifying server
+ certificates.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ caFile:
+ description: Path to the CA cert in the Prometheus container
+ to use for the targets.
+ type: string
+ cert:
+ description: Client certificate to present when doing client-authentication.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ certFile:
+ description: Path to the client cert file in the Prometheus
+ container for the targets.
+ type: string
+ insecureSkipVerify:
+ description: Disable target certificate validation.
+ type: boolean
+ keyFile:
+ description: Path to the client key file in the Prometheus
+ container for the targets.
+ type: string
+ keySecret:
+ description: Secret containing the client key file for the
+ targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ serverName:
+ description: Used to verify the hostname for the targets.
+ type: string
+ type: object
+ httpListenLocal:
+ description: "When true, the Thanos sidecar listens on the loopback
+ interface instead of the Pod IP's address for the HTTP endpoints.
+ \n It has no effect if `listenLocal` is true."
+ type: boolean
+ image:
+ description: "Container image name for Thanos. If specified, it
+ takes precedence over the `spec.thanos.baseImage`, `spec.thanos.tag`
+ and `spec.thanos.sha` fields. \n Specifying `spec.thanos.version`
+ is still necessary to ensure the Prometheus Operator knows which
+ version of Thanos is being configured. \n If neither `spec.thanos.image`
+ nor `spec.thanos.baseImage` are defined, the operator will use
+ the latest upstream version of Thanos available at the time
+ when the operator was released."
+ type: string
+ listenLocal:
+ description: '*Deprecated: use `grpcListenLocal` and `httpListenLocal`
+ instead.*'
+ type: boolean
+ logFormat:
+ description: Log format for the Thanos sidecar.
+ enum:
+ - ""
+ - logfmt
+ - json
+ type: string
+ logLevel:
+ description: Log level for the Thanos sidecar.
+ enum:
+ - ""
+ - debug
+ - info
+ - warn
+ - error
+ type: string
+ minTime:
+ description: Defines the start of time range limit served by the
+ Thanos sidecar's StoreAPI. The field's value should be a constant
+ time in RFC3339 format or a time duration relative to current
+ time, such as -1d or 2h45m. Valid duration units are ms, s,
+ m, h, d, w, y.
+ type: string
+ objectStorageConfig:
+ description: "Defines the Thanos sidecar's configuration to upload
+ TSDB blocks to object storage. \n More info: https://thanos.io/tip/thanos/storage.md/
+ \n objectStorageConfigFile takes precedence over this field."
+ properties:
+ key:
+ description: The key of the secret to select from. Must be
+ a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must be
+ defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ objectStorageConfigFile:
+ description: "Defines the Thanos sidecar's configuration file
+ to upload TSDB blocks to object storage. \n More info: https://thanos.io/tip/thanos/storage.md/
+ \n This field takes precedence over objectStorageConfig."
+ type: string
+ readyTimeout:
+ description: ReadyTimeout is the maximum time that the Thanos
+ sidecar will wait for Prometheus to start.
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ resources:
+ description: Defines the resources requests and limits of the
+ Thanos sidecar.
+ properties:
+ claims:
+ description: "Claims lists the names of resources, defined
+ in spec.resourceClaims, that are used by this container.
+ \n This is an alpha field and requires enabling the DynamicResourceAllocation
+ feature gate. \n This field is immutable. It can only be
+ set for containers."
+ items:
+ description: ResourceClaim references one entry in PodSpec.ResourceClaims.
+ properties:
+ name:
+ description: Name must match the name of one entry in
+ pod.spec.resourceClaims of the Pod where this field
+ is used. It makes that resource available inside a
+ container.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - name
+ x-kubernetes-list-type: map
+ limits:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Limits describes the maximum amount of compute
+ resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ requests:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Requests describes the minimum amount of compute
+ resources required. If Requests is omitted for a container,
+ it defaults to Limits if that is explicitly specified, otherwise
+ to an implementation-defined value. Requests cannot exceed
+ Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ type: object
+ sha:
+ description: '*Deprecated: use ''image'' instead. The image digest
+ can be specified as part of the image name.*'
+ type: string
+ tag:
+ description: '*Deprecated: use ''image'' instead. The image''s
+ tag can be specified as part of the image name.*'
+ type: string
+ tracingConfig:
+ description: "Defines the tracing configuration for the Thanos
+ sidecar. \n More info: https://thanos.io/tip/thanos/tracing.md/
+ \n This is an experimental feature, it may change in any upcoming
+ release in a breaking way. \n tracingConfigFile takes precedence
+ over this field."
+ properties:
+ key:
+ description: The key of the secret to select from. Must be
+ a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must be
+ defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ tracingConfigFile:
+ description: "Defines the tracing configuration file for the Thanos
+ sidecar. \n More info: https://thanos.io/tip/thanos/tracing.md/
+ \n This is an experimental feature, it may change in any upcoming
+ release in a breaking way. \n This field takes precedence over
+ tracingConfig."
+ type: string
+ version:
+ description: "Version of Thanos being deployed. The operator uses
+ this information to generate the Prometheus StatefulSet + configuration
+ files. \n If not specified, the operator assumes the latest
+ upstream release of Thanos available at the time when the version
+ of the operator was released."
+ type: string
+ volumeMounts:
+ description: VolumeMounts allows configuration of additional VolumeMounts
+ for Thanos. VolumeMounts specified will be appended to other
+ VolumeMounts in the 'thanos-sidecar' container.
+ items:
+ description: VolumeMount describes a mounting of a Volume within
+ a container.
+ properties:
+ mountPath:
+ description: Path within the container at which the volume
+ should be mounted. Must not contain ':'.
+ type: string
+ mountPropagation:
+ description: mountPropagation determines how mounts are
+ propagated from the host to container and the other way
+ around. When not set, MountPropagationNone is used. This
+ field is beta in 1.10.
+ type: string
+ name:
+ description: This must match the Name of a Volume.
+ type: string
+ readOnly:
+ description: Mounted read-only if true, read-write otherwise
+ (false or unspecified). Defaults to false.
+ type: boolean
+ subPath:
+ description: Path within the volume from which the container's
+ volume should be mounted. Defaults to "" (volume's root).
+ type: string
+ subPathExpr:
+ description: Expanded path within the volume from which
+ the container's volume should be mounted. Behaves similarly
+ to SubPath but environment variable references $(VAR_NAME)
+ are expanded using the container's environment. Defaults
+ to "" (volume's root). SubPathExpr and SubPath are mutually
+ exclusive.
+ type: string
+ required:
+ - mountPath
+ - name
+ type: object
+ type: array
+ type: object
+ tolerations:
+ description: Defines the Pods' tolerations if specified.
+ items:
+ description: The pod this Toleration is attached to tolerates any
+ taint that matches the triple using the matching
+ operator .
+ properties:
+ effect:
+ description: Effect indicates the taint effect to match. Empty
+ means match all taint effects. When specified, allowed values
+ are NoSchedule, PreferNoSchedule and NoExecute.
+ type: string
+ key:
+ description: Key is the taint key that the toleration applies
+ to. Empty means match all taint keys. If the key is empty,
+ operator must be Exists; this combination means to match all
+ values and all keys.
+ type: string
+ operator:
+ description: Operator represents a key's relationship to the
+ value. Valid operators are Exists and Equal. Defaults to Equal.
+ Exists is equivalent to wildcard for value, so that a pod
+ can tolerate all taints of a particular category.
+ type: string
+ tolerationSeconds:
+ description: TolerationSeconds represents the period of time
+ the toleration (which must be of effect NoExecute, otherwise
+ this field is ignored) tolerates the taint. By default, it
+ is not set, which means tolerate the taint forever (do not
+ evict). Zero and negative values will be treated as 0 (evict
+ immediately) by the system.
+ format: int64
+ type: integer
+ value:
+ description: Value is the taint value the toleration matches
+ to. If the operator is Exists, the value should be empty,
+ otherwise just a regular string.
+ type: string
+ type: object
+ type: array
+ topologySpreadConstraints:
+ description: Defines the pod's topology spread constraints if specified.
+ items:
+ description: TopologySpreadConstraint specifies how to spread matching
+ pods among the given topology.
+ properties:
+ labelSelector:
+ description: LabelSelector is used to find matching pods. Pods
+ that match this label selector are counted to determine the
+ number of pods in their corresponding topology domain.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector
+ requirements. The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector
+ that contains values, a key, and an operator that relates
+ the key and values.
+ properties:
+ key:
+ description: key is the label key that the selector
+ applies to.
+ type: string
+ operator:
+ description: operator represents a key's relationship
+ to a set of values. Valid operators are In, NotIn,
+ Exists and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values.
+ If the operator is In or NotIn, the values array
+ must be non-empty. If the operator is Exists or
+ DoesNotExist, the values array must be empty. This
+ array is replaced during a strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs.
+ A single {key,value} in the matchLabels map is equivalent
+ to an element of matchExpressions, whose key field is
+ "key", the operator is "In", and the values array contains
+ only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ matchLabelKeys:
+ description: "MatchLabelKeys is a set of pod label keys to select
+ the pods over which spreading will be calculated. The keys
+ are used to lookup values from the incoming pod labels, those
+ key-value labels are ANDed with labelSelector to select the
+ group of existing pods over which spreading will be calculated
+ for the incoming pod. The same key is forbidden to exist in
+ both MatchLabelKeys and LabelSelector. MatchLabelKeys cannot
+ be set when LabelSelector isn't set. Keys that don't exist
+ in the incoming pod labels will be ignored. A null or empty
+ list means only match against labelSelector. \n This is a
+ beta field and requires the MatchLabelKeysInPodTopologySpread
+ feature gate to be enabled (enabled by default)."
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ maxSkew:
+ description: 'MaxSkew describes the degree to which pods may
+ be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`,
+ it is the maximum permitted difference between the number
+ of matching pods in the target topology and the global minimum.
+ The global minimum is the minimum number of matching pods
+ in an eligible domain or zero if the number of eligible domains
+ is less than MinDomains. For example, in a 3-zone cluster,
+ MaxSkew is set to 1, and pods with the same labelSelector
+ spread as 2/2/1: In this case, the global minimum is 1. |
+ zone1 | zone2 | zone3 | | P P | P P | P | - if MaxSkew
+ is 1, incoming pod can only be scheduled to zone3 to become
+ 2/2/2; scheduling it onto zone1(zone2) would make the ActualSkew(3-1)
+ on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming
+ pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`,
+ it is used to give higher precedence to topologies that satisfy
+ it. It''s a required field. Default value is 1 and 0 is not
+ allowed.'
+ format: int32
+ type: integer
+ minDomains:
+ description: "MinDomains indicates a minimum number of eligible
+ domains. When the number of eligible domains with matching
+ topology keys is less than minDomains, Pod Topology Spread
+ treats \"global minimum\" as 0, and then the calculation of
+ Skew is performed. And when the number of eligible domains
+ with matching topology keys equals or greater than minDomains,
+ this value has no effect on scheduling. As a result, when
+ the number of eligible domains is less than minDomains, scheduler
+ won't schedule more than maxSkew Pods to those domains. If
+ value is nil, the constraint behaves as if MinDomains is equal
+ to 1. Valid values are integers greater than 0. When value
+ is not nil, WhenUnsatisfiable must be DoNotSchedule. \n For
+ example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains
+ is set to 5 and pods with the same labelSelector spread as
+ 2/2/2: | zone1 | zone2 | zone3 | | P P | P P | P P |
+ The number of domains is less than 5(MinDomains), so \"global
+ minimum\" is treated as 0. In this situation, new pod with
+ the same labelSelector cannot be scheduled, because computed
+ skew will be 3(3 - 0) if new Pod is scheduled to any of the
+ three zones, it will violate MaxSkew. \n This is a beta field
+ and requires the MinDomainsInPodTopologySpread feature gate
+ to be enabled (enabled by default)."
+ format: int32
+ type: integer
+ nodeAffinityPolicy:
+ description: "NodeAffinityPolicy indicates how we will treat
+ Pod's nodeAffinity/nodeSelector when calculating pod topology
+ spread skew. Options are: - Honor: only nodes matching nodeAffinity/nodeSelector
+ are included in the calculations. - Ignore: nodeAffinity/nodeSelector
+ are ignored. All nodes are included in the calculations. \n
+ If this value is nil, the behavior is equivalent to the Honor
+ policy. This is a beta-level feature default enabled by the
+ NodeInclusionPolicyInPodTopologySpread feature flag."
+ type: string
+ nodeTaintsPolicy:
+ description: "NodeTaintsPolicy indicates how we will treat node
+ taints when calculating pod topology spread skew. Options
+ are: - Honor: nodes without taints, along with tainted nodes
+ for which the incoming pod has a toleration, are included.
+ - Ignore: node taints are ignored. All nodes are included.
+ \n If this value is nil, the behavior is equivalent to the
+ Ignore policy. This is a beta-level feature default enabled
+ by the NodeInclusionPolicyInPodTopologySpread feature flag."
+ type: string
+ topologyKey:
+ description: TopologyKey is the key of node labels. Nodes that
+ have a label with this key and identical values are considered
+ to be in the same topology. We consider each
+ as a "bucket", and try to put balanced number of pods into
+ each bucket. We define a domain as a particular instance of
+ a topology. Also, we define an eligible domain as a domain
+ whose nodes meet the requirements of nodeAffinityPolicy and
+ nodeTaintsPolicy. e.g. If TopologyKey is "kubernetes.io/hostname",
+ each Node is a domain of that topology. And, if TopologyKey
+ is "topology.kubernetes.io/zone", each zone is a domain of
+ that topology. It's a required field.
+ type: string
+ whenUnsatisfiable:
+ description: 'WhenUnsatisfiable indicates how to deal with a
+ pod if it doesn''t satisfy the spread constraint. - DoNotSchedule
+ (default) tells the scheduler not to schedule it. - ScheduleAnyway
+ tells the scheduler to schedule the pod in any location, but
+ giving higher precedence to topologies that would help reduce
+ the skew. A constraint is considered "Unsatisfiable" for an
+ incoming pod if and only if every possible node assignment
+ for that pod would violate "MaxSkew" on some topology. For
+ example, in a 3-zone cluster, MaxSkew is set to 1, and pods
+ with the same labelSelector spread as 3/1/1: | zone1 | zone2
+ | zone3 | | P P P | P | P | If WhenUnsatisfiable is
+ set to DoNotSchedule, incoming pod can only be scheduled to
+ zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on
+ zone2(zone3) satisfies MaxSkew(1). In other words, the cluster
+ can still be imbalanced, but scheduler won''t make it *more*
+ imbalanced. It''s a required field.'
+ type: string
+ required:
+ - maxSkew
+ - topologyKey
+ - whenUnsatisfiable
+ type: object
+ type: array
+ tracingConfig:
+ description: 'EXPERIMENTAL: TracingConfig configures tracing in Prometheus.
+ This is an experimental feature, it may change in any upcoming release
+ in a breaking way.'
+ properties:
+ clientType:
+ description: Client used to export the traces. Supported values
+ are `http` or `grpc`.
+ enum:
+ - http
+ - grpc
+ type: string
+ compression:
+ description: Compression key for supported compression types.
+ The only supported value is `gzip`.
+ enum:
+ - gzip
+ type: string
+ endpoint:
+ description: Endpoint to send the traces to. Should be provided
+ in format :.
+ minLength: 1
+ type: string
+ headers:
+ additionalProperties:
+ type: string
+ description: Key-value pairs to be used as headers associated
+ with gRPC or HTTP requests.
+ type: object
+ insecure:
+ description: If disabled, the client will use a secure connection.
+ type: boolean
+ samplingFraction:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Sets the probability a given trace will be sampled.
+ Must be a float from 0 through 1.
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ timeout:
+ description: Maximum time the exporter will wait for each batch
+ export.
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ tlsConfig:
+ description: TLS Config to use when sending traces.
+ properties:
+ ca:
+ description: Certificate authority used when verifying server
+ certificates.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ caFile:
+ description: Path to the CA cert in the Prometheus container
+ to use for the targets.
+ type: string
+ cert:
+ description: Client certificate to present when doing client-authentication.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ certFile:
+ description: Path to the client cert file in the Prometheus
+ container for the targets.
+ type: string
+ insecureSkipVerify:
+ description: Disable target certificate validation.
+ type: boolean
+ keyFile:
+ description: Path to the client key file in the Prometheus
+ container for the targets.
+ type: string
+ keySecret:
+ description: Secret containing the client key file for the
+ targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ serverName:
+ description: Used to verify the hostname for the targets.
+ type: string
+ type: object
+ required:
+ - endpoint
+ type: object
+ tsdb:
+ description: Defines the runtime reloadable configuration of the timeseries
+ database (TSDB).
+ properties:
+ outOfOrderTimeWindow:
+ description: "Configures how old an out-of-order/out-of-bounds
+ sample can be with respect to the TSDB max time. \n An out-of-order/out-of-bounds
+ sample is ingested into the TSDB as long as the timestamp of
+ the sample is >= (TSDB.MaxTime - outOfOrderTimeWindow). \n Out
+ of order ingestion is an experimental feature. \n It requires
+ Prometheus >= v2.39.0."
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ type: object
+ version:
+ description: "Version of Prometheus being deployed. The operator uses
+ this information to generate the Prometheus StatefulSet + configuration
+ files. \n If not specified, the operator assumes the latest upstream
+ version of Prometheus available at the time when the version of
+ the operator was released."
+ type: string
+ volumeMounts:
+ description: "VolumeMounts allows the configuration of additional
+ VolumeMounts. \n VolumeMounts will be appended to other VolumeMounts
+ in the 'prometheus' container, that are generated as a result of
+ StorageSpec objects."
+ items:
+ description: VolumeMount describes a mounting of a Volume within
+ a container.
+ properties:
+ mountPath:
+ description: Path within the container at which the volume should
+ be mounted. Must not contain ':'.
+ type: string
+ mountPropagation:
+ description: mountPropagation determines how mounts are propagated
+ from the host to container and the other way around. When
+ not set, MountPropagationNone is used. This field is beta
+ in 1.10.
+ type: string
+ name:
+ description: This must match the Name of a Volume.
+ type: string
+ readOnly:
+ description: Mounted read-only if true, read-write otherwise
+ (false or unspecified). Defaults to false.
+ type: boolean
+ subPath:
+ description: Path within the volume from which the container's
+ volume should be mounted. Defaults to "" (volume's root).
+ type: string
+ subPathExpr:
+ description: Expanded path within the volume from which the
+ container's volume should be mounted. Behaves similarly to
+ SubPath but environment variable references $(VAR_NAME) are
+ expanded using the container's environment. Defaults to ""
+ (volume's root). SubPathExpr and SubPath are mutually exclusive.
+ type: string
+ required:
+ - mountPath
+ - name
+ type: object
+ type: array
+ volumes:
+ description: Volumes allows the configuration of additional volumes
+ on the output StatefulSet definition. Volumes specified will be
+ appended to other volumes that are generated as a result of StorageSpec
+ objects.
+ items:
+ description: Volume represents a named volume in a pod that may
+ be accessed by any container in the pod.
+ properties:
+ awsElasticBlockStore:
+ description: 'awsElasticBlockStore represents an AWS Disk resource
+ that is attached to a kubelet''s host machine and then exposed
+ to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore'
+ properties:
+ fsType:
+ description: 'fsType is the filesystem type of the volume
+ that you want to mount. Tip: Ensure that the filesystem
+ type is supported by the host operating system. Examples:
+ "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4"
+ if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
+ TODO: how do we prevent errors in the filesystem from
+ compromising the machine'
+ type: string
+ partition:
+ description: 'partition is the partition in the volume that
+ you want to mount. If omitted, the default is to mount
+ by volume name. Examples: For volume /dev/sda1, you specify
+ the partition as "1". Similarly, the volume partition
+ for /dev/sda is "0" (or you can leave the property empty).'
+ format: int32
+ type: integer
+ readOnly:
+ description: 'readOnly value true will force the readOnly
+ setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore'
+ type: boolean
+ volumeID:
+ description: 'volumeID is unique ID of the persistent disk
+ resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore'
+ type: string
+ required:
+ - volumeID
+ type: object
+ azureDisk:
+ description: azureDisk represents an Azure Data Disk mount on
+ the host and bind mount to the pod.
+ properties:
+ cachingMode:
+ description: 'cachingMode is the Host Caching mode: None,
+ Read Only, Read Write.'
+ type: string
+ diskName:
+ description: diskName is the Name of the data disk in the
+ blob storage
+ type: string
+ diskURI:
+ description: diskURI is the URI of data disk in the blob
+ storage
+ type: string
+ fsType:
+ description: fsType is Filesystem type to mount. Must be
+ a filesystem type supported by the host operating system.
+ Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4"
+ if unspecified.
+ type: string
+ kind:
+ description: 'kind expected values are Shared: multiple
+ blob disks per storage account Dedicated: single blob
+ disk per storage account Managed: azure managed data
+ disk (only in managed availability set). defaults to shared'
+ type: string
+ readOnly:
+ description: readOnly Defaults to false (read/write). ReadOnly
+ here will force the ReadOnly setting in VolumeMounts.
+ type: boolean
+ required:
+ - diskName
+ - diskURI
+ type: object
+ azureFile:
+ description: azureFile represents an Azure File Service mount
+ on the host and bind mount to the pod.
+ properties:
+ readOnly:
+ description: readOnly defaults to false (read/write). ReadOnly
+ here will force the ReadOnly setting in VolumeMounts.
+ type: boolean
+ secretName:
+ description: secretName is the name of secret that contains
+ Azure Storage Account Name and Key
+ type: string
+ shareName:
+ description: shareName is the azure share Name
+ type: string
+ required:
+ - secretName
+ - shareName
+ type: object
+ cephfs:
+ description: cephFS represents a Ceph FS mount on the host that
+ shares a pod's lifetime
+ properties:
+ monitors:
+ description: 'monitors is Required: Monitors is a collection
+ of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it'
+ items:
+ type: string
+ type: array
+ path:
+ description: 'path is Optional: Used as the mounted root,
+ rather than the full Ceph tree, default is /'
+ type: string
+ readOnly:
+ description: 'readOnly is Optional: Defaults to false (read/write).
+ ReadOnly here will force the ReadOnly setting in VolumeMounts.
+ More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it'
+ type: boolean
+ secretFile:
+ description: 'secretFile is Optional: SecretFile is the
+ path to key ring for User, default is /etc/ceph/user.secret
+ More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it'
+ type: string
+ secretRef:
+ description: 'secretRef is Optional: SecretRef is reference
+ to the authentication secret for User, default is empty.
+ More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it'
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ user:
+ description: 'user is optional: User is the rados user name,
+ default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it'
+ type: string
+ required:
+ - monitors
+ type: object
+ cinder:
+ description: 'cinder represents a cinder volume attached and
+ mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md'
+ properties:
+ fsType:
+ description: 'fsType is the filesystem type to mount. Must
+ be a filesystem type supported by the host operating system.
+ Examples: "ext4", "xfs", "ntfs". Implicitly inferred to
+ be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md'
+ type: string
+ readOnly:
+ description: 'readOnly defaults to false (read/write). ReadOnly
+ here will force the ReadOnly setting in VolumeMounts.
+ More info: https://examples.k8s.io/mysql-cinder-pd/README.md'
+ type: boolean
+ secretRef:
+ description: 'secretRef is optional: points to a secret
+ object containing parameters used to connect to OpenStack.'
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ volumeID:
+ description: 'volumeID used to identify the volume in cinder.
+ More info: https://examples.k8s.io/mysql-cinder-pd/README.md'
+ type: string
+ required:
+ - volumeID
+ type: object
+ configMap:
+ description: configMap represents a configMap that should populate
+ this volume
+ properties:
+ defaultMode:
+ description: 'defaultMode is optional: mode bits used to
+ set permissions on created files by default. Must be an
+ octal value between 0000 and 0777 or a decimal value between
+ 0 and 511. YAML accepts both octal and decimal values,
+ JSON requires decimal values for mode bits. Defaults to
+ 0644. Directories within the path are not affected by
+ this setting. This might be in conflict with other options
+ that affect the file mode, like fsGroup, and the result
+ can be other mode bits set.'
+ format: int32
+ type: integer
+ items:
+ description: items if unspecified, each key-value pair in
+ the Data field of the referenced ConfigMap will be projected
+ into the volume as a file whose name is the key and content
+ is the value. If specified, the listed keys will be projected
+ into the specified paths, and unlisted keys will not be
+ present. If a key is specified which is not present in
+ the ConfigMap, the volume setup will error unless it is
+ marked optional. Paths must be relative and may not contain
+ the '..' path or start with '..'.
+ items:
+ description: Maps a string key to a path within a volume.
+ properties:
+ key:
+ description: key is the key to project.
+ type: string
+ mode:
+ description: 'mode is Optional: mode bits used to
+ set permissions on this file. Must be an octal value
+ between 0000 and 0777 or a decimal value between
+ 0 and 511. YAML accepts both octal and decimal values,
+ JSON requires decimal values for mode bits. If not
+ specified, the volume defaultMode will be used.
+ This might be in conflict with other options that
+ affect the file mode, like fsGroup, and the result
+ can be other mode bits set.'
+ format: int32
+ type: integer
+ path:
+ description: path is the relative path of the file
+ to map the key to. May not be an absolute path.
+ May not contain the path element '..'. May not start
+ with the string '..'.
+ type: string
+ required:
+ - key
+ - path
+ type: object
+ type: array
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: optional specify whether the ConfigMap or its
+ keys must be defined
+ type: boolean
+ type: object
+ x-kubernetes-map-type: atomic
+ csi:
+ description: csi (Container Storage Interface) represents ephemeral
+ storage that is handled by certain external CSI drivers (Beta
+ feature).
+ properties:
+ driver:
+ description: driver is the name of the CSI driver that handles
+ this volume. Consult with your admin for the correct name
+ as registered in the cluster.
+ type: string
+ fsType:
+ description: fsType to mount. Ex. "ext4", "xfs", "ntfs".
+ If not provided, the empty value is passed to the associated
+ CSI driver which will determine the default filesystem
+ to apply.
+ type: string
+ nodePublishSecretRef:
+ description: nodePublishSecretRef is a reference to the
+ secret object containing sensitive information to pass
+ to the CSI driver to complete the CSI NodePublishVolume
+ and NodeUnpublishVolume calls. This field is optional,
+ and may be empty if no secret is required. If the secret
+ object contains more than one secret, all secret references
+ are passed.
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ readOnly:
+ description: readOnly specifies a read-only configuration
+ for the volume. Defaults to false (read/write).
+ type: boolean
+ volumeAttributes:
+ additionalProperties:
+ type: string
+ description: volumeAttributes stores driver-specific properties
+ that are passed to the CSI driver. Consult your driver's
+ documentation for supported values.
+ type: object
+ required:
+ - driver
+ type: object
+ downwardAPI:
+ description: downwardAPI represents downward API about the pod
+ that should populate this volume
+ properties:
+ defaultMode:
+ description: 'Optional: mode bits to use on created files
+ by default. Must be a Optional: mode bits used to set
+ permissions on created files by default. Must be an octal
+ value between 0000 and 0777 or a decimal value between
+ 0 and 511. YAML accepts both octal and decimal values,
+ JSON requires decimal values for mode bits. Defaults to
+ 0644. Directories within the path are not affected by
+ this setting. This might be in conflict with other options
+ that affect the file mode, like fsGroup, and the result
+ can be other mode bits set.'
+ format: int32
+ type: integer
+ items:
+ description: Items is a list of downward API volume file
+ items:
+ description: DownwardAPIVolumeFile represents information
+ to create the file containing the pod field
+ properties:
+ fieldRef:
+ description: 'Required: Selects a field of the pod:
+ only annotations, labels, name and namespace are
+ supported.'
+ properties:
+ apiVersion:
+ description: Version of the schema the FieldPath
+ is written in terms of, defaults to "v1".
+ type: string
+ fieldPath:
+ description: Path of the field to select in the
+ specified API version.
+ type: string
+ required:
+ - fieldPath
+ type: object
+ x-kubernetes-map-type: atomic
+ mode:
+ description: 'Optional: mode bits used to set permissions
+ on this file, must be an octal value between 0000
+ and 0777 or a decimal value between 0 and 511. YAML
+ accepts both octal and decimal values, JSON requires
+ decimal values for mode bits. If not specified,
+ the volume defaultMode will be used. This might
+ be in conflict with other options that affect the
+ file mode, like fsGroup, and the result can be other
+ mode bits set.'
+ format: int32
+ type: integer
+ path:
+ description: 'Required: Path is the relative path
+ name of the file to be created. Must not be absolute
+ or contain the ''..'' path. Must be utf-8 encoded.
+ The first item of the relative path must not start
+ with ''..'''
+ type: string
+ resourceFieldRef:
+ description: 'Selects a resource of the container:
+ only resources limits and requests (limits.cpu,
+ limits.memory, requests.cpu and requests.memory)
+ are currently supported.'
+ properties:
+ containerName:
+ description: 'Container name: required for volumes,
+ optional for env vars'
+ type: string
+ divisor:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Specifies the output format of the
+ exposed resources, defaults to "1"
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ resource:
+ description: 'Required: resource to select'
+ type: string
+ required:
+ - resource
+ type: object
+ x-kubernetes-map-type: atomic
+ required:
+ - path
+ type: object
+ type: array
+ type: object
+ emptyDir:
+ description: 'emptyDir represents a temporary directory that
+ shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir'
+ properties:
+ medium:
+ description: 'medium represents what type of storage medium
+ should back this directory. The default is "" which means
+ to use the node''s default medium. Must be an empty string
+ (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir'
+ type: string
+ sizeLimit:
+ anyOf:
+ - type: integer
+ - type: string
+ description: 'sizeLimit is the total amount of local storage
+ required for this EmptyDir volume. The size limit is also
+ applicable for memory medium. 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. The default is nil which means
+ that the limit is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir'
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ type: object
+ ephemeral:
+ description: "ephemeral represents a volume that is handled
+ by a cluster storage driver. The volume's lifecycle is tied
+ to the pod that defines it - it will be created before the
+ pod starts, and deleted when the pod is removed. \n Use this
+ if: a) the volume is only needed while the pod runs, b) features
+ of normal volumes like restoring from snapshot or capacity
+ tracking are needed, c) the storage driver is specified through
+ a storage class, and d) the storage driver supports dynamic
+ volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource
+ for more information on the connection between this volume
+ type and PersistentVolumeClaim). \n Use PersistentVolumeClaim
+ or one of the vendor-specific APIs for volumes that persist
+ for longer than the lifecycle of an individual pod. \n Use
+ CSI for light-weight local ephemeral volumes if the CSI driver
+ is meant to be used that way - see the documentation of the
+ driver for more information. \n A pod can use both types of
+ ephemeral volumes and persistent volumes at the same time."
+ properties:
+ volumeClaimTemplate:
+ description: "Will be used to create a stand-alone PVC to
+ provision the volume. The pod in which this EphemeralVolumeSource
+ is embedded will be the owner of the PVC, i.e. the PVC
+ will be deleted together with the pod. The name of the
+ PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry.
+ Pod validation will reject the pod if the concatenated
+ name is not valid for a PVC (for example, too long). \n
+ An existing PVC with that name that is not owned by the
+ pod will *not* be used for the pod to avoid using an unrelated
+ volume by mistake. Starting the pod is then blocked until
+ the unrelated PVC is removed. If such a pre-created PVC
+ is meant to be used by the pod, the PVC has to updated
+ with an owner reference to the pod once the pod exists.
+ Normally this should not be necessary, but it may be useful
+ when manually reconstructing a broken cluster. \n This
+ field is read-only and no changes will be made by Kubernetes
+ to the PVC after it has been created. \n Required, must
+ not be nil."
+ properties:
+ metadata:
+ description: May contain labels and annotations that
+ will be copied into the PVC when creating it. No other
+ fields are allowed and will be rejected during validation.
+ type: object
+ spec:
+ description: The specification for the PersistentVolumeClaim.
+ The entire content is copied unchanged into the PVC
+ that gets created from this template. The same fields
+ as in a PersistentVolumeClaim are also valid here.
+ properties:
+ accessModes:
+ description: 'accessModes contains the desired access
+ modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1'
+ items:
+ type: string
+ type: array
+ dataSource:
+ description: 'dataSource field can be used to specify
+ either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot)
+ * An existing PVC (PersistentVolumeClaim) If the
+ provisioner or an external controller can support
+ the specified data source, it will create a new
+ volume based on the contents of the specified
+ data source. When the AnyVolumeDataSource feature
+ gate is enabled, dataSource contents will be copied
+ to dataSourceRef, and dataSourceRef contents will
+ be copied to dataSource when dataSourceRef.namespace
+ is not specified. If the namespace is specified,
+ then dataSourceRef will not be copied to dataSource.'
+ properties:
+ apiGroup:
+ description: APIGroup is the group for the resource
+ being referenced. If APIGroup is not specified,
+ the specified Kind must be in the core API
+ group. For any other third-party types, APIGroup
+ is required.
+ type: string
+ kind:
+ description: Kind is the type of resource being
+ referenced
+ type: string
+ name:
+ description: Name is the name of resource being
+ referenced
+ type: string
+ required:
+ - kind
+ - name
+ type: object
+ x-kubernetes-map-type: atomic
+ dataSourceRef:
+ description: 'dataSourceRef specifies the object
+ from which to populate the volume with data, if
+ a non-empty volume is desired. This may be any
+ object from a non-empty API group (non core object)
+ or a PersistentVolumeClaim object. When this field
+ is specified, volume binding will only succeed
+ if the type of the specified object matches some
+ installed volume populator or dynamic provisioner.
+ This field will replace the functionality of the
+ dataSource field and as such if both fields are
+ non-empty, they must have the same value. For
+ backwards compatibility, when namespace isn''t
+ specified in dataSourceRef, both fields (dataSource
+ and dataSourceRef) will be set to the same value
+ automatically if one of them is empty and the
+ other is non-empty. When namespace is specified
+ in dataSourceRef, dataSource isn''t set to the
+ same value and must be empty. There are three
+ important differences between dataSource and dataSourceRef:
+ * While dataSource only allows two specific types
+ of objects, dataSourceRef allows any non-core
+ object, as well as PersistentVolumeClaim objects.
+ * While dataSource ignores disallowed values (dropping
+ them), dataSourceRef preserves all values, and
+ generates an error if a disallowed value is specified.
+ * While dataSource only allows local objects,
+ dataSourceRef allows objects in any namespaces.
+ (Beta) Using this field requires the AnyVolumeDataSource
+ feature gate to be enabled. (Alpha) Using the
+ namespace field of dataSourceRef requires the
+ CrossNamespaceVolumeDataSource feature gate to
+ be enabled.'
+ properties:
+ apiGroup:
+ description: APIGroup is the group for the resource
+ being referenced. If APIGroup is not specified,
+ the specified Kind must be in the core API
+ group. For any other third-party types, APIGroup
+ is required.
+ type: string
+ kind:
+ description: Kind is the type of resource being
+ referenced
+ type: string
+ name:
+ description: Name is the name of resource being
+ referenced
+ type: string
+ namespace:
+ description: Namespace is the namespace of resource
+ being referenced Note that when a namespace
+ is specified, a gateway.networking.k8s.io/ReferenceGrant
+ object is required in the referent namespace
+ to allow that namespace's owner to accept
+ the reference. See the ReferenceGrant documentation
+ for details. (Alpha) This field requires the
+ CrossNamespaceVolumeDataSource feature gate
+ to be enabled.
+ type: string
+ required:
+ - kind
+ - name
+ type: object
+ resources:
+ description: 'resources represents the minimum resources
+ the volume should have. If RecoverVolumeExpansionFailure
+ feature is enabled users are allowed to specify
+ resource requirements that are lower than previous
+ value but must still be higher than capacity recorded
+ in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources'
+ properties:
+ claims:
+ description: "Claims lists the names of resources,
+ defined in spec.resourceClaims, that are used
+ by this container. \n This is an alpha field
+ and requires enabling the DynamicResourceAllocation
+ feature gate. \n This field is immutable.
+ It can only be set for containers."
+ items:
+ description: ResourceClaim references one
+ entry in PodSpec.ResourceClaims.
+ properties:
+ name:
+ description: Name must match the name
+ of one entry in pod.spec.resourceClaims
+ of the Pod where this field is used.
+ It makes that resource available inside
+ a container.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - name
+ x-kubernetes-list-type: map
+ limits:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Limits describes the maximum amount
+ of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ requests:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Requests describes the minimum
+ amount of compute resources required. If Requests
+ is omitted for a container, it defaults to
+ Limits if that is explicitly specified, otherwise
+ to an implementation-defined value. Requests
+ cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ type: object
+ selector:
+ description: selector is a label query over volumes
+ to consider for binding.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: A label selector requirement
+ is a selector that contains values, a key,
+ and an operator that relates the key and
+ values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's
+ relationship to a set of values. Valid
+ operators are In, NotIn, Exists and
+ DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty.
+ If the operator is Exists or DoesNotExist,
+ the values array must be empty. This
+ array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is
+ "In", and the values array contains only "value".
+ The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ storageClassName:
+ description: 'storageClassName is the name of the
+ StorageClass required by the claim. More info:
+ https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1'
+ type: string
+ volumeMode:
+ description: volumeMode defines what type of volume
+ is required by the claim. Value of Filesystem
+ is implied when not included in claim spec.
+ type: string
+ volumeName:
+ description: volumeName is the binding reference
+ to the PersistentVolume backing this claim.
+ type: string
+ type: object
+ required:
+ - spec
+ type: object
+ type: object
+ fc:
+ description: fc represents a Fibre Channel resource that is
+ attached to a kubelet's host machine and then exposed to the
+ pod.
+ properties:
+ fsType:
+ description: 'fsType is the filesystem type to mount. Must
+ be a filesystem type supported by the host operating system.
+ Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4"
+ if unspecified. TODO: how do we prevent errors in the
+ filesystem from compromising the machine'
+ type: string
+ lun:
+ description: 'lun is Optional: FC target lun number'
+ format: int32
+ type: integer
+ readOnly:
+ description: 'readOnly is Optional: Defaults to false (read/write).
+ ReadOnly here will force the ReadOnly setting in VolumeMounts.'
+ type: boolean
+ targetWWNs:
+ description: 'targetWWNs is Optional: FC target worldwide
+ names (WWNs)'
+ items:
+ type: string
+ type: array
+ wwids:
+ description: 'wwids Optional: FC volume world wide identifiers
+ (wwids) Either wwids or combination of targetWWNs and
+ lun must be set, but not both simultaneously.'
+ items:
+ type: string
+ type: array
+ type: object
+ flexVolume:
+ description: flexVolume represents a generic volume resource
+ that is provisioned/attached using an exec based plugin.
+ properties:
+ driver:
+ description: driver is the name of the driver to use for
+ this volume.
+ type: string
+ fsType:
+ description: fsType is the filesystem type to mount. Must
+ be a filesystem type supported by the host operating system.
+ Ex. "ext4", "xfs", "ntfs". The default filesystem depends
+ on FlexVolume script.
+ type: string
+ options:
+ additionalProperties:
+ type: string
+ description: 'options is Optional: this field holds extra
+ command options if any.'
+ type: object
+ readOnly:
+ description: 'readOnly is Optional: defaults to false (read/write).
+ ReadOnly here will force the ReadOnly setting in VolumeMounts.'
+ type: boolean
+ secretRef:
+ description: 'secretRef is Optional: secretRef is reference
+ to the secret object containing sensitive information
+ to pass to the plugin scripts. This may be empty if no
+ secret object is specified. If the secret object contains
+ more than one secret, all secrets are passed to the plugin
+ scripts.'
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ required:
+ - driver
+ type: object
+ flocker:
+ description: flocker represents a Flocker volume attached to
+ a kubelet's host machine. This depends on the Flocker control
+ service being running
+ properties:
+ datasetName:
+ description: datasetName is Name of the dataset stored as
+ metadata -> name on the dataset for Flocker should be
+ considered as deprecated
+ type: string
+ datasetUUID:
+ description: datasetUUID is the UUID of the dataset. This
+ is unique identifier of a Flocker dataset
+ type: string
+ type: object
+ gcePersistentDisk:
+ description: 'gcePersistentDisk represents a GCE Disk resource
+ that is attached to a kubelet''s host machine and then exposed
+ to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk'
+ properties:
+ fsType:
+ description: 'fsType is filesystem type of the volume that
+ you want to mount. Tip: Ensure that the filesystem type
+ is supported by the host operating system. Examples: "ext4",
+ "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+ TODO: how do we prevent errors in the filesystem from
+ compromising the machine'
+ type: string
+ partition:
+ description: 'partition is the partition in the volume that
+ you want to mount. If omitted, the default is to mount
+ by volume name. Examples: For volume /dev/sda1, you specify
+ the partition as "1". Similarly, the volume partition
+ for /dev/sda is "0" (or you can leave the property empty).
+ More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk'
+ format: int32
+ type: integer
+ pdName:
+ description: 'pdName is unique name of the PD resource in
+ GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk'
+ type: string
+ readOnly:
+ description: 'readOnly here will force the ReadOnly setting
+ in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk'
+ type: boolean
+ required:
+ - pdName
+ type: object
+ gitRepo:
+ description: 'gitRepo represents a git repository at a particular
+ revision. DEPRECATED: GitRepo is deprecated. To provision
+ a container with a git repo, mount an EmptyDir into an InitContainer
+ that clones the repo using git, then mount the EmptyDir into
+ the Pod''s container.'
+ properties:
+ directory:
+ description: directory is the target directory name. Must
+ not contain or start with '..'. If '.' is supplied, the
+ volume directory will be the git repository. Otherwise,
+ if specified, the volume will contain the git repository
+ in the subdirectory with the given name.
+ type: string
+ repository:
+ description: repository is the URL
+ type: string
+ revision:
+ description: revision is the commit hash for the specified
+ revision.
+ type: string
+ required:
+ - repository
+ type: object
+ glusterfs:
+ description: 'glusterfs represents a Glusterfs mount on the
+ host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md'
+ properties:
+ endpoints:
+ description: 'endpoints is the endpoint name that details
+ Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod'
+ type: string
+ path:
+ description: 'path is the Glusterfs volume path. More info:
+ https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod'
+ type: string
+ readOnly:
+ description: 'readOnly here will force the Glusterfs volume
+ to be mounted with read-only permissions. Defaults to
+ false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod'
+ type: boolean
+ required:
+ - endpoints
+ - path
+ type: object
+ hostPath:
+ description: 'hostPath represents a pre-existing file or directory
+ on the host machine that is directly exposed to the container.
+ This is generally used for system agents or other privileged
+ things that are allowed to see the host machine. Most containers
+ will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
+ --- TODO(jonesdl) We need to restrict who can use host directory
+ mounts and who can/can not mount host directories as read/write.'
+ properties:
+ path:
+ description: 'path of the directory on the host. If the
+ path is a symlink, it will follow the link to the real
+ path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath'
+ type: string
+ type:
+ description: 'type for HostPath Volume Defaults to "" More
+ info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath'
+ type: string
+ required:
+ - path
+ type: object
+ iscsi:
+ description: 'iscsi represents an ISCSI Disk resource that is
+ attached to a kubelet''s host machine and then exposed to
+ the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md'
+ properties:
+ chapAuthDiscovery:
+ description: chapAuthDiscovery defines whether support iSCSI
+ Discovery CHAP authentication
+ type: boolean
+ chapAuthSession:
+ description: chapAuthSession defines whether support iSCSI
+ Session CHAP authentication
+ type: boolean
+ fsType:
+ description: 'fsType is the filesystem type of the volume
+ that you want to mount. Tip: Ensure that the filesystem
+ type is supported by the host operating system. Examples:
+ "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4"
+ if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi
+ TODO: how do we prevent errors in the filesystem from
+ compromising the machine'
+ type: string
+ initiatorName:
+ description: initiatorName is the custom iSCSI Initiator
+ Name. If initiatorName is specified with iscsiInterface
+ simultaneously, new iSCSI interface : will be created for the connection.
+ type: string
+ iqn:
+ description: iqn is the target iSCSI Qualified Name.
+ type: string
+ iscsiInterface:
+ description: iscsiInterface is the interface Name that uses
+ an iSCSI transport. Defaults to 'default' (tcp).
+ type: string
+ lun:
+ description: lun represents iSCSI Target Lun number.
+ format: int32
+ type: integer
+ portals:
+ description: portals is the iSCSI Target Portal List. The
+ portal is either an IP or ip_addr:port if the port is
+ other than default (typically TCP ports 860 and 3260).
+ items:
+ type: string
+ type: array
+ readOnly:
+ description: readOnly here will force the ReadOnly setting
+ in VolumeMounts. Defaults to false.
+ type: boolean
+ secretRef:
+ description: secretRef is the CHAP Secret for iSCSI target
+ and initiator authentication
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ targetPortal:
+ description: targetPortal is iSCSI Target Portal. The Portal
+ is either an IP or ip_addr:port if the port is other than
+ default (typically TCP ports 860 and 3260).
+ type: string
+ required:
+ - iqn
+ - lun
+ - targetPortal
+ type: object
+ name:
+ description: 'name of the volume. Must be a DNS_LABEL and unique
+ within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
+ type: string
+ nfs:
+ description: 'nfs represents an NFS mount on the host that shares
+ a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs'
+ properties:
+ path:
+ description: 'path that is exported by the NFS server. More
+ info: https://kubernetes.io/docs/concepts/storage/volumes#nfs'
+ type: string
+ readOnly:
+ description: 'readOnly here will force the NFS export to
+ be mounted with read-only permissions. Defaults to false.
+ More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs'
+ type: boolean
+ server:
+ description: 'server is the hostname or IP address of the
+ NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs'
+ type: string
+ required:
+ - path
+ - server
+ type: object
+ persistentVolumeClaim:
+ description: 'persistentVolumeClaimVolumeSource represents a
+ reference to a PersistentVolumeClaim in the same namespace.
+ More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
+ properties:
+ claimName:
+ description: 'claimName is the name of a PersistentVolumeClaim
+ in the same namespace as the pod using this volume. More
+ info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
+ type: string
+ readOnly:
+ description: readOnly Will force the ReadOnly setting in
+ VolumeMounts. Default false.
+ type: boolean
+ required:
+ - claimName
+ type: object
+ photonPersistentDisk:
+ description: photonPersistentDisk represents a PhotonController
+ persistent disk attached and mounted on kubelets host machine
+ properties:
+ fsType:
+ description: fsType is the filesystem type to mount. Must
+ be a filesystem type supported by the host operating system.
+ Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4"
+ if unspecified.
+ type: string
+ pdID:
+ description: pdID is the ID that identifies Photon Controller
+ persistent disk
+ type: string
+ required:
+ - pdID
+ type: object
+ portworxVolume:
+ description: portworxVolume represents a portworx volume attached
+ and mounted on kubelets host machine
+ properties:
+ fsType:
+ description: fSType represents the filesystem type to mount
+ Must be a filesystem type supported by the host operating
+ system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4"
+ if unspecified.
+ type: string
+ readOnly:
+ description: readOnly defaults to false (read/write). ReadOnly
+ here will force the ReadOnly setting in VolumeMounts.
+ type: boolean
+ volumeID:
+ description: volumeID uniquely identifies a Portworx volume
+ type: string
+ required:
+ - volumeID
+ type: object
+ projected:
+ description: projected items for all in one resources secrets,
+ configmaps, and downward API
+ properties:
+ defaultMode:
+ description: defaultMode are the mode bits used to set permissions
+ on created files by default. Must be an octal value between
+ 0000 and 0777 or a decimal value between 0 and 511. YAML
+ accepts both octal and decimal values, JSON requires decimal
+ values for mode bits. Directories within the path are
+ not affected by this setting. This might be in conflict
+ with other options that affect the file mode, like fsGroup,
+ and the result can be other mode bits set.
+ format: int32
+ type: integer
+ sources:
+ description: sources is the list of volume projections
+ items:
+ description: Projection that may be projected along with
+ other supported volume types
+ properties:
+ configMap:
+ description: configMap information about the configMap
+ data to project
+ properties:
+ items:
+ description: items if unspecified, each key-value
+ pair in the Data field of the referenced ConfigMap
+ will be projected into the volume as a file
+ whose name is the key and content is the value.
+ If specified, the listed keys will be projected
+ into the specified paths, and unlisted keys
+ will not be present. If a key is specified which
+ is not present in the ConfigMap, the volume
+ setup will error unless it is marked optional.
+ Paths must be relative and may not contain the
+ '..' path or start with '..'.
+ items:
+ description: Maps a string key to a path within
+ a volume.
+ properties:
+ key:
+ description: key is the key to project.
+ type: string
+ mode:
+ description: 'mode is Optional: mode bits
+ used to set permissions on this file.
+ Must be an octal value between 0000 and
+ 0777 or a decimal value between 0 and
+ 511. YAML accepts both octal and decimal
+ values, JSON requires decimal values for
+ mode bits. If not specified, the volume
+ defaultMode will be used. This might be
+ in conflict with other options that affect
+ the file mode, like fsGroup, and the result
+ can be other mode bits set.'
+ format: int32
+ type: integer
+ path:
+ description: path is the relative path of
+ the file to map the key to. May not be
+ an absolute path. May not contain the
+ path element '..'. May not start with
+ the string '..'.
+ type: string
+ required:
+ - key
+ - path
+ type: object
+ type: array
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: optional specify whether the ConfigMap
+ or its keys must be defined
+ type: boolean
+ type: object
+ x-kubernetes-map-type: atomic
+ downwardAPI:
+ description: downwardAPI information about the downwardAPI
+ data to project
+ properties:
+ items:
+ description: Items is a list of DownwardAPIVolume
+ file
+ items:
+ description: DownwardAPIVolumeFile represents
+ information to create the file containing
+ the pod field
+ properties:
+ fieldRef:
+ description: 'Required: Selects a field
+ of the pod: only annotations, labels,
+ name and namespace are supported.'
+ properties:
+ apiVersion:
+ description: Version of the schema the
+ FieldPath is written in terms of,
+ defaults to "v1".
+ type: string
+ fieldPath:
+ description: Path of the field to select
+ in the specified API version.
+ type: string
+ required:
+ - fieldPath
+ type: object
+ x-kubernetes-map-type: atomic
+ mode:
+ description: 'Optional: mode bits used to
+ set permissions on this file, must be
+ an octal value between 0000 and 0777 or
+ a decimal value between 0 and 511. YAML
+ accepts both octal and decimal values,
+ JSON requires decimal values for mode
+ bits. If not specified, the volume defaultMode
+ will be used. This might be in conflict
+ with other options that affect the file
+ mode, like fsGroup, and the result can
+ be other mode bits set.'
+ format: int32
+ type: integer
+ path:
+ description: 'Required: Path is the relative
+ path name of the file to be created. Must
+ not be absolute or contain the ''..''
+ path. Must be utf-8 encoded. The first
+ item of the relative path must not start
+ with ''..'''
+ type: string
+ resourceFieldRef:
+ description: 'Selects a resource of the
+ container: only resources limits and requests
+ (limits.cpu, limits.memory, requests.cpu
+ and requests.memory) are currently supported.'
+ properties:
+ containerName:
+ description: 'Container name: required
+ for volumes, optional for env vars'
+ type: string
+ divisor:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Specifies the output format
+ of the exposed resources, defaults
+ to "1"
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ resource:
+ description: 'Required: resource to
+ select'
+ type: string
+ required:
+ - resource
+ type: object
+ x-kubernetes-map-type: atomic
+ required:
+ - path
+ type: object
+ type: array
+ type: object
+ secret:
+ description: secret information about the secret data
+ to project
+ properties:
+ items:
+ description: items if unspecified, each key-value
+ pair in the Data field of the referenced Secret
+ will be projected into the volume as a file
+ whose name is the key and content is the value.
+ If specified, the listed keys will be projected
+ into the specified paths, and unlisted keys
+ will not be present. If a key is specified which
+ is not present in the Secret, the volume setup
+ will error unless it is marked optional. Paths
+ must be relative and may not contain the '..'
+ path or start with '..'.
+ items:
+ description: Maps a string key to a path within
+ a volume.
+ properties:
+ key:
+ description: key is the key to project.
+ type: string
+ mode:
+ description: 'mode is Optional: mode bits
+ used to set permissions on this file.
+ Must be an octal value between 0000 and
+ 0777 or a decimal value between 0 and
+ 511. YAML accepts both octal and decimal
+ values, JSON requires decimal values for
+ mode bits. If not specified, the volume
+ defaultMode will be used. This might be
+ in conflict with other options that affect
+ the file mode, like fsGroup, and the result
+ can be other mode bits set.'
+ format: int32
+ type: integer
+ path:
+ description: path is the relative path of
+ the file to map the key to. May not be
+ an absolute path. May not contain the
+ path element '..'. May not start with
+ the string '..'.
+ type: string
+ required:
+ - key
+ - path
+ type: object
+ type: array
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: optional field specify whether the
+ Secret or its key must be defined
+ type: boolean
+ type: object
+ x-kubernetes-map-type: atomic
+ serviceAccountToken:
+ description: serviceAccountToken is information about
+ the serviceAccountToken data to project
+ properties:
+ audience:
+ description: audience is the intended audience
+ of the token. A recipient of a token must identify
+ itself with an identifier specified in the audience
+ of the token, and otherwise should reject the
+ token. The audience defaults to the identifier
+ of the apiserver.
+ type: string
+ expirationSeconds:
+ description: expirationSeconds is the requested
+ duration of validity of the service account
+ token. As the token approaches expiration, the
+ kubelet volume plugin will proactively rotate
+ the service account token. The kubelet will
+ start trying to rotate the token if the token
+ is older than 80 percent of its time to live
+ or if the token is older than 24 hours.Defaults
+ to 1 hour and must be at least 10 minutes.
+ format: int64
+ type: integer
+ path:
+ description: path is the path relative to the
+ mount point of the file to project the token
+ into.
+ type: string
+ required:
+ - path
+ type: object
+ type: object
+ type: array
+ type: object
+ quobyte:
+ description: quobyte represents a Quobyte mount on the host
+ that shares a pod's lifetime
+ properties:
+ group:
+ description: group to map volume access to Default is no
+ group
+ type: string
+ readOnly:
+ description: readOnly here will force the Quobyte volume
+ to be mounted with read-only permissions. Defaults to
+ false.
+ type: boolean
+ registry:
+ description: registry represents a single or multiple Quobyte
+ Registry services specified as a string as host:port pair
+ (multiple entries are separated with commas) which acts
+ as the central registry for volumes
+ type: string
+ tenant:
+ description: tenant owning the given Quobyte volume in the
+ Backend Used with dynamically provisioned Quobyte volumes,
+ value is set by the plugin
+ type: string
+ user:
+ description: user to map volume access to Defaults to serivceaccount
+ user
+ type: string
+ volume:
+ description: volume is a string that references an already
+ created Quobyte volume by name.
+ type: string
+ required:
+ - registry
+ - volume
+ type: object
+ rbd:
+ description: 'rbd represents a Rados Block Device mount on the
+ host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md'
+ properties:
+ fsType:
+ description: 'fsType is the filesystem type of the volume
+ that you want to mount. Tip: Ensure that the filesystem
+ type is supported by the host operating system. Examples:
+ "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4"
+ if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd
+ TODO: how do we prevent errors in the filesystem from
+ compromising the machine'
+ type: string
+ image:
+ description: 'image is the rados image name. More info:
+ https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
+ type: string
+ keyring:
+ description: 'keyring is the path to key ring for RBDUser.
+ Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
+ type: string
+ monitors:
+ description: 'monitors is a collection of Ceph monitors.
+ More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
+ items:
+ type: string
+ type: array
+ pool:
+ description: 'pool is the rados pool name. Default is rbd.
+ More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
+ type: string
+ readOnly:
+ description: 'readOnly here will force the ReadOnly setting
+ in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
+ type: boolean
+ secretRef:
+ description: 'secretRef is name of the authentication secret
+ for RBDUser. If provided overrides keyring. Default is
+ nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ user:
+ description: 'user is the rados user name. Default is admin.
+ More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
+ type: string
+ required:
+ - image
+ - monitors
+ type: object
+ scaleIO:
+ description: scaleIO represents a ScaleIO persistent volume
+ attached and mounted on Kubernetes nodes.
+ properties:
+ fsType:
+ description: fsType is the filesystem type to mount. Must
+ be a filesystem type supported by the host operating system.
+ Ex. "ext4", "xfs", "ntfs". Default is "xfs".
+ type: string
+ gateway:
+ description: gateway is the host address of the ScaleIO
+ API Gateway.
+ type: string
+ protectionDomain:
+ description: protectionDomain is the name of the ScaleIO
+ Protection Domain for the configured storage.
+ type: string
+ readOnly:
+ description: readOnly Defaults to false (read/write). ReadOnly
+ here will force the ReadOnly setting in VolumeMounts.
+ type: boolean
+ secretRef:
+ description: secretRef references to the secret for ScaleIO
+ user and other sensitive information. If this is not provided,
+ Login operation will fail.
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ sslEnabled:
+ description: sslEnabled Flag enable/disable SSL communication
+ with Gateway, default false
+ type: boolean
+ storageMode:
+ description: storageMode indicates whether the storage for
+ a volume should be ThickProvisioned or ThinProvisioned.
+ Default is ThinProvisioned.
+ type: string
+ storagePool:
+ description: storagePool is the ScaleIO Storage Pool associated
+ with the protection domain.
+ type: string
+ system:
+ description: system is the name of the storage system as
+ configured in ScaleIO.
+ type: string
+ volumeName:
+ description: volumeName is the name of a volume already
+ created in the ScaleIO system that is associated with
+ this volume source.
+ type: string
+ required:
+ - gateway
+ - secretRef
+ - system
+ type: object
+ secret:
+ description: 'secret represents a secret that should populate
+ this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret'
+ properties:
+ defaultMode:
+ description: 'defaultMode is Optional: mode bits used to
+ set permissions on created files by default. Must be an
+ octal value between 0000 and 0777 or a decimal value between
+ 0 and 511. YAML accepts both octal and decimal values,
+ JSON requires decimal values for mode bits. Defaults to
+ 0644. Directories within the path are not affected by
+ this setting. This might be in conflict with other options
+ that affect the file mode, like fsGroup, and the result
+ can be other mode bits set.'
+ format: int32
+ type: integer
+ items:
+ description: items If unspecified, each key-value pair in
+ the Data field of the referenced Secret will be projected
+ into the volume as a file whose name is the key and content
+ is the value. If specified, the listed keys will be projected
+ into the specified paths, and unlisted keys will not be
+ present. If a key is specified which is not present in
+ the Secret, the volume setup will error unless it is marked
+ optional. Paths must be relative and may not contain the
+ '..' path or start with '..'.
+ items:
+ description: Maps a string key to a path within a volume.
+ properties:
+ key:
+ description: key is the key to project.
+ type: string
+ mode:
+ description: 'mode is Optional: mode bits used to
+ set permissions on this file. Must be an octal value
+ between 0000 and 0777 or a decimal value between
+ 0 and 511. YAML accepts both octal and decimal values,
+ JSON requires decimal values for mode bits. If not
+ specified, the volume defaultMode will be used.
+ This might be in conflict with other options that
+ affect the file mode, like fsGroup, and the result
+ can be other mode bits set.'
+ format: int32
+ type: integer
+ path:
+ description: path is the relative path of the file
+ to map the key to. May not be an absolute path.
+ May not contain the path element '..'. May not start
+ with the string '..'.
+ type: string
+ required:
+ - key
+ - path
+ type: object
+ type: array
+ optional:
+ description: optional field specify whether the Secret or
+ its keys must be defined
+ type: boolean
+ secretName:
+ description: 'secretName is the name of the secret in the
+ pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret'
+ type: string
+ type: object
+ storageos:
+ description: storageOS represents a StorageOS volume attached
+ and mounted on Kubernetes nodes.
+ properties:
+ fsType:
+ description: fsType is the filesystem type to mount. Must
+ be a filesystem type supported by the host operating system.
+ Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4"
+ if unspecified.
+ type: string
+ readOnly:
+ description: readOnly defaults to false (read/write). ReadOnly
+ here will force the ReadOnly setting in VolumeMounts.
+ type: boolean
+ secretRef:
+ description: secretRef specifies the secret to use for obtaining
+ the StorageOS API credentials. If not specified, default
+ values will be attempted.
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ volumeName:
+ description: volumeName is the human-readable name of the
+ StorageOS volume. Volume names are only unique within
+ a namespace.
+ type: string
+ volumeNamespace:
+ description: volumeNamespace specifies the scope of the
+ volume within StorageOS. If no namespace is specified
+ then the Pod's namespace will be used. This allows the
+ Kubernetes name scoping to be mirrored within StorageOS
+ for tighter integration. Set VolumeName to any name to
+ override the default behaviour. Set to "default" if you
+ are not using namespaces within StorageOS. Namespaces
+ that do not pre-exist within StorageOS will be created.
+ type: string
+ type: object
+ vsphereVolume:
+ description: vsphereVolume represents a vSphere volume attached
+ and mounted on kubelets host machine
+ properties:
+ fsType:
+ description: fsType is filesystem type to mount. Must be
+ a filesystem type supported by the host operating system.
+ Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4"
+ if unspecified.
+ type: string
+ storagePolicyID:
+ description: storagePolicyID is the storage Policy Based
+ Management (SPBM) profile ID associated with the StoragePolicyName.
+ type: string
+ storagePolicyName:
+ description: storagePolicyName is the storage Policy Based
+ Management (SPBM) profile name.
+ type: string
+ volumePath:
+ description: volumePath is the path that identifies vSphere
+ volume vmdk
+ type: string
+ required:
+ - volumePath
+ type: object
+ required:
+ - name
+ type: object
+ type: array
+ walCompression:
+ description: "Configures compression of the write-ahead log (WAL)
+ using Snappy. \n WAL compression is enabled by default for Prometheus
+ >= 2.20.0 \n Requires Prometheus v2.11.0 and above."
+ type: boolean
+ web:
+ description: Defines the configuration of the Prometheus web server.
+ properties:
+ httpConfig:
+ description: Defines HTTP parameters for web server.
+ properties:
+ headers:
+ description: List of headers that can be added to HTTP responses.
+ properties:
+ contentSecurityPolicy:
+ description: Set the Content-Security-Policy header to
+ HTTP responses. Unset if blank.
+ type: string
+ strictTransportSecurity:
+ description: Set the Strict-Transport-Security header
+ to HTTP responses. Unset if blank. Please make sure
+ that you use this with care as this header might force
+ browsers to load Prometheus and the other applications
+ hosted on the same domain and subdomains over HTTPS.
+ https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
+ type: string
+ xContentTypeOptions:
+ description: Set the X-Content-Type-Options header to
+ HTTP responses. Unset if blank. Accepted value is nosniff.
+ https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options
+ enum:
+ - ""
+ - NoSniff
+ type: string
+ xFrameOptions:
+ description: Set the X-Frame-Options header to HTTP responses.
+ Unset if blank. Accepted values are deny and sameorigin.
+ https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
+ enum:
+ - ""
+ - Deny
+ - SameOrigin
+ type: string
+ xXSSProtection:
+ description: Set the X-XSS-Protection header to all responses.
+ Unset if blank. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection
+ type: string
+ type: object
+ http2:
+ description: Enable HTTP/2 support. Note that HTTP/2 is only
+ supported with TLS. When TLSConfig is not configured, HTTP/2
+ will be disabled. Whenever the value of the field changes,
+ a rolling update will be triggered.
+ type: boolean
+ type: object
+ maxConnections:
+ description: Defines the maximum number of simultaneous connections
+ A zero value means that Prometheus doesn't accept any incoming
+ connection.
+ format: int32
+ minimum: 0
+ type: integer
+ pageTitle:
+ description: The prometheus web page title.
+ type: string
+ tlsConfig:
+ description: Defines the TLS parameters for HTTPS.
+ properties:
+ cert:
+ description: Contains the TLS certificate for the server.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ cipherSuites:
+ description: 'List of supported cipher suites for TLS versions
+ up to TLS 1.2. If empty, Go default cipher suites are used.
+ Available cipher suites are documented in the go documentation:
+ https://golang.org/pkg/crypto/tls/#pkg-constants'
+ items:
+ type: string
+ type: array
+ client_ca:
+ description: Contains the CA certificate for client certificate
+ authentication to the server.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ clientAuthType:
+ description: 'Server policy for client authentication. Maps
+ to ClientAuth Policies. For more detail on clientAuth options:
+ https://golang.org/pkg/crypto/tls/#ClientAuthType'
+ type: string
+ curvePreferences:
+ description: 'Elliptic curves that will be used in an ECDHE
+ handshake, in preference order. Available curves are documented
+ in the go documentation: https://golang.org/pkg/crypto/tls/#CurveID'
+ items:
+ type: string
+ type: array
+ keySecret:
+ description: Secret containing the TLS key for the server.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ maxVersion:
+ description: Maximum TLS version that is acceptable. Defaults
+ to TLS13.
+ type: string
+ minVersion:
+ description: Minimum TLS version that is acceptable. Defaults
+ to TLS12.
+ type: string
+ preferServerCipherSuites:
+ description: Controls whether the server selects the client's
+ most preferred cipher suite, or the server's most preferred
+ cipher suite. If true then the server's preference, as expressed
+ in the order of elements in cipherSuites, is used.
+ type: boolean
+ required:
+ - cert
+ - keySecret
+ type: object
+ type: object
+ type: object
+ status:
+ description: 'Most recent observed status of the Prometheus cluster. Read-only.
+ More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status'
+ properties:
+ availableReplicas:
+ description: Total number of available pods (ready for at least minReadySeconds)
+ targeted by this Prometheus deployment.
+ format: int32
+ type: integer
+ conditions:
+ description: The current state of the Prometheus deployment.
+ items:
+ description: Condition represents the state of the resources associated
+ with the Prometheus, Alertmanager or ThanosRuler resource.
+ properties:
+ lastTransitionTime:
+ description: lastTransitionTime is the time of the last update
+ to the current status property.
+ format: date-time
+ type: string
+ message:
+ description: Human-readable message indicating details for the
+ condition's last transition.
+ type: string
+ observedGeneration:
+ description: ObservedGeneration represents the .metadata.generation
+ that the condition was set based upon. For instance, if `.metadata.generation`
+ is currently 12, but the `.status.conditions[].observedGeneration`
+ is 9, the condition is out of date with respect to the current
+ state of the instance.
+ format: int64
+ type: integer
+ reason:
+ description: Reason for the condition's last transition.
+ type: string
+ status:
+ description: Status of the condition.
+ type: string
+ type:
+ description: Type of the condition being reported.
+ type: string
+ required:
+ - lastTransitionTime
+ - status
+ - type
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - type
+ x-kubernetes-list-type: map
+ paused:
+ description: Represents whether any actions on the underlying managed
+ objects are being performed. Only delete actions will be performed.
+ type: boolean
+ replicas:
+ description: Total number of non-terminated pods targeted by this
+ Prometheus deployment (their labels match the selector).
+ format: int32
+ type: integer
+ shardStatuses:
+ description: The list has one entry per shard. Each entry provides
+ a summary of the shard status.
+ items:
+ properties:
+ availableReplicas:
+ description: Total number of available pods (ready for at least
+ minReadySeconds) targeted by this shard.
+ format: int32
+ type: integer
+ replicas:
+ description: Total number of pods targeted by this shard.
+ format: int32
+ type: integer
+ shardID:
+ description: Identifier of the shard.
+ type: string
+ unavailableReplicas:
+ description: Total number of unavailable pods targeted by this
+ shard.
+ format: int32
+ type: integer
+ updatedReplicas:
+ description: Total number of non-terminated pods targeted by
+ this shard that have the desired spec.
+ format: int32
+ type: integer
+ required:
+ - availableReplicas
+ - replicas
+ - shardID
+ - unavailableReplicas
+ - updatedReplicas
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - shardID
+ x-kubernetes-list-type: map
+ unavailableReplicas:
+ description: Total number of unavailable pods targeted by this Prometheus
+ deployment.
+ format: int32
+ type: integer
+ updatedReplicas:
+ description: Total number of non-terminated pods targeted by this
+ Prometheus deployment that have the desired version spec.
+ format: int32
+ type: integer
+ required:
+ - availableReplicas
+ - paused
+ - replicas
+ - unavailableReplicas
+ - updatedReplicas
+ type: object
+ required:
+ - spec
+ type: object
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/crds/crd-prometheusrules.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/crds/crd-prometheusrules.yaml
new file mode 100644
index 0000000000..703b05b1f2
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/crds/crd-prometheusrules.yaml
@@ -0,0 +1,131 @@
+# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.68.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml
+---
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+ annotations:
+ controller-gen.kubebuilder.io/version: v0.11.1
+ creationTimestamp: null
+ name: prometheusrules.monitoring.coreos.com
+spec:
+ group: monitoring.coreos.com
+ names:
+ categories:
+ - prometheus-operator
+ kind: PrometheusRule
+ listKind: PrometheusRuleList
+ plural: prometheusrules
+ shortNames:
+ - promrule
+ singular: prometheusrule
+ scope: Namespaced
+ versions:
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: PrometheusRule defines recording and alerting rules for a Prometheus
+ instance
+ properties:
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation
+ of an object. Servers should convert recognized schemas to the latest
+ internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this
+ object represents. Servers may infer this from the endpoint the client
+ submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: Specification of desired alerting rule definitions for Prometheus.
+ properties:
+ groups:
+ description: Content of Prometheus rule file
+ items:
+ description: RuleGroup is a list of sequentially evaluated recording
+ and alerting rules.
+ properties:
+ interval:
+ description: Interval determines how often rules in the group
+ are evaluated.
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ limit:
+ description: Limit the number of alerts an alerting rule and
+ series a recording rule can produce. Limit is supported starting
+ with Prometheus >= 2.31 and Thanos Ruler >= 0.24.
+ type: integer
+ name:
+ description: Name of the rule group.
+ minLength: 1
+ type: string
+ partial_response_strategy:
+ description: 'PartialResponseStrategy is only used by ThanosRuler
+ and will be ignored by Prometheus instances. More info: https://github.com/thanos-io/thanos/blob/main/docs/components/rule.md#partial-response'
+ pattern: ^(?i)(abort|warn)?$
+ type: string
+ rules:
+ description: List of alerting and recording rules.
+ items:
+ description: 'Rule describes an alerting or recording rule
+ See Prometheus documentation: [alerting](https://www.prometheus.io/docs/prometheus/latest/configuration/alerting_rules/)
+ or [recording](https://www.prometheus.io/docs/prometheus/latest/configuration/recording_rules/#recording-rules)
+ rule'
+ properties:
+ alert:
+ description: Name of the alert. Must be a valid label
+ value. Only one of `record` and `alert` must be set.
+ type: string
+ annotations:
+ additionalProperties:
+ type: string
+ description: Annotations to add to each alert. Only valid
+ for alerting rules.
+ type: object
+ expr:
+ anyOf:
+ - type: integer
+ - type: string
+ description: PromQL expression to evaluate.
+ x-kubernetes-int-or-string: true
+ for:
+ description: Alerts are considered firing once they have
+ been returned for this long.
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ keep_firing_for:
+ description: KeepFiringFor defines how long an alert will
+ continue firing after the condition that triggered it
+ has cleared.
+ minLength: 1
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ labels:
+ additionalProperties:
+ type: string
+ description: Labels to add or overwrite.
+ type: object
+ record:
+ description: Name of the time series to output to. Must
+ be a valid metric name. Only one of `record` and `alert`
+ must be set.
+ type: string
+ required:
+ - expr
+ type: object
+ type: array
+ required:
+ - name
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - name
+ x-kubernetes-list-type: map
+ type: object
+ required:
+ - spec
+ type: object
+ served: true
+ storage: true
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/crds/crd-scrapeconfigs.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/crds/crd-scrapeconfigs.yaml
new file mode 100644
index 0000000000..7c7314d6ae
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/crds/crd-scrapeconfigs.yaml
@@ -0,0 +1,1185 @@
+# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.68.0/example/prometheus-operator-crd/monitoring.coreos.com_scrapeconfigs.yaml
+---
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+ annotations:
+ controller-gen.kubebuilder.io/version: v0.11.1
+ creationTimestamp: null
+ name: scrapeconfigs.monitoring.coreos.com
+spec:
+ group: monitoring.coreos.com
+ names:
+ categories:
+ - prometheus-operator
+ kind: ScrapeConfig
+ listKind: ScrapeConfigList
+ plural: scrapeconfigs
+ shortNames:
+ - scfg
+ singular: scrapeconfig
+ scope: Namespaced
+ versions:
+ - name: v1alpha1
+ schema:
+ openAPIV3Schema:
+ description: ScrapeConfig defines a namespaced Prometheus scrape_config to
+ be aggregated across multiple namespaces into the Prometheus configuration.
+ properties:
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation
+ of an object. Servers should convert recognized schemas to the latest
+ internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this
+ object represents. Servers may infer this from the endpoint the client
+ submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: ScrapeConfigSpec is a specification of the desired configuration
+ for a scrape configuration.
+ properties:
+ authorization:
+ description: Authorization header to use on every scrape request.
+ properties:
+ credentials:
+ description: Selects a key of a Secret in the namespace that contains
+ the credentials for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must be
+ a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must be
+ defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type:
+ description: "Defines the authentication type. The value is case-insensitive.
+ \n \"Basic\" is not a supported value. \n Default: \"Bearer\""
+ type: string
+ type: object
+ basicAuth:
+ description: BasicAuth information to use on every scrape request.
+ properties:
+ password:
+ description: The secret in the service monitor namespace that
+ contains the password for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must be
+ a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must be
+ defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ username:
+ description: The secret in the service monitor namespace that
+ contains the username for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must be
+ a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must be
+ defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ consulSDConfigs:
+ description: ConsulSDConfigs defines a list of Consul service discovery
+ configurations.
+ items:
+ description: ConsulSDConfig defines a Consul service discovery configuration
+ See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#consul_sd_config
+ properties:
+ allow_stale:
+ description: Allow stale Consul results (see https://www.consul.io/api/features/consistency.html).
+ Will reduce load on Consul. If unset, Prometheus uses its
+ default value.
+ type: boolean
+ authorization:
+ description: Authorization header configuration to authenticate
+ against the Consul Server.
+ properties:
+ credentials:
+ description: Selects a key of a Secret in the namespace
+ that contains the credentials for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type:
+ description: "Defines the authentication type. The value
+ is case-insensitive. \n \"Basic\" is not a supported value.
+ \n Default: \"Bearer\""
+ type: string
+ type: object
+ basicAuth:
+ description: 'BasicAuth information to authenticate against
+ the Consul Server. More info: https://prometheus.io/docs/operating/configuration/#endpoints'
+ properties:
+ password:
+ description: The secret in the service monitor namespace
+ that contains the password for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ username:
+ description: The secret in the service monitor namespace
+ that contains the username for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ datacenter:
+ description: Consul Datacenter name, if not provided it will
+ use the local Consul Agent Datacenter.
+ type: string
+ enable_http2:
+ description: Whether to enable HTTP2. If unset, Prometheus uses
+ its default value.
+ type: boolean
+ follow_redirects:
+ description: Configure whether HTTP requests follow HTTP 3xx
+ redirects. If unset, Prometheus uses its default value.
+ type: boolean
+ namespace:
+ description: Namespaces are only supported in Consul Enterprise.
+ type: string
+ no_proxy:
+ description: Comma-separated string that can contain IPs, CIDR
+ notation, domain names that should be excluded from proxying.
+ IP and domain names can contain port numbers.
+ type: string
+ node_meta:
+ additionalProperties:
+ type: string
+ description: Node metadata key/value pairs to filter nodes for
+ a given service.
+ type: object
+ x-kubernetes-map-type: atomic
+ oauth2:
+ description: Optional OAuth 2.0 configuration.
+ properties:
+ clientId:
+ description: The secret or configmap containing the OAuth2
+ client id
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ clientSecret:
+ description: The secret containing the OAuth2 client secret
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ endpointParams:
+ additionalProperties:
+ type: string
+ description: Parameters to append to the token URL
+ type: object
+ scopes:
+ description: OAuth2 scopes used for the token request
+ items:
+ type: string
+ type: array
+ tokenUrl:
+ description: The URL to fetch the token from
+ minLength: 1
+ type: string
+ required:
+ - clientId
+ - clientSecret
+ - tokenUrl
+ type: object
+ partition:
+ description: Admin Partitions are only supported in Consul Enterprise.
+ type: string
+ proxy_connect_header:
+ additionalProperties:
+ description: SecretKeySelector selects a key of a Secret.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ description: Specifies headers to send to proxies during CONNECT
+ requests.
+ type: object
+ x-kubernetes-map-type: atomic
+ proxy_from_environment:
+ description: Use proxy URL indicated by environment variables
+ (HTTP_PROXY, https_proxy, HTTPs_PROXY, https_proxy, and no_proxy)
+ If unset, Prometheus uses its default value.
+ type: boolean
+ proxy_url:
+ description: Optional proxy URL.
+ type: string
+ refresh_interval:
+ description: The time after which the provided names are refreshed.
+ On large setup it might be a good idea to increase this value
+ because the catalog will change all the time. If unset, Prometheus
+ uses its default value.
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ scheme:
+ description: HTTP Scheme default "http"
+ enum:
+ - HTTP
+ - HTTPS
+ type: string
+ server:
+ description: A valid string consisting of a hostname or IP followed
+ by an optional port number.
+ minLength: 1
+ type: string
+ services:
+ description: A list of services for which targets are retrieved.
+ If omitted, all services are scraped.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ tag_separator:
+ description: The string by which Consul tags are joined into
+ the tag label. If unset, Prometheus uses its default value.
+ type: string
+ tags:
+ description: An optional list of tags used to filter nodes for
+ a given service. Services must contain all tags in the list.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ tlsConfig:
+ description: TLS Config
+ properties:
+ ca:
+ description: Certificate authority used when verifying server
+ certificates.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ cert:
+ description: Client certificate to present when doing client-authentication.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ insecureSkipVerify:
+ description: Disable target certificate validation.
+ type: boolean
+ keySecret:
+ description: Secret containing the client key file for the
+ targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ serverName:
+ description: Used to verify the hostname for the targets.
+ type: string
+ type: object
+ tokenRef:
+ description: Consul ACL TokenRef, if not provided it will use
+ the ACL from the local Consul Agent.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ required:
+ - server
+ type: object
+ type: array
+ dnsSDConfigs:
+ description: DNSSDConfigs defines a list of DNS service discovery
+ configurations.
+ items:
+ description: DNSSDConfig allows specifying a set of DNS domain names
+ which are periodically queried to discover a list of targets.
+ The DNS servers to be contacted are read from /etc/resolv.conf.
+ See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#dns_sd_config
+ properties:
+ names:
+ description: A list of DNS domain names to be queried.
+ items:
+ type: string
+ minItems: 1
+ type: array
+ port:
+ description: The port number used if the query type is not SRV
+ Ignored for SRV records
+ type: integer
+ refreshInterval:
+ description: RefreshInterval configures the time after which
+ the provided names are refreshed. If not set, Prometheus uses
+ its default value.
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ type:
+ description: The type of DNS query to perform. One of SRV, A,
+ AAAA or MX. If not set, Prometheus uses its default value.
+ enum:
+ - SRV
+ - A
+ - AAAA
+ - MX
+ type: string
+ required:
+ - names
+ type: object
+ type: array
+ fileSDConfigs:
+ description: FileSDConfigs defines a list of file service discovery
+ configurations.
+ items:
+ description: FileSDConfig defines a Prometheus file service discovery
+ configuration See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#file_sd_config
+ properties:
+ files:
+ description: 'List of files to be used for file discovery. Recommendation:
+ use absolute paths. While relative paths work, the prometheus-operator
+ project makes no guarantees about the working directory where
+ the configuration file is stored. Files must be mounted using
+ Prometheus.ConfigMaps or Prometheus.Secrets.'
+ items:
+ description: SDFile represents a file used for service discovery
+ pattern: ^[^*]*(\*[^/]*)?\.(json|yml|yaml|JSON|YML|YAML)$
+ type: string
+ minItems: 1
+ type: array
+ refreshInterval:
+ description: RefreshInterval configures the refresh interval
+ at which Prometheus will reload the content of the files.
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ required:
+ - files
+ type: object
+ type: array
+ honorLabels:
+ description: HonorLabels chooses the metric's labels on collisions
+ with target labels.
+ type: boolean
+ honorTimestamps:
+ description: HonorTimestamps controls whether Prometheus respects
+ the timestamps present in scraped data.
+ type: boolean
+ httpSDConfigs:
+ description: HTTPSDConfigs defines a list of HTTP service discovery
+ configurations.
+ items:
+ description: HTTPSDConfig defines a prometheus HTTP service discovery
+ configuration See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#http_sd_config
+ properties:
+ authorization:
+ description: Authorization header configuration to authenticate
+ against the target HTTP endpoint.
+ properties:
+ credentials:
+ description: Selects a key of a Secret in the namespace
+ that contains the credentials for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type:
+ description: "Defines the authentication type. The value
+ is case-insensitive. \n \"Basic\" is not a supported value.
+ \n Default: \"Bearer\""
+ type: string
+ type: object
+ basicAuth:
+ description: 'BasicAuth information to authenticate against
+ the target HTTP endpoint. More info: https://prometheus.io/docs/operating/configuration/#endpoints'
+ properties:
+ password:
+ description: The secret in the service monitor namespace
+ that contains the password for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ username:
+ description: The secret in the service monitor namespace
+ that contains the username for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ refreshInterval:
+ description: RefreshInterval configures the refresh interval
+ at which Prometheus will re-query the endpoint to update the
+ target list.
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ tlsConfig:
+ description: TLS configuration applying to the target HTTP endpoint.
+ properties:
+ ca:
+ description: Certificate authority used when verifying server
+ certificates.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ cert:
+ description: Client certificate to present when doing client-authentication.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ insecureSkipVerify:
+ description: Disable target certificate validation.
+ type: boolean
+ keySecret:
+ description: Secret containing the client key file for the
+ targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ serverName:
+ description: Used to verify the hostname for the targets.
+ type: string
+ type: object
+ url:
+ description: URL from which the targets are fetched.
+ minLength: 1
+ pattern: ^http(s)?://.+$
+ type: string
+ required:
+ - url
+ type: object
+ type: array
+ keepDroppedTargets:
+ description: "Per-scrape limit on the number of targets dropped by
+ relabeling that will be kept in memory. 0 means no limit. \n It
+ requires Prometheus >= v2.47.0."
+ format: int64
+ type: integer
+ kubernetesSDConfigs:
+ description: KubernetesSDConfigs defines a list of Kubernetes service
+ discovery configurations.
+ items:
+ description: KubernetesSDConfig allows retrieving scrape targets
+ from Kubernetes' REST API. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#kubernetes_sd_config
+ properties:
+ role:
+ description: Role of the Kubernetes entities that should be
+ discovered. Currently the only supported role is "Node".
+ enum:
+ - Node
+ type: string
+ required:
+ - role
+ type: object
+ type: array
+ labelLimit:
+ description: Per-scrape limit on number of labels that will be accepted
+ for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ format: int64
+ type: integer
+ labelNameLengthLimit:
+ description: Per-scrape limit on length of labels name that will be
+ accepted for a sample. Only valid in Prometheus versions 2.27.0
+ and newer.
+ format: int64
+ type: integer
+ labelValueLengthLimit:
+ description: Per-scrape limit on length of labels value that will
+ be accepted for a sample. Only valid in Prometheus versions 2.27.0
+ and newer.
+ format: int64
+ type: integer
+ metricRelabelings:
+ description: MetricRelabelConfigs to apply to samples before ingestion.
+ items:
+ description: "RelabelConfig allows dynamic rewriting of the label
+ set for targets, alerts, scraped samples and remote write samples.
+ \n More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config"
+ properties:
+ action:
+ default: replace
+ description: "Action to perform based on the regex matching.
+ \n `Uppercase` and `Lowercase` actions require Prometheus
+ >= v2.36.0. `DropEqual` and `KeepEqual` actions require Prometheus
+ >= v2.41.0. \n Default: \"Replace\""
+ enum:
+ - replace
+ - Replace
+ - keep
+ - Keep
+ - drop
+ - Drop
+ - hashmod
+ - HashMod
+ - labelmap
+ - LabelMap
+ - labeldrop
+ - LabelDrop
+ - labelkeep
+ - LabelKeep
+ - lowercase
+ - Lowercase
+ - uppercase
+ - Uppercase
+ - keepequal
+ - KeepEqual
+ - dropequal
+ - DropEqual
+ type: string
+ modulus:
+ description: "Modulus to take of the hash of the source label
+ values. \n Only applicable when the action is `HashMod`."
+ format: int64
+ type: integer
+ regex:
+ description: Regular expression against which the extracted
+ value is matched.
+ type: string
+ replacement:
+ description: "Replacement value against which a Replace action
+ is performed if the regular expression matches. \n Regex capture
+ groups are available."
+ type: string
+ separator:
+ description: Separator is the string between concatenated SourceLabels.
+ type: string
+ sourceLabels:
+ description: The source labels select values from existing labels.
+ Their content is concatenated using the configured Separator
+ and matched against the configured regular expression.
+ items:
+ description: LabelName is a valid Prometheus label name which
+ may only contain ASCII letters, numbers, as well as underscores.
+ pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$
+ type: string
+ type: array
+ targetLabel:
+ description: "Label to which the resulting string is written
+ in a replacement. \n It is mandatory for `Replace`, `HashMod`,
+ `Lowercase`, `Uppercase`, `KeepEqual` and `DropEqual` actions.
+ \n Regex capture groups are available."
+ type: string
+ type: object
+ type: array
+ metricsPath:
+ description: MetricsPath HTTP path to scrape for metrics. If empty,
+ Prometheus uses the default value (e.g. /metrics).
+ type: string
+ params:
+ additionalProperties:
+ items:
+ type: string
+ type: array
+ description: Optional HTTP URL parameters
+ type: object
+ x-kubernetes-map-type: atomic
+ relabelings:
+ description: 'RelabelConfigs defines how to rewrite the target''s
+ labels before scraping. Prometheus Operator automatically adds relabelings
+ for a few standard Kubernetes fields. The original scrape job''s
+ name is available via the `__tmp_prometheus_job_name` label. More
+ info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config'
+ items:
+ description: "RelabelConfig allows dynamic rewriting of the label
+ set for targets, alerts, scraped samples and remote write samples.
+ \n More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config"
+ properties:
+ action:
+ default: replace
+ description: "Action to perform based on the regex matching.
+ \n `Uppercase` and `Lowercase` actions require Prometheus
+ >= v2.36.0. `DropEqual` and `KeepEqual` actions require Prometheus
+ >= v2.41.0. \n Default: \"Replace\""
+ enum:
+ - replace
+ - Replace
+ - keep
+ - Keep
+ - drop
+ - Drop
+ - hashmod
+ - HashMod
+ - labelmap
+ - LabelMap
+ - labeldrop
+ - LabelDrop
+ - labelkeep
+ - LabelKeep
+ - lowercase
+ - Lowercase
+ - uppercase
+ - Uppercase
+ - keepequal
+ - KeepEqual
+ - dropequal
+ - DropEqual
+ type: string
+ modulus:
+ description: "Modulus to take of the hash of the source label
+ values. \n Only applicable when the action is `HashMod`."
+ format: int64
+ type: integer
+ regex:
+ description: Regular expression against which the extracted
+ value is matched.
+ type: string
+ replacement:
+ description: "Replacement value against which a Replace action
+ is performed if the regular expression matches. \n Regex capture
+ groups are available."
+ type: string
+ separator:
+ description: Separator is the string between concatenated SourceLabels.
+ type: string
+ sourceLabels:
+ description: The source labels select values from existing labels.
+ Their content is concatenated using the configured Separator
+ and matched against the configured regular expression.
+ items:
+ description: LabelName is a valid Prometheus label name which
+ may only contain ASCII letters, numbers, as well as underscores.
+ pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$
+ type: string
+ type: array
+ targetLabel:
+ description: "Label to which the resulting string is written
+ in a replacement. \n It is mandatory for `Replace`, `HashMod`,
+ `Lowercase`, `Uppercase`, `KeepEqual` and `DropEqual` actions.
+ \n Regex capture groups are available."
+ type: string
+ type: object
+ type: array
+ sampleLimit:
+ description: SampleLimit defines per-scrape limit on number of scraped
+ samples that will be accepted.
+ format: int64
+ type: integer
+ scheme:
+ description: Configures the protocol scheme used for requests. If
+ empty, Prometheus uses HTTP by default.
+ enum:
+ - HTTP
+ - HTTPS
+ type: string
+ scrapeInterval:
+ description: ScrapeInterval is the interval between consecutive scrapes.
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ scrapeTimeout:
+ description: ScrapeTimeout is the number of seconds to wait until
+ a scrape request times out.
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ staticConfigs:
+ description: StaticConfigs defines a list of static targets with a
+ common label set.
+ items:
+ description: StaticConfig defines a Prometheus static configuration.
+ See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config
+ properties:
+ labels:
+ additionalProperties:
+ type: string
+ description: Labels assigned to all metrics scraped from the
+ targets.
+ type: object
+ x-kubernetes-map-type: atomic
+ targets:
+ description: List of targets for this static configuration.
+ items:
+ description: Target represents a target for Prometheus to
+ scrape
+ type: string
+ type: array
+ type: object
+ type: array
+ targetLimit:
+ description: TargetLimit defines a limit on the number of scraped
+ targets that will be accepted.
+ format: int64
+ type: integer
+ tlsConfig:
+ description: TLS configuration to use on every scrape request
+ properties:
+ ca:
+ description: Certificate authority used when verifying server
+ certificates.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ cert:
+ description: Client certificate to present when doing client-authentication.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ insecureSkipVerify:
+ description: Disable target certificate validation.
+ type: boolean
+ keySecret:
+ description: Secret containing the client key file for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must be
+ a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must be
+ defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ serverName:
+ description: Used to verify the hostname for the targets.
+ type: string
+ type: object
+ type: object
+ required:
+ - spec
+ type: object
+ served: true
+ storage: true
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/crds/crd-servicemonitors.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/crds/crd-servicemonitors.yaml
new file mode 100644
index 0000000000..e6728a5286
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/crds/crd-servicemonitors.yaml
@@ -0,0 +1,721 @@
+# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.68.0/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
+---
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+ annotations:
+ controller-gen.kubebuilder.io/version: v0.11.1
+ creationTimestamp: null
+ name: servicemonitors.monitoring.coreos.com
+spec:
+ group: monitoring.coreos.com
+ names:
+ categories:
+ - prometheus-operator
+ kind: ServiceMonitor
+ listKind: ServiceMonitorList
+ plural: servicemonitors
+ shortNames:
+ - smon
+ singular: servicemonitor
+ scope: Namespaced
+ versions:
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: ServiceMonitor defines monitoring for a set of services.
+ properties:
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation
+ of an object. Servers should convert recognized schemas to the latest
+ internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this
+ object represents. Servers may infer this from the endpoint the client
+ submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: Specification of desired Service selection for target discovery
+ by Prometheus.
+ properties:
+ attachMetadata:
+ description: Attaches node metadata to discovered targets. Requires
+ Prometheus v2.37.0 and above.
+ properties:
+ node:
+ description: When set to true, Prometheus must have permissions
+ to get Nodes.
+ type: boolean
+ type: object
+ endpoints:
+ description: A list of endpoints allowed as part of this ServiceMonitor.
+ items:
+ description: Endpoint defines a scrapeable endpoint serving Prometheus
+ metrics.
+ properties:
+ authorization:
+ description: Authorization section for this endpoint
+ properties:
+ credentials:
+ description: Selects a key of a Secret in the namespace
+ that contains the credentials for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type:
+ description: "Defines the authentication type. The value
+ is case-insensitive. \n \"Basic\" is not a supported value.
+ \n Default: \"Bearer\""
+ type: string
+ type: object
+ basicAuth:
+ description: 'BasicAuth allow an endpoint to authenticate over
+ basic authentication More info: https://prometheus.io/docs/operating/configuration/#endpoints'
+ properties:
+ password:
+ description: The secret in the service monitor namespace
+ that contains the password for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ username:
+ description: The secret in the service monitor namespace
+ that contains the username for authentication.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ bearerTokenFile:
+ description: File to read bearer token for scraping targets.
+ type: string
+ bearerTokenSecret:
+ description: Secret to mount to read bearer token for scraping
+ targets. The secret needs to be in the same namespace as the
+ service monitor and accessible by the Prometheus Operator.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ enableHttp2:
+ description: Whether to enable HTTP2.
+ type: boolean
+ filterRunning:
+ description: 'Drop pods that are not running. (Failed, Succeeded).
+ Enabled by default. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase'
+ type: boolean
+ followRedirects:
+ description: FollowRedirects configures whether scrape requests
+ follow HTTP 3xx redirects.
+ type: boolean
+ honorLabels:
+ description: HonorLabels chooses the metric's labels on collisions
+ with target labels.
+ type: boolean
+ honorTimestamps:
+ description: HonorTimestamps controls whether Prometheus respects
+ the timestamps present in scraped data.
+ type: boolean
+ interval:
+ description: Interval at which metrics should be scraped If
+ not specified Prometheus' global scrape interval is used.
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ metricRelabelings:
+ description: MetricRelabelConfigs to apply to samples before
+ ingestion.
+ items:
+ description: "RelabelConfig allows dynamic rewriting of the
+ label set for targets, alerts, scraped samples and remote
+ write samples. \n More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config"
+ properties:
+ action:
+ default: replace
+ description: "Action to perform based on the regex matching.
+ \n `Uppercase` and `Lowercase` actions require Prometheus
+ >= v2.36.0. `DropEqual` and `KeepEqual` actions require
+ Prometheus >= v2.41.0. \n Default: \"Replace\""
+ enum:
+ - replace
+ - Replace
+ - keep
+ - Keep
+ - drop
+ - Drop
+ - hashmod
+ - HashMod
+ - labelmap
+ - LabelMap
+ - labeldrop
+ - LabelDrop
+ - labelkeep
+ - LabelKeep
+ - lowercase
+ - Lowercase
+ - uppercase
+ - Uppercase
+ - keepequal
+ - KeepEqual
+ - dropequal
+ - DropEqual
+ type: string
+ modulus:
+ description: "Modulus to take of the hash of the source
+ label values. \n Only applicable when the action is
+ `HashMod`."
+ format: int64
+ type: integer
+ regex:
+ description: Regular expression against which the extracted
+ value is matched.
+ type: string
+ replacement:
+ description: "Replacement value against which a Replace
+ action is performed if the regular expression matches.
+ \n Regex capture groups are available."
+ type: string
+ separator:
+ description: Separator is the string between concatenated
+ SourceLabels.
+ type: string
+ sourceLabels:
+ description: The source labels select values from existing
+ labels. Their content is concatenated using the configured
+ Separator and matched against the configured regular
+ expression.
+ items:
+ description: LabelName is a valid Prometheus label name
+ which may only contain ASCII letters, numbers, as
+ well as underscores.
+ pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$
+ type: string
+ type: array
+ targetLabel:
+ description: "Label to which the resulting string is written
+ in a replacement. \n It is mandatory for `Replace`,
+ `HashMod`, `Lowercase`, `Uppercase`, `KeepEqual` and
+ `DropEqual` actions. \n Regex capture groups are available."
+ type: string
+ type: object
+ type: array
+ oauth2:
+ description: OAuth2 for the URL. Only valid in Prometheus versions
+ 2.27.0 and newer.
+ properties:
+ clientId:
+ description: The secret or configmap containing the OAuth2
+ client id
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ clientSecret:
+ description: The secret containing the OAuth2 client secret
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ endpointParams:
+ additionalProperties:
+ type: string
+ description: Parameters to append to the token URL
+ type: object
+ scopes:
+ description: OAuth2 scopes used for the token request
+ items:
+ type: string
+ type: array
+ tokenUrl:
+ description: The URL to fetch the token from
+ minLength: 1
+ type: string
+ required:
+ - clientId
+ - clientSecret
+ - tokenUrl
+ type: object
+ params:
+ additionalProperties:
+ items:
+ type: string
+ type: array
+ description: Optional HTTP URL parameters
+ type: object
+ path:
+ description: HTTP path to scrape for metrics. If empty, Prometheus
+ uses the default value (e.g. `/metrics`).
+ type: string
+ port:
+ description: Name of the service port this endpoint refers to.
+ Mutually exclusive with targetPort.
+ type: string
+ proxyUrl:
+ description: ProxyURL eg http://proxyserver:2195 Directs scrapes
+ to proxy through this endpoint.
+ type: string
+ relabelings:
+ description: 'RelabelConfigs to apply to samples before scraping.
+ Prometheus Operator automatically adds relabelings for a few
+ standard Kubernetes fields. The original scrape job''s name
+ is available via the `__tmp_prometheus_job_name` label. More
+ info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config'
+ items:
+ description: "RelabelConfig allows dynamic rewriting of the
+ label set for targets, alerts, scraped samples and remote
+ write samples. \n More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config"
+ properties:
+ action:
+ default: replace
+ description: "Action to perform based on the regex matching.
+ \n `Uppercase` and `Lowercase` actions require Prometheus
+ >= v2.36.0. `DropEqual` and `KeepEqual` actions require
+ Prometheus >= v2.41.0. \n Default: \"Replace\""
+ enum:
+ - replace
+ - Replace
+ - keep
+ - Keep
+ - drop
+ - Drop
+ - hashmod
+ - HashMod
+ - labelmap
+ - LabelMap
+ - labeldrop
+ - LabelDrop
+ - labelkeep
+ - LabelKeep
+ - lowercase
+ - Lowercase
+ - uppercase
+ - Uppercase
+ - keepequal
+ - KeepEqual
+ - dropequal
+ - DropEqual
+ type: string
+ modulus:
+ description: "Modulus to take of the hash of the source
+ label values. \n Only applicable when the action is
+ `HashMod`."
+ format: int64
+ type: integer
+ regex:
+ description: Regular expression against which the extracted
+ value is matched.
+ type: string
+ replacement:
+ description: "Replacement value against which a Replace
+ action is performed if the regular expression matches.
+ \n Regex capture groups are available."
+ type: string
+ separator:
+ description: Separator is the string between concatenated
+ SourceLabels.
+ type: string
+ sourceLabels:
+ description: The source labels select values from existing
+ labels. Their content is concatenated using the configured
+ Separator and matched against the configured regular
+ expression.
+ items:
+ description: LabelName is a valid Prometheus label name
+ which may only contain ASCII letters, numbers, as
+ well as underscores.
+ pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$
+ type: string
+ type: array
+ targetLabel:
+ description: "Label to which the resulting string is written
+ in a replacement. \n It is mandatory for `Replace`,
+ `HashMod`, `Lowercase`, `Uppercase`, `KeepEqual` and
+ `DropEqual` actions. \n Regex capture groups are available."
+ type: string
+ type: object
+ type: array
+ scheme:
+ description: HTTP scheme to use for scraping. `http` and `https`
+ are the expected values unless you rewrite the `__scheme__`
+ label via relabeling. If empty, Prometheus uses the default
+ value `http`.
+ enum:
+ - http
+ - https
+ type: string
+ scrapeTimeout:
+ description: Timeout after which the scrape is ended If not
+ specified, the Prometheus global scrape timeout is used unless
+ it is less than `Interval` in which the latter is used.
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ targetPort:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the target port of the Pod behind
+ the Service, the port must be specified with container port
+ property. Mutually exclusive with port.
+ x-kubernetes-int-or-string: true
+ tlsConfig:
+ description: TLS configuration to use when scraping the endpoint
+ properties:
+ ca:
+ description: Certificate authority used when verifying server
+ certificates.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ caFile:
+ description: Path to the CA cert in the Prometheus container
+ to use for the targets.
+ type: string
+ cert:
+ description: Client certificate to present when doing client-authentication.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the
+ targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ certFile:
+ description: Path to the client cert file in the Prometheus
+ container for the targets.
+ type: string
+ insecureSkipVerify:
+ description: Disable target certificate validation.
+ type: boolean
+ keyFile:
+ description: Path to the client key file in the Prometheus
+ container for the targets.
+ type: string
+ keySecret:
+ description: Secret containing the client key file for the
+ targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ serverName:
+ description: Used to verify the hostname for the targets.
+ type: string
+ type: object
+ type: object
+ type: array
+ jobLabel:
+ description: "JobLabel selects the label from the associated Kubernetes
+ service which will be used as the `job` label for all metrics. \n
+ For example: If in `ServiceMonitor.spec.jobLabel: foo` and in `Service.metadata.labels.foo:
+ bar`, then the `job=\"bar\"` label is added to all metrics. \n If
+ the value of this field is empty or if the label doesn't exist for
+ the given Service, the `job` label of the metrics defaults to the
+ name of the Kubernetes Service."
+ type: string
+ keepDroppedTargets:
+ description: "Per-scrape limit on the number of targets dropped by
+ relabeling that will be kept in memory. 0 means no limit. \n It
+ requires Prometheus >= v2.47.0."
+ format: int64
+ type: integer
+ labelLimit:
+ description: Per-scrape limit on number of labels that will be accepted
+ for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ format: int64
+ type: integer
+ labelNameLengthLimit:
+ description: Per-scrape limit on length of labels name that will be
+ accepted for a sample. Only valid in Prometheus versions 2.27.0
+ and newer.
+ format: int64
+ type: integer
+ labelValueLengthLimit:
+ description: Per-scrape limit on length of labels value that will
+ be accepted for a sample. Only valid in Prometheus versions 2.27.0
+ and newer.
+ format: int64
+ type: integer
+ namespaceSelector:
+ description: Selector to select which namespaces the Kubernetes Endpoints
+ objects are discovered from.
+ properties:
+ any:
+ description: Boolean describing whether all namespaces are selected
+ in contrast to a list restricting them.
+ type: boolean
+ matchNames:
+ description: List of namespace names to select from.
+ items:
+ type: string
+ type: array
+ type: object
+ podTargetLabels:
+ description: PodTargetLabels transfers labels on the Kubernetes `Pod`
+ onto the created metrics.
+ items:
+ type: string
+ type: array
+ sampleLimit:
+ description: SampleLimit defines per-scrape limit on number of scraped
+ samples that will be accepted.
+ format: int64
+ type: integer
+ selector:
+ description: Selector to select Endpoints objects.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements.
+ The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector that
+ contains values, a key, and an operator that relates the key
+ and values.
+ properties:
+ key:
+ description: key is the label key that the selector applies
+ to.
+ type: string
+ operator:
+ description: operator represents a key's relationship to
+ a set of values. Valid operators are In, NotIn, Exists
+ and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values. If the
+ operator is In or NotIn, the values array must be non-empty.
+ If the operator is Exists or DoesNotExist, the values
+ array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs. A single
+ {key,value} in the matchLabels map is equivalent to an element
+ of matchExpressions, whose key field is "key", the operator
+ is "In", and the values array contains only "value". The requirements
+ are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ targetLabels:
+ description: TargetLabels transfers labels from the Kubernetes `Service`
+ onto the created metrics.
+ items:
+ type: string
+ type: array
+ targetLimit:
+ description: TargetLimit defines a limit on the number of scraped
+ targets that will be accepted.
+ format: int64
+ type: integer
+ required:
+ - endpoints
+ - selector
+ type: object
+ required:
+ - spec
+ type: object
+ served: true
+ storage: true
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/crds/crd-thanosrulers.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/crds/crd-thanosrulers.yaml
new file mode 100644
index 0000000000..6bfa675cdd
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/crds/crds/crd-thanosrulers.yaml
@@ -0,0 +1,6910 @@
+# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.68.0/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml
+---
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+ annotations:
+ controller-gen.kubebuilder.io/version: v0.11.1
+ creationTimestamp: null
+ name: thanosrulers.monitoring.coreos.com
+spec:
+ group: monitoring.coreos.com
+ names:
+ categories:
+ - prometheus-operator
+ kind: ThanosRuler
+ listKind: ThanosRulerList
+ plural: thanosrulers
+ shortNames:
+ - ruler
+ singular: thanosruler
+ scope: Namespaced
+ versions:
+ - additionalPrinterColumns:
+ - description: The version of Thanos Ruler
+ jsonPath: .spec.version
+ name: Version
+ type: string
+ - description: The number of desired replicas
+ jsonPath: .spec.replicas
+ name: Replicas
+ type: integer
+ - description: The number of ready replicas
+ jsonPath: .status.availableReplicas
+ name: Ready
+ type: integer
+ - jsonPath: .status.conditions[?(@.type == 'Reconciled')].status
+ name: Reconciled
+ type: string
+ - jsonPath: .status.conditions[?(@.type == 'Available')].status
+ name: Available
+ type: string
+ - jsonPath: .metadata.creationTimestamp
+ name: Age
+ type: date
+ - description: Whether the resource reconciliation is paused or not
+ jsonPath: .status.paused
+ name: Paused
+ priority: 1
+ type: boolean
+ name: v1
+ schema:
+ openAPIV3Schema:
+ description: ThanosRuler defines a ThanosRuler deployment.
+ properties:
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation
+ of an object. Servers should convert recognized schemas to the latest
+ internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this
+ object represents. Servers may infer this from the endpoint the client
+ submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: 'Specification of the desired behavior of the ThanosRuler
+ cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status'
+ properties:
+ additionalArgs:
+ description: AdditionalArgs allows setting additional arguments for
+ the ThanosRuler container. It is intended for e.g. activating hidden
+ flags which are not supported by the dedicated configuration options
+ yet. The arguments are passed as-is to the ThanosRuler container
+ which may cause issues if they are invalid or not supported by the
+ given ThanosRuler version. In case of an argument conflict (e.g.
+ an argument which is already set by the operator itself) or when
+ providing an invalid argument the reconciliation will fail and an
+ error will be logged.
+ items:
+ description: Argument as part of the AdditionalArgs list.
+ properties:
+ name:
+ description: Name of the argument, e.g. "scrape.discovery-reload-interval".
+ minLength: 1
+ type: string
+ value:
+ description: Argument value, e.g. 30s. Can be empty for name-only
+ arguments (e.g. --storage.tsdb.no-lockfile)
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ affinity:
+ description: If specified, the pod's scheduling constraints.
+ properties:
+ nodeAffinity:
+ description: Describes node affinity scheduling rules for the
+ pod.
+ properties:
+ preferredDuringSchedulingIgnoredDuringExecution:
+ description: The scheduler will prefer to schedule pods to
+ nodes that satisfy the affinity expressions specified by
+ this field, but it may choose a node that violates one or
+ more of the expressions. The node that is most preferred
+ is the one with the greatest sum of weights, i.e. for each
+ node that meets all of the scheduling requirements (resource
+ request, requiredDuringScheduling affinity expressions,
+ etc.), compute a sum by iterating through the elements of
+ this field and adding "weight" to the sum if the node matches
+ the corresponding matchExpressions; the node(s) with the
+ highest sum are the most preferred.
+ items:
+ description: An empty preferred scheduling term matches
+ all objects with implicit weight 0 (i.e. it's a no-op).
+ A null preferred scheduling term matches no objects (i.e.
+ is also a no-op).
+ properties:
+ preference:
+ description: A node selector term, associated with the
+ corresponding weight.
+ properties:
+ matchExpressions:
+ description: A list of node selector requirements
+ by node's labels.
+ items:
+ description: A node selector requirement is a
+ selector that contains values, a key, and an
+ operator that relates the key and values.
+ properties:
+ key:
+ description: The label key that the selector
+ applies to.
+ type: string
+ operator:
+ description: Represents a key's relationship
+ to a set of values. Valid operators are
+ In, NotIn, Exists, DoesNotExist. Gt, and
+ Lt.
+ type: string
+ values:
+ description: An array of string values. If
+ the operator is In or NotIn, the values
+ array must be non-empty. If the operator
+ is Exists or DoesNotExist, the values array
+ must be empty. If the operator is Gt or
+ Lt, the values array must have a single
+ element, which will be interpreted as an
+ integer. This array is replaced during a
+ strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchFields:
+ description: A list of node selector requirements
+ by node's fields.
+ items:
+ description: A node selector requirement is a
+ selector that contains values, a key, and an
+ operator that relates the key and values.
+ properties:
+ key:
+ description: The label key that the selector
+ applies to.
+ type: string
+ operator:
+ description: Represents a key's relationship
+ to a set of values. Valid operators are
+ In, NotIn, Exists, DoesNotExist. Gt, and
+ Lt.
+ type: string
+ values:
+ description: An array of string values. If
+ the operator is In or NotIn, the values
+ array must be non-empty. If the operator
+ is Exists or DoesNotExist, the values array
+ must be empty. If the operator is Gt or
+ Lt, the values array must have a single
+ element, which will be interpreted as an
+ integer. This array is replaced during a
+ strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ type: object
+ x-kubernetes-map-type: atomic
+ weight:
+ description: Weight associated with matching the corresponding
+ nodeSelectorTerm, in the range 1-100.
+ format: int32
+ type: integer
+ required:
+ - preference
+ - weight
+ type: object
+ type: array
+ requiredDuringSchedulingIgnoredDuringExecution:
+ description: If the affinity requirements specified by this
+ field are not met at scheduling time, the pod will not be
+ scheduled onto the node. If the affinity requirements specified
+ by this field cease to be met at some point during pod execution
+ (e.g. due to an update), the system may or may not try to
+ eventually evict the pod from its node.
+ properties:
+ nodeSelectorTerms:
+ description: Required. A list of node selector terms.
+ The terms are ORed.
+ items:
+ description: A null or empty node selector term matches
+ no objects. The requirements of them are ANDed. The
+ TopologySelectorTerm type implements a subset of the
+ NodeSelectorTerm.
+ properties:
+ matchExpressions:
+ description: A list of node selector requirements
+ by node's labels.
+ items:
+ description: A node selector requirement is a
+ selector that contains values, a key, and an
+ operator that relates the key and values.
+ properties:
+ key:
+ description: The label key that the selector
+ applies to.
+ type: string
+ operator:
+ description: Represents a key's relationship
+ to a set of values. Valid operators are
+ In, NotIn, Exists, DoesNotExist. Gt, and
+ Lt.
+ type: string
+ values:
+ description: An array of string values. If
+ the operator is In or NotIn, the values
+ array must be non-empty. If the operator
+ is Exists or DoesNotExist, the values array
+ must be empty. If the operator is Gt or
+ Lt, the values array must have a single
+ element, which will be interpreted as an
+ integer. This array is replaced during a
+ strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchFields:
+ description: A list of node selector requirements
+ by node's fields.
+ items:
+ description: A node selector requirement is a
+ selector that contains values, a key, and an
+ operator that relates the key and values.
+ properties:
+ key:
+ description: The label key that the selector
+ applies to.
+ type: string
+ operator:
+ description: Represents a key's relationship
+ to a set of values. Valid operators are
+ In, NotIn, Exists, DoesNotExist. Gt, and
+ Lt.
+ type: string
+ values:
+ description: An array of string values. If
+ the operator is In or NotIn, the values
+ array must be non-empty. If the operator
+ is Exists or DoesNotExist, the values array
+ must be empty. If the operator is Gt or
+ Lt, the values array must have a single
+ element, which will be interpreted as an
+ integer. This array is replaced during a
+ strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
+ required:
+ - nodeSelectorTerms
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ podAffinity:
+ description: Describes pod affinity scheduling rules (e.g. co-locate
+ this pod in the same node, zone, etc. as some other pod(s)).
+ properties:
+ preferredDuringSchedulingIgnoredDuringExecution:
+ description: The scheduler will prefer to schedule pods to
+ nodes that satisfy the affinity expressions specified by
+ this field, but it may choose a node that violates one or
+ more of the expressions. The node that is most preferred
+ is the one with the greatest sum of weights, i.e. for each
+ node that meets all of the scheduling requirements (resource
+ request, requiredDuringScheduling affinity expressions,
+ etc.), compute a sum by iterating through the elements of
+ this field and adding "weight" to the sum if the node has
+ pods which matches the corresponding podAffinityTerm; the
+ node(s) with the highest sum are the most preferred.
+ items:
+ description: The weights of all of the matched WeightedPodAffinityTerm
+ fields are added per-node to find the most preferred node(s)
+ properties:
+ podAffinityTerm:
+ description: Required. A pod affinity term, associated
+ with the corresponding weight.
+ properties:
+ labelSelector:
+ description: A label query over a set of resources,
+ in this case pods.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: A label selector requirement
+ is a selector that contains values, a key,
+ and an operator that relates the key and
+ values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's
+ relationship to a set of values. Valid
+ operators are In, NotIn, Exists and
+ DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty.
+ If the operator is Exists or DoesNotExist,
+ the values array must be empty. This
+ array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is
+ "In", and the values array contains only "value".
+ The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ namespaceSelector:
+ description: A label query over the set of namespaces
+ that the term applies to. The term is applied
+ to the union of the namespaces selected by this
+ field and the ones listed in the namespaces field.
+ null selector and null or empty namespaces list
+ means "this pod's namespace". An empty selector
+ ({}) matches all namespaces.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: A label selector requirement
+ is a selector that contains values, a key,
+ and an operator that relates the key and
+ values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's
+ relationship to a set of values. Valid
+ operators are In, NotIn, Exists and
+ DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty.
+ If the operator is Exists or DoesNotExist,
+ the values array must be empty. This
+ array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is
+ "In", and the values array contains only "value".
+ The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ namespaces:
+ description: namespaces specifies a static list
+ of namespace names that the term applies to. The
+ term is applied to the union of the namespaces
+ listed in this field and the ones selected by
+ namespaceSelector. null or empty namespaces list
+ and null namespaceSelector means "this pod's namespace".
+ items:
+ type: string
+ type: array
+ topologyKey:
+ description: This pod should be co-located (affinity)
+ or not co-located (anti-affinity) with the pods
+ matching the labelSelector in the specified namespaces,
+ where co-located is defined as running on a node
+ whose value of the label with key topologyKey
+ matches that of any node on which any of the selected
+ pods is running. Empty topologyKey is not allowed.
+ type: string
+ required:
+ - topologyKey
+ type: object
+ weight:
+ description: weight associated with matching the corresponding
+ podAffinityTerm, in the range 1-100.
+ format: int32
+ type: integer
+ required:
+ - podAffinityTerm
+ - weight
+ type: object
+ type: array
+ requiredDuringSchedulingIgnoredDuringExecution:
+ description: If the affinity requirements specified by this
+ field are not met at scheduling time, the pod will not be
+ scheduled onto the node. If the affinity requirements specified
+ by this field cease to be met at some point during pod execution
+ (e.g. due to a pod label update), the system may or may
+ not try to eventually evict the pod from its node. When
+ there are multiple elements, the lists of nodes corresponding
+ to each podAffinityTerm are intersected, i.e. all terms
+ must be satisfied.
+ items:
+ description: Defines a set of pods (namely those matching
+ the labelSelector relative to the given namespace(s))
+ that this pod should be co-located (affinity) or not co-located
+ (anti-affinity) with, where co-located is defined as running
+ on a node whose value of the label with key
+ matches that of any node on which a pod of the set of
+ pods is running
+ properties:
+ labelSelector:
+ description: A label query over a set of resources,
+ in this case pods.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are ANDed.
+ items:
+ description: A label selector requirement is a
+ selector that contains values, a key, and an
+ operator that relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's relationship
+ to a set of values. Valid operators are
+ In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty. If the
+ operator is Exists or DoesNotExist, the
+ values array must be empty. This array is
+ replaced during a strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is "In",
+ and the values array contains only "value". The
+ requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ namespaceSelector:
+ description: A label query over the set of namespaces
+ that the term applies to. The term is applied to the
+ union of the namespaces selected by this field and
+ the ones listed in the namespaces field. null selector
+ and null or empty namespaces list means "this pod's
+ namespace". An empty selector ({}) matches all namespaces.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are ANDed.
+ items:
+ description: A label selector requirement is a
+ selector that contains values, a key, and an
+ operator that relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's relationship
+ to a set of values. Valid operators are
+ In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty. If the
+ operator is Exists or DoesNotExist, the
+ values array must be empty. This array is
+ replaced during a strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is "In",
+ and the values array contains only "value". The
+ requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ namespaces:
+ description: namespaces specifies a static list of namespace
+ names that the term applies to. The term is applied
+ to the union of the namespaces listed in this field
+ and the ones selected by namespaceSelector. null or
+ empty namespaces list and null namespaceSelector means
+ "this pod's namespace".
+ items:
+ type: string
+ type: array
+ topologyKey:
+ description: This pod should be co-located (affinity)
+ or not co-located (anti-affinity) with the pods matching
+ the labelSelector in the specified namespaces, where
+ co-located is defined as running on a node whose value
+ of the label with key topologyKey matches that of
+ any node on which any of the selected pods is running.
+ Empty topologyKey is not allowed.
+ type: string
+ required:
+ - topologyKey
+ type: object
+ type: array
+ type: object
+ podAntiAffinity:
+ description: Describes pod anti-affinity scheduling rules (e.g.
+ avoid putting this pod in the same node, zone, etc. as some
+ other pod(s)).
+ properties:
+ preferredDuringSchedulingIgnoredDuringExecution:
+ description: The scheduler will prefer to schedule pods to
+ nodes that satisfy the anti-affinity expressions specified
+ by this field, but it may choose a node that violates one
+ or more of the expressions. The node that is most preferred
+ is the one with the greatest sum of weights, i.e. for each
+ node that meets all of the scheduling requirements (resource
+ request, requiredDuringScheduling anti-affinity expressions,
+ etc.), compute a sum by iterating through the elements of
+ this field and adding "weight" to the sum if the node has
+ pods which matches the corresponding podAffinityTerm; the
+ node(s) with the highest sum are the most preferred.
+ items:
+ description: The weights of all of the matched WeightedPodAffinityTerm
+ fields are added per-node to find the most preferred node(s)
+ properties:
+ podAffinityTerm:
+ description: Required. A pod affinity term, associated
+ with the corresponding weight.
+ properties:
+ labelSelector:
+ description: A label query over a set of resources,
+ in this case pods.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: A label selector requirement
+ is a selector that contains values, a key,
+ and an operator that relates the key and
+ values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's
+ relationship to a set of values. Valid
+ operators are In, NotIn, Exists and
+ DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty.
+ If the operator is Exists or DoesNotExist,
+ the values array must be empty. This
+ array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is
+ "In", and the values array contains only "value".
+ The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ namespaceSelector:
+ description: A label query over the set of namespaces
+ that the term applies to. The term is applied
+ to the union of the namespaces selected by this
+ field and the ones listed in the namespaces field.
+ null selector and null or empty namespaces list
+ means "this pod's namespace". An empty selector
+ ({}) matches all namespaces.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: A label selector requirement
+ is a selector that contains values, a key,
+ and an operator that relates the key and
+ values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's
+ relationship to a set of values. Valid
+ operators are In, NotIn, Exists and
+ DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty.
+ If the operator is Exists or DoesNotExist,
+ the values array must be empty. This
+ array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is
+ "In", and the values array contains only "value".
+ The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ namespaces:
+ description: namespaces specifies a static list
+ of namespace names that the term applies to. The
+ term is applied to the union of the namespaces
+ listed in this field and the ones selected by
+ namespaceSelector. null or empty namespaces list
+ and null namespaceSelector means "this pod's namespace".
+ items:
+ type: string
+ type: array
+ topologyKey:
+ description: This pod should be co-located (affinity)
+ or not co-located (anti-affinity) with the pods
+ matching the labelSelector in the specified namespaces,
+ where co-located is defined as running on a node
+ whose value of the label with key topologyKey
+ matches that of any node on which any of the selected
+ pods is running. Empty topologyKey is not allowed.
+ type: string
+ required:
+ - topologyKey
+ type: object
+ weight:
+ description: weight associated with matching the corresponding
+ podAffinityTerm, in the range 1-100.
+ format: int32
+ type: integer
+ required:
+ - podAffinityTerm
+ - weight
+ type: object
+ type: array
+ requiredDuringSchedulingIgnoredDuringExecution:
+ description: If the anti-affinity requirements specified by
+ this field are not met at scheduling time, the pod will
+ not be scheduled onto the node. If the anti-affinity requirements
+ specified by this field cease to be met at some point during
+ pod execution (e.g. due to a pod label update), the system
+ may or may not try to eventually evict the pod from its
+ node. When there are multiple elements, the lists of nodes
+ corresponding to each podAffinityTerm are intersected, i.e.
+ all terms must be satisfied.
+ items:
+ description: Defines a set of pods (namely those matching
+ the labelSelector relative to the given namespace(s))
+ that this pod should be co-located (affinity) or not co-located
+ (anti-affinity) with, where co-located is defined as running
+ on a node whose value of the label with key
+ matches that of any node on which a pod of the set of
+ pods is running
+ properties:
+ labelSelector:
+ description: A label query over a set of resources,
+ in this case pods.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are ANDed.
+ items:
+ description: A label selector requirement is a
+ selector that contains values, a key, and an
+ operator that relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's relationship
+ to a set of values. Valid operators are
+ In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty. If the
+ operator is Exists or DoesNotExist, the
+ values array must be empty. This array is
+ replaced during a strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is "In",
+ and the values array contains only "value". The
+ requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ namespaceSelector:
+ description: A label query over the set of namespaces
+ that the term applies to. The term is applied to the
+ union of the namespaces selected by this field and
+ the ones listed in the namespaces field. null selector
+ and null or empty namespaces list means "this pod's
+ namespace". An empty selector ({}) matches all namespaces.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are ANDed.
+ items:
+ description: A label selector requirement is a
+ selector that contains values, a key, and an
+ operator that relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's relationship
+ to a set of values. Valid operators are
+ In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty. If the
+ operator is Exists or DoesNotExist, the
+ values array must be empty. This array is
+ replaced during a strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is "In",
+ and the values array contains only "value". The
+ requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ namespaces:
+ description: namespaces specifies a static list of namespace
+ names that the term applies to. The term is applied
+ to the union of the namespaces listed in this field
+ and the ones selected by namespaceSelector. null or
+ empty namespaces list and null namespaceSelector means
+ "this pod's namespace".
+ items:
+ type: string
+ type: array
+ topologyKey:
+ description: This pod should be co-located (affinity)
+ or not co-located (anti-affinity) with the pods matching
+ the labelSelector in the specified namespaces, where
+ co-located is defined as running on a node whose value
+ of the label with key topologyKey matches that of
+ any node on which any of the selected pods is running.
+ Empty topologyKey is not allowed.
+ type: string
+ required:
+ - topologyKey
+ type: object
+ type: array
+ type: object
+ type: object
+ alertDropLabels:
+ description: AlertDropLabels configure the label names which should
+ be dropped in ThanosRuler alerts. The replica label `thanos_ruler_replica`
+ will always be dropped in alerts.
+ items:
+ type: string
+ type: array
+ alertQueryUrl:
+ description: The external Query URL the Thanos Ruler will set in the
+ 'Source' field of all alerts. Maps to the '--alert.query-url' CLI
+ arg.
+ type: string
+ alertRelabelConfigFile:
+ description: AlertRelabelConfigFile specifies the path of the alert
+ relabeling configuration file. When used alongside with AlertRelabelConfigs,
+ alertRelabelConfigFile takes precedence.
+ type: string
+ alertRelabelConfigs:
+ description: 'AlertRelabelConfigs configures alert relabeling in ThanosRuler.
+ Alert relabel configurations must have the form as specified in
+ the official Prometheus documentation: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alert_relabel_configs
+ Alternative to AlertRelabelConfigFile, and lower order priority.'
+ properties:
+ key:
+ description: The key of the secret to select from. Must be a
+ valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ alertmanagersConfig:
+ description: Define configuration for connecting to alertmanager. Only
+ available with thanos v0.10.0 and higher. Maps to the `alertmanagers.config`
+ arg.
+ properties:
+ key:
+ description: The key of the secret to select from. Must be a
+ valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ alertmanagersUrl:
+ description: '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` arg.'
+ items:
+ type: string
+ type: array
+ containers:
+ description: 'Containers allows injecting additional containers or
+ modifying operator generated containers. This can be used to allow
+ adding an authentication proxy to a ThanosRuler pod or to change
+ the behavior of an operator generated container. Containers described
+ here modify an operator generated container if they share the same
+ name and modifications are done via a strategic merge patch. The
+ current container names are: `thanos-ruler` and `config-reloader`.
+ Overriding containers is entirely outside the scope of what the
+ maintainers will support and by doing so, you accept that this behaviour
+ may break at any time without notice.'
+ items:
+ description: A single application container that you want to run
+ within a pod.
+ properties:
+ args:
+ description: 'Arguments to the entrypoint. The container image''s
+ CMD is used if this is not provided. Variable references $(VAR_NAME)
+ are expanded using the container''s environment. If a variable
+ cannot be resolved, the reference in the input string will
+ be unchanged. Double $$ are reduced to a single $, which allows
+ for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will
+ produce the string literal "$(VAR_NAME)". Escaped references
+ will never be expanded, regardless of whether the variable
+ exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'
+ items:
+ type: string
+ type: array
+ command:
+ description: 'Entrypoint array. Not executed within a shell.
+ The container image''s ENTRYPOINT is used if this is not provided.
+ Variable references $(VAR_NAME) are expanded using the container''s
+ environment. If a variable cannot be resolved, the reference
+ in the input string will be unchanged. Double $$ are reduced
+ to a single $, which allows for escaping the $(VAR_NAME) syntax:
+ i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)".
+ Escaped references will never be expanded, regardless of whether
+ the variable exists or not. Cannot be updated. More info:
+ https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'
+ items:
+ type: string
+ type: array
+ env:
+ description: List of environment variables to set in the container.
+ Cannot be updated.
+ items:
+ description: EnvVar represents an environment variable present
+ in a Container.
+ properties:
+ name:
+ description: Name of the environment variable. Must be
+ a C_IDENTIFIER.
+ type: string
+ value:
+ description: 'Variable references $(VAR_NAME) are expanded
+ using the previously defined environment variables in
+ the container and any service environment variables.
+ If a variable cannot be resolved, the reference in the
+ input string will be unchanged. Double $$ are reduced
+ to a single $, which allows for escaping the $(VAR_NAME)
+ syntax: i.e. "$$(VAR_NAME)" will produce the string
+ literal "$(VAR_NAME)". Escaped references will never
+ be expanded, regardless of whether the variable exists
+ or not. Defaults to "".'
+ type: string
+ valueFrom:
+ description: Source for the environment variable's value.
+ Cannot be used if value is not empty.
+ properties:
+ configMapKeyRef:
+ description: Selects a key of a ConfigMap.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ fieldRef:
+ description: 'Selects a field of the pod: supports
+ metadata.name, metadata.namespace, `metadata.labels['''']`,
+ `metadata.annotations['''']`, spec.nodeName,
+ spec.serviceAccountName, status.hostIP, status.podIP,
+ status.podIPs.'
+ properties:
+ apiVersion:
+ description: Version of the schema the FieldPath
+ is written in terms of, defaults to "v1".
+ type: string
+ fieldPath:
+ description: Path of the field to select in the
+ specified API version.
+ type: string
+ required:
+ - fieldPath
+ type: object
+ x-kubernetes-map-type: atomic
+ resourceFieldRef:
+ description: 'Selects a resource of the container:
+ only resources limits and requests (limits.cpu,
+ limits.memory, limits.ephemeral-storage, requests.cpu,
+ requests.memory and requests.ephemeral-storage)
+ are currently supported.'
+ properties:
+ containerName:
+ description: 'Container name: required for volumes,
+ optional for env vars'
+ type: string
+ divisor:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Specifies the output format of the
+ exposed resources, defaults to "1"
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ resource:
+ description: 'Required: resource to select'
+ type: string
+ required:
+ - resource
+ type: object
+ x-kubernetes-map-type: atomic
+ secretKeyRef:
+ description: Selects a key of a secret in the pod's
+ namespace
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ required:
+ - name
+ type: object
+ type: array
+ envFrom:
+ description: List of sources to populate environment variables
+ in the container. The keys defined within a source must be
+ a C_IDENTIFIER. All invalid keys will be reported as an event
+ when the container is starting. When a key exists in multiple
+ sources, the value associated with the last source will take
+ precedence. Values defined by an Env with a duplicate key
+ will take precedence. Cannot be updated.
+ items:
+ description: EnvFromSource represents the source of a set
+ of ConfigMaps
+ properties:
+ configMapRef:
+ description: The ConfigMap to select from
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap must be
+ defined
+ type: boolean
+ type: object
+ x-kubernetes-map-type: atomic
+ prefix:
+ description: An optional identifier to prepend to each
+ key in the ConfigMap. Must be a C_IDENTIFIER.
+ type: string
+ secretRef:
+ description: The Secret to select from
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret must be defined
+ type: boolean
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ image:
+ description: 'Container image name. More info: https://kubernetes.io/docs/concepts/containers/images
+ This field is optional to allow higher level config management
+ to default or override container images in workload controllers
+ like Deployments and StatefulSets.'
+ type: string
+ imagePullPolicy:
+ description: 'Image pull policy. One of Always, Never, IfNotPresent.
+ Defaults to Always if :latest tag is specified, or IfNotPresent
+ otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images'
+ type: string
+ lifecycle:
+ description: Actions that the management system should take
+ in response to container lifecycle events. Cannot be updated.
+ properties:
+ postStart:
+ description: 'PostStart is called immediately after a container
+ is created. If the handler fails, the container is terminated
+ and restarted according to its restart policy. Other management
+ of the container blocks until the hook completes. More
+ info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for
+ the command is root ('/') in the container's
+ filesystem. The command is simply exec'd, it is
+ not run inside a shell, so traditional shell instructions
+ ('|', etc) won't work. To use a shell, you need
+ to explicitly call out to that shell. Exit status
+ of 0 is treated as live/healthy and non-zero is
+ unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to
+ the pod IP. You probably want to set "Host" in
+ httpHeaders instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request.
+ HTTP allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access
+ on the container. Number must be in the range
+ 1 to 65535. Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the
+ host. Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ tcpSocket:
+ description: Deprecated. TCPSocket is NOT supported
+ as a LifecycleHandler and kept for the backward compatibility.
+ There are no validation of this field and lifecycle
+ hooks will fail in runtime when tcp handler is specified.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to,
+ defaults to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access
+ on the container. Number must be in the range
+ 1 to 65535. Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ type: object
+ preStop:
+ description: 'PreStop is called immediately before a container
+ is terminated due to an API request or management event
+ such as liveness/startup probe failure, preemption, resource
+ contention, etc. The handler is not called if the container
+ crashes or exits. The Pod''s termination grace period
+ countdown begins before the PreStop hook is executed.
+ Regardless of the outcome of the handler, the container
+ will eventually terminate within the Pod''s termination
+ grace period (unless delayed by finalizers). Other management
+ of the container blocks until the hook completes or until
+ the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for
+ the command is root ('/') in the container's
+ filesystem. The command is simply exec'd, it is
+ not run inside a shell, so traditional shell instructions
+ ('|', etc) won't work. To use a shell, you need
+ to explicitly call out to that shell. Exit status
+ of 0 is treated as live/healthy and non-zero is
+ unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to
+ the pod IP. You probably want to set "Host" in
+ httpHeaders instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request.
+ HTTP allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access
+ on the container. Number must be in the range
+ 1 to 65535. Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the
+ host. Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ tcpSocket:
+ description: Deprecated. TCPSocket is NOT supported
+ as a LifecycleHandler and kept for the backward compatibility.
+ There are no validation of this field and lifecycle
+ hooks will fail in runtime when tcp handler is specified.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to,
+ defaults to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access
+ on the container. Number must be in the range
+ 1 to 65535. Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ type: object
+ type: object
+ livenessProbe:
+ description: 'Periodic probe of container liveness. Container
+ will be restarted if the probe fails. Cannot be updated. More
+ info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for the
+ command is root ('/') in the container's filesystem.
+ The command is simply exec'd, it is not run inside
+ a shell, so traditional shell instructions ('|', etc)
+ won't work. To use a shell, you need to explicitly
+ call out to that shell. Exit status of 0 is treated
+ as live/healthy and non-zero is unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ failureThreshold:
+ description: Minimum consecutive failures for the probe
+ to be considered failed after having succeeded. Defaults
+ to 3. Minimum value is 1.
+ format: int32
+ type: integer
+ grpc:
+ description: GRPC specifies an action involving a GRPC port.
+ properties:
+ port:
+ description: Port number of the gRPC service. Number
+ must be in the range 1 to 65535.
+ format: int32
+ type: integer
+ service:
+ description: "Service is the name of the service to
+ place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
+ \n If this is not specified, the default behavior
+ is defined by gRPC."
+ type: string
+ required:
+ - port
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to the
+ pod IP. You probably want to set "Host" in httpHeaders
+ instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request. HTTP
+ allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the host.
+ Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ initialDelaySeconds:
+ description: 'Number of seconds after the container has
+ started before liveness probes are initiated. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ periodSeconds:
+ description: How often (in seconds) to perform the probe.
+ Default to 10 seconds. Minimum value is 1.
+ format: int32
+ type: integer
+ successThreshold:
+ description: Minimum consecutive successes for the probe
+ to be considered successful after having failed. Defaults
+ to 1. Must be 1 for liveness and startup. Minimum value
+ is 1.
+ format: int32
+ type: integer
+ tcpSocket:
+ description: TCPSocket specifies an action involving a TCP
+ port.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to, defaults
+ to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ terminationGracePeriodSeconds:
+ description: Optional duration in seconds the pod needs
+ to terminate gracefully upon probe failure. The grace
+ period is the duration in seconds after the processes
+ running in the pod are sent a termination signal and the
+ time when the processes are forcibly halted with a kill
+ signal. Set this value longer than the expected cleanup
+ time for your process. If this value is nil, the pod's
+ terminationGracePeriodSeconds will be used. Otherwise,
+ this value overrides the value provided by the pod spec.
+ Value must be non-negative integer. The value zero indicates
+ stop immediately via the kill signal (no opportunity to
+ shut down). This is a beta field and requires enabling
+ ProbeTerminationGracePeriod feature gate. Minimum value
+ is 1. spec.terminationGracePeriodSeconds is used if unset.
+ format: int64
+ type: integer
+ timeoutSeconds:
+ description: 'Number of seconds after which the probe times
+ out. Defaults to 1 second. Minimum value is 1. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ type: object
+ name:
+ description: Name of the container specified as a DNS_LABEL.
+ Each container in a pod must have a unique name (DNS_LABEL).
+ Cannot be updated.
+ type: string
+ ports:
+ description: List of ports to expose from the container. Not
+ specifying a port here DOES NOT prevent that port from being
+ exposed. Any port which is listening on the default "0.0.0.0"
+ address inside a container will be accessible from the network.
+ Modifying this array with strategic merge patch may corrupt
+ the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255.
+ Cannot be updated.
+ items:
+ description: ContainerPort represents a network port in a
+ single container.
+ properties:
+ containerPort:
+ description: Number of port to expose on the pod's IP
+ address. This must be a valid port number, 0 < x < 65536.
+ format: int32
+ type: integer
+ hostIP:
+ description: What host IP to bind the external port to.
+ type: string
+ hostPort:
+ description: Number of port to expose on the host. If
+ specified, this must be a valid port number, 0 < x <
+ 65536. If HostNetwork is specified, this must match
+ ContainerPort. Most containers do not need this.
+ format: int32
+ type: integer
+ name:
+ description: If specified, this must be an IANA_SVC_NAME
+ and unique within the pod. Each named port in a pod
+ must have a unique name. Name for the port that can
+ be referred to by services.
+ type: string
+ protocol:
+ default: TCP
+ description: Protocol for port. Must be UDP, TCP, or SCTP.
+ Defaults to "TCP".
+ type: string
+ required:
+ - containerPort
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - containerPort
+ - protocol
+ x-kubernetes-list-type: map
+ readinessProbe:
+ description: 'Periodic probe of container service readiness.
+ Container will be removed from service endpoints if the probe
+ fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for the
+ command is root ('/') in the container's filesystem.
+ The command is simply exec'd, it is not run inside
+ a shell, so traditional shell instructions ('|', etc)
+ won't work. To use a shell, you need to explicitly
+ call out to that shell. Exit status of 0 is treated
+ as live/healthy and non-zero is unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ failureThreshold:
+ description: Minimum consecutive failures for the probe
+ to be considered failed after having succeeded. Defaults
+ to 3. Minimum value is 1.
+ format: int32
+ type: integer
+ grpc:
+ description: GRPC specifies an action involving a GRPC port.
+ properties:
+ port:
+ description: Port number of the gRPC service. Number
+ must be in the range 1 to 65535.
+ format: int32
+ type: integer
+ service:
+ description: "Service is the name of the service to
+ place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
+ \n If this is not specified, the default behavior
+ is defined by gRPC."
+ type: string
+ required:
+ - port
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to the
+ pod IP. You probably want to set "Host" in httpHeaders
+ instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request. HTTP
+ allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the host.
+ Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ initialDelaySeconds:
+ description: 'Number of seconds after the container has
+ started before liveness probes are initiated. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ periodSeconds:
+ description: How often (in seconds) to perform the probe.
+ Default to 10 seconds. Minimum value is 1.
+ format: int32
+ type: integer
+ successThreshold:
+ description: Minimum consecutive successes for the probe
+ to be considered successful after having failed. Defaults
+ to 1. Must be 1 for liveness and startup. Minimum value
+ is 1.
+ format: int32
+ type: integer
+ tcpSocket:
+ description: TCPSocket specifies an action involving a TCP
+ port.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to, defaults
+ to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ terminationGracePeriodSeconds:
+ description: Optional duration in seconds the pod needs
+ to terminate gracefully upon probe failure. The grace
+ period is the duration in seconds after the processes
+ running in the pod are sent a termination signal and the
+ time when the processes are forcibly halted with a kill
+ signal. Set this value longer than the expected cleanup
+ time for your process. If this value is nil, the pod's
+ terminationGracePeriodSeconds will be used. Otherwise,
+ this value overrides the value provided by the pod spec.
+ Value must be non-negative integer. The value zero indicates
+ stop immediately via the kill signal (no opportunity to
+ shut down). This is a beta field and requires enabling
+ ProbeTerminationGracePeriod feature gate. Minimum value
+ is 1. spec.terminationGracePeriodSeconds is used if unset.
+ format: int64
+ type: integer
+ timeoutSeconds:
+ description: 'Number of seconds after which the probe times
+ out. Defaults to 1 second. Minimum value is 1. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ type: object
+ resizePolicy:
+ description: Resources resize policy for the container.
+ items:
+ description: ContainerResizePolicy represents resource resize
+ policy for the container.
+ properties:
+ resourceName:
+ description: 'Name of the resource to which this resource
+ resize policy applies. Supported values: cpu, memory.'
+ type: string
+ restartPolicy:
+ description: Restart policy to apply when specified resource
+ is resized. If not specified, it defaults to NotRequired.
+ type: string
+ required:
+ - resourceName
+ - restartPolicy
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ resources:
+ description: 'Compute Resources required by this container.
+ Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ properties:
+ claims:
+ description: "Claims lists the names of resources, defined
+ in spec.resourceClaims, that are used by this container.
+ \n This is an alpha field and requires enabling the DynamicResourceAllocation
+ feature gate. \n This field is immutable. It can only
+ be set for containers."
+ items:
+ description: ResourceClaim references one entry in PodSpec.ResourceClaims.
+ properties:
+ name:
+ description: Name must match the name of one entry
+ in pod.spec.resourceClaims of the Pod where this
+ field is used. It makes that resource available
+ inside a container.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - name
+ x-kubernetes-list-type: map
+ limits:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Limits describes the maximum amount of compute
+ resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ requests:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Requests describes the minimum amount of compute
+ resources required. If Requests is omitted for a container,
+ it defaults to Limits if that is explicitly specified,
+ otherwise to an implementation-defined value. Requests
+ cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ type: object
+ restartPolicy:
+ description: 'RestartPolicy defines the restart behavior of
+ individual containers in a pod. This field may only be set
+ for init containers, and the only allowed value is "Always".
+ For non-init containers or when this field is not specified,
+ the restart behavior is defined by the Pod''s restart policy
+ and the container type. Setting the RestartPolicy as "Always"
+ for the init container will have the following effect: this
+ init container will be continually restarted on exit until
+ all regular containers have terminated. Once all regular containers
+ have completed, all init containers with restartPolicy "Always"
+ will be shut down. This lifecycle differs from normal init
+ containers and is often referred to as a "sidecar" container.
+ Although this init container still starts in the init container
+ sequence, it does not wait for the container to complete before
+ proceeding to the next init container. Instead, the next init
+ container starts immediately after this init container is
+ started, or after any startupProbe has successfully completed.'
+ type: string
+ securityContext:
+ description: 'SecurityContext defines the security options the
+ container should be run with. If set, the fields of SecurityContext
+ override the equivalent fields of PodSecurityContext. More
+ info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/'
+ properties:
+ allowPrivilegeEscalation:
+ description: 'AllowPrivilegeEscalation controls whether
+ a process can gain more privileges than its parent process.
+ This bool directly controls if the no_new_privs flag will
+ be set on the container process. AllowPrivilegeEscalation
+ is true always when the container is: 1) run as Privileged
+ 2) has CAP_SYS_ADMIN Note that this field cannot be set
+ when spec.os.name is windows.'
+ type: boolean
+ capabilities:
+ description: The capabilities to add/drop when running containers.
+ Defaults to the default set of capabilities granted by
+ the container runtime. Note that this field cannot be
+ set when spec.os.name is windows.
+ properties:
+ add:
+ description: Added capabilities
+ items:
+ description: Capability represent POSIX capabilities
+ type
+ type: string
+ type: array
+ drop:
+ description: Removed capabilities
+ items:
+ description: Capability represent POSIX capabilities
+ type
+ type: string
+ type: array
+ type: object
+ privileged:
+ description: Run container in privileged mode. Processes
+ in privileged containers are essentially equivalent to
+ root on the host. Defaults to false. Note that this field
+ cannot be set when spec.os.name is windows.
+ type: boolean
+ procMount:
+ description: procMount denotes the type of proc mount to
+ use for the containers. The default is DefaultProcMount
+ which uses the container runtime defaults for readonly
+ paths and masked paths. This requires the ProcMountType
+ feature flag to be enabled. Note that this field cannot
+ be set when spec.os.name is windows.
+ type: string
+ readOnlyRootFilesystem:
+ description: Whether this container has a read-only root
+ filesystem. Default is false. Note that this field cannot
+ be set when spec.os.name is windows.
+ type: boolean
+ runAsGroup:
+ description: The GID to run the entrypoint of the container
+ process. Uses runtime default if unset. May also be set
+ in PodSecurityContext. If set in both SecurityContext
+ and PodSecurityContext, the value specified in SecurityContext
+ takes precedence. Note that this field cannot be set when
+ spec.os.name is windows.
+ format: int64
+ type: integer
+ runAsNonRoot:
+ description: Indicates that the container must run as a
+ non-root user. If true, the Kubelet will validate the
+ image at runtime to ensure that it does not run as UID
+ 0 (root) and fail to start the container if it does. If
+ unset or false, no such validation will be performed.
+ May also be set in PodSecurityContext. If set in both
+ SecurityContext and PodSecurityContext, the value specified
+ in SecurityContext takes precedence.
+ type: boolean
+ runAsUser:
+ description: The UID to run the entrypoint of the container
+ process. Defaults to user specified in image metadata
+ if unspecified. May also be set in PodSecurityContext. If
+ set in both SecurityContext and PodSecurityContext, the
+ value specified in SecurityContext takes precedence. Note
+ that this field cannot be set when spec.os.name is windows.
+ format: int64
+ type: integer
+ seLinuxOptions:
+ description: The SELinux context to be applied to the container.
+ If unspecified, the container runtime will allocate a
+ random SELinux context for each container. May also be
+ set in PodSecurityContext. If set in both SecurityContext
+ and PodSecurityContext, the value specified in SecurityContext
+ takes precedence. Note that this field cannot be set when
+ spec.os.name is windows.
+ properties:
+ level:
+ description: Level is SELinux level label that applies
+ to the container.
+ type: string
+ role:
+ description: Role is a SELinux role label that applies
+ to the container.
+ type: string
+ type:
+ description: Type is a SELinux type label that applies
+ to the container.
+ type: string
+ user:
+ description: User is a SELinux user label that applies
+ to the container.
+ type: string
+ type: object
+ seccompProfile:
+ description: The seccomp options to use by this container.
+ If seccomp options are provided at both the pod & container
+ level, the container options override the pod options.
+ Note that this field cannot be set when spec.os.name is
+ windows.
+ properties:
+ localhostProfile:
+ description: localhostProfile indicates a profile defined
+ in a file on the node should be used. The profile
+ must be preconfigured on the node to work. Must be
+ a descending path, relative to the kubelet's configured
+ seccomp profile location. Must be set if type is "Localhost".
+ Must NOT be set for any other type.
+ type: string
+ type:
+ description: "type indicates which kind of seccomp profile
+ will be applied. Valid options are: \n Localhost -
+ a profile defined in a file on the node should be
+ used. RuntimeDefault - the container runtime default
+ profile should be used. Unconfined - no profile should
+ be applied."
+ type: string
+ required:
+ - type
+ type: object
+ windowsOptions:
+ description: The Windows specific settings applied to all
+ containers. If unspecified, the options from the PodSecurityContext
+ will be used. If set in both SecurityContext and PodSecurityContext,
+ the value specified in SecurityContext takes precedence.
+ Note that this field cannot be set when spec.os.name is
+ linux.
+ properties:
+ gmsaCredentialSpec:
+ description: GMSACredentialSpec is where the GMSA admission
+ webhook (https://github.com/kubernetes-sigs/windows-gmsa)
+ inlines the contents of the GMSA credential spec named
+ by the GMSACredentialSpecName field.
+ type: string
+ gmsaCredentialSpecName:
+ description: GMSACredentialSpecName is the name of the
+ GMSA credential spec to use.
+ type: string
+ hostProcess:
+ description: HostProcess determines if a container should
+ be run as a 'Host Process' container. All of a Pod's
+ containers must have the same effective HostProcess
+ value (it is not allowed to have a mix of HostProcess
+ containers and non-HostProcess containers). In addition,
+ if HostProcess is true then HostNetwork must also
+ be set to true.
+ type: boolean
+ runAsUserName:
+ description: The UserName in Windows to run the entrypoint
+ of the container process. Defaults to the user specified
+ in image metadata if unspecified. May also be set
+ in PodSecurityContext. If set in both SecurityContext
+ and PodSecurityContext, the value specified in SecurityContext
+ takes precedence.
+ type: string
+ type: object
+ type: object
+ startupProbe:
+ description: 'StartupProbe indicates that the Pod has successfully
+ initialized. If specified, no other probes are executed until
+ this completes successfully. If this probe fails, the Pod
+ will be restarted, just as if the livenessProbe failed. This
+ can be used to provide different probe parameters at the beginning
+ of a Pod''s lifecycle, when it might take a long time to load
+ data or warm a cache, than during steady-state operation.
+ This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for the
+ command is root ('/') in the container's filesystem.
+ The command is simply exec'd, it is not run inside
+ a shell, so traditional shell instructions ('|', etc)
+ won't work. To use a shell, you need to explicitly
+ call out to that shell. Exit status of 0 is treated
+ as live/healthy and non-zero is unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ failureThreshold:
+ description: Minimum consecutive failures for the probe
+ to be considered failed after having succeeded. Defaults
+ to 3. Minimum value is 1.
+ format: int32
+ type: integer
+ grpc:
+ description: GRPC specifies an action involving a GRPC port.
+ properties:
+ port:
+ description: Port number of the gRPC service. Number
+ must be in the range 1 to 65535.
+ format: int32
+ type: integer
+ service:
+ description: "Service is the name of the service to
+ place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
+ \n If this is not specified, the default behavior
+ is defined by gRPC."
+ type: string
+ required:
+ - port
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to the
+ pod IP. You probably want to set "Host" in httpHeaders
+ instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request. HTTP
+ allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the host.
+ Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ initialDelaySeconds:
+ description: 'Number of seconds after the container has
+ started before liveness probes are initiated. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ periodSeconds:
+ description: How often (in seconds) to perform the probe.
+ Default to 10 seconds. Minimum value is 1.
+ format: int32
+ type: integer
+ successThreshold:
+ description: Minimum consecutive successes for the probe
+ to be considered successful after having failed. Defaults
+ to 1. Must be 1 for liveness and startup. Minimum value
+ is 1.
+ format: int32
+ type: integer
+ tcpSocket:
+ description: TCPSocket specifies an action involving a TCP
+ port.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to, defaults
+ to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ terminationGracePeriodSeconds:
+ description: Optional duration in seconds the pod needs
+ to terminate gracefully upon probe failure. The grace
+ period is the duration in seconds after the processes
+ running in the pod are sent a termination signal and the
+ time when the processes are forcibly halted with a kill
+ signal. Set this value longer than the expected cleanup
+ time for your process. If this value is nil, the pod's
+ terminationGracePeriodSeconds will be used. Otherwise,
+ this value overrides the value provided by the pod spec.
+ Value must be non-negative integer. The value zero indicates
+ stop immediately via the kill signal (no opportunity to
+ shut down). This is a beta field and requires enabling
+ ProbeTerminationGracePeriod feature gate. Minimum value
+ is 1. spec.terminationGracePeriodSeconds is used if unset.
+ format: int64
+ type: integer
+ timeoutSeconds:
+ description: 'Number of seconds after which the probe times
+ out. Defaults to 1 second. Minimum value is 1. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ type: object
+ stdin:
+ description: Whether this container should allocate a buffer
+ for stdin in the container runtime. If this is not set, reads
+ from stdin in the container will always result in EOF. Default
+ is false.
+ type: boolean
+ stdinOnce:
+ description: Whether the container runtime should close the
+ stdin channel after it has been opened by a single attach.
+ When stdin is true the stdin stream will remain open across
+ multiple attach sessions. If stdinOnce is set to true, stdin
+ is opened on container start, is empty until the first client
+ attaches to stdin, and then remains open and accepts data
+ until the client disconnects, at which time stdin is closed
+ and remains closed until the container is restarted. If this
+ flag is false, a container processes that reads from stdin
+ will never receive an EOF. Default is false
+ type: boolean
+ terminationMessagePath:
+ description: 'Optional: Path at which the file to which the
+ container''s termination message will be written is mounted
+ into the container''s filesystem. Message written is intended
+ to be brief final status, such as an assertion failure message.
+ Will be truncated by the node if greater than 4096 bytes.
+ The total message length across all containers will be limited
+ to 12kb. Defaults to /dev/termination-log. Cannot be updated.'
+ type: string
+ terminationMessagePolicy:
+ description: Indicate how the termination message should be
+ populated. File will use the contents of terminationMessagePath
+ to populate the container status message on both success and
+ failure. FallbackToLogsOnError will use the last chunk of
+ container log output if the termination message file is empty
+ and the container exited with an error. The log output is
+ limited to 2048 bytes or 80 lines, whichever is smaller. Defaults
+ to File. Cannot be updated.
+ type: string
+ tty:
+ description: Whether this container should allocate a TTY for
+ itself, also requires 'stdin' to be true. Default is false.
+ type: boolean
+ volumeDevices:
+ description: volumeDevices is the list of block devices to be
+ used by the container.
+ items:
+ description: volumeDevice describes a mapping of a raw block
+ device within a container.
+ properties:
+ devicePath:
+ description: devicePath is the path inside of the container
+ that the device will be mapped to.
+ type: string
+ name:
+ description: name must match the name of a persistentVolumeClaim
+ in the pod
+ type: string
+ required:
+ - devicePath
+ - name
+ type: object
+ type: array
+ volumeMounts:
+ description: Pod volumes to mount into the container's filesystem.
+ Cannot be updated.
+ items:
+ description: VolumeMount describes a mounting of a Volume
+ within a container.
+ properties:
+ mountPath:
+ description: Path within the container at which the volume
+ should be mounted. Must not contain ':'.
+ type: string
+ mountPropagation:
+ description: mountPropagation determines how mounts are
+ propagated from the host to container and the other
+ way around. When not set, MountPropagationNone is used.
+ This field is beta in 1.10.
+ type: string
+ name:
+ description: This must match the Name of a Volume.
+ type: string
+ readOnly:
+ description: Mounted read-only if true, read-write otherwise
+ (false or unspecified). Defaults to false.
+ type: boolean
+ subPath:
+ description: Path within the volume from which the container's
+ volume should be mounted. Defaults to "" (volume's root).
+ type: string
+ subPathExpr:
+ description: Expanded path within the volume from which
+ the container's volume should be mounted. Behaves similarly
+ to SubPath but environment variable references $(VAR_NAME)
+ are expanded using the container's environment. Defaults
+ to "" (volume's root). SubPathExpr and SubPath are mutually
+ exclusive.
+ type: string
+ required:
+ - mountPath
+ - name
+ type: object
+ type: array
+ workingDir:
+ description: Container's working directory. If not specified,
+ the container runtime's default will be used, which might
+ be configured in the container image. Cannot be updated.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ enforcedNamespaceLabel:
+ description: 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.
+ type: string
+ evaluationInterval:
+ default: 15s
+ description: Interval between consecutive evaluations.
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ excludedFromEnforcement:
+ description: List of references to PrometheusRule objects to be excluded
+ from enforcing a namespace label of origin. Applies only if enforcedNamespaceLabel
+ set to true.
+ items:
+ description: ObjectReference references a PodMonitor, ServiceMonitor,
+ Probe or PrometheusRule object.
+ properties:
+ group:
+ default: monitoring.coreos.com
+ description: Group of the referent. When not specified, it defaults
+ to `monitoring.coreos.com`
+ enum:
+ - monitoring.coreos.com
+ type: string
+ name:
+ description: Name of the referent. When not set, all resources
+ in the namespace are matched.
+ type: string
+ namespace:
+ description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
+ minLength: 1
+ type: string
+ resource:
+ description: Resource of the referent.
+ enum:
+ - prometheusrules
+ - servicemonitors
+ - podmonitors
+ - probes
+ - scrapeconfigs
+ type: string
+ required:
+ - namespace
+ - resource
+ type: object
+ type: array
+ externalPrefix:
+ description: 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.
+ type: string
+ grpcServerTlsConfig:
+ description: 'GRPCServerTLSConfig configures the gRPC server from
+ which Thanos Querier reads recorded rule data. Note: Currently only
+ the CAFile, CertFile, and KeyFile fields are supported. Maps to
+ the ''--grpc-server-tls-*'' CLI args.'
+ properties:
+ ca:
+ description: Certificate authority used when verifying server
+ certificates.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ caFile:
+ description: Path to the CA cert in the Prometheus container to
+ use for the targets.
+ type: string
+ cert:
+ description: Client certificate to present when doing client-authentication.
+ properties:
+ configMap:
+ description: ConfigMap containing data to use for the targets.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or its key
+ must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ secret:
+ description: Secret containing data to use for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must
+ be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ certFile:
+ description: Path to the client cert file in the Prometheus container
+ for the targets.
+ type: string
+ insecureSkipVerify:
+ description: Disable target certificate validation.
+ type: boolean
+ keyFile:
+ description: Path to the client key file in the Prometheus container
+ for the targets.
+ type: string
+ keySecret:
+ description: Secret containing the client key file for the targets.
+ properties:
+ key:
+ description: The key of the secret to select from. Must be
+ a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must be
+ defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ serverName:
+ description: Used to verify the hostname for the targets.
+ type: string
+ type: object
+ hostAliases:
+ description: Pods' hostAliases configuration
+ items:
+ description: HostAlias holds the mapping between IP and hostnames
+ that will be injected as an entry in the pod's hosts file.
+ properties:
+ hostnames:
+ description: Hostnames for the above IP address.
+ items:
+ type: string
+ type: array
+ ip:
+ description: IP address of the host file entry.
+ type: string
+ required:
+ - hostnames
+ - ip
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - ip
+ x-kubernetes-list-type: map
+ image:
+ description: Thanos container image URL.
+ type: string
+ imagePullPolicy:
+ description: Image pull policy for the 'thanos', 'init-config-reloader'
+ and 'config-reloader' containers. See https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy
+ for more details.
+ enum:
+ - ""
+ - Always
+ - Never
+ - IfNotPresent
+ type: string
+ imagePullSecrets:
+ description: An optional list of references to secrets in the same
+ namespace to use for pulling thanos images from registries see http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod
+ items:
+ description: LocalObjectReference contains enough information to
+ let you locate the referenced object inside the same namespace.
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ type: array
+ initContainers:
+ description: 'InitContainers allows adding initContainers to the pod
+ definition. Those can be used to e.g. fetch secrets for injection
+ into the ThanosRuler configuration from external sources. Any errors
+ during the execution of an initContainer will lead to a restart
+ of the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
+ Using initContainers for any use case other then secret fetching
+ is entirely outside the scope of what the maintainers will support
+ and by doing so, you accept that this behaviour may break at any
+ time without notice.'
+ items:
+ description: A single application container that you want to run
+ within a pod.
+ properties:
+ args:
+ description: 'Arguments to the entrypoint. The container image''s
+ CMD is used if this is not provided. Variable references $(VAR_NAME)
+ are expanded using the container''s environment. If a variable
+ cannot be resolved, the reference in the input string will
+ be unchanged. Double $$ are reduced to a single $, which allows
+ for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will
+ produce the string literal "$(VAR_NAME)". Escaped references
+ will never be expanded, regardless of whether the variable
+ exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'
+ items:
+ type: string
+ type: array
+ command:
+ description: 'Entrypoint array. Not executed within a shell.
+ The container image''s ENTRYPOINT is used if this is not provided.
+ Variable references $(VAR_NAME) are expanded using the container''s
+ environment. If a variable cannot be resolved, the reference
+ in the input string will be unchanged. Double $$ are reduced
+ to a single $, which allows for escaping the $(VAR_NAME) syntax:
+ i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)".
+ Escaped references will never be expanded, regardless of whether
+ the variable exists or not. Cannot be updated. More info:
+ https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'
+ items:
+ type: string
+ type: array
+ env:
+ description: List of environment variables to set in the container.
+ Cannot be updated.
+ items:
+ description: EnvVar represents an environment variable present
+ in a Container.
+ properties:
+ name:
+ description: Name of the environment variable. Must be
+ a C_IDENTIFIER.
+ type: string
+ value:
+ description: 'Variable references $(VAR_NAME) are expanded
+ using the previously defined environment variables in
+ the container and any service environment variables.
+ If a variable cannot be resolved, the reference in the
+ input string will be unchanged. Double $$ are reduced
+ to a single $, which allows for escaping the $(VAR_NAME)
+ syntax: i.e. "$$(VAR_NAME)" will produce the string
+ literal "$(VAR_NAME)". Escaped references will never
+ be expanded, regardless of whether the variable exists
+ or not. Defaults to "".'
+ type: string
+ valueFrom:
+ description: Source for the environment variable's value.
+ Cannot be used if value is not empty.
+ properties:
+ configMapKeyRef:
+ description: Selects a key of a ConfigMap.
+ properties:
+ key:
+ description: The key to select.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap or
+ its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ fieldRef:
+ description: 'Selects a field of the pod: supports
+ metadata.name, metadata.namespace, `metadata.labels['''']`,
+ `metadata.annotations['''']`, spec.nodeName,
+ spec.serviceAccountName, status.hostIP, status.podIP,
+ status.podIPs.'
+ properties:
+ apiVersion:
+ description: Version of the schema the FieldPath
+ is written in terms of, defaults to "v1".
+ type: string
+ fieldPath:
+ description: Path of the field to select in the
+ specified API version.
+ type: string
+ required:
+ - fieldPath
+ type: object
+ x-kubernetes-map-type: atomic
+ resourceFieldRef:
+ description: 'Selects a resource of the container:
+ only resources limits and requests (limits.cpu,
+ limits.memory, limits.ephemeral-storage, requests.cpu,
+ requests.memory and requests.ephemeral-storage)
+ are currently supported.'
+ properties:
+ containerName:
+ description: 'Container name: required for volumes,
+ optional for env vars'
+ type: string
+ divisor:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Specifies the output format of the
+ exposed resources, defaults to "1"
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ resource:
+ description: 'Required: resource to select'
+ type: string
+ required:
+ - resource
+ type: object
+ x-kubernetes-map-type: atomic
+ secretKeyRef:
+ description: Selects a key of a secret in the pod's
+ namespace
+ properties:
+ key:
+ description: The key of the secret to select from. Must
+ be a valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its
+ key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ required:
+ - name
+ type: object
+ type: array
+ envFrom:
+ description: List of sources to populate environment variables
+ in the container. The keys defined within a source must be
+ a C_IDENTIFIER. All invalid keys will be reported as an event
+ when the container is starting. When a key exists in multiple
+ sources, the value associated with the last source will take
+ precedence. Values defined by an Env with a duplicate key
+ will take precedence. Cannot be updated.
+ items:
+ description: EnvFromSource represents the source of a set
+ of ConfigMaps
+ properties:
+ configMapRef:
+ description: The ConfigMap to select from
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the ConfigMap must be
+ defined
+ type: boolean
+ type: object
+ x-kubernetes-map-type: atomic
+ prefix:
+ description: An optional identifier to prepend to each
+ key in the ConfigMap. Must be a C_IDENTIFIER.
+ type: string
+ secretRef:
+ description: The Secret to select from
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret must be defined
+ type: boolean
+ type: object
+ x-kubernetes-map-type: atomic
+ type: object
+ type: array
+ image:
+ description: 'Container image name. More info: https://kubernetes.io/docs/concepts/containers/images
+ This field is optional to allow higher level config management
+ to default or override container images in workload controllers
+ like Deployments and StatefulSets.'
+ type: string
+ imagePullPolicy:
+ description: 'Image pull policy. One of Always, Never, IfNotPresent.
+ Defaults to Always if :latest tag is specified, or IfNotPresent
+ otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images'
+ type: string
+ lifecycle:
+ description: Actions that the management system should take
+ in response to container lifecycle events. Cannot be updated.
+ properties:
+ postStart:
+ description: 'PostStart is called immediately after a container
+ is created. If the handler fails, the container is terminated
+ and restarted according to its restart policy. Other management
+ of the container blocks until the hook completes. More
+ info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for
+ the command is root ('/') in the container's
+ filesystem. The command is simply exec'd, it is
+ not run inside a shell, so traditional shell instructions
+ ('|', etc) won't work. To use a shell, you need
+ to explicitly call out to that shell. Exit status
+ of 0 is treated as live/healthy and non-zero is
+ unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to
+ the pod IP. You probably want to set "Host" in
+ httpHeaders instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request.
+ HTTP allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access
+ on the container. Number must be in the range
+ 1 to 65535. Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the
+ host. Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ tcpSocket:
+ description: Deprecated. TCPSocket is NOT supported
+ as a LifecycleHandler and kept for the backward compatibility.
+ There are no validation of this field and lifecycle
+ hooks will fail in runtime when tcp handler is specified.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to,
+ defaults to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access
+ on the container. Number must be in the range
+ 1 to 65535. Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ type: object
+ preStop:
+ description: 'PreStop is called immediately before a container
+ is terminated due to an API request or management event
+ such as liveness/startup probe failure, preemption, resource
+ contention, etc. The handler is not called if the container
+ crashes or exits. The Pod''s termination grace period
+ countdown begins before the PreStop hook is executed.
+ Regardless of the outcome of the handler, the container
+ will eventually terminate within the Pod''s termination
+ grace period (unless delayed by finalizers). Other management
+ of the container blocks until the hook completes or until
+ the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for
+ the command is root ('/') in the container's
+ filesystem. The command is simply exec'd, it is
+ not run inside a shell, so traditional shell instructions
+ ('|', etc) won't work. To use a shell, you need
+ to explicitly call out to that shell. Exit status
+ of 0 is treated as live/healthy and non-zero is
+ unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to
+ the pod IP. You probably want to set "Host" in
+ httpHeaders instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request.
+ HTTP allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access
+ on the container. Number must be in the range
+ 1 to 65535. Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the
+ host. Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ tcpSocket:
+ description: Deprecated. TCPSocket is NOT supported
+ as a LifecycleHandler and kept for the backward compatibility.
+ There are no validation of this field and lifecycle
+ hooks will fail in runtime when tcp handler is specified.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to,
+ defaults to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access
+ on the container. Number must be in the range
+ 1 to 65535. Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ type: object
+ type: object
+ livenessProbe:
+ description: 'Periodic probe of container liveness. Container
+ will be restarted if the probe fails. Cannot be updated. More
+ info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for the
+ command is root ('/') in the container's filesystem.
+ The command is simply exec'd, it is not run inside
+ a shell, so traditional shell instructions ('|', etc)
+ won't work. To use a shell, you need to explicitly
+ call out to that shell. Exit status of 0 is treated
+ as live/healthy and non-zero is unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ failureThreshold:
+ description: Minimum consecutive failures for the probe
+ to be considered failed after having succeeded. Defaults
+ to 3. Minimum value is 1.
+ format: int32
+ type: integer
+ grpc:
+ description: GRPC specifies an action involving a GRPC port.
+ properties:
+ port:
+ description: Port number of the gRPC service. Number
+ must be in the range 1 to 65535.
+ format: int32
+ type: integer
+ service:
+ description: "Service is the name of the service to
+ place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
+ \n If this is not specified, the default behavior
+ is defined by gRPC."
+ type: string
+ required:
+ - port
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to the
+ pod IP. You probably want to set "Host" in httpHeaders
+ instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request. HTTP
+ allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the host.
+ Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ initialDelaySeconds:
+ description: 'Number of seconds after the container has
+ started before liveness probes are initiated. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ periodSeconds:
+ description: How often (in seconds) to perform the probe.
+ Default to 10 seconds. Minimum value is 1.
+ format: int32
+ type: integer
+ successThreshold:
+ description: Minimum consecutive successes for the probe
+ to be considered successful after having failed. Defaults
+ to 1. Must be 1 for liveness and startup. Minimum value
+ is 1.
+ format: int32
+ type: integer
+ tcpSocket:
+ description: TCPSocket specifies an action involving a TCP
+ port.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to, defaults
+ to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ terminationGracePeriodSeconds:
+ description: Optional duration in seconds the pod needs
+ to terminate gracefully upon probe failure. The grace
+ period is the duration in seconds after the processes
+ running in the pod are sent a termination signal and the
+ time when the processes are forcibly halted with a kill
+ signal. Set this value longer than the expected cleanup
+ time for your process. If this value is nil, the pod's
+ terminationGracePeriodSeconds will be used. Otherwise,
+ this value overrides the value provided by the pod spec.
+ Value must be non-negative integer. The value zero indicates
+ stop immediately via the kill signal (no opportunity to
+ shut down). This is a beta field and requires enabling
+ ProbeTerminationGracePeriod feature gate. Minimum value
+ is 1. spec.terminationGracePeriodSeconds is used if unset.
+ format: int64
+ type: integer
+ timeoutSeconds:
+ description: 'Number of seconds after which the probe times
+ out. Defaults to 1 second. Minimum value is 1. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ type: object
+ name:
+ description: Name of the container specified as a DNS_LABEL.
+ Each container in a pod must have a unique name (DNS_LABEL).
+ Cannot be updated.
+ type: string
+ ports:
+ description: List of ports to expose from the container. Not
+ specifying a port here DOES NOT prevent that port from being
+ exposed. Any port which is listening on the default "0.0.0.0"
+ address inside a container will be accessible from the network.
+ Modifying this array with strategic merge patch may corrupt
+ the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255.
+ Cannot be updated.
+ items:
+ description: ContainerPort represents a network port in a
+ single container.
+ properties:
+ containerPort:
+ description: Number of port to expose on the pod's IP
+ address. This must be a valid port number, 0 < x < 65536.
+ format: int32
+ type: integer
+ hostIP:
+ description: What host IP to bind the external port to.
+ type: string
+ hostPort:
+ description: Number of port to expose on the host. If
+ specified, this must be a valid port number, 0 < x <
+ 65536. If HostNetwork is specified, this must match
+ ContainerPort. Most containers do not need this.
+ format: int32
+ type: integer
+ name:
+ description: If specified, this must be an IANA_SVC_NAME
+ and unique within the pod. Each named port in a pod
+ must have a unique name. Name for the port that can
+ be referred to by services.
+ type: string
+ protocol:
+ default: TCP
+ description: Protocol for port. Must be UDP, TCP, or SCTP.
+ Defaults to "TCP".
+ type: string
+ required:
+ - containerPort
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - containerPort
+ - protocol
+ x-kubernetes-list-type: map
+ readinessProbe:
+ description: 'Periodic probe of container service readiness.
+ Container will be removed from service endpoints if the probe
+ fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for the
+ command is root ('/') in the container's filesystem.
+ The command is simply exec'd, it is not run inside
+ a shell, so traditional shell instructions ('|', etc)
+ won't work. To use a shell, you need to explicitly
+ call out to that shell. Exit status of 0 is treated
+ as live/healthy and non-zero is unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ failureThreshold:
+ description: Minimum consecutive failures for the probe
+ to be considered failed after having succeeded. Defaults
+ to 3. Minimum value is 1.
+ format: int32
+ type: integer
+ grpc:
+ description: GRPC specifies an action involving a GRPC port.
+ properties:
+ port:
+ description: Port number of the gRPC service. Number
+ must be in the range 1 to 65535.
+ format: int32
+ type: integer
+ service:
+ description: "Service is the name of the service to
+ place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
+ \n If this is not specified, the default behavior
+ is defined by gRPC."
+ type: string
+ required:
+ - port
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to the
+ pod IP. You probably want to set "Host" in httpHeaders
+ instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request. HTTP
+ allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the host.
+ Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ initialDelaySeconds:
+ description: 'Number of seconds after the container has
+ started before liveness probes are initiated. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ periodSeconds:
+ description: How often (in seconds) to perform the probe.
+ Default to 10 seconds. Minimum value is 1.
+ format: int32
+ type: integer
+ successThreshold:
+ description: Minimum consecutive successes for the probe
+ to be considered successful after having failed. Defaults
+ to 1. Must be 1 for liveness and startup. Minimum value
+ is 1.
+ format: int32
+ type: integer
+ tcpSocket:
+ description: TCPSocket specifies an action involving a TCP
+ port.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to, defaults
+ to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ terminationGracePeriodSeconds:
+ description: Optional duration in seconds the pod needs
+ to terminate gracefully upon probe failure. The grace
+ period is the duration in seconds after the processes
+ running in the pod are sent a termination signal and the
+ time when the processes are forcibly halted with a kill
+ signal. Set this value longer than the expected cleanup
+ time for your process. If this value is nil, the pod's
+ terminationGracePeriodSeconds will be used. Otherwise,
+ this value overrides the value provided by the pod spec.
+ Value must be non-negative integer. The value zero indicates
+ stop immediately via the kill signal (no opportunity to
+ shut down). This is a beta field and requires enabling
+ ProbeTerminationGracePeriod feature gate. Minimum value
+ is 1. spec.terminationGracePeriodSeconds is used if unset.
+ format: int64
+ type: integer
+ timeoutSeconds:
+ description: 'Number of seconds after which the probe times
+ out. Defaults to 1 second. Minimum value is 1. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ type: object
+ resizePolicy:
+ description: Resources resize policy for the container.
+ items:
+ description: ContainerResizePolicy represents resource resize
+ policy for the container.
+ properties:
+ resourceName:
+ description: 'Name of the resource to which this resource
+ resize policy applies. Supported values: cpu, memory.'
+ type: string
+ restartPolicy:
+ description: Restart policy to apply when specified resource
+ is resized. If not specified, it defaults to NotRequired.
+ type: string
+ required:
+ - resourceName
+ - restartPolicy
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ resources:
+ description: 'Compute Resources required by this container.
+ Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ properties:
+ claims:
+ description: "Claims lists the names of resources, defined
+ in spec.resourceClaims, that are used by this container.
+ \n This is an alpha field and requires enabling the DynamicResourceAllocation
+ feature gate. \n This field is immutable. It can only
+ be set for containers."
+ items:
+ description: ResourceClaim references one entry in PodSpec.ResourceClaims.
+ properties:
+ name:
+ description: Name must match the name of one entry
+ in pod.spec.resourceClaims of the Pod where this
+ field is used. It makes that resource available
+ inside a container.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - name
+ x-kubernetes-list-type: map
+ limits:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Limits describes the maximum amount of compute
+ resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ requests:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Requests describes the minimum amount of compute
+ resources required. If Requests is omitted for a container,
+ it defaults to Limits if that is explicitly specified,
+ otherwise to an implementation-defined value. Requests
+ cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ type: object
+ restartPolicy:
+ description: 'RestartPolicy defines the restart behavior of
+ individual containers in a pod. This field may only be set
+ for init containers, and the only allowed value is "Always".
+ For non-init containers or when this field is not specified,
+ the restart behavior is defined by the Pod''s restart policy
+ and the container type. Setting the RestartPolicy as "Always"
+ for the init container will have the following effect: this
+ init container will be continually restarted on exit until
+ all regular containers have terminated. Once all regular containers
+ have completed, all init containers with restartPolicy "Always"
+ will be shut down. This lifecycle differs from normal init
+ containers and is often referred to as a "sidecar" container.
+ Although this init container still starts in the init container
+ sequence, it does not wait for the container to complete before
+ proceeding to the next init container. Instead, the next init
+ container starts immediately after this init container is
+ started, or after any startupProbe has successfully completed.'
+ type: string
+ securityContext:
+ description: 'SecurityContext defines the security options the
+ container should be run with. If set, the fields of SecurityContext
+ override the equivalent fields of PodSecurityContext. More
+ info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/'
+ properties:
+ allowPrivilegeEscalation:
+ description: 'AllowPrivilegeEscalation controls whether
+ a process can gain more privileges than its parent process.
+ This bool directly controls if the no_new_privs flag will
+ be set on the container process. AllowPrivilegeEscalation
+ is true always when the container is: 1) run as Privileged
+ 2) has CAP_SYS_ADMIN Note that this field cannot be set
+ when spec.os.name is windows.'
+ type: boolean
+ capabilities:
+ description: The capabilities to add/drop when running containers.
+ Defaults to the default set of capabilities granted by
+ the container runtime. Note that this field cannot be
+ set when spec.os.name is windows.
+ properties:
+ add:
+ description: Added capabilities
+ items:
+ description: Capability represent POSIX capabilities
+ type
+ type: string
+ type: array
+ drop:
+ description: Removed capabilities
+ items:
+ description: Capability represent POSIX capabilities
+ type
+ type: string
+ type: array
+ type: object
+ privileged:
+ description: Run container in privileged mode. Processes
+ in privileged containers are essentially equivalent to
+ root on the host. Defaults to false. Note that this field
+ cannot be set when spec.os.name is windows.
+ type: boolean
+ procMount:
+ description: procMount denotes the type of proc mount to
+ use for the containers. The default is DefaultProcMount
+ which uses the container runtime defaults for readonly
+ paths and masked paths. This requires the ProcMountType
+ feature flag to be enabled. Note that this field cannot
+ be set when spec.os.name is windows.
+ type: string
+ readOnlyRootFilesystem:
+ description: Whether this container has a read-only root
+ filesystem. Default is false. Note that this field cannot
+ be set when spec.os.name is windows.
+ type: boolean
+ runAsGroup:
+ description: The GID to run the entrypoint of the container
+ process. Uses runtime default if unset. May also be set
+ in PodSecurityContext. If set in both SecurityContext
+ and PodSecurityContext, the value specified in SecurityContext
+ takes precedence. Note that this field cannot be set when
+ spec.os.name is windows.
+ format: int64
+ type: integer
+ runAsNonRoot:
+ description: Indicates that the container must run as a
+ non-root user. If true, the Kubelet will validate the
+ image at runtime to ensure that it does not run as UID
+ 0 (root) and fail to start the container if it does. If
+ unset or false, no such validation will be performed.
+ May also be set in PodSecurityContext. If set in both
+ SecurityContext and PodSecurityContext, the value specified
+ in SecurityContext takes precedence.
+ type: boolean
+ runAsUser:
+ description: The UID to run the entrypoint of the container
+ process. Defaults to user specified in image metadata
+ if unspecified. May also be set in PodSecurityContext. If
+ set in both SecurityContext and PodSecurityContext, the
+ value specified in SecurityContext takes precedence. Note
+ that this field cannot be set when spec.os.name is windows.
+ format: int64
+ type: integer
+ seLinuxOptions:
+ description: The SELinux context to be applied to the container.
+ If unspecified, the container runtime will allocate a
+ random SELinux context for each container. May also be
+ set in PodSecurityContext. If set in both SecurityContext
+ and PodSecurityContext, the value specified in SecurityContext
+ takes precedence. Note that this field cannot be set when
+ spec.os.name is windows.
+ properties:
+ level:
+ description: Level is SELinux level label that applies
+ to the container.
+ type: string
+ role:
+ description: Role is a SELinux role label that applies
+ to the container.
+ type: string
+ type:
+ description: Type is a SELinux type label that applies
+ to the container.
+ type: string
+ user:
+ description: User is a SELinux user label that applies
+ to the container.
+ type: string
+ type: object
+ seccompProfile:
+ description: The seccomp options to use by this container.
+ If seccomp options are provided at both the pod & container
+ level, the container options override the pod options.
+ Note that this field cannot be set when spec.os.name is
+ windows.
+ properties:
+ localhostProfile:
+ description: localhostProfile indicates a profile defined
+ in a file on the node should be used. The profile
+ must be preconfigured on the node to work. Must be
+ a descending path, relative to the kubelet's configured
+ seccomp profile location. Must be set if type is "Localhost".
+ Must NOT be set for any other type.
+ type: string
+ type:
+ description: "type indicates which kind of seccomp profile
+ will be applied. Valid options are: \n Localhost -
+ a profile defined in a file on the node should be
+ used. RuntimeDefault - the container runtime default
+ profile should be used. Unconfined - no profile should
+ be applied."
+ type: string
+ required:
+ - type
+ type: object
+ windowsOptions:
+ description: The Windows specific settings applied to all
+ containers. If unspecified, the options from the PodSecurityContext
+ will be used. If set in both SecurityContext and PodSecurityContext,
+ the value specified in SecurityContext takes precedence.
+ Note that this field cannot be set when spec.os.name is
+ linux.
+ properties:
+ gmsaCredentialSpec:
+ description: GMSACredentialSpec is where the GMSA admission
+ webhook (https://github.com/kubernetes-sigs/windows-gmsa)
+ inlines the contents of the GMSA credential spec named
+ by the GMSACredentialSpecName field.
+ type: string
+ gmsaCredentialSpecName:
+ description: GMSACredentialSpecName is the name of the
+ GMSA credential spec to use.
+ type: string
+ hostProcess:
+ description: HostProcess determines if a container should
+ be run as a 'Host Process' container. All of a Pod's
+ containers must have the same effective HostProcess
+ value (it is not allowed to have a mix of HostProcess
+ containers and non-HostProcess containers). In addition,
+ if HostProcess is true then HostNetwork must also
+ be set to true.
+ type: boolean
+ runAsUserName:
+ description: The UserName in Windows to run the entrypoint
+ of the container process. Defaults to the user specified
+ in image metadata if unspecified. May also be set
+ in PodSecurityContext. If set in both SecurityContext
+ and PodSecurityContext, the value specified in SecurityContext
+ takes precedence.
+ type: string
+ type: object
+ type: object
+ startupProbe:
+ description: 'StartupProbe indicates that the Pod has successfully
+ initialized. If specified, no other probes are executed until
+ this completes successfully. If this probe fails, the Pod
+ will be restarted, just as if the livenessProbe failed. This
+ can be used to provide different probe parameters at the beginning
+ of a Pod''s lifecycle, when it might take a long time to load
+ data or warm a cache, than during steady-state operation.
+ This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ properties:
+ exec:
+ description: Exec specifies the action to take.
+ properties:
+ command:
+ description: Command is the command line to execute
+ inside the container, the working directory for the
+ command is root ('/') in the container's filesystem.
+ The command is simply exec'd, it is not run inside
+ a shell, so traditional shell instructions ('|', etc)
+ won't work. To use a shell, you need to explicitly
+ call out to that shell. Exit status of 0 is treated
+ as live/healthy and non-zero is unhealthy.
+ items:
+ type: string
+ type: array
+ type: object
+ failureThreshold:
+ description: Minimum consecutive failures for the probe
+ to be considered failed after having succeeded. Defaults
+ to 3. Minimum value is 1.
+ format: int32
+ type: integer
+ grpc:
+ description: GRPC specifies an action involving a GRPC port.
+ properties:
+ port:
+ description: Port number of the gRPC service. Number
+ must be in the range 1 to 65535.
+ format: int32
+ type: integer
+ service:
+ description: "Service is the name of the service to
+ place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
+ \n If this is not specified, the default behavior
+ is defined by gRPC."
+ type: string
+ required:
+ - port
+ type: object
+ httpGet:
+ description: HTTPGet specifies the http request to perform.
+ properties:
+ host:
+ description: Host name to connect to, defaults to the
+ pod IP. You probably want to set "Host" in httpHeaders
+ instead.
+ type: string
+ httpHeaders:
+ description: Custom headers to set in the request. HTTP
+ allows repeated headers.
+ items:
+ description: HTTPHeader describes a custom header
+ to be used in HTTP probes
+ properties:
+ name:
+ description: The header field name. This will
+ be canonicalized upon output, so case-variant
+ names will be understood as the same header.
+ type: string
+ value:
+ description: The header field value
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ path:
+ description: Path to access on the HTTP server.
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Name or number of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ scheme:
+ description: Scheme to use for connecting to the host.
+ Defaults to HTTP.
+ type: string
+ required:
+ - port
+ type: object
+ initialDelaySeconds:
+ description: 'Number of seconds after the container has
+ started before liveness probes are initiated. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ periodSeconds:
+ description: How often (in seconds) to perform the probe.
+ Default to 10 seconds. Minimum value is 1.
+ format: int32
+ type: integer
+ successThreshold:
+ description: Minimum consecutive successes for the probe
+ to be considered successful after having failed. Defaults
+ to 1. Must be 1 for liveness and startup. Minimum value
+ is 1.
+ format: int32
+ type: integer
+ tcpSocket:
+ description: TCPSocket specifies an action involving a TCP
+ port.
+ properties:
+ host:
+ description: 'Optional: Host name to connect to, defaults
+ to the pod IP.'
+ type: string
+ port:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Number or name of the port to access on
+ the container. Number must be in the range 1 to 65535.
+ Name must be an IANA_SVC_NAME.
+ x-kubernetes-int-or-string: true
+ required:
+ - port
+ type: object
+ terminationGracePeriodSeconds:
+ description: Optional duration in seconds the pod needs
+ to terminate gracefully upon probe failure. The grace
+ period is the duration in seconds after the processes
+ running in the pod are sent a termination signal and the
+ time when the processes are forcibly halted with a kill
+ signal. Set this value longer than the expected cleanup
+ time for your process. If this value is nil, the pod's
+ terminationGracePeriodSeconds will be used. Otherwise,
+ this value overrides the value provided by the pod spec.
+ Value must be non-negative integer. The value zero indicates
+ stop immediately via the kill signal (no opportunity to
+ shut down). This is a beta field and requires enabling
+ ProbeTerminationGracePeriod feature gate. Minimum value
+ is 1. spec.terminationGracePeriodSeconds is used if unset.
+ format: int64
+ type: integer
+ timeoutSeconds:
+ description: 'Number of seconds after which the probe times
+ out. Defaults to 1 second. Minimum value is 1. More info:
+ https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
+ format: int32
+ type: integer
+ type: object
+ stdin:
+ description: Whether this container should allocate a buffer
+ for stdin in the container runtime. If this is not set, reads
+ from stdin in the container will always result in EOF. Default
+ is false.
+ type: boolean
+ stdinOnce:
+ description: Whether the container runtime should close the
+ stdin channel after it has been opened by a single attach.
+ When stdin is true the stdin stream will remain open across
+ multiple attach sessions. If stdinOnce is set to true, stdin
+ is opened on container start, is empty until the first client
+ attaches to stdin, and then remains open and accepts data
+ until the client disconnects, at which time stdin is closed
+ and remains closed until the container is restarted. If this
+ flag is false, a container processes that reads from stdin
+ will never receive an EOF. Default is false
+ type: boolean
+ terminationMessagePath:
+ description: 'Optional: Path at which the file to which the
+ container''s termination message will be written is mounted
+ into the container''s filesystem. Message written is intended
+ to be brief final status, such as an assertion failure message.
+ Will be truncated by the node if greater than 4096 bytes.
+ The total message length across all containers will be limited
+ to 12kb. Defaults to /dev/termination-log. Cannot be updated.'
+ type: string
+ terminationMessagePolicy:
+ description: Indicate how the termination message should be
+ populated. File will use the contents of terminationMessagePath
+ to populate the container status message on both success and
+ failure. FallbackToLogsOnError will use the last chunk of
+ container log output if the termination message file is empty
+ and the container exited with an error. The log output is
+ limited to 2048 bytes or 80 lines, whichever is smaller. Defaults
+ to File. Cannot be updated.
+ type: string
+ tty:
+ description: Whether this container should allocate a TTY for
+ itself, also requires 'stdin' to be true. Default is false.
+ type: boolean
+ volumeDevices:
+ description: volumeDevices is the list of block devices to be
+ used by the container.
+ items:
+ description: volumeDevice describes a mapping of a raw block
+ device within a container.
+ properties:
+ devicePath:
+ description: devicePath is the path inside of the container
+ that the device will be mapped to.
+ type: string
+ name:
+ description: name must match the name of a persistentVolumeClaim
+ in the pod
+ type: string
+ required:
+ - devicePath
+ - name
+ type: object
+ type: array
+ volumeMounts:
+ description: Pod volumes to mount into the container's filesystem.
+ Cannot be updated.
+ items:
+ description: VolumeMount describes a mounting of a Volume
+ within a container.
+ properties:
+ mountPath:
+ description: Path within the container at which the volume
+ should be mounted. Must not contain ':'.
+ type: string
+ mountPropagation:
+ description: mountPropagation determines how mounts are
+ propagated from the host to container and the other
+ way around. When not set, MountPropagationNone is used.
+ This field is beta in 1.10.
+ type: string
+ name:
+ description: This must match the Name of a Volume.
+ type: string
+ readOnly:
+ description: Mounted read-only if true, read-write otherwise
+ (false or unspecified). Defaults to false.
+ type: boolean
+ subPath:
+ description: Path within the volume from which the container's
+ volume should be mounted. Defaults to "" (volume's root).
+ type: string
+ subPathExpr:
+ description: Expanded path within the volume from which
+ the container's volume should be mounted. Behaves similarly
+ to SubPath but environment variable references $(VAR_NAME)
+ are expanded using the container's environment. Defaults
+ to "" (volume's root). SubPathExpr and SubPath are mutually
+ exclusive.
+ type: string
+ required:
+ - mountPath
+ - name
+ type: object
+ type: array
+ workingDir:
+ description: Container's working directory. If not specified,
+ the container runtime's default will be used, which might
+ be configured in the container image. Cannot be updated.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ labels:
+ additionalProperties:
+ type: string
+ description: 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.
+ type: object
+ listenLocal:
+ description: ListenLocal makes the Thanos ruler listen on loopback,
+ so that it does not bind against the Pod IP.
+ type: boolean
+ logFormat:
+ description: Log format for ThanosRuler to be configured with.
+ enum:
+ - ""
+ - logfmt
+ - json
+ type: string
+ logLevel:
+ description: Log level for ThanosRuler to be configured with.
+ enum:
+ - ""
+ - debug
+ - info
+ - warn
+ - error
+ type: string
+ minReadySeconds:
+ description: 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) This is an alpha field from kubernetes 1.22
+ until 1.24 which requires enabling the StatefulSetMinReadySeconds
+ feature gate.
+ format: int32
+ type: integer
+ nodeSelector:
+ additionalProperties:
+ type: string
+ description: Define which Nodes the Pods are scheduled on.
+ type: object
+ objectStorageConfig:
+ description: ObjectStorageConfig configures object storage in Thanos.
+ Alternative to ObjectStorageConfigFile, and lower order priority.
+ properties:
+ key:
+ description: The key of the secret to select from. Must be a
+ valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ objectStorageConfigFile:
+ description: ObjectStorageConfigFile specifies the path of the object
+ storage configuration file. When used alongside with ObjectStorageConfig,
+ ObjectStorageConfigFile takes precedence.
+ type: string
+ paused:
+ description: When a ThanosRuler deployment is paused, no actions except
+ for deletion will be performed on the underlying objects.
+ type: boolean
+ podMetadata:
+ description: PodMetadata contains Labels and Annotations gets propagated
+ to the thanos ruler pods.
+ properties:
+ annotations:
+ additionalProperties:
+ type: string
+ description: 'Annotations is an unstructured key value map stored
+ with a resource that may be set by external tools to store and
+ retrieve arbitrary metadata. They are not queryable and should
+ be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations'
+ type: object
+ labels:
+ additionalProperties:
+ type: string
+ description: 'Map of string keys and values that can be used to
+ organize and categorize (scope and select) objects. May match
+ selectors of replication controllers and services. More info:
+ http://kubernetes.io/docs/user-guide/labels'
+ type: object
+ name:
+ description: 'Name must be unique within a namespace. Is required
+ when creating resources, although some resources may allow a
+ client to request the generation of an appropriate name automatically.
+ Name is primarily intended for creation idempotence and configuration
+ definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names'
+ type: string
+ type: object
+ portName:
+ default: web
+ description: Port name used for the pods and governing service. Defaults
+ to `web`.
+ type: string
+ priorityClassName:
+ description: Priority class assigned to the Pods
+ type: string
+ prometheusRulesExcludedFromEnforce:
+ description: '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.'
+ items:
+ description: PrometheusRuleExcludeConfig enables users to configure
+ excluded PrometheusRule names and their namespaces to be ignored
+ while enforcing namespace label for alerts and metrics.
+ properties:
+ ruleName:
+ description: Name of the excluded PrometheusRule object.
+ type: string
+ ruleNamespace:
+ description: Namespace of the excluded PrometheusRule object.
+ type: string
+ required:
+ - ruleName
+ - ruleNamespace
+ type: object
+ type: array
+ queryConfig:
+ description: Define configuration for connecting to thanos query instances.
+ If this is defined, the QueryEndpoints field will be ignored. Maps
+ to the `query.config` CLI argument. Only available with thanos v0.11.0
+ and higher.
+ properties:
+ key:
+ description: The key of the secret to select from. Must be a
+ valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ queryEndpoints:
+ description: QueryEndpoints defines Thanos querier endpoints from
+ which to query metrics. Maps to the --query flag of thanos ruler.
+ items:
+ type: string
+ type: array
+ replicas:
+ description: Number of thanos ruler instances to deploy.
+ format: int32
+ type: integer
+ resources:
+ description: Resources defines the resource requirements for single
+ Pods. If not provided, no requests/limits will be set
+ properties:
+ claims:
+ description: "Claims lists the names of resources, defined in
+ spec.resourceClaims, that are used by this container. \n This
+ is an alpha field and requires enabling the DynamicResourceAllocation
+ feature gate. \n This field is immutable. It can only be set
+ for containers."
+ items:
+ description: ResourceClaim references one entry in PodSpec.ResourceClaims.
+ properties:
+ name:
+ description: Name must match the name of one entry in pod.spec.resourceClaims
+ of the Pod where this field is used. It makes that resource
+ available inside a container.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - name
+ x-kubernetes-list-type: map
+ limits:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Limits describes the maximum amount of compute resources
+ allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ requests:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Requests describes the minimum amount of compute
+ resources required. If Requests is omitted for a container,
+ it defaults to Limits if that is explicitly specified, otherwise
+ to an implementation-defined value. Requests cannot exceed Limits.
+ More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ type: object
+ retention:
+ default: 24h
+ description: Time duration ThanosRuler shall retain data for. Default
+ is '24h', and must match the regular expression `[0-9]+(ms|s|m|h|d|w|y)`
+ (milliseconds seconds minutes hours days weeks years).
+ pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
+ type: string
+ routePrefix:
+ description: The route prefix ThanosRuler registers HTTP handlers
+ for. This allows thanos UI to be served on a sub-path.
+ type: string
+ ruleNamespaceSelector:
+ description: Namespaces to be selected for Rules discovery. If unspecified,
+ only the same namespace as the ThanosRuler object is in is used.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements.
+ The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector that
+ contains values, a key, and an operator that relates the key
+ and values.
+ properties:
+ key:
+ description: key is the label key that the selector applies
+ to.
+ type: string
+ operator:
+ description: operator represents a key's relationship to
+ a set of values. Valid operators are In, NotIn, Exists
+ and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values. If the
+ operator is In or NotIn, the values array must be non-empty.
+ If the operator is Exists or DoesNotExist, the values
+ array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs. A single
+ {key,value} in the matchLabels map is equivalent to an element
+ of matchExpressions, whose key field is "key", the operator
+ is "In", and the values array contains only "value". The requirements
+ are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ ruleSelector:
+ description: A label selector to select which PrometheusRules to mount
+ for alerting and recording.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector requirements.
+ The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector that
+ contains values, a key, and an operator that relates the key
+ and values.
+ properties:
+ key:
+ description: key is the label key that the selector applies
+ to.
+ type: string
+ operator:
+ description: operator represents a key's relationship to
+ a set of values. Valid operators are In, NotIn, Exists
+ and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values. If the
+ operator is In or NotIn, the values array must be non-empty.
+ If the operator is Exists or DoesNotExist, the values
+ array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs. A single
+ {key,value} in the matchLabels map is equivalent to an element
+ of matchExpressions, whose key field is "key", the operator
+ is "In", and the values array contains only "value". The requirements
+ are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ securityContext:
+ description: SecurityContext holds pod-level security attributes and
+ common container settings. This defaults to the default PodSecurityContext.
+ properties:
+ fsGroup:
+ description: "A special supplemental group that applies to all
+ containers in a pod. Some volume types allow the Kubelet to
+ change the ownership of that volume to be owned by the pod:
+ \n 1. The owning GID will be the FSGroup 2. The setgid bit is
+ set (new files created in the volume will be owned by FSGroup)
+ 3. The permission bits are OR'd with rw-rw---- \n If unset,
+ the Kubelet will not modify the ownership and permissions of
+ any volume. Note that this field cannot be set when spec.os.name
+ is windows."
+ format: int64
+ type: integer
+ fsGroupChangePolicy:
+ description: 'fsGroupChangePolicy defines behavior of changing
+ ownership and permission of the volume before being exposed
+ inside Pod. This field will only apply to volume types which
+ support fsGroup based ownership(and permissions). It will have
+ no effect on ephemeral volume types such as: secret, configmaps
+ and emptydir. Valid values are "OnRootMismatch" and "Always".
+ If not specified, "Always" is used. Note that this field cannot
+ be set when spec.os.name is windows.'
+ type: string
+ runAsGroup:
+ description: The GID to run the entrypoint of the container process.
+ Uses runtime default if unset. May also be set in SecurityContext. If
+ set in both SecurityContext and PodSecurityContext, the value
+ specified in SecurityContext takes precedence for that container.
+ Note that this field cannot be set when spec.os.name is windows.
+ format: int64
+ type: integer
+ runAsNonRoot:
+ description: Indicates that the container must run as a non-root
+ user. If true, the Kubelet will validate the image at runtime
+ to ensure that it does not run as UID 0 (root) and fail to start
+ the container if it does. If unset or false, no such validation
+ will be performed. May also be set in SecurityContext. If set
+ in both SecurityContext and PodSecurityContext, the value specified
+ in SecurityContext takes precedence.
+ type: boolean
+ runAsUser:
+ description: The UID to run the entrypoint of the container process.
+ Defaults to user specified in image metadata if unspecified.
+ May also be set in SecurityContext. If set in both SecurityContext
+ and PodSecurityContext, the value specified in SecurityContext
+ takes precedence for that container. Note that this field cannot
+ be set when spec.os.name is windows.
+ format: int64
+ type: integer
+ seLinuxOptions:
+ description: The SELinux context to be applied to all containers.
+ If unspecified, the container runtime will allocate a random
+ SELinux context for each container. May also be set in SecurityContext. If
+ set in both SecurityContext and PodSecurityContext, the value
+ specified in SecurityContext takes precedence for that container.
+ Note that this field cannot be set when spec.os.name is windows.
+ properties:
+ level:
+ description: Level is SELinux level label that applies to
+ the container.
+ type: string
+ role:
+ description: Role is a SELinux role label that applies to
+ the container.
+ type: string
+ type:
+ description: Type is a SELinux type label that applies to
+ the container.
+ type: string
+ user:
+ description: User is a SELinux user label that applies to
+ the container.
+ type: string
+ type: object
+ seccompProfile:
+ description: The seccomp options to use by the containers in this
+ pod. Note that this field cannot be set when spec.os.name is
+ windows.
+ properties:
+ localhostProfile:
+ description: localhostProfile indicates a profile defined
+ in a file on the node should be used. The profile must be
+ preconfigured on the node to work. Must be a descending
+ path, relative to the kubelet's configured seccomp profile
+ location. Must be set if type is "Localhost". Must NOT be
+ set for any other type.
+ type: string
+ type:
+ description: "type indicates which kind of seccomp profile
+ will be applied. Valid options are: \n Localhost - a profile
+ defined in a file on the node should be used. RuntimeDefault
+ - the container runtime default profile should be used.
+ Unconfined - no profile should be applied."
+ type: string
+ required:
+ - type
+ type: object
+ supplementalGroups:
+ description: A list of groups applied to the first process run
+ in each container, in addition to the container's primary GID,
+ the fsGroup (if specified), and group memberships defined in
+ the container image for the uid of the container process. If
+ unspecified, no additional groups are added to any container.
+ Note that group memberships defined in the container image for
+ the uid of the container process are still effective, even if
+ they are not included in this list. Note that this field cannot
+ be set when spec.os.name is windows.
+ items:
+ format: int64
+ type: integer
+ type: array
+ sysctls:
+ description: Sysctls hold a list of namespaced sysctls used for
+ the pod. Pods with unsupported sysctls (by the container runtime)
+ might fail to launch. Note that this field cannot be set when
+ spec.os.name is windows.
+ items:
+ description: Sysctl defines a kernel parameter to be set
+ properties:
+ name:
+ description: Name of a property to set
+ type: string
+ value:
+ description: Value of a property to set
+ type: string
+ required:
+ - name
+ - value
+ type: object
+ type: array
+ windowsOptions:
+ description: The Windows specific settings applied to all containers.
+ If unspecified, the options within a container's SecurityContext
+ will be used. If set in both SecurityContext and PodSecurityContext,
+ the value specified in SecurityContext takes precedence. Note
+ that this field cannot be set when spec.os.name is linux.
+ properties:
+ gmsaCredentialSpec:
+ description: GMSACredentialSpec is where the GMSA admission
+ webhook (https://github.com/kubernetes-sigs/windows-gmsa)
+ inlines the contents of the GMSA credential spec named by
+ the GMSACredentialSpecName field.
+ type: string
+ gmsaCredentialSpecName:
+ description: GMSACredentialSpecName is the name of the GMSA
+ credential spec to use.
+ type: string
+ hostProcess:
+ description: HostProcess determines if a container should
+ be run as a 'Host Process' container. All of a Pod's containers
+ must have the same effective HostProcess value (it is not
+ allowed to have a mix of HostProcess containers and non-HostProcess
+ containers). In addition, if HostProcess is true then HostNetwork
+ must also be set to true.
+ type: boolean
+ runAsUserName:
+ description: The UserName in Windows to run the entrypoint
+ of the container process. Defaults to the user specified
+ in image metadata if unspecified. May also be set in PodSecurityContext.
+ If set in both SecurityContext and PodSecurityContext, the
+ value specified in SecurityContext takes precedence.
+ type: string
+ type: object
+ type: object
+ serviceAccountName:
+ description: ServiceAccountName is the name of the ServiceAccount
+ to use to run the Thanos Ruler Pods.
+ type: string
+ storage:
+ description: Storage spec to specify how storage shall be used.
+ properties:
+ disableMountSubPath:
+ description: '*Deprecated: subPath usage will be removed in a
+ future release.*'
+ type: boolean
+ emptyDir:
+ description: 'EmptyDirVolumeSource to be used by the StatefulSet.
+ If specified, it takes precedence over `ephemeral` and `volumeClaimTemplate`.
+ More info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir'
+ properties:
+ medium:
+ description: 'medium represents what type of storage medium
+ should back this directory. The default is "" which means
+ to use the node''s default medium. Must be an empty string
+ (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir'
+ type: string
+ sizeLimit:
+ anyOf:
+ - type: integer
+ - type: string
+ description: 'sizeLimit is the total amount of local storage
+ required for this EmptyDir volume. The size limit is also
+ applicable for memory medium. 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. The default is nil which means that the limit
+ is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir'
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ type: object
+ ephemeral:
+ description: 'EphemeralVolumeSource to be used by the StatefulSet.
+ This is a beta field in k8s 1.21 and GA in 1.15. For lower versions,
+ starting with k8s 1.19, it requires enabling the GenericEphemeralVolume
+ feature gate. More info: https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes'
+ properties:
+ volumeClaimTemplate:
+ description: "Will be used to create a stand-alone PVC to
+ provision the volume. The pod in which this EphemeralVolumeSource
+ is embedded will be the owner of the PVC, i.e. the PVC will
+ be deleted together with the pod. The name of the PVC will
+ be `-` where `` is the
+ name from the `PodSpec.Volumes` array entry. Pod validation
+ will reject the pod if the concatenated name is not valid
+ for a PVC (for example, too long). \n An existing PVC with
+ that name that is not owned by the pod will *not* be used
+ for the pod to avoid using an unrelated volume by mistake.
+ Starting the pod is then blocked until the unrelated PVC
+ is removed. If such a pre-created PVC is meant to be used
+ by the pod, the PVC has to updated with an owner reference
+ to the pod once the pod exists. Normally this should not
+ be necessary, but it may be useful when manually reconstructing
+ a broken cluster. \n This field is read-only and no changes
+ will be made by Kubernetes to the PVC after it has been
+ created. \n Required, must not be nil."
+ properties:
+ metadata:
+ description: May contain labels and annotations that will
+ be copied into the PVC when creating it. No other fields
+ are allowed and will be rejected during validation.
+ type: object
+ spec:
+ description: The specification for the PersistentVolumeClaim.
+ The entire content is copied unchanged into the PVC
+ that gets created from this template. The same fields
+ as in a PersistentVolumeClaim are also valid here.
+ properties:
+ accessModes:
+ description: 'accessModes contains the desired access
+ modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1'
+ items:
+ type: string
+ type: array
+ dataSource:
+ description: 'dataSource field can be used to specify
+ either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot)
+ * An existing PVC (PersistentVolumeClaim) If the
+ provisioner or an external controller can support
+ the specified data source, it will create a new
+ volume based on the contents of the specified data
+ source. When the AnyVolumeDataSource feature gate
+ is enabled, dataSource contents will be copied to
+ dataSourceRef, and dataSourceRef contents will be
+ copied to dataSource when dataSourceRef.namespace
+ is not specified. If the namespace is specified,
+ then dataSourceRef will not be copied to dataSource.'
+ properties:
+ apiGroup:
+ description: APIGroup is the group for the resource
+ being referenced. If APIGroup is not specified,
+ the specified Kind must be in the core API group.
+ For any other third-party types, APIGroup is
+ required.
+ type: string
+ kind:
+ description: Kind is the type of resource being
+ referenced
+ type: string
+ name:
+ description: Name is the name of resource being
+ referenced
+ type: string
+ required:
+ - kind
+ - name
+ type: object
+ x-kubernetes-map-type: atomic
+ dataSourceRef:
+ description: 'dataSourceRef specifies the object from
+ which to populate the volume with data, if a non-empty
+ volume is desired. This may be any object from a
+ non-empty API group (non core object) or a PersistentVolumeClaim
+ object. When this field is specified, volume binding
+ will only succeed if the type of the specified object
+ matches some installed volume populator or dynamic
+ provisioner. This field will replace the functionality
+ of the dataSource field and as such if both fields
+ are non-empty, they must have the same value. For
+ backwards compatibility, when namespace isn''t specified
+ in dataSourceRef, both fields (dataSource and dataSourceRef)
+ will be set to the same value automatically if one
+ of them is empty and the other is non-empty. When
+ namespace is specified in dataSourceRef, dataSource
+ isn''t set to the same value and must be empty.
+ There are three important differences between dataSource
+ and dataSourceRef: * While dataSource only allows
+ two specific types of objects, dataSourceRef allows
+ any non-core object, as well as PersistentVolumeClaim
+ objects. * While dataSource ignores disallowed values
+ (dropping them), dataSourceRef preserves all values,
+ and generates an error if a disallowed value is
+ specified. * While dataSource only allows local
+ objects, dataSourceRef allows objects in any namespaces.
+ (Beta) Using this field requires the AnyVolumeDataSource
+ feature gate to be enabled. (Alpha) Using the namespace
+ field of dataSourceRef requires the CrossNamespaceVolumeDataSource
+ feature gate to be enabled.'
+ properties:
+ apiGroup:
+ description: APIGroup is the group for the resource
+ being referenced. If APIGroup is not specified,
+ the specified Kind must be in the core API group.
+ For any other third-party types, APIGroup is
+ required.
+ type: string
+ kind:
+ description: Kind is the type of resource being
+ referenced
+ type: string
+ name:
+ description: Name is the name of resource being
+ referenced
+ type: string
+ namespace:
+ description: Namespace is the namespace of resource
+ being referenced Note that when a namespace
+ is specified, a gateway.networking.k8s.io/ReferenceGrant
+ object is required in the referent namespace
+ to allow that namespace's owner to accept the
+ reference. See the ReferenceGrant documentation
+ for details. (Alpha) This field requires the
+ CrossNamespaceVolumeDataSource feature gate
+ to be enabled.
+ type: string
+ required:
+ - kind
+ - name
+ type: object
+ resources:
+ description: 'resources represents the minimum resources
+ the volume should have. If RecoverVolumeExpansionFailure
+ feature is enabled users are allowed to specify
+ resource requirements that are lower than previous
+ value but must still be higher than capacity recorded
+ in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources'
+ properties:
+ claims:
+ description: "Claims lists the names of resources,
+ defined in spec.resourceClaims, that are used
+ by this container. \n This is an alpha field
+ and requires enabling the DynamicResourceAllocation
+ feature gate. \n This field is immutable. It
+ can only be set for containers."
+ items:
+ description: ResourceClaim references one entry
+ in PodSpec.ResourceClaims.
+ properties:
+ name:
+ description: Name must match the name of
+ one entry in pod.spec.resourceClaims of
+ the Pod where this field is used. It makes
+ that resource available inside a container.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - name
+ x-kubernetes-list-type: map
+ limits:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Limits describes the maximum amount
+ of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ requests:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Requests describes the minimum amount
+ of compute resources required. If Requests is
+ omitted for a container, it defaults to Limits
+ if that is explicitly specified, otherwise to
+ an implementation-defined value. Requests cannot
+ exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ type: object
+ selector:
+ description: selector is a label query over volumes
+ to consider for binding.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: A label selector requirement is
+ a selector that contains values, a key, and
+ an operator that relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the
+ selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's
+ relationship to a set of values. Valid
+ operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty. If
+ the operator is Exists or DoesNotExist,
+ the values array must be empty. This array
+ is replaced during a strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is "In",
+ and the values array contains only "value".
+ The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ storageClassName:
+ description: 'storageClassName is the name of the
+ StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1'
+ type: string
+ volumeMode:
+ description: volumeMode defines what type of volume
+ is required by the claim. Value of Filesystem is
+ implied when not included in claim spec.
+ type: string
+ volumeName:
+ description: volumeName is the binding reference to
+ the PersistentVolume backing this claim.
+ type: string
+ type: object
+ required:
+ - spec
+ type: object
+ type: object
+ volumeClaimTemplate:
+ description: Defines the PVC spec to be used by the Prometheus
+ StatefulSets. The easiest way to use a volume that cannot be
+ automatically provisioned is to use a label selector alongside
+ manually created PersistentVolumes.
+ properties:
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this
+ representation of an object. Servers should convert recognized
+ schemas to the latest internal value, and may reject unrecognized
+ values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST
+ resource this object represents. Servers may infer this
+ from the endpoint the client submits requests to. Cannot
+ be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ description: EmbeddedMetadata contains metadata relevant to
+ an EmbeddedResource.
+ properties:
+ annotations:
+ additionalProperties:
+ type: string
+ description: 'Annotations is an unstructured key value
+ map stored with a resource that may be set by external
+ tools to store and retrieve arbitrary metadata. They
+ are not queryable and should be preserved when modifying
+ objects. More info: http://kubernetes.io/docs/user-guide/annotations'
+ type: object
+ labels:
+ additionalProperties:
+ type: string
+ description: 'Map of string keys and values that can be
+ used to organize and categorize (scope and select) objects.
+ May match selectors of replication controllers and services.
+ More info: http://kubernetes.io/docs/user-guide/labels'
+ type: object
+ name:
+ description: 'Name must be unique within a namespace.
+ Is required when creating resources, although some resources
+ may allow a client to request the generation of an appropriate
+ name automatically. Name is primarily intended for creation
+ idempotence and configuration definition. Cannot be
+ updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names'
+ type: string
+ type: object
+ spec:
+ description: 'Defines the desired characteristics of a volume
+ requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
+ properties:
+ accessModes:
+ description: 'accessModes contains the desired access
+ modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1'
+ items:
+ type: string
+ type: array
+ dataSource:
+ description: 'dataSource field can be used to specify
+ either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot)
+ * An existing PVC (PersistentVolumeClaim) If the provisioner
+ or an external controller can support the specified
+ data source, it will create a new volume based on the
+ contents of the specified data source. When the AnyVolumeDataSource
+ feature gate is enabled, dataSource contents will be
+ copied to dataSourceRef, and dataSourceRef contents
+ will be copied to dataSource when dataSourceRef.namespace
+ is not specified. If the namespace is specified, then
+ dataSourceRef will not be copied to dataSource.'
+ properties:
+ apiGroup:
+ description: APIGroup is the group for the resource
+ being referenced. If APIGroup is not specified,
+ the specified Kind must be in the core API group.
+ For any other third-party types, APIGroup is required.
+ type: string
+ kind:
+ description: Kind is the type of resource being referenced
+ type: string
+ name:
+ description: Name is the name of resource being referenced
+ type: string
+ required:
+ - kind
+ - name
+ type: object
+ x-kubernetes-map-type: atomic
+ dataSourceRef:
+ description: 'dataSourceRef specifies the object from
+ which to populate the volume with data, if a non-empty
+ volume is desired. This may be any object from a non-empty
+ API group (non core object) or a PersistentVolumeClaim
+ object. When this field is specified, volume binding
+ will only succeed if the type of the specified object
+ matches some installed volume populator or dynamic provisioner.
+ This field will replace the functionality of the dataSource
+ field and as such if both fields are non-empty, they
+ must have the same value. For backwards compatibility,
+ when namespace isn''t specified in dataSourceRef, both
+ fields (dataSource and dataSourceRef) will be set to
+ the same value automatically if one of them is empty
+ and the other is non-empty. When namespace is specified
+ in dataSourceRef, dataSource isn''t set to the same
+ value and must be empty. There are three important differences
+ between dataSource and dataSourceRef: * While dataSource
+ only allows two specific types of objects, dataSourceRef
+ allows any non-core object, as well as PersistentVolumeClaim
+ objects. * While dataSource ignores disallowed values
+ (dropping them), dataSourceRef preserves all values,
+ and generates an error if a disallowed value is specified.
+ * While dataSource only allows local objects, dataSourceRef
+ allows objects in any namespaces. (Beta) Using this
+ field requires the AnyVolumeDataSource feature gate
+ to be enabled. (Alpha) Using the namespace field of
+ dataSourceRef requires the CrossNamespaceVolumeDataSource
+ feature gate to be enabled.'
+ properties:
+ apiGroup:
+ description: APIGroup is the group for the resource
+ being referenced. If APIGroup is not specified,
+ the specified Kind must be in the core API group.
+ For any other third-party types, APIGroup is required.
+ type: string
+ kind:
+ description: Kind is the type of resource being referenced
+ type: string
+ name:
+ description: Name is the name of resource being referenced
+ type: string
+ namespace:
+ description: Namespace is the namespace of resource
+ being referenced Note that when a namespace is specified,
+ a gateway.networking.k8s.io/ReferenceGrant object
+ is required in the referent namespace to allow that
+ namespace's owner to accept the reference. See the
+ ReferenceGrant documentation for details. (Alpha)
+ This field requires the CrossNamespaceVolumeDataSource
+ feature gate to be enabled.
+ type: string
+ required:
+ - kind
+ - name
+ type: object
+ resources:
+ description: 'resources represents the minimum resources
+ the volume should have. If RecoverVolumeExpansionFailure
+ feature is enabled users are allowed to specify resource
+ requirements that are lower than previous value but
+ must still be higher than capacity recorded in the status
+ field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources'
+ properties:
+ claims:
+ description: "Claims lists the names of resources,
+ defined in spec.resourceClaims, that are used by
+ this container. \n This is an alpha field and requires
+ enabling the DynamicResourceAllocation feature gate.
+ \n This field is immutable. It can only be set for
+ containers."
+ items:
+ description: ResourceClaim references one entry
+ in PodSpec.ResourceClaims.
+ properties:
+ name:
+ description: Name must match the name of one
+ entry in pod.spec.resourceClaims of the Pod
+ where this field is used. It makes that resource
+ available inside a container.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - name
+ x-kubernetes-list-type: map
+ limits:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Limits describes the maximum amount
+ of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ requests:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Requests describes the minimum amount
+ of compute resources required. If Requests is omitted
+ for a container, it defaults to Limits if that is
+ explicitly specified, otherwise to an implementation-defined
+ value. Requests cannot exceed Limits. More info:
+ https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ type: object
+ selector:
+ description: selector is a label query over volumes to
+ consider for binding.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector
+ requirements. The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector
+ that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that the selector
+ applies to.
+ type: string
+ operator:
+ description: operator represents a key's relationship
+ to a set of values. Valid operators are In,
+ NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values.
+ If the operator is In or NotIn, the values
+ array must be non-empty. If the operator is
+ Exists or DoesNotExist, the values array must
+ be empty. This array is replaced during a
+ strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs.
+ A single {key,value} in the matchLabels map is equivalent
+ to an element of matchExpressions, whose key field
+ is "key", the operator is "In", and the values array
+ contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ storageClassName:
+ description: 'storageClassName is the name of the StorageClass
+ required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1'
+ type: string
+ volumeMode:
+ description: volumeMode defines what type of volume is
+ required by the claim. Value of Filesystem is implied
+ when not included in claim spec.
+ type: string
+ volumeName:
+ description: volumeName is the binding reference to the
+ PersistentVolume backing this claim.
+ type: string
+ type: object
+ status:
+ description: '*Deprecated: this field is never set.*'
+ properties:
+ accessModes:
+ description: 'accessModes contains the actual access modes
+ the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1'
+ items:
+ type: string
+ type: array
+ allocatedResourceStatuses:
+ additionalProperties:
+ description: When a controller receives persistentvolume
+ claim update with ClaimResourceStatus for a resource
+ that it does not recognizes, then it should ignore
+ that update and let other controllers handle it.
+ type: string
+ description: "allocatedResourceStatuses stores status
+ of resource being resized for the given PVC. Key names
+ follow standard Kubernetes label syntax. Valid values
+ are either: * Un-prefixed keys: - storage - the capacity
+ of the volume. * Custom resources must use implementation-defined
+ prefixed names such as \"example.com/my-custom-resource\"
+ Apart from above values - keys that are unprefixed or
+ have kubernetes.io prefix are considered reserved and
+ hence may not be used. \n ClaimResourceStatus can be
+ in any of following states: - ControllerResizeInProgress:
+ State set when resize controller starts resizing the
+ volume in control-plane. - ControllerResizeFailed: State
+ set when resize has failed in resize controller with
+ a terminal error. - NodeResizePending: State set when
+ resize controller has finished resizing the volume but
+ further resizing of volume is needed on the node. -
+ NodeResizeInProgress: State set when kubelet starts
+ resizing the volume. - NodeResizeFailed: State set when
+ resizing has failed in kubelet with a terminal error.
+ Transient errors don't set NodeResizeFailed. For example:
+ if expanding a PVC for more capacity - this field can
+ be one of the following states: - pvc.status.allocatedResourceStatus['storage']
+ = \"ControllerResizeInProgress\" - pvc.status.allocatedResourceStatus['storage']
+ = \"ControllerResizeFailed\" - pvc.status.allocatedResourceStatus['storage']
+ = \"NodeResizePending\" - pvc.status.allocatedResourceStatus['storage']
+ = \"NodeResizeInProgress\" - pvc.status.allocatedResourceStatus['storage']
+ = \"NodeResizeFailed\" When this field is not set, it
+ means that no resize operation is in progress for the
+ given PVC. \n A controller that receives PVC update
+ with previously unknown resourceName or ClaimResourceStatus
+ should ignore the update for the purpose it was designed.
+ For example - a controller that only is responsible
+ for resizing capacity of the volume, should ignore PVC
+ updates that change other valid resources associated
+ with PVC. \n This is an alpha field and requires enabling
+ RecoverVolumeExpansionFailure feature."
+ type: object
+ x-kubernetes-map-type: granular
+ allocatedResources:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: "allocatedResources tracks the resources
+ allocated to a PVC including its capacity. Key names
+ follow standard Kubernetes label syntax. Valid values
+ are either: * Un-prefixed keys: - storage - the capacity
+ of the volume. * Custom resources must use implementation-defined
+ prefixed names such as \"example.com/my-custom-resource\"
+ Apart from above values - keys that are unprefixed or
+ have kubernetes.io prefix are considered reserved and
+ hence may not be used. \n Capacity reported here may
+ be larger than the actual capacity when a volume expansion
+ operation is requested. For storage quota, the larger
+ value from allocatedResources and PVC.spec.resources
+ is used. If allocatedResources is not set, PVC.spec.resources
+ alone is used for quota calculation. If a volume expansion
+ capacity request is lowered, allocatedResources is only
+ lowered if there are no expansion operations in progress
+ and if the actual volume capacity is equal or lower
+ than the requested capacity. \n A controller that receives
+ PVC update with previously unknown resourceName should
+ ignore the update for the purpose it was designed. For
+ example - a controller that only is responsible for
+ resizing capacity of the volume, should ignore PVC updates
+ that change other valid resources associated with PVC.
+ \n This is an alpha field and requires enabling RecoverVolumeExpansionFailure
+ feature."
+ type: object
+ capacity:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: capacity represents the actual resources
+ of the underlying volume.
+ type: object
+ conditions:
+ description: conditions is the current Condition of persistent
+ volume claim. If underlying persistent volume is being
+ resized then the Condition will be set to 'ResizeStarted'.
+ items:
+ description: PersistentVolumeClaimCondition contains
+ details about state of pvc
+ properties:
+ lastProbeTime:
+ description: lastProbeTime is the time we probed
+ the condition.
+ format: date-time
+ type: string
+ lastTransitionTime:
+ description: lastTransitionTime is the time the
+ condition transitioned from one status to another.
+ format: date-time
+ type: string
+ message:
+ description: message is the human-readable message
+ indicating details about last transition.
+ type: string
+ reason:
+ description: reason is a unique, this should be
+ a short, machine understandable string that gives
+ the reason for condition's last transition. If
+ it reports "ResizeStarted" that means the underlying
+ persistent volume is being resized.
+ type: string
+ status:
+ type: string
+ type:
+ description: PersistentVolumeClaimConditionType
+ is a valid value of PersistentVolumeClaimCondition.Type
+ type: string
+ required:
+ - status
+ - type
+ type: object
+ type: array
+ phase:
+ description: phase represents the current phase of PersistentVolumeClaim.
+ type: string
+ type: object
+ type: object
+ type: object
+ tolerations:
+ description: If specified, the pod's tolerations.
+ items:
+ description: The pod this Toleration is attached to tolerates any
+ taint that matches the triple using the matching
+ operator .
+ properties:
+ effect:
+ description: Effect indicates the taint effect to match. Empty
+ means match all taint effects. When specified, allowed values
+ are NoSchedule, PreferNoSchedule and NoExecute.
+ type: string
+ key:
+ description: Key is the taint key that the toleration applies
+ to. Empty means match all taint keys. If the key is empty,
+ operator must be Exists; this combination means to match all
+ values and all keys.
+ type: string
+ operator:
+ description: Operator represents a key's relationship to the
+ value. Valid operators are Exists and Equal. Defaults to Equal.
+ Exists is equivalent to wildcard for value, so that a pod
+ can tolerate all taints of a particular category.
+ type: string
+ tolerationSeconds:
+ description: TolerationSeconds represents the period of time
+ the toleration (which must be of effect NoExecute, otherwise
+ this field is ignored) tolerates the taint. By default, it
+ is not set, which means tolerate the taint forever (do not
+ evict). Zero and negative values will be treated as 0 (evict
+ immediately) by the system.
+ format: int64
+ type: integer
+ value:
+ description: Value is the taint value the toleration matches
+ to. If the operator is Exists, the value should be empty,
+ otherwise just a regular string.
+ type: string
+ type: object
+ type: array
+ topologySpreadConstraints:
+ description: If specified, the pod's topology spread constraints.
+ items:
+ description: TopologySpreadConstraint specifies how to spread matching
+ pods among the given topology.
+ properties:
+ labelSelector:
+ description: LabelSelector is used to find matching pods. Pods
+ that match this label selector are counted to determine the
+ number of pods in their corresponding topology domain.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label selector
+ requirements. The requirements are ANDed.
+ items:
+ description: A label selector requirement is a selector
+ that contains values, a key, and an operator that relates
+ the key and values.
+ properties:
+ key:
+ description: key is the label key that the selector
+ applies to.
+ type: string
+ operator:
+ description: operator represents a key's relationship
+ to a set of values. Valid operators are In, NotIn,
+ Exists and DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string values.
+ If the operator is In or NotIn, the values array
+ must be non-empty. If the operator is Exists or
+ DoesNotExist, the values array must be empty. This
+ array is replaced during a strategic merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value} pairs.
+ A single {key,value} in the matchLabels map is equivalent
+ to an element of matchExpressions, whose key field is
+ "key", the operator is "In", and the values array contains
+ only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ matchLabelKeys:
+ description: "MatchLabelKeys is a set of pod label keys to select
+ the pods over which spreading will be calculated. The keys
+ are used to lookup values from the incoming pod labels, those
+ key-value labels are ANDed with labelSelector to select the
+ group of existing pods over which spreading will be calculated
+ for the incoming pod. The same key is forbidden to exist in
+ both MatchLabelKeys and LabelSelector. MatchLabelKeys cannot
+ be set when LabelSelector isn't set. Keys that don't exist
+ in the incoming pod labels will be ignored. A null or empty
+ list means only match against labelSelector. \n This is a
+ beta field and requires the MatchLabelKeysInPodTopologySpread
+ feature gate to be enabled (enabled by default)."
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ maxSkew:
+ description: 'MaxSkew describes the degree to which pods may
+ be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`,
+ it is the maximum permitted difference between the number
+ of matching pods in the target topology and the global minimum.
+ The global minimum is the minimum number of matching pods
+ in an eligible domain or zero if the number of eligible domains
+ is less than MinDomains. For example, in a 3-zone cluster,
+ MaxSkew is set to 1, and pods with the same labelSelector
+ spread as 2/2/1: In this case, the global minimum is 1. |
+ zone1 | zone2 | zone3 | | P P | P P | P | - if MaxSkew
+ is 1, incoming pod can only be scheduled to zone3 to become
+ 2/2/2; scheduling it onto zone1(zone2) would make the ActualSkew(3-1)
+ on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming
+ pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`,
+ it is used to give higher precedence to topologies that satisfy
+ it. It''s a required field. Default value is 1 and 0 is not
+ allowed.'
+ format: int32
+ type: integer
+ minDomains:
+ description: "MinDomains indicates a minimum number of eligible
+ domains. When the number of eligible domains with matching
+ topology keys is less than minDomains, Pod Topology Spread
+ treats \"global minimum\" as 0, and then the calculation of
+ Skew is performed. And when the number of eligible domains
+ with matching topology keys equals or greater than minDomains,
+ this value has no effect on scheduling. As a result, when
+ the number of eligible domains is less than minDomains, scheduler
+ won't schedule more than maxSkew Pods to those domains. If
+ value is nil, the constraint behaves as if MinDomains is equal
+ to 1. Valid values are integers greater than 0. When value
+ is not nil, WhenUnsatisfiable must be DoNotSchedule. \n For
+ example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains
+ is set to 5 and pods with the same labelSelector spread as
+ 2/2/2: | zone1 | zone2 | zone3 | | P P | P P | P P |
+ The number of domains is less than 5(MinDomains), so \"global
+ minimum\" is treated as 0. In this situation, new pod with
+ the same labelSelector cannot be scheduled, because computed
+ skew will be 3(3 - 0) if new Pod is scheduled to any of the
+ three zones, it will violate MaxSkew. \n This is a beta field
+ and requires the MinDomainsInPodTopologySpread feature gate
+ to be enabled (enabled by default)."
+ format: int32
+ type: integer
+ nodeAffinityPolicy:
+ description: "NodeAffinityPolicy indicates how we will treat
+ Pod's nodeAffinity/nodeSelector when calculating pod topology
+ spread skew. Options are: - Honor: only nodes matching nodeAffinity/nodeSelector
+ are included in the calculations. - Ignore: nodeAffinity/nodeSelector
+ are ignored. All nodes are included in the calculations. \n
+ If this value is nil, the behavior is equivalent to the Honor
+ policy. This is a beta-level feature default enabled by the
+ NodeInclusionPolicyInPodTopologySpread feature flag."
+ type: string
+ nodeTaintsPolicy:
+ description: "NodeTaintsPolicy indicates how we will treat node
+ taints when calculating pod topology spread skew. Options
+ are: - Honor: nodes without taints, along with tainted nodes
+ for which the incoming pod has a toleration, are included.
+ - Ignore: node taints are ignored. All nodes are included.
+ \n If this value is nil, the behavior is equivalent to the
+ Ignore policy. This is a beta-level feature default enabled
+ by the NodeInclusionPolicyInPodTopologySpread feature flag."
+ type: string
+ topologyKey:
+ description: TopologyKey is the key of node labels. Nodes that
+ have a label with this key and identical values are considered
+ to be in the same topology. We consider each
+ as a "bucket", and try to put balanced number of pods into
+ each bucket. We define a domain as a particular instance of
+ a topology. Also, we define an eligible domain as a domain
+ whose nodes meet the requirements of nodeAffinityPolicy and
+ nodeTaintsPolicy. e.g. If TopologyKey is "kubernetes.io/hostname",
+ each Node is a domain of that topology. And, if TopologyKey
+ is "topology.kubernetes.io/zone", each zone is a domain of
+ that topology. It's a required field.
+ type: string
+ whenUnsatisfiable:
+ description: 'WhenUnsatisfiable indicates how to deal with a
+ pod if it doesn''t satisfy the spread constraint. - DoNotSchedule
+ (default) tells the scheduler not to schedule it. - ScheduleAnyway
+ tells the scheduler to schedule the pod in any location, but
+ giving higher precedence to topologies that would help reduce
+ the skew. A constraint is considered "Unsatisfiable" for an
+ incoming pod if and only if every possible node assignment
+ for that pod would violate "MaxSkew" on some topology. For
+ example, in a 3-zone cluster, MaxSkew is set to 1, and pods
+ with the same labelSelector spread as 3/1/1: | zone1 | zone2
+ | zone3 | | P P P | P | P | If WhenUnsatisfiable is
+ set to DoNotSchedule, incoming pod can only be scheduled to
+ zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on
+ zone2(zone3) satisfies MaxSkew(1). In other words, the cluster
+ can still be imbalanced, but scheduler won''t make it *more*
+ imbalanced. It''s a required field.'
+ type: string
+ required:
+ - maxSkew
+ - topologyKey
+ - whenUnsatisfiable
+ type: object
+ type: array
+ tracingConfig:
+ description: TracingConfig configures tracing in Thanos. This is an
+ experimental feature, it may change in any upcoming release in a
+ breaking way.
+ properties:
+ key:
+ description: The key of the secret to select from. Must be a
+ valid secret key.
+ type: string
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: Specify whether the Secret or its key must be defined
+ type: boolean
+ required:
+ - key
+ type: object
+ x-kubernetes-map-type: atomic
+ tracingConfigFile:
+ description: TracingConfig specifies the path of the tracing configuration
+ file. When used alongside with TracingConfig, TracingConfigFile
+ takes precedence.
+ type: string
+ version:
+ description: Version of Thanos to be deployed.
+ type: string
+ volumeMounts:
+ description: VolumeMounts allows configuration of additional VolumeMounts
+ on the output StatefulSet definition. VolumeMounts specified will
+ be appended to other VolumeMounts in the ruler container, that are
+ generated as a result of StorageSpec objects.
+ items:
+ description: VolumeMount describes a mounting of a Volume within
+ a container.
+ properties:
+ mountPath:
+ description: Path within the container at which the volume should
+ be mounted. Must not contain ':'.
+ type: string
+ mountPropagation:
+ description: mountPropagation determines how mounts are propagated
+ from the host to container and the other way around. When
+ not set, MountPropagationNone is used. This field is beta
+ in 1.10.
+ type: string
+ name:
+ description: This must match the Name of a Volume.
+ type: string
+ readOnly:
+ description: Mounted read-only if true, read-write otherwise
+ (false or unspecified). Defaults to false.
+ type: boolean
+ subPath:
+ description: Path within the volume from which the container's
+ volume should be mounted. Defaults to "" (volume's root).
+ type: string
+ subPathExpr:
+ description: Expanded path within the volume from which the
+ container's volume should be mounted. Behaves similarly to
+ SubPath but environment variable references $(VAR_NAME) are
+ expanded using the container's environment. Defaults to ""
+ (volume's root). SubPathExpr and SubPath are mutually exclusive.
+ type: string
+ required:
+ - mountPath
+ - name
+ type: object
+ type: array
+ volumes:
+ description: Volumes allows configuration of additional volumes on
+ the output StatefulSet definition. Volumes specified will be appended
+ to other volumes that are generated as a result of StorageSpec objects.
+ items:
+ description: Volume represents a named volume in a pod that may
+ be accessed by any container in the pod.
+ properties:
+ awsElasticBlockStore:
+ description: 'awsElasticBlockStore represents an AWS Disk resource
+ that is attached to a kubelet''s host machine and then exposed
+ to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore'
+ properties:
+ fsType:
+ description: 'fsType is the filesystem type of the volume
+ that you want to mount. Tip: Ensure that the filesystem
+ type is supported by the host operating system. Examples:
+ "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4"
+ if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
+ TODO: how do we prevent errors in the filesystem from
+ compromising the machine'
+ type: string
+ partition:
+ description: 'partition is the partition in the volume that
+ you want to mount. If omitted, the default is to mount
+ by volume name. Examples: For volume /dev/sda1, you specify
+ the partition as "1". Similarly, the volume partition
+ for /dev/sda is "0" (or you can leave the property empty).'
+ format: int32
+ type: integer
+ readOnly:
+ description: 'readOnly value true will force the readOnly
+ setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore'
+ type: boolean
+ volumeID:
+ description: 'volumeID is unique ID of the persistent disk
+ resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore'
+ type: string
+ required:
+ - volumeID
+ type: object
+ azureDisk:
+ description: azureDisk represents an Azure Data Disk mount on
+ the host and bind mount to the pod.
+ properties:
+ cachingMode:
+ description: 'cachingMode is the Host Caching mode: None,
+ Read Only, Read Write.'
+ type: string
+ diskName:
+ description: diskName is the Name of the data disk in the
+ blob storage
+ type: string
+ diskURI:
+ description: diskURI is the URI of data disk in the blob
+ storage
+ type: string
+ fsType:
+ description: fsType is Filesystem type to mount. Must be
+ a filesystem type supported by the host operating system.
+ Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4"
+ if unspecified.
+ type: string
+ kind:
+ description: 'kind expected values are Shared: multiple
+ blob disks per storage account Dedicated: single blob
+ disk per storage account Managed: azure managed data
+ disk (only in managed availability set). defaults to shared'
+ type: string
+ readOnly:
+ description: readOnly Defaults to false (read/write). ReadOnly
+ here will force the ReadOnly setting in VolumeMounts.
+ type: boolean
+ required:
+ - diskName
+ - diskURI
+ type: object
+ azureFile:
+ description: azureFile represents an Azure File Service mount
+ on the host and bind mount to the pod.
+ properties:
+ readOnly:
+ description: readOnly defaults to false (read/write). ReadOnly
+ here will force the ReadOnly setting in VolumeMounts.
+ type: boolean
+ secretName:
+ description: secretName is the name of secret that contains
+ Azure Storage Account Name and Key
+ type: string
+ shareName:
+ description: shareName is the azure share Name
+ type: string
+ required:
+ - secretName
+ - shareName
+ type: object
+ cephfs:
+ description: cephFS represents a Ceph FS mount on the host that
+ shares a pod's lifetime
+ properties:
+ monitors:
+ description: 'monitors is Required: Monitors is a collection
+ of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it'
+ items:
+ type: string
+ type: array
+ path:
+ description: 'path is Optional: Used as the mounted root,
+ rather than the full Ceph tree, default is /'
+ type: string
+ readOnly:
+ description: 'readOnly is Optional: Defaults to false (read/write).
+ ReadOnly here will force the ReadOnly setting in VolumeMounts.
+ More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it'
+ type: boolean
+ secretFile:
+ description: 'secretFile is Optional: SecretFile is the
+ path to key ring for User, default is /etc/ceph/user.secret
+ More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it'
+ type: string
+ secretRef:
+ description: 'secretRef is Optional: SecretRef is reference
+ to the authentication secret for User, default is empty.
+ More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it'
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ user:
+ description: 'user is optional: User is the rados user name,
+ default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it'
+ type: string
+ required:
+ - monitors
+ type: object
+ cinder:
+ description: 'cinder represents a cinder volume attached and
+ mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md'
+ properties:
+ fsType:
+ description: 'fsType is the filesystem type to mount. Must
+ be a filesystem type supported by the host operating system.
+ Examples: "ext4", "xfs", "ntfs". Implicitly inferred to
+ be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md'
+ type: string
+ readOnly:
+ description: 'readOnly defaults to false (read/write). ReadOnly
+ here will force the ReadOnly setting in VolumeMounts.
+ More info: https://examples.k8s.io/mysql-cinder-pd/README.md'
+ type: boolean
+ secretRef:
+ description: 'secretRef is optional: points to a secret
+ object containing parameters used to connect to OpenStack.'
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ volumeID:
+ description: 'volumeID used to identify the volume in cinder.
+ More info: https://examples.k8s.io/mysql-cinder-pd/README.md'
+ type: string
+ required:
+ - volumeID
+ type: object
+ configMap:
+ description: configMap represents a configMap that should populate
+ this volume
+ properties:
+ defaultMode:
+ description: 'defaultMode is optional: mode bits used to
+ set permissions on created files by default. Must be an
+ octal value between 0000 and 0777 or a decimal value between
+ 0 and 511. YAML accepts both octal and decimal values,
+ JSON requires decimal values for mode bits. Defaults to
+ 0644. Directories within the path are not affected by
+ this setting. This might be in conflict with other options
+ that affect the file mode, like fsGroup, and the result
+ can be other mode bits set.'
+ format: int32
+ type: integer
+ items:
+ description: items if unspecified, each key-value pair in
+ the Data field of the referenced ConfigMap will be projected
+ into the volume as a file whose name is the key and content
+ is the value. If specified, the listed keys will be projected
+ into the specified paths, and unlisted keys will not be
+ present. If a key is specified which is not present in
+ the ConfigMap, the volume setup will error unless it is
+ marked optional. Paths must be relative and may not contain
+ the '..' path or start with '..'.
+ items:
+ description: Maps a string key to a path within a volume.
+ properties:
+ key:
+ description: key is the key to project.
+ type: string
+ mode:
+ description: 'mode is Optional: mode bits used to
+ set permissions on this file. Must be an octal value
+ between 0000 and 0777 or a decimal value between
+ 0 and 511. YAML accepts both octal and decimal values,
+ JSON requires decimal values for mode bits. If not
+ specified, the volume defaultMode will be used.
+ This might be in conflict with other options that
+ affect the file mode, like fsGroup, and the result
+ can be other mode bits set.'
+ format: int32
+ type: integer
+ path:
+ description: path is the relative path of the file
+ to map the key to. May not be an absolute path.
+ May not contain the path element '..'. May not start
+ with the string '..'.
+ type: string
+ required:
+ - key
+ - path
+ type: object
+ type: array
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ optional:
+ description: optional specify whether the ConfigMap or its
+ keys must be defined
+ type: boolean
+ type: object
+ x-kubernetes-map-type: atomic
+ csi:
+ description: csi (Container Storage Interface) represents ephemeral
+ storage that is handled by certain external CSI drivers (Beta
+ feature).
+ properties:
+ driver:
+ description: driver is the name of the CSI driver that handles
+ this volume. Consult with your admin for the correct name
+ as registered in the cluster.
+ type: string
+ fsType:
+ description: fsType to mount. Ex. "ext4", "xfs", "ntfs".
+ If not provided, the empty value is passed to the associated
+ CSI driver which will determine the default filesystem
+ to apply.
+ type: string
+ nodePublishSecretRef:
+ description: nodePublishSecretRef is a reference to the
+ secret object containing sensitive information to pass
+ to the CSI driver to complete the CSI NodePublishVolume
+ and NodeUnpublishVolume calls. This field is optional,
+ and may be empty if no secret is required. If the secret
+ object contains more than one secret, all secret references
+ are passed.
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ readOnly:
+ description: readOnly specifies a read-only configuration
+ for the volume. Defaults to false (read/write).
+ type: boolean
+ volumeAttributes:
+ additionalProperties:
+ type: string
+ description: volumeAttributes stores driver-specific properties
+ that are passed to the CSI driver. Consult your driver's
+ documentation for supported values.
+ type: object
+ required:
+ - driver
+ type: object
+ downwardAPI:
+ description: downwardAPI represents downward API about the pod
+ that should populate this volume
+ properties:
+ defaultMode:
+ description: 'Optional: mode bits to use on created files
+ by default. Must be a Optional: mode bits used to set
+ permissions on created files by default. Must be an octal
+ value between 0000 and 0777 or a decimal value between
+ 0 and 511. YAML accepts both octal and decimal values,
+ JSON requires decimal values for mode bits. Defaults to
+ 0644. Directories within the path are not affected by
+ this setting. This might be in conflict with other options
+ that affect the file mode, like fsGroup, and the result
+ can be other mode bits set.'
+ format: int32
+ type: integer
+ items:
+ description: Items is a list of downward API volume file
+ items:
+ description: DownwardAPIVolumeFile represents information
+ to create the file containing the pod field
+ properties:
+ fieldRef:
+ description: 'Required: Selects a field of the pod:
+ only annotations, labels, name and namespace are
+ supported.'
+ properties:
+ apiVersion:
+ description: Version of the schema the FieldPath
+ is written in terms of, defaults to "v1".
+ type: string
+ fieldPath:
+ description: Path of the field to select in the
+ specified API version.
+ type: string
+ required:
+ - fieldPath
+ type: object
+ x-kubernetes-map-type: atomic
+ mode:
+ description: 'Optional: mode bits used to set permissions
+ on this file, must be an octal value between 0000
+ and 0777 or a decimal value between 0 and 511. YAML
+ accepts both octal and decimal values, JSON requires
+ decimal values for mode bits. If not specified,
+ the volume defaultMode will be used. This might
+ be in conflict with other options that affect the
+ file mode, like fsGroup, and the result can be other
+ mode bits set.'
+ format: int32
+ type: integer
+ path:
+ description: 'Required: Path is the relative path
+ name of the file to be created. Must not be absolute
+ or contain the ''..'' path. Must be utf-8 encoded.
+ The first item of the relative path must not start
+ with ''..'''
+ type: string
+ resourceFieldRef:
+ description: 'Selects a resource of the container:
+ only resources limits and requests (limits.cpu,
+ limits.memory, requests.cpu and requests.memory)
+ are currently supported.'
+ properties:
+ containerName:
+ description: 'Container name: required for volumes,
+ optional for env vars'
+ type: string
+ divisor:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Specifies the output format of the
+ exposed resources, defaults to "1"
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ resource:
+ description: 'Required: resource to select'
+ type: string
+ required:
+ - resource
+ type: object
+ x-kubernetes-map-type: atomic
+ required:
+ - path
+ type: object
+ type: array
+ type: object
+ emptyDir:
+ description: 'emptyDir represents a temporary directory that
+ shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir'
+ properties:
+ medium:
+ description: 'medium represents what type of storage medium
+ should back this directory. The default is "" which means
+ to use the node''s default medium. Must be an empty string
+ (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir'
+ type: string
+ sizeLimit:
+ anyOf:
+ - type: integer
+ - type: string
+ description: 'sizeLimit is the total amount of local storage
+ required for this EmptyDir volume. The size limit is also
+ applicable for memory medium. 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. The default is nil which means
+ that the limit is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir'
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ type: object
+ ephemeral:
+ description: "ephemeral represents a volume that is handled
+ by a cluster storage driver. The volume's lifecycle is tied
+ to the pod that defines it - it will be created before the
+ pod starts, and deleted when the pod is removed. \n Use this
+ if: a) the volume is only needed while the pod runs, b) features
+ of normal volumes like restoring from snapshot or capacity
+ tracking are needed, c) the storage driver is specified through
+ a storage class, and d) the storage driver supports dynamic
+ volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource
+ for more information on the connection between this volume
+ type and PersistentVolumeClaim). \n Use PersistentVolumeClaim
+ or one of the vendor-specific APIs for volumes that persist
+ for longer than the lifecycle of an individual pod. \n Use
+ CSI for light-weight local ephemeral volumes if the CSI driver
+ is meant to be used that way - see the documentation of the
+ driver for more information. \n A pod can use both types of
+ ephemeral volumes and persistent volumes at the same time."
+ properties:
+ volumeClaimTemplate:
+ description: "Will be used to create a stand-alone PVC to
+ provision the volume. The pod in which this EphemeralVolumeSource
+ is embedded will be the owner of the PVC, i.e. the PVC
+ will be deleted together with the pod. The name of the
+ PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry.
+ Pod validation will reject the pod if the concatenated
+ name is not valid for a PVC (for example, too long). \n
+ An existing PVC with that name that is not owned by the
+ pod will *not* be used for the pod to avoid using an unrelated
+ volume by mistake. Starting the pod is then blocked until
+ the unrelated PVC is removed. If such a pre-created PVC
+ is meant to be used by the pod, the PVC has to updated
+ with an owner reference to the pod once the pod exists.
+ Normally this should not be necessary, but it may be useful
+ when manually reconstructing a broken cluster. \n This
+ field is read-only and no changes will be made by Kubernetes
+ to the PVC after it has been created. \n Required, must
+ not be nil."
+ properties:
+ metadata:
+ description: May contain labels and annotations that
+ will be copied into the PVC when creating it. No other
+ fields are allowed and will be rejected during validation.
+ type: object
+ spec:
+ description: The specification for the PersistentVolumeClaim.
+ The entire content is copied unchanged into the PVC
+ that gets created from this template. The same fields
+ as in a PersistentVolumeClaim are also valid here.
+ properties:
+ accessModes:
+ description: 'accessModes contains the desired access
+ modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1'
+ items:
+ type: string
+ type: array
+ dataSource:
+ description: 'dataSource field can be used to specify
+ either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot)
+ * An existing PVC (PersistentVolumeClaim) If the
+ provisioner or an external controller can support
+ the specified data source, it will create a new
+ volume based on the contents of the specified
+ data source. When the AnyVolumeDataSource feature
+ gate is enabled, dataSource contents will be copied
+ to dataSourceRef, and dataSourceRef contents will
+ be copied to dataSource when dataSourceRef.namespace
+ is not specified. If the namespace is specified,
+ then dataSourceRef will not be copied to dataSource.'
+ properties:
+ apiGroup:
+ description: APIGroup is the group for the resource
+ being referenced. If APIGroup is not specified,
+ the specified Kind must be in the core API
+ group. For any other third-party types, APIGroup
+ is required.
+ type: string
+ kind:
+ description: Kind is the type of resource being
+ referenced
+ type: string
+ name:
+ description: Name is the name of resource being
+ referenced
+ type: string
+ required:
+ - kind
+ - name
+ type: object
+ x-kubernetes-map-type: atomic
+ dataSourceRef:
+ description: 'dataSourceRef specifies the object
+ from which to populate the volume with data, if
+ a non-empty volume is desired. This may be any
+ object from a non-empty API group (non core object)
+ or a PersistentVolumeClaim object. When this field
+ is specified, volume binding will only succeed
+ if the type of the specified object matches some
+ installed volume populator or dynamic provisioner.
+ This field will replace the functionality of the
+ dataSource field and as such if both fields are
+ non-empty, they must have the same value. For
+ backwards compatibility, when namespace isn''t
+ specified in dataSourceRef, both fields (dataSource
+ and dataSourceRef) will be set to the same value
+ automatically if one of them is empty and the
+ other is non-empty. When namespace is specified
+ in dataSourceRef, dataSource isn''t set to the
+ same value and must be empty. There are three
+ important differences between dataSource and dataSourceRef:
+ * While dataSource only allows two specific types
+ of objects, dataSourceRef allows any non-core
+ object, as well as PersistentVolumeClaim objects.
+ * While dataSource ignores disallowed values (dropping
+ them), dataSourceRef preserves all values, and
+ generates an error if a disallowed value is specified.
+ * While dataSource only allows local objects,
+ dataSourceRef allows objects in any namespaces.
+ (Beta) Using this field requires the AnyVolumeDataSource
+ feature gate to be enabled. (Alpha) Using the
+ namespace field of dataSourceRef requires the
+ CrossNamespaceVolumeDataSource feature gate to
+ be enabled.'
+ properties:
+ apiGroup:
+ description: APIGroup is the group for the resource
+ being referenced. If APIGroup is not specified,
+ the specified Kind must be in the core API
+ group. For any other third-party types, APIGroup
+ is required.
+ type: string
+ kind:
+ description: Kind is the type of resource being
+ referenced
+ type: string
+ name:
+ description: Name is the name of resource being
+ referenced
+ type: string
+ namespace:
+ description: Namespace is the namespace of resource
+ being referenced Note that when a namespace
+ is specified, a gateway.networking.k8s.io/ReferenceGrant
+ object is required in the referent namespace
+ to allow that namespace's owner to accept
+ the reference. See the ReferenceGrant documentation
+ for details. (Alpha) This field requires the
+ CrossNamespaceVolumeDataSource feature gate
+ to be enabled.
+ type: string
+ required:
+ - kind
+ - name
+ type: object
+ resources:
+ description: 'resources represents the minimum resources
+ the volume should have. If RecoverVolumeExpansionFailure
+ feature is enabled users are allowed to specify
+ resource requirements that are lower than previous
+ value but must still be higher than capacity recorded
+ in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources'
+ properties:
+ claims:
+ description: "Claims lists the names of resources,
+ defined in spec.resourceClaims, that are used
+ by this container. \n This is an alpha field
+ and requires enabling the DynamicResourceAllocation
+ feature gate. \n This field is immutable.
+ It can only be set for containers."
+ items:
+ description: ResourceClaim references one
+ entry in PodSpec.ResourceClaims.
+ properties:
+ name:
+ description: Name must match the name
+ of one entry in pod.spec.resourceClaims
+ of the Pod where this field is used.
+ It makes that resource available inside
+ a container.
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - name
+ x-kubernetes-list-type: map
+ limits:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Limits describes the maximum amount
+ of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ requests:
+ additionalProperties:
+ anyOf:
+ - type: integer
+ - type: string
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ description: 'Requests describes the minimum
+ amount of compute resources required. If Requests
+ is omitted for a container, it defaults to
+ Limits if that is explicitly specified, otherwise
+ to an implementation-defined value. Requests
+ cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
+ type: object
+ type: object
+ selector:
+ description: selector is a label query over volumes
+ to consider for binding.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: A label selector requirement
+ is a selector that contains values, a key,
+ and an operator that relates the key and
+ values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: operator represents a key's
+ relationship to a set of values. Valid
+ operators are In, NotIn, Exists and
+ DoesNotExist.
+ type: string
+ values:
+ description: values is an array of string
+ values. If the operator is In or NotIn,
+ the values array must be non-empty.
+ If the operator is Exists or DoesNotExist,
+ the values array must be empty. This
+ array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: matchLabels is a map of {key,value}
+ pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions,
+ whose key field is "key", the operator is
+ "In", and the values array contains only "value".
+ The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ storageClassName:
+ description: 'storageClassName is the name of the
+ StorageClass required by the claim. More info:
+ https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1'
+ type: string
+ volumeMode:
+ description: volumeMode defines what type of volume
+ is required by the claim. Value of Filesystem
+ is implied when not included in claim spec.
+ type: string
+ volumeName:
+ description: volumeName is the binding reference
+ to the PersistentVolume backing this claim.
+ type: string
+ type: object
+ required:
+ - spec
+ type: object
+ type: object
+ fc:
+ description: fc represents a Fibre Channel resource that is
+ attached to a kubelet's host machine and then exposed to the
+ pod.
+ properties:
+ fsType:
+ description: 'fsType is the filesystem type to mount. Must
+ be a filesystem type supported by the host operating system.
+ Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4"
+ if unspecified. TODO: how do we prevent errors in the
+ filesystem from compromising the machine'
+ type: string
+ lun:
+ description: 'lun is Optional: FC target lun number'
+ format: int32
+ type: integer
+ readOnly:
+ description: 'readOnly is Optional: Defaults to false (read/write).
+ ReadOnly here will force the ReadOnly setting in VolumeMounts.'
+ type: boolean
+ targetWWNs:
+ description: 'targetWWNs is Optional: FC target worldwide
+ names (WWNs)'
+ items:
+ type: string
+ type: array
+ wwids:
+ description: 'wwids Optional: FC volume world wide identifiers
+ (wwids) Either wwids or combination of targetWWNs and
+ lun must be set, but not both simultaneously.'
+ items:
+ type: string
+ type: array
+ type: object
+ flexVolume:
+ description: flexVolume represents a generic volume resource
+ that is provisioned/attached using an exec based plugin.
+ properties:
+ driver:
+ description: driver is the name of the driver to use for
+ this volume.
+ type: string
+ fsType:
+ description: fsType is the filesystem type to mount. Must
+ be a filesystem type supported by the host operating system.
+ Ex. "ext4", "xfs", "ntfs". The default filesystem depends
+ on FlexVolume script.
+ type: string
+ options:
+ additionalProperties:
+ type: string
+ description: 'options is Optional: this field holds extra
+ command options if any.'
+ type: object
+ readOnly:
+ description: 'readOnly is Optional: defaults to false (read/write).
+ ReadOnly here will force the ReadOnly setting in VolumeMounts.'
+ type: boolean
+ secretRef:
+ description: 'secretRef is Optional: secretRef is reference
+ to the secret object containing sensitive information
+ to pass to the plugin scripts. This may be empty if no
+ secret object is specified. If the secret object contains
+ more than one secret, all secrets are passed to the plugin
+ scripts.'
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ required:
+ - driver
+ type: object
+ flocker:
+ description: flocker represents a Flocker volume attached to
+ a kubelet's host machine. This depends on the Flocker control
+ service being running
+ properties:
+ datasetName:
+ description: datasetName is Name of the dataset stored as
+ metadata -> name on the dataset for Flocker should be
+ considered as deprecated
+ type: string
+ datasetUUID:
+ description: datasetUUID is the UUID of the dataset. This
+ is unique identifier of a Flocker dataset
+ type: string
+ type: object
+ gcePersistentDisk:
+ description: 'gcePersistentDisk represents a GCE Disk resource
+ that is attached to a kubelet''s host machine and then exposed
+ to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk'
+ properties:
+ fsType:
+ description: 'fsType is filesystem type of the volume that
+ you want to mount. Tip: Ensure that the filesystem type
+ is supported by the host operating system. Examples: "ext4",
+ "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+ TODO: how do we prevent errors in the filesystem from
+ compromising the machine'
+ type: string
+ partition:
+ description: 'partition is the partition in the volume that
+ you want to mount. If omitted, the default is to mount
+ by volume name. Examples: For volume /dev/sda1, you specify
+ the partition as "1". Similarly, the volume partition
+ for /dev/sda is "0" (or you can leave the property empty).
+ More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk'
+ format: int32
+ type: integer
+ pdName:
+ description: 'pdName is unique name of the PD resource in
+ GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk'
+ type: string
+ readOnly:
+ description: 'readOnly here will force the ReadOnly setting
+ in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk'
+ type: boolean
+ required:
+ - pdName
+ type: object
+ gitRepo:
+ description: 'gitRepo represents a git repository at a particular
+ revision. DEPRECATED: GitRepo is deprecated. To provision
+ a container with a git repo, mount an EmptyDir into an InitContainer
+ that clones the repo using git, then mount the EmptyDir into
+ the Pod''s container.'
+ properties:
+ directory:
+ description: directory is the target directory name. Must
+ not contain or start with '..'. If '.' is supplied, the
+ volume directory will be the git repository. Otherwise,
+ if specified, the volume will contain the git repository
+ in the subdirectory with the given name.
+ type: string
+ repository:
+ description: repository is the URL
+ type: string
+ revision:
+ description: revision is the commit hash for the specified
+ revision.
+ type: string
+ required:
+ - repository
+ type: object
+ glusterfs:
+ description: 'glusterfs represents a Glusterfs mount on the
+ host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md'
+ properties:
+ endpoints:
+ description: 'endpoints is the endpoint name that details
+ Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod'
+ type: string
+ path:
+ description: 'path is the Glusterfs volume path. More info:
+ https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod'
+ type: string
+ readOnly:
+ description: 'readOnly here will force the Glusterfs volume
+ to be mounted with read-only permissions. Defaults to
+ false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod'
+ type: boolean
+ required:
+ - endpoints
+ - path
+ type: object
+ hostPath:
+ description: 'hostPath represents a pre-existing file or directory
+ on the host machine that is directly exposed to the container.
+ This is generally used for system agents or other privileged
+ things that are allowed to see the host machine. Most containers
+ will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
+ --- TODO(jonesdl) We need to restrict who can use host directory
+ mounts and who can/can not mount host directories as read/write.'
+ properties:
+ path:
+ description: 'path of the directory on the host. If the
+ path is a symlink, it will follow the link to the real
+ path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath'
+ type: string
+ type:
+ description: 'type for HostPath Volume Defaults to "" More
+ info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath'
+ type: string
+ required:
+ - path
+ type: object
+ iscsi:
+ description: 'iscsi represents an ISCSI Disk resource that is
+ attached to a kubelet''s host machine and then exposed to
+ the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md'
+ properties:
+ chapAuthDiscovery:
+ description: chapAuthDiscovery defines whether support iSCSI
+ Discovery CHAP authentication
+ type: boolean
+ chapAuthSession:
+ description: chapAuthSession defines whether support iSCSI
+ Session CHAP authentication
+ type: boolean
+ fsType:
+ description: 'fsType is the filesystem type of the volume
+ that you want to mount. Tip: Ensure that the filesystem
+ type is supported by the host operating system. Examples:
+ "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4"
+ if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi
+ TODO: how do we prevent errors in the filesystem from
+ compromising the machine'
+ type: string
+ initiatorName:
+ description: initiatorName is the custom iSCSI Initiator
+ Name. If initiatorName is specified with iscsiInterface
+ simultaneously, new iSCSI interface : will be created for the connection.
+ type: string
+ iqn:
+ description: iqn is the target iSCSI Qualified Name.
+ type: string
+ iscsiInterface:
+ description: iscsiInterface is the interface Name that uses
+ an iSCSI transport. Defaults to 'default' (tcp).
+ type: string
+ lun:
+ description: lun represents iSCSI Target Lun number.
+ format: int32
+ type: integer
+ portals:
+ description: portals is the iSCSI Target Portal List. The
+ portal is either an IP or ip_addr:port if the port is
+ other than default (typically TCP ports 860 and 3260).
+ items:
+ type: string
+ type: array
+ readOnly:
+ description: readOnly here will force the ReadOnly setting
+ in VolumeMounts. Defaults to false.
+ type: boolean
+ secretRef:
+ description: secretRef is the CHAP Secret for iSCSI target
+ and initiator authentication
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ targetPortal:
+ description: targetPortal is iSCSI Target Portal. The Portal
+ is either an IP or ip_addr:port if the port is other than
+ default (typically TCP ports 860 and 3260).
+ type: string
+ required:
+ - iqn
+ - lun
+ - targetPortal
+ type: object
+ name:
+ description: 'name of the volume. Must be a DNS_LABEL and unique
+ within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
+ type: string
+ nfs:
+ description: 'nfs represents an NFS mount on the host that shares
+ a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs'
+ properties:
+ path:
+ description: 'path that is exported by the NFS server. More
+ info: https://kubernetes.io/docs/concepts/storage/volumes#nfs'
+ type: string
+ readOnly:
+ description: 'readOnly here will force the NFS export to
+ be mounted with read-only permissions. Defaults to false.
+ More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs'
+ type: boolean
+ server:
+ description: 'server is the hostname or IP address of the
+ NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs'
+ type: string
+ required:
+ - path
+ - server
+ type: object
+ persistentVolumeClaim:
+ description: 'persistentVolumeClaimVolumeSource represents a
+ reference to a PersistentVolumeClaim in the same namespace.
+ More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
+ properties:
+ claimName:
+ description: 'claimName is the name of a PersistentVolumeClaim
+ in the same namespace as the pod using this volume. More
+ info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
+ type: string
+ readOnly:
+ description: readOnly Will force the ReadOnly setting in
+ VolumeMounts. Default false.
+ type: boolean
+ required:
+ - claimName
+ type: object
+ photonPersistentDisk:
+ description: photonPersistentDisk represents a PhotonController
+ persistent disk attached and mounted on kubelets host machine
+ properties:
+ fsType:
+ description: fsType is the filesystem type to mount. Must
+ be a filesystem type supported by the host operating system.
+ Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4"
+ if unspecified.
+ type: string
+ pdID:
+ description: pdID is the ID that identifies Photon Controller
+ persistent disk
+ type: string
+ required:
+ - pdID
+ type: object
+ portworxVolume:
+ description: portworxVolume represents a portworx volume attached
+ and mounted on kubelets host machine
+ properties:
+ fsType:
+ description: fSType represents the filesystem type to mount
+ Must be a filesystem type supported by the host operating
+ system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4"
+ if unspecified.
+ type: string
+ readOnly:
+ description: readOnly defaults to false (read/write). ReadOnly
+ here will force the ReadOnly setting in VolumeMounts.
+ type: boolean
+ volumeID:
+ description: volumeID uniquely identifies a Portworx volume
+ type: string
+ required:
+ - volumeID
+ type: object
+ projected:
+ description: projected items for all in one resources secrets,
+ configmaps, and downward API
+ properties:
+ defaultMode:
+ description: defaultMode are the mode bits used to set permissions
+ on created files by default. Must be an octal value between
+ 0000 and 0777 or a decimal value between 0 and 511. YAML
+ accepts both octal and decimal values, JSON requires decimal
+ values for mode bits. Directories within the path are
+ not affected by this setting. This might be in conflict
+ with other options that affect the file mode, like fsGroup,
+ and the result can be other mode bits set.
+ format: int32
+ type: integer
+ sources:
+ description: sources is the list of volume projections
+ items:
+ description: Projection that may be projected along with
+ other supported volume types
+ properties:
+ configMap:
+ description: configMap information about the configMap
+ data to project
+ properties:
+ items:
+ description: items if unspecified, each key-value
+ pair in the Data field of the referenced ConfigMap
+ will be projected into the volume as a file
+ whose name is the key and content is the value.
+ If specified, the listed keys will be projected
+ into the specified paths, and unlisted keys
+ will not be present. If a key is specified which
+ is not present in the ConfigMap, the volume
+ setup will error unless it is marked optional.
+ Paths must be relative and may not contain the
+ '..' path or start with '..'.
+ items:
+ description: Maps a string key to a path within
+ a volume.
+ properties:
+ key:
+ description: key is the key to project.
+ type: string
+ mode:
+ description: 'mode is Optional: mode bits
+ used to set permissions on this file.
+ Must be an octal value between 0000 and
+ 0777 or a decimal value between 0 and
+ 511. YAML accepts both octal and decimal
+ values, JSON requires decimal values for
+ mode bits. If not specified, the volume
+ defaultMode will be used. This might be
+ in conflict with other options that affect
+ the file mode, like fsGroup, and the result
+ can be other mode bits set.'
+ format: int32
+ type: integer
+ path:
+ description: path is the relative path of
+ the file to map the key to. May not be
+ an absolute path. May not contain the
+ path element '..'. May not start with
+ the string '..'.
+ type: string
+ required:
+ - key
+ - path
+ type: object
+ type: array
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: optional specify whether the ConfigMap
+ or its keys must be defined
+ type: boolean
+ type: object
+ x-kubernetes-map-type: atomic
+ downwardAPI:
+ description: downwardAPI information about the downwardAPI
+ data to project
+ properties:
+ items:
+ description: Items is a list of DownwardAPIVolume
+ file
+ items:
+ description: DownwardAPIVolumeFile represents
+ information to create the file containing
+ the pod field
+ properties:
+ fieldRef:
+ description: 'Required: Selects a field
+ of the pod: only annotations, labels,
+ name and namespace are supported.'
+ properties:
+ apiVersion:
+ description: Version of the schema the
+ FieldPath is written in terms of,
+ defaults to "v1".
+ type: string
+ fieldPath:
+ description: Path of the field to select
+ in the specified API version.
+ type: string
+ required:
+ - fieldPath
+ type: object
+ x-kubernetes-map-type: atomic
+ mode:
+ description: 'Optional: mode bits used to
+ set permissions on this file, must be
+ an octal value between 0000 and 0777 or
+ a decimal value between 0 and 511. YAML
+ accepts both octal and decimal values,
+ JSON requires decimal values for mode
+ bits. If not specified, the volume defaultMode
+ will be used. This might be in conflict
+ with other options that affect the file
+ mode, like fsGroup, and the result can
+ be other mode bits set.'
+ format: int32
+ type: integer
+ path:
+ description: 'Required: Path is the relative
+ path name of the file to be created. Must
+ not be absolute or contain the ''..''
+ path. Must be utf-8 encoded. The first
+ item of the relative path must not start
+ with ''..'''
+ type: string
+ resourceFieldRef:
+ description: 'Selects a resource of the
+ container: only resources limits and requests
+ (limits.cpu, limits.memory, requests.cpu
+ and requests.memory) are currently supported.'
+ properties:
+ containerName:
+ description: 'Container name: required
+ for volumes, optional for env vars'
+ type: string
+ divisor:
+ anyOf:
+ - type: integer
+ - type: string
+ description: Specifies the output format
+ of the exposed resources, defaults
+ to "1"
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ resource:
+ description: 'Required: resource to
+ select'
+ type: string
+ required:
+ - resource
+ type: object
+ x-kubernetes-map-type: atomic
+ required:
+ - path
+ type: object
+ type: array
+ type: object
+ secret:
+ description: secret information about the secret data
+ to project
+ properties:
+ items:
+ description: items if unspecified, each key-value
+ pair in the Data field of the referenced Secret
+ will be projected into the volume as a file
+ whose name is the key and content is the value.
+ If specified, the listed keys will be projected
+ into the specified paths, and unlisted keys
+ will not be present. If a key is specified which
+ is not present in the Secret, the volume setup
+ will error unless it is marked optional. Paths
+ must be relative and may not contain the '..'
+ path or start with '..'.
+ items:
+ description: Maps a string key to a path within
+ a volume.
+ properties:
+ key:
+ description: key is the key to project.
+ type: string
+ mode:
+ description: 'mode is Optional: mode bits
+ used to set permissions on this file.
+ Must be an octal value between 0000 and
+ 0777 or a decimal value between 0 and
+ 511. YAML accepts both octal and decimal
+ values, JSON requires decimal values for
+ mode bits. If not specified, the volume
+ defaultMode will be used. This might be
+ in conflict with other options that affect
+ the file mode, like fsGroup, and the result
+ can be other mode bits set.'
+ format: int32
+ type: integer
+ path:
+ description: path is the relative path of
+ the file to map the key to. May not be
+ an absolute path. May not contain the
+ path element '..'. May not start with
+ the string '..'.
+ type: string
+ required:
+ - key
+ - path
+ type: object
+ type: array
+ name:
+ description: 'Name of the referent. More info:
+ https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind,
+ uid?'
+ type: string
+ optional:
+ description: optional field specify whether the
+ Secret or its key must be defined
+ type: boolean
+ type: object
+ x-kubernetes-map-type: atomic
+ serviceAccountToken:
+ description: serviceAccountToken is information about
+ the serviceAccountToken data to project
+ properties:
+ audience:
+ description: audience is the intended audience
+ of the token. A recipient of a token must identify
+ itself with an identifier specified in the audience
+ of the token, and otherwise should reject the
+ token. The audience defaults to the identifier
+ of the apiserver.
+ type: string
+ expirationSeconds:
+ description: expirationSeconds is the requested
+ duration of validity of the service account
+ token. As the token approaches expiration, the
+ kubelet volume plugin will proactively rotate
+ the service account token. The kubelet will
+ start trying to rotate the token if the token
+ is older than 80 percent of its time to live
+ or if the token is older than 24 hours.Defaults
+ to 1 hour and must be at least 10 minutes.
+ format: int64
+ type: integer
+ path:
+ description: path is the path relative to the
+ mount point of the file to project the token
+ into.
+ type: string
+ required:
+ - path
+ type: object
+ type: object
+ type: array
+ type: object
+ quobyte:
+ description: quobyte represents a Quobyte mount on the host
+ that shares a pod's lifetime
+ properties:
+ group:
+ description: group to map volume access to Default is no
+ group
+ type: string
+ readOnly:
+ description: readOnly here will force the Quobyte volume
+ to be mounted with read-only permissions. Defaults to
+ false.
+ type: boolean
+ registry:
+ description: registry represents a single or multiple Quobyte
+ Registry services specified as a string as host:port pair
+ (multiple entries are separated with commas) which acts
+ as the central registry for volumes
+ type: string
+ tenant:
+ description: tenant owning the given Quobyte volume in the
+ Backend Used with dynamically provisioned Quobyte volumes,
+ value is set by the plugin
+ type: string
+ user:
+ description: user to map volume access to Defaults to serivceaccount
+ user
+ type: string
+ volume:
+ description: volume is a string that references an already
+ created Quobyte volume by name.
+ type: string
+ required:
+ - registry
+ - volume
+ type: object
+ rbd:
+ description: 'rbd represents a Rados Block Device mount on the
+ host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md'
+ properties:
+ fsType:
+ description: 'fsType is the filesystem type of the volume
+ that you want to mount. Tip: Ensure that the filesystem
+ type is supported by the host operating system. Examples:
+ "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4"
+ if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd
+ TODO: how do we prevent errors in the filesystem from
+ compromising the machine'
+ type: string
+ image:
+ description: 'image is the rados image name. More info:
+ https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
+ type: string
+ keyring:
+ description: 'keyring is the path to key ring for RBDUser.
+ Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
+ type: string
+ monitors:
+ description: 'monitors is a collection of Ceph monitors.
+ More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
+ items:
+ type: string
+ type: array
+ pool:
+ description: 'pool is the rados pool name. Default is rbd.
+ More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
+ type: string
+ readOnly:
+ description: 'readOnly here will force the ReadOnly setting
+ in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
+ type: boolean
+ secretRef:
+ description: 'secretRef is name of the authentication secret
+ for RBDUser. If provided overrides keyring. Default is
+ nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ user:
+ description: 'user is the rados user name. Default is admin.
+ More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
+ type: string
+ required:
+ - image
+ - monitors
+ type: object
+ scaleIO:
+ description: scaleIO represents a ScaleIO persistent volume
+ attached and mounted on Kubernetes nodes.
+ properties:
+ fsType:
+ description: fsType is the filesystem type to mount. Must
+ be a filesystem type supported by the host operating system.
+ Ex. "ext4", "xfs", "ntfs". Default is "xfs".
+ type: string
+ gateway:
+ description: gateway is the host address of the ScaleIO
+ API Gateway.
+ type: string
+ protectionDomain:
+ description: protectionDomain is the name of the ScaleIO
+ Protection Domain for the configured storage.
+ type: string
+ readOnly:
+ description: readOnly Defaults to false (read/write). ReadOnly
+ here will force the ReadOnly setting in VolumeMounts.
+ type: boolean
+ secretRef:
+ description: secretRef references to the secret for ScaleIO
+ user and other sensitive information. If this is not provided,
+ Login operation will fail.
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ sslEnabled:
+ description: sslEnabled Flag enable/disable SSL communication
+ with Gateway, default false
+ type: boolean
+ storageMode:
+ description: storageMode indicates whether the storage for
+ a volume should be ThickProvisioned or ThinProvisioned.
+ Default is ThinProvisioned.
+ type: string
+ storagePool:
+ description: storagePool is the ScaleIO Storage Pool associated
+ with the protection domain.
+ type: string
+ system:
+ description: system is the name of the storage system as
+ configured in ScaleIO.
+ type: string
+ volumeName:
+ description: volumeName is the name of a volume already
+ created in the ScaleIO system that is associated with
+ this volume source.
+ type: string
+ required:
+ - gateway
+ - secretRef
+ - system
+ type: object
+ secret:
+ description: 'secret represents a secret that should populate
+ this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret'
+ properties:
+ defaultMode:
+ description: 'defaultMode is Optional: mode bits used to
+ set permissions on created files by default. Must be an
+ octal value between 0000 and 0777 or a decimal value between
+ 0 and 511. YAML accepts both octal and decimal values,
+ JSON requires decimal values for mode bits. Defaults to
+ 0644. Directories within the path are not affected by
+ this setting. This might be in conflict with other options
+ that affect the file mode, like fsGroup, and the result
+ can be other mode bits set.'
+ format: int32
+ type: integer
+ items:
+ description: items If unspecified, each key-value pair in
+ the Data field of the referenced Secret will be projected
+ into the volume as a file whose name is the key and content
+ is the value. If specified, the listed keys will be projected
+ into the specified paths, and unlisted keys will not be
+ present. If a key is specified which is not present in
+ the Secret, the volume setup will error unless it is marked
+ optional. Paths must be relative and may not contain the
+ '..' path or start with '..'.
+ items:
+ description: Maps a string key to a path within a volume.
+ properties:
+ key:
+ description: key is the key to project.
+ type: string
+ mode:
+ description: 'mode is Optional: mode bits used to
+ set permissions on this file. Must be an octal value
+ between 0000 and 0777 or a decimal value between
+ 0 and 511. YAML accepts both octal and decimal values,
+ JSON requires decimal values for mode bits. If not
+ specified, the volume defaultMode will be used.
+ This might be in conflict with other options that
+ affect the file mode, like fsGroup, and the result
+ can be other mode bits set.'
+ format: int32
+ type: integer
+ path:
+ description: path is the relative path of the file
+ to map the key to. May not be an absolute path.
+ May not contain the path element '..'. May not start
+ with the string '..'.
+ type: string
+ required:
+ - key
+ - path
+ type: object
+ type: array
+ optional:
+ description: optional field specify whether the Secret or
+ its keys must be defined
+ type: boolean
+ secretName:
+ description: 'secretName is the name of the secret in the
+ pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret'
+ type: string
+ type: object
+ storageos:
+ description: storageOS represents a StorageOS volume attached
+ and mounted on Kubernetes nodes.
+ properties:
+ fsType:
+ description: fsType is the filesystem type to mount. Must
+ be a filesystem type supported by the host operating system.
+ Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4"
+ if unspecified.
+ type: string
+ readOnly:
+ description: readOnly defaults to false (read/write). ReadOnly
+ here will force the ReadOnly setting in VolumeMounts.
+ type: boolean
+ secretRef:
+ description: secretRef specifies the secret to use for obtaining
+ the StorageOS API credentials. If not specified, default
+ values will be attempted.
+ properties:
+ name:
+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ TODO: Add other useful fields. apiVersion, kind, uid?'
+ type: string
+ type: object
+ x-kubernetes-map-type: atomic
+ volumeName:
+ description: volumeName is the human-readable name of the
+ StorageOS volume. Volume names are only unique within
+ a namespace.
+ type: string
+ volumeNamespace:
+ description: volumeNamespace specifies the scope of the
+ volume within StorageOS. If no namespace is specified
+ then the Pod's namespace will be used. This allows the
+ Kubernetes name scoping to be mirrored within StorageOS
+ for tighter integration. Set VolumeName to any name to
+ override the default behaviour. Set to "default" if you
+ are not using namespaces within StorageOS. Namespaces
+ that do not pre-exist within StorageOS will be created.
+ type: string
+ type: object
+ vsphereVolume:
+ description: vsphereVolume represents a vSphere volume attached
+ and mounted on kubelets host machine
+ properties:
+ fsType:
+ description: fsType is filesystem type to mount. Must be
+ a filesystem type supported by the host operating system.
+ Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4"
+ if unspecified.
+ type: string
+ storagePolicyID:
+ description: storagePolicyID is the storage Policy Based
+ Management (SPBM) profile ID associated with the StoragePolicyName.
+ type: string
+ storagePolicyName:
+ description: storagePolicyName is the storage Policy Based
+ Management (SPBM) profile name.
+ type: string
+ volumePath:
+ description: volumePath is the path that identifies vSphere
+ volume vmdk
+ type: string
+ required:
+ - volumePath
+ type: object
+ required:
+ - name
+ type: object
+ type: array
+ type: object
+ status:
+ description: 'Most recent observed status of the ThanosRuler cluster.
+ Read-only. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status'
+ properties:
+ availableReplicas:
+ description: Total number of available pods (ready for at least minReadySeconds)
+ targeted by this ThanosRuler deployment.
+ format: int32
+ type: integer
+ conditions:
+ description: The current state of the Alertmanager object.
+ items:
+ description: Condition represents the state of the resources associated
+ with the Prometheus, Alertmanager or ThanosRuler resource.
+ properties:
+ lastTransitionTime:
+ description: lastTransitionTime is the time of the last update
+ to the current status property.
+ format: date-time
+ type: string
+ message:
+ description: Human-readable message indicating details for the
+ condition's last transition.
+ type: string
+ observedGeneration:
+ description: ObservedGeneration represents the .metadata.generation
+ that the condition was set based upon. For instance, if `.metadata.generation`
+ is currently 12, but the `.status.conditions[].observedGeneration`
+ is 9, the condition is out of date with respect to the current
+ state of the instance.
+ format: int64
+ type: integer
+ reason:
+ description: Reason for the condition's last transition.
+ type: string
+ status:
+ description: Status of the condition.
+ type: string
+ type:
+ description: Type of the condition being reported.
+ type: string
+ required:
+ - lastTransitionTime
+ - status
+ - type
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - type
+ x-kubernetes-list-type: map
+ paused:
+ description: Represents whether any actions on the underlying managed
+ objects are being performed. Only delete actions will be performed.
+ type: boolean
+ replicas:
+ description: Total number of non-terminated pods targeted by this
+ ThanosRuler deployment (their labels match the selector).
+ format: int32
+ type: integer
+ unavailableReplicas:
+ description: Total number of unavailable pods targeted by this ThanosRuler
+ deployment.
+ format: int32
+ type: integer
+ updatedReplicas:
+ description: Total number of non-terminated pods targeted by this
+ ThanosRuler deployment that have the desired version spec.
+ format: int32
+ type: integer
+ required:
+ - availableReplicas
+ - paused
+ - replicas
+ - unavailableReplicas
+ - updatedReplicas
+ type: object
+ required:
+ - spec
+ type: object
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/.helmignore b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/.helmignore
old mode 100755
new mode 100644
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/Chart.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/Chart.yaml
old mode 100755
new mode 100644
index e70aa10739..d030599a31
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/Chart.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/Chart.yaml
@@ -1,19 +1,33 @@
-apiVersion: v1
-appVersion: 6.7.3
+apiVersion: v2
+name: grafana
+version: 7.0.1
+appVersion: 10.1.5
+kubeVersion: "^1.8.0-0"
description: The leading tool for querying and visualizing time series and metrics.
-engine: gotpl
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
-name: grafana
sources:
-- https://github.com/grafana/grafana
-tillerVersion: '>=2.12.0'
-version: 5.0.18
+ - https://github.com/grafana/grafana
+ - https://github.com/grafana/helm-charts
+annotations:
+ "artifacthub.io/license": AGPL-3.0-only
+ "artifacthub.io/links": |
+ - name: Chart Source
+ url: https://github.com/grafana/helm-charts
+ - name: Upstream Project
+ url: https://github.com/grafana/grafana
+maintainers:
+ - name: zanhsieh
+ email: zanhsieh@gmail.com
+ - name: rtluckie
+ email: rluckie@cisco.com
+ - name: maorfr
+ email: maor.friedman@redhat.com
+ - name: Xtigyro
+ email: miroslav.hadzhiev@gmail.com
+ - name: torstenwalter
+ email: mail@torstenwalter.de
+type: application
+keywords:
+ - monitoring
+ - metric
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/README.md b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/README.md
old mode 100755
new mode 100644
index cabaf71b7a..a1a64e6169
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/README.md
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/README.md
@@ -2,18 +2,21 @@
* Installs the web dashboarding system [Grafana](http://grafana.org/)
-## TL;DR;
+## Get Repo Info
```console
-$ helm install stable/grafana
+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 --name my-release stable/grafana
+helm install my-release grafana/grafana
```
## Uninstalling the Chart
@@ -21,7 +24,7 @@ $ helm install --name my-release stable/grafana
To uninstall/delete the my-release deployment:
```console
-$ helm delete my-release
+helm delete my-release
```
The command removes all the Kubernetes components associated with the chart and deletes the release.
@@ -39,6 +42,17 @@ This version requires Helm >= 2.12.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.
+
+### To 7.0.0
+
+For consistency with other Helm charts, the `global.image.registry` parameter was renamed
+to `global.imageRegistry`. If you were not previously setting `global.image.registry`, no action
+is required on upgrade. If you were previously setting `global.image.registry`, you will
+need to instead set `global.imageRegistry`.
+
## Configuration
| Parameter | Description | Default |
@@ -46,71 +60,95 @@ You have to add --force to your helm upgrade command as the labels of the chart
| `replicas` | Number of nodes | `1` |
| `podDisruptionBudget.minAvailable` | Pod disruption minimum available | `nil` |
| `podDisruptionBudget.maxUnavailable` | Pod disruption maximum unavailable | `nil` |
+| `podDisruptionBudget.apiVersion` | Pod disruption apiVersion | `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, "fsGroup": 472}` |
+| `securityContext` | Deployment securityContext | `{"runAsUser": 472, "runAsGroup": 472, "fsGroup": 472}` |
| `priorityClassName` | Name of Priority Class to assign pods | `nil` |
+| `image.registry` | Image registry | `docker.io` |
| `image.repository` | Image repository | `grafana/grafana` |
-| `image.tag` | Image tag (`Must be >= 5.0.0`) | `6.7.3` |
+| `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) | `[]` |
-| `serivce.externalIPs` | service external IP addresses | `[]` |
-| `extraExposePorts` | Additional service ports for sidecar containers| `[]` |
+| `service.externalIPs` | service external IP addresses | `[]` |
+| `service.externalTrafficPolicy` | change the default externalTrafficPolicy | `nil` |
+| `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.hosts` | Ingress accepted hostnames | `[]` |
-| `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). | `[]` |
+| `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 | `[]` |
+| `ingress.ingressClassName` | Ingress Class Name. MAY be required for Kubernetes versions >= 1.18 | `""` |
| `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 | `{}` |
+| `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 | `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.extraPvcLabels` | Extra labels to apply to a PVC. | `{}` |
+| `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.registry` | init-chown-data container image registry | `docker.io` |
| `initChownData.image.repository` | init-chown-data container image repository | `busybox` |
-| `initChownData.image.tag` | init-chown-data container image tag | `latest` |
+| `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. | `{}` |
+| `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 | `""` |
-| `envRenderSecret` | Sensible environment variables passed to pods and stored as secret | `{}` |
+| `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. (passed through [tpl](https://helm.sh/docs/howto/charts_tips_and_tricks/#using-the-tpl-function)) | `{}` |
+| `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 | `{}` |
| `dashboardsConfigMaps` | ConfigMaps reference that contains dashboards | `{}` |
| `grafana.ini` | Grafana's primary configuration | `{}` |
+| `global.imageRegistry` | Global image pull registry for all images. | `null` |
+| `global.imagePullSecrets` | Global image pull secrets (can be templated). Allows either an array of {name: pullSecret} maps (k8s-style), or an array of strings (more common helm-style). | `[]` |
| `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 | `""` |
@@ -119,9 +157,25 @@ You have to add --force to your helm upgrade command as the labels of the chart
| `podAnnotations` | Pod annotations | `{}` |
| `podLabels` | Pod labels | `{}` |
| `podPortName` | Name of the grafana port on the pod | `grafana` |
-| `sidecar.image` | Sidecar image | `kiwigrid/k8s-sidecar:0.1.99` |
+| `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.registry` | Sidecar image registry | `quay.io` |
+| `sidecar.image.repository` | Sidecar image repository | `kiwigrid/k8s-sidecar` |
+| `sidecar.image.tag` | Sidecar image tag | `1.24.6` |
+| `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.alerts.enabled` | Enables the cluster wide search for alerts and adds/updates/deletes them in grafana |`false` |
+| `sidecar.alerts.label` | Label that config maps with alerts should have to be added | `grafana_alert` |
+| `sidecar.alerts.labelValue` | Label value that config maps with alerts should have to be added | `""` |
+| `sidecar.alerts.searchNamespace` | Namespaces list. If specified, the sidecar will search for alerts 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.alerts.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.alerts.resource` | Should the sidecar looks into secrets, configmaps or both. | `both` |
+| `sidecar.alerts.reloadURL` | Full url of datasource configuration reload API endpoint, to invoke after a config-map change | `"http://localhost:3000/api/admin/provisioning/alerting/reload"` |
+| `sidecar.alerts.skipReload` | Enabling this omits defining the REQ_URL and REQ_METHOD environment variables | `false` |
+| `sidecar.alerts.initDatasources` | Set to true to deploy the datasource sidecar as an initContainer in addition to a container. This is needed if skipReload is true, to load any alerts defined at startup time. | `false` |
+| `sidecar.alerts.extraMounts` | Additional alerts sidecar volume mounts. | `[]` |
| `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` |
@@ -130,46 +184,142 @@ You have to add --force to your helm upgrade command as the labels of the chart
| `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.searchNamespace` | If specified, the sidecar will search for dashboard 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 | `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.reloadURL` | Full url of dashboards configuration reload API endpoint, to invoke after a config-map change | `"http://localhost:3000/api/admin/provisioning/dashboards/reload"` |
+| `sidecar.dashboards.skipReload` | Enabling this omits defining the REQ_USERNAME, REQ_PASSWORD, REQ_URL and REQ_METHOD environment variables | `false` |
+| `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.searchNamespace` | If specified, the sidecar will search for datasources 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 | `nil` |
+| `sidecar.datasources.labelValue` | Label value that config maps with datasources should have to be added | `""` |
+| `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.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.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.datasources.initDatasources` | Set to true to 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. | `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.labelValue` | Label value that config maps with notifiers should have to be added | `""` |
+| `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.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.notifiers.resource` | Should the sidecar looks into secrets, configmaps or both. | `both` |
+| `sidecar.notifiers.reloadURL` | Full url of notifier configuration reload API endpoint, to invoke after a config-map change | `"http://localhost:3000/api/admin/provisioning/notifications/reload"` |
+| `sidecar.notifiers.skipReload` | Enabling this omits defining the REQ_URL and REQ_METHOD environment variables | `false` |
+| `sidecar.notifiers.initNotifiers` | Set to true to deploy the notifier sidecar as an initContainer in addition to a container. This is needed if skipReload is true, to load any notifiers defined at startup time. | `false` |
| `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` |
| `serviceAccount.annotations` | ServiceAccount annotations | |
| `serviceAccount.create` | Create service account | `true` |
+| `serviceAccount.labels` | ServiceAccount labels | `{}` |
| `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` | `` |
+| `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.pspEnabled` | Create PodSecurityPolicy (with `rbac.create`, grant roles permissions as well) | `true` |
-| `rbac.pspUseAppArmor` | Enforce AppArmor in created PodSecurityPolicy (requires `rbac.pspEnabled`) | `true` |
+| `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) | `false` |
+| `rbac.pspUseAppArmor` | Enforce AppArmor in created PodSecurityPolicy (requires `rbac.pspEnabled`) | `false` |
| `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` |
+| `command` | Define command to be executed by grafana container at startup | `nil` |
+| `args` | Define additional args if command is used | `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.1.0` |
-| `testFramework.imagePullPolicy` | `test-framework` image pull policy. | `IfNotPresent` |
+| `testFramework.image.registry` | `test-framework` image registry. | `docker.io` |
+| `testFramework.image.repository` | `test-framework` image repository. | `bats/bats` |
+| `testFramework.image.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.68.0` |
+| `downloadDashboardsImage.registry` | Curl docker image registry | `docker.io` |
+| `downloadDashboardsImage.repository` | Curl docker image repository | `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` | RelabelConfigs to apply to samples before scraping. | `[]` |
+| `serviceMonitor.metricRelabelings` | 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.registry` | image-renderer Image registry | `docker.io` |
+| `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.envValueFrom` | Environment variables for image-renderer 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 | `{}` |
+| `imageRenderer.serviceAccountName` | image-renderer deployment serviceAccountName | `""` |
+| `imageRenderer.securityContext` | image-renderer deployment securityContext | `{}` |
+| `imageRenderer.podAnnotations ` | image-renderer image-renderer pod annotation | `{}` |
+| `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 pods | `{}` |
+| `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
@@ -177,6 +327,10 @@ You have to add --force to your helm upgrade command as the labels of the chart
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
@@ -207,20 +361,29 @@ dashboards:
gnetId: 2
revision: 2
datasource: Prometheus
+ loki-dashboard-quick-search:
+ gnetId: 12019
+ revision: 2
+ datasource:
+ - name: DS_PROMETHEUS
+ value: Prometheus
+ - name: DS_LOKI
+ value: Loki
local-dashboard:
url: https://raw.githubusercontent.com/user/repository/master/dashboards/dashboard.json
```
## BASE64 dashboards
-Dashboards could be storaged in a server that does not return JSON directly and instead of it returns a Base64 encoded file (e.g. Gerrit)
+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: https://yourgerritserver/a/{project-name}/branches/{branch-id}/files/{file-id}/content where {project-name} and
-{file-id} usualy 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 https://yourgerritserver/a/user%2Frepo/branches/master/files/dir1%2Fdir2%2Fdashboard/content
+### 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
@@ -234,7 +397,8 @@ A recommendation is to use one configmap per dashboard, as a reduction of multip
one configmap is currently not properly mirrored in grafana.
Example dashboard config:
-```
+
+```yaml
apiVersion: v1
kind: ConfigMap
metadata:
@@ -252,34 +416,50 @@ If the parameter `sidecar.datasources.enabled` is set, an init container is depl
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. The secrets must be created before `helm install` so
-that the datasources init container can list the secrets.
+the data sources in grafana can be imported.
+
+Should you aim for reloading datasources in Grafana each time the config is changed, set `sidecar.datasources.skipReload: false` and adjust `sidecar.datasources.reloadURL` to `http://..svc.cluster.local/api/admin/provisioning/datasources/reload`.
Secrets are recommended over configmaps for this usecase because datasources usually contain private
-data like usernames and passwords. Secrets are the more appropriate cluster ressource to manage those.
+data like usernames and passwords. Secrets are the more appropriate cluster resource to manage those.
-Example datasource config adapted from [Grafana](http://docs.grafana.org/administration/provisioning/#example-datasource-config-file):
-```
+Example values to add a postgres datasource as a kubernetes secret:
+```yaml
apiVersion: v1
kind: Secret
metadata:
- name: sample-grafana-datasource
+ name: grafana-datasources
labels:
- grafana_datasource: "1"
-type: Opaque
+ grafana_datasource: 'true' # default value for: sidecar.datasources.label
stringData:
- datasource.yaml: |-
- # config file version
+ pg-db.yaml: |-
apiVersion: 1
+ datasources:
+ - name: My pg db datasource
+ type: postgres
+ url: my-postgresql-db:5432
+ user: db-readonly-user
+ secureJsonData:
+ password: 'SUperSEcretPa$$word'
+ jsonData:
+ database: my_datase
+ sslmode: 'disable' # disable/require/verify-ca/verify-full
+ maxOpenConns: 0 # Grafana v5.4+
+ maxIdleConns: 2 # Grafana v5.4+
+ connMaxLifetime: 14400 # Grafana v5.4+
+ postgresVersion: 1000 # 903=9.3, 904=9.4, 905=9.5, 906=9.6, 1000=10
+ timescaledb: false
+ # allow users to edit datasources from the UI.
+ editable: false
+```
- # list of datasources that should be deleted from the database
- deleteDatasources:
- - name: Graphite
- orgId: 1
+Example values to add a datasource adapted from [Grafana](http://docs.grafana.org/administration/provisioning/#example-datasource-config-file):
- # list of datasources to insert/update depending
- # whats available in the database
- datasources:
+```yaml
+datasources:
+ datasources.yaml:
+ apiVersion: 1
+ datasources:
# name of the datasource. Required
- name: Graphite
# datasource type. Required
@@ -319,12 +499,99 @@ stringData:
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
+```
+
+## Provision alert rules, contact points, notification policies and notification templates
+
+There are two methods to provision alerting configuration in Grafana. Below are some examples and explanations as to how to use each method:
+
+```yaml
+alerting:
+ team1-alert-rules.yaml:
+ file: alerting/team1/rules.yaml
+ team2-alert-rules.yaml:
+ file: alerting/team2/rules.yaml
+ team3-alert-rules.yaml:
+ file: alerting/team3/rules.yaml
+ notification-policies.yaml:
+ file: alerting/shared/notification-policies.yaml
+ notification-templates.yaml:
+ file: alerting/shared/notification-templates.yaml
+ contactpoints.yaml:
+ apiVersion: 1
+ contactPoints:
+ - orgId: 1
+ name: Slack channel
+ receivers:
+ - uid: default-receiver
+ type: slack
+ settings:
+ # Webhook URL to be filled in
+ url: ""
+ # We need to escape double curly braces for the tpl function.
+ text: '{{ `{{ template "default.message" . }}` }}'
+ title: '{{ `{{ template "default.title" . }}` }}'
```
+There are two possibilities:
+
+* Inlining the file contents as described in the example `values.yaml` and the official [Grafana documentation](https://grafana.com/docs/grafana/next/alerting/set-up/provision-alerting-resources/file-provisioning/).
+* Importing a file using a relative path starting from the chart root directory.
+
+### Important notes on file provisioning
+
+* The chart supports importing YAML and JSON files.
+* The filename must be unique, otherwise one volume mount will overwrite the other.
+* In case of inlining, double curly braces that arise from the Grafana configuration format and are not intended as templates for the chart must be escaped.
+* The number of total files under `alerting:` is not limited. Each file will end up as a volume mount in the corresponding provisioning folder of the deployed Grafana instance.
+* The file size for each import is limited by what the function `.Files.Get` can handle, which suffices for most cases.
+
## How to serve Grafana with a path prefix (/grafana)
-In order to serve Grafana with a prefix (e.g., http://example.com/grafana), add the following to your values.yaml.
+In order to serve Grafana with a prefix (e.g., ), add the following to your values.yaml.
```yaml
ingress:
@@ -342,3 +609,96 @@ 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
+ ha_listen_address: ${POD_IP}:9094
+ ha_advertise_address: ${POD_IP}:9094
+
+ alerting:
+ enabled: false
+```
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/ci/default-values.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/ci/default-values.yaml
old mode 100755
new mode 100644
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/ci/with-affinity-values.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/ci/with-affinity-values.yaml
new file mode 100644
index 0000000000..f5b9b53e73
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/ci/with-affinity-values.yaml
@@ -0,0 +1,16 @@
+affinity:
+ podAntiAffinity:
+ preferredDuringSchedulingIgnoredDuringExecution:
+ - podAffinityTerm:
+ labelSelector:
+ matchLabels:
+ app.kubernetes.io/instance: grafana-test
+ app.kubernetes.io/name: grafana
+ topologyKey: failure-domain.beta.kubernetes.io/zone
+ weight: 100
+ requiredDuringSchedulingIgnoredDuringExecution:
+ - labelSelector:
+ matchLabels:
+ app.kubernetes.io/instance: grafana-test
+ app.kubernetes.io/name: grafana
+ topologyKey: kubernetes.io/hostname
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/ci/with-dashboard-json-values.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/ci/with-dashboard-json-values.yaml
old mode 100755
new mode 100644
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/ci/with-dashboard-values.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/ci/with-dashboard-values.yaml
old mode 100755
new mode 100644
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/ci/with-extraconfigmapmounts-values.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/ci/with-extraconfigmapmounts-values.yaml
new file mode 100644
index 0000000000..5cc44a056a
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/ci/with-extraconfigmapmounts-values.yaml
@@ -0,0 +1,7 @@
+extraConfigmapMounts:
+ - name: '{{ include "grafana.fullname" . }}'
+ configMap: '{{ include "grafana.fullname" . }}'
+ mountPath: /var/lib/grafana/dashboards/test-dashboard.json
+ # This is not a realistic test, but for this we only care about extraConfigmapMounts not being empty and pointing to an existing ConfigMap
+ subPath: grafana.ini
+ readOnly: true
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/ci/with-image-renderer-values.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/ci/with-image-renderer-values.yaml
new file mode 100644
index 0000000000..32f3074347
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/ci/with-image-renderer-values.yaml
@@ -0,0 +1,19 @@
+podLabels:
+ customLableA: Aaaaa
+imageRenderer:
+ enabled: true
+ env:
+ RENDERING_ARGS: --disable-gpu,--window-size=1280x758
+ RENDERING_MODE: clustered
+ podLabels:
+ customLableB: Bbbbb
+ networkPolicy:
+ limitIngress: true
+ limitEgress: true
+ resources:
+ limits:
+ cpu: 1000m
+ memory: 1000Mi
+ requests:
+ cpu: 500m
+ memory: 50Mi
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/ci/with-persistence.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/ci/with-persistence.yaml
new file mode 100644
index 0000000000..b92ca02c9e
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/ci/with-persistence.yaml
@@ -0,0 +1,3 @@
+persistence:
+ type: pvc
+ enabled: true
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/dashboards/custom-dashboard.json b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/dashboards/custom-dashboard.json
old mode 100755
new mode 100644
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/NOTES.txt b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/NOTES.txt
old mode 100755
new mode 100644
index 6e1436e902..d86419fe23
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/NOTES.txt
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/NOTES.txt
@@ -1,15 +1,17 @@
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
+ kubectl get secret --namespace {{ include "grafana.namespace" . }} {{ .Values.admin.existingSecret | default (include "grafana.fullname" .) }} -o jsonpath="{.data.{{ .Values.admin.passwordKey | default "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
+ {{ include "grafana.fullname" . }}.{{ include "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:
@@ -23,24 +25,24 @@
Or grafana would always crash.
From outside the cluster, the server URL(s) are:
-{{- range .Values.ingress.hosts }}
+ {{- range .Values.ingress.hosts }}
http://{{ . }}
-{{- end }}
-{{ else }}
+ {{- 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}")
+ {{- if contains "NodePort" .Values.service.type }}
+ export NODE_PORT=$(kubectl get --namespace {{ include "grafana.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "grafana.fullname" . }})
+ export NODE_IP=$(kubectl get nodes --namespace {{ include "grafana.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
-{{ else if contains "LoadBalancer" .Values.service.type -}}
+ {{- 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}')
+ You can watch the status of by running 'kubectl get svc --namespace {{ include "grafana.namespace" . }} -w {{ include "grafana.fullname" . }}'
+ export SERVICE_IP=$(kubectl get svc --namespace {{ include "grafana.namespace" . }} {{ include "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={{ template "grafana.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
- kubectl --namespace {{ template "grafana.namespace" . }} port-forward $POD_NAME 3000
-{{- end }}
+ {{- else if contains "ClusterIP" .Values.service.type }}
+ export POD_NAME=$(kubectl get pods --namespace {{ include "grafana.namespace" . }} -l "app.kubernetes.io/name={{ include "grafana.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
+ kubectl --namespace {{ include "grafana.namespace" . }} port-forward $POD_NAME 3000
+ {{- end }}
{{- end }}
3. Login with the password from step 1 and the username: {{ .Values.adminUser }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/_helpers.tpl b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/_helpers.tpl
old mode 100755
new mode 100644
index cbe4f60866..ead2449e37
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/_helpers.tpl
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/_helpers.tpl
@@ -3,8 +3,8 @@
Expand the name of the chart.
*/}}
{{- define "grafana.name" -}}
-{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
+{{- end }}
{{/*
Create a default fully qualified app name.
@@ -12,54 +12,54 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
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 -}}
+{{- 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 -}}
+{{- 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 -}}
+{{- 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 -}}
+{{- 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 -}}
+{{- if .Values.namespaceOverride }}
+{{- .Values.namespaceOverride }}
+{{- else }}
+{{- .Release.Namespace }}
+{{- end }}
+{{- end }}
{{/*
Common labels
@@ -68,10 +68,13 @@ Common 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 }}
+app.kubernetes.io/version: {{ mustRegexReplaceAllLiteral "@sha.*" .Values.image.tag "" | default .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
-{{- end -}}
+{{- with .Values.extraLabels }}
+{{ toYaml . }}
+{{- end }}
+{{- end }}
{{/*
Selector labels
@@ -79,4 +82,146 @@ 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: {{ mustRegexReplaceAllLiteral "@sha.*" .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 Horizontal Pod Autoscaler.
+*/}}
+{{- define "grafana.hpa.apiVersion" -}}
+{{- if $.Capabilities.APIVersions.Has "autoscaling/v2/HorizontalPodAutoscaler" }}
+{{- print "autoscaling/v2" }}
+{{- else if $.Capabilities.APIVersions.Has "autoscaling/v2beta2/HorizontalPodAutoscaler" }}
+{{- print "autoscaling/v2beta2" }}
+{{- else }}
+{{- print "autoscaling/v2beta1" }}
+{{- end }}
+{{- end }}
+
+{{/*
+Return the appropriate apiVersion for podDisruptionBudget.
+*/}}
+{{- define "grafana.podDisruptionBudget.apiVersion" -}}
+{{- if $.Values.podDisruptionBudget.apiVersion }}
+{{- print $.Values.podDisruptionBudget.apiVersion }}
+{{- else 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 }}
+
+{{/*
+Formats imagePullSecrets. Input is (dict "root" . "imagePullSecrets" .{specific imagePullSecrets})
+*/}}
+{{- define "grafana.imagePullSecrets" -}}
+{{- $root := .root }}
+{{- range (concat .root.Values.global.imagePullSecrets .imagePullSecrets) }}
+{{- if eq (typeOf .) "map[string]interface {}" }}
+- {{ toYaml (dict "name" (tpl .name $root)) | trim }}
+{{- else }}
+- name: {{ tpl . $root }}
+{{- end }}
+{{- end }}
+{{- end }}
+
+
+{{/*
+ Checks whether or not the configSecret secret has to be created
+ */}}
+{{- define "grafana.shouldCreateConfigSecret" -}}
+{{- $secretFound := false -}}
+{{- range $key, $value := .Values.datasources }}
+ {{- if hasKey $value "secret" }}
+ {{- $secretFound = true}}
+ {{- end }}
+{{- end }}
+{{- range $key, $value := .Values.notifiers }}
+ {{- if hasKey $value "secret" }}
+ {{- $secretFound = true}}
+ {{- end }}
+{{- end }}
+{{- range $key, $value := .Values.alerting }}
+ {{- if (or (hasKey $value "secret") (hasKey $value "secretFile")) }}
+ {{- $secretFound = true}}
+ {{- end }}
+{{- end }}
+{{- $secretFound}}
{{- end -}}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/_pod.tpl b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/_pod.tpl
old mode 100755
new mode 100644
index 61cd6ee33b..466731fcb1
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/_pod.tpl
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/_pod.tpl
@@ -1,138 +1,792 @@
{{- define "grafana.pod" -}}
-{{- if .Values.schedulerName }}
-schedulerName: "{{ .Values.schedulerName }}"
+{{- $sts := list "sts" "StatefulSet" "statefulset" -}}
+{{- $root := . -}}
+{{- with .Values.schedulerName }}
+schedulerName: "{{ . }}"
{{- end }}
-serviceAccountName: {{ template "grafana.serviceAccountName" . }}
-{{- if .Values.schedulerName }}
-schedulerName: "{{ .Values.schedulerName }}"
-{{- end }}
-{{- if .Values.securityContext }}
+serviceAccountName: {{ include "grafana.serviceAccountName" . }}
+automountServiceAccountToken: {{ .Values.serviceAccount.autoMount }}
+{{- with .Values.securityContext }}
securityContext:
-{{ toYaml .Values.securityContext | indent 2 }}
+ {{- toYaml . | nindent 2 }}
+{{- end }}
+{{- with .Values.hostAliases }}
+hostAliases:
+ {{- toYaml . | nindent 2 }}
{{- end }}
-{{- if .Values.priorityClassName }}
-priorityClassName: {{ .Values.priorityClassName }}
+{{- with .Values.priorityClassName }}
+priorityClassName: {{ . }}
{{- end }}
-{{- if ( or .Values.persistence.enabled .Values.dashboards .Values.sidecar.datasources.enabled .Values.extraInitContainers) }}
+{{- if ( or .Values.persistence.enabled .Values.dashboards .Values.extraInitContainers (and .Values.sidecar.datasources.enabled .Values.sidecar.datasources.initDatasources) (and .Values.sidecar.notifiers.enabled .Values.sidecar.notifiers.initNotifiers)) }}
initContainers:
{{- end }}
{{- if ( and .Values.persistence.enabled .Values.initChownData.enabled ) }}
- name: init-chown-data
- image: "{{ .Values.initChownData.image.repository }}:{{ .Values.initChownData.image.tag }}"
+ {{- $registry := .Values.global.imageRegistry | default .Values.initChownData.image.registry -}}
+ {{- if .Values.initChownData.image.sha }}
+ image: "{{ $registry }}/{{ .Values.initChownData.image.repository }}:{{ .Values.initChownData.image.tag }}@sha256:{{ .Values.initChownData.image.sha }}"
+ {{- else }}
+ image: "{{ $registry }}/{{ .Values.initChownData.image.repository }}:{{ .Values.initChownData.image.tag }}"
+ {{- end }}
imagePullPolicy: {{ .Values.initChownData.image.pullPolicy }}
+ {{- with .Values.initChownData.securityContext }}
securityContext:
- runAsUser: 0
- command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.runAsUser }}", "/var/lib/grafana"]
+ {{- toYaml . | nindent 6 }}
+ {{- end }}
+ 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 }}
-{{- end }}
+ {{- with .Values.persistence.subPath }}
+ subPath: {{ tpl . $root }}
+ {{- end }}
{{- end }}
{{- if .Values.dashboards }}
- name: download-dashboards
- image: "{{ .Values.downloadDashboardsImage.repository }}:{{ .Values.downloadDashboardsImage.tag }}"
+ {{- $registry := .Values.global.imageRegistry | default .Values.downloadDashboardsImage.registry -}}
+ {{- if .Values.downloadDashboardsImage.sha }}
+ image: "{{ $registry }}/{{ .Values.downloadDashboardsImage.repository }}:{{ .Values.downloadDashboardsImage.tag }}@sha256:{{ .Values.downloadDashboardsImage.sha }}"
+ {{- else }}
+ image: "{{ $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 /etc/grafana/download_dashboards.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 }}
+ {{- range $key, $value := .Values.downloadDashboards.env }}
- name: "{{ $key }}"
value: "{{ $value }}"
-{{- end }}
+ {{- end }}
+ {{- range $key, $value := .Values.downloadDashboards.envValueFrom }}
+ - name: {{ $key | quote }}
+ valueFrom:
+ {{- tpl (toYaml $value) $ | nindent 10 }}
+ {{- end }}
+ {{- with .Values.downloadDashboards.securityContext }}
+ securityContext:
+ {{- toYaml . | nindent 6 }}
+ {{- end }}
+ {{- with .Values.downloadDashboards.envFromSecret }}
+ envFrom:
+ - secretRef:
+ name: {{ tpl . $root }}
+ {{- 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: {{ .Values.persistence.subPath }}
-{{- end }}
- {{- range .Values.extraSecretMounts }}
+ {{- with .Values.persistence.subPath }}
+ subPath: {{ tpl . $root }}
+ {{- end }}
+ {{- range .Values.extraSecretMounts }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
readOnly: {{ .readOnly }}
- {{- end }}
+ {{- end }}
{{- end }}
-{{- if .Values.sidecar.datasources.enabled }}
- - name: {{ template "grafana.name" . }}-sc-datasources
- image: "{{ .Values.sidecar.image }}"
+{{- if and .Values.sidecar.datasources.enabled .Values.sidecar.datasources.initDatasources }}
+ - name: {{ include "grafana.name" . }}-init-sc-datasources
+ {{- $registry := .Values.global.imageRegistry | default .Values.sidecar.image.registry -}}
+ {{- if .Values.sidecar.image.sha }}
+ image: "{{ $registry }}/{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}@sha256:{{ .Values.sidecar.image.sha }}"
+ {{- else }}
+ image: "{{ $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
+ value: "LIST"
- name: LABEL
value: "{{ .Values.sidecar.datasources.label }}"
+ {{- with .Values.sidecar.datasources.labelValue }}
+ - name: LABEL_VALUE
+ value: {{ quote . }}
+ {{- 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: "both"
+ value: {{ quote .Values.sidecar.datasources.resource }}
+ {{- with .Values.sidecar.enableUniqueFilenames }}
+ - name: UNIQUE_FILENAMES
+ value: "{{ . }}"
+ {{- end }}
{{- if .Values.sidecar.datasources.searchNamespace }}
- name: NAMESPACE
- value: "{{ .Values.sidecar.datasources.searchNamespace }}"
+ value: "{{ tpl (.Values.sidecar.datasources.searchNamespace | join ",") . }}"
{{- end }}
- {{- if .Values.sidecar.skipTlsVerify }}
+ {{- with .Values.sidecar.skipTlsVerify }}
- name: SKIP_TLS_VERIFY
- value: "{{ .Values.sidecar.skipTlsVerify }}"
+ value: "{{ . }}"
{{- 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 }}
+{{- if and .Values.sidecar.notifiers.enabled .Values.sidecar.notifiers.initNotifiers }}
+ - name: {{ include "grafana.name" . }}-init-sc-notifiers
+ {{- $registry := .Values.global.imageRegistry | default .Values.sidecar.image.registry -}}
+ {{- if .Values.sidecar.image.sha }}
+ image: "{{ $registry }}/{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}@sha256:{{ .Values.sidecar.image.sha }}"
+ {{- else }}
+ image: "{{ $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 }}"
+ {{- with .Values.sidecar.notifiers.labelValue }}
+ - name: LABEL_VALUE
+ value: {{ quote . }}
+ {{- 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 }}
+ {{- with .Values.sidecar.enableUniqueFilenames }}
+ - name: UNIQUE_FILENAMES
+ value: "{{ . }}"
+ {{- end }}
+ {{- with .Values.sidecar.notifiers.searchNamespace }}
+ - name: NAMESPACE
+ value: "{{ tpl (. | join ",") $root }}"
+ {{- end }}
+ {{- with .Values.sidecar.skipTlsVerify }}
+ - name: SKIP_TLS_VERIFY
+ value: "{{ . }}"
+ {{- 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 }}
-{{ toYaml .Values.extraInitContainers | indent 2 }}
+{{- with .Values.extraInitContainers }}
+ {{- tpl (toYaml .) $root | nindent 2 }}
{{- end }}
-{{- if .Values.image.pullSecrets }}
+{{- if or .Values.image.pullSecrets .Values.global.imagePullSecrets }}
imagePullSecrets:
-{{- range .Values.image.pullSecrets }}
- - name: {{ . }}
-{{- end}}
+ {{- include "grafana.imagePullSecrets" (dict "root" $root "imagePullSecrets" .Values.image.pullSecrets) | nindent 2 }}
+{{- end }}
+{{- if not .Values.enableKubeBackwardCompatibility }}
+enableServiceLinks: {{ .Values.enableServiceLinks }}
{{- end }}
containers:
+{{- if .Values.sidecar.alerts.enabled }}
+ - name: {{ include "grafana.name" . }}-sc-alerts
+ {{- $registry := .Values.global.imageRegistry | default .Values.sidecar.image.registry -}}
+ {{- if .Values.sidecar.image.sha }}
+ image: "{{ $registry }}/{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}@sha256:{{ .Values.sidecar.image.sha }}"
+ {{- else }}
+ image: "{{ $registry }}/{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}"
+ {{- end }}
+ imagePullPolicy: {{ .Values.sidecar.imagePullPolicy }}
+ env:
+ {{- range $key, $value := .Values.sidecar.alerts.env }}
+ - name: "{{ $key }}"
+ value: "{{ $value }}"
+ {{- end }}
+ {{- if .Values.sidecar.alerts.ignoreAlreadyProcessed }}
+ - name: IGNORE_ALREADY_PROCESSED
+ value: "true"
+ {{- end }}
+ - name: METHOD
+ value: {{ .Values.sidecar.alerts.watchMethod }}
+ - name: LABEL
+ value: "{{ .Values.sidecar.alerts.label }}"
+ {{- with .Values.sidecar.alerts.labelValue }}
+ - name: LABEL_VALUE
+ value: {{ quote . }}
+ {{- end }}
+ {{- if or .Values.sidecar.logLevel .Values.sidecar.alerts.logLevel }}
+ - name: LOG_LEVEL
+ value: {{ default .Values.sidecar.logLevel .Values.sidecar.alerts.logLevel }}
+ {{- end }}
+ - name: FOLDER
+ value: "/etc/grafana/provisioning/alerting"
+ - name: RESOURCE
+ value: {{ quote .Values.sidecar.alerts.resource }}
+ {{- with .Values.sidecar.enableUniqueFilenames }}
+ - name: UNIQUE_FILENAMES
+ value: "{{ . }}"
+ {{- end }}
+ {{- with .Values.sidecar.alerts.searchNamespace }}
+ - name: NAMESPACE
+ value: {{ . | join "," | quote }}
+ {{- end }}
+ {{- with .Values.sidecar.alerts.skipTlsVerify }}
+ - name: SKIP_TLS_VERIFY
+ value: {{ quote . }}
+ {{- end }}
+ {{- with .Values.sidecar.alerts.script }}
+ - name: SCRIPT
+ value: {{ quote . }}
+ {{- 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.alerts.skipReload }}
+ - name: REQ_URL
+ value: {{ .Values.sidecar.alerts.reloadURL }}
+ - name: REQ_METHOD
+ value: POST
+ {{- end }}
+ {{- if .Values.sidecar.alerts.watchServerTimeout }}
+ {{- if ne .Values.sidecar.alerts.watchMethod "WATCH" }}
+ {{- fail (printf "Cannot use .Values.sidecar.alerts.watchServerTimeout with .Values.sidecar.alerts.watchMethod %s" .Values.sidecar.alerts.watchMethod) }}
+ {{- end }}
+ - name: WATCH_SERVER_TIMEOUT
+ value: "{{ .Values.sidecar.alerts.watchServerTimeout }}"
+ {{- end }}
+ {{- if .Values.sidecar.alerts.watchClientTimeout }}
+ {{- if ne .Values.sidecar.alerts.watchMethod "WATCH" }}
+ {{- fail (printf "Cannot use .Values.sidecar.alerts.watchClientTimeout with .Values.sidecar.alerts.watchMethod %s" .Values.sidecar.alerts.watchMethod) }}
+ {{- end }}
+ - name: WATCH_CLIENT_TIMEOUT
+ value: "{{ .Values.sidecar.alerts.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-alerts-volume
+ mountPath: "/etc/grafana/provisioning/alerting"
+ {{- with .Values.sidecar.alerts.extraMounts }}
+ {{- toYaml . | trim | nindent 6 }}
+ {{- end }}
+{{- end}}
{{- if .Values.sidecar.dashboards.enabled }}
- - name: {{ template "grafana.name" . }}-sc-dashboard
- image: "{{ .Values.sidecar.image }}"
+ - name: {{ include "grafana.name" . }}-sc-dashboard
+ {{- $registry := .Values.global.imageRegistry | default .Values.sidecar.image.registry -}}
+ {{- if .Values.sidecar.image.sha }}
+ image: "{{ $registry }}/{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}@sha256:{{ .Values.sidecar.image.sha }}"
+ {{- else }}
+ image: "{{ $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 }}"
+ {{- with .Values.sidecar.dashboards.labelValue }}
+ - name: LABEL_VALUE
+ value: {{ quote . }}
+ {{- 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: "both"
- {{- if .Values.sidecar.dashboards.searchNamespace }}
+ value: {{ quote .Values.sidecar.dashboards.resource }}
+ {{- with .Values.sidecar.enableUniqueFilenames }}
+ - name: UNIQUE_FILENAMES
+ value: "{{ . }}"
+ {{- end }}
+ {{- with .Values.sidecar.dashboards.searchNamespace }}
- name: NAMESPACE
- value: "{{ .Values.sidecar.dashboards.searchNamespace }}"
+ value: "{{ tpl (. | join ",") $root }}"
{{- end }}
- {{- if .Values.sidecar.skipTlsVerify }}
+ {{- with .Values.sidecar.skipTlsVerify }}
- name: SKIP_TLS_VERIFY
- value: "{{ .Values.sidecar.skipTlsVerify }}"
+ value: "{{ . }}"
{{- end }}
+ {{- with .Values.sidecar.dashboards.folderAnnotation }}
+ - name: FOLDER_ANNOTATION
+ value: "{{ . }}"
+ {{- end }}
+ {{- with .Values.sidecar.dashboards.script }}
+ - name: SCRIPT
+ value: "{{ . }}"
+ {{- end }}
+ {{- if not .Values.sidecar.dashboards.skipReload }}
+ {{- 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 }}
+ - name: REQ_URL
+ value: {{ .Values.sidecar.dashboards.reloadURL }}
+ - name: REQ_METHOD
+ value: POST
+ {{- 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 | quote }}
+ {{- 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 }}
+ {{- with .Values.sidecar.dashboards.extraMounts }}
+ {{- toYaml . | trim | nindent 6 }}
+ {{- end }}
+{{- end}}
+{{- if .Values.sidecar.datasources.enabled }}
+ - name: {{ include "grafana.name" . }}-sc-datasources
+ {{- $registry := .Values.global.imageRegistry | default .Values.sidecar.image.registry -}}
+ {{- if .Values.sidecar.image.sha }}
+ image: "{{ $registry }}/{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}@sha256:{{ .Values.sidecar.image.sha }}"
+ {{- else }}
+ image: "{{ $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 }}"
+ {{- with .Values.sidecar.datasources.labelValue }}
+ - name: LABEL_VALUE
+ value: {{ quote . }}
+ {{- 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 }}
+ {{- with .Values.sidecar.enableUniqueFilenames }}
+ - name: UNIQUE_FILENAMES
+ value: "{{ . }}"
+ {{- end }}
+ {{- with .Values.sidecar.datasources.searchNamespace }}
+ - name: NAMESPACE
+ value: "{{ tpl (. | join ",") $root }}"
+ {{- end }}
+ {{- 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.notifiers.enabled }}
+ - name: {{ include "grafana.name" . }}-sc-notifiers
+ {{- $registry := .Values.global.imageRegistry | default .Values.sidecar.image.registry -}}
+ {{- if .Values.sidecar.image.sha }}
+ image: "{{ $registry }}/{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}@sha256:{{ .Values.sidecar.image.sha }}"
+ {{- else }}
+ image: "{{ $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: {{ .Values.sidecar.notifiers.watchMethod }}
+ - name: LABEL
+ value: "{{ .Values.sidecar.notifiers.label }}"
+ {{- with .Values.sidecar.notifiers.labelValue }}
+ - name: LABEL_VALUE
+ value: {{ quote . }}
+ {{- 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 }}
+ {{- with .Values.sidecar.notifiers.searchNamespace }}
+ - name: NAMESPACE
+ value: "{{ tpl (. | join ",") $root }}"
+ {{- end }}
+ {{- with .Values.sidecar.skipTlsVerify }}
+ - name: SKIP_TLS_VERIFY
+ value: "{{ . }}"
+ {{- end }}
+ {{- if .Values.sidecar.notifiers.script }}
+ - name: SCRIPT
+ value: "{{ .Values.sidecar.notifiers.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.notifiers.skipReload }}
+ - name: REQ_URL
+ value: {{ .Values.sidecar.notifiers.reloadURL }}
+ - name: REQ_METHOD
+ value: POST
+ {{- end }}
+ {{- if .Values.sidecar.notifiers.watchServerTimeout }}
+ {{- if ne .Values.sidecar.notifiers.watchMethod "WATCH" }}
+ {{- fail (printf "Cannot use .Values.sidecar.notifiers.watchServerTimeout with .Values.sidecar.notifiers.watchMethod %s" .Values.sidecar.notifiers.watchMethod) }}
+ {{- end }}
+ - name: WATCH_SERVER_TIMEOUT
+ value: "{{ .Values.sidecar.notifiers.watchServerTimeout }}"
+ {{- end }}
+ {{- if .Values.sidecar.notifiers.watchClientTimeout }}
+ {{- if ne .Values.sidecar.notifiers.watchMethod "WATCH" }}
+ {{- fail (printf "Cannot use .Values.sidecar.notifiers.watchClientTimeout with .Values.sidecar.notifiers.watchMethod %s" .Values.sidecar.notifiers.watchMethod) }}
+ {{- end }}
+ - name: WATCH_CLIENT_TIMEOUT
+ value: "{{ .Values.sidecar.notifiers.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-notifiers-volume
+ mountPath: "/etc/grafana/provisioning/notifiers"
+{{- end}}
+{{- if .Values.sidecar.plugins.enabled }}
+ - name: {{ include "grafana.name" . }}-sc-plugins
+ {{- $registry := .Values.global.imageRegistry | default .Values.sidecar.image.registry -}}
+ {{- if .Values.sidecar.image.sha }}
+ image: "{{ $registry }}/{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}@sha256:{{ .Values.sidecar.image.sha }}"
+ {{- else }}
+ image: "{{ $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 }}
+ {{- with .Values.sidecar.enableUniqueFilenames }}
+ - name: UNIQUE_FILENAMES
+ value: "{{ . }}"
+ {{- end }}
+ {{- with .Values.sidecar.plugins.searchNamespace }}
+ - name: NAMESPACE
+ value: "{{ tpl (. | join ",") $root }}"
+ {{- end }}
+ {{- with .Values.sidecar.plugins.script }}
+ - name: SCRIPT
+ value: "{{ . }}"
+ {{- end }}
+ {{- with .Values.sidecar.skipTlsVerify }}
+ - name: SKIP_TLS_VERIFY
+ value: "{{ . }}"
+ {{- 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 }}
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
+ {{- $registry := .Values.global.imageRegistry | default .Values.image.registry -}}
+ {{- if .Values.image.sha }}
+ image: "{{ $registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}@sha256:{{ .Values.image.sha }}"
+ {{- else }}
+ image: "{{ $registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
+ {{- end }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
- {{- if .Values.command }}
+ {{- if .Values.command }}
command:
{{- range .Values.command }}
- - {{ . }}
+ - {{ . | quote }}
+ {{- end }}
+ {{- end }}
+ {{- if .Values.args }}
+ args:
+ {{- range .Values.args }}
+ - {{ . | quote }}
+ {{- end }}
+ {{- end }}
+ {{- with .Values.containerSecurityContext }}
+ securityContext:
+ {{- toYaml . | nindent 6 }}
{{- end }}
- {{- end}}
volumeMounts:
- name: config
mountPath: "/etc/grafana/grafana.ini"
@@ -143,104 +797,136 @@ containers:
subPath: ldap.toml
{{- end }}
{{- range .Values.extraConfigmapMounts }}
- - name: {{ .name }}
- mountPath: {{ .mountPath }}
- subPath: {{ .subPath | default "" }}
+ - name: {{ tpl .name $root }}
+ mountPath: {{ tpl .mountPath $root }}
+ subPath: {{ tpl (.subPath | default "") $root }}
readOnly: {{ .readOnly }}
{{- end }}
- name: storage
mountPath: "/var/lib/grafana"
-{{- if .Values.persistence.subPath }}
- subPath: {{ .Values.persistence.subPath }}
-{{- end }}
-{{- if .Values.dashboards }}
-{{- range $provider, $dashboards := .Values.dashboards }}
-{{- range $key, $value := $dashboards }}
-{{- if (or (hasKey $value "json") (hasKey $value "file")) }}
+ {{- with .Values.persistence.subPath }}
+ subPath: {{ tpl . $root }}
+ {{- end }}
+ {{- with .Values.dashboards }}
+ {{- range $provider, $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) }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- with .Values.dashboardsConfigMaps }}
+ {{- range (keys . | sortAlpha) }}
- name: dashboards-{{ . }}
mountPath: "/var/lib/grafana/dashboards/{{ . }}"
-{{- end }}
-{{- end }}
-{{- if .Values.datasources }}
+ {{- end }}
+ {{- end }}
+ {{- with .Values.datasources }}
+ {{- range (keys . | sortAlpha) }}
- name: config
- mountPath: "/etc/grafana/provisioning/datasources/datasources.yaml"
- subPath: datasources.yaml
-{{- end }}
-{{- if .Values.notifiers }}
+ mountPath: "/etc/grafana/provisioning/datasources/{{ . }}"
+ subPath: {{ . | quote }}
+ {{- end }}
+ {{- end }}
+ {{- with .Values.notifiers }}
+ {{- range (keys . | sortAlpha) }}
- name: config
- mountPath: "/etc/grafana/provisioning/notifiers/notifiers.yaml"
- subPath: notifiers.yaml
-{{- end }}
-{{- if .Values.dashboardProviders }}
+ mountPath: "/etc/grafana/provisioning/notifiers/{{ . }}"
+ subPath: {{ . | quote }}
+ {{- end }}
+ {{- end }}
+ {{- with .Values.alerting }}
+ {{- range (keys . | sortAlpha) }}
- name: config
- mountPath: "/etc/grafana/provisioning/dashboards/dashboardproviders.yaml"
- subPath: dashboardproviders.yaml
-{{- end }}
-{{- if .Values.sidecar.dashboards.enabled }}
+ mountPath: "/etc/grafana/provisioning/alerting/{{ . }}"
+ subPath: {{ . | quote }}
+ {{- end }}
+ {{- end }}
+ {{- with .Values.dashboardProviders }}
+ {{- range (keys . | sortAlpha) }}
+ - name: config
+ mountPath: "/etc/grafana/provisioning/dashboards/{{ . }}"
+ subPath: {{ . | quote }}
+ {{- end }}
+ {{- end }}
+ {{- with .Values.sidecar.alerts.enabled }}
+ - name: sc-alerts-volume
+ mountPath: "/etc/grafana/provisioning/alerting"
+ {{- end}}
+ {{- if .Values.sidecar.dashboards.enabled }}
- name: sc-dashboard-volume
mountPath: {{ .Values.sidecar.dashboards.folder | quote }}
-{{ if .Values.sidecar.dashboards.SCProvider }}
+ {{- 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 }}
+ {{- end}}
+ {{- end}}
+ {{- if .Values.sidecar.datasources.enabled }}
- name: sc-datasources-volume
mountPath: "/etc/grafana/provisioning/datasources"
-{{- end}}
- {{- range .Values.extraSecretMounts }}
+ {{- 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 }}
+ {{- end }}
+ {{- range .Values.extraVolumeMounts }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
subPath: {{ .subPath | default "" }}
readOnly: {{ .readOnly }}
- {{- end }}
- {{- range .Values.extraEmptyDirMounts }}
+ {{- end }}
+ {{- range .Values.extraEmptyDirMounts }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
- {{- end }}
+ {{- end }}
ports:
- - name: {{ .Values.service.portName }}
- containerPort: {{ .Values.service.port }}
- protocol: TCP
- name: {{ .Values.podPortName }}
- containerPort: 3000
+ containerPort: {{ .Values.service.targetPort }}
protocol: TCP
+ - name: {{ .Values.gossipPortName }}-tcp
+ containerPort: 9094
+ protocol: TCP
+ - name: {{ .Values.gossipPortName }}-udp
+ containerPort: 9094
+ protocol: UDP
env:
- {{- if not .Values.env.GF_SECURITY_ADMIN_USER }}
+ - name: POD_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
+ {{- 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) }}
+ {{- 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 }}
- name: GF_INSTALL_PLUGINS
valueFrom:
configMapKeyRef:
- name: {{ template "grafana.fullname" . }}
+ name: {{ include "grafana.fullname" . }}
key: plugins
{{- end }}
{{- if .Values.smtp.existingSecret }}
@@ -255,69 +941,111 @@ containers:
name: {{ .Values.smtp.existingSecret }}
key: {{ .Values.smtp.passwordKey | default "password" }}
{{- end }}
- {{- range $key, $value := .Values.envValueFrom }}
+ {{- if .Values.imageRenderer.enabled }}
+ - name: GF_RENDERING_SERVER_URL
+ value: http://{{ include "grafana.fullname" . }}-image-renderer.{{ include "grafana.namespace" . }}:{{ .Values.imageRenderer.service.port }}/render
+ - name: GF_RENDERING_CALLBACK_URL
+ value: {{ .Values.imageRenderer.grafanaProtocol }}://{{ include "grafana.fullname" . }}.{{ include "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:
-{{ toYaml $value | indent 10 }}
- {{- end }}
-{{- range $key, $value := .Values.env }}
- - name: "{{ $key }}"
- value: "{{ $value }}"
-{{- end }}
- {{- if .Values.envFromSecret }}
+ {{- tpl (toYaml $value) $ | nindent 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 }}
- envFrom:
+ {{- end }}
+ {{- if .Values.envRenderSecret }}
- secretRef:
- name: {{ template "grafana.fullname" . }}-env
+ name: {{ include "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 .Values.livenessProbe | indent 6 }}
+ {{- toYaml . | nindent 6 }}
+ {{- end }}
+ {{- with .Values.readinessProbe }}
readinessProbe:
-{{ toYaml .Values.readinessProbe | indent 6 }}
+ {{- toYaml . | nindent 6 }}
+ {{- end }}
+ {{- with .Values.lifecycleHooks }}
+ lifecycle:
+ {{- tpl (toYaml .) $root | nindent 6 }}
+ {{- end }}
+ {{- with .Values.resources }}
resources:
-{{ toYaml .Values.resources | indent 6 }}
+ {{- toYaml . | nindent 6 }}
+ {{- end }}
{{- with .Values.extraContainers }}
-{{ tpl . $ | indent 2 }}
+ {{- tpl . $ | nindent 2 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
-{{ toYaml . | indent 2 }}
+ {{- toYaml . | nindent 2 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
-{{ toYaml . | indent 2 }}
+ {{- tpl (toYaml .) $root | nindent 2 }}
+{{- end }}
+{{- with .Values.topologySpreadConstraints }}
+topologySpreadConstraints:
+ {{- toYaml . | nindent 2 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
-{{ toYaml . | indent 2 }}
+ {{- toYaml . | nindent 2 }}
{{- end }}
volumes:
- name: config
configMap:
- name: {{ template "grafana.fullname" . }}
-{{- range .Values.extraConfigmapMounts }}
- - name: {{ .name }}
+ name: {{ include "grafana.fullname" . }}
+ {{- range .Values.extraConfigmapMounts }}
+ - name: {{ tpl .name $root }}
configMap:
- name: {{ .configMap }}
-{{- end }}
+ name: {{ tpl .configMap $root }}
+ {{- with .items }}
+ items:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
{{- if .Values.dashboards }}
- {{- range (keys .Values.dashboards | sortAlpha) }}
+ {{- range (keys .Values.dashboards | sortAlpha) }}
- name: dashboards-{{ . }}
configMap:
- name: {{ template "grafana.fullname" $ }}-dashboards-{{ . }}
- {{- end }}
+ name: {{ include "grafana.fullname" $ }}-dashboards-{{ . }}
+ {{- end }}
{{- end }}
{{- if .Values.dashboardsConfigMaps }}
- {{ $root := . }}
- {{- range $provider, $name := .Values.dashboardsConfigMaps }}
+ {{- range $provider, $name := .Values.dashboardsConfigMaps }}
- name: dashboards-{{ $provider }}
configMap:
name: {{ tpl $name $root }}
- {{- end }}
+ {{- end }}
{{- end }}
{{- if .Values.ldap.enabled }}
- name: ldap
@@ -325,48 +1053,124 @@ volumes:
{{- if .Values.ldap.existingSecret }}
secretName: {{ .Values.ldap.existingSecret }}
{{- else }}
- secretName: {{ template "grafana.fullname" . }}
+ secretName: {{ include "grafana.fullname" . }}
{{- end }}
items:
- key: ldap-toml
path: ldap.toml
{{- end }}
-{{- if and .Values.persistence.enabled (eq .Values.persistence.type "pvc") }}
+ {{- if and .Values.persistence.enabled (eq .Values.persistence.type "pvc") }}
- name: storage
persistentVolumeClaim:
- claimName: {{ .Values.persistence.existingClaim | default (include "grafana.fullname" .) }}
-{{- else if and .Values.persistence.enabled (eq .Values.persistence.type "statefulset") }}
-# nothing
-{{- else }}
+ claimName: {{ tpl (.Values.persistence.existingClaim | default (include "grafana.fullname" .)) . }}
+ {{- else if and .Values.persistence.enabled (has .Values.persistence.type $sts) }}
+ {{/* nothing */}}
+ {{- else }}
- name: storage
+ {{- if .Values.persistence.inMemory.enabled }}
+ emptyDir:
+ medium: Memory
+ {{- with .Values.persistence.inMemory.sizeLimit }}
+ sizeLimit: {{ . }}
+ {{- end }}
+ {{- else }}
emptyDir: {}
-{{- end -}}
-{{- if .Values.sidecar.dashboards.enabled }}
+ {{- end }}
+ {{- end }}
+ {{- if .Values.sidecar.alerts.enabled }}
+ - name: sc-alerts-volume
+ emptyDir:
+ {{- with .Values.sidecar.alerts.sizeLimit }}
+ sizeLimit: {{ . }}
+ {{- else }}
+ {}
+ {{- end }}
+ {{- end }}
+ {{- if .Values.sidecar.dashboards.enabled }}
- name: sc-dashboard-volume
- emptyDir: {}
-{{- if .Values.sidecar.dashboards.SCProvider }}
+ emptyDir:
+ {{- with .Values.sidecar.dashboards.sizeLimit }}
+ sizeLimit: {{ . }}
+ {{- else }}
+ {}
+ {{- 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: {{ include "grafana.fullname" . }}-config-dashboards
+ {{- end }}
+ {{- end }}
+ {{- if .Values.sidecar.datasources.enabled }}
- name: sc-datasources-volume
- emptyDir: {}
-{{- end -}}
-{{- range .Values.extraSecretMounts }}
+ emptyDir:
+ {{- with .Values.sidecar.datasources.sizeLimit }}
+ sizeLimit: {{ . }}
+ {{- else }}
+ {}
+ {{- end }}
+ {{- end }}
+ {{- if .Values.sidecar.plugins.enabled }}
+ - name: sc-plugins-volume
+ emptyDir:
+ {{- with .Values.sidecar.plugins.sizeLimit }}
+ sizeLimit: {{ . }}
+ {{- else }}
+ {}
+ {{- end }}
+ {{- end }}
+ {{- if .Values.sidecar.notifiers.enabled }}
+ - name: sc-notifiers-volume
+ emptyDir:
+ {{- with .Values.sidecar.notifiers.sizeLimit }}
+ sizeLimit: {{ . }}
+ {{- else }}
+ {}
+ {{- end }}
+ {{- end }}
+ {{- range .Values.extraSecretMounts }}
+ {{- if .secretName }}
- name: {{ .name }}
secret:
secretName: {{ .secretName }}
defaultMode: {{ .defaultMode }}
-{{- end }}
-{{- range .Values.extraVolumeMounts }}
+ {{- with .items }}
+ items:
+ {{- toYaml . | nindent 8 }}
+ {{- 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.extraVolumes }}
- name: {{ .name }}
+ {{- if .existingClaim }}
persistentVolumeClaim:
claimName: {{ .existingClaim }}
-{{- end }}
-{{- range .Values.extraEmptyDirMounts }}
+ {{- else if .hostPath }}
+ hostPath:
+ {{ toYaml .hostPath | nindent 6 }}
+ {{- else if .csi }}
+ csi:
+ {{- toYaml .data | nindent 6 }}
+ {{- else if .configMap }}
+ configMap:
+ {{- toYaml .configMap | nindent 6 }}
+ {{- else }}
+ emptyDir: {}
+ {{- end }}
+ {{- end }}
+ {{- range .Values.extraEmptyDirMounts }}
- name: {{ .name }}
emptyDir: {}
-{{- end -}}
+ {{- end }}
+ {{- with .Values.extraContainerVolumes }}
+ {{- tpl (toYaml .) $root | nindent 2 }}
+ {{- end }}
{{- end }}
+
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/clusterrole.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/clusterrole.yaml
old mode 100755
new mode 100644
index b3ef6ab3bf..3af4b62b63
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/clusterrole.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/clusterrole.yaml
@@ -1,24 +1,24 @@
-{{- if and .Values.rbac.create (not .Values.rbac.namespaced) }}
+{{- if and .Values.rbac.create (or (not .Values.rbac.namespaced) .Values.rbac.extraClusterRoleRules) (not .Values.rbac.useExistingClusterRole) }}
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
labels:
{{- include "grafana.labels" . | nindent 4 }}
-{{- with .Values.annotations }}
+ {{- with .Values.annotations }}
annotations:
-{{ toYaml . | indent 4 }}
-{{- end }}
- name: {{ template "grafana.fullname" . }}-clusterrole
-{{- if or .Values.sidecar.dashboards.enabled (or .Values.sidecar.datasources.enabled .Values.rbac.extraClusterRoleRules) }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+ name: {{ include "grafana.fullname" . }}-clusterrole
+{{- if or .Values.sidecar.dashboards.enabled .Values.rbac.extraClusterRoleRules .Values.sidecar.datasources.enabled .Values.sidecar.plugins.enabled .Values.sidecar.alerts.enabled }}
rules:
-{{- if or .Values.sidecar.dashboards.enabled .Values.sidecar.datasources.enabled }}
-- apiGroups: [""] # "" indicates the core API group
- resources: ["configmaps", "secrets"]
- verbs: ["get", "watch", "list"]
-{{- end}}
-{{- with .Values.rbac.extraClusterRoleRules }}
-{{ toYaml . | indent 0 }}
-{{- end}}
+ {{- if or .Values.sidecar.dashboards.enabled .Values.sidecar.datasources.enabled .Values.sidecar.plugins.enabled .Values.sidecar.alerts.enabled }}
+ - apiGroups: [""] # "" indicates the core API group
+ resources: ["configmaps", "secrets"]
+ verbs: ["get", "watch", "list"]
+ {{- end}}
+ {{- with .Values.rbac.extraClusterRoleRules }}
+ {{- toYaml . | nindent 2 }}
+ {{- end}}
{{- else }}
rules: []
{{- end}}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/clusterrolebinding.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/clusterrolebinding.yaml
old mode 100755
new mode 100644
index 8ee08b2aa9..bda9431a2c
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/clusterrolebinding.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/clusterrolebinding.yaml
@@ -1,20 +1,24 @@
-{{- if and .Values.rbac.create (not .Values.rbac.namespaced) }}
+{{- if and .Values.rbac.create (or (not .Values.rbac.namespaced) .Values.rbac.extraClusterRoleRules) }}
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
- name: {{ template "grafana.fullname" . }}-clusterrolebinding
+ name: {{ include "grafana.fullname" . }}-clusterrolebinding
labels:
{{- include "grafana.labels" . | nindent 4 }}
-{{- with .Values.annotations }}
+ {{- with .Values.annotations }}
annotations:
-{{ toYaml . | indent 4 }}
-{{- end }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
subjects:
- kind: ServiceAccount
- name: {{ template "grafana.serviceAccountName" . }}
- namespace: {{ template "grafana.namespace" . }}
+ name: {{ include "grafana.serviceAccountName" . }}
+ namespace: {{ include "grafana.namespace" . }}
roleRef:
kind: ClusterRole
- name: {{ template "grafana.fullname" . }}-clusterrole
+ {{- if .Values.rbac.useExistingClusterRole }}
+ name: {{ .Values.rbac.useExistingClusterRole }}
+ {{- else }}
+ name: {{ include "grafana.fullname" . }}-clusterrole
+ {{- end }}
apiGroup: rbac.authorization.k8s.io
-{{- end -}}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/configSecret.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/configSecret.yaml
new file mode 100644
index 0000000000..f8937ccc7a
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/configSecret.yaml
@@ -0,0 +1,43 @@
+{{- $createConfigSecret := eq (include "grafana.shouldCreateConfigSecret" .) "true" -}}
+{{- if and .Values.createConfigmap $createConfigSecret }}
+{{- $files := .Files }}
+{{- $root := . -}}
+apiVersion: v1
+kind: Secret
+metadata:
+ name: "{{ include "grafana.fullname" . }}-config-secret"
+ namespace: {{ include "grafana.namespace" . }}
+ labels:
+ {{- include "grafana.labels" . | nindent 4 }}
+ {{- with .Values.annotations }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+data:
+{{- range $key, $value := .Values.alerting }}
+ {{- if (hasKey $value "secretFile") }}
+ {{- $key | nindent 2 }}:
+ {{- toYaml ( $files.Get $value.secretFile ) | b64enc | nindent 4}}
+ {{/* as of https://helm.sh/docs/chart_template_guide/accessing_files/ this will only work if you fork this chart and add files to it*/}}
+ {{- end }}
+{{- end }}
+stringData:
+{{- range $key, $value := .Values.datasources }}
+{{- if (hasKey $value "secret") }}
+{{- $key | nindent 2 }}: |
+ {{- tpl (toYaml $value | nindent 4) $root }}
+{{- end }}
+{{- end }}
+{{- range $key, $value := .Values.notifiers }}
+{{- if (hasKey $value "secret") }}
+{{- $key | nindent 2 }}: |
+ {{- tpl (toYaml $value | nindent 4) $root }}
+{{- end }}
+{{- end }}
+{{- range $key, $value := .Values.alerting }}
+{{ if (hasKey $value "secret") }}
+ {{- $key | nindent 2 }}: |
+ {{- tpl (toYaml $value.secret | nindent 4) $root }}
+ {{- end }}
+{{- end }}
+{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/configmap-dashboard-provider.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/configmap-dashboard-provider.yaml
old mode 100755
new mode 100644
index af5d464b68..1f706a8bbf
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/configmap-dashboard-provider.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/configmap-dashboard-provider.yaml
@@ -1,25 +1,29 @@
-{{- if .Values.sidecar.dashboards.enabled }}
+{{- if and .Values.sidecar.dashboards.enabled .Values.sidecar.dashboards.SCProvider }}
apiVersion: v1
kind: ConfigMap
metadata:
labels:
{{- include "grafana.labels" . | nindent 4 }}
-{{- with .Values.annotations }}
+ {{- with .Values.annotations }}
annotations:
-{{ toYaml . | indent 4 }}
-{{- end }}
- name: {{ template "grafana.fullname" . }}-config-dashboards
- namespace: {{ template "grafana.namespace" . }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+ name: {{ include "grafana.fullname" . }}-config-dashboards
+ namespace: {{ include "grafana.namespace" . }}
data:
provider.yaml: |-
apiVersion: 1
providers:
- - name: '{{ .Values.sidecar.dashboards.provider.name }}'
- orgId: {{ .Values.sidecar.dashboards.provider.orgid }}
- folder: '{{ .Values.sidecar.dashboards.provider.folder }}'
- type: {{ .Values.sidecar.dashboards.provider.type }}
- disableDeletion: {{ .Values.sidecar.dashboards.provider.disableDelete }}
- allowUiUpdates: {{ .Values.sidecar.dashboards.provider.allowUiUpdates }}
- options:
- path: {{ .Values.sidecar.dashboards.folder }}{{- with .Values.sidecar.dashboards.defaultFolderName }}/{{ . }}{{- end }}
-{{- end}}
+ - 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/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/configmap.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/configmap.yaml
old mode 100755
new mode 100644
index a86638b8fa..7b837d90b1
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/configmap.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/configmap.yaml
@@ -1,43 +1,78 @@
+{{- if .Values.createConfigmap }}
+{{- $files := .Files }}
+{{- $root := . -}}
apiVersion: v1
kind: ConfigMap
metadata:
- name: {{ template "grafana.fullname" . }}
- namespace: {{ template "grafana.namespace" . }}
+ name: {{ include "grafana.fullname" . }}
+ namespace: {{ include "grafana.namespace" . }}
labels:
{{- include "grafana.labels" . | nindent 4 }}
+ {{- with .Values.annotations }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
data:
-{{- if .Values.plugins }}
- plugins: {{ join "," .Values.plugins }}
-{{- end }}
+ {{- with .Values.plugins }}
+ plugins: {{ join "," . }}
+ {{- end }}
grafana.ini: |
-{{- range $key, $value := index .Values "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 }}
+ {{- end }}
-{{- if .Values.datasources }}
-{{ $root := . }}
{{- range $key, $value := .Values.datasources }}
- {{ $key }}: |
-{{ tpl (toYaml $value | indent 4) $root }}
- {{- end -}}
-{{- end -}}
+ {{- if not (hasKey $value "secret") }}
+ {{- $key | nindent 2 }}: |
+ {{- tpl (toYaml $value | nindent 4) $root }}
+ {{- end }}
+ {{- end }}
-{{- if .Values.notifiers }}
{{- range $key, $value := .Values.notifiers }}
- {{ $key }}: |
-{{ toYaml $value | indent 4 }}
- {{- end -}}
-{{- end -}}
+ {{- if not (hasKey $value "secret") }}
+ {{- $key | nindent 2 }}: |
+ {{- toYaml $value | nindent 4 }}
+ {{- end }}
+ {{- end }}
+
+ {{- range $key, $value := .Values.alerting }}
+ {{- if (hasKey $value "file") }}
+ {{- $key | nindent 2 }}:
+ {{- toYaml ( $files.Get $value.file ) | nindent 4}}
+ {{- else if (or (hasKey $value "secret") (hasKey $value "secretFile"))}}
+ {{/* will be stored inside secret generated by "configSecret.yaml"*/}}
+ {{- else }}
+ {{- $key | nindent 2 }}: |
+ {{- tpl (toYaml $value | nindent 4) $root }}
+ {{- end }}
+ {{- end }}
-{{- if .Values.dashboardProviders }}
{{- range $key, $value := .Values.dashboardProviders }}
- {{ $key }}: |
-{{ toYaml $value | indent 4 }}
- {{- end -}}
-{{- end -}}
+ {{- $key | nindent 2 }}: |
+ {{- toYaml $value | nindent 4 }}
+ {{- end }}
{{- if .Values.dashboards }}
download_dashboards.sh: |
@@ -50,7 +85,7 @@ data:
{{- end }}
{{- end }}
{{- end }}
-
+ {{ $dashboardProviders := .Values.dashboardProviders }}
{{- range $provider, $dashboards := .Values.dashboards }}
{{- range $key, $value := $dashboards }}
{{- if (or (hasKey $value "gnetId") (hasKey $value "url")) }}
@@ -58,12 +93,52 @@ data:
--connect-timeout 60 \
--max-time 60 \
{{- if not $value.b64content }}
+ {{- if not $value.acceptHeader }}
-H "Accept: application/json" \
+ {{- else }}
+ -H "Accept: {{ $value.acceptHeader }}" \
+ {{- end }}
+ {{- if $value.token }}
+ -H "Authorization: token {{ $value.token }}" \
+ {{- end }}
+ {{- if $value.bearerToken }}
+ -H "Authorization: Bearer {{ $value.bearerToken }}" \
+ {{- end }}
+ {{- if $value.basic }}
+ -H "Authorization: Basic {{ $value.basic }}" \
+ {{- 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 }}
+ {{- if kindIs "string" $value.datasource }}
+ | sed '/-- .* --/! s/"datasource":.*,/"datasource": "{{ $value.datasource }}",/g' \
+ {{- end }}
+ {{- if kindIs "slice" $value.datasource }}
+ {{- range $value.datasource }}
+ | sed '/-- .* --/! s/${{"{"}}{{ .name }}}/{{ .value }}/g' \
+ {{- end }}
+ {{- end }}
+ {{- end }}
+ {{- if $value.b64content }}
+ | base64 -d \
+ {{- end }}
+ > "{{- if $dpPath -}}{{ $dpPath }}{{- else -}}/var/lib/grafana/dashboards/{{ $provider }}{{- end -}}/{{ $key }}.json"
{{ 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
- {{- end -}}
{{- end }}
{{- end }}
{{- end }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/dashboards-json-configmap.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/dashboards-json-configmap.yaml
old mode 100755
new mode 100644
index 59e0be6415..b96ce72026
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/dashboards-json-configmap.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/dashboards-json-configmap.yaml
@@ -4,25 +4,28 @@
apiVersion: v1
kind: ConfigMap
metadata:
- name: {{ template "grafana.fullname" $ }}-dashboards-{{ $provider }}
- namespace: {{ template "grafana.namespace" $ }}
+ name: {{ include "grafana.fullname" $ }}-dashboards-{{ $provider }}
+ namespace: {{ include "grafana.namespace" $ }}
labels:
{{- include "grafana.labels" $ | nindent 4 }}
dashboard-provider: {{ $provider }}
+ {{- if $.Values.sidecar.dashboards.enabled }}
+ {{ $.Values.sidecar.dashboards.label }}: {{ $.Values.sidecar.dashboards.labelValue | quote }}
+ {{- end }}
{{- 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" }}
+ {{- print $key | nindent 2 }}.json:
+ {{- if hasKey $value "json" }}
|-
-{{ $value.json | indent 6 }}
-{{- end }}
-{{- if hasKey $value "file" }}
-{{ toYaml ( $files.Get $value.file ) | indent 4}}
-{{- end }}
+ {{- $value.json | nindent 6 }}
+ {{- end }}
+ {{- if hasKey $value "file" }}
+ {{- toYaml ( $files.Get $value.file ) | nindent 4}}
+ {{- end }}
{{- end }}
{{- end }}
{{- if not $dashboardFound }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/deployment.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/deployment.yaml
old mode 100755
new mode 100644
index 27a4b76d47..bfa26bb40e
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/deployment.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/deployment.yaml
@@ -1,44 +1,51 @@
-{{ 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:
- name: {{ template "grafana.fullname" . }}
- namespace: {{ template "grafana.namespace" . }}
+ name: {{ include "grafana.fullname" . }}
+ namespace: {{ include "grafana.namespace" . }}
labels:
{{- include "grafana.labels" . | nindent 4 }}
-{{- if .Values.labels }}
-{{ toYaml .Values.labels | indent 4 }}
-{{- end }}
-{{- with .Values.annotations }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+ {{- with .Values.annotations }}
annotations:
-{{ toYaml . | indent 4 }}
-{{- end }}
+ {{- toYaml . | nindent 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 }}
+ {{- with .Values.deploymentStrategy }}
strategy:
-{{ toYaml . | trim | indent 4 }}
-{{- end }}
+ {{- toYaml . | trim | nindent 4 }}
+ {{- end }}
template:
metadata:
labels:
{{- include "grafana.selectorLabels" . | nindent 8 }}
-{{- with .Values.podLabels }}
-{{ toYaml . | indent 8 }}
-{{- end }}
+ {{- with .Values.podLabels }}
+ {{- toYaml . | nindent 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 (not .Values.admin.existingSecret) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD__FILE) }}
+ {{- 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 }}
+ {{- end }}
+ {{- if .Values.envRenderSecret }}
+ checksum/secret-env: {{ include (print $.Template.BasePath "/secret-env.yaml") . | sha256sum }}
+ {{- end }}
+ kubectl.kubernetes.io/default-container: {{ .Chart.Name }}
+ {{- with .Values.podAnnotations }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
spec:
{{- include "grafana.pod" . | nindent 6 }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/extra-manifests.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/extra-manifests.yaml
new file mode 100644
index 0000000000..a9bb3b6ba8
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/extra-manifests.yaml
@@ -0,0 +1,4 @@
+{{ range .Values.extraObjects }}
+---
+{{ tpl (toYaml .) $ }}
+{{ end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/headless-service.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/headless-service.yaml
old mode 100755
new mode 100644
index 2fa816e045..3028589d32
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/headless-service.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/headless-service.yaml
@@ -1,18 +1,22 @@
-{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) (eq .Values.persistence.type "statefulset")}}
+{{- $sts := list "sts" "StatefulSet" "statefulset" -}}
+{{- if or .Values.headlessService (and .Values.persistence.enabled (not .Values.persistence.existingClaim) (has .Values.persistence.type $sts)) }}
apiVersion: v1
kind: Service
metadata:
- name: {{ template "grafana.fullname" . }}-headless
- namespace: {{ template "grafana.namespace" . }}
+ name: {{ include "grafana.fullname" . }}-headless
+ namespace: {{ include "grafana.namespace" . }}
labels:
{{- include "grafana.labels" . | nindent 4 }}
-{{- with .Values.annotations }}
+ {{- with .Values.annotations }}
annotations:
-{{ toYaml . | indent 4 }}
-{{- end }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
spec:
clusterIP: None
selector:
{{- include "grafana.selectorLabels" . | nindent 4 }}
type: ClusterIP
+ ports:
+ - name: {{ .Values.gossipPortName }}-tcp
+ port: 9094
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/hpa.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/hpa.yaml
new file mode 100644
index 0000000000..46bbcb49a2
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/hpa.yaml
@@ -0,0 +1,52 @@
+{{- $sts := list "sts" "StatefulSet" "statefulset" -}}
+{{- if .Values.autoscaling.enabled }}
+apiVersion: {{ include "grafana.hpa.apiVersion" . }}
+kind: HorizontalPodAutoscaler
+metadata:
+ name: {{ include "grafana.fullname" . }}
+ namespace: {{ include "grafana.namespace" . }}
+ labels:
+ app.kubernetes.io/name: {{ include "grafana.name" . }}
+ helm.sh/chart: {{ include "grafana.chart" . }}
+ app.kubernetes.io/managed-by: {{ .Release.Service }}
+ app.kubernetes.io/instance: {{ .Release.Name }}
+spec:
+ scaleTargetRef:
+ apiVersion: apps/v1
+ {{- if has .Values.persistence.type $sts }}
+ kind: StatefulSet
+ {{- else }}
+ kind: Deployment
+ {{- end }}
+ name: {{ include "grafana.fullname" . }}
+ minReplicas: {{ .Values.autoscaling.minReplicas }}
+ maxReplicas: {{ .Values.autoscaling.maxReplicas }}
+ metrics:
+ {{- if .Values.autoscaling.targetMemory }}
+ - type: Resource
+ resource:
+ name: memory
+ {{- if eq (include "grafana.hpa.apiVersion" .) "autoscaling/v2beta1" }}
+ targetAverageUtilization: {{ .Values.autoscaling.targetMemory }}
+ {{- else }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemory }}
+ {{- end }}
+ {{- end }}
+ {{- if .Values.autoscaling.targetCPU }}
+ - type: Resource
+ resource:
+ name: cpu
+ {{- if eq (include "grafana.hpa.apiVersion" .) "autoscaling/v2beta1" }}
+ targetAverageUtilization: {{ .Values.autoscaling.targetCPU }}
+ {{- else }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPU }}
+ {{- end }}
+ {{- end }}
+ {{- if .Values.autoscaling.behavior }}
+ behavior: {{ toYaml .Values.autoscaling.behavior | nindent 4 }}
+ {{- end }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/image-renderer-deployment.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/image-renderer-deployment.yaml
new file mode 100644
index 0000000000..ea97969c2e
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/image-renderer-deployment.yaml
@@ -0,0 +1,131 @@
+{{ if .Values.imageRenderer.enabled }}
+{{- $root := . -}}
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: {{ include "grafana.fullname" . }}-image-renderer
+ namespace: {{ include "grafana.namespace" . }}
+ labels:
+ {{- include "grafana.imageRenderer.labels" . | nindent 4 }}
+ {{- with .Values.imageRenderer.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+ {{- with .Values.imageRenderer.annotations }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+spec:
+ {{- if and (not .Values.imageRenderer.autoscaling.enabled) (.Values.imageRenderer.replicas) }}
+ replicas: {{ .Values.imageRenderer.replicas }}
+ {{- end }}
+ revisionHistoryLimit: {{ .Values.imageRenderer.revisionHistoryLimit }}
+ selector:
+ matchLabels:
+ {{- include "grafana.imageRenderer.selectorLabels" . | nindent 6 }}
+
+ {{- with .Values.imageRenderer.deploymentStrategy }}
+ strategy:
+ {{- toYaml . | trim | nindent 4 }}
+ {{- end }}
+ template:
+ metadata:
+ labels:
+ {{- include "grafana.imageRenderer.selectorLabels" . | nindent 8 }}
+ {{- with .Values.imageRenderer.podLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ annotations:
+ checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
+ {{- with .Values.imageRenderer.podAnnotations }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ spec:
+ {{- with .Values.imageRenderer.schedulerName }}
+ schedulerName: "{{ . }}"
+ {{- end }}
+ {{- with .Values.imageRenderer.serviceAccountName }}
+ serviceAccountName: "{{ . }}"
+ {{- end }}
+ {{- with .Values.imageRenderer.securityContext }}
+ securityContext:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.imageRenderer.hostAliases }}
+ hostAliases:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.imageRenderer.priorityClassName }}
+ priorityClassName: {{ . }}
+ {{- end }}
+ {{- with .Values.imageRenderer.image.pullSecrets }}
+ imagePullSecrets:
+ {{- range . }}
+ - name: {{ tpl . $root }}
+ {{- end}}
+ {{- end }}
+ containers:
+ - name: {{ .Chart.Name }}-image-renderer
+ {{- $registry := .Values.global.imageRegistry | default .Values.imageRenderer.image.registry -}}
+ {{- if .Values.imageRenderer.image.sha }}
+ image: "{{ $registry }}/{{ .Values.imageRenderer.image.repository }}:{{ .Values.imageRenderer.image.tag }}@sha256:{{ .Values.imageRenderer.image.sha }}"
+ {{- else }}
+ image: "{{ $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 }}
+ {{- if .Values.imageRenderer.serviceMonitor.enabled }}
+ - name: ENABLE_METRICS
+ value: "true"
+ {{- end }}
+ {{- range $key, $value := .Values.imageRenderer.envValueFrom }}
+ - name: {{ $key | quote }}
+ valueFrom:
+ {{- tpl (toYaml $value) $ | nindent 16 }}
+ {{- end }}
+ {{- range $key, $value := .Values.imageRenderer.env }}
+ - name: {{ $key | quote }}
+ value: {{ $value | quote }}
+ {{- end }}
+ {{- with .Values.imageRenderer.containerSecurityContext }}
+ securityContext:
+ {{- toYaml . | nindent 12 }}
+ {{- end }}
+ volumeMounts:
+ - mountPath: /tmp
+ name: image-renderer-tmpfs
+ {{- with .Values.imageRenderer.resources }}
+ resources:
+ {{- toYaml . | nindent 12 }}
+ {{- end }}
+ {{- with .Values.imageRenderer.nodeSelector }}
+ nodeSelector:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.imageRenderer.affinity }}
+ affinity:
+ {{- tpl (toYaml .) $root | nindent 8 }}
+ {{- end }}
+ {{- with .Values.imageRenderer.tolerations }}
+ tolerations:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ volumes:
+ - name: image-renderer-tmpfs
+ emptyDir: {}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/image-renderer-hpa.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/image-renderer-hpa.yaml
new file mode 100644
index 0000000000..b0f0059b79
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/image-renderer-hpa.yaml
@@ -0,0 +1,47 @@
+{{- if and .Values.imageRenderer.enabled .Values.imageRenderer.autoscaling.enabled }}
+apiVersion: {{ include "grafana.hpa.apiVersion" . }}
+kind: HorizontalPodAutoscaler
+metadata:
+ name: {{ include "grafana.fullname" . }}-image-renderer
+ namespace: {{ include "grafana.namespace" . }}
+ labels:
+ app.kubernetes.io/name: {{ include "grafana.name" . }}-image-renderer
+ helm.sh/chart: {{ include "grafana.chart" . }}
+ app.kubernetes.io/managed-by: {{ .Release.Service }}
+ app.kubernetes.io/instance: {{ .Release.Name }}
+spec:
+ scaleTargetRef:
+ apiVersion: apps/v1
+ kind: Deployment
+ name: {{ include "grafana.fullname" . }}-image-renderer
+ minReplicas: {{ .Values.imageRenderer.autoscaling.minReplicas }}
+ maxReplicas: {{ .Values.imageRenderer.autoscaling.maxReplicas }}
+ metrics:
+ {{- if .Values.imageRenderer.autoscaling.targetMemory }}
+ - type: Resource
+ resource:
+ name: memory
+ {{- if eq (include "grafana.hpa.apiVersion" .) "autoscaling/v2beta1" }}
+ targetAverageUtilization: {{ .Values.imageRenderer.autoscaling.targetMemory }}
+ {{- else }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.imageRenderer.autoscaling.targetMemory }}
+ {{- end }}
+ {{- end }}
+ {{- if .Values.imageRenderer.autoscaling.targetCPU }}
+ - type: Resource
+ resource:
+ name: cpu
+ {{- if eq (include "grafana.hpa.apiVersion" .) "autoscaling/v2beta1" }}
+ targetAverageUtilization: {{ .Values.imageRenderer.autoscaling.targetCPU }}
+ {{- else }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.imageRenderer.autoscaling.targetCPU }}
+ {{- end }}
+ {{- end }}
+ {{- if .Values.imageRenderer.autoscaling.behavior }}
+ behavior: {{ toYaml .Values.imageRenderer.autoscaling.behavior | nindent 4 }}
+ {{- end }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/image-renderer-network-policy.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/image-renderer-network-policy.yaml
new file mode 100644
index 0000000000..d1a0eb313d
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/image-renderer-network-policy.yaml
@@ -0,0 +1,79 @@
+{{- if and .Values.imageRenderer.enabled .Values.imageRenderer.networkPolicy.limitIngress }}
+---
+apiVersion: networking.k8s.io/v1
+kind: NetworkPolicy
+metadata:
+ name: {{ include "grafana.fullname" . }}-image-renderer-ingress
+ namespace: {{ include "grafana.namespace" . }}
+ annotations:
+ comment: Limit image-renderer ingress traffic from grafana
+spec:
+ podSelector:
+ matchLabels:
+ {{- include "grafana.imageRenderer.selectorLabels" . | nindent 6 }}
+ {{- with .Values.imageRenderer.podLabels }}
+ {{- toYaml . | nindent 6 }}
+ {{- end }}
+
+ policyTypes:
+ - Ingress
+ ingress:
+ - ports:
+ - port: {{ .Values.imageRenderer.service.targetPort }}
+ protocol: TCP
+ from:
+ - namespaceSelector:
+ matchLabels:
+ kubernetes.io/metadata.name: {{ include "grafana.namespace" . }}
+ podSelector:
+ matchLabels:
+ {{- include "grafana.selectorLabels" . | nindent 14 }}
+ {{- with .Values.podLabels }}
+ {{- toYaml . | nindent 14 }}
+ {{- end }}
+ {{- with .Values.imageRenderer.networkPolicy.extraIngressSelectors -}}
+ {{ toYaml . | nindent 8 }}
+ {{- end }}
+{{- end }}
+
+{{- if and .Values.imageRenderer.enabled .Values.imageRenderer.networkPolicy.limitEgress }}
+---
+apiVersion: networking.k8s.io/v1
+kind: NetworkPolicy
+metadata:
+ name: {{ include "grafana.fullname" . }}-image-renderer-egress
+ namespace: {{ include "grafana.namespace" . }}
+ annotations:
+ comment: Limit image-renderer egress traffic to grafana
+spec:
+ podSelector:
+ matchLabels:
+ {{- include "grafana.imageRenderer.selectorLabels" . | nindent 6 }}
+ {{- with .Values.imageRenderer.podLabels }}
+ {{- toYaml . | 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.targetPort }}
+ protocol: TCP
+ to:
+ - namespaceSelector:
+ matchLabels:
+ name: {{ include "grafana.namespace" . }}
+ podSelector:
+ matchLabels:
+ {{- include "grafana.selectorLabels" . | nindent 14 }}
+ {{- with .Values.podLabels }}
+ {{- toYaml . | nindent 14 }}
+ {{- end }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/image-renderer-service.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/image-renderer-service.yaml
new file mode 100644
index 0000000000..f8da127cf8
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/image-renderer-service.yaml
@@ -0,0 +1,31 @@
+{{- if and .Values.imageRenderer.enabled .Values.imageRenderer.service.enabled }}
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "grafana.fullname" . }}-image-renderer
+ namespace: {{ include "grafana.namespace" . }}
+ labels:
+ {{- include "grafana.imageRenderer.labels" . | nindent 4 }}
+ {{- with .Values.imageRenderer.service.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+ {{- with .Values.imageRenderer.service.annotations }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+spec:
+ type: ClusterIP
+ {{- with .Values.imageRenderer.service.clusterIP }}
+ clusterIP: {{ . }}
+ {{- end }}
+ ports:
+ - name: {{ .Values.imageRenderer.service.portName }}
+ port: {{ .Values.imageRenderer.service.port }}
+ protocol: TCP
+ targetPort: {{ .Values.imageRenderer.service.targetPort }}
+ {{- with .Values.imageRenderer.appProtocol }}
+ appProtocol: {{ . }}
+ {{- end }}
+ selector:
+ {{- include "grafana.imageRenderer.selectorLabels" . | nindent 4 }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/image-renderer-servicemonitor.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/image-renderer-servicemonitor.yaml
new file mode 100644
index 0000000000..5d9f09d266
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/image-renderer-servicemonitor.yaml
@@ -0,0 +1,48 @@
+{{- if .Values.imageRenderer.serviceMonitor.enabled }}
+---
+apiVersion: monitoring.coreos.com/v1
+kind: ServiceMonitor
+metadata:
+ name: {{ include "grafana.fullname" . }}-image-renderer
+ {{- if .Values.imageRenderer.serviceMonitor.namespace }}
+ namespace: {{ tpl .Values.imageRenderer.serviceMonitor.namespace . }}
+ {{- else }}
+ namespace: {{ include "grafana.namespace" . }}
+ {{- end }}
+ labels:
+ {{- include "grafana.imageRenderer.labels" . | nindent 4 }}
+ {{- with .Values.imageRenderer.serviceMonitor.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+spec:
+ endpoints:
+ - port: {{ .Values.imageRenderer.service.portName }}
+ {{- with .Values.imageRenderer.serviceMonitor.interval }}
+ interval: {{ . }}
+ {{- end }}
+ {{- with .Values.imageRenderer.serviceMonitor.scrapeTimeout }}
+ scrapeTimeout: {{ . }}
+ {{- end }}
+ honorLabels: true
+ path: {{ .Values.imageRenderer.serviceMonitor.path }}
+ scheme: {{ .Values.imageRenderer.serviceMonitor.scheme }}
+ {{- with .Values.imageRenderer.serviceMonitor.tlsConfig }}
+ tlsConfig:
+ {{- toYaml . | nindent 6 }}
+ {{- end }}
+ {{- with .Values.imageRenderer.serviceMonitor.relabelings }}
+ relabelings:
+ {{- toYaml . | nindent 6 }}
+ {{- end }}
+ jobLabel: "{{ .Release.Name }}-image-renderer"
+ selector:
+ matchLabels:
+ {{- include "grafana.imageRenderer.selectorLabels" . | nindent 6 }}
+ namespaceSelector:
+ matchNames:
+ - {{ include "grafana.namespace" . }}
+ {{- with .Values.imageRenderer.serviceMonitor.targetLabels }}
+ targetLabels:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/ingress.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/ingress.yaml
old mode 100755
new mode 100644
index 13a6b0ac2d..063cdfaa52
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/ingress.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/ingress.yaml
@@ -1,44 +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 -}}
-{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }}
-apiVersion: networking.k8s.io/v1beta1
-{{ else }}
-apiVersion: extensions/v1beta1
-{{ end -}}
+apiVersion: {{ include "grafana.ingress.apiVersion" . }}
kind: Ingress
metadata:
name: {{ $fullName }}
- namespace: {{ template "grafana.namespace" . }}
+ namespace: {{ include "grafana.namespace" . }}
labels:
{{- include "grafana.labels" . | nindent 4 }}
-{{- if .Values.ingress.labels }}
-{{ toYaml .Values.ingress.labels | indent 4 }}
-{{- end }}
- {{- if .Values.ingress.annotations }}
+ {{- with .Values.ingress.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+ {{- with .Values.ingress.annotations }}
annotations:
- {{- range $key, $value := .Values.ingress.annotations }}
+ {{- range $key, $value := . }}
{{ $key }}: {{ tpl $value $ | quote }}
{{- end }}
{{- end }}
spec:
-{{- if .Values.ingress.tls }}
+ {{- if and $ingressSupportsIngressClassName .Values.ingress.ingressClassName }}
+ ingressClassName: {{ .Values.ingress.ingressClassName }}
+ {{- end -}}
+ {{- with .Values.ingress.tls }}
tls:
-{{ toYaml .Values.ingress.tls | indent 4 }}
-{{- end }}
+ {{- tpl (toYaml .) $ | nindent 4 }}
+ {{- end }}
rules:
+ {{- if .Values.ingress.hosts }}
{{- range .Values.ingress.hosts }}
- - host: {{ . }}
+ - host: {{ tpl . $ }}
http:
paths:
-{{ if $extraPaths }}
-{{ toYaml $extraPaths | indent 10 }}
-{{- end }}
+ {{- with $extraPaths }}
+ {{- toYaml . | nindent 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 }}
+ {{- with $ingressPath }}
+ path: {{ . }}
+ {{- end }}
+ {{- if $ingressSupportsPathType }}
+ pathType: {{ $ingressPathType }}
+ {{- end }}
+ {{- end -}}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/networkpolicy.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/networkpolicy.yaml
new file mode 100644
index 0000000000..ea4578bec2
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/networkpolicy.yaml
@@ -0,0 +1,52 @@
+{{- if .Values.networkPolicy.enabled }}
+apiVersion: networking.k8s.io/v1
+kind: NetworkPolicy
+metadata:
+ name: {{ include "grafana.fullname" . }}
+ namespace: {{ include "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:
+ {{ include "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/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/poddisruptionbudget.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/poddisruptionbudget.yaml
old mode 100755
new mode 100644
index d6f230a8f2..05251214ac
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/poddisruptionbudget.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/poddisruptionbudget.yaml
@@ -1,21 +1,21 @@
{{- if .Values.podDisruptionBudget }}
-apiVersion: policy/v1beta1
+apiVersion: {{ include "grafana.podDisruptionBudget.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
- name: {{ template "grafana.name" . }}
- namespace: {{ template "grafana.namespace" . }}
+ name: {{ include "grafana.fullname" . }}
+ namespace: {{ include "grafana.namespace" . }}
labels:
{{- include "grafana.labels" . | nindent 4 }}
-{{- if .Values.labels }}
-{{ toYaml .Values.labels | indent 4 }}
-{{- end }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
spec:
-{{- if .Values.podDisruptionBudget.minAvailable }}
- minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
-{{- end }}
-{{- if .Values.podDisruptionBudget.maxUnavailable }}
- maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
-{{- end }}
+ {{- with .Values.podDisruptionBudget.minAvailable }}
+ minAvailable: {{ . }}
+ {{- end }}
+ {{- with .Values.podDisruptionBudget.maxUnavailable }}
+ maxUnavailable: {{ . }}
+ {{- end }}
selector:
matchLabels:
{{- include "grafana.selectorLabels" . | nindent 6 }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/podsecuritypolicy.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/podsecuritypolicy.yaml
old mode 100755
new mode 100644
index c5e6ba05ea..eed7af95b5
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/podsecuritypolicy.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/podsecuritypolicy.yaml
@@ -1,13 +1,12 @@
-{{- if .Values.rbac.pspEnabled }}
+{{- if and .Values.rbac.pspEnabled (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") }}
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
- name: {{ template "grafana.fullname" . }}
- namespace: {{ template "grafana.namespace" . }}
+ name: {{ include "grafana.fullname" . }}
labels:
{{- include "grafana.labels" . | nindent 4 }}
annotations:
- seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'docker/default'
+ seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'docker/default,runtime/default'
seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default'
{{- if .Values.rbac.pspUseAppArmor }}
apparmor.security.beta.kubernetes.io/allowedProfileNames: 'runtime/default'
@@ -17,23 +16,13 @@ spec:
privileged: false
allowPrivilegeEscalation: false
requiredDropCapabilities:
- # Default set from Docker, without DAC_OVERRIDE or CHOWN
- - FOWNER
- - FSETID
- - KILL
- - SETGID
- - SETUID
- - SETPCAP
- - NET_BIND_SERVICE
- - NET_RAW
- - SYS_CHROOT
- - MKNOD
- - AUDIT_WRITE
- - SETFCAP
+ # Default set from Docker, with DAC_OVERRIDE and CHOWN
+ - ALL
volumes:
- 'configMap'
- 'emptyDir'
- 'projected'
+ - 'csi'
- 'secret'
- 'downwardAPI'
- 'persistentVolumeClaim'
@@ -45,8 +34,16 @@ spec:
seLinux:
rule: 'RunAsAny'
supplementalGroups:
- rule: 'RunAsAny'
+ rule: 'MustRunAs'
+ ranges:
+ # Forbid adding the root group.
+ - min: 1
+ max: 65535
fsGroup:
- rule: 'RunAsAny'
+ rule: 'MustRunAs'
+ ranges:
+ # Forbid adding the root group.
+ - min: 1
+ max: 65535
readOnlyRootFilesystem: false
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/pvc.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/pvc.yaml
old mode 100755
new mode 100644
index 4727d0aa14..eb8f87f077
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/pvc.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/pvc.yaml
@@ -2,17 +2,20 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
- name: {{ template "grafana.fullname" . }}
- namespace: {{ template "grafana.namespace" . }}
+ name: {{ include "grafana.fullname" . }}
+ namespace: {{ include "grafana.namespace" . }}
labels:
{{- include "grafana.labels" . | nindent 4 }}
+ {{- with .Values.persistence.extraPvcLabels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
{{- with .Values.persistence.annotations }}
annotations:
-{{ toYaml . | indent 4 }}
+ {{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.persistence.finalizers }}
finalizers:
-{{ toYaml . | indent 4 }}
+ {{- toYaml . | nindent 4 }}
{{- end }}
spec:
accessModes:
@@ -22,7 +25,12 @@ spec:
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
- {{- if .Values.persistence.storageClassName }}
- storageClassName: {{ .Values.persistence.storageClassName }}
- {{- end -}}
-{{- end -}}
+ {{- with .Values.persistence.storageClassName }}
+ storageClassName: {{ . }}
+ {{- end }}
+ {{- with .Values.persistence.selectorLabels }}
+ selector:
+ matchLabels:
+ {{- toYaml . | nindent 6 }}
+ {{- end }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/role.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/role.yaml
old mode 100755
new mode 100644
index c95c1d0424..4b5edd978c
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/role.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/role.yaml
@@ -1,31 +1,31 @@
-{{- if .Values.rbac.create -}}
-apiVersion: rbac.authorization.k8s.io/v1beta1
+{{- if and .Values.rbac.create (not .Values.rbac.useExistingRole) -}}
+apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
- name: {{ template "grafana.fullname" . }}
- namespace: {{ template "grafana.namespace" . }}
+ name: {{ include "grafana.fullname" . }}
+ namespace: {{ include "grafana.namespace" . }}
labels:
{{- include "grafana.labels" . | nindent 4 }}
-{{- with .Values.annotations }}
+ {{- 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 .Values.rbac.extraRoleRules))) }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+{{- if or .Values.rbac.pspEnabled (and .Values.rbac.namespaced (or .Values.sidecar.dashboards.enabled .Values.sidecar.datasources.enabled .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 .Values.sidecar.datasources.enabled) }}
-- apiGroups: [""] # "" indicates the core API group
- resources: ["configmaps", "secrets"]
- verbs: ["get", "watch", "list"]
-{{- end }}
-{{- with .Values.rbac.extraRoleRules }}
-{{ toYaml . | indent 0 }}
-{{- end}}
+ {{- if and .Values.rbac.pspEnabled (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") }}
+ - apiGroups: ['extensions']
+ resources: ['podsecuritypolicies']
+ verbs: ['use']
+ resourceNames: [{{ include "grafana.fullname" . }}]
+ {{- end }}
+ {{- if and .Values.rbac.namespaced (or .Values.sidecar.dashboards.enabled .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 . | nindent 2 }}
+ {{- end}}
{{- else }}
rules: []
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/rolebinding.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/rolebinding.yaml
old mode 100755
new mode 100644
index c42229bf92..58f77c6b0b
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/rolebinding.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/rolebinding.yaml
@@ -1,27 +1,25 @@
-{{- if .Values.rbac.create -}}
-apiVersion: rbac.authorization.k8s.io/v1beta1
+{{- if .Values.rbac.create }}
+apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
- name: {{ template "grafana.fullname" . }}
- namespace: {{ template "grafana.namespace" . }}
+ name: {{ include "grafana.fullname" . }}
+ namespace: {{ include "grafana.namespace" . }}
labels:
{{- include "grafana.labels" . | nindent 4 }}
-{{- with .Values.annotations }}
+ {{- with .Values.annotations }}
annotations:
-{{ toYaml . | indent 4 }}
-{{- end }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
- name: {{ template "grafana.fullname" . }}
+ {{- if .Values.rbac.useExistingRole }}
+ name: {{ .Values.rbac.useExistingRole }}
+ {{- else }}
+ name: {{ include "grafana.fullname" . }}
+ {{- end }}
subjects:
- kind: ServiceAccount
- name: {{ template "grafana.serviceAccountName" . }}
- namespace: {{ template "grafana.namespace" . }}
-{{- if .Values.rbac.namespaced }}
-roleRef:
- kind: Role
- name: {{ template "grafana.fullname" . }}
- apiGroup: rbac.authorization.k8s.io
+ name: {{ include "grafana.serviceAccountName" . }}
+ namespace: {{ include "grafana.namespace" . }}
{{- end }}
-{{- end -}}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/secret-env.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/secret-env.yaml
old mode 100755
new mode 100644
index 5c09313e66..eb14aac707
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/secret-env.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/secret-env.yaml
@@ -2,13 +2,13 @@
apiVersion: v1
kind: Secret
metadata:
- name: {{ template "grafana.fullname" . }}-env
- namespace: {{ template "grafana.namespace" . }}
+ name: {{ include "grafana.fullname" . }}-env
+ namespace: {{ include "grafana.namespace" . }}
labels:
{{- include "grafana.labels" . | nindent 4 }}
type: Opaque
data:
{{- range $key, $val := .Values.envRenderSecret }}
- {{ $key }}: {{ $val | b64enc | quote }}
-{{- end -}}
+ {{ $key }}: {{ tpl ($val | toString) $ | b64enc | quote }}
+{{- end }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/secret.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/secret.yaml
old mode 100755
new mode 100644
index f7ee9956b3..5cbd527448
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/secret.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/secret.yaml
@@ -1,20 +1,26 @@
-{{- if and (not .Values.admin.existingSecret) (not .Values.env.GF_SECURITY_ADMIN_PASSWORD__FILE) }}
+{{- 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" . }}
+ name: {{ include "grafana.fullname" . }}
+ namespace: {{ include "grafana.namespace" . }}
labels:
{{- include "grafana.labels" . | nindent 4 }}
+ {{- with .Values.annotations }}
+ annotations:
+ {{- toYaml . | nindent 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: {{ randAlphaNum 40 | b64enc | quote }}
+ admin-password: {{ include "grafana.password" . }}
+ {{- end }}
{{- end }}
{{- if not .Values.ldap.existingSecret }}
- ldap-toml: {{ .Values.ldap.config | b64enc | quote }}
+ ldap-toml: {{ tpl .Values.ldap.config $ | b64enc | quote }}
{{- end }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/service.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/service.yaml
old mode 100755
new mode 100644
index 2764566986..9102c1eec1
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/service.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/service.yaml
@@ -1,50 +1,58 @@
+{{- if .Values.service.enabled }}
+{{- $root := . }}
apiVersion: v1
kind: Service
metadata:
- name: {{ template "grafana.fullname" . }}
- namespace: {{ template "grafana.namespace" . }}
+ name: {{ include "grafana.fullname" . }}
+ namespace: {{ include "grafana.namespace" . }}
labels:
{{- include "grafana.labels" . | nindent 4 }}
-{{- if .Values.service.labels }}
-{{ toYaml .Values.service.labels | indent 4 }}
-{{- end }}
-{{- with .Values.service.annotations }}
+ {{- with .Values.service.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+ {{- with .Values.service.annotations }}
annotations:
-{{ toYaml . | indent 4 }}
-{{- end }}
+ {{- tpl (toYaml . | nindent 4) $root }}
+ {{- end }}
spec:
-{{- if (or (eq .Values.service.type "ClusterIP") (empty .Values.service.type)) }}
+ {{- 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" }}
+ {{- with .Values.service.clusterIP }}
+ clusterIP: {{ . }}
+ {{- end }}
+ {{- else if eq .Values.service.type "LoadBalancer" }}
type: {{ .Values.service.type }}
- {{- if .Values.service.loadBalancerIP }}
- loadBalancerIP: {{ .Values.service.loadBalancerIP }}
+ {{- with .Values.service.loadBalancerIP }}
+ loadBalancerIP: {{ . }}
{{- end }}
- {{- if .Values.service.loadBalancerSourceRanges }}
+ {{- with .Values.service.loadBalancerSourceRanges }}
loadBalancerSourceRanges:
-{{ toYaml .Values.service.loadBalancerSourceRanges | indent 4 }}
- {{- end -}}
-{{- else }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+ {{- else }}
type: {{ .Values.service.type }}
-{{- end }}
-{{- if .Values.service.externalIPs }}
+ {{- end }}
+ {{- with .Values.service.externalIPs }}
externalIPs:
-{{ toYaml .Values.service.externalIPs | indent 4 }}
-{{- end }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+ {{- with .Values.service.externalTrafficPolicy }}
+ externalTrafficPolicy: {{ . }}
+ {{- end }}
ports:
- name: {{ .Values.service.portName }}
port: {{ .Values.service.port }}
protocol: TCP
targetPort: {{ .Values.service.targetPort }}
-{{ 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 }}
+ {{- with .Values.service.appProtocol }}
+ appProtocol: {{ . }}
+ {{- end }}
+ {{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }}
+ nodePort: {{ .Values.service.nodePort }}
+ {{- end }}
+ {{- with .Values.extraExposePorts }}
+ {{- tpl (toYaml . | nindent 4) $root }}
+ {{- end }}
selector:
{{- include "grafana.selectorLabels" . | nindent 4 }}
-
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/serviceaccount.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/serviceaccount.yaml
old mode 100755
new mode 100644
index 7576eeef06..784e71ba67
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/serviceaccount.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/serviceaccount.yaml
@@ -1,13 +1,17 @@
{{- if .Values.serviceAccount.create }}
+{{- $root := . -}}
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
{{- include "grafana.labels" . | nindent 4 }}
-{{- with .Values.serviceAccount.annotations }}
+ {{- with .Values.serviceAccount.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+ {{- with .Values.serviceAccount.annotations }}
annotations:
-{{ toYaml . | indent 4 }}
-{{- end }}
- name: {{ template "grafana.serviceAccountName" . }}
- namespace: {{ template "grafana.namespace" . }}
+ {{- tpl (toYaml . | nindent 4) $root }}
+ {{- end }}
+ name: {{ include "grafana.serviceAccountName" . }}
+ namespace: {{ include "grafana.namespace" . }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/servicemonitor.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/servicemonitor.yaml
new file mode 100644
index 0000000000..72396828f5
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/servicemonitor.yaml
@@ -0,0 +1,52 @@
+{{- if .Values.serviceMonitor.enabled }}
+---
+apiVersion: monitoring.coreos.com/v1
+kind: ServiceMonitor
+metadata:
+ name: {{ include "grafana.fullname" . }}
+ {{- if .Values.serviceMonitor.namespace }}
+ namespace: {{ tpl .Values.serviceMonitor.namespace . }}
+ {{- else }}
+ namespace: {{ include "grafana.namespace" . }}
+ {{- end }}
+ labels:
+ {{- include "grafana.labels" . | nindent 4 }}
+ {{- with .Values.serviceMonitor.labels }}
+ {{- toYaml . | 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 }}
+ {{- with .Values.serviceMonitor.tlsConfig }}
+ tlsConfig:
+ {{- toYaml . | nindent 6 }}
+ {{- end }}
+ {{- with .Values.serviceMonitor.relabelings }}
+ relabelings:
+ {{- toYaml . | nindent 6 }}
+ {{- end }}
+ {{- with .Values.serviceMonitor.metricRelabelings }}
+ metricRelabelings:
+ {{- toYaml . | nindent 6 }}
+ {{- end }}
+ jobLabel: "{{ .Release.Name }}"
+ selector:
+ matchLabels:
+ {{- include "grafana.selectorLabels" . | nindent 6 }}
+ namespaceSelector:
+ matchNames:
+ - {{ include "grafana.namespace" . }}
+ {{- with .Values.serviceMonitor.targetLabels }}
+ targetLabels:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/statefulset.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/statefulset.yaml
old mode 100755
new mode 100644
index afc26b7c2f..e6c944a4d3
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/statefulset.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/statefulset.yaml
@@ -1,37 +1,43 @@
-{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) (eq .Values.persistence.type "statefulset")}}
+{{- $sts := list "sts" "StatefulSet" "statefulset" -}}
+{{- if (or (.Values.useStatefulSet) (and .Values.persistence.enabled (not .Values.persistence.existingClaim) (has .Values.persistence.type $sts)))}}
apiVersion: apps/v1
kind: StatefulSet
metadata:
- name: {{ template "grafana.fullname" . }}
- namespace: {{ template "grafana.namespace" . }}
+ name: {{ include "grafana.fullname" . }}
+ namespace: {{ include "grafana.namespace" . }}
labels:
{{- include "grafana.labels" . | nindent 4 }}
-{{- with .Values.annotations }}
+ {{- with .Values.annotations }}
annotations:
-{{ toYaml . | indent 4 }}
-{{- end }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
spec:
replicas: {{ .Values.replicas }}
selector:
matchLabels:
{{- include "grafana.selectorLabels" . | nindent 6 }}
- serviceName: {{ template "grafana.fullname" . }}-headless
+ serviceName: {{ include "grafana.fullname" . }}-headless
template:
metadata:
labels:
{{- include "grafana.selectorLabels" . | nindent 8 }}
+ {{- with .Values.podLabels }}
+ {{- toYaml . | nindent 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 not .Values.admin.existingSecret }}
+ {{- 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 }}
+ {{- end }}
+ kubectl.kubernetes.io/default-container: {{ .Chart.Name }}
+ {{- with .Values.podAnnotations }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
spec:
{{- include "grafana.pod" . | nindent 6 }}
+ {{- if .Values.persistence.enabled}}
volumeClaimTemplates:
- metadata:
name: storage
@@ -40,5 +46,11 @@ spec:
storageClassName: {{ .Values.persistence.storageClassName }}
resources:
requests:
- storage: {{ .Values.persistence.size }}
+ storage: {{ .Values.persistence.size }}
+ {{- with .Values.persistence.selectorLabels }}
+ selector:
+ matchLabels:
+ {{- toYaml . | nindent 10 }}
+ {{- end }}
+ {{- end }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test-configmap.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test-configmap.yaml
old mode 100755
new mode 100644
index ff53aaf1b3..01c96c9243
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test-configmap.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test-configmap.yaml
@@ -2,16 +2,19 @@
apiVersion: v1
kind: ConfigMap
metadata:
- name: {{ template "grafana.fullname" . }}-test
- namespace: {{ template "grafana.namespace" . }}
+ name: {{ include "grafana.fullname" . }}-test
+ namespace: {{ include "grafana.namespace" . }}
+ annotations:
+ "helm.sh/hook": test-success
+ "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded"
labels:
{{- include "grafana.labels" . | nindent 4 }}
data:
run.sh: |-
@test "Test Health" {
- url="http://{{ template "grafana.fullname" . }}/api/health"
+ url="http://{{ include "grafana.fullname" . }}/api/health"
- code=$(wget --server-response --spider --timeout 10 --tries 1 ${url} 2>&1 | awk '/^ HTTP/{print $2}')
+ code=$(wget --server-response --spider --timeout 90 --tries 10 ${url} 2>&1 | awk '/^ HTTP/{print $2}')
[ "$code" == "200" ]
}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test-podsecuritypolicy.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test-podsecuritypolicy.yaml
old mode 100755
new mode 100644
index eb5cbbcd70..1821772a45
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test-podsecuritypolicy.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test-podsecuritypolicy.yaml
@@ -1,9 +1,11 @@
-{{- if and .Values.testFramework.enabled .Values.rbac.pspEnabled }}
+{{- if and (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") .Values.testFramework.enabled .Values.rbac.pspEnabled }}
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
- name: {{ template "grafana.fullname" . }}-test
- namespace: {{ template "grafana.namespace" . }}
+ name: {{ include "grafana.fullname" . }}-test
+ annotations:
+ "helm.sh/hook": test-success
+ "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded"
labels:
{{- include "grafana.labels" . | nindent 4 }}
spec:
@@ -21,9 +23,10 @@ spec:
runAsUser:
rule: RunAsAny
volumes:
- - configMap
- - downwardAPI
- - emptyDir
- - projected
- - secret
+ - configMap
+ - downwardAPI
+ - emptyDir
+ - projected
+ - csi
+ - secret
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test-role.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test-role.yaml
old mode 100755
new mode 100644
index 6b10677ae7..cb4c782040
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test-role.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test-role.yaml
@@ -1,14 +1,17 @@
-{{- if and .Values.testFramework.enabled .Values.rbac.pspEnabled -}}
+{{- if and (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") .Values.testFramework.enabled .Values.rbac.pspEnabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
- name: {{ template "grafana.fullname" . }}-test
- namespace: {{ template "grafana.namespace" . }}
+ name: {{ include "grafana.fullname" . }}-test
+ namespace: {{ include "grafana.namespace" . }}
+ annotations:
+ "helm.sh/hook": test-success
+ "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded"
labels:
{{- include "grafana.labels" . | nindent 4 }}
rules:
-- apiGroups: ['policy']
- resources: ['podsecuritypolicies']
- verbs: ['use']
- resourceNames: [{{ template "grafana.fullname" . }}-test]
+ - apiGroups: ['policy']
+ resources: ['podsecuritypolicies']
+ verbs: ['use']
+ resourceNames: [{{ include "grafana.fullname" . }}-test]
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test-rolebinding.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test-rolebinding.yaml
old mode 100755
new mode 100644
index 58fa5e78b5..f40d791f6c
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test-rolebinding.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test-rolebinding.yaml
@@ -1,17 +1,20 @@
-{{- if and .Values.testFramework.enabled .Values.rbac.pspEnabled -}}
+{{- if and (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") .Values.testFramework.enabled .Values.rbac.pspEnabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
- name: {{ template "grafana.fullname" . }}-test
- namespace: {{ template "grafana.namespace" . }}
+ name: {{ include "grafana.fullname" . }}-test
+ namespace: {{ include "grafana.namespace" . }}
+ annotations:
+ "helm.sh/hook": test-success
+ "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded"
labels:
{{- include "grafana.labels" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
- name: {{ template "grafana.fullname" . }}-test
+ name: {{ include "grafana.fullname" . }}-test
subjects:
-- kind: ServiceAccount
- name: {{ template "grafana.serviceAccountNameTest" . }}
- namespace: {{ template "grafana.namespace" . }}
+ - kind: ServiceAccount
+ name: {{ include "grafana.serviceAccountNameTest" . }}
+ namespace: {{ include "grafana.namespace" . }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test-serviceaccount.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test-serviceaccount.yaml
old mode 100755
new mode 100644
index 5c33507337..38fba3596a
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test-serviceaccount.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test-serviceaccount.yaml
@@ -4,6 +4,9 @@ kind: ServiceAccount
metadata:
labels:
{{- include "grafana.labels" . | nindent 4 }}
- name: {{ template "grafana.serviceAccountNameTest" . }}
- namespace: {{ template "grafana.namespace" . }}
+ name: {{ include "grafana.serviceAccountNameTest" . }}
+ namespace: {{ include "grafana.namespace" . }}
+ annotations:
+ "helm.sh/hook": test-success
+ "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded"
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test.yaml
old mode 100755
new mode 100644
index cdc86e5f2d..15067ae307
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test.yaml
@@ -1,39 +1,40 @@
{{- if .Values.testFramework.enabled }}
+{{- $root := . }}
apiVersion: v1
kind: Pod
metadata:
- name: {{ template "grafana.fullname" . }}-test
+ name: {{ include "grafana.fullname" . }}-test
labels:
{{- include "grafana.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test-success
- namespace: {{ template "grafana.namespace" . }}
+ "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded"
+ namespace: {{ include "grafana.namespace" . }}
spec:
- serviceAccountName: {{ template "grafana.serviceAccountNameTest" . }}
- {{- if .Values.testFramework.securityContext }}
- securityContext: {{ toYaml .Values.testFramework.securityContext | nindent 4 }}
+ serviceAccountName: {{ include "grafana.serviceAccountNameTest" . }}
+ {{- with .Values.testFramework.securityContext }}
+ securityContext:
+ {{- toYaml . | nindent 4 }}
{{- end }}
- {{- if .Values.image.pullSecrets }}
+ {{- if or .Values.image.pullSecrets .Values.global.imagePullSecrets }}
imagePullSecrets:
- {{- range .Values.image.pullSecrets }}
- - name: {{ . }}
- {{- end}}
+ {{- include "grafana.imagePullSecrets" (dict "root" $root "imagePullSecrets" .Values.image.pullSecrets) | nindent 4 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
-{{ toYaml . | indent 4 }}
+ {{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
-{{ toYaml . | indent 4 }}
+ {{- tpl (toYaml .) $root | nindent 4 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
-{{ toYaml . | indent 4 }}
+ {{- toYaml . | nindent 4 }}
{{- end }}
containers:
- name: {{ .Release.Name }}-test
- image: "{{ .Values.testFramework.image}}:{{ .Values.testFramework.tag }}"
+ image: "{{ .Values.global.imageRegistry | default .Values.testFramework.image.registry }}/{{ .Values.testFramework.image.repository }}:{{ .Values.testFramework.image.tag }}"
imagePullPolicy: "{{ .Values.testFramework.imagePullPolicy}}"
command: ["/opt/bats/bin/bats", "-t", "/tests/run.sh"]
volumeMounts:
@@ -41,8 +42,8 @@ spec:
name: tests
readOnly: true
volumes:
- - name: tests
- configMap:
- name: {{ template "grafana.fullname" . }}-test
+ - name: tests
+ configMap:
+ name: {{ include "grafana.fullname" . }}-test
restartPolicy: Never
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/values.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/values.yaml
old mode 100755
new mode 100644
index 54789493aa..46fa0d77d1
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/values.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/values.yaml
@@ -1,7 +1,28 @@
+global:
+ # -- Overrides the Docker registry globally for all images
+ imageRegistry: null
+
+ # 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).
+ # Can be tempalted.
+ # global:
+ # imagePullSecrets:
+ # - name: pullSecret1
+ # - name: pullSecret2
+ # or
+ # global:
+ # imagePullSecrets:
+ # - pullSecret1
+ # - pullSecret2
+ imagePullSecrets: []
+
rbac:
create: true
- pspEnabled: true
- pspUseAppArmor: true
+ ## Use an existing ClusterRole/Role (depending on rbac.namespaced false/true)
+ # useExistingRole: name-of-some-role
+ # useExistingClusterRole: name-of-some-clusterRole
+ pspEnabled: false
+ pspUseAppArmor: false
namespaced: false
extraRoleRules: []
# - apiGroups: []
@@ -15,13 +36,32 @@ serviceAccount:
create: true
name:
nameTest:
+ ## ServiceAccount labels.
+ labels: {}
+## 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: 5
+ targetCPU: "60"
+ targetMemory: ""
+ behavior: {}
+
## See `kubectl explain poddisruptionbudget.spec` for more
## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/
podDisruptionBudget: {}
+# apiVersion: ""
# minAvailable: 1
# maxUnavailable: 1
@@ -49,29 +89,52 @@ livenessProbe:
# schedulerName: "default-scheduler"
image:
+ # -- The Docker registry
+ registry: docker.io
+ # -- Docker image repository
repository: grafana/grafana
- tag: 6.7.3
+ # Overrides the Grafana image tag whose default is the chart appVersion
+ tag: ""
+ 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:
+ pullSecrets: []
# - myRegistrKeySecretName
testFramework:
enabled: true
- image: "bats/bats"
- tag: "v1.1.0"
+ image:
+ # -- The Docker registry
+ registry: docker.io
+ repository: bats/bats
+ tag: "v1.4.1"
imagePullPolicy: IfNotPresent
securityContext: {}
securityContext:
+ runAsNonRoot: true
runAsUser: 472
+ runAsGroup: 472
fsGroup: 472
+containerSecurityContext:
+ allowPrivilegeEscalation: false
+ capabilities:
+ drop:
+ - ALL
+ seccompProfile:
+ type: RuntimeDefault
+
+# 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/
@@ -85,17 +148,36 @@ extraEmptyDirMounts: []
# mountPath: /etc/grafana/provisioning/notifiers
+# Apply extra labels to common labels.
+extraLabels: {}
+
## Assign a PriorityClassName to pods if set
# priorityClassName:
downloadDashboardsImage:
+ # -- The Docker registry
+ registry: docker.io
repository: curlimages/curl
- tag: 7.68.0
+ tag: 7.85.0
+ sha: ""
pullPolicy: IfNotPresent
downloadDashboards:
env: {}
+ envFromSecret: ""
resources: {}
+ securityContext:
+ allowPrivilegeEscalation: false
+ capabilities:
+ drop:
+ - ALL
+ seccompProfile:
+ type: RuntimeDefault
+ envValueFrom: {}
+ # ENV_NAME:
+ # configMapKeyRef:
+ # name: configmap-name
+ # key: value_key
## Pod Annotations
# podAnnotations: {}
@@ -104,7 +186,7 @@ downloadDashboards:
# podLabels: {}
podPortName: grafana
-
+gossipPortName: gossip
## Deployment annotations
# annotations: {}
@@ -113,28 +195,60 @@ podPortName: grafana
## 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: 30s
+ scheme: http
+ tlsConfig: {}
+ scrapeTimeout: 30s
+ relabelings: []
+ metricRelabelings: []
+ targetLabels: []
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.1=
+ pathType: Prefix
+
hosts:
- chart-example.local
## Extra paths to prepend to every host configuration. This is useful when working with annotation based services.
@@ -143,6 +257,16 @@ ingress:
# 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:
@@ -166,15 +290,24 @@ nodeSelector: {}
##
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
-extraContainers: |
+extraContainers: ""
+# extraContainers: |
# - name: proxy
# image: quay.io/gambol99/keycloak-proxy:latest
# args:
@@ -190,6 +323,14 @@ extraContainers: |
# - 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/
##
@@ -203,20 +344,39 @@ persistence:
# 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:
+ ## Extra labels to apply to a PVC.
+ extraPvcLabels: {}
+
+ ## 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
+ ## This allows the grafana-server to be run with an arbitrary user
##
enabled: true
## initChownData container image
##
image:
- repository: busybox
+ # -- The Docker registry
+ registry: docker.io
+ repository: library/busybox
tag: "1.31.1"
+ sha: ""
pullPolicy: IfNotPresent
## initChownData resource requests and limits
@@ -229,7 +389,14 @@ initChownData:
# requests:
# cpu: 100m
# memory: 128Mi
-
+ securityContext:
+ runAsNonRoot: false
+ runAsUser: 0
+ seccompProfile:
+ type: RuntimeDefault
+ capabilities:
+ add:
+ - CHOWN
# Administrator credentials when not using an existing secret (see below)
adminUser: admin
@@ -237,6 +404,7 @@ adminUser: admin
# Use an existing secret for the admin user.
admin:
+ ## Name of the secret. Can be templated.
existingSecret: ""
userKey: admin-user
passwordKey: admin-password
@@ -248,16 +416,40 @@ admin:
# - "sh"
# - "/run.sh"
-## Use an alternate scheduler, e.g. "stork".
-## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
-##
-# schedulerName:
+## Optionally define args if command is used
+## Needed if using `hashicorp/envconsul` to manage secrets
+## By default no arguments are set
+# args:
+# - "-secret"
+# - "secret/grafana"
+# - "./grafana"
## 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
-## 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:
## ...
@@ -265,15 +457,40 @@ env: {}
## 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
+## This can be useful for auth tokens, etc.
+## If the secret values contains "{{", they'll need to be properly escaped so that they are not interpreted by Helm
+## ref: https://helm.sh/docs/howto/charts_tips_and_tricks/#using-the-tpl-function
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: []
@@ -282,20 +499,65 @@ extraSecretMounts: []
# 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
- # mountPath: /mnt/volume
+ # - 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
+ # mountPath: /mnt/volume2
+ # 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
+ ## You can also use other plugin download URL, as long as they are valid zip files,
+ ## and specify the name of the plugin after the semicolon. Like this:
+ # - https://grafana.com/api/plugins/marcusolsson-json-datasource/versions/1.3.2/download;marcusolsson-json-datasource
## Configure grafana datasources
## ref: http://docs.grafana.org/administration/provisioning/#datasources
@@ -309,6 +571,82 @@ datasources: {}
# 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
+# deleteDatasources: []
+# - name: Prometheus
+
+## 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:
+ # secret:
+ # 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: |
+ # {{ `{{ include "default.message" . }}` }}
## Configure notifiers
## ref: http://docs.grafana.org/administration/provisioning/#alert-notification-channels
@@ -365,11 +703,23 @@ dashboards: {}
# 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: ''
+ # local-dashboard-azure:
+ # url: https://example.com/repository/test-azure.json
+ # basic: ''
+ # acceptHeader: '*/*'
-## Reference to external ConfigMap per provider. Use provider name as key and ConfiMap name as value.
+## 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:
##
@@ -386,7 +736,7 @@ dashboardsConfigMaps: {}
##
grafana.ini:
paths:
- data: /var/lib/grafana/data
+ data: /var/lib/grafana/
logs: /var/log/grafana
plugins: /var/lib/grafana/plugins
provisioning: /etc/grafana/provisioning
@@ -396,6 +746,8 @@ grafana.ini:
mode: console
grafana_net:
url: https://grafana.net
+ server:
+ domain: "{{ if (and .Values.ingress.enabled .Values.ingress.hosts) }}{{ .Values.ingress.hosts | first }}{{ else }}''{{ 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
@@ -407,7 +759,7 @@ grafana.ini:
# 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://github.com/user
+ # api_url: https://api.github.com/user
# team_ids:
# allowed_organizations:
# client_id:
@@ -455,7 +807,12 @@ smtp:
## 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: kiwigrid/k8s-sidecar:0.1.99
+ image:
+ # -- The Docker registry
+ registry: quay.io
+ repository: kiwigrid/k8s-sidecar
+ tag: 1.25.1
+ sha: ""
imagePullPolicy: IfNotPresent
resources: {}
# limits:
@@ -464,21 +821,103 @@ sidecar:
# requests:
# cpu: 50m
# memory: 50Mi
+ securityContext:
+ allowPrivilegeEscalation: false
+ capabilities:
+ drop:
+ - ALL
+ seccompProfile:
+ type: RuntimeDefault
# 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
+ alerts:
+ enabled: false
+ # Additional environment variables for the alerts sidecar
+ env: {}
+ # Do not reprocess already processed unchanged resources on k8s API reconnect.
+ # ignoreAlreadyProcessed: true
+ # label that the configmaps with alert are marked with
+ label: grafana_alert
+ # value of label that the configmaps with alert are set to
+ labelValue: ""
+ # Log level. Can be one of: DEBUG, INFO, WARN, ERROR, CRITICAL.
+ # logLevel: INFO
+ # If specified, the sidecar will search for alert 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
+ # 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 alerts
+ reloadURL: "http://localhost:3000/api/admin/provisioning/alerting/reload"
+ # Absolute path to shell script to execute after a alert got reloaded
+ script: null
+ skipReload: false
+ # Deploy the alert sidecar as an initContainer in addition to a container.
+ # Additional alert sidecar volume mounts
+ extraMounts: []
+ # Sets the size limit of the alert sidecar emptyDir volume
+ sizeLimit: {}
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
- # If specified, the sidecar will search for dashboard config-maps inside this namespace.
+ # Namespaces list. If specified, the sidecar will search for config-maps/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
+ # 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.
+ # You can use this parameter together with `provider.foldersFromFilesStructure`to annotate configmaps and create folder structure.
+ folderAnnotation: null
+ # Endpoint to send request to reload alerts
+ reloadURL: "http://localhost:3000/api/admin/provisioning/dashboards/reload"
+ # Absolute path to shell script to execute after a configmap got reloaded
+ script: null
+ skipReload: false
+ # 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
@@ -493,15 +932,338 @@ sidecar:
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
# 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
+ # 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: false
+ # 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: false
+ # 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
+ # If specified, the sidecar will search for plugin 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
+ # 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
+ # 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
+ # 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 notifiers
+ reloadURL: "http://localhost:3000/api/admin/provisioning/notifications/reload"
+ # Absolute path to shell script to execute after a notifier got reloaded
+ script: null
+ skipReload: false
+ # Deploy the notifier sidecar as an initContainer in addition to a container.
+ # This is needed if skipReload is true, to load any notifiers defined at startup time.
+ initNotifiers: false
+ # 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:
+ deploymentStrategy: {}
+ # Enable the image-renderer deployment & service
+ enabled: false
+ replicas: 1
+ autoscaling:
+ enabled: false
+ minReplicas: 1
+ maxReplicas: 5
+ targetCPU: "60"
+ targetMemory: ""
+ behavior: {}
+ image:
+ # -- The Docker registry
+ registry: docker.io
+ # image-renderer Image repository
+ repository: grafana/grafana-image-renderer
+ # image-renderer Image tag
+ tag: latest
+ # 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
+
+ ## "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
+
+ # image-renderer deployment serviceAccount
+ serviceAccountName: ""
+ # image-renderer deployment securityContext
+ securityContext: {}
+ # image-renderer deployment container securityContext
+ containerSecurityContext:
+ seccompProfile:
+ type: RuntimeDefault
+ capabilities:
+ drop: ['ALL']
+ allowPrivilegeEscalation: false
+ readOnlyRootFilesystem: true
+ ## image-renderer pod annotation
+ podAnnotations: {}
+ # 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: ""
+ 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: []
+ # See: https://doc.crds.dev/github.com/prometheus-operator/kube-prometheus/monitoring.coreos.com/ServiceMonitor/v1@v0.11.0#spec-targetLabels
+ targetLabels: []
+ # - targetLabel1
+ # - targetLabel2
+ # 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
+ # Allow additional services to access image-renderer (eg. Prometheus operator when ServiceMonitor is enabled)
+ extraIngressSelectors: []
+ 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: {}
+
+ ## Use an alternate scheduler, e.g. "stork".
+ ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
+ ##
+ # schedulerName: "default-scheduler"
+
+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
+# Create a dynamic manifests via values:
+extraObjects: []
+ # - apiVersion: "kubernetes-client.io/v1"
+ # kind: ExternalSecret
+ # metadata:
+ # name: grafana-secrets
+ # spec:
+ # backendType: gcpSecretsManager
+ # data:
+ # - key: grafana-admin-password
+ # name: adminPassword
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/.helmignore b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/.helmignore
old mode 100755
new mode 100644
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/Chart.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/Chart.yaml
old mode 100755
new mode 100644
index a887efd492..9e2ceb2683
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/Chart.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/Chart.yaml
@@ -1,20 +1,26 @@
-apiVersion: v1
-appVersion: 1.9.5
+apiVersion: v2
+name: kube-state-metrics
description: Install kube-state-metrics to generate and expose cluster-level metrics
-home: https://github.com/kubernetes/kube-state-metrics/
keywords:
- metric
- monitoring
- prometheus
- kubernetes
-maintainers:
-- email: jose@armesto.net
- name: fiunchinho
-- email: tariq.ibrahim@mulesoft.com
- name: tariq1890
-- email: manuel@rueg.eu
- name: mrueg
-name: kube-state-metrics
+type: application
+version: 5.14.0
+appVersion: 2.10.0
+home: https://github.com/kubernetes/kube-state-metrics/
sources:
- https://github.com/kubernetes/kube-state-metrics/
-version: 2.8.4
+maintainers:
+- name: tariq1890
+ email: tariq.ibrahim@mulesoft.com
+- name: mrueg
+ email: manuel@rueg.eu
+- name: dotdc
+ email: david@0xdc.me
+annotations:
+ "artifacthub.io/license": Apache-2.0
+ "artifacthub.io/links": |
+ - name: Chart Source
+ url: https://github.com/prometheus-community/helm-charts
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/OWNERS b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/OWNERS
deleted file mode 100755
index 6ffd97d743..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/OWNERS
+++ /dev/null
@@ -1,8 +0,0 @@
-approvers:
-- fiunchinho
-- tariq1890
-- mrueg
-reviewers:
-- fiunchinho
-- tariq1890
-- mrueg
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/README.md b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/README.md
old mode 100755
new mode 100644
index c7d21dd51a..843be89e69
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/README.md
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/README.md
@@ -1,75 +1,85 @@
# kube-state-metrics Helm Chart
-* Installs the [kube-state-metrics agent](https://github.com/kubernetes/kube-state-metrics).
+Installs the [kube-state-metrics agent](https://github.com/kubernetes/kube-state-metrics).
-## Installing the Chart
+## Get 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._
+
+
+## Install Chart
+
+```console
+helm install [RELEASE_NAME] prometheus-community/kube-state-metrics [flags]
+```
+
+_See [configuration](#configuration) below._
+
+_See [helm install](https://helm.sh/docs/helm/helm_install/) for command documentation._
-To install the chart with the release name `my-release`:
+## Uninstall Chart
-```bash
-$ helm install stable/kube-state-metrics
+```console
+helm uninstall [RELEASE_NAME]
```
+This removes all the Kubernetes components associated with the chart and deletes the release.
+
+_See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall/) for command documentation._
+
+## Upgrading Chart
+
+```console
+helm upgrade [RELEASE_NAME] prometheus-community/kube-state-metrics [flags]
+```
+
+_See [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/) for command documentation._
+
+### Migrating from stable/kube-state-metrics and kubernetes/kube-state-metrics
+
+You can upgrade in-place:
+
+1. [get repository info](#get-repository-info)
+1. [upgrade](#upgrading-chart) your existing release name using the new chart repository
+
+## Upgrading to v3.0.0
+
+v3.0.0 includes kube-state-metrics v2.0, see the [changelog](https://github.com/kubernetes/kube-state-metrics/blob/release-2.0/CHANGELOG.md) for major changes on the application-side.
+
+The upgraded chart now the following changes:
+
+* Dropped support for helm v2 (helm v3 or later is required)
+* collectors key was renamed to resources
+* namespace key was renamed to namespaces
+
## Configuration
-| Parameter | Description | Default |
-|:---------------------------------------------|:--------------------------------------------------------------------------------------|:-------------------------------------------|
-| `image.repository` | The image repository to pull from | quay.io/coreos/kube-state-metrics |
-| `image.tag` | The image tag to pull from | `v1.9.5` |
-| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
-| `replicas` | Number of replicas | `1` |
-| `autosharding.enabled` | Set to `true` to automatically shard data across `replicas` pods. EXPERIMENTAL | `false` |
-| `service.port` | The port of the container | `8080` |
-| `service.annotations` | Annotations to be added to the service | `{}` |
-| `customLabels` | Custom labels to apply to service, deployment and pods | `{}` |
-| `hostNetwork` | Whether or not to use the host network | `false` |
-| `prometheusScrape` | Whether or not enable prom scrape | `true` |
-| `rbac.create` | If true, create & use RBAC resources | `true` |
-| `serviceAccount.create` | If true, create & use serviceAccount | `true` |
-| `serviceAccount.name` | If not set & create is true, use template fullname | |
-| `serviceAccount.imagePullSecrets` | Specify image pull secrets field | `[]` |
-| `podSecurityPolicy.enabled` | If true, create & use PodSecurityPolicy resources. Note that related RBACs are created only if `rbac.enabled` is `true. | `false` |
-| `podSecurityPolicy.annotations` | Specify pod annotations in the pod security policy | {} |
-| `securityContext.enabled` | Enable security context | `true` |
-| `securityContext.fsGroup` | Group ID for the container | `65534` |
-| `securityContext.runAsUser` | User ID for the container | `65534` |
-| `priorityClassName` | Name of Priority Class to assign pods | `nil` |
-| `nodeSelector` | Node labels for pod assignment | {} |
-| `affinity` | Affinity settings for pod assignment | {} |
-| `tolerations` | Tolerations for pod assignment | [] |
-| `podAnnotations` | Annotations to be added to the pod | {} |
-| `podDisruptionBudget` | Optional PodDisruptionBudget | {} |
-| `resources` | kube-state-metrics resource requests and limits | {} |
-| `collectors.certificatesigningrequests` | Enable the certificatesigningrequests collector. | `true` |
-| `collectors.configmaps` | Enable the configmaps collector. | `true` |
-| `collectors.cronjobs` | Enable the cronjobs collector. | `true` |
-| `collectors.daemonsets` | Enable the daemonsets collector. | `true` |
-| `collectors.deployments` | Enable the deployments collector. | `true` |
-| `collectors.endpoints` | Enable the endpoints collector. | `true` |
-| `collectors.horizontalpodautoscalers` | Enable the horizontalpodautoscalers collector. | `true` |
-| `collectors.ingresses` | Enable the ingresses collector. | `true` |
-| `collectors.jobs` | Enable the jobs collector. | `true` |
-| `collectors.limitranges` | Enable the limitranges collector. | `true` |
-| `collectors.mutatingwebhookconfigurations` | Enable the mutatingwebhookconfigurations collector. | `true` |
-| `collectors.namespaces` | Enable the namespaces collector. | `true` |
-| `collectors.networkpolicies` | Enable the networkpolicies collector. | `true` |
-| `collectors.nodes` | Enable the nodes collector. | `true` |
-| `collectors.persistentvolumeclaims` | Enable the persistentvolumeclaims collector. | `true` |
-| `collectors.persistentvolumes` | Enable the persistentvolumes collector. | `true` |
-| `collectors.poddisruptionbudgets` | Enable the poddisruptionbudgets collector. | `true` |
-| `collectors.pods` | Enable the pods collector. | `true` |
-| `collectors.replicasets` | Enable the replicasets collector. | `true` |
-| `collectors.replicationcontrollers` | Enable the replicationcontrollers collector. | `true` |
-| `collectors.resourcequotas` | Enable the resourcequotas collector. | `true` |
-| `collectors.secrets` | Enable the secrets collector. | `true` |
-| `collectors.services` | Enable the services collector. | `true` |
-| `collectors.statefulsets` | Enable the statefulsets collector. | `true` |
-| `collectors.storageclasses` | Enable the storageclasses collector. | `true` |
-| `collectors.validatingwebhookconfigurations` | Enable the validatingwebhookconfigurations collector. | `true` |
-| `collectors.verticalpodautoscalers` | Enable the verticalpodautoscalers collector. | `true` |
-| `collectors.volumeattachments` | Enable the volumeattachments collector. | `true` |
-| `prometheus.monitor.enabled` | Set this to `true` to create ServiceMonitor for Prometheus operator | `false` |
-| `prometheus.monitor.additionalLabels` | Additional labels that can be used so ServiceMonitor will be discovered by Prometheus | `{}` |
-| `prometheus.monitor.namespace` | Namespace where servicemonitor resource should be created | `the same namespace as kube-state-metrics` |
-| `prometheus.monitor.honorLabels` | Honor metric labels | `false` |
-| `namespaceOverride` | Override the deployment namespace | `""` (`Release.Namespace`) |
+See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing). To see all configurable options with detailed comments:
+
+```console
+helm show values prometheus-community/kube-state-metrics
+```
+
+### kube-rbac-proxy
+
+You can enable `kube-state-metrics` endpoint protection using `kube-rbac-proxy`. By setting `kubeRBACProxy.enabled: true`, this chart will deploy one RBAC proxy container per endpoint (metrics & telemetry).
+To authorize access, authenticate your requests (via a `ServiceAccount` for example) with a `ClusterRole` attached such as:
+
+```yaml
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRole
+metadata:
+ name: kube-state-metrics-read
+rules:
+ - apiGroups: [ "" ]
+ resources: ["services/kube-state-metrics"]
+ verbs:
+ - get
+```
+
+See [kube-rbac-proxy examples](https://github.com/brancz/kube-rbac-proxy/tree/master/examples/resource-attributes) for more details.
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/NOTES.txt b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/NOTES.txt
old mode 100755
new mode 100644
index 5a646e0cca..3589c24ec3
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/NOTES.txt
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/NOTES.txt
@@ -8,3 +8,16 @@ In your case, {{ template "kube-state-metrics.fullname" . }}.{{ template "kube-s
They are served either as plaintext or protobuf depending on the Accept header.
They are designed to be consumed either by Prometheus itself or by a scraper that is compatible with scraping a Prometheus client endpoint.
+{{- if .Values.kubeRBACProxy.enabled}}
+
+kube-rbac-proxy endpoint protections is enabled:
+- Metrics endpoints are now HTTPS
+- Ensure that the client authenticates the requests (e.g. via service account) with the following role permissions:
+```
+rules:
+ - apiGroups: [ "" ]
+ resources: ["services/{{ template "kube-state-metrics.fullname" . }}"]
+ verbs:
+ - get
+```
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/_helpers.tpl b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/_helpers.tpl
old mode 100755
new mode 100644
index 6ae0e647fe..a4358c87a1
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/_helpers.tpl
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/_helpers.tpl
@@ -45,3 +45,112 @@ Allow the release namespace to be overridden for multi-namespace deployments in
{{- .Release.Namespace -}}
{{- end -}}
{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "kube-state-metrics.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Generate basic labels
+*/}}
+{{- define "kube-state-metrics.labels" }}
+helm.sh/chart: {{ template "kube-state-metrics.chart" . }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+app.kubernetes.io/component: metrics
+app.kubernetes.io/part-of: {{ template "kube-state-metrics.name" . }}
+{{- include "kube-state-metrics.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+{{- if .Values.customLabels }}
+{{ toYaml .Values.customLabels }}
+{{- end }}
+{{- if .Values.releaseLabel }}
+release: {{ .Release.Name }}
+{{- end }}
+{{- end }}
+
+{{/*
+Selector labels
+*/}}
+{{- define "kube-state-metrics.selectorLabels" }}
+{{- if .Values.selectorOverride }}
+{{ toYaml .Values.selectorOverride }}
+{{- else }}
+app.kubernetes.io/name: {{ include "kube-state-metrics.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end }}
+{{- end }}
+
+{{/* Sets default scrape limits for servicemonitor */}}
+{{- define "servicemonitor.scrapeLimits" -}}
+{{- with .sampleLimit }}
+sampleLimit: {{ . }}
+{{- end }}
+{{- with .targetLimit }}
+targetLimit: {{ . }}
+{{- end }}
+{{- with .labelLimit }}
+labelLimit: {{ . }}
+{{- end }}
+{{- with .labelNameLengthLimit }}
+labelNameLengthLimit: {{ . }}
+{{- end }}
+{{- with .labelValueLengthLimit }}
+labelValueLengthLimit: {{ . }}
+{{- end }}
+{{- end -}}
+
+{{/*
+Formats imagePullSecrets. Input is (dict "Values" .Values "imagePullSecrets" .{specific imagePullSecrets})
+*/}}
+{{- define "kube-state-metrics.imagePullSecrets" -}}
+{{- range (concat .Values.global.imagePullSecrets .imagePullSecrets) }}
+ {{- if eq (typeOf .) "map[string]interface {}" }}
+- {{ toYaml . | trim }}
+ {{- else }}
+- name: {{ . }}
+ {{- end }}
+{{- end }}
+{{- end -}}
+
+{{/*
+The image to use for kube-state-metrics
+*/}}
+{{- define "kube-state-metrics.image" -}}
+{{- if .Values.image.sha }}
+{{- if .Values.global.imageRegistry }}
+{{- printf "%s/%s:%s@%s" .Values.global.imageRegistry .Values.image.repository (default (printf "v%s" .Chart.AppVersion) .Values.image.tag) .Values.image.sha }}
+{{- else }}
+{{- printf "%s/%s:%s@%s" .Values.image.registry .Values.image.repository (default (printf "v%s" .Chart.AppVersion) .Values.image.tag) .Values.image.sha }}
+{{- end }}
+{{- else }}
+{{- if .Values.global.imageRegistry }}
+{{- printf "%s/%s:%s" .Values.global.imageRegistry .Values.image.repository (default (printf "v%s" .Chart.AppVersion) .Values.image.tag) }}
+{{- else }}
+{{- printf "%s/%s:%s" .Values.image.registry .Values.image.repository (default (printf "v%s" .Chart.AppVersion) .Values.image.tag) }}
+{{- end }}
+{{- end }}
+{{- end }}
+
+{{/*
+The image to use for kubeRBACProxy
+*/}}
+{{- define "kubeRBACProxy.image" -}}
+{{- if .Values.kubeRBACProxy.image.sha }}
+{{- if .Values.global.imageRegistry }}
+{{- printf "%s/%s:%s@%s" .Values.global.imageRegistry .Values.kubeRBACProxy.image.repository (default (printf "v%s" .Chart.AppVersion) .Values.kubeRBACProxy.image.tag) .Values.kubeRBACProxy.image.sha }}
+{{- else }}
+{{- printf "%s/%s:%s@%s" .Values.kubeRBACProxy.image.registry .Values.kubeRBACProxy.image.repository (default (printf "v%s" .Chart.AppVersion) .Values.kubeRBACProxy.image.tag) .Values.kubeRBACProxy.image.sha }}
+{{- end }}
+{{- else }}
+{{- if .Values.global.imageRegistry }}
+{{- printf "%s/%s:%s" .Values.global.imageRegistry .Values.kubeRBACProxy.image.repository (default (printf "v%s" .Chart.AppVersion) .Values.kubeRBACProxy.image.tag) }}
+{{- else }}
+{{- printf "%s/%s:%s" .Values.kubeRBACProxy.image.registry .Values.kubeRBACProxy.image.repository (default (printf "v%s" .Chart.AppVersion) .Values.kubeRBACProxy.image.tag) }}
+{{- end }}
+{{- end }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/ciliumnetworkpolicy.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/ciliumnetworkpolicy.yaml
new file mode 100644
index 0000000000..025cd47a88
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/ciliumnetworkpolicy.yaml
@@ -0,0 +1,33 @@
+{{- if and .Values.networkPolicy.enabled (eq .Values.networkPolicy.flavor "cilium") }}
+apiVersion: cilium.io/v2
+kind: CiliumNetworkPolicy
+metadata:
+ {{- if .Values.annotations }}
+ annotations:
+ {{ toYaml .Values.annotations | nindent 4 }}
+ {{- end }}
+ labels:
+ {{- include "kube-state-metrics.labels" . | indent 4 }}
+ name: {{ template "kube-state-metrics.fullname" . }}
+ namespace: {{ template "kube-state-metrics.namespace" . }}
+spec:
+ endpointSelector:
+ matchLabels:
+ {{- include "kube-state-metrics.selectorLabels" . | indent 6 }}
+ egress:
+ {{- if and .Values.networkPolicy.cilium .Values.networkPolicy.cilium.kubeApiServerSelector }}
+ {{ toYaml .Values.networkPolicy.cilium.kubeApiServerSelector | nindent 6 }}
+ {{- else }}
+ - toEntities:
+ - kube-apiserver
+ {{- end }}
+ ingress:
+ - toPorts:
+ - ports:
+ - port: {{ .Values.service.port | quote }}
+ protocol: TCP
+ {{- if .Values.selfMonitor.enabled }}
+ - port: {{ .Values.selfMonitor.telemetryPort | default 8081 | quote }}
+ protocol: TCP
+ {{ end }}
+{{ end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/clusterrolebinding.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/clusterrolebinding.yaml
old mode 100755
new mode 100644
index 4635985aa0..cf9f628d04
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/clusterrolebinding.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/clusterrolebinding.yaml
@@ -1,19 +1,20 @@
-{{- if .Values.rbac.create -}}
-apiVersion: rbac.authorization.k8s.io/v1beta1
+{{- if and .Values.rbac.create .Values.rbac.useClusterRole -}}
+apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
- app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
- helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
- app.kubernetes.io/managed-by: {{ .Release.Service }}
- app.kubernetes.io/instance: {{ .Release.Name }}
+ {{- include "kube-state-metrics.labels" . | indent 4 }}
name: {{ template "kube-state-metrics.fullname" . }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
+{{- if .Values.rbac.useExistingRole }}
+ name: {{ .Values.rbac.useExistingRole }}
+{{- else }}
name: {{ template "kube-state-metrics.fullname" . }}
+{{- end }}
subjects:
- kind: ServiceAccount
- name: {{ template "kube-state-metrics.fullname" . }}
+ name: {{ template "kube-state-metrics.serviceAccountName" . }}
namespace: {{ template "kube-state-metrics.namespace" . }}
{{- end -}}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/crs-configmap.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/crs-configmap.yaml
new file mode 100644
index 0000000000..d38a75a51d
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/crs-configmap.yaml
@@ -0,0 +1,16 @@
+{{- if .Values.customResourceState.enabled}}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ template "kube-state-metrics.fullname" . }}-customresourcestate-config
+ namespace: {{ template "kube-state-metrics.namespace" . }}
+ labels:
+ {{- include "kube-state-metrics.labels" . | indent 4 }}
+ {{- if .Values.annotations }}
+ annotations:
+ {{ toYaml .Values.annotations | nindent 4 }}
+ {{- end }}
+data:
+ config.yaml: |
+ {{- toYaml .Values.customResourceState.config | nindent 4 }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/deployment.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/deployment.yaml
old mode 100755
new mode 100644
index b6affcc202..2aedc92016
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/deployment.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/deployment.yaml
@@ -8,48 +8,51 @@ metadata:
name: {{ template "kube-state-metrics.fullname" . }}
namespace: {{ template "kube-state-metrics.namespace" . }}
labels:
- app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
- helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
- app.kubernetes.io/instance: "{{ .Release.Name }}"
- app.kubernetes.io/managed-by: "{{ .Release.Service }}"
-{{- if .Values.customLabels }}
-{{ toYaml .Values.customLabels | indent 4 }}
-{{- end }}
+ {{- include "kube-state-metrics.labels" . | indent 4 }}
+ {{- if .Values.annotations }}
+ annotations:
+{{ toYaml .Values.annotations | indent 4 }}
+ {{- end }}
spec:
selector:
matchLabels:
- app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
+ {{- include "kube-state-metrics.selectorLabels" . | indent 6 }}
replicas: {{ .Values.replicas }}
-{{- if .Values.autosharding.enabled }}
+ {{- if not .Values.autosharding.enabled }}
+ strategy:
+ type: {{ .Values.updateStrategy | default "RollingUpdate" }}
+ {{- end }}
+ revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
+ {{- if .Values.autosharding.enabled }}
serviceName: {{ template "kube-state-metrics.fullname" . }}
volumeClaimTemplates: []
-{{- end }}
+ {{- end }}
template:
metadata:
labels:
- app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
- app.kubernetes.io/instance: "{{ .Release.Name }}"
-{{- if .Values.customLabels }}
-{{ toYaml .Values.customLabels | indent 8 }}
-{{- end }}
-{{- if .Values.podAnnotations }}
+ {{- include "kube-state-metrics.labels" . | indent 8 }}
+ {{- if .Values.podAnnotations }}
annotations:
{{ toYaml .Values.podAnnotations | indent 8 }}
-{{- end }}
+ {{- end }}
spec:
hostNetwork: {{ .Values.hostNetwork }}
serviceAccountName: {{ template "kube-state-metrics.serviceAccountName" . }}
{{- if .Values.securityContext.enabled }}
- securityContext:
- fsGroup: {{ .Values.securityContext.fsGroup }}
- runAsUser: {{ .Values.securityContext.runAsUser }}
+ securityContext: {{- omit .Values.securityContext "enabled" | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName }}
{{- end }}
+ {{- with .Values.initContainers }}
+ initContainers:
+ {{- toYaml . | nindent 6 }}
+ {{- end }}
containers:
- - name: {{ .Chart.Name }}
-{{- if .Values.autosharding.enabled }}
+ {{- $httpPort := ternary 9090 (.Values.service.port | default 8080) .Values.kubeRBACProxy.enabled}}
+ {{- $telemetryPort := ternary 9091 (.Values.selfMonitor.telemetryPort | default 8081) .Values.kubeRBACProxy.enabled}}
+ - name: {{ template "kube-state-metrics.name" . }}
+ {{- if .Values.autosharding.enabled }}
env:
- name: POD_NAME
valueFrom:
@@ -59,128 +62,229 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
-{{- end }}
+ {{- end }}
args:
-{{ if .Values.collectors.certificatesigningrequests }}
- - --collectors=certificatesigningrequests
-{{ end }}
-{{ if .Values.collectors.configmaps }}
- - --collectors=configmaps
-{{ end }}
-{{ if .Values.collectors.cronjobs }}
- - --collectors=cronjobs
-{{ end }}
-{{ if .Values.collectors.daemonsets }}
- - --collectors=daemonsets
-{{ end }}
-{{ if .Values.collectors.deployments }}
- - --collectors=deployments
-{{ end }}
-{{ if .Values.collectors.endpoints }}
- - --collectors=endpoints
-{{ end }}
-{{ if .Values.collectors.horizontalpodautoscalers }}
- - --collectors=horizontalpodautoscalers
-{{ end }}
-{{ if .Values.collectors.ingresses }}
- - --collectors=ingresses
-{{ end }}
-{{ if .Values.collectors.jobs }}
- - --collectors=jobs
-{{ end }}
-{{ if .Values.collectors.limitranges }}
- - --collectors=limitranges
-{{ end }}
-{{ if .Values.collectors.mutatingwebhookconfigurations }}
- - --collectors=mutatingwebhookconfigurations
-{{ end }}
-{{ if .Values.collectors.namespaces }}
- - --collectors=namespaces
-{{ end }}
-{{ if .Values.collectors.networkpolicies }}
- - --collectors=networkpolicies
-{{ end }}
-{{ if .Values.collectors.nodes }}
- - --collectors=nodes
-{{ end }}
-{{ if .Values.collectors.persistentvolumeclaims }}
- - --collectors=persistentvolumeclaims
-{{ end }}
-{{ if .Values.collectors.persistentvolumes }}
- - --collectors=persistentvolumes
-{{ end }}
-{{ if .Values.collectors.poddisruptionbudgets }}
- - --collectors=poddisruptionbudgets
-{{ end }}
-{{ if .Values.collectors.pods }}
- - --collectors=pods
-{{ end }}
-{{ if .Values.collectors.replicasets }}
- - --collectors=replicasets
-{{ end }}
-{{ if .Values.collectors.replicationcontrollers }}
- - --collectors=replicationcontrollers
-{{ end }}
-{{ if .Values.collectors.resourcequotas }}
- - --collectors=resourcequotas
-{{ end }}
-{{ if .Values.collectors.secrets }}
- - --collectors=secrets
-{{ end }}
-{{ if .Values.collectors.services }}
- - --collectors=services
-{{ end }}
-{{ if .Values.collectors.statefulsets }}
- - --collectors=statefulsets
-{{ end }}
-{{ if .Values.collectors.storageclasses }}
- - --collectors=storageclasses
-{{ end }}
-{{ if .Values.collectors.validatingwebhookconfigurations }}
- - --collectors=validatingwebhookconfigurations
-{{ end }}
-{{ if .Values.collectors.verticalpodautoscalers }}
- - --collectors=verticalpodautoscalers
-{{ end }}
-{{ if .Values.collectors.volumeattachments }}
- - --collectors=volumeattachments
-{{ end }}
-{{ if .Values.namespace }}
- - --namespace={{ .Values.namespace }}
-{{ end }}
-{{ if .Values.autosharding.enabled }}
+ {{- if .Values.extraArgs }}
+ {{- .Values.extraArgs | toYaml | nindent 8 }}
+ {{- end }}
+ - --port={{ $httpPort }}
+ {{- if .Values.collectors }}
+ - --resources={{ .Values.collectors | join "," }}
+ {{- end }}
+ {{- if .Values.metricLabelsAllowlist }}
+ - --metric-labels-allowlist={{ .Values.metricLabelsAllowlist | join "," }}
+ {{- end }}
+ {{- if .Values.metricAnnotationsAllowList }}
+ - --metric-annotations-allowlist={{ .Values.metricAnnotationsAllowList | join "," }}
+ {{- end }}
+ {{- if .Values.metricAllowlist }}
+ - --metric-allowlist={{ .Values.metricAllowlist | join "," }}
+ {{- end }}
+ {{- if .Values.metricDenylist }}
+ - --metric-denylist={{ .Values.metricDenylist | join "," }}
+ {{- end }}
+ {{- $namespaces := list }}
+ {{- if .Values.namespaces }}
+ {{- range $ns := join "," .Values.namespaces | split "," }}
+ {{- $namespaces = append $namespaces (tpl $ns $) }}
+ {{- end }}
+ {{- end }}
+ {{- if .Values.releaseNamespace }}
+ {{- $namespaces = append $namespaces ( include "kube-state-metrics.namespace" . ) }}
+ {{- end }}
+ {{- if $namespaces }}
+ - --namespaces={{ $namespaces | mustUniq | join "," }}
+ {{- end }}
+ {{- if .Values.namespacesDenylist }}
+ - --namespaces-denylist={{ tpl (.Values.namespacesDenylist | join ",") $ }}
+ {{- end }}
+ {{- if .Values.autosharding.enabled }}
- --pod=$(POD_NAME)
- --pod-namespace=$(POD_NAMESPACE)
-{{ end }}
+ {{- end }}
+ {{- if .Values.kubeconfig.enabled }}
+ - --kubeconfig=/opt/k8s/.kube/config
+ {{- end }}
+ {{- if .Values.kubeRBACProxy.enabled }}
+ - --telemetry-host=127.0.0.1
+ - --telemetry-port={{ $telemetryPort }}
+ {{- else }}
+ {{- if .Values.selfMonitor.telemetryHost }}
+ - --telemetry-host={{ .Values.selfMonitor.telemetryHost }}
+ {{- end }}
+ {{- if .Values.selfMonitor.telemetryPort }}
+ - --telemetry-port={{ $telemetryPort }}
+ {{- end }}
+ {{- if .Values.customResourceState.enabled }}
+ - --custom-resource-state-config-file=/etc/customresourcestate/config.yaml
+ {{- end }}
+ {{- end }}
+ {{- if or (.Values.kubeconfig.enabled) (.Values.customResourceState.enabled) (.Values.volumeMounts) }}
+ volumeMounts:
+ {{- if .Values.kubeconfig.enabled }}
+ - name: kubeconfig
+ mountPath: /opt/k8s/.kube/
+ readOnly: true
+ {{- end }}
+ {{- if .Values.customResourceState.enabled }}
+ - name: customresourcestate-config
+ mountPath: /etc/customresourcestate
+ readOnly: true
+ {{- end }}
+ {{- if .Values.volumeMounts }}
+{{ toYaml .Values.volumeMounts | indent 8 }}
+ {{- end }}
+ {{- end }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
+ image: {{ include "kube-state-metrics.image" . }}
+ {{- if eq .Values.kubeRBACProxy.enabled false }}
ports:
- - containerPort: 8080
+ - containerPort: {{ .Values.service.port | default 8080}}
+ name: "http"
+ {{- if .Values.selfMonitor.enabled }}
+ - containerPort: {{ $telemetryPort }}
+ name: "metrics"
+ {{- end }}
+ {{- end }}
livenessProbe:
httpGet:
path: /healthz
- port: 8080
+ port: {{ $httpPort }}
initialDelaySeconds: 5
timeoutSeconds: 5
readinessProbe:
httpGet:
path: /
- port: 8080
+ port: {{ $httpPort }}
initialDelaySeconds: 5
timeoutSeconds: 5
-{{- if .Values.resources }}
+ {{- if .Values.resources }}
resources:
{{ toYaml .Values.resources | indent 10 }}
{{- end }}
-{{- if .Values.affinity }}
+{{- if .Values.containerSecurityContext }}
+ securityContext:
+{{ toYaml .Values.containerSecurityContext | indent 10 }}
+{{- end }}
+ {{- if .Values.kubeRBACProxy.enabled }}
+ - name: kube-rbac-proxy-http
+ args:
+ {{- if .Values.kubeRBACProxy.extraArgs }}
+ {{- .Values.kubeRBACProxy.extraArgs | toYaml | nindent 8 }}
+ {{- end }}
+ - --secure-listen-address=:{{ .Values.service.port | default 8080}}
+ - --upstream=http://127.0.0.1:{{ $httpPort }}/
+ - --proxy-endpoints-port=8888
+ - --config-file=/etc/kube-rbac-proxy-config/config-file.yaml
+ volumeMounts:
+ - name: kube-rbac-proxy-config
+ mountPath: /etc/kube-rbac-proxy-config
+ {{- with .Values.kubeRBACProxy.volumeMounts }}
+ {{- toYaml . | nindent 10 }}
+ {{- end }}
+ imagePullPolicy: {{ .Values.kubeRBACProxy.image.pullPolicy }}
+ image: {{ include "kubeRBACProxy.image" . }}
+ ports:
+ - containerPort: {{ .Values.service.port | default 8080}}
+ name: "http"
+ - containerPort: 8888
+ name: "http-healthz"
+ readinessProbe:
+ httpGet:
+ scheme: HTTPS
+ port: 8888
+ path: healthz
+ initialDelaySeconds: 5
+ timeoutSeconds: 5
+ {{- if .Values.kubeRBACProxy.resources }}
+ resources:
+{{ toYaml .Values.kubeRBACProxy.resources | indent 10 }}
+{{- end }}
+{{- if .Values.kubeRBACProxy.containerSecurityContext }}
+ securityContext:
+{{ toYaml .Values.kubeRBACProxy.containerSecurityContext | indent 10 }}
+{{- end }}
+ {{- if .Values.selfMonitor.enabled }}
+ - name: kube-rbac-proxy-telemetry
+ args:
+ {{- if .Values.kubeRBACProxy.extraArgs }}
+ {{- .Values.kubeRBACProxy.extraArgs | toYaml | nindent 8 }}
+ {{- end }}
+ - --secure-listen-address=:{{ .Values.selfMonitor.telemetryPort | default 8081 }}
+ - --upstream=http://127.0.0.1:{{ $telemetryPort }}/
+ - --proxy-endpoints-port=8889
+ - --config-file=/etc/kube-rbac-proxy-config/config-file.yaml
+ volumeMounts:
+ - name: kube-rbac-proxy-config
+ mountPath: /etc/kube-rbac-proxy-config
+ {{- with .Values.kubeRBACProxy.volumeMounts }}
+ {{- toYaml . | nindent 10 }}
+ {{- end }}
+ imagePullPolicy: {{ .Values.kubeRBACProxy.image.pullPolicy }}
+ image: {{ include "kubeRBACProxy.image" . }}
+ ports:
+ - containerPort: {{ .Values.selfMonitor.telemetryPort | default 8081 }}
+ name: "metrics"
+ - containerPort: 8889
+ name: "metrics-healthz"
+ readinessProbe:
+ httpGet:
+ scheme: HTTPS
+ port: 8889
+ path: healthz
+ initialDelaySeconds: 5
+ timeoutSeconds: 5
+ {{- if .Values.kubeRBACProxy.resources }}
+ resources:
+{{ toYaml .Values.kubeRBACProxy.resources | indent 10 }}
+{{- end }}
+{{- if .Values.kubeRBACProxy.containerSecurityContext }}
+ securityContext:
+{{ toYaml .Values.kubeRBACProxy.containerSecurityContext | indent 10 }}
+{{- end }}
+ {{- end }}
+ {{- end }}
+ {{- with .Values.containers }}
+ {{- toYaml . | nindent 6 }}
+ {{- end }}
+{{- if or .Values.imagePullSecrets .Values.global.imagePullSecrets }}
+ imagePullSecrets:
+ {{- include "kube-state-metrics.imagePullSecrets" (dict "Values" .Values "imagePullSecrets" .Values.imagePullSecrets) | indent 8 }}
+ {{- end }}
+ {{- if .Values.affinity }}
affinity:
{{ toYaml .Values.affinity | indent 8 }}
-{{- end }}
-{{- if .Values.nodeSelector }}
+ {{- end }}
+ {{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
-{{- end }}
-{{- if .Values.tolerations }}
+ {{- end }}
+ {{- if .Values.tolerations }}
tolerations:
{{ toYaml .Values.tolerations | indent 8 }}
-{{- end }}
+ {{- end }}
+ {{- if .Values.topologySpreadConstraints }}
+ topologySpreadConstraints:
+{{ toYaml .Values.topologySpreadConstraints | indent 8 }}
+ {{- end }}
+ {{- if or (.Values.kubeconfig.enabled) (.Values.customResourceState.enabled) (.Values.volumes) (.Values.kubeRBACProxy.enabled) }}
+ volumes:
+ {{- if .Values.kubeconfig.enabled}}
+ - name: kubeconfig
+ secret:
+ secretName: {{ template "kube-state-metrics.fullname" . }}-kubeconfig
+ {{- end }}
+ {{- if .Values.kubeRBACProxy.enabled}}
+ - name: kube-rbac-proxy-config
+ configMap:
+ name: {{ template "kube-state-metrics.fullname" . }}-rbac-config
+ {{- end }}
+ {{- if .Values.customResourceState.enabled}}
+ - name: customresourcestate-config
+ configMap:
+ name: {{ template "kube-state-metrics.fullname" . }}-customresourcestate-config
+ {{- end }}
+ {{- if .Values.volumes }}
+{{ toYaml .Values.volumes | indent 8 }}
+ {{- end }}
+ {{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/extra-manifests.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/extra-manifests.yaml
new file mode 100644
index 0000000000..567f7bf329
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/extra-manifests.yaml
@@ -0,0 +1,4 @@
+{{ range .Values.extraManifests }}
+---
+{{ tpl (toYaml .) $ }}
+{{ end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/kubeconfig-secret.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/kubeconfig-secret.yaml
new file mode 100644
index 0000000000..6af0084502
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/kubeconfig-secret.yaml
@@ -0,0 +1,12 @@
+{{- if .Values.kubeconfig.enabled -}}
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ template "kube-state-metrics.fullname" . }}-kubeconfig
+ namespace: {{ template "kube-state-metrics.namespace" . }}
+ labels:
+ {{- include "kube-state-metrics.labels" . | indent 4 }}
+type: Opaque
+data:
+ config: '{{ .Values.kubeconfig.secret }}'
+{{- end -}}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/networkpolicy.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/networkpolicy.yaml
new file mode 100644
index 0000000000..309b38ec54
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/networkpolicy.yaml
@@ -0,0 +1,43 @@
+{{- if and .Values.networkPolicy.enabled (eq .Values.networkPolicy.flavor "kubernetes") }}
+kind: NetworkPolicy
+apiVersion: networking.k8s.io/v1
+metadata:
+ {{- if .Values.annotations }}
+ annotations:
+ {{ toYaml .Values.annotations | nindent 4 }}
+ {{- end }}
+ labels:
+ {{- include "kube-state-metrics.labels" . | indent 4 }}
+ name: {{ template "kube-state-metrics.fullname" . }}
+ namespace: {{ template "kube-state-metrics.namespace" . }}
+spec:
+ {{- if .Values.networkPolicy.egress }}
+ ## Deny all egress by default
+ egress:
+ {{- toYaml .Values.networkPolicy.egress | nindent 4 }}
+ {{- end }}
+ ingress:
+ {{- if .Values.networkPolicy.ingress }}
+ {{- toYaml .Values.networkPolicy.ingress | nindent 4 }}
+ {{- else }}
+ ## Allow ingress on default ports by default
+ - ports:
+ - port: {{ .Values.service.port | default 8080 }}
+ protocol: TCP
+ {{- if .Values.selfMonitor.enabled }}
+ {{- $telemetryPort := ternary 9091 (.Values.selfMonitor.telemetryPort | default 8081) .Values.kubeRBACProxy.enabled}}
+ - port: {{ $telemetryPort }}
+ protocol: TCP
+ {{- end }}
+ {{- end }}
+ podSelector:
+ {{- if .Values.networkPolicy.podSelector }}
+ {{- toYaml .Values.networkPolicy.podSelector | nindent 4 }}
+ {{- else }}
+ matchLabels:
+ {{- include "kube-state-metrics.selectorLabels" . | indent 6 }}
+ {{- end }}
+ policyTypes:
+ - Ingress
+ - Egress
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/pdb.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/pdb.yaml
old mode 100755
new mode 100644
index 6adb50d79f..3771b511de
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/pdb.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/pdb.yaml
@@ -1,17 +1,18 @@
{{- if .Values.podDisruptionBudget -}}
+{{ if $.Capabilities.APIVersions.Has "policy/v1/PodDisruptionBudget" -}}
+apiVersion: policy/v1
+{{- else -}}
apiVersion: policy/v1beta1
+{{- end }}
kind: PodDisruptionBudget
metadata:
name: {{ template "kube-state-metrics.fullname" . }}
namespace: {{ template "kube-state-metrics.namespace" . }}
labels:
- app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
- helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
- app.kubernetes.io/instance: "{{ .Release.Name }}"
- app.kubernetes.io/managed-by: "{{ .Release.Service }}"
+ {{- include "kube-state-metrics.labels" . | indent 4 }}
spec:
selector:
matchLabels:
app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
{{ toYaml .Values.podDisruptionBudget | indent 2 }}
-{{- end -}}
\ No newline at end of file
+{{- end -}}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/podsecuritypolicy.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/podsecuritypolicy.yaml
old mode 100755
new mode 100644
index aeff11791c..8905e113e8
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/podsecuritypolicy.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/podsecuritypolicy.yaml
@@ -1,13 +1,10 @@
-{{- if .Values.podSecurityPolicy.enabled }}
+{{- if and .Values.podSecurityPolicy.enabled (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") }}
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
name: {{ template "kube-state-metrics.fullname" . }}
labels:
- app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
- helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
- app.kubernetes.io/managed-by: {{ .Release.Service }}
- app.kubernetes.io/instance: {{ .Release.Name }}
+ {{- include "kube-state-metrics.labels" . | indent 4 }}
{{- if .Values.podSecurityPolicy.annotations }}
annotations:
{{ toYaml .Values.podSecurityPolicy.annotations | indent 4 }}
@@ -16,6 +13,9 @@ spec:
privileged: false
volumes:
- 'secret'
+{{- if .Values.podSecurityPolicy.additionalVolumes }}
+{{ toYaml .Values.podSecurityPolicy.additionalVolumes | indent 4 }}
+{{- end }}
hostNetwork: false
hostIPC: false
hostPID: false
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/psp-clusterrole.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/psp-clusterrole.yaml
old mode 100755
new mode 100644
index 217abc9504..654e4a3d57
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/psp-clusterrole.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/psp-clusterrole.yaml
@@ -1,12 +1,9 @@
-{{- if and .Values.podSecurityPolicy.enabled .Values.rbac.create -}}
+{{- if and .Values.podSecurityPolicy.enabled (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
- app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
- helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
- app.kubernetes.io/managed-by: {{ .Release.Service }}
- app.kubernetes.io/instance: {{ .Release.Name }}
+ {{- include "kube-state-metrics.labels" . | indent 4 }}
name: psp-{{ template "kube-state-metrics.fullname" . }}
rules:
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/psp-clusterrolebinding.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/psp-clusterrolebinding.yaml
old mode 100755
new mode 100644
index feb97f2288..5b62a18bdf
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/psp-clusterrolebinding.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/psp-clusterrolebinding.yaml
@@ -1,12 +1,9 @@
-{{- if and .Values.podSecurityPolicy.enabled .Values.rbac.create -}}
+{{- if and .Values.podSecurityPolicy.enabled (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
- app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
- helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
- app.kubernetes.io/managed-by: {{ .Release.Service }}
- app.kubernetes.io/instance: {{ .Release.Name }}
+ {{- include "kube-state-metrics.labels" . | indent 4 }}
name: psp-{{ template "kube-state-metrics.fullname" . }}
roleRef:
apiGroup: rbac.authorization.k8s.io
@@ -14,6 +11,6 @@ roleRef:
name: psp-{{ template "kube-state-metrics.fullname" . }}
subjects:
- kind: ServiceAccount
- name: {{ template "kube-state-metrics.fullname" . }}
+ name: {{ template "kube-state-metrics.serviceAccountName" . }}
namespace: {{ template "kube-state-metrics.namespace" . }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/rbac-configmap.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/rbac-configmap.yaml
new file mode 100644
index 0000000000..671dc9d660
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/rbac-configmap.yaml
@@ -0,0 +1,22 @@
+{{- if .Values.kubeRBACProxy.enabled}}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ template "kube-state-metrics.fullname" . }}-rbac-config
+ namespace: {{ template "kube-state-metrics.namespace" . }}
+ labels:
+ {{- include "kube-state-metrics.labels" . | indent 4 }}
+ {{- if .Values.annotations }}
+ annotations:
+ {{ toYaml .Values.annotations | nindent 4 }}
+ {{- end }}
+data:
+ config-file.yaml: |+
+ authorization:
+ resourceAttributes:
+ namespace: {{ template "kube-state-metrics.namespace" . }}
+ apiVersion: v1
+ resource: services
+ subresource: {{ template "kube-state-metrics.fullname" . }}
+ name: {{ template "kube-state-metrics.fullname" . }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/clusterrole.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/role.yaml
old mode 100755
new mode 100644
similarity index 51%
rename from kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/clusterrole.yaml
rename to kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/role.yaml
index 319aec16c2..d33687f2d1
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/clusterrole.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/role.yaml
@@ -1,180 +1,212 @@
-{{- if .Values.rbac.create -}}
-apiVersion: rbac.authorization.k8s.io/v1beta1
+{{- if and (eq .Values.rbac.create true) (not .Values.rbac.useExistingRole) -}}
+{{- range (ternary (join "," .Values.namespaces | split "," ) (list "") (eq $.Values.rbac.useClusterRole false)) }}
+---
+apiVersion: rbac.authorization.k8s.io/v1
+{{- if eq $.Values.rbac.useClusterRole false }}
+kind: Role
+{{- else }}
kind: ClusterRole
+{{- end }}
metadata:
labels:
- app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
- helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
- app.kubernetes.io/managed-by: {{ .Release.Service }}
- app.kubernetes.io/instance: {{ .Release.Name }}
- name: {{ template "kube-state-metrics.fullname" . }}
+ {{- include "kube-state-metrics.labels" $ | indent 4 }}
+ name: {{ template "kube-state-metrics.fullname" $ }}
+{{- if eq $.Values.rbac.useClusterRole false }}
+ namespace: {{ . }}
+{{- end }}
rules:
-{{ if .Values.collectors.certificatesigningrequests }}
+{{ if has "certificatesigningrequests" $.Values.collectors }}
- apiGroups: ["certificates.k8s.io"]
resources:
- certificatesigningrequests
verbs: ["list", "watch"]
{{ end -}}
-{{ if .Values.collectors.configmaps }}
+{{ if has "configmaps" $.Values.collectors }}
- apiGroups: [""]
resources:
- configmaps
verbs: ["list", "watch"]
{{ end -}}
-{{ if .Values.collectors.cronjobs }}
+{{ if has "cronjobs" $.Values.collectors }}
- apiGroups: ["batch"]
resources:
- cronjobs
verbs: ["list", "watch"]
{{ end -}}
-{{ if .Values.collectors.daemonsets }}
+{{ if has "daemonsets" $.Values.collectors }}
- apiGroups: ["extensions", "apps"]
resources:
- daemonsets
verbs: ["list", "watch"]
{{ end -}}
-{{ if .Values.collectors.deployments }}
+{{ if has "deployments" $.Values.collectors }}
- apiGroups: ["extensions", "apps"]
resources:
- deployments
verbs: ["list", "watch"]
{{ end -}}
-{{ if .Values.collectors.endpoints }}
+{{ if has "endpoints" $.Values.collectors }}
- apiGroups: [""]
resources:
- endpoints
verbs: ["list", "watch"]
{{ end -}}
-{{ if .Values.collectors.horizontalpodautoscalers }}
+{{ if has "endpointslices" $.Values.collectors }}
+- apiGroups: ["discovery.k8s.io"]
+ resources:
+ - endpointslices
+ verbs: ["list", "watch"]
+{{ end -}}
+{{ if has "horizontalpodautoscalers" $.Values.collectors }}
- apiGroups: ["autoscaling"]
resources:
- horizontalpodautoscalers
verbs: ["list", "watch"]
{{ end -}}
-{{ if .Values.collectors.ingresses }}
+{{ if has "ingresses" $.Values.collectors }}
- apiGroups: ["extensions", "networking.k8s.io"]
resources:
- ingresses
verbs: ["list", "watch"]
{{ end -}}
-{{ if .Values.collectors.jobs }}
+{{ if has "jobs" $.Values.collectors }}
- apiGroups: ["batch"]
resources:
- jobs
verbs: ["list", "watch"]
{{ end -}}
-{{ if .Values.collectors.limitranges }}
+{{ if has "leases" $.Values.collectors }}
+- apiGroups: ["coordination.k8s.io"]
+ resources:
+ - leases
+ verbs: ["list", "watch"]
+{{ end -}}
+{{ if has "limitranges" $.Values.collectors }}
- apiGroups: [""]
resources:
- limitranges
verbs: ["list", "watch"]
{{ end -}}
-{{ if .Values.collectors.mutatingwebhookconfigurations }}
+{{ if has "mutatingwebhookconfigurations" $.Values.collectors }}
- apiGroups: ["admissionregistration.k8s.io"]
resources:
- mutatingwebhookconfigurations
verbs: ["list", "watch"]
{{ end -}}
-{{ if .Values.collectors.namespaces }}
+{{ if has "namespaces" $.Values.collectors }}
- apiGroups: [""]
resources:
- namespaces
verbs: ["list", "watch"]
{{ end -}}
-{{ if .Values.collectors.networkpolicies }}
+{{ if has "networkpolicies" $.Values.collectors }}
- apiGroups: ["networking.k8s.io"]
resources:
- networkpolicies
verbs: ["list", "watch"]
{{ end -}}
-{{ if .Values.collectors.nodes }}
+{{ if has "nodes" $.Values.collectors }}
- apiGroups: [""]
resources:
- nodes
verbs: ["list", "watch"]
{{ end -}}
-{{ if .Values.collectors.persistentvolumeclaims }}
+{{ if has "persistentvolumeclaims" $.Values.collectors }}
- apiGroups: [""]
resources:
- persistentvolumeclaims
verbs: ["list", "watch"]
{{ end -}}
-{{ if .Values.collectors.persistentvolumes }}
+{{ if has "persistentvolumes" $.Values.collectors }}
- apiGroups: [""]
resources:
- persistentvolumes
verbs: ["list", "watch"]
{{ end -}}
-{{ if .Values.collectors.poddisruptionbudgets }}
+{{ if has "poddisruptionbudgets" $.Values.collectors }}
- apiGroups: ["policy"]
resources:
- poddisruptionbudgets
verbs: ["list", "watch"]
{{ end -}}
-{{ if .Values.collectors.pods }}
+{{ if has "pods" $.Values.collectors }}
- apiGroups: [""]
resources:
- pods
verbs: ["list", "watch"]
{{ end -}}
-{{ if .Values.collectors.replicasets }}
+{{ if has "replicasets" $.Values.collectors }}
- apiGroups: ["extensions", "apps"]
resources:
- replicasets
verbs: ["list", "watch"]
{{ end -}}
-{{ if .Values.collectors.replicationcontrollers }}
+{{ if has "replicationcontrollers" $.Values.collectors }}
- apiGroups: [""]
resources:
- replicationcontrollers
verbs: ["list", "watch"]
{{ end -}}
-{{ if .Values.collectors.resourcequotas }}
+{{ if has "resourcequotas" $.Values.collectors }}
- apiGroups: [""]
resources:
- resourcequotas
verbs: ["list", "watch"]
{{ end -}}
-{{ if .Values.collectors.secrets }}
+{{ if has "secrets" $.Values.collectors }}
- apiGroups: [""]
resources:
- secrets
verbs: ["list", "watch"]
{{ end -}}
-{{ if .Values.collectors.services }}
+{{ if has "services" $.Values.collectors }}
- apiGroups: [""]
resources:
- services
verbs: ["list", "watch"]
{{ end -}}
-{{ if .Values.collectors.statefulsets }}
+{{ if has "statefulsets" $.Values.collectors }}
- apiGroups: ["apps"]
resources:
- statefulsets
verbs: ["list", "watch"]
{{ end -}}
-{{ if .Values.collectors.storageclasses }}
+{{ if has "storageclasses" $.Values.collectors }}
- apiGroups: ["storage.k8s.io"]
resources:
- storageclasses
verbs: ["list", "watch"]
{{ end -}}
-{{ if .Values.collectors.validatingwebhookconfigurations }}
+{{ if has "validatingwebhookconfigurations" $.Values.collectors }}
- apiGroups: ["admissionregistration.k8s.io"]
resources:
- validatingwebhookconfigurations
verbs: ["list", "watch"]
{{ end -}}
-{{ if .Values.collectors.volumeattachments }}
+{{ if has "volumeattachments" $.Values.collectors }}
- apiGroups: ["storage.k8s.io"]
resources:
- volumeattachments
verbs: ["list", "watch"]
{{ end -}}
-{{ if .Values.collectors.verticalpodautoscalers }}
-- apiGroups: ["autoscaling.k8s.io"]
+{{- if $.Values.kubeRBACProxy.enabled }}
+- apiGroups: ["authentication.k8s.io"]
+ resources:
+ - tokenreviews
+ verbs: ["create"]
+- apiGroups: ["authorization.k8s.io"]
+ resources:
+ - subjectaccessreviews
+ verbs: ["create"]
+{{- end }}
+{{- if $.Values.customResourceState.enabled }}
+- apiGroups: ["apiextensions.k8s.io"]
resources:
- - verticalpodautoscalers
+ - customresourcedefinitions
verbs: ["list", "watch"]
-{{ end -}}
+{{- end }}
+{{ if $.Values.rbac.extraRules }}
+{{ toYaml $.Values.rbac.extraRules }}
+{{ end }}
+{{- end -}}
{{- end -}}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/rolebinding.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/rolebinding.yaml
new file mode 100644
index 0000000000..330651b73f
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/rolebinding.yaml
@@ -0,0 +1,24 @@
+{{- if and (eq .Values.rbac.create true) (eq .Values.rbac.useClusterRole false) -}}
+{{- range (join "," $.Values.namespaces) | split "," }}
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: RoleBinding
+metadata:
+ labels:
+ {{- include "kube-state-metrics.labels" $ | indent 4 }}
+ name: {{ template "kube-state-metrics.fullname" $ }}
+ namespace: {{ . }}
+roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: Role
+{{- if (not $.Values.rbac.useExistingRole) }}
+ name: {{ template "kube-state-metrics.fullname" $ }}
+{{- else }}
+ name: {{ $.Values.rbac.useExistingRole }}
+{{- end }}
+subjects:
+- kind: ServiceAccount
+ name: {{ template "kube-state-metrics.serviceAccountName" $ }}
+ namespace: {{ template "kube-state-metrics.namespace" $ }}
+{{- end -}}
+{{- end -}}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/service.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/service.yaml
old mode 100755
new mode 100644
index 5dacf5217a..6c486a662a
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/service.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/service.yaml
@@ -4,13 +4,7 @@ metadata:
name: {{ template "kube-state-metrics.fullname" . }}
namespace: {{ template "kube-state-metrics.namespace" . }}
labels:
- app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
- helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
- app.kubernetes.io/instance: "{{ .Release.Name }}"
- app.kubernetes.io/managed-by: "{{ .Release.Service }}"
-{{- if .Values.customLabels }}
-{{ toYaml .Values.customLabels | indent 4 }}
-{{- end }}
+ {{- include "kube-state-metrics.labels" . | indent 4 }}
annotations:
{{- if .Values.prometheusScrape }}
prometheus.io/scrape: '{{ .Values.prometheusScrape }}'
@@ -23,14 +17,33 @@ spec:
ports:
- name: "http"
protocol: TCP
- port: {{ .Values.service.port }}
+ port: {{ .Values.service.port | default 8080}}
{{- if .Values.service.nodePort }}
nodePort: {{ .Values.service.nodePort }}
{{- end }}
- targetPort: 8080
+ targetPort: {{ .Values.service.port | default 8080}}
+ {{ if .Values.selfMonitor.enabled }}
+ - name: "metrics"
+ protocol: TCP
+ port: {{ .Values.selfMonitor.telemetryPort | default 8081 }}
+ targetPort: {{ .Values.selfMonitor.telemetryPort | default 8081 }}
+ {{- if .Values.selfMonitor.telemetryNodePort }}
+ nodePort: {{ .Values.selfMonitor.telemetryNodePort }}
+ {{- end }}
+ {{ end }}
{{- if .Values.service.loadBalancerIP }}
loadBalancerIP: "{{ .Values.service.loadBalancerIP }}"
+{{- end }}
+{{- if .Values.service.loadBalancerSourceRanges }}
+ loadBalancerSourceRanges:
+ {{- range $cidr := .Values.service.loadBalancerSourceRanges }}
+ - {{ $cidr }}
+ {{- end }}
+{{- end }}
+{{- if .Values.autosharding.enabled }}
+ clusterIP: None
+{{- else if .Values.service.clusterIP }}
+ clusterIP: "{{ .Values.service.clusterIP }}"
{{- end }}
selector:
- app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
- app.kubernetes.io/instance: {{ .Release.Name }}
+ {{- include "kube-state-metrics.selectorLabels" . | indent 4 }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/serviceaccount.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/serviceaccount.yaml
old mode 100755
new mode 100644
index 32bb1640f2..a7ff4dd3d7
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/serviceaccount.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/serviceaccount.yaml
@@ -3,12 +3,13 @@ apiVersion: v1
kind: ServiceAccount
metadata:
labels:
- app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
- helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
- app.kubernetes.io/managed-by: {{ .Release.Service }}
- app.kubernetes.io/instance: {{ .Release.Name }}
- name: {{ template "kube-state-metrics.fullname" . }}
+ {{- include "kube-state-metrics.labels" . | indent 4 }}
+ name: {{ template "kube-state-metrics.serviceAccountName" . }}
namespace: {{ template "kube-state-metrics.namespace" . }}
+{{- if .Values.serviceAccount.annotations }}
+ annotations:
+{{ toYaml .Values.serviceAccount.annotations | indent 4 }}
+{{- end }}
imagePullSecrets:
-{{ toYaml .Values.serviceAccount.imagePullSecrets | indent 2 }}
+ {{- include "kube-state-metrics.imagePullSecrets" (dict "Values" .Values "imagePullSecrets" .Values.serviceAccount.imagePullSecrets) | indent 2 }}
{{- end -}}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/servicemonitor.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/servicemonitor.yaml
old mode 100755
new mode 100644
index 54cde362d2..79a07a6555
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/servicemonitor.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/servicemonitor.yaml
@@ -5,21 +5,110 @@ metadata:
name: {{ template "kube-state-metrics.fullname" . }}
namespace: {{ template "kube-state-metrics.namespace" . }}
labels:
- app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
- helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
- app.kubernetes.io/instance: "{{ .Release.Name }}"
- app.kubernetes.io/managed-by: "{{ .Release.Service }}"
- {{- if .Values.prometheus.monitor.additionalLabels }}
-{{ toYaml .Values.prometheus.monitor.additionalLabels | indent 4 }}
- {{- end }}
+ {{- include "kube-state-metrics.labels" . | indent 4 }}
+ {{- with .Values.prometheus.monitor.additionalLabels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+ {{- with .Values.prometheus.monitor.annotations }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
spec:
+ jobLabel: {{ default "app.kubernetes.io/name" .Values.prometheus.monitor.jobLabel }}
+ {{- with .Values.prometheus.monitor.targetLabels }}
+ targetLabels:
+ {{- toYaml . | trim | nindent 4 }}
+ {{- end }}
+ {{- with .Values.prometheus.monitor.podTargetLabels }}
+ podTargetLabels:
+ {{- toYaml . | trim | nindent 4 }}
+ {{- end }}
+ {{- include "servicemonitor.scrapeLimits" .Values.prometheus.monitor | indent 2 }}
+ {{- if .Values.prometheus.monitor.namespaceSelector }}
+ namespaceSelector:
+ matchNames:
+ {{- with .Values.prometheus.monitor.namespaceSelector }}
+ {{- toYaml . | nindent 6 }}
+ {{- end }}
+ {{- end }}
selector:
matchLabels:
- app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
- app.kubernetes.io/instance: {{ .Release.Name }}
+ {{- with .Values.prometheus.monitor.selectorOverride }}
+ {{- toYaml . | nindent 6 }}
+ {{- else }}
+ {{- include "kube-state-metrics.selectorLabels" . | indent 6 }}
+ {{- end }}
endpoints:
- port: http
- {{- if .Values.prometheus.monitor.honorLabels }}
+ {{- if .Values.prometheus.monitor.interval }}
+ interval: {{ .Values.prometheus.monitor.interval }}
+ {{- end }}
+ {{- if .Values.prometheus.monitor.scrapeTimeout }}
+ scrapeTimeout: {{ .Values.prometheus.monitor.scrapeTimeout }}
+ {{- end }}
+ {{- if .Values.prometheus.monitor.proxyUrl }}
+ proxyUrl: {{ .Values.prometheus.monitor.proxyUrl}}
+ {{- end }}
+ {{- if .Values.prometheus.monitor.honorLabels }}
+ honorLabels: true
+ {{- end }}
+ {{- if .Values.prometheus.monitor.metricRelabelings }}
+ metricRelabelings:
+ {{- toYaml .Values.prometheus.monitor.metricRelabelings | nindent 8 }}
+ {{- end }}
+ {{- if .Values.prometheus.monitor.relabelings }}
+ relabelings:
+ {{- toYaml .Values.prometheus.monitor.relabelings | nindent 8 }}
+ {{- end }}
+ {{- if .Values.prometheus.monitor.scheme }}
+ scheme: {{ .Values.prometheus.monitor.scheme }}
+ {{- end }}
+ {{- if .Values.prometheus.monitor.tlsConfig }}
+ tlsConfig:
+ {{- toYaml .Values.prometheus.monitor.tlsConfig | nindent 8 }}
+ {{- end }}
+ {{- if .Values.prometheus.monitor.bearerTokenFile }}
+ bearerTokenFile: {{ .Values.prometheus.monitor.bearerTokenFile }}
+ {{- end }}
+ {{- with .Values.prometheus.monitor.bearerTokenSecret }}
+ bearerTokenSecret:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- if .Values.selfMonitor.enabled }}
+ - port: metrics
+ {{- if .Values.prometheus.monitor.interval }}
+ interval: {{ .Values.prometheus.monitor.interval }}
+ {{- end }}
+ {{- if .Values.prometheus.monitor.scrapeTimeout }}
+ scrapeTimeout: {{ .Values.prometheus.monitor.scrapeTimeout }}
+ {{- end }}
+ {{- if .Values.prometheus.monitor.proxyUrl }}
+ proxyUrl: {{ .Values.prometheus.monitor.proxyUrl}}
+ {{- end }}
+ {{- if .Values.prometheus.monitor.honorLabels }}
honorLabels: true
- {{- end }}
+ {{- end }}
+ {{- if .Values.prometheus.monitor.metricRelabelings }}
+ metricRelabelings:
+ {{- toYaml .Values.prometheus.monitor.metricRelabelings | nindent 8 }}
+ {{- end }}
+ {{- if .Values.prometheus.monitor.relabelings }}
+ relabelings:
+ {{- toYaml .Values.prometheus.monitor.relabelings | nindent 8 }}
+ {{- end }}
+ {{- if .Values.prometheus.monitor.scheme }}
+ scheme: {{ .Values.prometheus.monitor.scheme }}
+ {{- end }}
+ {{- if .Values.prometheus.monitor.tlsConfig }}
+ tlsConfig:
+ {{- toYaml .Values.prometheus.monitor.tlsConfig | nindent 8 }}
+ {{- end }}
+ {{- if .Values.prometheus.monitor.bearerTokenFile }}
+ bearerTokenFile: {{ .Values.prometheus.monitor.bearerTokenFile }}
+ {{- end }}
+ {{- with .Values.prometheus.monitor.bearerTokenSecret }}
+ bearerTokenSecret:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/stsdiscovery-role.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/stsdiscovery-role.yaml
old mode 100755
new mode 100644
index bf53960727..489de147c1
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/stsdiscovery-role.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/stsdiscovery-role.yaml
@@ -5,10 +5,7 @@ metadata:
name: stsdiscovery-{{ template "kube-state-metrics.fullname" . }}
namespace: {{ template "kube-state-metrics.namespace" . }}
labels:
- app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
- helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
- app.kubernetes.io/managed-by: {{ .Release.Service }}
- app.kubernetes.io/instance: {{ .Release.Name }}
+ {{- include "kube-state-metrics.labels" . | indent 4 }}
rules:
- apiGroups:
- ""
@@ -19,9 +16,11 @@ rules:
- apiGroups:
- apps
resourceNames:
- - kube-state-metrics
+ - {{ template "kube-state-metrics.fullname" . }}
resources:
- statefulsets
verbs:
- get
+ - list
+ - watch
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/stsdiscovery-rolebinding.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/stsdiscovery-rolebinding.yaml
old mode 100755
new mode 100644
index 6a2e5bfe7b..73b37a4f64
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/stsdiscovery-rolebinding.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/stsdiscovery-rolebinding.yaml
@@ -5,16 +5,13 @@ metadata:
name: stsdiscovery-{{ template "kube-state-metrics.fullname" . }}
namespace: {{ template "kube-state-metrics.namespace" . }}
labels:
- app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }}
- helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
- app.kubernetes.io/managed-by: {{ .Release.Service }}
- app.kubernetes.io/instance: {{ .Release.Name }}
+ {{- include "kube-state-metrics.labels" . | indent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: stsdiscovery-{{ template "kube-state-metrics.fullname" . }}
subjects:
- kind: ServiceAccount
- name: {{ template "kube-state-metrics.fullname" . }}
+ name: {{ template "kube-state-metrics.serviceAccountName" . }}
namespace: {{ template "kube-state-metrics.namespace" . }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/verticalpodautoscaler.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/verticalpodautoscaler.yaml
new file mode 100644
index 0000000000..f46305b517
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/verticalpodautoscaler.yaml
@@ -0,0 +1,44 @@
+{{- if and (.Capabilities.APIVersions.Has "autoscaling.k8s.io/v1") (.Values.verticalPodAutoscaler.enabled) }}
+apiVersion: autoscaling.k8s.io/v1
+kind: VerticalPodAutoscaler
+metadata:
+ name: {{ template "kube-state-metrics.fullname" . }}
+ namespace: {{ template "kube-state-metrics.namespace" . }}
+ labels:
+ {{- include "kube-state-metrics.labels" . | indent 4 }}
+spec:
+ {{- with .Values.verticalPodAutoscaler.recommenders }}
+ recommenders:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+ resourcePolicy:
+ containerPolicies:
+ - containerName: {{ template "kube-state-metrics.name" . }}
+ {{- with .Values.verticalPodAutoscaler.controlledResources }}
+ controlledResources:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- if .Values.verticalPodAutoscaler.controlledValues }}
+ controlledValues: {{ .Values.verticalPodAutoscaler.controlledValues }}
+ {{- end }}
+ {{- if .Values.verticalPodAutoscaler.maxAllowed }}
+ maxAllowed:
+ {{ toYaml .Values.verticalPodAutoscaler.maxAllowed | nindent 8 }}
+ {{- end }}
+ {{- if .Values.verticalPodAutoscaler.minAllowed }}
+ minAllowed:
+ {{ toYaml .Values.verticalPodAutoscaler.minAllowed | nindent 8 }}
+ {{- end }}
+ targetRef:
+ apiVersion: apps/v1
+ {{- if .Values.autosharding.enabled }}
+ kind: StatefulSet
+ {{- else }}
+ kind: Deployment
+ {{- end }}
+ name: {{ template "kube-state-metrics.fullname" . }}
+ {{- with .Values.verticalPodAutoscaler.updatePolicy }}
+ updatePolicy:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/values.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/values.yaml
old mode 100755
new mode 100644
index 11f20fa3ea..0821a7709e
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/values.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/values.yaml
@@ -1,10 +1,33 @@
# Default values for kube-state-metrics.
prometheusScrape: true
image:
- repository: quay.io/coreos/kube-state-metrics
- tag: v1.9.5
+ registry: registry.k8s.io
+ repository: kube-state-metrics/kube-state-metrics
+ # If unset use v + .Charts.appVersion
+ tag: ""
+ sha: ""
pullPolicy: IfNotPresent
+imagePullSecrets: []
+# - name: "image-pull-secret"
+
+global:
+ # 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
+ imagePullSecrets: []
+ #
+ # Allow parent charts to override registry hostname
+ imageRegistry: ""
+
# If set to true, this will deploy kube-state-metrics as a StatefulSet and the data
# will be automatically sharded across <.Values.replicas> pods using the built-in
# autodiscovery feature: https://github.com/kubernetes/kube-state-metrics#automated-sharding
@@ -14,15 +37,38 @@ autosharding:
replicas: 1
+# Change the deployment strategy when autosharding is disabled
+# updateStrategy: Recreate
+
+# Number of old history to retain to allow rollback
+# Default Kubernetes value is set to 10
+revisionHistoryLimit: 10
+
+# List of additional cli arguments to configure kube-state-metrics
+# for example: --enable-gzip-encoding, --log-file, etc.
+# all the possible args can be found here: https://github.com/kubernetes/kube-state-metrics/blob/master/docs/cli-arguments.md
+extraArgs: []
+
service:
port: 8080
# Default to clusterIP for backward compatibility
type: ClusterIP
nodePort: 0
loadBalancerIP: ""
+ # Only allow access to the loadBalancerIP from these IPs
+ loadBalancerSourceRanges: []
+ clusterIP: ""
annotations: {}
+## Additional labels to add to all resources
customLabels: {}
+ # app: kube-state-metrics
+
+## Override selector labels
+selectorOverride: {}
+
+## set to true to add the release label so scraping of the servicemonitor with kube-prometheus-stack works out of the box
+releaseLabel: false
hostNetwork: false
@@ -30,6 +76,59 @@ rbac:
# If true, create & use RBAC resources
create: true
+ # Set to a rolename to use existing role - skipping role creating - but still doing serviceaccount and rolebinding to it, rolename set here.
+ # useExistingRole: your-existing-role
+
+ # If set to false - Run without Cluteradmin privs needed - ONLY works if namespace is also set (if useExistingRole is set this name is used as ClusterRole or Role to bind to)
+ useClusterRole: true
+
+ # Add permissions for CustomResources' apiGroups in Role/ClusterRole. Should be used in conjunction with Custom Resource State Metrics configuration
+ # Example:
+ # - apiGroups: ["monitoring.coreos.com"]
+ # resources: ["prometheuses"]
+ # verbs: ["list", "watch"]
+ extraRules: []
+
+# Configure kube-rbac-proxy. When enabled, creates one kube-rbac-proxy container per exposed HTTP endpoint (metrics and telemetry if enabled).
+# The requests are served through the same service but requests are then HTTPS.
+kubeRBACProxy:
+ enabled: false
+ image:
+ registry: quay.io
+ repository: brancz/kube-rbac-proxy
+ tag: v0.14.0
+ sha: ""
+ pullPolicy: IfNotPresent
+
+ # List of additional cli arguments to configure kube-rbac-prxy
+ # for example: --tls-cipher-suites, --log-file, etc.
+ # all the possible args can be found here: https://github.com/brancz/kube-rbac-proxy#usage
+ extraArgs: []
+
+ ## Specify security settings for a Container
+ ## Allows overrides and additional options compared to (Pod) securityContext
+ ## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
+ containerSecurityContext: {}
+
+ resources: {}
+ # We usually recommend not to specify default resources and to leave this as a conscious
+ # choice for the user. This also increases chances charts run on environments with little
+ # resources, such as Minikube. If you do want to specify resources, uncomment the following
+ # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+ # limits:
+ # cpu: 100m
+ # memory: 64Mi
+ # requests:
+ # cpu: 10m
+ # memory: 32Mi
+
+ ## volumeMounts enables mounting custom volumes in rbac-proxy containers
+ ## Useful for TLS certificates and keys
+ volumeMounts: []
+ # - mountPath: /etc/tls
+ # name: kube-rbac-proxy-tls
+ # readOnly: true
+
serviceAccount:
# Specifies whether a ServiceAccount should be created, require rbac true
create: true
@@ -39,13 +138,57 @@ serviceAccount:
# 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: []
+ # ServiceAccount annotations.
+ # Use case: AWS EKS IAM roles for service accounts
+ # ref: https://docs.aws.amazon.com/eks/latest/userguide/specify-service-account-role.html
+ annotations: {}
prometheus:
monitor:
enabled: false
+ annotations: {}
additionalLabels: {}
namespace: ""
+ namespaceSelector: []
+ jobLabel: ""
+ targetLabels: []
+ podTargetLabels: []
+ interval: ""
+ ## SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
+ ##
+ sampleLimit: 0
+
+ ## TargetLimit defines a limit on the number of scraped targets that will be accepted.
+ ##
+ targetLimit: 0
+
+ ## Per-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelLimit: 0
+
+ ## Per-scrape limit on length of labels name that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelNameLengthLimit: 0
+
+ ## Per-scrape limit on length of labels value that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelValueLengthLimit: 0
+ scrapeTimeout: ""
+ proxyUrl: ""
+ selectorOverride: {}
honorLabels: false
+ metricRelabelings: []
+ relabelings: []
+ scheme: ""
+ ## File to read bearer token for scraping targets
+ bearerTokenFile: ""
+ ## Secret to mount to read bearer token for scraping targets. The secret needs
+ ## to be in the same namespace as the service monitor and accessible by the
+ ## Prometheus Operator
+ bearerTokenSecret: {}
+ # name: secret-name
+ # key: key-name
+ tlsConfig: {}
## Specify if a Pod Security Policy for kube-state-metrics must be created
## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/
@@ -62,11 +205,48 @@ podSecurityPolicy:
# seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default'
# apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default'
+ additionalVolumes: []
+
+## Configure network policy for kube-state-metrics
+networkPolicy:
+ enabled: false
+ # networkPolicy.flavor -- Flavor of the network policy to use.
+ # Can be:
+ # * kubernetes for networking.k8s.io/v1/NetworkPolicy
+ # * cilium for cilium.io/v2/CiliumNetworkPolicy
+ flavor: kubernetes
+
+ ## Configure the cilium network policy kube-apiserver selector
+ # cilium:
+ # kubeApiServerSelector:
+ # - toEntities:
+ # - kube-apiserver
+
+ # egress:
+ # - {}
+ # ingress:
+ # - {}
+ # podSelector:
+ # matchLabels:
+ # app.kubernetes.io/name: kube-state-metrics
securityContext:
enabled: true
+ runAsGroup: 65534
runAsUser: 65534
fsGroup: 65534
+ runAsNonRoot: true
+ seccompProfile:
+ type: RuntimeDefault
+
+## Specify security settings for a Container
+## Allows overrides and additional options compared to (Pod) securityContext
+## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
+containerSecurityContext:
+ allowPrivilegeEscalation: false
+ capabilities:
+ drop:
+ - ALL
## Node labels for pod assignment
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
@@ -80,6 +260,13 @@ affinity: {}
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
tolerations: []
+## Topology spread constraints for pod assignment
+## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
+topologySpreadConstraints: []
+
+# Annotations to be added to the deployment/statefulset
+annotations: {}
+
# Annotations to be added to the pod
podAnnotations: {}
@@ -89,41 +276,179 @@ podAnnotations: {}
# Ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/
podDisruptionBudget: {}
-# Available collectors for kube-state-metrics. By default all available
-# collectors are enabled.
+# Comma-separated list of metrics to be exposed.
+# This list comprises of exact metric names and/or regex patterns.
+# The allowlist and denylist are mutually exclusive.
+metricAllowlist: []
+
+# Comma-separated list of metrics not to be enabled.
+# This list comprises of exact metric names and/or regex patterns.
+# The allowlist and denylist are mutually exclusive.
+metricDenylist: []
+
+# Comma-separated list of additional Kubernetes label keys that will be used in the resource's
+# labels metric. By default the metric contains only name and namespace labels.
+# To include additional labels, provide a list of resource names in their plural form and Kubernetes
+# label keys you would like to allow for them (Example: '=namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...)'.
+# A single '*' can be provided per resource instead to allow any labels, but that has
+# severe performance implications (Example: '=pods=[*]').
+metricLabelsAllowlist: []
+ # - namespaces=[k8s-label-1,k8s-label-n]
+
+# Comma-separated list of Kubernetes annotations keys that will be used in the resource'
+# labels metric. By default the metric contains only name and namespace labels.
+# To include additional annotations provide a list of resource names in their plural form and Kubernetes
+# annotation keys you would like to allow for them (Example: '=namespaces=[kubernetes.io/team,...],pods=[kubernetes.io/team],...)'.
+# A single '*' can be provided per resource instead to allow any annotations, but that has
+# severe performance implications (Example: '=pods=[*]').
+metricAnnotationsAllowList: []
+ # - pods=[k8s-annotation-1,k8s-annotation-n]
+
+# Available collectors for kube-state-metrics.
+# By default, all available resources are enabled, comment out to disable.
collectors:
- certificatesigningrequests: true
- configmaps: true
- cronjobs: true
- daemonsets: true
- deployments: true
- endpoints: true
- horizontalpodautoscalers: true
- ingresses: true
- jobs: true
- limitranges: true
- mutatingwebhookconfigurations: true
- namespaces: true
- networkpolicies: true
- nodes: true
- persistentvolumeclaims: true
- persistentvolumes: true
- poddisruptionbudgets: true
- pods: true
- replicasets: true
- replicationcontrollers: true
- resourcequotas: true
- secrets: true
- services: true
- statefulsets: true
- storageclasses: true
- validatingwebhookconfigurations: true
- verticalpodautoscalers: true
- volumeattachments: true
-
-# Namespace to be enabled for collecting resources. By default all namespaces are collected.
-# namespace: ""
+ - certificatesigningrequests
+ - configmaps
+ - cronjobs
+ - daemonsets
+ - deployments
+ - endpoints
+ - horizontalpodautoscalers
+ - ingresses
+ - jobs
+ - leases
+ - limitranges
+ - mutatingwebhookconfigurations
+ - namespaces
+ - networkpolicies
+ - nodes
+ - persistentvolumeclaims
+ - persistentvolumes
+ - poddisruptionbudgets
+ - pods
+ - replicasets
+ - replicationcontrollers
+ - resourcequotas
+ - secrets
+ - services
+ - statefulsets
+ - storageclasses
+ - validatingwebhookconfigurations
+ - volumeattachments
+
+# Enabling kubeconfig will pass the --kubeconfig argument to the container
+kubeconfig:
+ enabled: false
+ # base64 encoded kube-config file
+ secret:
+
+# Enabling support for customResourceState, will create a configMap including your config that will be read from kube-state-metrics
+customResourceState:
+ enabled: false
+ # Add (Cluster)Role permissions to list/watch the customResources defined in the config to rbac.extraRules
+ config: {}
+
+# Enable only the release namespace for collecting resources. By default all namespaces are collected.
+# If releaseNamespace and namespaces are both set a merged list will be collected.
+releaseNamespace: false
+
+# Comma-separated list(string) or yaml list of namespaces to be enabled for collecting resources. By default all namespaces are collected.
+namespaces: ""
+
+# Comma-separated list of namespaces not to be enabled. If namespaces and namespaces-denylist are both set,
+# only namespaces that are excluded in namespaces-denylist will be used.
+namespacesDenylist: ""
## Override the deployment namespace
##
namespaceOverride: ""
+
+resources: {}
+ # We usually recommend not to specify default resources and to leave this as a conscious
+ # choice for the user. This also increases chances charts run on environments with little
+ # resources, such as Minikube. If you do want to specify resources, uncomment the following
+ # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+ # limits:
+ # cpu: 100m
+ # memory: 64Mi
+ # requests:
+ # cpu: 10m
+ # memory: 32Mi
+
+## Provide a k8s version to define apiGroups for podSecurityPolicy Cluster Role.
+## For example: kubeTargetVersionOverride: 1.14.9
+##
+kubeTargetVersionOverride: ""
+
+# Enable self metrics configuration for service and Service Monitor
+# Default values for telemetry configuration can be overridden
+# If you set telemetryNodePort, you must also set service.type to NodePort
+selfMonitor:
+ enabled: false
+ # telemetryHost: 0.0.0.0
+ # telemetryPort: 8081
+ # telemetryNodePort: 0
+
+# Enable vertical pod autoscaler support for kube-state-metrics
+verticalPodAutoscaler:
+ enabled: false
+
+ # Recommender responsible for generating recommendation for the object.
+ # List should be empty (then the default recommender will generate the recommendation)
+ # or contain exactly one recommender.
+ # recommenders: []
+ # - name: custom-recommender-performance
+
+ # List of resources that the vertical pod autoscaler can control. Defaults to cpu and memory
+ controlledResources: []
+ # Specifies which resource values should be controlled: RequestsOnly or RequestsAndLimits.
+ # controlledValues: RequestsAndLimits
+
+ # Define the max allowed resources for the pod
+ maxAllowed: {}
+ # cpu: 200m
+ # memory: 100Mi
+ # Define the min allowed resources for the pod
+ minAllowed: {}
+ # cpu: 200m
+ # memory: 100Mi
+
+ # updatePolicy:
+ # Specifies minimal number of replicas which need to be alive for VPA Updater to attempt pod eviction
+ # minReplicas: 1
+ # Specifies whether recommended updates are applied when a Pod is started and whether recommended updates
+ # are applied during the life of a Pod. Possible values are "Off", "Initial", "Recreate", and "Auto".
+ # updateMode: Auto
+
+# volumeMounts are used to add custom volume mounts to deployment.
+# See example below
+volumeMounts: []
+# - mountPath: /etc/config
+# name: config-volume
+
+# volumes are used to add custom volumes to deployment
+# See example below
+volumes: []
+# - configMap:
+# name: cm-for-volume
+# name: config-volume
+
+# Extra manifests to deploy as an array
+extraManifests: []
+ # - apiVersion: v1
+ # kind: ConfigMap
+ # metadata:
+ # labels:
+ # name: prometheus-extra
+ # data:
+ # extra-data: "value"
+
+## Containers allows injecting additional containers.
+containers: []
+ # - name: crd-init
+ # image: kiwigrid/k8s-sidecar:latest
+
+## InitContainers allows injecting additional initContainers.
+initContainers: []
+ # - name: crd-sidecar
+ # image: kiwigrid/k8s-sidecar:latest
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/.helmignore b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/.helmignore
old mode 100755
new mode 100644
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/Chart.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/Chart.yaml
old mode 100755
new mode 100644
index a7dea364e2..5ec6a90768
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/Chart.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/Chart.yaml
@@ -1,16 +1,25 @@
-apiVersion: v1
-appVersion: 0.18.1
+apiVersion: v2
+name: prometheus-node-exporter
description: A Helm chart for prometheus node-exporter
-home: https://github.com/prometheus/node_exporter/
keywords:
-- node-exporter
-- prometheus
-- exporter
-maintainers:
-- email: gianrubio@gmail.com
- name: gianrubio
-- name: vsliouniaev
-name: prometheus-node-exporter
+ - node-exporter
+ - prometheus
+ - exporter
+type: application
+version: 4.23.2
+appVersion: 1.6.1
+home: https://github.com/prometheus/node_exporter/
sources:
-- https://github.com/prometheus/node_exporter/
-version: 1.9.1
+ - https://github.com/prometheus/node_exporter/
+maintainers:
+ - email: gianrubio@gmail.com
+ name: gianrubio
+ - email: zanhsieh@gmail.com
+ name: zanhsieh
+ - email: rootsandtrees@posteo.de
+ name: zeritti
+annotations:
+ "artifacthub.io/license": Apache-2.0
+ "artifacthub.io/links": |
+ - name: Chart Source
+ url: https://github.com/prometheus-community/helm-charts
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/OWNERS b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/OWNERS
deleted file mode 100755
index 4f1dd4862d..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/OWNERS
+++ /dev/null
@@ -1,6 +0,0 @@
-approvers:
-- gianrubio
-- vsliouniaev
-reviewers:
-- gianrubio
-- vsliouniaev
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/README.md b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/README.md
old mode 100755
new mode 100644
index 0ff7ffe6ae..ef83844102
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/README.md
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/README.md
@@ -1,89 +1,96 @@
# Prometheus Node Exporter
-* Installs prometheus [node exporter](https://github.com/prometheus/node_exporter)
+Prometheus exporter for hardware and OS metrics exposed by *NIX kernels, written in Go with pluggable metric collectors.
-## TL;DR;
+This chart bootstraps a Prometheus [Node Exporter](http://github.com/prometheus/node_exporter) daemonset on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
+## Get Repository Info
+
```console
-$ helm install stable/prometheus-node-exporter
+helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
+helm repo update
```
-## Introduction
+_See [helm repo](https://helm.sh/docs/helm/helm_repo/) for command documentation._
+
+## Install Chart
-This chart bootstraps a prometheus [node exporter](http://github.com/prometheus/node_exporter) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
+```console
+helm install [RELEASE_NAME] prometheus-community/prometheus-node-exporter
+```
+
+_See [configuration](#configuring) below._
-## Installing the Chart
+_See [helm install](https://helm.sh/docs/helm/helm_install/) for command documentation._
-To install the chart with the release name `my-release`:
+## Uninstall Chart
```console
-$ helm install --name my-release stable/prometheus-node-exporter
+helm uninstall [RELEASE_NAME]
```
-The command deploys node exporter on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
+This removes all the Kubernetes components associated with the chart and deletes the release.
-## Uninstalling the Chart
+_See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall/) for command documentation._
-To uninstall/delete the `my-release` deployment:
+## Upgrading Chart
```console
-$ helm delete my-release
+helm upgrade [RELEASE_NAME] prometheus-community/prometheus-node-exporter --install
```
-The command removes all the Kubernetes components associated with the chart and deletes the release.
-
-## Configuration
-
-The following table lists the configurable parameters of the Node Exporter chart and their default values.
-
-| Parameter | Description | Default |
-| ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ |
-| `image.repository` | Image repository | `quay.io/prometheus/node-exporter` |
-| `image.tag` | Image tag | `v0.18.1` |
-| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
-| `extraArgs` | Additional container arguments | `[]` |
-| `extraHostVolumeMounts` | Additional host volume mounts | `[]` |
-| `podAnnotations` | Annotations to be added to node exporter pods | `{}` |
-| `podLabels` | Additional labels to be added to pods | `{}` |
-| `rbac.create` | If true, create & use RBAC resources | `true` |
-| `rbac.pspEnabled` | Specifies whether a PodSecurityPolicy should be created. | `true` |
-| `resources` | CPU/Memory resource requests/limits | `{}` |
-| `service.type` | Service type | `ClusterIP` |
-| `service.port` | The service port | `9100` |
-| `service.targetPort` | The target port of the container | `9100` |
-| `service.nodePort` | The node port of the service | |
-| `service.listenOnAllInterfaces` | If true, listen on all interfaces using IP `0.0.0.0`. Else listen on the IP address pod has been assigned by Kubernetes. | `true` |
-| `service.annotations` | Kubernetes service annotations | `{prometheus.io/scrape: "true"}` |
-| `serviceAccount.create` | Specifies whether a service account should be created. | `true` |
-| `serviceAccount.name` | Service account to be used. If not set and `serviceAccount.create` is `true`, a name is generated using the fullname template | |
-| `serviceAccount.imagePullSecrets` | Specify image pull secrets | `[]` |
-| `securityContext` | SecurityContext | `{"runAsNonRoot": true, "runAsUser": 65534}` |
-| `affinity` | A group of affinity scheduling rules for pod assignment | `{}` |
-| `nodeSelector` | Node labels for pod assignment | `{}` |
-| `tolerations` | List of node taints to tolerate | `- effect: NoSchedule operator: Exists` |
-| `priorityClassName` | Name of Priority Class to assign pods | `nil` |
-| `endpoints` | list of addresses that have node exporter deployed outside of the cluster | `[]` |
-| `hostNetwork` | Whether to expose the service to the host network | `true` |
-| `prometheus.monitor.enabled` | Set this to `true` to create ServiceMonitor for Prometheus operator | `false` |
-| `prometheus.monitor.additionalLabels` | Additional labels that can be used so ServiceMonitor will be discovered by Prometheus | `{}` |
-| `prometheus.monitor.namespace` | namespace where servicemonitor resource should be created | `the same namespace as prometheus node exporter` |
-| `prometheus.monitor.scrapeTimeout` | Timeout after which the scrape is ended | `10s` |
-| `configmaps` | Allow mounting additional configmaps. | `[]` |
-| `namespaceOverride` | Override the deployment namespace | `""` (`Release.Namespace`) |
-| `updateStrategy` | Configure a custom update strategy for the daemonset | `Rolling update with 1 max unavailable` |
-| `sidecars` | Additional containers for export metrics to text file | `[]` | |
-| `sidecarVolumeMount` | Volume for sidecar containers | `[]` | |
-
-Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
+_See [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/) for command documentation._
+
+### 3.x to 4.x
+
+Starting from 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
-$ helm install --name my-release \
- --set serviceAccount.name=node-exporter \
- stable/prometheus-node-exporter
+kubectl delete daemonset -l app=prometheus-node-exporter
+helm upgrade -i prometheus-node-exporter prometheus-community/prometheus-node-exporter
```
-Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,
+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 2.x to 3.x
+
+Change the following:
+
+```yaml
+hostRootFsMount: true
+```
+
+to:
+
+```yaml
+hostRootFsMount:
+ enabled: true
+ mountPropagation: HostToContainer
+```
+
+## Configuring
+
+See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing). To see all configurable options with detailed comments, visit the chart's [values.yaml](./values.yaml), or run these configuration commands:
```console
-$ helm install --name my-release -f values.yaml stable/prometheus-node-exporter
+helm show values prometheus-community/prometheus-node-exporter
+```
+
+### kube-rbac-proxy
+
+You can enable `prometheus-node-exporter` endpoint protection using `kube-rbac-proxy`. By setting `kubeRBACProxy.enabled: true`, this chart will deploy a RBAC proxy container protecting the node-exporter endpoint.
+To authorize access, authenticate your requests (via a `ServiceAccount` for example) with a `ClusterRole` attached such as:
+
+```yaml
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRole
+metadata:
+ name: prometheus-node-exporter-read
+rules:
+ - apiGroups: [ "" ]
+ resources: ["services/node-exporter-prometheus-node-exporter"]
+ verbs:
+ - get
```
+
+See [kube-rbac-proxy examples](https://github.com/brancz/kube-rbac-proxy/tree/master/examples/resource-attributes) for more details.
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/ci/port-values.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/ci/port-values.yaml
new file mode 100644
index 0000000000..dbfb4b67ff
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/ci/port-values.yaml
@@ -0,0 +1,3 @@
+service:
+ targetPort: 9102
+ port: 9102
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/NOTES.txt b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/NOTES.txt
old mode 100755
new mode 100644
index dc272fa99a..db8584def8
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/NOTES.txt
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/NOTES.txt
@@ -9,7 +9,21 @@
export SERVICE_IP=$(kubectl get svc --namespace {{ template "prometheus-node-exporter.namespace" . }} {{ template "prometheus-node-exporter.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
- export POD_NAME=$(kubectl get pods --namespace {{ template "prometheus-node-exporter.namespace" . }} -l "app={{ template "prometheus-node-exporter.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
+ export POD_NAME=$(kubectl get pods --namespace {{ template "prometheus-node-exporter.namespace" . }} -l "app.kubernetes.io/name={{ template "prometheus-node-exporter.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:9100 to use your application"
kubectl port-forward --namespace {{ template "prometheus-node-exporter.namespace" . }} $POD_NAME 9100
{{- end }}
+
+{{- if .Values.kubeRBACProxy.enabled}}
+
+kube-rbac-proxy endpoint protections is enabled:
+- Metrics endpoints is now HTTPS
+- Ensure that the client authenticates the requests (e.g. via service account) with the following role permissions:
+```
+rules:
+ - apiGroups: [ "" ]
+ resources: ["services/{{ template "prometheus-node-exporter.fullname" . }}"]
+ verbs:
+ - get
+```
+{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/_helpers.tpl b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/_helpers.tpl
old mode 100755
new mode 100644
index e8260688f0..84552fe475
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/_helpers.tpl
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/_helpers.tpl
@@ -3,8 +3,8 @@
Expand the name of the chart.
*/}}
{{- define "prometheus-node-exporter.name" -}}
-{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
+{{- end }}
{{/*
Create a default fully qualified app name.
@@ -12,26 +12,15 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
If release name contains chart name it will be used as a full name.
*/}}
{{- define "prometheus-node-exporter.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 -}}
-
-{{/* Generate basic labels */}}
-{{- define "prometheus-node-exporter.labels" }}
-app: {{ template "prometheus-node-exporter.name" . }}
-heritage: {{.Release.Service }}
-release: {{.Release.Name }}
-chart: {{ template "prometheus-node-exporter.chart" . }}
-{{- if .Values.podLabels}}
-{{ toYaml .Values.podLabels }}
+{{- 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 }}
@@ -39,28 +28,158 @@ chart: {{ template "prometheus-node-exporter.chart" . }}
Create chart name and version as used by the chart label.
*/}}
{{- define "prometheus-node-exporter.chart" -}}
-{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
+{{- end }}
+
+{{/*
+Common labels
+*/}}
+{{- define "prometheus-node-exporter.labels" -}}
+helm.sh/chart: {{ include "prometheus-node-exporter.chart" . }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+app.kubernetes.io/component: metrics
+app.kubernetes.io/part-of: {{ include "prometheus-node-exporter.name" . }}
+{{ include "prometheus-node-exporter.selectorLabels" . }}
+{{- with .Chart.AppVersion }}
+app.kubernetes.io/version: {{ . | quote }}
+{{- end }}
+{{- with .Values.podLabels }}
+{{ toYaml . }}
+{{- end }}
+{{- if .Values.releaseLabel }}
+release: {{ .Release.Name }}
+{{- end }}
+{{- end }}
+
+{{/*
+Selector labels
+*/}}
+{{- define "prometheus-node-exporter.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "prometheus-node-exporter.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "prometheus-node-exporter.serviceAccountName" -}}
-{{- if .Values.serviceAccount.create -}}
- {{ default (include "prometheus-node-exporter.fullname" .) .Values.serviceAccount.name }}
-{{- else -}}
- {{ default "default" .Values.serviceAccount.name }}
-{{- end -}}
-{{- end -}}
+{{- if .Values.serviceAccount.create }}
+{{- default (include "prometheus-node-exporter.fullname" .) .Values.serviceAccount.name }}
+{{- else }}
+{{- default "default" .Values.serviceAccount.name }}
+{{- end }}
+{{- end }}
+
+{{/*
+The image to use
+*/}}
+{{- define "prometheus-node-exporter.image" -}}
+{{- if .Values.image.sha }}
+{{- fail "image.sha forbidden. Use image.digest instead" }}
+{{- else if .Values.image.digest }}
+{{- if .Values.global.imageRegistry }}
+{{- printf "%s/%s:%s@%s" .Values.global.imageRegistry .Values.image.repository (default (printf "v%s" .Chart.AppVersion) .Values.image.tag) .Values.image.digest }}
+{{- else }}
+{{- printf "%s/%s:%s@%s" .Values.image.registry .Values.image.repository (default (printf "v%s" .Chart.AppVersion) .Values.image.tag) .Values.image.digest }}
+{{- end }}
+{{- else }}
+{{- if .Values.global.imageRegistry }}
+{{- printf "%s/%s:%s" .Values.global.imageRegistry .Values.image.repository (default (printf "v%s" .Chart.AppVersion) .Values.image.tag) }}
+{{- else }}
+{{- printf "%s/%s:%s" .Values.image.registry .Values.image.repository (default (printf "v%s" .Chart.AppVersion) .Values.image.tag) }}
+{{- end }}
+{{- end }}
+{{- end }}
{{/*
Allow the release namespace to be overridden for multi-namespace deployments in combined charts
*/}}
{{- define "prometheus-node-exporter.namespace" -}}
- {{- if .Values.namespaceOverride -}}
- {{- .Values.namespaceOverride -}}
- {{- else -}}
- {{- .Release.Namespace -}}
- {{- end -}}
+{{- if .Values.namespaceOverride }}
+{{- .Values.namespaceOverride }}
+{{- else }}
+{{- .Release.Namespace }}
+{{- end }}
+{{- end }}
+
+{{/*
+Create the namespace name of the service monitor
+*/}}
+{{- define "prometheus-node-exporter.monitor-namespace" -}}
+{{- if .Values.namespaceOverride }}
+{{- .Values.namespaceOverride }}
+{{- else }}
+{{- if .Values.prometheus.monitor.namespace }}
+{{- .Values.prometheus.monitor.namespace }}
+{{- else }}
+{{- .Release.Namespace }}
+{{- end }}
+{{- end }}
+{{- end }}
+
+{{/* Sets default scrape limits for servicemonitor */}}
+{{- define "servicemonitor.scrapeLimits" -}}
+{{- with .sampleLimit }}
+sampleLimit: {{ . }}
+{{- end }}
+{{- with .targetLimit }}
+targetLimit: {{ . }}
+{{- end }}
+{{- with .labelLimit }}
+labelLimit: {{ . }}
+{{- end }}
+{{- with .labelNameLengthLimit }}
+labelNameLengthLimit: {{ . }}
+{{- end }}
+{{- with .labelValueLengthLimit }}
+labelValueLengthLimit: {{ . }}
+{{- end }}
+{{- end }}
+
+{{/*
+Formats imagePullSecrets. Input is (dict "Values" .Values "imagePullSecrets" .{specific imagePullSecrets})
+*/}}
+{{- define "prometheus-node-exporter.imagePullSecrets" -}}
+{{- range (concat .Values.global.imagePullSecrets .imagePullSecrets) }}
+ {{- if eq (typeOf .) "map[string]interface {}" }}
+- {{ toYaml . | trim }}
+ {{- else }}
+- name: {{ . }}
+ {{- end }}
+{{- end }}
{{- end -}}
+
+{{/*
+Create the namespace name of the pod monitor
+*/}}
+{{- define "prometheus-node-exporter.podmonitor-namespace" -}}
+{{- if .Values.namespaceOverride }}
+{{- .Values.namespaceOverride }}
+{{- else }}
+{{- if .Values.prometheus.podMonitor.namespace }}
+{{- .Values.prometheus.podMonitor.namespace }}
+{{- else }}
+{{- .Release.Namespace }}
+{{- end }}
+{{- end }}
+{{- end }}
+
+{{/* Sets default scrape limits for podmonitor */}}
+{{- define "podmonitor.scrapeLimits" -}}
+{{- with .sampleLimit }}
+sampleLimit: {{ . }}
+{{- end }}
+{{- with .targetLimit }}
+targetLimit: {{ . }}
+{{- end }}
+{{- with .labelLimit }}
+labelLimit: {{ . }}
+{{- end }}
+{{- with .labelNameLengthLimit }}
+labelNameLengthLimit: {{ . }}
+{{- end }}
+{{- with .labelValueLengthLimit }}
+labelValueLengthLimit: {{ . }}
+{{- end }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/clusterrole.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/clusterrole.yaml
new file mode 100644
index 0000000000..c256dba73d
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/clusterrole.yaml
@@ -0,0 +1,19 @@
+{{- if and (eq .Values.rbac.create true) (eq .Values.kubeRBACProxy.enabled true) -}}
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRole
+metadata:
+ name: {{ include "prometheus-node-exporter.fullname" . }}
+ labels:
+ {{- include "prometheus-node-exporter.labels" . | nindent 4 }}
+rules:
+ {{- if $.Values.kubeRBACProxy.enabled }}
+ - apiGroups: [ "authentication.k8s.io" ]
+ resources:
+ - tokenreviews
+ verbs: [ "create" ]
+ - apiGroups: [ "authorization.k8s.io" ]
+ resources:
+ - subjectaccessreviews
+ verbs: [ "create" ]
+ {{- end }}
+{{- end -}}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/clusterrolebinding.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/clusterrolebinding.yaml
new file mode 100644
index 0000000000..653305ad9e
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/clusterrolebinding.yaml
@@ -0,0 +1,20 @@
+{{- if and (eq .Values.rbac.create true) (eq .Values.kubeRBACProxy.enabled true) -}}
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
+metadata:
+ labels:
+ {{- include "prometheus-node-exporter.labels" . | nindent 4 }}
+ name: {{ template "prometheus-node-exporter.fullname" . }}
+roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: ClusterRole
+{{- if .Values.rbac.useExistingRole }}
+ name: {{ .Values.rbac.useExistingRole }}
+{{- else }}
+ name: {{ template "prometheus-node-exporter.fullname" . }}
+{{- end }}
+subjects:
+- kind: ServiceAccount
+ name: {{ template "prometheus-node-exporter.serviceAccountName" . }}
+ namespace: {{ template "prometheus-node-exporter.namespace" . }}
+{{- end -}}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/daemonset.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/daemonset.yaml
old mode 100755
new mode 100644
index 765e538928..a5116a89ef
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/daemonset.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/daemonset.yaml
@@ -1,71 +1,129 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
- name: {{ template "prometheus-node-exporter.fullname" . }}
- namespace: {{ template "prometheus-node-exporter.namespace" . }}
- labels: {{ include "prometheus-node-exporter.labels" . | indent 4 }}
+ name: {{ include "prometheus-node-exporter.fullname" . }}
+ namespace: {{ include "prometheus-node-exporter.namespace" . }}
+ labels:
+ {{- include "prometheus-node-exporter.labels" . | nindent 4 }}
+ {{- with .Values.daemonsetAnnotations }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
spec:
selector:
matchLabels:
- app: {{ template "prometheus-node-exporter.name" . }}
- release: {{ .Release.Name }}
- {{- if .Values.updateStrategy }}
+ {{- include "prometheus-node-exporter.selectorLabels" . | nindent 6 }}
+ revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
+ {{- with .Values.updateStrategy }}
updateStrategy:
-{{ toYaml .Values.updateStrategy | indent 4 }}
+ {{- toYaml . | nindent 4 }}
{{- end }}
template:
metadata:
- labels: {{ include "prometheus-node-exporter.labels" . | indent 8 }}
- {{- if .Values.podAnnotations }}
+ {{- with .Values.podAnnotations }}
annotations:
- {{- toYaml .Values.podAnnotations | nindent 8 }}
+ {{- toYaml . | nindent 8 }}
{{- end }}
+ labels:
+ {{- include "prometheus-node-exporter.labels" . | nindent 8 }}
spec:
-{{- if and .Values.rbac.create .Values.serviceAccount.create }}
- serviceAccountName: {{ template "prometheus-node-exporter.serviceAccountName" . }}
-{{- end }}
-{{- if .Values.securityContext }}
+ automountServiceAccountToken: {{ ternary true false (or .Values.serviceAccount.automountServiceAccountToken .Values.kubeRBACProxy.enabled) }}
+ {{- with .Values.securityContext }}
securityContext:
-{{ toYaml .Values.securityContext | indent 8 }}
-{{- end }}
-{{- if .Values.priorityClassName }}
- priorityClassName: {{ .Values.priorityClassName }}
-{{- end }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.priorityClassName }}
+ priorityClassName: {{ . }}
+ {{- end }}
+ {{- with .Values.extraInitContainers }}
+ initContainers:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ serviceAccountName: {{ include "prometheus-node-exporter.serviceAccountName" . }}
containers:
+ {{- $servicePort := ternary 8100 .Values.service.port .Values.kubeRBACProxy.enabled }}
- name: node-exporter
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
+ image: {{ include "prometheus-node-exporter.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
- --path.procfs=/host/proc
- --path.sysfs=/host/sys
- - --web.listen-address=$(HOST_IP):{{ .Values.service.port }}
-{{- if .Values.extraArgs }}
-{{ toYaml .Values.extraArgs | indent 12 }}
-{{- end }}
+ {{- if .Values.hostRootFsMount.enabled }}
+ - --path.rootfs=/host/root
+ {{- if semverCompare ">=1.4.0" (default .Chart.AppVersion .Values.image.tag) }}
+ - --path.udev.data=/host/root/run/udev/data
+ {{- end }}
+ {{- end }}
+ - --web.listen-address=[$(HOST_IP)]:{{ $servicePort }}
+ {{- with .Values.extraArgs }}
+ {{- toYaml . | nindent 12 }}
+ {{- end }}
+ {{- with .Values.containerSecurityContext }}
+ securityContext:
+ {{- toYaml . | nindent 12 }}
+ {{- end }}
env:
- - name: HOST_IP
- {{- if .Values.service.listenOnAllInterfaces }}
- value: 0.0.0.0
- {{- else }}
- valueFrom:
- fieldRef:
- apiVersion: v1
- fieldPath: status.hostIP
+ - name: HOST_IP
+ {{- if .Values.kubeRBACProxy.enabled }}
+ value: 127.0.0.1
+ {{- else if .Values.service.listenOnAllInterfaces }}
+ value: 0.0.0.0
+ {{- else }}
+ valueFrom:
+ fieldRef:
+ apiVersion: v1
+ fieldPath: status.hostIP
+ {{- end }}
+ {{- range $key, $value := .Values.env }}
+ - name: {{ $key }}
+ value: {{ $value | quote }}
{{- end }}
+ {{- if eq .Values.kubeRBACProxy.enabled false }}
ports:
- - name: metrics
- containerPort: {{ .Values.service.targetPort }}
+ - name: {{ .Values.service.portName }}
+ containerPort: {{ .Values.service.port }}
protocol: TCP
+ {{- end }}
livenessProbe:
+ failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
httpGet:
+ {{- if .Values.kubeRBACProxy.enabled }}
+ host: 127.0.0.1
+ {{- end }}
+ httpHeaders:
+ {{- range $_, $header := .Values.livenessProbe.httpGet.httpHeaders }}
+ - name: {{ $header.name }}
+ value: {{ $header.value }}
+ {{- end }}
path: /
- port: {{ .Values.service.port }}
+ port: {{ $servicePort }}
+ scheme: {{ upper .Values.livenessProbe.httpGet.scheme }}
+ initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
+ periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
+ successThreshold: {{ .Values.livenessProbe.successThreshold }}
+ timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
readinessProbe:
+ failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
httpGet:
+ {{- if .Values.kubeRBACProxy.enabled }}
+ host: 127.0.0.1
+ {{- end }}
+ httpHeaders:
+ {{- range $_, $header := .Values.readinessProbe.httpGet.httpHeaders }}
+ - name: {{ $header.name }}
+ value: {{ $header.value }}
+ {{- end }}
path: /
- port: {{ .Values.service.port }}
+ port: {{ $servicePort }}
+ scheme: {{ upper .Values.readinessProbe.httpGet.scheme }}
+ initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
+ periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
+ successThreshold: {{ .Values.readinessProbe.successThreshold }}
+ timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
+ {{- with .Values.resources }}
resources:
-{{ toYaml .Values.resources | indent 12 }}
+ {{- toYaml . | nindent 12 }}
+ {{- end }}
volumeMounts:
- name: proc
mountPath: /host/proc
@@ -73,54 +131,116 @@ spec:
- name: sys
mountPath: /host/sys
readOnly: true
- {{- if .Values.extraHostVolumeMounts }}
+ {{- if .Values.hostRootFsMount.enabled }}
+ - name: root
+ mountPath: /host/root
+ {{- with .Values.hostRootFsMount.mountPropagation }}
+ mountPropagation: {{ . }}
+ {{- end }}
+ readOnly: true
+ {{- end }}
{{- range $_, $mount := .Values.extraHostVolumeMounts }}
- name: {{ $mount.name }}
mountPath: {{ $mount.mountPath }}
readOnly: {{ $mount.readOnly }}
- {{- if $mount.mountPropagation }}
- mountPropagation: {{ $mount.mountPropagation }}
- {{- end }}
- {{- end }}
+ {{- with $mount.mountPropagation }}
+ mountPropagation: {{ . }}
+ {{- end }}
{{- end }}
- {{- if .Values.sidecarVolumeMount }}
{{- range $_, $mount := .Values.sidecarVolumeMount }}
- name: {{ $mount.name }}
mountPath: {{ $mount.mountPath }}
readOnly: true
{{- end }}
- {{- end }}
- {{- if .Values.configmaps }}
{{- range $_, $mount := .Values.configmaps }}
- name: {{ $mount.name }}
mountPath: {{ $mount.mountPath }}
{{- end }}
+ {{- range $_, $mount := .Values.secrets }}
+ - name: {{ .name }}
+ mountPath: {{ .mountPath }}
{{- end }}
-{{- if .Values.sidecars }}
-{{ toYaml .Values.sidecars | indent 8 }}
- {{- if .Values.sidecarVolumeMount }}
+ {{- with .Values.sidecars }}
+ {{- toYaml . | nindent 8 }}
+ {{- if or $.Values.sidecarVolumeMount $.Values.sidecarHostVolumeMounts }}
volumeMounts:
- {{- range $_, $mount := .Values.sidecarVolumeMount }}
+ {{- range $_, $mount := $.Values.sidecarVolumeMount }}
+ - name: {{ $mount.name }}
+ mountPath: {{ $mount.mountPath }}
+ readOnly: {{ $mount.readOnly }}
+ {{- end }}
+ {{- range $_, $mount := $.Values.sidecarHostVolumeMounts }}
- name: {{ $mount.name }}
mountPath: {{ $mount.mountPath }}
readOnly: {{ $mount.readOnly }}
+ {{- if $mount.mountPropagation }}
+ mountPropagation: {{ $mount.mountPropagation }}
+ {{- end }}
{{- end }}
{{- end }}
-{{- end }}
+ {{- end }}
+ {{- if .Values.kubeRBACProxy.enabled }}
+ - name: kube-rbac-proxy
+ args:
+ {{- if .Values.kubeRBACProxy.extraArgs }}
+ {{- .Values.kubeRBACProxy.extraArgs | toYaml | nindent 12 }}
+ {{- end }}
+ - --secure-listen-address=:{{ .Values.service.port}}
+ - --upstream=http://127.0.0.1:{{ $servicePort }}/
+ - --proxy-endpoints-port=8888
+ - --config-file=/etc/kube-rbac-proxy-config/config-file.yaml
+ volumeMounts:
+ - name: kube-rbac-proxy-config
+ mountPath: /etc/kube-rbac-proxy-config
+ imagePullPolicy: {{ .Values.kubeRBACProxy.image.pullPolicy }}
+ {{- if .Values.kubeRBACProxy.image.sha }}
+ image: "{{ .Values.global.imageRegistry | default .Values.kubeRBACProxy.image.registry}}/{{ .Values.kubeRBACProxy.image.repository }}:{{ .Values.kubeRBACProxy.image.tag }}@sha256:{{ .Values.kubeRBACProxy.image.sha }}"
+ {{- else }}
+ image: "{{ .Values.global.imageRegistry | default .Values.kubeRBACProxy.image.registry}}/{{ .Values.kubeRBACProxy.image.repository }}:{{ .Values.kubeRBACProxy.image.tag }}"
+ {{- end }}
+ ports:
+ - containerPort: {{ .Values.service.port}}
+ name: "http"
+ - containerPort: 8888
+ name: "http-healthz"
+ readinessProbe:
+ httpGet:
+ scheme: HTTPS
+ port: 8888
+ path: healthz
+ initialDelaySeconds: 5
+ timeoutSeconds: 5
+ {{- if .Values.kubeRBACProxy.resources }}
+ resources:
+ {{ toYaml .Values.kubeRBACProxy.resources | nindent 12 }}
+ {{- end }}
+ {{- if .Values.kubeRBACProxy.containerSecurityContext }}
+ securityContext:
+ {{ toYaml .Values.kubeRBACProxy.containerSecurityContext | nindent 12 }}
+ {{- end }}
+ {{- end }}
+ {{- if or .Values.imagePullSecrets .Values.global.imagePullSecrets }}
+ imagePullSecrets:
+ {{- include "prometheus-node-exporter.imagePullSecrets" (dict "Values" .Values "imagePullSecrets" .Values.imagePullSecrets) | indent 8 }}
+ {{- end }}
hostNetwork: {{ .Values.hostNetwork }}
- hostPID: true
-{{- if .Values.affinity }}
+ hostPID: {{ .Values.hostPID }}
+ {{- with .Values.affinity }}
affinity:
-{{ toYaml .Values.affinity | indent 8 }}
-{{- end }}
-{{- if .Values.nodeSelector }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.dnsConfig }}
+ dnsConfig:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.nodeSelector }}
nodeSelector:
-{{ toYaml .Values.nodeSelector | indent 8 }}
-{{- end }}
- {{- with .Values.tolerations }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.tolerations }}
tolerations:
-{{ toYaml . | indent 8 }}
- {{- end }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
volumes:
- name: proc
hostPath:
@@ -128,24 +248,38 @@ spec:
- name: sys
hostPath:
path: /sys
- {{- if .Values.extraHostVolumeMounts }}
+ {{- if .Values.hostRootFsMount.enabled }}
+ - name: root
+ hostPath:
+ path: /
+ {{- end }}
{{- range $_, $mount := .Values.extraHostVolumeMounts }}
- name: {{ $mount.name }}
hostPath:
path: {{ $mount.hostPath }}
{{- end }}
- {{- end }}
- {{- if .Values.sidecarVolumeMount }}
{{- range $_, $mount := .Values.sidecarVolumeMount }}
- name: {{ $mount.name }}
emptyDir:
medium: Memory
{{- end }}
+ {{- range $_, $mount := .Values.sidecarHostVolumeMounts }}
+ - name: {{ $mount.name }}
+ hostPath:
+ path: {{ $mount.hostPath }}
{{- end }}
- {{- if .Values.configmaps }}
{{- range $_, $mount := .Values.configmaps }}
- name: {{ $mount.name }}
configMap:
name: {{ $mount.name }}
{{- end }}
+ {{- range $_, $mount := .Values.secrets }}
+ - name: {{ $mount.name }}
+ secret:
+ secretName: {{ $mount.name }}
+ {{- end }}
+ {{- if .Values.kubeRBACProxy.enabled }}
+ - name: kube-rbac-proxy-config
+ configMap:
+ name: {{ template "prometheus-node-exporter.fullname" . }}-rbac-config
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/endpoints.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/endpoints.yaml
old mode 100755
new mode 100644
index 8daaeaaff1..45eeb8d966
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/endpoints.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/endpoints.yaml
@@ -2,17 +2,17 @@
apiVersion: v1
kind: Endpoints
metadata:
- name: {{ template "prometheus-node-exporter.fullname" . }}
- namespace: {{ template "prometheus-node-exporter.namespace" . }}
+ name: {{ include "prometheus-node-exporter.fullname" . }}
+ namespace: {{ include "prometheus-node-exporter.namespace" . }}
labels:
-{{ include "prometheus-node-exporter.labels" . | indent 4 }}
+ {{- include "prometheus-node-exporter.labels" . | nindent 4 }}
subsets:
- addresses:
{{- range .Values.endpoints }}
- ip: {{ . }}
{{- end }}
ports:
- - name: metrics
+ - name: {{ .Values.service.portName }}
port: 9100
protocol: TCP
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/extra-manifests.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/extra-manifests.yaml
new file mode 100644
index 0000000000..2b21b71062
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/extra-manifests.yaml
@@ -0,0 +1,4 @@
+{{ range .Values.extraManifests }}
+---
+{{ tpl . $ }}
+{{ end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/monitor.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/monitor.yaml
deleted file mode 100755
index f92fae8a70..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/monitor.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
-{{- if .Values.prometheus.monitor.enabled }}
-apiVersion: monitoring.coreos.com/v1
-kind: ServiceMonitor
-metadata:
- name: {{ template "prometheus-node-exporter.fullname" . }}
- namespace: {{ template "prometheus-node-exporter.namespace" . }}
- labels: {{ include "prometheus-node-exporter.labels" . | indent 4 }}
- {{- if .Values.prometheus.monitor.additionalLabels }}
-{{ toYaml .Values.prometheus.monitor.additionalLabels | indent 4 }}
- {{- end }}
-spec:
- selector:
- matchLabels:
- app: {{ template "prometheus-node-exporter.name" . }}
- release: {{ .Release.Name }}
- endpoints:
- - port: metrics
- {{- if .Values.prometheus.monitor.scrapeTimeout }}
- scrapeTimeout: {{ .Values.prometheus.monitor.scrapeTimeout }}
- {{- end }}
-{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/networkpolicy.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/networkpolicy.yaml
new file mode 100644
index 0000000000..825722729d
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/networkpolicy.yaml
@@ -0,0 +1,23 @@
+{{- if .Values.networkPolicy.enabled }}
+apiVersion: networking.k8s.io/v1
+kind: NetworkPolicy
+metadata:
+ name: {{ include "prometheus-node-exporter.fullname" . }}
+ namespace: {{ include "prometheus-node-exporter.namespace" . }}
+ labels:
+ {{- include "prometheus-node-exporter.labels" $ | nindent 4 }}
+ {{- with .Values.service.annotations }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+spec:
+ ingress:
+ - ports:
+ - port: {{ .Values.service.port }}
+ policyTypes:
+ - Egress
+ - Ingress
+ podSelector:
+ matchLabels:
+ {{- include "prometheus-node-exporter.selectorLabels" . | nindent 6 }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/podmonitor.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/podmonitor.yaml
new file mode 100644
index 0000000000..f88da6a34e
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/podmonitor.yaml
@@ -0,0 +1,91 @@
+{{- if .Values.prometheus.podMonitor.enabled }}
+apiVersion: {{ .Values.prometheus.podMonitor.apiVersion | default "monitoring.coreos.com/v1" }}
+kind: PodMonitor
+metadata:
+ name: {{ include "prometheus-node-exporter.fullname" . }}
+ namespace: {{ include "prometheus-node-exporter.podmonitor-namespace" . }}
+ labels:
+ {{- include "prometheus-node-exporter.labels" . | nindent 4 }}
+ {{- with .Values.prometheus.podMonitor.additionalLabels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+spec:
+ jobLabel: {{ default "app.kubernetes.io/name" .Values.prometheus.podMonitor.jobLabel }}
+ {{- include "podmonitor.scrapeLimits" .Values.prometheus.podMonitor | nindent 2 }}
+ selector:
+ matchLabels:
+ {{- with .Values.prometheus.podMonitor.selectorOverride }}
+ {{- toYaml . | nindent 6 }}
+ {{- else }}
+ {{- include "prometheus-node-exporter.selectorLabels" . | nindent 6 }}
+ {{- end }}
+ namespaceSelector:
+ matchNames:
+ - {{ include "prometheus-node-exporter.namespace" . }}
+ {{- with .Values.prometheus.podMonitor.attachMetadata }}
+ attachMetadata:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+ {{- with .Values.prometheus.podMonitor.podTargetLabels }}
+ podTargetLabels:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+ podMetricsEndpoints:
+ - port: {{ .Values.service.portName }}
+ {{- with .Values.prometheus.podMonitor.scheme }}
+ scheme: {{ . }}
+ {{- end }}
+ {{- with .Values.prometheus.podMonitor.path }}
+ path: {{ . }}
+ {{- end }}
+ {{- with .Values.prometheus.podMonitor.basicAuth }}
+ basicAuth:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.prometheus.podMonitor.bearerTokenSecret }}
+ bearerTokenSecret:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.prometheus.podMonitor.tlsConfig }}
+ tlsConfig:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.prometheus.podMonitor.authorization }}
+ authorization:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.prometheus.podMonitor.oauth2 }}
+ oauth2:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.prometheus.podMonitor.proxyUrl }}
+ proxyUrl: {{ . }}
+ {{- end }}
+ {{- with .Values.prometheus.podMonitor.interval }}
+ interval: {{ . }}
+ {{- end }}
+ {{- with .Values.prometheus.podMonitor.honorTimestamps }}
+ honorTimestamps: {{ . }}
+ {{- end }}
+ {{- with .Values.prometheus.podMonitor.honorLabels }}
+ honorLabels: {{ . }}
+ {{- end }}
+ {{- with .Values.prometheus.podMonitor.scrapeTimeout }}
+ scrapeTimeout: {{ . }}
+ {{- end }}
+ {{- with .Values.prometheus.podMonitor.relabelings }}
+ relabelings:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.prometheus.podMonitor.metricRelabelings }}
+ metricRelabelings:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ enableHttp2: {{ default false .Values.prometheus.podMonitor.enableHttp2 }}
+ filterRunning: {{ default true .Values.prometheus.podMonitor.filterRunning }}
+ followRedirects: {{ default false .Values.prometheus.podMonitor.followRedirects }}
+ {{- with .Values.prometheus.podMonitor.params }}
+ params:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/psp-clusterrole.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/psp-clusterrole.yaml
old mode 100755
new mode 100644
index cb433369cf..8957317243
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/psp-clusterrole.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/psp-clusterrole.yaml
@@ -1,15 +1,14 @@
-{{- if .Values.rbac.create }}
-{{- if .Values.rbac.pspEnabled }}
+{{- if and .Values.rbac.create .Values.rbac.pspEnabled (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") }}
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
- name: psp-{{ template "prometheus-node-exporter.fullname" . }}
- labels: {{ include "prometheus-node-exporter.labels" . | indent 4 }}
+ name: psp-{{ include "prometheus-node-exporter.fullname" . }}
+ labels:
+ {{- include "prometheus-node-exporter.labels" . | nindent 4 }}
rules:
- apiGroups: ['extensions']
resources: ['podsecuritypolicies']
verbs: ['use']
resourceNames:
- - {{ template "prometheus-node-exporter.fullname" . }}
-{{- end }}
+ - {{ include "prometheus-node-exporter.fullname" . }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/psp-clusterrolebinding.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/psp-clusterrolebinding.yaml
old mode 100755
new mode 100644
index d36d93ecf5..333370173b
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/psp-clusterrolebinding.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/psp-clusterrolebinding.yaml
@@ -1,17 +1,16 @@
-{{- if .Values.rbac.create }}
-{{- if .Values.rbac.pspEnabled }}
+{{- if and .Values.rbac.create .Values.rbac.pspEnabled (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
- name: psp-{{ template "prometheus-node-exporter.fullname" . }}
- labels: {{ include "prometheus-node-exporter.labels" . | indent 4 }}
+ name: psp-{{ include "prometheus-node-exporter.fullname" . }}
+ labels:
+ {{- include "prometheus-node-exporter.labels" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
- name: psp-{{ template "prometheus-node-exporter.fullname" . }}
+ name: psp-{{ include "prometheus-node-exporter.fullname" . }}
subjects:
- kind: ServiceAccount
- name: {{ template "prometheus-node-exporter.fullname" . }}
- namespace: {{ template "prometheus-node-exporter.namespace" . }}
-{{- end }}
+ name: {{ include "prometheus-node-exporter.fullname" . }}
+ namespace: {{ include "prometheus-node-exporter.namespace" . }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/psp.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/psp.yaml
old mode 100755
new mode 100644
index f00506c980..4896c84daa
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/psp.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/psp.yaml
@@ -1,19 +1,17 @@
-{{- if .Values.rbac.create }}
-{{- if .Values.rbac.pspEnabled }}
+{{- if and .Values.rbac.create .Values.rbac.pspEnabled (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") }}
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
- name: {{ template "prometheus-node-exporter.fullname" . }}
- namespace: {{ template "prometheus-node-exporter.namespace" . }}
- labels: {{ include "prometheus-node-exporter.labels" . | indent 4 }}
+ name: {{ include "prometheus-node-exporter.fullname" . }}
+ namespace: {{ include "prometheus-node-exporter.namespace" . }}
+ labels:
+ {{- include "prometheus-node-exporter.labels" . | nindent 4 }}
+ {{- with .Values.rbac.pspAnnotations }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
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,15 +36,14 @@ 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
{{- end }}
-{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/rbac-configmap.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/rbac-configmap.yaml
new file mode 100644
index 0000000000..814e110337
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/rbac-configmap.yaml
@@ -0,0 +1,16 @@
+{{- if .Values.kubeRBACProxy.enabled}}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ template "prometheus-node-exporter.fullname" . }}-rbac-config
+ namespace: {{ include "prometheus-node-exporter.namespace" . }}
+data:
+ config-file.yaml: |+
+ authorization:
+ resourceAttributes:
+ namespace: {{ template "prometheus-node-exporter.namespace" . }}
+ apiVersion: v1
+ resource: services
+ subresource: {{ template "prometheus-node-exporter.fullname" . }}
+ name: {{ template "prometheus-node-exporter.fullname" . }}
+{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/service.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/service.yaml
old mode 100755
new mode 100644
index b0a447fe31..a065e46e39
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/service.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/service.yaml
@@ -1,23 +1,29 @@
+{{- if .Values.service.enabled }}
apiVersion: v1
kind: Service
metadata:
- name: {{ template "prometheus-node-exporter.fullname" . }}
- namespace: {{ template "prometheus-node-exporter.namespace" . }}
-{{- if .Values.service.annotations }}
+ name: {{ include "prometheus-node-exporter.fullname" . }}
+ namespace: {{ include "prometheus-node-exporter.namespace" . }}
+ labels:
+ {{- include "prometheus-node-exporter.labels" $ | nindent 4 }}
+ {{- with .Values.service.annotations }}
annotations:
-{{ toYaml .Values.service.annotations | indent 4 }}
-{{- end }}
- labels: {{ include "prometheus-node-exporter.labels" . | indent 4 }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
spec:
+{{- if .Values.service.ipDualStack.enabled }}
+ ipFamilies: {{ toYaml .Values.service.ipDualStack.ipFamilies | nindent 4 }}
+ ipFamilyPolicy: {{ .Values.service.ipDualStack.ipFamilyPolicy }}
+{{- end }}
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
- {{- if ( and (eq .Values.service.type "NodePort" ) (not (empty .Values.service.nodePort)) ) }}
+ {{- if ( and (eq .Values.service.type "NodePort" ) (not (empty .Values.service.nodePort)) ) }}
nodePort: {{ .Values.service.nodePort }}
- {{- end }}
+ {{- end }}
targetPort: {{ .Values.service.targetPort }}
protocol: TCP
- name: metrics
+ name: {{ .Values.service.portName }}
selector:
- app: {{ template "prometheus-node-exporter.name" . }}
- release: {{ .Release.Name }}
+ {{- include "prometheus-node-exporter.selectorLabels" . | nindent 4 }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/serviceaccount.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/serviceaccount.yaml
old mode 100755
new mode 100644
index bd1c223b46..5c3348c09b
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/serviceaccount.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/serviceaccount.yaml
@@ -1,16 +1,17 @@
-{{- if .Values.rbac.create -}}
-{{- if .Values.serviceAccount.create -}}
+{{- if and .Values.rbac.create .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
- name: {{ template "prometheus-node-exporter.serviceAccountName" . }}
- namespace: {{ template "prometheus-node-exporter.namespace" . }}
- labels:
- app: {{ template "prometheus-node-exporter.name" . }}
- chart: {{ template "prometheus-node-exporter.chart" . }}
- release: "{{ .Release.Name }}"
- heritage: "{{ .Release.Service }}"
+ name: {{ include "prometheus-node-exporter.serviceAccountName" . }}
+ namespace: {{ include "prometheus-node-exporter.namespace" . }}
+ labels:
+ {{- include "prometheus-node-exporter.labels" . | nindent 4 }}
+ {{- with .Values.serviceAccount.annotations }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+{{- if or .Values.serviceAccount.imagePullSecrets .Values.global.imagePullSecrets }}
imagePullSecrets:
-{{ toYaml .Values.serviceAccount.imagePullSecrets | indent 2 }}
-{{- end -}}
+ {{- include "prometheus-node-exporter.imagePullSecrets" (dict "Values" .Values "imagePullSecrets" .Values.serviceAccount.imagePullSecrets) | indent 2 }}
+{{- end }}
{{- end -}}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/servicemonitor.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/servicemonitor.yaml
new file mode 100644
index 0000000000..0d7a42eaec
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/servicemonitor.yaml
@@ -0,0 +1,61 @@
+{{- if .Values.prometheus.monitor.enabled }}
+apiVersion: {{ .Values.prometheus.monitor.apiVersion | default "monitoring.coreos.com/v1" }}
+kind: ServiceMonitor
+metadata:
+ name: {{ include "prometheus-node-exporter.fullname" . }}
+ namespace: {{ include "prometheus-node-exporter.monitor-namespace" . }}
+ labels:
+ {{- include "prometheus-node-exporter.labels" . | nindent 4 }}
+ {{- with .Values.prometheus.monitor.additionalLabels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+spec:
+ jobLabel: {{ default "app.kubernetes.io/name" .Values.prometheus.monitor.jobLabel }}
+ {{- include "servicemonitor.scrapeLimits" .Values.prometheus.monitor | nindent 2 }}
+ {{- with .Values.prometheus.monitor.podTargetLabels }}
+ podTargetLabels:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+ selector:
+ matchLabels:
+ {{- with .Values.prometheus.monitor.selectorOverride }}
+ {{- toYaml . | nindent 6 }}
+ {{- else }}
+ {{- include "prometheus-node-exporter.selectorLabels" . | nindent 6 }}
+ {{- end }}
+ {{- with .Values.prometheus.monitor.attachMetadata }}
+ attachMetadata:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+ endpoints:
+ - port: {{ .Values.service.portName }}
+ scheme: {{ .Values.prometheus.monitor.scheme }}
+ {{- with .Values.prometheus.monitor.basicAuth }}
+ basicAuth:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.prometheus.monitor.bearerTokenFile }}
+ bearerTokenFile: {{ . }}
+ {{- end }}
+ {{- with .Values.prometheus.monitor.tlsConfig }}
+ tlsConfig:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.prometheus.monitor.proxyUrl }}
+ proxyUrl: {{ . }}
+ {{- end }}
+ {{- with .Values.prometheus.monitor.interval }}
+ interval: {{ . }}
+ {{- end }}
+ {{- with .Values.prometheus.monitor.scrapeTimeout }}
+ scrapeTimeout: {{ . }}
+ {{- end }}
+ {{- with .Values.prometheus.monitor.relabelings }}
+ relabelings:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.prometheus.monitor.metricRelabelings }}
+ metricRelabelings:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/verticalpodautoscaler.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/verticalpodautoscaler.yaml
new file mode 100644
index 0000000000..2c2705f872
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/verticalpodautoscaler.yaml
@@ -0,0 +1,40 @@
+{{- if and (.Capabilities.APIVersions.Has "autoscaling.k8s.io/v1") (.Values.verticalPodAutoscaler.enabled) }}
+apiVersion: autoscaling.k8s.io/v1
+kind: VerticalPodAutoscaler
+metadata:
+ name: {{ include "prometheus-node-exporter.fullname" . }}
+ namespace: {{ include "prometheus-node-exporter.namespace" . }}
+ labels:
+ {{- include "prometheus-node-exporter.labels" . | nindent 4 }}
+spec:
+ {{- with .Values.verticalPodAutoscaler.recommenders }}
+ recommenders:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+ resourcePolicy:
+ containerPolicies:
+ - containerName: node-exporter
+ {{- with .Values.verticalPodAutoscaler.controlledResources }}
+ controlledResources:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.verticalPodAutoscaler.controlledValues }}
+ controlledValues: {{ . }}
+ {{- end }}
+ {{- with .Values.verticalPodAutoscaler.maxAllowed }}
+ maxAllowed:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.verticalPodAutoscaler.minAllowed }}
+ minAllowed:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ targetRef:
+ apiVersion: apps/v1
+ kind: DaemonSet
+ name: {{ include "prometheus-node-exporter.fullname" . }}
+ {{- with .Values.verticalPodAutoscaler.updatePolicy }}
+ updatePolicy:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/values.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/values.yaml
old mode 100755
new mode 100644
index 868bfcd71f..511a5906aa
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/values.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/values.yaml
@@ -2,18 +2,97 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
image:
- repository: quay.io/prometheus/node-exporter
- tag: v0.18.1
+ registry: quay.io
+ repository: prometheus/node-exporter
+ # Overrides the image tag whose default is {{ printf "v%s" .Chart.AppVersion }}
+ tag: ""
pullPolicy: IfNotPresent
+ digest: ""
+
+imagePullSecrets: []
+# - name: "image-pull-secret"
+nameOverride: ""
+fullnameOverride: ""
+
+# Number of old history to retain to allow rollback
+# Default Kubernetes value is set to 10
+revisionHistoryLimit: 10
+
+global:
+ # 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
+ imagePullSecrets: []
+ #
+ # Allow parent charts to override registry hostname
+ imageRegistry: ""
+
+# Configure kube-rbac-proxy. When enabled, creates a kube-rbac-proxy to protect the node-exporter http endpoint.
+# The requests are served through the same service but requests are HTTPS.
+kubeRBACProxy:
+ enabled: false
+ image:
+ registry: quay.io
+ repository: brancz/kube-rbac-proxy
+ tag: v0.14.0
+ sha: ""
+ pullPolicy: IfNotPresent
+
+ # List of additional cli arguments to configure kube-rbac-prxy
+ # for example: --tls-cipher-suites, --log-file, etc.
+ # all the possible args can be found here: https://github.com/brancz/kube-rbac-proxy#usage
+ extraArgs: []
+
+ ## Specify security settings for a Container
+ ## Allows overrides and additional options compared to (Pod) securityContext
+ ## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
+ containerSecurityContext: {}
+
+ resources: {}
+ # We usually recommend not to specify default resources and to leave this as a conscious
+ # choice for the user. This also increases chances charts run on environments with little
+ # resources, such as Minikube. If you do want to specify resources, uncomment the following
+ # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+ # limits:
+ # cpu: 100m
+ # memory: 64Mi
+ # requests:
+ # cpu: 10m
+ # memory: 32Mi
service:
+ enabled: true
type: ClusterIP
port: 9100
targetPort: 9100
nodePort:
+ portName: metrics
listenOnAllInterfaces: true
annotations:
prometheus.io/scrape: "true"
+ ipDualStack:
+ enabled: false
+ ipFamilies: ["IPv6", "IPv4"]
+ ipFamilyPolicy: "PreferDualStack"
+
+# Set a NetworkPolicy with:
+# ingress only on service.port
+# no egress permitted
+networkPolicy:
+ enabled: false
+
+# Additional environment variables that will be passed to the daemonset
+env: {}
+## env:
+## VARIABLE: value
prometheus:
monitor:
@@ -21,7 +100,146 @@ prometheus:
additionalLabels: {}
namespace: ""
+ jobLabel: ""
+
+ # List of pod labels to add to node exporter metrics
+ # https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#servicemonitor
+ podTargetLabels: []
+
+ scheme: http
+ basicAuth: {}
+ bearerTokenFile:
+ tlsConfig: {}
+
+ ## proxyUrl: URL of a proxy that should be used for scraping.
+ ##
+ proxyUrl: ""
+
+ ## Override serviceMonitor selector
+ ##
+ selectorOverride: {}
+
+ ## Attach node metadata to discovered targets. Requires Prometheus v2.35.0 and above.
+ ##
+ attachMetadata:
+ node: false
+
+ relabelings: []
+ metricRelabelings: []
+ interval: ""
scrapeTimeout: 10s
+ ## prometheus.monitor.apiVersion ApiVersion for the serviceMonitor Resource(defaults to "monitoring.coreos.com/v1")
+ apiVersion: ""
+
+ ## SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
+ ##
+ sampleLimit: 0
+
+ ## TargetLimit defines a limit on the number of scraped targets that will be accepted.
+ ##
+ targetLimit: 0
+
+ ## Per-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelLimit: 0
+
+ ## Per-scrape limit on length of labels name that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelNameLengthLimit: 0
+
+ ## Per-scrape limit on length of labels value that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelValueLengthLimit: 0
+
+ # PodMonitor defines monitoring for a set of pods.
+ # ref. https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#monitoring.coreos.com/v1.PodMonitor
+ # Using a PodMonitor may be preferred in some environments where there is very large number
+ # of Node Exporter endpoints (1000+) behind a single service.
+ # The PodMonitor is disabled by default. When switching from ServiceMonitor to PodMonitor,
+ # the time series resulting from the configuration through PodMonitor may have different labels.
+ # For instance, there will not be the service label any longer which might
+ # affect PromQL queries selecting that label.
+ podMonitor:
+ enabled: false
+ # Namespace in which to deploy the pod monitor. Defaults to the release namespace.
+ namespace: ""
+ # Additional labels, e.g. setting a label for pod monitor selector as set in prometheus
+ additionalLabels: {}
+ # release: kube-prometheus-stack
+ # PodTargetLabels transfers labels of the Kubernetes Pod onto the target.
+ podTargetLabels: []
+ # apiVersion defaults to monitoring.coreos.com/v1.
+ apiVersion: ""
+ # Override pod selector to select pod objects.
+ selectorOverride: {}
+ # Attach node metadata to discovered targets. Requires Prometheus v2.35.0 and above.
+ attachMetadata:
+ node: false
+ # The label to use to retrieve the job name from. Defaults to label app.kubernetes.io/name.
+ jobLabel: ""
+
+ # Scheme/protocol to use for scraping.
+ scheme: "http"
+ # Path to scrape metrics at.
+ path: "/metrics"
+
+ # BasicAuth allow an endpoint to authenticate over basic authentication.
+ # More info: https://prometheus.io/docs/operating/configuration/#endpoint
+ basicAuth: {}
+ # Secret to mount to read bearer token for scraping targets.
+ # The secret needs to be in the same namespace as the pod monitor and accessible by the Prometheus Operator.
+ # https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#secretkeyselector-v1-core
+ bearerTokenSecret: {}
+ # TLS configuration to use when scraping the endpoint.
+ tlsConfig: {}
+ # Authorization section for this endpoint.
+ # https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#monitoring.coreos.com/v1.SafeAuthorization
+ authorization: {}
+ # OAuth2 for the URL. Only valid in Prometheus versions 2.27.0 and newer.
+ # https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#monitoring.coreos.com/v1.OAuth2
+ oauth2: {}
+
+ # ProxyURL eg http://proxyserver:2195. Directs scrapes through proxy to this endpoint.
+ proxyUrl: ""
+ # Interval at which endpoints should be scraped. If not specified Prometheus’ global scrape interval is used.
+ interval: ""
+ # Timeout after which the scrape is ended. If not specified, the Prometheus global scrape interval is used.
+ scrapeTimeout: ""
+ # HonorTimestamps controls whether Prometheus respects the timestamps present in scraped data.
+ honorTimestamps: true
+ # HonorLabels chooses the metric’s labels on collisions with target labels.
+ honorLabels: true
+ # Whether to enable HTTP2. Default false.
+ enableHttp2: ""
+ # Drop pods that are not running. (Failed, Succeeded).
+ # Enabled by default. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase
+ filterRunning: ""
+ # FollowRedirects configures whether scrape requests follow HTTP 3xx redirects. Default false.
+ followRedirects: ""
+ # Optional HTTP URL parameters
+ params: {}
+
+ # RelabelConfigs to apply to samples before scraping. Prometheus Operator automatically adds
+ # relabelings for a few standard Kubernetes fields. The original scrape job’s name
+ # is available via the __tmp_prometheus_job_name label.
+ # More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config
+ relabelings: []
+ # MetricRelabelConfigs to apply to samples before ingestion.
+ metricRelabelings: []
+
+ # SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
+ sampleLimit: 0
+ # TargetLimit defines a limit on the number of scraped targets that will be accepted.
+ targetLimit: 0
+ # Per-scrape limit on number of labels that will be accepted for a sample.
+ # Only valid in Prometheus versions 2.27.0 and newer.
+ labelLimit: 0
+ # Per-scrape limit on length of labels name that will be accepted for a sample.
+ # Only valid in Prometheus versions 2.27.0 and newer.
+ labelNameLengthLimit: 0
+ # Per-scrape limit on length of labels value that will be accepted for a sample.
+ # Only valid in Prometheus versions 2.27.0 and newer.
+ labelValueLengthLimit: 0
## Customize the updateStrategy if set
updateStrategy:
@@ -47,12 +265,22 @@ serviceAccount:
# The name of the ServiceAccount to use.
# If not set and create is true, a name is generated using the fullname template
name:
+ annotations: {}
imagePullSecrets: []
+ automountServiceAccountToken: false
securityContext:
+ fsGroup: 65534
+ runAsGroup: 65534
runAsNonRoot: true
runAsUser: 65534
+containerSecurityContext:
+ readOnlyRootFilesystem: true
+ # capabilities:
+ # add:
+ # - SYS_TIME
+
rbac:
## If true, create & use RBAC resources
##
@@ -60,6 +288,7 @@ rbac:
## If true, create & use Pod Security Policy resources
## https://kubernetes.io/docs/concepts/policy/pod-security-policy/
pspEnabled: true
+ pspAnnotations: {}
# for deployments that have node_exporter deployed outside of the cluster, list
# their addresses here
@@ -68,6 +297,19 @@ endpoints: []
# Expose the service to the host network
hostNetwork: true
+# Share the host process ID namespace
+hostPID: true
+
+# Mount the node's root file system (/) at /host/root in the container
+hostRootFsMount:
+ enabled: true
+ # Defines how new mounts in existing mounts on the node or in the container
+ # are propagated to the container or node, respectively. Possible values are
+ # None, HostToContainer, and Bidirectional. If this field is omitted, then
+ # None is used. More information on:
+ # https://kubernetes.io/docs/concepts/storage/volumes/#mount-propagation
+ mountPropagation: HostToContainer
+
## Assign a group of affinity scheduling rules
##
affinity: {}
@@ -81,16 +323,36 @@ affinity: {}
# - target-host-name
# Annotations to be added to node exporter pods
-podAnnotations: {}
+podAnnotations:
+ # Fix for very slow GKE cluster upgrades
+ cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
# Extra labels to be added to node exporter pods
podLabels: {}
+# Annotations to be added to node exporter daemonset
+daemonsetAnnotations: {}
+
+## set to true to add the release label so scraping of the servicemonitor with kube-prometheus-stack works out of the box
+releaseLabel: false
+
+# Custom DNS configuration to be added to prometheus-node-exporter pods
+dnsConfig: {}
+# nameservers:
+# - 1.2.3.4
+# searches:
+# - ns1.svc.cluster-domain.example
+# - my.dns.search.suffix
+# options:
+# - name: ndots
+# value: "2"
+# - name: edns0
+
## Assign a nodeSelector if operating a hybrid cluster
##
-nodeSelector: {}
-# beta.kubernetes.io/arch: amd64
-# beta.kubernetes.io/os: linux
+nodeSelector:
+ kubernetes.io/os: linux
+ # kubernetes.io/arch: amd64
tolerations:
- effect: NoSchedule
@@ -105,7 +367,7 @@ extraArgs: []
# - --collector.diskstats.ignored-devices=^(ram|loop|fd|(h|s|v)d[a-z]|nvme\\d+n\\d+p)\\d+$
# - --collector.textfile.directory=/run/prometheus
-## Additional mounts from the host
+## Additional mounts from the host to node-exporter container
##
extraHostVolumeMounts: []
# - name:
@@ -119,7 +381,9 @@ extraHostVolumeMounts: []
configmaps: []
# - name:
# mountPath:
-
+secrets: []
+# - name:
+# mountPath:
## Override the deployment namespace
##
namespaceOverride: ""
@@ -136,3 +400,81 @@ sidecarVolumeMount: []
## - name: collector-textfiles
## mountPath: /run/prometheus
## readOnly: false
+
+## Additional mounts from the host to sidecar containers
+##
+sidecarHostVolumeMounts: []
+# - name:
+# hostPath:
+# mountPath:
+# readOnly: true|false
+# mountPropagation: None|HostToContainer|Bidirectional
+
+## Additional InitContainers to initialize the pod
+##
+extraInitContainers: []
+
+## Liveness probe
+##
+livenessProbe:
+ failureThreshold: 3
+ httpGet:
+ httpHeaders: []
+ scheme: http
+ initialDelaySeconds: 0
+ periodSeconds: 10
+ successThreshold: 1
+ timeoutSeconds: 1
+
+## Readiness probe
+##
+readinessProbe:
+ failureThreshold: 3
+ httpGet:
+ httpHeaders: []
+ scheme: http
+ initialDelaySeconds: 0
+ periodSeconds: 10
+ successThreshold: 1
+ timeoutSeconds: 1
+
+# Enable vertical pod autoscaler support for prometheus-node-exporter
+verticalPodAutoscaler:
+ enabled: false
+
+ # Recommender responsible for generating recommendation for the object.
+ # List should be empty (then the default recommender will generate the recommendation)
+ # or contain exactly one recommender.
+ # recommenders:
+ # - name: custom-recommender-performance
+
+ # List of resources that the vertical pod autoscaler can control. Defaults to cpu and memory
+ controlledResources: []
+ # Specifies which resource values should be controlled: RequestsOnly or RequestsAndLimits.
+ # controlledValues: RequestsAndLimits
+
+ # Define the max allowed resources for the pod
+ maxAllowed: {}
+ # cpu: 200m
+ # memory: 100Mi
+ # Define the min allowed resources for the pod
+ minAllowed: {}
+ # cpu: 200m
+ # memory: 100Mi
+
+ # updatePolicy:
+ # Specifies minimal number of replicas which need to be alive for VPA Updater to attempt pod eviction
+ # minReplicas: 1
+ # Specifies whether recommended updates are applied when a Pod is started and whether recommended updates
+ # are applied during the life of a Pod. Possible values are "Off", "Initial", "Recreate", and "Auto".
+ # updateMode: Auto
+
+# Extra manifests to deploy as an array
+extraManifests: []
+ # - |
+ # apiVersion: v1
+ # kind: ConfigMap
+ # metadata:
+ # name: prometheus-extra
+ # data:
+ # extra-data: "value"
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/ci/01-provision-crds-values.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/ci/01-provision-crds-values.yaml
new file mode 100644
index 0000000000..7b37cf6c62
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/ci/01-provision-crds-values.yaml
@@ -0,0 +1,41 @@
+alertmanager:
+ enabled: false
+coreDns:
+ enabled: false
+kubeApiServer:
+ enabled: false
+kubeControllerManager:
+ enabled: false
+kubeDns:
+ enabled: false
+kubeEtcd:
+ enabled: false
+kubeProxy:
+ enabled: false
+kubeScheduler:
+ enabled: false
+kubeStateMetrics:
+ enabled: false
+kubelet:
+ enabled: false
+nodeExporter:
+ enabled: false
+grafana:
+ enabled: false
+prometheus:
+ enabled: false
+defaultRules:
+ create: false
+# Default configuration of prometheus operator will create CRDs in the cluster idempotently
+prometheusOperator:
+ enabled: true
+ serviceMonitor:
+ selfMonitor: false
+ tls:
+ enabled: false
+ admissionWebhooks:
+ enabled: false
+ namespaces:
+ releaseNamespace: true
+ additional:
+ - kube-system
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/ci/02-test-without-crds-values.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/ci/02-test-without-crds-values.yaml
new file mode 100644
index 0000000000..aa949b8cfe
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/ci/02-test-without-crds-values.yaml
@@ -0,0 +1,13 @@
+prometheusOperator:
+ namespaces:
+ releaseNamespace: true
+ additional:
+ - kube-system
+
+prometheus-node-exporter:
+ service:
+ targetPort: 9101
+ port: 9101
+
+crds:
+ enabled: false
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/ci/03-non-defaults-values.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/ci/03-non-defaults-values.yaml
new file mode 100644
index 0000000000..541355ccdb
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/ci/03-non-defaults-values.yaml
@@ -0,0 +1,8 @@
+# this file tests some non default values to increase the test coverage
+
+defaultRules:
+ additionalRuleLabels:
+ key: value
+ additionalRuleGroupLabels:
+ kubernetesSystem:
+ key2: value2
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/crds/crd-alertmanager.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/crds/crd-alertmanager.yaml
deleted file mode 100755
index cbf9fc27f9..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/crds/crd-alertmanager.yaml
+++ /dev/null
@@ -1,4501 +0,0 @@
-# https://raw.githubusercontent.com/coreos/prometheus-operator/release-0.38/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml
-apiVersion: apiextensions.k8s.io/v1beta1
-kind: CustomResourceDefinition
-metadata:
- annotations:
- controller-gen.kubebuilder.io/version: v0.2.4
- helm.sh/hook: crd-install
- creationTimestamp: null
- name: alertmanagers.monitoring.coreos.com
-spec:
- additionalPrinterColumns:
- - JSONPath: .spec.version
- description: The version of Alertmanager
- name: Version
- type: string
- - JSONPath: .spec.replicas
- description: The desired replicas number of Alertmanagers
- name: Replicas
- type: integer
- - JSONPath: .metadata.creationTimestamp
- name: Age
- type: date
- group: monitoring.coreos.com
- names:
- kind: Alertmanager
- listKind: AlertmanagerList
- plural: alertmanagers
- singular: alertmanager
- preserveUnknownFields: false
- scope: Namespaced
- subresources: {}
- validation:
- openAPIV3Schema:
- description: Alertmanager describes an Alertmanager cluster.
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
- description: 'Specification of the desired behavior of the Alertmanager
- cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status'
- properties:
- additionalPeers:
- description: AdditionalPeers allows injecting a set of additional Alertmanagers
- to peer with to form a highly available cluster.
- items:
- type: string
- type: array
- affinity:
- description: If specified, the pod's scheduling constraints.
- properties:
- nodeAffinity:
- description: Describes node affinity scheduling rules for the pod.
- properties:
- preferredDuringSchedulingIgnoredDuringExecution:
- description: The scheduler will prefer to schedule pods to nodes
- that satisfy the affinity expressions specified by this field,
- but it may choose a node that violates one or more of the
- expressions. The node that is most preferred is the one with
- the greatest sum of weights, i.e. for each node that meets
- all of the scheduling requirements (resource request, requiredDuringScheduling
- affinity expressions, etc.), compute a sum by iterating through
- the elements of this field and adding "weight" to the sum
- if the node matches the corresponding matchExpressions; the
- node(s) with the highest sum are the most preferred.
- items:
- description: An empty preferred scheduling term matches all
- objects with implicit weight 0 (i.e. it's a no-op). A null
- preferred scheduling term matches no objects (i.e. is also
- a no-op).
- properties:
- preference:
- description: A node selector term, associated with the
- corresponding weight.
- properties:
- matchExpressions:
- description: A list of node selector requirements
- by node's labels.
- items:
- description: A node selector requirement is a selector
- that contains values, a key, and an operator that
- relates the key and values.
- properties:
- key:
- description: The label key that the selector
- applies to.
- type: string
- operator:
- description: Represents a key's relationship
- to a set of values. Valid operators are In,
- NotIn, Exists, DoesNotExist. Gt, and Lt.
- type: string
- values:
- description: An array of string values. If the
- operator is In or NotIn, the values array
- must be non-empty. If the operator is Exists
- or DoesNotExist, the values array must be
- empty. If the operator is Gt or Lt, the values
- array must have a single element, which will
- be interpreted as an integer. This array is
- replaced during a strategic merge patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- matchFields:
- description: A list of node selector requirements
- by node's fields.
- items:
- description: A node selector requirement is a selector
- that contains values, a key, and an operator that
- relates the key and values.
- properties:
- key:
- description: The label key that the selector
- applies to.
- type: string
- operator:
- description: Represents a key's relationship
- to a set of values. Valid operators are In,
- NotIn, Exists, DoesNotExist. Gt, and Lt.
- type: string
- values:
- description: An array of string values. If the
- operator is In or NotIn, the values array
- must be non-empty. If the operator is Exists
- or DoesNotExist, the values array must be
- empty. If the operator is Gt or Lt, the values
- array must have a single element, which will
- be interpreted as an integer. This array is
- replaced during a strategic merge patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- type: object
- weight:
- description: Weight associated with matching the corresponding
- nodeSelectorTerm, in the range 1-100.
- format: int32
- type: integer
- required:
- - preference
- - weight
- type: object
- type: array
- requiredDuringSchedulingIgnoredDuringExecution:
- description: If the affinity requirements specified by this
- field are not met at scheduling time, the pod will not be
- scheduled onto the node. If the affinity requirements specified
- by this field cease to be met at some point during pod execution
- (e.g. due to an update), the system may or may not try to
- eventually evict the pod from its node.
- properties:
- nodeSelectorTerms:
- description: Required. A list of node selector terms. The
- terms are ORed.
- items:
- description: A null or empty node selector term matches
- no objects. The requirements of them are ANDed. The
- TopologySelectorTerm type implements a subset of the
- NodeSelectorTerm.
- properties:
- matchExpressions:
- description: A list of node selector requirements
- by node's labels.
- items:
- description: A node selector requirement is a selector
- that contains values, a key, and an operator that
- relates the key and values.
- properties:
- key:
- description: The label key that the selector
- applies to.
- type: string
- operator:
- description: Represents a key's relationship
- to a set of values. Valid operators are In,
- NotIn, Exists, DoesNotExist. Gt, and Lt.
- type: string
- values:
- description: An array of string values. If the
- operator is In or NotIn, the values array
- must be non-empty. If the operator is Exists
- or DoesNotExist, the values array must be
- empty. If the operator is Gt or Lt, the values
- array must have a single element, which will
- be interpreted as an integer. This array is
- replaced during a strategic merge patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- matchFields:
- description: A list of node selector requirements
- by node's fields.
- items:
- description: A node selector requirement is a selector
- that contains values, a key, and an operator that
- relates the key and values.
- properties:
- key:
- description: The label key that the selector
- applies to.
- type: string
- operator:
- description: Represents a key's relationship
- to a set of values. Valid operators are In,
- NotIn, Exists, DoesNotExist. Gt, and Lt.
- type: string
- values:
- description: An array of string values. If the
- operator is In or NotIn, the values array
- must be non-empty. If the operator is Exists
- or DoesNotExist, the values array must be
- empty. If the operator is Gt or Lt, the values
- array must have a single element, which will
- be interpreted as an integer. This array is
- replaced during a strategic merge patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- type: object
- type: array
- required:
- - nodeSelectorTerms
- type: object
- type: object
- podAffinity:
- description: Describes pod affinity scheduling rules (e.g. co-locate
- this pod in the same node, zone, etc. as some other pod(s)).
- properties:
- preferredDuringSchedulingIgnoredDuringExecution:
- description: The scheduler will prefer to schedule pods to nodes
- that satisfy the affinity expressions specified by this field,
- but it may choose a node that violates one or more of the
- expressions. The node that is most preferred is the one with
- the greatest sum of weights, i.e. for each node that meets
- all of the scheduling requirements (resource request, requiredDuringScheduling
- affinity expressions, etc.), compute a sum by iterating through
- the elements of this field and adding "weight" to the sum
- if the node has pods which matches the corresponding podAffinityTerm;
- the node(s) with the highest sum are the most preferred.
- items:
- description: The weights of all of the matched WeightedPodAffinityTerm
- fields are added per-node to find the most preferred node(s)
- properties:
- podAffinityTerm:
- description: Required. A pod affinity term, associated
- with the corresponding weight.
- properties:
- labelSelector:
- description: A label query over a set of resources,
- in this case pods.
- properties:
- matchExpressions:
- description: matchExpressions is a list of label
- selector requirements. The requirements are
- ANDed.
- items:
- description: A label selector requirement is
- a selector that contains values, a key, and
- an operator that relates the key and values.
- properties:
- key:
- description: key is the label key that the
- selector applies to.
- type: string
- operator:
- description: operator represents a key's
- relationship to a set of values. Valid
- operators are In, NotIn, Exists and DoesNotExist.
- type: string
- values:
- description: values is an array of string
- values. If the operator is In or NotIn,
- the values array must be non-empty. If
- the operator is Exists or DoesNotExist,
- the values array must be empty. This array
- is replaced during a strategic merge patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- matchLabels:
- additionalProperties:
- type: string
- description: matchLabels is a map of {key,value}
- pairs. A single {key,value} in the matchLabels
- map is equivalent to an element of matchExpressions,
- whose key field is "key", the operator is "In",
- and the values array contains only "value".
- The requirements are ANDed.
- type: object
- type: object
- namespaces:
- description: namespaces specifies which namespaces
- the labelSelector applies to (matches against);
- null or empty list means "this pod's namespace"
- items:
- type: string
- type: array
- topologyKey:
- description: This pod should be co-located (affinity)
- or not co-located (anti-affinity) with the pods
- matching the labelSelector in the specified namespaces,
- where co-located is defined as running on a node
- whose value of the label with key topologyKey matches
- that of any node on which any of the selected pods
- is running. Empty topologyKey is not allowed.
- type: string
- required:
- - topologyKey
- type: object
- weight:
- description: weight associated with matching the corresponding
- podAffinityTerm, in the range 1-100.
- format: int32
- type: integer
- required:
- - podAffinityTerm
- - weight
- type: object
- type: array
- requiredDuringSchedulingIgnoredDuringExecution:
- description: If the affinity requirements specified by this
- field are not met at scheduling time, the pod will not be
- scheduled onto the node. If the affinity requirements specified
- by this field cease to be met at some point during pod execution
- (e.g. due to a pod label update), the system may or may not
- try to eventually evict the pod from its node. When there
- are multiple elements, the lists of nodes corresponding to
- each podAffinityTerm are intersected, i.e. all terms must
- be satisfied.
- items:
- description: Defines a set of pods (namely those matching
- the labelSelector relative to the given namespace(s)) that
- this pod should be co-located (affinity) or not co-located
- (anti-affinity) with, where co-located is defined as running
- on a node whose value of the label with key
- matches that of any node on which a pod of the set of pods
- is running
- properties:
- labelSelector:
- description: A label query over a set of resources, in
- this case pods.
- properties:
- matchExpressions:
- description: matchExpressions is a list of label selector
- requirements. The requirements are ANDed.
- items:
- description: A label selector requirement is a selector
- that contains values, a key, and an operator that
- relates the key and values.
- properties:
- key:
- description: key is the label key that the selector
- applies to.
- type: string
- operator:
- description: operator represents a key's relationship
- to a set of values. Valid operators are In,
- NotIn, Exists and DoesNotExist.
- type: string
- values:
- description: values is an array of string values.
- If the operator is In or NotIn, the values
- array must be non-empty. If the operator is
- Exists or DoesNotExist, the values array must
- be empty. This array is replaced during a
- strategic merge patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- matchLabels:
- additionalProperties:
- type: string
- description: matchLabels is a map of {key,value} pairs.
- A single {key,value} in the matchLabels map is equivalent
- to an element of matchExpressions, whose key field
- is "key", the operator is "In", and the values array
- contains only "value". The requirements are ANDed.
- type: object
- type: object
- namespaces:
- description: namespaces specifies which namespaces the
- labelSelector applies to (matches against); null or
- empty list means "this pod's namespace"
- items:
- type: string
- type: array
- topologyKey:
- description: This pod should be co-located (affinity)
- or not co-located (anti-affinity) with the pods matching
- the labelSelector in the specified namespaces, where
- co-located is defined as running on a node whose value
- of the label with key topologyKey matches that of any
- node on which any of the selected pods is running. Empty
- topologyKey is not allowed.
- type: string
- required:
- - topologyKey
- type: object
- type: array
- type: object
- podAntiAffinity:
- description: Describes pod anti-affinity scheduling rules (e.g.
- avoid putting this pod in the same node, zone, etc. as some other
- pod(s)).
- properties:
- preferredDuringSchedulingIgnoredDuringExecution:
- description: The scheduler will prefer to schedule pods to nodes
- that satisfy the anti-affinity expressions specified by this
- field, but it may choose a node that violates one or more
- of the expressions. The node that is most preferred is the
- one with the greatest sum of weights, i.e. for each node that
- meets all of the scheduling requirements (resource request,
- requiredDuringScheduling anti-affinity expressions, etc.),
- compute a sum by iterating through the elements of this field
- and adding "weight" to the sum if the node has pods which
- matches the corresponding podAffinityTerm; the node(s) with
- the highest sum are the most preferred.
- items:
- description: The weights of all of the matched WeightedPodAffinityTerm
- fields are added per-node to find the most preferred node(s)
- properties:
- podAffinityTerm:
- description: Required. A pod affinity term, associated
- with the corresponding weight.
- properties:
- labelSelector:
- description: A label query over a set of resources,
- in this case pods.
- properties:
- matchExpressions:
- description: matchExpressions is a list of label
- selector requirements. The requirements are
- ANDed.
- items:
- description: A label selector requirement is
- a selector that contains values, a key, and
- an operator that relates the key and values.
- properties:
- key:
- description: key is the label key that the
- selector applies to.
- type: string
- operator:
- description: operator represents a key's
- relationship to a set of values. Valid
- operators are In, NotIn, Exists and DoesNotExist.
- type: string
- values:
- description: values is an array of string
- values. If the operator is In or NotIn,
- the values array must be non-empty. If
- the operator is Exists or DoesNotExist,
- the values array must be empty. This array
- is replaced during a strategic merge patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- matchLabels:
- additionalProperties:
- type: string
- description: matchLabels is a map of {key,value}
- pairs. A single {key,value} in the matchLabels
- map is equivalent to an element of matchExpressions,
- whose key field is "key", the operator is "In",
- and the values array contains only "value".
- The requirements are ANDed.
- type: object
- type: object
- namespaces:
- description: namespaces specifies which namespaces
- the labelSelector applies to (matches against);
- null or empty list means "this pod's namespace"
- items:
- type: string
- type: array
- topologyKey:
- description: This pod should be co-located (affinity)
- or not co-located (anti-affinity) with the pods
- matching the labelSelector in the specified namespaces,
- where co-located is defined as running on a node
- whose value of the label with key topologyKey matches
- that of any node on which any of the selected pods
- is running. Empty topologyKey is not allowed.
- type: string
- required:
- - topologyKey
- type: object
- weight:
- description: weight associated with matching the corresponding
- podAffinityTerm, in the range 1-100.
- format: int32
- type: integer
- required:
- - podAffinityTerm
- - weight
- type: object
- type: array
- requiredDuringSchedulingIgnoredDuringExecution:
- description: If the anti-affinity requirements specified by
- this field are not met at scheduling time, the pod will not
- be scheduled onto the node. If the anti-affinity requirements
- specified by this field cease to be met at some point during
- pod execution (e.g. due to a pod label update), the system
- may or may not try to eventually evict the pod from its node.
- When there are multiple elements, the lists of nodes corresponding
- to each podAffinityTerm are intersected, i.e. all terms must
- be satisfied.
- items:
- description: Defines a set of pods (namely those matching
- the labelSelector relative to the given namespace(s)) that
- this pod should be co-located (affinity) or not co-located
- (anti-affinity) with, where co-located is defined as running
- on a node whose value of the label with key
- matches that of any node on which a pod of the set of pods
- is running
- properties:
- labelSelector:
- description: A label query over a set of resources, in
- this case pods.
- properties:
- matchExpressions:
- description: matchExpressions is a list of label selector
- requirements. The requirements are ANDed.
- items:
- description: A label selector requirement is a selector
- that contains values, a key, and an operator that
- relates the key and values.
- properties:
- key:
- description: key is the label key that the selector
- applies to.
- type: string
- operator:
- description: operator represents a key's relationship
- to a set of values. Valid operators are In,
- NotIn, Exists and DoesNotExist.
- type: string
- values:
- description: values is an array of string values.
- If the operator is In or NotIn, the values
- array must be non-empty. If the operator is
- Exists or DoesNotExist, the values array must
- be empty. This array is replaced during a
- strategic merge patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- matchLabels:
- additionalProperties:
- type: string
- description: matchLabels is a map of {key,value} pairs.
- A single {key,value} in the matchLabels map is equivalent
- to an element of matchExpressions, whose key field
- is "key", the operator is "In", and the values array
- contains only "value". The requirements are ANDed.
- type: object
- type: object
- namespaces:
- description: namespaces specifies which namespaces the
- labelSelector applies to (matches against); null or
- empty list means "this pod's namespace"
- items:
- type: string
- type: array
- topologyKey:
- description: This pod should be co-located (affinity)
- or not co-located (anti-affinity) with the pods matching
- the labelSelector in the specified namespaces, where
- co-located is defined as running on a node whose value
- of the label with key topologyKey matches that of any
- node on which any of the selected pods is running. Empty
- topologyKey is not allowed.
- type: string
- required:
- - topologyKey
- type: object
- type: array
- type: object
- type: object
- baseImage:
- description: Base image that is used to deploy pods, without tag.
- type: string
- configMaps:
- description: 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/.
- items:
- type: string
- type: array
- configSecret:
- description: 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.
- type: string
- containers:
- description: Containers allows injecting additional containers. This
- is meant to allow adding an authentication proxy to an Alertmanager
- pod.
- items:
- description: A single application container that you want to run within
- a pod.
- properties:
- args:
- description: 'Arguments to the entrypoint. The docker image''s
- CMD is used if this is not provided. Variable references $(VAR_NAME)
- are expanded using the container''s environment. If a variable
- cannot be resolved, the reference in the input string will be
- unchanged. The $(VAR_NAME) syntax can be escaped with a double
- $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
- regardless of whether the variable exists or not. Cannot be
- updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'
- items:
- type: string
- type: array
- command:
- description: 'Entrypoint array. Not executed within a shell. The
- docker image''s ENTRYPOINT is used if this is not provided.
- Variable references $(VAR_NAME) are expanded using the container''s
- environment. If a variable cannot be resolved, the reference
- in the input string will be unchanged. The $(VAR_NAME) syntax
- can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references
- will never be expanded, regardless of whether the variable exists
- or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'
- items:
- type: string
- type: array
- env:
- description: List of environment variables to set in the container.
- Cannot be updated.
- items:
- description: EnvVar represents an environment variable present
- in a Container.
- properties:
- name:
- description: Name of the environment variable. Must be a
- C_IDENTIFIER.
- type: string
- value:
- description: 'Variable references $(VAR_NAME) are expanded
- using the previous defined environment variables in the
- container and any service environment variables. If a
- variable cannot be resolved, the reference in the input
- string will be unchanged. The $(VAR_NAME) syntax can be
- escaped with a double $$, ie: $$(VAR_NAME). Escaped references
- will never be expanded, regardless of whether the variable
- exists or not. Defaults to "".'
- type: string
- valueFrom:
- description: Source for the environment variable's value.
- Cannot be used if value is not empty.
- properties:
- configMapKeyRef:
- description: Selects a key of a ConfigMap.
- properties:
- key:
- description: The key to select.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the ConfigMap or its
- key must be defined
- type: boolean
- required:
- - key
- type: object
- fieldRef:
- description: 'Selects a field of the pod: supports metadata.name,
- metadata.namespace, metadata.labels, metadata.annotations,
- spec.nodeName, spec.serviceAccountName, status.hostIP,
- status.podIP, status.podIPs.'
- properties:
- apiVersion:
- description: Version of the schema the FieldPath
- is written in terms of, defaults to "v1".
- type: string
- fieldPath:
- description: Path of the field to select in the
- specified API version.
- type: string
- required:
- - fieldPath
- type: object
- resourceFieldRef:
- description: 'Selects a resource of the container: only
- resources limits and requests (limits.cpu, limits.memory,
- limits.ephemeral-storage, requests.cpu, requests.memory
- and requests.ephemeral-storage) are currently supported.'
- properties:
- containerName:
- description: 'Container name: required for volumes,
- optional for env vars'
- type: string
- divisor:
- description: Specifies the output format of the
- exposed resources, defaults to "1"
- type: string
- resource:
- description: 'Required: resource to select'
- type: string
- required:
- - resource
- type: object
- secretKeyRef:
- description: Selects a key of a secret in the pod's
- namespace
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key
- must be defined
- type: boolean
- required:
- - key
- type: object
- type: object
- required:
- - name
- type: object
- type: array
- envFrom:
- description: List of sources to populate environment variables
- in the container. The keys defined within a source must be a
- C_IDENTIFIER. All invalid keys will be reported as an event
- when the container is starting. When a key exists in multiple
- sources, the value associated with the last source will take
- precedence. Values defined by an Env with a duplicate key will
- take precedence. Cannot be updated.
- items:
- description: EnvFromSource represents the source of a set of
- ConfigMaps
- properties:
- configMapRef:
- description: The ConfigMap to select from
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the ConfigMap must be defined
- type: boolean
- type: object
- prefix:
- description: An optional identifier to prepend to each key
- in the ConfigMap. Must be a C_IDENTIFIER.
- type: string
- secretRef:
- description: The Secret to select from
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret must be defined
- type: boolean
- type: object
- type: object
- type: array
- image:
- description: 'Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images
- This field is optional to allow higher level config management
- to default or override container images in workload controllers
- like Deployments and StatefulSets.'
- type: string
- imagePullPolicy:
- description: 'Image pull policy. One of Always, Never, IfNotPresent.
- Defaults to Always if :latest tag is specified, or IfNotPresent
- otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images'
- type: string
- lifecycle:
- description: Actions that the management system should take in
- response to container lifecycle events. Cannot be updated.
- properties:
- postStart:
- description: 'PostStart is called immediately after a container
- is created. If the handler fails, the container is terminated
- and restarted according to its restart policy. Other management
- of the container blocks until the hook completes. More info:
- https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks'
- properties:
- exec:
- description: One and only one of the following should
- be specified. Exec specifies the action to take.
- properties:
- command:
- description: Command is the command line to execute
- inside the container, the working directory for
- the command is root ('/') in the container's filesystem.
- The command is simply exec'd, it is not run inside
- a shell, so traditional shell instructions ('|',
- etc) won't work. To use a shell, you need to explicitly
- call out to that shell. Exit status of 0 is treated
- as live/healthy and non-zero is unhealthy.
- items:
- type: string
- type: array
- type: object
- httpGet:
- description: HTTPGet specifies the http request to perform.
- properties:
- host:
- description: Host name to connect to, defaults to
- the pod IP. You probably want to set "Host" in httpHeaders
- instead.
- type: string
- httpHeaders:
- description: Custom headers to set in the request.
- HTTP allows repeated headers.
- items:
- description: HTTPHeader describes a custom header
- to be used in HTTP probes
- properties:
- name:
- description: The header field name
- type: string
- value:
- description: The header field value
- type: string
- required:
- - name
- - value
- type: object
- type: array
- path:
- description: Path to access on the HTTP server.
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Name or number of the port to access
- on the container. Number must be in the range 1
- to 65535. Name must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- scheme:
- description: Scheme to use for connecting to the host.
- Defaults to HTTP.
- type: string
- required:
- - port
- type: object
- tcpSocket:
- description: 'TCPSocket specifies an action involving
- a TCP port. TCP hooks not yet supported TODO: implement
- a realistic TCP lifecycle hook'
- properties:
- host:
- description: 'Optional: Host name to connect to, defaults
- to the pod IP.'
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Number or name of the port to access
- on the container. Number must be in the range 1
- to 65535. Name must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- required:
- - port
- type: object
- type: object
- preStop:
- description: 'PreStop is called immediately before a container
- is terminated due to an API request or management event
- such as liveness/startup probe failure, preemption, resource
- contention, etc. The handler is not called if the container
- crashes or exits. The reason for termination is passed to
- the handler. The Pod''s termination grace period countdown
- begins before the PreStop hooked is executed. Regardless
- of the outcome of the handler, the container will eventually
- terminate within the Pod''s termination grace period. Other
- management of the container blocks until the hook completes
- or until the termination grace period is reached. More info:
- https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks'
- properties:
- exec:
- description: One and only one of the following should
- be specified. Exec specifies the action to take.
- properties:
- command:
- description: Command is the command line to execute
- inside the container, the working directory for
- the command is root ('/') in the container's filesystem.
- The command is simply exec'd, it is not run inside
- a shell, so traditional shell instructions ('|',
- etc) won't work. To use a shell, you need to explicitly
- call out to that shell. Exit status of 0 is treated
- as live/healthy and non-zero is unhealthy.
- items:
- type: string
- type: array
- type: object
- httpGet:
- description: HTTPGet specifies the http request to perform.
- properties:
- host:
- description: Host name to connect to, defaults to
- the pod IP. You probably want to set "Host" in httpHeaders
- instead.
- type: string
- httpHeaders:
- description: Custom headers to set in the request.
- HTTP allows repeated headers.
- items:
- description: HTTPHeader describes a custom header
- to be used in HTTP probes
- properties:
- name:
- description: The header field name
- type: string
- value:
- description: The header field value
- type: string
- required:
- - name
- - value
- type: object
- type: array
- path:
- description: Path to access on the HTTP server.
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Name or number of the port to access
- on the container. Number must be in the range 1
- to 65535. Name must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- scheme:
- description: Scheme to use for connecting to the host.
- Defaults to HTTP.
- type: string
- required:
- - port
- type: object
- tcpSocket:
- description: 'TCPSocket specifies an action involving
- a TCP port. TCP hooks not yet supported TODO: implement
- a realistic TCP lifecycle hook'
- properties:
- host:
- description: 'Optional: Host name to connect to, defaults
- to the pod IP.'
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Number or name of the port to access
- on the container. Number must be in the range 1
- to 65535. Name must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- required:
- - port
- type: object
- type: object
- type: object
- livenessProbe:
- description: 'Periodic probe of container liveness. Container
- will be restarted if the probe fails. Cannot be updated. More
- info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- properties:
- exec:
- description: One and only one of the following should be specified.
- Exec specifies the action to take.
- properties:
- command:
- description: Command is the command line to execute inside
- the container, the working directory for the command is
- root ('/') in the container's filesystem. The command
- is simply exec'd, it is not run inside a shell, so traditional
- shell instructions ('|', etc) won't work. To use a shell,
- you need to explicitly call out to that shell. Exit
- status of 0 is treated as live/healthy and non-zero
- is unhealthy.
- items:
- type: string
- type: array
- type: object
- failureThreshold:
- description: Minimum consecutive failures for the probe to
- be considered failed after having succeeded. Defaults to
- 3. Minimum value is 1.
- format: int32
- type: integer
- httpGet:
- description: HTTPGet specifies the http request to perform.
- properties:
- host:
- description: Host name to connect to, defaults to the
- pod IP. You probably want to set "Host" in httpHeaders
- instead.
- type: string
- httpHeaders:
- description: Custom headers to set in the request. HTTP
- allows repeated headers.
- items:
- description: HTTPHeader describes a custom header to
- be used in HTTP probes
- properties:
- name:
- description: The header field name
- type: string
- value:
- description: The header field value
- type: string
- required:
- - name
- - value
- type: object
- type: array
- path:
- description: Path to access on the HTTP server.
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Name or number of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- scheme:
- description: Scheme to use for connecting to the host.
- Defaults to HTTP.
- type: string
- required:
- - port
- type: object
- initialDelaySeconds:
- description: 'Number of seconds after the container has started
- before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- periodSeconds:
- description: How often (in seconds) to perform the probe.
- Default to 10 seconds. Minimum value is 1.
- format: int32
- type: integer
- successThreshold:
- description: Minimum consecutive successes for the probe to
- be considered successful after having failed. Defaults to
- 1. Must be 1 for liveness and startup. Minimum value is
- 1.
- format: int32
- type: integer
- tcpSocket:
- description: 'TCPSocket specifies an action involving a TCP
- port. TCP hooks not yet supported TODO: implement a realistic
- TCP lifecycle hook'
- properties:
- host:
- description: 'Optional: Host name to connect to, defaults
- to the pod IP.'
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Number or name of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- required:
- - port
- type: object
- timeoutSeconds:
- description: 'Number of seconds after which the probe times
- out. Defaults to 1 second. Minimum value is 1. More info:
- https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- type: object
- name:
- description: Name of the container specified as a DNS_LABEL. Each
- container in a pod must have a unique name (DNS_LABEL). Cannot
- be updated.
- type: string
- ports:
- description: List of ports to expose from the container. Exposing
- a port here gives the system additional information about the
- network connections a container uses, but is primarily informational.
- Not specifying a port here DOES NOT prevent that port from being
- exposed. Any port which is listening on the default "0.0.0.0"
- address inside a container will be accessible from the network.
- Cannot be updated.
- items:
- description: ContainerPort represents a network port in a single
- container.
- properties:
- containerPort:
- description: Number of port to expose on the pod's IP address.
- This must be a valid port number, 0 < x < 65536.
- format: int32
- type: integer
- hostIP:
- description: What host IP to bind the external port to.
- type: string
- hostPort:
- description: Number of port to expose on the host. If specified,
- this must be a valid port number, 0 < x < 65536. If HostNetwork
- is specified, this must match ContainerPort. Most containers
- do not need this.
- format: int32
- type: integer
- name:
- description: If specified, this must be an IANA_SVC_NAME
- and unique within the pod. Each named port in a pod must
- have a unique name. Name for the port that can be referred
- to by services.
- type: string
- protocol:
- description: Protocol for port. Must be UDP, TCP, or SCTP.
- Defaults to "TCP".
- type: string
- required:
- - containerPort
- type: object
- type: array
- readinessProbe:
- description: 'Periodic probe of container service readiness. Container
- will be removed from service endpoints if the probe fails. Cannot
- be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- properties:
- exec:
- description: One and only one of the following should be specified.
- Exec specifies the action to take.
- properties:
- command:
- description: Command is the command line to execute inside
- the container, the working directory for the command is
- root ('/') in the container's filesystem. The command
- is simply exec'd, it is not run inside a shell, so traditional
- shell instructions ('|', etc) won't work. To use a shell,
- you need to explicitly call out to that shell. Exit
- status of 0 is treated as live/healthy and non-zero
- is unhealthy.
- items:
- type: string
- type: array
- type: object
- failureThreshold:
- description: Minimum consecutive failures for the probe to
- be considered failed after having succeeded. Defaults to
- 3. Minimum value is 1.
- format: int32
- type: integer
- httpGet:
- description: HTTPGet specifies the http request to perform.
- properties:
- host:
- description: Host name to connect to, defaults to the
- pod IP. You probably want to set "Host" in httpHeaders
- instead.
- type: string
- httpHeaders:
- description: Custom headers to set in the request. HTTP
- allows repeated headers.
- items:
- description: HTTPHeader describes a custom header to
- be used in HTTP probes
- properties:
- name:
- description: The header field name
- type: string
- value:
- description: The header field value
- type: string
- required:
- - name
- - value
- type: object
- type: array
- path:
- description: Path to access on the HTTP server.
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Name or number of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- scheme:
- description: Scheme to use for connecting to the host.
- Defaults to HTTP.
- type: string
- required:
- - port
- type: object
- initialDelaySeconds:
- description: 'Number of seconds after the container has started
- before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- periodSeconds:
- description: How often (in seconds) to perform the probe.
- Default to 10 seconds. Minimum value is 1.
- format: int32
- type: integer
- successThreshold:
- description: Minimum consecutive successes for the probe to
- be considered successful after having failed. Defaults to
- 1. Must be 1 for liveness and startup. Minimum value is
- 1.
- format: int32
- type: integer
- tcpSocket:
- description: 'TCPSocket specifies an action involving a TCP
- port. TCP hooks not yet supported TODO: implement a realistic
- TCP lifecycle hook'
- properties:
- host:
- description: 'Optional: Host name to connect to, defaults
- to the pod IP.'
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Number or name of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- required:
- - port
- type: object
- timeoutSeconds:
- description: 'Number of seconds after which the probe times
- out. Defaults to 1 second. Minimum value is 1. More info:
- https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- type: object
- resources:
- description: 'Compute Resources required by this container. Cannot
- be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
- properties:
- limits:
- additionalProperties:
- type: string
- description: 'Limits describes the maximum amount of compute
- resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
- type: object
- requests:
- additionalProperties:
- type: string
- description: 'Requests describes the minimum amount of compute
- resources required. If Requests is omitted for a container,
- it defaults to Limits if that is explicitly specified, otherwise
- to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
- type: object
- type: object
- securityContext:
- description: 'Security options the pod should run with. More info:
- https://kubernetes.io/docs/concepts/policy/security-context/
- More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/'
- properties:
- allowPrivilegeEscalation:
- description: 'AllowPrivilegeEscalation controls whether a
- process can gain more privileges than its parent process.
- This bool directly controls if the no_new_privs flag will
- be set on the container process. AllowPrivilegeEscalation
- is true always when the container is: 1) run as Privileged
- 2) has CAP_SYS_ADMIN'
- type: boolean
- capabilities:
- description: The capabilities to add/drop when running containers.
- Defaults to the default set of capabilities granted by the
- container runtime.
- properties:
- add:
- description: Added capabilities
- items:
- description: Capability represent POSIX capabilities
- type
- type: string
- type: array
- drop:
- description: Removed capabilities
- items:
- description: Capability represent POSIX capabilities
- type
- type: string
- type: array
- type: object
- privileged:
- description: Run container in privileged mode. Processes in
- privileged containers are essentially equivalent to root
- on the host. Defaults to false.
- type: boolean
- procMount:
- description: procMount denotes the type of proc mount to use
- for the containers. The default is DefaultProcMount which
- uses the container runtime defaults for readonly paths and
- masked paths. This requires the ProcMountType feature flag
- to be enabled.
- type: string
- readOnlyRootFilesystem:
- description: Whether this container has a read-only root filesystem.
- Default is false.
- type: boolean
- runAsGroup:
- description: The GID to run the entrypoint of the container
- process. Uses runtime default if unset. May also be set
- in PodSecurityContext. If set in both SecurityContext and
- PodSecurityContext, the value specified in SecurityContext
- takes precedence.
- format: int64
- type: integer
- runAsNonRoot:
- description: Indicates that the container must run as a non-root
- user. If true, the Kubelet will validate the image at runtime
- to ensure that it does not run as UID 0 (root) and fail
- to start the container if it does. If unset or false, no
- such validation will be performed. May also be set in PodSecurityContext. If
- set in both SecurityContext and PodSecurityContext, the
- value specified in SecurityContext takes precedence.
- type: boolean
- runAsUser:
- description: The UID to run the entrypoint of the container
- process. Defaults to user specified in image metadata if
- unspecified. May also be set in PodSecurityContext. If
- set in both SecurityContext and PodSecurityContext, the
- value specified in SecurityContext takes precedence.
- format: int64
- type: integer
- seLinuxOptions:
- description: The SELinux context to be applied to the container.
- If unspecified, the container runtime will allocate a random
- SELinux context for each container. May also be set in
- PodSecurityContext. If set in both SecurityContext and
- PodSecurityContext, the value specified in SecurityContext
- takes precedence.
- properties:
- level:
- description: Level is SELinux level label that applies
- to the container.
- type: string
- role:
- description: Role is a SELinux role label that applies
- to the container.
- type: string
- type:
- description: Type is a SELinux type label that applies
- to the container.
- type: string
- user:
- description: User is a SELinux user label that applies
- to the container.
- type: string
- type: object
- windowsOptions:
- description: The Windows specific settings applied to all
- containers. If unspecified, the options from the PodSecurityContext
- will be used. If set in both SecurityContext and PodSecurityContext,
- the value specified in SecurityContext takes precedence.
- properties:
- gmsaCredentialSpec:
- description: GMSACredentialSpec is where the GMSA admission
- webhook (https://github.com/kubernetes-sigs/windows-gmsa)
- inlines the contents of the GMSA credential spec named
- by the GMSACredentialSpecName field. This field is alpha-level
- and is only honored by servers that enable the WindowsGMSA
- feature flag.
- type: string
- gmsaCredentialSpecName:
- description: GMSACredentialSpecName is the name of the
- GMSA credential spec to use. This field is alpha-level
- and is only honored by servers that enable the WindowsGMSA
- feature flag.
- type: string
- runAsUserName:
- description: The UserName in Windows to run the entrypoint
- of the container process. Defaults to the user specified
- in image metadata if unspecified. May also be set in
- PodSecurityContext. If set in both SecurityContext and
- PodSecurityContext, the value specified in SecurityContext
- takes precedence. This field is beta-level and may be
- disabled with the WindowsRunAsUserName feature flag.
- type: string
- type: object
- type: object
- startupProbe:
- description: 'StartupProbe indicates that the Pod has successfully
- initialized. If specified, no other probes are executed until
- this completes successfully. If this probe fails, the Pod will
- be restarted, just as if the livenessProbe failed. This can
- be used to provide different probe parameters at the beginning
- of a Pod''s lifecycle, when it might take a long time to load
- data or warm a cache, than during steady-state operation. This
- cannot be updated. This is an alpha feature enabled by the StartupProbe
- feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- properties:
- exec:
- description: One and only one of the following should be specified.
- Exec specifies the action to take.
- properties:
- command:
- description: Command is the command line to execute inside
- the container, the working directory for the command is
- root ('/') in the container's filesystem. The command
- is simply exec'd, it is not run inside a shell, so traditional
- shell instructions ('|', etc) won't work. To use a shell,
- you need to explicitly call out to that shell. Exit
- status of 0 is treated as live/healthy and non-zero
- is unhealthy.
- items:
- type: string
- type: array
- type: object
- failureThreshold:
- description: Minimum consecutive failures for the probe to
- be considered failed after having succeeded. Defaults to
- 3. Minimum value is 1.
- format: int32
- type: integer
- httpGet:
- description: HTTPGet specifies the http request to perform.
- properties:
- host:
- description: Host name to connect to, defaults to the
- pod IP. You probably want to set "Host" in httpHeaders
- instead.
- type: string
- httpHeaders:
- description: Custom headers to set in the request. HTTP
- allows repeated headers.
- items:
- description: HTTPHeader describes a custom header to
- be used in HTTP probes
- properties:
- name:
- description: The header field name
- type: string
- value:
- description: The header field value
- type: string
- required:
- - name
- - value
- type: object
- type: array
- path:
- description: Path to access on the HTTP server.
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Name or number of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- scheme:
- description: Scheme to use for connecting to the host.
- Defaults to HTTP.
- type: string
- required:
- - port
- type: object
- initialDelaySeconds:
- description: 'Number of seconds after the container has started
- before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- periodSeconds:
- description: How often (in seconds) to perform the probe.
- Default to 10 seconds. Minimum value is 1.
- format: int32
- type: integer
- successThreshold:
- description: Minimum consecutive successes for the probe to
- be considered successful after having failed. Defaults to
- 1. Must be 1 for liveness and startup. Minimum value is
- 1.
- format: int32
- type: integer
- tcpSocket:
- description: 'TCPSocket specifies an action involving a TCP
- port. TCP hooks not yet supported TODO: implement a realistic
- TCP lifecycle hook'
- properties:
- host:
- description: 'Optional: Host name to connect to, defaults
- to the pod IP.'
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Number or name of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- required:
- - port
- type: object
- timeoutSeconds:
- description: 'Number of seconds after which the probe times
- out. Defaults to 1 second. Minimum value is 1. More info:
- https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- type: object
- stdin:
- description: Whether this container should allocate a buffer for
- stdin in the container runtime. If this is not set, reads from
- stdin in the container will always result in EOF. Default is
- false.
- type: boolean
- stdinOnce:
- description: Whether the container runtime should close the stdin
- channel after it has been opened by a single attach. When stdin
- is true the stdin stream will remain open across multiple attach
- sessions. If stdinOnce is set to true, stdin is opened on container
- start, is empty until the first client attaches to stdin, and
- then remains open and accepts data until the client disconnects,
- at which time stdin is closed and remains closed until the container
- is restarted. If this flag is false, a container processes that
- reads from stdin will never receive an EOF. Default is false
- type: boolean
- terminationMessagePath:
- description: 'Optional: Path at which the file to which the container''s
- termination message will be written is mounted into the container''s
- filesystem. Message written is intended to be brief final status,
- such as an assertion failure message. Will be truncated by the
- node if greater than 4096 bytes. The total message length across
- all containers will be limited to 12kb. Defaults to /dev/termination-log.
- Cannot be updated.'
- type: string
- terminationMessagePolicy:
- description: Indicate how the termination message should be populated.
- File will use the contents of terminationMessagePath to populate
- the container status message on both success and failure. FallbackToLogsOnError
- will use the last chunk of container log output if the termination
- message file is empty and the container exited with an error.
- The log output is limited to 2048 bytes or 80 lines, whichever
- is smaller. Defaults to File. Cannot be updated.
- type: string
- tty:
- description: Whether this container should allocate a TTY for
- itself, also requires 'stdin' to be true. Default is false.
- type: boolean
- volumeDevices:
- description: volumeDevices is the list of block devices to be
- used by the container. This is a beta feature.
- items:
- description: volumeDevice describes a mapping of a raw block
- device within a container.
- properties:
- devicePath:
- description: devicePath is the path inside of the container
- that the device will be mapped to.
- type: string
- name:
- description: name must match the name of a persistentVolumeClaim
- in the pod
- type: string
- required:
- - devicePath
- - name
- type: object
- type: array
- volumeMounts:
- description: Pod volumes to mount into the container's filesystem.
- Cannot be updated.
- items:
- description: VolumeMount describes a mounting of a Volume within
- a container.
- properties:
- mountPath:
- description: Path within the container at which the volume
- should be mounted. Must not contain ':'.
- type: string
- mountPropagation:
- description: mountPropagation determines how mounts are
- propagated from the host to container and the other way
- around. When not set, MountPropagationNone is used. This
- field is beta in 1.10.
- type: string
- name:
- description: This must match the Name of a Volume.
- type: string
- readOnly:
- description: Mounted read-only if true, read-write otherwise
- (false or unspecified). Defaults to false.
- type: boolean
- subPath:
- description: Path within the volume from which the container's
- volume should be mounted. Defaults to "" (volume's root).
- type: string
- subPathExpr:
- description: Expanded path within the volume from which
- the container's volume should be mounted. Behaves similarly
- to SubPath but environment variable references $(VAR_NAME)
- are expanded using the container's environment. Defaults
- to "" (volume's root). SubPathExpr and SubPath are mutually
- exclusive.
- type: string
- required:
- - mountPath
- - name
- type: object
- type: array
- workingDir:
- description: Container's working directory. If not specified,
- the container runtime's default will be used, which might be
- configured in the container image. Cannot be updated.
- type: string
- required:
- - name
- type: object
- type: array
- externalUrl:
- description: 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.
- type: string
- image:
- description: Image if specified has precedence over baseImage, tag and
- sha combinations. Specifying the version is still necessary to ensure
- the Prometheus Operator knows what version of Alertmanager is being
- configured.
- type: string
- imagePullSecrets:
- description: An optional list of references to secrets in the same namespace
- to use for pulling prometheus and alertmanager images from registries
- see http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod
- items:
- description: LocalObjectReference contains enough information to let
- you locate the referenced object inside the same namespace.
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- type: object
- type: array
- initContainers:
- description: 'InitContainers allows adding initContainers to the pod
- definition. Those can be used to e.g. fetch secrets for injection
- into the Alertmanager configuration from external sources. Any errors
- during the execution of an initContainer will lead to a restart of
- the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
- Using initContainers for any use case other then secret fetching is
- entirely outside the scope of what the maintainers will support and
- by doing so, you accept that this behaviour may break at any time
- without notice.'
- items:
- description: A single application container that you want to run within
- a pod.
- properties:
- args:
- description: 'Arguments to the entrypoint. The docker image''s
- CMD is used if this is not provided. Variable references $(VAR_NAME)
- are expanded using the container''s environment. If a variable
- cannot be resolved, the reference in the input string will be
- unchanged. The $(VAR_NAME) syntax can be escaped with a double
- $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
- regardless of whether the variable exists or not. Cannot be
- updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'
- items:
- type: string
- type: array
- command:
- description: 'Entrypoint array. Not executed within a shell. The
- docker image''s ENTRYPOINT is used if this is not provided.
- Variable references $(VAR_NAME) are expanded using the container''s
- environment. If a variable cannot be resolved, the reference
- in the input string will be unchanged. The $(VAR_NAME) syntax
- can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references
- will never be expanded, regardless of whether the variable exists
- or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'
- items:
- type: string
- type: array
- env:
- description: List of environment variables to set in the container.
- Cannot be updated.
- items:
- description: EnvVar represents an environment variable present
- in a Container.
- properties:
- name:
- description: Name of the environment variable. Must be a
- C_IDENTIFIER.
- type: string
- value:
- description: 'Variable references $(VAR_NAME) are expanded
- using the previous defined environment variables in the
- container and any service environment variables. If a
- variable cannot be resolved, the reference in the input
- string will be unchanged. The $(VAR_NAME) syntax can be
- escaped with a double $$, ie: $$(VAR_NAME). Escaped references
- will never be expanded, regardless of whether the variable
- exists or not. Defaults to "".'
- type: string
- valueFrom:
- description: Source for the environment variable's value.
- Cannot be used if value is not empty.
- properties:
- configMapKeyRef:
- description: Selects a key of a ConfigMap.
- properties:
- key:
- description: The key to select.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the ConfigMap or its
- key must be defined
- type: boolean
- required:
- - key
- type: object
- fieldRef:
- description: 'Selects a field of the pod: supports metadata.name,
- metadata.namespace, metadata.labels, metadata.annotations,
- spec.nodeName, spec.serviceAccountName, status.hostIP,
- status.podIP, status.podIPs.'
- properties:
- apiVersion:
- description: Version of the schema the FieldPath
- is written in terms of, defaults to "v1".
- type: string
- fieldPath:
- description: Path of the field to select in the
- specified API version.
- type: string
- required:
- - fieldPath
- type: object
- resourceFieldRef:
- description: 'Selects a resource of the container: only
- resources limits and requests (limits.cpu, limits.memory,
- limits.ephemeral-storage, requests.cpu, requests.memory
- and requests.ephemeral-storage) are currently supported.'
- properties:
- containerName:
- description: 'Container name: required for volumes,
- optional for env vars'
- type: string
- divisor:
- description: Specifies the output format of the
- exposed resources, defaults to "1"
- type: string
- resource:
- description: 'Required: resource to select'
- type: string
- required:
- - resource
- type: object
- secretKeyRef:
- description: Selects a key of a secret in the pod's
- namespace
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key
- must be defined
- type: boolean
- required:
- - key
- type: object
- type: object
- required:
- - name
- type: object
- type: array
- envFrom:
- description: List of sources to populate environment variables
- in the container. The keys defined within a source must be a
- C_IDENTIFIER. All invalid keys will be reported as an event
- when the container is starting. When a key exists in multiple
- sources, the value associated with the last source will take
- precedence. Values defined by an Env with a duplicate key will
- take precedence. Cannot be updated.
- items:
- description: EnvFromSource represents the source of a set of
- ConfigMaps
- properties:
- configMapRef:
- description: The ConfigMap to select from
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the ConfigMap must be defined
- type: boolean
- type: object
- prefix:
- description: An optional identifier to prepend to each key
- in the ConfigMap. Must be a C_IDENTIFIER.
- type: string
- secretRef:
- description: The Secret to select from
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret must be defined
- type: boolean
- type: object
- type: object
- type: array
- image:
- description: 'Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images
- This field is optional to allow higher level config management
- to default or override container images in workload controllers
- like Deployments and StatefulSets.'
- type: string
- imagePullPolicy:
- description: 'Image pull policy. One of Always, Never, IfNotPresent.
- Defaults to Always if :latest tag is specified, or IfNotPresent
- otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images'
- type: string
- lifecycle:
- description: Actions that the management system should take in
- response to container lifecycle events. Cannot be updated.
- properties:
- postStart:
- description: 'PostStart is called immediately after a container
- is created. If the handler fails, the container is terminated
- and restarted according to its restart policy. Other management
- of the container blocks until the hook completes. More info:
- https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks'
- properties:
- exec:
- description: One and only one of the following should
- be specified. Exec specifies the action to take.
- properties:
- command:
- description: Command is the command line to execute
- inside the container, the working directory for
- the command is root ('/') in the container's filesystem.
- The command is simply exec'd, it is not run inside
- a shell, so traditional shell instructions ('|',
- etc) won't work. To use a shell, you need to explicitly
- call out to that shell. Exit status of 0 is treated
- as live/healthy and non-zero is unhealthy.
- items:
- type: string
- type: array
- type: object
- httpGet:
- description: HTTPGet specifies the http request to perform.
- properties:
- host:
- description: Host name to connect to, defaults to
- the pod IP. You probably want to set "Host" in httpHeaders
- instead.
- type: string
- httpHeaders:
- description: Custom headers to set in the request.
- HTTP allows repeated headers.
- items:
- description: HTTPHeader describes a custom header
- to be used in HTTP probes
- properties:
- name:
- description: The header field name
- type: string
- value:
- description: The header field value
- type: string
- required:
- - name
- - value
- type: object
- type: array
- path:
- description: Path to access on the HTTP server.
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Name or number of the port to access
- on the container. Number must be in the range 1
- to 65535. Name must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- scheme:
- description: Scheme to use for connecting to the host.
- Defaults to HTTP.
- type: string
- required:
- - port
- type: object
- tcpSocket:
- description: 'TCPSocket specifies an action involving
- a TCP port. TCP hooks not yet supported TODO: implement
- a realistic TCP lifecycle hook'
- properties:
- host:
- description: 'Optional: Host name to connect to, defaults
- to the pod IP.'
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Number or name of the port to access
- on the container. Number must be in the range 1
- to 65535. Name must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- required:
- - port
- type: object
- type: object
- preStop:
- description: 'PreStop is called immediately before a container
- is terminated due to an API request or management event
- such as liveness/startup probe failure, preemption, resource
- contention, etc. The handler is not called if the container
- crashes or exits. The reason for termination is passed to
- the handler. The Pod''s termination grace period countdown
- begins before the PreStop hooked is executed. Regardless
- of the outcome of the handler, the container will eventually
- terminate within the Pod''s termination grace period. Other
- management of the container blocks until the hook completes
- or until the termination grace period is reached. More info:
- https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks'
- properties:
- exec:
- description: One and only one of the following should
- be specified. Exec specifies the action to take.
- properties:
- command:
- description: Command is the command line to execute
- inside the container, the working directory for
- the command is root ('/') in the container's filesystem.
- The command is simply exec'd, it is not run inside
- a shell, so traditional shell instructions ('|',
- etc) won't work. To use a shell, you need to explicitly
- call out to that shell. Exit status of 0 is treated
- as live/healthy and non-zero is unhealthy.
- items:
- type: string
- type: array
- type: object
- httpGet:
- description: HTTPGet specifies the http request to perform.
- properties:
- host:
- description: Host name to connect to, defaults to
- the pod IP. You probably want to set "Host" in httpHeaders
- instead.
- type: string
- httpHeaders:
- description: Custom headers to set in the request.
- HTTP allows repeated headers.
- items:
- description: HTTPHeader describes a custom header
- to be used in HTTP probes
- properties:
- name:
- description: The header field name
- type: string
- value:
- description: The header field value
- type: string
- required:
- - name
- - value
- type: object
- type: array
- path:
- description: Path to access on the HTTP server.
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Name or number of the port to access
- on the container. Number must be in the range 1
- to 65535. Name must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- scheme:
- description: Scheme to use for connecting to the host.
- Defaults to HTTP.
- type: string
- required:
- - port
- type: object
- tcpSocket:
- description: 'TCPSocket specifies an action involving
- a TCP port. TCP hooks not yet supported TODO: implement
- a realistic TCP lifecycle hook'
- properties:
- host:
- description: 'Optional: Host name to connect to, defaults
- to the pod IP.'
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Number or name of the port to access
- on the container. Number must be in the range 1
- to 65535. Name must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- required:
- - port
- type: object
- type: object
- type: object
- livenessProbe:
- description: 'Periodic probe of container liveness. Container
- will be restarted if the probe fails. Cannot be updated. More
- info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- properties:
- exec:
- description: One and only one of the following should be specified.
- Exec specifies the action to take.
- properties:
- command:
- description: Command is the command line to execute inside
- the container, the working directory for the command is
- root ('/') in the container's filesystem. The command
- is simply exec'd, it is not run inside a shell, so traditional
- shell instructions ('|', etc) won't work. To use a shell,
- you need to explicitly call out to that shell. Exit
- status of 0 is treated as live/healthy and non-zero
- is unhealthy.
- items:
- type: string
- type: array
- type: object
- failureThreshold:
- description: Minimum consecutive failures for the probe to
- be considered failed after having succeeded. Defaults to
- 3. Minimum value is 1.
- format: int32
- type: integer
- httpGet:
- description: HTTPGet specifies the http request to perform.
- properties:
- host:
- description: Host name to connect to, defaults to the
- pod IP. You probably want to set "Host" in httpHeaders
- instead.
- type: string
- httpHeaders:
- description: Custom headers to set in the request. HTTP
- allows repeated headers.
- items:
- description: HTTPHeader describes a custom header to
- be used in HTTP probes
- properties:
- name:
- description: The header field name
- type: string
- value:
- description: The header field value
- type: string
- required:
- - name
- - value
- type: object
- type: array
- path:
- description: Path to access on the HTTP server.
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Name or number of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- scheme:
- description: Scheme to use for connecting to the host.
- Defaults to HTTP.
- type: string
- required:
- - port
- type: object
- initialDelaySeconds:
- description: 'Number of seconds after the container has started
- before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- periodSeconds:
- description: How often (in seconds) to perform the probe.
- Default to 10 seconds. Minimum value is 1.
- format: int32
- type: integer
- successThreshold:
- description: Minimum consecutive successes for the probe to
- be considered successful after having failed. Defaults to
- 1. Must be 1 for liveness and startup. Minimum value is
- 1.
- format: int32
- type: integer
- tcpSocket:
- description: 'TCPSocket specifies an action involving a TCP
- port. TCP hooks not yet supported TODO: implement a realistic
- TCP lifecycle hook'
- properties:
- host:
- description: 'Optional: Host name to connect to, defaults
- to the pod IP.'
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Number or name of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- required:
- - port
- type: object
- timeoutSeconds:
- description: 'Number of seconds after which the probe times
- out. Defaults to 1 second. Minimum value is 1. More info:
- https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- type: object
- name:
- description: Name of the container specified as a DNS_LABEL. Each
- container in a pod must have a unique name (DNS_LABEL). Cannot
- be updated.
- type: string
- ports:
- description: List of ports to expose from the container. Exposing
- a port here gives the system additional information about the
- network connections a container uses, but is primarily informational.
- Not specifying a port here DOES NOT prevent that port from being
- exposed. Any port which is listening on the default "0.0.0.0"
- address inside a container will be accessible from the network.
- Cannot be updated.
- items:
- description: ContainerPort represents a network port in a single
- container.
- properties:
- containerPort:
- description: Number of port to expose on the pod's IP address.
- This must be a valid port number, 0 < x < 65536.
- format: int32
- type: integer
- hostIP:
- description: What host IP to bind the external port to.
- type: string
- hostPort:
- description: Number of port to expose on the host. If specified,
- this must be a valid port number, 0 < x < 65536. If HostNetwork
- is specified, this must match ContainerPort. Most containers
- do not need this.
- format: int32
- type: integer
- name:
- description: If specified, this must be an IANA_SVC_NAME
- and unique within the pod. Each named port in a pod must
- have a unique name. Name for the port that can be referred
- to by services.
- type: string
- protocol:
- description: Protocol for port. Must be UDP, TCP, or SCTP.
- Defaults to "TCP".
- type: string
- required:
- - containerPort
- type: object
- type: array
- readinessProbe:
- description: 'Periodic probe of container service readiness. Container
- will be removed from service endpoints if the probe fails. Cannot
- be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- properties:
- exec:
- description: One and only one of the following should be specified.
- Exec specifies the action to take.
- properties:
- command:
- description: Command is the command line to execute inside
- the container, the working directory for the command is
- root ('/') in the container's filesystem. The command
- is simply exec'd, it is not run inside a shell, so traditional
- shell instructions ('|', etc) won't work. To use a shell,
- you need to explicitly call out to that shell. Exit
- status of 0 is treated as live/healthy and non-zero
- is unhealthy.
- items:
- type: string
- type: array
- type: object
- failureThreshold:
- description: Minimum consecutive failures for the probe to
- be considered failed after having succeeded. Defaults to
- 3. Minimum value is 1.
- format: int32
- type: integer
- httpGet:
- description: HTTPGet specifies the http request to perform.
- properties:
- host:
- description: Host name to connect to, defaults to the
- pod IP. You probably want to set "Host" in httpHeaders
- instead.
- type: string
- httpHeaders:
- description: Custom headers to set in the request. HTTP
- allows repeated headers.
- items:
- description: HTTPHeader describes a custom header to
- be used in HTTP probes
- properties:
- name:
- description: The header field name
- type: string
- value:
- description: The header field value
- type: string
- required:
- - name
- - value
- type: object
- type: array
- path:
- description: Path to access on the HTTP server.
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Name or number of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- scheme:
- description: Scheme to use for connecting to the host.
- Defaults to HTTP.
- type: string
- required:
- - port
- type: object
- initialDelaySeconds:
- description: 'Number of seconds after the container has started
- before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- periodSeconds:
- description: How often (in seconds) to perform the probe.
- Default to 10 seconds. Minimum value is 1.
- format: int32
- type: integer
- successThreshold:
- description: Minimum consecutive successes for the probe to
- be considered successful after having failed. Defaults to
- 1. Must be 1 for liveness and startup. Minimum value is
- 1.
- format: int32
- type: integer
- tcpSocket:
- description: 'TCPSocket specifies an action involving a TCP
- port. TCP hooks not yet supported TODO: implement a realistic
- TCP lifecycle hook'
- properties:
- host:
- description: 'Optional: Host name to connect to, defaults
- to the pod IP.'
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Number or name of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- required:
- - port
- type: object
- timeoutSeconds:
- description: 'Number of seconds after which the probe times
- out. Defaults to 1 second. Minimum value is 1. More info:
- https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- type: object
- resources:
- description: 'Compute Resources required by this container. Cannot
- be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
- properties:
- limits:
- additionalProperties:
- type: string
- description: 'Limits describes the maximum amount of compute
- resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
- type: object
- requests:
- additionalProperties:
- type: string
- description: 'Requests describes the minimum amount of compute
- resources required. If Requests is omitted for a container,
- it defaults to Limits if that is explicitly specified, otherwise
- to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
- type: object
- type: object
- securityContext:
- description: 'Security options the pod should run with. More info:
- https://kubernetes.io/docs/concepts/policy/security-context/
- More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/'
- properties:
- allowPrivilegeEscalation:
- description: 'AllowPrivilegeEscalation controls whether a
- process can gain more privileges than its parent process.
- This bool directly controls if the no_new_privs flag will
- be set on the container process. AllowPrivilegeEscalation
- is true always when the container is: 1) run as Privileged
- 2) has CAP_SYS_ADMIN'
- type: boolean
- capabilities:
- description: The capabilities to add/drop when running containers.
- Defaults to the default set of capabilities granted by the
- container runtime.
- properties:
- add:
- description: Added capabilities
- items:
- description: Capability represent POSIX capabilities
- type
- type: string
- type: array
- drop:
- description: Removed capabilities
- items:
- description: Capability represent POSIX capabilities
- type
- type: string
- type: array
- type: object
- privileged:
- description: Run container in privileged mode. Processes in
- privileged containers are essentially equivalent to root
- on the host. Defaults to false.
- type: boolean
- procMount:
- description: procMount denotes the type of proc mount to use
- for the containers. The default is DefaultProcMount which
- uses the container runtime defaults for readonly paths and
- masked paths. This requires the ProcMountType feature flag
- to be enabled.
- type: string
- readOnlyRootFilesystem:
- description: Whether this container has a read-only root filesystem.
- Default is false.
- type: boolean
- runAsGroup:
- description: The GID to run the entrypoint of the container
- process. Uses runtime default if unset. May also be set
- in PodSecurityContext. If set in both SecurityContext and
- PodSecurityContext, the value specified in SecurityContext
- takes precedence.
- format: int64
- type: integer
- runAsNonRoot:
- description: Indicates that the container must run as a non-root
- user. If true, the Kubelet will validate the image at runtime
- to ensure that it does not run as UID 0 (root) and fail
- to start the container if it does. If unset or false, no
- such validation will be performed. May also be set in PodSecurityContext. If
- set in both SecurityContext and PodSecurityContext, the
- value specified in SecurityContext takes precedence.
- type: boolean
- runAsUser:
- description: The UID to run the entrypoint of the container
- process. Defaults to user specified in image metadata if
- unspecified. May also be set in PodSecurityContext. If
- set in both SecurityContext and PodSecurityContext, the
- value specified in SecurityContext takes precedence.
- format: int64
- type: integer
- seLinuxOptions:
- description: The SELinux context to be applied to the container.
- If unspecified, the container runtime will allocate a random
- SELinux context for each container. May also be set in
- PodSecurityContext. If set in both SecurityContext and
- PodSecurityContext, the value specified in SecurityContext
- takes precedence.
- properties:
- level:
- description: Level is SELinux level label that applies
- to the container.
- type: string
- role:
- description: Role is a SELinux role label that applies
- to the container.
- type: string
- type:
- description: Type is a SELinux type label that applies
- to the container.
- type: string
- user:
- description: User is a SELinux user label that applies
- to the container.
- type: string
- type: object
- windowsOptions:
- description: The Windows specific settings applied to all
- containers. If unspecified, the options from the PodSecurityContext
- will be used. If set in both SecurityContext and PodSecurityContext,
- the value specified in SecurityContext takes precedence.
- properties:
- gmsaCredentialSpec:
- description: GMSACredentialSpec is where the GMSA admission
- webhook (https://github.com/kubernetes-sigs/windows-gmsa)
- inlines the contents of the GMSA credential spec named
- by the GMSACredentialSpecName field. This field is alpha-level
- and is only honored by servers that enable the WindowsGMSA
- feature flag.
- type: string
- gmsaCredentialSpecName:
- description: GMSACredentialSpecName is the name of the
- GMSA credential spec to use. This field is alpha-level
- and is only honored by servers that enable the WindowsGMSA
- feature flag.
- type: string
- runAsUserName:
- description: The UserName in Windows to run the entrypoint
- of the container process. Defaults to the user specified
- in image metadata if unspecified. May also be set in
- PodSecurityContext. If set in both SecurityContext and
- PodSecurityContext, the value specified in SecurityContext
- takes precedence. This field is beta-level and may be
- disabled with the WindowsRunAsUserName feature flag.
- type: string
- type: object
- type: object
- startupProbe:
- description: 'StartupProbe indicates that the Pod has successfully
- initialized. If specified, no other probes are executed until
- this completes successfully. If this probe fails, the Pod will
- be restarted, just as if the livenessProbe failed. This can
- be used to provide different probe parameters at the beginning
- of a Pod''s lifecycle, when it might take a long time to load
- data or warm a cache, than during steady-state operation. This
- cannot be updated. This is an alpha feature enabled by the StartupProbe
- feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- properties:
- exec:
- description: One and only one of the following should be specified.
- Exec specifies the action to take.
- properties:
- command:
- description: Command is the command line to execute inside
- the container, the working directory for the command is
- root ('/') in the container's filesystem. The command
- is simply exec'd, it is not run inside a shell, so traditional
- shell instructions ('|', etc) won't work. To use a shell,
- you need to explicitly call out to that shell. Exit
- status of 0 is treated as live/healthy and non-zero
- is unhealthy.
- items:
- type: string
- type: array
- type: object
- failureThreshold:
- description: Minimum consecutive failures for the probe to
- be considered failed after having succeeded. Defaults to
- 3. Minimum value is 1.
- format: int32
- type: integer
- httpGet:
- description: HTTPGet specifies the http request to perform.
- properties:
- host:
- description: Host name to connect to, defaults to the
- pod IP. You probably want to set "Host" in httpHeaders
- instead.
- type: string
- httpHeaders:
- description: Custom headers to set in the request. HTTP
- allows repeated headers.
- items:
- description: HTTPHeader describes a custom header to
- be used in HTTP probes
- properties:
- name:
- description: The header field name
- type: string
- value:
- description: The header field value
- type: string
- required:
- - name
- - value
- type: object
- type: array
- path:
- description: Path to access on the HTTP server.
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Name or number of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- scheme:
- description: Scheme to use for connecting to the host.
- Defaults to HTTP.
- type: string
- required:
- - port
- type: object
- initialDelaySeconds:
- description: 'Number of seconds after the container has started
- before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- periodSeconds:
- description: How often (in seconds) to perform the probe.
- Default to 10 seconds. Minimum value is 1.
- format: int32
- type: integer
- successThreshold:
- description: Minimum consecutive successes for the probe to
- be considered successful after having failed. Defaults to
- 1. Must be 1 for liveness and startup. Minimum value is
- 1.
- format: int32
- type: integer
- tcpSocket:
- description: 'TCPSocket specifies an action involving a TCP
- port. TCP hooks not yet supported TODO: implement a realistic
- TCP lifecycle hook'
- properties:
- host:
- description: 'Optional: Host name to connect to, defaults
- to the pod IP.'
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Number or name of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- required:
- - port
- type: object
- timeoutSeconds:
- description: 'Number of seconds after which the probe times
- out. Defaults to 1 second. Minimum value is 1. More info:
- https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- type: object
- stdin:
- description: Whether this container should allocate a buffer for
- stdin in the container runtime. If this is not set, reads from
- stdin in the container will always result in EOF. Default is
- false.
- type: boolean
- stdinOnce:
- description: Whether the container runtime should close the stdin
- channel after it has been opened by a single attach. When stdin
- is true the stdin stream will remain open across multiple attach
- sessions. If stdinOnce is set to true, stdin is opened on container
- start, is empty until the first client attaches to stdin, and
- then remains open and accepts data until the client disconnects,
- at which time stdin is closed and remains closed until the container
- is restarted. If this flag is false, a container processes that
- reads from stdin will never receive an EOF. Default is false
- type: boolean
- terminationMessagePath:
- description: 'Optional: Path at which the file to which the container''s
- termination message will be written is mounted into the container''s
- filesystem. Message written is intended to be brief final status,
- such as an assertion failure message. Will be truncated by the
- node if greater than 4096 bytes. The total message length across
- all containers will be limited to 12kb. Defaults to /dev/termination-log.
- Cannot be updated.'
- type: string
- terminationMessagePolicy:
- description: Indicate how the termination message should be populated.
- File will use the contents of terminationMessagePath to populate
- the container status message on both success and failure. FallbackToLogsOnError
- will use the last chunk of container log output if the termination
- message file is empty and the container exited with an error.
- The log output is limited to 2048 bytes or 80 lines, whichever
- is smaller. Defaults to File. Cannot be updated.
- type: string
- tty:
- description: Whether this container should allocate a TTY for
- itself, also requires 'stdin' to be true. Default is false.
- type: boolean
- volumeDevices:
- description: volumeDevices is the list of block devices to be
- used by the container. This is a beta feature.
- items:
- description: volumeDevice describes a mapping of a raw block
- device within a container.
- properties:
- devicePath:
- description: devicePath is the path inside of the container
- that the device will be mapped to.
- type: string
- name:
- description: name must match the name of a persistentVolumeClaim
- in the pod
- type: string
- required:
- - devicePath
- - name
- type: object
- type: array
- volumeMounts:
- description: Pod volumes to mount into the container's filesystem.
- Cannot be updated.
- items:
- description: VolumeMount describes a mounting of a Volume within
- a container.
- properties:
- mountPath:
- description: Path within the container at which the volume
- should be mounted. Must not contain ':'.
- type: string
- mountPropagation:
- description: mountPropagation determines how mounts are
- propagated from the host to container and the other way
- around. When not set, MountPropagationNone is used. This
- field is beta in 1.10.
- type: string
- name:
- description: This must match the Name of a Volume.
- type: string
- readOnly:
- description: Mounted read-only if true, read-write otherwise
- (false or unspecified). Defaults to false.
- type: boolean
- subPath:
- description: Path within the volume from which the container's
- volume should be mounted. Defaults to "" (volume's root).
- type: string
- subPathExpr:
- description: Expanded path within the volume from which
- the container's volume should be mounted. Behaves similarly
- to SubPath but environment variable references $(VAR_NAME)
- are expanded using the container's environment. Defaults
- to "" (volume's root). SubPathExpr and SubPath are mutually
- exclusive.
- type: string
- required:
- - mountPath
- - name
- type: object
- type: array
- workingDir:
- description: Container's working directory. If not specified,
- the container runtime's default will be used, which might be
- configured in the container image. Cannot be updated.
- type: string
- required:
- - name
- type: object
- type: array
- listenLocal:
- description: 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.
- type: boolean
- logFormat:
- description: Log format for Alertmanager to be configured with.
- type: string
- logLevel:
- description: Log level for Alertmanager to be configured with.
- type: string
- nodeSelector:
- additionalProperties:
- type: string
- description: Define which Nodes the Pods are scheduled on.
- type: object
- paused:
- description: If set to true all actions on the underlaying managed objects
- are not goint to be performed, except for delete actions.
- type: boolean
- podMetadata:
- description: PodMetadata configures Labels and Annotations which are
- propagated to the alertmanager pods.
- properties:
- annotations:
- additionalProperties:
- type: string
- description: 'Annotations is an unstructured key value map stored
- with a resource that may be set by external tools to store and
- retrieve arbitrary metadata. They are not queryable and should
- be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations'
- type: object
- labels:
- additionalProperties:
- type: string
- description: 'Map of string keys and values that can be used to
- organize and categorize (scope and select) objects. May match
- selectors of replication controllers and services. More info:
- http://kubernetes.io/docs/user-guide/labels'
- type: object
- type: object
- portName:
- description: Port name used for the pods and governing service. This
- defaults to web
- type: string
- priorityClassName:
- description: Priority class assigned to the Pods
- type: string
- replicas:
- description: 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.
- format: int32
- type: integer
- resources:
- description: Define resources requests and limits for single Pods.
- properties:
- limits:
- additionalProperties:
- type: string
- description: 'Limits describes the maximum amount of compute resources
- allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
- type: object
- requests:
- additionalProperties:
- type: string
- description: 'Requests describes the minimum amount of compute resources
- required. If Requests is omitted for a container, it defaults
- to Limits if that is explicitly specified, otherwise to an implementation-defined
- value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
- type: object
- type: object
- retention:
- description: 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).
- type: string
- routePrefix:
- description: 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`.
- type: string
- secrets:
- description: 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/.
- items:
- type: string
- type: array
- securityContext:
- description: SecurityContext holds pod-level security attributes and
- common container settings. This defaults to the default PodSecurityContext.
- properties:
- fsGroup:
- description: "A special supplemental group that applies to all containers
- in a pod. Some volume types allow the Kubelet to change the ownership
- of that volume to be owned by the pod: \n 1. The owning GID will
- be the FSGroup 2. The setgid bit is set (new files created in
- the volume will be owned by FSGroup) 3. The permission bits are
- OR'd with rw-rw---- \n If unset, the Kubelet will not modify the
- ownership and permissions of any volume."
- format: int64
- type: integer
- runAsGroup:
- description: The GID to run the entrypoint of the container process.
- Uses runtime default if unset. May also be set in SecurityContext. If
- set in both SecurityContext and PodSecurityContext, the value
- specified in SecurityContext takes precedence for that container.
- format: int64
- type: integer
- runAsNonRoot:
- description: Indicates that the container must run as a non-root
- user. If true, the Kubelet will validate the image at runtime
- to ensure that it does not run as UID 0 (root) and fail to start
- the container if it does. If unset or false, no such validation
- will be performed. May also be set in SecurityContext. If set
- in both SecurityContext and PodSecurityContext, the value specified
- in SecurityContext takes precedence.
- type: boolean
- runAsUser:
- description: The UID to run the entrypoint of the container process.
- Defaults to user specified in image metadata if unspecified. May
- also be set in SecurityContext. If set in both SecurityContext
- and PodSecurityContext, the value specified in SecurityContext
- takes precedence for that container.
- format: int64
- type: integer
- seLinuxOptions:
- description: The SELinux context to be applied to all containers.
- If unspecified, the container runtime will allocate a random SELinux
- context for each container. May also be set in SecurityContext. If
- set in both SecurityContext and PodSecurityContext, the value
- specified in SecurityContext takes precedence for that container.
- properties:
- level:
- description: Level is SELinux level label that applies to the
- container.
- type: string
- role:
- description: Role is a SELinux role label that applies to the
- container.
- type: string
- type:
- description: Type is a SELinux type label that applies to the
- container.
- type: string
- user:
- description: User is a SELinux user label that applies to the
- container.
- type: string
- type: object
- supplementalGroups:
- description: A list of groups applied to the first process run in
- each container, in addition to the container's primary GID. If
- unspecified, no groups will be added to any container.
- items:
- format: int64
- type: integer
- type: array
- sysctls:
- description: Sysctls hold a list of namespaced sysctls used for
- the pod. Pods with unsupported sysctls (by the container runtime)
- might fail to launch.
- items:
- description: Sysctl defines a kernel parameter to be set
- properties:
- name:
- description: Name of a property to set
- type: string
- value:
- description: Value of a property to set
- type: string
- required:
- - name
- - value
- type: object
- type: array
- windowsOptions:
- description: The Windows specific settings applied to all containers.
- If unspecified, the options within a container's SecurityContext
- will be used. If set in both SecurityContext and PodSecurityContext,
- the value specified in SecurityContext takes precedence.
- properties:
- gmsaCredentialSpec:
- description: GMSACredentialSpec is where the GMSA admission
- webhook (https://github.com/kubernetes-sigs/windows-gmsa)
- inlines the contents of the GMSA credential spec named by
- the GMSACredentialSpecName field. This field is alpha-level
- and is only honored by servers that enable the WindowsGMSA
- feature flag.
- type: string
- gmsaCredentialSpecName:
- description: GMSACredentialSpecName is the name of the GMSA
- credential spec to use. This field is alpha-level and is only
- honored by servers that enable the WindowsGMSA feature flag.
- type: string
- runAsUserName:
- description: The UserName in Windows to run the entrypoint of
- the container process. Defaults to the user specified in image
- metadata if unspecified. May also be set in PodSecurityContext.
- If set in both SecurityContext and PodSecurityContext, the
- value specified in SecurityContext takes precedence. This
- field is beta-level and may be disabled with the WindowsRunAsUserName
- feature flag.
- type: string
- type: object
- type: object
- serviceAccountName:
- description: ServiceAccountName is the name of the ServiceAccount to
- use to run the Prometheus Pods.
- type: string
- sha:
- description: SHA of Alertmanager container image to be deployed. Defaults
- to the value of `version`. Similar to a tag, but the SHA explicitly
- deploys an immutable container image. Version and Tag are ignored
- if SHA is set.
- type: string
- storage:
- description: Storage is the definition of how storage will be used by
- the Alertmanager instances.
- properties:
- emptyDir:
- description: 'EmptyDirVolumeSource to be used by the Prometheus
- StatefulSets. If specified, used in place of any volumeClaimTemplate.
- More info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir'
- properties:
- medium:
- description: 'What type of storage medium should back this directory.
- The default is "" which means to use the node''s default medium.
- Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir'
- type: string
- sizeLimit:
- description: 'Total amount of local storage required for this
- EmptyDir volume. The size limit is also applicable for memory
- medium. 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. The
- default is nil which means that the limit is undefined. More
- info: http://kubernetes.io/docs/user-guide/volumes#emptydir'
- type: string
- type: object
- volumeClaimTemplate:
- description: A PVC spec to be used by the Prometheus StatefulSets.
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this
- representation of an object. Servers should convert recognized
- schemas to the latest internal value, and may reject unrecognized
- values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource
- this object represents. Servers may infer this from the endpoint
- the client submits requests to. Cannot be updated. In CamelCase.
- More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata'
- type: object
- spec:
- description: 'Spec defines the desired characteristics of a
- volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
- properties:
- accessModes:
- description: 'AccessModes contains the desired access modes
- the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1'
- items:
- type: string
- type: array
- dataSource:
- description: This field requires the VolumeSnapshotDataSource
- alpha feature gate to be enabled and currently VolumeSnapshot
- is the only supported data source. If the provisioner
- can support VolumeSnapshot data source, it will create
- a new volume and data will be restored to the volume at
- the same time. If the provisioner does not support VolumeSnapshot
- data source, volume will not be created and the failure
- will be reported as an event. In the future, we plan to
- support more data source types and the behavior of the
- provisioner may change.
- properties:
- apiGroup:
- description: APIGroup is the group for the resource
- being referenced. If APIGroup is not specified, the
- specified Kind must be in the core API group. For
- any other third-party types, APIGroup is required.
- type: string
- kind:
- description: Kind is the type of resource being referenced
- type: string
- name:
- description: Name is the name of resource being referenced
- type: string
- required:
- - kind
- - name
- type: object
- resources:
- description: 'Resources represents the minimum resources
- the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources'
- properties:
- limits:
- additionalProperties:
- type: string
- description: 'Limits describes the maximum amount of
- compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
- type: object
- requests:
- additionalProperties:
- type: string
- description: 'Requests describes the minimum amount
- of compute resources required. If Requests is omitted
- for a container, it defaults to Limits if that is
- explicitly specified, otherwise to an implementation-defined
- value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
- type: object
- type: object
- selector:
- description: A label query over volumes to consider for
- binding.
- properties:
- matchExpressions:
- description: matchExpressions is a list of label selector
- requirements. The requirements are ANDed.
- items:
- description: A label selector requirement is a selector
- that contains values, a key, and an operator that
- relates the key and values.
- properties:
- key:
- description: key is the label key that the selector
- applies to.
- type: string
- operator:
- description: operator represents a key's relationship
- to a set of values. Valid operators are In,
- NotIn, Exists and DoesNotExist.
- type: string
- values:
- description: values is an array of string values.
- If the operator is In or NotIn, the values array
- must be non-empty. If the operator is Exists
- or DoesNotExist, the values array must be empty.
- This array is replaced during a strategic merge
- patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- matchLabels:
- additionalProperties:
- type: string
- description: matchLabels is a map of {key,value} pairs.
- A single {key,value} in the matchLabels map is equivalent
- to an element of matchExpressions, whose key field
- is "key", the operator is "In", and the values array
- contains only "value". The requirements are ANDed.
- type: object
- type: object
- storageClassName:
- description: 'Name of the StorageClass required by the claim.
- More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1'
- type: string
- volumeMode:
- description: volumeMode defines what type of volume is required
- by the claim. Value of Filesystem is implied when not
- included in claim spec. This is a beta feature.
- type: string
- volumeName:
- description: VolumeName is the binding reference to the
- PersistentVolume backing this claim.
- type: string
- type: object
- status:
- description: 'Status represents the current information/status
- of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
- properties:
- accessModes:
- description: 'AccessModes contains the actual access modes
- the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1'
- items:
- type: string
- type: array
- capacity:
- additionalProperties:
- type: string
- description: Represents the actual resources of the underlying
- volume.
- type: object
- conditions:
- description: Current Condition of persistent volume claim.
- If underlying persistent volume is being resized then
- the Condition will be set to 'ResizeStarted'.
- items:
- description: PersistentVolumeClaimCondition contails details
- about state of pvc
- properties:
- lastProbeTime:
- description: Last time we probed the condition.
- format: date-time
- type: string
- lastTransitionTime:
- description: Last time the condition transitioned
- from one status to another.
- format: date-time
- type: string
- message:
- description: Human-readable message indicating details
- about last transition.
- type: string
- reason:
- description: Unique, this should be a short, machine
- understandable string that gives the reason for
- condition's last transition. If it reports "ResizeStarted"
- that means the underlying persistent volume is being
- resized.
- type: string
- status:
- type: string
- type:
- description: PersistentVolumeClaimConditionType is
- a valid value of PersistentVolumeClaimCondition.Type
- type: string
- required:
- - status
- - type
- type: object
- type: array
- phase:
- description: Phase represents the current phase of PersistentVolumeClaim.
- type: string
- type: object
- type: object
- type: object
- tag:
- description: Tag of Alertmanager container image to be deployed. Defaults
- to the value of `version`. Version is ignored if Tag is set.
- type: string
- tolerations:
- description: If specified, the pod's tolerations.
- items:
- description: The pod this Toleration is attached to tolerates any
- taint that matches the triple using the matching
- operator .
- properties:
- effect:
- description: Effect indicates the taint effect to match. Empty
- means match all taint effects. When specified, allowed values
- are NoSchedule, PreferNoSchedule and NoExecute.
- type: string
- key:
- description: Key is the taint key that the toleration applies
- to. Empty means match all taint keys. If the key is empty, operator
- must be Exists; this combination means to match all values and
- all keys.
- type: string
- operator:
- description: Operator represents a key's relationship to the value.
- Valid operators are Exists and Equal. Defaults to Equal. Exists
- is equivalent to wildcard for value, so that a pod can tolerate
- all taints of a particular category.
- type: string
- tolerationSeconds:
- description: TolerationSeconds represents the period of time the
- toleration (which must be of effect NoExecute, otherwise this
- field is ignored) tolerates the taint. By default, it is not
- set, which means tolerate the taint forever (do not evict).
- Zero and negative values will be treated as 0 (evict immediately)
- by the system.
- format: int64
- type: integer
- value:
- description: Value is the taint value the toleration matches to.
- If the operator is Exists, the value should be empty, otherwise
- just a regular string.
- type: string
- type: object
- type: array
- version:
- description: Version the cluster should be on.
- type: string
- volumeMounts:
- description: VolumeMounts allows configuration of additional VolumeMounts
- on the output StatefulSet definition. VolumeMounts specified will
- be appended to other VolumeMounts in the alertmanager container, that
- are generated as a result of StorageSpec objects.
- items:
- description: VolumeMount describes a mounting of a Volume within a
- container.
- properties:
- mountPath:
- description: Path within the container at which the volume should
- be mounted. Must not contain ':'.
- type: string
- mountPropagation:
- description: mountPropagation determines how mounts are propagated
- from the host to container and the other way around. When not
- set, MountPropagationNone is used. This field is beta in 1.10.
- type: string
- name:
- description: This must match the Name of a Volume.
- type: string
- readOnly:
- description: Mounted read-only if true, read-write otherwise (false
- or unspecified). Defaults to false.
- type: boolean
- subPath:
- description: Path within the volume from which the container's
- volume should be mounted. Defaults to "" (volume's root).
- type: string
- subPathExpr:
- description: Expanded path within the volume from which the container's
- volume should be mounted. Behaves similarly to SubPath but environment
- variable references $(VAR_NAME) are expanded using the container's
- environment. Defaults to "" (volume's root). SubPathExpr and
- SubPath are mutually exclusive.
- type: string
- required:
- - mountPath
- - name
- type: object
- type: array
- volumes:
- description: Volumes allows configuration of additional volumes on the
- output StatefulSet definition. Volumes specified will be appended
- to other volumes that are generated as a result of StorageSpec objects.
- items:
- description: Volume represents a named volume in a pod that may be
- accessed by any container in the pod.
- properties:
- awsElasticBlockStore:
- description: 'AWSElasticBlockStore represents an AWS Disk resource
- that is attached to a kubelet''s host machine and then exposed
- to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore'
- properties:
- fsType:
- description: 'Filesystem type of the volume that you want
- to mount. Tip: Ensure that the filesystem type is supported
- by the host operating system. Examples: "ext4", "xfs", "ntfs".
- Implicitly inferred to be "ext4" if unspecified. More info:
- https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
- TODO: how do we prevent errors in the filesystem from compromising
- the machine'
- type: string
- partition:
- description: 'The partition in the volume that you want to
- mount. If omitted, the default is to mount by volume name.
- Examples: For volume /dev/sda1, you specify the partition
- as "1". Similarly, the volume partition for /dev/sda is
- "0" (or you can leave the property empty).'
- format: int32
- type: integer
- readOnly:
- description: 'Specify "true" to force and set the ReadOnly
- property in VolumeMounts to "true". If omitted, the default
- is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore'
- type: boolean
- volumeID:
- description: 'Unique ID of the persistent disk resource in
- AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore'
- type: string
- required:
- - volumeID
- type: object
- azureDisk:
- description: AzureDisk represents an Azure Data Disk mount on
- the host and bind mount to the pod.
- properties:
- cachingMode:
- description: 'Host Caching mode: None, Read Only, Read Write.'
- type: string
- diskName:
- description: The Name of the data disk in the blob storage
- type: string
- diskURI:
- description: The URI the data disk in the blob storage
- type: string
- fsType:
- description: Filesystem type to mount. Must be a filesystem
- type supported by the host operating system. Ex. "ext4",
- "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
- type: string
- kind:
- description: 'Expected values Shared: multiple blob disks
- per storage account Dedicated: single blob disk per storage
- account Managed: azure managed data disk (only in managed
- availability set). defaults to shared'
- type: string
- readOnly:
- description: Defaults to false (read/write). ReadOnly here
- will force the ReadOnly setting in VolumeMounts.
- type: boolean
- required:
- - diskName
- - diskURI
- type: object
- azureFile:
- description: AzureFile represents an Azure File Service mount
- on the host and bind mount to the pod.
- properties:
- readOnly:
- description: Defaults to false (read/write). ReadOnly here
- will force the ReadOnly setting in VolumeMounts.
- type: boolean
- secretName:
- description: the name of secret that contains Azure Storage
- Account Name and Key
- type: string
- shareName:
- description: Share Name
- type: string
- required:
- - secretName
- - shareName
- type: object
- cephfs:
- description: CephFS represents a Ceph FS mount on the host that
- shares a pod's lifetime
- properties:
- monitors:
- description: 'Required: Monitors is a collection of Ceph monitors
- More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it'
- items:
- type: string
- type: array
- path:
- description: 'Optional: Used as the mounted root, rather than
- the full Ceph tree, default is /'
- type: string
- readOnly:
- description: 'Optional: Defaults to false (read/write). ReadOnly
- here will force the ReadOnly setting in VolumeMounts. More
- info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it'
- type: boolean
- secretFile:
- description: 'Optional: SecretFile is the path to key ring
- for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it'
- type: string
- secretRef:
- description: 'Optional: SecretRef is reference to the authentication
- secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it'
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- type: object
- user:
- description: 'Optional: User is the rados user name, default
- is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it'
- type: string
- required:
- - monitors
- type: object
- cinder:
- description: 'Cinder represents a cinder volume attached and mounted
- on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md'
- properties:
- fsType:
- description: 'Filesystem type to mount. Must be a filesystem
- type supported by the host operating system. Examples: "ext4",
- "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
- More info: https://examples.k8s.io/mysql-cinder-pd/README.md'
- type: string
- readOnly:
- description: 'Optional: Defaults to false (read/write). ReadOnly
- here will force the ReadOnly setting in VolumeMounts. More
- info: https://examples.k8s.io/mysql-cinder-pd/README.md'
- type: boolean
- secretRef:
- description: 'Optional: points to a secret object containing
- parameters used to connect to OpenStack.'
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- type: object
- volumeID:
- description: 'volume id used to identify the volume in cinder.
- More info: https://examples.k8s.io/mysql-cinder-pd/README.md'
- type: string
- required:
- - volumeID
- type: object
- configMap:
- description: ConfigMap represents a configMap that should populate
- this volume
- properties:
- defaultMode:
- description: 'Optional: mode bits to use on created files
- by default. Must be a value between 0 and 0777. Defaults
- to 0644. Directories within the path are not affected by
- this setting. This might be in conflict with other options
- that affect the file mode, like fsGroup, and the result
- can be other mode bits set.'
- format: int32
- type: integer
- items:
- description: If unspecified, each key-value pair in the Data
- field of the referenced ConfigMap will be projected into
- the volume as a file whose name is the key and content is
- the value. If specified, the listed keys will be projected
- into the specified paths, and unlisted keys will not be
- present. If a key is specified which is not present in the
- ConfigMap, the volume setup will error unless it is marked
- optional. Paths must be relative and may not contain the
- '..' path or start with '..'.
- items:
- description: Maps a string key to a path within a volume.
- properties:
- key:
- description: The key to project.
- type: string
- mode:
- description: 'Optional: mode bits to use on this file,
- must be a value between 0 and 0777. If not specified,
- the volume defaultMode will be used. This might be
- in conflict with other options that affect the file
- mode, like fsGroup, and the result can be other mode
- bits set.'
- format: int32
- type: integer
- path:
- description: The relative path of the file to map the
- key to. May not be an absolute path. May not contain
- the path element '..'. May not start with the string
- '..'.
- type: string
- required:
- - key
- - path
- type: object
- type: array
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the ConfigMap or its keys must
- be defined
- type: boolean
- type: object
- csi:
- description: CSI (Container Storage Interface) represents storage
- that is handled by an external CSI driver (Alpha feature).
- properties:
- driver:
- description: Driver is the name of the CSI driver that handles
- this volume. Consult with your admin for the correct name
- as registered in the cluster.
- type: string
- fsType:
- description: Filesystem type to mount. Ex. "ext4", "xfs",
- "ntfs". If not provided, the empty value is passed to the
- associated CSI driver which will determine the default filesystem
- to apply.
- type: string
- nodePublishSecretRef:
- description: NodePublishSecretRef is a reference to the secret
- object containing sensitive information to pass to the CSI
- driver to complete the CSI NodePublishVolume and NodeUnpublishVolume
- calls. This field is optional, and may be empty if no secret
- is required. If the secret object contains more than one
- secret, all secret references are passed.
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- type: object
- readOnly:
- description: Specifies a read-only configuration for the volume.
- Defaults to false (read/write).
- type: boolean
- volumeAttributes:
- additionalProperties:
- type: string
- description: VolumeAttributes stores driver-specific properties
- that are passed to the CSI driver. Consult your driver's
- documentation for supported values.
- type: object
- required:
- - driver
- type: object
- downwardAPI:
- description: DownwardAPI represents downward API about the pod
- that should populate this volume
- properties:
- defaultMode:
- description: 'Optional: mode bits to use on created files
- by default. Must be a value between 0 and 0777. Defaults
- to 0644. Directories within the path are not affected by
- this setting. This might be in conflict with other options
- that affect the file mode, like fsGroup, and the result
- can be other mode bits set.'
- format: int32
- type: integer
- items:
- description: Items is a list of downward API volume file
- items:
- description: DownwardAPIVolumeFile represents information
- to create the file containing the pod field
- properties:
- fieldRef:
- description: 'Required: Selects a field of the pod:
- only annotations, labels, name and namespace are supported.'
- properties:
- apiVersion:
- description: Version of the schema the FieldPath
- is written in terms of, defaults to "v1".
- type: string
- fieldPath:
- description: Path of the field to select in the
- specified API version.
- type: string
- required:
- - fieldPath
- type: object
- mode:
- description: 'Optional: mode bits to use on this file,
- must be a value between 0 and 0777. If not specified,
- the volume defaultMode will be used. This might be
- in conflict with other options that affect the file
- mode, like fsGroup, and the result can be other mode
- bits set.'
- format: int32
- type: integer
- path:
- description: 'Required: Path is the relative path name
- of the file to be created. Must not be absolute or
- contain the ''..'' path. Must be utf-8 encoded. The
- first item of the relative path must not start with
- ''..'''
- type: string
- resourceFieldRef:
- description: 'Selects a resource of the container: only
- resources limits and requests (limits.cpu, limits.memory,
- requests.cpu and requests.memory) are currently supported.'
- properties:
- containerName:
- description: 'Container name: required for volumes,
- optional for env vars'
- type: string
- divisor:
- description: Specifies the output format of the
- exposed resources, defaults to "1"
- type: string
- resource:
- description: 'Required: resource to select'
- type: string
- required:
- - resource
- type: object
- required:
- - path
- type: object
- type: array
- type: object
- emptyDir:
- description: 'EmptyDir represents a temporary directory that shares
- a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir'
- properties:
- medium:
- description: 'What type of storage medium should back this
- directory. The default is "" which means to use the node''s
- default medium. Must be an empty string (default) or Memory.
- More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir'
- type: string
- sizeLimit:
- description: 'Total amount of local storage required for this
- EmptyDir volume. The size limit is also applicable for memory
- medium. 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.
- The default is nil which means that the limit is undefined.
- More info: http://kubernetes.io/docs/user-guide/volumes#emptydir'
- type: string
- type: object
- fc:
- description: FC represents a Fibre Channel resource that is attached
- to a kubelet's host machine and then exposed to the pod.
- properties:
- fsType:
- description: 'Filesystem type to mount. Must be a filesystem
- type supported by the host operating system. Ex. "ext4",
- "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
- TODO: how do we prevent errors in the filesystem from compromising
- the machine'
- type: string
- lun:
- description: 'Optional: FC target lun number'
- format: int32
- type: integer
- readOnly:
- description: 'Optional: Defaults to false (read/write). ReadOnly
- here will force the ReadOnly setting in VolumeMounts.'
- type: boolean
- targetWWNs:
- description: 'Optional: FC target worldwide names (WWNs)'
- items:
- type: string
- type: array
- wwids:
- description: 'Optional: FC volume world wide identifiers (wwids)
- Either wwids or combination of targetWWNs and lun must be
- set, but not both simultaneously.'
- items:
- type: string
- type: array
- type: object
- flexVolume:
- description: FlexVolume represents a generic volume resource that
- is provisioned/attached using an exec based plugin.
- properties:
- driver:
- description: Driver is the name of the driver to use for this
- volume.
- type: string
- fsType:
- description: Filesystem type to mount. Must be a filesystem
- type supported by the host operating system. Ex. "ext4",
- "xfs", "ntfs". The default filesystem depends on FlexVolume
- script.
- type: string
- options:
- additionalProperties:
- type: string
- description: 'Optional: Extra command options if any.'
- type: object
- readOnly:
- description: 'Optional: Defaults to false (read/write). ReadOnly
- here will force the ReadOnly setting in VolumeMounts.'
- type: boolean
- secretRef:
- description: 'Optional: SecretRef is reference to the secret
- object containing sensitive information to pass to the plugin
- scripts. This may be empty if no secret object is specified.
- If the secret object contains more than one secret, all
- secrets are passed to the plugin scripts.'
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- type: object
- required:
- - driver
- type: object
- flocker:
- description: Flocker represents a Flocker volume attached to a
- kubelet's host machine. This depends on the Flocker control
- service being running
- properties:
- datasetName:
- description: Name of the dataset stored as metadata -> name
- on the dataset for Flocker should be considered as deprecated
- type: string
- datasetUUID:
- description: UUID of the dataset. This is unique identifier
- of a Flocker dataset
- type: string
- type: object
- gcePersistentDisk:
- description: 'GCEPersistentDisk represents a GCE Disk resource
- that is attached to a kubelet''s host machine and then exposed
- to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk'
- properties:
- fsType:
- description: 'Filesystem type of the volume that you want
- to mount. Tip: Ensure that the filesystem type is supported
- by the host operating system. Examples: "ext4", "xfs", "ntfs".
- Implicitly inferred to be "ext4" if unspecified. More info:
- https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
- TODO: how do we prevent errors in the filesystem from compromising
- the machine'
- type: string
- partition:
- description: 'The partition in the volume that you want to
- mount. If omitted, the default is to mount by volume name.
- Examples: For volume /dev/sda1, you specify the partition
- as "1". Similarly, the volume partition for /dev/sda is
- "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk'
- format: int32
- type: integer
- pdName:
- description: 'Unique name of the PD resource in GCE. Used
- to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk'
- type: string
- readOnly:
- description: 'ReadOnly here will force the ReadOnly setting
- in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk'
- type: boolean
- required:
- - pdName
- type: object
- gitRepo:
- description: 'GitRepo represents a git repository at a particular
- revision. DEPRECATED: GitRepo is deprecated. To provision a
- container with a git repo, mount an EmptyDir into an InitContainer
- that clones the repo using git, then mount the EmptyDir into
- the Pod''s container.'
- properties:
- directory:
- description: Target directory name. Must not contain or start
- with '..'. If '.' is supplied, the volume directory will
- be the git repository. Otherwise, if specified, the volume
- will contain the git repository in the subdirectory with
- the given name.
- type: string
- repository:
- description: Repository URL
- type: string
- revision:
- description: Commit hash for the specified revision.
- type: string
- required:
- - repository
- type: object
- glusterfs:
- description: 'Glusterfs represents a Glusterfs mount on the host
- that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md'
- properties:
- endpoints:
- description: 'EndpointsName is the endpoint name that details
- Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod'
- type: string
- path:
- description: 'Path is the Glusterfs volume path. More info:
- https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod'
- type: string
- readOnly:
- description: 'ReadOnly here will force the Glusterfs volume
- to be mounted with read-only permissions. Defaults to false.
- More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod'
- type: boolean
- required:
- - endpoints
- - path
- type: object
- hostPath:
- description: 'HostPath represents a pre-existing file or directory
- on the host machine that is directly exposed to the container.
- This is generally used for system agents or other privileged
- things that are allowed to see the host machine. Most containers
- will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
- --- TODO(jonesdl) We need to restrict who can use host directory
- mounts and who can/can not mount host directories as read/write.'
- properties:
- path:
- description: 'Path of the directory on the host. If the path
- is a symlink, it will follow the link to the real path.
- More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath'
- type: string
- type:
- description: 'Type for HostPath Volume Defaults to "" More
- info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath'
- type: string
- required:
- - path
- type: object
- iscsi:
- description: 'ISCSI represents an ISCSI Disk resource that is
- attached to a kubelet''s host machine and then exposed to the
- pod. More info: https://examples.k8s.io/volumes/iscsi/README.md'
- properties:
- chapAuthDiscovery:
- description: whether support iSCSI Discovery CHAP authentication
- type: boolean
- chapAuthSession:
- description: whether support iSCSI Session CHAP authentication
- type: boolean
- fsType:
- description: 'Filesystem type of the volume that you want
- to mount. Tip: Ensure that the filesystem type is supported
- by the host operating system. Examples: "ext4", "xfs", "ntfs".
- Implicitly inferred to be "ext4" if unspecified. More info:
- https://kubernetes.io/docs/concepts/storage/volumes#iscsi
- TODO: how do we prevent errors in the filesystem from compromising
- the machine'
- type: string
- initiatorName:
- description: Custom iSCSI Initiator Name. If initiatorName
- is specified with iscsiInterface simultaneously, new iSCSI
- interface : will be created
- for the connection.
- type: string
- iqn:
- description: Target iSCSI Qualified Name.
- type: string
- iscsiInterface:
- description: iSCSI Interface Name that uses an iSCSI transport.
- Defaults to 'default' (tcp).
- type: string
- lun:
- description: iSCSI Target Lun number.
- format: int32
- type: integer
- portals:
- description: iSCSI Target Portal List. The portal is either
- an IP or ip_addr:port if the port is other than default
- (typically TCP ports 860 and 3260).
- items:
- type: string
- type: array
- readOnly:
- description: ReadOnly here will force the ReadOnly setting
- in VolumeMounts. Defaults to false.
- type: boolean
- secretRef:
- description: CHAP Secret for iSCSI target and initiator authentication
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- type: object
- targetPortal:
- description: iSCSI Target Portal. The Portal is either an
- IP or ip_addr:port if the port is other than default (typically
- TCP ports 860 and 3260).
- type: string
- required:
- - iqn
- - lun
- - targetPortal
- type: object
- name:
- description: 'Volume''s name. Must be a DNS_LABEL and unique within
- the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
- type: string
- nfs:
- description: 'NFS represents an NFS mount on the host that shares
- a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs'
- properties:
- path:
- description: 'Path that is exported by the NFS server. More
- info: https://kubernetes.io/docs/concepts/storage/volumes#nfs'
- type: string
- readOnly:
- description: 'ReadOnly here will force the NFS export to be
- mounted with read-only permissions. Defaults to false. More
- info: https://kubernetes.io/docs/concepts/storage/volumes#nfs'
- type: boolean
- server:
- description: 'Server is the hostname or IP address of the
- NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs'
- type: string
- required:
- - path
- - server
- type: object
- persistentVolumeClaim:
- description: 'PersistentVolumeClaimVolumeSource represents a reference
- to a PersistentVolumeClaim in the same namespace. More info:
- https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
- properties:
- claimName:
- description: 'ClaimName is the name of a PersistentVolumeClaim
- in the same namespace as the pod using this volume. More
- info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
- type: string
- readOnly:
- description: Will force the ReadOnly setting in VolumeMounts.
- Default false.
- type: boolean
- required:
- - claimName
- type: object
- photonPersistentDisk:
- description: PhotonPersistentDisk represents a PhotonController
- persistent disk attached and mounted on kubelets host machine
- properties:
- fsType:
- description: Filesystem type to mount. Must be a filesystem
- type supported by the host operating system. Ex. "ext4",
- "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
- type: string
- pdID:
- description: ID that identifies Photon Controller persistent
- disk
- type: string
- required:
- - pdID
- type: object
- portworxVolume:
- description: PortworxVolume represents a portworx volume attached
- and mounted on kubelets host machine
- properties:
- fsType:
- description: FSType represents the filesystem type to mount
- Must be a filesystem type supported by the host operating
- system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4"
- if unspecified.
- type: string
- readOnly:
- description: Defaults to false (read/write). ReadOnly here
- will force the ReadOnly setting in VolumeMounts.
- type: boolean
- volumeID:
- description: VolumeID uniquely identifies a Portworx volume
- type: string
- required:
- - volumeID
- type: object
- projected:
- description: Items for all in one resources secrets, configmaps,
- and downward API
- properties:
- defaultMode:
- description: Mode bits to use on created files by default.
- Must be a value between 0 and 0777. Directories within the
- path are not affected by this setting. This might be in
- conflict with other options that affect the file mode, like
- fsGroup, and the result can be other mode bits set.
- format: int32
- type: integer
- sources:
- description: list of volume projections
- items:
- description: Projection that may be projected along with
- other supported volume types
- properties:
- configMap:
- description: information about the configMap data to
- project
- properties:
- items:
- description: If unspecified, each key-value pair
- in the Data field of the referenced ConfigMap
- will be projected into the volume as a file whose
- name is the key and content is the value. If specified,
- the listed keys will be projected into the specified
- paths, and unlisted keys will not be present.
- If a key is specified which is not present in
- the ConfigMap, the volume setup will error unless
- it is marked optional. Paths must be relative
- and may not contain the '..' path or start with
- '..'.
- items:
- description: Maps a string key to a path within
- a volume.
- properties:
- key:
- description: The key to project.
- type: string
- mode:
- description: 'Optional: mode bits to use on
- this file, must be a value between 0 and
- 0777. If not specified, the volume defaultMode
- will be used. This might be in conflict
- with other options that affect the file
- mode, like fsGroup, and the result can be
- other mode bits set.'
- format: int32
- type: integer
- path:
- description: The relative path of the file
- to map the key to. May not be an absolute
- path. May not contain the path element '..'.
- May not start with the string '..'.
- type: string
- required:
- - key
- - path
- type: object
- type: array
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the ConfigMap or its
- keys must be defined
- type: boolean
- type: object
- downwardAPI:
- description: information about the downwardAPI data
- to project
- properties:
- items:
- description: Items is a list of DownwardAPIVolume
- file
- items:
- description: DownwardAPIVolumeFile represents
- information to create the file containing the
- pod field
- properties:
- fieldRef:
- description: 'Required: Selects a field of
- the pod: only annotations, labels, name
- and namespace are supported.'
- properties:
- apiVersion:
- description: Version of the schema the
- FieldPath is written in terms of, defaults
- to "v1".
- type: string
- fieldPath:
- description: Path of the field to select
- in the specified API version.
- type: string
- required:
- - fieldPath
- type: object
- mode:
- description: 'Optional: mode bits to use on
- this file, must be a value between 0 and
- 0777. If not specified, the volume defaultMode
- will be used. This might be in conflict
- with other options that affect the file
- mode, like fsGroup, and the result can be
- other mode bits set.'
- format: int32
- type: integer
- path:
- description: 'Required: Path is the relative
- path name of the file to be created. Must
- not be absolute or contain the ''..'' path.
- Must be utf-8 encoded. The first item of
- the relative path must not start with ''..'''
- type: string
- resourceFieldRef:
- description: 'Selects a resource of the container:
- only resources limits and requests (limits.cpu,
- limits.memory, requests.cpu and requests.memory)
- are currently supported.'
- properties:
- containerName:
- description: 'Container name: required
- for volumes, optional for env vars'
- type: string
- divisor:
- description: Specifies the output format
- of the exposed resources, defaults to
- "1"
- type: string
- resource:
- description: 'Required: resource to select'
- type: string
- required:
- - resource
- type: object
- required:
- - path
- type: object
- type: array
- type: object
- secret:
- description: information about the secret data to project
- properties:
- items:
- description: If unspecified, each key-value pair
- in the Data field of the referenced Secret will
- be projected into the volume as a file whose name
- is the key and content is the value. If specified,
- the listed keys will be projected into the specified
- paths, and unlisted keys will not be present.
- If a key is specified which is not present in
- the Secret, the volume setup will error unless
- it is marked optional. Paths must be relative
- and may not contain the '..' path or start with
- '..'.
- items:
- description: Maps a string key to a path within
- a volume.
- properties:
- key:
- description: The key to project.
- type: string
- mode:
- description: 'Optional: mode bits to use on
- this file, must be a value between 0 and
- 0777. If not specified, the volume defaultMode
- will be used. This might be in conflict
- with other options that affect the file
- mode, like fsGroup, and the result can be
- other mode bits set.'
- format: int32
- type: integer
- path:
- description: The relative path of the file
- to map the key to. May not be an absolute
- path. May not contain the path element '..'.
- May not start with the string '..'.
- type: string
- required:
- - key
- - path
- type: object
- type: array
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key
- must be defined
- type: boolean
- type: object
- serviceAccountToken:
- description: information about the serviceAccountToken
- data to project
- properties:
- audience:
- description: Audience is the intended audience of
- the token. A recipient of a token must identify
- itself with an identifier specified in the audience
- of the token, and otherwise should reject the
- token. The audience defaults to the identifier
- of the apiserver.
- type: string
- expirationSeconds:
- description: ExpirationSeconds is the requested
- duration of validity of the service account token.
- As the token approaches expiration, the kubelet
- volume plugin will proactively rotate the service
- account token. The kubelet will start trying to
- rotate the token if the token is older than 80
- percent of its time to live or if the token is
- older than 24 hours.Defaults to 1 hour and must
- be at least 10 minutes.
- format: int64
- type: integer
- path:
- description: Path is the path relative to the mount
- point of the file to project the token into.
- type: string
- required:
- - path
- type: object
- type: object
- type: array
- required:
- - sources
- type: object
- quobyte:
- description: Quobyte represents a Quobyte mount on the host that
- shares a pod's lifetime
- properties:
- group:
- description: Group to map volume access to Default is no group
- type: string
- readOnly:
- description: ReadOnly here will force the Quobyte volume to
- be mounted with read-only permissions. Defaults to false.
- type: boolean
- registry:
- description: Registry represents a single or multiple Quobyte
- Registry services specified as a string as host:port pair
- (multiple entries are separated with commas) which acts
- as the central registry for volumes
- type: string
- tenant:
- description: Tenant owning the given Quobyte volume in the
- Backend Used with dynamically provisioned Quobyte volumes,
- value is set by the plugin
- type: string
- user:
- description: User to map volume access to Defaults to serivceaccount
- user
- type: string
- volume:
- description: Volume is a string that references an already
- created Quobyte volume by name.
- type: string
- required:
- - registry
- - volume
- type: object
- rbd:
- description: 'RBD represents a Rados Block Device mount on the
- host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md'
- properties:
- fsType:
- description: 'Filesystem type of the volume that you want
- to mount. Tip: Ensure that the filesystem type is supported
- by the host operating system. Examples: "ext4", "xfs", "ntfs".
- Implicitly inferred to be "ext4" if unspecified. More info:
- https://kubernetes.io/docs/concepts/storage/volumes#rbd
- TODO: how do we prevent errors in the filesystem from compromising
- the machine'
- type: string
- image:
- description: 'The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
- type: string
- keyring:
- description: 'Keyring is the path to key ring for RBDUser.
- Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
- type: string
- monitors:
- description: 'A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
- items:
- type: string
- type: array
- pool:
- description: 'The rados pool name. Default is rbd. More info:
- https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
- type: string
- readOnly:
- description: 'ReadOnly here will force the ReadOnly setting
- in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
- type: boolean
- secretRef:
- description: 'SecretRef is name of the authentication secret
- for RBDUser. If provided overrides keyring. Default is nil.
- More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- type: object
- user:
- description: 'The rados user name. Default is admin. More
- info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
- type: string
- required:
- - image
- - monitors
- type: object
- scaleIO:
- description: ScaleIO represents a ScaleIO persistent volume attached
- and mounted on Kubernetes nodes.
- properties:
- fsType:
- description: Filesystem type to mount. Must be a filesystem
- type supported by the host operating system. Ex. "ext4",
- "xfs", "ntfs". Default is "xfs".
- type: string
- gateway:
- description: The host address of the ScaleIO API Gateway.
- type: string
- protectionDomain:
- description: The name of the ScaleIO Protection Domain for
- the configured storage.
- type: string
- readOnly:
- description: Defaults to false (read/write). ReadOnly here
- will force the ReadOnly setting in VolumeMounts.
- type: boolean
- secretRef:
- description: SecretRef references to the secret for ScaleIO
- user and other sensitive information. If this is not provided,
- Login operation will fail.
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- type: object
- sslEnabled:
- description: Flag to enable/disable SSL communication with
- Gateway, default false
- type: boolean
- storageMode:
- description: Indicates whether the storage for a volume should
- be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.
- type: string
- storagePool:
- description: The ScaleIO Storage Pool associated with the
- protection domain.
- type: string
- system:
- description: The name of the storage system as configured
- in ScaleIO.
- type: string
- volumeName:
- description: The name of a volume already created in the ScaleIO
- system that is associated with this volume source.
- type: string
- required:
- - gateway
- - secretRef
- - system
- type: object
- secret:
- description: 'Secret represents a secret that should populate
- this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret'
- properties:
- defaultMode:
- description: 'Optional: mode bits to use on created files
- by default. Must be a value between 0 and 0777. Defaults
- to 0644. Directories within the path are not affected by
- this setting. This might be in conflict with other options
- that affect the file mode, like fsGroup, and the result
- can be other mode bits set.'
- format: int32
- type: integer
- items:
- description: If unspecified, each key-value pair in the Data
- field of the referenced Secret will be projected into the
- volume as a file whose name is the key and content is the
- value. If specified, the listed keys will be projected into
- the specified paths, and unlisted keys will not be present.
- If a key is specified which is not present in the Secret,
- the volume setup will error unless it is marked optional.
- Paths must be relative and may not contain the '..' path
- or start with '..'.
- items:
- description: Maps a string key to a path within a volume.
- properties:
- key:
- description: The key to project.
- type: string
- mode:
- description: 'Optional: mode bits to use on this file,
- must be a value between 0 and 0777. If not specified,
- the volume defaultMode will be used. This might be
- in conflict with other options that affect the file
- mode, like fsGroup, and the result can be other mode
- bits set.'
- format: int32
- type: integer
- path:
- description: The relative path of the file to map the
- key to. May not be an absolute path. May not contain
- the path element '..'. May not start with the string
- '..'.
- type: string
- required:
- - key
- - path
- type: object
- type: array
- optional:
- description: Specify whether the Secret or its keys must be
- defined
- type: boolean
- secretName:
- description: 'Name of the secret in the pod''s namespace to
- use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret'
- type: string
- type: object
- storageos:
- description: StorageOS represents a StorageOS volume attached
- and mounted on Kubernetes nodes.
- properties:
- fsType:
- description: Filesystem type to mount. Must be a filesystem
- type supported by the host operating system. Ex. "ext4",
- "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
- type: string
- readOnly:
- description: Defaults to false (read/write). ReadOnly here
- will force the ReadOnly setting in VolumeMounts.
- type: boolean
- secretRef:
- description: SecretRef specifies the secret to use for obtaining
- the StorageOS API credentials. If not specified, default
- values will be attempted.
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- type: object
- volumeName:
- description: VolumeName is the human-readable name of the
- StorageOS volume. Volume names are only unique within a
- namespace.
- type: string
- volumeNamespace:
- description: VolumeNamespace specifies the scope of the volume
- within StorageOS. If no namespace is specified then the
- Pod's namespace will be used. This allows the Kubernetes
- name scoping to be mirrored within StorageOS for tighter
- integration. Set VolumeName to any name to override the
- default behaviour. Set to "default" if you are not using
- namespaces within StorageOS. Namespaces that do not pre-exist
- within StorageOS will be created.
- type: string
- type: object
- vsphereVolume:
- description: VsphereVolume represents a vSphere volume attached
- and mounted on kubelets host machine
- properties:
- fsType:
- description: Filesystem type to mount. Must be a filesystem
- type supported by the host operating system. Ex. "ext4",
- "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
- type: string
- storagePolicyID:
- description: Storage Policy Based Management (SPBM) profile
- ID associated with the StoragePolicyName.
- type: string
- storagePolicyName:
- description: Storage Policy Based Management (SPBM) profile
- name.
- type: string
- volumePath:
- description: Path that identifies vSphere volume vmdk
- type: string
- required:
- - volumePath
- type: object
- required:
- - name
- type: object
- type: array
- type: object
- status:
- description: 'Most recent observed status of the Alertmanager cluster. Read-only.
- Not included when requesting from the apiserver, only from the Prometheus
- Operator API itself. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status'
- properties:
- availableReplicas:
- description: Total number of available pods (ready for at least minReadySeconds)
- targeted by this Alertmanager cluster.
- format: int32
- type: integer
- paused:
- description: Represents whether any actions on the underlaying managed
- objects are being performed. Only delete actions will be performed.
- type: boolean
- replicas:
- description: Total number of non-terminated pods targeted by this Alertmanager
- cluster (their labels match the selector).
- format: int32
- type: integer
- unavailableReplicas:
- description: Total number of unavailable pods targeted by this Alertmanager
- cluster.
- format: int32
- type: integer
- updatedReplicas:
- description: Total number of non-terminated pods targeted by this Alertmanager
- cluster that have the desired version spec.
- format: int32
- type: integer
- required:
- - availableReplicas
- - paused
- - replicas
- - unavailableReplicas
- - updatedReplicas
- type: object
- required:
- - spec
- type: object
- version: v1
- versions:
- - name: v1
- served: true
- storage: true
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/crds/crd-podmonitor.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/crds/crd-podmonitor.yaml
deleted file mode 100755
index ab2af4e7cb..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/crds/crd-podmonitor.yaml
+++ /dev/null
@@ -1,261 +0,0 @@
-# https://raw.githubusercontent.com/coreos/prometheus-operator/release-0.38/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml
-apiVersion: apiextensions.k8s.io/v1beta1
-kind: CustomResourceDefinition
-metadata:
- annotations:
- controller-gen.kubebuilder.io/version: v0.2.4
- helm.sh/hook: crd-install
- creationTimestamp: null
- name: podmonitors.monitoring.coreos.com
-spec:
- group: monitoring.coreos.com
- names:
- kind: PodMonitor
- listKind: PodMonitorList
- plural: podmonitors
- singular: podmonitor
- preserveUnknownFields: false
- scope: Namespaced
- validation:
- openAPIV3Schema:
- description: PodMonitor defines monitoring for a set of pods.
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
- description: Specification of desired Pod selection for target discovery
- by Prometheus.
- properties:
- jobLabel:
- description: The label to use to retrieve the job name from.
- type: string
- namespaceSelector:
- description: Selector to select which namespaces the Endpoints objects
- are discovered from.
- properties:
- any:
- description: Boolean describing whether all namespaces are selected
- in contrast to a list restricting them.
- type: boolean
- matchNames:
- description: List of namespace names.
- items:
- type: string
- type: array
- type: object
- podMetricsEndpoints:
- description: A list of endpoints allowed as part of this PodMonitor.
- items:
- description: PodMetricsEndpoint defines a scrapeable endpoint of a
- Kubernetes Pod serving Prometheus metrics.
- properties:
- honorLabels:
- description: HonorLabels chooses the metric's labels on collisions
- with target labels.
- type: boolean
- honorTimestamps:
- description: HonorTimestamps controls whether Prometheus respects
- the timestamps present in scraped data.
- type: boolean
- interval:
- description: Interval at which metrics should be scraped
- type: string
- metricRelabelings:
- description: MetricRelabelConfigs to apply to samples before ingestion.
- items:
- description: 'RelabelConfig allows dynamic rewriting of the
- label set, being applied to samples before ingestion. It defines
- ``-section of Prometheus configuration.
- More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs'
- properties:
- action:
- description: Action to perform based on regex matching.
- Default is 'replace'
- type: string
- modulus:
- description: Modulus to take of the hash of the source label
- values.
- format: int64
- type: integer
- regex:
- description: Regular expression against which the extracted
- value is matched. Default is '(.*)'
- type: string
- replacement:
- description: Replacement value against which a regex replace
- is performed if the regular expression matches. Regex
- capture groups are available. Default is '$1'
- type: string
- separator:
- description: Separator placed between concatenated source
- label values. default is ';'.
- type: string
- sourceLabels:
- description: The source labels select values from existing
- labels. Their content is concatenated using the configured
- separator and matched against the configured regular expression
- for the replace, keep, and drop actions.
- items:
- type: string
- type: array
- targetLabel:
- description: Label to which the resulting value is written
- in a replace action. It is mandatory for replace actions.
- Regex capture groups are available.
- type: string
- type: object
- type: array
- params:
- additionalProperties:
- items:
- type: string
- type: array
- description: Optional HTTP URL parameters
- type: object
- path:
- description: HTTP path to scrape for metrics.
- type: string
- port:
- description: Name of the pod port this endpoint refers to. Mutually
- exclusive with targetPort.
- type: string
- proxyUrl:
- description: ProxyURL eg http://proxyserver:2195 Directs scrapes
- to proxy through this endpoint.
- type: string
- relabelings:
- description: 'RelabelConfigs to apply to samples before ingestion.
- More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config'
- items:
- description: 'RelabelConfig allows dynamic rewriting of the
- label set, being applied to samples before ingestion. It defines
- ``-section of Prometheus configuration.
- More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs'
- properties:
- action:
- description: Action to perform based on regex matching.
- Default is 'replace'
- type: string
- modulus:
- description: Modulus to take of the hash of the source label
- values.
- format: int64
- type: integer
- regex:
- description: Regular expression against which the extracted
- value is matched. Default is '(.*)'
- type: string
- replacement:
- description: Replacement value against which a regex replace
- is performed if the regular expression matches. Regex
- capture groups are available. Default is '$1'
- type: string
- separator:
- description: Separator placed between concatenated source
- label values. default is ';'.
- type: string
- sourceLabels:
- description: The source labels select values from existing
- labels. Their content is concatenated using the configured
- separator and matched against the configured regular expression
- for the replace, keep, and drop actions.
- items:
- type: string
- type: array
- targetLabel:
- description: Label to which the resulting value is written
- in a replace action. It is mandatory for replace actions.
- Regex capture groups are available.
- type: string
- type: object
- type: array
- scheme:
- description: HTTP scheme to use for scraping.
- type: string
- scrapeTimeout:
- description: Timeout after which the scrape is ended
- type: string
- targetPort:
- anyOf:
- - type: integer
- - type: string
- description: 'Deprecated: Use ''port'' instead.'
- x-kubernetes-int-or-string: true
- type: object
- type: array
- podTargetLabels:
- description: PodTargetLabels transfers labels on the Kubernetes Pod
- onto the target.
- items:
- type: string
- type: array
- sampleLimit:
- description: SampleLimit defines per-scrape limit on number of scraped
- samples that will be accepted.
- format: int64
- type: integer
- selector:
- description: Selector to select Pod objects.
- properties:
- matchExpressions:
- description: matchExpressions is a list of label selector requirements.
- The requirements are ANDed.
- items:
- description: A label selector requirement is a selector that contains
- values, a key, and an operator that relates the key and values.
- properties:
- key:
- description: key is the label key that the selector applies
- to.
- type: string
- operator:
- description: operator represents a key's relationship to a
- set of values. Valid operators are In, NotIn, Exists and
- DoesNotExist.
- type: string
- values:
- description: values is an array of string values. If the operator
- is In or NotIn, the values array must be non-empty. If the
- operator is Exists or DoesNotExist, the values array must
- be empty. This array is replaced during a strategic merge
- patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- matchLabels:
- additionalProperties:
- type: string
- description: matchLabels is a map of {key,value} pairs. A single
- {key,value} in the matchLabels map is equivalent to an element
- of matchExpressions, whose key field is "key", the operator is
- "In", and the values array contains only "value". The requirements
- are ANDed.
- type: object
- type: object
- required:
- - podMetricsEndpoints
- - selector
- type: object
- required:
- - spec
- type: object
- version: v1
- versions:
- - name: v1
- served: true
- storage: true
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/crds/crd-prometheus.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/crds/crd-prometheus.yaml
deleted file mode 100755
index 3699396f1c..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/crds/crd-prometheus.yaml
+++ /dev/null
@@ -1,6003 +0,0 @@
-# https://raw.githubusercontent.com/coreos/prometheus-operator/release-0.38/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml
-apiVersion: apiextensions.k8s.io/v1beta1
-kind: CustomResourceDefinition
-metadata:
- annotations:
- controller-gen.kubebuilder.io/version: v0.2.4
- helm.sh/hook: crd-install
- creationTimestamp: null
- name: prometheuses.monitoring.coreos.com
-spec:
- additionalPrinterColumns:
- - JSONPath: .spec.version
- description: The version of Prometheus
- name: Version
- type: string
- - JSONPath: .spec.replicas
- description: The desired replicas number of Prometheuses
- name: Replicas
- type: integer
- - JSONPath: .metadata.creationTimestamp
- name: Age
- type: date
- group: monitoring.coreos.com
- names:
- kind: Prometheus
- listKind: PrometheusList
- plural: prometheuses
- singular: prometheus
- preserveUnknownFields: false
- scope: Namespaced
- subresources: {}
- validation:
- openAPIV3Schema:
- description: Prometheus defines a Prometheus deployment.
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
- description: 'Specification of the desired behavior of the Prometheus cluster.
- More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status'
- properties:
- additionalAlertManagerConfigs:
- description: 'AdditionalAlertManagerConfigs allows specifying a key
- of a Secret containing additional Prometheus AlertManager configurations.
- AlertManager configurations specified are appended to the configurations
- generated by the Prometheus Operator. Job configurations specified
- must have the form as specified in the official Prometheus documentation:
- https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alertmanager_config.
- As AlertManager configs are 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 AlertManager configs
- are going to break Prometheus after the upgrade.'
- properties:
- key:
- description: The key of the secret to select from. Must be a valid
- secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key must be defined
- type: boolean
- required:
- - key
- type: object
- additionalAlertRelabelConfigs:
- description: 'AdditionalAlertRelabelConfigs allows specifying a key
- of a Secret containing additional 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 official Prometheus
- documentation: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alert_relabel_configs.
- As alert relabel configs are 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 alert relabel
- configs are going to break Prometheus after the upgrade.'
- properties:
- key:
- description: The key of the secret to select from. Must be a valid
- secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key must be defined
- type: boolean
- required:
- - key
- type: object
- additionalScrapeConfigs:
- description: 'AdditionalScrapeConfigs allows specifying a key of a Secret
- containing additional Prometheus scrape configurations. Scrape configurations
- specified are appended to the configurations generated by the Prometheus
- Operator. Job configurations specified must have the form as specified
- in the official Prometheus documentation: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config.
- As scrape configs are 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.'
- properties:
- key:
- description: The key of the secret to select from. Must be a valid
- secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key must be defined
- type: boolean
- required:
- - key
- type: object
- affinity:
- description: If specified, the pod's scheduling constraints.
- properties:
- nodeAffinity:
- description: Describes node affinity scheduling rules for the pod.
- properties:
- preferredDuringSchedulingIgnoredDuringExecution:
- description: The scheduler will prefer to schedule pods to nodes
- that satisfy the affinity expressions specified by this field,
- but it may choose a node that violates one or more of the
- expressions. The node that is most preferred is the one with
- the greatest sum of weights, i.e. for each node that meets
- all of the scheduling requirements (resource request, requiredDuringScheduling
- affinity expressions, etc.), compute a sum by iterating through
- the elements of this field and adding "weight" to the sum
- if the node matches the corresponding matchExpressions; the
- node(s) with the highest sum are the most preferred.
- items:
- description: An empty preferred scheduling term matches all
- objects with implicit weight 0 (i.e. it's a no-op). A null
- preferred scheduling term matches no objects (i.e. is also
- a no-op).
- properties:
- preference:
- description: A node selector term, associated with the
- corresponding weight.
- properties:
- matchExpressions:
- description: A list of node selector requirements
- by node's labels.
- items:
- description: A node selector requirement is a selector
- that contains values, a key, and an operator that
- relates the key and values.
- properties:
- key:
- description: The label key that the selector
- applies to.
- type: string
- operator:
- description: Represents a key's relationship
- to a set of values. Valid operators are In,
- NotIn, Exists, DoesNotExist. Gt, and Lt.
- type: string
- values:
- description: An array of string values. If the
- operator is In or NotIn, the values array
- must be non-empty. If the operator is Exists
- or DoesNotExist, the values array must be
- empty. If the operator is Gt or Lt, the values
- array must have a single element, which will
- be interpreted as an integer. This array is
- replaced during a strategic merge patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- matchFields:
- description: A list of node selector requirements
- by node's fields.
- items:
- description: A node selector requirement is a selector
- that contains values, a key, and an operator that
- relates the key and values.
- properties:
- key:
- description: The label key that the selector
- applies to.
- type: string
- operator:
- description: Represents a key's relationship
- to a set of values. Valid operators are In,
- NotIn, Exists, DoesNotExist. Gt, and Lt.
- type: string
- values:
- description: An array of string values. If the
- operator is In or NotIn, the values array
- must be non-empty. If the operator is Exists
- or DoesNotExist, the values array must be
- empty. If the operator is Gt or Lt, the values
- array must have a single element, which will
- be interpreted as an integer. This array is
- replaced during a strategic merge patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- type: object
- weight:
- description: Weight associated with matching the corresponding
- nodeSelectorTerm, in the range 1-100.
- format: int32
- type: integer
- required:
- - preference
- - weight
- type: object
- type: array
- requiredDuringSchedulingIgnoredDuringExecution:
- description: If the affinity requirements specified by this
- field are not met at scheduling time, the pod will not be
- scheduled onto the node. If the affinity requirements specified
- by this field cease to be met at some point during pod execution
- (e.g. due to an update), the system may or may not try to
- eventually evict the pod from its node.
- properties:
- nodeSelectorTerms:
- description: Required. A list of node selector terms. The
- terms are ORed.
- items:
- description: A null or empty node selector term matches
- no objects. The requirements of them are ANDed. The
- TopologySelectorTerm type implements a subset of the
- NodeSelectorTerm.
- properties:
- matchExpressions:
- description: A list of node selector requirements
- by node's labels.
- items:
- description: A node selector requirement is a selector
- that contains values, a key, and an operator that
- relates the key and values.
- properties:
- key:
- description: The label key that the selector
- applies to.
- type: string
- operator:
- description: Represents a key's relationship
- to a set of values. Valid operators are In,
- NotIn, Exists, DoesNotExist. Gt, and Lt.
- type: string
- values:
- description: An array of string values. If the
- operator is In or NotIn, the values array
- must be non-empty. If the operator is Exists
- or DoesNotExist, the values array must be
- empty. If the operator is Gt or Lt, the values
- array must have a single element, which will
- be interpreted as an integer. This array is
- replaced during a strategic merge patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- matchFields:
- description: A list of node selector requirements
- by node's fields.
- items:
- description: A node selector requirement is a selector
- that contains values, a key, and an operator that
- relates the key and values.
- properties:
- key:
- description: The label key that the selector
- applies to.
- type: string
- operator:
- description: Represents a key's relationship
- to a set of values. Valid operators are In,
- NotIn, Exists, DoesNotExist. Gt, and Lt.
- type: string
- values:
- description: An array of string values. If the
- operator is In or NotIn, the values array
- must be non-empty. If the operator is Exists
- or DoesNotExist, the values array must be
- empty. If the operator is Gt or Lt, the values
- array must have a single element, which will
- be interpreted as an integer. This array is
- replaced during a strategic merge patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- type: object
- type: array
- required:
- - nodeSelectorTerms
- type: object
- type: object
- podAffinity:
- description: Describes pod affinity scheduling rules (e.g. co-locate
- this pod in the same node, zone, etc. as some other pod(s)).
- properties:
- preferredDuringSchedulingIgnoredDuringExecution:
- description: The scheduler will prefer to schedule pods to nodes
- that satisfy the affinity expressions specified by this field,
- but it may choose a node that violates one or more of the
- expressions. The node that is most preferred is the one with
- the greatest sum of weights, i.e. for each node that meets
- all of the scheduling requirements (resource request, requiredDuringScheduling
- affinity expressions, etc.), compute a sum by iterating through
- the elements of this field and adding "weight" to the sum
- if the node has pods which matches the corresponding podAffinityTerm;
- the node(s) with the highest sum are the most preferred.
- items:
- description: The weights of all of the matched WeightedPodAffinityTerm
- fields are added per-node to find the most preferred node(s)
- properties:
- podAffinityTerm:
- description: Required. A pod affinity term, associated
- with the corresponding weight.
- properties:
- labelSelector:
- description: A label query over a set of resources,
- in this case pods.
- properties:
- matchExpressions:
- description: matchExpressions is a list of label
- selector requirements. The requirements are
- ANDed.
- items:
- description: A label selector requirement is
- a selector that contains values, a key, and
- an operator that relates the key and values.
- properties:
- key:
- description: key is the label key that the
- selector applies to.
- type: string
- operator:
- description: operator represents a key's
- relationship to a set of values. Valid
- operators are In, NotIn, Exists and DoesNotExist.
- type: string
- values:
- description: values is an array of string
- values. If the operator is In or NotIn,
- the values array must be non-empty. If
- the operator is Exists or DoesNotExist,
- the values array must be empty. This array
- is replaced during a strategic merge patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- matchLabels:
- additionalProperties:
- type: string
- description: matchLabels is a map of {key,value}
- pairs. A single {key,value} in the matchLabels
- map is equivalent to an element of matchExpressions,
- whose key field is "key", the operator is "In",
- and the values array contains only "value".
- The requirements are ANDed.
- type: object
- type: object
- namespaces:
- description: namespaces specifies which namespaces
- the labelSelector applies to (matches against);
- null or empty list means "this pod's namespace"
- items:
- type: string
- type: array
- topologyKey:
- description: This pod should be co-located (affinity)
- or not co-located (anti-affinity) with the pods
- matching the labelSelector in the specified namespaces,
- where co-located is defined as running on a node
- whose value of the label with key topologyKey matches
- that of any node on which any of the selected pods
- is running. Empty topologyKey is not allowed.
- type: string
- required:
- - topologyKey
- type: object
- weight:
- description: weight associated with matching the corresponding
- podAffinityTerm, in the range 1-100.
- format: int32
- type: integer
- required:
- - podAffinityTerm
- - weight
- type: object
- type: array
- requiredDuringSchedulingIgnoredDuringExecution:
- description: If the affinity requirements specified by this
- field are not met at scheduling time, the pod will not be
- scheduled onto the node. If the affinity requirements specified
- by this field cease to be met at some point during pod execution
- (e.g. due to a pod label update), the system may or may not
- try to eventually evict the pod from its node. When there
- are multiple elements, the lists of nodes corresponding to
- each podAffinityTerm are intersected, i.e. all terms must
- be satisfied.
- items:
- description: Defines a set of pods (namely those matching
- the labelSelector relative to the given namespace(s)) that
- this pod should be co-located (affinity) or not co-located
- (anti-affinity) with, where co-located is defined as running
- on a node whose value of the label with key
- matches that of any node on which a pod of the set of pods
- is running
- properties:
- labelSelector:
- description: A label query over a set of resources, in
- this case pods.
- properties:
- matchExpressions:
- description: matchExpressions is a list of label selector
- requirements. The requirements are ANDed.
- items:
- description: A label selector requirement is a selector
- that contains values, a key, and an operator that
- relates the key and values.
- properties:
- key:
- description: key is the label key that the selector
- applies to.
- type: string
- operator:
- description: operator represents a key's relationship
- to a set of values. Valid operators are In,
- NotIn, Exists and DoesNotExist.
- type: string
- values:
- description: values is an array of string values.
- If the operator is In or NotIn, the values
- array must be non-empty. If the operator is
- Exists or DoesNotExist, the values array must
- be empty. This array is replaced during a
- strategic merge patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- matchLabels:
- additionalProperties:
- type: string
- description: matchLabels is a map of {key,value} pairs.
- A single {key,value} in the matchLabels map is equivalent
- to an element of matchExpressions, whose key field
- is "key", the operator is "In", and the values array
- contains only "value". The requirements are ANDed.
- type: object
- type: object
- namespaces:
- description: namespaces specifies which namespaces the
- labelSelector applies to (matches against); null or
- empty list means "this pod's namespace"
- items:
- type: string
- type: array
- topologyKey:
- description: This pod should be co-located (affinity)
- or not co-located (anti-affinity) with the pods matching
- the labelSelector in the specified namespaces, where
- co-located is defined as running on a node whose value
- of the label with key topologyKey matches that of any
- node on which any of the selected pods is running. Empty
- topologyKey is not allowed.
- type: string
- required:
- - topologyKey
- type: object
- type: array
- type: object
- podAntiAffinity:
- description: Describes pod anti-affinity scheduling rules (e.g.
- avoid putting this pod in the same node, zone, etc. as some other
- pod(s)).
- properties:
- preferredDuringSchedulingIgnoredDuringExecution:
- description: The scheduler will prefer to schedule pods to nodes
- that satisfy the anti-affinity expressions specified by this
- field, but it may choose a node that violates one or more
- of the expressions. The node that is most preferred is the
- one with the greatest sum of weights, i.e. for each node that
- meets all of the scheduling requirements (resource request,
- requiredDuringScheduling anti-affinity expressions, etc.),
- compute a sum by iterating through the elements of this field
- and adding "weight" to the sum if the node has pods which
- matches the corresponding podAffinityTerm; the node(s) with
- the highest sum are the most preferred.
- items:
- description: The weights of all of the matched WeightedPodAffinityTerm
- fields are added per-node to find the most preferred node(s)
- properties:
- podAffinityTerm:
- description: Required. A pod affinity term, associated
- with the corresponding weight.
- properties:
- labelSelector:
- description: A label query over a set of resources,
- in this case pods.
- properties:
- matchExpressions:
- description: matchExpressions is a list of label
- selector requirements. The requirements are
- ANDed.
- items:
- description: A label selector requirement is
- a selector that contains values, a key, and
- an operator that relates the key and values.
- properties:
- key:
- description: key is the label key that the
- selector applies to.
- type: string
- operator:
- description: operator represents a key's
- relationship to a set of values. Valid
- operators are In, NotIn, Exists and DoesNotExist.
- type: string
- values:
- description: values is an array of string
- values. If the operator is In or NotIn,
- the values array must be non-empty. If
- the operator is Exists or DoesNotExist,
- the values array must be empty. This array
- is replaced during a strategic merge patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- matchLabels:
- additionalProperties:
- type: string
- description: matchLabels is a map of {key,value}
- pairs. A single {key,value} in the matchLabels
- map is equivalent to an element of matchExpressions,
- whose key field is "key", the operator is "In",
- and the values array contains only "value".
- The requirements are ANDed.
- type: object
- type: object
- namespaces:
- description: namespaces specifies which namespaces
- the labelSelector applies to (matches against);
- null or empty list means "this pod's namespace"
- items:
- type: string
- type: array
- topologyKey:
- description: This pod should be co-located (affinity)
- or not co-located (anti-affinity) with the pods
- matching the labelSelector in the specified namespaces,
- where co-located is defined as running on a node
- whose value of the label with key topologyKey matches
- that of any node on which any of the selected pods
- is running. Empty topologyKey is not allowed.
- type: string
- required:
- - topologyKey
- type: object
- weight:
- description: weight associated with matching the corresponding
- podAffinityTerm, in the range 1-100.
- format: int32
- type: integer
- required:
- - podAffinityTerm
- - weight
- type: object
- type: array
- requiredDuringSchedulingIgnoredDuringExecution:
- description: If the anti-affinity requirements specified by
- this field are not met at scheduling time, the pod will not
- be scheduled onto the node. If the anti-affinity requirements
- specified by this field cease to be met at some point during
- pod execution (e.g. due to a pod label update), the system
- may or may not try to eventually evict the pod from its node.
- When there are multiple elements, the lists of nodes corresponding
- to each podAffinityTerm are intersected, i.e. all terms must
- be satisfied.
- items:
- description: Defines a set of pods (namely those matching
- the labelSelector relative to the given namespace(s)) that
- this pod should be co-located (affinity) or not co-located
- (anti-affinity) with, where co-located is defined as running
- on a node whose value of the label with key
- matches that of any node on which a pod of the set of pods
- is running
- properties:
- labelSelector:
- description: A label query over a set of resources, in
- this case pods.
- properties:
- matchExpressions:
- description: matchExpressions is a list of label selector
- requirements. The requirements are ANDed.
- items:
- description: A label selector requirement is a selector
- that contains values, a key, and an operator that
- relates the key and values.
- properties:
- key:
- description: key is the label key that the selector
- applies to.
- type: string
- operator:
- description: operator represents a key's relationship
- to a set of values. Valid operators are In,
- NotIn, Exists and DoesNotExist.
- type: string
- values:
- description: values is an array of string values.
- If the operator is In or NotIn, the values
- array must be non-empty. If the operator is
- Exists or DoesNotExist, the values array must
- be empty. This array is replaced during a
- strategic merge patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- matchLabels:
- additionalProperties:
- type: string
- description: matchLabels is a map of {key,value} pairs.
- A single {key,value} in the matchLabels map is equivalent
- to an element of matchExpressions, whose key field
- is "key", the operator is "In", and the values array
- contains only "value". The requirements are ANDed.
- type: object
- type: object
- namespaces:
- description: namespaces specifies which namespaces the
- labelSelector applies to (matches against); null or
- empty list means "this pod's namespace"
- items:
- type: string
- type: array
- topologyKey:
- description: This pod should be co-located (affinity)
- or not co-located (anti-affinity) with the pods matching
- the labelSelector in the specified namespaces, where
- co-located is defined as running on a node whose value
- of the label with key topologyKey matches that of any
- node on which any of the selected pods is running. Empty
- topologyKey is not allowed.
- type: string
- required:
- - topologyKey
- type: object
- type: array
- type: object
- type: object
- alerting:
- description: Define details regarding alerting.
- properties:
- alertmanagers:
- description: AlertmanagerEndpoints Prometheus should fire alerts
- against.
- items:
- description: AlertmanagerEndpoints defines a selection of a single
- Endpoints object containing alertmanager IPs to fire alerts
- against.
- properties:
- apiVersion:
- description: Version of the Alertmanager API that Prometheus
- uses to send alerts. It can be "v1" or "v2".
- type: string
- bearerTokenFile:
- description: BearerTokenFile to read from filesystem to use
- when authenticating to Alertmanager.
- type: string
- name:
- description: Name of Endpoints object in Namespace.
- type: string
- namespace:
- description: Namespace of Endpoints object.
- type: string
- pathPrefix:
- description: Prefix for the HTTP path alerts are pushed to.
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Port the Alertmanager API is exposed on.
- x-kubernetes-int-or-string: true
- scheme:
- description: Scheme to use when firing alerts.
- type: string
- tlsConfig:
- description: TLS Config to use for alertmanager connection.
- properties:
- ca:
- description: Stuct containing the CA cert to use for the
- targets.
- properties:
- configMap:
- description: ConfigMap containing data to use for
- the targets.
- properties:
- key:
- description: The key to select.
- type: string
- name:
- description: 'Name of the referent. More info:
- https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the ConfigMap or
- its key must be defined
- type: boolean
- required:
- - key
- type: object
- secret:
- description: Secret containing data to use for the
- targets.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info:
- https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the Secret or its
- key must be defined
- type: boolean
- required:
- - key
- type: object
- type: object
- caFile:
- description: Path to the CA cert in the Prometheus container
- to use for the targets.
- type: string
- cert:
- description: Struct containing the client cert file for
- the targets.
- properties:
- configMap:
- description: ConfigMap containing data to use for
- the targets.
- properties:
- key:
- description: The key to select.
- type: string
- name:
- description: 'Name of the referent. More info:
- https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the ConfigMap or
- its key must be defined
- type: boolean
- required:
- - key
- type: object
- secret:
- description: Secret containing data to use for the
- targets.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info:
- https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the Secret or its
- key must be defined
- type: boolean
- required:
- - key
- type: object
- type: object
- certFile:
- description: Path to the client cert file in the Prometheus
- container for the targets.
- type: string
- insecureSkipVerify:
- description: Disable target certificate validation.
- type: boolean
- keyFile:
- description: Path to the client key file in the Prometheus
- container for the targets.
- type: string
- keySecret:
- description: Secret containing the client key file for
- the targets.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key
- must be defined
- type: boolean
- required:
- - key
- type: object
- serverName:
- description: Used to verify the hostname for the targets.
- type: string
- type: object
- required:
- - name
- - namespace
- - port
- type: object
- type: array
- required:
- - alertmanagers
- type: object
- apiserverConfig:
- description: APIServerConfig allows specifying a host and auth methods
- to access apiserver. If left empty, Prometheus is assumed to run inside
- of the cluster and will discover API servers automatically and use
- the pod's CA certificate and bearer token file at /var/run/secrets/kubernetes.io/serviceaccount/.
- properties:
- basicAuth:
- description: BasicAuth allow an endpoint to authenticate over basic
- authentication
- properties:
- password:
- description: The secret in the service monitor namespace that
- contains the password for authentication.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- username:
- description: The secret in the service monitor namespace that
- contains the username for authentication.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- type: object
- bearerToken:
- description: Bearer token for accessing apiserver.
- type: string
- bearerTokenFile:
- description: File to read bearer token for accessing apiserver.
- type: string
- host:
- description: Host of apiserver. A valid string consisting of a hostname
- or IP followed by an optional port number
- type: string
- tlsConfig:
- description: TLS Config to use for accessing apiserver.
- properties:
- ca:
- description: Stuct containing the CA cert to use for the targets.
- properties:
- configMap:
- description: ConfigMap containing data to use for the targets.
- properties:
- key:
- description: The key to select.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the ConfigMap or its key
- must be defined
- type: boolean
- required:
- - key
- type: object
- secret:
- description: Secret containing data to use for the targets.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- type: object
- caFile:
- description: Path to the CA cert in the Prometheus container
- to use for the targets.
- type: string
- cert:
- description: Struct containing the client cert file for the
- targets.
- properties:
- configMap:
- description: ConfigMap containing data to use for the targets.
- properties:
- key:
- description: The key to select.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the ConfigMap or its key
- must be defined
- type: boolean
- required:
- - key
- type: object
- secret:
- description: Secret containing data to use for the targets.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- type: object
- certFile:
- description: Path to the client cert file in the Prometheus
- container for the targets.
- type: string
- insecureSkipVerify:
- description: Disable target certificate validation.
- type: boolean
- keyFile:
- description: Path to the client key file in the Prometheus container
- for the targets.
- type: string
- keySecret:
- description: Secret containing the client key file for the targets.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- serverName:
- description: Used to verify the hostname for the targets.
- type: string
- type: object
- required:
- - host
- type: object
- arbitraryFSAccessThroughSMs:
- description: 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.
- properties:
- deny:
- type: boolean
- type: object
- baseImage:
- description: Base image to use for a Prometheus deployment.
- type: string
- configMaps:
- description: 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/.
- items:
- type: string
- type: array
- containers:
- description: 'Containers allows injecting additional containers or modifying
- operator generated containers. This can be used to allow adding an
- authentication proxy to a Prometheus pod or to change the behavior
- of an operator generated container. Containers described here modify
- an operator generated container if they share the same name and modifications
- are done via a strategic merge patch. The current container names
- are: `prometheus`, `prometheus-config-reloader`, `rules-configmap-reloader`,
- and `thanos-sidecar`. Overriding containers is entirely outside the
- scope of what the maintainers will support and by doing so, you accept
- that this behaviour may break at any time without notice.'
- items:
- description: A single application container that you want to run within
- a pod.
- properties:
- args:
- description: 'Arguments to the entrypoint. The docker image''s
- CMD is used if this is not provided. Variable references $(VAR_NAME)
- are expanded using the container''s environment. If a variable
- cannot be resolved, the reference in the input string will be
- unchanged. The $(VAR_NAME) syntax can be escaped with a double
- $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
- regardless of whether the variable exists or not. Cannot be
- updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'
- items:
- type: string
- type: array
- command:
- description: 'Entrypoint array. Not executed within a shell. The
- docker image''s ENTRYPOINT is used if this is not provided.
- Variable references $(VAR_NAME) are expanded using the container''s
- environment. If a variable cannot be resolved, the reference
- in the input string will be unchanged. The $(VAR_NAME) syntax
- can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references
- will never be expanded, regardless of whether the variable exists
- or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'
- items:
- type: string
- type: array
- env:
- description: List of environment variables to set in the container.
- Cannot be updated.
- items:
- description: EnvVar represents an environment variable present
- in a Container.
- properties:
- name:
- description: Name of the environment variable. Must be a
- C_IDENTIFIER.
- type: string
- value:
- description: 'Variable references $(VAR_NAME) are expanded
- using the previous defined environment variables in the
- container and any service environment variables. If a
- variable cannot be resolved, the reference in the input
- string will be unchanged. The $(VAR_NAME) syntax can be
- escaped with a double $$, ie: $$(VAR_NAME). Escaped references
- will never be expanded, regardless of whether the variable
- exists or not. Defaults to "".'
- type: string
- valueFrom:
- description: Source for the environment variable's value.
- Cannot be used if value is not empty.
- properties:
- configMapKeyRef:
- description: Selects a key of a ConfigMap.
- properties:
- key:
- description: The key to select.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the ConfigMap or its
- key must be defined
- type: boolean
- required:
- - key
- type: object
- fieldRef:
- description: 'Selects a field of the pod: supports metadata.name,
- metadata.namespace, metadata.labels, metadata.annotations,
- spec.nodeName, spec.serviceAccountName, status.hostIP,
- status.podIP, status.podIPs.'
- properties:
- apiVersion:
- description: Version of the schema the FieldPath
- is written in terms of, defaults to "v1".
- type: string
- fieldPath:
- description: Path of the field to select in the
- specified API version.
- type: string
- required:
- - fieldPath
- type: object
- resourceFieldRef:
- description: 'Selects a resource of the container: only
- resources limits and requests (limits.cpu, limits.memory,
- limits.ephemeral-storage, requests.cpu, requests.memory
- and requests.ephemeral-storage) are currently supported.'
- properties:
- containerName:
- description: 'Container name: required for volumes,
- optional for env vars'
- type: string
- divisor:
- description: Specifies the output format of the
- exposed resources, defaults to "1"
- type: string
- resource:
- description: 'Required: resource to select'
- type: string
- required:
- - resource
- type: object
- secretKeyRef:
- description: Selects a key of a secret in the pod's
- namespace
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key
- must be defined
- type: boolean
- required:
- - key
- type: object
- type: object
- required:
- - name
- type: object
- type: array
- envFrom:
- description: List of sources to populate environment variables
- in the container. The keys defined within a source must be a
- C_IDENTIFIER. All invalid keys will be reported as an event
- when the container is starting. When a key exists in multiple
- sources, the value associated with the last source will take
- precedence. Values defined by an Env with a duplicate key will
- take precedence. Cannot be updated.
- items:
- description: EnvFromSource represents the source of a set of
- ConfigMaps
- properties:
- configMapRef:
- description: The ConfigMap to select from
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the ConfigMap must be defined
- type: boolean
- type: object
- prefix:
- description: An optional identifier to prepend to each key
- in the ConfigMap. Must be a C_IDENTIFIER.
- type: string
- secretRef:
- description: The Secret to select from
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret must be defined
- type: boolean
- type: object
- type: object
- type: array
- image:
- description: 'Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images
- This field is optional to allow higher level config management
- to default or override container images in workload controllers
- like Deployments and StatefulSets.'
- type: string
- imagePullPolicy:
- description: 'Image pull policy. One of Always, Never, IfNotPresent.
- Defaults to Always if :latest tag is specified, or IfNotPresent
- otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images'
- type: string
- lifecycle:
- description: Actions that the management system should take in
- response to container lifecycle events. Cannot be updated.
- properties:
- postStart:
- description: 'PostStart is called immediately after a container
- is created. If the handler fails, the container is terminated
- and restarted according to its restart policy. Other management
- of the container blocks until the hook completes. More info:
- https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks'
- properties:
- exec:
- description: One and only one of the following should
- be specified. Exec specifies the action to take.
- properties:
- command:
- description: Command is the command line to execute
- inside the container, the working directory for
- the command is root ('/') in the container's filesystem.
- The command is simply exec'd, it is not run inside
- a shell, so traditional shell instructions ('|',
- etc) won't work. To use a shell, you need to explicitly
- call out to that shell. Exit status of 0 is treated
- as live/healthy and non-zero is unhealthy.
- items:
- type: string
- type: array
- type: object
- httpGet:
- description: HTTPGet specifies the http request to perform.
- properties:
- host:
- description: Host name to connect to, defaults to
- the pod IP. You probably want to set "Host" in httpHeaders
- instead.
- type: string
- httpHeaders:
- description: Custom headers to set in the request.
- HTTP allows repeated headers.
- items:
- description: HTTPHeader describes a custom header
- to be used in HTTP probes
- properties:
- name:
- description: The header field name
- type: string
- value:
- description: The header field value
- type: string
- required:
- - name
- - value
- type: object
- type: array
- path:
- description: Path to access on the HTTP server.
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Name or number of the port to access
- on the container. Number must be in the range 1
- to 65535. Name must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- scheme:
- description: Scheme to use for connecting to the host.
- Defaults to HTTP.
- type: string
- required:
- - port
- type: object
- tcpSocket:
- description: 'TCPSocket specifies an action involving
- a TCP port. TCP hooks not yet supported TODO: implement
- a realistic TCP lifecycle hook'
- properties:
- host:
- description: 'Optional: Host name to connect to, defaults
- to the pod IP.'
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Number or name of the port to access
- on the container. Number must be in the range 1
- to 65535. Name must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- required:
- - port
- type: object
- type: object
- preStop:
- description: 'PreStop is called immediately before a container
- is terminated due to an API request or management event
- such as liveness/startup probe failure, preemption, resource
- contention, etc. The handler is not called if the container
- crashes or exits. The reason for termination is passed to
- the handler. The Pod''s termination grace period countdown
- begins before the PreStop hooked is executed. Regardless
- of the outcome of the handler, the container will eventually
- terminate within the Pod''s termination grace period. Other
- management of the container blocks until the hook completes
- or until the termination grace period is reached. More info:
- https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks'
- properties:
- exec:
- description: One and only one of the following should
- be specified. Exec specifies the action to take.
- properties:
- command:
- description: Command is the command line to execute
- inside the container, the working directory for
- the command is root ('/') in the container's filesystem.
- The command is simply exec'd, it is not run inside
- a shell, so traditional shell instructions ('|',
- etc) won't work. To use a shell, you need to explicitly
- call out to that shell. Exit status of 0 is treated
- as live/healthy and non-zero is unhealthy.
- items:
- type: string
- type: array
- type: object
- httpGet:
- description: HTTPGet specifies the http request to perform.
- properties:
- host:
- description: Host name to connect to, defaults to
- the pod IP. You probably want to set "Host" in httpHeaders
- instead.
- type: string
- httpHeaders:
- description: Custom headers to set in the request.
- HTTP allows repeated headers.
- items:
- description: HTTPHeader describes a custom header
- to be used in HTTP probes
- properties:
- name:
- description: The header field name
- type: string
- value:
- description: The header field value
- type: string
- required:
- - name
- - value
- type: object
- type: array
- path:
- description: Path to access on the HTTP server.
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Name or number of the port to access
- on the container. Number must be in the range 1
- to 65535. Name must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- scheme:
- description: Scheme to use for connecting to the host.
- Defaults to HTTP.
- type: string
- required:
- - port
- type: object
- tcpSocket:
- description: 'TCPSocket specifies an action involving
- a TCP port. TCP hooks not yet supported TODO: implement
- a realistic TCP lifecycle hook'
- properties:
- host:
- description: 'Optional: Host name to connect to, defaults
- to the pod IP.'
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Number or name of the port to access
- on the container. Number must be in the range 1
- to 65535. Name must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- required:
- - port
- type: object
- type: object
- type: object
- livenessProbe:
- description: 'Periodic probe of container liveness. Container
- will be restarted if the probe fails. Cannot be updated. More
- info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- properties:
- exec:
- description: One and only one of the following should be specified.
- Exec specifies the action to take.
- properties:
- command:
- description: Command is the command line to execute inside
- the container, the working directory for the command is
- root ('/') in the container's filesystem. The command
- is simply exec'd, it is not run inside a shell, so traditional
- shell instructions ('|', etc) won't work. To use a shell,
- you need to explicitly call out to that shell. Exit
- status of 0 is treated as live/healthy and non-zero
- is unhealthy.
- items:
- type: string
- type: array
- type: object
- failureThreshold:
- description: Minimum consecutive failures for the probe to
- be considered failed after having succeeded. Defaults to
- 3. Minimum value is 1.
- format: int32
- type: integer
- httpGet:
- description: HTTPGet specifies the http request to perform.
- properties:
- host:
- description: Host name to connect to, defaults to the
- pod IP. You probably want to set "Host" in httpHeaders
- instead.
- type: string
- httpHeaders:
- description: Custom headers to set in the request. HTTP
- allows repeated headers.
- items:
- description: HTTPHeader describes a custom header to
- be used in HTTP probes
- properties:
- name:
- description: The header field name
- type: string
- value:
- description: The header field value
- type: string
- required:
- - name
- - value
- type: object
- type: array
- path:
- description: Path to access on the HTTP server.
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Name or number of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- scheme:
- description: Scheme to use for connecting to the host.
- Defaults to HTTP.
- type: string
- required:
- - port
- type: object
- initialDelaySeconds:
- description: 'Number of seconds after the container has started
- before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- periodSeconds:
- description: How often (in seconds) to perform the probe.
- Default to 10 seconds. Minimum value is 1.
- format: int32
- type: integer
- successThreshold:
- description: Minimum consecutive successes for the probe to
- be considered successful after having failed. Defaults to
- 1. Must be 1 for liveness and startup. Minimum value is
- 1.
- format: int32
- type: integer
- tcpSocket:
- description: 'TCPSocket specifies an action involving a TCP
- port. TCP hooks not yet supported TODO: implement a realistic
- TCP lifecycle hook'
- properties:
- host:
- description: 'Optional: Host name to connect to, defaults
- to the pod IP.'
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Number or name of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- required:
- - port
- type: object
- timeoutSeconds:
- description: 'Number of seconds after which the probe times
- out. Defaults to 1 second. Minimum value is 1. More info:
- https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- type: object
- name:
- description: Name of the container specified as a DNS_LABEL. Each
- container in a pod must have a unique name (DNS_LABEL). Cannot
- be updated.
- type: string
- ports:
- description: List of ports to expose from the container. Exposing
- a port here gives the system additional information about the
- network connections a container uses, but is primarily informational.
- Not specifying a port here DOES NOT prevent that port from being
- exposed. Any port which is listening on the default "0.0.0.0"
- address inside a container will be accessible from the network.
- Cannot be updated.
- items:
- description: ContainerPort represents a network port in a single
- container.
- properties:
- containerPort:
- description: Number of port to expose on the pod's IP address.
- This must be a valid port number, 0 < x < 65536.
- format: int32
- type: integer
- hostIP:
- description: What host IP to bind the external port to.
- type: string
- hostPort:
- description: Number of port to expose on the host. If specified,
- this must be a valid port number, 0 < x < 65536. If HostNetwork
- is specified, this must match ContainerPort. Most containers
- do not need this.
- format: int32
- type: integer
- name:
- description: If specified, this must be an IANA_SVC_NAME
- and unique within the pod. Each named port in a pod must
- have a unique name. Name for the port that can be referred
- to by services.
- type: string
- protocol:
- description: Protocol for port. Must be UDP, TCP, or SCTP.
- Defaults to "TCP".
- type: string
- required:
- - containerPort
- type: object
- type: array
- readinessProbe:
- description: 'Periodic probe of container service readiness. Container
- will be removed from service endpoints if the probe fails. Cannot
- be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- properties:
- exec:
- description: One and only one of the following should be specified.
- Exec specifies the action to take.
- properties:
- command:
- description: Command is the command line to execute inside
- the container, the working directory for the command is
- root ('/') in the container's filesystem. The command
- is simply exec'd, it is not run inside a shell, so traditional
- shell instructions ('|', etc) won't work. To use a shell,
- you need to explicitly call out to that shell. Exit
- status of 0 is treated as live/healthy and non-zero
- is unhealthy.
- items:
- type: string
- type: array
- type: object
- failureThreshold:
- description: Minimum consecutive failures for the probe to
- be considered failed after having succeeded. Defaults to
- 3. Minimum value is 1.
- format: int32
- type: integer
- httpGet:
- description: HTTPGet specifies the http request to perform.
- properties:
- host:
- description: Host name to connect to, defaults to the
- pod IP. You probably want to set "Host" in httpHeaders
- instead.
- type: string
- httpHeaders:
- description: Custom headers to set in the request. HTTP
- allows repeated headers.
- items:
- description: HTTPHeader describes a custom header to
- be used in HTTP probes
- properties:
- name:
- description: The header field name
- type: string
- value:
- description: The header field value
- type: string
- required:
- - name
- - value
- type: object
- type: array
- path:
- description: Path to access on the HTTP server.
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Name or number of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- scheme:
- description: Scheme to use for connecting to the host.
- Defaults to HTTP.
- type: string
- required:
- - port
- type: object
- initialDelaySeconds:
- description: 'Number of seconds after the container has started
- before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- periodSeconds:
- description: How often (in seconds) to perform the probe.
- Default to 10 seconds. Minimum value is 1.
- format: int32
- type: integer
- successThreshold:
- description: Minimum consecutive successes for the probe to
- be considered successful after having failed. Defaults to
- 1. Must be 1 for liveness and startup. Minimum value is
- 1.
- format: int32
- type: integer
- tcpSocket:
- description: 'TCPSocket specifies an action involving a TCP
- port. TCP hooks not yet supported TODO: implement a realistic
- TCP lifecycle hook'
- properties:
- host:
- description: 'Optional: Host name to connect to, defaults
- to the pod IP.'
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Number or name of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- required:
- - port
- type: object
- timeoutSeconds:
- description: 'Number of seconds after which the probe times
- out. Defaults to 1 second. Minimum value is 1. More info:
- https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- type: object
- resources:
- description: 'Compute Resources required by this container. Cannot
- be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
- properties:
- limits:
- additionalProperties:
- type: string
- description: 'Limits describes the maximum amount of compute
- resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
- type: object
- requests:
- additionalProperties:
- type: string
- description: 'Requests describes the minimum amount of compute
- resources required. If Requests is omitted for a container,
- it defaults to Limits if that is explicitly specified, otherwise
- to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
- type: object
- type: object
- securityContext:
- description: 'Security options the pod should run with. More info:
- https://kubernetes.io/docs/concepts/policy/security-context/
- More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/'
- properties:
- allowPrivilegeEscalation:
- description: 'AllowPrivilegeEscalation controls whether a
- process can gain more privileges than its parent process.
- This bool directly controls if the no_new_privs flag will
- be set on the container process. AllowPrivilegeEscalation
- is true always when the container is: 1) run as Privileged
- 2) has CAP_SYS_ADMIN'
- type: boolean
- capabilities:
- description: The capabilities to add/drop when running containers.
- Defaults to the default set of capabilities granted by the
- container runtime.
- properties:
- add:
- description: Added capabilities
- items:
- description: Capability represent POSIX capabilities
- type
- type: string
- type: array
- drop:
- description: Removed capabilities
- items:
- description: Capability represent POSIX capabilities
- type
- type: string
- type: array
- type: object
- privileged:
- description: Run container in privileged mode. Processes in
- privileged containers are essentially equivalent to root
- on the host. Defaults to false.
- type: boolean
- procMount:
- description: procMount denotes the type of proc mount to use
- for the containers. The default is DefaultProcMount which
- uses the container runtime defaults for readonly paths and
- masked paths. This requires the ProcMountType feature flag
- to be enabled.
- type: string
- readOnlyRootFilesystem:
- description: Whether this container has a read-only root filesystem.
- Default is false.
- type: boolean
- runAsGroup:
- description: The GID to run the entrypoint of the container
- process. Uses runtime default if unset. May also be set
- in PodSecurityContext. If set in both SecurityContext and
- PodSecurityContext, the value specified in SecurityContext
- takes precedence.
- format: int64
- type: integer
- runAsNonRoot:
- description: Indicates that the container must run as a non-root
- user. If true, the Kubelet will validate the image at runtime
- to ensure that it does not run as UID 0 (root) and fail
- to start the container if it does. If unset or false, no
- such validation will be performed. May also be set in PodSecurityContext. If
- set in both SecurityContext and PodSecurityContext, the
- value specified in SecurityContext takes precedence.
- type: boolean
- runAsUser:
- description: The UID to run the entrypoint of the container
- process. Defaults to user specified in image metadata if
- unspecified. May also be set in PodSecurityContext. If
- set in both SecurityContext and PodSecurityContext, the
- value specified in SecurityContext takes precedence.
- format: int64
- type: integer
- seLinuxOptions:
- description: The SELinux context to be applied to the container.
- If unspecified, the container runtime will allocate a random
- SELinux context for each container. May also be set in
- PodSecurityContext. If set in both SecurityContext and
- PodSecurityContext, the value specified in SecurityContext
- takes precedence.
- properties:
- level:
- description: Level is SELinux level label that applies
- to the container.
- type: string
- role:
- description: Role is a SELinux role label that applies
- to the container.
- type: string
- type:
- description: Type is a SELinux type label that applies
- to the container.
- type: string
- user:
- description: User is a SELinux user label that applies
- to the container.
- type: string
- type: object
- windowsOptions:
- description: The Windows specific settings applied to all
- containers. If unspecified, the options from the PodSecurityContext
- will be used. If set in both SecurityContext and PodSecurityContext,
- the value specified in SecurityContext takes precedence.
- properties:
- gmsaCredentialSpec:
- description: GMSACredentialSpec is where the GMSA admission
- webhook (https://github.com/kubernetes-sigs/windows-gmsa)
- inlines the contents of the GMSA credential spec named
- by the GMSACredentialSpecName field. This field is alpha-level
- and is only honored by servers that enable the WindowsGMSA
- feature flag.
- type: string
- gmsaCredentialSpecName:
- description: GMSACredentialSpecName is the name of the
- GMSA credential spec to use. This field is alpha-level
- and is only honored by servers that enable the WindowsGMSA
- feature flag.
- type: string
- runAsUserName:
- description: The UserName in Windows to run the entrypoint
- of the container process. Defaults to the user specified
- in image metadata if unspecified. May also be set in
- PodSecurityContext. If set in both SecurityContext and
- PodSecurityContext, the value specified in SecurityContext
- takes precedence. This field is beta-level and may be
- disabled with the WindowsRunAsUserName feature flag.
- type: string
- type: object
- type: object
- startupProbe:
- description: 'StartupProbe indicates that the Pod has successfully
- initialized. If specified, no other probes are executed until
- this completes successfully. If this probe fails, the Pod will
- be restarted, just as if the livenessProbe failed. This can
- be used to provide different probe parameters at the beginning
- of a Pod''s lifecycle, when it might take a long time to load
- data or warm a cache, than during steady-state operation. This
- cannot be updated. This is an alpha feature enabled by the StartupProbe
- feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- properties:
- exec:
- description: One and only one of the following should be specified.
- Exec specifies the action to take.
- properties:
- command:
- description: Command is the command line to execute inside
- the container, the working directory for the command is
- root ('/') in the container's filesystem. The command
- is simply exec'd, it is not run inside a shell, so traditional
- shell instructions ('|', etc) won't work. To use a shell,
- you need to explicitly call out to that shell. Exit
- status of 0 is treated as live/healthy and non-zero
- is unhealthy.
- items:
- type: string
- type: array
- type: object
- failureThreshold:
- description: Minimum consecutive failures for the probe to
- be considered failed after having succeeded. Defaults to
- 3. Minimum value is 1.
- format: int32
- type: integer
- httpGet:
- description: HTTPGet specifies the http request to perform.
- properties:
- host:
- description: Host name to connect to, defaults to the
- pod IP. You probably want to set "Host" in httpHeaders
- instead.
- type: string
- httpHeaders:
- description: Custom headers to set in the request. HTTP
- allows repeated headers.
- items:
- description: HTTPHeader describes a custom header to
- be used in HTTP probes
- properties:
- name:
- description: The header field name
- type: string
- value:
- description: The header field value
- type: string
- required:
- - name
- - value
- type: object
- type: array
- path:
- description: Path to access on the HTTP server.
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Name or number of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- scheme:
- description: Scheme to use for connecting to the host.
- Defaults to HTTP.
- type: string
- required:
- - port
- type: object
- initialDelaySeconds:
- description: 'Number of seconds after the container has started
- before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- periodSeconds:
- description: How often (in seconds) to perform the probe.
- Default to 10 seconds. Minimum value is 1.
- format: int32
- type: integer
- successThreshold:
- description: Minimum consecutive successes for the probe to
- be considered successful after having failed. Defaults to
- 1. Must be 1 for liveness and startup. Minimum value is
- 1.
- format: int32
- type: integer
- tcpSocket:
- description: 'TCPSocket specifies an action involving a TCP
- port. TCP hooks not yet supported TODO: implement a realistic
- TCP lifecycle hook'
- properties:
- host:
- description: 'Optional: Host name to connect to, defaults
- to the pod IP.'
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Number or name of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- required:
- - port
- type: object
- timeoutSeconds:
- description: 'Number of seconds after which the probe times
- out. Defaults to 1 second. Minimum value is 1. More info:
- https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- type: object
- stdin:
- description: Whether this container should allocate a buffer for
- stdin in the container runtime. If this is not set, reads from
- stdin in the container will always result in EOF. Default is
- false.
- type: boolean
- stdinOnce:
- description: Whether the container runtime should close the stdin
- channel after it has been opened by a single attach. When stdin
- is true the stdin stream will remain open across multiple attach
- sessions. If stdinOnce is set to true, stdin is opened on container
- start, is empty until the first client attaches to stdin, and
- then remains open and accepts data until the client disconnects,
- at which time stdin is closed and remains closed until the container
- is restarted. If this flag is false, a container processes that
- reads from stdin will never receive an EOF. Default is false
- type: boolean
- terminationMessagePath:
- description: 'Optional: Path at which the file to which the container''s
- termination message will be written is mounted into the container''s
- filesystem. Message written is intended to be brief final status,
- such as an assertion failure message. Will be truncated by the
- node if greater than 4096 bytes. The total message length across
- all containers will be limited to 12kb. Defaults to /dev/termination-log.
- Cannot be updated.'
- type: string
- terminationMessagePolicy:
- description: Indicate how the termination message should be populated.
- File will use the contents of terminationMessagePath to populate
- the container status message on both success and failure. FallbackToLogsOnError
- will use the last chunk of container log output if the termination
- message file is empty and the container exited with an error.
- The log output is limited to 2048 bytes or 80 lines, whichever
- is smaller. Defaults to File. Cannot be updated.
- type: string
- tty:
- description: Whether this container should allocate a TTY for
- itself, also requires 'stdin' to be true. Default is false.
- type: boolean
- volumeDevices:
- description: volumeDevices is the list of block devices to be
- used by the container. This is a beta feature.
- items:
- description: volumeDevice describes a mapping of a raw block
- device within a container.
- properties:
- devicePath:
- description: devicePath is the path inside of the container
- that the device will be mapped to.
- type: string
- name:
- description: name must match the name of a persistentVolumeClaim
- in the pod
- type: string
- required:
- - devicePath
- - name
- type: object
- type: array
- volumeMounts:
- description: Pod volumes to mount into the container's filesystem.
- Cannot be updated.
- items:
- description: VolumeMount describes a mounting of a Volume within
- a container.
- properties:
- mountPath:
- description: Path within the container at which the volume
- should be mounted. Must not contain ':'.
- type: string
- mountPropagation:
- description: mountPropagation determines how mounts are
- propagated from the host to container and the other way
- around. When not set, MountPropagationNone is used. This
- field is beta in 1.10.
- type: string
- name:
- description: This must match the Name of a Volume.
- type: string
- readOnly:
- description: Mounted read-only if true, read-write otherwise
- (false or unspecified). Defaults to false.
- type: boolean
- subPath:
- description: Path within the volume from which the container's
- volume should be mounted. Defaults to "" (volume's root).
- type: string
- subPathExpr:
- description: Expanded path within the volume from which
- the container's volume should be mounted. Behaves similarly
- to SubPath but environment variable references $(VAR_NAME)
- are expanded using the container's environment. Defaults
- to "" (volume's root). SubPathExpr and SubPath are mutually
- exclusive.
- type: string
- required:
- - mountPath
- - name
- type: object
- type: array
- workingDir:
- description: Container's working directory. If not specified,
- the container runtime's default will be used, which might be
- configured in the container image. Cannot be updated.
- type: string
- required:
- - name
- type: object
- type: array
- disableCompaction:
- description: Disable prometheus compaction.
- type: boolean
- enableAdminAPI:
- description: 'Enable access to prometheus web admin API. Defaults to
- the value of `false`. WARNING: Enabling the admin APIs enables mutating
- endpoints, to delete data, shutdown Prometheus, and more. Enabling
- this should be done with care and the user is advised to add additional
- authentication authorization via a proxy to ensure only clients authorized
- to perform these actions can do so. For more information see https://prometheus.io/docs/prometheus/latest/querying/api/#tsdb-admin-apis'
- type: boolean
- enforcedNamespaceLabel:
- description: 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.
- type: string
- evaluationInterval:
- description: Interval between consecutive evaluations.
- type: string
- externalLabels:
- additionalProperties:
- type: string
- description: The labels to add to any time series or alerts when communicating
- with external systems (federation, remote storage, Alertmanager).
- type: object
- externalUrl:
- description: The external URL the Prometheus instances will be available
- under. This is necessary to generate correct URLs. This is necessary
- if Prometheus is not served from root of a DNS name.
- type: string
- ignoreNamespaceSelectors:
- description: IgnoreNamespaceSelectors if set to true will ignore NamespaceSelector
- settings from the podmonitor and servicemonitor configs, and they
- will only discover endpoints within their current namespace. Defaults
- to false.
- type: boolean
- image:
- description: Image if specified has precedence over baseImage, tag and
- sha combinations. Specifying the version is still necessary to ensure
- the Prometheus Operator knows what version of Prometheus is being
- configured.
- type: string
- imagePullSecrets:
- description: An optional list of references to secrets in the same namespace
- to use for pulling prometheus and alertmanager images from registries
- see http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod
- items:
- description: LocalObjectReference contains enough information to let
- you locate the referenced object inside the same namespace.
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- type: object
- type: array
- initContainers:
- description: 'InitContainers allows adding initContainers to the pod
- definition. Those can be used to e.g. fetch secrets for injection
- into the Prometheus configuration from external sources. Any errors
- during the execution of an initContainer will lead to a restart of
- the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
- Using initContainers for any use case other then secret fetching is
- entirely outside the scope of what the maintainers will support and
- by doing so, you accept that this behaviour may break at any time
- without notice.'
- items:
- description: A single application container that you want to run within
- a pod.
- properties:
- args:
- description: 'Arguments to the entrypoint. The docker image''s
- CMD is used if this is not provided. Variable references $(VAR_NAME)
- are expanded using the container''s environment. If a variable
- cannot be resolved, the reference in the input string will be
- unchanged. The $(VAR_NAME) syntax can be escaped with a double
- $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
- regardless of whether the variable exists or not. Cannot be
- updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'
- items:
- type: string
- type: array
- command:
- description: 'Entrypoint array. Not executed within a shell. The
- docker image''s ENTRYPOINT is used if this is not provided.
- Variable references $(VAR_NAME) are expanded using the container''s
- environment. If a variable cannot be resolved, the reference
- in the input string will be unchanged. The $(VAR_NAME) syntax
- can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references
- will never be expanded, regardless of whether the variable exists
- or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'
- items:
- type: string
- type: array
- env:
- description: List of environment variables to set in the container.
- Cannot be updated.
- items:
- description: EnvVar represents an environment variable present
- in a Container.
- properties:
- name:
- description: Name of the environment variable. Must be a
- C_IDENTIFIER.
- type: string
- value:
- description: 'Variable references $(VAR_NAME) are expanded
- using the previous defined environment variables in the
- container and any service environment variables. If a
- variable cannot be resolved, the reference in the input
- string will be unchanged. The $(VAR_NAME) syntax can be
- escaped with a double $$, ie: $$(VAR_NAME). Escaped references
- will never be expanded, regardless of whether the variable
- exists or not. Defaults to "".'
- type: string
- valueFrom:
- description: Source for the environment variable's value.
- Cannot be used if value is not empty.
- properties:
- configMapKeyRef:
- description: Selects a key of a ConfigMap.
- properties:
- key:
- description: The key to select.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the ConfigMap or its
- key must be defined
- type: boolean
- required:
- - key
- type: object
- fieldRef:
- description: 'Selects a field of the pod: supports metadata.name,
- metadata.namespace, metadata.labels, metadata.annotations,
- spec.nodeName, spec.serviceAccountName, status.hostIP,
- status.podIP, status.podIPs.'
- properties:
- apiVersion:
- description: Version of the schema the FieldPath
- is written in terms of, defaults to "v1".
- type: string
- fieldPath:
- description: Path of the field to select in the
- specified API version.
- type: string
- required:
- - fieldPath
- type: object
- resourceFieldRef:
- description: 'Selects a resource of the container: only
- resources limits and requests (limits.cpu, limits.memory,
- limits.ephemeral-storage, requests.cpu, requests.memory
- and requests.ephemeral-storage) are currently supported.'
- properties:
- containerName:
- description: 'Container name: required for volumes,
- optional for env vars'
- type: string
- divisor:
- description: Specifies the output format of the
- exposed resources, defaults to "1"
- type: string
- resource:
- description: 'Required: resource to select'
- type: string
- required:
- - resource
- type: object
- secretKeyRef:
- description: Selects a key of a secret in the pod's
- namespace
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key
- must be defined
- type: boolean
- required:
- - key
- type: object
- type: object
- required:
- - name
- type: object
- type: array
- envFrom:
- description: List of sources to populate environment variables
- in the container. The keys defined within a source must be a
- C_IDENTIFIER. All invalid keys will be reported as an event
- when the container is starting. When a key exists in multiple
- sources, the value associated with the last source will take
- precedence. Values defined by an Env with a duplicate key will
- take precedence. Cannot be updated.
- items:
- description: EnvFromSource represents the source of a set of
- ConfigMaps
- properties:
- configMapRef:
- description: The ConfigMap to select from
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the ConfigMap must be defined
- type: boolean
- type: object
- prefix:
- description: An optional identifier to prepend to each key
- in the ConfigMap. Must be a C_IDENTIFIER.
- type: string
- secretRef:
- description: The Secret to select from
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret must be defined
- type: boolean
- type: object
- type: object
- type: array
- image:
- description: 'Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images
- This field is optional to allow higher level config management
- to default or override container images in workload controllers
- like Deployments and StatefulSets.'
- type: string
- imagePullPolicy:
- description: 'Image pull policy. One of Always, Never, IfNotPresent.
- Defaults to Always if :latest tag is specified, or IfNotPresent
- otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images'
- type: string
- lifecycle:
- description: Actions that the management system should take in
- response to container lifecycle events. Cannot be updated.
- properties:
- postStart:
- description: 'PostStart is called immediately after a container
- is created. If the handler fails, the container is terminated
- and restarted according to its restart policy. Other management
- of the container blocks until the hook completes. More info:
- https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks'
- properties:
- exec:
- description: One and only one of the following should
- be specified. Exec specifies the action to take.
- properties:
- command:
- description: Command is the command line to execute
- inside the container, the working directory for
- the command is root ('/') in the container's filesystem.
- The command is simply exec'd, it is not run inside
- a shell, so traditional shell instructions ('|',
- etc) won't work. To use a shell, you need to explicitly
- call out to that shell. Exit status of 0 is treated
- as live/healthy and non-zero is unhealthy.
- items:
- type: string
- type: array
- type: object
- httpGet:
- description: HTTPGet specifies the http request to perform.
- properties:
- host:
- description: Host name to connect to, defaults to
- the pod IP. You probably want to set "Host" in httpHeaders
- instead.
- type: string
- httpHeaders:
- description: Custom headers to set in the request.
- HTTP allows repeated headers.
- items:
- description: HTTPHeader describes a custom header
- to be used in HTTP probes
- properties:
- name:
- description: The header field name
- type: string
- value:
- description: The header field value
- type: string
- required:
- - name
- - value
- type: object
- type: array
- path:
- description: Path to access on the HTTP server.
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Name or number of the port to access
- on the container. Number must be in the range 1
- to 65535. Name must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- scheme:
- description: Scheme to use for connecting to the host.
- Defaults to HTTP.
- type: string
- required:
- - port
- type: object
- tcpSocket:
- description: 'TCPSocket specifies an action involving
- a TCP port. TCP hooks not yet supported TODO: implement
- a realistic TCP lifecycle hook'
- properties:
- host:
- description: 'Optional: Host name to connect to, defaults
- to the pod IP.'
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Number or name of the port to access
- on the container. Number must be in the range 1
- to 65535. Name must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- required:
- - port
- type: object
- type: object
- preStop:
- description: 'PreStop is called immediately before a container
- is terminated due to an API request or management event
- such as liveness/startup probe failure, preemption, resource
- contention, etc. The handler is not called if the container
- crashes or exits. The reason for termination is passed to
- the handler. The Pod''s termination grace period countdown
- begins before the PreStop hooked is executed. Regardless
- of the outcome of the handler, the container will eventually
- terminate within the Pod''s termination grace period. Other
- management of the container blocks until the hook completes
- or until the termination grace period is reached. More info:
- https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks'
- properties:
- exec:
- description: One and only one of the following should
- be specified. Exec specifies the action to take.
- properties:
- command:
- description: Command is the command line to execute
- inside the container, the working directory for
- the command is root ('/') in the container's filesystem.
- The command is simply exec'd, it is not run inside
- a shell, so traditional shell instructions ('|',
- etc) won't work. To use a shell, you need to explicitly
- call out to that shell. Exit status of 0 is treated
- as live/healthy and non-zero is unhealthy.
- items:
- type: string
- type: array
- type: object
- httpGet:
- description: HTTPGet specifies the http request to perform.
- properties:
- host:
- description: Host name to connect to, defaults to
- the pod IP. You probably want to set "Host" in httpHeaders
- instead.
- type: string
- httpHeaders:
- description: Custom headers to set in the request.
- HTTP allows repeated headers.
- items:
- description: HTTPHeader describes a custom header
- to be used in HTTP probes
- properties:
- name:
- description: The header field name
- type: string
- value:
- description: The header field value
- type: string
- required:
- - name
- - value
- type: object
- type: array
- path:
- description: Path to access on the HTTP server.
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Name or number of the port to access
- on the container. Number must be in the range 1
- to 65535. Name must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- scheme:
- description: Scheme to use for connecting to the host.
- Defaults to HTTP.
- type: string
- required:
- - port
- type: object
- tcpSocket:
- description: 'TCPSocket specifies an action involving
- a TCP port. TCP hooks not yet supported TODO: implement
- a realistic TCP lifecycle hook'
- properties:
- host:
- description: 'Optional: Host name to connect to, defaults
- to the pod IP.'
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Number or name of the port to access
- on the container. Number must be in the range 1
- to 65535. Name must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- required:
- - port
- type: object
- type: object
- type: object
- livenessProbe:
- description: 'Periodic probe of container liveness. Container
- will be restarted if the probe fails. Cannot be updated. More
- info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- properties:
- exec:
- description: One and only one of the following should be specified.
- Exec specifies the action to take.
- properties:
- command:
- description: Command is the command line to execute inside
- the container, the working directory for the command is
- root ('/') in the container's filesystem. The command
- is simply exec'd, it is not run inside a shell, so traditional
- shell instructions ('|', etc) won't work. To use a shell,
- you need to explicitly call out to that shell. Exit
- status of 0 is treated as live/healthy and non-zero
- is unhealthy.
- items:
- type: string
- type: array
- type: object
- failureThreshold:
- description: Minimum consecutive failures for the probe to
- be considered failed after having succeeded. Defaults to
- 3. Minimum value is 1.
- format: int32
- type: integer
- httpGet:
- description: HTTPGet specifies the http request to perform.
- properties:
- host:
- description: Host name to connect to, defaults to the
- pod IP. You probably want to set "Host" in httpHeaders
- instead.
- type: string
- httpHeaders:
- description: Custom headers to set in the request. HTTP
- allows repeated headers.
- items:
- description: HTTPHeader describes a custom header to
- be used in HTTP probes
- properties:
- name:
- description: The header field name
- type: string
- value:
- description: The header field value
- type: string
- required:
- - name
- - value
- type: object
- type: array
- path:
- description: Path to access on the HTTP server.
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Name or number of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- scheme:
- description: Scheme to use for connecting to the host.
- Defaults to HTTP.
- type: string
- required:
- - port
- type: object
- initialDelaySeconds:
- description: 'Number of seconds after the container has started
- before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- periodSeconds:
- description: How often (in seconds) to perform the probe.
- Default to 10 seconds. Minimum value is 1.
- format: int32
- type: integer
- successThreshold:
- description: Minimum consecutive successes for the probe to
- be considered successful after having failed. Defaults to
- 1. Must be 1 for liveness and startup. Minimum value is
- 1.
- format: int32
- type: integer
- tcpSocket:
- description: 'TCPSocket specifies an action involving a TCP
- port. TCP hooks not yet supported TODO: implement a realistic
- TCP lifecycle hook'
- properties:
- host:
- description: 'Optional: Host name to connect to, defaults
- to the pod IP.'
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Number or name of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- required:
- - port
- type: object
- timeoutSeconds:
- description: 'Number of seconds after which the probe times
- out. Defaults to 1 second. Minimum value is 1. More info:
- https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- type: object
- name:
- description: Name of the container specified as a DNS_LABEL. Each
- container in a pod must have a unique name (DNS_LABEL). Cannot
- be updated.
- type: string
- ports:
- description: List of ports to expose from the container. Exposing
- a port here gives the system additional information about the
- network connections a container uses, but is primarily informational.
- Not specifying a port here DOES NOT prevent that port from being
- exposed. Any port which is listening on the default "0.0.0.0"
- address inside a container will be accessible from the network.
- Cannot be updated.
- items:
- description: ContainerPort represents a network port in a single
- container.
- properties:
- containerPort:
- description: Number of port to expose on the pod's IP address.
- This must be a valid port number, 0 < x < 65536.
- format: int32
- type: integer
- hostIP:
- description: What host IP to bind the external port to.
- type: string
- hostPort:
- description: Number of port to expose on the host. If specified,
- this must be a valid port number, 0 < x < 65536. If HostNetwork
- is specified, this must match ContainerPort. Most containers
- do not need this.
- format: int32
- type: integer
- name:
- description: If specified, this must be an IANA_SVC_NAME
- and unique within the pod. Each named port in a pod must
- have a unique name. Name for the port that can be referred
- to by services.
- type: string
- protocol:
- description: Protocol for port. Must be UDP, TCP, or SCTP.
- Defaults to "TCP".
- type: string
- required:
- - containerPort
- type: object
- type: array
- readinessProbe:
- description: 'Periodic probe of container service readiness. Container
- will be removed from service endpoints if the probe fails. Cannot
- be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- properties:
- exec:
- description: One and only one of the following should be specified.
- Exec specifies the action to take.
- properties:
- command:
- description: Command is the command line to execute inside
- the container, the working directory for the command is
- root ('/') in the container's filesystem. The command
- is simply exec'd, it is not run inside a shell, so traditional
- shell instructions ('|', etc) won't work. To use a shell,
- you need to explicitly call out to that shell. Exit
- status of 0 is treated as live/healthy and non-zero
- is unhealthy.
- items:
- type: string
- type: array
- type: object
- failureThreshold:
- description: Minimum consecutive failures for the probe to
- be considered failed after having succeeded. Defaults to
- 3. Minimum value is 1.
- format: int32
- type: integer
- httpGet:
- description: HTTPGet specifies the http request to perform.
- properties:
- host:
- description: Host name to connect to, defaults to the
- pod IP. You probably want to set "Host" in httpHeaders
- instead.
- type: string
- httpHeaders:
- description: Custom headers to set in the request. HTTP
- allows repeated headers.
- items:
- description: HTTPHeader describes a custom header to
- be used in HTTP probes
- properties:
- name:
- description: The header field name
- type: string
- value:
- description: The header field value
- type: string
- required:
- - name
- - value
- type: object
- type: array
- path:
- description: Path to access on the HTTP server.
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Name or number of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- scheme:
- description: Scheme to use for connecting to the host.
- Defaults to HTTP.
- type: string
- required:
- - port
- type: object
- initialDelaySeconds:
- description: 'Number of seconds after the container has started
- before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- periodSeconds:
- description: How often (in seconds) to perform the probe.
- Default to 10 seconds. Minimum value is 1.
- format: int32
- type: integer
- successThreshold:
- description: Minimum consecutive successes for the probe to
- be considered successful after having failed. Defaults to
- 1. Must be 1 for liveness and startup. Minimum value is
- 1.
- format: int32
- type: integer
- tcpSocket:
- description: 'TCPSocket specifies an action involving a TCP
- port. TCP hooks not yet supported TODO: implement a realistic
- TCP lifecycle hook'
- properties:
- host:
- description: 'Optional: Host name to connect to, defaults
- to the pod IP.'
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Number or name of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- required:
- - port
- type: object
- timeoutSeconds:
- description: 'Number of seconds after which the probe times
- out. Defaults to 1 second. Minimum value is 1. More info:
- https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- type: object
- resources:
- description: 'Compute Resources required by this container. Cannot
- be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
- properties:
- limits:
- additionalProperties:
- type: string
- description: 'Limits describes the maximum amount of compute
- resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
- type: object
- requests:
- additionalProperties:
- type: string
- description: 'Requests describes the minimum amount of compute
- resources required. If Requests is omitted for a container,
- it defaults to Limits if that is explicitly specified, otherwise
- to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
- type: object
- type: object
- securityContext:
- description: 'Security options the pod should run with. More info:
- https://kubernetes.io/docs/concepts/policy/security-context/
- More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/'
- properties:
- allowPrivilegeEscalation:
- description: 'AllowPrivilegeEscalation controls whether a
- process can gain more privileges than its parent process.
- This bool directly controls if the no_new_privs flag will
- be set on the container process. AllowPrivilegeEscalation
- is true always when the container is: 1) run as Privileged
- 2) has CAP_SYS_ADMIN'
- type: boolean
- capabilities:
- description: The capabilities to add/drop when running containers.
- Defaults to the default set of capabilities granted by the
- container runtime.
- properties:
- add:
- description: Added capabilities
- items:
- description: Capability represent POSIX capabilities
- type
- type: string
- type: array
- drop:
- description: Removed capabilities
- items:
- description: Capability represent POSIX capabilities
- type
- type: string
- type: array
- type: object
- privileged:
- description: Run container in privileged mode. Processes in
- privileged containers are essentially equivalent to root
- on the host. Defaults to false.
- type: boolean
- procMount:
- description: procMount denotes the type of proc mount to use
- for the containers. The default is DefaultProcMount which
- uses the container runtime defaults for readonly paths and
- masked paths. This requires the ProcMountType feature flag
- to be enabled.
- type: string
- readOnlyRootFilesystem:
- description: Whether this container has a read-only root filesystem.
- Default is false.
- type: boolean
- runAsGroup:
- description: The GID to run the entrypoint of the container
- process. Uses runtime default if unset. May also be set
- in PodSecurityContext. If set in both SecurityContext and
- PodSecurityContext, the value specified in SecurityContext
- takes precedence.
- format: int64
- type: integer
- runAsNonRoot:
- description: Indicates that the container must run as a non-root
- user. If true, the Kubelet will validate the image at runtime
- to ensure that it does not run as UID 0 (root) and fail
- to start the container if it does. If unset or false, no
- such validation will be performed. May also be set in PodSecurityContext. If
- set in both SecurityContext and PodSecurityContext, the
- value specified in SecurityContext takes precedence.
- type: boolean
- runAsUser:
- description: The UID to run the entrypoint of the container
- process. Defaults to user specified in image metadata if
- unspecified. May also be set in PodSecurityContext. If
- set in both SecurityContext and PodSecurityContext, the
- value specified in SecurityContext takes precedence.
- format: int64
- type: integer
- seLinuxOptions:
- description: The SELinux context to be applied to the container.
- If unspecified, the container runtime will allocate a random
- SELinux context for each container. May also be set in
- PodSecurityContext. If set in both SecurityContext and
- PodSecurityContext, the value specified in SecurityContext
- takes precedence.
- properties:
- level:
- description: Level is SELinux level label that applies
- to the container.
- type: string
- role:
- description: Role is a SELinux role label that applies
- to the container.
- type: string
- type:
- description: Type is a SELinux type label that applies
- to the container.
- type: string
- user:
- description: User is a SELinux user label that applies
- to the container.
- type: string
- type: object
- windowsOptions:
- description: The Windows specific settings applied to all
- containers. If unspecified, the options from the PodSecurityContext
- will be used. If set in both SecurityContext and PodSecurityContext,
- the value specified in SecurityContext takes precedence.
- properties:
- gmsaCredentialSpec:
- description: GMSACredentialSpec is where the GMSA admission
- webhook (https://github.com/kubernetes-sigs/windows-gmsa)
- inlines the contents of the GMSA credential spec named
- by the GMSACredentialSpecName field. This field is alpha-level
- and is only honored by servers that enable the WindowsGMSA
- feature flag.
- type: string
- gmsaCredentialSpecName:
- description: GMSACredentialSpecName is the name of the
- GMSA credential spec to use. This field is alpha-level
- and is only honored by servers that enable the WindowsGMSA
- feature flag.
- type: string
- runAsUserName:
- description: The UserName in Windows to run the entrypoint
- of the container process. Defaults to the user specified
- in image metadata if unspecified. May also be set in
- PodSecurityContext. If set in both SecurityContext and
- PodSecurityContext, the value specified in SecurityContext
- takes precedence. This field is beta-level and may be
- disabled with the WindowsRunAsUserName feature flag.
- type: string
- type: object
- type: object
- startupProbe:
- description: 'StartupProbe indicates that the Pod has successfully
- initialized. If specified, no other probes are executed until
- this completes successfully. If this probe fails, the Pod will
- be restarted, just as if the livenessProbe failed. This can
- be used to provide different probe parameters at the beginning
- of a Pod''s lifecycle, when it might take a long time to load
- data or warm a cache, than during steady-state operation. This
- cannot be updated. This is an alpha feature enabled by the StartupProbe
- feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- properties:
- exec:
- description: One and only one of the following should be specified.
- Exec specifies the action to take.
- properties:
- command:
- description: Command is the command line to execute inside
- the container, the working directory for the command is
- root ('/') in the container's filesystem. The command
- is simply exec'd, it is not run inside a shell, so traditional
- shell instructions ('|', etc) won't work. To use a shell,
- you need to explicitly call out to that shell. Exit
- status of 0 is treated as live/healthy and non-zero
- is unhealthy.
- items:
- type: string
- type: array
- type: object
- failureThreshold:
- description: Minimum consecutive failures for the probe to
- be considered failed after having succeeded. Defaults to
- 3. Minimum value is 1.
- format: int32
- type: integer
- httpGet:
- description: HTTPGet specifies the http request to perform.
- properties:
- host:
- description: Host name to connect to, defaults to the
- pod IP. You probably want to set "Host" in httpHeaders
- instead.
- type: string
- httpHeaders:
- description: Custom headers to set in the request. HTTP
- allows repeated headers.
- items:
- description: HTTPHeader describes a custom header to
- be used in HTTP probes
- properties:
- name:
- description: The header field name
- type: string
- value:
- description: The header field value
- type: string
- required:
- - name
- - value
- type: object
- type: array
- path:
- description: Path to access on the HTTP server.
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Name or number of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- scheme:
- description: Scheme to use for connecting to the host.
- Defaults to HTTP.
- type: string
- required:
- - port
- type: object
- initialDelaySeconds:
- description: 'Number of seconds after the container has started
- before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- periodSeconds:
- description: How often (in seconds) to perform the probe.
- Default to 10 seconds. Minimum value is 1.
- format: int32
- type: integer
- successThreshold:
- description: Minimum consecutive successes for the probe to
- be considered successful after having failed. Defaults to
- 1. Must be 1 for liveness and startup. Minimum value is
- 1.
- format: int32
- type: integer
- tcpSocket:
- description: 'TCPSocket specifies an action involving a TCP
- port. TCP hooks not yet supported TODO: implement a realistic
- TCP lifecycle hook'
- properties:
- host:
- description: 'Optional: Host name to connect to, defaults
- to the pod IP.'
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Number or name of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- required:
- - port
- type: object
- timeoutSeconds:
- description: 'Number of seconds after which the probe times
- out. Defaults to 1 second. Minimum value is 1. More info:
- https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- type: object
- stdin:
- description: Whether this container should allocate a buffer for
- stdin in the container runtime. If this is not set, reads from
- stdin in the container will always result in EOF. Default is
- false.
- type: boolean
- stdinOnce:
- description: Whether the container runtime should close the stdin
- channel after it has been opened by a single attach. When stdin
- is true the stdin stream will remain open across multiple attach
- sessions. If stdinOnce is set to true, stdin is opened on container
- start, is empty until the first client attaches to stdin, and
- then remains open and accepts data until the client disconnects,
- at which time stdin is closed and remains closed until the container
- is restarted. If this flag is false, a container processes that
- reads from stdin will never receive an EOF. Default is false
- type: boolean
- terminationMessagePath:
- description: 'Optional: Path at which the file to which the container''s
- termination message will be written is mounted into the container''s
- filesystem. Message written is intended to be brief final status,
- such as an assertion failure message. Will be truncated by the
- node if greater than 4096 bytes. The total message length across
- all containers will be limited to 12kb. Defaults to /dev/termination-log.
- Cannot be updated.'
- type: string
- terminationMessagePolicy:
- description: Indicate how the termination message should be populated.
- File will use the contents of terminationMessagePath to populate
- the container status message on both success and failure. FallbackToLogsOnError
- will use the last chunk of container log output if the termination
- message file is empty and the container exited with an error.
- The log output is limited to 2048 bytes or 80 lines, whichever
- is smaller. Defaults to File. Cannot be updated.
- type: string
- tty:
- description: Whether this container should allocate a TTY for
- itself, also requires 'stdin' to be true. Default is false.
- type: boolean
- volumeDevices:
- description: volumeDevices is the list of block devices to be
- used by the container. This is a beta feature.
- items:
- description: volumeDevice describes a mapping of a raw block
- device within a container.
- properties:
- devicePath:
- description: devicePath is the path inside of the container
- that the device will be mapped to.
- type: string
- name:
- description: name must match the name of a persistentVolumeClaim
- in the pod
- type: string
- required:
- - devicePath
- - name
- type: object
- type: array
- volumeMounts:
- description: Pod volumes to mount into the container's filesystem.
- Cannot be updated.
- items:
- description: VolumeMount describes a mounting of a Volume within
- a container.
- properties:
- mountPath:
- description: Path within the container at which the volume
- should be mounted. Must not contain ':'.
- type: string
- mountPropagation:
- description: mountPropagation determines how mounts are
- propagated from the host to container and the other way
- around. When not set, MountPropagationNone is used. This
- field is beta in 1.10.
- type: string
- name:
- description: This must match the Name of a Volume.
- type: string
- readOnly:
- description: Mounted read-only if true, read-write otherwise
- (false or unspecified). Defaults to false.
- type: boolean
- subPath:
- description: Path within the volume from which the container's
- volume should be mounted. Defaults to "" (volume's root).
- type: string
- subPathExpr:
- description: Expanded path within the volume from which
- the container's volume should be mounted. Behaves similarly
- to SubPath but environment variable references $(VAR_NAME)
- are expanded using the container's environment. Defaults
- to "" (volume's root). SubPathExpr and SubPath are mutually
- exclusive.
- type: string
- required:
- - mountPath
- - name
- type: object
- type: array
- workingDir:
- description: Container's working directory. If not specified,
- the container runtime's default will be used, which might be
- configured in the container image. Cannot be updated.
- type: string
- required:
- - name
- type: object
- type: array
- listenLocal:
- description: ListenLocal makes the Prometheus server listen on loopback,
- so that it does not bind against the Pod IP.
- type: boolean
- logFormat:
- description: Log format for Prometheus to be configured with.
- type: string
- logLevel:
- description: Log level for Prometheus to be configured with.
- type: string
- nodeSelector:
- additionalProperties:
- type: string
- description: Define which Nodes the Pods are scheduled on.
- type: object
- overrideHonorLabels:
- description: 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.
- type: boolean
- overrideHonorTimestamps:
- description: OverrideHonorTimestamps allows to globally enforce honoring
- timestamps in all scrape configs.
- type: boolean
- paused:
- description: When a Prometheus deployment is paused, no actions except
- for deletion will be performed on the underlying objects.
- type: boolean
- podMetadata:
- description: PodMetadata configures Labels and Annotations which are
- propagated to the prometheus pods.
- properties:
- annotations:
- additionalProperties:
- type: string
- description: 'Annotations is an unstructured key value map stored
- with a resource that may be set by external tools to store and
- retrieve arbitrary metadata. They are not queryable and should
- be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations'
- type: object
- labels:
- additionalProperties:
- type: string
- description: 'Map of string keys and values that can be used to
- organize and categorize (scope and select) objects. May match
- selectors of replication controllers and services. More info:
- http://kubernetes.io/docs/user-guide/labels'
- type: object
- type: object
- podMonitorNamespaceSelector:
- description: Namespaces to be selected for PodMonitor discovery. If
- nil, only check own namespace.
- properties:
- matchExpressions:
- description: matchExpressions is a list of label selector requirements.
- The requirements are ANDed.
- items:
- description: A label selector requirement is a selector that contains
- values, a key, and an operator that relates the key and values.
- properties:
- key:
- description: key is the label key that the selector applies
- to.
- type: string
- operator:
- description: operator represents a key's relationship to a
- set of values. Valid operators are In, NotIn, Exists and
- DoesNotExist.
- type: string
- values:
- description: values is an array of string values. If the operator
- is In or NotIn, the values array must be non-empty. If the
- operator is Exists or DoesNotExist, the values array must
- be empty. This array is replaced during a strategic merge
- patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- matchLabels:
- additionalProperties:
- type: string
- description: matchLabels is a map of {key,value} pairs. A single
- {key,value} in the matchLabels map is equivalent to an element
- of matchExpressions, whose key field is "key", the operator is
- "In", and the values array contains only "value". The requirements
- are ANDed.
- type: object
- type: object
- podMonitorSelector:
- description: '*Experimental* PodMonitors to be selected for target discovery.'
- properties:
- matchExpressions:
- description: matchExpressions is a list of label selector requirements.
- The requirements are ANDed.
- items:
- description: A label selector requirement is a selector that contains
- values, a key, and an operator that relates the key and values.
- properties:
- key:
- description: key is the label key that the selector applies
- to.
- type: string
- operator:
- description: operator represents a key's relationship to a
- set of values. Valid operators are In, NotIn, Exists and
- DoesNotExist.
- type: string
- values:
- description: values is an array of string values. If the operator
- is In or NotIn, the values array must be non-empty. If the
- operator is Exists or DoesNotExist, the values array must
- be empty. This array is replaced during a strategic merge
- patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- matchLabels:
- additionalProperties:
- type: string
- description: matchLabels is a map of {key,value} pairs. A single
- {key,value} in the matchLabels map is equivalent to an element
- of matchExpressions, whose key field is "key", the operator is
- "In", and the values array contains only "value". The requirements
- are ANDed.
- type: object
- type: object
- portName:
- description: Port name used for the pods and governing service. This
- defaults to web
- type: string
- priorityClassName:
- description: Priority class assigned to the Pods
- type: string
- prometheusExternalLabelName:
- description: Name of Prometheus external label used to denote Prometheus
- instance name. Defaults to the value of `prometheus`. External label
- will _not_ be added when value is set to empty string (`""`).
- type: string
- query:
- description: QuerySpec defines the query command line flags when starting
- Prometheus.
- properties:
- lookbackDelta:
- description: The delta difference allowed for retrieving metrics
- during expression evaluations.
- type: string
- maxConcurrency:
- description: Number of concurrent queries that can be run at once.
- format: int32
- type: integer
- maxSamples:
- description: Maximum number of samples a single query can load into
- memory. Note that queries will fail if they would load more samples
- than this into memory, so this also limits the number of samples
- a query can return.
- format: int32
- type: integer
- timeout:
- description: Maximum time a query may take before being aborted.
- type: string
- type: object
- remoteRead:
- description: If specified, the remote_read spec. This is an experimental
- feature, it may change in any upcoming release in a breaking way.
- items:
- description: RemoteReadSpec defines the remote_read configuration
- for prometheus.
- properties:
- basicAuth:
- description: BasicAuth for the URL.
- properties:
- password:
- description: The secret in the service monitor namespace that
- contains the password for authentication.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- username:
- description: The secret in the service monitor namespace that
- contains the username for authentication.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- type: object
- bearerToken:
- description: bearer token for remote read.
- type: string
- bearerTokenFile:
- description: File to read bearer token for remote read.
- type: string
- proxyUrl:
- description: Optional ProxyURL
- type: string
- readRecent:
- description: Whether reads should be made for queries for time
- ranges that the local storage should have complete data for.
- type: boolean
- remoteTimeout:
- description: Timeout for requests to the remote read endpoint.
- type: string
- requiredMatchers:
- additionalProperties:
- type: string
- description: An optional list of equality matchers which have
- to be present in a selector to query the remote read endpoint.
- type: object
- tlsConfig:
- description: TLS Config to use for remote read.
- properties:
- ca:
- description: Stuct containing the CA cert to use for the targets.
- properties:
- configMap:
- description: ConfigMap containing data to use for the
- targets.
- properties:
- key:
- description: The key to select.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the ConfigMap or its
- key must be defined
- type: boolean
- required:
- - key
- type: object
- secret:
- description: Secret containing data to use for the targets.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key
- must be defined
- type: boolean
- required:
- - key
- type: object
- type: object
- caFile:
- description: Path to the CA cert in the Prometheus container
- to use for the targets.
- type: string
- cert:
- description: Struct containing the client cert file for the
- targets.
- properties:
- configMap:
- description: ConfigMap containing data to use for the
- targets.
- properties:
- key:
- description: The key to select.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the ConfigMap or its
- key must be defined
- type: boolean
- required:
- - key
- type: object
- secret:
- description: Secret containing data to use for the targets.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key
- must be defined
- type: boolean
- required:
- - key
- type: object
- type: object
- certFile:
- description: Path to the client cert file in the Prometheus
- container for the targets.
- type: string
- insecureSkipVerify:
- description: Disable target certificate validation.
- type: boolean
- keyFile:
- description: Path to the client key file in the Prometheus
- container for the targets.
- type: string
- keySecret:
- description: Secret containing the client key file for the
- targets.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- serverName:
- description: Used to verify the hostname for the targets.
- type: string
- type: object
- url:
- description: The URL of the endpoint to send samples to.
- type: string
- required:
- - url
- type: object
- type: array
- remoteWrite:
- description: If specified, the remote_write spec. This is an experimental
- feature, it may change in any upcoming release in a breaking way.
- items:
- description: RemoteWriteSpec defines the remote_write configuration
- for prometheus.
- properties:
- basicAuth:
- description: BasicAuth for the URL.
- properties:
- password:
- description: The secret in the service monitor namespace that
- contains the password for authentication.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- username:
- description: The secret in the service monitor namespace that
- contains the username for authentication.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- type: object
- bearerToken:
- description: File to read bearer token for remote write.
- type: string
- bearerTokenFile:
- description: File to read bearer token for remote write.
- type: string
- proxyUrl:
- description: Optional ProxyURL
- type: string
- queueConfig:
- description: QueueConfig allows tuning of the remote write queue
- parameters.
- properties:
- batchSendDeadline:
- description: BatchSendDeadline is the maximum time a sample
- will wait in buffer.
- type: string
- capacity:
- description: Capacity is the number of samples to buffer per
- shard before we start dropping them.
- type: integer
- maxBackoff:
- description: MaxBackoff is the maximum retry delay.
- type: string
- maxRetries:
- description: MaxRetries is the maximum number of times to
- retry a batch on recoverable errors.
- type: integer
- maxSamplesPerSend:
- description: MaxSamplesPerSend is the maximum number of samples
- per send.
- type: integer
- maxShards:
- description: MaxShards is the maximum number of shards, i.e.
- amount of concurrency.
- type: integer
- minBackoff:
- description: MinBackoff is the initial retry delay. Gets doubled
- for every retry.
- type: string
- minShards:
- description: MinShards is the minimum number of shards, i.e.
- amount of concurrency.
- type: integer
- type: object
- remoteTimeout:
- description: Timeout for requests to the remote write endpoint.
- type: string
- tlsConfig:
- description: TLS Config to use for remote write.
- properties:
- ca:
- description: Stuct containing the CA cert to use for the targets.
- properties:
- configMap:
- description: ConfigMap containing data to use for the
- targets.
- properties:
- key:
- description: The key to select.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the ConfigMap or its
- key must be defined
- type: boolean
- required:
- - key
- type: object
- secret:
- description: Secret containing data to use for the targets.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key
- must be defined
- type: boolean
- required:
- - key
- type: object
- type: object
- caFile:
- description: Path to the CA cert in the Prometheus container
- to use for the targets.
- type: string
- cert:
- description: Struct containing the client cert file for the
- targets.
- properties:
- configMap:
- description: ConfigMap containing data to use for the
- targets.
- properties:
- key:
- description: The key to select.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the ConfigMap or its
- key must be defined
- type: boolean
- required:
- - key
- type: object
- secret:
- description: Secret containing data to use for the targets.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key
- must be defined
- type: boolean
- required:
- - key
- type: object
- type: object
- certFile:
- description: Path to the client cert file in the Prometheus
- container for the targets.
- type: string
- insecureSkipVerify:
- description: Disable target certificate validation.
- type: boolean
- keyFile:
- description: Path to the client key file in the Prometheus
- container for the targets.
- type: string
- keySecret:
- description: Secret containing the client key file for the
- targets.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- serverName:
- description: Used to verify the hostname for the targets.
- type: string
- type: object
- url:
- description: The URL of the endpoint to send samples to.
- type: string
- writeRelabelConfigs:
- description: The list of remote write relabel configurations.
- items:
- description: 'RelabelConfig allows dynamic rewriting of the
- label set, being applied to samples before ingestion. It defines
- ``-section of Prometheus configuration.
- More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs'
- properties:
- action:
- description: Action to perform based on regex matching.
- Default is 'replace'
- type: string
- modulus:
- description: Modulus to take of the hash of the source label
- values.
- format: int64
- type: integer
- regex:
- description: Regular expression against which the extracted
- value is matched. Default is '(.*)'
- type: string
- replacement:
- description: Replacement value against which a regex replace
- is performed if the regular expression matches. Regex
- capture groups are available. Default is '$1'
- type: string
- separator:
- description: Separator placed between concatenated source
- label values. default is ';'.
- type: string
- sourceLabels:
- description: The source labels select values from existing
- labels. Their content is concatenated using the configured
- separator and matched against the configured regular expression
- for the replace, keep, and drop actions.
- items:
- type: string
- type: array
- targetLabel:
- description: Label to which the resulting value is written
- in a replace action. It is mandatory for replace actions.
- Regex capture groups are available.
- type: string
- type: object
- type: array
- required:
- - url
- type: object
- type: array
- replicaExternalLabelName:
- description: Name of Prometheus external label used to denote replica
- name. Defaults to the value of `prometheus_replica`. External label
- will _not_ be added when value is set to empty string (`""`).
- type: string
- replicas:
- description: Number of instances to deploy for a Prometheus deployment.
- format: int32
- type: integer
- resources:
- description: Define resources requests and limits for single Pods.
- properties:
- limits:
- additionalProperties:
- type: string
- description: 'Limits describes the maximum amount of compute resources
- allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
- type: object
- requests:
- additionalProperties:
- type: string
- description: 'Requests describes the minimum amount of compute resources
- required. If Requests is omitted for a container, it defaults
- to Limits if that is explicitly specified, otherwise to an implementation-defined
- value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
- type: object
- type: object
- retention:
- description: Time duration Prometheus shall retain data for. Default
- is '24h', and must match the regular expression `[0-9]+(ms|s|m|h|d|w|y)`
- (milliseconds seconds minutes hours days weeks years).
- type: string
- retentionSize:
- description: Maximum amount of disk space used by blocks.
- type: string
- routePrefix:
- description: The route prefix Prometheus 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`.
- type: string
- ruleNamespaceSelector:
- description: Namespaces to be selected for PrometheusRules discovery.
- If unspecified, only the same namespace as the Prometheus object is
- in is used.
- properties:
- matchExpressions:
- description: matchExpressions is a list of label selector requirements.
- The requirements are ANDed.
- items:
- description: A label selector requirement is a selector that contains
- values, a key, and an operator that relates the key and values.
- properties:
- key:
- description: key is the label key that the selector applies
- to.
- type: string
- operator:
- description: operator represents a key's relationship to a
- set of values. Valid operators are In, NotIn, Exists and
- DoesNotExist.
- type: string
- values:
- description: values is an array of string values. If the operator
- is In or NotIn, the values array must be non-empty. If the
- operator is Exists or DoesNotExist, the values array must
- be empty. This array is replaced during a strategic merge
- patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- matchLabels:
- additionalProperties:
- type: string
- description: matchLabels is a map of {key,value} pairs. A single
- {key,value} in the matchLabels map is equivalent to an element
- of matchExpressions, whose key field is "key", the operator is
- "In", and the values array contains only "value". The requirements
- are ANDed.
- type: object
- type: object
- ruleSelector:
- description: A selector to select which PrometheusRules to mount for
- loading alerting rules from. Until (excluding) Prometheus Operator
- v0.24.0 Prometheus Operator will migrate any legacy rule ConfigMaps
- to PrometheusRule custom resources selected by RuleSelector. Make
- sure it does not match any config maps that you do not want to be
- migrated.
- properties:
- matchExpressions:
- description: matchExpressions is a list of label selector requirements.
- The requirements are ANDed.
- items:
- description: A label selector requirement is a selector that contains
- values, a key, and an operator that relates the key and values.
- properties:
- key:
- description: key is the label key that the selector applies
- to.
- type: string
- operator:
- description: operator represents a key's relationship to a
- set of values. Valid operators are In, NotIn, Exists and
- DoesNotExist.
- type: string
- values:
- description: values is an array of string values. If the operator
- is In or NotIn, the values array must be non-empty. If the
- operator is Exists or DoesNotExist, the values array must
- be empty. This array is replaced during a strategic merge
- patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- matchLabels:
- additionalProperties:
- type: string
- description: matchLabels is a map of {key,value} pairs. A single
- {key,value} in the matchLabels map is equivalent to an element
- of matchExpressions, whose key field is "key", the operator is
- "In", and the values array contains only "value". The requirements
- are ANDed.
- type: object
- type: object
- rules:
- description: /--rules.*/ command-line arguments.
- properties:
- alert:
- description: /--rules.alert.*/ command-line arguments
- properties:
- forGracePeriod:
- description: Minimum duration between alert and restored 'for'
- state. This is maintained only for alerts with configured
- 'for' time greater than grace period.
- type: string
- forOutageTolerance:
- description: Max time to tolerate prometheus outage for restoring
- 'for' state of alert.
- type: string
- resendDelay:
- description: Minimum amount of time to wait before resending
- an alert to Alertmanager.
- type: string
- type: object
- type: object
- scrapeInterval:
- description: Interval between consecutive scrapes.
- type: string
- secrets:
- description: 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/.
- items:
- type: string
- type: array
- securityContext:
- description: SecurityContext holds pod-level security attributes and
- common container settings. This defaults to the default PodSecurityContext.
- properties:
- fsGroup:
- description: "A special supplemental group that applies to all containers
- in a pod. Some volume types allow the Kubelet to change the ownership
- of that volume to be owned by the pod: \n 1. The owning GID will
- be the FSGroup 2. The setgid bit is set (new files created in
- the volume will be owned by FSGroup) 3. The permission bits are
- OR'd with rw-rw---- \n If unset, the Kubelet will not modify the
- ownership and permissions of any volume."
- format: int64
- type: integer
- runAsGroup:
- description: The GID to run the entrypoint of the container process.
- Uses runtime default if unset. May also be set in SecurityContext. If
- set in both SecurityContext and PodSecurityContext, the value
- specified in SecurityContext takes precedence for that container.
- format: int64
- type: integer
- runAsNonRoot:
- description: Indicates that the container must run as a non-root
- user. If true, the Kubelet will validate the image at runtime
- to ensure that it does not run as UID 0 (root) and fail to start
- the container if it does. If unset or false, no such validation
- will be performed. May also be set in SecurityContext. If set
- in both SecurityContext and PodSecurityContext, the value specified
- in SecurityContext takes precedence.
- type: boolean
- runAsUser:
- description: The UID to run the entrypoint of the container process.
- Defaults to user specified in image metadata if unspecified. May
- also be set in SecurityContext. If set in both SecurityContext
- and PodSecurityContext, the value specified in SecurityContext
- takes precedence for that container.
- format: int64
- type: integer
- seLinuxOptions:
- description: The SELinux context to be applied to all containers.
- If unspecified, the container runtime will allocate a random SELinux
- context for each container. May also be set in SecurityContext. If
- set in both SecurityContext and PodSecurityContext, the value
- specified in SecurityContext takes precedence for that container.
- properties:
- level:
- description: Level is SELinux level label that applies to the
- container.
- type: string
- role:
- description: Role is a SELinux role label that applies to the
- container.
- type: string
- type:
- description: Type is a SELinux type label that applies to the
- container.
- type: string
- user:
- description: User is a SELinux user label that applies to the
- container.
- type: string
- type: object
- supplementalGroups:
- description: A list of groups applied to the first process run in
- each container, in addition to the container's primary GID. If
- unspecified, no groups will be added to any container.
- items:
- format: int64
- type: integer
- type: array
- sysctls:
- description: Sysctls hold a list of namespaced sysctls used for
- the pod. Pods with unsupported sysctls (by the container runtime)
- might fail to launch.
- items:
- description: Sysctl defines a kernel parameter to be set
- properties:
- name:
- description: Name of a property to set
- type: string
- value:
- description: Value of a property to set
- type: string
- required:
- - name
- - value
- type: object
- type: array
- windowsOptions:
- description: The Windows specific settings applied to all containers.
- If unspecified, the options within a container's SecurityContext
- will be used. If set in both SecurityContext and PodSecurityContext,
- the value specified in SecurityContext takes precedence.
- properties:
- gmsaCredentialSpec:
- description: GMSACredentialSpec is where the GMSA admission
- webhook (https://github.com/kubernetes-sigs/windows-gmsa)
- inlines the contents of the GMSA credential spec named by
- the GMSACredentialSpecName field. This field is alpha-level
- and is only honored by servers that enable the WindowsGMSA
- feature flag.
- type: string
- gmsaCredentialSpecName:
- description: GMSACredentialSpecName is the name of the GMSA
- credential spec to use. This field is alpha-level and is only
- honored by servers that enable the WindowsGMSA feature flag.
- type: string
- runAsUserName:
- description: The UserName in Windows to run the entrypoint of
- the container process. Defaults to the user specified in image
- metadata if unspecified. May also be set in PodSecurityContext.
- If set in both SecurityContext and PodSecurityContext, the
- value specified in SecurityContext takes precedence. This
- field is beta-level and may be disabled with the WindowsRunAsUserName
- feature flag.
- type: string
- type: object
- type: object
- serviceAccountName:
- description: ServiceAccountName is the name of the ServiceAccount to
- use to run the Prometheus Pods.
- type: string
- serviceMonitorNamespaceSelector:
- description: Namespaces to be selected for ServiceMonitor discovery.
- If nil, only check own namespace.
- properties:
- matchExpressions:
- description: matchExpressions is a list of label selector requirements.
- The requirements are ANDed.
- items:
- description: A label selector requirement is a selector that contains
- values, a key, and an operator that relates the key and values.
- properties:
- key:
- description: key is the label key that the selector applies
- to.
- type: string
- operator:
- description: operator represents a key's relationship to a
- set of values. Valid operators are In, NotIn, Exists and
- DoesNotExist.
- type: string
- values:
- description: values is an array of string values. If the operator
- is In or NotIn, the values array must be non-empty. If the
- operator is Exists or DoesNotExist, the values array must
- be empty. This array is replaced during a strategic merge
- patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- matchLabels:
- additionalProperties:
- type: string
- description: matchLabels is a map of {key,value} pairs. A single
- {key,value} in the matchLabels map is equivalent to an element
- of matchExpressions, whose key field is "key", the operator is
- "In", and the values array contains only "value". The requirements
- are ANDed.
- type: object
- type: object
- serviceMonitorSelector:
- description: ServiceMonitors to be selected for target discovery.
- properties:
- matchExpressions:
- description: matchExpressions is a list of label selector requirements.
- The requirements are ANDed.
- items:
- description: A label selector requirement is a selector that contains
- values, a key, and an operator that relates the key and values.
- properties:
- key:
- description: key is the label key that the selector applies
- to.
- type: string
- operator:
- description: operator represents a key's relationship to a
- set of values. Valid operators are In, NotIn, Exists and
- DoesNotExist.
- type: string
- values:
- description: values is an array of string values. If the operator
- is In or NotIn, the values array must be non-empty. If the
- operator is Exists or DoesNotExist, the values array must
- be empty. This array is replaced during a strategic merge
- patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- matchLabels:
- additionalProperties:
- type: string
- description: matchLabels is a map of {key,value} pairs. A single
- {key,value} in the matchLabels map is equivalent to an element
- of matchExpressions, whose key field is "key", the operator is
- "In", and the values array contains only "value". The requirements
- are ANDed.
- type: object
- type: object
- sha:
- description: SHA of Prometheus container image to be deployed. Defaults
- to the value of `version`. Similar to a tag, but the SHA explicitly
- deploys an immutable container image. Version and Tag are ignored
- if SHA is set.
- type: string
- storage:
- description: Storage spec to specify how storage shall be used.
- properties:
- emptyDir:
- description: 'EmptyDirVolumeSource to be used by the Prometheus
- StatefulSets. If specified, used in place of any volumeClaimTemplate.
- More info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir'
- properties:
- medium:
- description: 'What type of storage medium should back this directory.
- The default is "" which means to use the node''s default medium.
- Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir'
- type: string
- sizeLimit:
- description: 'Total amount of local storage required for this
- EmptyDir volume. The size limit is also applicable for memory
- medium. 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. The
- default is nil which means that the limit is undefined. More
- info: http://kubernetes.io/docs/user-guide/volumes#emptydir'
- type: string
- type: object
- volumeClaimTemplate:
- description: A PVC spec to be used by the Prometheus StatefulSets.
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this
- representation of an object. Servers should convert recognized
- schemas to the latest internal value, and may reject unrecognized
- values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource
- this object represents. Servers may infer this from the endpoint
- the client submits requests to. Cannot be updated. In CamelCase.
- More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata'
- type: object
- spec:
- description: 'Spec defines the desired characteristics of a
- volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
- properties:
- accessModes:
- description: 'AccessModes contains the desired access modes
- the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1'
- items:
- type: string
- type: array
- dataSource:
- description: This field requires the VolumeSnapshotDataSource
- alpha feature gate to be enabled and currently VolumeSnapshot
- is the only supported data source. If the provisioner
- can support VolumeSnapshot data source, it will create
- a new volume and data will be restored to the volume at
- the same time. If the provisioner does not support VolumeSnapshot
- data source, volume will not be created and the failure
- will be reported as an event. In the future, we plan to
- support more data source types and the behavior of the
- provisioner may change.
- properties:
- apiGroup:
- description: APIGroup is the group for the resource
- being referenced. If APIGroup is not specified, the
- specified Kind must be in the core API group. For
- any other third-party types, APIGroup is required.
- type: string
- kind:
- description: Kind is the type of resource being referenced
- type: string
- name:
- description: Name is the name of resource being referenced
- type: string
- required:
- - kind
- - name
- type: object
- resources:
- description: 'Resources represents the minimum resources
- the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources'
- properties:
- limits:
- additionalProperties:
- type: string
- description: 'Limits describes the maximum amount of
- compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
- type: object
- requests:
- additionalProperties:
- type: string
- description: 'Requests describes the minimum amount
- of compute resources required. If Requests is omitted
- for a container, it defaults to Limits if that is
- explicitly specified, otherwise to an implementation-defined
- value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
- type: object
- type: object
- selector:
- description: A label query over volumes to consider for
- binding.
- properties:
- matchExpressions:
- description: matchExpressions is a list of label selector
- requirements. The requirements are ANDed.
- items:
- description: A label selector requirement is a selector
- that contains values, a key, and an operator that
- relates the key and values.
- properties:
- key:
- description: key is the label key that the selector
- applies to.
- type: string
- operator:
- description: operator represents a key's relationship
- to a set of values. Valid operators are In,
- NotIn, Exists and DoesNotExist.
- type: string
- values:
- description: values is an array of string values.
- If the operator is In or NotIn, the values array
- must be non-empty. If the operator is Exists
- or DoesNotExist, the values array must be empty.
- This array is replaced during a strategic merge
- patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- matchLabels:
- additionalProperties:
- type: string
- description: matchLabels is a map of {key,value} pairs.
- A single {key,value} in the matchLabels map is equivalent
- to an element of matchExpressions, whose key field
- is "key", the operator is "In", and the values array
- contains only "value". The requirements are ANDed.
- type: object
- type: object
- storageClassName:
- description: 'Name of the StorageClass required by the claim.
- More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1'
- type: string
- volumeMode:
- description: volumeMode defines what type of volume is required
- by the claim. Value of Filesystem is implied when not
- included in claim spec. This is a beta feature.
- type: string
- volumeName:
- description: VolumeName is the binding reference to the
- PersistentVolume backing this claim.
- type: string
- type: object
- status:
- description: 'Status represents the current information/status
- of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
- properties:
- accessModes:
- description: 'AccessModes contains the actual access modes
- the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1'
- items:
- type: string
- type: array
- capacity:
- additionalProperties:
- type: string
- description: Represents the actual resources of the underlying
- volume.
- type: object
- conditions:
- description: Current Condition of persistent volume claim.
- If underlying persistent volume is being resized then
- the Condition will be set to 'ResizeStarted'.
- items:
- description: PersistentVolumeClaimCondition contails details
- about state of pvc
- properties:
- lastProbeTime:
- description: Last time we probed the condition.
- format: date-time
- type: string
- lastTransitionTime:
- description: Last time the condition transitioned
- from one status to another.
- format: date-time
- type: string
- message:
- description: Human-readable message indicating details
- about last transition.
- type: string
- reason:
- description: Unique, this should be a short, machine
- understandable string that gives the reason for
- condition's last transition. If it reports "ResizeStarted"
- that means the underlying persistent volume is being
- resized.
- type: string
- status:
- type: string
- type:
- description: PersistentVolumeClaimConditionType is
- a valid value of PersistentVolumeClaimCondition.Type
- type: string
- required:
- - status
- - type
- type: object
- type: array
- phase:
- description: Phase represents the current phase of PersistentVolumeClaim.
- type: string
- type: object
- type: object
- type: object
- tag:
- description: Tag of Prometheus container image to be deployed. Defaults
- to the value of `version`. Version is ignored if Tag is set.
- type: string
- thanos:
- description: "Thanos configuration allows configuring various aspects
- of a Prometheus server in a Thanos environment. \n This section is
- experimental, it may change significantly without deprecation notice
- in any release. \n This is experimental and may change significantly
- without backward compatibility in any release."
- properties:
- baseImage:
- description: Thanos base image if other than default.
- type: string
- grpcServerTlsConfig:
- description: 'GRPCServerTLSConfig configures the gRPC server from
- which Thanos Querier reads recorded rule data. Note: Currently
- only the CAFile, CertFile, and KeyFile fields are supported. Maps
- to the ''--grpc-server-tls-*'' CLI args.'
- properties:
- ca:
- description: Stuct containing the CA cert to use for the targets.
- properties:
- configMap:
- description: ConfigMap containing data to use for the targets.
- properties:
- key:
- description: The key to select.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the ConfigMap or its key
- must be defined
- type: boolean
- required:
- - key
- type: object
- secret:
- description: Secret containing data to use for the targets.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- type: object
- caFile:
- description: Path to the CA cert in the Prometheus container
- to use for the targets.
- type: string
- cert:
- description: Struct containing the client cert file for the
- targets.
- properties:
- configMap:
- description: ConfigMap containing data to use for the targets.
- properties:
- key:
- description: The key to select.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the ConfigMap or its key
- must be defined
- type: boolean
- required:
- - key
- type: object
- secret:
- description: Secret containing data to use for the targets.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- type: object
- certFile:
- description: Path to the client cert file in the Prometheus
- container for the targets.
- type: string
- insecureSkipVerify:
- description: Disable target certificate validation.
- type: boolean
- keyFile:
- description: Path to the client key file in the Prometheus container
- for the targets.
- type: string
- keySecret:
- description: Secret containing the client key file for the targets.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- serverName:
- description: Used to verify the hostname for the targets.
- type: string
- type: object
- image:
- description: Image if specified has precedence over baseImage, tag
- and sha combinations. Specifying the version is still necessary
- to ensure the Prometheus Operator knows what version of Thanos
- is being configured.
- type: string
- listenLocal:
- description: ListenLocal makes the Thanos sidecar listen on loopback,
- so that it does not bind against the Pod IP.
- type: boolean
- objectStorageConfig:
- description: ObjectStorageConfig configures object storage in Thanos.
- properties:
- key:
- description: The key of the secret to select from. Must be
- a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key must be defined
- type: boolean
- required:
- - key
- type: object
- resources:
- description: Resources defines the resource requirements for the
- Thanos sidecar. If not provided, no requests/limits will be set
- properties:
- limits:
- additionalProperties:
- type: string
- description: 'Limits describes the maximum amount of compute
- resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
- type: object
- requests:
- additionalProperties:
- type: string
- description: 'Requests describes the minimum amount of compute
- resources required. If Requests is omitted for a container,
- it defaults to Limits if that is explicitly specified, otherwise
- to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
- type: object
- type: object
- sha:
- description: SHA of Thanos container image to be deployed. Defaults
- to the value of `version`. Similar to a tag, but the SHA explicitly
- deploys an immutable container image. Version and Tag are ignored
- if SHA is set.
- type: string
- tag:
- description: Tag of Thanos sidecar container image to be deployed.
- Defaults to the value of `version`. Version is ignored if Tag
- is set.
- type: string
- tracingConfig:
- description: TracingConfig configures tracing in Thanos. This is
- an experimental feature, it may change in any upcoming release
- in a breaking way.
- properties:
- key:
- description: The key of the secret to select from. Must be
- a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key must be defined
- type: boolean
- required:
- - key
- type: object
- version:
- description: Version describes the version of Thanos to use.
- type: string
- type: object
- tolerations:
- description: If specified, the pod's tolerations.
- items:
- description: The pod this Toleration is attached to tolerates any
- taint that matches the triple using the matching
- operator .
- properties:
- effect:
- description: Effect indicates the taint effect to match. Empty
- means match all taint effects. When specified, allowed values
- are NoSchedule, PreferNoSchedule and NoExecute.
- type: string
- key:
- description: Key is the taint key that the toleration applies
- to. Empty means match all taint keys. If the key is empty, operator
- must be Exists; this combination means to match all values and
- all keys.
- type: string
- operator:
- description: Operator represents a key's relationship to the value.
- Valid operators are Exists and Equal. Defaults to Equal. Exists
- is equivalent to wildcard for value, so that a pod can tolerate
- all taints of a particular category.
- type: string
- tolerationSeconds:
- description: TolerationSeconds represents the period of time the
- toleration (which must be of effect NoExecute, otherwise this
- field is ignored) tolerates the taint. By default, it is not
- set, which means tolerate the taint forever (do not evict).
- Zero and negative values will be treated as 0 (evict immediately)
- by the system.
- format: int64
- type: integer
- value:
- description: Value is the taint value the toleration matches to.
- If the operator is Exists, the value should be empty, otherwise
- just a regular string.
- type: string
- type: object
- type: array
- version:
- description: Version of Prometheus to be deployed.
- type: string
- volumeMounts:
- description: VolumeMounts allows configuration of additional VolumeMounts
- on the output StatefulSet definition. VolumeMounts specified will
- be appended to other VolumeMounts in the prometheus container, that
- are generated as a result of StorageSpec objects.
- items:
- description: VolumeMount describes a mounting of a Volume within a
- container.
- properties:
- mountPath:
- description: Path within the container at which the volume should
- be mounted. Must not contain ':'.
- type: string
- mountPropagation:
- description: mountPropagation determines how mounts are propagated
- from the host to container and the other way around. When not
- set, MountPropagationNone is used. This field is beta in 1.10.
- type: string
- name:
- description: This must match the Name of a Volume.
- type: string
- readOnly:
- description: Mounted read-only if true, read-write otherwise (false
- or unspecified). Defaults to false.
- type: boolean
- subPath:
- description: Path within the volume from which the container's
- volume should be mounted. Defaults to "" (volume's root).
- type: string
- subPathExpr:
- description: Expanded path within the volume from which the container's
- volume should be mounted. Behaves similarly to SubPath but environment
- variable references $(VAR_NAME) are expanded using the container's
- environment. Defaults to "" (volume's root). SubPathExpr and
- SubPath are mutually exclusive.
- type: string
- required:
- - mountPath
- - name
- type: object
- type: array
- volumes:
- description: Volumes allows configuration of additional volumes on the
- output StatefulSet definition. Volumes specified will be appended
- to other volumes that are generated as a result of StorageSpec objects.
- items:
- description: Volume represents a named volume in a pod that may be
- accessed by any container in the pod.
- properties:
- awsElasticBlockStore:
- description: 'AWSElasticBlockStore represents an AWS Disk resource
- that is attached to a kubelet''s host machine and then exposed
- to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore'
- properties:
- fsType:
- description: 'Filesystem type of the volume that you want
- to mount. Tip: Ensure that the filesystem type is supported
- by the host operating system. Examples: "ext4", "xfs", "ntfs".
- Implicitly inferred to be "ext4" if unspecified. More info:
- https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
- TODO: how do we prevent errors in the filesystem from compromising
- the machine'
- type: string
- partition:
- description: 'The partition in the volume that you want to
- mount. If omitted, the default is to mount by volume name.
- Examples: For volume /dev/sda1, you specify the partition
- as "1". Similarly, the volume partition for /dev/sda is
- "0" (or you can leave the property empty).'
- format: int32
- type: integer
- readOnly:
- description: 'Specify "true" to force and set the ReadOnly
- property in VolumeMounts to "true". If omitted, the default
- is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore'
- type: boolean
- volumeID:
- description: 'Unique ID of the persistent disk resource in
- AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore'
- type: string
- required:
- - volumeID
- type: object
- azureDisk:
- description: AzureDisk represents an Azure Data Disk mount on
- the host and bind mount to the pod.
- properties:
- cachingMode:
- description: 'Host Caching mode: None, Read Only, Read Write.'
- type: string
- diskName:
- description: The Name of the data disk in the blob storage
- type: string
- diskURI:
- description: The URI the data disk in the blob storage
- type: string
- fsType:
- description: Filesystem type to mount. Must be a filesystem
- type supported by the host operating system. Ex. "ext4",
- "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
- type: string
- kind:
- description: 'Expected values Shared: multiple blob disks
- per storage account Dedicated: single blob disk per storage
- account Managed: azure managed data disk (only in managed
- availability set). defaults to shared'
- type: string
- readOnly:
- description: Defaults to false (read/write). ReadOnly here
- will force the ReadOnly setting in VolumeMounts.
- type: boolean
- required:
- - diskName
- - diskURI
- type: object
- azureFile:
- description: AzureFile represents an Azure File Service mount
- on the host and bind mount to the pod.
- properties:
- readOnly:
- description: Defaults to false (read/write). ReadOnly here
- will force the ReadOnly setting in VolumeMounts.
- type: boolean
- secretName:
- description: the name of secret that contains Azure Storage
- Account Name and Key
- type: string
- shareName:
- description: Share Name
- type: string
- required:
- - secretName
- - shareName
- type: object
- cephfs:
- description: CephFS represents a Ceph FS mount on the host that
- shares a pod's lifetime
- properties:
- monitors:
- description: 'Required: Monitors is a collection of Ceph monitors
- More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it'
- items:
- type: string
- type: array
- path:
- description: 'Optional: Used as the mounted root, rather than
- the full Ceph tree, default is /'
- type: string
- readOnly:
- description: 'Optional: Defaults to false (read/write). ReadOnly
- here will force the ReadOnly setting in VolumeMounts. More
- info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it'
- type: boolean
- secretFile:
- description: 'Optional: SecretFile is the path to key ring
- for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it'
- type: string
- secretRef:
- description: 'Optional: SecretRef is reference to the authentication
- secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it'
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- type: object
- user:
- description: 'Optional: User is the rados user name, default
- is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it'
- type: string
- required:
- - monitors
- type: object
- cinder:
- description: 'Cinder represents a cinder volume attached and mounted
- on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md'
- properties:
- fsType:
- description: 'Filesystem type to mount. Must be a filesystem
- type supported by the host operating system. Examples: "ext4",
- "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
- More info: https://examples.k8s.io/mysql-cinder-pd/README.md'
- type: string
- readOnly:
- description: 'Optional: Defaults to false (read/write). ReadOnly
- here will force the ReadOnly setting in VolumeMounts. More
- info: https://examples.k8s.io/mysql-cinder-pd/README.md'
- type: boolean
- secretRef:
- description: 'Optional: points to a secret object containing
- parameters used to connect to OpenStack.'
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- type: object
- volumeID:
- description: 'volume id used to identify the volume in cinder.
- More info: https://examples.k8s.io/mysql-cinder-pd/README.md'
- type: string
- required:
- - volumeID
- type: object
- configMap:
- description: ConfigMap represents a configMap that should populate
- this volume
- properties:
- defaultMode:
- description: 'Optional: mode bits to use on created files
- by default. Must be a value between 0 and 0777. Defaults
- to 0644. Directories within the path are not affected by
- this setting. This might be in conflict with other options
- that affect the file mode, like fsGroup, and the result
- can be other mode bits set.'
- format: int32
- type: integer
- items:
- description: If unspecified, each key-value pair in the Data
- field of the referenced ConfigMap will be projected into
- the volume as a file whose name is the key and content is
- the value. If specified, the listed keys will be projected
- into the specified paths, and unlisted keys will not be
- present. If a key is specified which is not present in the
- ConfigMap, the volume setup will error unless it is marked
- optional. Paths must be relative and may not contain the
- '..' path or start with '..'.
- items:
- description: Maps a string key to a path within a volume.
- properties:
- key:
- description: The key to project.
- type: string
- mode:
- description: 'Optional: mode bits to use on this file,
- must be a value between 0 and 0777. If not specified,
- the volume defaultMode will be used. This might be
- in conflict with other options that affect the file
- mode, like fsGroup, and the result can be other mode
- bits set.'
- format: int32
- type: integer
- path:
- description: The relative path of the file to map the
- key to. May not be an absolute path. May not contain
- the path element '..'. May not start with the string
- '..'.
- type: string
- required:
- - key
- - path
- type: object
- type: array
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the ConfigMap or its keys must
- be defined
- type: boolean
- type: object
- csi:
- description: CSI (Container Storage Interface) represents storage
- that is handled by an external CSI driver (Alpha feature).
- properties:
- driver:
- description: Driver is the name of the CSI driver that handles
- this volume. Consult with your admin for the correct name
- as registered in the cluster.
- type: string
- fsType:
- description: Filesystem type to mount. Ex. "ext4", "xfs",
- "ntfs". If not provided, the empty value is passed to the
- associated CSI driver which will determine the default filesystem
- to apply.
- type: string
- nodePublishSecretRef:
- description: NodePublishSecretRef is a reference to the secret
- object containing sensitive information to pass to the CSI
- driver to complete the CSI NodePublishVolume and NodeUnpublishVolume
- calls. This field is optional, and may be empty if no secret
- is required. If the secret object contains more than one
- secret, all secret references are passed.
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- type: object
- readOnly:
- description: Specifies a read-only configuration for the volume.
- Defaults to false (read/write).
- type: boolean
- volumeAttributes:
- additionalProperties:
- type: string
- description: VolumeAttributes stores driver-specific properties
- that are passed to the CSI driver. Consult your driver's
- documentation for supported values.
- type: object
- required:
- - driver
- type: object
- downwardAPI:
- description: DownwardAPI represents downward API about the pod
- that should populate this volume
- properties:
- defaultMode:
- description: 'Optional: mode bits to use on created files
- by default. Must be a value between 0 and 0777. Defaults
- to 0644. Directories within the path are not affected by
- this setting. This might be in conflict with other options
- that affect the file mode, like fsGroup, and the result
- can be other mode bits set.'
- format: int32
- type: integer
- items:
- description: Items is a list of downward API volume file
- items:
- description: DownwardAPIVolumeFile represents information
- to create the file containing the pod field
- properties:
- fieldRef:
- description: 'Required: Selects a field of the pod:
- only annotations, labels, name and namespace are supported.'
- properties:
- apiVersion:
- description: Version of the schema the FieldPath
- is written in terms of, defaults to "v1".
- type: string
- fieldPath:
- description: Path of the field to select in the
- specified API version.
- type: string
- required:
- - fieldPath
- type: object
- mode:
- description: 'Optional: mode bits to use on this file,
- must be a value between 0 and 0777. If not specified,
- the volume defaultMode will be used. This might be
- in conflict with other options that affect the file
- mode, like fsGroup, and the result can be other mode
- bits set.'
- format: int32
- type: integer
- path:
- description: 'Required: Path is the relative path name
- of the file to be created. Must not be absolute or
- contain the ''..'' path. Must be utf-8 encoded. The
- first item of the relative path must not start with
- ''..'''
- type: string
- resourceFieldRef:
- description: 'Selects a resource of the container: only
- resources limits and requests (limits.cpu, limits.memory,
- requests.cpu and requests.memory) are currently supported.'
- properties:
- containerName:
- description: 'Container name: required for volumes,
- optional for env vars'
- type: string
- divisor:
- description: Specifies the output format of the
- exposed resources, defaults to "1"
- type: string
- resource:
- description: 'Required: resource to select'
- type: string
- required:
- - resource
- type: object
- required:
- - path
- type: object
- type: array
- type: object
- emptyDir:
- description: 'EmptyDir represents a temporary directory that shares
- a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir'
- properties:
- medium:
- description: 'What type of storage medium should back this
- directory. The default is "" which means to use the node''s
- default medium. Must be an empty string (default) or Memory.
- More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir'
- type: string
- sizeLimit:
- description: 'Total amount of local storage required for this
- EmptyDir volume. The size limit is also applicable for memory
- medium. 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.
- The default is nil which means that the limit is undefined.
- More info: http://kubernetes.io/docs/user-guide/volumes#emptydir'
- type: string
- type: object
- fc:
- description: FC represents a Fibre Channel resource that is attached
- to a kubelet's host machine and then exposed to the pod.
- properties:
- fsType:
- description: 'Filesystem type to mount. Must be a filesystem
- type supported by the host operating system. Ex. "ext4",
- "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
- TODO: how do we prevent errors in the filesystem from compromising
- the machine'
- type: string
- lun:
- description: 'Optional: FC target lun number'
- format: int32
- type: integer
- readOnly:
- description: 'Optional: Defaults to false (read/write). ReadOnly
- here will force the ReadOnly setting in VolumeMounts.'
- type: boolean
- targetWWNs:
- description: 'Optional: FC target worldwide names (WWNs)'
- items:
- type: string
- type: array
- wwids:
- description: 'Optional: FC volume world wide identifiers (wwids)
- Either wwids or combination of targetWWNs and lun must be
- set, but not both simultaneously.'
- items:
- type: string
- type: array
- type: object
- flexVolume:
- description: FlexVolume represents a generic volume resource that
- is provisioned/attached using an exec based plugin.
- properties:
- driver:
- description: Driver is the name of the driver to use for this
- volume.
- type: string
- fsType:
- description: Filesystem type to mount. Must be a filesystem
- type supported by the host operating system. Ex. "ext4",
- "xfs", "ntfs". The default filesystem depends on FlexVolume
- script.
- type: string
- options:
- additionalProperties:
- type: string
- description: 'Optional: Extra command options if any.'
- type: object
- readOnly:
- description: 'Optional: Defaults to false (read/write). ReadOnly
- here will force the ReadOnly setting in VolumeMounts.'
- type: boolean
- secretRef:
- description: 'Optional: SecretRef is reference to the secret
- object containing sensitive information to pass to the plugin
- scripts. This may be empty if no secret object is specified.
- If the secret object contains more than one secret, all
- secrets are passed to the plugin scripts.'
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- type: object
- required:
- - driver
- type: object
- flocker:
- description: Flocker represents a Flocker volume attached to a
- kubelet's host machine. This depends on the Flocker control
- service being running
- properties:
- datasetName:
- description: Name of the dataset stored as metadata -> name
- on the dataset for Flocker should be considered as deprecated
- type: string
- datasetUUID:
- description: UUID of the dataset. This is unique identifier
- of a Flocker dataset
- type: string
- type: object
- gcePersistentDisk:
- description: 'GCEPersistentDisk represents a GCE Disk resource
- that is attached to a kubelet''s host machine and then exposed
- to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk'
- properties:
- fsType:
- description: 'Filesystem type of the volume that you want
- to mount. Tip: Ensure that the filesystem type is supported
- by the host operating system. Examples: "ext4", "xfs", "ntfs".
- Implicitly inferred to be "ext4" if unspecified. More info:
- https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
- TODO: how do we prevent errors in the filesystem from compromising
- the machine'
- type: string
- partition:
- description: 'The partition in the volume that you want to
- mount. If omitted, the default is to mount by volume name.
- Examples: For volume /dev/sda1, you specify the partition
- as "1". Similarly, the volume partition for /dev/sda is
- "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk'
- format: int32
- type: integer
- pdName:
- description: 'Unique name of the PD resource in GCE. Used
- to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk'
- type: string
- readOnly:
- description: 'ReadOnly here will force the ReadOnly setting
- in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk'
- type: boolean
- required:
- - pdName
- type: object
- gitRepo:
- description: 'GitRepo represents a git repository at a particular
- revision. DEPRECATED: GitRepo is deprecated. To provision a
- container with a git repo, mount an EmptyDir into an InitContainer
- that clones the repo using git, then mount the EmptyDir into
- the Pod''s container.'
- properties:
- directory:
- description: Target directory name. Must not contain or start
- with '..'. If '.' is supplied, the volume directory will
- be the git repository. Otherwise, if specified, the volume
- will contain the git repository in the subdirectory with
- the given name.
- type: string
- repository:
- description: Repository URL
- type: string
- revision:
- description: Commit hash for the specified revision.
- type: string
- required:
- - repository
- type: object
- glusterfs:
- description: 'Glusterfs represents a Glusterfs mount on the host
- that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md'
- properties:
- endpoints:
- description: 'EndpointsName is the endpoint name that details
- Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod'
- type: string
- path:
- description: 'Path is the Glusterfs volume path. More info:
- https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod'
- type: string
- readOnly:
- description: 'ReadOnly here will force the Glusterfs volume
- to be mounted with read-only permissions. Defaults to false.
- More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod'
- type: boolean
- required:
- - endpoints
- - path
- type: object
- hostPath:
- description: 'HostPath represents a pre-existing file or directory
- on the host machine that is directly exposed to the container.
- This is generally used for system agents or other privileged
- things that are allowed to see the host machine. Most containers
- will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
- --- TODO(jonesdl) We need to restrict who can use host directory
- mounts and who can/can not mount host directories as read/write.'
- properties:
- path:
- description: 'Path of the directory on the host. If the path
- is a symlink, it will follow the link to the real path.
- More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath'
- type: string
- type:
- description: 'Type for HostPath Volume Defaults to "" More
- info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath'
- type: string
- required:
- - path
- type: object
- iscsi:
- description: 'ISCSI represents an ISCSI Disk resource that is
- attached to a kubelet''s host machine and then exposed to the
- pod. More info: https://examples.k8s.io/volumes/iscsi/README.md'
- properties:
- chapAuthDiscovery:
- description: whether support iSCSI Discovery CHAP authentication
- type: boolean
- chapAuthSession:
- description: whether support iSCSI Session CHAP authentication
- type: boolean
- fsType:
- description: 'Filesystem type of the volume that you want
- to mount. Tip: Ensure that the filesystem type is supported
- by the host operating system. Examples: "ext4", "xfs", "ntfs".
- Implicitly inferred to be "ext4" if unspecified. More info:
- https://kubernetes.io/docs/concepts/storage/volumes#iscsi
- TODO: how do we prevent errors in the filesystem from compromising
- the machine'
- type: string
- initiatorName:
- description: Custom iSCSI Initiator Name. If initiatorName
- is specified with iscsiInterface simultaneously, new iSCSI
- interface : will be created
- for the connection.
- type: string
- iqn:
- description: Target iSCSI Qualified Name.
- type: string
- iscsiInterface:
- description: iSCSI Interface Name that uses an iSCSI transport.
- Defaults to 'default' (tcp).
- type: string
- lun:
- description: iSCSI Target Lun number.
- format: int32
- type: integer
- portals:
- description: iSCSI Target Portal List. The portal is either
- an IP or ip_addr:port if the port is other than default
- (typically TCP ports 860 and 3260).
- items:
- type: string
- type: array
- readOnly:
- description: ReadOnly here will force the ReadOnly setting
- in VolumeMounts. Defaults to false.
- type: boolean
- secretRef:
- description: CHAP Secret for iSCSI target and initiator authentication
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- type: object
- targetPortal:
- description: iSCSI Target Portal. The Portal is either an
- IP or ip_addr:port if the port is other than default (typically
- TCP ports 860 and 3260).
- type: string
- required:
- - iqn
- - lun
- - targetPortal
- type: object
- name:
- description: 'Volume''s name. Must be a DNS_LABEL and unique within
- the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
- type: string
- nfs:
- description: 'NFS represents an NFS mount on the host that shares
- a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs'
- properties:
- path:
- description: 'Path that is exported by the NFS server. More
- info: https://kubernetes.io/docs/concepts/storage/volumes#nfs'
- type: string
- readOnly:
- description: 'ReadOnly here will force the NFS export to be
- mounted with read-only permissions. Defaults to false. More
- info: https://kubernetes.io/docs/concepts/storage/volumes#nfs'
- type: boolean
- server:
- description: 'Server is the hostname or IP address of the
- NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs'
- type: string
- required:
- - path
- - server
- type: object
- persistentVolumeClaim:
- description: 'PersistentVolumeClaimVolumeSource represents a reference
- to a PersistentVolumeClaim in the same namespace. More info:
- https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
- properties:
- claimName:
- description: 'ClaimName is the name of a PersistentVolumeClaim
- in the same namespace as the pod using this volume. More
- info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
- type: string
- readOnly:
- description: Will force the ReadOnly setting in VolumeMounts.
- Default false.
- type: boolean
- required:
- - claimName
- type: object
- photonPersistentDisk:
- description: PhotonPersistentDisk represents a PhotonController
- persistent disk attached and mounted on kubelets host machine
- properties:
- fsType:
- description: Filesystem type to mount. Must be a filesystem
- type supported by the host operating system. Ex. "ext4",
- "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
- type: string
- pdID:
- description: ID that identifies Photon Controller persistent
- disk
- type: string
- required:
- - pdID
- type: object
- portworxVolume:
- description: PortworxVolume represents a portworx volume attached
- and mounted on kubelets host machine
- properties:
- fsType:
- description: FSType represents the filesystem type to mount
- Must be a filesystem type supported by the host operating
- system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4"
- if unspecified.
- type: string
- readOnly:
- description: Defaults to false (read/write). ReadOnly here
- will force the ReadOnly setting in VolumeMounts.
- type: boolean
- volumeID:
- description: VolumeID uniquely identifies a Portworx volume
- type: string
- required:
- - volumeID
- type: object
- projected:
- description: Items for all in one resources secrets, configmaps,
- and downward API
- properties:
- defaultMode:
- description: Mode bits to use on created files by default.
- Must be a value between 0 and 0777. Directories within the
- path are not affected by this setting. This might be in
- conflict with other options that affect the file mode, like
- fsGroup, and the result can be other mode bits set.
- format: int32
- type: integer
- sources:
- description: list of volume projections
- items:
- description: Projection that may be projected along with
- other supported volume types
- properties:
- configMap:
- description: information about the configMap data to
- project
- properties:
- items:
- description: If unspecified, each key-value pair
- in the Data field of the referenced ConfigMap
- will be projected into the volume as a file whose
- name is the key and content is the value. If specified,
- the listed keys will be projected into the specified
- paths, and unlisted keys will not be present.
- If a key is specified which is not present in
- the ConfigMap, the volume setup will error unless
- it is marked optional. Paths must be relative
- and may not contain the '..' path or start with
- '..'.
- items:
- description: Maps a string key to a path within
- a volume.
- properties:
- key:
- description: The key to project.
- type: string
- mode:
- description: 'Optional: mode bits to use on
- this file, must be a value between 0 and
- 0777. If not specified, the volume defaultMode
- will be used. This might be in conflict
- with other options that affect the file
- mode, like fsGroup, and the result can be
- other mode bits set.'
- format: int32
- type: integer
- path:
- description: The relative path of the file
- to map the key to. May not be an absolute
- path. May not contain the path element '..'.
- May not start with the string '..'.
- type: string
- required:
- - key
- - path
- type: object
- type: array
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the ConfigMap or its
- keys must be defined
- type: boolean
- type: object
- downwardAPI:
- description: information about the downwardAPI data
- to project
- properties:
- items:
- description: Items is a list of DownwardAPIVolume
- file
- items:
- description: DownwardAPIVolumeFile represents
- information to create the file containing the
- pod field
- properties:
- fieldRef:
- description: 'Required: Selects a field of
- the pod: only annotations, labels, name
- and namespace are supported.'
- properties:
- apiVersion:
- description: Version of the schema the
- FieldPath is written in terms of, defaults
- to "v1".
- type: string
- fieldPath:
- description: Path of the field to select
- in the specified API version.
- type: string
- required:
- - fieldPath
- type: object
- mode:
- description: 'Optional: mode bits to use on
- this file, must be a value between 0 and
- 0777. If not specified, the volume defaultMode
- will be used. This might be in conflict
- with other options that affect the file
- mode, like fsGroup, and the result can be
- other mode bits set.'
- format: int32
- type: integer
- path:
- description: 'Required: Path is the relative
- path name of the file to be created. Must
- not be absolute or contain the ''..'' path.
- Must be utf-8 encoded. The first item of
- the relative path must not start with ''..'''
- type: string
- resourceFieldRef:
- description: 'Selects a resource of the container:
- only resources limits and requests (limits.cpu,
- limits.memory, requests.cpu and requests.memory)
- are currently supported.'
- properties:
- containerName:
- description: 'Container name: required
- for volumes, optional for env vars'
- type: string
- divisor:
- description: Specifies the output format
- of the exposed resources, defaults to
- "1"
- type: string
- resource:
- description: 'Required: resource to select'
- type: string
- required:
- - resource
- type: object
- required:
- - path
- type: object
- type: array
- type: object
- secret:
- description: information about the secret data to project
- properties:
- items:
- description: If unspecified, each key-value pair
- in the Data field of the referenced Secret will
- be projected into the volume as a file whose name
- is the key and content is the value. If specified,
- the listed keys will be projected into the specified
- paths, and unlisted keys will not be present.
- If a key is specified which is not present in
- the Secret, the volume setup will error unless
- it is marked optional. Paths must be relative
- and may not contain the '..' path or start with
- '..'.
- items:
- description: Maps a string key to a path within
- a volume.
- properties:
- key:
- description: The key to project.
- type: string
- mode:
- description: 'Optional: mode bits to use on
- this file, must be a value between 0 and
- 0777. If not specified, the volume defaultMode
- will be used. This might be in conflict
- with other options that affect the file
- mode, like fsGroup, and the result can be
- other mode bits set.'
- format: int32
- type: integer
- path:
- description: The relative path of the file
- to map the key to. May not be an absolute
- path. May not contain the path element '..'.
- May not start with the string '..'.
- type: string
- required:
- - key
- - path
- type: object
- type: array
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key
- must be defined
- type: boolean
- type: object
- serviceAccountToken:
- description: information about the serviceAccountToken
- data to project
- properties:
- audience:
- description: Audience is the intended audience of
- the token. A recipient of a token must identify
- itself with an identifier specified in the audience
- of the token, and otherwise should reject the
- token. The audience defaults to the identifier
- of the apiserver.
- type: string
- expirationSeconds:
- description: ExpirationSeconds is the requested
- duration of validity of the service account token.
- As the token approaches expiration, the kubelet
- volume plugin will proactively rotate the service
- account token. The kubelet will start trying to
- rotate the token if the token is older than 80
- percent of its time to live or if the token is
- older than 24 hours.Defaults to 1 hour and must
- be at least 10 minutes.
- format: int64
- type: integer
- path:
- description: Path is the path relative to the mount
- point of the file to project the token into.
- type: string
- required:
- - path
- type: object
- type: object
- type: array
- required:
- - sources
- type: object
- quobyte:
- description: Quobyte represents a Quobyte mount on the host that
- shares a pod's lifetime
- properties:
- group:
- description: Group to map volume access to Default is no group
- type: string
- readOnly:
- description: ReadOnly here will force the Quobyte volume to
- be mounted with read-only permissions. Defaults to false.
- type: boolean
- registry:
- description: Registry represents a single or multiple Quobyte
- Registry services specified as a string as host:port pair
- (multiple entries are separated with commas) which acts
- as the central registry for volumes
- type: string
- tenant:
- description: Tenant owning the given Quobyte volume in the
- Backend Used with dynamically provisioned Quobyte volumes,
- value is set by the plugin
- type: string
- user:
- description: User to map volume access to Defaults to serivceaccount
- user
- type: string
- volume:
- description: Volume is a string that references an already
- created Quobyte volume by name.
- type: string
- required:
- - registry
- - volume
- type: object
- rbd:
- description: 'RBD represents a Rados Block Device mount on the
- host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md'
- properties:
- fsType:
- description: 'Filesystem type of the volume that you want
- to mount. Tip: Ensure that the filesystem type is supported
- by the host operating system. Examples: "ext4", "xfs", "ntfs".
- Implicitly inferred to be "ext4" if unspecified. More info:
- https://kubernetes.io/docs/concepts/storage/volumes#rbd
- TODO: how do we prevent errors in the filesystem from compromising
- the machine'
- type: string
- image:
- description: 'The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
- type: string
- keyring:
- description: 'Keyring is the path to key ring for RBDUser.
- Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
- type: string
- monitors:
- description: 'A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
- items:
- type: string
- type: array
- pool:
- description: 'The rados pool name. Default is rbd. More info:
- https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
- type: string
- readOnly:
- description: 'ReadOnly here will force the ReadOnly setting
- in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
- type: boolean
- secretRef:
- description: 'SecretRef is name of the authentication secret
- for RBDUser. If provided overrides keyring. Default is nil.
- More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- type: object
- user:
- description: 'The rados user name. Default is admin. More
- info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
- type: string
- required:
- - image
- - monitors
- type: object
- scaleIO:
- description: ScaleIO represents a ScaleIO persistent volume attached
- and mounted on Kubernetes nodes.
- properties:
- fsType:
- description: Filesystem type to mount. Must be a filesystem
- type supported by the host operating system. Ex. "ext4",
- "xfs", "ntfs". Default is "xfs".
- type: string
- gateway:
- description: The host address of the ScaleIO API Gateway.
- type: string
- protectionDomain:
- description: The name of the ScaleIO Protection Domain for
- the configured storage.
- type: string
- readOnly:
- description: Defaults to false (read/write). ReadOnly here
- will force the ReadOnly setting in VolumeMounts.
- type: boolean
- secretRef:
- description: SecretRef references to the secret for ScaleIO
- user and other sensitive information. If this is not provided,
- Login operation will fail.
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- type: object
- sslEnabled:
- description: Flag to enable/disable SSL communication with
- Gateway, default false
- type: boolean
- storageMode:
- description: Indicates whether the storage for a volume should
- be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.
- type: string
- storagePool:
- description: The ScaleIO Storage Pool associated with the
- protection domain.
- type: string
- system:
- description: The name of the storage system as configured
- in ScaleIO.
- type: string
- volumeName:
- description: The name of a volume already created in the ScaleIO
- system that is associated with this volume source.
- type: string
- required:
- - gateway
- - secretRef
- - system
- type: object
- secret:
- description: 'Secret represents a secret that should populate
- this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret'
- properties:
- defaultMode:
- description: 'Optional: mode bits to use on created files
- by default. Must be a value between 0 and 0777. Defaults
- to 0644. Directories within the path are not affected by
- this setting. This might be in conflict with other options
- that affect the file mode, like fsGroup, and the result
- can be other mode bits set.'
- format: int32
- type: integer
- items:
- description: If unspecified, each key-value pair in the Data
- field of the referenced Secret will be projected into the
- volume as a file whose name is the key and content is the
- value. If specified, the listed keys will be projected into
- the specified paths, and unlisted keys will not be present.
- If a key is specified which is not present in the Secret,
- the volume setup will error unless it is marked optional.
- Paths must be relative and may not contain the '..' path
- or start with '..'.
- items:
- description: Maps a string key to a path within a volume.
- properties:
- key:
- description: The key to project.
- type: string
- mode:
- description: 'Optional: mode bits to use on this file,
- must be a value between 0 and 0777. If not specified,
- the volume defaultMode will be used. This might be
- in conflict with other options that affect the file
- mode, like fsGroup, and the result can be other mode
- bits set.'
- format: int32
- type: integer
- path:
- description: The relative path of the file to map the
- key to. May not be an absolute path. May not contain
- the path element '..'. May not start with the string
- '..'.
- type: string
- required:
- - key
- - path
- type: object
- type: array
- optional:
- description: Specify whether the Secret or its keys must be
- defined
- type: boolean
- secretName:
- description: 'Name of the secret in the pod''s namespace to
- use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret'
- type: string
- type: object
- storageos:
- description: StorageOS represents a StorageOS volume attached
- and mounted on Kubernetes nodes.
- properties:
- fsType:
- description: Filesystem type to mount. Must be a filesystem
- type supported by the host operating system. Ex. "ext4",
- "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
- type: string
- readOnly:
- description: Defaults to false (read/write). ReadOnly here
- will force the ReadOnly setting in VolumeMounts.
- type: boolean
- secretRef:
- description: SecretRef specifies the secret to use for obtaining
- the StorageOS API credentials. If not specified, default
- values will be attempted.
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- type: object
- volumeName:
- description: VolumeName is the human-readable name of the
- StorageOS volume. Volume names are only unique within a
- namespace.
- type: string
- volumeNamespace:
- description: VolumeNamespace specifies the scope of the volume
- within StorageOS. If no namespace is specified then the
- Pod's namespace will be used. This allows the Kubernetes
- name scoping to be mirrored within StorageOS for tighter
- integration. Set VolumeName to any name to override the
- default behaviour. Set to "default" if you are not using
- namespaces within StorageOS. Namespaces that do not pre-exist
- within StorageOS will be created.
- type: string
- type: object
- vsphereVolume:
- description: VsphereVolume represents a vSphere volume attached
- and mounted on kubelets host machine
- properties:
- fsType:
- description: Filesystem type to mount. Must be a filesystem
- type supported by the host operating system. Ex. "ext4",
- "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
- type: string
- storagePolicyID:
- description: Storage Policy Based Management (SPBM) profile
- ID associated with the StoragePolicyName.
- type: string
- storagePolicyName:
- description: Storage Policy Based Management (SPBM) profile
- name.
- type: string
- volumePath:
- description: Path that identifies vSphere volume vmdk
- type: string
- required:
- - volumePath
- type: object
- required:
- - name
- type: object
- type: array
- walCompression:
- description: Enable compression of the write-ahead log using Snappy.
- This flag is only available in versions of Prometheus >= 2.11.0.
- type: boolean
- type: object
- status:
- description: 'Most recent observed status of the Prometheus cluster. Read-only.
- Not included when requesting from the apiserver, only from the Prometheus
- Operator API itself. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status'
- properties:
- availableReplicas:
- description: Total number of available pods (ready for at least minReadySeconds)
- targeted by this Prometheus deployment.
- format: int32
- type: integer
- paused:
- description: Represents whether any actions on the underlaying managed
- objects are being performed. Only delete actions will be performed.
- type: boolean
- replicas:
- description: Total number of non-terminated pods targeted by this Prometheus
- deployment (their labels match the selector).
- format: int32
- type: integer
- unavailableReplicas:
- description: Total number of unavailable pods targeted by this Prometheus
- deployment.
- format: int32
- type: integer
- updatedReplicas:
- description: Total number of non-terminated pods targeted by this Prometheus
- deployment that have the desired version spec.
- format: int32
- type: integer
- required:
- - availableReplicas
- - paused
- - replicas
- - unavailableReplicas
- - updatedReplicas
- type: object
- required:
- - spec
- type: object
- version: v1
- versions:
- - name: v1
- served: true
- storage: true
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/crds/crd-prometheusrules.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/crds/crd-prometheusrules.yaml
deleted file mode 100755
index 3f5cb49239..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/crds/crd-prometheusrules.yaml
+++ /dev/null
@@ -1,92 +0,0 @@
-# https://raw.githubusercontent.com/coreos/prometheus-operator/release-0.38/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml
-apiVersion: apiextensions.k8s.io/v1beta1
-kind: CustomResourceDefinition
-metadata:
- annotations:
- controller-gen.kubebuilder.io/version: v0.2.4
- helm.sh/hook: crd-install
- creationTimestamp: null
- name: prometheusrules.monitoring.coreos.com
-spec:
- group: monitoring.coreos.com
- names:
- kind: PrometheusRule
- listKind: PrometheusRuleList
- plural: prometheusrules
- singular: prometheusrule
- preserveUnknownFields: false
- scope: Namespaced
- validation:
- openAPIV3Schema:
- description: PrometheusRule defines alerting rules for a Prometheus instance
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
- description: Specification of desired alerting rule definitions for Prometheus.
- properties:
- groups:
- description: Content of Prometheus rule file
- items:
- description: 'RuleGroup is a list of sequentially evaluated recording
- and alerting rules. Note: PartialResponseStrategy is only used by
- ThanosRuler and will be ignored by Prometheus instances. Valid
- values for this field are ''warn'' or ''abort''. More info: https://github.com/thanos-io/thanos/blob/master/docs/components/rule.md#partial-response'
- properties:
- interval:
- type: string
- name:
- type: string
- partial_response_strategy:
- type: string
- rules:
- items:
- description: Rule describes an alerting or recording rule.
- properties:
- alert:
- type: string
- annotations:
- additionalProperties:
- type: string
- type: object
- expr:
- anyOf:
- - type: integer
- - type: string
- x-kubernetes-int-or-string: true
- for:
- type: string
- labels:
- additionalProperties:
- type: string
- type: object
- record:
- type: string
- required:
- - expr
- type: object
- type: array
- required:
- - name
- - rules
- type: object
- type: array
- type: object
- required:
- - spec
- type: object
- version: v1
- versions:
- - name: v1
- served: true
- storage: true
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/crds/crd-servicemonitor.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/crds/crd-servicemonitor.yaml
deleted file mode 100755
index e631c2c090..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/crds/crd-servicemonitor.yaml
+++ /dev/null
@@ -1,460 +0,0 @@
-# https://raw.githubusercontent.com/coreos/prometheus-operator/release-0.38/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
-apiVersion: apiextensions.k8s.io/v1beta1
-kind: CustomResourceDefinition
-metadata:
- annotations:
- controller-gen.kubebuilder.io/version: v0.2.4
- helm.sh/hook: crd-install
- creationTimestamp: null
- name: servicemonitors.monitoring.coreos.com
-spec:
- group: monitoring.coreos.com
- names:
- kind: ServiceMonitor
- listKind: ServiceMonitorList
- plural: servicemonitors
- singular: servicemonitor
- preserveUnknownFields: false
- scope: Namespaced
- validation:
- openAPIV3Schema:
- description: ServiceMonitor defines monitoring for a set of services.
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
- description: Specification of desired Service selection for target discovery
- by Prometheus.
- properties:
- endpoints:
- description: A list of endpoints allowed as part of this ServiceMonitor.
- items:
- description: Endpoint defines a scrapeable endpoint serving Prometheus
- metrics.
- properties:
- basicAuth:
- description: 'BasicAuth allow an endpoint to authenticate over
- basic authentication More info: https://prometheus.io/docs/operating/configuration/#endpoints'
- properties:
- password:
- description: The secret in the service monitor namespace that
- contains the password for authentication.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- username:
- description: The secret in the service monitor namespace that
- contains the username for authentication.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- type: object
- bearerTokenFile:
- description: File to read bearer token for scraping targets.
- type: string
- bearerTokenSecret:
- description: Secret to mount to read bearer token for scraping
- targets. The secret needs to be in the same namespace as the
- service monitor and accessible by the Prometheus Operator.
- properties:
- key:
- description: The key of the secret to select from. Must be
- a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key must be
- defined
- type: boolean
- required:
- - key
- type: object
- honorLabels:
- description: HonorLabels chooses the metric's labels on collisions
- with target labels.
- type: boolean
- honorTimestamps:
- description: HonorTimestamps controls whether Prometheus respects
- the timestamps present in scraped data.
- type: boolean
- interval:
- description: Interval at which metrics should be scraped
- type: string
- metricRelabelings:
- description: MetricRelabelConfigs to apply to samples before ingestion.
- items:
- description: 'RelabelConfig allows dynamic rewriting of the
- label set, being applied to samples before ingestion. It defines
- ``-section of Prometheus configuration.
- More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs'
- properties:
- action:
- description: Action to perform based on regex matching.
- Default is 'replace'
- type: string
- modulus:
- description: Modulus to take of the hash of the source label
- values.
- format: int64
- type: integer
- regex:
- description: Regular expression against which the extracted
- value is matched. Default is '(.*)'
- type: string
- replacement:
- description: Replacement value against which a regex replace
- is performed if the regular expression matches. Regex
- capture groups are available. Default is '$1'
- type: string
- separator:
- description: Separator placed between concatenated source
- label values. default is ';'.
- type: string
- sourceLabels:
- description: The source labels select values from existing
- labels. Their content is concatenated using the configured
- separator and matched against the configured regular expression
- for the replace, keep, and drop actions.
- items:
- type: string
- type: array
- targetLabel:
- description: Label to which the resulting value is written
- in a replace action. It is mandatory for replace actions.
- Regex capture groups are available.
- type: string
- type: object
- type: array
- params:
- additionalProperties:
- items:
- type: string
- type: array
- description: Optional HTTP URL parameters
- type: object
- path:
- description: HTTP path to scrape for metrics.
- type: string
- port:
- description: Name of the service port this endpoint refers to.
- Mutually exclusive with targetPort.
- type: string
- proxyUrl:
- description: ProxyURL eg http://proxyserver:2195 Directs scrapes
- to proxy through this endpoint.
- type: string
- relabelings:
- description: 'RelabelConfigs to apply to samples before scraping.
- More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config'
- items:
- description: 'RelabelConfig allows dynamic rewriting of the
- label set, being applied to samples before ingestion. It defines
- ``-section of Prometheus configuration.
- More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs'
- properties:
- action:
- description: Action to perform based on regex matching.
- Default is 'replace'
- type: string
- modulus:
- description: Modulus to take of the hash of the source label
- values.
- format: int64
- type: integer
- regex:
- description: Regular expression against which the extracted
- value is matched. Default is '(.*)'
- type: string
- replacement:
- description: Replacement value against which a regex replace
- is performed if the regular expression matches. Regex
- capture groups are available. Default is '$1'
- type: string
- separator:
- description: Separator placed between concatenated source
- label values. default is ';'.
- type: string
- sourceLabels:
- description: The source labels select values from existing
- labels. Their content is concatenated using the configured
- separator and matched against the configured regular expression
- for the replace, keep, and drop actions.
- items:
- type: string
- type: array
- targetLabel:
- description: Label to which the resulting value is written
- in a replace action. It is mandatory for replace actions.
- Regex capture groups are available.
- type: string
- type: object
- type: array
- scheme:
- description: HTTP scheme to use for scraping.
- type: string
- scrapeTimeout:
- description: Timeout after which the scrape is ended
- type: string
- targetPort:
- anyOf:
- - type: integer
- - type: string
- description: Name or number of the pod port this endpoint refers
- to. Mutually exclusive with port.
- x-kubernetes-int-or-string: true
- tlsConfig:
- description: TLS configuration to use when scraping the endpoint
- properties:
- ca:
- description: Stuct containing the CA cert to use for the targets.
- properties:
- configMap:
- description: ConfigMap containing data to use for the
- targets.
- properties:
- key:
- description: The key to select.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the ConfigMap or its
- key must be defined
- type: boolean
- required:
- - key
- type: object
- secret:
- description: Secret containing data to use for the targets.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key
- must be defined
- type: boolean
- required:
- - key
- type: object
- type: object
- caFile:
- description: Path to the CA cert in the Prometheus container
- to use for the targets.
- type: string
- cert:
- description: Struct containing the client cert file for the
- targets.
- properties:
- configMap:
- description: ConfigMap containing data to use for the
- targets.
- properties:
- key:
- description: The key to select.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the ConfigMap or its
- key must be defined
- type: boolean
- required:
- - key
- type: object
- secret:
- description: Secret containing data to use for the targets.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key
- must be defined
- type: boolean
- required:
- - key
- type: object
- type: object
- certFile:
- description: Path to the client cert file in the Prometheus
- container for the targets.
- type: string
- insecureSkipVerify:
- description: Disable target certificate validation.
- type: boolean
- keyFile:
- description: Path to the client key file in the Prometheus
- container for the targets.
- type: string
- keySecret:
- description: Secret containing the client key file for the
- targets.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- serverName:
- description: Used to verify the hostname for the targets.
- type: string
- type: object
- type: object
- type: array
- jobLabel:
- description: The label to use to retrieve the job name from.
- type: string
- namespaceSelector:
- description: Selector to select which namespaces the Endpoints objects
- are discovered from.
- properties:
- any:
- description: Boolean describing whether all namespaces are selected
- in contrast to a list restricting them.
- type: boolean
- matchNames:
- description: List of namespace names.
- items:
- type: string
- type: array
- type: object
- podTargetLabels:
- description: PodTargetLabels transfers labels on the Kubernetes Pod
- onto the target.
- items:
- type: string
- type: array
- sampleLimit:
- description: SampleLimit defines per-scrape limit on number of scraped
- samples that will be accepted.
- format: int64
- type: integer
- selector:
- description: Selector to select Endpoints objects.
- properties:
- matchExpressions:
- description: matchExpressions is a list of label selector requirements.
- The requirements are ANDed.
- items:
- description: A label selector requirement is a selector that contains
- values, a key, and an operator that relates the key and values.
- properties:
- key:
- description: key is the label key that the selector applies
- to.
- type: string
- operator:
- description: operator represents a key's relationship to a
- set of values. Valid operators are In, NotIn, Exists and
- DoesNotExist.
- type: string
- values:
- description: values is an array of string values. If the operator
- is In or NotIn, the values array must be non-empty. If the
- operator is Exists or DoesNotExist, the values array must
- be empty. This array is replaced during a strategic merge
- patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- matchLabels:
- additionalProperties:
- type: string
- description: matchLabels is a map of {key,value} pairs. A single
- {key,value} in the matchLabels map is equivalent to an element
- of matchExpressions, whose key field is "key", the operator is
- "In", and the values array contains only "value". The requirements
- are ANDed.
- type: object
- type: object
- targetLabels:
- description: TargetLabels transfers labels on the Kubernetes Service
- onto the target.
- items:
- type: string
- type: array
- required:
- - endpoints
- - selector
- type: object
- required:
- - spec
- type: object
- version: v1
- versions:
- - name: v1
- served: true
- storage: true
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/crds/crd-thanosrulers.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/crds/crd-thanosrulers.yaml
deleted file mode 100755
index e7b935a998..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/crds/crd-thanosrulers.yaml
+++ /dev/null
@@ -1,4726 +0,0 @@
-# https://raw.githubusercontent.com/coreos/prometheus-operator/release-0.38/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml
-apiVersion: apiextensions.k8s.io/v1beta1
-kind: CustomResourceDefinition
-metadata:
- annotations:
- controller-gen.kubebuilder.io/version: v0.2.4
- helm.sh/hook: crd-install
- creationTimestamp: null
- name: thanosrulers.monitoring.coreos.com
-spec:
- group: monitoring.coreos.com
- names:
- kind: ThanosRuler
- listKind: ThanosRulerList
- plural: thanosrulers
- singular: thanosruler
- preserveUnknownFields: false
- scope: Namespaced
- validation:
- openAPIV3Schema:
- description: ThanosRuler defines a ThanosRuler deployment.
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this representation
- of an object. Servers should convert recognized schemas to the latest
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource this
- object represents. Servers may infer this from the endpoint the client
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- type: object
- spec:
- description: 'Specification of the desired behavior of the ThanosRuler cluster.
- More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status'
- properties:
- affinity:
- description: If specified, the pod's scheduling constraints.
- properties:
- nodeAffinity:
- description: Describes node affinity scheduling rules for the pod.
- properties:
- preferredDuringSchedulingIgnoredDuringExecution:
- description: The scheduler will prefer to schedule pods to nodes
- that satisfy the affinity expressions specified by this field,
- but it may choose a node that violates one or more of the
- expressions. The node that is most preferred is the one with
- the greatest sum of weights, i.e. for each node that meets
- all of the scheduling requirements (resource request, requiredDuringScheduling
- affinity expressions, etc.), compute a sum by iterating through
- the elements of this field and adding "weight" to the sum
- if the node matches the corresponding matchExpressions; the
- node(s) with the highest sum are the most preferred.
- items:
- description: An empty preferred scheduling term matches all
- objects with implicit weight 0 (i.e. it's a no-op). A null
- preferred scheduling term matches no objects (i.e. is also
- a no-op).
- properties:
- preference:
- description: A node selector term, associated with the
- corresponding weight.
- properties:
- matchExpressions:
- description: A list of node selector requirements
- by node's labels.
- items:
- description: A node selector requirement is a selector
- that contains values, a key, and an operator that
- relates the key and values.
- properties:
- key:
- description: The label key that the selector
- applies to.
- type: string
- operator:
- description: Represents a key's relationship
- to a set of values. Valid operators are In,
- NotIn, Exists, DoesNotExist. Gt, and Lt.
- type: string
- values:
- description: An array of string values. If the
- operator is In or NotIn, the values array
- must be non-empty. If the operator is Exists
- or DoesNotExist, the values array must be
- empty. If the operator is Gt or Lt, the values
- array must have a single element, which will
- be interpreted as an integer. This array is
- replaced during a strategic merge patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- matchFields:
- description: A list of node selector requirements
- by node's fields.
- items:
- description: A node selector requirement is a selector
- that contains values, a key, and an operator that
- relates the key and values.
- properties:
- key:
- description: The label key that the selector
- applies to.
- type: string
- operator:
- description: Represents a key's relationship
- to a set of values. Valid operators are In,
- NotIn, Exists, DoesNotExist. Gt, and Lt.
- type: string
- values:
- description: An array of string values. If the
- operator is In or NotIn, the values array
- must be non-empty. If the operator is Exists
- or DoesNotExist, the values array must be
- empty. If the operator is Gt or Lt, the values
- array must have a single element, which will
- be interpreted as an integer. This array is
- replaced during a strategic merge patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- type: object
- weight:
- description: Weight associated with matching the corresponding
- nodeSelectorTerm, in the range 1-100.
- format: int32
- type: integer
- required:
- - preference
- - weight
- type: object
- type: array
- requiredDuringSchedulingIgnoredDuringExecution:
- description: If the affinity requirements specified by this
- field are not met at scheduling time, the pod will not be
- scheduled onto the node. If the affinity requirements specified
- by this field cease to be met at some point during pod execution
- (e.g. due to an update), the system may or may not try to
- eventually evict the pod from its node.
- properties:
- nodeSelectorTerms:
- description: Required. A list of node selector terms. The
- terms are ORed.
- items:
- description: A null or empty node selector term matches
- no objects. The requirements of them are ANDed. The
- TopologySelectorTerm type implements a subset of the
- NodeSelectorTerm.
- properties:
- matchExpressions:
- description: A list of node selector requirements
- by node's labels.
- items:
- description: A node selector requirement is a selector
- that contains values, a key, and an operator that
- relates the key and values.
- properties:
- key:
- description: The label key that the selector
- applies to.
- type: string
- operator:
- description: Represents a key's relationship
- to a set of values. Valid operators are In,
- NotIn, Exists, DoesNotExist. Gt, and Lt.
- type: string
- values:
- description: An array of string values. If the
- operator is In or NotIn, the values array
- must be non-empty. If the operator is Exists
- or DoesNotExist, the values array must be
- empty. If the operator is Gt or Lt, the values
- array must have a single element, which will
- be interpreted as an integer. This array is
- replaced during a strategic merge patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- matchFields:
- description: A list of node selector requirements
- by node's fields.
- items:
- description: A node selector requirement is a selector
- that contains values, a key, and an operator that
- relates the key and values.
- properties:
- key:
- description: The label key that the selector
- applies to.
- type: string
- operator:
- description: Represents a key's relationship
- to a set of values. Valid operators are In,
- NotIn, Exists, DoesNotExist. Gt, and Lt.
- type: string
- values:
- description: An array of string values. If the
- operator is In or NotIn, the values array
- must be non-empty. If the operator is Exists
- or DoesNotExist, the values array must be
- empty. If the operator is Gt or Lt, the values
- array must have a single element, which will
- be interpreted as an integer. This array is
- replaced during a strategic merge patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- type: object
- type: array
- required:
- - nodeSelectorTerms
- type: object
- type: object
- podAffinity:
- description: Describes pod affinity scheduling rules (e.g. co-locate
- this pod in the same node, zone, etc. as some other pod(s)).
- properties:
- preferredDuringSchedulingIgnoredDuringExecution:
- description: The scheduler will prefer to schedule pods to nodes
- that satisfy the affinity expressions specified by this field,
- but it may choose a node that violates one or more of the
- expressions. The node that is most preferred is the one with
- the greatest sum of weights, i.e. for each node that meets
- all of the scheduling requirements (resource request, requiredDuringScheduling
- affinity expressions, etc.), compute a sum by iterating through
- the elements of this field and adding "weight" to the sum
- if the node has pods which matches the corresponding podAffinityTerm;
- the node(s) with the highest sum are the most preferred.
- items:
- description: The weights of all of the matched WeightedPodAffinityTerm
- fields are added per-node to find the most preferred node(s)
- properties:
- podAffinityTerm:
- description: Required. A pod affinity term, associated
- with the corresponding weight.
- properties:
- labelSelector:
- description: A label query over a set of resources,
- in this case pods.
- properties:
- matchExpressions:
- description: matchExpressions is a list of label
- selector requirements. The requirements are
- ANDed.
- items:
- description: A label selector requirement is
- a selector that contains values, a key, and
- an operator that relates the key and values.
- properties:
- key:
- description: key is the label key that the
- selector applies to.
- type: string
- operator:
- description: operator represents a key's
- relationship to a set of values. Valid
- operators are In, NotIn, Exists and DoesNotExist.
- type: string
- values:
- description: values is an array of string
- values. If the operator is In or NotIn,
- the values array must be non-empty. If
- the operator is Exists or DoesNotExist,
- the values array must be empty. This array
- is replaced during a strategic merge patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- matchLabels:
- additionalProperties:
- type: string
- description: matchLabels is a map of {key,value}
- pairs. A single {key,value} in the matchLabels
- map is equivalent to an element of matchExpressions,
- whose key field is "key", the operator is "In",
- and the values array contains only "value".
- The requirements are ANDed.
- type: object
- type: object
- namespaces:
- description: namespaces specifies which namespaces
- the labelSelector applies to (matches against);
- null or empty list means "this pod's namespace"
- items:
- type: string
- type: array
- topologyKey:
- description: This pod should be co-located (affinity)
- or not co-located (anti-affinity) with the pods
- matching the labelSelector in the specified namespaces,
- where co-located is defined as running on a node
- whose value of the label with key topologyKey matches
- that of any node on which any of the selected pods
- is running. Empty topologyKey is not allowed.
- type: string
- required:
- - topologyKey
- type: object
- weight:
- description: weight associated with matching the corresponding
- podAffinityTerm, in the range 1-100.
- format: int32
- type: integer
- required:
- - podAffinityTerm
- - weight
- type: object
- type: array
- requiredDuringSchedulingIgnoredDuringExecution:
- description: If the affinity requirements specified by this
- field are not met at scheduling time, the pod will not be
- scheduled onto the node. If the affinity requirements specified
- by this field cease to be met at some point during pod execution
- (e.g. due to a pod label update), the system may or may not
- try to eventually evict the pod from its node. When there
- are multiple elements, the lists of nodes corresponding to
- each podAffinityTerm are intersected, i.e. all terms must
- be satisfied.
- items:
- description: Defines a set of pods (namely those matching
- the labelSelector relative to the given namespace(s)) that
- this pod should be co-located (affinity) or not co-located
- (anti-affinity) with, where co-located is defined as running
- on a node whose value of the label with key
- matches that of any node on which a pod of the set of pods
- is running
- properties:
- labelSelector:
- description: A label query over a set of resources, in
- this case pods.
- properties:
- matchExpressions:
- description: matchExpressions is a list of label selector
- requirements. The requirements are ANDed.
- items:
- description: A label selector requirement is a selector
- that contains values, a key, and an operator that
- relates the key and values.
- properties:
- key:
- description: key is the label key that the selector
- applies to.
- type: string
- operator:
- description: operator represents a key's relationship
- to a set of values. Valid operators are In,
- NotIn, Exists and DoesNotExist.
- type: string
- values:
- description: values is an array of string values.
- If the operator is In or NotIn, the values
- array must be non-empty. If the operator is
- Exists or DoesNotExist, the values array must
- be empty. This array is replaced during a
- strategic merge patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- matchLabels:
- additionalProperties:
- type: string
- description: matchLabels is a map of {key,value} pairs.
- A single {key,value} in the matchLabels map is equivalent
- to an element of matchExpressions, whose key field
- is "key", the operator is "In", and the values array
- contains only "value". The requirements are ANDed.
- type: object
- type: object
- namespaces:
- description: namespaces specifies which namespaces the
- labelSelector applies to (matches against); null or
- empty list means "this pod's namespace"
- items:
- type: string
- type: array
- topologyKey:
- description: This pod should be co-located (affinity)
- or not co-located (anti-affinity) with the pods matching
- the labelSelector in the specified namespaces, where
- co-located is defined as running on a node whose value
- of the label with key topologyKey matches that of any
- node on which any of the selected pods is running. Empty
- topologyKey is not allowed.
- type: string
- required:
- - topologyKey
- type: object
- type: array
- type: object
- podAntiAffinity:
- description: Describes pod anti-affinity scheduling rules (e.g.
- avoid putting this pod in the same node, zone, etc. as some other
- pod(s)).
- properties:
- preferredDuringSchedulingIgnoredDuringExecution:
- description: The scheduler will prefer to schedule pods to nodes
- that satisfy the anti-affinity expressions specified by this
- field, but it may choose a node that violates one or more
- of the expressions. The node that is most preferred is the
- one with the greatest sum of weights, i.e. for each node that
- meets all of the scheduling requirements (resource request,
- requiredDuringScheduling anti-affinity expressions, etc.),
- compute a sum by iterating through the elements of this field
- and adding "weight" to the sum if the node has pods which
- matches the corresponding podAffinityTerm; the node(s) with
- the highest sum are the most preferred.
- items:
- description: The weights of all of the matched WeightedPodAffinityTerm
- fields are added per-node to find the most preferred node(s)
- properties:
- podAffinityTerm:
- description: Required. A pod affinity term, associated
- with the corresponding weight.
- properties:
- labelSelector:
- description: A label query over a set of resources,
- in this case pods.
- properties:
- matchExpressions:
- description: matchExpressions is a list of label
- selector requirements. The requirements are
- ANDed.
- items:
- description: A label selector requirement is
- a selector that contains values, a key, and
- an operator that relates the key and values.
- properties:
- key:
- description: key is the label key that the
- selector applies to.
- type: string
- operator:
- description: operator represents a key's
- relationship to a set of values. Valid
- operators are In, NotIn, Exists and DoesNotExist.
- type: string
- values:
- description: values is an array of string
- values. If the operator is In or NotIn,
- the values array must be non-empty. If
- the operator is Exists or DoesNotExist,
- the values array must be empty. This array
- is replaced during a strategic merge patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- matchLabels:
- additionalProperties:
- type: string
- description: matchLabels is a map of {key,value}
- pairs. A single {key,value} in the matchLabels
- map is equivalent to an element of matchExpressions,
- whose key field is "key", the operator is "In",
- and the values array contains only "value".
- The requirements are ANDed.
- type: object
- type: object
- namespaces:
- description: namespaces specifies which namespaces
- the labelSelector applies to (matches against);
- null or empty list means "this pod's namespace"
- items:
- type: string
- type: array
- topologyKey:
- description: This pod should be co-located (affinity)
- or not co-located (anti-affinity) with the pods
- matching the labelSelector in the specified namespaces,
- where co-located is defined as running on a node
- whose value of the label with key topologyKey matches
- that of any node on which any of the selected pods
- is running. Empty topologyKey is not allowed.
- type: string
- required:
- - topologyKey
- type: object
- weight:
- description: weight associated with matching the corresponding
- podAffinityTerm, in the range 1-100.
- format: int32
- type: integer
- required:
- - podAffinityTerm
- - weight
- type: object
- type: array
- requiredDuringSchedulingIgnoredDuringExecution:
- description: If the anti-affinity requirements specified by
- this field are not met at scheduling time, the pod will not
- be scheduled onto the node. If the anti-affinity requirements
- specified by this field cease to be met at some point during
- pod execution (e.g. due to a pod label update), the system
- may or may not try to eventually evict the pod from its node.
- When there are multiple elements, the lists of nodes corresponding
- to each podAffinityTerm are intersected, i.e. all terms must
- be satisfied.
- items:
- description: Defines a set of pods (namely those matching
- the labelSelector relative to the given namespace(s)) that
- this pod should be co-located (affinity) or not co-located
- (anti-affinity) with, where co-located is defined as running
- on a node whose value of the label with key
- matches that of any node on which a pod of the set of pods
- is running
- properties:
- labelSelector:
- description: A label query over a set of resources, in
- this case pods.
- properties:
- matchExpressions:
- description: matchExpressions is a list of label selector
- requirements. The requirements are ANDed.
- items:
- description: A label selector requirement is a selector
- that contains values, a key, and an operator that
- relates the key and values.
- properties:
- key:
- description: key is the label key that the selector
- applies to.
- type: string
- operator:
- description: operator represents a key's relationship
- to a set of values. Valid operators are In,
- NotIn, Exists and DoesNotExist.
- type: string
- values:
- description: values is an array of string values.
- If the operator is In or NotIn, the values
- array must be non-empty. If the operator is
- Exists or DoesNotExist, the values array must
- be empty. This array is replaced during a
- strategic merge patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- matchLabels:
- additionalProperties:
- type: string
- description: matchLabels is a map of {key,value} pairs.
- A single {key,value} in the matchLabels map is equivalent
- to an element of matchExpressions, whose key field
- is "key", the operator is "In", and the values array
- contains only "value". The requirements are ANDed.
- type: object
- type: object
- namespaces:
- description: namespaces specifies which namespaces the
- labelSelector applies to (matches against); null or
- empty list means "this pod's namespace"
- items:
- type: string
- type: array
- topologyKey:
- description: This pod should be co-located (affinity)
- or not co-located (anti-affinity) with the pods matching
- the labelSelector in the specified namespaces, where
- co-located is defined as running on a node whose value
- of the label with key topologyKey matches that of any
- node on which any of the selected pods is running. Empty
- topologyKey is not allowed.
- type: string
- required:
- - topologyKey
- type: object
- type: array
- type: object
- type: object
- alertDropLabels:
- description: AlertDropLabels configure the label names which should
- be dropped in ThanosRuler alerts. If `labels` field is not provided,
- `thanos_ruler_replica` will be dropped in alerts by default.
- items:
- type: string
- type: array
- alertQueryUrl:
- description: The external Query URL the Thanos Ruler will set in the
- 'Source' field of all alerts. Maps to the '--alert.query-url' CLI
- arg.
- type: string
- alertmanagersConfig:
- description: Define configuration for connecting to alertmanager. Only
- available with thanos v0.10.0 and higher. Maps to the `alertmanagers.config`
- arg.
- properties:
- key:
- description: The key of the secret to select from. Must be a valid
- secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key must be defined
- type: boolean
- required:
- - key
- type: object
- alertmanagersUrl:
- description: '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` arg.'
- items:
- type: string
- type: array
- containers:
- description: 'Containers allows injecting additional containers or modifying
- operator generated containers. This can be used to allow adding an
- authentication proxy to a ThanosRuler pod or to change the behavior
- of an operator generated container. Containers described here modify
- an operator generated container if they share the same name and modifications
- are done via a strategic merge patch. The current container names
- are: `thanos-ruler` and `rules-configmap-reloader`. Overriding containers
- is entirely outside the scope of what the maintainers will support
- and by doing so, you accept that this behaviour may break at any time
- without notice.'
- items:
- description: A single application container that you want to run within
- a pod.
- properties:
- args:
- description: 'Arguments to the entrypoint. The docker image''s
- CMD is used if this is not provided. Variable references $(VAR_NAME)
- are expanded using the container''s environment. If a variable
- cannot be resolved, the reference in the input string will be
- unchanged. The $(VAR_NAME) syntax can be escaped with a double
- $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
- regardless of whether the variable exists or not. Cannot be
- updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'
- items:
- type: string
- type: array
- command:
- description: 'Entrypoint array. Not executed within a shell. The
- docker image''s ENTRYPOINT is used if this is not provided.
- Variable references $(VAR_NAME) are expanded using the container''s
- environment. If a variable cannot be resolved, the reference
- in the input string will be unchanged. The $(VAR_NAME) syntax
- can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references
- will never be expanded, regardless of whether the variable exists
- or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'
- items:
- type: string
- type: array
- env:
- description: List of environment variables to set in the container.
- Cannot be updated.
- items:
- description: EnvVar represents an environment variable present
- in a Container.
- properties:
- name:
- description: Name of the environment variable. Must be a
- C_IDENTIFIER.
- type: string
- value:
- description: 'Variable references $(VAR_NAME) are expanded
- using the previous defined environment variables in the
- container and any service environment variables. If a
- variable cannot be resolved, the reference in the input
- string will be unchanged. The $(VAR_NAME) syntax can be
- escaped with a double $$, ie: $$(VAR_NAME). Escaped references
- will never be expanded, regardless of whether the variable
- exists or not. Defaults to "".'
- type: string
- valueFrom:
- description: Source for the environment variable's value.
- Cannot be used if value is not empty.
- properties:
- configMapKeyRef:
- description: Selects a key of a ConfigMap.
- properties:
- key:
- description: The key to select.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the ConfigMap or its
- key must be defined
- type: boolean
- required:
- - key
- type: object
- fieldRef:
- description: 'Selects a field of the pod: supports metadata.name,
- metadata.namespace, metadata.labels, metadata.annotations,
- spec.nodeName, spec.serviceAccountName, status.hostIP,
- status.podIP, status.podIPs.'
- properties:
- apiVersion:
- description: Version of the schema the FieldPath
- is written in terms of, defaults to "v1".
- type: string
- fieldPath:
- description: Path of the field to select in the
- specified API version.
- type: string
- required:
- - fieldPath
- type: object
- resourceFieldRef:
- description: 'Selects a resource of the container: only
- resources limits and requests (limits.cpu, limits.memory,
- limits.ephemeral-storage, requests.cpu, requests.memory
- and requests.ephemeral-storage) are currently supported.'
- properties:
- containerName:
- description: 'Container name: required for volumes,
- optional for env vars'
- type: string
- divisor:
- description: Specifies the output format of the
- exposed resources, defaults to "1"
- type: string
- resource:
- description: 'Required: resource to select'
- type: string
- required:
- - resource
- type: object
- secretKeyRef:
- description: Selects a key of a secret in the pod's
- namespace
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key
- must be defined
- type: boolean
- required:
- - key
- type: object
- type: object
- required:
- - name
- type: object
- type: array
- envFrom:
- description: List of sources to populate environment variables
- in the container. The keys defined within a source must be a
- C_IDENTIFIER. All invalid keys will be reported as an event
- when the container is starting. When a key exists in multiple
- sources, the value associated with the last source will take
- precedence. Values defined by an Env with a duplicate key will
- take precedence. Cannot be updated.
- items:
- description: EnvFromSource represents the source of a set of
- ConfigMaps
- properties:
- configMapRef:
- description: The ConfigMap to select from
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the ConfigMap must be defined
- type: boolean
- type: object
- prefix:
- description: An optional identifier to prepend to each key
- in the ConfigMap. Must be a C_IDENTIFIER.
- type: string
- secretRef:
- description: The Secret to select from
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret must be defined
- type: boolean
- type: object
- type: object
- type: array
- image:
- description: 'Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images
- This field is optional to allow higher level config management
- to default or override container images in workload controllers
- like Deployments and StatefulSets.'
- type: string
- imagePullPolicy:
- description: 'Image pull policy. One of Always, Never, IfNotPresent.
- Defaults to Always if :latest tag is specified, or IfNotPresent
- otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images'
- type: string
- lifecycle:
- description: Actions that the management system should take in
- response to container lifecycle events. Cannot be updated.
- properties:
- postStart:
- description: 'PostStart is called immediately after a container
- is created. If the handler fails, the container is terminated
- and restarted according to its restart policy. Other management
- of the container blocks until the hook completes. More info:
- https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks'
- properties:
- exec:
- description: One and only one of the following should
- be specified. Exec specifies the action to take.
- properties:
- command:
- description: Command is the command line to execute
- inside the container, the working directory for
- the command is root ('/') in the container's filesystem.
- The command is simply exec'd, it is not run inside
- a shell, so traditional shell instructions ('|',
- etc) won't work. To use a shell, you need to explicitly
- call out to that shell. Exit status of 0 is treated
- as live/healthy and non-zero is unhealthy.
- items:
- type: string
- type: array
- type: object
- httpGet:
- description: HTTPGet specifies the http request to perform.
- properties:
- host:
- description: Host name to connect to, defaults to
- the pod IP. You probably want to set "Host" in httpHeaders
- instead.
- type: string
- httpHeaders:
- description: Custom headers to set in the request.
- HTTP allows repeated headers.
- items:
- description: HTTPHeader describes a custom header
- to be used in HTTP probes
- properties:
- name:
- description: The header field name
- type: string
- value:
- description: The header field value
- type: string
- required:
- - name
- - value
- type: object
- type: array
- path:
- description: Path to access on the HTTP server.
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Name or number of the port to access
- on the container. Number must be in the range 1
- to 65535. Name must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- scheme:
- description: Scheme to use for connecting to the host.
- Defaults to HTTP.
- type: string
- required:
- - port
- type: object
- tcpSocket:
- description: 'TCPSocket specifies an action involving
- a TCP port. TCP hooks not yet supported TODO: implement
- a realistic TCP lifecycle hook'
- properties:
- host:
- description: 'Optional: Host name to connect to, defaults
- to the pod IP.'
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Number or name of the port to access
- on the container. Number must be in the range 1
- to 65535. Name must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- required:
- - port
- type: object
- type: object
- preStop:
- description: 'PreStop is called immediately before a container
- is terminated due to an API request or management event
- such as liveness/startup probe failure, preemption, resource
- contention, etc. The handler is not called if the container
- crashes or exits. The reason for termination is passed to
- the handler. The Pod''s termination grace period countdown
- begins before the PreStop hooked is executed. Regardless
- of the outcome of the handler, the container will eventually
- terminate within the Pod''s termination grace period. Other
- management of the container blocks until the hook completes
- or until the termination grace period is reached. More info:
- https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks'
- properties:
- exec:
- description: One and only one of the following should
- be specified. Exec specifies the action to take.
- properties:
- command:
- description: Command is the command line to execute
- inside the container, the working directory for
- the command is root ('/') in the container's filesystem.
- The command is simply exec'd, it is not run inside
- a shell, so traditional shell instructions ('|',
- etc) won't work. To use a shell, you need to explicitly
- call out to that shell. Exit status of 0 is treated
- as live/healthy and non-zero is unhealthy.
- items:
- type: string
- type: array
- type: object
- httpGet:
- description: HTTPGet specifies the http request to perform.
- properties:
- host:
- description: Host name to connect to, defaults to
- the pod IP. You probably want to set "Host" in httpHeaders
- instead.
- type: string
- httpHeaders:
- description: Custom headers to set in the request.
- HTTP allows repeated headers.
- items:
- description: HTTPHeader describes a custom header
- to be used in HTTP probes
- properties:
- name:
- description: The header field name
- type: string
- value:
- description: The header field value
- type: string
- required:
- - name
- - value
- type: object
- type: array
- path:
- description: Path to access on the HTTP server.
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Name or number of the port to access
- on the container. Number must be in the range 1
- to 65535. Name must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- scheme:
- description: Scheme to use for connecting to the host.
- Defaults to HTTP.
- type: string
- required:
- - port
- type: object
- tcpSocket:
- description: 'TCPSocket specifies an action involving
- a TCP port. TCP hooks not yet supported TODO: implement
- a realistic TCP lifecycle hook'
- properties:
- host:
- description: 'Optional: Host name to connect to, defaults
- to the pod IP.'
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Number or name of the port to access
- on the container. Number must be in the range 1
- to 65535. Name must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- required:
- - port
- type: object
- type: object
- type: object
- livenessProbe:
- description: 'Periodic probe of container liveness. Container
- will be restarted if the probe fails. Cannot be updated. More
- info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- properties:
- exec:
- description: One and only one of the following should be specified.
- Exec specifies the action to take.
- properties:
- command:
- description: Command is the command line to execute inside
- the container, the working directory for the command is
- root ('/') in the container's filesystem. The command
- is simply exec'd, it is not run inside a shell, so traditional
- shell instructions ('|', etc) won't work. To use a shell,
- you need to explicitly call out to that shell. Exit
- status of 0 is treated as live/healthy and non-zero
- is unhealthy.
- items:
- type: string
- type: array
- type: object
- failureThreshold:
- description: Minimum consecutive failures for the probe to
- be considered failed after having succeeded. Defaults to
- 3. Minimum value is 1.
- format: int32
- type: integer
- httpGet:
- description: HTTPGet specifies the http request to perform.
- properties:
- host:
- description: Host name to connect to, defaults to the
- pod IP. You probably want to set "Host" in httpHeaders
- instead.
- type: string
- httpHeaders:
- description: Custom headers to set in the request. HTTP
- allows repeated headers.
- items:
- description: HTTPHeader describes a custom header to
- be used in HTTP probes
- properties:
- name:
- description: The header field name
- type: string
- value:
- description: The header field value
- type: string
- required:
- - name
- - value
- type: object
- type: array
- path:
- description: Path to access on the HTTP server.
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Name or number of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- scheme:
- description: Scheme to use for connecting to the host.
- Defaults to HTTP.
- type: string
- required:
- - port
- type: object
- initialDelaySeconds:
- description: 'Number of seconds after the container has started
- before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- periodSeconds:
- description: How often (in seconds) to perform the probe.
- Default to 10 seconds. Minimum value is 1.
- format: int32
- type: integer
- successThreshold:
- description: Minimum consecutive successes for the probe to
- be considered successful after having failed. Defaults to
- 1. Must be 1 for liveness and startup. Minimum value is
- 1.
- format: int32
- type: integer
- tcpSocket:
- description: 'TCPSocket specifies an action involving a TCP
- port. TCP hooks not yet supported TODO: implement a realistic
- TCP lifecycle hook'
- properties:
- host:
- description: 'Optional: Host name to connect to, defaults
- to the pod IP.'
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Number or name of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- required:
- - port
- type: object
- timeoutSeconds:
- description: 'Number of seconds after which the probe times
- out. Defaults to 1 second. Minimum value is 1. More info:
- https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- type: object
- name:
- description: Name of the container specified as a DNS_LABEL. Each
- container in a pod must have a unique name (DNS_LABEL). Cannot
- be updated.
- type: string
- ports:
- description: List of ports to expose from the container. Exposing
- a port here gives the system additional information about the
- network connections a container uses, but is primarily informational.
- Not specifying a port here DOES NOT prevent that port from being
- exposed. Any port which is listening on the default "0.0.0.0"
- address inside a container will be accessible from the network.
- Cannot be updated.
- items:
- description: ContainerPort represents a network port in a single
- container.
- properties:
- containerPort:
- description: Number of port to expose on the pod's IP address.
- This must be a valid port number, 0 < x < 65536.
- format: int32
- type: integer
- hostIP:
- description: What host IP to bind the external port to.
- type: string
- hostPort:
- description: Number of port to expose on the host. If specified,
- this must be a valid port number, 0 < x < 65536. If HostNetwork
- is specified, this must match ContainerPort. Most containers
- do not need this.
- format: int32
- type: integer
- name:
- description: If specified, this must be an IANA_SVC_NAME
- and unique within the pod. Each named port in a pod must
- have a unique name. Name for the port that can be referred
- to by services.
- type: string
- protocol:
- description: Protocol for port. Must be UDP, TCP, or SCTP.
- Defaults to "TCP".
- type: string
- required:
- - containerPort
- type: object
- type: array
- readinessProbe:
- description: 'Periodic probe of container service readiness. Container
- will be removed from service endpoints if the probe fails. Cannot
- be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- properties:
- exec:
- description: One and only one of the following should be specified.
- Exec specifies the action to take.
- properties:
- command:
- description: Command is the command line to execute inside
- the container, the working directory for the command is
- root ('/') in the container's filesystem. The command
- is simply exec'd, it is not run inside a shell, so traditional
- shell instructions ('|', etc) won't work. To use a shell,
- you need to explicitly call out to that shell. Exit
- status of 0 is treated as live/healthy and non-zero
- is unhealthy.
- items:
- type: string
- type: array
- type: object
- failureThreshold:
- description: Minimum consecutive failures for the probe to
- be considered failed after having succeeded. Defaults to
- 3. Minimum value is 1.
- format: int32
- type: integer
- httpGet:
- description: HTTPGet specifies the http request to perform.
- properties:
- host:
- description: Host name to connect to, defaults to the
- pod IP. You probably want to set "Host" in httpHeaders
- instead.
- type: string
- httpHeaders:
- description: Custom headers to set in the request. HTTP
- allows repeated headers.
- items:
- description: HTTPHeader describes a custom header to
- be used in HTTP probes
- properties:
- name:
- description: The header field name
- type: string
- value:
- description: The header field value
- type: string
- required:
- - name
- - value
- type: object
- type: array
- path:
- description: Path to access on the HTTP server.
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Name or number of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- scheme:
- description: Scheme to use for connecting to the host.
- Defaults to HTTP.
- type: string
- required:
- - port
- type: object
- initialDelaySeconds:
- description: 'Number of seconds after the container has started
- before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- periodSeconds:
- description: How often (in seconds) to perform the probe.
- Default to 10 seconds. Minimum value is 1.
- format: int32
- type: integer
- successThreshold:
- description: Minimum consecutive successes for the probe to
- be considered successful after having failed. Defaults to
- 1. Must be 1 for liveness and startup. Minimum value is
- 1.
- format: int32
- type: integer
- tcpSocket:
- description: 'TCPSocket specifies an action involving a TCP
- port. TCP hooks not yet supported TODO: implement a realistic
- TCP lifecycle hook'
- properties:
- host:
- description: 'Optional: Host name to connect to, defaults
- to the pod IP.'
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Number or name of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- required:
- - port
- type: object
- timeoutSeconds:
- description: 'Number of seconds after which the probe times
- out. Defaults to 1 second. Minimum value is 1. More info:
- https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- type: object
- resources:
- description: 'Compute Resources required by this container. Cannot
- be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
- properties:
- limits:
- additionalProperties:
- type: string
- description: 'Limits describes the maximum amount of compute
- resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
- type: object
- requests:
- additionalProperties:
- type: string
- description: 'Requests describes the minimum amount of compute
- resources required. If Requests is omitted for a container,
- it defaults to Limits if that is explicitly specified, otherwise
- to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
- type: object
- type: object
- securityContext:
- description: 'Security options the pod should run with. More info:
- https://kubernetes.io/docs/concepts/policy/security-context/
- More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/'
- properties:
- allowPrivilegeEscalation:
- description: 'AllowPrivilegeEscalation controls whether a
- process can gain more privileges than its parent process.
- This bool directly controls if the no_new_privs flag will
- be set on the container process. AllowPrivilegeEscalation
- is true always when the container is: 1) run as Privileged
- 2) has CAP_SYS_ADMIN'
- type: boolean
- capabilities:
- description: The capabilities to add/drop when running containers.
- Defaults to the default set of capabilities granted by the
- container runtime.
- properties:
- add:
- description: Added capabilities
- items:
- description: Capability represent POSIX capabilities
- type
- type: string
- type: array
- drop:
- description: Removed capabilities
- items:
- description: Capability represent POSIX capabilities
- type
- type: string
- type: array
- type: object
- privileged:
- description: Run container in privileged mode. Processes in
- privileged containers are essentially equivalent to root
- on the host. Defaults to false.
- type: boolean
- procMount:
- description: procMount denotes the type of proc mount to use
- for the containers. The default is DefaultProcMount which
- uses the container runtime defaults for readonly paths and
- masked paths. This requires the ProcMountType feature flag
- to be enabled.
- type: string
- readOnlyRootFilesystem:
- description: Whether this container has a read-only root filesystem.
- Default is false.
- type: boolean
- runAsGroup:
- description: The GID to run the entrypoint of the container
- process. Uses runtime default if unset. May also be set
- in PodSecurityContext. If set in both SecurityContext and
- PodSecurityContext, the value specified in SecurityContext
- takes precedence.
- format: int64
- type: integer
- runAsNonRoot:
- description: Indicates that the container must run as a non-root
- user. If true, the Kubelet will validate the image at runtime
- to ensure that it does not run as UID 0 (root) and fail
- to start the container if it does. If unset or false, no
- such validation will be performed. May also be set in PodSecurityContext. If
- set in both SecurityContext and PodSecurityContext, the
- value specified in SecurityContext takes precedence.
- type: boolean
- runAsUser:
- description: The UID to run the entrypoint of the container
- process. Defaults to user specified in image metadata if
- unspecified. May also be set in PodSecurityContext. If
- set in both SecurityContext and PodSecurityContext, the
- value specified in SecurityContext takes precedence.
- format: int64
- type: integer
- seLinuxOptions:
- description: The SELinux context to be applied to the container.
- If unspecified, the container runtime will allocate a random
- SELinux context for each container. May also be set in
- PodSecurityContext. If set in both SecurityContext and
- PodSecurityContext, the value specified in SecurityContext
- takes precedence.
- properties:
- level:
- description: Level is SELinux level label that applies
- to the container.
- type: string
- role:
- description: Role is a SELinux role label that applies
- to the container.
- type: string
- type:
- description: Type is a SELinux type label that applies
- to the container.
- type: string
- user:
- description: User is a SELinux user label that applies
- to the container.
- type: string
- type: object
- windowsOptions:
- description: The Windows specific settings applied to all
- containers. If unspecified, the options from the PodSecurityContext
- will be used. If set in both SecurityContext and PodSecurityContext,
- the value specified in SecurityContext takes precedence.
- properties:
- gmsaCredentialSpec:
- description: GMSACredentialSpec is where the GMSA admission
- webhook (https://github.com/kubernetes-sigs/windows-gmsa)
- inlines the contents of the GMSA credential spec named
- by the GMSACredentialSpecName field. This field is alpha-level
- and is only honored by servers that enable the WindowsGMSA
- feature flag.
- type: string
- gmsaCredentialSpecName:
- description: GMSACredentialSpecName is the name of the
- GMSA credential spec to use. This field is alpha-level
- and is only honored by servers that enable the WindowsGMSA
- feature flag.
- type: string
- runAsUserName:
- description: The UserName in Windows to run the entrypoint
- of the container process. Defaults to the user specified
- in image metadata if unspecified. May also be set in
- PodSecurityContext. If set in both SecurityContext and
- PodSecurityContext, the value specified in SecurityContext
- takes precedence. This field is beta-level and may be
- disabled with the WindowsRunAsUserName feature flag.
- type: string
- type: object
- type: object
- startupProbe:
- description: 'StartupProbe indicates that the Pod has successfully
- initialized. If specified, no other probes are executed until
- this completes successfully. If this probe fails, the Pod will
- be restarted, just as if the livenessProbe failed. This can
- be used to provide different probe parameters at the beginning
- of a Pod''s lifecycle, when it might take a long time to load
- data or warm a cache, than during steady-state operation. This
- cannot be updated. This is an alpha feature enabled by the StartupProbe
- feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- properties:
- exec:
- description: One and only one of the following should be specified.
- Exec specifies the action to take.
- properties:
- command:
- description: Command is the command line to execute inside
- the container, the working directory for the command is
- root ('/') in the container's filesystem. The command
- is simply exec'd, it is not run inside a shell, so traditional
- shell instructions ('|', etc) won't work. To use a shell,
- you need to explicitly call out to that shell. Exit
- status of 0 is treated as live/healthy and non-zero
- is unhealthy.
- items:
- type: string
- type: array
- type: object
- failureThreshold:
- description: Minimum consecutive failures for the probe to
- be considered failed after having succeeded. Defaults to
- 3. Minimum value is 1.
- format: int32
- type: integer
- httpGet:
- description: HTTPGet specifies the http request to perform.
- properties:
- host:
- description: Host name to connect to, defaults to the
- pod IP. You probably want to set "Host" in httpHeaders
- instead.
- type: string
- httpHeaders:
- description: Custom headers to set in the request. HTTP
- allows repeated headers.
- items:
- description: HTTPHeader describes a custom header to
- be used in HTTP probes
- properties:
- name:
- description: The header field name
- type: string
- value:
- description: The header field value
- type: string
- required:
- - name
- - value
- type: object
- type: array
- path:
- description: Path to access on the HTTP server.
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Name or number of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- scheme:
- description: Scheme to use for connecting to the host.
- Defaults to HTTP.
- type: string
- required:
- - port
- type: object
- initialDelaySeconds:
- description: 'Number of seconds after the container has started
- before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- periodSeconds:
- description: How often (in seconds) to perform the probe.
- Default to 10 seconds. Minimum value is 1.
- format: int32
- type: integer
- successThreshold:
- description: Minimum consecutive successes for the probe to
- be considered successful after having failed. Defaults to
- 1. Must be 1 for liveness and startup. Minimum value is
- 1.
- format: int32
- type: integer
- tcpSocket:
- description: 'TCPSocket specifies an action involving a TCP
- port. TCP hooks not yet supported TODO: implement a realistic
- TCP lifecycle hook'
- properties:
- host:
- description: 'Optional: Host name to connect to, defaults
- to the pod IP.'
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Number or name of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- required:
- - port
- type: object
- timeoutSeconds:
- description: 'Number of seconds after which the probe times
- out. Defaults to 1 second. Minimum value is 1. More info:
- https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- type: object
- stdin:
- description: Whether this container should allocate a buffer for
- stdin in the container runtime. If this is not set, reads from
- stdin in the container will always result in EOF. Default is
- false.
- type: boolean
- stdinOnce:
- description: Whether the container runtime should close the stdin
- channel after it has been opened by a single attach. When stdin
- is true the stdin stream will remain open across multiple attach
- sessions. If stdinOnce is set to true, stdin is opened on container
- start, is empty until the first client attaches to stdin, and
- then remains open and accepts data until the client disconnects,
- at which time stdin is closed and remains closed until the container
- is restarted. If this flag is false, a container processes that
- reads from stdin will never receive an EOF. Default is false
- type: boolean
- terminationMessagePath:
- description: 'Optional: Path at which the file to which the container''s
- termination message will be written is mounted into the container''s
- filesystem. Message written is intended to be brief final status,
- such as an assertion failure message. Will be truncated by the
- node if greater than 4096 bytes. The total message length across
- all containers will be limited to 12kb. Defaults to /dev/termination-log.
- Cannot be updated.'
- type: string
- terminationMessagePolicy:
- description: Indicate how the termination message should be populated.
- File will use the contents of terminationMessagePath to populate
- the container status message on both success and failure. FallbackToLogsOnError
- will use the last chunk of container log output if the termination
- message file is empty and the container exited with an error.
- The log output is limited to 2048 bytes or 80 lines, whichever
- is smaller. Defaults to File. Cannot be updated.
- type: string
- tty:
- description: Whether this container should allocate a TTY for
- itself, also requires 'stdin' to be true. Default is false.
- type: boolean
- volumeDevices:
- description: volumeDevices is the list of block devices to be
- used by the container. This is a beta feature.
- items:
- description: volumeDevice describes a mapping of a raw block
- device within a container.
- properties:
- devicePath:
- description: devicePath is the path inside of the container
- that the device will be mapped to.
- type: string
- name:
- description: name must match the name of a persistentVolumeClaim
- in the pod
- type: string
- required:
- - devicePath
- - name
- type: object
- type: array
- volumeMounts:
- description: Pod volumes to mount into the container's filesystem.
- Cannot be updated.
- items:
- description: VolumeMount describes a mounting of a Volume within
- a container.
- properties:
- mountPath:
- description: Path within the container at which the volume
- should be mounted. Must not contain ':'.
- type: string
- mountPropagation:
- description: mountPropagation determines how mounts are
- propagated from the host to container and the other way
- around. When not set, MountPropagationNone is used. This
- field is beta in 1.10.
- type: string
- name:
- description: This must match the Name of a Volume.
- type: string
- readOnly:
- description: Mounted read-only if true, read-write otherwise
- (false or unspecified). Defaults to false.
- type: boolean
- subPath:
- description: Path within the volume from which the container's
- volume should be mounted. Defaults to "" (volume's root).
- type: string
- subPathExpr:
- description: Expanded path within the volume from which
- the container's volume should be mounted. Behaves similarly
- to SubPath but environment variable references $(VAR_NAME)
- are expanded using the container's environment. Defaults
- to "" (volume's root). SubPathExpr and SubPath are mutually
- exclusive.
- type: string
- required:
- - mountPath
- - name
- type: object
- type: array
- workingDir:
- description: Container's working directory. If not specified,
- the container runtime's default will be used, which might be
- configured in the container image. Cannot be updated.
- type: string
- required:
- - name
- type: object
- type: array
- enforcedNamespaceLabel:
- description: 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.
- type: string
- evaluationInterval:
- description: Interval between consecutive evaluations.
- type: string
- externalPrefix:
- description: 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.
- type: string
- grpcServerTlsConfig:
- description: 'GRPCServerTLSConfig configures the gRPC server from which
- Thanos Querier reads recorded rule data. Note: Currently only the
- CAFile, CertFile, and KeyFile fields are supported. Maps to the ''--grpc-server-tls-*''
- CLI args.'
- properties:
- ca:
- description: Stuct containing the CA cert to use for the targets.
- properties:
- configMap:
- description: ConfigMap containing data to use for the targets.
- properties:
- key:
- description: The key to select.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the ConfigMap or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- secret:
- description: Secret containing data to use for the targets.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- type: object
- caFile:
- description: Path to the CA cert in the Prometheus container to
- use for the targets.
- type: string
- cert:
- description: Struct containing the client cert file for the targets.
- properties:
- configMap:
- description: ConfigMap containing data to use for the targets.
- properties:
- key:
- description: The key to select.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the ConfigMap or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- secret:
- description: Secret containing data to use for the targets.
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key must
- be defined
- type: boolean
- required:
- - key
- type: object
- type: object
- certFile:
- description: Path to the client cert file in the Prometheus container
- for the targets.
- type: string
- insecureSkipVerify:
- description: Disable target certificate validation.
- type: boolean
- keyFile:
- description: Path to the client key file in the Prometheus container
- for the targets.
- type: string
- keySecret:
- description: Secret containing the client key file for the targets.
- properties:
- key:
- description: The key of the secret to select from. Must be
- a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key must be defined
- type: boolean
- required:
- - key
- type: object
- serverName:
- description: Used to verify the hostname for the targets.
- type: string
- type: object
- image:
- description: Thanos container image URL.
- type: string
- imagePullSecrets:
- description: An optional list of references to secrets in the same namespace
- to use for pulling thanos images from registries see http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod
- items:
- description: LocalObjectReference contains enough information to let
- you locate the referenced object inside the same namespace.
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- type: object
- type: array
- initContainers:
- description: 'InitContainers allows adding initContainers to the pod
- definition. Those can be used to e.g. fetch secrets for injection
- into the ThanosRuler configuration from external sources. Any errors
- during the execution of an initContainer will lead to a restart of
- the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
- Using initContainers for any use case other then secret fetching is
- entirely outside the scope of what the maintainers will support and
- by doing so, you accept that this behaviour may break at any time
- without notice.'
- items:
- description: A single application container that you want to run within
- a pod.
- properties:
- args:
- description: 'Arguments to the entrypoint. The docker image''s
- CMD is used if this is not provided. Variable references $(VAR_NAME)
- are expanded using the container''s environment. If a variable
- cannot be resolved, the reference in the input string will be
- unchanged. The $(VAR_NAME) syntax can be escaped with a double
- $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
- regardless of whether the variable exists or not. Cannot be
- updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'
- items:
- type: string
- type: array
- command:
- description: 'Entrypoint array. Not executed within a shell. The
- docker image''s ENTRYPOINT is used if this is not provided.
- Variable references $(VAR_NAME) are expanded using the container''s
- environment. If a variable cannot be resolved, the reference
- in the input string will be unchanged. The $(VAR_NAME) syntax
- can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references
- will never be expanded, regardless of whether the variable exists
- or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell'
- items:
- type: string
- type: array
- env:
- description: List of environment variables to set in the container.
- Cannot be updated.
- items:
- description: EnvVar represents an environment variable present
- in a Container.
- properties:
- name:
- description: Name of the environment variable. Must be a
- C_IDENTIFIER.
- type: string
- value:
- description: 'Variable references $(VAR_NAME) are expanded
- using the previous defined environment variables in the
- container and any service environment variables. If a
- variable cannot be resolved, the reference in the input
- string will be unchanged. The $(VAR_NAME) syntax can be
- escaped with a double $$, ie: $$(VAR_NAME). Escaped references
- will never be expanded, regardless of whether the variable
- exists or not. Defaults to "".'
- type: string
- valueFrom:
- description: Source for the environment variable's value.
- Cannot be used if value is not empty.
- properties:
- configMapKeyRef:
- description: Selects a key of a ConfigMap.
- properties:
- key:
- description: The key to select.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the ConfigMap or its
- key must be defined
- type: boolean
- required:
- - key
- type: object
- fieldRef:
- description: 'Selects a field of the pod: supports metadata.name,
- metadata.namespace, metadata.labels, metadata.annotations,
- spec.nodeName, spec.serviceAccountName, status.hostIP,
- status.podIP, status.podIPs.'
- properties:
- apiVersion:
- description: Version of the schema the FieldPath
- is written in terms of, defaults to "v1".
- type: string
- fieldPath:
- description: Path of the field to select in the
- specified API version.
- type: string
- required:
- - fieldPath
- type: object
- resourceFieldRef:
- description: 'Selects a resource of the container: only
- resources limits and requests (limits.cpu, limits.memory,
- limits.ephemeral-storage, requests.cpu, requests.memory
- and requests.ephemeral-storage) are currently supported.'
- properties:
- containerName:
- description: 'Container name: required for volumes,
- optional for env vars'
- type: string
- divisor:
- description: Specifies the output format of the
- exposed resources, defaults to "1"
- type: string
- resource:
- description: 'Required: resource to select'
- type: string
- required:
- - resource
- type: object
- secretKeyRef:
- description: Selects a key of a secret in the pod's
- namespace
- properties:
- key:
- description: The key of the secret to select from. Must
- be a valid secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key
- must be defined
- type: boolean
- required:
- - key
- type: object
- type: object
- required:
- - name
- type: object
- type: array
- envFrom:
- description: List of sources to populate environment variables
- in the container. The keys defined within a source must be a
- C_IDENTIFIER. All invalid keys will be reported as an event
- when the container is starting. When a key exists in multiple
- sources, the value associated with the last source will take
- precedence. Values defined by an Env with a duplicate key will
- take precedence. Cannot be updated.
- items:
- description: EnvFromSource represents the source of a set of
- ConfigMaps
- properties:
- configMapRef:
- description: The ConfigMap to select from
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the ConfigMap must be defined
- type: boolean
- type: object
- prefix:
- description: An optional identifier to prepend to each key
- in the ConfigMap. Must be a C_IDENTIFIER.
- type: string
- secretRef:
- description: The Secret to select from
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret must be defined
- type: boolean
- type: object
- type: object
- type: array
- image:
- description: 'Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images
- This field is optional to allow higher level config management
- to default or override container images in workload controllers
- like Deployments and StatefulSets.'
- type: string
- imagePullPolicy:
- description: 'Image pull policy. One of Always, Never, IfNotPresent.
- Defaults to Always if :latest tag is specified, or IfNotPresent
- otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images'
- type: string
- lifecycle:
- description: Actions that the management system should take in
- response to container lifecycle events. Cannot be updated.
- properties:
- postStart:
- description: 'PostStart is called immediately after a container
- is created. If the handler fails, the container is terminated
- and restarted according to its restart policy. Other management
- of the container blocks until the hook completes. More info:
- https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks'
- properties:
- exec:
- description: One and only one of the following should
- be specified. Exec specifies the action to take.
- properties:
- command:
- description: Command is the command line to execute
- inside the container, the working directory for
- the command is root ('/') in the container's filesystem.
- The command is simply exec'd, it is not run inside
- a shell, so traditional shell instructions ('|',
- etc) won't work. To use a shell, you need to explicitly
- call out to that shell. Exit status of 0 is treated
- as live/healthy and non-zero is unhealthy.
- items:
- type: string
- type: array
- type: object
- httpGet:
- description: HTTPGet specifies the http request to perform.
- properties:
- host:
- description: Host name to connect to, defaults to
- the pod IP. You probably want to set "Host" in httpHeaders
- instead.
- type: string
- httpHeaders:
- description: Custom headers to set in the request.
- HTTP allows repeated headers.
- items:
- description: HTTPHeader describes a custom header
- to be used in HTTP probes
- properties:
- name:
- description: The header field name
- type: string
- value:
- description: The header field value
- type: string
- required:
- - name
- - value
- type: object
- type: array
- path:
- description: Path to access on the HTTP server.
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Name or number of the port to access
- on the container. Number must be in the range 1
- to 65535. Name must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- scheme:
- description: Scheme to use for connecting to the host.
- Defaults to HTTP.
- type: string
- required:
- - port
- type: object
- tcpSocket:
- description: 'TCPSocket specifies an action involving
- a TCP port. TCP hooks not yet supported TODO: implement
- a realistic TCP lifecycle hook'
- properties:
- host:
- description: 'Optional: Host name to connect to, defaults
- to the pod IP.'
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Number or name of the port to access
- on the container. Number must be in the range 1
- to 65535. Name must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- required:
- - port
- type: object
- type: object
- preStop:
- description: 'PreStop is called immediately before a container
- is terminated due to an API request or management event
- such as liveness/startup probe failure, preemption, resource
- contention, etc. The handler is not called if the container
- crashes or exits. The reason for termination is passed to
- the handler. The Pod''s termination grace period countdown
- begins before the PreStop hooked is executed. Regardless
- of the outcome of the handler, the container will eventually
- terminate within the Pod''s termination grace period. Other
- management of the container blocks until the hook completes
- or until the termination grace period is reached. More info:
- https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks'
- properties:
- exec:
- description: One and only one of the following should
- be specified. Exec specifies the action to take.
- properties:
- command:
- description: Command is the command line to execute
- inside the container, the working directory for
- the command is root ('/') in the container's filesystem.
- The command is simply exec'd, it is not run inside
- a shell, so traditional shell instructions ('|',
- etc) won't work. To use a shell, you need to explicitly
- call out to that shell. Exit status of 0 is treated
- as live/healthy and non-zero is unhealthy.
- items:
- type: string
- type: array
- type: object
- httpGet:
- description: HTTPGet specifies the http request to perform.
- properties:
- host:
- description: Host name to connect to, defaults to
- the pod IP. You probably want to set "Host" in httpHeaders
- instead.
- type: string
- httpHeaders:
- description: Custom headers to set in the request.
- HTTP allows repeated headers.
- items:
- description: HTTPHeader describes a custom header
- to be used in HTTP probes
- properties:
- name:
- description: The header field name
- type: string
- value:
- description: The header field value
- type: string
- required:
- - name
- - value
- type: object
- type: array
- path:
- description: Path to access on the HTTP server.
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Name or number of the port to access
- on the container. Number must be in the range 1
- to 65535. Name must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- scheme:
- description: Scheme to use for connecting to the host.
- Defaults to HTTP.
- type: string
- required:
- - port
- type: object
- tcpSocket:
- description: 'TCPSocket specifies an action involving
- a TCP port. TCP hooks not yet supported TODO: implement
- a realistic TCP lifecycle hook'
- properties:
- host:
- description: 'Optional: Host name to connect to, defaults
- to the pod IP.'
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Number or name of the port to access
- on the container. Number must be in the range 1
- to 65535. Name must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- required:
- - port
- type: object
- type: object
- type: object
- livenessProbe:
- description: 'Periodic probe of container liveness. Container
- will be restarted if the probe fails. Cannot be updated. More
- info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- properties:
- exec:
- description: One and only one of the following should be specified.
- Exec specifies the action to take.
- properties:
- command:
- description: Command is the command line to execute inside
- the container, the working directory for the command is
- root ('/') in the container's filesystem. The command
- is simply exec'd, it is not run inside a shell, so traditional
- shell instructions ('|', etc) won't work. To use a shell,
- you need to explicitly call out to that shell. Exit
- status of 0 is treated as live/healthy and non-zero
- is unhealthy.
- items:
- type: string
- type: array
- type: object
- failureThreshold:
- description: Minimum consecutive failures for the probe to
- be considered failed after having succeeded. Defaults to
- 3. Minimum value is 1.
- format: int32
- type: integer
- httpGet:
- description: HTTPGet specifies the http request to perform.
- properties:
- host:
- description: Host name to connect to, defaults to the
- pod IP. You probably want to set "Host" in httpHeaders
- instead.
- type: string
- httpHeaders:
- description: Custom headers to set in the request. HTTP
- allows repeated headers.
- items:
- description: HTTPHeader describes a custom header to
- be used in HTTP probes
- properties:
- name:
- description: The header field name
- type: string
- value:
- description: The header field value
- type: string
- required:
- - name
- - value
- type: object
- type: array
- path:
- description: Path to access on the HTTP server.
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Name or number of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- scheme:
- description: Scheme to use for connecting to the host.
- Defaults to HTTP.
- type: string
- required:
- - port
- type: object
- initialDelaySeconds:
- description: 'Number of seconds after the container has started
- before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- periodSeconds:
- description: How often (in seconds) to perform the probe.
- Default to 10 seconds. Minimum value is 1.
- format: int32
- type: integer
- successThreshold:
- description: Minimum consecutive successes for the probe to
- be considered successful after having failed. Defaults to
- 1. Must be 1 for liveness and startup. Minimum value is
- 1.
- format: int32
- type: integer
- tcpSocket:
- description: 'TCPSocket specifies an action involving a TCP
- port. TCP hooks not yet supported TODO: implement a realistic
- TCP lifecycle hook'
- properties:
- host:
- description: 'Optional: Host name to connect to, defaults
- to the pod IP.'
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Number or name of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- required:
- - port
- type: object
- timeoutSeconds:
- description: 'Number of seconds after which the probe times
- out. Defaults to 1 second. Minimum value is 1. More info:
- https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- type: object
- name:
- description: Name of the container specified as a DNS_LABEL. Each
- container in a pod must have a unique name (DNS_LABEL). Cannot
- be updated.
- type: string
- ports:
- description: List of ports to expose from the container. Exposing
- a port here gives the system additional information about the
- network connections a container uses, but is primarily informational.
- Not specifying a port here DOES NOT prevent that port from being
- exposed. Any port which is listening on the default "0.0.0.0"
- address inside a container will be accessible from the network.
- Cannot be updated.
- items:
- description: ContainerPort represents a network port in a single
- container.
- properties:
- containerPort:
- description: Number of port to expose on the pod's IP address.
- This must be a valid port number, 0 < x < 65536.
- format: int32
- type: integer
- hostIP:
- description: What host IP to bind the external port to.
- type: string
- hostPort:
- description: Number of port to expose on the host. If specified,
- this must be a valid port number, 0 < x < 65536. If HostNetwork
- is specified, this must match ContainerPort. Most containers
- do not need this.
- format: int32
- type: integer
- name:
- description: If specified, this must be an IANA_SVC_NAME
- and unique within the pod. Each named port in a pod must
- have a unique name. Name for the port that can be referred
- to by services.
- type: string
- protocol:
- description: Protocol for port. Must be UDP, TCP, or SCTP.
- Defaults to "TCP".
- type: string
- required:
- - containerPort
- type: object
- type: array
- readinessProbe:
- description: 'Periodic probe of container service readiness. Container
- will be removed from service endpoints if the probe fails. Cannot
- be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- properties:
- exec:
- description: One and only one of the following should be specified.
- Exec specifies the action to take.
- properties:
- command:
- description: Command is the command line to execute inside
- the container, the working directory for the command is
- root ('/') in the container's filesystem. The command
- is simply exec'd, it is not run inside a shell, so traditional
- shell instructions ('|', etc) won't work. To use a shell,
- you need to explicitly call out to that shell. Exit
- status of 0 is treated as live/healthy and non-zero
- is unhealthy.
- items:
- type: string
- type: array
- type: object
- failureThreshold:
- description: Minimum consecutive failures for the probe to
- be considered failed after having succeeded. Defaults to
- 3. Minimum value is 1.
- format: int32
- type: integer
- httpGet:
- description: HTTPGet specifies the http request to perform.
- properties:
- host:
- description: Host name to connect to, defaults to the
- pod IP. You probably want to set "Host" in httpHeaders
- instead.
- type: string
- httpHeaders:
- description: Custom headers to set in the request. HTTP
- allows repeated headers.
- items:
- description: HTTPHeader describes a custom header to
- be used in HTTP probes
- properties:
- name:
- description: The header field name
- type: string
- value:
- description: The header field value
- type: string
- required:
- - name
- - value
- type: object
- type: array
- path:
- description: Path to access on the HTTP server.
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Name or number of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- scheme:
- description: Scheme to use for connecting to the host.
- Defaults to HTTP.
- type: string
- required:
- - port
- type: object
- initialDelaySeconds:
- description: 'Number of seconds after the container has started
- before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- periodSeconds:
- description: How often (in seconds) to perform the probe.
- Default to 10 seconds. Minimum value is 1.
- format: int32
- type: integer
- successThreshold:
- description: Minimum consecutive successes for the probe to
- be considered successful after having failed. Defaults to
- 1. Must be 1 for liveness and startup. Minimum value is
- 1.
- format: int32
- type: integer
- tcpSocket:
- description: 'TCPSocket specifies an action involving a TCP
- port. TCP hooks not yet supported TODO: implement a realistic
- TCP lifecycle hook'
- properties:
- host:
- description: 'Optional: Host name to connect to, defaults
- to the pod IP.'
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Number or name of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- required:
- - port
- type: object
- timeoutSeconds:
- description: 'Number of seconds after which the probe times
- out. Defaults to 1 second. Minimum value is 1. More info:
- https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- type: object
- resources:
- description: 'Compute Resources required by this container. Cannot
- be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
- properties:
- limits:
- additionalProperties:
- type: string
- description: 'Limits describes the maximum amount of compute
- resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
- type: object
- requests:
- additionalProperties:
- type: string
- description: 'Requests describes the minimum amount of compute
- resources required. If Requests is omitted for a container,
- it defaults to Limits if that is explicitly specified, otherwise
- to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
- type: object
- type: object
- securityContext:
- description: 'Security options the pod should run with. More info:
- https://kubernetes.io/docs/concepts/policy/security-context/
- More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/'
- properties:
- allowPrivilegeEscalation:
- description: 'AllowPrivilegeEscalation controls whether a
- process can gain more privileges than its parent process.
- This bool directly controls if the no_new_privs flag will
- be set on the container process. AllowPrivilegeEscalation
- is true always when the container is: 1) run as Privileged
- 2) has CAP_SYS_ADMIN'
- type: boolean
- capabilities:
- description: The capabilities to add/drop when running containers.
- Defaults to the default set of capabilities granted by the
- container runtime.
- properties:
- add:
- description: Added capabilities
- items:
- description: Capability represent POSIX capabilities
- type
- type: string
- type: array
- drop:
- description: Removed capabilities
- items:
- description: Capability represent POSIX capabilities
- type
- type: string
- type: array
- type: object
- privileged:
- description: Run container in privileged mode. Processes in
- privileged containers are essentially equivalent to root
- on the host. Defaults to false.
- type: boolean
- procMount:
- description: procMount denotes the type of proc mount to use
- for the containers. The default is DefaultProcMount which
- uses the container runtime defaults for readonly paths and
- masked paths. This requires the ProcMountType feature flag
- to be enabled.
- type: string
- readOnlyRootFilesystem:
- description: Whether this container has a read-only root filesystem.
- Default is false.
- type: boolean
- runAsGroup:
- description: The GID to run the entrypoint of the container
- process. Uses runtime default if unset. May also be set
- in PodSecurityContext. If set in both SecurityContext and
- PodSecurityContext, the value specified in SecurityContext
- takes precedence.
- format: int64
- type: integer
- runAsNonRoot:
- description: Indicates that the container must run as a non-root
- user. If true, the Kubelet will validate the image at runtime
- to ensure that it does not run as UID 0 (root) and fail
- to start the container if it does. If unset or false, no
- such validation will be performed. May also be set in PodSecurityContext. If
- set in both SecurityContext and PodSecurityContext, the
- value specified in SecurityContext takes precedence.
- type: boolean
- runAsUser:
- description: The UID to run the entrypoint of the container
- process. Defaults to user specified in image metadata if
- unspecified. May also be set in PodSecurityContext. If
- set in both SecurityContext and PodSecurityContext, the
- value specified in SecurityContext takes precedence.
- format: int64
- type: integer
- seLinuxOptions:
- description: The SELinux context to be applied to the container.
- If unspecified, the container runtime will allocate a random
- SELinux context for each container. May also be set in
- PodSecurityContext. If set in both SecurityContext and
- PodSecurityContext, the value specified in SecurityContext
- takes precedence.
- properties:
- level:
- description: Level is SELinux level label that applies
- to the container.
- type: string
- role:
- description: Role is a SELinux role label that applies
- to the container.
- type: string
- type:
- description: Type is a SELinux type label that applies
- to the container.
- type: string
- user:
- description: User is a SELinux user label that applies
- to the container.
- type: string
- type: object
- windowsOptions:
- description: The Windows specific settings applied to all
- containers. If unspecified, the options from the PodSecurityContext
- will be used. If set in both SecurityContext and PodSecurityContext,
- the value specified in SecurityContext takes precedence.
- properties:
- gmsaCredentialSpec:
- description: GMSACredentialSpec is where the GMSA admission
- webhook (https://github.com/kubernetes-sigs/windows-gmsa)
- inlines the contents of the GMSA credential spec named
- by the GMSACredentialSpecName field. This field is alpha-level
- and is only honored by servers that enable the WindowsGMSA
- feature flag.
- type: string
- gmsaCredentialSpecName:
- description: GMSACredentialSpecName is the name of the
- GMSA credential spec to use. This field is alpha-level
- and is only honored by servers that enable the WindowsGMSA
- feature flag.
- type: string
- runAsUserName:
- description: The UserName in Windows to run the entrypoint
- of the container process. Defaults to the user specified
- in image metadata if unspecified. May also be set in
- PodSecurityContext. If set in both SecurityContext and
- PodSecurityContext, the value specified in SecurityContext
- takes precedence. This field is beta-level and may be
- disabled with the WindowsRunAsUserName feature flag.
- type: string
- type: object
- type: object
- startupProbe:
- description: 'StartupProbe indicates that the Pod has successfully
- initialized. If specified, no other probes are executed until
- this completes successfully. If this probe fails, the Pod will
- be restarted, just as if the livenessProbe failed. This can
- be used to provide different probe parameters at the beginning
- of a Pod''s lifecycle, when it might take a long time to load
- data or warm a cache, than during steady-state operation. This
- cannot be updated. This is an alpha feature enabled by the StartupProbe
- feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- properties:
- exec:
- description: One and only one of the following should be specified.
- Exec specifies the action to take.
- properties:
- command:
- description: Command is the command line to execute inside
- the container, the working directory for the command is
- root ('/') in the container's filesystem. The command
- is simply exec'd, it is not run inside a shell, so traditional
- shell instructions ('|', etc) won't work. To use a shell,
- you need to explicitly call out to that shell. Exit
- status of 0 is treated as live/healthy and non-zero
- is unhealthy.
- items:
- type: string
- type: array
- type: object
- failureThreshold:
- description: Minimum consecutive failures for the probe to
- be considered failed after having succeeded. Defaults to
- 3. Minimum value is 1.
- format: int32
- type: integer
- httpGet:
- description: HTTPGet specifies the http request to perform.
- properties:
- host:
- description: Host name to connect to, defaults to the
- pod IP. You probably want to set "Host" in httpHeaders
- instead.
- type: string
- httpHeaders:
- description: Custom headers to set in the request. HTTP
- allows repeated headers.
- items:
- description: HTTPHeader describes a custom header to
- be used in HTTP probes
- properties:
- name:
- description: The header field name
- type: string
- value:
- description: The header field value
- type: string
- required:
- - name
- - value
- type: object
- type: array
- path:
- description: Path to access on the HTTP server.
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Name or number of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- scheme:
- description: Scheme to use for connecting to the host.
- Defaults to HTTP.
- type: string
- required:
- - port
- type: object
- initialDelaySeconds:
- description: 'Number of seconds after the container has started
- before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- periodSeconds:
- description: How often (in seconds) to perform the probe.
- Default to 10 seconds. Minimum value is 1.
- format: int32
- type: integer
- successThreshold:
- description: Minimum consecutive successes for the probe to
- be considered successful after having failed. Defaults to
- 1. Must be 1 for liveness and startup. Minimum value is
- 1.
- format: int32
- type: integer
- tcpSocket:
- description: 'TCPSocket specifies an action involving a TCP
- port. TCP hooks not yet supported TODO: implement a realistic
- TCP lifecycle hook'
- properties:
- host:
- description: 'Optional: Host name to connect to, defaults
- to the pod IP.'
- type: string
- port:
- anyOf:
- - type: integer
- - type: string
- description: Number or name of the port to access on the
- container. Number must be in the range 1 to 65535. Name
- must be an IANA_SVC_NAME.
- x-kubernetes-int-or-string: true
- required:
- - port
- type: object
- timeoutSeconds:
- description: 'Number of seconds after which the probe times
- out. Defaults to 1 second. Minimum value is 1. More info:
- https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
- format: int32
- type: integer
- type: object
- stdin:
- description: Whether this container should allocate a buffer for
- stdin in the container runtime. If this is not set, reads from
- stdin in the container will always result in EOF. Default is
- false.
- type: boolean
- stdinOnce:
- description: Whether the container runtime should close the stdin
- channel after it has been opened by a single attach. When stdin
- is true the stdin stream will remain open across multiple attach
- sessions. If stdinOnce is set to true, stdin is opened on container
- start, is empty until the first client attaches to stdin, and
- then remains open and accepts data until the client disconnects,
- at which time stdin is closed and remains closed until the container
- is restarted. If this flag is false, a container processes that
- reads from stdin will never receive an EOF. Default is false
- type: boolean
- terminationMessagePath:
- description: 'Optional: Path at which the file to which the container''s
- termination message will be written is mounted into the container''s
- filesystem. Message written is intended to be brief final status,
- such as an assertion failure message. Will be truncated by the
- node if greater than 4096 bytes. The total message length across
- all containers will be limited to 12kb. Defaults to /dev/termination-log.
- Cannot be updated.'
- type: string
- terminationMessagePolicy:
- description: Indicate how the termination message should be populated.
- File will use the contents of terminationMessagePath to populate
- the container status message on both success and failure. FallbackToLogsOnError
- will use the last chunk of container log output if the termination
- message file is empty and the container exited with an error.
- The log output is limited to 2048 bytes or 80 lines, whichever
- is smaller. Defaults to File. Cannot be updated.
- type: string
- tty:
- description: Whether this container should allocate a TTY for
- itself, also requires 'stdin' to be true. Default is false.
- type: boolean
- volumeDevices:
- description: volumeDevices is the list of block devices to be
- used by the container. This is a beta feature.
- items:
- description: volumeDevice describes a mapping of a raw block
- device within a container.
- properties:
- devicePath:
- description: devicePath is the path inside of the container
- that the device will be mapped to.
- type: string
- name:
- description: name must match the name of a persistentVolumeClaim
- in the pod
- type: string
- required:
- - devicePath
- - name
- type: object
- type: array
- volumeMounts:
- description: Pod volumes to mount into the container's filesystem.
- Cannot be updated.
- items:
- description: VolumeMount describes a mounting of a Volume within
- a container.
- properties:
- mountPath:
- description: Path within the container at which the volume
- should be mounted. Must not contain ':'.
- type: string
- mountPropagation:
- description: mountPropagation determines how mounts are
- propagated from the host to container and the other way
- around. When not set, MountPropagationNone is used. This
- field is beta in 1.10.
- type: string
- name:
- description: This must match the Name of a Volume.
- type: string
- readOnly:
- description: Mounted read-only if true, read-write otherwise
- (false or unspecified). Defaults to false.
- type: boolean
- subPath:
- description: Path within the volume from which the container's
- volume should be mounted. Defaults to "" (volume's root).
- type: string
- subPathExpr:
- description: Expanded path within the volume from which
- the container's volume should be mounted. Behaves similarly
- to SubPath but environment variable references $(VAR_NAME)
- are expanded using the container's environment. Defaults
- to "" (volume's root). SubPathExpr and SubPath are mutually
- exclusive.
- type: string
- required:
- - mountPath
- - name
- type: object
- type: array
- workingDir:
- description: Container's working directory. If not specified,
- the container runtime's default will be used, which might be
- configured in the container image. Cannot be updated.
- type: string
- required:
- - name
- type: object
- type: array
- labels:
- additionalProperties:
- type: string
- description: Labels configure the external label pairs to ThanosRuler.
- If not provided, default replica label `thanos_ruler_replica` will
- be added as a label and be dropped in alerts.
- type: object
- listenLocal:
- description: ListenLocal makes the Thanos ruler listen on loopback,
- so that it does not bind against the Pod IP.
- type: boolean
- logFormat:
- description: Log format for ThanosRuler to be configured with.
- type: string
- logLevel:
- description: Log level for ThanosRuler to be configured with.
- type: string
- nodeSelector:
- additionalProperties:
- type: string
- description: Define which Nodes the Pods are scheduled on.
- type: object
- objectStorageConfig:
- description: ObjectStorageConfig configures object storage in Thanos.
- properties:
- key:
- description: The key of the secret to select from. Must be a valid
- secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key must be defined
- type: boolean
- required:
- - key
- type: object
- paused:
- description: When a ThanosRuler deployment is paused, no actions except
- for deletion will be performed on the underlying objects.
- type: boolean
- podMetadata:
- description: PodMetadata contains Labels and Annotations gets propagated
- to the thanos ruler pods.
- properties:
- annotations:
- additionalProperties:
- type: string
- description: 'Annotations is an unstructured key value map stored
- with a resource that may be set by external tools to store and
- retrieve arbitrary metadata. They are not queryable and should
- be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations'
- type: object
- labels:
- additionalProperties:
- type: string
- description: 'Map of string keys and values that can be used to
- organize and categorize (scope and select) objects. May match
- selectors of replication controllers and services. More info:
- http://kubernetes.io/docs/user-guide/labels'
- type: object
- type: object
- portName:
- description: Port name used for the pods and governing service. This
- defaults to web
- type: string
- priorityClassName:
- description: Priority class assigned to the Pods
- type: string
- queryConfig:
- description: Define configuration for connecting to thanos query instances.
- If this is defined, the QueryEndpoints field will be ignored. Maps
- to the `query.config` CLI argument. Only available with thanos v0.11.0
- and higher.
- properties:
- key:
- description: The key of the secret to select from. Must be a valid
- secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key must be defined
- type: boolean
- required:
- - key
- type: object
- queryEndpoints:
- description: QueryEndpoints defines Thanos querier endpoints from which
- to query metrics. Maps to the --query flag of thanos ruler.
- items:
- type: string
- type: array
- replicas:
- description: Number of thanos ruler instances to deploy.
- format: int32
- type: integer
- resources:
- description: Resources defines the resource requirements for single
- Pods. If not provided, no requests/limits will be set
- properties:
- limits:
- additionalProperties:
- type: string
- description: 'Limits describes the maximum amount of compute resources
- allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
- type: object
- requests:
- additionalProperties:
- type: string
- description: 'Requests describes the minimum amount of compute resources
- required. If Requests is omitted for a container, it defaults
- to Limits if that is explicitly specified, otherwise to an implementation-defined
- value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
- type: object
- type: object
- retention:
- description: Time duration ThanosRuler shall retain data for. Default
- is '24h', and must match the regular expression `[0-9]+(ms|s|m|h|d|w|y)`
- (milliseconds seconds minutes hours days weeks years).
- type: string
- routePrefix:
- description: The route prefix ThanosRuler registers HTTP handlers for.
- This allows thanos UI to be served on a sub-path.
- type: string
- ruleNamespaceSelector:
- description: Namespaces to be selected for Rules discovery. If unspecified,
- only the same namespace as the ThanosRuler object is in is used.
- properties:
- matchExpressions:
- description: matchExpressions is a list of label selector requirements.
- The requirements are ANDed.
- items:
- description: A label selector requirement is a selector that contains
- values, a key, and an operator that relates the key and values.
- properties:
- key:
- description: key is the label key that the selector applies
- to.
- type: string
- operator:
- description: operator represents a key's relationship to a
- set of values. Valid operators are In, NotIn, Exists and
- DoesNotExist.
- type: string
- values:
- description: values is an array of string values. If the operator
- is In or NotIn, the values array must be non-empty. If the
- operator is Exists or DoesNotExist, the values array must
- be empty. This array is replaced during a strategic merge
- patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- matchLabels:
- additionalProperties:
- type: string
- description: matchLabels is a map of {key,value} pairs. A single
- {key,value} in the matchLabels map is equivalent to an element
- of matchExpressions, whose key field is "key", the operator is
- "In", and the values array contains only "value". The requirements
- are ANDed.
- type: object
- type: object
- ruleSelector:
- description: A label selector to select which PrometheusRules to mount
- for alerting and recording.
- properties:
- matchExpressions:
- description: matchExpressions is a list of label selector requirements.
- The requirements are ANDed.
- items:
- description: A label selector requirement is a selector that contains
- values, a key, and an operator that relates the key and values.
- properties:
- key:
- description: key is the label key that the selector applies
- to.
- type: string
- operator:
- description: operator represents a key's relationship to a
- set of values. Valid operators are In, NotIn, Exists and
- DoesNotExist.
- type: string
- values:
- description: values is an array of string values. If the operator
- is In or NotIn, the values array must be non-empty. If the
- operator is Exists or DoesNotExist, the values array must
- be empty. This array is replaced during a strategic merge
- patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- matchLabels:
- additionalProperties:
- type: string
- description: matchLabels is a map of {key,value} pairs. A single
- {key,value} in the matchLabels map is equivalent to an element
- of matchExpressions, whose key field is "key", the operator is
- "In", and the values array contains only "value". The requirements
- are ANDed.
- type: object
- type: object
- securityContext:
- description: SecurityContext holds pod-level security attributes and
- common container settings. This defaults to the default PodSecurityContext.
- properties:
- fsGroup:
- description: "A special supplemental group that applies to all containers
- in a pod. Some volume types allow the Kubelet to change the ownership
- of that volume to be owned by the pod: \n 1. The owning GID will
- be the FSGroup 2. The setgid bit is set (new files created in
- the volume will be owned by FSGroup) 3. The permission bits are
- OR'd with rw-rw---- \n If unset, the Kubelet will not modify the
- ownership and permissions of any volume."
- format: int64
- type: integer
- runAsGroup:
- description: The GID to run the entrypoint of the container process.
- Uses runtime default if unset. May also be set in SecurityContext. If
- set in both SecurityContext and PodSecurityContext, the value
- specified in SecurityContext takes precedence for that container.
- format: int64
- type: integer
- runAsNonRoot:
- description: Indicates that the container must run as a non-root
- user. If true, the Kubelet will validate the image at runtime
- to ensure that it does not run as UID 0 (root) and fail to start
- the container if it does. If unset or false, no such validation
- will be performed. May also be set in SecurityContext. If set
- in both SecurityContext and PodSecurityContext, the value specified
- in SecurityContext takes precedence.
- type: boolean
- runAsUser:
- description: The UID to run the entrypoint of the container process.
- Defaults to user specified in image metadata if unspecified. May
- also be set in SecurityContext. If set in both SecurityContext
- and PodSecurityContext, the value specified in SecurityContext
- takes precedence for that container.
- format: int64
- type: integer
- seLinuxOptions:
- description: The SELinux context to be applied to all containers.
- If unspecified, the container runtime will allocate a random SELinux
- context for each container. May also be set in SecurityContext. If
- set in both SecurityContext and PodSecurityContext, the value
- specified in SecurityContext takes precedence for that container.
- properties:
- level:
- description: Level is SELinux level label that applies to the
- container.
- type: string
- role:
- description: Role is a SELinux role label that applies to the
- container.
- type: string
- type:
- description: Type is a SELinux type label that applies to the
- container.
- type: string
- user:
- description: User is a SELinux user label that applies to the
- container.
- type: string
- type: object
- supplementalGroups:
- description: A list of groups applied to the first process run in
- each container, in addition to the container's primary GID. If
- unspecified, no groups will be added to any container.
- items:
- format: int64
- type: integer
- type: array
- sysctls:
- description: Sysctls hold a list of namespaced sysctls used for
- the pod. Pods with unsupported sysctls (by the container runtime)
- might fail to launch.
- items:
- description: Sysctl defines a kernel parameter to be set
- properties:
- name:
- description: Name of a property to set
- type: string
- value:
- description: Value of a property to set
- type: string
- required:
- - name
- - value
- type: object
- type: array
- windowsOptions:
- description: The Windows specific settings applied to all containers.
- If unspecified, the options within a container's SecurityContext
- will be used. If set in both SecurityContext and PodSecurityContext,
- the value specified in SecurityContext takes precedence.
- properties:
- gmsaCredentialSpec:
- description: GMSACredentialSpec is where the GMSA admission
- webhook (https://github.com/kubernetes-sigs/windows-gmsa)
- inlines the contents of the GMSA credential spec named by
- the GMSACredentialSpecName field. This field is alpha-level
- and is only honored by servers that enable the WindowsGMSA
- feature flag.
- type: string
- gmsaCredentialSpecName:
- description: GMSACredentialSpecName is the name of the GMSA
- credential spec to use. This field is alpha-level and is only
- honored by servers that enable the WindowsGMSA feature flag.
- type: string
- runAsUserName:
- description: The UserName in Windows to run the entrypoint of
- the container process. Defaults to the user specified in image
- metadata if unspecified. May also be set in PodSecurityContext.
- If set in both SecurityContext and PodSecurityContext, the
- value specified in SecurityContext takes precedence. This
- field is beta-level and may be disabled with the WindowsRunAsUserName
- feature flag.
- type: string
- type: object
- type: object
- serviceAccountName:
- description: ServiceAccountName is the name of the ServiceAccount to
- use to run the Thanos Ruler Pods.
- type: string
- storage:
- description: Storage spec to specify how storage shall be used.
- properties:
- emptyDir:
- description: 'EmptyDirVolumeSource to be used by the Prometheus
- StatefulSets. If specified, used in place of any volumeClaimTemplate.
- More info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir'
- properties:
- medium:
- description: 'What type of storage medium should back this directory.
- The default is "" which means to use the node''s default medium.
- Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir'
- type: string
- sizeLimit:
- description: 'Total amount of local storage required for this
- EmptyDir volume. The size limit is also applicable for memory
- medium. 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. The
- default is nil which means that the limit is undefined. More
- info: http://kubernetes.io/docs/user-guide/volumes#emptydir'
- type: string
- type: object
- volumeClaimTemplate:
- description: A PVC spec to be used by the Prometheus StatefulSets.
- properties:
- apiVersion:
- description: 'APIVersion defines the versioned schema of this
- representation of an object. Servers should convert recognized
- schemas to the latest internal value, and may reject unrecognized
- values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
- type: string
- kind:
- description: 'Kind is a string value representing the REST resource
- this object represents. Servers may infer this from the endpoint
- the client submits requests to. Cannot be updated. In CamelCase.
- More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
- type: string
- metadata:
- description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata'
- type: object
- spec:
- description: 'Spec defines the desired characteristics of a
- volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
- properties:
- accessModes:
- description: 'AccessModes contains the desired access modes
- the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1'
- items:
- type: string
- type: array
- dataSource:
- description: This field requires the VolumeSnapshotDataSource
- alpha feature gate to be enabled and currently VolumeSnapshot
- is the only supported data source. If the provisioner
- can support VolumeSnapshot data source, it will create
- a new volume and data will be restored to the volume at
- the same time. If the provisioner does not support VolumeSnapshot
- data source, volume will not be created and the failure
- will be reported as an event. In the future, we plan to
- support more data source types and the behavior of the
- provisioner may change.
- properties:
- apiGroup:
- description: APIGroup is the group for the resource
- being referenced. If APIGroup is not specified, the
- specified Kind must be in the core API group. For
- any other third-party types, APIGroup is required.
- type: string
- kind:
- description: Kind is the type of resource being referenced
- type: string
- name:
- description: Name is the name of resource being referenced
- type: string
- required:
- - kind
- - name
- type: object
- resources:
- description: 'Resources represents the minimum resources
- the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources'
- properties:
- limits:
- additionalProperties:
- type: string
- description: 'Limits describes the maximum amount of
- compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
- type: object
- requests:
- additionalProperties:
- type: string
- description: 'Requests describes the minimum amount
- of compute resources required. If Requests is omitted
- for a container, it defaults to Limits if that is
- explicitly specified, otherwise to an implementation-defined
- value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
- type: object
- type: object
- selector:
- description: A label query over volumes to consider for
- binding.
- properties:
- matchExpressions:
- description: matchExpressions is a list of label selector
- requirements. The requirements are ANDed.
- items:
- description: A label selector requirement is a selector
- that contains values, a key, and an operator that
- relates the key and values.
- properties:
- key:
- description: key is the label key that the selector
- applies to.
- type: string
- operator:
- description: operator represents a key's relationship
- to a set of values. Valid operators are In,
- NotIn, Exists and DoesNotExist.
- type: string
- values:
- description: values is an array of string values.
- If the operator is In or NotIn, the values array
- must be non-empty. If the operator is Exists
- or DoesNotExist, the values array must be empty.
- This array is replaced during a strategic merge
- patch.
- items:
- type: string
- type: array
- required:
- - key
- - operator
- type: object
- type: array
- matchLabels:
- additionalProperties:
- type: string
- description: matchLabels is a map of {key,value} pairs.
- A single {key,value} in the matchLabels map is equivalent
- to an element of matchExpressions, whose key field
- is "key", the operator is "In", and the values array
- contains only "value". The requirements are ANDed.
- type: object
- type: object
- storageClassName:
- description: 'Name of the StorageClass required by the claim.
- More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1'
- type: string
- volumeMode:
- description: volumeMode defines what type of volume is required
- by the claim. Value of Filesystem is implied when not
- included in claim spec. This is a beta feature.
- type: string
- volumeName:
- description: VolumeName is the binding reference to the
- PersistentVolume backing this claim.
- type: string
- type: object
- status:
- description: 'Status represents the current information/status
- of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
- properties:
- accessModes:
- description: 'AccessModes contains the actual access modes
- the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1'
- items:
- type: string
- type: array
- capacity:
- additionalProperties:
- type: string
- description: Represents the actual resources of the underlying
- volume.
- type: object
- conditions:
- description: Current Condition of persistent volume claim.
- If underlying persistent volume is being resized then
- the Condition will be set to 'ResizeStarted'.
- items:
- description: PersistentVolumeClaimCondition contails details
- about state of pvc
- properties:
- lastProbeTime:
- description: Last time we probed the condition.
- format: date-time
- type: string
- lastTransitionTime:
- description: Last time the condition transitioned
- from one status to another.
- format: date-time
- type: string
- message:
- description: Human-readable message indicating details
- about last transition.
- type: string
- reason:
- description: Unique, this should be a short, machine
- understandable string that gives the reason for
- condition's last transition. If it reports "ResizeStarted"
- that means the underlying persistent volume is being
- resized.
- type: string
- status:
- type: string
- type:
- description: PersistentVolumeClaimConditionType is
- a valid value of PersistentVolumeClaimCondition.Type
- type: string
- required:
- - status
- - type
- type: object
- type: array
- phase:
- description: Phase represents the current phase of PersistentVolumeClaim.
- type: string
- type: object
- type: object
- type: object
- tolerations:
- description: If specified, the pod's tolerations.
- items:
- description: The pod this Toleration is attached to tolerates any
- taint that matches the triple using the matching
- operator .
- properties:
- effect:
- description: Effect indicates the taint effect to match. Empty
- means match all taint effects. When specified, allowed values
- are NoSchedule, PreferNoSchedule and NoExecute.
- type: string
- key:
- description: Key is the taint key that the toleration applies
- to. Empty means match all taint keys. If the key is empty, operator
- must be Exists; this combination means to match all values and
- all keys.
- type: string
- operator:
- description: Operator represents a key's relationship to the value.
- Valid operators are Exists and Equal. Defaults to Equal. Exists
- is equivalent to wildcard for value, so that a pod can tolerate
- all taints of a particular category.
- type: string
- tolerationSeconds:
- description: TolerationSeconds represents the period of time the
- toleration (which must be of effect NoExecute, otherwise this
- field is ignored) tolerates the taint. By default, it is not
- set, which means tolerate the taint forever (do not evict).
- Zero and negative values will be treated as 0 (evict immediately)
- by the system.
- format: int64
- type: integer
- value:
- description: Value is the taint value the toleration matches to.
- If the operator is Exists, the value should be empty, otherwise
- just a regular string.
- type: string
- type: object
- type: array
- tracingConfig:
- description: TracingConfig configures tracing in Thanos. This is an
- experimental feature, it may change in any upcoming release in a breaking
- way.
- properties:
- key:
- description: The key of the secret to select from. Must be a valid
- secret key.
- type: string
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key must be defined
- type: boolean
- required:
- - key
- type: object
- volumes:
- description: Volumes allows configuration of additional volumes on the
- output StatefulSet definition. Volumes specified will be appended
- to other volumes that are generated as a result of StorageSpec objects.
- items:
- description: Volume represents a named volume in a pod that may be
- accessed by any container in the pod.
- properties:
- awsElasticBlockStore:
- description: 'AWSElasticBlockStore represents an AWS Disk resource
- that is attached to a kubelet''s host machine and then exposed
- to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore'
- properties:
- fsType:
- description: 'Filesystem type of the volume that you want
- to mount. Tip: Ensure that the filesystem type is supported
- by the host operating system. Examples: "ext4", "xfs", "ntfs".
- Implicitly inferred to be "ext4" if unspecified. More info:
- https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
- TODO: how do we prevent errors in the filesystem from compromising
- the machine'
- type: string
- partition:
- description: 'The partition in the volume that you want to
- mount. If omitted, the default is to mount by volume name.
- Examples: For volume /dev/sda1, you specify the partition
- as "1". Similarly, the volume partition for /dev/sda is
- "0" (or you can leave the property empty).'
- format: int32
- type: integer
- readOnly:
- description: 'Specify "true" to force and set the ReadOnly
- property in VolumeMounts to "true". If omitted, the default
- is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore'
- type: boolean
- volumeID:
- description: 'Unique ID of the persistent disk resource in
- AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore'
- type: string
- required:
- - volumeID
- type: object
- azureDisk:
- description: AzureDisk represents an Azure Data Disk mount on
- the host and bind mount to the pod.
- properties:
- cachingMode:
- description: 'Host Caching mode: None, Read Only, Read Write.'
- type: string
- diskName:
- description: The Name of the data disk in the blob storage
- type: string
- diskURI:
- description: The URI the data disk in the blob storage
- type: string
- fsType:
- description: Filesystem type to mount. Must be a filesystem
- type supported by the host operating system. Ex. "ext4",
- "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
- type: string
- kind:
- description: 'Expected values Shared: multiple blob disks
- per storage account Dedicated: single blob disk per storage
- account Managed: azure managed data disk (only in managed
- availability set). defaults to shared'
- type: string
- readOnly:
- description: Defaults to false (read/write). ReadOnly here
- will force the ReadOnly setting in VolumeMounts.
- type: boolean
- required:
- - diskName
- - diskURI
- type: object
- azureFile:
- description: AzureFile represents an Azure File Service mount
- on the host and bind mount to the pod.
- properties:
- readOnly:
- description: Defaults to false (read/write). ReadOnly here
- will force the ReadOnly setting in VolumeMounts.
- type: boolean
- secretName:
- description: the name of secret that contains Azure Storage
- Account Name and Key
- type: string
- shareName:
- description: Share Name
- type: string
- required:
- - secretName
- - shareName
- type: object
- cephfs:
- description: CephFS represents a Ceph FS mount on the host that
- shares a pod's lifetime
- properties:
- monitors:
- description: 'Required: Monitors is a collection of Ceph monitors
- More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it'
- items:
- type: string
- type: array
- path:
- description: 'Optional: Used as the mounted root, rather than
- the full Ceph tree, default is /'
- type: string
- readOnly:
- description: 'Optional: Defaults to false (read/write). ReadOnly
- here will force the ReadOnly setting in VolumeMounts. More
- info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it'
- type: boolean
- secretFile:
- description: 'Optional: SecretFile is the path to key ring
- for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it'
- type: string
- secretRef:
- description: 'Optional: SecretRef is reference to the authentication
- secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it'
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- type: object
- user:
- description: 'Optional: User is the rados user name, default
- is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it'
- type: string
- required:
- - monitors
- type: object
- cinder:
- description: 'Cinder represents a cinder volume attached and mounted
- on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md'
- properties:
- fsType:
- description: 'Filesystem type to mount. Must be a filesystem
- type supported by the host operating system. Examples: "ext4",
- "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
- More info: https://examples.k8s.io/mysql-cinder-pd/README.md'
- type: string
- readOnly:
- description: 'Optional: Defaults to false (read/write). ReadOnly
- here will force the ReadOnly setting in VolumeMounts. More
- info: https://examples.k8s.io/mysql-cinder-pd/README.md'
- type: boolean
- secretRef:
- description: 'Optional: points to a secret object containing
- parameters used to connect to OpenStack.'
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- type: object
- volumeID:
- description: 'volume id used to identify the volume in cinder.
- More info: https://examples.k8s.io/mysql-cinder-pd/README.md'
- type: string
- required:
- - volumeID
- type: object
- configMap:
- description: ConfigMap represents a configMap that should populate
- this volume
- properties:
- defaultMode:
- description: 'Optional: mode bits to use on created files
- by default. Must be a value between 0 and 0777. Defaults
- to 0644. Directories within the path are not affected by
- this setting. This might be in conflict with other options
- that affect the file mode, like fsGroup, and the result
- can be other mode bits set.'
- format: int32
- type: integer
- items:
- description: If unspecified, each key-value pair in the Data
- field of the referenced ConfigMap will be projected into
- the volume as a file whose name is the key and content is
- the value. If specified, the listed keys will be projected
- into the specified paths, and unlisted keys will not be
- present. If a key is specified which is not present in the
- ConfigMap, the volume setup will error unless it is marked
- optional. Paths must be relative and may not contain the
- '..' path or start with '..'.
- items:
- description: Maps a string key to a path within a volume.
- properties:
- key:
- description: The key to project.
- type: string
- mode:
- description: 'Optional: mode bits to use on this file,
- must be a value between 0 and 0777. If not specified,
- the volume defaultMode will be used. This might be
- in conflict with other options that affect the file
- mode, like fsGroup, and the result can be other mode
- bits set.'
- format: int32
- type: integer
- path:
- description: The relative path of the file to map the
- key to. May not be an absolute path. May not contain
- the path element '..'. May not start with the string
- '..'.
- type: string
- required:
- - key
- - path
- type: object
- type: array
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- optional:
- description: Specify whether the ConfigMap or its keys must
- be defined
- type: boolean
- type: object
- csi:
- description: CSI (Container Storage Interface) represents storage
- that is handled by an external CSI driver (Alpha feature).
- properties:
- driver:
- description: Driver is the name of the CSI driver that handles
- this volume. Consult with your admin for the correct name
- as registered in the cluster.
- type: string
- fsType:
- description: Filesystem type to mount. Ex. "ext4", "xfs",
- "ntfs". If not provided, the empty value is passed to the
- associated CSI driver which will determine the default filesystem
- to apply.
- type: string
- nodePublishSecretRef:
- description: NodePublishSecretRef is a reference to the secret
- object containing sensitive information to pass to the CSI
- driver to complete the CSI NodePublishVolume and NodeUnpublishVolume
- calls. This field is optional, and may be empty if no secret
- is required. If the secret object contains more than one
- secret, all secret references are passed.
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- type: object
- readOnly:
- description: Specifies a read-only configuration for the volume.
- Defaults to false (read/write).
- type: boolean
- volumeAttributes:
- additionalProperties:
- type: string
- description: VolumeAttributes stores driver-specific properties
- that are passed to the CSI driver. Consult your driver's
- documentation for supported values.
- type: object
- required:
- - driver
- type: object
- downwardAPI:
- description: DownwardAPI represents downward API about the pod
- that should populate this volume
- properties:
- defaultMode:
- description: 'Optional: mode bits to use on created files
- by default. Must be a value between 0 and 0777. Defaults
- to 0644. Directories within the path are not affected by
- this setting. This might be in conflict with other options
- that affect the file mode, like fsGroup, and the result
- can be other mode bits set.'
- format: int32
- type: integer
- items:
- description: Items is a list of downward API volume file
- items:
- description: DownwardAPIVolumeFile represents information
- to create the file containing the pod field
- properties:
- fieldRef:
- description: 'Required: Selects a field of the pod:
- only annotations, labels, name and namespace are supported.'
- properties:
- apiVersion:
- description: Version of the schema the FieldPath
- is written in terms of, defaults to "v1".
- type: string
- fieldPath:
- description: Path of the field to select in the
- specified API version.
- type: string
- required:
- - fieldPath
- type: object
- mode:
- description: 'Optional: mode bits to use on this file,
- must be a value between 0 and 0777. If not specified,
- the volume defaultMode will be used. This might be
- in conflict with other options that affect the file
- mode, like fsGroup, and the result can be other mode
- bits set.'
- format: int32
- type: integer
- path:
- description: 'Required: Path is the relative path name
- of the file to be created. Must not be absolute or
- contain the ''..'' path. Must be utf-8 encoded. The
- first item of the relative path must not start with
- ''..'''
- type: string
- resourceFieldRef:
- description: 'Selects a resource of the container: only
- resources limits and requests (limits.cpu, limits.memory,
- requests.cpu and requests.memory) are currently supported.'
- properties:
- containerName:
- description: 'Container name: required for volumes,
- optional for env vars'
- type: string
- divisor:
- description: Specifies the output format of the
- exposed resources, defaults to "1"
- type: string
- resource:
- description: 'Required: resource to select'
- type: string
- required:
- - resource
- type: object
- required:
- - path
- type: object
- type: array
- type: object
- emptyDir:
- description: 'EmptyDir represents a temporary directory that shares
- a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir'
- properties:
- medium:
- description: 'What type of storage medium should back this
- directory. The default is "" which means to use the node''s
- default medium. Must be an empty string (default) or Memory.
- More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir'
- type: string
- sizeLimit:
- description: 'Total amount of local storage required for this
- EmptyDir volume. The size limit is also applicable for memory
- medium. 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.
- The default is nil which means that the limit is undefined.
- More info: http://kubernetes.io/docs/user-guide/volumes#emptydir'
- type: string
- type: object
- fc:
- description: FC represents a Fibre Channel resource that is attached
- to a kubelet's host machine and then exposed to the pod.
- properties:
- fsType:
- description: 'Filesystem type to mount. Must be a filesystem
- type supported by the host operating system. Ex. "ext4",
- "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
- TODO: how do we prevent errors in the filesystem from compromising
- the machine'
- type: string
- lun:
- description: 'Optional: FC target lun number'
- format: int32
- type: integer
- readOnly:
- description: 'Optional: Defaults to false (read/write). ReadOnly
- here will force the ReadOnly setting in VolumeMounts.'
- type: boolean
- targetWWNs:
- description: 'Optional: FC target worldwide names (WWNs)'
- items:
- type: string
- type: array
- wwids:
- description: 'Optional: FC volume world wide identifiers (wwids)
- Either wwids or combination of targetWWNs and lun must be
- set, but not both simultaneously.'
- items:
- type: string
- type: array
- type: object
- flexVolume:
- description: FlexVolume represents a generic volume resource that
- is provisioned/attached using an exec based plugin.
- properties:
- driver:
- description: Driver is the name of the driver to use for this
- volume.
- type: string
- fsType:
- description: Filesystem type to mount. Must be a filesystem
- type supported by the host operating system. Ex. "ext4",
- "xfs", "ntfs". The default filesystem depends on FlexVolume
- script.
- type: string
- options:
- additionalProperties:
- type: string
- description: 'Optional: Extra command options if any.'
- type: object
- readOnly:
- description: 'Optional: Defaults to false (read/write). ReadOnly
- here will force the ReadOnly setting in VolumeMounts.'
- type: boolean
- secretRef:
- description: 'Optional: SecretRef is reference to the secret
- object containing sensitive information to pass to the plugin
- scripts. This may be empty if no secret object is specified.
- If the secret object contains more than one secret, all
- secrets are passed to the plugin scripts.'
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- type: object
- required:
- - driver
- type: object
- flocker:
- description: Flocker represents a Flocker volume attached to a
- kubelet's host machine. This depends on the Flocker control
- service being running
- properties:
- datasetName:
- description: Name of the dataset stored as metadata -> name
- on the dataset for Flocker should be considered as deprecated
- type: string
- datasetUUID:
- description: UUID of the dataset. This is unique identifier
- of a Flocker dataset
- type: string
- type: object
- gcePersistentDisk:
- description: 'GCEPersistentDisk represents a GCE Disk resource
- that is attached to a kubelet''s host machine and then exposed
- to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk'
- properties:
- fsType:
- description: 'Filesystem type of the volume that you want
- to mount. Tip: Ensure that the filesystem type is supported
- by the host operating system. Examples: "ext4", "xfs", "ntfs".
- Implicitly inferred to be "ext4" if unspecified. More info:
- https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
- TODO: how do we prevent errors in the filesystem from compromising
- the machine'
- type: string
- partition:
- description: 'The partition in the volume that you want to
- mount. If omitted, the default is to mount by volume name.
- Examples: For volume /dev/sda1, you specify the partition
- as "1". Similarly, the volume partition for /dev/sda is
- "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk'
- format: int32
- type: integer
- pdName:
- description: 'Unique name of the PD resource in GCE. Used
- to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk'
- type: string
- readOnly:
- description: 'ReadOnly here will force the ReadOnly setting
- in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk'
- type: boolean
- required:
- - pdName
- type: object
- gitRepo:
- description: 'GitRepo represents a git repository at a particular
- revision. DEPRECATED: GitRepo is deprecated. To provision a
- container with a git repo, mount an EmptyDir into an InitContainer
- that clones the repo using git, then mount the EmptyDir into
- the Pod''s container.'
- properties:
- directory:
- description: Target directory name. Must not contain or start
- with '..'. If '.' is supplied, the volume directory will
- be the git repository. Otherwise, if specified, the volume
- will contain the git repository in the subdirectory with
- the given name.
- type: string
- repository:
- description: Repository URL
- type: string
- revision:
- description: Commit hash for the specified revision.
- type: string
- required:
- - repository
- type: object
- glusterfs:
- description: 'Glusterfs represents a Glusterfs mount on the host
- that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md'
- properties:
- endpoints:
- description: 'EndpointsName is the endpoint name that details
- Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod'
- type: string
- path:
- description: 'Path is the Glusterfs volume path. More info:
- https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod'
- type: string
- readOnly:
- description: 'ReadOnly here will force the Glusterfs volume
- to be mounted with read-only permissions. Defaults to false.
- More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod'
- type: boolean
- required:
- - endpoints
- - path
- type: object
- hostPath:
- description: 'HostPath represents a pre-existing file or directory
- on the host machine that is directly exposed to the container.
- This is generally used for system agents or other privileged
- things that are allowed to see the host machine. Most containers
- will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
- --- TODO(jonesdl) We need to restrict who can use host directory
- mounts and who can/can not mount host directories as read/write.'
- properties:
- path:
- description: 'Path of the directory on the host. If the path
- is a symlink, it will follow the link to the real path.
- More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath'
- type: string
- type:
- description: 'Type for HostPath Volume Defaults to "" More
- info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath'
- type: string
- required:
- - path
- type: object
- iscsi:
- description: 'ISCSI represents an ISCSI Disk resource that is
- attached to a kubelet''s host machine and then exposed to the
- pod. More info: https://examples.k8s.io/volumes/iscsi/README.md'
- properties:
- chapAuthDiscovery:
- description: whether support iSCSI Discovery CHAP authentication
- type: boolean
- chapAuthSession:
- description: whether support iSCSI Session CHAP authentication
- type: boolean
- fsType:
- description: 'Filesystem type of the volume that you want
- to mount. Tip: Ensure that the filesystem type is supported
- by the host operating system. Examples: "ext4", "xfs", "ntfs".
- Implicitly inferred to be "ext4" if unspecified. More info:
- https://kubernetes.io/docs/concepts/storage/volumes#iscsi
- TODO: how do we prevent errors in the filesystem from compromising
- the machine'
- type: string
- initiatorName:
- description: Custom iSCSI Initiator Name. If initiatorName
- is specified with iscsiInterface simultaneously, new iSCSI
- interface : will be created
- for the connection.
- type: string
- iqn:
- description: Target iSCSI Qualified Name.
- type: string
- iscsiInterface:
- description: iSCSI Interface Name that uses an iSCSI transport.
- Defaults to 'default' (tcp).
- type: string
- lun:
- description: iSCSI Target Lun number.
- format: int32
- type: integer
- portals:
- description: iSCSI Target Portal List. The portal is either
- an IP or ip_addr:port if the port is other than default
- (typically TCP ports 860 and 3260).
- items:
- type: string
- type: array
- readOnly:
- description: ReadOnly here will force the ReadOnly setting
- in VolumeMounts. Defaults to false.
- type: boolean
- secretRef:
- description: CHAP Secret for iSCSI target and initiator authentication
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- type: object
- targetPortal:
- description: iSCSI Target Portal. The Portal is either an
- IP or ip_addr:port if the port is other than default (typically
- TCP ports 860 and 3260).
- type: string
- required:
- - iqn
- - lun
- - targetPortal
- type: object
- name:
- description: 'Volume''s name. Must be a DNS_LABEL and unique within
- the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
- type: string
- nfs:
- description: 'NFS represents an NFS mount on the host that shares
- a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs'
- properties:
- path:
- description: 'Path that is exported by the NFS server. More
- info: https://kubernetes.io/docs/concepts/storage/volumes#nfs'
- type: string
- readOnly:
- description: 'ReadOnly here will force the NFS export to be
- mounted with read-only permissions. Defaults to false. More
- info: https://kubernetes.io/docs/concepts/storage/volumes#nfs'
- type: boolean
- server:
- description: 'Server is the hostname or IP address of the
- NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs'
- type: string
- required:
- - path
- - server
- type: object
- persistentVolumeClaim:
- description: 'PersistentVolumeClaimVolumeSource represents a reference
- to a PersistentVolumeClaim in the same namespace. More info:
- https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
- properties:
- claimName:
- description: 'ClaimName is the name of a PersistentVolumeClaim
- in the same namespace as the pod using this volume. More
- info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
- type: string
- readOnly:
- description: Will force the ReadOnly setting in VolumeMounts.
- Default false.
- type: boolean
- required:
- - claimName
- type: object
- photonPersistentDisk:
- description: PhotonPersistentDisk represents a PhotonController
- persistent disk attached and mounted on kubelets host machine
- properties:
- fsType:
- description: Filesystem type to mount. Must be a filesystem
- type supported by the host operating system. Ex. "ext4",
- "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
- type: string
- pdID:
- description: ID that identifies Photon Controller persistent
- disk
- type: string
- required:
- - pdID
- type: object
- portworxVolume:
- description: PortworxVolume represents a portworx volume attached
- and mounted on kubelets host machine
- properties:
- fsType:
- description: FSType represents the filesystem type to mount
- Must be a filesystem type supported by the host operating
- system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4"
- if unspecified.
- type: string
- readOnly:
- description: Defaults to false (read/write). ReadOnly here
- will force the ReadOnly setting in VolumeMounts.
- type: boolean
- volumeID:
- description: VolumeID uniquely identifies a Portworx volume
- type: string
- required:
- - volumeID
- type: object
- projected:
- description: Items for all in one resources secrets, configmaps,
- and downward API
- properties:
- defaultMode:
- description: Mode bits to use on created files by default.
- Must be a value between 0 and 0777. Directories within the
- path are not affected by this setting. This might be in
- conflict with other options that affect the file mode, like
- fsGroup, and the result can be other mode bits set.
- format: int32
- type: integer
- sources:
- description: list of volume projections
- items:
- description: Projection that may be projected along with
- other supported volume types
- properties:
- configMap:
- description: information about the configMap data to
- project
- properties:
- items:
- description: If unspecified, each key-value pair
- in the Data field of the referenced ConfigMap
- will be projected into the volume as a file whose
- name is the key and content is the value. If specified,
- the listed keys will be projected into the specified
- paths, and unlisted keys will not be present.
- If a key is specified which is not present in
- the ConfigMap, the volume setup will error unless
- it is marked optional. Paths must be relative
- and may not contain the '..' path or start with
- '..'.
- items:
- description: Maps a string key to a path within
- a volume.
- properties:
- key:
- description: The key to project.
- type: string
- mode:
- description: 'Optional: mode bits to use on
- this file, must be a value between 0 and
- 0777. If not specified, the volume defaultMode
- will be used. This might be in conflict
- with other options that affect the file
- mode, like fsGroup, and the result can be
- other mode bits set.'
- format: int32
- type: integer
- path:
- description: The relative path of the file
- to map the key to. May not be an absolute
- path. May not contain the path element '..'.
- May not start with the string '..'.
- type: string
- required:
- - key
- - path
- type: object
- type: array
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the ConfigMap or its
- keys must be defined
- type: boolean
- type: object
- downwardAPI:
- description: information about the downwardAPI data
- to project
- properties:
- items:
- description: Items is a list of DownwardAPIVolume
- file
- items:
- description: DownwardAPIVolumeFile represents
- information to create the file containing the
- pod field
- properties:
- fieldRef:
- description: 'Required: Selects a field of
- the pod: only annotations, labels, name
- and namespace are supported.'
- properties:
- apiVersion:
- description: Version of the schema the
- FieldPath is written in terms of, defaults
- to "v1".
- type: string
- fieldPath:
- description: Path of the field to select
- in the specified API version.
- type: string
- required:
- - fieldPath
- type: object
- mode:
- description: 'Optional: mode bits to use on
- this file, must be a value between 0 and
- 0777. If not specified, the volume defaultMode
- will be used. This might be in conflict
- with other options that affect the file
- mode, like fsGroup, and the result can be
- other mode bits set.'
- format: int32
- type: integer
- path:
- description: 'Required: Path is the relative
- path name of the file to be created. Must
- not be absolute or contain the ''..'' path.
- Must be utf-8 encoded. The first item of
- the relative path must not start with ''..'''
- type: string
- resourceFieldRef:
- description: 'Selects a resource of the container:
- only resources limits and requests (limits.cpu,
- limits.memory, requests.cpu and requests.memory)
- are currently supported.'
- properties:
- containerName:
- description: 'Container name: required
- for volumes, optional for env vars'
- type: string
- divisor:
- description: Specifies the output format
- of the exposed resources, defaults to
- "1"
- type: string
- resource:
- description: 'Required: resource to select'
- type: string
- required:
- - resource
- type: object
- required:
- - path
- type: object
- type: array
- type: object
- secret:
- description: information about the secret data to project
- properties:
- items:
- description: If unspecified, each key-value pair
- in the Data field of the referenced Secret will
- be projected into the volume as a file whose name
- is the key and content is the value. If specified,
- the listed keys will be projected into the specified
- paths, and unlisted keys will not be present.
- If a key is specified which is not present in
- the Secret, the volume setup will error unless
- it is marked optional. Paths must be relative
- and may not contain the '..' path or start with
- '..'.
- items:
- description: Maps a string key to a path within
- a volume.
- properties:
- key:
- description: The key to project.
- type: string
- mode:
- description: 'Optional: mode bits to use on
- this file, must be a value between 0 and
- 0777. If not specified, the volume defaultMode
- will be used. This might be in conflict
- with other options that affect the file
- mode, like fsGroup, and the result can be
- other mode bits set.'
- format: int32
- type: integer
- path:
- description: The relative path of the file
- to map the key to. May not be an absolute
- path. May not contain the path element '..'.
- May not start with the string '..'.
- type: string
- required:
- - key
- - path
- type: object
- type: array
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind,
- uid?'
- type: string
- optional:
- description: Specify whether the Secret or its key
- must be defined
- type: boolean
- type: object
- serviceAccountToken:
- description: information about the serviceAccountToken
- data to project
- properties:
- audience:
- description: Audience is the intended audience of
- the token. A recipient of a token must identify
- itself with an identifier specified in the audience
- of the token, and otherwise should reject the
- token. The audience defaults to the identifier
- of the apiserver.
- type: string
- expirationSeconds:
- description: ExpirationSeconds is the requested
- duration of validity of the service account token.
- As the token approaches expiration, the kubelet
- volume plugin will proactively rotate the service
- account token. The kubelet will start trying to
- rotate the token if the token is older than 80
- percent of its time to live or if the token is
- older than 24 hours.Defaults to 1 hour and must
- be at least 10 minutes.
- format: int64
- type: integer
- path:
- description: Path is the path relative to the mount
- point of the file to project the token into.
- type: string
- required:
- - path
- type: object
- type: object
- type: array
- required:
- - sources
- type: object
- quobyte:
- description: Quobyte represents a Quobyte mount on the host that
- shares a pod's lifetime
- properties:
- group:
- description: Group to map volume access to Default is no group
- type: string
- readOnly:
- description: ReadOnly here will force the Quobyte volume to
- be mounted with read-only permissions. Defaults to false.
- type: boolean
- registry:
- description: Registry represents a single or multiple Quobyte
- Registry services specified as a string as host:port pair
- (multiple entries are separated with commas) which acts
- as the central registry for volumes
- type: string
- tenant:
- description: Tenant owning the given Quobyte volume in the
- Backend Used with dynamically provisioned Quobyte volumes,
- value is set by the plugin
- type: string
- user:
- description: User to map volume access to Defaults to serivceaccount
- user
- type: string
- volume:
- description: Volume is a string that references an already
- created Quobyte volume by name.
- type: string
- required:
- - registry
- - volume
- type: object
- rbd:
- description: 'RBD represents a Rados Block Device mount on the
- host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md'
- properties:
- fsType:
- description: 'Filesystem type of the volume that you want
- to mount. Tip: Ensure that the filesystem type is supported
- by the host operating system. Examples: "ext4", "xfs", "ntfs".
- Implicitly inferred to be "ext4" if unspecified. More info:
- https://kubernetes.io/docs/concepts/storage/volumes#rbd
- TODO: how do we prevent errors in the filesystem from compromising
- the machine'
- type: string
- image:
- description: 'The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
- type: string
- keyring:
- description: 'Keyring is the path to key ring for RBDUser.
- Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
- type: string
- monitors:
- description: 'A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
- items:
- type: string
- type: array
- pool:
- description: 'The rados pool name. Default is rbd. More info:
- https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
- type: string
- readOnly:
- description: 'ReadOnly here will force the ReadOnly setting
- in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
- type: boolean
- secretRef:
- description: 'SecretRef is name of the authentication secret
- for RBDUser. If provided overrides keyring. Default is nil.
- More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- type: object
- user:
- description: 'The rados user name. Default is admin. More
- info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
- type: string
- required:
- - image
- - monitors
- type: object
- scaleIO:
- description: ScaleIO represents a ScaleIO persistent volume attached
- and mounted on Kubernetes nodes.
- properties:
- fsType:
- description: Filesystem type to mount. Must be a filesystem
- type supported by the host operating system. Ex. "ext4",
- "xfs", "ntfs". Default is "xfs".
- type: string
- gateway:
- description: The host address of the ScaleIO API Gateway.
- type: string
- protectionDomain:
- description: The name of the ScaleIO Protection Domain for
- the configured storage.
- type: string
- readOnly:
- description: Defaults to false (read/write). ReadOnly here
- will force the ReadOnly setting in VolumeMounts.
- type: boolean
- secretRef:
- description: SecretRef references to the secret for ScaleIO
- user and other sensitive information. If this is not provided,
- Login operation will fail.
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- type: object
- sslEnabled:
- description: Flag to enable/disable SSL communication with
- Gateway, default false
- type: boolean
- storageMode:
- description: Indicates whether the storage for a volume should
- be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.
- type: string
- storagePool:
- description: The ScaleIO Storage Pool associated with the
- protection domain.
- type: string
- system:
- description: The name of the storage system as configured
- in ScaleIO.
- type: string
- volumeName:
- description: The name of a volume already created in the ScaleIO
- system that is associated with this volume source.
- type: string
- required:
- - gateway
- - secretRef
- - system
- type: object
- secret:
- description: 'Secret represents a secret that should populate
- this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret'
- properties:
- defaultMode:
- description: 'Optional: mode bits to use on created files
- by default. Must be a value between 0 and 0777. Defaults
- to 0644. Directories within the path are not affected by
- this setting. This might be in conflict with other options
- that affect the file mode, like fsGroup, and the result
- can be other mode bits set.'
- format: int32
- type: integer
- items:
- description: If unspecified, each key-value pair in the Data
- field of the referenced Secret will be projected into the
- volume as a file whose name is the key and content is the
- value. If specified, the listed keys will be projected into
- the specified paths, and unlisted keys will not be present.
- If a key is specified which is not present in the Secret,
- the volume setup will error unless it is marked optional.
- Paths must be relative and may not contain the '..' path
- or start with '..'.
- items:
- description: Maps a string key to a path within a volume.
- properties:
- key:
- description: The key to project.
- type: string
- mode:
- description: 'Optional: mode bits to use on this file,
- must be a value between 0 and 0777. If not specified,
- the volume defaultMode will be used. This might be
- in conflict with other options that affect the file
- mode, like fsGroup, and the result can be other mode
- bits set.'
- format: int32
- type: integer
- path:
- description: The relative path of the file to map the
- key to. May not be an absolute path. May not contain
- the path element '..'. May not start with the string
- '..'.
- type: string
- required:
- - key
- - path
- type: object
- type: array
- optional:
- description: Specify whether the Secret or its keys must be
- defined
- type: boolean
- secretName:
- description: 'Name of the secret in the pod''s namespace to
- use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret'
- type: string
- type: object
- storageos:
- description: StorageOS represents a StorageOS volume attached
- and mounted on Kubernetes nodes.
- properties:
- fsType:
- description: Filesystem type to mount. Must be a filesystem
- type supported by the host operating system. Ex. "ext4",
- "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
- type: string
- readOnly:
- description: Defaults to false (read/write). ReadOnly here
- will force the ReadOnly setting in VolumeMounts.
- type: boolean
- secretRef:
- description: SecretRef specifies the secret to use for obtaining
- the StorageOS API credentials. If not specified, default
- values will be attempted.
- properties:
- name:
- description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- TODO: Add other useful fields. apiVersion, kind, uid?'
- type: string
- type: object
- volumeName:
- description: VolumeName is the human-readable name of the
- StorageOS volume. Volume names are only unique within a
- namespace.
- type: string
- volumeNamespace:
- description: VolumeNamespace specifies the scope of the volume
- within StorageOS. If no namespace is specified then the
- Pod's namespace will be used. This allows the Kubernetes
- name scoping to be mirrored within StorageOS for tighter
- integration. Set VolumeName to any name to override the
- default behaviour. Set to "default" if you are not using
- namespaces within StorageOS. Namespaces that do not pre-exist
- within StorageOS will be created.
- type: string
- type: object
- vsphereVolume:
- description: VsphereVolume represents a vSphere volume attached
- and mounted on kubelets host machine
- properties:
- fsType:
- description: Filesystem type to mount. Must be a filesystem
- type supported by the host operating system. Ex. "ext4",
- "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
- type: string
- storagePolicyID:
- description: Storage Policy Based Management (SPBM) profile
- ID associated with the StoragePolicyName.
- type: string
- storagePolicyName:
- description: Storage Policy Based Management (SPBM) profile
- name.
- type: string
- volumePath:
- description: Path that identifies vSphere volume vmdk
- type: string
- required:
- - volumePath
- type: object
- required:
- - name
- type: object
- type: array
- type: object
- status:
- description: 'Most recent observed status of the ThanosRuler cluster. Read-only.
- Not included when requesting from the apiserver, only from the ThanosRuler
- Operator API itself. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status'
- properties:
- availableReplicas:
- description: Total number of available pods (ready for at least minReadySeconds)
- targeted by this ThanosRuler deployment.
- format: int32
- type: integer
- paused:
- description: Represents whether any actions on the underlying managed
- objects are being performed. Only delete actions will be performed.
- type: boolean
- replicas:
- description: Total number of non-terminated pods targeted by this ThanosRuler
- deployment (their labels match the selector).
- format: int32
- type: integer
- unavailableReplicas:
- description: Total number of unavailable pods targeted by this ThanosRuler
- deployment.
- format: int32
- type: integer
- updatedReplicas:
- description: Total number of non-terminated pods targeted by this ThanosRuler
- deployment that have the desired version spec.
- format: int32
- type: integer
- required:
- - availableReplicas
- - paused
- - replicas
- - unavailableReplicas
- - updatedReplicas
- type: object
- required:
- - spec
- type: object
- version: v1
- versions:
- - name: v1
- served: true
- storage: true
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/hack/README.md b/kubernetes/helm_charts/monitoring/prometheus-operator/hack/README.md
new file mode 100644
index 0000000000..af5ecdd28a
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/hack/README.md
@@ -0,0 +1,58 @@
+# kube-prometheus-stack hacks
+
+## [sync_prometheus_rules.py](sync_prometheus_rules.py)
+
+This script generates prometheus rules set for alertmanager from any properly formatted kubernetes yaml based on defined input, splitting rules to separate files based on group name.
+
+Currently following imported:
+
+- [prometheus-operator/kube-prometheus rules set](https://github.com/prometheus-operator/kube-prometheus/blob/main/manifests/kubernetesControlPlane-prometheusRule.yaml)
+ - In order to modify these rules:
+ - prepare and merge PR into [kubernetes-mixin](https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/rules) master and/or release branch
+ - run import inside your fork of [prometheus-operator/kube-prometheus](https://github.com/prometheus-operator/kube-prometheus/tree/main)
+
+ ```bash
+ jb update
+ make generate
+ ```
+
+ - prepare and merge PR with imported changes into `prometheus-operator/kube-prometheus` master and/or release branch
+ - run sync_prometheus_rules.py inside your fork of this repository
+ - send PR with changes to this repository
+- [etcd-io/etcd rules set](https://github.com/etcd-io/etcd/blob/main/contrib/mixin/mixin.libsonnet).
+ - In order to modify these rules:
+ - prepare and merge PR into [etcd-io/etcd](https://github.com/etcd-io/etcd/blob/main/contrib/mixin/mixin.libsonnet) repository
+ - run sync_prometheus_rules.py inside your fork of this repository
+ - send PR with changes to this repository
+
+## [sync_grafana_dashboards.py](sync_grafana_dashboards.py)
+
+This script generates grafana dashboards from json files, splitting them to separate files based on group name.
+
+Currently following imported:
+
+- [prometheus-operator/kube-prometheus dashboards](https://github.com/prometheus-operator/kube-prometheus/tree/main/manifests/grafana-deployment.yaml)
+ - In order to modify these dashboards:
+ - prepare and merge PR into [kubernetes-mixin](https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/dashboards) master and/or release branch
+ - run import inside your fork of [prometheus-operator/kube-prometheus](https://github.com/prometheus-operator/kube-prometheus/tree/main)
+
+ ```bash
+ jb update
+ make generate
+ ```
+
+ - prepare and merge PR with imported changes into `prometheus-operator/kube-prometheus` master and/or release branch
+ - run sync_grafana_dashboards.py inside your fork of this repository
+ - send PR with changes to this repository
+
+
+
+- [etcd-io/website dashboard](https://github.com/etcd-io/etcd/blob/main/contrib/mixin/mixin.libsonnet)
+ - In order to modify this dashboard:
+ - prepare and merge PR into [etcd-io/etcd](https://github.com/etcd-io/etcd/blob/main/contrib/mixin/mixin.libsonnet) repository
+ - run sync_grafana_dashboards.py inside your fork of this repository
+ - send PR with changes to this repository
+
+
+
+[CoreDNS dashboard](https://github.com/prometheus-community/helm-charts/blob/main/charts/kube-prometheus-stack/templates/grafana/dashboards-1.14/k8s-coredns.yaml) is the only dashboard which is maintained in this repository and can be changed without import.
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/hack/minikube/README.md b/kubernetes/helm_charts/monitoring/prometheus-operator/hack/minikube/README.md
new file mode 100644
index 0000000000..353967ede5
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/hack/minikube/README.md
@@ -0,0 +1,5 @@
+# Testing on Minikube
+
+The configuration in this folder lets you locally test the setup on minikube. Use cmd.sh to set up components and hack a working etcd scrape configuration. Run the commands in the sequence listed in the script to get a local working minikube cluster.
+
+If you're using windows, there's a commented-out section that you should add to the minikube command.
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/hack/minikube/cmd.sh b/kubernetes/helm_charts/monitoring/prometheus-operator/hack/minikube/cmd.sh
new file mode 100755
index 0000000000..fd55f33c88
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/hack/minikube/cmd.sh
@@ -0,0 +1,82 @@
+#!/usr/bin/env bash
+
+HELM_RELEASE_NAME=prom-op
+CHART=./
+NAMESPACE=monitoring
+VALUES_FILES=./hack/minikube/values.yaml
+
+if [ "$1" = "reset-minikube" ]; then
+ minikube delete
+ minikube start \
+ #--vm-driver hyperv --hyperv-virtual-switch "Default Switch" \
+ --kubernetes-version=v1.13.3 \
+ --memory=4096 --bootstrapper=kubeadm \
+ --extra-config=kubelet.authentication-token-webhook=true \
+ --extra-config=kubelet.authorization-mode=Webhook \
+ --extra-config=scheduler.address=0.0.0.0 \
+ --extra-config=controller-manager.address=0.0.0.0
+ exit 0
+fi
+
+if [ "$1" = "init-helm" ]; then
+ helm init
+ helm repo update
+ exit 0
+fi
+
+if [ "$1" = "init-etcd-secret" ]; then
+ kubectl create namespace monitoring
+ kubectl delete secret etcd-certs -nmonitoring
+ kubectl create secret generic etcd-certs -nmonitoring \
+ --from-literal=ca.crt="$(kubectl exec kube-apiserver-minikube -nkube-system -- cat /var/lib/minikube/certs/etcd/ca.crt)" \
+ --from-literal=client.crt="$(kubectl exec kube-apiserver-minikube -nkube-system -- cat /var/lib/minikube/certs/apiserver-etcd-client.crt)" \
+ --from-literal=client.key="$(kubectl exec kube-apiserver-minikube -nkube-system -- cat /var/lib/minikube/certs/apiserver-etcd-client.key)"
+
+ exit 0
+fi
+
+
+if [ "$1" = "upgrade-install" ]; then
+ helm upgrade $HELM_RELEASE_NAME $CHART \
+ --namespace $NAMESPACE \
+ --values $VALUES_FILES \
+ --set grafana.podAnnotations.redeploy-hack="$(cat /proc/sys/kernel/random/uuid)" \
+ --install --debug
+ exit 0
+fi
+
+if [ "$1" = "port-forward" ]; then
+ killall kubectl &>/dev/null
+ kubectl port-forward service/prom-op-prometheus-operato-prometheus 9090 &>/dev/null &
+ kubectl port-forward service/prom-op-prometheus-operato-alertmanager 9093 &>/dev/null &
+ kubectl port-forward service/prom-op-grafana 3000:80 &>/dev/null &
+ echo "Started port-forward commands"
+ echo "localhost:9090 - prometheus"
+ echo "localhost:9093 - alertmanager"
+ echo "localhost:3000 - grafana"
+ exit 0
+fi
+
+cat << EOF
+Usage:
+ install.sh
+
+Commands:
+ reset-minikube - resets minikube with values suitable for running prometheus operator
+ the normal installation will not allow scraping of the kubelet,
+ scheduler or controller-manager components
+ init-helm - initialize helm and update repository so that we can install
+ the kube-prometheus-stack chart. This has to be run only once after
+ a minikube installation is done
+ init-etcd-secret - pulls the certs used to access etcd from the api server and creates
+ a secret in the monitoring namespace with them. The values files
+ in the install command assume that this secret exists and is valid.
+ If not, then prometheus will not start
+ upgrade-install - install or upgrade the kube-prometheus-stack chart in the cluster
+ port-forward - starts port-forwarding for prometheus, alertmanager, grafana
+ localhost:9090 - prometheus
+ localhost:9093 - alertmanager
+ localhost:3000 - grafana
+EOF
+
+exit 0
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/hack/minikube/values.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/hack/minikube/values.yaml
new file mode 100644
index 0000000000..8bdce3131f
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/hack/minikube/values.yaml
@@ -0,0 +1,9 @@
+prometheus:
+ prometheusSpec:
+ secrets: [etcd-certs]
+kubeEtcd:
+ serviceMonitor:
+ scheme: https
+ caFile: /etc/prometheus/secrets/etcd-certs/ca.crt
+ certFile: /etc/prometheus/secrets/etcd-certs/client.crt
+ keyFile: /etc/prometheus/secrets/etcd-certs/client.key
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/hack/requirements.txt b/kubernetes/helm_charts/monitoring/prometheus-operator/hack/requirements.txt
new file mode 100644
index 0000000000..40ace18157
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/hack/requirements.txt
@@ -0,0 +1,2 @@
+PyYAML==5.4
+requests==2.31.0
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/hack/sync_grafana_dashboards.py b/kubernetes/helm_charts/monitoring/prometheus-operator/hack/sync_grafana_dashboards.py
new file mode 100755
index 0000000000..a04a609452
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/hack/sync_grafana_dashboards.py
@@ -0,0 +1,252 @@
+#!/usr/bin/env python3
+"""Fetch dashboards from provided urls into this chart."""
+import json
+import os
+import re
+import shutil
+import subprocess
+import textwrap
+
+import _jsonnet
+import requests
+import yaml
+from yaml.representer import SafeRepresenter
+
+
+# https://stackoverflow.com/a/20863889/961092
+class LiteralStr(str):
+ pass
+
+
+def change_style(style, representer):
+ def new_representer(dumper, data):
+ scalar = representer(dumper, data)
+ scalar.style = style
+ return scalar
+
+ return new_representer
+
+
+# Source files list
+charts = [
+ {
+ 'source': 'https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/grafana-dashboardDefinitions.yaml',
+ 'destination': '../templates/grafana/dashboards-1.14',
+ 'type': 'yaml',
+ 'min_kubernetes': '1.14.0-0',
+ 'multicluster_key': '.Values.grafana.sidecar.dashboards.multicluster.global.enabled',
+ },
+ {
+ 'git': 'https://github.com/etcd-io/etcd.git',
+ 'source': 'contrib/mixin/mixin.libsonnet',
+ 'destination': '../templates/grafana/dashboards-1.14',
+ 'min_kubernetes': '1.14.0-0',
+ 'type': 'jsonnet_mixin',
+ 'mixin_vars': {'_config+': {}},
+ 'multicluster_key': '(or .Values.grafana.sidecar.dashboards.multicluster.global.enabled .Values.grafana.sidecar.dashboards.multicluster.etcd.enabled)'
+ },
+]
+
+# Additional conditions map
+condition_map = {
+ 'grafana-coredns-k8s': ' .Values.coreDns.enabled',
+ 'etcd': ' .Values.kubeEtcd.enabled',
+ 'apiserver': ' .Values.kubeApiServer.enabled',
+ 'controller-manager': ' .Values.kubeControllerManager.enabled',
+ 'kubelet': ' .Values.kubelet.enabled',
+ 'proxy': ' .Values.kubeProxy.enabled',
+ 'scheduler': ' .Values.kubeScheduler.enabled',
+ 'node-rsrc-use': ' .Values.nodeExporter.enabled',
+ 'node-cluster-rsrc-use': ' .Values.nodeExporter.enabled',
+ 'nodes': ' .Values.nodeExporter.operatingSystems.linux.enabled',
+ 'nodes-darwin': ' .Values.nodeExporter.operatingSystems.darwin.enabled',
+ 'prometheus-remote-write': ' .Values.prometheus.prometheusSpec.remoteWriteDashboards'
+}
+
+# standard header
+header = '''{{- /*
+Generated from '%(name)s' from %(url)s
+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 ">=%(min_kubernetes)s" $kubeTargetVersion) (semverCompare "<%(max_kubernetes)s" $kubeTargetVersion) .Values.grafana.defaultDashboardsEnabled%(condition)s }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
+ name: {{ printf "%%s-%%s" (include "kube-prometheus-stack.fullname" $) "%(name)s" | 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:
+'''
+
+
+def init_yaml_styles():
+ represent_literal_str = change_style('|', SafeRepresenter.represent_str)
+ yaml.add_representer(LiteralStr, represent_literal_str)
+
+
+def yaml_str_repr(struct, indent=2):
+ """represent yaml as a string"""
+ text = yaml.dump(
+ struct,
+ width=1000, # to disable line wrapping
+ default_flow_style=False # to disable multiple items on single line
+ )
+ text = textwrap.indent(text, ' ' * indent)
+ return text
+
+
+def replace_nested_key(data, key, value, replace):
+ if isinstance(data, dict):
+ return {
+ k: replace if k == key and v == value else replace_nested_key(v, key, value, replace)
+ for k, v in data.items()
+ }
+ elif isinstance(data, list):
+ return [replace_nested_key(v, key, value, replace) for v in data]
+ else:
+ return data
+
+
+def patch_dashboards_json(content, multicluster_key):
+ try:
+ content_struct = json.loads(content)
+
+ # multicluster
+ overwrite_list = []
+ for variable in content_struct['templating']['list']:
+ if variable['name'] == 'cluster':
+ variable['hide'] = ':multicluster:'
+ overwrite_list.append(variable)
+ content_struct['templating']['list'] = overwrite_list
+
+ # Replace decimals=-1 with decimals= (nil value)
+ # ref: https://github.com/kubernetes-monitoring/kubernetes-mixin/pull/859
+ content_struct = replace_nested_key(content_struct, "decimals", -1, None)
+
+ content = json.dumps(content_struct, separators=(',', ':'))
+ content = content.replace('":multicluster:"', '`}}{{ if %s }}0{{ else }}2{{ end }}{{`' % multicluster_key,)
+ except (ValueError, KeyError):
+ pass
+
+ return "{{`" + content + "`}}"
+
+
+def patch_json_set_timezone_as_variable(content):
+ # content is no more in json format, so we have to replace using regex
+ return re.sub(r'"timezone"\s*:\s*"(?:\\.|[^\"])*"', '"timezone": "`}}{{ .Values.grafana.defaultDashboardsTimezone }}{{`"', content, flags=re.IGNORECASE)
+
+
+def jsonnet_import_callback(base, rel):
+ if "github.com" in base:
+ base = os.getcwd() + '/vendor/' + base[base.find('github.com'):]
+ elif "github.com" in rel:
+ base = os.getcwd() + '/vendor/'
+
+ if os.path.isfile(base + rel):
+ return base + rel, open(base + rel).read().encode('utf-8')
+
+ raise RuntimeError('File not found')
+
+
+def write_group_to_file(resource_name, content, url, destination, min_kubernetes, max_kubernetes, multicluster_key):
+ # initialize header
+ lines = header % {
+ 'name': resource_name,
+ 'url': url,
+ 'condition': condition_map.get(resource_name, ''),
+ 'min_kubernetes': min_kubernetes,
+ 'max_kubernetes': max_kubernetes
+ }
+
+ content = patch_dashboards_json(content, multicluster_key)
+ content = patch_json_set_timezone_as_variable(content)
+
+ filename_struct = {resource_name + '.json': (LiteralStr(content))}
+ # rules themselves
+ lines += yaml_str_repr(filename_struct)
+
+ # footer
+ lines += '{{- end }}'
+
+ filename = resource_name + '.yaml'
+ new_filename = "%s/%s" % (destination, filename)
+
+ # make sure directories to store the file exist
+ os.makedirs(destination, exist_ok=True)
+
+ # recreate the file
+ with open(new_filename, 'w') as f:
+ f.write(lines)
+
+ print("Generated %s" % new_filename)
+
+
+def main():
+ init_yaml_styles()
+ # read the rules, create a new template file per group
+ for chart in charts:
+ if 'git' in chart:
+ print("Clone %s" % chart['git'])
+ checkout_dir = os.path.basename(chart['git'])
+ shutil.rmtree(checkout_dir, ignore_errors=True)
+ subprocess.run(["git", "clone", chart['git'], "--branch", "main", "--single-branch", "--depth", "1", checkout_dir])
+ print("Generating rules from %s" % chart['source'])
+
+ mixin_file = os.path.basename(chart['source'])
+ mixin_dir = checkout_dir + '/' + os.path.dirname(chart['source']) + '/'
+ if os.path.exists(mixin_dir + "jsonnetfile.json"):
+ print("Running jsonnet-bundler, because jsonnetfile.json exists")
+ subprocess.run(["jb", "install"], cwd=mixin_dir)
+
+ mixin_vars = json.dumps(chart['mixin_vars'])
+
+ cwd = os.getcwd()
+ os.chdir(mixin_dir)
+ raw_text = '((import "%s") + %s)' % (mixin_file, mixin_vars)
+ source = mixin_file
+ else:
+ print("Generating rules from %s" % chart['source'])
+ response = requests.get(chart['source'])
+ if response.status_code != 200:
+ print('Skipping the file, response code %s not equals 200' % response.status_code)
+ continue
+ raw_text = response.text
+ source = chart['source']
+
+ if ('max_kubernetes' not in chart):
+ chart['max_kubernetes']="9.9.9-9"
+
+ if chart['type'] == 'yaml':
+ yaml_text = yaml.full_load(raw_text)
+ groups = yaml_text['items']
+ for group in groups:
+ for resource, content in group['data'].items():
+ write_group_to_file(resource.replace('.json', ''), content, chart['source'], chart['destination'], chart['min_kubernetes'], chart['max_kubernetes'], chart['multicluster_key'])
+ elif chart['type'] == 'jsonnet_mixin':
+ json_text = json.loads(_jsonnet.evaluate_snippet(source, raw_text + '.grafanaDashboards', import_callback=jsonnet_import_callback))
+
+ if 'git' in chart:
+ os.chdir(cwd)
+ # is it already a dashboard structure or is it nested (etcd case)?
+ flat_structure = bool(json_text.get('annotations'))
+ if flat_structure:
+ resource = os.path.basename(chart['source']).replace('.json', '')
+ write_group_to_file(resource, json.dumps(json_text, indent=4), chart['source'], chart['destination'], chart['min_kubernetes'], chart['max_kubernetes'], chart['multicluster_key'])
+ else:
+ for resource, content in json_text.items():
+ write_group_to_file(resource.replace('.json', ''), json.dumps(content, indent=4), chart['source'], chart['destination'], chart['min_kubernetes'], chart['max_kubernetes'], chart['multicluster_key'])
+
+ print("Finished")
+
+
+if __name__ == '__main__':
+ main()
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/hack/sync_prometheus_rules.py b/kubernetes/helm_charts/monitoring/prometheus-operator/hack/sync_prometheus_rules.py
new file mode 100755
index 0000000000..8a6b3edb68
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/hack/sync_prometheus_rules.py
@@ -0,0 +1,513 @@
+#!/usr/bin/env python3
+"""Fetch alerting and aggregation rules from provided urls into this chart."""
+import json
+import os
+import re
+import shutil
+import subprocess
+import textwrap
+
+import _jsonnet
+import requests
+import yaml
+from yaml.representer import SafeRepresenter
+
+
+# https://stackoverflow.com/a/20863889/961092
+class LiteralStr(str):
+ pass
+
+
+def change_style(style, representer):
+ def new_representer(dumper, data):
+ scalar = representer(dumper, data)
+ scalar.style = style
+ return scalar
+
+ return new_representer
+
+
+# Source files list
+charts = [
+ {
+ 'source': 'https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/alertmanager-prometheusRule.yaml',
+ 'destination': '../templates/prometheus/rules-1.14',
+ 'min_kubernetes': '1.14.0-0'
+ },
+ {
+ 'source': 'https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubePrometheus-prometheusRule.yaml',
+ 'destination': '../templates/prometheus/rules-1.14',
+ 'min_kubernetes': '1.14.0-0'
+ },
+ {
+ 'source': 'https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubernetesControlPlane-prometheusRule.yaml',
+ 'destination': '../templates/prometheus/rules-1.14',
+ 'min_kubernetes': '1.14.0-0'
+ },
+ {
+ 'source': 'https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/kubeStateMetrics-prometheusRule.yaml',
+ 'destination': '../templates/prometheus/rules-1.14',
+ 'min_kubernetes': '1.14.0-0'
+ },
+ {
+ 'source': 'https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/nodeExporter-prometheusRule.yaml',
+ 'destination': '../templates/prometheus/rules-1.14',
+ 'min_kubernetes': '1.14.0-0'
+ },
+ {
+ 'source': 'https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/prometheus-prometheusRule.yaml',
+ 'destination': '../templates/prometheus/rules-1.14',
+ 'min_kubernetes': '1.14.0-0'
+ },
+ {
+ 'source': 'https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/prometheusOperator-prometheusRule.yaml',
+ 'destination': '../templates/prometheus/rules-1.14',
+ 'min_kubernetes': '1.14.0-0'
+ },
+ {
+ 'git': 'https://github.com/etcd-io/etcd.git',
+ 'source': 'contrib/mixin/mixin.libsonnet',
+ 'destination': '../templates/prometheus/rules-1.14',
+ 'min_kubernetes': '1.14.0-0',
+ 'is_mixin': True,
+ 'mixin_vars': {'_config+': {}}
+ },
+]
+
+# Additional conditions map
+condition_map = {
+ 'alertmanager.rules': ' .Values.defaultRules.rules.alertmanager',
+ 'config-reloaders': ' .Values.defaultRules.rules.configReloaders',
+ 'etcd': ' .Values.kubeEtcd.enabled .Values.defaultRules.rules.etcd',
+ 'general.rules': ' .Values.defaultRules.rules.general',
+ 'k8s.rules': ' .Values.defaultRules.rules.k8s',
+ 'kube-apiserver-availability.rules': ' .Values.kubeApiServer.enabled .Values.defaultRules.rules.kubeApiserverAvailability',
+ 'kube-apiserver-burnrate.rules': ' .Values.kubeApiServer.enabled .Values.defaultRules.rules.kubeApiserverBurnrate',
+ 'kube-apiserver-histogram.rules': ' .Values.kubeApiServer.enabled .Values.defaultRules.rules.kubeApiserverHistogram',
+ 'kube-apiserver-slos': ' .Values.kubeApiServer.enabled .Values.defaultRules.rules.kubeApiserverSlos',
+ 'kube-prometheus-general.rules': ' .Values.defaultRules.rules.kubePrometheusGeneral',
+ 'kube-prometheus-node-recording.rules': ' .Values.defaultRules.rules.kubePrometheusNodeRecording',
+ 'kube-scheduler.rules': ' .Values.kubeScheduler.enabled .Values.defaultRules.rules.kubeSchedulerRecording',
+ 'kube-state-metrics': ' .Values.defaultRules.rules.kubeStateMetrics',
+ 'kubelet.rules': ' .Values.kubelet.enabled .Values.defaultRules.rules.kubelet',
+ 'kubernetes-apps': ' .Values.defaultRules.rules.kubernetesApps',
+ 'kubernetes-resources': ' .Values.defaultRules.rules.kubernetesResources',
+ 'kubernetes-storage': ' .Values.defaultRules.rules.kubernetesStorage',
+ 'kubernetes-system': ' .Values.defaultRules.rules.kubernetesSystem',
+ 'kubernetes-system-kube-proxy': ' .Values.kubeProxy.enabled .Values.defaultRules.rules.kubeProxy',
+ 'kubernetes-system-apiserver': ' .Values.defaultRules.rules.kubernetesSystem', # kubernetes-system was split into more groups in 1.14, one of them is kubernetes-system-apiserver
+ 'kubernetes-system-kubelet': ' .Values.defaultRules.rules.kubernetesSystem', # kubernetes-system was split into more groups in 1.14, one of them is kubernetes-system-kubelet
+ 'kubernetes-system-controller-manager': ' .Values.kubeControllerManager.enabled .Values.defaultRules.rules.kubeControllerManager',
+ 'kubernetes-system-scheduler': ' .Values.kubeScheduler.enabled .Values.defaultRules.rules.kubeSchedulerAlerting',
+ 'node-exporter.rules': ' .Values.defaultRules.rules.nodeExporterRecording',
+ 'node-exporter': ' .Values.defaultRules.rules.nodeExporterAlerting',
+ 'node.rules': ' .Values.defaultRules.rules.node',
+ 'node-network': ' .Values.defaultRules.rules.network',
+ 'prometheus-operator': ' .Values.defaultRules.rules.prometheusOperator',
+ 'prometheus': ' .Values.defaultRules.rules.prometheus', # kube-prometheus >= 1.14 uses prometheus as group instead of prometheus.rules
+}
+
+alert_condition_map = {
+ 'AggregatedAPIDown': 'semverCompare ">=1.18.0-0" $kubeTargetVersion',
+ 'AlertmanagerDown': '.Values.alertmanager.enabled',
+ 'CoreDNSDown': '.Values.kubeDns.enabled',
+ 'KubeAPIDown': '.Values.kubeApiServer.enabled', # there are more alerts which are left enabled, because they'll never fire without metrics
+ 'KubeControllerManagerDown': '.Values.kubeControllerManager.enabled',
+ 'KubeletDown': '.Values.prometheusOperator.kubeletService.enabled', # there are more alerts which are left enabled, because they'll never fire without metrics
+ 'KubeSchedulerDown': '.Values.kubeScheduler.enabled',
+ 'KubeStateMetricsDown': '.Values.kubeStateMetrics.enabled', # there are more alerts which are left enabled, because they'll never fire without metrics
+ 'NodeExporterDown': '.Values.nodeExporter.enabled',
+ 'PrometheusOperatorDown': '.Values.prometheusOperator.enabled',
+}
+
+replacement_map = {
+ 'job="prometheus-operator"': {
+ 'replacement': 'job="{{ $operatorJob }}"',
+ 'init': '{{- $operatorJob := printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "operator" }}'},
+ 'job="prometheus-k8s"': {
+ 'replacement': 'job="{{ $prometheusJob }}"',
+ 'init': '{{- $prometheusJob := printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "prometheus" }}'},
+ 'job="alertmanager-main"': {
+ 'replacement': 'job="{{ $alertmanagerJob }}"',
+ 'init': '{{- $alertmanagerJob := printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "alertmanager" }}'},
+ 'namespace="monitoring"': {
+ 'replacement': 'namespace="{{ $namespace }}"',
+ 'init': '{{- $namespace := printf "%s" (include "kube-prometheus-stack.namespace" .) }}'},
+ 'alertmanager-$1': {
+ 'replacement': '$1',
+ 'init': ''},
+ 'job="kube-state-metrics"': {
+ 'replacement': 'job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"',
+ 'limitGroup': ['kubernetes-apps'],
+ 'init': '{{- $targetNamespace := .Values.defaultRules.appNamespacesTarget }}'},
+ 'job="kubelet"': {
+ 'replacement': 'job="kubelet", namespace=~"{{ $targetNamespace }}"',
+ 'limitGroup': ['kubernetes-storage'],
+ 'init': '{{- $targetNamespace := .Values.defaultRules.appNamespacesTarget }}'},
+ 'runbook_url: https://runbooks.prometheus-operator.dev/runbooks/': {
+ 'replacement': 'runbook_url: {{ .Values.defaultRules.runbookUrl }}/',
+ 'init': ''},
+ '(namespace,service)': {
+ 'replacement': '(namespace,service,cluster)',
+ 'init': ''}
+}
+
+# standard header
+header = '''{{- /*
+Generated from '%(name)s' group from %(url)s
+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 ">=%(min_kubernetes)s" $kubeTargetVersion) (semverCompare "<%(max_kubernetes)s" $kubeTargetVersion) .Values.defaultRules.create%(condition)s }}%(init_line)s
+apiVersion: monitoring.coreos.com/v1
+kind: PrometheusRule
+metadata:
+ name: {{ printf "%%s-%%s" (include "kube-prometheus-stack.fullname" .) "%(name)s" | 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:
+ -'''
+
+
+def init_yaml_styles():
+ represent_literal_str = change_style('|', SafeRepresenter.represent_str)
+ yaml.add_representer(LiteralStr, represent_literal_str)
+
+
+def escape(s):
+ return s.replace("{{", "{{`{{").replace("}}", "}}`}}").replace("{{`{{", "{{`{{`}}").replace("}}`}}", "{{`}}`}}")
+
+
+def fix_expr(rules):
+ """Remove trailing whitespaces and line breaks, which happen to creep in
+ due to yaml import specifics;
+ convert multiline expressions to literal style, |-"""
+ for rule in rules:
+ rule['expr'] = rule['expr'].rstrip()
+ if '\n' in rule['expr']:
+ rule['expr'] = LiteralStr(rule['expr'])
+
+
+def yaml_str_repr(struct, indent=4):
+ """represent yaml as a string"""
+ text = yaml.dump(
+ struct,
+ width=1000, # to disable line wrapping
+ default_flow_style=False # to disable multiple items on single line
+ )
+ text = escape(text) # escape {{ and }} for helm
+ text = textwrap.indent(text, ' ' * indent)[indent - 1:] # indent everything, and remove very first line extra indentation
+ return text
+
+
+def get_rule_group_condition(group_name, value_key):
+ if group_name == '':
+ return ''
+
+ if group_name.count(".Values") > 1:
+ group_name = group_name.split(' ')[-1]
+
+ return group_name.replace('Values.defaultRules.rules', f"Values.defaultRules.{value_key}").strip()
+
+
+def add_rules_conditions(rules, rules_map, indent=4):
+ """Add if wrapper for rules, listed in rules_map"""
+ rule_condition = '{{- if %s }}\n'
+ for alert_name in rules_map:
+ line_start = ' ' * indent + '- alert: '
+ if line_start + alert_name in rules:
+ rule_text = rule_condition % rules_map[alert_name]
+ start = 0
+ # to modify all alerts with same name
+ while True:
+ try:
+ # add if condition
+ index = rules.index(line_start + alert_name, start)
+ start = index + len(rule_text) + 1
+ rules = rules[:index] + rule_text + rules[index:]
+ # add end of if
+ try:
+ next_index = rules.index(line_start, index + len(rule_text) + 1)
+ except ValueError:
+ # we found the last alert in file if there are no alerts after it
+ next_index = len(rules)
+
+ # depending on the rule ordering in rules_map it's possible that an if statement from another rule is present at the end of this block.
+ found_block_end = False
+ last_line_index = next_index
+ while not found_block_end:
+ last_line_index = rules.rindex('\n', index, last_line_index - 1) # find the starting position of the last line
+ last_line = rules[last_line_index + 1:next_index]
+
+ if last_line.startswith('{{- if'):
+ next_index = last_line_index + 1 # move next_index back if the current block ends in an if statement
+ continue
+
+ found_block_end = True
+ rules = rules[:next_index] + '{{- end }}\n' + rules[next_index:]
+ except ValueError:
+ break
+ return rules
+
+
+def add_rules_conditions_from_condition_map(rules, indent=4):
+ """Add if wrapper for rules, listed in alert_condition_map"""
+ rules = add_rules_conditions(rules, alert_condition_map, indent)
+ return rules
+
+
+def add_rules_per_rule_conditions(rules, group, indent=4):
+ """Add if wrapper for rules, listed in alert_condition_map"""
+ rules_condition_map = {}
+ for rule in group['rules']:
+ if 'alert' in rule:
+ rules_condition_map[rule['alert']] = f"not (.Values.defaultRules.disabled.{rule['alert']} | default false)"
+
+ rules = add_rules_conditions(rules, rules_condition_map, indent)
+ return rules
+
+
+def add_custom_labels(rules_str, group, indent=4, label_indent=2):
+ """Add if wrapper for additional rules labels"""
+ rule_group_labels = get_rule_group_condition(condition_map.get(group['name'], ''), 'additionalRuleGroupLabels')
+
+ additional_rule_labels = textwrap.indent("""
+{{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+{{- end }}
+{{- with %s }}
+ {{- toYaml . | nindent 8 }}
+{{- end }}""" % (rule_group_labels,), " " * (indent + label_indent * 2))
+
+ additional_rule_labels_condition_start = "\n" + " " * (indent + label_indent) + '{{- if or .Values.defaultRules.additionalRuleLabels %s }}' % (rule_group_labels,)
+ additional_rule_labels_condition_end = "\n" + " " * (indent + label_indent) + '{{- end }}'
+ # labels: cannot be null, if a rule does not have any labels by default, the labels block
+ # should only be added if there are .Values defaultRules.additionalRuleLabels defined
+ rule_seperator = "\n" + " " * indent + "-.*"
+ label_seperator = "\n" + " " * indent + " labels:"
+ section_seperator = "\n" + " " * indent + " \S"
+ section_seperator_len = len(section_seperator)-1
+ rules_positions = re.finditer(rule_seperator,rules_str)
+
+ # fetch breakpoint between each set of rules
+ ruleStartingLine = [(rule_position.start(),rule_position.end()) for rule_position in rules_positions]
+ head = rules_str[:ruleStartingLine[0][0]]
+
+ # construct array of rules so they can be handled individually
+ rules = []
+ # pylint: disable=E1136
+ # See https://github.com/pylint-dev/pylint/issues/1498 for None Values
+ previousRule = None
+ for r in ruleStartingLine:
+ if previousRule != None:
+ rules.append(rules_str[previousRule[0]:r[0]])
+ previousRule = r
+ rules.append(rules_str[previousRule[0]:len(rules_str)-1])
+
+ for i, rule in enumerate(rules):
+ current_label = re.search(label_seperator,rule)
+ if current_label:
+ # `labels:` block exists
+ # determine if there are any existing entries
+ entries = re.search(section_seperator,rule[current_label.end():])
+ if entries:
+ entries_start = current_label.end()
+ entries_end = entries.end()+current_label.end()-section_seperator_len
+ rules[i] = rule[:entries_end] + additional_rule_labels_condition_start + additional_rule_labels + additional_rule_labels_condition_end + rule[entries_end:]
+ else:
+ # `labels:` does not contain any entries
+ # append template to label section
+ rules[i] += additional_rule_labels_condition_start + additional_rule_labels + additional_rule_labels_condition_end
+ else:
+ # `labels:` block does not exist
+ # create it and append template
+ rules[i] += additional_rule_labels_condition_start + "\n" + " " * indent + " labels:" + additional_rule_labels + additional_rule_labels_condition_end
+ return head + "".join(rules) + "\n"
+
+
+def add_custom_annotations(rules, group, indent=4):
+ """Add if wrapper for additional rules annotations"""
+ rule_condition = '{{- if .Values.defaultRules.additionalRuleAnnotations }}\n{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}\n{{- end }}'
+ rule_group_labels = get_rule_group_condition(condition_map.get(group['name'], ''), 'additionalRuleGroupAnnotations')
+ rule_group_condition = '\n{{- if %s }}\n{{ toYaml %s | indent 8 }}\n{{- end }}' % (rule_group_labels, rule_group_labels)
+ annotations = " annotations:"
+ annotations_len = len(annotations) + 1
+ rule_condition_len = len(rule_condition) + 1
+ rule_group_condition_len = len(rule_group_condition)
+
+ separator = " " * indent + "- alert:.*"
+ alerts_positions = re.finditer(separator,rules)
+ alert = 0
+
+ for alert_position in alerts_positions:
+ # Add rule_condition after 'annotations:' statement
+ index = alert_position.end() + annotations_len + (rule_condition_len + rule_group_condition_len) * alert
+ rules = rules[:index] + "\n" + rule_condition + rule_group_condition + rules[index:]
+ alert += 1
+
+ return rules
+
+
+def add_custom_keep_firing_for(rules, indent=4):
+ """Add if wrapper for additional rules annotations"""
+ indent_spaces = " " * indent + " "
+ keep_firing_for = (indent_spaces + '{{- with .Values.defaultRules.keepFiringFor }}\n' +
+ indent_spaces + 'keep_firing_for: "{{ . }}"\n' +
+ indent_spaces + '{{- end }}')
+ keep_firing_for_len = len(keep_firing_for) + 1
+
+ separator = " " * indent + " for:.*"
+ alerts_positions = re.finditer(separator, rules)
+ alert = 0
+
+ for alert_position in alerts_positions:
+ # Add rule_condition after 'annotations:' statement
+ index = alert_position.end() + keep_firing_for_len * alert
+ rules = rules[:index] + "\n" + keep_firing_for + rules[index:]
+ alert += 1
+
+ return rules
+
+
+def write_group_to_file(group, url, destination, min_kubernetes, max_kubernetes):
+ fix_expr(group['rules'])
+ group_name = group['name']
+
+ # prepare rules string representation
+ rules = yaml_str_repr(group)
+ # add replacements of custom variables and include their initialisation in case it's needed
+ init_line = ''
+ for line in replacement_map:
+ if group_name in replacement_map[line].get('limitGroup', [group_name]) and line in rules:
+ rules = rules.replace(line, replacement_map[line]['replacement'])
+ if replacement_map[line]['init']:
+ init_line += '\n' + replacement_map[line]['init']
+ # append per-alert rules
+ rules = add_custom_labels(rules, group)
+ rules = add_custom_annotations(rules, group)
+ rules = add_custom_keep_firing_for(rules)
+ rules = add_rules_conditions_from_condition_map(rules)
+ rules = add_rules_per_rule_conditions(rules, group)
+ # initialize header
+ lines = header % {
+ 'name': group['name'],
+ 'url': url,
+ 'condition': condition_map.get(group['name'], ''),
+ 'init_line': init_line,
+ 'min_kubernetes': min_kubernetes,
+ 'max_kubernetes': max_kubernetes
+ }
+
+ # rules themselves
+ lines += rules
+
+ # footer
+ lines += '{{- end }}'
+
+ filename = group['name'] + '.yaml'
+ new_filename = "%s/%s" % (destination, filename)
+
+ # make sure directories to store the file exist
+ os.makedirs(destination, exist_ok=True)
+
+ # recreate the file
+ with open(new_filename, 'w') as f:
+ f.write(lines)
+
+ print("Generated %s" % new_filename)
+
+def write_rules_names_template():
+ with open('../templates/prometheus/_rules.tpl', 'w') as f:
+ f.write('''{{- /*
+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
+*/ -}}\n''')
+ f.write('{{- define "rules.names" }}\n')
+ f.write('rules:\n')
+ for rule in condition_map:
+ f.write(' - "%s"\n' % rule)
+ f.write('{{- end }}')
+
+def main():
+ init_yaml_styles()
+ # read the rules, create a new template file per group
+ for chart in charts:
+ if 'git' in chart:
+ print("Clone %s" % chart['git'])
+ checkout_dir = os.path.basename(chart['git'])
+ shutil.rmtree(checkout_dir, ignore_errors=True)
+ subprocess.run(["git", "clone", chart['git'], "--branch", "main", "--single-branch", "--depth", "1", checkout_dir])
+ print("Generating rules from %s" % chart['source'])
+
+ if chart.get('is_mixin'):
+ mixin_file = os.path.basename(chart['source'])
+ mixin_dir = checkout_dir + '/' + os.path.dirname(chart['source']) + '/'
+ if os.path.exists(mixin_dir + "jsonnetfile.json"):
+ print("Running jsonnet-bundler, because jsonnetfile.json exists")
+ subprocess.run(["jb", "install"], cwd=mixin_dir)
+
+ mixin_vars = json.dumps(chart['mixin_vars'])
+
+ print("Generating rules from %s" % mixin_file)
+ print("Change cwd to %s" % checkout_dir + '/' + os.path.dirname(chart['source']))
+ cwd = os.getcwd()
+ os.chdir(mixin_dir)
+ alerts = json.loads(_jsonnet.evaluate_snippet(mixin_file, '((import "%s") + %s).prometheusAlerts' % (mixin_file, mixin_vars), import_callback=jsonnet_import_callback))
+ os.chdir(cwd)
+ else:
+ with open(checkout_dir + '/' + chart['source'], "r") as f:
+ raw_text = f.read()
+
+ alerts = yaml.full_load(raw_text)
+
+ else:
+ print("Generating rules from %s" % chart['source'])
+ response = requests.get(chart['source'])
+ if response.status_code != 200:
+ print('Skipping the file, response code %s not equals 200' % response.status_code)
+ continue
+ raw_text = response.text
+ if chart.get('is_mixin'):
+ alerts = json.loads(_jsonnet.evaluate_snippet(chart['source'], raw_text + '.prometheusAlerts'))
+ else:
+ alerts = yaml.full_load(raw_text)
+
+ if ('max_kubernetes' not in chart):
+ chart['max_kubernetes']="9.9.9-9"
+
+ # etcd workaround, their file don't have spec level
+ groups = alerts['spec']['groups'] if alerts.get('spec') else alerts['groups']
+ for group in groups:
+ write_group_to_file(group, chart['source'], chart['destination'], chart['min_kubernetes'], chart['max_kubernetes'])
+
+ # write rules.names named template
+ write_rules_names_template()
+
+ print("Finished")
+
+
+def jsonnet_import_callback(base, rel):
+ if "github.com" in base:
+ base = os.getcwd() + '/vendor/' + base[base.find('github.com'):]
+ elif "github.com" in rel:
+ base = os.getcwd() + '/vendor/'
+
+ if os.path.isfile(base + rel):
+ return base + rel, open(base + rel).read().encode('utf-8')
+
+ raise RuntimeError('File not found')
+
+
+if __name__ == '__main__':
+ main()
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/hack/update_crds.sh b/kubernetes/helm_charts/monitoring/prometheus-operator/hack/update_crds.sh
new file mode 100755
index 0000000000..22d7124516
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/hack/update_crds.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+
+if [[ $(uname -s) = "Darwin" ]]; then
+ VERSION="$(grep ^appVersion "${SCRIPT_DIR}/../Chart.yaml" | sed 's/appVersion: //g')"
+else
+ VERSION="$(grep ^appVersion "${SCRIPT_DIR}/../Chart.yaml" | sed 's/appVersion:\s//g')"
+fi
+
+FILES=(
+ "crd-alertmanagerconfigs.yaml : monitoring.coreos.com_alertmanagerconfigs.yaml"
+ "crd-alertmanagers.yaml : monitoring.coreos.com_alertmanagers.yaml"
+ "crd-podmonitors.yaml : monitoring.coreos.com_podmonitors.yaml"
+ "crd-probes.yaml : monitoring.coreos.com_probes.yaml"
+ "crd-prometheusagents.yaml : monitoring.coreos.com_prometheusagents.yaml"
+ "crd-prometheuses.yaml : monitoring.coreos.com_prometheuses.yaml"
+ "crd-prometheusrules.yaml : monitoring.coreos.com_prometheusrules.yaml"
+ "crd-scrapeconfigs.yaml : monitoring.coreos.com_scrapeconfigs.yaml"
+ "crd-servicemonitors.yaml : monitoring.coreos.com_servicemonitors.yaml"
+ "crd-thanosrulers.yaml : monitoring.coreos.com_thanosrulers.yaml"
+)
+
+for line in "${FILES[@]}"; do
+ DESTINATION=$(echo "${line%%:*}" | xargs)
+ SOURCE=$(echo "${line##*:}" | xargs)
+
+ URL="https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/$VERSION/example/prometheus-operator-crd/$SOURCE"
+
+ echo -e "Downloading Prometheus Operator CRD with Version ${VERSION}:\n${URL}\n"
+
+ echo "# ${URL}" > "${SCRIPT_DIR}/../charts/crds/crds/${DESTINATION}"
+
+ if ! curl --silent --retry-all-errors --fail --location "${URL}" >> "${SCRIPT_DIR}/../charts/crds/crds/${DESTINATION}"; then
+ echo -e "Failed to download ${URL}!"
+ exit 1
+ fi
+done
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/requirements.lock b/kubernetes/helm_charts/monitoring/prometheus-operator/requirements.lock
deleted file mode 100755
index 27aa6c73d6..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/requirements.lock
+++ /dev/null
@@ -1,12 +0,0 @@
-dependencies:
-- name: kube-state-metrics
- repository: https://kubernetes-charts.storage.googleapis.com/
- version: 2.8.4
-- name: prometheus-node-exporter
- repository: https://kubernetes-charts.storage.googleapis.com/
- version: 1.9.1
-- name: grafana
- repository: https://kubernetes-charts.storage.googleapis.com/
- version: 5.0.18
-digest: sha256:ae93b2266b7083b6b5d74b0fd5e224a93572766b97e1ba74bca0e6f3c69ed094
-generated: "2020-04-29T11:40:21.286237214+02:00"
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/requirements.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/requirements.yaml
deleted file mode 100755
index 129a62d57c..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/requirements.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-dependencies:
-
- - name: kube-state-metrics
- version: "2.8.*"
- repository: https://kubernetes-charts.storage.googleapis.com/
- condition: kubeStateMetrics.enabled
-
- - name: prometheus-node-exporter
- version: "1.9.*"
- repository: https://kubernetes-charts.storage.googleapis.com/
- condition: nodeExporter.enabled
-
- - name: grafana
- version: "5.0.*"
- repository: https://kubernetes-charts.storage.googleapis.com/
- condition: grafana.enabled
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/NOTES.txt b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/NOTES.txt
old mode 100755
new mode 100644
index ce7dce22ab..371f3ae398
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/NOTES.txt
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/NOTES.txt
@@ -1,5 +1,4 @@
-The Prometheus Operator has been installed. Check its status by running:
- kubectl --namespace {{ $.Release.Namespace }} get pods -l "release={{ $.Release.Name }}"
+{{ $.Chart.Name }} has been installed. Check its status by running:
+ kubectl --namespace {{ template "kube-prometheus-stack.namespace" . }} get pods -l "release={{ $.Release.Name }}"
-Visit https://github.com/coreos/prometheus-operator for instructions on how
-to create & configure Alertmanager and Prometheus instances using the Operator.
\ No newline at end of file
+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/kubernetes/helm_charts/monitoring/prometheus-operator/templates/_helpers.tpl b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/_helpers.tpl
old mode 100755
new mode 100644
index f4a8f2bae0..9e3e4d6779
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/_helpers.tpl
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/_helpers.tpl
@@ -1,6 +1,6 @@
{{/* 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-operator.name" -}}
+{{- define "kube-prometheus-stack.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 50 | trimSuffix "-" -}}
{{- end }}
@@ -11,7 +11,7 @@ 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 "prometheus-operator.fullname" -}}
+{{- define "kube-prometheus-stack.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 26 | trimSuffix "-" -}}
{{- else -}}
@@ -25,28 +25,56 @@ The longest name that gets created adds and extra 37 characters, so truncation s
{{- end -}}
{{/* Fullname suffixed with operator */}}
-{{- define "prometheus-operator.operator.fullname" -}}
-{{- printf "%s-operator" (include "prometheus-operator.fullname" .) -}}
+{{- define "kube-prometheus-stack.operator.fullname" -}}
+{{- printf "%s-operator" (include "kube-prometheus-stack.fullname" .) -}}
{{- end }}
-{{/* Fullname suffixed with prometheus */}}
-{{- define "prometheus-operator.prometheus.fullname" -}}
-{{- printf "%s-prometheus" (include "prometheus-operator.fullname" .) -}}
+{{/* Prometheus custom resource instance name */}}
+{{- define "kube-prometheus-stack.prometheus.crname" -}}
+{{- if .Values.cleanPrometheusOperatorObjectNames }}
+{{- include "kube-prometheus-stack.fullname" . }}
+{{- else }}
+{{- print (include "kube-prometheus-stack.fullname" .) "-prometheus" }}
+{{- end }}
+{{- end }}
+
+{{/* Prometheus apiVersion for networkpolicy */}}
+{{- define "kube-prometheus-stack.prometheus.networkPolicy.apiVersion" -}}
+{{- print "networking.k8s.io/v1" -}}
+{{- end }}
+
+{{/* Alertmanager custom resource instance name */}}
+{{- define "kube-prometheus-stack.alertmanager.crname" -}}
+{{- if .Values.cleanPrometheusOperatorObjectNames }}
+{{- include "kube-prometheus-stack.fullname" . }}
+{{- else }}
+{{- print (include "kube-prometheus-stack.fullname" .) "-alertmanager" -}}
+{{- end }}
+{{- end }}
+
+{{/* Fullname suffixed with thanos-ruler */}}
+{{- define "kube-prometheus-stack.thanosRuler.fullname" -}}
+{{- printf "%s-thanos-ruler" (include "kube-prometheus-stack.fullname" .) -}}
{{- end }}
-{{/* Fullname suffixed with alertmanager */}}
-{{- define "prometheus-operator.alertmanager.fullname" -}}
-{{- printf "%s-alertmanager" (include "prometheus-operator.fullname" .) -}}
+{{/* Shortened name suffixed with thanos-ruler */}}
+{{- define "kube-prometheus-stack.thanosRuler.name" -}}
+{{- default (printf "%s-thanos-ruler" (include "kube-prometheus-stack.name" .)) .Values.thanosRuler.name -}}
{{- end }}
+
{{/* Create chart name and version as used by the chart label. */}}
-{{- define "prometheus-operator.chartref" -}}
+{{- define "kube-prometheus-stack.chartref" -}}
{{- replace "+" "_" .Chart.Version | printf "%s-%s" .Chart.Name -}}
{{- end }}
{{/* Generate basic labels */}}
-{{- define "prometheus-operator.labels" }}
-chart: {{ template "prometheus-operator.chartref" . }}
+{{- define "kube-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 "kube-prometheus-stack.name" . }}
+chart: {{ template "kube-prometheus-stack.chartref" . }}
release: {{ $.Release.Name | quote }}
heritage: {{ $.Release.Service | quote }}
{{- if .Values.commonLabels}}
@@ -54,29 +82,198 @@ heritage: {{ $.Release.Service | quote }}
{{- end }}
{{- end }}
-{{/* Create the name of prometheus-operator service account to use */}}
-{{- define "prometheus-operator.operator.serviceAccountName" -}}
+{{/* Create the name of kube-prometheus-stack service account to use */}}
+{{- define "kube-prometheus-stack.operator.serviceAccountName" -}}
{{- if .Values.prometheusOperator.serviceAccount.create -}}
- {{ default (include "prometheus-operator.operator.fullname" .) .Values.prometheusOperator.serviceAccount.name }}
+ {{ default (include "kube-prometheus-stack.operator.fullname" .) .Values.prometheusOperator.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.prometheusOperator.serviceAccount.name }}
{{- end -}}
{{- end -}}
{{/* Create the name of prometheus service account to use */}}
-{{- define "prometheus-operator.prometheus.serviceAccountName" -}}
+{{- define "kube-prometheus-stack.prometheus.serviceAccountName" -}}
{{- if .Values.prometheus.serviceAccount.create -}}
- {{ default (include "prometheus-operator.prometheus.fullname" .) .Values.prometheus.serviceAccount.name }}
+ {{ default (print (include "kube-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 "prometheus-operator.alertmanager.serviceAccountName" -}}
+{{- define "kube-prometheus-stack.alertmanager.serviceAccountName" -}}
{{- if .Values.alertmanager.serviceAccount.create -}}
- {{ default (include "prometheus-operator.alertmanager.fullname" .) .Values.alertmanager.serviceAccount.name }}
+ {{ default (print (include "kube-prometheus-stack.fullname" .) "-alertmanager") .Values.alertmanager.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.alertmanager.serviceAccount.name }}
{{- end -}}
{{- 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.name" .) .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
+*/}}
+{{- define "kube-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 "kube-prometheus-stack-grafana.namespace" -}}
+ {{- if .Values.grafana.namespaceOverride -}}
+ {{- .Values.grafana.namespaceOverride -}}
+ {{- else -}}
+ {{- .Release.Namespace -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Use the kube-state-metrics namespace override for multi-namespace deployments in combined charts
+*/}}
+{{- define "kube-prometheus-stack-kube-state-metrics.namespace" -}}
+ {{- if index .Values "kube-state-metrics" "namespaceOverride" -}}
+ {{- index .Values "kube-state-metrics" "namespaceOverride" -}}
+ {{- else -}}
+ {{- .Release.Namespace -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Use the prometheus-node-exporter namespace override for multi-namespace deployments in combined charts
+*/}}
+{{- define "kube-prometheus-stack-prometheus-node-exporter.namespace" -}}
+ {{- if index .Values "prometheus-node-exporter" "namespaceOverride" -}}
+ {{- index .Values "prometheus-node-exporter" "namespaceOverride" -}}
+ {{- else -}}
+ {{- .Release.Namespace -}}
+ {{- end -}}
+{{- end -}}
+
+{{/* Allow KubeVersion to be overridden. */}}
+{{- define "kube-prometheus-stack.kubeVersion" -}}
+ {{- default .Capabilities.KubeVersion.Version .Values.kubeVersionOverride -}}
+{{- end -}}
+
+{{/* Get Ingress API Version */}}
+{{- define "kube-prometheus-stack.ingress.apiVersion" -}}
+ {{- if and (.Capabilities.APIVersions.Has "networking.k8s.io/v1") (semverCompare ">= 1.19-0" (include "kube-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 "kube-prometheus-stack.ingress.isStable" -}}
+ {{- eq (include "kube-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 "kube-prometheus-stack.ingress.supportsPathType" -}}
+ {{- or (eq (include "kube-prometheus-stack.ingress.isStable" .) "true") (and (eq (include "kube-prometheus-stack.ingress.apiVersion" .) "networking.k8s.io/v1beta1") (semverCompare ">= 1.18-0" (include "kube-prometheus-stack.kubeVersion" .))) -}}
+{{- end -}}
+
+{{/* Get Policy API Version */}}
+{{- define "kube-prometheus-stack.pdb.apiVersion" -}}
+ {{- if and (.Capabilities.APIVersions.Has "policy/v1") (semverCompare ">= 1.21-0" (include "kube-prometheus-stack.kubeVersion" .)) -}}
+ {{- print "policy/v1" -}}
+ {{- else -}}
+ {{- print "policy/v1beta1" -}}
+ {{- end -}}
+ {{- end -}}
+
+{{/* 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 -}}
+ {{- 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 -}}
+ {{- $insecure := index . 1 -}}
+ {{- $secure := index . 2 -}}
+ {{- $userValue := index . 3 -}}
+ {{- 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 -}}
+ {{- include "kube-prometheus-stack.kubeVersionDefaultValue" (list $values ">= 1.23-0" $insecure $secure $userValue) -}}
+{{- end -}}
+
+{{/* Sets default scrape limits for servicemonitor */}}
+{{- define "servicemonitor.scrapeLimits" -}}
+{{- with .sampleLimit }}
+sampleLimit: {{ . }}
+{{- end }}
+{{- with .targetLimit }}
+targetLimit: {{ . }}
+{{- end }}
+{{- with .labelLimit }}
+labelLimit: {{ . }}
+{{- end }}
+{{- with .labelNameLengthLimit }}
+labelNameLengthLimit: {{ . }}
+{{- end }}
+{{- with .labelValueLengthLimit }}
+labelValueLengthLimit: {{ . }}
+{{- 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 "kube-prometheus-stack.imagePullSecrets" -}}
+{{- range .Values.global.imagePullSecrets }}
+ {{- if eq (typeOf .) "map[string]interface {}" }}
+- {{ toYaml . | trim }}
+ {{- else }}
+- name: {{ . }}
+ {{- end }}
+{{- end }}
+{{- end -}}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/alertmanager.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/alertmanager.yaml
old mode 100755
new mode 100644
index 19ae3cb463..7c2a298b3f
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/alertmanager.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/alertmanager.yaml
@@ -2,25 +2,41 @@
apiVersion: monitoring.coreos.com/v1
kind: Alertmanager
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-alertmanager
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.alertmanager.crname" . }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}-alertmanager
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}-alertmanager
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
+{{- if .Values.alertmanager.annotations }}
+ annotations:
+{{ toYaml .Values.alertmanager.annotations | indent 4 }}
+{{- end }}
spec:
{{- if .Values.alertmanager.alertmanagerSpec.image }}
- baseImage: {{ .Values.alertmanager.alertmanagerSpec.image.repository }}
+ {{- $registry := .Values.global.imageRegistry | default .Values.alertmanager.alertmanagerSpec.image.registry -}}
+ {{- if and .Values.alertmanager.alertmanagerSpec.image.tag .Values.alertmanager.alertmanagerSpec.image.sha }}
+ image: "{{ $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: "{{ $registry }}/{{ .Values.alertmanager.alertmanagerSpec.image.repository }}@sha256:{{ .Values.alertmanager.alertmanagerSpec.image.sha }}"
+ {{- else if .Values.alertmanager.alertmanagerSpec.image.tag }}
+ image: "{{ $registry }}/{{ .Values.alertmanager.alertmanagerSpec.image.repository }}:{{ .Values.alertmanager.alertmanagerSpec.image.tag }}"
+ {{- else }}
+ image: "{{ $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 "prometheus-operator.alertmanager.serviceAccountName" . }}
+ serviceAccountName: {{ template "kube-prometheus-stack.alertmanager.serviceAccountName" . }}
{{- if .Values.alertmanager.alertmanagerSpec.externalUrl }}
- externalUrl: "{{ .Values.alertmanager.alertmanagerSpec.externalUrl }}"
+ externalUrl: "{{ tpl .Values.alertmanager.alertmanagerSpec.externalUrl . }}"
{{- else if and .Values.alertmanager.ingress.enabled .Values.alertmanager.ingress.hosts }}
- externalUrl: "http://{{ index .Values.alertmanager.ingress.hosts 0 }}{{ .Values.alertmanager.alertmanagerSpec.routePrefix }}"
+ externalUrl: "http://{{ tpl (index .Values.alertmanager.ingress.hosts 0) . }}{{ .Values.alertmanager.alertmanagerSpec.routePrefix }}"
{{- else }}
- externalUrl: http://{{ template "prometheus-operator.fullname" . }}-alertmanager.{{ $.Release.Namespace }}:{{ .Values.alertmanager.service.port }}
+ externalUrl: http://{{ template "kube-prometheus-stack.fullname" . }}-alertmanager.{{ template "kube-prometheus-stack.namespace" . }}:{{ .Values.alertmanager.service.port }}
{{- end }}
{{- if .Values.alertmanager.alertmanagerSpec.nodeSelector }}
nodeSelector:
@@ -41,6 +57,30 @@ spec:
configMaps:
{{ toYaml .Values.alertmanager.alertmanagerSpec.configMaps | indent 4 }}
{{- end }}
+{{- if .Values.alertmanager.alertmanagerSpec.alertmanagerConfigSelector }}
+ alertmanagerConfigSelector:
+{{ tpl (toYaml .Values.alertmanager.alertmanagerSpec.alertmanagerConfigSelector | indent 4) . }}
+{{ else }}
+ alertmanagerConfigSelector: {}
+{{- end }}
+{{- if .Values.alertmanager.alertmanagerSpec.alertmanagerConfigNamespaceSelector }}
+ alertmanagerConfigNamespaceSelector:
+{{ tpl (toYaml .Values.alertmanager.alertmanagerSpec.alertmanagerConfigNamespaceSelector | indent 4) . }}
+{{ else }}
+ alertmanagerConfigNamespaceSelector: {}
+{{- end }}
+{{- 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.alertmanagerConfigMatcherStrategy }}
+ alertmanagerConfigMatcherStrategy:
+{{ toYaml .Values.alertmanager.alertmanagerSpec.alertmanagerConfigMatcherStrategy | indent 4 }}
+{{- end }}
{{- if .Values.alertmanager.alertmanagerSpec.resources }}
resources:
{{ toYaml .Values.alertmanager.alertmanagerSpec.resources | indent 4 }}
@@ -54,7 +94,7 @@ spec:
{{- 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:
@@ -62,6 +102,7 @@ spec:
{{- 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 }}
@@ -70,9 +111,9 @@ spec:
requiredDuringSchedulingIgnoredDuringExecution:
- topologyKey: {{ .Values.alertmanager.alertmanagerSpec.podAntiAffinityTopologyKey }}
labelSelector:
- matchLabels:
- app: alertmanager
- alertmanager: {{ template "prometheus-operator.fullname" . }}-alertmanager
+ matchExpressions:
+ - {key: app.kubernetes.io/name, operator: In, values: [alertmanager]}
+ - {key: alertmanager, operator: In, values: [{{ template "kube-prometheus-stack.alertmanager.crname" . }}]}
{{- else if eq .Values.alertmanager.alertmanagerSpec.podAntiAffinity "soft" }}
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
@@ -80,28 +121,62 @@ spec:
podAffinityTerm:
topologyKey: {{ .Values.alertmanager.alertmanagerSpec.podAntiAffinityTopologyKey }}
labelSelector:
- matchLabels:
- app: alertmanager
- alertmanager: {{ template "prometheus-operator.fullname" . }}-alertmanager
-{{- end }}
+ matchExpressions:
+ - {key: app.kubernetes.io/name, operator: In, values: [alertmanager]}
+ - {key: alertmanager, operator: In, values: [{{ template "kube-prometheus-stack.alertmanager.crname" . }}]}
{{- end }}
{{- if .Values.alertmanager.alertmanagerSpec.tolerations }}
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:
-{{ toYaml .Values.global.imagePullSecrets | indent 4 }}
+{{ include "kube-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: {{.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.clusterGossipInterval }}
+ clusterGossipInterval: {{ .Values.alertmanager.alertmanagerSpec.clusterGossipInterval }}
+{{- end }}
+{{- if .Values.alertmanager.alertmanagerSpec.clusterPeerTimeout }}
+ clusterPeerTimeout: {{ .Values.alertmanager.alertmanagerSpec.clusterPeerTimeout }}
+{{- end }}
+{{- if .Values.alertmanager.alertmanagerSpec.clusterPushpullInterval }}
+ clusterPushpullInterval: {{ .Values.alertmanager.alertmanagerSpec.clusterPushpullInterval }}
+{{- 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/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/extrasecret.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/extrasecret.yaml
new file mode 100644
index 0000000000..ecd8f47021
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/extrasecret.yaml
@@ -0,0 +1,20 @@
+{{- if .Values.alertmanager.extraSecret.data -}}
+{{- $secretName := printf "alertmanager-%s-extra" (include "kube-prometheus-stack.fullname" . ) -}}
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ default $secretName .Values.alertmanager.extraSecret.name }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
+{{- if .Values.alertmanager.extraSecret.annotations }}
+ annotations:
+{{ toYaml .Values.alertmanager.extraSecret.annotations | indent 4 }}
+{{- end }}
+ labels:
+ app: {{ template "kube-prometheus-stack.name" . }}-alertmanager
+ app.kubernetes.io/component: alertmanager
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
+data:
+{{- range $key, $val := .Values.alertmanager.extraSecret.data }}
+ {{ $key }}: {{ $val | b64enc | quote }}
+{{- end }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/ingress.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/ingress.yaml
old mode 100755
new mode 100644
index 66bb34abbb..ae8092dec5
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/ingress.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/ingress.yaml
@@ -1,28 +1,33 @@
{{- if and .Values.alertmanager.enabled .Values.alertmanager.ingress.enabled }}
-{{- $serviceName := printf "%s-%s" (include "prometheus-operator.fullname" .) "alertmanager" }}
-{{- $servicePort := .Values.alertmanager.service.port -}}
+{{- $pathType := .Values.alertmanager.ingress.pathType | default "ImplementationSpecific" }}
+{{- $serviceName := printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "alertmanager" }}
+{{- $backendServiceName := .Values.alertmanager.ingress.serviceName | default (printf "%s-%s" (include "kube-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 -}}
-{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }}
-apiVersion: networking.k8s.io/v1beta1
-{{ else }}
-apiVersion: extensions/v1beta1
-{{ end -}}
+{{- $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: {{ $.Release.Namespace }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
{{- if .Values.alertmanager.ingress.annotations }}
annotations:
{{ toYaml .Values.alertmanager.ingress.annotations | indent 4 }}
{{- end }}
labels:
- app: {{ template "prometheus-operator.name" . }}-alertmanager
+ app: {{ template "kube-prometheus-stack.name" . }}-alertmanager
{{- if .Values.alertmanager.ingress.labels }}
{{ toYaml .Values.alertmanager.ingress.labels | indent 4 }}
{{- end }}
-{{ include "prometheus-operator.labels" . | indent 4 }}
+{{ include "kube-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 }}
@@ -31,23 +36,43 @@ spec:
paths:
{{- range $p := $paths }}
- path: {{ tpl $p $ }}
+ {{- if and $pathType $ingressSupportsPathType }}
+ pathType: {{ $pathType }}
+ {{- end }}
backend:
- serviceName: {{ $serviceName }}
+ {{- if $apiIsStable }}
+ service:
+ name: {{ $backendServiceName }}
+ port:
+ number: {{ $servicePort }}
+ {{- else }}
+ serviceName: {{ $backendServiceName }}
servicePort: {{ $servicePort }}
- {{- end -}}
+ {{- end }}
+ {{- end -}}
{{- end -}}
{{- else }}
- http:
paths:
{{- range $p := $paths }}
- path: {{ tpl $p $ }}
+ {{- if and $pathType $ingressSupportsPathType }}
+ pathType: {{ $pathType }}
+ {{- end }}
backend:
- serviceName: {{ $serviceName }}
+ {{- if $apiIsStable }}
+ service:
+ name: {{ $backendServiceName }}
+ port:
+ number: {{ $servicePort }}
+ {{- else }}
+ serviceName: {{ $backendServiceName }}
servicePort: {{ $servicePort }}
+ {{- end }}
{{- end -}}
{{- end -}}
{{- if .Values.alertmanager.ingress.tls }}
tls:
-{{ toYaml .Values.alertmanager.ingress.tls | indent 4 }}
+{{ tpl (toYaml .Values.alertmanager.ingress.tls | indent 4) . }}
{{- end -}}
{{- end -}}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/ingressperreplica.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/ingressperreplica.yaml
old mode 100755
new mode 100644
index 6755ca1fc9..f21bf96169
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/ingressperreplica.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/ingressperreplica.yaml
@@ -1,43 +1,57 @@
{{- if and .Values.alertmanager.enabled .Values.alertmanager.servicePerReplica.enabled .Values.alertmanager.ingressPerReplica.enabled }}
+{{- $pathType := .Values.alertmanager.ingressPerReplica.pathType | default "" }}
{{- $count := .Values.alertmanager.alertmanagerSpec.replicas | int -}}
{{- $servicePort := .Values.alertmanager.service.port -}}
{{- $ingressValues := .Values.alertmanager.ingressPerReplica -}}
+{{- $apiIsStable := eq (include "kube-prometheus-stack.ingress.isStable" .) "true" -}}
+{{- $ingressSupportsPathType := eq (include "kube-prometheus-stack.ingress.supportsPathType" .) "true" -}}
apiVersion: v1
kind: List
metadata:
- name: {{ include "prometheus-operator.fullname" $ }}-alertmanager-ingressperreplica
- namespace: {{ $.Release.Namespace }}
+ name: {{ include "kube-prometheus-stack.fullname" $ }}-alertmanager-ingressperreplica
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
items:
{{ range $i, $e := until $count }}
- kind: Ingress
- {{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }}
- apiVersion: networking.k8s.io/v1beta1
- {{ else }}
- apiVersion: extensions/v1beta1
- {{ end -}}
+ apiVersion: {{ include "kube-prometheus-stack.ingress.apiVersion" $ }}
metadata:
- name: {{ include "prometheus-operator.fullname" $ }}-alertmanager-{{ $i }}
- namespace: {{ $.Release.Namespace }}
+ name: {{ include "kube-prometheus-stack.fullname" $ }}-alertmanager-{{ $i }}
+ namespace: {{ template "kube-prometheus-stack.namespace" $ }}
labels:
- app: {{ include "prometheus-operator.name" $ }}-alertmanager
-{{ include "prometheus-operator.labels" $ | indent 8 }}
+ app: {{ include "kube-prometheus-stack.name" $ }}-alertmanager
+ {{ include "kube-prometheus-stack.labels" $ | indent 8 }}
{{- if $ingressValues.labels }}
- {{ toYaml $ingressValues.labels | indent 8 }}
+{{ toYaml $ingressValues.labels | indent 8 }}
{{- end }}
{{- if $ingressValues.annotations }}
annotations:
{{ toYaml $ingressValues.annotations | indent 8 }}
{{- end }}
spec:
+ {{- if $apiIsStable }}
+ {{- if $ingressValues.ingressClassName }}
+ ingressClassName: {{ $ingressValues.ingressClassName }}
+ {{- end }}
+ {{- end }}
rules:
- host: {{ $ingressValues.hostPrefix }}-{{ $i }}.{{ $ingressValues.hostDomain }}
http:
paths:
{{- range $p := $ingressValues.paths }}
- path: {{ tpl $p $ }}
+ {{- if and $pathType $ingressSupportsPathType }}
+ pathType: {{ $pathType }}
+ {{- end }}
backend:
- serviceName: {{ include "prometheus-operator.fullname" $ }}-alertmanager-{{ $i }}
+ {{- if $apiIsStable }}
+ service:
+ name: {{ include "kube-prometheus-stack.fullname" $ }}-alertmanager-{{ $i }}
+ port:
+ number: {{ $servicePort }}
+ {{- else }}
+ serviceName: {{ include "kube-prometheus-stack.fullname" $ }}-alertmanager-{{ $i }}
servicePort: {{ $servicePort }}
+ {{- end }}
{{- end -}}
{{- if or $ingressValues.tlsSecretName $ingressValues.tlsSecretPerReplica.enabled }}
tls:
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/podDisruptionBudget.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/podDisruptionBudget.yaml
old mode 100755
new mode 100644
index 6cf4d166bc..b183403125
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/podDisruptionBudget.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/podDisruptionBudget.yaml
@@ -1,12 +1,12 @@
{{- if and .Values.alertmanager.enabled .Values.alertmanager.podDisruptionBudget.enabled }}
-apiVersion: policy/v1beta1
+apiVersion: {{ include "kube-prometheus-stack.pdb.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-alertmanager
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-alertmanager
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}-alertmanager
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}-alertmanager
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
spec:
{{- if .Values.alertmanager.podDisruptionBudget.minAvailable }}
minAvailable: {{ .Values.alertmanager.podDisruptionBudget.minAvailable }}
@@ -16,6 +16,6 @@ spec:
{{- end }}
selector:
matchLabels:
- app: alertmanager
- alertmanager: {{ template "prometheus-operator.fullname" . }}-alertmanager
+ app.kubernetes.io/name: alertmanager
+ alertmanager: {{ template "kube-prometheus-stack.alertmanager.crname" . }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/psp-clusterrole.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/psp-clusterrole.yaml
deleted file mode 100755
index e83d8bc732..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/psp-clusterrole.yaml
+++ /dev/null
@@ -1,15 +0,0 @@
-{{- if and .Values.alertmanager.enabled .Values.global.rbac.create .Values.global.rbac.pspEnabled }}
-kind: ClusterRole
-apiVersion: rbac.authorization.k8s.io/v1
-metadata:
- name: {{ template "prometheus-operator.fullname" . }}-alertmanager
- labels:
- app: {{ template "prometheus-operator.name" . }}-alertmanager
-{{ include "prometheus-operator.labels" . | indent 4 }}
-rules:
-- apiGroups: ['extensions']
- resources: ['podsecuritypolicies']
- verbs: ['use']
- resourceNames:
- - {{ template "prometheus-operator.fullname" . }}-alertmanager
-{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/psp-clusterrolebinding.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/psp-clusterrolebinding.yaml
deleted file mode 100755
index eb13a3801f..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/psp-clusterrolebinding.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
-{{- if and .Values.alertmanager.enabled .Values.global.rbac.create .Values.global.rbac.pspEnabled }}
-apiVersion: rbac.authorization.k8s.io/v1
-kind: ClusterRoleBinding
-metadata:
- name: {{ template "prometheus-operator.fullname" . }}-alertmanager
- labels:
- app: {{ template "prometheus-operator.name" . }}-alertmanager
-{{ include "prometheus-operator.labels" . | indent 4 }}
-roleRef:
- apiGroup: rbac.authorization.k8s.io
- kind: ClusterRole
- name: {{ template "prometheus-operator.fullname" . }}-alertmanager
-subjects:
- - kind: ServiceAccount
- name: {{ template "prometheus-operator.alertmanager.serviceAccountName" . }}
- namespace: {{ $.Release.Namespace }}
-{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/psp-role.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/psp-role.yaml
old mode 100755
new mode 100644
index 6d863660cb..e8da52e0f4
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/psp-role.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/psp-role.yaml
@@ -1,12 +1,13 @@
{{- if and .Values.alertmanager.enabled .Values.global.rbac.create .Values.global.rbac.pspEnabled }}
+{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-alertmanager
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-alertmanager
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}-alertmanager
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}-alertmanager
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
rules:
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
{{- if semverCompare "> 1.15.0-0" $kubeTargetVersion }}
@@ -17,5 +18,6 @@ rules:
resources: ['podsecuritypolicies']
verbs: ['use']
resourceNames:
- - {{ template "prometheus-operator.fullname" . }}-alertmanager
+ - {{ template "kube-prometheus-stack.fullname" . }}-alertmanager
+{{- end }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/psp-rolebinding.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/psp-rolebinding.yaml
old mode 100755
new mode 100644
index bce7349cec..71a8ec41dc
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/psp-rolebinding.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/psp-rolebinding.yaml
@@ -1,18 +1,20 @@
{{- if and .Values.alertmanager.enabled .Values.global.rbac.create .Values.global.rbac.pspEnabled }}
+{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-alertmanager
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-alertmanager
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}-alertmanager
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}-alertmanager
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
- name: {{ template "prometheus-operator.fullname" . }}-alertmanager
+ name: {{ template "kube-prometheus-stack.fullname" . }}-alertmanager
subjects:
- kind: ServiceAccount
- name: {{ template "prometheus-operator.alertmanager.serviceAccountName" . }}
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.alertmanager.serviceAccountName" . }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
+{{- end }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/psp.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/psp.yaml
old mode 100755
new mode 100644
index cbc0bb8567..5a940afab6
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/psp.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/psp.yaml
@@ -1,24 +1,18 @@
{{- if and .Values.alertmanager.enabled .Values.global.rbac.create .Values.global.rbac.pspEnabled }}
+{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-alertmanager
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-alertmanager
labels:
- app: {{ template "prometheus-operator.name" . }}-alertmanager
+ app: {{ template "kube-prometheus-stack.name" . }}-alertmanager
{{- if .Values.global.rbac.pspAnnotations }}
annotations:
{{ toYaml .Values.global.rbac.pspAnnotations | indent 4 }}
{{- end }}
-{{ include "prometheus-operator.labels" . | indent 4 }}
+{{ 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'
@@ -39,15 +33,15 @@ 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
{{- end }}
-
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/secret.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/secret.yaml
old mode 100755
new mode 100644
index 86905530f7..c3549f89b6
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/secret.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/secret.yaml
@@ -2,21 +2,27 @@
apiVersion: v1
kind: Secret
metadata:
- name: alertmanager-{{ template "prometheus-operator.fullname" . }}-alertmanager
- namespace: {{ $.Release.Namespace }}
+ name: alertmanager-{{ template "kube-prometheus-stack.alertmanager.crname" . }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
{{- if .Values.alertmanager.secret.annotations }}
annotations:
{{ toYaml .Values.alertmanager.secret.annotations | indent 4 }}
{{- end }}
labels:
- app: {{ template "prometheus-operator.name" . }}-alertmanager
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}-alertmanager
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
data:
{{- if .Values.alertmanager.tplConfig }}
+{{- if .Values.alertmanager.stringConfig }}
+ alertmanager.yaml: {{ tpl (.Values.alertmanager.stringConfig) . | b64enc | quote }}
+{{- else 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}}
+{{- end }}
{{- range $key, $val := .Values.alertmanager.templateFiles }}
{{ $key }}: {{ $val | b64enc | quote }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/service.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/service.yaml
old mode 100755
new mode 100644
index 8313ec9ee7..f772ec6289
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/service.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/service.yaml
@@ -1,13 +1,14 @@
+{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
{{- if .Values.alertmanager.enabled }}
apiVersion: v1
kind: Service
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-alertmanager
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-alertmanager
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}-alertmanager
+ app: {{ template "kube-prometheus-stack.name" . }}-alertmanager
self-monitor: {{ .Values.alertmanager.serviceMonitor.selfMonitor | quote }}
-{{ include "prometheus-operator.labels" . | indent 4 }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
{{- if .Values.alertmanager.service.labels }}
{{ toYaml .Values.alertmanager.service.labels | indent 4 }}
{{- end }}
@@ -31,17 +32,32 @@ spec:
{{- 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 }}
+ - 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
+ - name: reloader-web
+ {{- if semverCompare ">=1.20.0-0" $kubeTargetVersion }}
+ appProtocol: http
{{- end }}
- port: {{ .Values.alertmanager.service.port }}
- targetPort: {{ .Values.alertmanager.service.targetPort }}
- protocol: TCP
+ port: 8080
+ targetPort: reloader-web
+{{- if .Values.alertmanager.service.additionalPorts }}
+{{ toYaml .Values.alertmanager.service.additionalPorts | indent 2 }}
+{{- end }}
selector:
- app: alertmanager
- alertmanager: {{ template "prometheus-operator.fullname" . }}-alertmanager
+ app.kubernetes.io/name: alertmanager
+ alertmanager: {{ template "kube-prometheus-stack.alertmanager.crname" . }}
+{{- if .Values.alertmanager.service.sessionAffinity }}
+ sessionAffinity: {{ .Values.alertmanager.service.sessionAffinity }}
+{{- end }}
type: "{{ .Values.alertmanager.service.type }}"
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/serviceaccount.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/serviceaccount.yaml
old mode 100755
new mode 100644
index d0fe2d61af..745ced8bde
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/serviceaccount.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/serviceaccount.yaml
@@ -2,11 +2,20 @@
apiVersion: v1
kind: ServiceAccount
metadata:
- name: {{ template "prometheus-operator.alertmanager.serviceAccountName" . }}
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.alertmanager.serviceAccountName" . }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}-alertmanager
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}-alertmanager
+ app.kubernetes.io/name: {{ template "kube-prometheus-stack.name" . }}-alertmanager
+ app.kubernetes.io/component: alertmanager
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
+{{- if .Values.alertmanager.serviceAccount.annotations }}
+ annotations:
+{{ toYaml .Values.alertmanager.serviceAccount.annotations | indent 4 }}
+{{- end }}
+automountServiceAccountToken: {{ .Values.alertmanager.serviceAccount.automountServiceAccountToken }}
+{{- if .Values.global.imagePullSecrets }}
imagePullSecrets:
-{{ toYaml .Values.global.imagePullSecrets | indent 2 }}
+{{ include "kube-prometheus-stack.imagePullSecrets" . | trim | indent 2}}
+{{- end }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/servicemonitor.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/servicemonitor.yaml
old mode 100755
new mode 100644
index c3b628aeab..564f70466f
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/servicemonitor.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/servicemonitor.yaml
@@ -2,32 +2,95 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-alertmanager
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-alertmanager
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}-alertmanager
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}-alertmanager
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
+{{- with .Values.alertmanager.serviceMonitor.additionalLabels }}
+{{- toYaml . | nindent 4 }}
+{{- end }}
spec:
+ {{- include "servicemonitor.scrapeLimits" .Values.alertmanager.serviceMonitor | nindent 2 }}
selector:
matchLabels:
- app: {{ template "prometheus-operator.name" . }}-alertmanager
+ app: {{ template "kube-prometheus-stack.name" . }}-alertmanager
release: {{ $.Release.Name | quote }}
self-monitor: "true"
namespaceSelector:
matchNames:
- - {{ $.Release.Namespace | quote }}
+ - {{ printf "%s" (include "kube-prometheus-stack.namespace" .) | quote }}
endpoints:
- port: {{ .Values.alertmanager.alertmanagerSpec.portName }}
+ enableHttp2: {{ .Values.alertmanager.serviceMonitor.enableHttp2 }}
{{- 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 }}
+ {{- if .Values.alertmanager.serviceMonitor.metricRelabelings }}
+ metricRelabelings: {{- tpl (toYaml .Values.alertmanager.serviceMonitor.metricRelabelings | nindent 6) . }}
+ {{- end }}
+ {{- if .Values.alertmanager.serviceMonitor.relabelings }}
+ relabelings: {{- toYaml .Values.alertmanager.serviceMonitor.relabelings | nindent 6 }}
+ {{- end }}
+ - port: reloader-web
+ {{- 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: "/metrics"
+ {{- if .Values.alertmanager.serviceMonitor.metricRelabelings }}
+ metricRelabelings: {{- tpl (toYaml .Values.alertmanager.serviceMonitor.metricRelabelings | nindent 6) . }}
+ {{- end }}
+ {{- if .Values.alertmanager.serviceMonitor.relabelings }}
+ relabelings: {{- toYaml .Values.alertmanager.serviceMonitor.relabelings | nindent 6 }}
+ {{- end }}
+ {{- range .Values.alertmanager.serviceMonitor.additionalEndpoints }}
+ - port: {{ .port }}
+ {{- if or $.Values.alertmanager.serviceMonitor.interval .interval }}
+ interval: {{ default $.Values.alertmanager.serviceMonitor.interval .interval }}
+ {{- end }}
+ {{- if or $.Values.alertmanager.serviceMonitor.proxyUrl .proxyUrl }}
+ proxyUrl: {{ default $.Values.alertmanager.serviceMonitor.proxyUrl .proxyUrl }}
+ {{- end }}
+ {{- if or $.Values.alertmanager.serviceMonitor.scheme .scheme }}
+ scheme: {{ default $.Values.alertmanager.serviceMonitor.scheme .scheme }}
+ {{- end }}
+ {{- if or $.Values.alertmanager.serviceMonitor.bearerTokenFile .bearerTokenFile }}
+ bearerTokenFile: {{ default $.Values.alertmanager.serviceMonitor.bearerTokenFile .bearerTokenFile }}
+ {{- end }}
+ {{- if or $.Values.alertmanager.serviceMonitor.tlsConfig .tlsConfig }}
+ tlsConfig: {{- default $.Values.alertmanager.serviceMonitor.tlsConfig .tlsConfig | toYaml | nindent 6 }}
+ {{- end }}
+ path: {{ .path }}
+ {{- if or $.Values.alertmanager.serviceMonitor.metricRelabelings .metricRelabelings }}
+ metricRelabelings: {{- tpl (default $.Values.alertmanager.serviceMonitor.metricRelabelings .metricRelabelings | toYaml | nindent 6) . }}
+ {{- end }}
+ {{- if or $.Values.alertmanager.serviceMonitor.relabelings .relabelings }}
+ relabelings: {{- default $.Values.alertmanager.serviceMonitor.relabelings .relabelings | toYaml | nindent 6 }}
+ {{- end }}
+ {{- end }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/serviceperreplica.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/serviceperreplica.yaml
old mode 100755
new mode 100644
index 838d6a24be..75a13bdf97
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/serviceperreplica.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/serviceperreplica.yaml
@@ -4,18 +4,18 @@
apiVersion: v1
kind: List
metadata:
- name: {{ include "prometheus-operator.fullname" $ }}-alertmanager-serviceperreplica
- namespace: {{ $.Release.Namespace }}
+ name: {{ include "kube-prometheus-stack.fullname" $ }}-alertmanager-serviceperreplica
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
items:
{{- range $i, $e := until $count }}
- apiVersion: v1
kind: Service
metadata:
- name: {{ include "prometheus-operator.fullname" $ }}-alertmanager-{{ $i }}
- namespace: {{ $.Release.Namespace }}
+ name: {{ include "kube-prometheus-stack.fullname" $ }}-alertmanager-{{ $i }}
+ namespace: {{ template "kube-prometheus-stack.namespace" $ }}
labels:
- app: {{ include "prometheus-operator.name" $ }}-alertmanager
-{{ include "prometheus-operator.labels" $ | indent 8 }}
+ app: {{ include "kube-prometheus-stack.name" $ }}-alertmanager
+{{ include "kube-prometheus-stack.labels" $ | indent 8 }}
{{- if $serviceValues.annotations }}
annotations:
{{ toYaml $serviceValues.annotations | indent 8 }}
@@ -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 "prometheus-operator.fullname" $ }}-alertmanager
- statefulset.kubernetes.io/pod-name: alertmanager-{{ include "prometheus-operator.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/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/core-dns/service.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/core-dns/service.yaml
old mode 100755
new mode 100644
index 707e5ca328..49fbc673ee
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/core-dns/service.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/core-dns/service.yaml
@@ -1,12 +1,12 @@
-{{- if .Values.coreDns.enabled }}
+{{- if and .Values.coreDns.enabled .Values.kubernetesServiceMonitors.enabled }}
apiVersion: v1
kind: Service
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-coredns
+ name: {{ template "kube-prometheus-stack.fullname" . }}-coredns
labels:
- app: {{ template "prometheus-operator.name" . }}-coredns
+ app: {{ template "kube-prometheus-stack.name" . }}-coredns
jobLabel: coredns
-{{ include "prometheus-operator.labels" . | indent 4 }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
namespace: kube-system
spec:
clusterIP: None
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/core-dns/servicemonitor.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/core-dns/servicemonitor.yaml
old mode 100755
new mode 100644
index 4dd430ca80..5447fde4c5
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/core-dns/servicemonitor.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/core-dns/servicemonitor.yaml
@@ -1,17 +1,21 @@
-{{- if .Values.coreDns.enabled }}
+{{- if and .Values.coreDns.enabled .Values.kubernetesServiceMonitors.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-coredns
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-coredns
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}-coredns
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ 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
+ {{- include "servicemonitor.scrapeLimits" .Values.coreDns.serviceMonitor | nindent 2 }}
selector:
matchLabels:
- app: {{ template "prometheus-operator.name" . }}-coredns
+ app: {{ template "kube-prometheus-stack.name" . }}-coredns
release: {{ $.Release.Name | quote }}
namespaceSelector:
matchNames:
@@ -21,6 +25,9 @@ spec:
{{- if .Values.coreDns.serviceMonitor.interval}}
interval: {{ .Values.coreDns.serviceMonitor.interval }}
{{- end }}
+ {{- if .Values.coreDns.serviceMonitor.proxyUrl }}
+ proxyUrl: {{ .Values.coreDns.serviceMonitor.proxyUrl}}
+ {{- end }}
bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
{{- if .Values.coreDns.serviceMonitor.metricRelabelings }}
metricRelabelings:
@@ -28,6 +35,6 @@ spec:
{{- end }}
{{- if .Values.coreDns.serviceMonitor.relabelings }}
relabelings:
-{{ toYaml .Values.coreDns.serviceMonitor.relabelings | indent 4 }}
+{{ tpl (toYaml .Values.coreDns.serviceMonitor.relabelings | indent 4) . }}
{{- end }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-api-server/servicemonitor.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-api-server/servicemonitor.yaml
old mode 100755
new mode 100644
index 401dd9e36e..9ae03e5b0f
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-api-server/servicemonitor.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-api-server/servicemonitor.yaml
@@ -1,27 +1,34 @@
-{{- if .Values.kubeApiServer.enabled }}
+{{- if and .Values.kubeApiServer.enabled .Values.kubernetesServiceMonitors.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-apiserver
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-apiserver
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}-apiserver
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}-apiserver
+ {{- with .Values.kubeApiServer.serviceMonitor.additionalLabels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
spec:
+ {{- include "servicemonitor.scrapeLimits" .Values.kubeApiServer.serviceMonitor | nindent 2 }}
endpoints:
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
{{- if .Values.kubeApiServer.serviceMonitor.interval }}
interval: {{ .Values.kubeApiServer.serviceMonitor.interval }}
{{- end }}
+ {{- if .Values.kubeApiServer.serviceMonitor.proxyUrl }}
+ proxyUrl: {{ .Values.kubeApiServer.serviceMonitor.proxyUrl }}
+ {{- end }}
port: https
scheme: https
{{- if .Values.kubeApiServer.serviceMonitor.metricRelabelings }}
metricRelabelings:
{{ tpl (toYaml .Values.kubeApiServer.serviceMonitor.metricRelabelings | indent 6) . }}
{{- end }}
-{{- if .Values.kubeApiServer.relabelings }}
+{{- if .Values.kubeApiServer.serviceMonitor.relabelings }}
relabelings:
-{{ toYaml .Values.kubeApiServer.relabelings | indent 6 }}
+{{ tpl (toYaml .Values.kubeApiServer.serviceMonitor.relabelings | indent 6) . }}
{{- end }}
tlsConfig:
caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-controller-manager/endpoints.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-controller-manager/endpoints.yaml
old mode 100755
new mode 100644
index 205364fc3e..43094d6a63
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-controller-manager/endpoints.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-controller-manager/endpoints.yaml
@@ -1,13 +1,13 @@
-{{- if and .Values.kubeControllerManager.enabled .Values.kubeControllerManager.endpoints }}
+{{- if and .Values.kubeControllerManager.enabled .Values.kubeControllerManager.endpoints .Values.kubernetesServiceMonitors.enabled }}
apiVersion: v1
kind: Endpoints
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-kube-controller-manager
+ name: {{ template "kube-prometheus-stack.fullname" . }}-kube-controller-manager
labels:
- app: {{ template "prometheus-operator.name" . }}-kube-controller-manager
+ app: {{ template "kube-prometheus-stack.name" . }}-kube-controller-manager
k8s-app: kube-controller-manager
-{{ include "prometheus-operator.labels" . | indent 4 }}
- namespace: kube-system
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
+ 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/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-controller-manager/service.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-controller-manager/service.yaml
old mode 100755
new mode 100644
index 70458fdae4..894c983e10
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-controller-manager/service.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-controller-manager/service.yaml
@@ -1,20 +1,22 @@
-{{- if .Values.kubeControllerManager.enabled }}
+{{- if and .Values.kubeControllerManager.enabled .Values.kubeControllerManager.service.enabled .Values.kubernetesServiceMonitors.enabled }}
apiVersion: v1
kind: Service
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-kube-controller-manager
+ name: {{ template "kube-prometheus-stack.fullname" . }}-kube-controller-manager
labels:
- app: {{ template "prometheus-operator.name" . }}-kube-controller-manager
+ app: {{ template "kube-prometheus-stack.name" . }}-kube-controller-manager
jobLabel: kube-controller-manager
-{{ include "prometheus-operator.labels" . | indent 4 }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
namespace: kube-system
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/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-controller-manager/servicemonitor.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-controller-manager/servicemonitor.yaml
old mode 100755
new mode 100644
index 52a344df62..4c30636a65
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-controller-manager/servicemonitor.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-controller-manager/servicemonitor.yaml
@@ -1,17 +1,21 @@
-{{- if .Values.kubeControllerManager.enabled }}
+{{- if and .Values.kubeControllerManager.enabled .Values.kubeControllerManager.serviceMonitor.enabled .Values.kubernetesServiceMonitors.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-kube-controller-manager
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-kube-controller-manager
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}-kube-controller-manager
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ 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
+ {{- include "servicemonitor.scrapeLimits" .Values.kubeControllerManager.serviceMonitor | nindent 2 }}
selector:
matchLabels:
- app: {{ template "prometheus-operator.name" . }}-kube-controller-manager
+ app: {{ template "kube-prometheus-stack.name" . }}-kube-controller-manager
release: {{ $.Release.Name | quote }}
namespaceSelector:
matchNames:
@@ -22,12 +26,15 @@ spec:
interval: {{ .Values.kubeControllerManager.serviceMonitor.interval }}
{{- end }}
bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
- {{- if .Values.kubeControllerManager.serviceMonitor.https }}
+ {{- if .Values.kubeControllerManager.serviceMonitor.proxyUrl }}
+ proxyUrl: {{ .Values.kubeControllerManager.serviceMonitor.proxyUrl}}
+ {{- end }}
+ {{- 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 }}
@@ -39,6 +46,6 @@ spec:
{{- end }}
{{- if .Values.kubeControllerManager.serviceMonitor.relabelings }}
relabelings:
-{{ toYaml .Values.kubeControllerManager.serviceMonitor.relabelings | indent 4 }}
+{{ tpl (toYaml .Values.kubeControllerManager.serviceMonitor.relabelings | indent 4) . }}
{{- end }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-dns/service.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-dns/service.yaml
old mode 100755
new mode 100644
index 84ffb9685b..81b2c9930c
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-dns/service.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-dns/service.yaml
@@ -1,12 +1,12 @@
-{{- if .Values.kubeDns.enabled }}
+{{- if and .Values.kubeDns.enabled .Values.kubernetesServiceMonitors.enabled }}
apiVersion: v1
kind: Service
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-kube-dns
+ name: {{ template "kube-prometheus-stack.fullname" . }}-kube-dns
labels:
- app: {{ template "prometheus-operator.name" . }}-kube-dns
+ app: {{ template "kube-prometheus-stack.name" . }}-kube-dns
jobLabel: kube-dns
-{{ include "prometheus-operator.labels" . | indent 4 }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
namespace: kube-system
spec:
clusterIP: None
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-dns/servicemonitor.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-dns/servicemonitor.yaml
old mode 100755
new mode 100644
index 8d22f8586c..ffb5d04c31
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-dns/servicemonitor.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-dns/servicemonitor.yaml
@@ -1,17 +1,21 @@
-{{- if .Values.kubeDns.enabled }}
+{{- if and .Values.kubeDns.enabled .Values.kubernetesServiceMonitors.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-kube-dns
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-kube-dns
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}-kube-dns
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ 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
+ {{- include "servicemonitor.scrapeLimits" .Values.kubeDns.serviceMonitor | nindent 2 }}
selector:
matchLabels:
- app: {{ template "prometheus-operator.name" . }}-kube-dns
+ app: {{ template "kube-prometheus-stack.name" . }}-kube-dns
release: {{ $.Release.Name | quote }}
namespaceSelector:
matchNames:
@@ -22,6 +26,9 @@ spec:
interval: {{ .Values.kubeDns.serviceMonitor.interval }}
{{- end }}
bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
+ {{- if .Values.kubeDns.serviceMonitor.proxyUrl }}
+ proxyUrl: {{ .Values.kubeDns.serviceMonitor.proxyUrl}}
+ {{- end }}
{{- if .Values.kubeDns.serviceMonitor.dnsmasqMetricRelabelings }}
metricRelabelings:
{{ tpl (toYaml .Values.kubeDns.serviceMonitor.dnsmasqMetricRelabelings | indent 4) . }}
@@ -41,6 +48,6 @@ spec:
{{- end }}
{{- if .Values.kubeDns.serviceMonitor.relabelings }}
relabelings:
-{{ toYaml .Values.kubeDns.serviceMonitor.relabelings | indent 4 }}
+{{ tpl (toYaml .Values.kubeDns.serviceMonitor.relabelings | indent 4) . }}
{{- end }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-etcd/endpoints.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-etcd/endpoints.yaml
old mode 100755
new mode 100644
index ee603de76f..babbd3efc7
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-etcd/endpoints.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-etcd/endpoints.yaml
@@ -1,12 +1,12 @@
-{{- if and .Values.kubeEtcd.enabled .Values.kubeEtcd.endpoints }}
+{{- if and .Values.kubeEtcd.enabled .Values.kubeEtcd.endpoints .Values.kubernetesServiceMonitors.enabled }}
apiVersion: v1
kind: Endpoints
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-kube-etcd
+ name: {{ template "kube-prometheus-stack.fullname" . }}-kube-etcd
labels:
- app: {{ template "prometheus-operator.name" . }}-kube-etcd
+ app: {{ template "kube-prometheus-stack.name" . }}-kube-etcd
k8s-app: etcd-server
-{{ include "prometheus-operator.labels" . | indent 4 }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
namespace: kube-system
subsets:
- addresses:
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-etcd/service.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-etcd/service.yaml
old mode 100755
new mode 100644
index af9e8cae40..eb519e623a
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-etcd/service.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-etcd/service.yaml
@@ -1,12 +1,12 @@
-{{- if .Values.kubeEtcd.enabled }}
+{{- if and .Values.kubeEtcd.enabled .Values.kubeEtcd.service.enabled .Values.kubernetesServiceMonitors.enabled }}
apiVersion: v1
kind: Service
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-kube-etcd
+ name: {{ template "kube-prometheus-stack.fullname" . }}-kube-etcd
labels:
- app: {{ template "prometheus-operator.name" . }}-kube-etcd
+ app: {{ template "kube-prometheus-stack.name" . }}-kube-etcd
jobLabel: kube-etcd
-{{ include "prometheus-operator.labels" . | indent 4 }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
namespace: kube-system
spec:
clusterIP: None
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-etcd/servicemonitor.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-etcd/servicemonitor.yaml
old mode 100755
new mode 100644
index 53221a1eab..2336753ea0
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-etcd/servicemonitor.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-etcd/servicemonitor.yaml
@@ -1,17 +1,21 @@
-{{- if .Values.kubeEtcd.enabled }}
+{{- if and .Values.kubeEtcd.enabled .Values.kubeEtcd.serviceMonitor.enabled .Values.kubernetesServiceMonitors.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-kube-etcd
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-kube-etcd
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}-kube-etcd
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ 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
+ {{- include "servicemonitor.scrapeLimits" .Values.kubeEtcd.serviceMonitor | nindent 4 }}
selector:
matchLabels:
- app: {{ template "prometheus-operator.name" . }}-kube-etcd
+ app: {{ template "kube-prometheus-stack.name" . }}-kube-etcd
release: {{ $.Release.Name | quote }}
namespaceSelector:
matchNames:
@@ -22,6 +26,9 @@ spec:
interval: {{ .Values.kubeEtcd.serviceMonitor.interval }}
{{- end }}
bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
+ {{- if .Values.kubeEtcd.serviceMonitor.proxyUrl }}
+ proxyUrl: {{ .Values.kubeEtcd.serviceMonitor.proxyUrl}}
+ {{- end }}
{{- if eq .Values.kubeEtcd.serviceMonitor.scheme "https" }}
scheme: https
tlsConfig:
@@ -45,6 +52,6 @@ spec:
{{- end }}
{{- if .Values.kubeEtcd.serviceMonitor.relabelings }}
relabelings:
-{{ toYaml .Values.kubeEtcd.serviceMonitor.relabelings | indent 4 }}
+{{ tpl (toYaml .Values.kubeEtcd.serviceMonitor.relabelings | indent 4) . }}
{{- end }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-proxy/endpoints.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-proxy/endpoints.yaml
old mode 100755
new mode 100644
index 3a71c397e6..8e7c0618c5
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-proxy/endpoints.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-proxy/endpoints.yaml
@@ -1,12 +1,12 @@
-{{- if and .Values.kubeProxy.enabled .Values.kubeProxy.endpoints }}
+{{- if and .Values.kubeProxy.enabled .Values.kubeProxy.endpoints .Values.kubernetesServiceMonitors.enabled }}
apiVersion: v1
kind: Endpoints
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-kube-proxy
+ name: {{ template "kube-prometheus-stack.fullname" . }}-kube-proxy
labels:
- app: {{ template "prometheus-operator.name" . }}-kube-proxy
+ app: {{ template "kube-prometheus-stack.name" . }}-kube-proxy
k8s-app: kube-proxy
-{{ include "prometheus-operator.labels" . | indent 4 }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
namespace: kube-system
subsets:
- addresses:
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-proxy/service.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-proxy/service.yaml
old mode 100755
new mode 100644
index b111752378..03aa62b13e
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-proxy/service.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-proxy/service.yaml
@@ -1,12 +1,12 @@
-{{- if .Values.kubeProxy.enabled }}
+{{- if and .Values.kubeProxy.enabled .Values.kubeProxy.service.enabled .Values.kubernetesServiceMonitors.enabled }}
apiVersion: v1
kind: Service
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-kube-proxy
+ name: {{ template "kube-prometheus-stack.fullname" . }}-kube-proxy
labels:
- app: {{ template "prometheus-operator.name" . }}-kube-proxy
+ app: {{ template "kube-prometheus-stack.name" . }}-kube-proxy
jobLabel: kube-proxy
-{{ include "prometheus-operator.labels" . | indent 4 }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
namespace: kube-system
spec:
clusterIP: None
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-proxy/servicemonitor.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-proxy/servicemonitor.yaml
old mode 100755
new mode 100644
index 7e0db18cfd..33a30ee71b
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-proxy/servicemonitor.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-proxy/servicemonitor.yaml
@@ -1,17 +1,21 @@
-{{- if .Values.kubeProxy.enabled }}
+{{- if and .Values.kubeProxy.enabled .Values.kubeProxy.serviceMonitor.enabled .Values.kubernetesServiceMonitors.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-kube-proxy
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-kube-proxy
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}-kube-proxy
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ 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
+ {{- include "servicemonitor.scrapeLimits" .Values.kubeProxy.serviceMonitor | nindent 2 }}
selector:
matchLabels:
- app: {{ template "prometheus-operator.name" . }}-kube-proxy
+ app: {{ template "kube-prometheus-stack.name" . }}-kube-proxy
release: {{ $.Release.Name | quote }}
namespaceSelector:
matchNames:
@@ -22,6 +26,9 @@ spec:
interval: {{ .Values.kubeProxy.serviceMonitor.interval }}
{{- end }}
bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
+ {{- if .Values.kubeProxy.serviceMonitor.proxyUrl }}
+ proxyUrl: {{ .Values.kubeProxy.serviceMonitor.proxyUrl}}
+ {{- end }}
{{- if .Values.kubeProxy.serviceMonitor.https }}
scheme: https
tlsConfig:
@@ -29,10 +36,10 @@ spec:
{{- end}}
{{- if .Values.kubeProxy.serviceMonitor.metricRelabelings }}
metricRelabelings:
-{{ toYaml .Values.kubeProxy.serviceMonitor.metricRelabelings | indent 4 }}
+{{ tpl (toYaml .Values.kubeProxy.serviceMonitor.metricRelabelings | indent 4) . }}
{{- end }}
{{- if .Values.kubeProxy.serviceMonitor.relabelings }}
relabelings:
-{{ toYaml .Values.kubeProxy.serviceMonitor.relabelings | indent 4 }}
+{{ tpl (toYaml .Values.kubeProxy.serviceMonitor.relabelings | indent 4) . }}
{{- end }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-scheduler/endpoints.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-scheduler/endpoints.yaml
old mode 100755
new mode 100644
index 2c0c327f60..3b93dc2936
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-scheduler/endpoints.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-scheduler/endpoints.yaml
@@ -1,12 +1,12 @@
-{{- if and .Values.kubeScheduler.enabled .Values.kubeScheduler.endpoints }}
+{{- if and .Values.kubeScheduler.enabled .Values.kubeScheduler.endpoints .Values.kubernetesServiceMonitors.enabled }}
apiVersion: v1
kind: Endpoints
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-kube-scheduler
+ name: {{ template "kube-prometheus-stack.fullname" . }}-kube-scheduler
labels:
- app: {{ template "prometheus-operator.name" . }}-kube-scheduler
+ app: {{ template "kube-prometheus-stack.name" . }}-kube-scheduler
k8s-app: kube-scheduler
-{{ include "prometheus-operator.labels" . | indent 4 }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
namespace: kube-system
subsets:
- addresses:
@@ -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/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-scheduler/service.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-scheduler/service.yaml
old mode 100755
new mode 100644
index d74409658d..d9fb4575b2
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-scheduler/service.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-scheduler/service.yaml
@@ -1,20 +1,22 @@
-{{- if .Values.kubeScheduler.enabled }}
+{{- if and .Values.kubeScheduler.enabled .Values.kubeScheduler.service.enabled .Values.kubernetesServiceMonitors.enabled }}
apiVersion: v1
kind: Service
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-kube-scheduler
+ name: {{ template "kube-prometheus-stack.fullname" . }}-kube-scheduler
labels:
- app: {{ template "prometheus-operator.name" . }}-kube-scheduler
+ app: {{ template "kube-prometheus-stack.name" . }}-kube-scheduler
jobLabel: kube-scheduler
-{{ include "prometheus-operator.labels" . | indent 4 }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
namespace: kube-system
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/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-scheduler/servicemonitor.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-scheduler/servicemonitor.yaml
old mode 100755
new mode 100644
index 01a2bee2ae..a8a8d0bc00
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-scheduler/servicemonitor.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-scheduler/servicemonitor.yaml
@@ -1,17 +1,21 @@
-{{- if .Values.kubeScheduler.enabled }}
+{{- if and .Values.kubeScheduler.enabled .Values.kubeScheduler.serviceMonitor.enabled .Values.kubernetesServiceMonitors.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-kube-scheduler
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-kube-scheduler
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}-kube-scheduler
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ 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
+ {{- include "servicemonitor.scrapeLimits" .Values.kubeScheduler.serviceMonitor | nindent 2 }}
selector:
matchLabels:
- app: {{ template "prometheus-operator.name" . }}-kube-scheduler
+ app: {{ template "kube-prometheus-stack.name" . }}-kube-scheduler
release: {{ $.Release.Name | quote }}
namespaceSelector:
matchNames:
@@ -22,13 +26,16 @@ spec:
interval: {{ .Values.kubeScheduler.serviceMonitor.interval }}
{{- end }}
bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
- {{- if .Values.kubeScheduler.serviceMonitor.https }}
+ {{- if .Values.kubeScheduler.serviceMonitor.proxyUrl }}
+ proxyUrl: {{ .Values.kubeScheduler.serviceMonitor.proxyUrl}}
+ {{- end }}
+ {{- 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}}
@@ -39,6 +46,6 @@ spec:
{{- end }}
{{- if .Values.kubeScheduler.serviceMonitor.relabelings }}
relabelings:
-{{ toYaml .Values.kubeScheduler.serviceMonitor.relabelings | indent 4 }}
+{{ tpl (toYaml .Values.kubeScheduler.serviceMonitor.relabelings | indent 4) . }}
{{- end }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-state-metrics/serviceMonitor.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-state-metrics/serviceMonitor.yaml
deleted file mode 100755
index 73e0161b38..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-state-metrics/serviceMonitor.yaml
+++ /dev/null
@@ -1,30 +0,0 @@
-{{- if .Values.kubeStateMetrics.enabled }}
-apiVersion: monitoring.coreos.com/v1
-kind: ServiceMonitor
-metadata:
- name: {{ template "prometheus-operator.fullname" . }}-kube-state-metrics
- namespace: {{ $.Release.Namespace }}
- labels:
- app: {{ template "prometheus-operator.name" . }}-kube-state-metrics
-{{ include "prometheus-operator.labels" . | indent 4 }}
-spec:
- jobLabel: app.kubernetes.io/name
- endpoints:
- - port: http
- {{- if .Values.kubeStateMetrics.serviceMonitor.interval }}
- interval: {{ .Values.kubeStateMetrics.serviceMonitor.interval }}
- {{- end }}
- honorLabels: true
-{{- if .Values.kubeStateMetrics.serviceMonitor.metricRelabelings }}
- metricRelabelings:
-{{ tpl (toYaml .Values.kubeStateMetrics.serviceMonitor.metricRelabelings | indent 4) . }}
-{{- end }}
-{{- if .Values.kubeStateMetrics.serviceMonitor.relabelings }}
- relabelings:
-{{ toYaml .Values.kubeStateMetrics.serviceMonitor.relabelings | indent 4 }}
-{{- end }}
- selector:
- matchLabels:
- app.kubernetes.io/name: kube-state-metrics
- app.kubernetes.io/instance: "{{ $.Release.Name }}"
-{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kubelet/servicemonitor.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kubelet/servicemonitor.yaml
old mode 100755
new mode 100644
index fe78e73d41..e5ad637ebb
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kubelet/servicemonitor.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kubelet/servicemonitor.yaml
@@ -1,13 +1,21 @@
-{{- if .Values.kubelet.enabled }}
+{{- if and .Values.kubelet.enabled .Values.kubernetesServiceMonitors.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-kubelet
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-kubelet
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}-kubelet
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}-kubelet
+ {{- with .Values.kubelet.serviceMonitor.additionalLabels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+{{- include "kube-prometheus-stack.labels" . | indent 4 }}
spec:
+ {{- include "servicemonitor.scrapeLimits" .Values.kubelet.serviceMonitor | nindent 2 }}
+ {{- with .Values.kubelet.serviceMonitor.attachMetadata }}
+ attachMetadata:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
endpoints:
{{- if .Values.kubelet.serviceMonitor.https }}
- port: https-metrics
@@ -15,6 +23,12 @@ spec:
{{- 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 }}
tlsConfig:
caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
insecureSkipVerify: true
@@ -26,7 +40,7 @@ spec:
{{- end }}
{{- if .Values.kubelet.serviceMonitor.relabelings }}
relabelings:
-{{ toYaml .Values.kubelet.serviceMonitor.relabelings | indent 4 }}
+{{ tpl (toYaml .Values.kubelet.serviceMonitor.relabelings | indent 4) . }}
{{- end }}
{{- if .Values.kubelet.serviceMonitor.cAdvisor }}
- port: https-metrics
@@ -35,6 +49,12 @@ spec:
{{- 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
tlsConfig:
caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
@@ -46,7 +66,61 @@ spec:
{{- end }}
{{- if .Values.kubelet.serviceMonitor.cAdvisorRelabelings }}
relabelings:
-{{ toYaml .Values.kubelet.serviceMonitor.cAdvisorRelabelings | indent 4 }}
+{{ tpl (toYaml .Values.kubelet.serviceMonitor.cAdvisorRelabelings | indent 4) . }}
+{{- end }}
+{{- end }}
+{{- if .Values.kubelet.serviceMonitor.probes }}
+ - port: https-metrics
+ scheme: https
+ 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
+ tlsConfig:
+ caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
+ insecureSkipVerify: true
+ bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
+{{- 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: https-metrics
+ scheme: https
+ path: {{ .Values.kubelet.serviceMonitor.resourcePath }}
+ {{- 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
+ tlsConfig:
+ caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
+ insecureSkipVerify: true
+ bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
+{{- if .Values.kubelet.serviceMonitor.resourceMetricRelabelings }}
+ metricRelabelings:
+{{ tpl (toYaml .Values.kubelet.serviceMonitor.resourceMetricRelabelings | indent 4) . }}
+{{- end }}
+{{- if .Values.kubelet.serviceMonitor.resourceRelabelings }}
+ relabelings:
+{{ tpl (toYaml .Values.kubelet.serviceMonitor.resourceRelabelings | indent 4) . }}
{{- end }}
{{- end }}
{{- else }}
@@ -54,6 +128,12 @@ spec:
{{- 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.metricRelabelings }}
metricRelabelings:
@@ -61,7 +141,7 @@ spec:
{{- end }}
{{- if .Values.kubelet.serviceMonitor.relabelings }}
relabelings:
-{{ toYaml .Values.kubelet.serviceMonitor.relabelings | indent 4 }}
+{{ tpl (toYaml .Values.kubelet.serviceMonitor.relabelings | indent 4) . }}
{{- end }}
{{- if .Values.kubelet.serviceMonitor.cAdvisor }}
- port: http-metrics
@@ -69,6 +149,12 @@ spec:
{{- 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.cAdvisorMetricRelabelings }}
metricRelabelings:
@@ -76,7 +162,51 @@ spec:
{{- end }}
{{- if .Values.kubelet.serviceMonitor.cAdvisorRelabelings }}
relabelings:
-{{ toYaml .Values.kubelet.serviceMonitor.cAdvisorRelabelings | indent 4 }}
+{{ 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: {{ .Values.kubelet.serviceMonitor.resourcePath }}
+ {{- 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.resourceMetricRelabelings }}
+ metricRelabelings:
+{{ tpl (toYaml .Values.kubelet.serviceMonitor.resourceMetricRelabelings | indent 4) . }}
+{{- end }}
+{{- if .Values.kubelet.serviceMonitor.resourceRelabelings }}
+ relabelings:
+{{ tpl (toYaml .Values.kubelet.serviceMonitor.resourceRelabelings | indent 4) . }}
+{{- end }}
{{- end }}
{{- end }}
{{- end }}
@@ -86,5 +216,6 @@ spec:
- {{ .Values.kubelet.namespace }}
selector:
matchLabels:
+ app.kubernetes.io/name: kubelet
k8s-app: kubelet
{{- end}}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/node-exporter/servicemonitor.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/node-exporter/servicemonitor.yaml
deleted file mode 100755
index be5e00dd6c..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/node-exporter/servicemonitor.yaml
+++ /dev/null
@@ -1,32 +0,0 @@
-{{- if .Values.nodeExporter.enabled }}
-apiVersion: monitoring.coreos.com/v1
-kind: ServiceMonitor
-metadata:
- name: {{ template "prometheus-operator.fullname" . }}-node-exporter
- namespace: {{ $.Release.Namespace }}
- labels:
- app: {{ template "prometheus-operator.name" . }}-node-exporter
-{{ include "prometheus-operator.labels" . | indent 4 }}
-spec:
- jobLabel: {{ .Values.nodeExporter.jobLabel }}
- selector:
- matchLabels:
- app: prometheus-node-exporter
- release: {{ $.Release.Name }}
- endpoints:
- - port: metrics
- {{- if .Values.nodeExporter.serviceMonitor.interval }}
- interval: {{ .Values.nodeExporter.serviceMonitor.interval }}
- {{- 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:
-{{ toYaml .Values.nodeExporter.serviceMonitor.relabelings | indent 4 }}
-{{- end }}
-{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/extra-objects.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/extra-objects.yaml
new file mode 100644
index 0000000000..567f7bf329
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/extra-objects.yaml
@@ -0,0 +1,4 @@
+{{ range .Values.extraManifests }}
+---
+{{ tpl (toYaml .) $ }}
+{{ end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/configmap-dashboards.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/configmap-dashboards.yaml
old mode 100755
new mode 100644
index 97934ac2c4..c04efc425d
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/configmap-dashboards.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/configmap-dashboards.yaml
@@ -1,5 +1,5 @@
-{{- if and .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }}
-{{- $files := .Files.Glob "dashboards/*.json" }}
+{{- 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
@@ -9,14 +9,14 @@ items:
- apiVersion: v1
kind: ConfigMap
metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) $dashboardName | trunc 63 | trimSuffix "-" }}
- namespace: {{ $.Release.Namespace }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) $dashboardName | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack-grafana.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 }}
{{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.labels" $ | indent 6 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-grafana
+{{ include "kube-prometheus-stack.labels" $ | indent 6 }}
data:
{{ $dashboardName }}.json: {{ $.Files.Get $path | toJson }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/configmaps-datasources.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/configmaps-datasources.yaml
old mode 100755
new mode 100644
index 3f92aa31f6..dc4dc20f3e
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/configmaps-datasources.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/configmaps-datasources.yaml
@@ -1,38 +1,81 @@
-{{- if and .Values.grafana.enabled .Values.grafana.sidecar.datasources.enabled }}
+{{- if or (and .Values.grafana.enabled .Values.grafana.sidecar.datasources.enabled) .Values.grafana.forceDeployDatasources }}
apiVersion: v1
kind: ConfigMap
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-grafana-datasource
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-grafana-datasource
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
{{- if .Values.grafana.sidecar.datasources.annotations }}
annotations:
-{{ toYaml .Values.grafana.sidecar.datasources.annotations | indent 4 }}
+ {{- toYaml .Values.grafana.sidecar.datasources.annotations | nindent 4 }}
{{- end }}
labels:
- {{ $.Values.grafana.sidecar.datasources.label }}: "1"
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.labels" $ | indent 4 }}
+ {{ $.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 }}
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
- url: http://{{ template "prometheus-operator.fullname" . }}-prometheus:{{ .Values.prometheus.service.port }}/{{ trimPrefix "/" .Values.prometheus.prometheusSpec.routePrefix }}
+ uid: {{ .Values.grafana.sidecar.datasources.uid }}
+ {{- if .Values.grafana.sidecar.datasources.url }}
+ url: {{ .Values.grafana.sidecar.datasources.url }}
+ {{- else }}
+ url: http://{{ template "kube-prometheus-stack.fullname" . }}-prometheus.{{ template "kube-prometheus-stack.namespace" . }}:{{ .Values.prometheus.service.port }}/{{ trimPrefix "/" .Values.prometheus.prometheusSpec.routePrefix }}
+ {{- end }}
access: proxy
- isDefault: true
+ isDefault: {{ .Values.grafana.sidecar.datasources.isDefaultDatasource }}
+ jsonData:
+ httpMethod: {{ .Values.grafana.sidecar.datasources.httpMethod }}
+ timeInterval: {{ $scrapeInterval }}
+ {{- if .Values.grafana.sidecar.datasources.timeout }}
+ timeout: {{ .Values.grafana.sidecar.datasources.timeout }}
+ {{- end }}
+{{- if .Values.grafana.sidecar.datasources.exemplarTraceIdDestinations }}
+ 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 "prometheus-operator.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 }}
{{- end }}
+{{- if .Values.grafana.sidecar.datasources.alertmanager.enabled }}
+ - name: Alertmanager
+ type: alertmanager
+ uid: {{ .Values.grafana.sidecar.datasources.alertmanager.uid }}
+ {{- if .Values.grafana.sidecar.datasources.alertmanager.url }}
+ url: {{ .Values.grafana.sidecar.datasources.alertmanager.url }}
+ {{- else }}
+ url: http://{{ template "kube-prometheus-stack.fullname" . }}-alertmanager.{{ template "kube-prometheus-stack.namespace" . }}:{{ .Values.alertmanager.service.port }}/{{ trimPrefix "/" .Values.alertmanager.alertmanagerSpec.routePrefix }}
+ {{- end }}
+ access: proxy
+ jsonData:
+ handleGrafanaManagedAlerts: {{ .Values.grafana.sidecar.datasources.alertmanager.handleGrafanaManagedAlerts }}
+ implementation: {{ .Values.grafana.sidecar.datasources.alertmanager.implementation }}
+{{- end }}
{{- end }}
{{- if .Values.grafana.additionalDataSources }}
-{{ toYaml .Values.grafana.additionalDataSources | indent 4}}
+{{ tpl (toYaml .Values.grafana.additionalDataSources | indent 4) . }}
{{- end }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/alertmanager-overview.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/alertmanager-overview.yaml
new file mode 100644
index 0000000000..614c8d343a
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/alertmanager-overview.yaml
@@ -0,0 +1,24 @@
+{{- /*
+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 }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
+ name: {{ printf "%s-%s" (include "kube-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 "kube-prometheus-stack.name" $ }}-grafana
+{{ include "kube-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 }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/apiserver.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/apiserver.yaml
old mode 100755
new mode 100644
index 1d67b33629..cf5d0c31d7
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/apiserver.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/apiserver.yaml
@@ -1,2262 +1,24 @@
{{- /*
-Generated from 'apiserver' from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/grafana-dashboardDefinitions.yaml
+Generated from 'apiserver' 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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.kubeApiServer.enabled }}
+{{- 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.kubeApiServer.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "apiserver" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "apiserver" | 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"
+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }}
{{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.labels" $ | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-grafana
+{{ include "kube-prometheus-stack.labels" $ | indent 4 }}
data:
apiserver.json: |-
- {
- "__inputs": [
-
- ],
- "__requires": [
-
- ],
- "annotations": {
- "list": [
-
- ]
- },
- "editable": false,
- "gnetId": null,
- "graphTooltip": 0,
- "hideControls": false,
- "id": null,
- "links": [
-
- ],
- "refresh": "10s",
- "rows": [
- {
- "collapse": false,
- "collapsed": false,
- "panels": [
- {
- "cacheTimeout": null,
- "colorBackground": false,
- "colorValue": false,
- "colors": [
- "#299c46",
- "rgba(237, 129, 40, 0.89)",
- "#d44a3a"
- ],
- "datasource": "$datasource",
- "decimals": 3,
- "format": "percentunit",
- "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": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "rangeMaps": [
- {
- "from": "null",
- "text": "N/A",
- "to": "null"
- }
- ],
- "span": 4,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "tableColumn": "",
- "targets": [
- {
- "expr": "apiserver_request:availability30d{verb=\"all\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "A"
- }
- ],
- "thresholds": "",
- "title": "Availability (30d) > 99.000",
- "tooltip": {
- "shared": false
- },
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "op": "=",
- "text": "N/A",
- "value": "null"
- }
- ],
- "valueName": "avg"
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "decimals": 3,
- "fill": 1,
- "gridPos": {
-
- },
- "id": 3,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 8,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "100 * (apiserver_request:availability30d{verb=\"all\"} - 0.990000)",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "errorbudget",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "ErrorBudget (30d) > 99.000",
- "tooltip": {
- "shared": false,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": [
-
- ]
- },
- "yaxes": [
- {
- "decimals": 3,
- "format": "percentunit",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "decimals": 3,
- "format": "percentunit",
- "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"
- },
- {
- "collapse": false,
- "collapsed": false,
- "panels": [
- {
- "cacheTimeout": null,
- "colorBackground": false,
- "colorValue": false,
- "colors": [
- "#299c46",
- "rgba(237, 129, 40, 0.89)",
- "#d44a3a"
- ],
- "datasource": "$datasource",
- "decimals": 3,
- "format": "percentunit",
- "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": "",
- "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": "apiserver_request:availability30d{verb=\"read\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "A"
- }
- ],
- "thresholds": "",
- "title": "Read Availability (30d)",
- "tooltip": {
- "shared": false
- },
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "op": "=",
- "text": "N/A",
- "value": "null"
- }
- ],
- "valueName": "avg"
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 5,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 3,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(code_resource:apiserver_request_total:rate5m{verb=\"read\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Read SLI - Requests",
- "tooltip": {
- "shared": false,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": [
-
- ]
- },
- "yaxes": [
- {
- "format": "reqps",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "reqps",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 6,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 3,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum by (resource) (code_resource:apiserver_request_total:rate5m{verb=\"read\",code=~\"5..\"}) / sum by (resource) (code_resource:apiserver_request_total:rate5m{verb=\"read\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}} resource {{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Read SLI - Errors",
- "tooltip": {
- "shared": false,
- "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": null,
- "min": null,
- "show": true
- },
- {
- "format": "percentunit",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 7,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 3,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "cluster_quantile:apiserver_request_duration_seconds:histogram_quantile{verb=\"read\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}} resource {{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Read SLI - Duration",
- "tooltip": {
- "shared": false,
- "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": false,
- "title": "Dashboard Row",
- "titleSize": "h6",
- "type": "row"
- },
- {
- "collapse": false,
- "collapsed": false,
- "panels": [
- {
- "cacheTimeout": null,
- "colorBackground": false,
- "colorValue": false,
- "colors": [
- "#299c46",
- "rgba(237, 129, 40, 0.89)",
- "#d44a3a"
- ],
- "datasource": "$datasource",
- "decimals": 3,
- "format": "percentunit",
- "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": "apiserver_request:availability30d{verb=\"write\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "A"
- }
- ],
- "thresholds": "",
- "title": "Write Availability (30d)",
- "tooltip": {
- "shared": false
- },
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "op": "=",
- "text": "N/A",
- "value": "null"
- }
- ],
- "valueName": "avg"
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 9,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 3,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(code_resource:apiserver_request_total:rate5m{verb=\"write\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Write SLI - Requests",
- "tooltip": {
- "shared": false,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": [
-
- ]
- },
- "yaxes": [
- {
- "format": "reqps",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "reqps",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 10,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 3,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum by (resource) (code_resource:apiserver_request_total:rate5m{verb=\"write\",code=~\"5..\"}) / sum by (resource) (code_resource:apiserver_request_total:rate5m{verb=\"write\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}} resource {{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Write SLI - Errors",
- "tooltip": {
- "shared": false,
- "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": null,
- "min": null,
- "show": true
- },
- {
- "format": "percentunit",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 11,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 3,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "cluster_quantile:apiserver_request_duration_seconds:histogram_quantile{verb=\"write\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}} resource {{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Write SLI - Duration",
- "tooltip": {
- "shared": false,
- "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": false,
- "title": "Dashboard Row",
- "titleSize": "h6",
- "type": "row"
- },
- {
- "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": 12,
- "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": 2,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "tableColumn": "",
- "targets": [
- {
- "expr": "sum(up{job=\"apiserver\", cluster=\"$cluster\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "A"
- }
- ],
- "thresholds": "",
- "title": "Up",
- "tooltip": {
- "shared": false
- },
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "op": "=",
- "text": "N/A",
- "value": "null"
- }
- ],
- "valueName": "min"
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 13,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 5,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(rate(apiserver_request_total{job=\"apiserver\", instance=~\"$instance\",code=~\"2..\", cluster=\"$cluster\"}[5m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "2xx",
- "refId": "A"
- },
- {
- "expr": "sum(rate(apiserver_request_total{job=\"apiserver\", instance=~\"$instance\",code=~\"3..\", cluster=\"$cluster\"}[5m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "3xx",
- "refId": "B"
- },
- {
- "expr": "sum(rate(apiserver_request_total{job=\"apiserver\", instance=~\"$instance\",code=~\"4..\", cluster=\"$cluster\"}[5m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "4xx",
- "refId": "C"
- },
- {
- "expr": "sum(rate(apiserver_request_total{job=\"apiserver\", instance=~\"$instance\",code=~\"5..\", cluster=\"$cluster\"}[5m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "5xx",
- "refId": "D"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "RPC Rate",
- "tooltip": {
- "shared": false,
- "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",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 14,
- "legend": {
- "alignAsTable": true,
- "avg": false,
- "current": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "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": 5,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "histogram_quantile(0.99, sum(rate(apiserver_request_duration_seconds_bucket{job=\"apiserver\", instance=~\"$instance\", verb!=\"WATCH\", cluster=\"$cluster\"}[5m])) by (verb, le))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}verb{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Request duration 99th quantile",
- "tooltip": {
- "shared": false,
- "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": false,
- "title": "Dashboard Row",
- "titleSize": "h6",
- "type": "row"
- },
- {
- "collapse": false,
- "collapsed": false,
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 15,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": false,
- "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": "sum(rate(workqueue_adds_total{job=\"apiserver\", instance=~\"$instance\", cluster=\"$cluster\"}[5m])) by (instance, name)",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} {{`{{`}}name{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Work Queue Add Rate",
- "tooltip": {
- "shared": false,
- "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": 0,
- "show": true
- },
- {
- "format": "ops",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 16,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": false,
- "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": "sum(rate(workqueue_depth{job=\"apiserver\", instance=~\"$instance\", cluster=\"$cluster\"}[5m])) by (instance, name)",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} {{`{{`}}name{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Work Queue Depth",
- "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": 0,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 17,
- "legend": {
- "alignAsTable": true,
- "avg": false,
- "current": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "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": 12,
- "stack": false,
- "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))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} {{`{{`}}name{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Work Queue Latency",
- "tooltip": {
- "shared": false,
- "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": false,
- "title": "Dashboard Row",
- "titleSize": "h6",
- "type": "row"
- },
- {
- "collapse": false,
- "collapsed": false,
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 18,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "etcd_helper_cache_entry_total{job=\"apiserver\", instance=~\"$instance\", cluster=\"$cluster\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "ETCD Cache Entry Total",
- "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": 0,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 19,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(rate(etcd_helper_cache_hit_total{job=\"apiserver\",instance=~\"$instance\", cluster=\"$cluster\"}[5m])) by (instance)",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} hit",
- "refId": "A"
- },
- {
- "expr": "sum(rate(etcd_helper_cache_miss_total{job=\"apiserver\",instance=~\"$instance\", cluster=\"$cluster\"}[5m])) by (instance)",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} miss",
- "refId": "B"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "ETCD Cache Hit/Miss Rate",
- "tooltip": {
- "shared": false,
- "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": 0,
- "show": true
- },
- {
- "format": "ops",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 20,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "histogram_quantile(0.99,sum(rate(etcd_request_cache_get_duration_seconds_bucket{job=\"apiserver\",instance=~\"$instance\", cluster=\"$cluster\"}[5m])) by (instance, le))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} get",
- "refId": "A"
- },
- {
- "expr": "histogram_quantile(0.99,sum(rate(etcd_request_cache_add_duration_seconds_bucket{job=\"apiserver\",instance=~\"$instance\", cluster=\"$cluster\"}[5m])) by (instance, le))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} miss",
- "refId": "B"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "ETCD Cache Duration 99th Quantile",
- "tooltip": {
- "shared": false,
- "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": 0,
- "show": true
- },
- {
- "format": "s",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ]
- }
- ],
- "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,
- "gridPos": {
-
- },
- "id": 21,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "process_resident_memory_bytes{job=\"apiserver\",instance=~\"$instance\", cluster=\"$cluster\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory",
- "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": null,
- "show": true
- },
- {
- "format": "bytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 22,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "rate(process_cpu_seconds_total{job=\"apiserver\",instance=~\"$instance\", cluster=\"$cluster\"}[5m])",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}}",
- "refId": "A"
- }
- ],
- "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": 0,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 23,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "go_goroutines{job=\"apiserver\",instance=~\"$instance\", cluster=\"$cluster\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Goroutines",
- "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": {
- "text": "prod",
- "value": "prod"
- },
- "datasource": "$datasource",
- "hide": 2,
- "includeAll": false,
- "label": null,
- "multi": false,
- "name": "cluster",
- "options": [
-
- ],
- "query": "label_values(apiserver_request_total, cluster)",
- "refresh": 1,
- "regex": "",
- "sort": 1,
- "tagValuesQuery": "",
- "tags": [
-
- ],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- },
- {
- "allValue": null,
- "current": {
-
- },
- "datasource": "$datasource",
- "hide": 0,
- "includeAll": true,
- "label": null,
- "multi": false,
- "name": "instance",
- "options": [
-
- ],
- "query": "label_values(apiserver_request_total{job=\"apiserver\", cluster=\"$cluster\"}, instance)",
- "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": "",
- "title": "Kubernetes / API server",
- "uid": "09ec8aa1e996d6ffcd6817bbaff4db1b",
- "version": 0
- }
+ {{`{"__inputs":[],"__requires":[],"annotations":{"list":[]},"editable":false,"gnetId":null,"graphTooltip":0,"hideControls":false,"id":null,"links":[],"panels":[{"content":"The SLO (service level objective) and other metrics displayed on this dashboard are for informational purposes only.","datasource":null,"description":"The SLO (service level objective) and other metrics displayed on this dashboard are for informational purposes only.","gridPos":{"h":2,"w":24,"x":0,"y":0},"id":2,"mode":"markdown","span":12,"title":"Notice","type":"text"}],"refresh":"10s","rows":[{"collapse":false,"collapsed":false,"panels":[{"cacheTimeout":null,"colorBackground":false,"colorValue":false,"colors":["#299c46","rgba(237, 129, 40, 0.89)","#d44a3a"],"datasource":"$datasource","decimals":3,"description":"How many percent of requests (both read and write) in 30 days have been answered successfully and fast enough?","format":"percentunit","gauge":{"maxValue":100,"minValue":0,"show":false,"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":4,"sparkline":{"fillColor":"rgba(31, 118, 189, 0.18)","full":false,"lineColor":"rgb(31, 120, 193)","show":false},"tableColumn":"","targets":[{"expr":"apiserver_request:availability30d{verb=\"all\", cluster=\"$cluster\"}","format":"time_series","intervalFactor":2,"legendFormat":"","refId":"A"}],"thresholds":"","title":"Availability (30d) > 99.000%","tooltip":{"shared":false},"type":"singlestat","valueFontSize":"80%","valueMaps":[{"op":"=","text":"N/A","value":"null"}],"valueName":"avg"},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","decimals":3,"description":"How much error budget is left looking at our 0.990% availability guarantees?","fill":10,"fillGradient":0,"gridPos":{},"id":4,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"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":8,"stack":false,"steppedLine":false,"targets":[{"expr":"100 * (apiserver_request:availability30d{verb=\"all\", cluster=\"$cluster\"} - 0.990000)","format":"time_series","intervalFactor":2,"legendFormat":"errorbudget","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"ErrorBudget (30d) > 99.000%","tooltip":{"shared":false,"sort":0,"value_type":"individual"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"decimals":3,"format":"percentunit","label":null,"logBase":1,"max":null,"min":null,"show":true},{"decimals":3,"format":"percentunit","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"},{"collapse":false,"collapsed":false,"panels":[{"cacheTimeout":null,"colorBackground":false,"colorValue":false,"colors":["#299c46","rgba(237, 129, 40, 0.89)","#d44a3a"],"datasource":"$datasource","decimals":3,"description":"How many percent of read requests (LIST,GET) in 30 days have been answered successfully and fast enough?","format":"percentunit","gauge":{"maxValue":100,"minValue":0,"show":false,"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":"apiserver_request:availability30d{verb=\"read\", cluster=\"$cluster\"}","format":"time_series","intervalFactor":2,"legendFormat":"","refId":"A"}],"thresholds":"","title":"Read Availability (30d)","tooltip":{"shared":false},"type":"singlestat","valueFontSize":"80%","valueMaps":[{"op":"=","text":"N/A","value":"null"}],"valueName":"avg"},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","description":"How many read requests (LIST,GET) per second do the apiservers get by code?","fill":10,"fillGradient":0,"gridPos":{},"id":6,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"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":"/2../i","color":"#56A64B"},{"alias":"/3../i","color":"#F2CC0C"},{"alias":"/4../i","color":"#3274D9"},{"alias":"/5../i","color":"#E02F44"}],"spaceLength":10,"span":3,"stack":true,"steppedLine":false,"targets":[{"expr":"sum by (code) (code_resource:apiserver_request_total:rate5m{verb=\"read\", cluster=\"$cluster\"})","format":"time_series","intervalFactor":2,"legendFormat":"{{ code }}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Read SLI - Requests","tooltip":{"shared":false,"sort":0,"value_type":"individual"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"reqps","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"reqps","label":null,"logBase":1,"max":null,"min":null,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","description":"How many percent of read requests (LIST,GET) per second are returned with errors (5xx)?","fill":1,"fillGradient":0,"gridPos":{},"id":7,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"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":3,"stack":false,"steppedLine":false,"targets":[{"expr":"sum by (resource) (code_resource:apiserver_request_total:rate5m{verb=\"read\",code=~\"5..\", cluster=\"$cluster\"}) / sum by (resource) (code_resource:apiserver_request_total:rate5m{verb=\"read\", cluster=\"$cluster\"})","format":"time_series","intervalFactor":2,"legendFormat":"{{ resource }}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Read SLI - Errors","tooltip":{"shared":false,"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":null,"min":0,"show":true},{"format":"percentunit","label":null,"logBase":1,"max":null,"min":0,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","description":"How many seconds is the 99th percentile for reading (LIST|GET) a given resource?","fill":1,"fillGradient":0,"gridPos":{},"id":8,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"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":3,"stack":false,"steppedLine":false,"targets":[{"expr":"cluster_quantile:apiserver_request_slo_duration_seconds:histogram_quantile{verb=\"read\", cluster=\"$cluster\"}","format":"time_series","intervalFactor":2,"legendFormat":"{{ resource }}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Read SLI - Duration","tooltip":{"shared":false,"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":false,"title":"Dashboard Row","titleSize":"h6","type":"row"},{"collapse":false,"collapsed":false,"panels":[{"cacheTimeout":null,"colorBackground":false,"colorValue":false,"colors":["#299c46","rgba(237, 129, 40, 0.89)","#d44a3a"],"datasource":"$datasource","decimals":3,"description":"How many percent of write requests (POST|PUT|PATCH|DELETE) in 30 days have been answered successfully and fast enough?","format":"percentunit","gauge":{"maxValue":100,"minValue":0,"show":false,"thresholdLabels":false,"thresholdMarkers":true},"gridPos":{},"id":9,"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":"apiserver_request:availability30d{verb=\"write\", cluster=\"$cluster\"}","format":"time_series","intervalFactor":2,"legendFormat":"","refId":"A"}],"thresholds":"","title":"Write Availability (30d)","tooltip":{"shared":false},"type":"singlestat","valueFontSize":"80%","valueMaps":[{"op":"=","text":"N/A","value":"null"}],"valueName":"avg"},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","description":"How many write requests (POST|PUT|PATCH|DELETE) per second do the apiservers get by code?","fill":10,"fillGradient":0,"gridPos":{},"id":10,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"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":"/2../i","color":"#56A64B"},{"alias":"/3../i","color":"#F2CC0C"},{"alias":"/4../i","color":"#3274D9"},{"alias":"/5../i","color":"#E02F44"}],"spaceLength":10,"span":3,"stack":true,"steppedLine":false,"targets":[{"expr":"sum by (code) (code_resource:apiserver_request_total:rate5m{verb=\"write\", cluster=\"$cluster\"})","format":"time_series","intervalFactor":2,"legendFormat":"{{ code }}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Write SLI - Requests","tooltip":{"shared":false,"sort":0,"value_type":"individual"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"reqps","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"reqps","label":null,"logBase":1,"max":null,"min":null,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","description":"How many percent of write requests (POST|PUT|PATCH|DELETE) per second are returned with errors (5xx)?","fill":1,"fillGradient":0,"gridPos":{},"id":11,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"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":3,"stack":false,"steppedLine":false,"targets":[{"expr":"sum by (resource) (code_resource:apiserver_request_total:rate5m{verb=\"write\",code=~\"5..\", cluster=\"$cluster\"}) / sum by (resource) (code_resource:apiserver_request_total:rate5m{verb=\"write\", cluster=\"$cluster\"})","format":"time_series","intervalFactor":2,"legendFormat":"{{ resource }}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Write SLI - Errors","tooltip":{"shared":false,"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":null,"min":0,"show":true},{"format":"percentunit","label":null,"logBase":1,"max":null,"min":0,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","description":"How many seconds is the 99th percentile for writing (POST|PUT|PATCH|DELETE) a given resource?","fill":1,"fillGradient":0,"gridPos":{},"id":12,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"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":3,"stack":false,"steppedLine":false,"targets":[{"expr":"cluster_quantile:apiserver_request_slo_duration_seconds:histogram_quantile{verb=\"write\", cluster=\"$cluster\"}","format":"time_series","intervalFactor":2,"legendFormat":"{{ resource }}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Write SLI - Duration","tooltip":{"shared":false,"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":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":13,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"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":false,"steppedLine":false,"targets":[{"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}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Work Queue Add Rate","tooltip":{"shared":false,"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":0,"show":true},{"format":"ops","label":null,"logBase":1,"max":null,"min":0,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{},"id":14,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"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":false,"steppedLine":false,"targets":[{"expr":"sum(rate(workqueue_depth{job=\"apiserver\", instance=~\"$instance\", cluster=\"$cluster\"}[$__rate_interval])) by (instance, name)","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}} {{name}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Work Queue Depth","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":0,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{},"id":15,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":true,"max":false,"min":false,"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":12,"stack":false,"steppedLine":false,"targets":[{"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}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Work Queue Latency","tooltip":{"shared":false,"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":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":16,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"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":4,"stack":false,"steppedLine":false,"targets":[{"expr":"process_resident_memory_bytes{job=\"apiserver\",instance=~\"$instance\", cluster=\"$cluster\"}","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Memory","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":null,"show":true},{"format":"bytes","label":null,"logBase":1,"max":null,"min":null,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{},"id":17,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"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":4,"stack":false,"steppedLine":false,"targets":[{"expr":"rate(process_cpu_seconds_total{job=\"apiserver\",instance=~\"$instance\", cluster=\"$cluster\"}[$__rate_interval])","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A"}],"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":0,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{},"id":18,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"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":4,"stack":false,"steppedLine":false,"targets":[{"expr":"go_goroutines{job=\"apiserver\",instance=~\"$instance\", cluster=\"$cluster\"}","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Goroutines","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":"Data Source","name":"datasource","options":[],"query":"prometheus","refresh":1,"regex":"","type":"datasource"},{"allValue":null,"current":{},"datasource":"$datasource","hide":`}}{{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}{{`,"includeAll":false,"label":"cluster","multi":false,"name":"cluster","options":[],"query":"label_values(up{job=\"apiserver\"}, cluster)","refresh":2,"regex":"","sort":1,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"allValue":null,"current":{},"datasource":"$datasource","hide":0,"includeAll":true,"label":null,"multi":false,"name":"instance","options":[],"query":"label_values(up{job=\"apiserver\", cluster=\"$cluster\"}, instance)","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 / API server","uid":"09ec8aa1e996d6ffcd6817bbaff4db1b","version":0}`}}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/cluster-total.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/cluster-total.yaml
old mode 100755
new mode 100644
index 04f7008305..c2c412d8e0
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/cluster-total.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/cluster-total.yaml
@@ -1,1827 +1,24 @@
{{- /*
-Generated from 'cluster-total' from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/grafana-dashboardDefinitions.yaml
+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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.grafana.enabled .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 }}
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "cluster-total" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
+ name: {{ printf "%s-%s" (include "kube-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 }}: "1"
+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }}
{{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.labels" $ | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-grafana
+{{ include "kube-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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 2,
- "gridPos": {
- "h": 9,
- "w": 24,
- "x": 0,
- "y": 59
- },
- "id": 18,
- "legend": {
- "alignAsTable": true,
- "avg": true,
- "current": true,
- "hideEmpty": true,
- "hideZero": true,
- "max": true,
- "min": true,
- "rightSide": true,
- "show": true,
- "total": false,
- "values": true
- },
- "lines": true,
- "linewidth": 2,
- "links": [
- {
- "targetBlank": true,
- "title": "What is TCP Retransmit?",
- "url": "https://accedian.com/enterprises/blog/network-packet-loss-retransmissions-and-duplicate-acknowledgements/"
- }
- ],
- "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(rate(node_netstat_Tcp_RetransSegs[$interval:$resolution]) / rate(node_netstat_Tcp_OutSegs[$interval:$resolution])) by (instance))",
- "format": "time_series",
- "intervalFactor": 1,
- "legendFormat": "{{`{{`}}instance{{`}}`}}",
- "refId": "A",
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Rate of TCP Retransmits out of all sent segments",
- "tooltip": {
- "shared": true,
- "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": null,
- "min": 0,
- "show": true
- },
- {
- "format": "percentunit",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 2,
- "gridPos": {
- "h": 9,
- "w": 24,
- "x": 0,
- "y": 59
- },
- "id": 19,
- "legend": {
- "alignAsTable": true,
- "avg": true,
- "current": true,
- "hideEmpty": true,
- "hideZero": true,
- "max": true,
- "min": true,
- "rightSide": true,
- "show": true,
- "total": false,
- "values": true
- },
- "lines": true,
- "linewidth": 2,
- "links": [
- {
- "targetBlank": true,
- "title": "Why monitor SYN retransmits?",
- "url": "https://github.com/prometheus/node_exporter/issues/1023#issuecomment-408128365"
- }
- ],
- "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(rate(node_netstat_TcpExt_TCPSynRetrans[$interval:$resolution]) / rate(node_netstat_Tcp_RetransSegs[$interval:$resolution])) by (instance))",
- "format": "time_series",
- "intervalFactor": 1,
- "legendFormat": "{{`{{`}}instance{{`}}`}}",
- "refId": "A",
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Rate of TCP SYN Retransmits out of all retransmits",
- "tooltip": {
- "shared": true,
- "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": null,
- "min": 0,
- "show": true
- },
- {
- "format": "percentunit",
- "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": "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": "",
- "title": "Kubernetes / Networking / Cluster",
- "uid": "ff635a025bcfea7bc3dd4f508990a3e9",
- "version": 0
- }
+ {{`{"__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{cluster=\"$cluster\",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{cluster=\"$cluster\",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{cluster=\"$cluster\",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{cluster=\"$cluster\",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{cluster=\"$cluster\",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{cluster=\"$cluster\",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{cluster=\"$cluster\",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{cluster=\"$cluster\",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{cluster=\"$cluster\",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{cluster=\"$cluster\",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{cluster=\"$cluster\",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{cluster=\"$cluster\",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{cluster=\"$cluster\",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{cluster=\"$cluster\",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{cluster=\"$cluster\",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{cluster=\"$cluster\",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{cluster=\"$cluster\",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{cluster=\"$cluster\",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}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":2,"fillGradient":0,"gridPos":{"h":9,"w":24,"x":0,"y":59},"id":18,"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":[{"targetBlank":true,"title":"What is TCP Retransmit?","url":"https://accedian.com/enterprises/blog/network-packet-loss-retransmissions-and-duplicate-acknowledgements/"}],"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(rate(node_netstat_Tcp_RetransSegs{cluster=\"$cluster\"}[$interval:$resolution]) / rate(node_netstat_Tcp_OutSegs{cluster=\"$cluster\"}[$interval:$resolution])) by (instance))","format":"time_series","intervalFactor":1,"legendFormat":"{{instance}}","refId":"A","step":10}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Rate of TCP Retransmits out of all sent segments","tooltip":{"shared":true,"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":null,"min":0,"show":true},{"format":"percentunit","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":19,"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":[{"targetBlank":true,"title":"Why monitor SYN retransmits?","url":"https://github.com/prometheus/node_exporter/issues/1023#issuecomment-408128365"}],"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(rate(node_netstat_TcpExt_TCPSynRetrans{cluster=\"$cluster\"}[$interval:$resolution]) / rate(node_netstat_Tcp_RetransSegs{cluster=\"$cluster\"}[$interval:$resolution])) by (instance))","format":"time_series","intervalFactor":1,"legendFormat":"{{instance}}","refId":"A","step":10}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Rate of TCP SYN Retransmits out of all retransmits","tooltip":{"shared":true,"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":null,"min":0,"show":true},{"format":"percentunit","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":"default","value":"default"},"hide":0,"label":"Data Source","name":"datasource","options":[],"query":"prometheus","refresh":1,"regex":"","type":"datasource"},{"allValue":null,"current":{},"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(up{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\"}, cluster)","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":"Kubernetes / Networking / Cluster","uid":"ff635a025bcfea7bc3dd4f508990a3e9","version":0}`}}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/controller-manager.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/controller-manager.yaml
old mode 100755
new mode 100644
index c4eebdb81d..4ae8b520ad
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/controller-manager.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/controller-manager.yaml
@@ -1,1131 +1,24 @@
{{- /*
-Generated from 'controller-manager' from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/grafana-dashboardDefinitions.yaml
+Generated from 'controller-manager' 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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.kubeControllerManager.enabled }}
+{{- 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.kubeControllerManager.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "controller-manager" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "controller-manager" | 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"
+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }}
{{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.labels" $ | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-grafana
+{{ include "kube-prometheus-stack.labels" $ | indent 4 }}
data:
controller-manager.json: |-
- {
- "__inputs": [
-
- ],
- "__requires": [
-
- ],
- "annotations": {
- "list": [
-
- ]
- },
- "editable": false,
- "gnetId": null,
- "graphTooltip": 0,
- "hideControls": false,
- "id": null,
- "links": [
-
- ],
- "refresh": "10s",
- "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": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "rangeMaps": [
- {
- "from": "null",
- "text": "N/A",
- "to": "null"
- }
- ],
- "span": 2,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "tableColumn": "",
- "targets": [
- {
- "expr": "sum(up{job=\"kube-controller-manager\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "A"
- }
- ],
- "thresholds": "",
- "title": "Up",
- "tooltip": {
- "shared": false
- },
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "op": "=",
- "text": "N/A",
- "value": "null"
- }
- ],
- "valueName": "min"
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 3,
- "legend": {
- "alignAsTable": true,
- "avg": false,
- "current": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "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": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(rate(workqueue_adds_total{job=\"kube-controller-manager\", instance=~\"$instance\"}[5m])) by (instance, name)",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} {{`{{`}}name{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Work Queue Add Rate",
- "tooltip": {
- "shared": false,
- "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": false,
- "title": "Dashboard Row",
- "titleSize": "h6",
- "type": "row"
- },
- {
- "collapse": false,
- "collapsed": false,
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 4,
- "legend": {
- "alignAsTable": true,
- "avg": false,
- "current": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "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": 12,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(rate(workqueue_depth{job=\"kube-controller-manager\", instance=~\"$instance\"}[5m])) by (instance, name)",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} {{`{{`}}name{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Work Queue Depth",
- "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": 0,
- "show": true
- }
- ]
- }
- ],
- "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,
- "gridPos": {
-
- },
- "id": 5,
- "legend": {
- "alignAsTable": true,
- "avg": false,
- "current": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "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": 12,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "histogram_quantile(0.99, sum(rate(workqueue_queue_duration_seconds_bucket{job=\"kube-controller-manager\", instance=~\"$instance\"}[5m])) by (instance, name, le))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} {{`{{`}}name{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Work Queue Latency",
- "tooltip": {
- "shared": false,
- "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": false,
- "title": "Dashboard Row",
- "titleSize": "h6",
- "type": "row"
- },
- {
- "collapse": false,
- "collapsed": false,
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 6,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(rate(rest_client_requests_total{job=\"kube-controller-manager\", instance=~\"$instance\",code=~\"2..\"}[5m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "2xx",
- "refId": "A"
- },
- {
- "expr": "sum(rate(rest_client_requests_total{job=\"kube-controller-manager\", instance=~\"$instance\",code=~\"3..\"}[5m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "3xx",
- "refId": "B"
- },
- {
- "expr": "sum(rate(rest_client_requests_total{job=\"kube-controller-manager\", instance=~\"$instance\",code=~\"4..\"}[5m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "4xx",
- "refId": "C"
- },
- {
- "expr": "sum(rate(rest_client_requests_total{job=\"kube-controller-manager\", instance=~\"$instance\",code=~\"5..\"}[5m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "5xx",
- "refId": "D"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Kube API Request Rate",
- "tooltip": {
- "shared": false,
- "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",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 7,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 8,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_latency_seconds_bucket{job=\"kube-controller-manager\", instance=~\"$instance\", verb=\"POST\"}[5m])) by (verb, url, le))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}verb{{`}}`}} {{`{{`}}url{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Post Request Latency 99th Quantile",
- "tooltip": {
- "shared": false,
- "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": 0,
- "show": true
- },
- {
- "format": "s",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ]
- }
- ],
- "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,
- "gridPos": {
-
- },
- "id": 8,
- "legend": {
- "alignAsTable": true,
- "avg": false,
- "current": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "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": 12,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_latency_seconds_bucket{job=\"kube-controller-manager\", instance=~\"$instance\", verb=\"GET\"}[5m])) by (verb, url, le))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}verb{{`}}`}} {{`{{`}}url{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Get Request Latency 99th Quantile",
- "tooltip": {
- "shared": false,
- "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": 0,
- "show": true
- },
- {
- "format": "s",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ]
- }
- ],
- "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,
- "gridPos": {
-
- },
- "id": 9,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "process_resident_memory_bytes{job=\"kube-controller-manager\",instance=~\"$instance\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory",
- "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": null,
- "show": true
- },
- {
- "format": "bytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 10,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "rate(process_cpu_seconds_total{job=\"kube-controller-manager\",instance=~\"$instance\"}[5m])",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}}",
- "refId": "A"
- }
- ],
- "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": 0,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 11,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "go_goroutines{job=\"kube-controller-manager\",instance=~\"$instance\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Goroutines",
- "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": 0,
- "includeAll": true,
- "label": null,
- "multi": false,
- "name": "instance",
- "options": [
-
- ],
- "query": "label_values(process_cpu_seconds_total{job=\"kube-controller-manager\"}, instance)",
- "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": "",
- "title": "Kubernetes / Controller Manager",
- "uid": "72e0e05bef5099e5f049b05fdc429ed4",
- "version": 0
- }
+ {{`{"__inputs":[],"__requires":[],"annotations":{"list":[]},"editable":false,"gnetId":null,"graphTooltip":0,"hideControls":false,"id":null,"links":[],"refresh":"10s","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":"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":2,"sparkline":{"fillColor":"rgba(31, 118, 189, 0.18)","full":false,"lineColor":"rgb(31, 120, 193)","show":false},"tableColumn":"","targets":[{"expr":"sum(up{cluster=\"$cluster\", job=\"kube-controller-manager\"})","format":"time_series","intervalFactor":2,"legendFormat":"","refId":"A"}],"thresholds":"","title":"Up","tooltip":{"shared":false},"type":"singlestat","valueFontSize":"80%","valueMaps":[{"op":"=","text":"N/A","value":"null"}],"valueName":"min"},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{},"id":3,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":true,"max":false,"min":false,"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":10,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(workqueue_adds_total{cluster=\"$cluster\", job=\"kube-controller-manager\", instance=~\"$instance\"}[$__rate_interval])) by (cluster, instance, name)","format":"time_series","intervalFactor":2,"legendFormat":"{{cluster}} {{instance}} {{name}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Work Queue Add Rate","tooltip":{"shared":false,"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":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":false,"current":true,"max":false,"min":false,"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":12,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(workqueue_depth{cluster=\"$cluster\", job=\"kube-controller-manager\", instance=~\"$instance\"}[$__rate_interval])) by (cluster, instance, name)","format":"time_series","intervalFactor":2,"legendFormat":"{{cluster}} {{instance}} {{name}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Work Queue Depth","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":0,"show":true}]}],"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":5,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":true,"max":false,"min":false,"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":12,"stack":false,"steppedLine":false,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(workqueue_queue_duration_seconds_bucket{cluster=\"$cluster\", job=\"kube-controller-manager\", instance=~\"$instance\"}[$__rate_interval])) by (cluster, instance, name, le))","format":"time_series","intervalFactor":2,"legendFormat":"{{cluster}} {{instance}} {{name}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Work Queue Latency","tooltip":{"shared":false,"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":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":6,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"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":4,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(rest_client_requests_total{job=\"kube-controller-manager\", instance=~\"$instance\",code=~\"2..\"}[$__rate_interval]))","format":"time_series","intervalFactor":2,"legendFormat":"2xx","refId":"A"},{"expr":"sum(rate(rest_client_requests_total{job=\"kube-controller-manager\", instance=~\"$instance\",code=~\"3..\"}[$__rate_interval]))","format":"time_series","intervalFactor":2,"legendFormat":"3xx","refId":"B"},{"expr":"sum(rate(rest_client_requests_total{job=\"kube-controller-manager\", instance=~\"$instance\",code=~\"4..\"}[$__rate_interval]))","format":"time_series","intervalFactor":2,"legendFormat":"4xx","refId":"C"},{"expr":"sum(rate(rest_client_requests_total{job=\"kube-controller-manager\", instance=~\"$instance\",code=~\"5..\"}[$__rate_interval]))","format":"time_series","intervalFactor":2,"legendFormat":"5xx","refId":"D"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Kube API Request Rate","tooltip":{"shared":false,"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","fill":1,"fillGradient":0,"gridPos":{},"id":7,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"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":8,"stack":false,"steppedLine":false,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster=\"$cluster\", job=\"kube-controller-manager\", instance=~\"$instance\", verb=\"POST\"}[$__rate_interval])) by (verb, url, le))","format":"time_series","intervalFactor":2,"legendFormat":"{{verb}} {{url}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Post Request Latency 99th Quantile","tooltip":{"shared":false,"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":0,"show":true},{"format":"s","label":null,"logBase":1,"max":null,"min":0,"show":true}]}],"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":8,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":true,"max":false,"min":false,"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":12,"stack":false,"steppedLine":false,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster=\"$cluster\", job=\"kube-controller-manager\", instance=~\"$instance\", verb=\"GET\"}[$__rate_interval])) by (verb, url, le))","format":"time_series","intervalFactor":2,"legendFormat":"{{verb}} {{url}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Get Request Latency 99th Quantile","tooltip":{"shared":false,"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":0,"show":true},{"format":"s","label":null,"logBase":1,"max":null,"min":0,"show":true}]}],"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,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"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":4,"stack":false,"steppedLine":false,"targets":[{"expr":"process_resident_memory_bytes{cluster=\"$cluster\", job=\"kube-controller-manager\",instance=~\"$instance\"}","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Memory","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":null,"show":true},{"format":"bytes","label":null,"logBase":1,"max":null,"min":null,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{},"id":10,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"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":4,"stack":false,"steppedLine":false,"targets":[{"expr":"rate(process_cpu_seconds_total{cluster=\"$cluster\", job=\"kube-controller-manager\",instance=~\"$instance\"}[$__rate_interval])","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A"}],"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":0,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{},"id":11,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"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":4,"stack":false,"steppedLine":false,"targets":[{"expr":"go_goroutines{cluster=\"$cluster\", job=\"kube-controller-manager\",instance=~\"$instance\"}","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Goroutines","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":"Data Source","name":"datasource","options":[],"query":"prometheus","refresh":1,"regex":"","type":"datasource"},{"allValue":null,"current":{},"datasource":"$datasource","hide":`}}{{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}{{`,"includeAll":false,"label":"cluster","multi":false,"name":"cluster","options":[],"query":"label_values(up{job=\"kube-controller-manager\"}, cluster)","refresh":2,"regex":"","sort":1,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"allValue":null,"current":{},"datasource":"$datasource","hide":0,"includeAll":true,"label":null,"multi":false,"name":"instance","options":[],"query":"label_values(up{cluster=\"$cluster\", job=\"kube-controller-manager\"}, instance)","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 / Controller Manager","uid":"72e0e05bef5099e5f049b05fdc429ed4","version":0}`}}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/etcd.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/etcd.yaml
old mode 100755
new mode 100644
index 4379c9cfe4..a1691d92cf
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/etcd.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/etcd.yaml
@@ -1,1114 +1,24 @@
{{- /*
-Generated from 'etcd' from https://raw.githubusercontent.com/etcd-io/etcd/master/Documentation/op-guide/grafana.json
+Generated from 'etcd' from contrib/mixin/mixin.libsonnet
Do not change in-place! In order to change this file first read following link:
-https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
+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.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.kubeEtcd.enabled }}
+{{- 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.kubeEtcd.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "etcd" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "etcd" | 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"
+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }}
{{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.labels" $ | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-grafana
+{{ include "kube-prometheus-stack.labels" $ | indent 4 }}
data:
etcd.json: |-
- {
- "annotations": {
- "list": []
- },
- "description": "etcd sample Grafana dashboard with Prometheus",
- "editable": true,
- "gnetId": null,
- "hideControls": false,
- "id": 6,
- "links": [],
- "refresh": "10s",
- "rows": [
- {
- "collapse": false,
- "editable": true,
- "height": "250px",
- "panels": [
- {
- "cacheTimeout": null,
- "colorBackground": false,
- "colorValue": false,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "datasource": "$datasource",
- "editable": true,
- "error": false,
- "format": "none",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "id": 28,
- "interval": null,
- "isNew": 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
- },
- "targets": [
- {
- "expr": "sum(etcd_server_has_leader{job=\"$cluster\"})",
- "intervalFactor": 2,
- "legendFormat": "",
- "metric": "etcd_server_has_leader",
- "refId": "A",
- "step": 20
- }
- ],
- "thresholds": "",
- "title": "Up",
- "type": "singlestat",
- "valueFontSize": "200%",
- "valueMaps": [
- {
- "op": "=",
- "text": "N/A",
- "value": "null"
- }
- ],
- "valueName": "avg"
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": "$datasource",
- "editable": true,
- "error": false,
- "fill": 0,
- "id": 23,
- "isNew": true,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": false,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 2,
- "links": [],
- "nullPointMode": "connected",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 5,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(rate(grpc_server_started_total{job=\"$cluster\",grpc_type=\"unary\"}[5m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "RPC Rate",
- "metric": "grpc_server_started_total",
- "refId": "A",
- "step": 2
- },
- {
- "expr": "sum(rate(grpc_server_handled_total{job=\"$cluster\",grpc_type=\"unary\",grpc_code!=\"OK\"}[5m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "RPC Failed Rate",
- "metric": "grpc_server_handled_total",
- "refId": "B",
- "step": 2
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "RPC Rate",
- "tooltip": {
- "msResolution": false,
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "ops",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": "$datasource",
- "editable": true,
- "error": false,
- "fill": 0,
- "id": 41,
- "isNew": true,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": false,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 2,
- "links": [],
- "nullPointMode": "connected",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 4,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(grpc_server_started_total{job=\"$cluster\",grpc_service=\"etcdserverpb.Watch\",grpc_type=\"bidi_stream\"}) - sum(grpc_server_handled_total{job=\"$cluster\",grpc_service=\"etcdserverpb.Watch\",grpc_type=\"bidi_stream\"})",
- "intervalFactor": 2,
- "legendFormat": "Watch Streams",
- "metric": "grpc_server_handled_total",
- "refId": "A",
- "step": 4
- },
- {
- "expr": "sum(grpc_server_started_total{job=\"$cluster\",grpc_service=\"etcdserverpb.Lease\",grpc_type=\"bidi_stream\"}) - sum(grpc_server_handled_total{job=\"$cluster\",grpc_service=\"etcdserverpb.Lease\",grpc_type=\"bidi_stream\"})",
- "intervalFactor": 2,
- "legendFormat": "Lease Streams",
- "metric": "grpc_server_handled_total",
- "refId": "B",
- "step": 4
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Active Streams",
- "tooltip": {
- "msResolution": false,
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": "",
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "title": "Row"
- },
- {
- "collapse": false,
- "editable": true,
- "height": "250px",
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "datasource": "$datasource",
- "decimals": null,
- "editable": true,
- "error": false,
- "fill": 0,
- "grid": {},
- "id": 1,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": false,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 2,
- "links": [],
- "nullPointMode": "connected",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "etcd_mvcc_db_total_size_in_bytes{job=\"$cluster\"}",
- "hide": false,
- "interval": "",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} DB Size",
- "metric": "",
- "refId": "A",
- "step": 4
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "DB Size",
- "tooltip": {
- "msResolution": false,
- "shared": true,
- "sort": 0,
- "value_type": "cumulative"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "bytes",
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "logBase": 1,
- "max": null,
- "min": null,
- "show": false
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": "$datasource",
- "editable": true,
- "error": false,
- "fill": 0,
- "grid": {},
- "id": 3,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": false,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 2,
- "links": [],
- "nullPointMode": "connected",
- "percentage": false,
- "pointradius": 1,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 4,
- "stack": false,
- "steppedLine": true,
- "targets": [
- {
- "expr": "histogram_quantile(0.99, sum(rate(etcd_disk_wal_fsync_duration_seconds_bucket{job=\"$cluster\"}[5m])) by (instance, le))",
- "hide": false,
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} WAL fsync",
- "metric": "etcd_disk_wal_fsync_duration_seconds_bucket",
- "refId": "A",
- "step": 4
- },
- {
- "expr": "histogram_quantile(0.99, sum(rate(etcd_disk_backend_commit_duration_seconds_bucket{job=\"$cluster\"}[5m])) by (instance, le))",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} DB fsync",
- "metric": "etcd_disk_backend_commit_duration_seconds_bucket",
- "refId": "B",
- "step": 4
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Disk Sync Duration",
- "tooltip": {
- "msResolution": false,
- "shared": true,
- "sort": 0,
- "value_type": "cumulative"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "s",
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "logBase": 1,
- "max": null,
- "min": null,
- "show": false
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": "$datasource",
- "editable": true,
- "error": false,
- "fill": 0,
- "id": 29,
- "isNew": true,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": false,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 2,
- "links": [],
- "nullPointMode": "connected",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "process_resident_memory_bytes{job=\"$cluster\"}",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} Resident Memory",
- "metric": "process_resident_memory_bytes",
- "refId": "A",
- "step": 4
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory",
- "tooltip": {
- "msResolution": false,
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "bytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "title": "New row"
- },
- {
- "collapse": false,
- "editable": true,
- "height": "250px",
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "datasource": "$datasource",
- "editable": true,
- "error": false,
- "fill": 5,
- "id": 22,
- "isNew": true,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": false,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 2,
- "links": [],
- "nullPointMode": "connected",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 3,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "rate(etcd_network_client_grpc_received_bytes_total{job=\"$cluster\"}[5m])",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} Client Traffic In",
- "metric": "etcd_network_client_grpc_received_bytes_total",
- "refId": "A",
- "step": 4
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Client Traffic In",
- "tooltip": {
- "msResolution": false,
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "Bps",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": "$datasource",
- "editable": true,
- "error": false,
- "fill": 5,
- "id": 21,
- "isNew": true,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": false,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 2,
- "links": [],
- "nullPointMode": "connected",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 3,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "rate(etcd_network_client_grpc_sent_bytes_total{job=\"$cluster\"}[5m])",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} Client Traffic Out",
- "metric": "etcd_network_client_grpc_sent_bytes_total",
- "refId": "A",
- "step": 4
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Client Traffic Out",
- "tooltip": {
- "msResolution": false,
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "Bps",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": "$datasource",
- "editable": true,
- "error": false,
- "fill": 0,
- "id": 20,
- "isNew": true,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": false,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 2,
- "links": [],
- "nullPointMode": "connected",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 3,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(rate(etcd_network_peer_received_bytes_total{job=\"$cluster\"}[5m])) by (instance)",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} Peer Traffic In",
- "metric": "etcd_network_peer_received_bytes_total",
- "refId": "A",
- "step": 4
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Peer Traffic In",
- "tooltip": {
- "msResolution": false,
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "Bps",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": "$datasource",
- "decimals": null,
- "editable": true,
- "error": false,
- "fill": 0,
- "grid": {},
- "id": 16,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": false,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 2,
- "links": [],
- "nullPointMode": "connected",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 3,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(rate(etcd_network_peer_sent_bytes_total{job=\"$cluster\"}[5m])) by (instance)",
- "hide": false,
- "interval": "",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} Peer Traffic Out",
- "metric": "etcd_network_peer_sent_bytes_total",
- "refId": "A",
- "step": 4
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Peer Traffic Out",
- "tooltip": {
- "msResolution": false,
- "shared": true,
- "sort": 0,
- "value_type": "cumulative"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "Bps",
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "title": "New row"
- },
- {
- "collapse": false,
- "editable": true,
- "height": "250px",
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "datasource": "$datasource",
- "editable": true,
- "error": false,
- "fill": 0,
- "id": 40,
- "isNew": true,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": false,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 2,
- "links": [],
- "nullPointMode": "connected",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(rate(etcd_server_proposals_failed_total{job=\"$cluster\"}[5m]))",
- "intervalFactor": 2,
- "legendFormat": "Proposal Failure Rate",
- "metric": "etcd_server_proposals_failed_total",
- "refId": "A",
- "step": 2
- },
- {
- "expr": "sum(etcd_server_proposals_pending{job=\"$cluster\"})",
- "intervalFactor": 2,
- "legendFormat": "Proposal Pending Total",
- "metric": "etcd_server_proposals_pending",
- "refId": "B",
- "step": 2
- },
- {
- "expr": "sum(rate(etcd_server_proposals_committed_total{job=\"$cluster\"}[5m]))",
- "intervalFactor": 2,
- "legendFormat": "Proposal Commit Rate",
- "metric": "etcd_server_proposals_committed_total",
- "refId": "C",
- "step": 2
- },
- {
- "expr": "sum(rate(etcd_server_proposals_applied_total{job=\"$cluster\"}[5m]))",
- "intervalFactor": 2,
- "legendFormat": "Proposal Apply Rate",
- "refId": "D",
- "step": 2
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Raft Proposals",
- "tooltip": {
- "msResolution": false,
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": "",
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": "$datasource",
- "decimals": 0,
- "editable": true,
- "error": false,
- "fill": 0,
- "id": 19,
- "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",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "changes(etcd_server_leader_changes_seen_total{job=\"$cluster\"}[1d])",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} Total Leader Elections Per Day",
- "metric": "etcd_server_leader_changes_seen_total",
- "refId": "A",
- "step": 2
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Total Leader Elections Per Day",
- "tooltip": {
- "msResolution": false,
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "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
- }
- ]
- }
- ],
- "title": "New row"
- }
- ],
- "schemaVersion": 13,
- "sharedCrosshair": false,
- "style": "dark",
- "tags": [],
- "templating": {
- "list": [
- {
- "current": {
- "text": "Prometheus",
- "value": "Prometheus"
- },
- "hide": 0,
- "label": null,
- "name": "datasource",
- "options": [],
- "query": "prometheus",
- "refresh": 1,
- "regex": "",
- "type": "datasource"
- },
- {
- "allValue": null,
- "current": {
- "text": "prod",
- "value": "prod"
- },
- "datasource": "$datasource",
- "hide": 0,
- "includeAll": false,
- "label": "cluster",
- "multi": false,
- "name": "cluster",
- "options": [],
- "query": "label_values(etcd_server_has_leader, job)",
- "refresh": 1,
- "regex": "",
- "sort": 2,
- "tagValuesQuery": "",
- "tags": [],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- }
- ]
- },
- "time": {
- "from": "now-15m",
- "to": "now"
- },
- "timepicker": {
- "now": true,
- "refresh_intervals": [
- "5s",
- "10s",
- "30s",
- "1m",
- "5m",
- "15m",
- "30m",
- "1h",
- "2h",
- "1d"
- ],
- "time_options": [
- "5m",
- "15m",
- "1h",
- "6h",
- "12h",
- "24h",
- "2d",
- "7d",
- "30d"
- ]
- },
- "timezone": "browser",
- "title": "etcd",
- "version": 215
- }
+ {{`{"description":"etcd sample Grafana dashboard with Prometheus","panels":[{"datasource":{"type":"datasource","uid":"-- Mixed --"},"gridPos":{"h":7,"w":6,"x":0,"y":0},"id":1,"interval":"1m","options":{"colorMode":"none","graphMode":"none","reduceOptions":{"calcs":["lastNotNull"]}},"pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"sum(etcd_server_has_leader{job=~\".*etcd.*\", job=\"$cluster\"})","legendFormat":"{{cluster}} - {{namespace}}\n"}],"title":"Up","type":"stat"},{"datasource":{"type":"datasource","uid":"-- Mixed --"},"fieldConfig":{"defaults":{"custom":{"fillOpacity":0,"lineWidth":2,"showPoints":"never"},"unit":"ops"}},"gridPos":{"h":7,"w":10,"x":6,"y":0},"id":2,"interval":"1m","pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"sum(rate(grpc_server_started_total{job=~\".*etcd.*\", job=\"$cluster\",grpc_type=\"unary\"}[$__rate_interval]))","legendFormat":"RPC rate"},{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"sum(rate(grpc_server_handled_total{job=~\".*etcd.*\", job=\"$cluster\",grpc_type=\"unary\",grpc_code=~\"Unknown|FailedPrecondition|ResourceExhausted|Internal|Unavailable|DataLoss|DeadlineExceeded\"}[$__rate_interval]))","legendFormat":"RPC failed rate"}],"title":"RPC rate","type":"timeseries"},{"datasource":{"type":"datasource","uid":"-- Mixed --"},"fieldConfig":{"defaults":{"custom":{"fillOpacity":0,"lineWidth":2,"showPoints":"never"}}},"gridPos":{"h":7,"w":8,"x":16,"y":0},"id":3,"interval":"1m","pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"sum(grpc_server_started_total{job=~\".*etcd.*\",job=\"$cluster\",grpc_service=\"etcdserverpb.Watch\",grpc_type=\"bidi_stream\"}) - sum(grpc_server_handled_total{job=\"$cluster\",grpc_service=\"etcdserverpb.Watch\",grpc_type=\"bidi_stream\"})","legendFormat":"Watch streams"},{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"sum(grpc_server_started_total{job=~\".*etcd.*\",job=\"$cluster\",grpc_service=\"etcdserverpb.Lease\",grpc_type=\"bidi_stream\"}) - sum(grpc_server_handled_total{job=\"$cluster\",grpc_service=\"etcdserverpb.Lease\",grpc_type=\"bidi_stream\"})","legendFormat":"Lease streams"}],"title":"Active streams","type":"timeseries"},{"datasource":{"type":"datasource","uid":"-- Mixed --"},"fieldConfig":{"defaults":{"custom":{"fillOpacity":0,"lineWidth":2,"showPoints":"never"},"unit":"bytes"}},"gridPos":{"h":7,"w":8,"x":0,"y":25},"id":4,"interval":"1m","pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"etcd_mvcc_db_total_size_in_bytes{job=~\".*etcd.*\", job=\"$cluster\"}","legendFormat":"{{instance}} DB size"}],"title":"DB size","type":"timeseries"},{"datasource":{"type":"datasource","uid":"-- Mixed --"},"fieldConfig":{"defaults":{"custom":{"fillOpacity":0,"lineWidth":2,"showPoints":"never"},"unit":"s"}},"gridPos":{"h":7,"w":8,"x":8,"y":25},"id":5,"interval":"1m","pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"histogram_quantile(0.99, sum(rate(etcd_disk_wal_fsync_duration_seconds_bucket{job=~\".*etcd.*\", job=\"$cluster\"}[$__rate_interval])) by (instance, le))","legendFormat":"{{instance}} WAL fsync"},{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"histogram_quantile(0.99, sum(rate(etcd_disk_backend_commit_duration_seconds_bucket{job=~\".*etcd.*\", job=\"$cluster\"}[$__rate_interval])) by (instance, le))","legendFormat":"{{instance}} DB fsync"}],"title":"Disk sync duration","type":"timeseries"},{"datasource":{"type":"datasource","uid":"-- Mixed --"},"fieldConfig":{"defaults":{"custom":{"fillOpacity":0,"lineWidth":2,"showPoints":"never"},"unit":"bytes"}},"gridPos":{"h":7,"w":8,"x":16,"y":25},"id":6,"interval":"1m","pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"process_resident_memory_bytes{job=~\".*etcd.*\", job=\"$cluster\"}","legendFormat":"{{instance}} resident memory"}],"title":"Memory","type":"timeseries"},{"datasource":{"type":"datasource","uid":"-- Mixed --"},"fieldConfig":{"defaults":{"custom":{"fillOpacity":0,"lineWidth":2,"showPoints":"never"},"unit":"Bps"}},"gridPos":{"h":7,"w":6,"x":0,"y":50},"id":7,"interval":"1m","pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"rate(etcd_network_client_grpc_received_bytes_total{job=~\".*etcd.*\", job=\"$cluster\"}[$__rate_interval])","legendFormat":"{{instance}} client traffic in"}],"title":"Client traffic in","type":"timeseries"},{"datasource":{"type":"datasource","uid":"-- Mixed --"},"fieldConfig":{"defaults":{"custom":{"fillOpacity":0,"lineWidth":2,"showPoints":"never"},"unit":"Bps"}},"gridPos":{"h":7,"w":6,"x":6,"y":50},"id":8,"interval":"1m","pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"rate(etcd_network_client_grpc_sent_bytes_total{job=~\".*etcd.*\", job=\"$cluster\"}[$__rate_interval])","legendFormat":"{{instance}} client traffic out"}],"title":"Client traffic out","type":"timeseries"},{"datasource":{"type":"datasource","uid":"-- Mixed --"},"fieldConfig":{"defaults":{"custom":{"fillOpacity":0,"lineWidth":2,"showPoints":"never"},"unit":"Bps"}},"gridPos":{"h":7,"w":6,"x":12,"y":50},"id":9,"interval":"1m","pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"sum(rate(etcd_network_peer_received_bytes_total{job=~\".*etcd.*\", job=\"$cluster\"}[$__rate_interval])) by (instance)","legendFormat":"{{instance}} peer traffic in"}],"title":"Peer traffic in","type":"timeseries"},{"datasource":{"type":"datasource","uid":"-- Mixed --"},"fieldConfig":{"defaults":{"custom":{"fillOpacity":0,"lineWidth":2,"showPoints":"never"},"unit":"Bps"}},"gridPos":{"h":7,"w":6,"x":18,"y":50},"id":10,"interval":"1m","pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"sum(rate(etcd_network_peer_sent_bytes_total{job=~\".*etcd.*\", job=\"$cluster\"}[$__rate_interval])) by (instance)","legendFormat":"{{instance}} peer traffic out"}],"title":"Peer traffic out","type":"timeseries"},{"datasource":{"type":"datasource","uid":"-- Mixed --"},"fieldConfig":{"defaults":{"custom":{"fillOpacity":0,"lineWidth":2,"showPoints":"never"}}},"gridPos":{"h":7,"w":8,"x":0,"y":75},"id":11,"interval":"1m","pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"changes(etcd_server_leader_changes_seen_total{job=~\".*etcd.*\", job=\"$cluster\"}[1d])","legendFormat":"{{instance}} total leader elections per day"}],"title":"Raft proposals","type":"timeseries"},{"datasource":{"type":"datasource","uid":"-- Mixed --"},"fieldConfig":{"defaults":{"custom":{"fillOpacity":0,"lineWidth":2,"showPoints":"never"}}},"gridPos":{"h":7,"w":8,"x":8,"y":75},"id":12,"interval":"1m","pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"changes(etcd_server_leader_changes_seen_total{job=~\".*etcd.*\", job=\"$cluster\"}[1d])","legendFormat":"{{instance}} total leader elections per day"}],"title":"Total leader elections per day","type":"timeseries"},{"datasource":{"type":"datasource","uid":"-- Mixed --"},"fieldConfig":{"defaults":{"custom":{"fillOpacity":0,"lineWidth":2,"showPoints":"never"},"unit":"s"}},"gridPos":{"h":7,"w":8,"x":16,"y":75},"id":13,"interval":"1m","pluginVersion":"v10.0.0","targets":[{"datasource":{"type":"prometheus","uid":"$datasource"},"expr":"histogram_quantile(0.99, sum by (instance, le) (rate(etcd_network_peer_round_trip_time_seconds_bucket{job=~\".*etcd.*\", job=\"$cluster\"}[$__rate_interval])))","legendFormat":"{{instance}} peer round trip time"}],"title":"Peer round trip time","type":"timeseries"}],"refresh":"10s","schemaVersion":36,"tags":["etcd-mixin"],"templating":{"list":[{"label":"Data Source","name":"datasource","query":"prometheus","type":"datasource"},{"datasource":{"type":"prometheus","uid":"${datasource}"},"label":"cluster","name":"job","query":"label_values(etcd_server_has_leader{job=~\".*etcd.*\"}, job)","refresh":2,"type":"query"}]},"time":{"from":"now-15m","to":"now"},"timezone": "`}}{{ .Values.grafana.defaultDashboardsTimezone }}{{`","title":"etcd","uid":"c2f4e12cdf69feb95caa41a5a1b423d9"}`}}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/grafana-overview.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/grafana-overview.yaml
new file mode 100644
index 0000000000..be7a82ff6d
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/grafana-overview.yaml
@@ -0,0 +1,24 @@
+{{- /*
+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":{"selected":true,"text":"dev-cortex","value":"dev-cortex"},"description":null,"error":null,"hide":0,"includeAll":false,"label":null,"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/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-coredns.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-coredns.yaml
old mode 100755
new mode 100644
index ec4e91b591..4fa2a3eaeb
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-coredns.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-coredns.yaml
@@ -1,1340 +1,20 @@
{{- /* Added manually, can be changed in-place. */ -}}
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.coreDns.enabled }}
+{{- 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.coreDns.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-coredns" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "k8s-coredns" | 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"
+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }}
{{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.labels" $ | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-grafana
+{{ include "kube-prometheus-stack.labels" $ | indent 4 }}
data:
k8s-coredns.json: |-
- {
- "__inputs": [
-
- ],
- "__requires": [
-
- ],
- "annotations": {
- "list": [
-
- ]
- },
- "editable": false,
- "gnetId": null,
- "graphTooltip": 0,
- "hideControls": false,
- "id": null,
- "links": [
-
- ],
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "editable": true,
- "error": false,
- "fill": 1,
- "grid": {},
- "gridPos": {
- "h": 7,
- "w": 8,
- "x": 0,
- "y": 0
- },
- "id": 1,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 2,
- "links": [],
- "nullPointMode": "connected",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [
- {
- "alias": "total",
- "yaxis": 2
- }
- ],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(rate(coredns_dns_request_count_total{instance=~\"$instance\"}[5m])) by (proto)",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{proto}}`}}",
- "refId": "A",
- "step": 60
- },
- {
- "expr": "sum(rate(coredns_dns_request_count_total{instance=~\"$instance\"}[5m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "total",
- "refId": "B",
- "step": 60
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Requests (total)",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "cumulative"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "pps",
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- },
- {
- "format": "pps",
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "editable": true,
- "error": false,
- "fill": 1,
- "grid": {},
- "gridPos": {
- "h": 7,
- "w": 8,
- "x": 8,
- "y": 0
- },
- "id": 12,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 2,
- "links": [],
- "nullPointMode": "connected",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [
- {
- "alias": "total",
- "yaxis": 2
- },
- {
- "alias": "other",
- "yaxis": 2
- }
- ],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(rate(coredns_dns_request_type_count_total{instance=~\"$instance\"}[5m])) by (type)",
- "intervalFactor": 2,
- "legendFormat": "{{`{{type}}`}}",
- "refId": "A",
- "step": 60
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Requests (by qtype)",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "cumulative"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "pps",
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- },
- {
- "format": "pps",
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "editable": true,
- "error": false,
- "fill": 1,
- "grid": {},
- "gridPos": {
- "h": 7,
- "w": 8,
- "x": 16,
- "y": 0
- },
- "id": 2,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 2,
- "links": [],
- "nullPointMode": "connected",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [
- {
- "alias": "total",
- "yaxis": 2
- }
- ],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(rate(coredns_dns_request_count_total{instance=~\"$instance\"}[5m])) by (zone)",
- "intervalFactor": 2,
- "legendFormat": "{{`{{zone}}`}}",
- "refId": "A",
- "step": 60
- },
- {
- "expr": "sum(rate(coredns_dns_request_count_total{instance=~\"$instance\"}[5m]))",
- "intervalFactor": 2,
- "legendFormat": "total",
- "refId": "B",
- "step": 60
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Requests (by zone)",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "cumulative"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "pps",
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- },
- {
- "format": "pps",
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "editable": true,
- "error": false,
- "fill": 1,
- "grid": {},
- "gridPos": {
- "h": 7,
- "w": 12,
- "x": 0,
- "y": 7
- },
- "id": 10,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 2,
- "links": [],
- "nullPointMode": "connected",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [
- {
- "alias": "total",
- "yaxis": 2
- }
- ],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(rate(coredns_dns_request_do_count_total{instance=~\"$instance\"}[5m]))",
- "intervalFactor": 2,
- "legendFormat": "DO",
- "refId": "A",
- "step": 40
- },
- {
- "expr": "sum(rate(coredns_dns_request_count_total{instance=~\"$instance\"}[5m]))",
- "intervalFactor": 2,
- "legendFormat": "total",
- "refId": "B",
- "step": 40
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Requests (DO bit)",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "cumulative"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "pps",
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- },
- {
- "format": "pps",
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "editable": true,
- "error": false,
- "fill": 1,
- "grid": {},
- "gridPos": {
- "h": 7,
- "w": 6,
- "x": 12,
- "y": 7
- },
- "id": 9,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 2,
- "links": [],
- "nullPointMode": "connected",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [
- {
- "alias": "tcp:90%",
- "yaxis": 2
- },
- {
- "alias": "tcp:99%",
- "yaxis": 2
- },
- {
- "alias": "tcp:50%",
- "yaxis": 2
- }
- ],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "histogram_quantile(0.99, sum(rate(coredns_dns_request_size_bytes_bucket{instance=~\"$instance\",proto=\"udp\"}[5m])) by (le,proto))",
- "intervalFactor": 2,
- "legendFormat": "{{`{{proto}}`}}:99%",
- "refId": "A",
- "step": 60
- },
- {
- "expr": "histogram_quantile(0.90, sum(rate(coredns_dns_request_size_bytes_bucket{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))",
- "intervalFactor": 2,
- "legendFormat": "{{`{{proto}}`}}:50%",
- "refId": "C",
- "step": 60
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Requests (size, udp)",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "cumulative"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "bytes",
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- },
- {
- "format": "short",
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "editable": true,
- "error": false,
- "fill": 1,
- "grid": {},
- "gridPos": {
- "h": 7,
- "w": 6,
- "x": 18,
- "y": 7
- },
- "id": 14,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 2,
- "links": [],
- "nullPointMode": "connected",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [
- {
- "alias": "tcp:90%",
- "yaxis": 1
- },
- {
- "alias": "tcp:99%",
- "yaxis": 1
- },
- {
- "alias": "tcp:50%",
- "yaxis": 1
- }
- ],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "histogram_quantile(0.99, sum(rate(coredns_dns_request_size_bytes_bucket{instance=~\"$instance\",proto=\"tcp\"}[5m])) by (le,proto))",
- "intervalFactor": 2,
- "legendFormat": "{{`{{proto}}`}}:99%",
- "refId": "A",
- "step": 60
- },
- {
- "expr": "histogram_quantile(0.90, sum(rate(coredns_dns_request_size_bytes_bucket{instance=~\"$instance\",proto=\"tcp\"}[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=\"tcp\"}[5m])) by (le,proto))",
- "intervalFactor": 2,
- "legendFormat": "{{`{{proto}}`}}:50%",
- "refId": "C",
- "step": 60
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Requests (size, tcp)",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "cumulative"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "bytes",
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- },
- {
- "format": "short",
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "editable": true,
- "error": false,
- "fill": 1,
- "grid": {},
- "gridPos": {
- "h": 7,
- "w": 12,
- "x": 0,
- "y": 14
- },
- "id": 5,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 2,
- "links": [],
- "nullPointMode": "connected",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(rate(coredns_dns_response_rcode_count_total{instance=~\"$instance\"}[5m])) by (rcode)",
- "intervalFactor": 2,
- "legendFormat": "{{`{{rcode}}`}}",
- "refId": "A",
- "step": 40
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Responses (by rcode)",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "cumulative"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "pps",
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- },
- {
- "format": "short",
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "editable": true,
- "error": false,
- "fill": 1,
- "grid": {},
- "gridPos": {
- "h": 7,
- "w": 12,
- "x": 12,
- "y": 14
- },
- "id": 3,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 2,
- "links": [],
- "nullPointMode": "connected",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "histogram_quantile(0.99, sum(rate(coredns_dns_request_duration_seconds_bucket{instance=~\"$instance\"}[5m])) by (le, job))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "99%",
- "refId": "A",
- "step": 40
- },
- {
- "expr": "histogram_quantile(0.90, sum(rate(coredns_dns_request_duration_seconds_bucket{instance=~\"$instance\"}[5m])) by (le))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "90%",
- "refId": "B",
- "step": 40
- },
- {
- "expr": "histogram_quantile(0.50, sum(rate(coredns_dns_request_duration_seconds_bucket{instance=~\"$instance\"}[5m])) by (le))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "50%",
- "refId": "C",
- "step": 40
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Responses (duration)",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "cumulative"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "ms",
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- },
- {
- "format": "short",
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "editable": true,
- "error": false,
- "fill": 1,
- "grid": {},
- "gridPos": {
- "h": 7,
- "w": 12,
- "x": 0,
- "y": 21
- },
- "id": 8,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 2,
- "links": [],
- "nullPointMode": "connected",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [
- {
- "alias": "udp:50%",
- "yaxis": 1
- },
- {
- "alias": "tcp:50%",
- "yaxis": 2
- },
- {
- "alias": "tcp:90%",
- "yaxis": 2
- },
- {
- "alias": "tcp:99%",
- "yaxis": 2
- }
- ],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "histogram_quantile(0.99, sum(rate(coredns_dns_response_size_bytes_bucket{instance=~\"$instance\",proto=\"udp\"}[5m])) by (le,proto)) ",
- "intervalFactor": 2,
- "legendFormat": "{{`{{proto}}`}}:99%",
- "refId": "A",
- "step": 40
- },
- {
- "expr": "histogram_quantile(0.90, sum(rate(coredns_dns_response_size_bytes_bucket{instance=~\"$instance\",proto=\"udp\"}[5m])) by (le,proto)) ",
- "intervalFactor": 2,
- "legendFormat": "{{`{{proto}}`}}:90%",
- "refId": "B",
- "step": 40
- },
- {
- "expr": "histogram_quantile(0.50, sum(rate(coredns_dns_response_size_bytes_bucket{instance=~\"$instance\",proto=\"udp\"}[5m])) by (le,proto)) ",
- "intervalFactor": 2,
- "legendFormat": "{{`{{proto}}`}}:50%",
- "metric": "",
- "refId": "C",
- "step": 40
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Responses (size, udp)",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "cumulative"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "bytes",
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- },
- {
- "format": "short",
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "editable": true,
- "error": false,
- "fill": 1,
- "grid": {},
- "gridPos": {
- "h": 7,
- "w": 12,
- "x": 12,
- "y": 21
- },
- "id": 13,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 2,
- "links": [],
- "nullPointMode": "connected",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [
- {
- "alias": "udp:50%",
- "yaxis": 1
- },
- {
- "alias": "tcp:50%",
- "yaxis": 1
- },
- {
- "alias": "tcp:90%",
- "yaxis": 1
- },
- {
- "alias": "tcp:99%",
- "yaxis": 1
- }
- ],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "histogram_quantile(0.99, sum(rate(coredns_dns_response_size_bytes_bucket{instance=~\"$instance\",proto=\"tcp\"}[5m])) by (le,proto)) ",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{proto}}`}}:99%",
- "refId": "A",
- "step": 40
- },
- {
- "expr": "histogram_quantile(0.90, sum(rate(coredns_dns_response_size_bytes_bucket{instance=~\"$instance\",proto=\"tcp\"}[5m])) by (le,proto)) ",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{proto}}`}}:90%",
- "refId": "B",
- "step": 40
- },
- {
- "expr": "histogram_quantile(0.50, sum(rate(coredns_dns_response_size_bytes_bucket{instance=~\"$instance\",proto=\"tcp\"}[5m])) by (le, proto)) ",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{proto}}`}}:50%",
- "metric": "",
- "refId": "C",
- "step": 40
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Responses (size, tcp)",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "cumulative"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "bytes",
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- },
- {
- "format": "short",
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "editable": true,
- "error": false,
- "fill": 1,
- "grid": {},
- "gridPos": {
- "h": 7,
- "w": 12,
- "x": 0,
- "y": 28
- },
- "id": 15,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 2,
- "links": [],
- "nullPointMode": "connected",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(coredns_cache_size{instance=~\"$instance\"}) by (type)",
- "intervalFactor": 2,
- "legendFormat": "{{`{{type}}`}}",
- "refId": "A",
- "step": 40
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Cache (size)",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "cumulative"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- },
- {
- "format": "short",
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "editable": true,
- "error": false,
- "fill": 1,
- "grid": {},
- "gridPos": {
- "h": 7,
- "w": 12,
- "x": 12,
- "y": 28
- },
- "id": 16,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 2,
- "links": [],
- "nullPointMode": "connected",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [
- {
- "alias": "misses",
- "yaxis": 2
- }
- ],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(rate(coredns_cache_hits_total{instance=~\"$instance\"}[5m])) by (type)",
- "intervalFactor": 2,
- "legendFormat": "hits:{{`{{type}}`}}",
- "refId": "A",
- "step": 40
- },
- {
- "expr": "sum(rate(coredns_cache_misses_total{instance=~\"$instance\"}[5m])) by (type)",
- "intervalFactor": 2,
- "legendFormat": "misses",
- "refId": "B",
- "step": 40
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Cache (hitrate)",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "cumulative"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "pps",
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- },
- {
- "format": "pps",
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- }
- ],
- "schemaVersion": 16,
- "style": "dark",
- "tags": [],
- "templating": {
- "list": [
- {
- "current": {
- "text": "default",
- "value": "default"
- },
- "hide": 0,
- "label": null,
- "name": "datasource",
- "options": [
-
- ],
- "query": "prometheus",
- "refresh": 1,
- "regex": "",
- "type": "datasource"
- },
- {
- "allValue": ".*",
- "current": {
- "selected": true,
- "tags": [],
- "text": "172.16.1.8:9153",
- "value": "172.16.1.8:9153"
- },
- "datasource": "$datasource",
- "hide": 0,
- "includeAll": true,
- "label": "Instance",
- "multi": false,
- "name": "instance",
- "options": [],
- "query": "up{job=\"coredns\"}",
- "refresh": 1,
- "regex": ".*instance=\"(.*?)\".*",
- "skipUrlSync": false,
- "sort": 0,
- "tagValuesQuery": "",
- "tags": [],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- }
- ]
- },
- "time": {
- "from": "now-3h",
- "to": "now"
- },
- "timepicker": {
- "now": true,
- "refresh_intervals": [
- "5s",
- "10s",
- "30s",
- "1m",
- "5m",
- "15m",
- "30m",
- "1h",
- "2h",
- "1d"
- ],
- "time_options": [
- "5m",
- "15m",
- "1h",
- "6h",
- "12h",
- "24h",
- "2d",
- "7d",
- "30d"
- ]
- },
- "timezone": "utc",
- "title": "CoreDNS",
- "uid": "vkQ0UHxik",
- "version": 1
- }
+ {{`{"annotations":{"list":[{"builtIn":1,"datasource":"-- Grafana --","enable":true,"hide":true,"iconColor":"rgba(0, 211, 255, 1)","name":"Annotations & Alerts","type":"dashboard"}]},"description":"A dashboard for the CoreDNS DNS server with updated metrics for version 1.7.0+. Based on the CoreDNS dashboard by buhay.","editable":true,"gnetId":12539,"graphTooltip":0,"iteration":1603798405693,"links":[{"icon":"external link","tags":[],"targetBlank":true,"title":"CoreDNS.io","type":"link","url":"https://coredns.io"}],"panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","editable":true,"error":false,"fieldConfig":{"defaults":{"custom":{},"links":[],"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"fill":1,"fillGradient":0,"grid":{},"gridPos":{"h":7,"w":8,"x":0,"y":0},"hiddenSeries":false,"id":2,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":2,"links":[],"nullPointMode":"connected","options":{"alertThreshold":true},"percentage":false,"pluginVersion":"7.2.0","pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[{"alias":"total","yaxis":2}],"spaceLength":10,"stack":true,"steppedLine":false,"targets":[{"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,"legendFormat":"{{ proto }}","refId":"A","step":60}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Requests (total)","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"pps","logBase":1,"max":null,"min":0,"show":true},{"format":"pps","logBase":1,"max":null,"min":0,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","editable":true,"error":false,"fieldConfig":{"defaults":{"custom":{},"links":[]},"overrides":[]},"fill":1,"fillGradient":0,"grid":{},"gridPos":{"h":7,"w":8,"x":8,"y":0},"hiddenSeries":false,"id":4,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":2,"links":[],"nullPointMode":"connected","options":{"alertThreshold":true},"percentage":false,"pluginVersion":"7.2.0","pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[{"alias":"total","yaxis":2},{"alias":"other","yaxis":2}],"spaceLength":10,"stack":true,"steppedLine":false,"targets":[{"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 }}","refId":"A","step":60}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Requests (by qtype)","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"pps","logBase":1,"max":null,"min":0,"show":true},{"format":"pps","logBase":1,"max":null,"min":0,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","editable":true,"error":false,"fieldConfig":{"defaults":{"custom":{},"links":[]},"overrides":[]},"fill":1,"fillGradient":0,"grid":{},"gridPos":{"h":7,"w":8,"x":16,"y":0},"hiddenSeries":false,"id":6,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":2,"links":[],"nullPointMode":"connected","options":{"alertThreshold":true},"percentage":false,"pluginVersion":"7.2.0","pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[{"alias":"total","yaxis":2}],"spaceLength":10,"stack":true,"steppedLine":false,"targets":[{"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 }}","refId":"A","step":60}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Requests (by zone)","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"pps","logBase":1,"max":null,"min":0,"show":true},{"format":"pps","logBase":1,"max":null,"min":0,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","editable":true,"error":false,"fieldConfig":{"defaults":{"custom":{},"links":[]},"overrides":[]},"fill":1,"fillGradient":0,"grid":{},"gridPos":{"h":7,"w":12,"x":0,"y":7},"hiddenSeries":false,"id":8,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":2,"links":[],"nullPointMode":"connected","options":{"alertThreshold":true},"percentage":false,"pluginVersion":"7.2.0","pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[{"alias":"total","yaxis":2}],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"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","refId":"A","step":40},{"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","refId":"B","step":40}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Requests (DO bit)","tooltip":{"shared":true,"sort":2,"value_type":"cumulative"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"pps","logBase":1,"max":null,"min":0,"show":true},{"format":"pps","logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","editable":true,"error":false,"fieldConfig":{"defaults":{"custom":{},"links":[]},"overrides":[]},"fill":1,"fillGradient":0,"grid":{},"gridPos":{"h":7,"w":6,"x":12,"y":7},"hiddenSeries":false,"id":10,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":2,"links":[],"nullPointMode":"connected","options":{"alertThreshold":true},"percentage":false,"pluginVersion":"7.2.0","pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[{"alias":"tcp:90","yaxis":2},{"alias":"tcp:99 ","yaxis":2},{"alias":"tcp:50","yaxis":2}],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"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 ","refId":"A","step":60},{"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{job=\"coredns\",instance=~\"$instance\",proto=\"udp\"}[5m])) by (le,proto))","intervalFactor":2,"legendFormat":"{{ proto }}:50","refId":"C","step":60}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Requests (size, udp)","tooltip":{"shared":true,"sort":0,"value_type":"cumulative"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"bytes","logBase":1,"max":null,"min":0,"show":true},{"format":"short","logBase":1,"max":null,"min":0,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","editable":true,"error":false,"fieldConfig":{"defaults":{"custom":{},"links":[]},"overrides":[]},"fill":1,"fillGradient":0,"grid":{},"gridPos":{"h":7,"w":6,"x":18,"y":7},"hiddenSeries":false,"id":12,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":2,"links":[],"nullPointMode":"connected","options":{"alertThreshold":true},"percentage":false,"pluginVersion":"7.2.0","pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[{"alias":"tcp:90","yaxis":1},{"alias":"tcp:99 ","yaxis":1},{"alias":"tcp:50","yaxis":1}],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"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,"legendFormat":"{{ proto }}:99 ","refId":"A","step":60},{"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,"legendFormat":"{{ proto }}:90","refId":"B","step":60},{"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,"legendFormat":"{{ proto }}:50","refId":"C","step":60}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Requests (size,tcp)","tooltip":{"shared":true,"sort":0,"value_type":"cumulative"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"bytes","logBase":1,"max":null,"min":0,"show":true},{"format":"short","logBase":1,"max":null,"min":0,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","editable":true,"error":false,"fieldConfig":{"defaults":{"custom":{},"links":[]},"overrides":[]},"fill":1,"fillGradient":0,"grid":{},"gridPos":{"h":7,"w":12,"x":0,"y":14},"hiddenSeries":false,"id":14,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":2,"links":[],"nullPointMode":"connected","options":{"alertThreshold":true},"percentage":false,"pluginVersion":"7.2.0","pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":true,"steppedLine":false,"targets":[{"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 }}","refId":"A","step":40}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Responses (by rcode)","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"pps","logBase":1,"max":null,"min":0,"show":true},{"format":"short","logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","editable":true,"error":false,"fieldConfig":{"defaults":{"custom":{},"links":[]},"overrides":[]},"fill":1,"fillGradient":0,"grid":{},"gridPos":{"h":7,"w":12,"x":12,"y":14},"hiddenSeries":false,"id":32,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":2,"links":[],"nullPointMode":"connected","options":{"alertThreshold":true},"percentage":false,"pluginVersion":"7.2.0","pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"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%","refId":"A","step":40},{"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%","refId":"B","step":40},{"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%","refId":"C","step":40}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Responses (duration)","tooltip":{"shared":true,"sort":0,"value_type":"cumulative"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"s","logBase":1,"max":null,"min":0,"show":true},{"format":"short","logBase":1,"max":null,"min":null,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","editable":true,"error":false,"fieldConfig":{"defaults":{"custom":{},"links":[]},"overrides":[]},"fill":1,"fillGradient":0,"grid":{},"gridPos":{"h":7,"w":12,"x":0,"y":21},"hiddenSeries":false,"id":18,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":2,"links":[],"nullPointMode":"connected","options":{"alertThreshold":true},"percentage":false,"pluginVersion":"7.2.0","pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[{"alias":"udp:50%","yaxis":1},{"alias":"tcp:50%","yaxis":2},{"alias":"tcp:90%","yaxis":2},{"alias":"tcp:99%","yaxis":2}],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"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%","refId":"A","step":40},{"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%","refId":"B","step":40},{"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%","metric":"","refId":"C","step":40}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Responses (size, udp)","tooltip":{"shared":true,"sort":0,"value_type":"cumulative"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"bytes","logBase":1,"max":null,"min":0,"show":true},{"format":"short","logBase":1,"max":null,"min":0,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","editable":true,"error":false,"fieldConfig":{"defaults":{"custom":{},"links":[]},"overrides":[]},"fill":1,"fillGradient":0,"grid":{},"gridPos":{"h":7,"w":12,"x":12,"y":21},"hiddenSeries":false,"id":20,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":2,"links":[],"nullPointMode":"connected","options":{"alertThreshold":true},"percentage":false,"pluginVersion":"7.2.0","pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[{"alias":"udp:50%","yaxis":1},{"alias":"tcp:50%","yaxis":1},{"alias":"tcp:90%","yaxis":1},{"alias":"tcp:99%","yaxis":1}],"spaceLength":10,"stack":false,"steppedLine":false,"targets":[{"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%","refId":"A","step":40},{"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%","refId":"B","step":40},{"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%","metric":"","refId":"C","step":40}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Responses (size, tcp)","tooltip":{"shared":true,"sort":0,"value_type":"cumulative"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"bytes","logBase":1,"max":null,"min":0,"show":true},{"format":"short","logBase":1,"max":null,"min":0,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","editable":true,"error":false,"fieldConfig":{"defaults":{"custom":{},"links":[]},"overrides":[]},"fill":1,"fillGradient":0,"grid":{},"gridPos":{"h":7,"w":12,"x":0,"y":28},"hiddenSeries":false,"id":22,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":2,"links":[],"nullPointMode":"connected","options":{"alertThreshold":true},"percentage":false,"pluginVersion":"7.2.0","pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"stack":true,"steppedLine":false,"targets":[{"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 }}","refId":"A","step":40}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Cache (size)","tooltip":{"shared":true,"sort":2,"value_type":"cumulative"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"decbytes","logBase":1,"max":null,"min":0,"show":true},{"format":"short","logBase":1,"max":null,"min":0,"show":true}],"yaxis":{"align":false,"alignLevel":null}},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","editable":true,"error":false,"fieldConfig":{"defaults":{"custom":{},"links":[]},"overrides":[]},"fill":1,"fillGradient":0,"grid":{},"gridPos":{"h":7,"w":12,"x":12,"y":28},"hiddenSeries":false,"id":24,"legend":{"avg":false,"current":false,"max":false,"min":false,"show":true,"total":false,"values":false},"lines":true,"linewidth":2,"links":[],"nullPointMode":"connected","options":{"alertThreshold":true},"percentage":false,"pluginVersion":"7.2.0","pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[{"alias":"misses","yaxis":2}],"spaceLength":10,"stack":true,"steppedLine":false,"targets":[{"expr":"sum(rate(coredns_cache_hits_total{job=\"coredns\",instance=~\"$instance\"}[5m])) by (type)","hide":false,"intervalFactor":2,"legendFormat":"hits:{{ type }}","refId":"A","step":40},{"expr":"sum(rate(coredns_cache_misses_total{job=\"coredns\",instance=~\"$instance\"}[5m])) by (type)","hide":false,"intervalFactor":2,"legendFormat":"misses","refId":"B","step":40}],"thresholds":[],"timeFrom":null,"timeRegions":[],"timeShift":null,"title":"Cache (hitrate)","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"pps","logBase":1,"max":null,"min":0,"show":true},{"format":"pps","logBase":1,"max":null,"min":0,"show":true}],"yaxis":{"align":false,"alignLevel":null}}],"refresh":"10s","schemaVersion":26,"style":"dark","tags":["dns","coredns"],"templating":{"list":[{"current":{"selected":true,"text":"default","value":"default"},"hide":0,"includeAll":false,"label":null,"multi":false,"name":"datasource","options":[],"query":"prometheus","queryValue":"","refresh":1,"regex":"","skipUrlSync":false,"type":"datasource"},{"allValue":".*","current":{"selected":true,"text":"All","value":"$__all"},"datasource":"$datasource","definition":"label_values(up{job=\"coredns\"}, instance)","hide":0,"includeAll":true,"label":"Instance","multi":false,"name":"instance","options":[],"query":"label_values(up{job=\"coredns\"}, instance)","refresh":1,"regex":"","skipUrlSync":false,"sort":3,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false}]},"time":{"from":"now-3h","to":"now"},"timepicker":{"refresh_intervals":["10s","30s","1m","5m","15m","30m","1h","2h","1d"]},"timezone":"`}}{{ .Values.grafana.defaultDashboardsTimezone }}{{`","title":"CoreDNS","uid":"vkQ0UHxik","version":2}`}}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-cluster.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-cluster.yaml
old mode 100755
new mode 100644
index 4ff6b0cc89..447a242e02
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-cluster.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-cluster.yaml
@@ -1,2582 +1,24 @@
{{- /*
-Generated from 'k8s-resources-cluster' from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/grafana-dashboardDefinitions.yaml
+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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.grafana.enabled .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 }}
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-cluster" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
+ name: {{ printf "%s-%s" (include "kube-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 }}: "1"
+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }}
{{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.labels" $ | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-grafana
+{{ include "kube-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": "100px",
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "format": "percentunit",
- "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": 2,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "1 - avg(rate(node_cpu_seconds_total{mode=\"idle\", cluster=\"$cluster\"}[$__interval]))",
- "format": "time_series",
- "instant": true,
- "intervalFactor": 2,
- "refId": "A"
- }
- ],
- "thresholds": "70,80",
- "timeFrom": null,
- "timeShift": null,
- "title": "CPU Utilisation",
- "tooltip": {
- "shared": false,
- "sort": 0,
- "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,
- "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": 2,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\"}) / sum(kube_node_status_allocatable_cpu_cores{cluster=\"$cluster\"})",
- "format": "time_series",
- "instant": true,
- "intervalFactor": 2,
- "refId": "A"
- }
- ],
- "thresholds": "70,80",
- "timeFrom": null,
- "timeShift": null,
- "title": "CPU Requests Commitment",
- "tooltip": {
- "shared": false,
- "sort": 0,
- "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,
- "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": 2,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\"}) / sum(kube_node_status_allocatable_cpu_cores{cluster=\"$cluster\"})",
- "format": "time_series",
- "instant": true,
- "intervalFactor": 2,
- "refId": "A"
- }
- ],
- "thresholds": "70,80",
- "timeFrom": null,
- "timeShift": null,
- "title": "CPU Limits Commitment",
- "tooltip": {
- "shared": false,
- "sort": 0,
- "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,
- "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": 2,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "1 - sum(:node_memory_MemAvailable_bytes:sum{cluster=\"$cluster\"}) / sum(kube_node_status_allocatable_memory_bytes{cluster=\"$cluster\"})",
- "format": "time_series",
- "instant": true,
- "intervalFactor": 2,
- "refId": "A"
- }
- ],
- "thresholds": "70,80",
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory Utilisation",
- "tooltip": {
- "shared": false,
- "sort": 0,
- "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": 5,
- "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": 2,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\"}) / sum(kube_node_status_allocatable_memory_bytes{cluster=\"$cluster\"})",
- "format": "time_series",
- "instant": true,
- "intervalFactor": 2,
- "refId": "A"
- }
- ],
- "thresholds": "70,80",
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory Requests Commitment",
- "tooltip": {
- "shared": false,
- "sort": 0,
- "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": 6,
- "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": 2,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\"}) / sum(kube_node_status_allocatable_memory_bytes{cluster=\"$cluster\"})",
- "format": "time_series",
- "instant": true,
- "intervalFactor": 2,
- "refId": "A"
- }
- ],
- "thresholds": "70,80",
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory Limits Commitment",
- "tooltip": {
- "shared": false,
- "sort": 0,
- "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": 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_rate{cluster=\"$cluster\"}) 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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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": "count(mixin_pod_workload{cluster=\"$cluster\"}) by (namespace)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "A",
- "step": 10
- },
- {
- "expr": "count(avg(mixin_pod_workload{cluster=\"$cluster\"}) 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_rate{cluster=\"$cluster\"}) by (namespace)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "C",
- "step": 10
- },
- {
- "expr": "sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\"}) 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_rate{cluster=\"$cluster\"}) by (namespace) / sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\"}) by (namespace)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "E",
- "step": 10
- },
- {
- "expr": "sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\"}) 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_rate{cluster=\"$cluster\"}) by (namespace) / sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\"}) 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{cluster=\"$cluster\", 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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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": "count(mixin_pod_workload{cluster=\"$cluster\"}) by (namespace)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "A",
- "step": 10
- },
- {
- "expr": "count(avg(mixin_pod_workload{cluster=\"$cluster\"}) by (workload, namespace)) by (namespace)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "B",
- "step": 10
- },
- {
- "expr": "sum(container_memory_rss{cluster=\"$cluster\", container!=\"\"}) by (namespace)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "C",
- "step": 10
- },
- {
- "expr": "sum(kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\"}) by (namespace)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "D",
- "step": 10
- },
- {
- "expr": "sum(container_memory_rss{cluster=\"$cluster\", container!=\"\"}) by (namespace) / sum(kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\"}) by (namespace)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "E",
- "step": 10
- },
- {
- "expr": "sum(kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\"}) by (namespace)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "F",
- "step": 10
- },
- {
- "expr": "sum(container_memory_rss{cluster=\"$cluster\", container!=\"\"}) by (namespace) / sum(kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\"}) 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,
- "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,
- "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,
- "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": "Namespace",
- "colorMode": null,
- "colors": [
-
- ],
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "decimals": 2,
- "link": true,
- "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{cluster=\"$cluster\", namespace=~\".+\"}[$__interval])) by (namespace)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "A",
- "step": 10
- },
- {
- "expr": "sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\".+\"}[$__interval])) by (namespace)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "B",
- "step": 10
- },
- {
- "expr": "sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=~\".+\"}[$__interval])) by (namespace)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "C",
- "step": 10
- },
- {
- "expr": "sum(irate(container_network_transmit_packets_total{cluster=\"$cluster\", namespace=~\".+\"}[$__interval])) by (namespace)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "D",
- "step": 10
- },
- {
- "expr": "sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\", namespace=~\".+\"}[$__interval])) by (namespace)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "E",
- "step": 10
- },
- {
- "expr": "sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=~\".+\"}[$__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": "Network",
- "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": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\".+\"}[$__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
- }
- ]
- }
- ],
- "repeat": null,
- "repeatIteration": null,
- "repeatRowId": null,
- "showTitle": true,
- "title": "Network",
- "titleSize": "h6"
- },
- {
- "collapse": false,
- "height": "250px",
- "panels": [
- {
- "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": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\".+\"}[$__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": "Network",
- "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": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "avg(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\".+\"}[$__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
- }
- ]
- }
- ],
- "repeat": null,
- "repeatIteration": null,
- "repeatRowId": null,
- "showTitle": true,
- "title": "Network",
- "titleSize": "h6"
- },
- {
- "collapse": false,
- "height": "250px",
- "panels": [
- {
- "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": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "avg(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\".+\"}[$__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": "Network",
- "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": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=~\".+\"}[$__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": "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": "Network",
- "titleSize": "h6"
- },
- {
- "collapse": false,
- "height": "250px",
- "panels": [
- {
- "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": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=~\".+\"}[$__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": "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": "Network",
- "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": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\", namespace=~\".+\"}[$__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": "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": "Network",
- "titleSize": "h6"
- },
- {
- "collapse": false,
- "height": "250px",
- "panels": [
- {
- "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": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=~\".+\"}[$__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": "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": "Network",
- "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"
- },
- {
- "allValue": null,
- "current": {
- "text": "prod",
- "value": "prod"
- },
- "datasource": "$datasource",
- "hide": 2,
- "includeAll": false,
- "label": "cluster",
- "multi": false,
- "name": "cluster",
- "options": [
-
- ],
- "query": "label_values(node_cpu_seconds_total, cluster)",
- "refresh": 1,
- "regex": "",
- "sort": 2,
- "tagValuesQuery": "",
- "tags": [
-
- ],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- },
- {
- "allValue": null,
- "current": {
- "text": "",
- "value": ""
- },
- "datasource": "$datasource",
- "hide": 2,
- "includeAll": false,
- "label": null,
- "multi": false,
- "name": "cluster",
- "options": [
-
- ],
- "query": "label_values(node_cpu_seconds_total, cluster)",
- "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": "",
- "title": "Kubernetes / Compute Resources / Cluster",
- "uid": "efa86fd1d0c121a26444b636a3f509a8",
- "version": 0
- }
+ {{`{"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":2,"stack":false,"steppedLine":false,"targets":[{"expr":"cluster:node_cpu:ratio_rate5m{cluster=\"$cluster\"}","format":"time_series","instant":true,"intervalFactor":2,"refId":"A"}],"thresholds":"70,80","timeFrom":null,"timeShift":null,"title":"CPU Utilisation","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":2,"stack":false,"steppedLine":false,"targets":[{"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,"refId":"A"}],"thresholds":"70,80","timeFrom":null,"timeShift":null,"title":"CPU Requests Commitment","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":2,"stack":false,"steppedLine":false,"targets":[{"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,"refId":"A"}],"thresholds":"70,80","timeFrom":null,"timeShift":null,"title":"CPU Limits Commitment","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":2,"stack":false,"steppedLine":false,"targets":[{"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,"refId":"A"}],"thresholds":"70,80","timeFrom":null,"timeShift":null,"title":"Memory Utilisation","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":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":2,"stack":false,"steppedLine":false,"targets":[{"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,"refId":"A"}],"thresholds":"70,80","timeFrom":null,"timeShift":null,"title":"Memory Requests Commitment","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":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":2,"stack":false,"steppedLine":false,"targets":[{"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,"refId":"A"}],"thresholds":"70,80","timeFrom":null,"timeShift":null,"title":"Memory Limits Commitment","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":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":12,"stack":true,"steppedLine":false,"targets":[{"expr":"sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\"}) by (namespace)","format":"time_series","intervalFactor":2,"legendFormat":"{{namespace}}","legendLink":null}],"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","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":"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{job=\"kube-state-metrics\", cluster=\"$cluster\"}) by (namespace)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"A"},{"expr":"count(avg(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\"}) by (workload, namespace)) by (namespace)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"B"},{"expr":"sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\"}) by (namespace)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"C"},{"expr":"sum(namespace_cpu:kube_pod_container_resource_requests:sum{cluster=\"$cluster\"}) by (namespace)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"D"},{"expr":"sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\"}) by (namespace) / sum(namespace_cpu:kube_pod_container_resource_requests:sum{cluster=\"$cluster\"}) by (namespace)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"E"},{"expr":"sum(namespace_cpu:kube_pod_container_resource_limits:sum{cluster=\"$cluster\"}) by (namespace)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"F"},{"expr":"sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\"}) by (namespace) / sum(namespace_cpu:kube_pod_container_resource_limits:sum{cluster=\"$cluster\"}) by (namespace)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"G"}],"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":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":12,"stack":true,"steppedLine":false,"targets":[{"expr":"sum(container_memory_rss{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", container!=\"\"}) by (namespace)","format":"time_series","intervalFactor":2,"legendFormat":"{{namespace}}","legendLink":null}],"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","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"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},"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{job=\"kube-state-metrics\", cluster=\"$cluster\"}) by (namespace)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"A"},{"expr":"count(avg(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\"}) by (workload, namespace)) by (namespace)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"B"},{"expr":"sum(container_memory_rss{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", container!=\"\"}) by (namespace)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"C"},{"expr":"sum(namespace_memory:kube_pod_container_resource_requests:sum{cluster=\"$cluster\"}) by (namespace)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"D"},{"expr":"sum(container_memory_rss{job=\"kubelet\", 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,"legendFormat":"","refId":"E"},{"expr":"sum(namespace_memory:kube_pod_container_resource_limits:sum{cluster=\"$cluster\"}) by (namespace)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"F"},{"expr":"sum(container_memory_rss{job=\"kubelet\", 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,"legendFormat":"","refId":"G"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Requests by Namespace","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 Requests","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"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":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{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"A"},{"expr":"sum(irate(container_network_transmit_bytes_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"B"},{"expr":"sum(irate(container_network_receive_packets_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"C"},{"expr":"sum(irate(container_network_transmit_packets_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"D"},{"expr":"sum(irate(container_network_receive_packets_dropped_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"E"},{"expr":"sum(irate(container_network_transmit_packets_dropped_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"F"}],"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":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_bytes_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)","format":"time_series","intervalFactor":2,"legendFormat":"{{namespace}}","legendLink":null}],"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":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_bytes_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)","format":"time_series","intervalFactor":2,"legendFormat":"{{namespace}}","legendLink":null}],"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":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":"avg(irate(container_network_receive_bytes_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)","format":"time_series","intervalFactor":2,"legendFormat":"{{namespace}}","legendLink":null}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Average Container Bandwidth by Namespace: 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":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":"avg(irate(container_network_transmit_bytes_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)","format":"time_series","intervalFactor":2,"legendFormat":"{{namespace}}","legendLink":null}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Average Container Bandwidth by Namespace: 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 Namespace","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"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},"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{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)","format":"time_series","intervalFactor":2,"legendFormat":"{{namespace}}","legendLink":null}],"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":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(irate(container_network_transmit_packets_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)","format":"time_series","intervalFactor":2,"legendFormat":"{{namespace}}","legendLink":null}],"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":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":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{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)","format":"time_series","intervalFactor":2,"legendFormat":"{{namespace}}","legendLink":null}],"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":19,"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{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=~\".+\"}[$__rate_interval])) by (namespace)","format":"time_series","intervalFactor":2,"legendFormat":"{{namespace}}","legendLink":null}],"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":null,"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},"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{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", container!=\"\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval]) + rate(container_fs_writes_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", container!=\"\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval])))","format":"time_series","intervalFactor":2,"legendFormat":"{{namespace}}","legendLink":null}],"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":21,"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(namespace) (rate(container_fs_reads_bytes_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", container!=\"\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", container!=\"\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval]))","format":"time_series","intervalFactor":2,"legendFormat":"{{namespace}}","legendLink":null}],"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":22,"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":null,"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":null,"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":null,"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{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval]))","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"A"},{"expr":"sum by(namespace) (rate(container_fs_writes_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval]))","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"B"},{"expr":"sum by(namespace) (rate(container_fs_reads_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval]) + rate(container_fs_writes_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval]))","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"C"},{"expr":"sum by(namespace) (rate(container_fs_reads_bytes_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval]))","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"D"},{"expr":"sum by(namespace) (rate(container_fs_writes_bytes_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval]))","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"E"},{"expr":"sum by(namespace) (rate(container_fs_reads_bytes_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace!=\"\"}[$__rate_interval]))","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"F"}],"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":"default","value":"default"},"hide":0,"label":"Data Source","name":"datasource","options":[],"query":"prometheus","refresh":1,"regex":"","type":"datasource"},{"allValue":null,"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(up{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\"}, cluster)","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 / Cluster","uid":"efa86fd1d0c121a26444b636a3f509a8","version":0}`}}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-multicluster.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-multicluster.yaml
new file mode 100644
index 0000000000..7046682700
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-multicluster.yaml
@@ -0,0 +1,24 @@
+{{- /*
+Generated from 'k8s-resources-multicluster' 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" $) "k8s-resources-multicluster" | 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:
+ k8s-resources-multicluster.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":2,"stack":false,"steppedLine":false,"targets":[{"expr":"cluster:node_cpu:ratio_rate5m","format":"time_series","instant":true,"intervalFactor":2,"refId":"A"}],"thresholds":"70,80","timeFrom":null,"timeShift":null,"title":"CPU Utilisation","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":2,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(kube_pod_container_resource_requests{job=\"kube-state-metrics\", resource=\"cpu\"}) / sum(kube_node_status_allocatable{job=\"kube-state-metrics\", resource=\"cpu\"})","format":"time_series","instant":true,"intervalFactor":2,"refId":"A"}],"thresholds":"70,80","timeFrom":null,"timeShift":null,"title":"CPU Requests Commitment","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":2,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(kube_pod_container_resource_limits{job=\"kube-state-metrics\", resource=\"cpu\"}) / sum(kube_node_status_allocatable{job=\"kube-state-metrics\", resource=\"cpu\"})","format":"time_series","instant":true,"intervalFactor":2,"refId":"A"}],"thresholds":"70,80","timeFrom":null,"timeShift":null,"title":"CPU Limits Commitment","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":2,"stack":false,"steppedLine":false,"targets":[{"expr":"1 - sum(:node_memory_MemAvailable_bytes:sum) / sum(node_memory_MemTotal_bytes{job=\"node-exporter\"})","format":"time_series","instant":true,"intervalFactor":2,"refId":"A"}],"thresholds":"70,80","timeFrom":null,"timeShift":null,"title":"Memory Utilisation","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":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":2,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(kube_pod_container_resource_requests{job=\"kube-state-metrics\", resource=\"memory\"}) / sum(kube_node_status_allocatable{job=\"kube-state-metrics\", resource=\"memory\"})","format":"time_series","instant":true,"intervalFactor":2,"refId":"A"}],"thresholds":"70,80","timeFrom":null,"timeShift":null,"title":"Memory Requests Commitment","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":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":2,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(kube_pod_container_resource_limits{job=\"kube-state-metrics\", resource=\"memory\"}) / sum(kube_node_status_allocatable{job=\"kube-state-metrics\", resource=\"memory\"})","format":"time_series","instant":true,"intervalFactor":2,"refId":"A"}],"thresholds":"70,80","timeFrom":null,"timeShift":null,"title":"Memory Limits Commitment","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":0,"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":2,"links":[],"nullPointMode":"null as zero","percentage":false,"pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"span":12,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate) by (cluster)","format":"time_series","intervalFactor":2,"legendFormat":"{{cluster}}","legendLink":null}],"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","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":"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":"Cluster","colorMode":null,"colors":[],"dateFormat":"YYYY-MM-DD HH:mm:ss","decimals":2,"link":true,"linkTargetBlank":false,"linkTooltip":"Drill down","linkUrl":"/d/efa86fd1d0c121a26444b636a3f509a8/k8s-resources-cluster?var-datasource=$datasource&var-cluster=$__cell","pattern":"cluster","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) by (cluster)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"A"},{"expr":"sum(kube_pod_container_resource_requests{job=\"kube-state-metrics\", resource=\"cpu\"}) by (cluster)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"B"},{"expr":"sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate) by (cluster) / sum(kube_pod_container_resource_requests{job=\"kube-state-metrics\", resource=\"cpu\"}) by (cluster)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"C"},{"expr":"sum(kube_pod_container_resource_limits{job=\"kube-state-metrics\", resource=\"cpu\"}) by (cluster)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"D"},{"expr":"sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate) by (cluster) / sum(kube_pod_container_resource_limits{job=\"kube-state-metrics\", resource=\"cpu\"}) by (cluster)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"E"}],"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":0,"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":2,"links":[],"nullPointMode":"null as zero","percentage":false,"pointradius":5,"points":false,"renderer":"flot","seriesOverrides":[],"spaceLength":10,"span":12,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(container_memory_rss{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", container!=\"\"}) by (cluster)","format":"time_series","intervalFactor":2,"legendFormat":"{{cluster}}","legendLink":null}],"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","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"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},"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":"Cluster","colorMode":null,"colors":[],"dateFormat":"YYYY-MM-DD HH:mm:ss","decimals":2,"link":true,"linkTargetBlank":false,"linkTooltip":"Drill down","linkUrl":"/d/efa86fd1d0c121a26444b636a3f509a8/k8s-resources-cluster?var-datasource=$datasource&var-cluster=$__cell","pattern":"cluster","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_rss{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", container!=\"\"}) by (cluster)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"A"},{"expr":"sum(kube_pod_container_resource_requests{job=\"kube-state-metrics\", resource=\"memory\"}) by (cluster)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"B"},{"expr":"sum(container_memory_rss{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", container!=\"\"}) by (cluster) / sum(kube_pod_container_resource_requests{job=\"kube-state-metrics\", resource=\"memory\"}) by (cluster)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"C"},{"expr":"sum(kube_pod_container_resource_limits{job=\"kube-state-metrics\", resource=\"memory\"}) by (cluster)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"D"},{"expr":"sum(container_memory_rss{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", container!=\"\"}) by (cluster) / sum(kube_pod_container_resource_limits{job=\"kube-state-metrics\", resource=\"memory\"}) by (cluster)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"E"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Requests by Cluster","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 Requests","titleSize":"h6"}],"schemaVersion":14,"style":"dark","tags":["kubernetes-mixin"],"templating":{"list":[{"current":{"text":"default","value":"default"},"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 / Compute Resources / Multi-Cluster","uid":"b59e6c9f2fcbe2e16d77fc492374cc4f","version":0}`}}
+{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml
old mode 100755
new mode 100644
index cbea3588b5..743376f118
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml
@@ -1,2261 +1,24 @@
{{- /*
-Generated from 'k8s-resources-namespace' from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/grafana-dashboardDefinitions.yaml
+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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.grafana.enabled .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 }}
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-namespace" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
+ name: {{ printf "%s-%s" (include "kube-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 }}: "1"
+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }}
{{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.labels" $ | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-grafana
+{{ include "kube-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,
- "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": 3,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}) / sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"})",
- "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": 0,
- "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,
- "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": 3,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}) / sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"})",
- "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": 0,
- "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,
- "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": 3,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\"}) / sum(kube_pod_container_resource_requests_memory_bytes{namespace=\"$namespace\"})",
- "format": "time_series",
- "instant": true,
- "intervalFactor": 2,
- "refId": "A"
- }
- ],
- "thresholds": "70,80",
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory Utilization (from requests)",
- "tooltip": {
- "shared": false,
- "sort": 0,
- "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,
- "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": 3,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\"}) / sum(kube_pod_container_resource_limits_memory_bytes{namespace=\"$namespace\"})",
- "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": 0,
- "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,
- "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": [
- {
- "alias": "quota - requests",
- "color": "#F2495C",
- "dashes": true,
- "fill": 0,
- "hideTooltip": true,
- "legend": false,
- "linewidth": 2,
- "stack": false
- },
- {
- "alias": "quota - limits",
- "color": "#FF9830",
- "dashes": true,
- "fill": 0,
- "hideTooltip": true,
- "legend": false,
- "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_rate{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}pod{{`}}`}}",
- "legendLink": null,
- "step": 10
- },
- {
- "expr": "scalar(kube_resourcequota{cluster=\"$cluster\", namespace=\"$namespace\", type=\"hard\",resource=\"requests.cpu\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "quota - requests",
- "legendLink": null,
- "step": 10
- },
- {
- "expr": "scalar(kube_resourcequota{cluster=\"$cluster\", 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": 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 Usage",
- "titleSize": "h6"
- },
- {
- "collapse": false,
- "height": "250px",
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "id": 6,
- "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": "CPU Usage",
- "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": "short"
- },
- {
- "alias": "CPU Requests",
- "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": "short"
- },
- {
- "alias": "CPU Requests %",
- "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": "percentunit"
- },
- {
- "alias": "CPU Limits",
- "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": "short"
- },
- {
- "alias": "CPU Limits %",
- "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": "percentunit"
- },
- {
- "alias": "Pod",
- "colorMode": null,
- "colors": [
-
- ],
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "decimals": 2,
- "link": true,
- "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_rate{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "A",
- "step": 10
- },
- {
- "expr": "sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", 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_rate{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod) / sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "C",
- "step": 10
- },
- {
- "expr": "sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", 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_rate{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod) / sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", 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": 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": 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": [
- {
- "alias": "quota - requests",
- "color": "#F2495C",
- "dashes": true,
- "fill": 0,
- "hideTooltip": true,
- "legend": false,
- "linewidth": 2,
- "stack": false
- },
- {
- "alias": "quota - limits",
- "color": "#FF9830",
- "dashes": true,
- "fill": 0,
- "hideTooltip": true,
- "legend": false,
- "linewidth": 2,
- "stack": false
- }
- ],
- "spaceLength": 10,
- "span": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\"}) by (pod)",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}pod{{`}}`}}",
- "legendLink": null,
- "step": 10
- },
- {
- "expr": "scalar(kube_resourcequota{cluster=\"$cluster\", namespace=\"$namespace\", type=\"hard\",resource=\"requests.memory\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "quota - requests",
- "legendLink": null,
- "step": 10
- },
- {
- "expr": "scalar(kube_resourcequota{cluster=\"$cluster\", 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": 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 Usage",
- "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": "Memory Usage",
- "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": "bytes"
- },
- {
- "alias": "Memory Requests",
- "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": "bytes"
- },
- {
- "alias": "Memory Requests %",
- "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": "percentunit"
- },
- {
- "alias": "Memory Limits",
- "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": "bytes"
- },
- {
- "alias": "Memory Limits %",
- "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": "percentunit"
- },
- {
- "alias": "Memory Usage (RSS)",
- "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": "bytes"
- },
- {
- "alias": "Memory Usage (Cache)",
- "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": "bytes"
- },
- {
- "alias": "Memory Usage (Swap)",
- "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": "bytes"
- },
- {
- "alias": "Pod",
- "colorMode": null,
- "colors": [
-
- ],
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "decimals": 2,
- "link": true,
- "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{cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\"}) by (pod)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "A",
- "step": 10
- },
- {
- "expr": "sum(kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "B",
- "step": 10
- },
- {
- "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\"}) by (pod) / sum(kube_pod_container_resource_requests_memory_bytes{namespace=\"$namespace\"}) by (pod)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "C",
- "step": 10
- },
- {
- "expr": "sum(kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "D",
- "step": 10
- },
- {
- "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\"}) by (pod) / sum(kube_pod_container_resource_limits_memory_bytes{namespace=\"$namespace\"}) by (pod)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "E",
- "step": 10
- },
- {
- "expr": "sum(container_memory_rss{cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\"}) by (pod)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "F",
- "step": 10
- },
- {
- "expr": "sum(container_memory_cache{cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\"}) by (pod)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "G",
- "step": 10
- },
- {
- "expr": "sum(container_memory_swap{cluster=\"$cluster\", 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": 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 Quota",
- "titleSize": "h6"
- },
- {
- "collapse": false,
- "height": "250px",
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "id": 9,
- "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,
- "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,
- "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 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{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__interval])) by (pod)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "A",
- "step": 10
- },
- {
- "expr": "sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__interval])) by (pod)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "B",
- "step": 10
- },
- {
- "expr": "sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__interval])) by (pod)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "C",
- "step": 10
- },
- {
- "expr": "sum(irate(container_network_transmit_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__interval])) by (pod)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "D",
- "step": 10
- },
- {
- "expr": "sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__interval])) by (pod)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "E",
- "step": 10
- },
- {
- "expr": "sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__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": 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": "Network",
- "titleSize": "h6"
- },
- {
- "collapse": false,
- "height": "250px",
- "panels": [
- {
- "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": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__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": 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": "Network",
- "titleSize": "h6"
- },
- {
- "collapse": false,
- "height": "250px",
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 10,
- "id": 11,
- "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(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__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": 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": "Network",
- "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": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__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": 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": "Network",
- "titleSize": "h6"
- },
- {
- "collapse": false,
- "height": "250px",
- "panels": [
- {
- "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": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__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": 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": "Network",
- "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": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__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": 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": "Network",
- "titleSize": "h6"
- },
- {
- "collapse": false,
- "height": "250px",
- "panels": [
- {
- "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": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__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": 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": "Network",
- "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"
- },
- {
- "allValue": null,
- "current": {
- "text": "",
- "value": ""
- },
- "datasource": "$datasource",
- "hide": 2,
- "includeAll": false,
- "label": null,
- "multi": false,
- "name": "cluster",
- "options": [
-
- ],
- "query": "label_values(kube_pod_info, cluster)",
- "refresh": 1,
- "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": "namespace",
- "options": [
-
- ],
- "query": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)",
- "refresh": 1,
- "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": "",
- "title": "Kubernetes / Compute Resources / Namespace (Pods)",
- "uid": "85a562078cdf77779eaa1add43ccec1e",
- "version": 0
- }
+ {{`{"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{cluster=\"$cluster\", namespace=\"$namespace\"}) / sum(kube_pod_container_resource_requests{job=\"kube-state-metrics\", cluster=\"$cluster\", 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{cluster=\"$cluster\", namespace=\"$namespace\"}) / sum(kube_pod_container_resource_limits{job=\"kube-state-metrics\", cluster=\"$cluster\", 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{job=\"kubelet\", 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\"})","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{job=\"kubelet\", 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\"})","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{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)","format":"time_series","intervalFactor":2,"legendFormat":"{{pod}}","legendLink":null},{"expr":"scalar(kube_resourcequota{cluster=\"$cluster\", namespace=\"$namespace\", type=\"hard\",resource=\"requests.cpu\"})","format":"time_series","intervalFactor":2,"legendFormat":"quota - requests","legendLink":null},{"expr":"scalar(kube_resourcequota{cluster=\"$cluster\", namespace=\"$namespace\", type=\"hard\",resource=\"limits.cpu\"})","format":"time_series","intervalFactor":2,"legendFormat":"quota - limits","legendLink":null}],"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{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"A"},{"expr":"sum(cluster:namespace:pod_cpu:active:kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"B"},{"expr":"sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod) / sum(cluster:namespace:pod_cpu:active:kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"C"},{"expr":"sum(cluster:namespace:pod_cpu:active:kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"D"},{"expr":"sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod) / sum(cluster:namespace:pod_cpu:active:kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"E"}],"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{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}) by (pod)","format":"time_series","intervalFactor":2,"legendFormat":"{{pod}}","legendLink":null},{"expr":"scalar(kube_resourcequota{cluster=\"$cluster\", namespace=\"$namespace\", type=\"hard\",resource=\"requests.memory\"})","format":"time_series","intervalFactor":2,"legendFormat":"quota - requests","legendLink":null},{"expr":"scalar(kube_resourcequota{cluster=\"$cluster\", namespace=\"$namespace\", type=\"hard\",resource=\"limits.memory\"})","format":"time_series","intervalFactor":2,"legendFormat":"quota - limits","legendLink":null}],"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{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\", image!=\"\"}) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"A"},{"expr":"sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"B"},{"expr":"sum(container_memory_working_set_bytes{job=\"kubelet\", 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)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"C"},{"expr":"sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"D"},{"expr":"sum(container_memory_working_set_bytes{job=\"kubelet\", 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)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"E"},{"expr":"sum(container_memory_rss{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\"}) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"F"},{"expr":"sum(container_memory_cache{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\"}) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"G"},{"expr":"sum(container_memory_swap{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\",container!=\"\"}) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"H"}],"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{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"A"},{"expr":"sum(irate(container_network_transmit_bytes_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"B"},{"expr":"sum(irate(container_network_receive_packets_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"C"},{"expr":"sum(irate(container_network_transmit_packets_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"D"},{"expr":"sum(irate(container_network_receive_packets_dropped_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"E"},{"expr":"sum(irate(container_network_transmit_packets_dropped_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"F"}],"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{cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)","format":"time_series","intervalFactor":2,"legendFormat":"{{pod}}","legendLink":null}],"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{cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)","format":"time_series","intervalFactor":2,"legendFormat":"{{pod}}","legendLink":null}],"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{cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)","format":"time_series","intervalFactor":2,"legendFormat":"{{pod}}","legendLink":null}],"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{cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)","format":"time_series","intervalFactor":2,"legendFormat":"{{pod}}","legendLink":null}],"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{cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)","format":"time_series","intervalFactor":2,"legendFormat":"{{pod}}","legendLink":null}],"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{cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])) by (pod)","format":"time_series","intervalFactor":2,"legendFormat":"{{pod}}","legendLink":null}],"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":null,"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-.+|md.+|dasd.+)\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]) + rate(container_fs_writes_total{container!=\"\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])))","format":"time_series","intervalFactor":2,"legendFormat":"{{pod}}","legendLink":null}],"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-.+|md.+|dasd.+)\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{container!=\"\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]))","format":"time_series","intervalFactor":2,"legendFormat":"{{pod}}","legendLink":null}],"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":null,"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":null,"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":null,"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{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]))","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"A"},{"expr":"sum by(pod) (rate(container_fs_writes_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]))","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"B"},{"expr":"sum by(pod) (rate(container_fs_reads_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]) + rate(container_fs_writes_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]))","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"C"},{"expr":"sum by(pod) (rate(container_fs_reads_bytes_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]))","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"D"},{"expr":"sum by(pod) (rate(container_fs_writes_bytes_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]))","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"E"},{"expr":"sum by(pod) (rate(container_fs_reads_bytes_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval]))","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"F"}],"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":"default","value":"default"},"hide":0,"label":"Data Source","name":"datasource","options":[],"query":"prometheus","refresh":1,"regex":"","type":"datasource"},{"allValue":null,"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(up{job=\"kube-state-metrics\"}, cluster)","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":"namespace","options":[],"query":"label_values(kube_namespace_status_phase{job=\"kube-state-metrics\", cluster=\"$cluster\"}, 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/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-node.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-node.yaml
old mode 100755
new mode 100644
index 0e467efd73..b685c132c3
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-node.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-node.yaml
@@ -1,961 +1,24 @@
{{- /*
-Generated from 'k8s-resources-node' from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/grafana-dashboardDefinitions.yaml
+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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.grafana.enabled .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 }}
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-node" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
+ name: {{ printf "%s-%s" (include "kube-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 }}: "1"
+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }}
{{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.labels" $ | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-grafana
+{{ include "kube-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,
- "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_rate{cluster=\"$cluster\", 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": 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 Usage",
- "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": 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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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_rate{cluster=\"$cluster\", node=\"$node\"}) by (pod)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "A",
- "step": 10
- },
- {
- "expr": "sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", 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_rate{cluster=\"$cluster\", node=\"$node\"}) by (pod) / sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", node=\"$node\"}) by (pod)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "C",
- "step": 10
- },
- {
- "expr": "sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", 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_rate{cluster=\"$cluster\", node=\"$node\"}) by (pod) / sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", 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": 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": 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": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "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{{`}}`}}",
- "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 Usage",
- "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": 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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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{cluster=\"$cluster\", node=\"$node\",container!=\"\"}) by (pod)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "A",
- "step": 10
- },
- {
- "expr": "sum(kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\", 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{cluster=\"$cluster\", node=\"$node\",container!=\"\"}) by (pod) / sum(kube_pod_container_resource_requests_memory_bytes{node=\"$node\"}) by (pod)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "C",
- "step": 10
- },
- {
- "expr": "sum(kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\", 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{cluster=\"$cluster\", node=\"$node\",container!=\"\"}) by (pod) / sum(kube_pod_container_resource_limits_memory_bytes{node=\"$node\"}) by (pod)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "E",
- "step": 10
- },
- {
- "expr": "sum(node_namespace_pod_container:container_memory_rss{cluster=\"$cluster\", 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{cluster=\"$cluster\", 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{cluster=\"$cluster\", 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": 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 Quota",
- "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"
- },
- {
- "allValue": null,
- "current": {
- "text": "",
- "value": ""
- },
- "datasource": "$datasource",
- "hide": 2,
- "includeAll": false,
- "label": null,
- "multi": false,
- "name": "cluster",
- "options": [
-
- ],
- "query": "label_values(kube_pod_info, cluster)",
- "refresh": 1,
- "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": "node",
- "options": [
-
- ],
- "query": "label_values(kube_pod_info{cluster=\"$cluster\"}, node)",
- "refresh": 1,
- "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": "",
- "title": "Kubernetes / Compute Resources / Node (Pods)",
- "uid": "200ac8fdbfbb74b39aff88118e4d1c2c",
- "version": 0
- }
+ {{`{"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":"max capacity","color":"#F2495C","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(kube_node_status_capacity{cluster=\"$cluster\", node=~\"$node\", resource=\"cpu\"})","format":"time_series","intervalFactor":2,"legendFormat":"max capacity","legendLink":null},{"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}}","legendLink":null}],"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{cluster=\"$cluster\", node=~\"$node\"}) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"A"},{"expr":"sum(cluster:namespace:pod_cpu:active:kube_pod_container_resource_requests{cluster=\"$cluster\", node=~\"$node\"}) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"B"},{"expr":"sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\", node=~\"$node\"}) by (pod) / sum(cluster:namespace:pod_cpu:active:kube_pod_container_resource_requests{cluster=\"$cluster\", node=~\"$node\"}) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"C"},{"expr":"sum(cluster:namespace:pod_cpu:active:kube_pod_container_resource_limits{cluster=\"$cluster\", node=~\"$node\"}) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"D"},{"expr":"sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\", node=~\"$node\"}) by (pod) / sum(cluster:namespace:pod_cpu:active:kube_pod_container_resource_limits{cluster=\"$cluster\", node=~\"$node\"}) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"E"}],"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":"max capacity","color":"#F2495C","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(kube_node_status_capacity{cluster=\"$cluster\", node=~\"$node\", resource=\"memory\"})","format":"time_series","intervalFactor":2,"legendFormat":"max capacity","legendLink":null},{"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}}","legendLink":null}],"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{cluster=\"$cluster\", node=~\"$node\",container!=\"\"}) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"A"},{"expr":"sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_requests{cluster=\"$cluster\", node=~\"$node\"}) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"B"},{"expr":"sum(node_namespace_pod_container:container_memory_working_set_bytes{cluster=\"$cluster\", node=~\"$node\",container!=\"\"}) by (pod) / sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_requests{cluster=\"$cluster\", node=~\"$node\"}) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"C"},{"expr":"sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_limits{cluster=\"$cluster\", node=~\"$node\"}) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"D"},{"expr":"sum(node_namespace_pod_container:container_memory_working_set_bytes{cluster=\"$cluster\", node=~\"$node\",container!=\"\"}) by (pod) / sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_limits{cluster=\"$cluster\", node=~\"$node\"}) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"E"},{"expr":"sum(node_namespace_pod_container:container_memory_rss{cluster=\"$cluster\", node=~\"$node\",container!=\"\"}) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"F"},{"expr":"sum(node_namespace_pod_container:container_memory_cache{cluster=\"$cluster\", node=~\"$node\",container!=\"\"}) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"G"},{"expr":"sum(node_namespace_pod_container:container_memory_swap{cluster=\"$cluster\", node=~\"$node\",container!=\"\"}) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"H"}],"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":"default","value":"default"},"hide":0,"label":"Data Source","name":"datasource","options":[],"query":"prometheus","refresh":1,"regex":"","type":"datasource"},{"allValue":null,"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(up{job=\"kube-state-metrics\"}, cluster)","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":true,"name":"node","options":[],"query":"label_values(kube_node_info{cluster=\"$cluster\"}, 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/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml
old mode 100755
new mode 100644
index b598df35a8..f73656acba
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml
@@ -1,1749 +1,24 @@
{{- /*
-Generated from 'k8s-resources-pod' from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/grafana-dashboardDefinitions.yaml
+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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.grafana.enabled .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 }}
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-pod" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
+ name: {{ printf "%s-%s" (include "kube-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 }}: "1"
+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }}
{{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.labels" $ | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-grafana
+{{ include "kube-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,
- "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": [
- {
- "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_rate{namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\", cluster=\"$cluster\"}) by (container)",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}container{{`}}`}}",
- "legendLink": null,
- "step": 10
- },
- {
- "expr": "sum(\n kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"})\n",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "requests",
- "legendLink": null,
- "step": 10
- },
- {
- "expr": "sum(\n kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"})\n",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "limits",
- "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 Usage",
- "titleSize": "h6"
- },
- {
- "collapse": false,
- "height": "250px",
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 10,
- "id": 2,
- "legend": {
- "avg": false,
- "current": true,
- "max": true,
- "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(increase(container_cpu_cfs_throttled_periods_total{namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\", cluster=\"$cluster\"}[5m])) by (container) /sum(increase(container_cpu_cfs_periods_total{namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\", cluster=\"$cluster\"}[5m])) 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": 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": "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,
- "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": "CPU Usage",
- "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": "short"
- },
- {
- "alias": "CPU Requests",
- "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": "short"
- },
- {
- "alias": "CPU Requests %",
- "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": "percentunit"
- },
- {
- "alias": "CPU Limits",
- "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": "short"
- },
- {
- "alias": "CPU Limits %",
- "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": "percentunit"
- },
- {
- "alias": "Container",
- "colorMode": null,
- "colors": [
-
- ],
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "decimals": 2,
- "link": 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_rate{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\"}) by (container)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "A",
- "step": 10
- },
- {
- "expr": "sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", 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_rate{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container) / sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "C",
- "step": 10
- },
- {
- "expr": "sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", 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_rate{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container) / sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", 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": 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": 4,
- "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": [
- {
- "alias": "requests",
- "color": "#F2495C",
- "dashes": true,
- "fill": 0,
- "hideTooltip": true,
- "legend": false,
- "linewidth": 2,
- "stack": false
- },
- {
- "alias": "limits",
- "color": "#FF9830",
- "dashes": true,
- "fill": 0,
- "hideTooltip": true,
- "legend": false,
- "linewidth": 2,
- "stack": false
- }
- ],
- "spaceLength": 10,
- "span": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\", container!=\"\"}) by (container)",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}container{{`}}`}}",
- "legendLink": null,
- "step": 10
- },
- {
- "expr": "sum(\n kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"})\n",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "requests",
- "legendLink": null,
- "step": 10
- },
- {
- "expr": "sum(\n kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"})\n",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "limits",
- "legendLink": null,
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory 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": "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,
- "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": "Memory Usage",
- "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": "bytes"
- },
- {
- "alias": "Memory Requests",
- "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": "bytes"
- },
- {
- "alias": "Memory Requests %",
- "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": "percentunit"
- },
- {
- "alias": "Memory Limits",
- "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": "bytes"
- },
- {
- "alias": "Memory Limits %",
- "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": "percentunit"
- },
- {
- "alias": "Memory Usage (RSS)",
- "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": "bytes"
- },
- {
- "alias": "Memory Usage (Cache)",
- "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": "bytes"
- },
- {
- "alias": "Memory Usage (Swap)",
- "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": "bytes"
- },
- {
- "alias": "Container",
- "colorMode": null,
- "colors": [
-
- ],
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "decimals": 2,
- "link": 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{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\", container!=\"\"}) by (container)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "A",
- "step": 10
- },
- {
- "expr": "sum(kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "B",
- "step": 10
- },
- {
- "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container) / sum(kube_pod_container_resource_requests_memory_bytes{namespace=\"$namespace\", pod=\"$pod\"}) by (container)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "C",
- "step": 10
- },
- {
- "expr": "sum(kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"\"}) by (container)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "D",
- "step": 10
- },
- {
- "expr": "sum(container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"\"}) by (container) / sum(kube_pod_container_resource_limits_memory_bytes{namespace=\"$namespace\", pod=\"$pod\"}) by (container)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "E",
- "step": 10
- },
- {
- "expr": "sum(container_memory_rss{cluster=\"$cluster\", 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{cluster=\"$cluster\", 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{cluster=\"$cluster\", 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": 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 Quota",
- "titleSize": "h6"
- },
- {
- "collapse": false,
- "height": "250px",
- "panels": [
- {
- "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": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$__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": 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": "Network",
- "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": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$__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": 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": "Network",
- "titleSize": "h6"
- },
- {
- "collapse": false,
- "height": "250px",
- "panels": [
- {
- "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": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$__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": 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": "Network",
- "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(irate(container_network_transmit_packets_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$__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": 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": "Network",
- "titleSize": "h6"
- },
- {
- "collapse": false,
- "height": "250px",
- "panels": [
- {
- "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": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$__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": 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": "Network",
- "titleSize": "h6"
- },
- {
- "collapse": false,
- "height": "250px",
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 10,
- "id": 11,
- "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(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\", pod=~\"$pod\"}[$__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": 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": "Network",
- "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"
- },
- {
- "allValue": null,
- "current": {
- "text": "",
- "value": ""
- },
- "datasource": "$datasource",
- "hide": 2,
- "includeAll": false,
- "label": null,
- "multi": false,
- "name": "cluster",
- "options": [
-
- ],
- "query": "label_values(kube_pod_info, cluster)",
- "refresh": 1,
- "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": "namespace",
- "options": [
-
- ],
- "query": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)",
- "refresh": 1,
- "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{cluster=\"$cluster\", 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": "",
- "title": "Kubernetes / Compute Resources / Pod",
- "uid": "6581e46e4e5c7ba40a07646395ef7b23",
- "version": 0
- }
+ {{`{"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\", cluster=\"$cluster\"}) by (container)","format":"time_series","intervalFactor":2,"legendFormat":"{{container}}","legendLink":null},{"expr":"sum(\n kube_pod_container_resource_requests{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", resource=\"cpu\"}\n)\n","format":"time_series","intervalFactor":2,"legendFormat":"requests","legendLink":null},{"expr":"sum(\n kube_pod_container_resource_limits{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", resource=\"cpu\"}\n)\n","format":"time_series","intervalFactor":2,"legendFormat":"limits","legendLink":null}],"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{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", namespace=\"$namespace\", pod=\"$pod\", container!=\"\", cluster=\"$cluster\"}[$__rate_interval])) by (container) /sum(increase(container_cpu_cfs_periods_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", namespace=\"$namespace\", pod=\"$pod\", container!=\"\", cluster=\"$cluster\"}[$__rate_interval])) by (container)","format":"time_series","intervalFactor":2,"legendFormat":"{{container}}","legendLink":null}],"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{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"A"},{"expr":"sum(cluster:namespace:pod_cpu:active:kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"B"},{"expr":"sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container) / sum(cluster:namespace:pod_cpu:active:kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"C"},{"expr":"sum(cluster:namespace:pod_cpu:active:kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"D"},{"expr":"sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container) / sum(cluster:namespace:pod_cpu:active:kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"E"}],"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{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"\", image!=\"\"}) by (container)","format":"time_series","intervalFactor":2,"legendFormat":"{{container}}","legendLink":null},{"expr":"sum(\n kube_pod_container_resource_requests{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", resource=\"memory\"}\n)\n","format":"time_series","intervalFactor":2,"legendFormat":"requests","legendLink":null},{"expr":"sum(\n kube_pod_container_resource_limits{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", resource=\"memory\"}\n)\n","format":"time_series","intervalFactor":2,"legendFormat":"limits","legendLink":null}],"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{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"\", image!=\"\"}) by (container)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"A"},{"expr":"sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_requests{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"B"},{"expr":"sum(container_memory_working_set_bytes{job=\"kubelet\", 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)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"C"},{"expr":"sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_limits{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"D"},{"expr":"sum(container_memory_working_set_bytes{job=\"kubelet\", 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)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"E"},{"expr":"sum(container_memory_rss{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container != \"\", container != \"POD\"}) by (container)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"F"},{"expr":"sum(container_memory_cache{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container != \"\", container != \"POD\"}) by (container)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"G"},{"expr":"sum(container_memory_swap{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container != \"\", container != \"POD\"}) by (container)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"H"}],"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{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)","format":"time_series","intervalFactor":2,"legendFormat":"{{pod}}","legendLink":null}],"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{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)","format":"time_series","intervalFactor":2,"legendFormat":"{{pod}}","legendLink":null}],"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{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)","format":"time_series","intervalFactor":2,"legendFormat":"{{pod}}","legendLink":null}],"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{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)","format":"time_series","intervalFactor":2,"legendFormat":"{{pod}}","legendLink":null}],"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{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)","format":"time_series","intervalFactor":2,"legendFormat":"{{pod}}","legendLink":null}],"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{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)","format":"time_series","intervalFactor":2,"legendFormat":"{{pod}}","legendLink":null}],"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":null,"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{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])))","format":"time_series","intervalFactor":2,"legendFormat":"Reads","legendLink":null},{"expr":"ceil(sum by(pod) (rate(container_fs_writes_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)\", container!=\"\", cluster=\"$cluster\",namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])))","format":"time_series","intervalFactor":2,"legendFormat":"Writes","legendLink":null}],"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{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval]))","format":"time_series","intervalFactor":2,"legendFormat":"Reads","legendLink":null},{"expr":"sum by(pod) (rate(container_fs_writes_bytes_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval]))","format":"time_series","intervalFactor":2,"legendFormat":"Writes","legendLink":null}],"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":null,"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{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]) + rate(container_fs_writes_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval])))","format":"time_series","intervalFactor":2,"legendFormat":"{{container}}","legendLink":null}],"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{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))","format":"time_series","intervalFactor":2,"legendFormat":"{{container}}","legendLink":null}],"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":null,"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":null,"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":null,"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{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"A"},{"expr":"sum by(container) (rate(container_fs_writes_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\",device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"B"},{"expr":"sum by(container) (rate(container_fs_reads_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]) + rate(container_fs_writes_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"C"},{"expr":"sum by(container) (rate(container_fs_reads_bytes_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"D"},{"expr":"sum by(container) (rate(container_fs_writes_bytes_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"E"},{"expr":"sum by(container) (rate(container_fs_reads_bytes_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]) + rate(container_fs_writes_bytes_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", device=~\"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)\", container!=\"\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[$__rate_interval]))","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"F"}],"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":"default","value":"default"},"hide":0,"label":"Data Source","name":"datasource","options":[],"query":"prometheus","refresh":1,"regex":"","type":"datasource"},{"allValue":null,"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(up{job=\"kube-state-metrics\"}, cluster)","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":"namespace","options":[],"query":"label_values(kube_namespace_status_phase{job=\"kube-state-metrics\", cluster=\"$cluster\"}, 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{job=\"kube-state-metrics\", cluster=\"$cluster\", 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/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-windows-cluster.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-windows-cluster.yaml
new file mode 100644
index 0000000000..57f3622a96
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-windows-cluster.yaml
@@ -0,0 +1,24 @@
+{{- /*
+Generated from 'k8s-resources-windows-cluster' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/examples/windows.jsonnet
+In order to change this file first read following link:
+https://github.com/prometheus-community/helm-charts/pull/3083
+*/ -}}
+{{- $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 .Values.windowsMonitoring.enabled }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "k8s-resources-windows-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 "kube-prometheus-stack.name" $ }}-grafana
+{{ include "kube-prometheus-stack.labels" $ | indent 4 }}
+data:
+ k8s-resources-windows-cluster.json: |-
+ {{`{"__inputs":[],"__requires":[],"annotations":{"list":[]},"editable":false,"gnetId":null,"graphTooltip":0,"hideControls":false,"id":null,"links":[],"refresh":"","rows":[{"collapse":false,"height":"100px","panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"format":"percentunit","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":2,"stack":false,"steppedLine":false,"targets":[{"expr":"1 - avg(rate(windows_cpu_time_total{cluster=\"$cluster\", job=\"kubernetes-windows-exporter\", mode=\"idle\"}[1m]))","format":"time_series","instant":true,"intervalFactor":2,"refId":"A"}],"thresholds":"70,80","timeFrom":null,"timeShift":null,"title":"CPU Utilisation","tooltip":{"shared":true,"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,"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":2,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(kube_pod_windows_container_resource_cpu_cores_request{cluster=\"$cluster\"}) / sum(node:windows_node_num_cpu:sum{cluster=\"$cluster\"})","format":"time_series","instant":true,"intervalFactor":2,"refId":"A"}],"thresholds":"70,80","timeFrom":null,"timeShift":null,"title":"CPU Requests Commitment","tooltip":{"shared":true,"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,"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":2,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(kube_pod_windows_container_resource_cpu_cores_limit{cluster=\"$cluster\"}) / sum(node:windows_node_num_cpu:sum{cluster=\"$cluster\"})","format":"time_series","instant":true,"intervalFactor":2,"refId":"A"}],"thresholds":"70,80","timeFrom":null,"timeShift":null,"title":"CPU Limits Commitment","tooltip":{"shared":true,"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":5,"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":2,"stack":false,"steppedLine":false,"targets":[{"expr":"1 - sum(:windows_node_memory_MemFreeCached_bytes:sum{cluster=\"$cluster\"}) / sum(:windows_node_memory_MemTotal_bytes:sum{cluster=\"$cluster\"})","format":"time_series","instant":true,"intervalFactor":2,"refId":"A"}],"thresholds":"70,80","timeFrom":null,"timeShift":null,"title":"Memory Utilisation","tooltip":{"shared":true,"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":6,"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":2,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(kube_pod_windows_container_resource_memory_request{cluster=\"$cluster\"}) / sum(:windows_node_memory_MemTotal_bytes:sum{cluster=\"$cluster\"})","format":"time_series","instant":true,"intervalFactor":2,"refId":"A"}],"thresholds":"70,80","timeFrom":null,"timeShift":null,"title":"Memory Requests Commitment","tooltip":{"shared":true,"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":7,"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":2,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(kube_pod_windows_container_resource_memory_limit{cluster=\"$cluster\"}) / sum(:windows_node_memory_MemTotal_bytes:sum{cluster=\"$cluster\"})","format":"time_series","instant":true,"intervalFactor":2,"refId":"A"}],"thresholds":"70,80","timeFrom":null,"timeShift":null,"title":"Memory Limits Commitment","tooltip":{"shared":true,"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":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":12,"stack":true,"steppedLine":false,"targets":[{"expr":"sum(namespace_pod_container:windows_container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\"}) by (namespace)","format":"time_series","intervalFactor":2,"legendFormat":"{{namespace}}","legendLink":null}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"CPU Usage","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":"CPU","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"id":9,"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":"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":"Namespace","colorMode":null,"colors":[],"dateFormat":"YYYY-MM-DD HH:mm:ss","decimals":2,"link":true,"linkTargetBlank":false,"linkTooltip":"Drill down","linkUrl":"/d/490b402361724ab1d4c45666c1fa9b6f/k8s-resources-windows-namespace?var-datasource=$datasource&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(namespace_pod_container:windows_container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\"}) by (namespace)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"A"},{"expr":"sum(kube_pod_windows_container_resource_cpu_cores_request{cluster=\"$cluster\"}) by (namespace)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"B"},{"expr":"sum(namespace_pod_container:windows_container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\"}) by (namespace) / sum(kube_pod_windows_container_resource_cpu_cores_request{cluster=\"$cluster\"}) by (namespace)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"C"},{"expr":"sum(kube_pod_windows_container_resource_cpu_cores_limit{cluster=\"$cluster\"}) by (namespace)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"D"},{"expr":"sum(namespace_pod_container:windows_container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\"}) by (namespace) / sum(kube_pod_windows_container_resource_cpu_cores_limit{cluster=\"$cluster\"}) by (namespace)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"E"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"CPU Quota","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":"CPU Quota","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"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":12,"stack":true,"steppedLine":false,"targets":[{"expr":"sum(windows_container_private_working_set_usage{cluster=\"$cluster\"}) by (namespace)","format":"time_series","intervalFactor":2,"legendFormat":"{{namespace}}","legendLink":null}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Memory Usage (Private Working Set)","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"decbytes","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":11,"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":"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":"decbytes"},{"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":"decbytes"},{"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":"decbytes"},{"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":"Namespace","colorMode":null,"colors":[],"dateFormat":"YYYY-MM-DD HH:mm:ss","decimals":2,"link":true,"linkTargetBlank":false,"linkTooltip":"Drill down","linkUrl":"/d/490b402361724ab1d4c45666c1fa9b6f/k8s-resources-windows-namespace?var-datasource=$datasource&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(windows_container_private_working_set_usage{cluster=\"$cluster\"}) by (namespace)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"A"},{"expr":"sum(kube_pod_windows_container_resource_memory_request{cluster=\"$cluster\"}) by (namespace)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"B"},{"expr":"sum(windows_container_private_working_set_usage{cluster=\"$cluster\"}) by (namespace) / sum(kube_pod_windows_container_resource_memory_request{cluster=\"$cluster\"}) by (namespace)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"C"},{"expr":"sum(kube_pod_windows_container_resource_memory_limit{cluster=\"$cluster\"}) by (namespace)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"D"},{"expr":"sum(windows_container_private_working_set_usage{cluster=\"$cluster\"}) by (namespace) / sum(kube_pod_windows_container_resource_memory_limit{cluster=\"$cluster\"}) by (namespace)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"E"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Requests by Namespace","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":"Memory Requests","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"},{"allValue":null,"current":{},"datasource":"$datasource","hide":`}}{{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}{{`,"includeAll":false,"label":"cluster","multi":false,"name":"cluster","options":[],"query":"label_values(up{job=\"kubernetes-windows-exporter\"}, cluster)","refresh":2,"regex":"","sort":1,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false}]},"time":{"from":"now-6h","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 / Cluster(Windows)","uid":"4d08557fd9391b100730f2494bccac68","version":0}`}}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-windows-namespace.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-windows-namespace.yaml
new file mode 100644
index 0000000000..f824b48f8c
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-windows-namespace.yaml
@@ -0,0 +1,24 @@
+{{- /*
+Generated from 'k8s-resources-windows-namespace' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/examples/windows.jsonnet
+In order to change this file first read following link:
+https://github.com/prometheus-community/helm-charts/pull/3083
+*/ -}}
+{{- $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 .Values.windowsMonitoring.enabled }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "k8s-resources-windows-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 "kube-prometheus-stack.name" $ }}-grafana
+{{ include "kube-prometheus-stack.labels" $ | indent 4 }}
+data:
+ k8s-resources-windows-namespace.json: |-
+ {{`{"__inputs":[],"__requires":[],"annotations":{"list":[]},"editable":false,"gnetId":null,"graphTooltip":0,"hideControls":false,"id":null,"links":[],"refresh":"","rows":[{"collapse":false,"height":"250px","panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":10,"id":2,"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(namespace_pod_container:windows_container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)","format":"time_series","intervalFactor":2,"legendFormat":"{{pod}}","legendLink":null}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"CPU Usage","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":"CPU Usage","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"id":3,"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":"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/40597a704a610e936dc6ed374a7ce023/k8s-resources-windows-pod?var-datasource=$datasource&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(namespace_pod_container:windows_container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"A"},{"expr":"sum(kube_pod_windows_container_resource_cpu_cores_request{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"B"},{"expr":"sum(namespace_pod_container:windows_container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod) / sum(kube_pod_windows_container_resource_cpu_cores_request{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"C"},{"expr":"sum(kube_pod_windows_container_resource_cpu_cores_limit{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"D"},{"expr":"sum(namespace_pod_container:windows_container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod) / sum(kube_pod_windows_container_resource_cpu_cores_limit{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"E"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"CPU Quota","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":"CPU Quota","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":10,"id":4,"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(windows_container_private_working_set_usage{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)","format":"time_series","intervalFactor":2,"legendFormat":"{{pod}}","legendLink":null}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Memory Usage","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"decbytes","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,"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":"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":"decbytes"},{"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":"decbytes"},{"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":"decbytes"},{"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/40597a704a610e936dc6ed374a7ce023/k8s-resources-windows-pod?var-datasource=$datasource&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(windows_container_private_working_set_usage{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"A"},{"expr":"sum(kube_pod_windows_container_resource_memory_request{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"B"},{"expr":"sum(windows_container_private_working_set_usage{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod) / sum(kube_pod_windows_container_resource_memory_request{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"C"},{"expr":"sum(kube_pod_windows_container_resource_memory_limit{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"D"},{"expr":"sum(windows_container_private_working_set_usage{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod) / sum(kube_pod_windows_container_resource_memory_limit{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"E"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Memory Quota","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":"Memory Quota","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"},{"allValue":null,"current":{},"datasource":"$datasource","hide":0,"includeAll":false,"label":"Namespace","multi":false,"name":"namespace","options":[],"query":"label_values(windows_pod_container_available, namespace)","refresh":2,"regex":"","sort":1,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"allValue":null,"current":{},"datasource":"$datasource","hide":`}}{{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}{{`,"includeAll":false,"label":"cluster","multi":false,"name":"cluster","options":[],"query":"label_values(up{job=\"kubernetes-windows-exporter\"}, cluster)","refresh":2,"regex":"","sort":1,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false}]},"time":{"from":"now-6h","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(Windows)","uid":"490b402361724ab1d4c45666c1fa9b6f","version":0}`}}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-windows-pod.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-windows-pod.yaml
new file mode 100644
index 0000000000..874c657dcf
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-windows-pod.yaml
@@ -0,0 +1,24 @@
+{{- /*
+Generated from 'k8s-resources-windows-pod' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/examples/windows.jsonnet
+In order to change this file first read following link:
+https://github.com/prometheus-community/helm-charts/pull/3083
+*/ -}}
+{{- $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 .Values.windowsMonitoring.enabled }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "k8s-resources-windows-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 "kube-prometheus-stack.name" $ }}-grafana
+{{ include "kube-prometheus-stack.labels" $ | indent 4 }}
+data:
+ k8s-resources-windows-pod.json: |-
+ {{`{"__inputs":[],"__requires":[],"annotations":{"list":[]},"editable":false,"gnetId":null,"graphTooltip":0,"hideControls":false,"id":null,"links":[],"refresh":"","rows":[{"collapse":false,"height":"250px","panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":10,"id":2,"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(namespace_pod_container:windows_container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)","format":"time_series","intervalFactor":2,"legendFormat":"{{container}}","legendLink":null}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"CPU Usage","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":"CPU Usage","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"id":3,"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":"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(namespace_pod_container:windows_container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"A"},{"expr":"sum(kube_pod_windows_container_resource_cpu_cores_request{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"B"},{"expr":"sum(namespace_pod_container:windows_container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container) / sum(kube_pod_windows_container_resource_cpu_cores_request{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"C"},{"expr":"sum(kube_pod_windows_container_resource_cpu_cores_limit{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"D"},{"expr":"sum(namespace_pod_container:windows_container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container) / sum(kube_pod_windows_container_resource_cpu_cores_limit{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"E"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"CPU Quota","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":"CPU Quota","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":10,"id":4,"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(windows_container_private_working_set_usage{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)","format":"time_series","intervalFactor":2,"legendFormat":"{{container}}","legendLink":null}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Memory Usage","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":"Memory Usage","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"id":5,"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":"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":"decbytes"},{"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":"decbytes"},{"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":"decbytes"},{"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":"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(windows_container_private_working_set_usage{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"A"},{"expr":"sum(kube_pod_windows_container_resource_memory_request{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"B"},{"expr":"sum(windows_container_private_working_set_usage{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container) / sum(kube_pod_windows_container_resource_memory_request{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"C"},{"expr":"sum(kube_pod_windows_container_resource_memory_limit{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"D"},{"expr":"sum(windows_container_private_working_set_usage{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container) / sum(kube_pod_windows_container_resource_memory_limit{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"E"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Memory Quota","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":"Memory Quota","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"id":6,"legend":{"alignAsTable":true,"avg":true,"current":true,"max":false,"min":false,"rightSide":true,"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":12,"stack":false,"steppedLine":false,"targets":[{"expr":"sort_desc(sum by (container) (rate(windows_container_network_received_bytes_total{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[1m])))","format":"time_series","intervalFactor":2,"legendFormat":"Received : {{ container }}","refId":"A"},{"expr":"sort_desc(sum by (container) (rate(windows_container_network_transmitted_bytes_total{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[1m])))","format":"time_series","intervalFactor":2,"legendFormat":"Transmitted : {{ container }}","refId":"B"}],"thresholds":[],"timeFrom":null,"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":[{"format":"bytes","label":null,"logBase":1,"max":null,"min":0,"show":true},{"format":"bytes","label":null,"logBase":1,"max":null,"min":0,"show":true}]}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Network I/O","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"},{"allValue":null,"current":{},"datasource":"$datasource","hide":0,"includeAll":false,"label":"Namespace","multi":false,"name":"namespace","options":[],"query":"label_values(windows_pod_container_available, namespace)","refresh":2,"regex":"","sort":1,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"allValue":null,"current":{},"datasource":"$datasource","hide":0,"includeAll":false,"label":"Pod","multi":false,"name":"pod","options":[],"query":"label_values(windows_pod_container_available{namespace=\"$namespace\"}, pod)","refresh":2,"regex":"","sort":1,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"allValue":null,"current":{},"datasource":"$datasource","hide":`}}{{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}{{`,"includeAll":false,"label":"cluster","multi":false,"name":"cluster","options":[],"query":"label_values(up{job=\"kubernetes-windows-exporter\"}, cluster)","refresh":2,"regex":"","sort":1,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false}]},"time":{"from":"now-6h","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(Windows)","uid":"40597a704a610e936dc6ed374a7ce023","version":0}`}}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml
old mode 100755
new mode 100644
index ca358a0aca..6eebeeb45d
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml
@@ -1,2012 +1,24 @@
{{- /*
-Generated from 'k8s-resources-workload' from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/grafana-dashboardDefinitions.yaml
+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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.grafana.enabled .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 }}
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-workload" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
+ name: {{ printf "%s-%s" (include "kube-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 }}: "1"
+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }}
{{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.labels" $ | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-grafana
+{{ include "kube-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,
- "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(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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": 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 Usage",
- "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": 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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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_rate{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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_rate{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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_rate{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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": 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": 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": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(\n container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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": 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 Usage",
- "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": 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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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{cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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{cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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{cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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": 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 Quota",
- "titleSize": "h6"
- },
- {
- "collapse": false,
- "height": "250px",
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "id": 5,
- "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,
- "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,
- "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/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{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", 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{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", 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{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", 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{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", 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{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", 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{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", 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": 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": "Network",
- "titleSize": "h6"
- },
- {
- "collapse": false,
- "height": "250px",
- "panels": [
- {
- "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": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "(sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", 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": 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": "Network",
- "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": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "(sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", 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": 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": "Network",
- "titleSize": "h6"
- },
- {
- "collapse": false,
- "height": "250px",
- "panels": [
- {
- "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": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "(avg(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", 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": 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": "Network",
- "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": "(avg(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", 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": 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": "Network",
- "titleSize": "h6"
- },
- {
- "collapse": false,
- "height": "250px",
- "panels": [
- {
- "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": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "(sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", 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": 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": "Network",
- "titleSize": "h6"
- },
- {
- "collapse": false,
- "height": "250px",
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 10,
- "id": 11,
- "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(irate(container_network_transmit_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", 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": 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": "Network",
- "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": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "(sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", 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": 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": "Network",
- "titleSize": "h6"
- },
- {
- "collapse": false,
- "height": "250px",
- "panels": [
- {
- "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": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "(sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", 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": 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": "Network",
- "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"
- },
- {
- "allValue": null,
- "current": {
- "text": "",
- "value": ""
- },
- "datasource": "$datasource",
- "hide": 2,
- "includeAll": false,
- "label": null,
- "multi": false,
- "name": "cluster",
- "options": [
-
- ],
- "query": "label_values(kube_pod_info, cluster)",
- "refresh": 1,
- "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": "namespace",
- "options": [
-
- ],
- "query": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)",
- "refresh": 1,
- "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(mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}, workload)",
- "refresh": 1,
- "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(mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\"}, workload_type)",
- "refresh": 1,
- "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": "",
- "title": "Kubernetes / Compute Resources / Workload",
- "uid": "a164a7f0339f99e89cea5cb47e9be617",
- "version": 0
- }
+ {{`{"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{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","format":"time_series","intervalFactor":2,"legendFormat":"{{pod}}","legendLink":null}],"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{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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"A"},{"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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"B"},{"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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"C"},{"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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"D"},{"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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"E"}],"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{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","format":"time_series","intervalFactor":2,"legendFormat":"{{pod}}","legendLink":null}],"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{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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"A"},{"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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"B"},{"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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"C"},{"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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"D"},{"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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"E"}],"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{job=\"kubelet\", 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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"A"},{"expr":"(sum(irate(container_network_transmit_bytes_total{job=\"kubelet\", 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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"B"},{"expr":"(sum(irate(container_network_receive_packets_total{job=\"kubelet\", 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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"C"},{"expr":"(sum(irate(container_network_transmit_packets_total{job=\"kubelet\", 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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"D"},{"expr":"(sum(irate(container_network_receive_packets_dropped_total{job=\"kubelet\", 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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"E"},{"expr":"(sum(irate(container_network_transmit_packets_dropped_total{job=\"kubelet\", 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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"F"}],"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{job=\"kubelet\", 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","format":"time_series","intervalFactor":2,"legendFormat":"{{pod}}","legendLink":null}],"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{job=\"kubelet\", 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","format":"time_series","intervalFactor":2,"legendFormat":"{{pod}}","legendLink":null}],"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{job=\"kubelet\", 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","format":"time_series","intervalFactor":2,"legendFormat":"{{pod}}","legendLink":null}],"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{job=\"kubelet\", 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","format":"time_series","intervalFactor":2,"legendFormat":"{{pod}}","legendLink":null}],"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{job=\"kubelet\", 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","format":"time_series","intervalFactor":2,"legendFormat":"{{pod}}","legendLink":null}],"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{job=\"kubelet\", 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","format":"time_series","intervalFactor":2,"legendFormat":"{{pod}}","legendLink":null}],"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{job=\"kubelet\", 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","format":"time_series","intervalFactor":2,"legendFormat":"{{pod}}","legendLink":null}],"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{job=\"kubelet\", 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","format":"time_series","intervalFactor":2,"legendFormat":"{{pod}}","legendLink":null}],"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":"default","value":"default"},"hide":0,"label":"Data Source","name":"datasource","options":[],"query":"prometheus","refresh":1,"regex":"","type":"datasource"},{"allValue":null,"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(up{job=\"kube-state-metrics\"}, cluster)","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":"namespace","options":[],"query":"label_values(kube_namespace_status_phase{job=\"kube-state-metrics\", cluster=\"$cluster\"}, namespace)","refresh":2,"regex":"","sort":1,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"allValue":null,"current":{"text":"","value":""},"datasource":"$datasource","hide":0,"includeAll":true,"label":null,"multi":false,"name":"type","options":[],"query":"label_values(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\"}, workload_type)","refresh":2,"regex":"","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":"workload","options":[],"query":"label_values(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=~\"$type\"}, workload)","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/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml
old mode 100755
new mode 100644
index e40dcc41dd..efc56b9674
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml
@@ -1,2168 +1,24 @@
{{- /*
-Generated from 'k8s-resources-workloads-namespace' from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/grafana-dashboardDefinitions.yaml
+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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.grafana.enabled .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 }}
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-workloads-namespace" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
+ name: {{ printf "%s-%s" (include "kube-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 }}: "1"
+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }}
{{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.labels" $ | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-grafana
+{{ include "kube-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,
- "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": [
- {
- "alias": "quota - requests",
- "color": "#F2495C",
- "dashes": true,
- "fill": 0,
- "hideTooltip": true,
- "legend": false,
- "linewidth": 2,
- "stack": false
- },
- {
- "alias": "quota - limits",
- "color": "#FF9830",
- "dashes": true,
- "fill": 0,
- "hideTooltip": true,
- "legend": false,
- "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_rate{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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{cluster=\"$cluster\", namespace=\"$namespace\", type=\"hard\",resource=\"requests.cpu\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "quota - requests",
- "legendLink": null,
- "step": 10
- },
- {
- "expr": "scalar(kube_resourcequota{cluster=\"$cluster\", 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": 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 Usage",
- "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": 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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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(mixin_pod_workload{cluster=\"$cluster\", 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_rate{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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_rate{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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_rate{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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": 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": 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": [
- {
- "alias": "quota - requests",
- "color": "#F2495C",
- "dashes": true,
- "fill": 0,
- "hideTooltip": true,
- "legend": false,
- "linewidth": 2,
- "stack": false
- },
- {
- "alias": "quota - limits",
- "color": "#FF9830",
- "dashes": true,
- "fill": 0,
- "hideTooltip": true,
- "legend": false,
- "linewidth": 2,
- "stack": false
- }
- ],
- "spaceLength": 10,
- "span": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(\n container_memory_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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{cluster=\"$cluster\", namespace=\"$namespace\", type=\"hard\",resource=\"requests.memory\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "quota - requests",
- "legendLink": null,
- "step": 10
- },
- {
- "expr": "scalar(kube_resourcequota{cluster=\"$cluster\", 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": 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 Usage",
- "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": 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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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(mixin_pod_workload{cluster=\"$cluster\", 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{cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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{cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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{cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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": 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 Quota",
- "titleSize": "h6"
- },
- {
- "collapse": false,
- "height": "250px",
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "id": 5,
- "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,
- "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,
- "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": "Workload",
- "colorMode": null,
- "colors": [
-
- ],
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "decimals": 2,
- "link": true,
- "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,
- "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{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", 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{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", 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{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", 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{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", 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{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", 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{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", 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": 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": "Network",
- "titleSize": "h6"
- },
- {
- "collapse": false,
- "height": "250px",
- "panels": [
- {
- "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": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "(sum(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", 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": 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": "Network",
- "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": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "(sum(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", 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": 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": "Network",
- "titleSize": "h6"
- },
- {
- "collapse": false,
- "height": "250px",
- "panels": [
- {
- "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": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "(avg(irate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", 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": 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": "Network",
- "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": "(avg(irate(container_network_transmit_bytes_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", 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": 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": "Network",
- "titleSize": "h6"
- },
- {
- "collapse": false,
- "height": "250px",
- "panels": [
- {
- "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": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "(sum(irate(container_network_receive_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", 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": 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": "Network",
- "titleSize": "h6"
- },
- {
- "collapse": false,
- "height": "250px",
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 10,
- "id": 11,
- "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(irate(container_network_transmit_packets_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", 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": 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": "Network",
- "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": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "(sum(irate(container_network_receive_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", 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": 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": "Network",
- "titleSize": "h6"
- },
- {
- "collapse": false,
- "height": "250px",
- "panels": [
- {
- "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": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "(sum(irate(container_network_transmit_packets_dropped_total{cluster=\"$cluster\", namespace=~\"$namespace\"}[$__interval])\n* on (namespace,pod) \ngroup_left(workload,workload_type) mixin_pod_workload{cluster=\"$cluster\", 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": 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": "Network",
- "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"
- },
- {
- "allValue": null,
- "auto": false,
- "auto_count": 30,
- "auto_min": "10s",
- "current": {
- "text": "deployment",
- "value": "deployment"
- },
- "datasource": "$datasource",
- "definition": "label_values(mixin_pod_workload{namespace=~\"$namespace\", workload=~\".+\"}, workload_type)",
- "hide": 0,
- "includeAll": false,
- "label": null,
- "multi": false,
- "name": "type",
- "options": [
-
- ],
- "query": "label_values(mixin_pod_workload{namespace=~\"$namespace\", workload=~\".+\"}, workload_type)",
- "refresh": 1,
- "regex": "",
- "skipUrlSync": false,
- "sort": 0,
- "tagValuesQuery": "",
- "tags": [
-
- ],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- },
- {
- "allValue": null,
- "current": {
- "text": "",
- "value": ""
- },
- "datasource": "$datasource",
- "hide": 2,
- "includeAll": false,
- "label": null,
- "multi": false,
- "name": "cluster",
- "options": [
-
- ],
- "query": "label_values(kube_pod_info, cluster)",
- "refresh": 1,
- "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": "namespace",
- "options": [
-
- ],
- "query": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)",
- "refresh": 1,
- "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": "",
- "title": "Kubernetes / Compute Resources / Namespace (Workloads)",
- "uid": "a87fb0d919ec0ea5f6543124e16c42a5",
- "version": 0
- }
+ {{`{"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{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","format":"time_series","intervalFactor":2,"legendFormat":"{{workload}} - {{workload_type}}","legendLink":null},{"expr":"scalar(kube_resourcequota{cluster=\"$cluster\", namespace=\"$namespace\", type=\"hard\",resource=\"requests.cpu\"})","format":"time_series","intervalFactor":2,"legendFormat":"quota - requests","legendLink":null},{"expr":"scalar(kube_resourcequota{cluster=\"$cluster\", namespace=\"$namespace\", type=\"hard\",resource=\"limits.cpu\"})","format":"time_series","intervalFactor":2,"legendFormat":"quota - limits","legendLink":null}],"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{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=~\"$type\"}) by (workload, workload_type)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"A"},{"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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"B"},{"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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"C"},{"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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"D"},{"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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"E"},{"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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"F"}],"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{job=\"kubelet\", 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","format":"time_series","intervalFactor":2,"legendFormat":"{{workload}} - {{workload_type}}","legendLink":null},{"expr":"scalar(kube_resourcequota{cluster=\"$cluster\", namespace=\"$namespace\", type=\"hard\",resource=\"requests.memory\"})","format":"time_series","intervalFactor":2,"legendFormat":"quota - requests","legendLink":null},{"expr":"scalar(kube_resourcequota{cluster=\"$cluster\", namespace=\"$namespace\", type=\"hard\",resource=\"limits.memory\"})","format":"time_series","intervalFactor":2,"legendFormat":"quota - limits","legendLink":null}],"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{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=~\"$type\"}) by (workload, workload_type)","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"A"},{"expr":"sum(\n container_memory_working_set_bytes{job=\"kubelet\", 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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"B"},{"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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"C"},{"expr":"sum(\n container_memory_working_set_bytes{job=\"kubelet\", 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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"D"},{"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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"E"},{"expr":"sum(\n container_memory_working_set_bytes{job=\"kubelet\", 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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"F"}],"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{job=\"kubelet\", 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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"A"},{"expr":"(sum(irate(container_network_transmit_bytes_total{job=\"kubelet\", 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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"B"},{"expr":"(sum(irate(container_network_receive_packets_total{job=\"kubelet\", 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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"C"},{"expr":"(sum(irate(container_network_transmit_packets_total{job=\"kubelet\", 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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"D"},{"expr":"(sum(irate(container_network_receive_packets_dropped_total{job=\"kubelet\", 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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"E"},{"expr":"(sum(irate(container_network_transmit_packets_dropped_total{job=\"kubelet\", 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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"F"}],"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{job=\"kubelet\", 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","format":"time_series","intervalFactor":2,"legendFormat":"{{workload}}","legendLink":null}],"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{job=\"kubelet\", 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","format":"time_series","intervalFactor":2,"legendFormat":"{{workload}}","legendLink":null}],"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{job=\"kubelet\", 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","format":"time_series","intervalFactor":2,"legendFormat":"{{workload}}","legendLink":null}],"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{job=\"kubelet\", 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","format":"time_series","intervalFactor":2,"legendFormat":"{{workload}}","legendLink":null}],"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{job=\"kubelet\", 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","format":"time_series","intervalFactor":2,"legendFormat":"{{workload}}","legendLink":null}],"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{job=\"kubelet\", 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","format":"time_series","intervalFactor":2,"legendFormat":"{{workload}}","legendLink":null}],"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{job=\"kubelet\", 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","format":"time_series","intervalFactor":2,"legendFormat":"{{workload}}","legendLink":null}],"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{job=\"kubelet\", 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","format":"time_series","intervalFactor":2,"legendFormat":"{{workload}}","legendLink":null}],"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":"default","value":"default"},"hide":0,"label":"Data Source","name":"datasource","options":[],"query":"prometheus","refresh":1,"regex":"","type":"datasource"},{"allValue":null,"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(up{job=\"kube-state-metrics\"}, cluster)","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":"namespace","options":[],"query":"label_values(kube_pod_info{job=\"kube-state-metrics\", cluster=\"$cluster\"}, 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":"","value":""},"datasource":"$datasource","definition":"label_values(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=~\".+\"}, workload_type)","hide":0,"includeAll":true,"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":[],"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/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-windows-cluster-rsrc-use.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-windows-cluster-rsrc-use.yaml
new file mode 100644
index 0000000000..f35880b6d4
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-windows-cluster-rsrc-use.yaml
@@ -0,0 +1,24 @@
+{{- /*
+Generated from 'k8s-windows-cluster-rsrc-use' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/examples/windows.jsonnet
+In order to change this file first read following link:
+https://github.com/prometheus-community/helm-charts/pull/3083
+*/ -}}
+{{- $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 .Values.windowsMonitoring.enabled }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "k8s-windows-cluster-rsrc-use" | 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:
+ k8s-windows-cluster-rsrc-use.json: |-
+ {{`{"__inputs":[],"__requires":[],"annotations":{"list":[]},"editable":false,"gnetId":null,"graphTooltip":0,"hideControls":false,"id":null,"links":[],"refresh":"","rows":[{"collapse":false,"height":"250px","panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":10,"id":2,"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":"node:windows_node_cpu_utilisation:avg1m{cluster=\"$cluster\"} * node:windows_node_num_cpu:sum{cluster=\"$cluster\"} / scalar(sum(node:windows_node_num_cpu:sum{cluster=\"$cluster\"}))","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","legendLink":"/d/96e7484b0bb53b74fbc2bcb7723cd40b/k8s-windows-node-rsrc-use"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"CPU Utilisation","tooltip":{"shared":true,"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","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"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":"node:windows_node_memory_utilisation:ratio{cluster=\"$cluster\"}","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","legendLink":"/d/96e7484b0bb53b74fbc2bcb7723cd40b/k8s-windows-node-rsrc-use"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Memory Utilisation","tooltip":{"shared":true,"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}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":10,"id":4,"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":"node:windows_node_memory_swap_io_pages:irate{cluster=\"$cluster\"}","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","legendLink":"/d/96e7484b0bb53b74fbc2bcb7723cd40b/k8s-windows-node-rsrc-use"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Memory Saturation (Swap I/O Pages)","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":"Memory","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"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":12,"stack":true,"steppedLine":false,"targets":[{"expr":"node:windows_node_disk_utilisation:avg_irate{cluster=\"$cluster\"} / scalar(node:windows_node:sum{cluster=\"$cluster\"})","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","legendLink":"/d/96e7484b0bb53b74fbc2bcb7723cd40b/k8s-windows-node-rsrc-use"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Disk IO Utilisation","tooltip":{"shared":true,"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":"Disk","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"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":6,"stack":true,"steppedLine":false,"targets":[{"expr":"node:windows_node_net_utilisation:sum_irate{cluster=\"$cluster\"}","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","legendLink":"/d/96e7484b0bb53b74fbc2bcb7723cd40b/k8s-windows-node-rsrc-use"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Net Utilisation (Transmitted)","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":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}]},{"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":"node:windows_node_net_saturation:sum_irate{cluster=\"$cluster\"}","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","legendLink":"/d/96e7484b0bb53b74fbc2bcb7723cd40b/k8s-windows-node-rsrc-use"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Net Saturation (Dropped)","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":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}]}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Network","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"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":12,"stack":true,"steppedLine":false,"targets":[{"expr":"sum by (instance)(node:windows_node_filesystem_usage:{cluster=\"$cluster\"})\n","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","legendLink":"/d/96e7484b0bb53b74fbc2bcb7723cd40b/k8s-windows-node-rsrc-use"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Disk Capacity","tooltip":{"shared":true,"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":"Storage","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"},{"allValue":null,"current":{},"datasource":"$datasource","hide":`}}{{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}{{`,"includeAll":false,"label":"cluster","multi":false,"name":"cluster","options":[],"query":"label_values(up{job=\"kubernetes-windows-exporter\"}, cluster)","refresh":2,"regex":"","sort":1,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false}]},"time":{"from":"now-6h","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 / USE Method / Cluster(Windows)","uid":"53a43377ec9aaf2ff64dfc7a1f539334","version":0}`}}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-windows-node-rsrc-use.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-windows-node-rsrc-use.yaml
new file mode 100644
index 0000000000..a710862657
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-windows-node-rsrc-use.yaml
@@ -0,0 +1,24 @@
+{{- /*
+Generated from 'k8s-windows-node-rsrc-use' from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/examples/windows.jsonnet
+In order to change this file first read following link:
+https://github.com/prometheus-community/helm-charts/pull/3083
+*/ -}}
+{{- $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 .Values.windowsMonitoring.enabled }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "k8s-windows-node-rsrc-use" | 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:
+ k8s-windows-node-rsrc-use.json: |-
+ {{`{"__inputs":[],"__requires":[],"annotations":{"list":[]},"editable":false,"gnetId":null,"graphTooltip":0,"hideControls":false,"id":null,"links":[],"refresh":"","rows":[{"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":"node:windows_node_cpu_utilisation:avg1m{cluster=\"$cluster\", instance=\"$instance\"}","format":"time_series","intervalFactor":2,"legendFormat":"Utilisation","legendLink":null}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"CPU Utilisation","tooltip":{"shared":true,"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":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,"id":3,"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 by (core) (irate(windows_cpu_time_total{cluster=\"$cluster\", job=\"kubernetes-windows-exporter\", mode!=\"idle\", instance=\"$instance\"}[$__rate_interval]))","format":"time_series","intervalFactor":2,"legendFormat":"{{core}}","legendLink":null}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"CPU Usage Per Core","tooltip":{"shared":true,"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":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":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":"node:windows_node_memory_utilisation:{cluster=\"$cluster\", instance=\"$instance\"}","format":"time_series","intervalFactor":2,"legendFormat":"Memory","legendLink":null}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Memory Utilisation %","tooltip":{"shared":true,"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":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,"fillGradient":0,"id":5,"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":4,"stack":false,"steppedLine":false,"targets":[{"expr":"max(\n windows_os_visible_memory_bytes{cluster=\"$cluster\", job=\"kubernetes-windows-exporter\", instance=\"$instance\"}\n - windows_memory_available_bytes{cluster=\"$cluster\", job=\"kubernetes-windows-exporter\", instance=\"$instance\"}\n)\n","format":"time_series","intervalFactor":2,"legendFormat":"memory used","refId":"A"},{"expr":"max(node:windows_node_memory_totalCached_bytes:sum{cluster=\"$cluster\", instance=\"$instance\"})","format":"time_series","intervalFactor":2,"legendFormat":"memory cached","refId":"B"},{"expr":"max(windows_memory_available_bytes{cluster=\"$cluster\", job=\"kubernetes-windows-exporter\", instance=\"$instance\"})","format":"time_series","intervalFactor":2,"legendFormat":"memory free","refId":"C"}],"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":null,"show":true},{"format":"bytes","label":null,"logBase":1,"max":null,"min":null,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"id":6,"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":"node:windows_node_memory_swap_io_pages:irate{cluster=\"$cluster\", instance=\"$instance\"}","format":"time_series","intervalFactor":2,"legendFormat":"Swap IO","legendLink":null}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Memory Saturation (Swap I/O) Pages","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":"Memory","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"id":7,"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":"node:windows_node_disk_utilisation:avg_irate{cluster=\"$cluster\", instance=\"$instance\"}","format":"time_series","intervalFactor":2,"legendFormat":"Utilisation","legendLink":null}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Disk IO Utilisation","tooltip":{"shared":true,"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":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,"fillGradient":0,"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":[{"alias":"read","yaxis":1},{"alias":"io time","yaxis":2}],"spaceLength":10,"span":6,"stack":false,"steppedLine":false,"targets":[{"expr":"max(rate(windows_logical_disk_read_bytes_total{cluster=\"$cluster\", job=\"kubernetes-windows-exporter\", instance=\"$instance\"}[2m]))","format":"time_series","intervalFactor":2,"legendFormat":"read","refId":"A"},{"expr":"max(rate(windows_logical_disk_write_bytes_total{cluster=\"$cluster\", job=\"kubernetes-windows-exporter\", instance=\"$instance\"}[2m]))","format":"time_series","intervalFactor":2,"legendFormat":"written","refId":"B"},{"expr":"max(rate(windows_logical_disk_read_seconds_total{cluster=\"$cluster\", job=\"kubernetes-windows-exporter\", instance=\"$instance\"}[2m]) + rate(windows_logical_disk_write_seconds_total{cluster=\"$cluster\", job=\"kubernetes-windows-exporter\", instance=\"$instance\"}[2m]))","format":"time_series","intervalFactor":2,"legendFormat":"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":"bytes","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"ms","label":null,"logBase":1,"max":null,"min":null,"show":true}]}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Disk","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"id":9,"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":"node:windows_node_net_utilisation:sum_irate{cluster=\"$cluster\", instance=\"$instance\"}","format":"time_series","intervalFactor":2,"legendFormat":"Utilisation","legendLink":null}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Net Utilisation (Transmitted)","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":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}]},{"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":6,"stack":false,"steppedLine":false,"targets":[{"expr":"node:windows_node_net_saturation:sum_irate{cluster=\"$cluster\", instance=\"$instance\"}","format":"time_series","intervalFactor":2,"legendFormat":"Saturation","legendLink":null}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Net Saturation (Dropped)","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":"short","label":null,"logBase":1,"max":null,"min":null,"show":false}]}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Net","titleSize":"h6"},{"collapse":false,"height":"250px","panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"id":11,"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,"targets":[{"expr":"node:windows_node_filesystem_usage:{cluster=\"$cluster\", instance=\"$instance\"}\n","format":"time_series","intervalFactor":2,"legendFormat":"{{volume}}","legendLink":null}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Disk Utilisation","tooltip":{"shared":true,"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":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":"Disk","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"},{"allValue":null,"current":{},"datasource":"$datasource","hide":0,"includeAll":false,"label":"Instance","multi":false,"name":"instance","options":[],"query":"label_values(windows_system_system_up_time, instance)","refresh":2,"regex":"","sort":1,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"allValue":null,"current":{},"datasource":"$datasource","hide":`}}{{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}{{`,"includeAll":false,"label":"cluster","multi":false,"name":"cluster","options":[],"query":"label_values(up{job=\"kubernetes-windows-exporter\"}, cluster)","refresh":2,"regex":"","sort":1,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false}]},"time":{"from":"now-6h","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 / USE Method / Node(Windows)","uid":"96e7484b0bb53b74fbc2bcb7723cd40b","version":0}`}}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/kubelet.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/kubelet.yaml
old mode 100755
new mode 100644
index 901147b126..26b3a11d85
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/kubelet.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/kubelet.yaml
@@ -1,2495 +1,24 @@
{{- /*
-Generated from 'kubelet' from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/grafana-dashboardDefinitions.yaml
+Generated from 'kubelet' 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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.kubelet.enabled }}
+{{- 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.kubelet.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "kubelet" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "kubelet" | 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"
+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }}
{{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.labels" $ | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-grafana
+{{ include "kube-prometheus-stack.labels" $ | indent 4 }}
data:
kubelet.json: |-
- {
- "__inputs": [
-
- ],
- "__requires": [
-
- ],
- "annotations": {
- "list": [
-
- ]
- },
- "editable": false,
- "gnetId": null,
- "graphTooltip": 0,
- "hideControls": false,
- "id": null,
- "links": [
-
- ],
- "refresh": "10s",
- "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": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "rangeMaps": [
- {
- "from": "null",
- "text": "N/A",
- "to": "null"
- }
- ],
- "span": 2,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "tableColumn": "",
- "targets": [
- {
- "expr": "sum(up{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "A"
- }
- ],
- "thresholds": "",
- "title": "Up",
- "tooltip": {
- "shared": false
- },
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "op": "=",
- "text": "N/A",
- "value": "null"
- }
- ],
- "valueName": "min"
- },
- {
- "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": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "rangeMaps": [
- {
- "from": "null",
- "text": "N/A",
- "to": "null"
- }
- ],
- "span": 2,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "tableColumn": "",
- "targets": [
- {
- "expr": "sum(kubelet_running_pod_count{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": "",
- "title": "Running Pods",
- "tooltip": {
- "shared": false
- },
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "op": "=",
- "text": "N/A",
- "value": "null"
- }
- ],
- "valueName": "min"
- },
- {
- "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": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "rangeMaps": [
- {
- "from": "null",
- "text": "N/A",
- "to": "null"
- }
- ],
- "span": 2,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "tableColumn": "",
- "targets": [
- {
- "expr": "sum(kubelet_running_container_count{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": "",
- "title": "Running Container",
- "tooltip": {
- "shared": false
- },
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "op": "=",
- "text": "N/A",
- "value": "null"
- }
- ],
- "valueName": "min"
- },
- {
- "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": 2,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "tableColumn": "",
- "targets": [
- {
- "expr": "sum(volume_manager_total_volumes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\", state=\"actual_state_of_world\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": "",
- "title": "Actual Volume Count",
- "tooltip": {
- "shared": false
- },
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "op": "=",
- "text": "N/A",
- "value": "null"
- }
- ],
- "valueName": "min"
- },
- {
- "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": 2,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "tableColumn": "",
- "targets": [
- {
- "expr": "sum(volume_manager_total_volumes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\",state=\"desired_state_of_world\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": "",
- "title": "Desired Volume Count",
- "tooltip": {
- "shared": false
- },
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "op": "=",
- "text": "N/A",
- "value": "null"
- }
- ],
- "valueName": "min"
- },
- {
- "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": 2,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "tableColumn": "",
- "targets": [
- {
- "expr": "sum(rate(kubelet_node_config_error{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\"}[5m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": "",
- "title": "Config Error Count",
- "tooltip": {
- "shared": false
- },
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "op": "=",
- "text": "N/A",
- "value": "null"
- }
- ],
- "valueName": "min"
- }
- ],
- "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,
- "gridPos": {
-
- },
- "id": 8,
- "legend": {
- "alignAsTable": true,
- "avg": false,
- "current": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "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": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(rate(kubelet_runtime_operations_total{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])) by (operation_type, instance)",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} {{`{{`}}operation_type{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Operation Rate",
- "tooltip": {
- "shared": false,
- "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",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 9,
- "legend": {
- "alignAsTable": true,
- "avg": false,
- "current": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "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": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(rate(kubelet_runtime_operations_errors_total{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])) by (instance, operation_type)",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} {{`{{`}}operation_type{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Operation Error Rate",
- "tooltip": {
- "shared": false,
- "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": 0,
- "show": true
- },
- {
- "format": "ops",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ]
- }
- ],
- "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,
- "gridPos": {
-
- },
- "id": 10,
- "legend": {
- "alignAsTable": true,
- "avg": false,
- "current": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "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": 12,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "histogram_quantile(0.99, sum(rate(kubelet_runtime_operations_duration_seconds_bucket{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])) by (instance, operation_type, le))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} {{`{{`}}operation_type{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Operation duration 99th quantile",
- "tooltip": {
- "shared": false,
- "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": false,
- "title": "Dashboard Row",
- "titleSize": "h6",
- "type": "row"
- },
- {
- "collapse": false,
- "collapsed": false,
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 11,
- "legend": {
- "alignAsTable": true,
- "avg": false,
- "current": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "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": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(rate(kubelet_pod_start_duration_seconds_count{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])) by (instance)",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} pod",
- "refId": "A"
- },
- {
- "expr": "sum(rate(kubelet_pod_worker_duration_seconds_count{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])) by (instance)",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} worker",
- "refId": "B"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Pod Start Rate",
- "tooltip": {
- "shared": false,
- "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": 0,
- "show": true
- },
- {
- "format": "ops",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 12,
- "legend": {
- "alignAsTable": true,
- "avg": false,
- "current": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "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": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "histogram_quantile(0.99, sum(rate(kubelet_pod_start_duration_seconds_count{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])) 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=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])) by (instance, le))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} worker",
- "refId": "B"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Pod Start Duration",
- "tooltip": {
- "shared": false,
- "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": 0,
- "show": true
- },
- {
- "format": "s",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ]
- }
- ],
- "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,
- "gridPos": {
-
- },
- "id": 13,
- "legend": {
- "alignAsTable": true,
- "avg": false,
- "current": true,
- "hideEmpty": true,
- "hideZero": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "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": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(rate(storage_operation_duration_seconds_count{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])) by (instance, operation_name, volume_plugin)",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} {{`{{`}}operation_name{{`}}`}} {{`{{`}}volume_plugin{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Storage Operation Rate",
- "tooltip": {
- "shared": false,
- "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": 0,
- "show": true
- },
- {
- "format": "ops",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 14,
- "legend": {
- "alignAsTable": true,
- "avg": false,
- "current": true,
- "hideEmpty": true,
- "hideZero": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "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": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(rate(storage_operation_errors_total{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])) by (instance, operation_name, volume_plugin)",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} {{`{{`}}operation_name{{`}}`}} {{`{{`}}volume_plugin{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Storage Operation Error Rate",
- "tooltip": {
- "shared": false,
- "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": 0,
- "show": true
- },
- {
- "format": "ops",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ]
- }
- ],
- "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,
- "gridPos": {
-
- },
- "id": 15,
- "legend": {
- "alignAsTable": true,
- "avg": false,
- "current": true,
- "hideEmpty": true,
- "hideZero": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "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": 12,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "histogram_quantile(0.99, sum(rate(storage_operation_duration_seconds_bucket{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\"}[5m])) by (instance, operation_name, volume_plugin, le))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} {{`{{`}}operation_name{{`}}`}} {{`{{`}}volume_plugin{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Storage Operation Duration 99th quantile",
- "tooltip": {
- "shared": false,
- "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": 0,
- "show": true
- },
- {
- "format": "s",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ]
- }
- ],
- "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,
- "gridPos": {
-
- },
- "id": 16,
- "legend": {
- "alignAsTable": true,
- "avg": false,
- "current": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "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": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(rate(kubelet_cgroup_manager_duration_seconds_count{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\"}[5m])) by (instance, operation_type)",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}operation_type{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Cgroup manager operation rate",
- "tooltip": {
- "shared": false,
- "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": 0,
- "show": true
- },
- {
- "format": "ops",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 17,
- "legend": {
- "alignAsTable": true,
- "avg": false,
- "current": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "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": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "histogram_quantile(0.99, sum(rate(kubelet_cgroup_manager_duration_seconds_bucket{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\"}[5m])) by (instance, operation_type, le))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} {{`{{`}}operation_type{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Cgroup manager 99th quantile",
- "tooltip": {
- "shared": false,
- "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": 0,
- "show": true
- },
- {
- "format": "s",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ]
- }
- ],
- "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",
- "description": "Pod lifecycle event generator",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 18,
- "legend": {
- "alignAsTable": true,
- "avg": false,
- "current": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "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": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(rate(kubelet_pleg_relist_duration_seconds_count{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\"}[5m])) by (instance)",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "PLEG relist rate",
- "tooltip": {
- "shared": false,
- "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": 0,
- "show": true
- },
- {
- "format": "ops",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 19,
- "legend": {
- "alignAsTable": true,
- "avg": false,
- "current": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "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": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "histogram_quantile(0.99, sum(rate(kubelet_pleg_relist_interval_seconds_bucket{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])) by (instance, le))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "PLEG relist interval",
- "tooltip": {
- "shared": false,
- "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": 0,
- "show": true
- },
- {
- "format": "s",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ]
- }
- ],
- "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,
- "gridPos": {
-
- },
- "id": 20,
- "legend": {
- "alignAsTable": true,
- "avg": false,
- "current": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "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": 12,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "histogram_quantile(0.99, sum(rate(kubelet_pleg_relist_duration_seconds_bucket{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])) by (instance, le))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "PLEG relist duration",
- "tooltip": {
- "shared": false,
- "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": 0,
- "show": true
- },
- {
- "format": "s",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ]
- }
- ],
- "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,
- "gridPos": {
-
- },
- "id": 21,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 12,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\",code=~\"2..\"}[5m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "2xx",
- "refId": "A"
- },
- {
- "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\",code=~\"3..\"}[5m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "3xx",
- "refId": "B"
- },
- {
- "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\",code=~\"4..\"}[5m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "4xx",
- "refId": "C"
- },
- {
- "expr": "sum(rate(rest_client_requests_total{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\",code=~\"5..\"}[5m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "5xx",
- "refId": "D"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "RPC Rate",
- "tooltip": {
- "shared": false,
- "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": 0,
- "show": true
- },
- {
- "format": "ops",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ]
- }
- ],
- "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,
- "gridPos": {
-
- },
- "id": 22,
- "legend": {
- "alignAsTable": true,
- "avg": false,
- "current": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "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": 12,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_latency_seconds_bucket{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\"}[5m])) by (instance, verb, url, le))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} {{`{{`}}verb{{`}}`}} {{`{{`}}url{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Request duration 99th quantile",
- "tooltip": {
- "shared": false,
- "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": 0,
- "show": true
- },
- {
- "format": "s",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ]
- }
- ],
- "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,
- "gridPos": {
-
- },
- "id": 23,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "process_resident_memory_bytes{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory",
- "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": null,
- "show": true
- },
- {
- "format": "bytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 24,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "rate(process_cpu_seconds_total{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}[5m])",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}}",
- "refId": "A"
- }
- ],
- "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": 0,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 25,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "go_goroutines{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Goroutines",
- "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": 2,
- "includeAll": false,
- "label": "cluster",
- "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,
- "current": {
-
- },
- "datasource": "$datasource",
- "hide": 0,
- "includeAll": true,
- "label": null,
- "multi": false,
- "name": "instance",
- "options": [
-
- ],
- "query": "label_values(kubelet_runtime_operations_total{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\"}, instance)",
- "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": "",
- "title": "Kubernetes / Kubelet",
- "uid": "3138fa155d5915769fbded898ac09fd9",
- "version": 0
- }
+ {{`{"__inputs":[],"__requires":[],"annotations":{"list":[]},"editable":false,"gnetId":null,"graphTooltip":0,"hideControls":false,"id":null,"links":[],"panels":[{"datasource":"$datasource","fieldConfig":{"defaults":{"links":[],"mappings":[],"thresholds":{"mode":"absolute","steps":[]},"unit":"none"}},"gridPos":{"h":7,"w":4,"x":0,"y":0},"id":2,"links":[],"options":{"colorMode":"value","graphMode":"area","justifyMode":"auto","orientation":"auto","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"textMode":"auto"},"pluginVersion":"7","targets":[{"expr":"sum(kubelet_node_name{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\"})","format":"time_series","intervalFactor":2,"legendFormat":"","refId":"A"}],"title":"Running Kubelets","transparent":false,"type":"stat"},{"datasource":"$datasource","fieldConfig":{"defaults":{"links":[],"mappings":[],"thresholds":{"mode":"absolute","steps":[]},"unit":"none"}},"gridPos":{"h":7,"w":4,"x":4,"y":0},"id":3,"links":[],"options":{"colorMode":"value","graphMode":"area","justifyMode":"auto","orientation":"auto","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"textMode":"auto"},"pluginVersion":"7","targets":[{"expr":"sum(kubelet_running_pods{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\"}) OR sum(kubelet_running_pod_count{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\"})","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A"}],"title":"Running Pods","transparent":false,"type":"stat"},{"datasource":"$datasource","fieldConfig":{"defaults":{"links":[],"mappings":[],"thresholds":{"mode":"absolute","steps":[]},"unit":"none"}},"gridPos":{"h":7,"w":4,"x":8,"y":0},"id":4,"links":[],"options":{"colorMode":"value","graphMode":"area","justifyMode":"auto","orientation":"auto","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"textMode":"auto"},"pluginVersion":"7","targets":[{"expr":"sum(kubelet_running_containers{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\"}) OR sum(kubelet_running_container_count{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\"})","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A"}],"title":"Running Containers","transparent":false,"type":"stat"},{"datasource":"$datasource","fieldConfig":{"defaults":{"links":[],"mappings":[],"thresholds":{"mode":"absolute","steps":[]},"unit":"none"}},"gridPos":{"h":7,"w":4,"x":12,"y":0},"id":5,"links":[],"options":{"colorMode":"value","graphMode":"area","justifyMode":"auto","orientation":"auto","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"textMode":"auto"},"pluginVersion":"7","targets":[{"expr":"sum(volume_manager_total_volumes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\", state=\"actual_state_of_world\"})","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A"}],"title":"Actual Volume Count","transparent":false,"type":"stat"},{"datasource":"$datasource","fieldConfig":{"defaults":{"links":[],"mappings":[],"thresholds":{"mode":"absolute","steps":[]},"unit":"none"}},"gridPos":{"h":7,"w":4,"x":16,"y":0},"id":6,"links":[],"options":{"colorMode":"value","graphMode":"area","justifyMode":"auto","orientation":"auto","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"textMode":"auto"},"pluginVersion":"7","targets":[{"expr":"sum(volume_manager_total_volumes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\",state=\"desired_state_of_world\"})","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A"}],"title":"Desired Volume Count","transparent":false,"type":"stat"},{"datasource":"$datasource","fieldConfig":{"defaults":{"links":[],"mappings":[],"thresholds":{"mode":"absolute","steps":[]},"unit":"none"}},"gridPos":{"h":7,"w":4,"x":20,"y":0},"id":7,"links":[],"options":{"colorMode":"value","graphMode":"area","justifyMode":"auto","orientation":"auto","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"textMode":"auto"},"pluginVersion":"7","targets":[{"expr":"sum(rate(kubelet_node_config_error{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\"}[$__rate_interval]))","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A"}],"title":"Config Error Count","transparent":false,"type":"stat"},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{"h":7,"w":12,"x":0,"y":7},"id":8,"legend":{"alignAsTable":true,"avg":false,"current":true,"max":false,"min":false,"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,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(kubelet_runtime_operations_total{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}[$__rate_interval])) by (operation_type, instance)","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}} {{operation_type}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Operation 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","fill":1,"fillGradient":0,"gridPos":{"h":7,"w":12,"x":12,"y":7},"id":9,"legend":{"alignAsTable":true,"avg":false,"current":true,"max":false,"min":false,"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,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(kubelet_runtime_operations_errors_total{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}[$__rate_interval])) by (instance, operation_type)","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}} {{operation_type}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Operation Error 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","fill":1,"fillGradient":0,"gridPos":{"h":7,"w":24,"x":0,"y":14},"id":10,"legend":{"alignAsTable":true,"avg":false,"current":true,"max":false,"min":false,"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,"stack":false,"steppedLine":false,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(kubelet_runtime_operations_duration_seconds_bucket{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}[$__rate_interval])) by (instance, operation_type, le))","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}} {{operation_type}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Operation duration 99th quantile","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}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{"h":7,"w":12,"x":0,"y":21},"id":11,"legend":{"alignAsTable":true,"avg":false,"current":true,"max":false,"min":false,"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,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(kubelet_pod_start_duration_seconds_count{cluster=\"$cluster\",job=\"kubelet\", 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=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}[$__rate_interval])) by (instance)","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}} worker","refId":"B"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Pod Start 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","fill":1,"fillGradient":0,"gridPos":{"h":7,"w":12,"x":12,"y":21},"id":12,"legend":{"alignAsTable":true,"avg":false,"current":true,"max":false,"min":false,"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,"stack":false,"steppedLine":false,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(kubelet_pod_start_duration_seconds_bucket{cluster=\"$cluster\",job=\"kubelet\", 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=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}[$__rate_interval])) by (instance, le))","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}} worker","refId":"B"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Pod Start 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}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{"h":7,"w":12,"x":0,"y":28},"id":13,"legend":{"alignAsTable":true,"avg":false,"current":true,"hideEmpty":true,"hideZero":true,"max":false,"min":false,"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,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(storage_operation_duration_seconds_count{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}[$__rate_interval])) by (instance, operation_name, volume_plugin)","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}} {{operation_name}} {{volume_plugin}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Storage Operation 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","fill":1,"fillGradient":0,"gridPos":{"h":7,"w":12,"x":12,"y":28},"id":14,"legend":{"alignAsTable":true,"avg":false,"current":true,"hideEmpty":true,"hideZero":true,"max":false,"min":false,"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,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(storage_operation_errors_total{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}[$__rate_interval])) by (instance, operation_name, volume_plugin)","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}} {{operation_name}} {{volume_plugin}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Storage Operation Error 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","fill":1,"fillGradient":0,"gridPos":{"h":7,"w":24,"x":0,"y":35},"id":15,"legend":{"alignAsTable":true,"avg":false,"current":true,"hideEmpty":true,"hideZero":true,"max":false,"min":false,"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,"stack":false,"steppedLine":false,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(storage_operation_duration_seconds_bucket{cluster=\"$cluster\", job=\"kubelet\", 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}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Storage Operation Duration 99th quantile","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}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{"h":7,"w":12,"x":0,"y":42},"id":16,"legend":{"alignAsTable":true,"avg":false,"current":true,"max":false,"min":false,"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,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(kubelet_cgroup_manager_duration_seconds_count{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\"}[$__rate_interval])) by (instance, operation_type)","format":"time_series","intervalFactor":2,"legendFormat":"{{operation_type}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Cgroup manager operation 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","fill":1,"fillGradient":0,"gridPos":{"h":7,"w":12,"x":12,"y":42},"id":17,"legend":{"alignAsTable":true,"avg":false,"current":true,"max":false,"min":false,"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,"stack":false,"steppedLine":false,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(kubelet_cgroup_manager_duration_seconds_bucket{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\"}[$__rate_interval])) by (instance, operation_type, le))","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}} {{operation_type}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Cgroup manager 99th quantile","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}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","description":"Pod lifecycle event generator","fill":1,"fillGradient":0,"gridPos":{"h":7,"w":12,"x":0,"y":49},"id":18,"legend":{"alignAsTable":true,"avg":false,"current":true,"max":false,"min":false,"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,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(kubelet_pleg_relist_duration_seconds_count{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\"}[$__rate_interval])) by (instance)","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"PLEG relist 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","fill":1,"fillGradient":0,"gridPos":{"h":7,"w":12,"x":12,"y":49},"id":19,"legend":{"alignAsTable":true,"avg":false,"current":true,"max":false,"min":false,"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,"stack":false,"steppedLine":false,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(kubelet_pleg_relist_interval_seconds_bucket{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}[$__rate_interval])) by (instance, le))","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"PLEG relist interval","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}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{"h":7,"w":24,"x":0,"y":56},"id":20,"legend":{"alignAsTable":true,"avg":false,"current":true,"max":false,"min":false,"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,"stack":false,"steppedLine":false,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(kubelet_pleg_relist_duration_seconds_bucket{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}[$__rate_interval])) by (instance, le))","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"PLEG relist 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}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{"h":7,"w":24,"x":0,"y":63},"id":21,"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":"sum(rate(rest_client_requests_total{cluster=\"$cluster\",job=\"kubelet\", 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=\"kubelet\", 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=\"kubelet\", 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=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\",code=~\"5..\"}[$__rate_interval]))","format":"time_series","intervalFactor":2,"legendFormat":"5xx","refId":"D"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"RPC 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","fill":1,"fillGradient":0,"gridPos":{"h":7,"w":24,"x":0,"y":70},"id":22,"legend":{"alignAsTable":true,"avg":false,"current":true,"max":false,"min":false,"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,"stack":false,"steppedLine":false,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\", instance=~\"$instance\"}[$__rate_interval])) by (instance, verb, url, le))","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}} {{verb}} {{url}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Request duration 99th quantile","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}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{"h":7,"w":8,"x":0,"y":77},"id":23,"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":"process_resident_memory_bytes{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Memory","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":null,"show":true},{"format":"bytes","label":null,"logBase":1,"max":null,"min":null,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{"h":7,"w":8,"x":8,"y":77},"id":24,"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":"rate(process_cpu_seconds_total{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}[$__rate_interval])","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","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":"short","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{"h":7,"w":8,"x":16,"y":77},"id":25,"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":"go_goroutines{cluster=\"$cluster\",job=\"kubelet\", metrics_path=\"/metrics\",instance=~\"$instance\"}","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Goroutines","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}]}],"refresh":"10s","rows":[],"schemaVersion":14,"style":"dark","tags":["kubernetes-mixin"],"templating":{"list":[{"current":{"text":"default","value":"default"},"hide":0,"label":"Data Source","name":"datasource","options":[],"query":"prometheus","refresh":1,"regex":"","type":"datasource"},{"allValue":null,"current":{},"datasource":"$datasource","hide":`}}{{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}{{`,"includeAll":false,"label":"cluster","multi":false,"name":"cluster","options":[],"query":"label_values(up{job=\"kubelet\", metrics_path=\"/metrics\"}, cluster)","refresh":2,"regex":"","sort":1,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"allValue":null,"current":{},"datasource":"$datasource","hide":0,"includeAll":true,"label":"instance","multi":false,"name":"instance","options":[],"query":"label_values(up{job=\"kubelet\", metrics_path=\"/metrics\",cluster=\"$cluster\"}, instance)","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 / Kubelet","uid":"3138fa155d5915769fbded898ac09fd9","version":0}`}}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/namespace-by-pod.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/namespace-by-pod.yaml
old mode 100755
new mode 100644
index 219ce22a6a..dbf23dd716
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/namespace-by-pod.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/namespace-by-pod.yaml
@@ -1,1421 +1,24 @@
{{- /*
-Generated from 'namespace-by-pod' from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/grafana-dashboardDefinitions.yaml
+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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.grafana.enabled .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 }}
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "namespace-by-pod" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
+ name: {{ printf "%s-%s" (include "kube-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 }}: "1"
+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }}
{{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.labels" $ | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-grafana
+{{ include "kube-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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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": "default",
- "value": "default"
- },
- "hide": 0,
- "label": null,
- "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": 1,
- "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": "",
- "title": "Kubernetes / Networking / Namespace (Pods)",
- "uid": "8b7a8b326d7a6f1f04244066368c67af",
- "version": 0
- }
+ {{`{"__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{cluster=\"$cluster\",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{cluster=\"$cluster\",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{cluster=\"$cluster\",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{cluster=\"$cluster\",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{cluster=\"$cluster\",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{cluster=\"$cluster\",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{cluster=\"$cluster\",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{cluster=\"$cluster\",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{cluster=\"$cluster\",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{cluster=\"$cluster\",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{cluster=\"$cluster\",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{cluster=\"$cluster\",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{cluster=\"$cluster\",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{cluster=\"$cluster\",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":"default","value":"default"},"hide":0,"label":"Data Source","name":"datasource","options":[],"query":"prometheus","refresh":1,"regex":"","type":"datasource"},{"allValue":null,"current":{},"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(up{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\"}, cluster)","refresh":2,"regex":"","sort":0,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"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{cluster=\"$cluster\"}, namespace)","hide":0,"includeAll":true,"label":null,"multi":false,"name":"namespace","options":[],"query":"label_values(container_network_receive_packets_total{cluster=\"$cluster\"}, 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/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/namespace-by-workload.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/namespace-by-workload.yaml
old mode 100755
new mode 100644
index 7cea4a3417..c07229f485
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/namespace-by-workload.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/namespace-by-workload.yaml
@@ -1,1685 +1,24 @@
{{- /*
-Generated from 'namespace-by-workload' from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/grafana-dashboardDefinitions.yaml
+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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.grafana.enabled .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 }}
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "namespace-by-workload" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
+ name: {{ printf "%s-%s" (include "kube-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 }}: "1"
+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }}
{{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.labels" $ | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-grafana
+{{ include "kube-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,
- "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,
- "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) mixin_pod_workload{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,
- "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,
- "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) mixin_pod_workload{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,
- "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) mixin_pod_workload{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) mixin_pod_workload{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) mixin_pod_workload{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) mixin_pod_workload{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) mixin_pod_workload{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) mixin_pod_workload{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) mixin_pod_workload{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) mixin_pod_workload{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,
- "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,
- "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) mixin_pod_workload{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,
- "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,
- "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) mixin_pod_workload{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,
- "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,
- "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) mixin_pod_workload{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,
- "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,
- "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) mixin_pod_workload{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,
- "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,
- "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) mixin_pod_workload{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,
- "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,
- "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) mixin_pod_workload{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,
- "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,
- "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) mixin_pod_workload{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,
- "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,
- "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) mixin_pod_workload{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": "default",
- "value": "default"
- },
- "hide": 0,
- "label": null,
- "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": 1,
- "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(mixin_pod_workload{namespace=~\"$namespace\", workload=~\".+\"}, workload_type)",
- "hide": 0,
- "includeAll": false,
- "label": null,
- "multi": false,
- "name": "type",
- "options": [
-
- ],
- "query": "label_values(mixin_pod_workload{namespace=~\"$namespace\", workload=~\".+\"}, workload_type)",
- "refresh": 1,
- "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": "",
- "title": "Kubernetes / Networking / Namespace (Workload)",
- "uid": "bbb2a765a623ae38130206c7d94a160f",
- "version": 0
- }
+ {{`{"__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{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","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{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","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{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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"A","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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"B","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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"C","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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"D","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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"E","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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"F","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","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"G","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","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{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","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{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","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{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","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{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","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{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","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{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","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{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","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{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","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":"default","value":"default"},"hide":0,"label":"Data Source","name":"datasource","options":[],"query":"prometheus","refresh":1,"regex":"","type":"datasource"},{"allValue":null,"current":{},"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(up{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\"}, cluster)","refresh":2,"regex":"","sort":0,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"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{cluster=\"$cluster\"}, namespace)","hide":0,"includeAll":false,"label":null,"multi":false,"name":"namespace","options":[],"query":"label_values(container_network_receive_packets_total{cluster=\"$cluster\"}, 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{cluster=\"$cluster\",namespace=\"$namespace\", workload=~\".+\"}, workload_type)","hide":0,"includeAll":true,"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":[],"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/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/node-cluster-rsrc-use.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/node-cluster-rsrc-use.yaml
old mode 100755
new mode 100644
index 921503a558..94e3006d03
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/node-cluster-rsrc-use.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/node-cluster-rsrc-use.yaml
@@ -1,962 +1,24 @@
{{- /*
-Generated from 'node-cluster-rsrc-use' from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/grafana-dashboardDefinitions.yaml
+Generated from 'node-cluster-rsrc-use' 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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.nodeExporter.enabled }}
+{{- 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:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "node-cluster-rsrc-use" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "node-cluster-rsrc-use" | 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"
+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }}
{{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.labels" $ | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-grafana
+{{ include "kube-prometheus-stack.labels" $ | indent 4 }}
data:
node-cluster-rsrc-use.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,
- "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": "(\n instance:node_cpu_utilisation:rate1m{job=\"node-exporter\"}\n*\n instance:node_num_cpu:sum{job=\"node-exporter\"}\n)\n/ scalar(sum(instance:node_num_cpu:sum{job=\"node-exporter\"}))\n",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}}",
- "legendLink": "/dashboard/file/node-rsrc-use.json",
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "CPU Utilisation",
- "tooltip": {
- "shared": false,
- "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": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": false
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 10,
- "id": 2,
- "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": "instance:node_load1_per_cpu:ratio{job=\"node-exporter\"}\n/ scalar(count(instance:node_load1_per_cpu:ratio{job=\"node-exporter\"}))\n",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}}",
- "legendLink": "/dashboard/file/node-rsrc-use.json",
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "CPU Saturation (load1 per CPU)",
- "tooltip": {
- "shared": false,
- "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": "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": 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": "instance:node_memory_utilisation:ratio{job=\"node-exporter\"}\n/ scalar(count(instance:node_memory_utilisation:ratio{job=\"node-exporter\"}))\n",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}}",
- "legendLink": "/dashboard/file/node-rsrc-use.json",
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory Utilisation",
- "tooltip": {
- "shared": false,
- "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": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": false
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 10,
- "id": 4,
- "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": "instance:node_vmstat_pgmajfault:rate1m{job=\"node-exporter\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}}",
- "legendLink": "/dashboard/file/node-rsrc-use.json",
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory Saturation (Major Page Faults)",
- "tooltip": {
- "shared": false,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": [
-
- ]
- },
- "yaxes": [
- {
- "format": "rps",
- "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": 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": [
- {
- "alias": "/ Receive/",
- "stack": "A"
- },
- {
- "alias": "/ Transmit/",
- "stack": "B",
- "transform": "negative-Y"
- }
- ],
- "spaceLength": 10,
- "span": 6,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "instance:node_network_receive_bytes_excluding_lo:rate1m{job=\"node-exporter\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} Receive",
- "legendLink": "/dashboard/file/node-rsrc-use.json",
- "step": 10
- },
- {
- "expr": "instance:node_network_transmit_bytes_excluding_lo:rate1m{job=\"node-exporter\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} Transmit",
- "legendLink": "/dashboard/file/node-rsrc-use.json",
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Net Utilisation (Bytes Receive/Transmit)",
- "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": null,
- "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": [
- {
- "alias": "/ Receive/",
- "stack": "A"
- },
- {
- "alias": "/ Transmit/",
- "stack": "B",
- "transform": "negative-Y"
- }
- ],
- "spaceLength": 10,
- "span": 6,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "instance:node_network_receive_drop_excluding_lo:rate1m{job=\"node-exporter\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} Receive",
- "legendLink": "/dashboard/file/node-rsrc-use.json",
- "step": 10
- },
- {
- "expr": "instance:node_network_transmit_drop_excluding_lo:rate1m{job=\"node-exporter\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} Transmit",
- "legendLink": "/dashboard/file/node-rsrc-use.json",
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Net Saturation (Drops Receive/Transmit)",
- "tooltip": {
- "shared": false,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": [
-
- ]
- },
- "yaxes": [
- {
- "format": "rps",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": false
- }
- ]
- }
- ],
- "repeat": null,
- "repeatIteration": null,
- "repeatRowId": null,
- "showTitle": true,
- "title": "Network",
- "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": "instance_device:node_disk_io_time_seconds:rate1m{job=\"node-exporter\"}\n/ scalar(count(instance_device:node_disk_io_time_seconds:rate1m{job=\"node-exporter\"}))\n",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} {{`{{`}}device{{`}}`}}",
- "legendLink": "/dashboard/file/node-rsrc-use.json",
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Disk IO Utilisation",
- "tooltip": {
- "shared": false,
- "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": "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": "instance_device:node_disk_io_time_weighted_seconds:rate1m{job=\"node-exporter\"}\n/ scalar(count(instance_device:node_disk_io_time_weighted_seconds:rate1m{job=\"node-exporter\"}))\n",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} {{`{{`}}device{{`}}`}}",
- "legendLink": "/dashboard/file/node-rsrc-use.json",
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Disk IO Saturation",
- "tooltip": {
- "shared": false,
- "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": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": false
- }
- ]
- }
- ],
- "repeat": null,
- "repeatIteration": null,
- "repeatRowId": null,
- "showTitle": true,
- "title": "Disk IO",
- "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 without (device) (\n max without (fstype, mountpoint) (\n node_filesystem_size_bytes{job=\"node-exporter\", fstype!=\"\"} - node_filesystem_avail_bytes{job=\"node-exporter\", fstype!=\"\"}\n )\n) \n/ scalar(sum(max without (fstype, mountpoint) (node_filesystem_size_bytes{job=\"node-exporter\", fstype!=\"\"})))\n",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}}",
- "legendLink": "/dashboard/file/node-rsrc-use.json",
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Disk Space Utilisation",
- "tooltip": {
- "shared": false,
- "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": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": false
- }
- ]
- }
- ],
- "repeat": null,
- "repeatIteration": null,
- "repeatRowId": null,
- "showTitle": true,
- "title": "Disk Space",
- "titleSize": "h6"
- }
- ],
- "schemaVersion": 14,
- "style": "dark",
- "tags": [
-
- ],
- "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": "",
- "title": "USE Method / Cluster",
- "uid": "3e97d1d02672cdd0861f4c97c64f89b2",
- "version": 0
- }
+ {{`{"__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":10,"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":"((\n instance:node_cpu_utilisation:rate5m{job=\"node-exporter\", cluster=\"$cluster\"}\n *\n instance:node_num_cpu:sum{job=\"node-exporter\", cluster=\"$cluster\"}\n) != 0 )\n/ scalar(sum(instance:node_num_cpu:sum{job=\"node-exporter\", cluster=\"$cluster\"}))\n","format":"time_series","intervalFactor":2,"legendFormat":"{{ instance }}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"CPU Utilisation","tooltip":{"shared":true,"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":null,"min":null,"show":true},{"format":"percentunit","label":null,"logBase":1,"max":null,"min":null,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":10,"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":"(\n instance:node_load1_per_cpu:ratio{job=\"node-exporter\", cluster=\"$cluster\"}\n / scalar(count(instance:node_load1_per_cpu:ratio{job=\"node-exporter\", cluster=\"$cluster\"}))\n) != 0\n","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"CPU Saturation (Load1 per CPU)","tooltip":{"shared":true,"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":null,"min":null,"show":true},{"format":"percentunit","label":null,"logBase":1,"max":null,"min":null,"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":10,"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":null,"seriesOverrides":[],"spaceLength":10,"span":6,"stack":true,"steppedLine":false,"targets":[{"expr":"(\n instance:node_memory_utilisation:ratio{job=\"node-exporter\", cluster=\"$cluster\"}\n / scalar(count(instance:node_memory_utilisation:ratio{job=\"node-exporter\", cluster=\"$cluster\"}))\n) != 0\n","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Memory Utilisation","tooltip":{"shared":true,"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":null,"min":null,"show":true},{"format":"percentunit","label":null,"logBase":1,"max":null,"min":null,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":10,"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":null,"seriesOverrides":[],"spaceLength":10,"span":6,"stack":true,"steppedLine":false,"targets":[{"expr":"instance:node_vmstat_pgmajfault:rate5m{job=\"node-exporter\", cluster=\"$cluster\"}","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Memory Saturation (Major Page Faults)","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"rds","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"rds","label":null,"logBase":1,"max":null,"min":null,"show":true}]}],"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":10,"fillGradient":0,"gridPos":{},"id":6,"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":[{"alias":"/Receive/","stack":"A"},{"alias":"/Transmit/","stack":"B","transform":"negative-Y"}],"spaceLength":10,"span":6,"stack":true,"steppedLine":false,"targets":[{"expr":"instance:node_network_receive_bytes_excluding_lo:rate5m{job=\"node-exporter\", cluster=\"$cluster\"} != 0","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}} Receive","refId":"A"},{"expr":"instance:node_network_transmit_bytes_excluding_lo:rate5m{job=\"node-exporter\", cluster=\"$cluster\"} != 0","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}} Transmit","refId":"B"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Network Utilisation (Bytes Receive/Transmit)","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":null,"show":true},{"format":"Bps","label":null,"logBase":1,"max":null,"min":null,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":10,"fillGradient":0,"gridPos":{},"id":7,"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":[{"alias":"/ Receive/","stack":"A"},{"alias":"/ Transmit/","stack":"B","transform":"negative-Y"}],"spaceLength":10,"span":6,"stack":true,"steppedLine":false,"targets":[{"expr":"instance:node_network_receive_drop_excluding_lo:rate5m{job=\"node-exporter\", cluster=\"$cluster\"} != 0","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}} Receive","refId":"A"},{"expr":"instance:node_network_transmit_drop_excluding_lo:rate5m{job=\"node-exporter\", cluster=\"$cluster\"} != 0","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}} Transmit","refId":"B"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Network Saturation (Drops Receive/Transmit)","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":null,"show":true},{"format":"Bps","label":null,"logBase":1,"max":null,"min":null,"show":true}]}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Network","titleSize":"h6","type":"row"},{"collapse":false,"collapsed":false,"panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":10,"fillGradient":0,"gridPos":{},"id":8,"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":"(\n instance_device:node_disk_io_time_seconds:rate5m{job=\"node-exporter\", cluster=\"$cluster\"}\n / scalar(count(instance_device:node_disk_io_time_seconds:rate5m{job=\"node-exporter\", cluster=\"$cluster\"}))\n) != 0\n","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}} {{device}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Disk IO Utilisation","tooltip":{"shared":true,"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":null,"min":null,"show":true},{"format":"percentunit","label":null,"logBase":1,"max":null,"min":null,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":10,"fillGradient":0,"gridPos":{},"id":9,"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":"(\n instance_device:node_disk_io_time_weighted_seconds:rate5m{job=\"node-exporter\", cluster=\"$cluster\"}\n / scalar(count(instance_device:node_disk_io_time_weighted_seconds:rate5m{job=\"node-exporter\", cluster=\"$cluster\"}))\n) != 0\n","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}} {{device}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Disk IO Saturation","tooltip":{"shared":true,"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":null,"min":null,"show":true},{"format":"percentunit","label":null,"logBase":1,"max":null,"min":null,"show":true}]}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Disk IO","titleSize":"h6","type":"row"},{"collapse":false,"collapsed":false,"panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":10,"fillGradient":0,"gridPos":{},"id":10,"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":12,"stack":true,"steppedLine":false,"targets":[{"expr":"sum without (device) (\n max without (fstype, mountpoint) ((\n node_filesystem_size_bytes{job=\"node-exporter\", fstype!=\"\", mountpoint!=\"\", cluster=\"$cluster\"}\n -\n node_filesystem_avail_bytes{job=\"node-exporter\", fstype!=\"\", mountpoint!=\"\", cluster=\"$cluster\"}\n ) != 0)\n)\n/ scalar(sum(max without (fstype, mountpoint) (node_filesystem_size_bytes{job=\"node-exporter\", fstype!=\"\", mountpoint!=\"\", cluster=\"$cluster\"})))\n","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Disk Space Utilisation","tooltip":{"shared":true,"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":null,"min":null,"show":true},{"format":"percentunit","label":null,"logBase":1,"max":null,"min":null,"show":true}]}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Disk Space","titleSize":"h6","type":"row"}],"schemaVersion":14,"style":"dark","tags":["node-exporter-mixin"],"templating":{"list":[{"current":{"text":"default","value":"default"},"hide":0,"label":"Data Source","name":"datasource","options":[],"query":"prometheus","refresh":1,"regex":"","type":"datasource"},{"allValue":null,"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(node_time_seconds, cluster)","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":"Node Exporter / USE Method / Cluster","version":0}`}}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/node-rsrc-use.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/node-rsrc-use.yaml
old mode 100755
new mode 100644
index c1dfdf2669..332fd33802
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/node-rsrc-use.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/node-rsrc-use.yaml
@@ -1,989 +1,24 @@
{{- /*
-Generated from 'node-rsrc-use' from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/grafana-dashboardDefinitions.yaml
+Generated from 'node-rsrc-use' 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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.nodeExporter.enabled }}
+{{- 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:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "node-rsrc-use" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "node-rsrc-use" | 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"
+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }}
{{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.labels" $ | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-grafana
+{{ include "kube-prometheus-stack.labels" $ | indent 4 }}
data:
node-rsrc-use.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": 1,
- "id": 1,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": false,
- "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": "instance:node_cpu_utilisation:rate1m{job=\"node-exporter\", instance=\"$instance\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "Utilisation",
- "legendLink": null,
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "CPU Utilisation",
- "tooltip": {
- "shared": false,
- "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": 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,
- "id": 2,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": false,
- "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": "instance:node_load1_per_cpu:ratio{job=\"node-exporter\", instance=\"$instance\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "Saturation",
- "legendLink": null,
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "CPU Saturation (Load1 per CPU)",
- "tooltip": {
- "shared": false,
- "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": 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": 3,
- "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": "instance:node_memory_utilisation:ratio{job=\"node-exporter\", job=\"node-exporter\", instance=\"$instance\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "Memory",
- "legendLink": null,
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory Utilisation",
- "tooltip": {
- "shared": false,
- "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": 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,
- "id": 4,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": false,
- "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": "instance:node_vmstat_pgmajfault:rate1m{job=\"node-exporter\", instance=\"$instance\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "Major page faults",
- "legendLink": null,
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory Saturation (Major Page Faults)",
- "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": "Memory",
- "titleSize": "h6"
- },
- {
- "collapse": false,
- "height": "250px",
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "id": 5,
- "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": [
- {
- "alias": "/Receive/",
- "stack": "A"
- },
- {
- "alias": "/Transmit/",
- "stack": "B",
- "transform": "negative-Y"
- }
- ],
- "spaceLength": 10,
- "span": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "instance:node_network_receive_bytes_excluding_lo:rate1m{job=\"node-exporter\", instance=\"$instance\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "Receive",
- "legendLink": null,
- "step": 10
- },
- {
- "expr": "instance:node_network_transmit_bytes_excluding_lo:rate1m{job=\"node-exporter\", instance=\"$instance\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "Transmit",
- "legendLink": null,
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Net Utilisation (Bytes Receive/Transmit)",
- "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": null,
- "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,
- "id": 6,
- "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": [
- {
- "alias": "/Receive/",
- "stack": "A"
- },
- {
- "alias": "/Transmit/",
- "stack": "B",
- "transform": "negative-Y"
- }
- ],
- "spaceLength": 10,
- "span": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "instance:node_network_receive_drop_excluding_lo:rate1m{job=\"node-exporter\", instance=\"$instance\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "Receive drops",
- "legendLink": null,
- "step": 10
- },
- {
- "expr": "instance:node_network_transmit_drop_excluding_lo:rate1m{job=\"node-exporter\", instance=\"$instance\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "Transmit drops",
- "legendLink": null,
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Net Saturation (Drops Receive/Transmit)",
- "tooltip": {
- "shared": false,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": [
-
- ]
- },
- "yaxes": [
- {
- "format": "rps",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": false
- }
- ]
- }
- ],
- "repeat": null,
- "repeatIteration": null,
- "repeatRowId": null,
- "showTitle": true,
- "title": "Net",
- "titleSize": "h6"
- },
- {
- "collapse": false,
- "height": "250px",
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "id": 7,
- "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": "instance_device:node_disk_io_time_seconds:rate1m{job=\"node-exporter\", instance=\"$instance\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}device{{`}}`}}",
- "legendLink": null,
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Disk IO Utilisation",
- "tooltip": {
- "shared": false,
- "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": 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,
- "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": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "instance_device:node_disk_io_time_weighted_seconds:rate1m{job=\"node-exporter\", instance=\"$instance\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}device{{`}}`}}",
- "legendLink": null,
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Disk IO Saturation",
- "tooltip": {
- "shared": false,
- "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": 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": "Disk IO",
- "titleSize": "h6"
- },
- {
- "collapse": false,
- "height": "250px",
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "id": 9,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": false,
- "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,
- "targets": [
- {
- "expr": "1 -\n(\n max without (mountpoint, fstype) (node_filesystem_avail_bytes{job=\"node-exporter\", fstype!=\"\", instance=\"$instance\"})\n/\n max without (mountpoint, fstype) (node_filesystem_size_bytes{job=\"node-exporter\", fstype!=\"\", instance=\"$instance\"})\n)\n",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}device{{`}}`}}",
- "legendLink": null,
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Disk Space Utilisation",
- "tooltip": {
- "shared": false,
- "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": 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": "Disk Space",
- "titleSize": "h6"
- }
- ],
- "schemaVersion": 14,
- "style": "dark",
- "tags": [
-
- ],
- "templating": {
- "list": [
- {
- "current": {
- "text": "default",
- "value": "default"
- },
- "hide": 0,
- "label": null,
- "name": "datasource",
- "options": [
-
- ],
- "query": "prometheus",
- "refresh": 1,
- "regex": "",
- "type": "datasource"
- },
- {
- "allValue": null,
- "current": {
- "text": "prod",
- "value": "prod"
- },
- "datasource": "$datasource",
- "hide": 0,
- "includeAll": false,
- "label": "instance",
- "multi": false,
- "name": "instance",
- "options": [
-
- ],
- "query": "label_values(up{job=\"node-exporter\"}, 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": "",
- "title": "USE Method / Node",
- "uid": "fac67cfbe174d3ef53eb473d73d9212f",
- "version": 0
- }
+ {{`{"__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":10,"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":"instance:node_cpu_utilisation:rate5m{job=\"node-exporter\", instance=\"$instance\", cluster=\"$cluster\"} != 0","format":"time_series","intervalFactor":2,"legendFormat":"Utilisation","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"CPU Utilisation","tooltip":{"shared":true,"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":null,"min":null,"show":true},{"format":"percentunit","label":null,"logBase":1,"max":null,"min":null,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":10,"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":"instance:node_load1_per_cpu:ratio{job=\"node-exporter\", instance=\"$instance\", cluster=\"$cluster\"} != 0","format":"time_series","intervalFactor":2,"legendFormat":"Saturation","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"CPU Saturation (Load1 per CPU)","tooltip":{"shared":true,"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":null,"min":null,"show":true},{"format":"percentunit","label":null,"logBase":1,"max":null,"min":null,"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":10,"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":null,"seriesOverrides":[],"spaceLength":10,"span":6,"stack":true,"steppedLine":false,"targets":[{"expr":"instance:node_memory_utilisation:ratio{job=\"node-exporter\", instance=\"$instance\", cluster=\"$cluster\"} != 0","format":"time_series","intervalFactor":2,"legendFormat":"Utilisation","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Memory Utilisation","tooltip":{"shared":true,"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":null,"min":null,"show":true},{"format":"percentunit","label":null,"logBase":1,"max":null,"min":null,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":10,"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":null,"seriesOverrides":[],"spaceLength":10,"span":6,"stack":true,"steppedLine":false,"targets":[{"expr":"instance:node_vmstat_pgmajfault:rate5m{job=\"node-exporter\", instance=\"$instance\", cluster=\"$cluster\"} != 0","format":"time_series","intervalFactor":2,"legendFormat":"Major page Faults","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Memory Saturation (Major Page Faults)","tooltip":{"shared":true,"sort":2,"value_type":"individual"},"type":"graph","xaxis":{"buckets":null,"mode":"time","name":null,"show":true,"values":[]},"yaxes":[{"format":"rds","label":null,"logBase":1,"max":null,"min":null,"show":true},{"format":"rds","label":null,"logBase":1,"max":null,"min":null,"show":true}]}],"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":10,"fillGradient":0,"gridPos":{},"id":6,"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":[{"alias":"/Receive/","stack":"A"},{"alias":"/Transmit/","stack":"B","transform":"negative-Y"}],"spaceLength":10,"span":6,"stack":true,"steppedLine":false,"targets":[{"expr":"instance:node_network_receive_bytes_excluding_lo:rate5m{job=\"node-exporter\", instance=\"$instance\", cluster=\"$cluster\"} != 0","format":"time_series","intervalFactor":2,"legendFormat":"Receive","refId":"A"},{"expr":"instance:node_network_transmit_bytes_excluding_lo:rate5m{job=\"node-exporter\", instance=\"$instance\", cluster=\"$cluster\"} != 0","format":"time_series","intervalFactor":2,"legendFormat":"Transmit","refId":"B"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Network Utilisation (Bytes Receive/Transmit)","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":null,"show":true},{"format":"Bps","label":null,"logBase":1,"max":null,"min":null,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":10,"fillGradient":0,"gridPos":{},"id":7,"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":[{"alias":"/ Receive/","stack":"A"},{"alias":"/ Transmit/","stack":"B","transform":"negative-Y"}],"spaceLength":10,"span":6,"stack":true,"steppedLine":false,"targets":[{"expr":"instance:node_network_receive_drop_excluding_lo:rate5m{job=\"node-exporter\", instance=\"$instance\", cluster=\"$cluster\"} != 0","format":"time_series","intervalFactor":2,"legendFormat":"Receive","refId":"A"},{"expr":"instance:node_network_transmit_drop_excluding_lo:rate5m{job=\"node-exporter\", instance=\"$instance\", cluster=\"$cluster\"} != 0","format":"time_series","intervalFactor":2,"legendFormat":"Transmit","refId":"B"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Network Saturation (Drops Receive/Transmit)","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":null,"show":true},{"format":"Bps","label":null,"logBase":1,"max":null,"min":null,"show":true}]}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Network","titleSize":"h6","type":"row"},{"collapse":false,"collapsed":false,"panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":10,"fillGradient":0,"gridPos":{},"id":8,"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":"instance_device:node_disk_io_time_seconds:rate5m{job=\"node-exporter\", instance=\"$instance\", cluster=\"$cluster\"} != 0","format":"time_series","intervalFactor":2,"legendFormat":"{{device}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Disk IO Utilisation","tooltip":{"shared":true,"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":null,"min":null,"show":true},{"format":"percentunit","label":null,"logBase":1,"max":null,"min":null,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":10,"fillGradient":0,"gridPos":{},"id":9,"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":"instance_device:node_disk_io_time_weighted_seconds:rate5m{job=\"node-exporter\", instance=\"$instance\", cluster=\"$cluster\"} != 0","format":"time_series","intervalFactor":2,"legendFormat":"{{device}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Disk IO Saturation","tooltip":{"shared":true,"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":null,"min":null,"show":true},{"format":"percentunit","label":null,"logBase":1,"max":null,"min":null,"show":true}]}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Disk IO","titleSize":"h6","type":"row"},{"collapse":false,"collapsed":false,"panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":10,"fillGradient":0,"gridPos":{},"id":10,"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":12,"stack":true,"steppedLine":false,"targets":[{"expr":"sort_desc(1 -\n (\n max without (mountpoint, fstype) (node_filesystem_avail_bytes{job=\"node-exporter\", fstype!=\"\", instance=\"$instance\", cluster=\"$cluster\"})\n /\n max without (mountpoint, fstype) (node_filesystem_size_bytes{job=\"node-exporter\", fstype!=\"\", instance=\"$instance\", cluster=\"$cluster\"})\n ) != 0\n)\n","format":"time_series","intervalFactor":2,"legendFormat":"{{device}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Disk Space Utilisation","tooltip":{"shared":true,"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":null,"min":null,"show":true},{"format":"percentunit","label":null,"logBase":1,"max":null,"min":null,"show":true}]}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Disk Space","titleSize":"h6","type":"row"}],"schemaVersion":14,"style":"dark","tags":["node-exporter-mixin"],"templating":{"list":[{"current":{"text":"default","value":"default"},"hide":0,"label":"Data Source","name":"datasource","options":[],"query":"prometheus","refresh":1,"regex":"","type":"datasource"},{"allValue":null,"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(node_time_seconds, cluster)","refresh":2,"regex":"","sort":1,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"allValue":null,"current":{},"datasource":"$datasource","hide":0,"includeAll":false,"label":null,"multi":false,"name":"instance","options":[],"query":"label_values(node_exporter_build_info{job=\"node-exporter\", cluster=\"$cluster\"}, instance)","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":"Node Exporter / USE Method / Node","version":0}`}}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/nodes-darwin.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/nodes-darwin.yaml
new file mode 100644
index 0000000000..c158323706
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/nodes-darwin.yaml
@@ -0,0 +1,24 @@
+{{- /*
+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 .Values.nodeExporter.operatingSystems.darwin.enabled }}
+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-.+|md.+|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-.+|md.+|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-.+|md.+|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!=\"\", mountpoint!=\"\"})\n","format":"table","instant":true,"intervalFactor":2,"legendFormat":""},{"expr":"max by (mountpoint) (node_filesystem_avail_bytes{job=\"node-exporter\", instance=\"$instance\", fstype!=\"\", mountpoint!=\"\"})\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":"default","value":"default"},"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/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/nodes.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/nodes.yaml
old mode 100755
new mode 100644
index c208025f59..1de8f601d3
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/nodes.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/nodes.yaml
@@ -1,985 +1,24 @@
{{- /*
-Generated from 'nodes' from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/grafana-dashboardDefinitions.yaml
+Generated from 'nodes' 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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.grafana.enabled .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.operatingSystems.linux.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "nodes" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "nodes" | 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"
+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }}
{{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.labels" $ | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-grafana
+{{ include "kube-prometheus-stack.labels" $ | indent 4 }}
data:
nodes.json: |-
- {
- "__inputs": [
-
- ],
- "__requires": [
-
- ],
- "annotations": {
- "list": [
-
- ]
- },
- "editable": false,
- "gnetId": null,
- "graphTooltip": 0,
- "hideControls": false,
- "id": null,
- "links": [
-
- ],
- "refresh": "",
- "rows": [
- {
- "collapse": false,
- "collapsed": false,
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 2,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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 - rate(node_cpu_seconds_total{job=\"node-exporter\", mode=\"idle\", instance=\"$instance\"}[$__interval]))\n/ ignoring(cpu) group_left\n count without (cpu)( node_cpu_seconds_total{job=\"node-exporter\", mode=\"idle\", instance=\"$instance\"})\n)\n",
- "format": "time_series",
- "interval": "1m",
- "intervalFactor": 5,
- "legendFormat": "{{`{{`}}cpu{{`}}`}}",
- "refId": "A"
- }
- ],
- "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": "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,
- "gridPos": {
-
- },
- "id": 3,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 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": 0,
- "show": true
- }
- ]
- }
- ],
- "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,
- "gridPos": {
-
- },
- "id": 4,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "(\n node_memory_MemTotal_bytes{job=\"node-exporter\", instance=\"$instance\"}\n-\n node_memory_MemFree_bytes{job=\"node-exporter\", instance=\"$instance\"}\n-\n node_memory_Buffers_bytes{job=\"node-exporter\", instance=\"$instance\"}\n-\n node_memory_Cached_bytes{job=\"node-exporter\", instance=\"$instance\"}\n)\n",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "memory used",
- "refId": "A"
- },
- {
- "expr": "node_memory_Buffers_bytes{job=\"node-exporter\", instance=\"$instance\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "memory buffers",
- "refId": "B"
- },
- {
- "expr": "node_memory_Cached_bytes{job=\"node-exporter\", instance=\"$instance\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "memory cached",
- "refId": "C"
- },
- {
- "expr": "node_memory_MemFree_bytes{job=\"node-exporter\", instance=\"$instance\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "memory free",
- "refId": "D"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory 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": 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 node_memory_MemAvailable_bytes{job=\"node-exporter\", instance=\"$instance\"}\n/\n node_memory_MemTotal_bytes{job=\"node-exporter\", instance=\"$instance\"}\n* 100\n)\n",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "A"
- }
- ],
- "thresholds": "80, 90",
- "title": "Memory 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": 0,
- "gridPos": {
-
- },
- "id": 6,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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=~\"nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\"}[$__interval])",
- "format": "time_series",
- "interval": "1m",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}device{{`}}`}} read",
- "refId": "A"
- },
- {
- "expr": "rate(node_disk_written_bytes_total{job=\"node-exporter\", instance=\"$instance\", device=~\"nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\"}[$__interval])",
- "format": "time_series",
- "interval": "1m",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}device{{`}}`}} written",
- "refId": "B"
- },
- {
- "expr": "rate(node_disk_io_time_seconds_total{job=\"node-exporter\", instance=\"$instance\", device=~\"nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+\"}[$__interval])",
- "format": "time_series",
- "interval": "1m",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}device{{`}}`}} io time",
- "refId": "C"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Disk I/O",
- "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": null,
- "show": true
- },
- {
- "format": "s",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 7,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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",
- "intervalFactor": 2,
- "legendFormat": "used",
- "refId": "A"
- },
- {
- "expr": "sum(\n max by (device) (\n node_filesystem_avail_bytes{job=\"node-exporter\", instance=\"$instance\", fstype!=\"\"}\n )\n)\n",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "available",
- "refId": "B"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Disk 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
- }
- ]
- }
- ],
- "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": 0,
- "gridPos": {
-
- },
- "id": 8,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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\"}[$__interval])",
- "format": "time_series",
- "interval": "1m",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}device{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Network Received",
- "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
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 0,
- "gridPos": {
-
- },
- "id": 9,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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\"}[$__interval])",
- "format": "time_series",
- "interval": "1m",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}device{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Network Transmitted",
- "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
- }
- ]
- }
- ],
- "repeat": null,
- "repeatIteration": null,
- "repeatRowId": null,
- "showTitle": false,
- "title": "Dashboard Row",
- "titleSize": "h6",
- "type": "row"
- }
- ],
- "schemaVersion": 14,
- "style": "dark",
- "tags": [
-
- ],
- "templating": {
- "list": [
- {
- "current": {
- "text": "Prometheus",
- "value": "Prometheus"
- },
- "hide": 0,
- "label": null,
- "name": "datasource",
- "options": [
-
- ],
- "query": "prometheus",
- "refresh": 1,
- "regex": "",
- "type": "datasource"
- },
- {
- "allValue": null,
- "current": {
-
- },
- "datasource": "$datasource",
- "hide": 0,
- "includeAll": false,
- "label": null,
- "multi": false,
- "name": "instance",
- "options": [
-
- ],
- "query": "label_values(node_exporter_build_info{job=\"node-exporter\"}, 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": "",
- "title": "Nodes",
- "uid": "fa49a4706d07a042595b664c87fb33ea",
- "version": 0
- }
+ {{`{"__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":true,"steppedLine":false,"targets":[{"expr":"(\n node_memory_MemTotal_bytes{job=\"node-exporter\", instance=\"$instance\"}\n-\n node_memory_MemFree_bytes{job=\"node-exporter\", instance=\"$instance\"}\n-\n node_memory_Buffers_bytes{job=\"node-exporter\", instance=\"$instance\"}\n-\n node_memory_Cached_bytes{job=\"node-exporter\", instance=\"$instance\"}\n)\n","format":"time_series","intervalFactor":2,"legendFormat":"memory used","refId":"A"},{"expr":"node_memory_Buffers_bytes{job=\"node-exporter\", instance=\"$instance\"}","format":"time_series","intervalFactor":2,"legendFormat":"memory buffers","refId":"B"},{"expr":"node_memory_Cached_bytes{job=\"node-exporter\", instance=\"$instance\"}","format":"time_series","intervalFactor":2,"legendFormat":"memory cached","refId":"C"},{"expr":"node_memory_MemFree_bytes{job=\"node-exporter\", instance=\"$instance\"}","format":"time_series","intervalFactor":2,"legendFormat":"memory free","refId":"D"}],"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":"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":""}],"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-.+|md.+|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-.+|md.+|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-.+|md.+|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!=\"\", mountpoint!=\"\"})\n","format":"table","instant":true,"intervalFactor":2,"legendFormat":""},{"expr":"max by (mountpoint) (node_filesystem_avail_bytes{job=\"node-exporter\", instance=\"$instance\", fstype!=\"\", mountpoint!=\"\"})\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":"default","value":"default"},"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 / Nodes","version":0}`}}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml
old mode 100755
new mode 100644
index e74ee3141c..a168202d96
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml
@@ -1,571 +1,24 @@
{{- /*
-Generated from 'persistentvolumesusage' from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/grafana-dashboardDefinitions.yaml
+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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.grafana.enabled .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 }}
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "persistentvolumesusage" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
+ name: {{ printf "%s-%s" (include "kube-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 }}: "1"
+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }}
{{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.labels" $ | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-grafana
+{{ include "kube-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,
- "gridPos": {
-
- },
- "id": 2,
- "legend": {
- "alignAsTable": true,
- "avg": true,
- "current": true,
- "max": true,
- "min": true,
- "rightSide": false,
- "show": true,
- "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) (kubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n -\n sum without(instance, node) (kubelet_volume_stats_available_bytes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n)\n",
- "format": "time_series",
- "intervalFactor": 1,
- "legendFormat": "Used Space",
- "refId": "A"
- },
- {
- "expr": "sum without(instance, node) (kubelet_volume_stats_available_bytes{cluster=\"$cluster\", job=\"kubelet\", 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": 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": "(\n kubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"}\n -\n kubelet_volume_stats_available_bytes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"}\n)\n/\nkubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"kubelet\", 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,
- "gridPos": {
-
- },
- "id": 4,
- "legend": {
- "alignAsTable": true,
- "avg": true,
- "current": true,
- "max": true,
- "min": true,
- "rightSide": false,
- "show": true,
- "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) (kubelet_volume_stats_inodes_used{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n",
- "format": "time_series",
- "intervalFactor": 1,
- "legendFormat": "Used inodes",
- "refId": "A"
- },
- {
- "expr": "(\n sum without(instance, node) (kubelet_volume_stats_inodes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n -\n sum without(instance, node) (kubelet_volume_stats_inodes_used{cluster=\"$cluster\", job=\"kubelet\", 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": 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": "kubelet_volume_stats_inodes_used{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"}\n/\nkubelet_volume_stats_inodes{cluster=\"$cluster\", job=\"kubelet\", 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": "default",
- "value": "default"
- },
- "hide": 0,
- "label": null,
- "name": "datasource",
- "options": [
-
- ],
- "query": "prometheus",
- "refresh": 1,
- "regex": "",
- "type": "datasource"
- },
- {
- "allValue": null,
- "current": {
-
- },
- "datasource": "$datasource",
- "hide": 2,
- "includeAll": false,
- "label": "cluster",
- "multi": false,
- "name": "cluster",
- "options": [
-
- ],
- "query": "label_values(kubelet_volume_stats_capacity_bytes, 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(kubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"kubelet\", 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{cluster=\"$cluster\", job=\"kubelet\", 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": "",
- "title": "Kubernetes / Persistent Volumes",
- "uid": "919b92a8e8041bd567af9edab12c840c",
- "version": 0
- }
+ {{`{"__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{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})))\n -\n sum without(instance, node) (topk(1, (kubelet_volume_stats_available_bytes{cluster=\"$cluster\", job=\"kubelet\", 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{cluster=\"$cluster\", job=\"kubelet\", 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{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n -\n topk(1, kubelet_volume_stats_available_bytes{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n)\n/\ntopk(1, kubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"kubelet\", 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{cluster=\"$cluster\", job=\"kubelet\", 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{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})))\n -\n sum without(instance, node) (topk(1, (kubelet_volume_stats_inodes_used{cluster=\"$cluster\", job=\"kubelet\", 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{cluster=\"$cluster\", job=\"kubelet\", metrics_path=\"/metrics\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n/\ntopk(1, kubelet_volume_stats_inodes{cluster=\"$cluster\", job=\"kubelet\", 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":"default","value":"default"},"hide":0,"label":"Data Source","name":"datasource","options":[],"query":"prometheus","refresh":1,"regex":"","type":"datasource"},{"allValue":null,"current":{},"datasource":"$datasource","hide":`}}{{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}{{`,"includeAll":false,"label":"cluster","multi":false,"name":"cluster","options":[],"query":"label_values(kubelet_volume_stats_capacity_bytes{job=\"kubelet\", metrics_path=\"/metrics\"}, 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(kubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"kubelet\", 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{cluster=\"$cluster\", job=\"kubelet\", 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/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/pod-total.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/pod-total.yaml
old mode 100755
new mode 100644
index 697e859383..3be21af690
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/pod-total.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/pod-total.yaml
@@ -1,1188 +1,24 @@
{{- /*
-Generated from 'pod-total' from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/grafana-dashboardDefinitions.yaml
+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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.grafana.enabled .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 }}
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "pod-total" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
+ name: {{ printf "%s-%s" (include "kube-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 }}: "1"
+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }}
{{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.labels" $ | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-grafana
+{{ include "kube-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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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": "default",
- "value": "default"
- },
- "hide": 0,
- "label": null,
- "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": 1,
- "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": 1,
- "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": "",
- "title": "Kubernetes / Networking / Pod",
- "uid": "7a18067ce943a40ae25454675c19ff5c",
- "version": 0
- }
+ {{`{"__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{cluster=\"$cluster\",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{cluster=\"$cluster\",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{cluster=\"$cluster\",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{cluster=\"$cluster\",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{cluster=\"$cluster\",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{cluster=\"$cluster\",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{cluster=\"$cluster\",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{cluster=\"$cluster\",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":"default","value":"default"},"hide":0,"label":"Data Source","name":"datasource","options":[],"query":"prometheus","refresh":1,"regex":"","type":"datasource"},{"allValue":null,"current":{},"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(up{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\"}, cluster)","refresh":2,"regex":"","sort":0,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"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{cluster=\"$cluster\"}, namespace)","hide":0,"includeAll":true,"label":null,"multi":false,"name":"namespace","options":[],"query":"label_values(container_network_receive_packets_total{cluster=\"$cluster\"}, 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{cluster=\"$cluster\",namespace=~\"$namespace\"}, pod)","hide":0,"includeAll":false,"label":null,"multi":false,"name":"pod","options":[],"query":"label_values(container_network_receive_packets_total{cluster=\"$cluster\",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/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/pods.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/pods.yaml
deleted file mode 100755
index d0feddd4a3..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/pods.yaml
+++ /dev/null
@@ -1,675 +0,0 @@
-# Generated from 'pods' from https://raw.githubusercontent.com/coreos/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/helm/charts/tree/master/stable/prometheus-operator/hack
-{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }}
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "pods" | trunc 63 | trimSuffix "-" }}
- labels:
- {{- if $.Values.grafana.sidecar.dashboards.label }}
- {{ $.Values.grafana.sidecar.dashboards.label }}: "1"
- {{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.labels" $ | indent 4 }}
-data:
- pods.json: |-
- {
- "__inputs": [
-
- ],
- "__requires": [
-
- ],
- "annotations": {
- "list": [
- {
- "builtIn": 1,
- "datasource": "$datasource",
- "enable": true,
- "expr": "time() == BOOL timestamp(rate(kube_pod_container_status_restarts_total{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[2m]) > 0)",
- "hide": false,
- "iconColor": "rgba(215, 44, 44, 1)",
- "name": "Restarts",
- "showIn": 0,
- "tags": [
- "restart"
- ],
- "type": "rows"
- }
- ]
- },
- "editable": false,
- "gnetId": null,
- "graphTooltip": 0,
- "hideControls": false,
- "id": null,
- "links": [
-
- ],
- "refresh": "",
- "rows": [
- {
- "collapse": false,
- "collapsed": false,
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 2,
- "legend": {
- "alignAsTable": true,
- "avg": true,
- "current": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "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": 12,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum by(container) (container_memory_usage_bytes{job=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container=~\"$container\", container!=\"POD\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "Current: {{`{{ container }}`}}",
- "refId": "A"
- },
- {
- "expr": "sum by(container) (kube_pod_container_resource_requests{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\", pod=\"$pod\", container=~\"$container\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "Requested: {{`{{ container }}`}}",
- "refId": "B"
- },
- {
- "expr": "sum by(container) (kube_pod_container_resource_limits{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\", pod=\"$pod\", container=~\"$container\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "Limit: {{`{{ container }}`}}",
- "refId": "C"
- },
- {
- "expr": "sum by(container) (container_memory_cache{job=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$pod\", container=~\"$container\", container!=\"POD\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "Cache: {{`{{ container }}`}}",
- "refId": "D"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory 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
- }
- ]
- }
- ],
- "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,
- "gridPos": {
-
- },
- "id": 3,
- "legend": {
- "alignAsTable": true,
- "avg": true,
- "current": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "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": 12,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum by (container) (irate(container_cpu_usage_seconds_total{job=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\", image!=\"\", pod=\"$pod\", container=~\"$container\", container!=\"POD\"}[4m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "Current: {{`{{ container }}`}}",
- "refId": "A"
- },
- {
- "expr": "sum by(container) (kube_pod_container_resource_requests{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\", pod=\"$pod\", container=~\"$container\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "Requested: {{`{{ container }}`}}",
- "refId": "B"
- },
- {
- "expr": "sum by(container) (kube_pod_container_resource_limits{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\", pod=\"$pod\", container=~\"$container\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "Limit: {{`{{ container }}`}}",
- "refId": "C"
- }
- ],
- "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": 0,
- "show": true
- }
- ]
- }
- ],
- "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,
- "gridPos": {
-
- },
- "id": 4,
- "legend": {
- "alignAsTable": true,
- "avg": true,
- "current": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "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": 12,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sort_desc(sum by (pod) (irate(container_network_receive_bytes_total{job=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[4m])))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "RX: {{`{{ pod }}`}}",
- "refId": "A"
- },
- {
- "expr": "sort_desc(sum by (pod) (irate(container_network_transmit_bytes_total{job=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[4m])))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "TX: {{`{{ pod }}`}}",
- "refId": "B"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Network I/O",
- "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
- }
- ]
- }
- ],
- "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,
- "gridPos": {
-
- },
- "id": 5,
- "legend": {
- "alignAsTable": true,
- "avg": true,
- "current": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "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": 12,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "max by (container) (kube_pod_container_status_restarts_total{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container=~\"$container\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "Restarts: {{`{{ container }}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Total Restarts Per Container",
- "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": 0,
- "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": "Prometheus",
- "value": "Prometheus"
- },
- "hide": 0,
- "label": null,
- "name": "datasource",
- "options": [
-
- ],
- "query": "prometheus",
- "refresh": 1,
- "regex": "",
- "type": "datasource"
- },
- {
- "allValue": null,
- "current": {
-
- },
- "datasource": "$datasource",
- "hide": 2,
- "includeAll": false,
- "label": "cluster",
- "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,
- "current": {
-
- },
- "datasource": "$datasource",
- "hide": 0,
- "includeAll": false,
- "label": "Namespace",
- "multi": false,
- "name": "namespace",
- "options": [
-
- ],
- "query": "label_values(kube_pod_info{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": "Pod",
- "multi": false,
- "name": "pod",
- "options": [
-
- ],
- "query": "label_values(kube_pod_info{cluster=\"$cluster\", namespace=~\"$namespace\"}, pod)",
- "refresh": 2,
- "regex": "",
- "sort": 1,
- "tagValuesQuery": "",
- "tags": [
-
- ],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- },
- {
- "allValue": null,
- "current": {
-
- },
- "datasource": "$datasource",
- "hide": 0,
- "includeAll": true,
- "label": "Container",
- "multi": false,
- "name": "container",
- "options": [
-
- ],
- "query": "label_values(kube_pod_container_info{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}, container)",
- "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": "",
- "title": "Kubernetes / Pods",
- "uid": "ab4f13a9892a76a4d21ce8c2445bf4ea",
- "version": 0
- }
-{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/prometheus-remote-write.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/prometheus-remote-write.yaml
old mode 100755
new mode 100644
index ca0d3f0019..56abbefbf6
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/prometheus-remote-write.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/prometheus-remote-write.yaml
@@ -1,1638 +1,24 @@
{{- /*
-Generated from 'prometheus-remote-write' from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/grafana-dashboardDefinitions.yaml
+Generated from 'prometheus-remote-write' 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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.prometheus.prometheusSpec.remoteWriteDashboards }}
+{{- 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.prometheus.prometheusSpec.remoteWriteDashboards }}
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "prometheus-remote-write" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "prometheus-remote-write" | 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"
+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }}
{{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.labels" $ | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-grafana
+{{ include "kube-prometheus-stack.labels" $ | indent 4 }}
data:
prometheus-remote-write.json: |-
- {
- "__inputs": [
-
- ],
- "__requires": [
-
- ],
- "annotations": {
- "list": [
-
- ]
- },
- "editable": true,
- "gnetId": null,
- "graphTooltip": 0,
- "hideControls": false,
- "id": null,
- "links": [
-
- ],
- "refresh": "",
- "rows": [
- {
- "collapse": false,
- "collapsed": false,
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 2,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": "(\n prometheus_remote_storage_highest_timestamp_in_seconds{cluster=~\"$cluster\", instance=~\"$instance\"} \n- \n ignoring(remote_name, url) group_right(instance) prometheus_remote_storage_queue_highest_sent_timestamp_seconds{cluster=~\"$cluster\", instance=~\"$instance\"}\n)\n",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}cluster{{`}}`}}:{{`{{`}}instance{{`}}`}} {{`{{`}}remote_name{{`}}`}}:{{`{{`}}url{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Highest Timestamp In vs. Highest Timestamp Sent",
- "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
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 3,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": "(\n rate(prometheus_remote_storage_highest_timestamp_in_seconds{cluster=~\"$cluster\", instance=~\"$instance\"}[5m]) \n- \n ignoring (remote_name, url) group_right(instance) rate(prometheus_remote_storage_queue_highest_sent_timestamp_seconds{cluster=~\"$cluster\", instance=~\"$instance\"}[5m])\n)\n",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}cluster{{`}}`}}:{{`{{`}}instance{{`}}`}} {{`{{`}}remote_name{{`}}`}}:{{`{{`}}url{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Rate[5m]",
- "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
- }
- ]
- }
- ],
- "repeat": null,
- "repeatIteration": null,
- "repeatRowId": null,
- "showTitle": true,
- "title": "Timestamps",
- "titleSize": "h6",
- "type": "row"
- },
- {
- "collapse": false,
- "collapsed": false,
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 4,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 12,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "rate(\n prometheus_remote_storage_samples_in_total{cluster=~\"$cluster\", instance=~\"$instance\"}[5m])\n- \n ignoring(remote_name, url) group_right(instance) rate(prometheus_remote_storage_succeeded_samples_total{cluster=~\"$cluster\", instance=~\"$instance\"}[5m])\n- \n rate(prometheus_remote_storage_dropped_samples_total{cluster=~\"$cluster\", instance=~\"$instance\"}[5m])\n",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}cluster{{`}}`}}:{{`{{`}}instance{{`}}`}} {{`{{`}}remote_name{{`}}`}}:{{`{{`}}url{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Rate, in vs. succeeded or dropped [5m]",
- "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
- }
- ]
- }
- ],
- "repeat": null,
- "repeatIteration": null,
- "repeatRowId": null,
- "showTitle": true,
- "title": "Samples",
- "titleSize": "h6",
- "type": "row"
- },
- {
- "collapse": false,
- "collapsed": false,
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 5,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [
-
- ],
- "minSpan": 6,
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "repeat": null,
- "seriesOverrides": [
-
- ],
- "spaceLength": 10,
- "span": 12,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "prometheus_remote_storage_shards{cluster=~\"$cluster\", instance=~\"$instance\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}cluster{{`}}`}}:{{`{{`}}instance{{`}}`}} {{`{{`}}remote_name{{`}}`}}:{{`{{`}}url{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Current Shards",
- "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
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 6,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "prometheus_remote_storage_shards_max{cluster=~\"$cluster\", instance=~\"$instance\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}cluster{{`}}`}}:{{`{{`}}instance{{`}}`}} {{`{{`}}remote_name{{`}}`}}:{{`{{`}}url{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Max Shards",
- "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
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 7,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "prometheus_remote_storage_shards_min{cluster=~\"$cluster\", instance=~\"$instance\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}cluster{{`}}`}}:{{`{{`}}instance{{`}}`}} {{`{{`}}remote_name{{`}}`}}:{{`{{`}}url{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Min Shards",
- "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
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 8,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "prometheus_remote_storage_shards_desired{cluster=~\"$cluster\", instance=~\"$instance\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}cluster{{`}}`}}:{{`{{`}}instance{{`}}`}} {{`{{`}}remote_name{{`}}`}}:{{`{{`}}url{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Desired Shards",
- "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
- }
- ]
- }
- ],
- "repeat": null,
- "repeatIteration": null,
- "repeatRowId": null,
- "showTitle": true,
- "title": "Shards",
- "titleSize": "h6",
- "type": "row"
- },
- {
- "collapse": false,
- "collapsed": false,
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 9,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": "prometheus_remote_storage_shard_capacity{cluster=~\"$cluster\", instance=~\"$instance\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}cluster{{`}}`}}:{{`{{`}}instance{{`}}`}} {{`{{`}}remote_name{{`}}`}}:{{`{{`}}url{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Shard Capacity",
- "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
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 10,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": "prometheus_remote_storage_pending_samples{cluster=~\"$cluster\", instance=~\"$instance\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}cluster{{`}}`}}:{{`{{`}}instance{{`}}`}} {{`{{`}}remote_name{{`}}`}}:{{`{{`}}url{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Pending Samples",
- "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
- }
- ]
- }
- ],
- "repeat": null,
- "repeatIteration": null,
- "repeatRowId": null,
- "showTitle": true,
- "title": "Shard Details",
- "titleSize": "h6",
- "type": "row"
- },
- {
- "collapse": false,
- "collapsed": false,
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 11,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": "prometheus_tsdb_wal_segment_current{cluster=~\"$cluster\", instance=~\"$instance\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}cluster{{`}}`}}:{{`{{`}}instance{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "TSDB Current Segment",
- "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": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 12,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": "prometheus_wal_watcher_current_segment{cluster=~\"$cluster\", instance=~\"$instance\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}cluster{{`}}`}}:{{`{{`}}instance{{`}}`}} {{`{{`}}consumer{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Remote Write Current Segment",
- "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": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "repeat": null,
- "repeatIteration": null,
- "repeatRowId": null,
- "showTitle": true,
- "title": "Segments",
- "titleSize": "h6",
- "type": "row"
- },
- {
- "collapse": false,
- "collapsed": false,
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 13,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 3,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "rate(prometheus_remote_storage_dropped_samples_total{cluster=~\"$cluster\", instance=~\"$instance\"}[5m])",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}cluster{{`}}`}}:{{`{{`}}instance{{`}}`}} {{`{{`}}remote_name{{`}}`}}:{{`{{`}}url{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Dropped Samples",
- "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
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 14,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 3,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "rate(prometheus_remote_storage_failed_samples_total{cluster=~\"$cluster\", instance=~\"$instance\"}[5m])",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}cluster{{`}}`}}:{{`{{`}}instance{{`}}`}} {{`{{`}}remote_name{{`}}`}}:{{`{{`}}url{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Failed Samples",
- "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
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 15,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 3,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "rate(prometheus_remote_storage_retried_samples_total{cluster=~\"$cluster\", instance=~\"$instance\"}[5m])",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}cluster{{`}}`}}:{{`{{`}}instance{{`}}`}} {{`{{`}}remote_name{{`}}`}}:{{`{{`}}url{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Retried Samples",
- "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
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 16,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 3,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "rate(prometheus_remote_storage_enqueue_retries_total{cluster=~\"$cluster\", instance=~\"$instance\"}[5m])",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}cluster{{`}}`}}:{{`{{`}}instance{{`}}`}} {{`{{`}}remote_name{{`}}`}}:{{`{{`}}url{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Enqueue Retries",
- "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
- }
- ]
- }
- ],
- "repeat": null,
- "repeatIteration": null,
- "repeatRowId": null,
- "showTitle": true,
- "title": "Misc. Rates",
- "titleSize": "h6",
- "type": "row"
- }
- ],
- "schemaVersion": 14,
- "style": "dark",
- "tags": [
-
- ],
- "templating": {
- "list": [
- {
- "hide": 0,
- "label": null,
- "name": "datasource",
- "options": [
-
- ],
- "query": "prometheus",
- "refresh": 1,
- "regex": "",
- "type": "datasource"
- },
- {
- "allValue": null,
- "current": {
- "text": {
- "selected": true,
- "text": "All",
- "value": "$__all"
- },
- "value": {
- "selected": true,
- "text": "All",
- "value": "$__all"
- }
- },
- "datasource": "$datasource",
- "hide": 0,
- "includeAll": true,
- "label": null,
- "multi": false,
- "name": "instance",
- "options": [
-
- ],
- "query": "label_values(prometheus_build_info, instance)",
- "refresh": 2,
- "regex": "",
- "sort": 0,
- "tagValuesQuery": "",
- "tags": [
-
- ],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- },
- {
- "allValue": null,
- "current": {
- "text": {
- "selected": true,
- "text": "All",
- "value": "$__all"
- },
- "value": {
- "selected": true,
- "text": "All",
- "value": "$__all"
- }
- },
- "datasource": "$datasource",
- "hide": 0,
- "includeAll": true,
- "label": null,
- "multi": false,
- "name": "cluster",
- "options": [
-
- ],
- "query": "label_values(kube_pod_container_info{image=~\".*prometheus.*\"}, cluster)",
- "refresh": 2,
- "regex": "",
- "sort": 0,
- "tagValuesQuery": "",
- "tags": [
-
- ],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- },
- {
- "allValue": null,
- "current": {
-
- },
- "datasource": "$datasource",
- "hide": 0,
- "includeAll": true,
- "label": null,
- "multi": false,
- "name": "url",
- "options": [
-
- ],
- "query": "label_values(prometheus_remote_storage_shards{cluster=~\"$cluster\", instance=~\"$instance\"}, url)",
- "refresh": 2,
- "regex": "",
- "sort": 0,
- "tagValuesQuery": "",
- "tags": [
-
- ],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- }
- ]
- },
- "time": {
- "from": "now-6h",
- "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": "browser",
- "title": "Prometheus Remote Write",
- "version": 0
- }
+ {{`{"__inputs":[],"__requires":[],"annotations":{"list":[]},"editable":true,"gnetId":null,"graphTooltip":0,"hideControls":false,"id":null,"links":[],"refresh":"60s","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":false,"steppedLine":false,"targets":[{"expr":"(\n prometheus_remote_storage_highest_timestamp_in_seconds{cluster=~\"$cluster\", instance=~\"$instance\"} \n- \n ignoring(remote_name, url) group_right(instance) (prometheus_remote_storage_queue_highest_sent_timestamp_seconds{cluster=~\"$cluster\", instance=~\"$instance\"} != 0)\n)\n","format":"time_series","intervalFactor":2,"legendFormat":"{{cluster}}:{{instance}} {{remote_name}}:{{url}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Highest Timestamp In vs. Highest Timestamp Sent","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}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"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":"clamp_min(\n rate(prometheus_remote_storage_highest_timestamp_in_seconds{cluster=~\"$cluster\", instance=~\"$instance\"}[5m]) \n- \n ignoring (remote_name, url) group_right(instance) rate(prometheus_remote_storage_queue_highest_sent_timestamp_seconds{cluster=~\"$cluster\", instance=~\"$instance\"}[5m])\n, 0)\n","format":"time_series","intervalFactor":2,"legendFormat":"{{cluster}}:{{instance}} {{remote_name}}:{{url}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Rate[5m]","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}]}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Timestamps","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":12,"stack":false,"steppedLine":false,"targets":[{"expr":"rate(\n prometheus_remote_storage_samples_in_total{cluster=~\"$cluster\", instance=~\"$instance\"}[5m])\n- \n ignoring(remote_name, url) group_right(instance) (rate(prometheus_remote_storage_succeeded_samples_total{cluster=~\"$cluster\", instance=~\"$instance\"}[5m]) or rate(prometheus_remote_storage_samples_total{cluster=~\"$cluster\", instance=~\"$instance\"}[5m]))\n- \n (rate(prometheus_remote_storage_dropped_samples_total{cluster=~\"$cluster\", instance=~\"$instance\"}[5m]) or rate(prometheus_remote_storage_samples_dropped_total{cluster=~\"$cluster\", instance=~\"$instance\"}[5m]))\n","format":"time_series","intervalFactor":2,"legendFormat":"{{cluster}}:{{instance}} {{remote_name}}:{{url}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Rate, in vs. succeeded or dropped [5m]","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}]}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Samples","titleSize":"h6","type":"row"},{"collapse":false,"collapsed":false,"panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{},"id":5,"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":[],"minSpan":6,"nullPointMode":"null","percentage":false,"pointradius":5,"points":false,"renderer":"flot","repeat":null,"seriesOverrides":[],"spaceLength":10,"span":12,"stack":false,"steppedLine":false,"targets":[{"expr":"prometheus_remote_storage_shards{cluster=~\"$cluster\", instance=~\"$instance\"}","format":"time_series","intervalFactor":2,"legendFormat":"{{cluster}}:{{instance}} {{remote_name}}:{{url}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Current Shards","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}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"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":[],"spaceLength":10,"span":4,"stack":false,"steppedLine":false,"targets":[{"expr":"prometheus_remote_storage_shards_max{cluster=~\"$cluster\", instance=~\"$instance\"}","format":"time_series","intervalFactor":2,"legendFormat":"{{cluster}}:{{instance}} {{remote_name}}:{{url}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Max Shards","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}]},{"aliasColors":{},"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":[],"spaceLength":10,"span":4,"stack":false,"steppedLine":false,"targets":[{"expr":"prometheus_remote_storage_shards_min{cluster=~\"$cluster\", instance=~\"$instance\"}","format":"time_series","intervalFactor":2,"legendFormat":"{{cluster}}:{{instance}} {{remote_name}}:{{url}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Min Shards","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}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"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":4,"stack":false,"steppedLine":false,"targets":[{"expr":"prometheus_remote_storage_shards_desired{cluster=~\"$cluster\", instance=~\"$instance\"}","format":"time_series","intervalFactor":2,"legendFormat":"{{cluster}}:{{instance}} {{remote_name}}:{{url}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Desired Shards","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}]}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Shards","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,"span":6,"stack":false,"steppedLine":false,"targets":[{"expr":"prometheus_remote_storage_shard_capacity{cluster=~\"$cluster\", instance=~\"$instance\"}","format":"time_series","intervalFactor":2,"legendFormat":"{{cluster}}:{{instance}} {{remote_name}}:{{url}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Shard Capacity","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}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{},"id":10,"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":"prometheus_remote_storage_pending_samples{cluster=~\"$cluster\", instance=~\"$instance\"} or prometheus_remote_storage_samples_pending{cluster=~\"$cluster\", instance=~\"$instance\"}","format":"time_series","intervalFactor":2,"legendFormat":"{{cluster}}:{{instance}} {{remote_name}}:{{url}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Pending Samples","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}]}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Shard Details","titleSize":"h6","type":"row"},{"collapse":false,"collapsed":false,"panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{},"id":11,"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":"prometheus_tsdb_wal_segment_current{cluster=~\"$cluster\", instance=~\"$instance\"}","format":"time_series","intervalFactor":2,"legendFormat":"{{cluster}}:{{instance}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"TSDB Current Segment","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":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{},"id":12,"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":"prometheus_wal_watcher_current_segment{cluster=~\"$cluster\", instance=~\"$instance\"}","format":"time_series","intervalFactor":2,"legendFormat":"{{cluster}}:{{instance}} {{consumer}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Remote Write Current Segment","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":"short","label":null,"logBase":1,"max":null,"min":null,"show":true}]}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Segments","titleSize":"h6","type":"row"},{"collapse":false,"collapsed":false,"panels":[{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{},"id":13,"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":3,"stack":false,"steppedLine":false,"targets":[{"expr":"rate(prometheus_remote_storage_dropped_samples_total{cluster=~\"$cluster\", instance=~\"$instance\"}[5m]) or rate(prometheus_remote_storage_samples_dropped_total{cluster=~\"$cluster\", instance=~\"$instance\"}[5m])","format":"time_series","intervalFactor":2,"legendFormat":"{{cluster}}:{{instance}} {{remote_name}}:{{url}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Dropped Samples","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}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{},"id":14,"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":3,"stack":false,"steppedLine":false,"targets":[{"expr":"rate(prometheus_remote_storage_failed_samples_total{cluster=~\"$cluster\", instance=~\"$instance\"}[5m]) or rate(prometheus_remote_storage_samples_failed_total{cluster=~\"$cluster\", instance=~\"$instance\"}[5m])","format":"time_series","intervalFactor":2,"legendFormat":"{{cluster}}:{{instance}} {{remote_name}}:{{url}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Failed Samples","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}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{},"id":15,"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":3,"stack":false,"steppedLine":false,"targets":[{"expr":"rate(prometheus_remote_storage_retried_samples_total{cluster=~\"$cluster\", instance=~\"$instance\"}[5m]) or rate(prometheus_remote_storage_samples_retried_total{cluster=~\"$cluster\", instance=~\"$instance\"}[5m])","format":"time_series","intervalFactor":2,"legendFormat":"{{cluster}}:{{instance}} {{remote_name}}:{{url}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Retried Samples","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}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{},"id":16,"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":3,"stack":false,"steppedLine":false,"targets":[{"expr":"rate(prometheus_remote_storage_enqueue_retries_total{cluster=~\"$cluster\", instance=~\"$instance\"}[5m])","format":"time_series","intervalFactor":2,"legendFormat":"{{cluster}}:{{instance}} {{remote_name}}:{{url}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Enqueue Retries","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}]}],"repeat":null,"repeatIteration":null,"repeatRowId":null,"showTitle":true,"title":"Misc. Rates","titleSize":"h6","type":"row"}],"schemaVersion":14,"style":"dark","tags":["prometheus-mixin"],"templating":{"list":[{"hide":0,"label":null,"name":"datasource","options":[],"query":"prometheus","refresh":1,"regex":"","type":"datasource"},{"allValue":null,"current":{"text":{"selected":true,"text":"All","value":"$__all"},"value":{"selected":true,"text":"All","value":"$__all"}},"datasource":"$datasource","hide":`}}{{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}{{`,"includeAll":true,"label":null,"multi":false,"name":"cluster","options":[],"query":"label_values(prometheus_build_info, cluster)","refresh":2,"regex":"","sort":0,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"allValue":null,"current":{"text":{"selected":true,"text":"All","value":"$__all"},"value":{"selected":true,"text":"All","value":"$__all"}},"datasource":"$datasource","hide":0,"includeAll":true,"label":null,"multi":false,"name":"instance","options":[],"query":"label_values(prometheus_build_info{cluster=~\"$cluster\"}, instance)","refresh":2,"regex":"","sort":0,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"allValue":null,"current":{},"datasource":"$datasource","hide":0,"includeAll":true,"label":null,"multi":false,"name":"url","options":[],"query":"label_values(prometheus_remote_storage_shards{cluster=~\"$cluster\", instance=~\"$instance\"}, url)","refresh":2,"regex":"","sort":0,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false}]},"time":{"from":"now-6h","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 / Remote Write","version":0}`}}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/prometheus.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/prometheus.yaml
old mode 100755
new mode 100644
index da175552b1..5ff546c5f7
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/prometheus.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/prometheus.yaml
@@ -1,1220 +1,24 @@
{{- /*
-Generated from 'prometheus' from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/grafana-dashboardDefinitions.yaml
+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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.grafana.enabled .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 }}
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "prometheus" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
+ name: {{ printf "%s-%s" (include "kube-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 }}: "1"
+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }}
{{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.labels" $ | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-grafana
+{{ include "kube-prometheus-stack.labels" $ | indent 4 }}
data:
prometheus.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": 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,
- "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,
- "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,
- "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,
- "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,
- "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": 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": "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": 0,
- "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": 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": "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": 0,
- "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_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": 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": 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": 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": "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": 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": 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": 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": "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": 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": 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": 0,
- "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": [
-
- ],
- "templating": {
- "list": [
- {
- "current": {
- "text": "default",
- "value": "default"
- },
- "hide": 0,
- "label": null,
- "name": "datasource",
- "options": [
-
- ],
- "query": "prometheus",
- "refresh": 1,
- "regex": "",
- "type": "datasource"
- },
- {
- "allValue": null,
- "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)",
- "refresh": 1,
- "regex": "",
- "sort": 2,
- "tagValuesQuery": "",
- "tags": [
-
- ],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- },
- {
- "allValue": null,
- "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, 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": "utc",
- "title": "Prometheus",
- "uid": "",
- "version": 0
- }
+ {{`{"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":"s"},{"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"},{"expr":"max by (job, instance) (time() - process_start_time_seconds{job=~\"$job\", instance=~\"$instance\"})","format":"table","instant":true,"intervalFactor":2,"legendFormat":"","refId":"B"}],"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}],"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}],"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}],"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},{"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},{"expr":"sum by (job) (rate(prometheus_target_scrapes_sample_duplicate_timestamp_total[1m]))","format":"time_series","intervalFactor":2,"legendFormat":"duplicate timestamp: {{job}}","legendLink":null},{"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},{"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}],"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}],"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}],"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}],"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}],"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}],"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":"default","value":"default"},"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/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/proxy.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/proxy.yaml
old mode 100755
new mode 100644
index 6b1f5565e7..8b6c68be63
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/proxy.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/proxy.yaml
@@ -1,1209 +1,24 @@
{{- /*
-Generated from 'proxy' from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/grafana-dashboardDefinitions.yaml
+Generated from 'proxy' 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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.kubeProxy.enabled }}
+{{- 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.kubeProxy.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "proxy" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "proxy" | 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"
+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }}
{{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.labels" $ | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-grafana
+{{ include "kube-prometheus-stack.labels" $ | indent 4 }}
data:
proxy.json: |-
- {
- "__inputs": [
-
- ],
- "__requires": [
-
- ],
- "annotations": {
- "list": [
-
- ]
- },
- "editable": false,
- "gnetId": null,
- "graphTooltip": 0,
- "hideControls": false,
- "id": null,
- "links": [
-
- ],
- "refresh": "10s",
- "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": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "rangeMaps": [
- {
- "from": "null",
- "text": "N/A",
- "to": "null"
- }
- ],
- "span": 2,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "tableColumn": "",
- "targets": [
- {
- "expr": "sum(up{job=\"kube-proxy\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "A"
- }
- ],
- "thresholds": "",
- "title": "Up",
- "tooltip": {
- "shared": false
- },
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "op": "=",
- "text": "N/A",
- "value": "null"
- }
- ],
- "valueName": "min"
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 3,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 5,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(rate(kubeproxy_sync_proxy_rules_duration_seconds_count{job=\"kube-proxy\", instance=~\"$instance\"}[5m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "rate",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Rules Sync Rate",
- "tooltip": {
- "shared": false,
- "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": 0,
- "show": true
- },
- {
- "format": "ops",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 4,
- "legend": {
- "alignAsTable": true,
- "avg": false,
- "current": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "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": 5,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "histogram_quantile(0.99,rate(kubeproxy_sync_proxy_rules_duration_seconds_bucket{job=\"kube-proxy\", instance=~\"$instance\"}[5m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Rule Sync Latency 99th Quantile",
- "tooltip": {
- "shared": false,
- "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": 0,
- "show": true
- },
- {
- "format": "s",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ]
- }
- ],
- "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,
- "gridPos": {
-
- },
- "id": 5,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": "sum(rate(kubeproxy_network_programming_duration_seconds_count{job=\"kube-proxy\", instance=~\"$instance\"}[5m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "rate",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Network Programming Rate",
- "tooltip": {
- "shared": false,
- "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": 0,
- "show": true
- },
- {
- "format": "ops",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 6,
- "legend": {
- "alignAsTable": true,
- "avg": false,
- "current": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "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": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "histogram_quantile(0.99, sum(rate(kubeproxy_network_programming_duration_seconds_bucket{job=\"kube-proxy\", instance=~\"$instance\"}[5m])) by (instance, le))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Network Programming Latency 99th Quantile",
- "tooltip": {
- "shared": false,
- "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": 0,
- "show": true
- },
- {
- "format": "s",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ]
- }
- ],
- "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,
- "gridPos": {
-
- },
- "id": 7,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(rate(rest_client_requests_total{job=\"kube-proxy\", instance=~\"$instance\",code=~\"2..\"}[5m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "2xx",
- "refId": "A"
- },
- {
- "expr": "sum(rate(rest_client_requests_total{job=\"kube-proxy\", instance=~\"$instance\",code=~\"3..\"}[5m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "3xx",
- "refId": "B"
- },
- {
- "expr": "sum(rate(rest_client_requests_total{job=\"kube-proxy\", instance=~\"$instance\",code=~\"4..\"}[5m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "4xx",
- "refId": "C"
- },
- {
- "expr": "sum(rate(rest_client_requests_total{job=\"kube-proxy\", instance=~\"$instance\",code=~\"5..\"}[5m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "5xx",
- "refId": "D"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Kube API Request Rate",
- "tooltip": {
- "shared": false,
- "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",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 8,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 8,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_latency_seconds_bucket{job=\"kube-proxy\",instance=~\"$instance\",verb=\"POST\"}[5m])) by (verb, url, le))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}verb{{`}}`}} {{`{{`}}url{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Post Request Latency 99th Quantile",
- "tooltip": {
- "shared": false,
- "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": 0,
- "show": true
- },
- {
- "format": "s",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ]
- }
- ],
- "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,
- "gridPos": {
-
- },
- "id": 9,
- "legend": {
- "alignAsTable": true,
- "avg": false,
- "current": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "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": 12,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_latency_seconds_bucket{job=\"kube-proxy\", instance=~\"$instance\", verb=\"GET\"}[5m])) by (verb, url, le))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}verb{{`}}`}} {{`{{`}}url{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Get Request Latency 99th Quantile",
- "tooltip": {
- "shared": false,
- "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": 0,
- "show": true
- },
- {
- "format": "s",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ]
- }
- ],
- "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,
- "gridPos": {
-
- },
- "id": 10,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "process_resident_memory_bytes{job=\"kube-proxy\",instance=~\"$instance\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory",
- "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": null,
- "show": true
- },
- {
- "format": "bytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 11,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "rate(process_cpu_seconds_total{job=\"kube-proxy\",instance=~\"$instance\"}[5m])",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}}",
- "refId": "A"
- }
- ],
- "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": 0,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 12,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "go_goroutines{job=\"kube-proxy\",instance=~\"$instance\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Goroutines",
- "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": 0,
- "includeAll": true,
- "label": null,
- "multi": false,
- "name": "instance",
- "options": [
-
- ],
- "query": "label_values(kubeproxy_network_programming_duration_seconds_bucket{job=\"kube-proxy\"}, instance)",
- "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": "",
- "title": "Kubernetes / Proxy",
- "uid": "632e265de029684c40b21cb76bca4f94",
- "version": 0
- }
+ {{`{"__inputs":[],"__requires":[],"annotations":{"list":[]},"editable":false,"gnetId":null,"graphTooltip":0,"hideControls":false,"id":null,"links":[],"refresh":"10s","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":"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":2,"sparkline":{"fillColor":"rgba(31, 118, 189, 0.18)","full":false,"lineColor":"rgb(31, 120, 193)","show":false},"tableColumn":"","targets":[{"expr":"sum(up{cluster=\"$cluster\", job=\"kube-proxy\"})","format":"time_series","intervalFactor":2,"legendFormat":"","refId":"A"}],"thresholds":"","title":"Up","tooltip":{"shared":false},"type":"singlestat","valueFontSize":"80%","valueMaps":[{"op":"=","text":"N/A","value":"null"}],"valueName":"min"},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{},"id":3,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"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":5,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(kubeproxy_sync_proxy_rules_duration_seconds_count{cluster=\"$cluster\", job=\"kube-proxy\", instance=~\"$instance\"}[$__rate_interval]))","format":"time_series","intervalFactor":2,"legendFormat":"rate","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Rules Sync Rate","tooltip":{"shared":false,"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":0,"show":true},{"format":"ops","label":null,"logBase":1,"max":null,"min":0,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{},"id":4,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":true,"max":false,"min":false,"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":5,"stack":false,"steppedLine":false,"targets":[{"expr":"histogram_quantile(0.99,rate(kubeproxy_sync_proxy_rules_duration_seconds_bucket{cluster=\"$cluster\", job=\"kube-proxy\", instance=~\"$instance\"}[$__rate_interval]))","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Rule Sync Latency 99th Quantile","tooltip":{"shared":false,"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":0,"show":true},{"format":"s","label":null,"logBase":1,"max":null,"min":0,"show":true}]}],"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":5,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"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":"sum(rate(kubeproxy_network_programming_duration_seconds_count{cluster=\"$cluster\", job=\"kube-proxy\", instance=~\"$instance\"}[$__rate_interval]))","format":"time_series","intervalFactor":2,"legendFormat":"rate","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Network Programming Rate","tooltip":{"shared":false,"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":0,"show":true},{"format":"ops","label":null,"logBase":1,"max":null,"min":0,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{},"id":6,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":true,"max":false,"min":false,"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":6,"stack":false,"steppedLine":false,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(kubeproxy_network_programming_duration_seconds_bucket{cluster=\"$cluster\", job=\"kube-proxy\", instance=~\"$instance\"}[$__rate_interval])) by (instance, le))","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Network Programming Latency 99th Quantile","tooltip":{"shared":false,"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":0,"show":true},{"format":"s","label":null,"logBase":1,"max":null,"min":0,"show":true}]}],"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":7,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"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":4,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(rest_client_requests_total{cluster=\"$cluster\", job=\"kube-proxy\", 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=\"kube-proxy\", 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=\"kube-proxy\", 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=\"kube-proxy\", instance=~\"$instance\",code=~\"5..\"}[$__rate_interval]))","format":"time_series","intervalFactor":2,"legendFormat":"5xx","refId":"D"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Kube API Request Rate","tooltip":{"shared":false,"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","fill":1,"fillGradient":0,"gridPos":{},"id":8,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"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":8,"stack":false,"steppedLine":false,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster=\"$cluster\", job=\"kube-proxy\",instance=~\"$instance\",verb=\"POST\"}[$__rate_interval])) by (verb, url, le))","format":"time_series","intervalFactor":2,"legendFormat":"{{verb}} {{url}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Post Request Latency 99th Quantile","tooltip":{"shared":false,"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":0,"show":true},{"format":"s","label":null,"logBase":1,"max":null,"min":0,"show":true}]}],"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,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":true,"max":false,"min":false,"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":12,"stack":false,"steppedLine":false,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster=\"$cluster\", job=\"kube-proxy\", instance=~\"$instance\", verb=\"GET\"}[$__rate_interval])) by (verb, url, le))","format":"time_series","intervalFactor":2,"legendFormat":"{{verb}} {{url}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Get Request Latency 99th Quantile","tooltip":{"shared":false,"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":0,"show":true},{"format":"s","label":null,"logBase":1,"max":null,"min":0,"show":true}]}],"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":10,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"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":4,"stack":false,"steppedLine":false,"targets":[{"expr":"process_resident_memory_bytes{cluster=\"$cluster\", job=\"kube-proxy\",instance=~\"$instance\"}","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Memory","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":null,"show":true},{"format":"bytes","label":null,"logBase":1,"max":null,"min":null,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{},"id":11,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"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":4,"stack":false,"steppedLine":false,"targets":[{"expr":"rate(process_cpu_seconds_total{cluster=\"$cluster\", job=\"kube-proxy\",instance=~\"$instance\"}[$__rate_interval])","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A"}],"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":0,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{},"id":12,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"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":4,"stack":false,"steppedLine":false,"targets":[{"expr":"go_goroutines{cluster=\"$cluster\", job=\"kube-proxy\",instance=~\"$instance\"}","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Goroutines","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":"Data Source","name":"datasource","options":[],"query":"prometheus","refresh":1,"regex":"","type":"datasource"},{"allValue":null,"current":{},"datasource":"$datasource","hide":`}}{{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}{{`,"includeAll":false,"label":"cluster","multi":false,"name":"cluster","options":[],"query":"label_values(up{job=\"kube-proxy\"}, cluster)","refresh":2,"regex":"","sort":1,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"allValue":null,"current":{},"datasource":"$datasource","hide":0,"includeAll":true,"label":null,"multi":false,"name":"instance","options":[],"query":"label_values(up{job=\"kube-proxy\", cluster=\"$cluster\", job=\"kube-proxy\"}, instance)","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 / Proxy","uid":"632e265de029684c40b21cb76bca4f94","version":0}`}}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/scheduler.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/scheduler.yaml
old mode 100755
new mode 100644
index f7a3fd088e..311e1ac969
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/scheduler.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/scheduler.yaml
@@ -1,1056 +1,24 @@
{{- /*
-Generated from 'scheduler' from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/grafana-dashboardDefinitions.yaml
+Generated from 'scheduler' 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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.kubeScheduler.enabled }}
+{{- 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.kubeScheduler.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "scheduler" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "scheduler" | 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"
+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }}
{{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.labels" $ | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-grafana
+{{ include "kube-prometheus-stack.labels" $ | indent 4 }}
data:
scheduler.json: |-
- {
- "__inputs": [
-
- ],
- "__requires": [
-
- ],
- "annotations": {
- "list": [
-
- ]
- },
- "editable": false,
- "gnetId": null,
- "graphTooltip": 0,
- "hideControls": false,
- "id": null,
- "links": [
-
- ],
- "refresh": "10s",
- "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": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "rangeMaps": [
- {
- "from": "null",
- "text": "N/A",
- "to": "null"
- }
- ],
- "span": 2,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "tableColumn": "",
- "targets": [
- {
- "expr": "sum(up{job=\"kube-scheduler\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "A"
- }
- ],
- "thresholds": "",
- "title": "Up",
- "tooltip": {
- "shared": false
- },
- "type": "singlestat",
- "valueFontSize": "80%",
- "valueMaps": [
- {
- "op": "=",
- "text": "N/A",
- "value": "null"
- }
- ],
- "valueName": "min"
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 3,
- "legend": {
- "alignAsTable": true,
- "avg": false,
- "current": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "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": 5,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(rate(scheduler_e2e_scheduling_duration_seconds_count{job=\"kube-scheduler\", instance=~\"$instance\"}[5m])) by (instance)",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} e2e",
- "refId": "A"
- },
- {
- "expr": "sum(rate(scheduler_binding_duration_seconds_count{job=\"kube-scheduler\", instance=~\"$instance\"}[5m])) by (instance)",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} binding",
- "refId": "B"
- },
- {
- "expr": "sum(rate(scheduler_scheduling_algorithm_duration_seconds_count{job=\"kube-scheduler\", instance=~\"$instance\"}[5m])) by (instance)",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} scheduling algorithm",
- "refId": "C"
- },
- {
- "expr": "sum(rate(scheduler_volume_scheduling_duration_seconds_count{job=\"kube-scheduler\", instance=~\"$instance\"}[5m])) by (instance)",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} volume",
- "refId": "D"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Scheduling Rate",
- "tooltip": {
- "shared": false,
- "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": 0,
- "show": true
- },
- {
- "format": "ops",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 4,
- "legend": {
- "alignAsTable": true,
- "avg": false,
- "current": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "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": 5,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "histogram_quantile(0.99, sum(rate(scheduler_e2e_scheduling_duration_seconds_bucket{job=\"kube-scheduler\",instance=~\"$instance\"}[5m])) by (instance, le))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} e2e",
- "refId": "A"
- },
- {
- "expr": "histogram_quantile(0.99, sum(rate(scheduler_binding_duration_seconds_bucket{job=\"kube-scheduler\",instance=~\"$instance\"}[5m])) by (instance, le))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} binding",
- "refId": "B"
- },
- {
- "expr": "histogram_quantile(0.99, sum(rate(scheduler_scheduling_algorithm_duration_seconds_bucket{job=\"kube-scheduler\",instance=~\"$instance\"}[5m])) by (instance, le))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} scheduling algorithm",
- "refId": "C"
- },
- {
- "expr": "histogram_quantile(0.99, sum(rate(scheduler_volume_scheduling_duration_seconds_bucket{job=\"kube-scheduler\",instance=~\"$instance\"}[5m])) by (instance, le))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} volume",
- "refId": "D"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Scheduling latency 99th Quantile",
- "tooltip": {
- "shared": false,
- "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": 0,
- "show": true
- },
- {
- "format": "s",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ]
- }
- ],
- "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,
- "gridPos": {
-
- },
- "id": 5,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(rate(rest_client_requests_total{job=\"kube-scheduler\", instance=~\"$instance\",code=~\"2..\"}[5m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "2xx",
- "refId": "A"
- },
- {
- "expr": "sum(rate(rest_client_requests_total{job=\"kube-scheduler\", instance=~\"$instance\",code=~\"3..\"}[5m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "3xx",
- "refId": "B"
- },
- {
- "expr": "sum(rate(rest_client_requests_total{job=\"kube-scheduler\", instance=~\"$instance\",code=~\"4..\"}[5m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "4xx",
- "refId": "C"
- },
- {
- "expr": "sum(rate(rest_client_requests_total{job=\"kube-scheduler\", instance=~\"$instance\",code=~\"5..\"}[5m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "5xx",
- "refId": "D"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Kube API Request Rate",
- "tooltip": {
- "shared": false,
- "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": 0,
- "show": true
- },
- {
- "format": "ops",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 6,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 8,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_latency_seconds_bucket{job=\"kube-scheduler\", instance=~\"$instance\", verb=\"POST\"}[5m])) by (verb, url, le))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}verb{{`}}`}} {{`{{`}}url{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Post Request Latency 99th Quantile",
- "tooltip": {
- "shared": false,
- "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": 0,
- "show": true
- },
- {
- "format": "s",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ]
- }
- ],
- "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,
- "gridPos": {
-
- },
- "id": 7,
- "legend": {
- "alignAsTable": true,
- "avg": false,
- "current": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "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": 12,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "histogram_quantile(0.99, sum(rate(rest_client_request_latency_seconds_bucket{job=\"kube-scheduler\", instance=~\"$instance\", verb=\"GET\"}[5m])) by (verb, url, le))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}verb{{`}}`}} {{`{{`}}url{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Get Request Latency 99th Quantile",
- "tooltip": {
- "shared": false,
- "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": 0,
- "show": true
- },
- {
- "format": "s",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ]
- }
- ],
- "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,
- "gridPos": {
-
- },
- "id": 8,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "process_resident_memory_bytes{job=\"kube-scheduler\", instance=~\"$instance\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory",
- "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": null,
- "show": true
- },
- {
- "format": "bytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 9,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "rate(process_cpu_seconds_total{job=\"kube-scheduler\", instance=~\"$instance\"}[5m])",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}}",
- "refId": "A"
- }
- ],
- "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": "bytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- },
- {
- "format": "bytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": 0,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 10,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "go_goroutines{job=\"kube-scheduler\",instance=~\"$instance\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Goroutines",
- "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": 0,
- "includeAll": true,
- "label": null,
- "multi": false,
- "name": "instance",
- "options": [
-
- ],
- "query": "label_values(process_cpu_seconds_total{job=\"kube-scheduler\"}, instance)",
- "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": "",
- "title": "Kubernetes / Scheduler",
- "uid": "2e6b6a3b4bddf1427b3a55aa1311c656",
- "version": 0
- }
+ {{`{"__inputs":[],"__requires":[],"annotations":{"list":[]},"editable":false,"gnetId":null,"graphTooltip":0,"hideControls":false,"id":null,"links":[],"refresh":"10s","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":"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":2,"sparkline":{"fillColor":"rgba(31, 118, 189, 0.18)","full":false,"lineColor":"rgb(31, 120, 193)","show":false},"tableColumn":"","targets":[{"expr":"sum(up{cluster=\"$cluster\", job=\"kube-scheduler\"})","format":"time_series","intervalFactor":2,"legendFormat":"","refId":"A"}],"thresholds":"","title":"Up","tooltip":{"shared":false},"type":"singlestat","valueFontSize":"80%","valueMaps":[{"op":"=","text":"N/A","value":"null"}],"valueName":"min"},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{},"id":3,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":true,"max":false,"min":false,"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":5,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(scheduler_e2e_scheduling_duration_seconds_count{cluster=\"$cluster\", job=\"kube-scheduler\", 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=\"kube-scheduler\", 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=\"kube-scheduler\", 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=\"kube-scheduler\", instance=~\"$instance\"}[$__rate_interval])) by (cluster, instance)","format":"time_series","intervalFactor":2,"legendFormat":"{{cluster}} {{instance}} volume","refId":"D"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Scheduling Rate","tooltip":{"shared":false,"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":0,"show":true},{"format":"ops","label":null,"logBase":1,"max":null,"min":0,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{},"id":4,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":true,"max":false,"min":false,"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":5,"stack":false,"steppedLine":false,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(scheduler_e2e_scheduling_duration_seconds_bucket{cluster=\"$cluster\", job=\"kube-scheduler\",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=\"kube-scheduler\",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=\"kube-scheduler\",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=\"kube-scheduler\",instance=~\"$instance\"}[$__rate_interval])) by (cluster, instance, le))","format":"time_series","intervalFactor":2,"legendFormat":"{{cluster}} {{instance}} volume","refId":"D"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Scheduling latency 99th Quantile","tooltip":{"shared":false,"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":0,"show":true},{"format":"s","label":null,"logBase":1,"max":null,"min":0,"show":true}]}],"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":5,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"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":4,"stack":false,"steppedLine":false,"targets":[{"expr":"sum(rate(rest_client_requests_total{cluster=\"$cluster\", job=\"kube-scheduler\", 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=\"kube-scheduler\", 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=\"kube-scheduler\", 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=\"kube-scheduler\", instance=~\"$instance\",code=~\"5..\"}[$__rate_interval]))","format":"time_series","intervalFactor":2,"legendFormat":"5xx","refId":"D"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Kube API Request Rate","tooltip":{"shared":false,"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":0,"show":true},{"format":"ops","label":null,"logBase":1,"max":null,"min":0,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{},"id":6,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"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":8,"stack":false,"steppedLine":false,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster=\"$cluster\", job=\"kube-scheduler\", instance=~\"$instance\", verb=\"POST\"}[$__rate_interval])) by (verb, url, le))","format":"time_series","intervalFactor":2,"legendFormat":"{{verb}} {{url}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Post Request Latency 99th Quantile","tooltip":{"shared":false,"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":0,"show":true},{"format":"s","label":null,"logBase":1,"max":null,"min":0,"show":true}]}],"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":7,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":true,"max":false,"min":false,"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":12,"stack":false,"steppedLine":false,"targets":[{"expr":"histogram_quantile(0.99, sum(rate(rest_client_request_duration_seconds_bucket{cluster=\"$cluster\", job=\"kube-scheduler\", instance=~\"$instance\", verb=\"GET\"}[$__rate_interval])) by (verb, url, le))","format":"time_series","intervalFactor":2,"legendFormat":"{{verb}} {{url}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Get Request Latency 99th Quantile","tooltip":{"shared":false,"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":0,"show":true},{"format":"s","label":null,"logBase":1,"max":null,"min":0,"show":true}]}],"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":8,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"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":4,"stack":false,"steppedLine":false,"targets":[{"expr":"process_resident_memory_bytes{cluster=\"$cluster\", job=\"kube-scheduler\", instance=~\"$instance\"}","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Memory","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":null,"show":true},{"format":"bytes","label":null,"logBase":1,"max":null,"min":null,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{},"id":9,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"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":4,"stack":false,"steppedLine":false,"targets":[{"expr":"rate(process_cpu_seconds_total{cluster=\"$cluster\", job=\"kube-scheduler\", instance=~\"$instance\"}[$__rate_interval])","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A"}],"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":"bytes","label":null,"logBase":1,"max":null,"min":0,"show":true},{"format":"bytes","label":null,"logBase":1,"max":null,"min":0,"show":true}]},{"aliasColors":{},"bars":false,"dashLength":10,"dashes":false,"datasource":"$datasource","fill":1,"fillGradient":0,"gridPos":{},"id":10,"interval":"1m","legend":{"alignAsTable":true,"avg":false,"current":false,"max":false,"min":false,"rightSide":true,"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":4,"stack":false,"steppedLine":false,"targets":[{"expr":"go_goroutines{cluster=\"$cluster\", job=\"kube-scheduler\",instance=~\"$instance\"}","format":"time_series","intervalFactor":2,"legendFormat":"{{instance}}","refId":"A"}],"thresholds":[],"timeFrom":null,"timeShift":null,"title":"Goroutines","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":"Data Source","name":"datasource","options":[],"query":"prometheus","refresh":1,"regex":"","type":"datasource"},{"allValue":null,"current":{},"datasource":"$datasource","hide":`}}{{ if .Values.grafana.sidecar.dashboards.multicluster.global.enabled }}0{{ else }}2{{ end }}{{`,"includeAll":false,"label":"cluster","multi":false,"name":"cluster","options":[],"query":"label_values(up{job=\"kube-scheduler\"}, cluster)","refresh":2,"regex":"","sort":1,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"allValue":null,"current":{},"datasource":"$datasource","hide":0,"includeAll":true,"label":null,"multi":false,"name":"instance","options":[],"query":"label_values(up{job=\"kube-scheduler\", cluster=\"$cluster\"}, instance)","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 / Scheduler","uid":"2e6b6a3b4bddf1427b3a55aa1311c656","version":0}`}}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/statefulset.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/statefulset.yaml
deleted file mode 100755
index 003decda44..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/statefulset.yaml
+++ /dev/null
@@ -1,924 +0,0 @@
-{{- /*
-Generated from 'statefulset' from https://raw.githubusercontent.com/coreos/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/helm/charts/tree/master/stable/prometheus-operator/hack
-*/ -}}
-{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }}
-apiVersion: v1
-kind: ConfigMap
-metadata:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "statefulset" | trunc 63 | trimSuffix "-" }}
- labels:
- {{- if $.Values.grafana.sidecar.dashboards.label }}
- {{ $.Values.grafana.sidecar.dashboards.label }}: "1"
- {{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.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=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", 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=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", 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=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$statefulset.*\"}[3m])) + sum(rate(container_network_receive_bytes_total{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,
- "gridPos": {
-
- },
- "id": 9,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": 2,
- "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": "",
- "title": "Kubernetes / StatefulSets",
- "uid": "a31c1f46e6f727cb37c0d731a7245005",
- "version": 0
- }
-{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/workload-total.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/workload-total.yaml
old mode 100755
new mode 100644
index aa71d5e434..52d4273ad7
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/workload-total.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/workload-total.yaml
@@ -1,1390 +1,24 @@
{{- /*
-Generated from 'workload-total' from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/grafana-dashboardDefinitions.yaml
+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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.grafana.enabled .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 }}
apiVersion: v1
kind: ConfigMap
metadata:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "workload-total" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack-grafana.namespace" . }}
+ name: {{ printf "%s-%s" (include "kube-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 }}: "1"
+ {{ $.Values.grafana.sidecar.dashboards.label }}: {{ ternary $.Values.grafana.sidecar.dashboards.labelValue "1" (not (empty $.Values.grafana.sidecar.dashboards.labelValue)) | quote }}
{{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.labels" $ | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-grafana
+{{ include "kube-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,
- "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,
- "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) mixin_pod_workload{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,
- "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,
- "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) mixin_pod_workload{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,
- "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,
- "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) mixin_pod_workload{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,
- "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,
- "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) mixin_pod_workload{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,
- "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,
- "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) mixin_pod_workload{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,
- "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,
- "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) mixin_pod_workload{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,
- "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,
- "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) mixin_pod_workload{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,
- "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,
- "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) mixin_pod_workload{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,
- "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,
- "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) mixin_pod_workload{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,
- "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,
- "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) mixin_pod_workload{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": "default",
- "value": "default"
- },
- "hide": 0,
- "label": null,
- "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": 1,
- "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(mixin_pod_workload{namespace=~\"$namespace\"}, workload)",
- "hide": 0,
- "includeAll": false,
- "label": null,
- "multi": false,
- "name": "workload",
- "options": [
-
- ],
- "query": "label_values(mixin_pod_workload{namespace=~\"$namespace\"}, workload)",
- "refresh": 1,
- "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(mixin_pod_workload{namespace=~\"$namespace\", workload=~\"$workload\"}, workload_type)",
- "hide": 0,
- "includeAll": false,
- "label": null,
- "multi": false,
- "name": "type",
- "options": [
-
- ],
- "query": "label_values(mixin_pod_workload{namespace=~\"$namespace\", workload=~\"$workload\"}, workload_type)",
- "refresh": 1,
- "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": "",
- "title": "Kubernetes / Networking / Workload",
- "uid": "728bf77cc1166d2f3133bf25846876cc",
- "version": 0
- }
+ {{`{"__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{job=\"kubelet\", 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","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{job=\"kubelet\", 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","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{job=\"kubelet\", 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","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{job=\"kubelet\", 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","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{job=\"kubelet\", 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","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{job=\"kubelet\", 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","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{job=\"kubelet\", 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","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{job=\"kubelet\", 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","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{job=\"kubelet\", 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","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{job=\"kubelet\", 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","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":"default","value":"default"},"hide":0,"label":"Data Source","name":"datasource","options":[],"query":"prometheus","refresh":1,"regex":"","type":"datasource"},{"allValue":null,"current":{},"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{job=\"kube-state-metrics\"}, cluster)","refresh":2,"regex":"","sort":0,"tagValuesQuery":"","tags":[],"tagsQuery":"","type":"query","useTags":false},{"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{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\"}, namespace)","hide":0,"includeAll":true,"label":null,"multi":false,"name":"namespace","options":[],"query":"label_values(container_network_receive_packets_total{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", cluster=\"$cluster\"}, 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{cluster=\"$cluster\",namespace=~\"$namespace\"}, workload)","hide":0,"includeAll":false,"label":null,"multi":false,"name":"workload","options":[],"query":"label_values(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",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":"","value":""},"datasource":"$datasource","definition":"label_values(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",namespace=~\"$namespace\", workload=~\"$workload\"}, workload_type)","hide":0,"includeAll":true,"label":null,"multi":false,"name":"type","options":[],"query":"label_values(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\",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/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/etcd.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/etcd.yaml
deleted file mode 100755
index ad78359093..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/etcd.yaml
+++ /dev/null
@@ -1,1114 +0,0 @@
-{{- /*
-Generated from 'etcd' from https://raw.githubusercontent.com/etcd-io/etcd/master/Documentation/op-guide/grafana.json
-Do not change in-place! In order to change this file first read following link:
-https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
-*/ -}}
-{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.kubeEtcd.enabled }}
-apiVersion: v1
-kind: ConfigMap
-metadata:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "etcd" | trunc 63 | trimSuffix "-" }}
- labels:
- {{- if $.Values.grafana.sidecar.dashboards.label }}
- {{ $.Values.grafana.sidecar.dashboards.label }}: "1"
- {{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.labels" $ | indent 4 }}
-data:
- etcd.json: |-
- {
- "annotations": {
- "list": []
- },
- "description": "etcd sample Grafana dashboard with Prometheus",
- "editable": true,
- "gnetId": null,
- "hideControls": false,
- "id": 6,
- "links": [],
- "refresh": "10s",
- "rows": [
- {
- "collapse": false,
- "editable": true,
- "height": "250px",
- "panels": [
- {
- "cacheTimeout": null,
- "colorBackground": false,
- "colorValue": false,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "datasource": "$datasource",
- "editable": true,
- "error": false,
- "format": "none",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "id": 28,
- "interval": null,
- "isNew": 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
- },
- "targets": [
- {
- "expr": "sum(etcd_server_has_leader{job=\"$cluster\"})",
- "intervalFactor": 2,
- "legendFormat": "",
- "metric": "etcd_server_has_leader",
- "refId": "A",
- "step": 20
- }
- ],
- "thresholds": "",
- "title": "Up",
- "type": "singlestat",
- "valueFontSize": "200%",
- "valueMaps": [
- {
- "op": "=",
- "text": "N/A",
- "value": "null"
- }
- ],
- "valueName": "avg"
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": "$datasource",
- "editable": true,
- "error": false,
- "fill": 0,
- "id": 23,
- "isNew": true,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": false,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 2,
- "links": [],
- "nullPointMode": "connected",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 5,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(rate(grpc_server_started_total{job=\"$cluster\",grpc_type=\"unary\"}[5m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "RPC Rate",
- "metric": "grpc_server_started_total",
- "refId": "A",
- "step": 2
- },
- {
- "expr": "sum(rate(grpc_server_handled_total{job=\"$cluster\",grpc_type=\"unary\",grpc_code!=\"OK\"}[5m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "RPC Failed Rate",
- "metric": "grpc_server_handled_total",
- "refId": "B",
- "step": 2
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "RPC Rate",
- "tooltip": {
- "msResolution": false,
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "ops",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": "$datasource",
- "editable": true,
- "error": false,
- "fill": 0,
- "id": 41,
- "isNew": true,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": false,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 2,
- "links": [],
- "nullPointMode": "connected",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 4,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(grpc_server_started_total{job=\"$cluster\",grpc_service=\"etcdserverpb.Watch\",grpc_type=\"bidi_stream\"}) - sum(grpc_server_handled_total{job=\"$cluster\",grpc_service=\"etcdserverpb.Watch\",grpc_type=\"bidi_stream\"})",
- "intervalFactor": 2,
- "legendFormat": "Watch Streams",
- "metric": "grpc_server_handled_total",
- "refId": "A",
- "step": 4
- },
- {
- "expr": "sum(grpc_server_started_total{job=\"$cluster\",grpc_service=\"etcdserverpb.Lease\",grpc_type=\"bidi_stream\"}) - sum(grpc_server_handled_total{job=\"$cluster\",grpc_service=\"etcdserverpb.Lease\",grpc_type=\"bidi_stream\"})",
- "intervalFactor": 2,
- "legendFormat": "Lease Streams",
- "metric": "grpc_server_handled_total",
- "refId": "B",
- "step": 4
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Active Streams",
- "tooltip": {
- "msResolution": false,
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": "",
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "showTitle": false,
- "title": "Row"
- },
- {
- "collapse": false,
- "editable": true,
- "height": "250px",
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "datasource": "$datasource",
- "decimals": null,
- "editable": true,
- "error": false,
- "fill": 0,
- "grid": {},
- "id": 1,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": false,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 2,
- "links": [],
- "nullPointMode": "connected",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "etcd_mvcc_db_total_size_in_bytes{job=\"$cluster\"}",
- "hide": false,
- "interval": "",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} DB Size",
- "metric": "",
- "refId": "A",
- "step": 4
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "DB Size",
- "tooltip": {
- "msResolution": false,
- "shared": true,
- "sort": 0,
- "value_type": "cumulative"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "bytes",
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "logBase": 1,
- "max": null,
- "min": null,
- "show": false
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": "$datasource",
- "editable": true,
- "error": false,
- "fill": 0,
- "grid": {},
- "id": 3,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": false,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 2,
- "links": [],
- "nullPointMode": "connected",
- "percentage": false,
- "pointradius": 1,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 4,
- "stack": false,
- "steppedLine": true,
- "targets": [
- {
- "expr": "histogram_quantile(0.99, sum(rate(etcd_disk_wal_fsync_duration_seconds_bucket{job=\"$cluster\"}[5m])) by (instance, le))",
- "hide": false,
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} WAL fsync",
- "metric": "etcd_disk_wal_fsync_duration_seconds_bucket",
- "refId": "A",
- "step": 4
- },
- {
- "expr": "histogram_quantile(0.99, sum(rate(etcd_disk_backend_commit_duration_seconds_bucket{job=\"$cluster\"}[5m])) by (instance, le))",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} DB fsync",
- "metric": "etcd_disk_backend_commit_duration_seconds_bucket",
- "refId": "B",
- "step": 4
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Disk Sync Duration",
- "tooltip": {
- "msResolution": false,
- "shared": true,
- "sort": 0,
- "value_type": "cumulative"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "s",
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "logBase": 1,
- "max": null,
- "min": null,
- "show": false
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": "$datasource",
- "editable": true,
- "error": false,
- "fill": 0,
- "id": 29,
- "isNew": true,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": false,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 2,
- "links": [],
- "nullPointMode": "connected",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 4,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "process_resident_memory_bytes{job=\"$cluster\"}",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} Resident Memory",
- "metric": "process_resident_memory_bytes",
- "refId": "A",
- "step": 4
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory",
- "tooltip": {
- "msResolution": false,
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "bytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "title": "New row"
- },
- {
- "collapse": false,
- "editable": true,
- "height": "250px",
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "datasource": "$datasource",
- "editable": true,
- "error": false,
- "fill": 5,
- "id": 22,
- "isNew": true,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": false,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 2,
- "links": [],
- "nullPointMode": "connected",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 3,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "rate(etcd_network_client_grpc_received_bytes_total{job=\"$cluster\"}[5m])",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} Client Traffic In",
- "metric": "etcd_network_client_grpc_received_bytes_total",
- "refId": "A",
- "step": 4
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Client Traffic In",
- "tooltip": {
- "msResolution": false,
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "Bps",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": "$datasource",
- "editable": true,
- "error": false,
- "fill": 5,
- "id": 21,
- "isNew": true,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": false,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 2,
- "links": [],
- "nullPointMode": "connected",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 3,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "rate(etcd_network_client_grpc_sent_bytes_total{job=\"$cluster\"}[5m])",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} Client Traffic Out",
- "metric": "etcd_network_client_grpc_sent_bytes_total",
- "refId": "A",
- "step": 4
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Client Traffic Out",
- "tooltip": {
- "msResolution": false,
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "Bps",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": "$datasource",
- "editable": true,
- "error": false,
- "fill": 0,
- "id": 20,
- "isNew": true,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": false,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 2,
- "links": [],
- "nullPointMode": "connected",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 3,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(rate(etcd_network_peer_received_bytes_total{job=\"$cluster\"}[5m])) by (instance)",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} Peer Traffic In",
- "metric": "etcd_network_peer_received_bytes_total",
- "refId": "A",
- "step": 4
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Peer Traffic In",
- "tooltip": {
- "msResolution": false,
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "Bps",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": "$datasource",
- "decimals": null,
- "editable": true,
- "error": false,
- "fill": 0,
- "grid": {},
- "id": 16,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": false,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 2,
- "links": [],
- "nullPointMode": "connected",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 3,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(rate(etcd_network_peer_sent_bytes_total{job=\"$cluster\"}[5m])) by (instance)",
- "hide": false,
- "interval": "",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} Peer Traffic Out",
- "metric": "etcd_network_peer_sent_bytes_total",
- "refId": "A",
- "step": 4
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Peer Traffic Out",
- "tooltip": {
- "msResolution": false,
- "shared": true,
- "sort": 0,
- "value_type": "cumulative"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "Bps",
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- }
- ],
- "title": "New row"
- },
- {
- "collapse": false,
- "editable": true,
- "height": "250px",
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "datasource": "$datasource",
- "editable": true,
- "error": false,
- "fill": 0,
- "id": 40,
- "isNew": true,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": false,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 2,
- "links": [],
- "nullPointMode": "connected",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(rate(etcd_server_proposals_failed_total{job=\"$cluster\"}[5m]))",
- "intervalFactor": 2,
- "legendFormat": "Proposal Failure Rate",
- "metric": "etcd_server_proposals_failed_total",
- "refId": "A",
- "step": 2
- },
- {
- "expr": "sum(etcd_server_proposals_pending{job=\"$cluster\"})",
- "intervalFactor": 2,
- "legendFormat": "Proposal Pending Total",
- "metric": "etcd_server_proposals_pending",
- "refId": "B",
- "step": 2
- },
- {
- "expr": "sum(rate(etcd_server_proposals_committed_total{job=\"$cluster\"}[5m]))",
- "intervalFactor": 2,
- "legendFormat": "Proposal Commit Rate",
- "metric": "etcd_server_proposals_committed_total",
- "refId": "C",
- "step": 2
- },
- {
- "expr": "sum(rate(etcd_server_proposals_applied_total{job=\"$cluster\"}[5m]))",
- "intervalFactor": 2,
- "legendFormat": "Proposal Apply Rate",
- "refId": "D",
- "step": 2
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Raft Proposals",
- "tooltip": {
- "msResolution": false,
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": "",
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {},
- "bars": false,
- "datasource": "$datasource",
- "decimals": 0,
- "editable": true,
- "error": false,
- "fill": 0,
- "id": 19,
- "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",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "span": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "changes(etcd_server_leader_changes_seen_total{job=\"$cluster\"}[1d])",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}instance{{`}}`}} Total Leader Elections Per Day",
- "metric": "etcd_server_leader_changes_seen_total",
- "refId": "A",
- "step": 2
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeShift": null,
- "title": "Total Leader Elections Per Day",
- "tooltip": {
- "msResolution": false,
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "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
- }
- ]
- }
- ],
- "title": "New row"
- }
- ],
- "schemaVersion": 13,
- "sharedCrosshair": false,
- "style": "dark",
- "tags": [],
- "templating": {
- "list": [
- {
- "current": {
- "text": "Prometheus",
- "value": "Prometheus"
- },
- "hide": 0,
- "label": null,
- "name": "datasource",
- "options": [],
- "query": "prometheus",
- "refresh": 1,
- "regex": "",
- "type": "datasource"
- },
- {
- "allValue": null,
- "current": {
- "text": "prod",
- "value": "prod"
- },
- "datasource": "$datasource",
- "hide": 0,
- "includeAll": false,
- "label": "cluster",
- "multi": false,
- "name": "cluster",
- "options": [],
- "query": "label_values(etcd_server_has_leader, job)",
- "refresh": 1,
- "regex": "",
- "sort": 2,
- "tagValuesQuery": "",
- "tags": [],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- }
- ]
- },
- "time": {
- "from": "now-15m",
- "to": "now"
- },
- "timepicker": {
- "now": true,
- "refresh_intervals": [
- "5s",
- "10s",
- "30s",
- "1m",
- "5m",
- "15m",
- "30m",
- "1h",
- "2h",
- "1d"
- ],
- "time_options": [
- "5m",
- "15m",
- "1h",
- "6h",
- "12h",
- "24h",
- "2d",
- "7d",
- "30d"
- ]
- },
- "timezone": "browser",
- "title": "etcd",
- "version": 215
- }
-{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-cluster-rsrc-use.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-cluster-rsrc-use.yaml
deleted file mode 100755
index 938bcf4cc0..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-cluster-rsrc-use.yaml
+++ /dev/null
@@ -1,957 +0,0 @@
-{{- /*
-Generated from 'k8s-cluster-rsrc-use' from https://raw.githubusercontent.com/coreos/kube-prometheus/release-0.1/manifests/grafana-dashboardDefinitions.yaml
-Do not change in-place! In order to change this file first read following link:
-https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
-*/ -}}
-{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }}
-apiVersion: v1
-kind: ConfigMap
-metadata:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-cluster-rsrc-use" | trunc 63 | trimSuffix "-" }}
- labels:
- {{- if $.Values.grafana.sidecar.dashboards.label }}
- {{ $.Values.grafana.sidecar.dashboards.label }}: "1"
- {{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.labels" $ | indent 4 }}
-data:
- k8s-cluster-rsrc-use.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,
- "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": "node:cluster_cpu_utilisation:ratio{cluster=\"$cluster\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}node{{`}}`}}",
- "legendLink": "./d/4ac4f123aae0ff6dbaf4f4f66120033b/k8s-node-rsrc-use",
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "CPU Utilisation",
- "tooltip": {
- "shared": false,
- "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": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": false
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 10,
- "id": 2,
- "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": "node:node_cpu_saturation_load1:{cluster=\"$cluster\"} / scalar(sum(min(kube_pod_info{cluster=\"$cluster\"}) by (node)))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}node{{`}}`}}",
- "legendLink": "./d/4ac4f123aae0ff6dbaf4f4f66120033b/k8s-node-rsrc-use",
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "CPU Saturation (Load1)",
- "tooltip": {
- "shared": false,
- "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": "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": 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": "node:cluster_memory_utilisation:ratio{cluster=\"$cluster\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}node{{`}}`}}",
- "legendLink": "./d/4ac4f123aae0ff6dbaf4f4f66120033b/k8s-node-rsrc-use",
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory Utilisation",
- "tooltip": {
- "shared": false,
- "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": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": false
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 10,
- "id": 4,
- "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": "node:node_memory_swap_io_bytes:sum_rate{cluster=\"$cluster\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}node{{`}}`}}",
- "legendLink": "./d/4ac4f123aae0ff6dbaf4f4f66120033b/k8s-node-rsrc-use",
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory Saturation (Swap I/O)",
- "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": "Memory",
- "titleSize": "h6"
- },
- {
- "collapse": false,
- "height": "250px",
- "panels": [
- {
- "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": 6,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "node:node_disk_utilisation:avg_irate{cluster=\"$cluster\"} / scalar(:kube_pod_info_node_count:{cluster=\"$cluster\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}node{{`}}`}}",
- "legendLink": "./d/4ac4f123aae0ff6dbaf4f4f66120033b/k8s-node-rsrc-use",
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Disk IO Utilisation",
- "tooltip": {
- "shared": false,
- "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": "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": 6,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "node:node_disk_saturation:avg_irate{cluster=\"$cluster\"} / scalar(:kube_pod_info_node_count:{cluster=\"$cluster\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}node{{`}}`}}",
- "legendLink": "./d/4ac4f123aae0ff6dbaf4f4f66120033b/k8s-node-rsrc-use",
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Disk IO Saturation",
- "tooltip": {
- "shared": false,
- "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": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": false
- }
- ]
- }
- ],
- "repeat": null,
- "repeatIteration": null,
- "repeatRowId": null,
- "showTitle": true,
- "title": "Disk",
- "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": "node:node_net_utilisation:sum_irate{cluster=\"$cluster\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}node{{`}}`}}",
- "legendLink": "./d/4ac4f123aae0ff6dbaf4f4f66120033b/k8s-node-rsrc-use",
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Net Utilisation (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
- }
- ]
- },
- {
- "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": "node:node_net_saturation:sum_irate{cluster=\"$cluster\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}node{{`}}`}}",
- "legendLink": "./d/4ac4f123aae0ff6dbaf4f4f66120033b/k8s-node-rsrc-use",
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Net Saturation (Dropped)",
- "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": "Network",
- "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(max(node_filesystem_size_bytes{fstype=~\"ext[234]|btrfs|xfs|zfs\", cluster=\"$cluster\"} - node_filesystem_avail_bytes{fstype=~\"ext[234]|btrfs|xfs|zfs\", cluster=\"$cluster\"}) by (device,pod,namespace)) by (pod,namespace)\n/ scalar(sum(max(node_filesystem_size_bytes{fstype=~\"ext[234]|btrfs|xfs|zfs\", cluster=\"$cluster\"}) by (device,pod,namespace)))\n* on (namespace, pod) group_left (node) node_namespace_pod:kube_pod_info:{cluster=\"$cluster\"}\n",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}node{{`}}`}}",
- "legendLink": "./d/4ac4f123aae0ff6dbaf4f4f66120033b/k8s-node-rsrc-use",
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Disk Capacity",
- "tooltip": {
- "shared": false,
- "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": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": false
- }
- ]
- }
- ],
- "repeat": null,
- "repeatIteration": null,
- "repeatRowId": null,
- "showTitle": true,
- "title": "Storage",
- "titleSize": "h6"
- }
- ],
- "schemaVersion": 14,
- "style": "dark",
- "tags": [
- "kubernetes-mixin"
- ],
- "templating": {
- "list": [
- {
- "current": {
- "text": "Prometheus",
- "value": "Prometheus"
- },
- "hide": 0,
- "label": null,
- "name": "datasource",
- "options": [
-
- ],
- "query": "prometheus",
- "refresh": 1,
- "regex": "",
- "type": "datasource"
- },
- {
- "allValue": null,
- "current": {
- "text": "prod",
- "value": "prod"
- },
- "datasource": "$datasource",
- "hide": 2,
- "includeAll": false,
- "label": "cluster",
- "multi": false,
- "name": "cluster",
- "options": [
-
- ],
- "query": "label_values(:kube_pod_info_node_count:, cluster)",
- "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": "",
- "title": "Kubernetes / USE Method / Cluster",
- "uid": "a6e7d1362e1ddbb79db21d5bb40d7137",
- "version": 0
- }
-{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-node-rsrc-use.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-node-rsrc-use.yaml
deleted file mode 100755
index 04b407e600..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-node-rsrc-use.yaml
+++ /dev/null
@@ -1,984 +0,0 @@
-{{- /*
-Generated from 'k8s-node-rsrc-use' from https://raw.githubusercontent.com/coreos/kube-prometheus/release-0.1/manifests/grafana-dashboardDefinitions.yaml
-Do not change in-place! In order to change this file first read following link:
-https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
-*/ -}}
-{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }}
-apiVersion: v1
-kind: ConfigMap
-metadata:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-node-rsrc-use" | trunc 63 | trimSuffix "-" }}
- labels:
- {{- if $.Values.grafana.sidecar.dashboards.label }}
- {{ $.Values.grafana.sidecar.dashboards.label }}: "1"
- {{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.labels" $ | indent 4 }}
-data:
- k8s-node-rsrc-use.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": 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": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "node:node_cpu_utilisation:avg1m{cluster=\"$cluster\", node=\"$node\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "Utilisation",
- "legendLink": null,
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "CPU Utilisation",
- "tooltip": {
- "shared": false,
- "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": 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,
- "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": "node:node_cpu_saturation_load1:{cluster=\"$cluster\", node=\"$node\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "Saturation",
- "legendLink": null,
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "CPU Saturation (Load1)",
- "tooltip": {
- "shared": false,
- "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": 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": 3,
- "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": "node:node_memory_utilisation:{cluster=\"$cluster\", node=\"$node\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "Memory",
- "legendLink": null,
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory Utilisation",
- "tooltip": {
- "shared": false,
- "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": 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,
- "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": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "node:node_memory_swap_io_bytes:sum_rate{cluster=\"$cluster\", node=\"$node\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "Swap IO",
- "legendLink": null,
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory Saturation (Swap I/O)",
- "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": "Memory",
- "titleSize": "h6"
- },
- {
- "collapse": false,
- "height": "250px",
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "id": 5,
- "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": "node:node_disk_utilisation:avg_irate{cluster=\"$cluster\", node=\"$node\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "Utilisation",
- "legendLink": null,
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Disk IO Utilisation",
- "tooltip": {
- "shared": false,
- "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": 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,
- "id": 6,
- "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": "node:node_disk_saturation:avg_irate{cluster=\"$cluster\", node=\"$node\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "Saturation",
- "legendLink": null,
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Disk IO Saturation",
- "tooltip": {
- "shared": false,
- "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": 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": "Disk",
- "titleSize": "h6"
- },
- {
- "collapse": false,
- "height": "250px",
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "id": 7,
- "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": "node:node_net_utilisation:sum_irate{cluster=\"$cluster\", node=\"$node\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "Utilisation",
- "legendLink": null,
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Net Utilisation (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
- }
- ]
- },
- {
- "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": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "node:node_net_saturation:sum_irate{cluster=\"$cluster\", node=\"$node\"}",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "Saturation",
- "legendLink": null,
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Net Saturation (Dropped)",
- "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": "Net",
- "titleSize": "h6"
- },
- {
- "collapse": false,
- "height": "250px",
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "id": 9,
- "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,
- "targets": [
- {
- "expr": "node:node_filesystem_usage:{cluster=\"$cluster\"}\n* on (namespace, pod) group_left (node) node_namespace_pod:kube_pod_info:{cluster=\"$cluster\", node=\"$node\"}\n",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}device{{`}}`}}",
- "legendLink": null,
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Disk Utilisation",
- "tooltip": {
- "shared": false,
- "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": 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": "Disk",
- "titleSize": "h6"
- }
- ],
- "schemaVersion": 14,
- "style": "dark",
- "tags": [
- "kubernetes-mixin"
- ],
- "templating": {
- "list": [
- {
- "current": {
- "text": "Prometheus",
- "value": "Prometheus"
- },
- "hide": 0,
- "label": null,
- "name": "datasource",
- "options": [
-
- ],
- "query": "prometheus",
- "refresh": 1,
- "regex": "",
- "type": "datasource"
- },
- {
- "allValue": null,
- "current": {
- "text": "prod",
- "value": "prod"
- },
- "datasource": "$datasource",
- "hide": 2,
- "includeAll": false,
- "label": "cluster",
- "multi": false,
- "name": "cluster",
- "options": [
-
- ],
- "query": "label_values(:kube_pod_info_node_count:, cluster)",
- "refresh": 1,
- "regex": "",
- "sort": 2,
- "tagValuesQuery": "",
- "tags": [
-
- ],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- },
- {
- "allValue": null,
- "current": {
- "text": "prod",
- "value": "prod"
- },
- "datasource": "$datasource",
- "hide": 0,
- "includeAll": false,
- "label": "node",
- "multi": false,
- "name": "node",
- "options": [
-
- ],
- "query": "label_values(kube_node_info{cluster=\"$cluster\"}, node)",
- "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": "",
- "title": "Kubernetes / USE Method / Node",
- "uid": "4ac4f123aae0ff6dbaf4f4f66120033b",
- "version": 0
- }
-{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-resources-cluster.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-resources-cluster.yaml
deleted file mode 100755
index 1b51646361..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-resources-cluster.yaml
+++ /dev/null
@@ -1,1477 +0,0 @@
-{{- /*
-Generated from 'k8s-resources-cluster' from https://raw.githubusercontent.com/coreos/kube-prometheus/release-0.1/manifests/grafana-dashboardDefinitions.yaml
-Do not change in-place! In order to change this file first read following link:
-https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
-*/ -}}
-{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }}
-apiVersion: v1
-kind: ConfigMap
-metadata:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-cluster" | trunc 63 | trimSuffix "-" }}
- labels:
- {{- if $.Values.grafana.sidecar.dashboards.label }}
- {{ $.Values.grafana.sidecar.dashboards.label }}: "1"
- {{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.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": "100px",
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "format": "percentunit",
- "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": 2,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "1 - avg(rate(node_cpu_seconds_total{mode=\"idle\", cluster=\"$cluster\"}[1m]))",
- "format": "time_series",
- "instant": true,
- "intervalFactor": 2,
- "refId": "A"
- }
- ],
- "thresholds": "70,80",
- "timeFrom": null,
- "timeShift": null,
- "title": "CPU Utilisation",
- "tooltip": {
- "shared": false,
- "sort": 0,
- "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,
- "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": 2,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\"}) / sum(node:node_num_cpu:sum{cluster=\"$cluster\"})",
- "format": "time_series",
- "instant": true,
- "intervalFactor": 2,
- "refId": "A"
- }
- ],
- "thresholds": "70,80",
- "timeFrom": null,
- "timeShift": null,
- "title": "CPU Requests Commitment",
- "tooltip": {
- "shared": false,
- "sort": 0,
- "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,
- "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": 2,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\"}) / sum(node:node_num_cpu:sum{cluster=\"$cluster\"})",
- "format": "time_series",
- "instant": true,
- "intervalFactor": 2,
- "refId": "A"
- }
- ],
- "thresholds": "70,80",
- "timeFrom": null,
- "timeShift": null,
- "title": "CPU Limits Commitment",
- "tooltip": {
- "shared": false,
- "sort": 0,
- "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,
- "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": 2,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "1 - sum(:node_memory_MemFreeCachedBuffers_bytes:sum{cluster=\"$cluster\"}) / sum(:node_memory_MemTotal_bytes:sum{cluster=\"$cluster\"})",
- "format": "time_series",
- "instant": true,
- "intervalFactor": 2,
- "refId": "A"
- }
- ],
- "thresholds": "70,80",
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory Utilisation",
- "tooltip": {
- "shared": false,
- "sort": 0,
- "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": 5,
- "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": 2,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\"}) / sum(:node_memory_MemTotal_bytes:sum{cluster=\"$cluster\"})",
- "format": "time_series",
- "instant": true,
- "intervalFactor": 2,
- "refId": "A"
- }
- ],
- "thresholds": "70,80",
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory Requests Commitment",
- "tooltip": {
- "shared": false,
- "sort": 0,
- "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": 6,
- "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": 2,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\"}) / sum(:node_memory_MemTotal_bytes:sum{cluster=\"$cluster\"})",
- "format": "time_series",
- "instant": true,
- "intervalFactor": 2,
- "refId": "A"
- }
- ],
- "thresholds": "70,80",
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory Limits Commitment",
- "tooltip": {
- "shared": false,
- "sort": 0,
- "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": 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(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\"}) 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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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": "count(mixin_pod_workload{cluster=\"$cluster\"}) by (namespace)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "A",
- "step": 10
- },
- {
- "expr": "count(avg(mixin_pod_workload{cluster=\"$cluster\"}) by (workload, namespace)) by (namespace)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "B",
- "step": 10
- },
- {
- "expr": "sum(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\"}) by (namespace)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "C",
- "step": 10
- },
- {
- "expr": "sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\"}) by (namespace)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "D",
- "step": 10
- },
- {
- "expr": "sum(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\"}) by (namespace) / sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\"}) by (namespace)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "E",
- "step": 10
- },
- {
- "expr": "sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\"}) by (namespace)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "F",
- "step": 10
- },
- {
- "expr": "sum(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\"}) by (namespace) / sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\"}) 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{cluster=\"$cluster\", container_name!=\"\"}) 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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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": "count(mixin_pod_workload{cluster=\"$cluster\"}) by (namespace)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "A",
- "step": 10
- },
- {
- "expr": "count(avg(mixin_pod_workload{cluster=\"$cluster\"}) by (workload, namespace)) by (namespace)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "B",
- "step": 10
- },
- {
- "expr": "sum(container_memory_rss{cluster=\"$cluster\", container_name!=\"\"}) by (namespace)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "C",
- "step": 10
- },
- {
- "expr": "sum(kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\"}) by (namespace)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "D",
- "step": 10
- },
- {
- "expr": "sum(container_memory_rss{cluster=\"$cluster\", container_name!=\"\"}) by (namespace) / sum(kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\"}) by (namespace)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "E",
- "step": 10
- },
- {
- "expr": "sum(kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\"}) by (namespace)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "F",
- "step": 10
- },
- {
- "expr": "sum(container_memory_rss{cluster=\"$cluster\", container_name!=\"\"}) by (namespace) / sum(kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\"}) 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"
- }
- ],
- "schemaVersion": 14,
- "style": "dark",
- "tags": [
- "kubernetes-mixin"
- ],
- "templating": {
- "list": [
- {
- "current": {
- "text": "Prometheus",
- "value": "Prometheus"
- },
- "hide": 0,
- "label": null,
- "name": "datasource",
- "options": [
-
- ],
- "query": "prometheus",
- "refresh": 1,
- "regex": "",
- "type": "datasource"
- },
- {
- "allValue": null,
- "current": {
- "text": "prod",
- "value": "prod"
- },
- "datasource": "$datasource",
- "hide": 2,
- "includeAll": false,
- "label": "cluster",
- "multi": false,
- "name": "cluster",
- "options": [
-
- ],
- "query": "label_values(:kube_pod_info_node_count:, cluster)",
- "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": "",
- "title": "Kubernetes / Compute Resources / Cluster",
- "uid": "efa86fd1d0c121a26444b636a3f509a8",
- "version": 0
- }
-{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-resources-namespace.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-resources-namespace.yaml
deleted file mode 100755
index 7b3914df43..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-resources-namespace.yaml
+++ /dev/null
@@ -1,961 +0,0 @@
-{{- /*
-Generated from 'k8s-resources-namespace' from https://raw.githubusercontent.com/coreos/kube-prometheus/release-0.1/manifests/grafana-dashboardDefinitions.yaml
-Do not change in-place! In order to change this file first read following link:
-https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
-*/ -}}
-{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }}
-apiVersion: v1
-kind: ConfigMap
-metadata:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-namespace" | trunc 63 | trimSuffix "-" }}
- labels:
- {{- if $.Values.grafana.sidecar.dashboards.label }}
- {{ $.Values.grafana.sidecar.dashboards.label }}: "1"
- {{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.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": "250px",
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 10,
- "id": 1,
- "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(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod_name)",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}pod_name{{`}}`}}",
- "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 Usage",
- "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": 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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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(label_replace(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) by (pod)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "A",
- "step": 10
- },
- {
- "expr": "sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "B",
- "step": 10
- },
- {
- "expr": "sum(label_replace(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) by (pod) / sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "C",
- "step": 10
- },
- {
- "expr": "sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "D",
- "step": 10
- },
- {
- "expr": "sum(label_replace(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) by (pod) / sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", 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": 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": 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": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(container_memory_usage_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container_name!=\"\"}) by (pod_name)",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}pod_name{{`}}`}}",
- "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 Usage",
- "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": 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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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(label_replace(container_memory_usage_bytes{cluster=\"$cluster\", namespace=\"$namespace\",container_name!=\"\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) by (pod)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "A",
- "step": 10
- },
- {
- "expr": "sum(kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "B",
- "step": 10
- },
- {
- "expr": "sum(label_replace(container_memory_usage_bytes{cluster=\"$cluster\", namespace=\"$namespace\",container_name!=\"\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) by (pod) / sum(kube_pod_container_resource_requests_memory_bytes{namespace=\"$namespace\"}) by (pod)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "C",
- "step": 10
- },
- {
- "expr": "sum(kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "D",
- "step": 10
- },
- {
- "expr": "sum(label_replace(container_memory_usage_bytes{cluster=\"$cluster\", namespace=\"$namespace\",container_name!=\"\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) by (pod) / sum(kube_pod_container_resource_limits_memory_bytes{namespace=\"$namespace\"}) by (pod)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "E",
- "step": 10
- },
- {
- "expr": "sum(label_replace(container_memory_rss{cluster=\"$cluster\", namespace=\"$namespace\",container_name!=\"\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) by (pod)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "F",
- "step": 10
- },
- {
- "expr": "sum(label_replace(container_memory_cache{cluster=\"$cluster\", namespace=\"$namespace\",container_name!=\"\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) by (pod)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "G",
- "step": 10
- },
- {
- "expr": "sum(label_replace(container_memory_swap{cluster=\"$cluster\", namespace=\"$namespace\",container_name!=\"\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) 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": 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 Quota",
- "titleSize": "h6"
- }
- ],
- "schemaVersion": 14,
- "style": "dark",
- "tags": [
- "kubernetes-mixin"
- ],
- "templating": {
- "list": [
- {
- "current": {
- "text": "Prometheus",
- "value": "Prometheus"
- },
- "hide": 0,
- "label": null,
- "name": "datasource",
- "options": [
-
- ],
- "query": "prometheus",
- "refresh": 1,
- "regex": "",
- "type": "datasource"
- },
- {
- "allValue": null,
- "current": {
- "text": "prod",
- "value": "prod"
- },
- "datasource": "$datasource",
- "hide": 2,
- "includeAll": false,
- "label": "cluster",
- "multi": false,
- "name": "cluster",
- "options": [
-
- ],
- "query": "label_values(:kube_pod_info_node_count:, cluster)",
- "refresh": 1,
- "regex": "",
- "sort": 2,
- "tagValuesQuery": "",
- "tags": [
-
- ],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- },
- {
- "allValue": null,
- "current": {
- "text": "prod",
- "value": "prod"
- },
- "datasource": "$datasource",
- "hide": 0,
- "includeAll": false,
- "label": "namespace",
- "multi": false,
- "name": "namespace",
- "options": [
-
- ],
- "query": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)",
- "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": "",
- "title": "Kubernetes / Compute Resources / Namespace (Pods)",
- "uid": "85a562078cdf77779eaa1add43ccec1e",
- "version": 0
- }
-{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-resources-pod.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-resources-pod.yaml
deleted file mode 100755
index 863c89b127..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-resources-pod.yaml
+++ /dev/null
@@ -1,1004 +0,0 @@
-{{- /*
-Generated from 'k8s-resources-pod' from https://raw.githubusercontent.com/coreos/kube-prometheus/release-0.1/manifests/grafana-dashboardDefinitions.yaml
-Do not change in-place! In order to change this file first read following link:
-https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
-*/ -}}
-{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }}
-apiVersion: v1
-kind: ConfigMap
-metadata:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-pod" | trunc 63 | trimSuffix "-" }}
- labels:
- {{- if $.Values.grafana.sidecar.dashboards.label }}
- {{ $.Values.grafana.sidecar.dashboards.label }}: "1"
- {{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.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,
- "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(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=\"$namespace\", pod_name=\"$pod\", container_name!=\"POD\", cluster=\"$cluster\"}) by (container_name)",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}container_name{{`}}`}}",
- "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 Usage",
- "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": 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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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(label_replace(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\", pod_name=\"$pod\", container_name!=\"POD\"}, \"container\", \"$1\", \"container_name\", \"(.*)\")) by (container)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "A",
- "step": 10
- },
- {
- "expr": "sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "B",
- "step": 10
- },
- {
- "expr": "sum(label_replace(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\", pod_name=\"$pod\"}, \"container\", \"$1\", \"container_name\", \"(.*)\")) by (container) / sum(kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "C",
- "step": 10
- },
- {
- "expr": "sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "D",
- "step": 10
- },
- {
- "expr": "sum(label_replace(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\", pod_name=\"$pod\"}, \"container\", \"$1\", \"container_name\", \"(.*)\")) by (container) / sum(kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", 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": 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": 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": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(container_memory_rss{cluster=\"$cluster\", namespace=\"$namespace\", pod_name=\"$pod\", container_name!=\"POD\", container_name!=\"\"}) by (container_name)",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}container_name{{`}}`}} (RSS)",
- "legendLink": null,
- "step": 10
- },
- {
- "expr": "sum(container_memory_cache{cluster=\"$cluster\", namespace=\"$namespace\", pod_name=\"$pod\", container_name!=\"POD\", container_name!=\"\"}) by (container_name)",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}container_name{{`}}`}} (Cache)",
- "legendLink": null,
- "step": 10
- },
- {
- "expr": "sum(container_memory_swap{cluster=\"$cluster\", namespace=\"$namespace\", pod_name=\"$pod\", container_name!=\"POD\", container_name!=\"\"}) by (container_name)",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}container_name{{`}}`}} (Swap)",
- "legendLink": null,
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory 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": "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,
- "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": "Memory Usage",
- "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": "bytes"
- },
- {
- "alias": "Memory Requests",
- "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": "bytes"
- },
- {
- "alias": "Memory Requests %",
- "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": "percentunit"
- },
- {
- "alias": "Memory Limits",
- "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": "bytes"
- },
- {
- "alias": "Memory Limits %",
- "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": "percentunit"
- },
- {
- "alias": "Memory Usage (RSS)",
- "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": "bytes"
- },
- {
- "alias": "Memory Usage (Cache)",
- "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": "bytes"
- },
- {
- "alias": "Memory Usage (Swap",
- "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": "bytes"
- },
- {
- "alias": "Container",
- "colorMode": null,
- "colors": [
-
- ],
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "decimals": 2,
- "link": 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(label_replace(container_memory_usage_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod_name=\"$pod\", container_name!=\"POD\", container_name!=\"\"}, \"container\", \"$1\", \"container_name\", \"(.*)\")) by (container)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "A",
- "step": 10
- },
- {
- "expr": "sum(kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}) by (container)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "B",
- "step": 10
- },
- {
- "expr": "sum(label_replace(container_memory_usage_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod_name=\"$pod\"}, \"container\", \"$1\", \"container_name\", \"(.*)\")) by (container) / sum(kube_pod_container_resource_requests_memory_bytes{namespace=\"$namespace\", pod=\"$pod\"}) by (container)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "C",
- "step": 10
- },
- {
- "expr": "sum(kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"\"}) by (container)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "D",
- "step": 10
- },
- {
- "expr": "sum(label_replace(container_memory_usage_bytes{cluster=\"$cluster\", namespace=\"$namespace\", pod_name=\"$pod\", container_name!=\"\"}, \"container\", \"$1\", \"container_name\", \"(.*)\")) by (container) / sum(kube_pod_container_resource_limits_memory_bytes{namespace=\"$namespace\", pod=\"$pod\"}) by (container)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "E",
- "step": 10
- },
- {
- "expr": "sum(label_replace(container_memory_rss{cluster=\"$cluster\", namespace=\"$namespace\", pod_name=\"$pod\", container_name != \"\", container_name != \"POD\"}, \"container\", \"$1\", \"container_name\", \"(.*)\")) by (container)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "F",
- "step": 10
- },
- {
- "expr": "sum(label_replace(container_memory_cache{cluster=\"$cluster\", namespace=\"$namespace\", pod_name=\"$pod\", container_name != \"\", container_name != \"POD\"}, \"container\", \"$1\", \"container_name\", \"(.*)\")) by (container)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "G",
- "step": 10
- },
- {
- "expr": "sum(label_replace(container_memory_swap{cluster=\"$cluster\", namespace=\"$namespace\", pod_name=\"$pod\", container_name != \"\", container_name != \"POD\"}, \"container\", \"$1\", \"container_name\", \"(.*)\")) 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": 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 Quota",
- "titleSize": "h6"
- }
- ],
- "schemaVersion": 14,
- "style": "dark",
- "tags": [
- "kubernetes-mixin"
- ],
- "templating": {
- "list": [
- {
- "current": {
- "text": "Prometheus",
- "value": "Prometheus"
- },
- "hide": 0,
- "label": null,
- "name": "datasource",
- "options": [
-
- ],
- "query": "prometheus",
- "refresh": 1,
- "regex": "",
- "type": "datasource"
- },
- {
- "allValue": null,
- "current": {
- "text": "prod",
- "value": "prod"
- },
- "datasource": "$datasource",
- "hide": 2,
- "includeAll": false,
- "label": "cluster",
- "multi": false,
- "name": "cluster",
- "options": [
-
- ],
- "query": "label_values(:kube_pod_info_node_count:, cluster)",
- "refresh": 1,
- "regex": "",
- "sort": 2,
- "tagValuesQuery": "",
- "tags": [
-
- ],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- },
- {
- "allValue": null,
- "current": {
- "text": "prod",
- "value": "prod"
- },
- "datasource": "$datasource",
- "hide": 0,
- "includeAll": false,
- "label": "namespace",
- "multi": false,
- "name": "namespace",
- "options": [
-
- ],
- "query": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)",
- "refresh": 1,
- "regex": "",
- "sort": 2,
- "tagValuesQuery": "",
- "tags": [
-
- ],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- },
- {
- "allValue": null,
- "current": {
- "text": "prod",
- "value": "prod"
- },
- "datasource": "$datasource",
- "hide": 0,
- "includeAll": false,
- "label": "pod",
- "multi": false,
- "name": "pod",
- "options": [
-
- ],
- "query": "label_values(kube_pod_info{cluster=\"$cluster\", namespace=\"$namespace\"}, pod)",
- "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": "",
- "title": "Kubernetes / Compute Resources / Pod",
- "uid": "6581e46e4e5c7ba40a07646395ef7b23",
- "version": 0
- }
-{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-resources-workload.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-resources-workload.yaml
deleted file mode 100755
index e334663db1..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-resources-workload.yaml
+++ /dev/null
@@ -1,934 +0,0 @@
-{{- /*
-Generated from 'k8s-resources-workload' from https://raw.githubusercontent.com/coreos/kube-prometheus/release-0.1/manifests/grafana-dashboardDefinitions.yaml
-Do not change in-place! In order to change this file first read following link:
-https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
-*/ -}}
-{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }}
-apiVersion: v1
-kind: ConfigMap
-metadata:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-workload" | trunc 63 | trimSuffix "-" }}
- labels:
- {{- if $.Values.grafana.sidecar.dashboards.label }}
- {{ $.Values.grafana.sidecar.dashboards.label }}: "1"
- {{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.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,
- "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(\n label_replace(\n namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"},\n \"pod\", \"$1\", \"pod_name\", \"(.*)\"\n ) * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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": 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 Usage",
- "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": 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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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 label_replace(\n namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"},\n \"pod\", \"$1\", \"pod_name\", \"(.*)\"\n ) * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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 label_replace(\n namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"},\n \"pod\", \"$1\", \"pod_name\", \"(.*)\"\n ) * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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 label_replace(\n namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"},\n \"pod\", \"$1\", \"pod_name\", \"(.*)\"\n ) * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n) by (pod)\n/sum(\n kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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": 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": 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": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(\n label_replace(\n container_memory_usage_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container_name!=\"\"},\n \"pod\", \"$1\", \"pod_name\", \"(.*)\"\n ) * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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": 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 Usage",
- "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": 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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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 label_replace(\n container_memory_usage_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container_name!=\"\"},\n \"pod\", \"$1\", \"pod_name\", \"(.*)\"\n ) * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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 label_replace(\n container_memory_usage_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container_name!=\"\"},\n \"pod\", \"$1\", \"pod_name\", \"(.*)\"\n ) * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n ) by (pod)\n/sum(\n kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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 label_replace(\n container_memory_usage_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container_name!=\"\"},\n \"pod\", \"$1\", \"pod_name\", \"(.*)\"\n ) * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\", workload_type=\"$type\"}\n ) by (pod)\n/sum(\n kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", 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": 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 Quota",
- "titleSize": "h6"
- }
- ],
- "schemaVersion": 14,
- "style": "dark",
- "tags": [
- "kubernetes-mixin"
- ],
- "templating": {
- "list": [
- {
- "current": {
- "text": "Prometheus",
- "value": "Prometheus"
- },
- "hide": 0,
- "label": null,
- "name": "datasource",
- "options": [
-
- ],
- "query": "prometheus",
- "refresh": 1,
- "regex": "",
- "type": "datasource"
- },
- {
- "allValue": null,
- "current": {
- "text": "prod",
- "value": "prod"
- },
- "datasource": "$datasource",
- "hide": 2,
- "includeAll": false,
- "label": "cluster",
- "multi": false,
- "name": "cluster",
- "options": [
-
- ],
- "query": "label_values(:kube_pod_info_node_count:, cluster)",
- "refresh": 1,
- "regex": "",
- "sort": 2,
- "tagValuesQuery": "",
- "tags": [
-
- ],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- },
- {
- "allValue": null,
- "current": {
- "text": "prod",
- "value": "prod"
- },
- "datasource": "$datasource",
- "hide": 0,
- "includeAll": false,
- "label": "namespace",
- "multi": false,
- "name": "namespace",
- "options": [
-
- ],
- "query": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)",
- "refresh": 1,
- "regex": "",
- "sort": 2,
- "tagValuesQuery": "",
- "tags": [
-
- ],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- },
- {
- "allValue": null,
- "current": {
- "text": "prod",
- "value": "prod"
- },
- "datasource": "$datasource",
- "hide": 0,
- "includeAll": false,
- "label": "workload",
- "multi": false,
- "name": "workload",
- "options": [
-
- ],
- "query": "label_values(mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}, workload)",
- "refresh": 1,
- "regex": "",
- "sort": 2,
- "tagValuesQuery": "",
- "tags": [
-
- ],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- },
- {
- "allValue": null,
- "current": {
- "text": "prod",
- "value": "prod"
- },
- "datasource": "$datasource",
- "hide": 0,
- "includeAll": false,
- "label": "type",
- "multi": false,
- "name": "type",
- "options": [
-
- ],
- "query": "label_values(mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\", workload=\"$workload\"}, workload_type)",
- "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": "",
- "title": "Kubernetes / Compute Resources / Workload",
- "uid": "a164a7f0339f99e89cea5cb47e9be617",
- "version": 0
- }
-{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-resources-workloads-namespace.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-resources-workloads-namespace.yaml
deleted file mode 100755
index 5b8d27be3b..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-resources-workloads-namespace.yaml
+++ /dev/null
@@ -1,970 +0,0 @@
-{{- /*
-Generated from 'k8s-resources-workloads-namespace' from https://raw.githubusercontent.com/coreos/kube-prometheus/release-0.1/manifests/grafana-dashboardDefinitions.yaml
-Do not change in-place! In order to change this file first read following link:
-https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
-*/ -}}
-{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }}
-apiVersion: v1
-kind: ConfigMap
-metadata:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-workloads-namespace" | trunc 63 | trimSuffix "-" }}
- labels:
- {{- if $.Values.grafana.sidecar.dashboards.label }}
- {{ $.Values.grafana.sidecar.dashboards.label }}: "1"
- {{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.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,
- "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(\n label_replace(\n namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"},\n \"pod\", \"$1\", \"pod_name\", \"(.*)\"\n ) * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}\n) by (workload, workload_type)\n",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}workload{{`}}`}} - {{`{{`}}workload_type{{`}}`}}",
- "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 Usage",
- "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": 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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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(mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}) by (workload, workload_type)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "A",
- "step": 10
- },
- {
- "expr": "sum(\n label_replace(\n namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"},\n \"pod\", \"$1\", \"pod_name\", \"(.*)\"\n ) * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}\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_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}\n) by (workload, workload_type)\n",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "C",
- "step": 10
- },
- {
- "expr": "sum(\n label_replace(\n namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"},\n \"pod\", \"$1\", \"pod_name\", \"(.*)\"\n ) * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_requests_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}\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_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}\n) by (workload, workload_type)\n",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "E",
- "step": 10
- },
- {
- "expr": "sum(\n label_replace(\n namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{cluster=\"$cluster\", namespace=\"$namespace\"},\n \"pod\", \"$1\", \"pod_name\", \"(.*)\"\n ) * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_limits_cpu_cores{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}\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": 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": 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": 12,
- "stack": true,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum(\n label_replace(\n container_memory_usage_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container_name!=\"\"},\n \"pod\", \"$1\", \"pod_name\", \"(.*)\"\n ) * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}\n ) by (workload, workload_type)\n",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}workload{{`}}`}} - {{`{{`}}workload_type{{`}}`}}",
- "legendLink": null,
- "step": 10
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory 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": "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,
- "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": "Running Pods",
- "colorMode": null,
- "colors": [
-
- ],
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "decimals": 0,
- "link": 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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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,
- "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(mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}) by (workload, workload_type)",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "A",
- "step": 10
- },
- {
- "expr": "sum(\n label_replace(\n container_memory_usage_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container_name!=\"\"},\n \"pod\", \"$1\", \"pod_name\", \"(.*)\"\n ) * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}\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_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}\n) by (workload, workload_type)\n",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "C",
- "step": 10
- },
- {
- "expr": "sum(\n label_replace(\n container_memory_usage_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container_name!=\"\"},\n \"pod\", \"$1\", \"pod_name\", \"(.*)\"\n ) * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}\n ) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_requests_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}\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_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}\n) by (workload, workload_type)\n",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "E",
- "step": 10
- },
- {
- "expr": "sum(\n label_replace(\n container_memory_usage_bytes{cluster=\"$cluster\", namespace=\"$namespace\", container_name!=\"\"},\n \"pod\", \"$1\", \"pod_name\", \"(.*)\"\n ) * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}\n ) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_limits_memory_bytes{cluster=\"$cluster\", namespace=\"$namespace\"}\n * on(namespace,pod) group_left(workload, workload_type) mixin_pod_workload{cluster=\"$cluster\", namespace=\"$namespace\"}\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": 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 Quota",
- "titleSize": "h6"
- }
- ],
- "schemaVersion": 14,
- "style": "dark",
- "tags": [
- "kubernetes-mixin"
- ],
- "templating": {
- "list": [
- {
- "current": {
- "text": "Prometheus",
- "value": "Prometheus"
- },
- "hide": 0,
- "label": null,
- "name": "datasource",
- "options": [
-
- ],
- "query": "prometheus",
- "refresh": 1,
- "regex": "",
- "type": "datasource"
- },
- {
- "allValue": null,
- "current": {
- "text": "prod",
- "value": "prod"
- },
- "datasource": "$datasource",
- "hide": 2,
- "includeAll": false,
- "label": "cluster",
- "multi": false,
- "name": "cluster",
- "options": [
-
- ],
- "query": "label_values(:kube_pod_info_node_count:, cluster)",
- "refresh": 1,
- "regex": "",
- "sort": 2,
- "tagValuesQuery": "",
- "tags": [
-
- ],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- },
- {
- "allValue": null,
- "current": {
- "text": "prod",
- "value": "prod"
- },
- "datasource": "$datasource",
- "hide": 0,
- "includeAll": false,
- "label": "namespace",
- "multi": false,
- "name": "namespace",
- "options": [
-
- ],
- "query": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)",
- "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": "",
- "title": "Kubernetes / Compute Resources / Namespace (Workloads)",
- "uid": "a87fb0d919ec0ea5f6543124e16c42a5",
- "version": 0
- }
-{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/nodes.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/nodes.yaml
deleted file mode 100755
index 780b480125..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/nodes.yaml
+++ /dev/null
@@ -1,1381 +0,0 @@
-{{- /*
-Generated from 'nodes' from https://raw.githubusercontent.com/coreos/kube-prometheus/release-0.1/manifests/grafana-dashboardDefinitions.yaml
-Do not change in-place! In order to change this file first read following link:
-https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
-*/ -}}
-{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }}
-apiVersion: v1
-kind: ConfigMap
-metadata:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "nodes" | trunc 63 | trimSuffix "-" }}
- labels:
- {{- if $.Values.grafana.sidecar.dashboards.label }}
- {{ $.Values.grafana.sidecar.dashboards.label }}: "1"
- {{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.labels" $ | indent 4 }}
-data:
- nodes.json: |-
- {
- "__inputs": [
-
- ],
- "__requires": [
-
- ],
- "annotations": {
- "list": [
-
- ]
- },
- "editable": false,
- "gnetId": null,
- "graphTooltip": 0,
- "hideControls": false,
- "id": null,
- "links": [
-
- ],
- "refresh": "",
- "rows": [
- {
- "collapse": false,
- "collapsed": false,
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 2,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": "max(node_load1{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "load 1m",
- "refId": "A"
- },
- {
- "expr": "max(node_load5{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "load 5m",
- "refId": "B"
- },
- {
- "expr": "max(node_load15{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "load 15m",
- "refId": "C"
- },
- {
- "expr": "count(node_cpu_seconds_total{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\", mode=\"user\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "logical cores",
- "refId": "D"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "System load",
- "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
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 3,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": "sum by (cpu) (irate(node_cpu_seconds_total{cluster=\"$cluster\", job=\"node-exporter\", mode!=\"idle\", instance=\"$instance\"}[5m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}cpu{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Usage Per Core",
- "tooltip": {
- "shared": false,
- "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": null,
- "min": null,
- "show": true
- },
- {
- "format": "percentunit",
- "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"
- },
- {
- "collapse": false,
- "collapsed": false,
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 4,
- "legend": {
- "alignAsTable": "true",
- "avg": "true",
- "current": "true",
- "max": "false",
- "min": "false",
- "rightSide": "true",
- "show": "true",
- "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": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "max (sum by (cpu) (irate(node_cpu_seconds_total{cluster=\"$cluster\", job=\"node-exporter\", mode!=\"idle\", instance=\"$instance\"}[2m])) ) * 100\n",
- "format": "time_series",
- "intervalFactor": 10,
- "legendFormat": "{{`{{`}} cpu {{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "CPU Utilization",
- "tooltip": {
- "shared": false,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": [
-
- ]
- },
- "yaxes": [
- {
- "format": "percent",
- "label": null,
- "logBase": 1,
- "max": 100,
- "min": 0,
- "show": true
- },
- {
- "format": "percent",
- "label": null,
- "logBase": 1,
- "max": 100,
- "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": 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": "avg(sum by (cpu) (irate(node_cpu_seconds_total{cluster=\"$cluster\", job=\"node-exporter\", mode!=\"idle\", instance=\"$instance\"}[2m]))) * 100\n",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "A"
- }
- ],
- "thresholds": "80, 90",
- "title": "CPU 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,
- "gridPos": {
-
- },
- "id": 6,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": "max(\n node_memory_MemTotal_bytes{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"}\n - node_memory_MemFree_bytes{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"}\n - node_memory_Buffers_bytes{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"}\n - node_memory_Cached_bytes{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"}\n)\n",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "memory used",
- "refId": "A"
- },
- {
- "expr": "max(node_memory_Buffers_bytes{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "memory buffers",
- "refId": "B"
- },
- {
- "expr": "max(node_memory_Cached_bytes{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "memory cached",
- "refId": "C"
- },
- {
- "expr": "max(node_memory_MemFree_bytes{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "memory free",
- "refId": "D"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory 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": null,
- "show": true
- },
- {
- "format": "bytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "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": 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(\n (\n (\n node_memory_MemTotal_bytes{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"}\n - node_memory_MemFree_bytes{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"}\n - node_memory_Buffers_bytes{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"}\n - node_memory_Cached_bytes{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"}\n )\n / node_memory_MemTotal_bytes{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"}\n ) * 100)\n",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "A"
- }
- ],
- "thresholds": "80, 90",
- "title": "Memory 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,
- "gridPos": {
-
- },
- "id": 8,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "links": [
-
- ],
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "repeat": null,
- "seriesOverrides": [
- {
- "alias": "read",
- "yaxis": 1
- },
- {
- "alias": "io time",
- "yaxis": 2
- }
- ],
- "spaceLength": 10,
- "span": 6,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "max(rate(node_disk_read_bytes_total{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"}[2m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "read",
- "refId": "A"
- },
- {
- "expr": "max(rate(node_disk_written_bytes_total{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"}[2m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "written",
- "refId": "B"
- },
- {
- "expr": "max(rate(node_disk_io_time_seconds_total{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"}[2m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "io time",
- "refId": "C"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Disk I/O",
- "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": null,
- "show": true
- },
- {
- "format": "ms",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 9,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": "max by (namespace, pod, device) ((node_filesystem_size_bytes{cluster=\"$cluster\", fstype=~\"ext[234]|btrfs|xfs|zfs\", instance=\"$instance\", job=\"node-exporter\"} - node_filesystem_avail_bytes{cluster=\"$cluster\", fstype=~\"ext[234]|btrfs|xfs|zfs\", instance=\"$instance\", job=\"node-exporter\"}) / node_filesystem_size_bytes{cluster=\"$cluster\", fstype=~\"ext[234]|btrfs|xfs|zfs\", instance=\"$instance\", job=\"node-exporter\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "disk used",
- "refId": "A"
- },
- {
- "expr": "max by (namespace, pod, device) (node_filesystem_avail_bytes{cluster=\"$cluster\", fstype=~\"ext[234]|btrfs|xfs|zfs\", instance=\"$instance\", job=\"node-exporter\"} / node_filesystem_size_bytes{cluster=\"$cluster\", fstype=~\"ext[234]|btrfs|xfs|zfs\", instance=\"$instance\", job=\"node-exporter\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "disk free",
- "refId": "B"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Disk Space Usage",
- "tooltip": {
- "shared": false,
- "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": null,
- "min": null,
- "show": true
- },
- {
- "format": "percentunit",
- "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"
- },
- {
- "collapse": false,
- "collapsed": false,
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 10,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": "max(rate(node_network_receive_bytes_total{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\", device!~\"lo\"}[5m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}device{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Network Received",
- "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": null,
- "show": true
- },
- {
- "format": "bytes",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ]
- },
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 11,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": "max(rate(node_network_transmit_bytes_total{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\", device!~\"lo\"}[5m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "{{`{{`}}device{{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Network Transmitted",
- "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": null,
- "show": true
- },
- {
- "format": "bytes",
- "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"
- },
- {
- "collapse": false,
- "collapsed": false,
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 12,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": "max(\n node_filesystem_files{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"}\n - node_filesystem_files_free{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"}\n)\n",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "inodes used",
- "refId": "A"
- },
- {
- "expr": "max(node_filesystem_files_free{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "inodes free",
- "refId": "B"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Inodes 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": null,
- "show": true
- },
- {
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "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": 13,
- "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(\n (\n (\n node_filesystem_files{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"}\n - node_filesystem_files_free{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"}\n )\n / node_filesystem_files{cluster=\"$cluster\", job=\"node-exporter\", instance=\"$instance\"}\n ) * 100)\n",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "",
- "refId": "A"
- }
- ],
- "thresholds": "80, 90",
- "title": "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": null,
- "name": "datasource",
- "options": [
-
- ],
- "query": "prometheus",
- "refresh": 1,
- "regex": "",
- "type": "datasource"
- },
- {
- "allValue": null,
- "current": {
-
- },
- "datasource": "$datasource",
- "hide": 2,
- "includeAll": false,
- "label": "cluster",
- "multi": false,
- "name": "cluster",
- "options": [
-
- ],
- "query": "label_values(kube_pod_info, cluster)",
- "refresh": 2,
- "regex": "",
- "sort": 0,
- "tagValuesQuery": "",
- "tags": [
-
- ],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- },
- {
- "allValue": null,
- "current": {
-
- },
- "datasource": "$datasource",
- "hide": 0,
- "includeAll": false,
- "label": null,
- "multi": false,
- "name": "instance",
- "options": [
-
- ],
- "query": "label_values(node_boot_time_seconds{cluster=\"$cluster\", job=\"node-exporter\"}, 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": "",
- "title": "Kubernetes / Nodes",
- "uid": "fa49a4706d07a042595b664c87fb33ea",
- "version": 0
- }
-{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/persistentvolumesusage.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/persistentvolumesusage.yaml
deleted file mode 100755
index c701deca16..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/persistentvolumesusage.yaml
+++ /dev/null
@@ -1,571 +0,0 @@
-{{- /*
-Generated from 'persistentvolumesusage' from https://raw.githubusercontent.com/coreos/kube-prometheus/release-0.1/manifests/grafana-dashboardDefinitions.yaml
-Do not change in-place! In order to change this file first read following link:
-https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
-*/ -}}
-{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }}
-apiVersion: v1
-kind: ConfigMap
-metadata:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "persistentvolumesusage" | trunc 63 | trimSuffix "-" }}
- labels:
- {{- if $.Values.grafana.sidecar.dashboards.label }}
- {{ $.Values.grafana.sidecar.dashboards.label }}: "1"
- {{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.labels" $ | indent 4 }}
-data:
- persistentvolumesusage.json: |-
- {
- "__inputs": [
-
- ],
- "__requires": [
-
- ],
- "annotations": {
- "list": [
-
- ]
- },
- "editable": false,
- "gnetId": null,
- "graphTooltip": 0,
- "hideControls": false,
- "id": null,
- "links": [
-
- ],
- "refresh": "",
- "rows": [
- {
- "collapse": false,
- "collapsed": false,
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 2,
- "legend": {
- "alignAsTable": true,
- "avg": true,
- "current": true,
- "max": true,
- "min": true,
- "rightSide": false,
- "show": true,
- "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) (kubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n -\n sum without(instance, node) (kubelet_volume_stats_available_bytes{cluster=\"$cluster\", job=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n)\n",
- "format": "time_series",
- "intervalFactor": 1,
- "legendFormat": "Used Space",
- "refId": "A"
- },
- {
- "expr": "sum without(instance, node) (kubelet_volume_stats_available_bytes{cluster=\"$cluster\", job=\"kubelet\", 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": 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": "(\n kubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"}\n -\n kubelet_volume_stats_available_bytes{cluster=\"$cluster\", job=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"}\n)\n/\nkubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"kubelet\", 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,
- "gridPos": {
-
- },
- "id": 4,
- "legend": {
- "alignAsTable": true,
- "avg": true,
- "current": true,
- "max": true,
- "min": true,
- "rightSide": false,
- "show": true,
- "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) (kubelet_volume_stats_inodes_used{cluster=\"$cluster\", job=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n",
- "format": "time_series",
- "intervalFactor": 1,
- "legendFormat": "Used inodes",
- "refId": "A"
- },
- {
- "expr": "(\n sum without(instance, node) (kubelet_volume_stats_inodes{cluster=\"$cluster\", job=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"})\n -\n sum without(instance, node) (kubelet_volume_stats_inodes_used{cluster=\"$cluster\", job=\"kubelet\", 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": 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": "kubelet_volume_stats_inodes_used{cluster=\"$cluster\", job=\"kubelet\", namespace=\"$namespace\", persistentvolumeclaim=\"$volume\"}\n/\nkubelet_volume_stats_inodes{cluster=\"$cluster\", job=\"kubelet\", 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": null,
- "name": "datasource",
- "options": [
-
- ],
- "query": "prometheus",
- "refresh": 1,
- "regex": "",
- "type": "datasource"
- },
- {
- "allValue": null,
- "current": {
-
- },
- "datasource": "$datasource",
- "hide": 2,
- "includeAll": false,
- "label": "cluster",
- "multi": false,
- "name": "cluster",
- "options": [
-
- ],
- "query": "label_values(kubelet_volume_stats_capacity_bytes, cluster)",
- "refresh": 2,
- "regex": "",
- "sort": 0,
- "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(kubelet_volume_stats_capacity_bytes{cluster=\"$cluster\", job=\"kubelet\"}, namespace)",
- "refresh": 2,
- "regex": "",
- "sort": 0,
- "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{cluster=\"$cluster\", job=\"kubelet\", namespace=\"$namespace\"}, persistentvolumeclaim)",
- "refresh": 2,
- "regex": "",
- "sort": 0,
- "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": "",
- "title": "Kubernetes / Persistent Volumes",
- "uid": "919b92a8e8041bd567af9edab12c840c",
- "version": 0
- }
-{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/pods.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/pods.yaml
deleted file mode 100755
index 7698ff1517..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/pods.yaml
+++ /dev/null
@@ -1,678 +0,0 @@
-{{- /*
-Generated from 'pods' from https://raw.githubusercontent.com/coreos/kube-prometheus/release-0.1/manifests/grafana-dashboardDefinitions.yaml
-Do not change in-place! In order to change this file first read following link:
-https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
-*/ -}}
-{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }}
-apiVersion: v1
-kind: ConfigMap
-metadata:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "pods" | trunc 63 | trimSuffix "-" }}
- labels:
- {{- if $.Values.grafana.sidecar.dashboards.label }}
- {{ $.Values.grafana.sidecar.dashboards.label }}: "1"
- {{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.labels" $ | indent 4 }}
-data:
- pods.json: |-
- {
- "__inputs": [
-
- ],
- "__requires": [
-
- ],
- "annotations": {
- "list": [
- {
- "builtIn": 1,
- "datasource": "$datasource",
- "enable": true,
- "expr": "time() == BOOL timestamp(rate(kube_pod_container_status_restarts_total{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}[2m]) > 0)",
- "hide": false,
- "iconColor": "rgba(215, 44, 44, 1)",
- "name": "Restarts",
- "showIn": 0,
- "tags": [
- "restart"
- ],
- "type": "rows"
- }
- ]
- },
- "editable": false,
- "gnetId": null,
- "graphTooltip": 0,
- "hideControls": false,
- "id": null,
- "links": [
-
- ],
- "refresh": "",
- "rows": [
- {
- "collapse": false,
- "collapsed": false,
- "panels": [
- {
- "aliasColors": {
-
- },
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "$datasource",
- "fill": 1,
- "gridPos": {
-
- },
- "id": 2,
- "legend": {
- "alignAsTable": true,
- "avg": true,
- "current": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "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": 12,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum by(container_name) (container_memory_usage_bytes{job=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\", pod_name=\"$pod\", container_name=~\"$container\", container_name!=\"POD\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "Current: {{`{{`}} container_name {{`}}`}}",
- "refId": "A"
- },
- {
- "expr": "sum by(container) (kube_pod_container_resource_requests{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\", pod=\"$pod\", container=~\"$container\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "Requested: {{`{{`}} container {{`}}`}}",
- "refId": "B"
- },
- {
- "expr": "sum by(container) (kube_pod_container_resource_limits{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\", pod=\"$pod\", container=~\"$container\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "Limit: {{`{{`}} container {{`}}`}}",
- "refId": "C"
- },
- {
- "expr": "sum by(container_name) (container_memory_cache{job=\"kubelet\", namespace=\"$namespace\", pod_name=~\"$pod\", container_name=~\"$container\", container_name!=\"POD\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "Cache: {{`{{`}} container_name {{`}}`}}",
- "refId": "D"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Memory 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
- }
- ]
- }
- ],
- "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,
- "gridPos": {
-
- },
- "id": 3,
- "legend": {
- "alignAsTable": true,
- "avg": true,
- "current": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "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": 12,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sum by (container_name) (rate(container_cpu_usage_seconds_total{job=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\", image!=\"\", pod_name=\"$pod\", container_name=~\"$container\", container_name!=\"POD\"}[1m]))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "Current: {{`{{`}} container_name {{`}}`}}",
- "refId": "A"
- },
- {
- "expr": "sum by(container) (kube_pod_container_resource_requests{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\", pod=\"$pod\", container=~\"$container\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "Requested: {{`{{`}} container {{`}}`}}",
- "refId": "B"
- },
- {
- "expr": "sum by(container) (kube_pod_container_resource_limits{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\", pod=\"$pod\", container=~\"$container\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "Limit: {{`{{`}} container {{`}}`}}",
- "refId": "C"
- }
- ],
- "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": 0,
- "show": true
- }
- ]
- }
- ],
- "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,
- "gridPos": {
-
- },
- "id": 4,
- "legend": {
- "alignAsTable": true,
- "avg": true,
- "current": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "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": 12,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "sort_desc(sum by (pod_name) (rate(container_network_receive_bytes_total{job=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\", pod_name=\"$pod\"}[1m])))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "RX: {{`{{`}} pod_name {{`}}`}}",
- "refId": "A"
- },
- {
- "expr": "sort_desc(sum by (pod_name) (rate(container_network_transmit_bytes_total{job=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\", pod_name=\"$pod\"}[1m])))",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "TX: {{`{{`}} pod_name {{`}}`}}",
- "refId": "B"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Network I/O",
- "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
- }
- ]
- }
- ],
- "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,
- "gridPos": {
-
- },
- "id": 5,
- "legend": {
- "alignAsTable": true,
- "avg": true,
- "current": true,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "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": 12,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "max by (container) (kube_pod_container_status_restarts_total{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container=~\"$container\"})",
- "format": "time_series",
- "intervalFactor": 2,
- "legendFormat": "Restarts: {{`{{`}} container {{`}}`}}",
- "refId": "A"
- }
- ],
- "thresholds": [
-
- ],
- "timeFrom": null,
- "timeShift": null,
- "title": "Total Restarts Per Container",
- "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": 0,
- "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": "Prometheus",
- "value": "Prometheus"
- },
- "hide": 0,
- "label": null,
- "name": "datasource",
- "options": [
-
- ],
- "query": "prometheus",
- "refresh": 1,
- "regex": "",
- "type": "datasource"
- },
- {
- "allValue": null,
- "current": {
-
- },
- "datasource": "$datasource",
- "hide": 2,
- "includeAll": false,
- "label": "cluster",
- "multi": false,
- "name": "cluster",
- "options": [
-
- ],
- "query": "label_values(kube_pod_info, cluster)",
- "refresh": 2,
- "regex": "",
- "sort": 0,
- "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_pod_info{cluster=\"$cluster\"}, namespace)",
- "refresh": 2,
- "regex": "",
- "sort": 0,
- "tagValuesQuery": "",
- "tags": [
-
- ],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- },
- {
- "allValue": null,
- "current": {
-
- },
- "datasource": "$datasource",
- "hide": 0,
- "includeAll": false,
- "label": "Pod",
- "multi": false,
- "name": "pod",
- "options": [
-
- ],
- "query": "label_values(kube_pod_info{cluster=\"$cluster\", namespace=~\"$namespace\"}, pod)",
- "refresh": 2,
- "regex": "",
- "sort": 0,
- "tagValuesQuery": "",
- "tags": [
-
- ],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- },
- {
- "allValue": null,
- "current": {
-
- },
- "datasource": "$datasource",
- "hide": 0,
- "includeAll": true,
- "label": "Container",
- "multi": false,
- "name": "container",
- "options": [
-
- ],
- "query": "label_values(kube_pod_container_info{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\"}, container)",
- "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": "",
- "title": "Kubernetes / Pods",
- "uid": "ab4f13a9892a76a4d21ce8c2445bf4ea",
- "version": 0
- }
-{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/statefulset.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/statefulset.yaml
deleted file mode 100755
index 3476901f3c..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/statefulset.yaml
+++ /dev/null
@@ -1,924 +0,0 @@
-{{- /*
-Generated from 'statefulset' from https://raw.githubusercontent.com/coreos/kube-prometheus/release-0.1/manifests/grafana-dashboardDefinitions.yaml
-Do not change in-place! In order to change this file first read following link:
-https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
-*/ -}}
-{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }}
-apiVersion: v1
-kind: ConfigMap
-metadata:
- namespace: {{ $.Release.Namespace }}
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "statefulset" | trunc 63 | trimSuffix "-" }}
- labels:
- {{- if $.Values.grafana.sidecar.dashboards.label }}
- {{ $.Values.grafana.sidecar.dashboards.label }}: "1"
- {{- end }}
- app: {{ template "prometheus-operator.name" $ }}-grafana
-{{ include "prometheus-operator.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=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\", pod_name=~\"$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=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\", pod_name=~\"$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=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\", pod_name=~\"$statefulset.*\"}[3m])) + sum(rate(container_network_receive_bytes_total{cluster=\"$cluster\", namespace=\"$namespace\",pod_name=~\"$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,
- "gridPos": {
-
- },
- "id": 9,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "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": "Prometheus",
- "value": "Prometheus"
- },
- "hide": 0,
- "label": null,
- "name": "datasource",
- "options": [
-
- ],
- "query": "prometheus",
- "refresh": 1,
- "regex": "",
- "type": "datasource"
- },
- {
- "allValue": null,
- "current": {
-
- },
- "datasource": "$datasource",
- "hide": 2,
- "includeAll": false,
- "label": "cluster",
- "multi": false,
- "name": "cluster",
- "options": [
-
- ],
- "query": "label_values(kube_statefulset_metadata_generation, cluster)",
- "refresh": 2,
- "regex": "",
- "sort": 0,
- "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\"}, namespace)",
- "refresh": 2,
- "regex": "",
- "sort": 0,
- "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\", namespace=\"$namespace\"}, statefulset)",
- "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": "",
- "title": "Kubernetes / StatefulSets",
- "uid": "a31c1f46e6f727cb37c0d731a7245005",
- "version": 0
- }
-{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/servicemonitor.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/servicemonitor.yaml
deleted file mode 100755
index cbbbba8bbf..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/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 "prometheus-operator.fullname" . }}-grafana
- namespace: {{ $.Release.Namespace }}
- labels:
- app: {{ template "prometheus-operator.name" . }}-grafana
-{{ include "prometheus-operator.labels" . | indent 4 }}
-spec:
- selector:
- matchLabels:
- app.kubernetes.io/name: grafana
- app.kubernetes.io/instance: {{ $.Release.Name | quote }}
- namespaceSelector:
- matchNames:
- - {{ $.Release.Namespace | quote }}
- endpoints:
- - port: {{ .Values.grafana.service.portName }}
- {{- if .Values.grafana.serviceMonitor.interval }}
- interval: {{ .Values.grafana.serviceMonitor.interval }}
- {{- end }}
- path: "/metrics"
-{{- 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/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/ciliumnetworkpolicy-createSecret.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/ciliumnetworkpolicy-createSecret.yaml
new file mode 100644
index 0000000000..c4517b6b90
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/ciliumnetworkpolicy-createSecret.yaml
@@ -0,0 +1,36 @@
+{{- if and .Values.prometheusOperator.networkPolicy.enabled (eq .Values.prometheusOperator.networkPolicy.flavor "cilium") }}
+{{- if and .Values.prometheusOperator.enabled .Values.prometheusOperator.admissionWebhooks.enabled .Values.prometheusOperator.admissionWebhooks.patch.enabled (not .Values.prometheusOperator.admissionWebhooks.certManager.enabled) }}
+apiVersion: cilium.io/v2
+kind: CiliumNetworkPolicy
+metadata:
+ name: {{ template "kube-prometheus-stack.fullname" . }}-admission-create
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ annotations:
+ helm.sh/hook: pre-install,pre-upgrade
+ helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
+ ## Ensure this is run before the job
+ helm.sh/hook-weight: "-5"
+ {{- with .Values.prometheusOperator.admissionWebhooks.annotations }}
+ {{ toYaml . | nindent 4 }}
+ {{- end }}
+ labels:
+ app: {{ template "kube-prometheus-stack.name" $ }}-admission-create
+ {{- include "kube-prometheus-stack.labels" $ | nindent 4 }}
+spec:
+ endpointSelector:
+ matchLabels:
+ app: {{ template "kube-prometheus-stack.name" $ }}-admission-create
+ {{- if .Values.prometheusOperator.networkPolicy.matchLabels }}
+ {{ toYaml .Values.prometheusOperator.networkPolicy.matchLabels | nindent 6 }}
+ {{- else }}
+ {{- include "kube-prometheus-stack.labels" $ | nindent 6 }}
+ {{- end }}
+ egress:
+ {{- if and .Values.prometheusOperator.networkPolicy.cilium .Values.prometheusOperator.networkPolicy.cilium.egress }}
+ {{ toYaml .Values.prometheusOperator.networkPolicy.cilium.egress | nindent 6 }}
+ {{- else }}
+ - toEntities:
+ - kube-apiserver
+ {{- end }}
+{{- end }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/ciliumnetworkpolicy-patchWebhook.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/ciliumnetworkpolicy-patchWebhook.yaml
new file mode 100644
index 0000000000..f6eb5220c9
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/ciliumnetworkpolicy-patchWebhook.yaml
@@ -0,0 +1,37 @@
+{{- if and .Values.prometheusOperator.networkPolicy.enabled (eq .Values.prometheusOperator.networkPolicy.flavor "cilium") }}
+{{- if and .Values.prometheusOperator.enabled .Values.prometheusOperator.admissionWebhooks.enabled .Values.prometheusOperator.admissionWebhooks.patch.enabled (not .Values.prometheusOperator.admissionWebhooks.certManager.enabled) }}
+apiVersion: cilium.io/v2
+kind: CiliumNetworkPolicy
+metadata:
+ name: {{ template "kube-prometheus-stack.fullname" . }}-admission-patch
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ annotations:
+ helm.sh/hook: post-install,post-upgrade
+ helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
+ ## Ensure this is run before the job
+ helm.sh/hook-weight: "-5"
+ {{- with .Values.prometheusOperator.admissionWebhooks.patch.annotations }}
+ {{ toYaml . | nindent 4 }}
+ {{- end }}
+ labels:
+ app: {{ template "kube-prometheus-stack.name" $ }}-admission-patch
+ {{- include "kube-prometheus-stack.labels" $ | nindent 4 }}
+spec:
+ endpointSelector:
+ matchLabels:
+ app: {{ template "kube-prometheus-stack.name" $ }}-admission-patch
+ {{- if .Values.prometheusOperator.networkPolicy.matchLabels }}
+ {{ toYaml .Values.prometheusOperator.networkPolicy.matchLabels | nindent 6 }}
+ {{- else }}
+ {{- include "kube-prometheus-stack.labels" $ | nindent 6 }}
+ {{- end }}
+ egress:
+ {{- if and .Values.prometheusOperator.networkPolicy.cilium .Values.prometheusOperator.networkPolicy.cilium.egress }}
+ {{ toYaml .Values.prometheusOperator.networkPolicy.cilium.egress | nindent 6 }}
+ {{- else }}
+ - toEntities:
+ - kube-apiserver
+ {{- end }}
+{{- end }}
+{{- end }}
+
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/clusterrole.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/clusterrole.yaml
old mode 100755
new mode 100644
index 03e161839b..cf2787b5a5
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/clusterrole.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/clusterrole.yaml
@@ -1,14 +1,14 @@
-{{- if and .Values.prometheusOperator.admissionWebhooks.enabled .Values.prometheusOperator.admissionWebhooks.patch.enabled .Values.global.rbac.create }}
+{{- if and .Values.prometheusOperator.enabled .Values.prometheusOperator.admissionWebhooks.enabled .Values.prometheusOperator.admissionWebhooks.patch.enabled .Values.global.rbac.create (not .Values.prometheusOperator.admissionWebhooks.certManager.enabled) }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-admission
+ name: {{ template "kube-prometheus-stack.fullname" . }}-admission
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 "prometheus-operator.name" $ }}-admission
-{{- include "prometheus-operator.labels" $ | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-admission
+{{- include "kube-prometheus-stack.labels" $ | indent 4 }}
rules:
- apiGroups:
- admissionregistration.k8s.io
@@ -18,7 +18,7 @@ rules:
verbs:
- get
- update
-{{- if .Values.global.rbac.pspEnabled }}
+{{- if and (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") .Values.global.rbac.pspEnabled }}
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
{{- if semverCompare "> 1.15.0-0" $kubeTargetVersion }}
- apiGroups: ['policy']
@@ -28,6 +28,6 @@ rules:
resources: ['podsecuritypolicies']
verbs: ['use']
resourceNames:
- - {{ template "prometheus-operator.fullname" . }}-admission
+ - {{ template "kube-prometheus-stack.fullname" . }}-admission
{{- end }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/clusterrolebinding.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/clusterrolebinding.yaml
old mode 100755
new mode 100644
index 63bb2cc18b..b909d14ebd
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/clusterrolebinding.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/clusterrolebinding.yaml
@@ -1,21 +1,20 @@
-{{- if and .Values.prometheusOperator.admissionWebhooks.enabled .Values.prometheusOperator.admissionWebhooks.patch.enabled .Values.global.rbac.create }}
+{{- if and .Values.prometheusOperator.enabled .Values.prometheusOperator.admissionWebhooks.enabled .Values.prometheusOperator.admissionWebhooks.patch.enabled .Values.global.rbac.create (not .Values.prometheusOperator.admissionWebhooks.certManager.enabled) }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-admission
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-admission
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 "prometheus-operator.name" $ }}-admission
-{{- include "prometheus-operator.labels" $ | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-admission
+{{- include "kube-prometheus-stack.labels" $ | indent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
- name: {{ template "prometheus-operator.fullname" . }}-admission
+ name: {{ template "kube-prometheus-stack.fullname" . }}-admission
subjects:
- kind: ServiceAccount
- name: {{ template "prometheus-operator.fullname" . }}-admission
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-admission
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/job-createSecret.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/job-createSecret.yaml
old mode 100755
new mode 100644
index cc79e0851e..1bb9b02ff3
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/job-createSecret.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/job-createSecret.yaml
@@ -1,15 +1,18 @@
-{{- if and .Values.prometheusOperator.admissionWebhooks.enabled .Values.prometheusOperator.admissionWebhooks.patch.enabled }}
+{{- if and .Values.prometheusOperator.enabled .Values.prometheusOperator.admissionWebhooks.enabled .Values.prometheusOperator.admissionWebhooks.patch.enabled (not .Values.prometheusOperator.admissionWebhooks.certManager.enabled) }}
apiVersion: batch/v1
kind: Job
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-admission-create
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-admission-create
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
annotations:
"helm.sh/hook": pre-install,pre-upgrade
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
+{{- with .Values.prometheusOperator.admissionWebhooks.annotations }}
+{{ toYaml . | indent 4 }}
+{{- end }}
labels:
- app: {{ template "prometheus-operator.name" $ }}-admission-create
-{{- include "prometheus-operator.labels" $ | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-admission-create
+{{- include "kube-prometheus-stack.labels" $ | indent 4 }}
spec:
{{- if .Capabilities.APIVersions.Has "batch/v1alpha1" }}
# Alpha feature since k8s 1.12
@@ -17,31 +20,40 @@ spec:
{{- end }}
template:
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-admission-create
+ name: {{ template "kube-prometheus-stack.fullname" . }}-admission-create
{{- with .Values.prometheusOperator.admissionWebhooks.patch.podAnnotations }}
annotations:
{{ toYaml . | indent 8 }}
{{- end }}
labels:
- app: {{ template "prometheus-operator.name" $ }}-admission-create
-{{- include "prometheus-operator.labels" $ | indent 8 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-admission-create
+{{- include "kube-prometheus-stack.labels" $ | indent 8 }}
spec:
{{- if .Values.prometheusOperator.admissionWebhooks.patch.priorityClassName }}
priorityClassName: {{ .Values.prometheusOperator.admissionWebhooks.patch.priorityClassName }}
{{- end }}
containers:
- name: create
- image: {{ .Values.prometheusOperator.admissionWebhooks.patch.image.repository }}:{{ .Values.prometheusOperator.admissionWebhooks.patch.image.tag }}
- imagePullPolicy: {{ .Values.prometheusOperator.admissionWebhooks.patch.pullPolicy }}
+ {{- $registry := .Values.global.imageRegistry | default .Values.prometheusOperator.admissionWebhooks.patch.image.registry -}}
+ {{- if .Values.prometheusOperator.admissionWebhooks.patch.image.sha }}
+ image: {{ $registry }}/{{ .Values.prometheusOperator.admissionWebhooks.patch.image.repository }}:{{ .Values.prometheusOperator.admissionWebhooks.patch.image.tag }}@sha256:{{ .Values.prometheusOperator.admissionWebhooks.patch.image.sha }}
+ {{- else }}
+ image: {{ $registry }}/{{ .Values.prometheusOperator.admissionWebhooks.patch.image.repository }}:{{ .Values.prometheusOperator.admissionWebhooks.patch.image.tag }}
+ {{- end }}
+ imagePullPolicy: {{ .Values.prometheusOperator.admissionWebhooks.patch.image.pullPolicy }}
args:
- create
- - --host={{ template "prometheus-operator.operator.fullname" . }},{{ template "prometheus-operator.operator.fullname" . }}.{{ $.Release.Namespace }}.svc
- - --namespace={{ $.Release.Namespace }}
- - --secret-name={{ template "prometheus-operator.fullname" . }}-admission
+ - --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
- serviceAccountName: {{ template "prometheus-operator.fullname" . }}-admission
+ serviceAccountName: {{ template "kube-prometheus-stack.fullname" . }}-admission
{{- with .Values.prometheusOperator.admissionWebhooks.patch.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
@@ -54,7 +66,8 @@ spec:
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
+{{- if .Values.prometheusOperator.admissionWebhooks.patch.securityContext }}
securityContext:
- runAsNonRoot: true
- runAsUser: 2000
+{{ toYaml .Values.prometheusOperator.admissionWebhooks.patch.securityContext | indent 8 }}
+{{- end }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/job-patchWebhook.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/job-patchWebhook.yaml
old mode 100755
new mode 100644
index 51505b67b9..350669afce
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/job-patchWebhook.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/job-patchWebhook.yaml
@@ -1,15 +1,18 @@
-{{- if and .Values.prometheusOperator.admissionWebhooks.enabled .Values.prometheusOperator.admissionWebhooks.patch.enabled }}
+{{- if and .Values.prometheusOperator.enabled .Values.prometheusOperator.admissionWebhooks.enabled .Values.prometheusOperator.admissionWebhooks.patch.enabled (not .Values.prometheusOperator.admissionWebhooks.certManager.enabled) }}
apiVersion: batch/v1
kind: Job
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-admission-patch
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-admission-patch
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
annotations:
"helm.sh/hook": post-install,post-upgrade
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
+{{- with .Values.prometheusOperator.admissionWebhooks.patch.annotations }}
+{{ toYaml . | indent 4 }}
+{{- end }}
labels:
- app: {{ template "prometheus-operator.name" $ }}-admission-patch
-{{- include "prometheus-operator.labels" $ | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-admission-patch
+{{- include "kube-prometheus-stack.labels" $ | indent 4 }}
spec:
{{- if .Capabilities.APIVersions.Has "batch/v1alpha1" }}
# Alpha feature since k8s 1.12
@@ -17,32 +20,41 @@ spec:
{{- end }}
template:
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-admission-patch
+ name: {{ template "kube-prometheus-stack.fullname" . }}-admission-patch
{{- with .Values.prometheusOperator.admissionWebhooks.patch.podAnnotations }}
annotations:
-{{ toYaml . | indent 8 }}
+{{ toYaml . | indent 8 }}
{{- end }}
labels:
- app: {{ template "prometheus-operator.name" $ }}-admission-patch
-{{- include "prometheus-operator.labels" $ | indent 8 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-admission-patch
+{{- include "kube-prometheus-stack.labels" $ | indent 8 }}
spec:
{{- if .Values.prometheusOperator.admissionWebhooks.patch.priorityClassName }}
priorityClassName: {{ .Values.prometheusOperator.admissionWebhooks.patch.priorityClassName }}
{{- end }}
containers:
- name: patch
- image: {{ .Values.prometheusOperator.admissionWebhooks.patch.image.repository }}:{{ .Values.prometheusOperator.admissionWebhooks.patch.image.tag }}
- imagePullPolicy: {{ .Values.prometheusOperator.admissionWebhooks.patch.pullPolicy }}
+ {{- $registry := .Values.global.imageRegistry | default .Values.prometheusOperator.admissionWebhooks.patch.image.registry -}}
+ {{- if .Values.prometheusOperator.admissionWebhooks.patch.image.sha }}
+ image: {{ $registry }}/{{ .Values.prometheusOperator.admissionWebhooks.patch.image.repository }}:{{ .Values.prometheusOperator.admissionWebhooks.patch.image.tag }}@sha256:{{ .Values.prometheusOperator.admissionWebhooks.patch.image.sha }}
+ {{- else }}
+ image: {{ $registry }}/{{ .Values.prometheusOperator.admissionWebhooks.patch.image.repository }}:{{ .Values.prometheusOperator.admissionWebhooks.patch.image.tag }}
+ {{- end }}
+ imagePullPolicy: {{ .Values.prometheusOperator.admissionWebhooks.patch.image.pullPolicy }}
args:
- patch
- - --webhook-name={{ template "prometheus-operator.fullname" . }}-admission
- - --namespace={{ $.Release.Namespace }}
- - --secret-name={{ template "prometheus-operator.fullname" . }}-admission
+ - --webhook-name={{ template "kube-prometheus-stack.fullname" . }}-admission
+ - --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
- serviceAccountName: {{ template "prometheus-operator.fullname" . }}-admission
+ serviceAccountName: {{ template "kube-prometheus-stack.fullname" . }}-admission
{{- with .Values.prometheusOperator.admissionWebhooks.patch.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
@@ -55,7 +67,8 @@ spec:
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
+{{- if .Values.prometheusOperator.admissionWebhooks.patch.securityContext }}
securityContext:
- runAsNonRoot: true
- runAsUser: 2000
+{{ toYaml .Values.prometheusOperator.admissionWebhooks.patch.securityContext | indent 8 }}
+{{- end }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/networkpolicy-createSecret.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/networkpolicy-createSecret.yaml
new file mode 100644
index 0000000000..18e021154a
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/networkpolicy-createSecret.yaml
@@ -0,0 +1,33 @@
+{{- if and .Values.prometheusOperator.networkPolicy.enabled (eq .Values.prometheusOperator.networkPolicy.flavor "kubernetes") }}
+{{- if and .Values.prometheusOperator.enabled .Values.prometheusOperator.admissionWebhooks.enabled .Values.prometheusOperator.admissionWebhooks.patch.enabled (not .Values.prometheusOperator.admissionWebhooks.certManager.enabled) }}
+apiVersion: networking.k8s.io/v1
+kind: NetworkPolicy
+metadata:
+ name: {{ template "kube-prometheus-stack.fullname" . }}-admission-create
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ annotations:
+ "helm.sh/hook": pre-install,pre-upgrade
+ "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
+ ## Ensure this is run before the job
+ "helm.sh/hook-weight": "-5"
+ {{- with .Values.prometheusOperator.admissionWebhooks.annotations }}
+ {{ toYaml . | nindent 4 }}
+ {{- end }}
+ labels:
+ app: {{ template "kube-prometheus-stack.name" $ }}-admission-create
+ {{- include "kube-prometheus-stack.labels" $ | nindent 4 }}
+spec:
+ podSelector:
+ matchLabels:
+ app: {{ template "kube-prometheus-stack.name" $ }}-admission-create
+ {{- if .Values.prometheusOperator.networkPolicy.matchLabels }}
+ {{ toYaml .Values.prometheusOperator.networkPolicy.matchLabels | nindent 6 }}
+ {{- else }}
+ {{- include "kube-prometheus-stack.labels" $ | nindent 6 }}
+ {{- end }}
+ egress:
+ - {}
+ policyTypes:
+ - Egress
+{{- end }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/networkpolicy-patchWebhook.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/networkpolicy-patchWebhook.yaml
new file mode 100644
index 0000000000..805c016579
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/networkpolicy-patchWebhook.yaml
@@ -0,0 +1,33 @@
+{{- if and .Values.prometheusOperator.networkPolicy.enabled (eq .Values.prometheusOperator.networkPolicy.flavor "kubernetes") }}
+{{- if and .Values.prometheusOperator.enabled .Values.prometheusOperator.admissionWebhooks.enabled .Values.prometheusOperator.admissionWebhooks.patch.enabled (not .Values.prometheusOperator.admissionWebhooks.certManager.enabled) }}
+apiVersion: networking.k8s.io/v1
+kind: NetworkPolicy
+metadata:
+ name: {{ template "kube-prometheus-stack.fullname" . }}-admission-patch
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ annotations:
+ "helm.sh/hook": post-install,post-upgrade
+ "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
+ ## Ensure this is run before the job
+ "helm.sh/hook-weight": "-5"
+ {{- with .Values.prometheusOperator.admissionWebhooks.patch.annotations }}
+ {{ toYaml . | nindent 4 }}
+ {{- end }}
+ labels:
+ app: {{ template "kube-prometheus-stack.name" $ }}-admission-patch
+ {{- include "kube-prometheus-stack.labels" $ | nindent 4 }}
+spec:
+ podSelector:
+ matchLabels:
+ app: {{ template "kube-prometheus-stack.name" $ }}-admission-patch
+ {{- if .Values.prometheusOperator.networkPolicy.matchLabels }}
+ {{ toYaml .Values.prometheusOperator.networkPolicy.matchLabels | nindent 6 }}
+ {{- else }}
+ {{- include "kube-prometheus-stack.labels" $ | nindent 6 }}
+ {{- end }}
+ egress:
+ - {}
+ policyTypes:
+ - Egress
+{{- end }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/psp.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/psp.yaml
old mode 100755
new mode 100644
index b27c92bf14..5a8c19a209
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/psp.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/psp.yaml
@@ -1,27 +1,19 @@
-{{- if and .Values.prometheusOperator.admissionWebhooks.enabled .Values.prometheusOperator.admissionWebhooks.patch.enabled .Values.global.rbac.create .Values.global.rbac.pspEnabled }}
+{{- if and (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") .Values.prometheusOperator.enabled .Values.prometheusOperator.admissionWebhooks.enabled .Values.prometheusOperator.admissionWebhooks.patch.enabled .Values.global.rbac.create .Values.global.rbac.pspEnabled (not .Values.prometheusOperator.admissionWebhooks.certManager.enabled) }}
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-admission
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-admission
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 "prometheus-operator.name" . }}-admission
{{- if .Values.global.rbac.pspAnnotations }}
- annotations:
{{ toYaml .Values.global.rbac.pspAnnotations | indent 4 }}
{{- end }}
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ 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'
@@ -42,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/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/role.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/role.yaml
old mode 100755
new mode 100644
index f5941fc7f0..a64e982a3d
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/role.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/role.yaml
@@ -1,15 +1,15 @@
-{{- if and .Values.prometheusOperator.admissionWebhooks.enabled .Values.prometheusOperator.admissionWebhooks.patch.enabled .Values.global.rbac.create }}
+{{- if and .Values.prometheusOperator.enabled .Values.prometheusOperator.admissionWebhooks.enabled .Values.prometheusOperator.admissionWebhooks.patch.enabled .Values.global.rbac.create (not .Values.prometheusOperator.admissionWebhooks.certManager.enabled) }}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-admission
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-admission
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
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 "prometheus-operator.name" $ }}-admission
-{{- include "prometheus-operator.labels" $ | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-admission
+{{- include "kube-prometheus-stack.labels" $ | indent 4 }}
rules:
- apiGroups:
- ""
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/rolebinding.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/rolebinding.yaml
old mode 100755
new mode 100644
index 416cd3898a..d713629834
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/rolebinding.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/rolebinding.yaml
@@ -1,21 +1,21 @@
-{{- if and .Values.prometheusOperator.admissionWebhooks.enabled .Values.prometheusOperator.admissionWebhooks.patch.enabled .Values.global.rbac.create }}
+{{- if and .Values.prometheusOperator.enabled .Values.prometheusOperator.admissionWebhooks.enabled .Values.prometheusOperator.admissionWebhooks.patch.enabled .Values.global.rbac.create (not .Values.prometheusOperator.admissionWebhooks.certManager.enabled) }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-admission
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-admission
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
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 "prometheus-operator.name" $ }}-admission
-{{- include "prometheus-operator.labels" $ | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-admission
+{{- include "kube-prometheus-stack.labels" $ | indent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
- name: {{ template "prometheus-operator.fullname" . }}-admission
+ name: {{ template "kube-prometheus-stack.fullname" . }}-admission
subjects:
- kind: ServiceAccount
- name: {{ template "prometheus-operator.fullname" . }}-admission
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-admission
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/serviceaccount.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/serviceaccount.yaml
old mode 100755
new mode 100644
index 440644f8ea..4fd52ae0a9
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/serviceaccount.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/serviceaccount.yaml
@@ -1,15 +1,17 @@
-{{- if and .Values.prometheusOperator.admissionWebhooks.enabled .Values.prometheusOperator.admissionWebhooks.patch.enabled .Values.global.rbac.create }}
+{{- if and .Values.prometheusOperator.enabled .Values.prometheusOperator.admissionWebhooks.enabled .Values.prometheusOperator.admissionWebhooks.patch.enabled .Values.global.rbac.create (not .Values.prometheusOperator.admissionWebhooks.certManager.enabled) }}
apiVersion: v1
kind: ServiceAccount
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-admission
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-admission
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
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 "prometheus-operator.name" $ }}-admission
-{{- include "prometheus-operator.labels" $ | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-admission
+{{- 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/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/mutatingWebhookConfiguration.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/mutatingWebhookConfiguration.yaml
old mode 100755
new mode 100644
index 97214ca3ea..d8552140bb
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/mutatingWebhookConfiguration.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/mutatingWebhookConfiguration.yaml
@@ -1,17 +1,26 @@
-{{- if and .Values.prometheusOperator.admissionWebhooks.enabled }}
-apiVersion: admissionregistration.k8s.io/v1beta1
+{{- if and .Values.prometheusOperator.enabled .Values.prometheusOperator.admissionWebhooks.enabled }}
+apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-admission
+ name: {{ template "kube-prometheus-stack.fullname" . }}-admission
+{{- if .Values.prometheusOperator.admissionWebhooks.certManager.enabled }}
+ annotations:
+ certmanager.k8s.io/inject-ca-from: {{ printf "%s/%s-admission" (include "kube-prometheus-stack.namespace" .) (include "kube-prometheus-stack.fullname" .) | quote }}
+ cert-manager.io/inject-ca-from: {{ printf "%s/%s-admission" (include "kube-prometheus-stack.namespace" .) (include "kube-prometheus-stack.fullname" .) | quote }}
+{{- end }}
labels:
- app: {{ template "prometheus-operator.name" $ }}-admission
-{{- include "prometheus-operator.labels" $ | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-admission
+{{- include "kube-prometheus-stack.labels" $ | indent 4 }}
webhooks:
- name: prometheusrulemutate.monitoring.coreos.com
- {{- if .Values.prometheusOperator.admissionWebhooks.patch.enabled }}
+ {{- if eq .Values.prometheusOperator.admissionWebhooks.failurePolicy "IgnoreOnInstallOnly" }}
+ failurePolicy: {{ .Release.IsInstall | ternary "Ignore" "Fail" }}
+ {{- else if .Values.prometheusOperator.admissionWebhooks.failurePolicy }}
+ failurePolicy: {{ .Values.prometheusOperator.admissionWebhooks.failurePolicy }}
+ {{- else if .Values.prometheusOperator.admissionWebhooks.patch.enabled }}
failurePolicy: Ignore
{{- else }}
- failurePolicy: {{ .Values.prometheusOperator.admissionWebhooks.failurePolicy }}
+ failurePolicy: Fail
{{- end }}
rules:
- apiGroups:
@@ -25,7 +34,36 @@ webhooks:
- UPDATE
clientConfig:
service:
- namespace: {{ $.Release.Namespace }}
- name: {{ template "prometheus-operator.operator.fullname" $ }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ name: {{ template "kube-prometheus-stack.operator.fullname" $ }}
path: /admission-prometheusrules/mutate
+ {{- 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
+ {{- if or .Values.prometheusOperator.denyNamespaces .Values.prometheusOperator.namespaces }}
+ namespaceSelector:
+ matchExpressions:
+ {{- if .Values.prometheusOperator.denyNamespaces }}
+ - key: kubernetes.io/metadata.name
+ operator: NotIn
+ values:
+ {{- range $namespace := mustUniq .Values.prometheusOperator.denyNamespaces }}
+ - {{ $namespace }}
+ {{- end }}
+ {{- else if and .Values.prometheusOperator.namespaces .Values.prometheusOperator.namespaces.additional }}
+ - key: kubernetes.io/metadata.name
+ operator: In
+ values:
+ {{- if and .Values.prometheusOperator.namespaces.releaseNamespace (default .Values.prometheusOperator.namespaces.releaseNamespace true) }}
+ {{- $namespace := printf "%s" (include "kube-prometheus-stack.namespace" .) }}
+ - {{ $namespace }}
+ {{- end }}
+ {{- range $namespace := mustUniq .Values.prometheusOperator.namespaces.additional }}
+ - {{ $namespace }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/validatingWebhookConfiguration.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/validatingWebhookConfiguration.yaml
old mode 100755
new mode 100644
index 6616f212d7..ab66272675
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/validatingWebhookConfiguration.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/validatingWebhookConfiguration.yaml
@@ -1,17 +1,26 @@
-{{- if and .Values.prometheusOperator.admissionWebhooks.enabled }}
-apiVersion: admissionregistration.k8s.io/v1beta1
+{{- if and .Values.prometheusOperator.enabled .Values.prometheusOperator.admissionWebhooks.enabled }}
+apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-admission
+ name: {{ template "kube-prometheus-stack.fullname" . }}-admission
+{{- if .Values.prometheusOperator.admissionWebhooks.certManager.enabled }}
+ annotations:
+ certmanager.k8s.io/inject-ca-from: {{ printf "%s/%s-admission" (include "kube-prometheus-stack.namespace" .) (include "kube-prometheus-stack.fullname" .) | quote }}
+ cert-manager.io/inject-ca-from: {{ printf "%s/%s-admission" (include "kube-prometheus-stack.namespace" .) (include "kube-prometheus-stack.fullname" .) | quote }}
+{{- end }}
labels:
- app: {{ template "prometheus-operator.name" $ }}-admission
-{{- include "prometheus-operator.labels" $ | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-admission
+{{- include "kube-prometheus-stack.labels" $ | indent 4 }}
webhooks:
- name: prometheusrulemutate.monitoring.coreos.com
- {{- if .Values.prometheusOperator.admissionWebhooks.patch.enabled }}
+ {{- if eq .Values.prometheusOperator.admissionWebhooks.failurePolicy "IgnoreOnInstallOnly" }}
+ failurePolicy: {{ .Release.IsInstall | ternary "Ignore" "Fail" }}
+ {{- else if .Values.prometheusOperator.admissionWebhooks.failurePolicy }}
+ failurePolicy: {{ .Values.prometheusOperator.admissionWebhooks.failurePolicy }}
+ {{- else if .Values.prometheusOperator.admissionWebhooks.patch.enabled }}
failurePolicy: Ignore
{{- else }}
- failurePolicy: {{ .Values.prometheusOperator.admissionWebhooks.failurePolicy }}
+ failurePolicy: Fail
{{- end }}
rules:
- apiGroups:
@@ -25,7 +34,36 @@ webhooks:
- UPDATE
clientConfig:
service:
- namespace: {{ $.Release.Namespace }}
- name: {{ template "prometheus-operator.operator.fullname" $ }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ name: {{ template "kube-prometheus-stack.operator.fullname" $ }}
path: /admission-prometheusrules/validate
+ {{- 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
+ {{- if or .Values.prometheusOperator.denyNamespaces .Values.prometheusOperator.namespaces }}
+ namespaceSelector:
+ matchExpressions:
+ {{- if .Values.prometheusOperator.denyNamespaces }}
+ - key: kubernetes.io/metadata.name
+ operator: NotIn
+ values:
+ {{- range $namespace := mustUniq .Values.prometheusOperator.denyNamespaces }}
+ - {{ $namespace }}
+ {{- end }}
+ {{- else if and .Values.prometheusOperator.namespaces .Values.prometheusOperator.namespaces.additional }}
+ - key: kubernetes.io/metadata.name
+ operator: In
+ values:
+ {{- if and .Values.prometheusOperator.namespaces.releaseNamespace (default .Values.prometheusOperator.namespaces.releaseNamespace true) }}
+ {{- $namespace := printf "%s" (include "kube-prometheus-stack.namespace" .) }}
+ - {{ $namespace }}
+ {{- end }}
+ {{- range $namespace := mustUniq .Values.prometheusOperator.namespaces.additional }}
+ - {{ $namespace }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/aggregate-clusterroles.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/aggregate-clusterroles.yaml
new file mode 100644
index 0000000000..ec999fb961
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/aggregate-clusterroles.yaml
@@ -0,0 +1,31 @@
+{{/* This file is based on https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/rbac-crd.md */}}
+{{- if and .Values.global.rbac.create .Values.global.rbac.createAggregateClusterRoles }}
+kind: ClusterRole
+apiVersion: rbac.authorization.k8s.io/v1
+metadata:
+ name: {{ template "kube-prometheus-stack.fullname" . }}-prometheus-crd-view
+ labels:
+ rbac.authorization.k8s.io/aggregate-to-admin: "true"
+ rbac.authorization.k8s.io/aggregate-to-edit: "true"
+ rbac.authorization.k8s.io/aggregate-to-view: "true"
+ app: {{ template "kube-prometheus-stack.name" . }}-operator
+ {{- include "kube-prometheus-stack.labels" . | nindent 4 }}
+rules:
+- apiGroups: ["monitoring.coreos.com"]
+ resources: ["alertmanagers", "alertmanagerconfigs", "podmonitors", "probes", "prometheuses", "prometheusagents", "prometheusrules", "scrapeconfigs", "servicemonitors"]
+ verbs: ["get", "list", "watch"]
+---
+kind: ClusterRole
+apiVersion: rbac.authorization.k8s.io/v1
+metadata:
+ name: {{ template "kube-prometheus-stack.fullname" . }}-prometheus-crd-edit
+ labels:
+ rbac.authorization.k8s.io/aggregate-to-edit: "true"
+ rbac.authorization.k8s.io/aggregate-to-admin: "true"
+ app: {{ template "kube-prometheus-stack.name" . }}-operator
+ {{- include "kube-prometheus-stack.labels" . | nindent 4 }}
+rules:
+- apiGroups: ["monitoring.coreos.com"]
+ resources: ["alertmanagers", "alertmanagerconfigs", "podmonitors", "probes", "prometheuses", "prometheusagents", "prometheusrules", "scrapeconfigs", "servicemonitors"]
+ verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/certmanager.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/certmanager.yaml
new file mode 100644
index 0000000000..a1e06aec46
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/certmanager.yaml
@@ -0,0 +1,57 @@
+{{- if .Values.prometheusOperator.admissionWebhooks.certManager.enabled -}}
+{{- if not .Values.prometheusOperator.admissionWebhooks.certManager.issuerRef -}}
+# Create a selfsigned Issuer, in order to create a root CA certificate for
+# signing webhook serving certificates
+apiVersion: cert-manager.io/v1
+kind: Issuer
+metadata:
+ name: {{ template "kube-prometheus-stack.fullname" . }}-self-signed-issuer
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
+spec:
+ selfSigned: {}
+---
+# Generate a CA Certificate used to sign certificates for the webhook
+apiVersion: cert-manager.io/v1
+kind: Certificate
+metadata:
+ name: {{ template "kube-prometheus-stack.fullname" . }}-root-cert
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
+spec:
+ secretName: {{ template "kube-prometheus-stack.fullname" . }}-root-cert
+ 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"
+ isCA: true
+---
+# Create an Issuer that uses the above generated CA certificate to issue certs
+apiVersion: cert-manager.io/v1
+kind: Issuer
+metadata:
+ name: {{ template "kube-prometheus-stack.fullname" . }}-root-issuer
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
+spec:
+ ca:
+ secretName: {{ template "kube-prometheus-stack.fullname" . }}-root-cert
+{{- end }}
+---
+# generate a server certificate for the apiservices to use
+apiVersion: cert-manager.io/v1
+kind: Certificate
+metadata:
+ name: {{ template "kube-prometheus-stack.fullname" . }}-admission
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
+spec:
+ secretName: {{ template "kube-prometheus-stack.fullname" . }}-admission
+ 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 }}
+ {{- else }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-root-issuer
+ {{- end }}
+ dnsNames:
+ - {{ template "kube-prometheus-stack.operator.fullname" . }}
+ - {{ template "kube-prometheus-stack.operator.fullname" . }}.{{ template "kube-prometheus-stack.namespace" . }}
+ - {{ template "kube-prometheus-stack.operator.fullname" . }}.{{ template "kube-prometheus-stack.namespace" . }}.svc
+{{- end -}}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/ciliumnetworkpolicy.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/ciliumnetworkpolicy.yaml
new file mode 100644
index 0000000000..b75dcfd944
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/ciliumnetworkpolicy.yaml
@@ -0,0 +1,41 @@
+{{- if and .Values.prometheusOperator.networkPolicy.enabled (eq .Values.prometheusOperator.networkPolicy.flavor "cilium") }}
+apiVersion: cilium.io/v2
+kind: CiliumNetworkPolicy
+metadata:
+ name: {{ template "kube-prometheus-stack.fullname" . }}-operator
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ labels:
+ app: {{ template "kube-prometheus-stack.name" . }}-operator
+ {{- include "kube-prometheus-stack.labels" . | nindent 4 }}
+spec:
+ endpointSelector:
+ matchLabels:
+ app: {{ template "kube-prometheus-stack.name" . }}-operator
+ {{- if .Values.prometheusOperator.networkPolicy.matchLabels }}
+ {{ toYaml .Values.prometheusOperator.networkPolicy.matchLabels | nindent 6 }}
+ {{- else }}
+ {{- include "kube-prometheus-stack.labels" $ | nindent 6 }}
+ {{- end }}
+ egress:
+ {{- if and .Values.prometheusOperator.networkPolicy.cilium .Values.prometheusOperator.networkPolicy.cilium.egress }}
+ {{ toYaml .Values.prometheusOperator.networkPolicy.cilium.egress | nindent 6 }}
+ {{- else }}
+ - toEntities:
+ - kube-apiserver
+ {{- end }}
+ ingress:
+ - toPorts:
+ - ports:
+ {{- if .Values.prometheusOperator.tls.enabled }}
+ - port: {{ .Values.prometheusOperator.tls.internalPort | quote }}
+ {{- else }}
+ - port: "8080"
+ {{- end }}
+ protocol: "TCP"
+ {{- if not .Values.prometheusOperator.tls.enabled }}
+ rules:
+ http:
+ - method: "GET"
+ path: "/metrics"
+ {{- end }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/cleanup-crds.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/cleanup-crds.yaml
deleted file mode 100755
index 6dacccc572..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/cleanup-crds.yaml
+++ /dev/null
@@ -1,45 +0,0 @@
-{{- if and .Values.prometheusOperator.enabled .Values.prometheusOperator.cleanupCustomResource }}
-apiVersion: batch/v1
-kind: Job
-metadata:
- name: {{ template "prometheus-operator.fullname" . }}-operator-cleanup
- namespace: {{ $.Release.Namespace }}
- annotations:
- "helm.sh/hook": pre-delete
- "helm.sh/hook-weight": "3"
- "helm.sh/hook-delete-policy": hook-succeeded
- labels:
- app: {{ template "prometheus-operator.name" . }}-operator
-{{ include "prometheus-operator.labels" . | indent 4 }}
-spec:
- template:
- metadata:
- name: {{ template "prometheus-operator.fullname" . }}-operator-cleanup
- labels:
- app: {{ template "prometheus-operator.name" . }}-operator
-{{ include "prometheus-operator.labels" . | indent 8 }}
- spec:
- {{- if .Values.global.rbac.create }}
- serviceAccountName: {{ template "prometheus-operator.operator.serviceAccountName" . }}
- {{- end }}
- containers:
- - name: kubectl
- image: "{{ .Values.prometheusOperator.hyperkubeImage.repository }}:{{ .Values.prometheusOperator.hyperkubeImage.tag }}"
- imagePullPolicy: "{{ .Values.prometheusOperator.hyperkubeImage.pullPolicy }}"
- command:
- - /bin/sh
- - -c
- - >
- kubectl delete alertmanager --all;
- kubectl delete prometheus --all;
- kubectl delete prometheusrule --all;
- kubectl delete servicemonitor --all;
- sleep 10;
- kubectl delete crd alertmanagers.monitoring.coreos.com;
- kubectl delete crd prometheuses.monitoring.coreos.com;
- kubectl delete crd prometheusrules.monitoring.coreos.com;
- kubectl delete crd servicemonitors.monitoring.coreos.com;
- kubectl delete crd podmonitors.monitoring.coreos.com;
- kubectl delete crd thanosrulers.monitoring.coreos.com;
- restartPolicy: OnFailure
-{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/clusterrole.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/clusterrole.yaml
old mode 100755
new mode 100644
index 64fac28c83..32272055bf
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/clusterrole.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/clusterrole.yaml
@@ -2,32 +2,32 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-operator
+ name: {{ template "kube-prometheus-stack.fullname" . }}-operator
labels:
- app: {{ template "prometheus-operator.name" . }}-operator
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}-operator
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
rules:
-{{- if or .Values.prometheusOperator.manageCrds .Values.prometheusOperator.cleanupCustomResource }}
-- apiGroups:
- - apiextensions.k8s.io
- resources:
- - customresourcedefinitions
- verbs:
- - '*'
-{{- end }}
- apiGroups:
- monitoring.coreos.com
resources:
- alertmanagers
+ - alertmanagers/finalizers
+ - alertmanagers/status
+ - alertmanagerconfigs
- prometheuses
- - thanosrulers
- prometheuses/finalizers
- - alertmanagers/finalizers
+ - prometheuses/status
+ - prometheusagents
+ - prometheusagents/finalizers
+ - prometheusagents/status
+ - thanosrulers
- thanosrulers/finalizers
+ - thanosrulers/status
+ - scrapeconfigs
- servicemonitors
- podmonitors
+ - probes
- prometheusrules
- - podmonitors
verbs:
- '*'
- apiGroups:
@@ -76,4 +76,22 @@ rules:
- get
- list
- watch
+- apiGroups:
+ - networking.k8s.io
+ resources:
+ - ingresses
+ verbs:
+ - get
+ - list
+ - watch
+{{- if .Capabilities.APIVersions.Has "discovery.k8s.io/v1/EndpointSlice" }}
+- apiGroups:
+ - discovery.k8s.io
+ resources:
+ - endpointslices
+ verbs:
+ - get
+ - list
+ - watch
+{{- end }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/clusterrolebinding.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/clusterrolebinding.yaml
old mode 100755
new mode 100644
index 22568f329e..c9ab0ab872
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/clusterrolebinding.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/clusterrolebinding.yaml
@@ -2,16 +2,16 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-operator
+ name: {{ template "kube-prometheus-stack.fullname" . }}-operator
labels:
- app: {{ template "prometheus-operator.name" . }}-operator
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}-operator
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
- name: {{ template "prometheus-operator.fullname" . }}-operator
+ name: {{ template "kube-prometheus-stack.fullname" . }}-operator
subjects:
- kind: ServiceAccount
- name: {{ template "prometheus-operator.operator.serviceAccountName" . }}
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.operator.serviceAccountName" . }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/crds.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/crds.yaml
deleted file mode 100755
index d6bca7ed58..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/crds.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-{{- if and .Values.prometheusOperator.enabled .Values.prometheusOperator.createCustomResource -}}
-{{- range $path, $bytes := .Files.Glob "crds/*.yaml" }}
-{{ $.Files.Get $path }}
----
-{{- end }}
-{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/deployment.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/deployment.yaml
old mode 100755
new mode 100644
index e5b28a7509..67d0024d14
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/deployment.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/deployment.yaml
@@ -1,23 +1,33 @@
+{{- $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
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-operator
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-operator
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}-operator
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}-operator
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
+{{- if .Values.prometheusOperator.labels }}
+{{ toYaml .Values.prometheusOperator.labels | indent 4 }}
+{{- end }}
+{{- if .Values.prometheusOperator.annotations }}
+ annotations:
+{{ toYaml .Values.prometheusOperator.annotations | indent 4 }}
+{{- end }}
spec:
replicas: 1
+ revisionHistoryLimit: {{ .Values.prometheusOperator.revisionHistoryLimit }}
selector:
matchLabels:
- app: {{ template "prometheus-operator.name" . }}-operator
+ app: {{ template "kube-prometheus-stack.name" . }}-operator
release: {{ $.Release.Name | quote }}
template:
metadata:
labels:
- app: {{ template "prometheus-operator.name" . }}-operator
-{{ include "prometheus-operator.labels" . | indent 8 }}
+ app: {{ template "kube-prometheus-stack.name" . }}-operator
+{{ include "kube-prometheus-stack.labels" . | indent 8 }}
{{- if .Values.prometheusOperator.podLabels }}
{{ toYaml .Values.prometheusOperator.podLabels | indent 8 }}
{{- end }}
@@ -28,82 +38,140 @@ spec:
spec:
{{- if .Values.prometheusOperator.priorityClassName }}
priorityClassName: {{ .Values.prometheusOperator.priorityClassName }}
+ {{- end }}
+ {{- if .Values.global.imagePullSecrets }}
+ imagePullSecrets:
+ {{- include "kube-prometheus-stack.imagePullSecrets" . | indent 8 }}
{{- end }}
containers:
- - name: {{ template "prometheus-operator.name" . }}
- image: "{{ .Values.prometheusOperator.image.repository }}:{{ .Values.prometheusOperator.image.tag }}"
+ - name: {{ template "kube-prometheus-stack.name" . }}
+ {{- $configReloaderRegistry := .Values.global.imageRegistry | default .Values.prometheusOperator.prometheusConfigReloader.image.registry -}}
+ {{- $operatorRegistry := .Values.global.imageRegistry | default .Values.prometheusOperator.image.registry -}}
+ {{- $thanosRegistry := .Values.global.imageRegistry | default .Values.prometheusOperator.thanosImage.registry -}}
+ {{- if .Values.prometheusOperator.image.sha }}
+ image: "{{ $operatorRegistry }}/{{ .Values.prometheusOperator.image.repository }}:{{ .Values.prometheusOperator.image.tag | default .Chart.AppVersion }}@sha256:{{ .Values.prometheusOperator.image.sha }}"
+ {{- else }}
+ image: "{{ $operatorRegistry }}/{{ .Values.prometheusOperator.image.repository }}:{{ .Values.prometheusOperator.image.tag | default .Chart.AppVersion }}"
+ {{- end }}
imagePullPolicy: "{{ .Values.prometheusOperator.image.pullPolicy }}"
args:
- - --manage-crds={{ $.Values.prometheusOperator.manageCrds }}
- {{- if .Values.prometheusOperator.kubeletService.enabled }}
- - --kubelet-service={{ .Values.prometheusOperator.kubeletService.namespace }}/{{ template "prometheus-operator.fullname" . }}-kubelet
- {{- end }}
- {{- if .Values.prometheusOperator.logFormat }}
+ {{- if .Values.prometheusOperator.kubeletService.enabled }}
+ - --kubelet-service={{ .Values.prometheusOperator.kubeletService.namespace }}/{{ default $defaultKubeletSvcName .Values.prometheusOperator.kubeletService.name }}
+ {{- end }}
+ {{- if .Values.prometheusOperator.logFormat }}
- --log-format={{ .Values.prometheusOperator.logFormat }}
- {{- end }}
- {{- if .Values.prometheusOperator.logLevel }}
+ {{- end }}
+ {{- if .Values.prometheusOperator.logLevel }}
- --log-level={{ .Values.prometheusOperator.logLevel }}
- {{- end }}
- {{- if .Values.prometheusOperator.denyNamespaces }}
- - --deny-namespaces={{ .Values.prometheusOperator.denyNamespaces | join "," }}
- {{- end }}
- {{- with $.Values.prometheusOperator.namespaces }}
- {{ $ns := .additional }}
- {{- if .releaseNamespace }}
- {{- $ns = append $ns $.Release.Namespace }}
- {{- end }}
- - --namespaces={{ $ns | join "," }}
- {{- end }}
- - --logtostderr=true
+ {{- end }}
+ {{- if .Values.prometheusOperator.denyNamespaces }}
+ - --deny-namespaces={{ tpl (.Values.prometheusOperator.denyNamespaces | join ",") $ }}
+ {{- end }}
+ {{- with $.Values.prometheusOperator.namespaces }}
+ {{- $namespaces := list }}
+ {{- if .releaseNamespace }}
+ {{- $namespaces = append $namespaces $namespace }}
+ {{- end }}
+ {{- if .additional }}
+ {{- range $ns := .additional }}
+ {{- $namespaces = append $namespaces (tpl $ns $) }}
+ {{- end }}
+ {{- end }}
+ - --namespaces={{ $namespaces | mustUniq | join "," }}
+ {{- end }}
- --localhost=127.0.0.1
- - --prometheus-config-reloader={{ .Values.prometheusOperator.prometheusConfigReloaderImage.repository }}:{{ .Values.prometheusOperator.prometheusConfigReloaderImage.tag }}
- - --config-reloader-image={{ .Values.prometheusOperator.configmapReloadImage.repository }}:{{ .Values.prometheusOperator.configmapReloadImage.tag }}
- - --config-reloader-cpu={{ .Values.prometheusOperator.configReloaderCpu }}
- - --config-reloader-memory={{ .Values.prometheusOperator.configReloaderMemory }}
+ {{- if .Values.prometheusOperator.prometheusDefaultBaseImage }}
+ - --prometheus-default-base-image={{ .Values.global.imageRegistry | default .Values.prometheusOperator.prometheusDefaultBaseImageRegistry }}/{{ .Values.prometheusOperator.prometheusDefaultBaseImage }}
+ {{- end }}
+ {{- if .Values.prometheusOperator.alertmanagerDefaultBaseImage }}
+ - --alertmanager-default-base-image={{ .Values.global.imageRegistry | default .Values.prometheusOperator.alertmanagerDefaultBaseImageRegistry }}/{{ .Values.prometheusOperator.alertmanagerDefaultBaseImage }}
+ {{- end }}
+ {{- if .Values.prometheusOperator.prometheusConfigReloader.image.sha }}
+ - --prometheus-config-reloader={{ $configReloaderRegistry }}/{{ .Values.prometheusOperator.prometheusConfigReloader.image.repository }}:{{ .Values.prometheusOperator.prometheusConfigReloader.image.tag | default .Chart.AppVersion }}@sha256:{{ .Values.prometheusOperator.prometheusConfigReloader.image.sha }}
+ {{- else }}
+ - --prometheus-config-reloader={{ $configReloaderRegistry }}/{{ .Values.prometheusOperator.prometheusConfigReloader.image.repository }}:{{ .Values.prometheusOperator.prometheusConfigReloader.image.tag | default .Chart.AppVersion }}
+ {{- end }}
+ - --config-reloader-cpu-request={{ (((.Values.prometheusOperator.prometheusConfigReloader.resources).requests).cpu) | default 0 }}
+ - --config-reloader-cpu-limit={{ (((.Values.prometheusOperator.prometheusConfigReloader.resources).limits).cpu) | default 0 }}
+ - --config-reloader-memory-request={{ (((.Values.prometheusOperator.prometheusConfigReloader.resources).requests).memory) | default 0 }}
+ - --config-reloader-memory-limit={{ (((.Values.prometheusOperator.prometheusConfigReloader.resources).limits).memory) | default 0 }}
+ {{- if .Values.prometheusOperator.prometheusConfigReloader.enableProbe }}
+ - --enable-config-reloader-probes=true
+ {{- end }}
+ {{- if .Values.prometheusOperator.alertmanagerInstanceNamespaces }}
+ - --alertmanager-instance-namespaces={{ .Values.prometheusOperator.alertmanagerInstanceNamespaces | join "," }}
+ {{- end }}
+ {{- if .Values.prometheusOperator.alertmanagerInstanceSelector }}
+ - --alertmanager-instance-selector={{ .Values.prometheusOperator.alertmanagerInstanceSelector }}
+ {{- 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 }}
+ {{- if .Values.prometheusOperator.prometheusInstanceSelector }}
+ - --prometheus-instance-selector={{ .Values.prometheusOperator.prometheusInstanceSelector }}
+ {{- end }}
+ {{- if .Values.prometheusOperator.thanosImage.sha }}
+ - --thanos-default-base-image={{ $thanosRegistry }}/{{ .Values.prometheusOperator.thanosImage.repository }}:{{ .Values.prometheusOperator.thanosImage.tag }}@sha256:{{ .Values.prometheusOperator.thanosImage.sha }}
+ {{- else }}
+ - --thanos-default-base-image={{ $thanosRegistry }}/{{ .Values.prometheusOperator.thanosImage.repository }}:{{ .Values.prometheusOperator.thanosImage.tag }}
+ {{- end }}
+ {{- if .Values.prometheusOperator.thanosRulerInstanceNamespaces }}
+ - --thanos-ruler-instance-namespaces={{ .Values.prometheusOperator.thanosRulerInstanceNamespaces | join "," }}
+ {{- end }}
+ {{- if .Values.prometheusOperator.thanosRulerInstanceSelector }}
+ - --thanos-ruler-instance-selector={{ .Values.prometheusOperator.thanosRulerInstanceSelector }}
+ {{- end }}
+ {{- if .Values.prometheusOperator.secretFieldSelector }}
+ - --secret-field-selector={{ tpl (.Values.prometheusOperator.secretFieldSelector) $ }}
+ {{- end }}
+ {{- if .Values.prometheusOperator.clusterDomain }}
+ - --cluster-domain={{ .Values.prometheusOperator.clusterDomain }}
+ {{- end }}
+ {{- if .Values.prometheusOperator.tls.enabled }}
+ - --web.enable-tls=true
+ - --web.cert-file=/cert/{{ if .Values.prometheusOperator.admissionWebhooks.certManager.enabled }}tls.crt{{ else }}cert{{ end }}
+ - --web.key-file=/cert/{{ if .Values.prometheusOperator.admissionWebhooks.certManager.enabled }}tls.key{{ else }}key{{ end }}
+ - --web.listen-address=:{{ .Values.prometheusOperator.tls.internalPort }}
+ - --web.tls-min-version={{ .Values.prometheusOperator.tls.tlsMinVersion }}
+ ports:
+ - containerPort: {{ .Values.prometheusOperator.tls.internalPort }}
+ name: https
+ {{- else }}
ports:
- containerPort: 8080
name: http
+ {{- end }}
resources:
{{ toYaml .Values.prometheusOperator.resources | indent 12 }}
securityContext:
- allowPrivilegeEscalation: false
- readOnlyRootFilesystem: true
- {{- if .Values.prometheusOperator.tlsProxy.enabled }}
- - name: tls-proxy
- image: {{ .Values.prometheusOperator.tlsProxy.image.repository }}:{{ .Values.prometheusOperator.tlsProxy.image.tag }}
- imagePullPolicy: {{ .Values.prometheusOperator.tlsProxy.image.pullPolicy }}
- args:
- - server
- - --listen=:8443
- - --target=127.0.0.1:8080
- - --key=cert/key
- - --cert=cert/cert
- - --disable-authentication
- resources:
-{{ toYaml .Values.prometheusOperator.tlsProxy.resources | indent 12 }}
+{{ toYaml .Values.prometheusOperator.containerSecurityContext | indent 12 }}
+{{- if .Values.prometheusOperator.tls.enabled }}
volumeMounts:
- - name: tls-proxy-secret
- mountPath: /cert
- readOnly: true
- ports:
- - containerPort: 8443
- name: https
- securityContext:
- allowPrivilegeEscalation: false
- readOnlyRootFilesystem: true
- {{- end }}
-{{- if .Values.prometheusOperator.tlsProxy.enabled }}
+ - name: tls-secret
+ mountPath: /cert
+ readOnly: true
volumes:
- - name: tls-proxy-secret
+ - name: tls-secret
secret:
defaultMode: 420
- secretName: {{ template "prometheus-operator.fullname" . }}-admission
+ secretName: {{ template "kube-prometheus-stack.fullname" . }}-admission
{{- end }}
+ {{- with .Values.prometheusOperator.dnsConfig }}
+ dnsConfig:
+{{ toYaml . | indent 8 }}
+ {{- end }}
{{- if .Values.prometheusOperator.securityContext }}
securityContext:
{{ toYaml .Values.prometheusOperator.securityContext | indent 8 }}
{{- end }}
- serviceAccountName: {{ template "prometheus-operator.operator.serviceAccountName" . }}
+ serviceAccountName: {{ template "kube-prometheus-stack.operator.serviceAccountName" . }}
+{{- if .Values.prometheusOperator.hostNetwork }}
+ hostNetwork: true
+ dnsPolicy: ClusterFirstWithHostNet
+{{- end }}
{{- with .Values.prometheusOperator.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/networkpolicy.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/networkpolicy.yaml
new file mode 100644
index 0000000000..2aa5f3c366
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/networkpolicy.yaml
@@ -0,0 +1,30 @@
+{{- if and .Values.prometheusOperator.networkPolicy.enabled (eq .Values.prometheusOperator.networkPolicy.flavor "kubernetes") }}
+apiVersion: {{ template "kube-prometheus-stack.prometheus.networkPolicy.apiVersion" . }}
+kind: NetworkPolicy
+metadata:
+ name: {{ template "kube-prometheus-stack.fullname" . }}-operator
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ labels:
+ app: {{ template "kube-prometheus-stack.name" . }}-operator
+ {{- include "kube-prometheus-stack.labels" . | nindent 4 }}
+spec:
+ egress:
+ - {}
+ ingress:
+ - ports:
+ {{- if .Values.prometheusOperator.tls.enabled }}
+ - port: {{ .Values.prometheusOperator.tls.internalPort }}
+ {{- else }}
+ - port: 8080
+ {{- end }}
+ policyTypes:
+ - Egress
+ - Ingress
+ podSelector:
+ matchLabels:
+ app: {{ template "kube-prometheus-stack.name" . }}-operator
+ release: {{ $.Release.Name | quote }}
+ {{- if .Values.prometheusOperator.networkPolicy.matchLabels }}
+ {{ toYaml .Values.prometheusOperator.networkPolicy.matchLabels | nindent 6 }}
+ {{- end }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/psp-clusterrole.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/psp-clusterrole.yaml
old mode 100755
new mode 100644
index a5c5ce7e6f..f701222de8
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/psp-clusterrole.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/psp-clusterrole.yaml
@@ -1,11 +1,12 @@
{{- if and .Values.prometheusOperator.enabled .Values.global.rbac.create .Values.global.rbac.pspEnabled }}
+{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-operator-psp
+ name: {{ template "kube-prometheus-stack.fullname" . }}-operator-psp
labels:
- app: {{ template "prometheus-operator.name" . }}-operator
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}-operator
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
rules:
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
{{- if semverCompare "> 1.15.0-0" $kubeTargetVersion }}
@@ -16,5 +17,6 @@ rules:
resources: ['podsecuritypolicies']
verbs: ['use']
resourceNames:
- - {{ template "prometheus-operator.fullname" . }}-operator
+ - {{ template "kube-prometheus-stack.fullname" . }}-operator
+{{- end }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/psp-clusterrolebinding.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/psp-clusterrolebinding.yaml
old mode 100755
new mode 100644
index e51250bd37..8a13fbb983
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/psp-clusterrolebinding.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/psp-clusterrolebinding.yaml
@@ -1,17 +1,19 @@
{{- if and .Values.prometheusOperator.enabled .Values.global.rbac.create .Values.global.rbac.pspEnabled }}
+{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-operator-psp
+ name: {{ template "kube-prometheus-stack.fullname" . }}-operator-psp
labels:
- app: {{ template "prometheus-operator.name" . }}-operator
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}-operator
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
- name: {{ template "prometheus-operator.fullname" . }}-operator-psp
+ name: {{ template "kube-prometheus-stack.fullname" . }}-operator-psp
subjects:
- kind: ServiceAccount
- name: {{ template "prometheus-operator.operator.serviceAccountName" . }}
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.operator.serviceAccountName" . }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
+{{- end }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/psp.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/psp.yaml
old mode 100755
new mode 100644
index 31d8849392..0b42e973ed
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/psp.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/psp.yaml
@@ -1,24 +1,18 @@
{{- if and .Values.prometheusOperator.enabled .Values.global.rbac.create .Values.global.rbac.pspEnabled }}
+{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-operator
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-operator
labels:
- app: {{ template "prometheus-operator.name" . }}-operator
+ app: {{ template "kube-prometheus-stack.name" . }}-operator
{{- if .Values.global.rbac.pspAnnotations }}
annotations:
{{ toYaml .Values.global.rbac.pspAnnotations | indent 4 }}
{{- end }}
-{{ include "prometheus-operator.labels" . | indent 4 }}
+{{ 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'
@@ -27,7 +21,7 @@ spec:
- 'secret'
- 'downwardAPI'
- 'persistentVolumeClaim'
- hostNetwork: false
+ hostNetwork: {{ .Values.prometheusOperator.hostNetwork }}
hostIPC: false
hostPID: false
runAsUser:
@@ -39,14 +33,15 @@ 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
{{- end }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/service.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/service.yaml
old mode 100755
new mode 100644
index 2a47686cda..b5ef5b93d5
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/service.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/service.yaml
@@ -2,11 +2,11 @@
apiVersion: v1
kind: Service
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-operator
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-operator
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}-operator
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}-operator
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
{{- if .Values.prometheusOperator.service.labels }}
{{ toYaml .Values.prometheusOperator.service.labels | indent 4 }}
{{- end }}
@@ -30,15 +30,20 @@ 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 }}
- name: http
{{- if eq .Values.prometheusOperator.service.type "NodePort" }}
nodePort: {{ .Values.prometheusOperator.service.nodePort }}
{{- end }}
port: 8080
targetPort: http
- {{- if .Values.prometheusOperator.tlsProxy.enabled }}
+ {{- end }}
+ {{- if .Values.prometheusOperator.tls.enabled }}
- name: https
{{- if eq .Values.prometheusOperator.service.type "NodePort"}}
nodePort: {{ .Values.prometheusOperator.service.nodePortTls }}
@@ -47,7 +52,7 @@ spec:
targetPort: https
{{- end }}
selector:
- app: {{ template "prometheus-operator.name" . }}-operator
+ app: {{ template "kube-prometheus-stack.name" . }}-operator
release: {{ $.Release.Name | quote }}
type: "{{ .Values.prometheusOperator.service.type }}"
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/serviceaccount.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/serviceaccount.yaml
old mode 100755
new mode 100644
index d2055c7a44..781975f32e
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/serviceaccount.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/serviceaccount.yaml
@@ -2,11 +2,15 @@
apiVersion: v1
kind: ServiceAccount
metadata:
- name: {{ template "prometheus-operator.operator.serviceAccountName" . }}
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.operator.serviceAccountName" . }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}-operator
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}-operator
+ app.kubernetes.io/name: {{ template "kube-prometheus-stack.name" . }}-prometheus-operator
+ app.kubernetes.io/component: prometheus-operator
+{{ 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/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/servicemonitor.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/servicemonitor.yaml
old mode 100755
new mode 100644
index ec8d0d7e9a..16e6e09022
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/servicemonitor.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/servicemonitor.yaml
@@ -2,14 +2,30 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-operator
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-operator
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}-operator
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}-operator
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
+{{- with .Values.prometheusOperator.serviceMonitor.additionalLabels }}
+{{ toYaml . | indent 4 }}
+{{- end }}
spec:
+ {{- include "servicemonitor.scrapeLimits" .Values.prometheusOperator.serviceMonitor | nindent 2 }}
endpoints:
+ {{- if .Values.prometheusOperator.tls.enabled }}
+ - port: https
+ scheme: https
+ tlsConfig:
+ serverName: {{ template "kube-prometheus-stack.operator.fullname" . }}
+ ca:
+ secret:
+ name: {{ template "kube-prometheus-stack.fullname" . }}-admission
+ key: {{ if .Values.prometheusOperator.admissionWebhooks.certManager.enabled }}ca.crt{{ else }}ca{{ end }}
+ optional: false
+ {{- else }}
- port: http
+ {{- end }}
honorLabels: true
{{- if .Values.prometheusOperator.serviceMonitor.interval }}
interval: {{ .Values.prometheusOperator.serviceMonitor.interval }}
@@ -24,9 +40,9 @@ spec:
{{- end }}
selector:
matchLabels:
- app: {{ template "prometheus-operator.name" . }}-operator
+ app: {{ template "kube-prometheus-stack.name" . }}-operator
release: {{ $.Release.Name | quote }}
namespaceSelector:
matchNames:
- - {{ $.Release.Namespace | quote }}
+ - {{ printf "%s" (include "kube-prometheus-stack.namespace" .) | quote }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/verticalpodautoscaler.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/verticalpodautoscaler.yaml
new file mode 100644
index 0000000000..ec96b34310
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/verticalpodautoscaler.yaml
@@ -0,0 +1,41 @@
+{{- if and (.Capabilities.APIVersions.Has "autoscaling.k8s.io/v1") (.Values.prometheusOperator.verticalPodAutoscaler.enabled) }}
+apiVersion: autoscaling.k8s.io/v1
+kind: VerticalPodAutoscaler
+metadata:
+ name: {{ template "kube-prometheus-stack.fullname" . }}-operator
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ labels:
+ app: {{ template "kube-prometheus-stack.name" . }}-operator
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
+spec:
+ {{- with .Values.prometheusOperator.verticalPodAutoscaler.recommenders }}
+ recommenders:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+ resourcePolicy:
+ containerPolicies:
+ - containerName: {{ template "kube-prometheus-stack.name" . }}
+ {{- with .Values.prometheusOperator.verticalPodAutoscaler.controlledResources }}
+ controlledResources:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- if .Values.prometheusOperator.verticalPodAutoscaler.controlledValues }}
+ controlledValues: {{ .Values.prometheusOperator.verticalPodAutoscaler.controlledValues }}
+ {{- end }}
+ {{- if .Values.prometheusOperator.verticalPodAutoscaler.maxAllowed }}
+ maxAllowed:
+ {{- toYaml .Values.prometheusOperator.verticalPodAutoscaler.maxAllowed | nindent 8 }}
+ {{- end }}
+ {{- if .Values.prometheusOperator.verticalPodAutoscaler.minAllowed }}
+ minAllowed:
+ {{- toYaml .Values.prometheusOperator.verticalPodAutoscaler.minAllowed | nindent 8 }}
+ {{- end }}
+ targetRef:
+ apiVersion: apps/v1
+ kind: Deployment
+ name: {{ template "kube-prometheus-stack.fullname" . }}-operator
+ {{- with .Values.prometheusOperator.verticalPodAutoscaler.updatePolicy }}
+ updatePolicy:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/_rules.tpl b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/_rules.tpl
new file mode 100644
index 0000000000..e8baf98e47
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/_rules.tpl
@@ -0,0 +1,36 @@
+{{- /*
+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
+*/ -}}
+{{- define "rules.names" }}
+rules:
+ - "alertmanager.rules"
+ - "config-reloaders"
+ - "etcd"
+ - "general.rules"
+ - "k8s.rules"
+ - "kube-apiserver-availability.rules"
+ - "kube-apiserver-burnrate.rules"
+ - "kube-apiserver-histogram.rules"
+ - "kube-apiserver-slos"
+ - "kube-prometheus-general.rules"
+ - "kube-prometheus-node-recording.rules"
+ - "kube-scheduler.rules"
+ - "kube-state-metrics"
+ - "kubelet.rules"
+ - "kubernetes-apps"
+ - "kubernetes-resources"
+ - "kubernetes-storage"
+ - "kubernetes-system"
+ - "kubernetes-system-kube-proxy"
+ - "kubernetes-system-apiserver"
+ - "kubernetes-system-kubelet"
+ - "kubernetes-system-controller-manager"
+ - "kubernetes-system-scheduler"
+ - "node-exporter.rules"
+ - "node-exporter"
+ - "node.rules"
+ - "node-network"
+ - "prometheus-operator"
+ - "prometheus"
+{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/additionalAlertRelabelConfigs.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/additionalAlertRelabelConfigs.yaml
old mode 100755
new mode 100644
index 5e19878a0d..bff930981a
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/additionalAlertRelabelConfigs.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/additionalAlertRelabelConfigs.yaml
@@ -2,15 +2,15 @@
apiVersion: v1
kind: Secret
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-prometheus-am-relabel-confg
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-prometheus-am-relabel-confg
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
{{- if .Values.prometheus.prometheusSpec.additionalPrometheusSecretsAnnotations }}
annotations:
{{ toYaml .Values.prometheus.prometheusSpec.additionalPrometheusSecretsAnnotations | indent 4 }}
{{- end }}
labels:
- app: {{ template "prometheus-operator.name" . }}-prometheus-am-relabel-confg
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}-prometheus-am-relabel-confg
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
data:
additional-alert-relabel-configs.yaml: {{ toYaml .Values.prometheus.prometheusSpec.additionalAlertRelabelConfigs | b64enc | quote }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/additionalAlertmanagerConfigs.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/additionalAlertmanagerConfigs.yaml
old mode 100755
new mode 100644
index b495f8ad19..2fe8fdb816
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/additionalAlertmanagerConfigs.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/additionalAlertmanagerConfigs.yaml
@@ -2,15 +2,15 @@
apiVersion: v1
kind: Secret
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-prometheus-am-confg
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-prometheus-am-confg
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
{{- if .Values.prometheus.prometheusSpec.additionalPrometheusSecretsAnnotations }}
annotations:
{{ toYaml .Values.prometheus.prometheusSpec.additionalPrometheusSecretsAnnotations | indent 4 }}
{{- end }}
labels:
- app: {{ template "prometheus-operator.name" . }}-prometheus-am-confg
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ 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/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/additionalPrometheusRules.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/additionalPrometheusRules.yaml
old mode 100755
new mode 100644
index 957b23a104..cb4aabaa7b
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/additionalPrometheusRules.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/additionalPrometheusRules.yaml
@@ -1,17 +1,20 @@
{{- if or .Values.additionalPrometheusRules .Values.additionalPrometheusRulesMap}}
apiVersion: v1
kind: List
+metadata:
+ name: {{ include "kube-prometheus-stack.fullname" $ }}-additional-prometheus-rules
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
items:
{{- if .Values.additionalPrometheusRulesMap }}
{{- range $prometheusRuleName, $prometheusRule := .Values.additionalPrometheusRulesMap }}
- apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
- name: {{ template "prometheus-operator.name" $ }}-{{ $prometheusRuleName }}
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.name" $ }}-{{ $prometheusRuleName }}
+ namespace: {{ template "kube-prometheus-stack.namespace" $ }}
labels:
- app: {{ template "prometheus-operator.name" $ }}
-{{ include "prometheus-operator.labels" $ | indent 8 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}
+{{ include "kube-prometheus-stack.labels" $ | indent 8 }}
{{- if $prometheusRule.additionalLabels }}
{{ toYaml $prometheusRule.additionalLabels | indent 8 }}
{{- end }}
@@ -24,11 +27,11 @@ items:
- apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
- name: {{ template "prometheus-operator.name" $ }}-{{ .name }}
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.name" $ }}-{{ .name }}
+ namespace: {{ template "kube-prometheus-stack.namespace" $ }}
labels:
- app: {{ template "prometheus-operator.name" $ }}
-{{ include "prometheus-operator.labels" $ | indent 8 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}
+{{ include "kube-prometheus-stack.labels" $ | indent 8 }}
{{- if .additionalLabels }}
{{ toYaml .additionalLabels | indent 8 }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/additionalScrapeConfigs.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/additionalScrapeConfigs.yaml
old mode 100755
new mode 100644
index 66efb095fa..ebdf766fde
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/additionalScrapeConfigs.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/additionalScrapeConfigs.yaml
@@ -2,15 +2,19 @@
apiVersion: v1
kind: Secret
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-prometheus-scrape-confg
- namespace: {{ .Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-prometheus-scrape-confg
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
{{- if .Values.prometheus.prometheusSpec.additionalPrometheusSecretsAnnotations }}
annotations:
{{ toYaml .Values.prometheus.prometheusSpec.additionalPrometheusSecretsAnnotations | indent 4 }}
{{- end }}
labels:
- app: {{ template "prometheus-operator.name" . }}-prometheus-scrape-confg
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}-prometheus-scrape-confg
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
data:
- additional-scrape-configs.yaml: {{ toYaml .Values.prometheus.prometheusSpec.additionalScrapeConfigs | b64enc | quote }}
+{{- 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/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/ciliumnetworkpolicy.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/ciliumnetworkpolicy.yaml
new file mode 100644
index 0000000000..74d61d7c13
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/ciliumnetworkpolicy.yaml
@@ -0,0 +1,27 @@
+{{- if and .Values.prometheus.networkPolicy.enabled (eq .Values.prometheus.networkPolicy.flavor "cilium") }}
+apiVersion: cilium.io/v2
+kind: CiliumNetworkPolicy
+metadata:
+ name: {{ template "kube-prometheus-stack.fullname" . }}-prometheus
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ labels:
+ app: {{ template "kube-prometheus-stack.name" . }}-prometheus
+ {{- include "kube-prometheus-stack.labels" . | nindent 4 }}
+spec:
+ endpointSelector:
+ {{- if .Values.prometheus.networkPolicy.cilium.endpointSelector }}
+ {{- toYaml .Values.prometheus.networkPolicy.cilium.endpointSelector | nindent 4 }}
+ {{- else }}
+ matchExpressions:
+ - {key: app.kubernetes.io/name, operator: In, values: [prometheus]}
+ - {key: prometheus, operator: In, values: [{{ template "kube-prometheus-stack.prometheus.crname" . }}]}
+ {{- end }}
+ {{- if and .Values.prometheus.networkPolicy.cilium .Values.prometheus.networkPolicy.cilium.egress }}
+ egress:
+ {{ toYaml .Values.prometheus.networkPolicy.cilium.egress | nindent 4 }}
+ {{- end }}
+ {{- if and .Values.prometheus.networkPolicy.cilium .Values.prometheus.networkPolicy.cilium.ingress }}
+ ingress:
+ {{ toYaml .Values.prometheus.networkPolicy.cilium.ingress | nindent 4 }}
+ {{- end }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/clusterrole.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/clusterrole.yaml
old mode 100755
new mode 100644
index 4dc3dc183a..3585b5db11
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/clusterrole.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/clusterrole.yaml
@@ -2,35 +2,29 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-prometheus
+ name: {{ template "kube-prometheus-stack.fullname" . }}-prometheus
labels:
- app: {{ template "prometheus-operator.name" . }}-prometheus
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}-prometheus
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
rules:
-- apiGroups:
- - ""
- resources:
- - nodes/metrics
- verbs:
- - get
- - list
- - watch
-# This permission are not in the prometheus-operator repo
+# 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/proxy
+ - nodes/metrics
- services
- endpoints
- pods
verbs: ["get", "list", "watch"]
- apiGroups:
- - extensions
- "networking.k8s.io"
resources:
- ingresses
verbs: ["get", "list", "watch"]
-- nonResourceURLs: ["/metrics"]
+- nonResourceURLs: ["/metrics", "/metrics/cadvisor"]
verbs: ["get"]
+{{- if .Values.prometheus.additionalRulesForClusterRole }}
+{{ toYaml .Values.prometheus.additionalRulesForClusterRole | indent 0 }}
+{{- end }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/clusterrolebinding.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/clusterrolebinding.yaml
old mode 100755
new mode 100644
index cbae4e257b..9fc4f65da4
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/clusterrolebinding.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/clusterrolebinding.yaml
@@ -2,17 +2,17 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-prometheus
+ name: {{ template "kube-prometheus-stack.fullname" . }}-prometheus
labels:
- app: {{ template "prometheus-operator.name" . }}-prometheus
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}-prometheus
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
- name: {{ template "prometheus-operator.fullname" . }}-prometheus
+ name: {{ template "kube-prometheus-stack.fullname" . }}-prometheus
subjects:
- kind: ServiceAccount
- name: {{ template "prometheus-operator.prometheus.serviceAccountName" . }}
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.prometheus.serviceAccountName" . }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/csi-secret.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/csi-secret.yaml
new file mode 100644
index 0000000000..e05382f633
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/csi-secret.yaml
@@ -0,0 +1,12 @@
+{{- if and .Values.prometheus.prometheusSpec.thanos .Values.prometheus.prometheusSpec.thanos.secretProviderClass }}
+---
+apiVersion: secrets-store.csi.x-k8s.io/v1alpha1
+kind: SecretProviderClass
+metadata:
+ name: {{ template "kube-prometheus-stack.fullname" . }}-prometheus
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ labels:
+ app: {{ template "kube-prometheus-stack.name" . }}-prometheus
+spec:
+{{ toYaml .Values.prometheus.prometheusSpec.thanos.secretProviderClass | indent 2 }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/extrasecret.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/extrasecret.yaml
new file mode 100644
index 0000000000..17f3478a46
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/extrasecret.yaml
@@ -0,0 +1,20 @@
+{{- if .Values.prometheus.extraSecret.data -}}
+{{- $secretName := printf "prometheus-%s-extra" (include "kube-prometheus-stack.fullname" . ) -}}
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ default $secretName .Values.prometheus.extraSecret.name }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
+{{- if .Values.prometheus.extraSecret.annotations }}
+ annotations:
+{{ toYaml .Values.prometheus.extraSecret.annotations | indent 4 }}
+{{- end }}
+ labels:
+ app: {{ template "kube-prometheus-stack.name" . }}-prometheus
+ app.kubernetes.io/component: prometheus
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
+data:
+{{- range $key, $val := .Values.prometheus.extraSecret.data }}
+ {{ $key }}: {{ $val | b64enc | quote }}
+{{- end }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/ingress.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/ingress.yaml
old mode 100755
new mode 100644
index b17ec4fb60..91fadf905f
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/ingress.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/ingress.yaml
@@ -1,13 +1,12 @@
-{{- if and .Values.prometheus.enabled .Values.prometheus.ingress.enabled }}
-{{- $serviceName := printf "%s-%s" (include "prometheus-operator.fullname" .) "prometheus" }}
-{{- $servicePort := .Values.prometheus.service.port -}}
-{{- $routePrefix := list .Values.prometheus.prometheusSpec.routePrefix }}
-{{- $paths := .Values.prometheus.ingress.paths | default $routePrefix -}}
-{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }}
-apiVersion: networking.k8s.io/v1beta1
-{{ else }}
-apiVersion: extensions/v1beta1
-{{ end -}}
+{{- 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.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" -}}
+ {{- $ingressSupportsPathType := eq (include "kube-prometheus-stack.ingress.supportsPathType" .) "true" -}}
+apiVersion: {{ include "kube-prometheus-stack.ingress.apiVersion" . }}
kind: Ingress
metadata:
{{- if .Values.prometheus.ingress.annotations }}
@@ -15,14 +14,19 @@ metadata:
{{ toYaml .Values.prometheus.ingress.annotations | indent 4 }}
{{- end }}
name: {{ $serviceName }}
- namespace: {{ $.Release.Namespace }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}-prometheus
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}-prometheus
+{{ include "kube-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 }}
@@ -31,23 +35,43 @@ spec:
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 -}}
{{- 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:
-{{ toYaml .Values.prometheus.ingress.tls | indent 4 }}
+{{ tpl (toYaml .Values.prometheus.ingress.tls | indent 4) . }}
{{- end -}}
{{- end -}}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/ingressThanosSidecar.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/ingressThanosSidecar.yaml
new file mode 100644
index 0000000000..a3da99faa8
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/ingressThanosSidecar.yaml
@@ -0,0 +1,77 @@
+{{- if and .Values.prometheus.enabled .Values.prometheus.thanosIngress.enabled }}
+{{- $pathType := .Values.prometheus.thanosIngress.pathType | default "" }}
+{{- $serviceName := printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "thanos-discovery" }}
+{{- $thanosPort := .Values.prometheus.thanosIngress.servicePort -}}
+{{- $routePrefix := list .Values.prometheus.prometheusSpec.routePrefix }}
+{{- $paths := .Values.prometheus.thanosIngress.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:
+{{- if .Values.prometheus.thanosIngress.annotations }}
+ annotations:
+{{ toYaml .Values.prometheus.thanosIngress.annotations | indent 4 }}
+{{- end }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-thanos-gateway
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ labels:
+ app: {{ template "kube-prometheus-stack.name" . }}-prometheus
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
+{{- if .Values.prometheus.thanosIngress.labels }}
+{{ toYaml .Values.prometheus.thanosIngress.labels | indent 4 }}
+{{- end }}
+spec:
+ {{- if $apiIsStable }}
+ {{- if .Values.prometheus.thanosIngress.ingressClassName }}
+ ingressClassName: {{ .Values.prometheus.thanosIngress.ingressClassName }}
+ {{- end }}
+ {{- end }}
+ rules:
+ {{- if .Values.prometheus.thanosIngress.hosts }}
+ {{- range $host := .Values.prometheus.thanosIngress.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: {{ $thanosPort }}
+ {{- else }}
+ serviceName: {{ $serviceName }}
+ servicePort: {{ $thanosPort }}
+ {{- 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: {{ $thanosPort }}
+ {{- else }}
+ serviceName: {{ $serviceName }}
+ servicePort: {{ $thanosPort }}
+ {{- end }}
+ {{- end -}}
+ {{- end -}}
+ {{- if .Values.prometheus.thanosIngress.tls }}
+ tls:
+{{ tpl (toYaml .Values.prometheus.thanosIngress.tls | indent 4) . }}
+ {{- end -}}
+{{- end -}}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/ingressperreplica.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/ingressperreplica.yaml
old mode 100755
new mode 100644
index bbfab9610b..df631993ba
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/ingressperreplica.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/ingressperreplica.yaml
@@ -1,43 +1,57 @@
{{- if and .Values.prometheus.enabled .Values.prometheus.servicePerReplica.enabled .Values.prometheus.ingressPerReplica.enabled }}
+{{- $pathType := .Values.prometheus.ingressPerReplica.pathType | default "" }}
{{- $count := .Values.prometheus.prometheusSpec.replicas | int -}}
{{- $servicePort := .Values.prometheus.servicePerReplica.port -}}
{{- $ingressValues := .Values.prometheus.ingressPerReplica -}}
+{{- $apiIsStable := eq (include "kube-prometheus-stack.ingress.isStable" .) "true" -}}
+{{- $ingressSupportsPathType := eq (include "kube-prometheus-stack.ingress.supportsPathType" .) "true" -}}
apiVersion: v1
kind: List
metadata:
- name: {{ include "prometheus-operator.fullname" $ }}-prometheus-ingressperreplica
- namespace: {{ $.Release.Namespace }}
+ name: {{ include "kube-prometheus-stack.fullname" $ }}-prometheus-ingressperreplica
+ namespace: {{ template "kube-prometheus-stack.namespace" $ }}
items:
{{ range $i, $e := until $count }}
- kind: Ingress
- {{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }}
- apiVersion: networking.k8s.io/v1beta1
- {{ else }}
- apiVersion: extensions/v1beta1
- {{ end -}}
+ apiVersion: {{ include "kube-prometheus-stack.ingress.apiVersion" $ }}
metadata:
- name: {{ include "prometheus-operator.fullname" $ }}-prometheus-{{ $i }}
- namespace: {{ $.Release.Namespace }}
+ name: {{ include "kube-prometheus-stack.fullname" $ }}-prometheus-{{ $i }}
+ namespace: {{ template "kube-prometheus-stack.namespace" $ }}
labels:
- app: {{ include "prometheus-operator.name" $ }}-prometheus
-{{ include "prometheus-operator.labels" $ | indent 8 }}
+ app: {{ include "kube-prometheus-stack.name" $ }}-prometheus
+ {{ include "kube-prometheus-stack.labels" $ | indent 8 }}
{{- if $ingressValues.labels }}
- {{ toYaml $ingressValues.labels | indent 8 }}
+{{ toYaml $ingressValues.labels | indent 8 }}
{{- end }}
{{- if $ingressValues.annotations }}
annotations:
{{ toYaml $ingressValues.annotations | indent 8 }}
{{- end }}
spec:
+ {{- if $apiIsStable }}
+ {{- if $ingressValues.ingressClassName }}
+ ingressClassName: {{ $ingressValues.ingressClassName }}
+ {{- end }}
+ {{- end }}
rules:
- host: {{ $ingressValues.hostPrefix }}-{{ $i }}.{{ $ingressValues.hostDomain }}
http:
paths:
{{- range $p := $ingressValues.paths }}
- path: {{ tpl $p $ }}
+ {{- if and $pathType $ingressSupportsPathType }}
+ pathType: {{ $pathType }}
+ {{- end }}
backend:
- serviceName: {{ include "prometheus-operator.fullname" $ }}-prometheus-{{ $i }}
+ {{- if $apiIsStable }}
+ service:
+ name: {{ include "kube-prometheus-stack.fullname" $ }}-prometheus-{{ $i }}
+ port:
+ number: {{ $servicePort }}
+ {{- else }}
+ serviceName: {{ include "kube-prometheus-stack.fullname" $ }}-prometheus-{{ $i }}
servicePort: {{ $servicePort }}
+ {{- end }}
{{- end -}}
{{- if or $ingressValues.tlsSecretName $ingressValues.tlsSecretPerReplica.enabled }}
tls:
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/networkpolicy.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/networkpolicy.yaml
new file mode 100644
index 0000000000..1296a79063
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/networkpolicy.yaml
@@ -0,0 +1,34 @@
+{{- if and .Values.prometheus.networkPolicy.enabled (eq .Values.prometheus.networkPolicy.flavor "kubernetes") }}
+apiVersion: {{ template "kube-prometheus-stack.prometheus.networkPolicy.apiVersion" . }}
+kind: NetworkPolicy
+metadata:
+ labels:
+ app: {{ template "kube-prometheus-stack.name" . }}-prometheus
+ {{- include "kube-prometheus-stack.labels" . | nindent 4 }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-prometheus
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
+spec:
+ {{- if .Values.prometheus.networkPolicy.egress }}
+ egress:
+ {{- toYaml .Values.prometheus.networkPolicy.egress | nindent 4 }}
+ {{- end }}
+ {{- if .Values.prometheus.networkPolicy.ingress }}
+ ingress:
+ {{- toYaml .Values.prometheus.networkPolicy.ingress | nindent 4 }}
+ {{- end }}
+ policyTypes:
+ - Egress
+ - Ingress
+ podSelector:
+ {{- if .Values.prometheus.networkPolicy.podSelector }}
+ {{- toYaml .Values.prometheus.networkPolicy.podSelector | nindent 4 }}
+ {{- else }}
+ matchLabels:
+ {{- if .Values.prometheus.agentMode }}
+ app.kubernetes.io/name: prometheus-agent
+ {{- else }}
+ app.kubernetes.io/name: prometheus
+ {{- end }}
+ operator.prometheus.io/name: {{ template "kube-prometheus-stack.prometheus.crname" . }}
+ {{- end }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/podDisruptionBudget.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/podDisruptionBudget.yaml
old mode 100755
new mode 100644
index c0bb5995ff..48f3f1f5a6
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/podDisruptionBudget.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/podDisruptionBudget.yaml
@@ -1,12 +1,12 @@
{{- if and .Values.prometheus.enabled .Values.prometheus.podDisruptionBudget.enabled }}
-apiVersion: policy/v1beta1
+apiVersion: {{ include "kube-prometheus-stack.pdb.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-prometheus
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-prometheus
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}-prometheus
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}-prometheus
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
spec:
{{- if .Values.prometheus.podDisruptionBudget.minAvailable }}
minAvailable: {{ .Values.prometheus.podDisruptionBudget.minAvailable }}
@@ -16,6 +16,10 @@ spec:
{{- end }}
selector:
matchLabels:
- app: prometheus
- prometheus: {{ template "prometheus-operator.fullname" . }}-prometheus
+ {{- if .Values.prometheus.agentMode }}
+ app.kubernetes.io/name: prometheus-agent
+ {{- else }}
+ app.kubernetes.io/name: prometheus
+ {{- end }}
+ operator.prometheus.io/name: {{ template "kube-prometheus-stack.prometheus.crname" . }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/podmonitors.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/podmonitors.yaml
old mode 100755
new mode 100644
index a0e547e0a3..4e748c23b5
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/podmonitors.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/podmonitors.yaml
@@ -7,14 +7,15 @@ items:
kind: PodMonitor
metadata:
name: {{ .name }}
- namespace: {{ $.Release.Namespace }}
+ namespace: {{ template "kube-prometheus-stack.namespace" $ }}
labels:
- app: {{ template "prometheus-operator.name" $ }}-prometheus
-{{ include "prometheus-operator.labels" $ | indent 8 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-prometheus
+{{ include "kube-prometheus-stack.labels" $ | indent 8 }}
{{- if .additionalLabels }}
{{ toYaml .additionalLabels | indent 8 }}
{{- end }}
spec:
+ {{- include "servicemonitor.scrapeLimits" . | nindent 6 }}
podMetricsEndpoints:
{{ toYaml .podMetricsEndpoints | indent 8 }}
{{- if .jobLabel }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/prometheus.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/prometheus.yaml
old mode 100755
new mode 100644
index 8b456b6175..6c0920058b
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/prometheus.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/prometheus.yaml
@@ -1,43 +1,68 @@
{{- if .Values.prometheus.enabled }}
+{{- if .Values.prometheus.agentMode }}
+apiVersion: monitoring.coreos.com/v1alpha1
+kind: PrometheusAgent
+{{- else }}
apiVersion: monitoring.coreos.com/v1
kind: Prometheus
+{{- end }}
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-prometheus
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.prometheus.crname" . }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}-prometheus
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}-prometheus
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
{{- if .Values.prometheus.annotations }}
annotations:
{{ toYaml .Values.prometheus.annotations | indent 4 }}
{{- end }}
spec:
+{{- if and (not .Values.prometheus.agentMode) (or .Values.prometheus.prometheusSpec.alertingEndpoints .Values.alertmanager.enabled) }}
alerting:
alertmanagers:
{{- if .Values.prometheus.prometheusSpec.alertingEndpoints }}
{{ toYaml .Values.prometheus.prometheusSpec.alertingEndpoints | indent 6 }}
{{- else if .Values.alertmanager.enabled }}
- - namespace: {{ $.Release.Namespace }}
- name: {{ template "prometheus-operator.fullname" . }}-alertmanager
+ - namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-alertmanager
port: {{ .Values.alertmanager.alertmanagerSpec.portName }}
{{- if .Values.alertmanager.alertmanagerSpec.routePrefix }}
pathPrefix: "{{ .Values.alertmanager.alertmanagerSpec.routePrefix }}"
+ {{- end }}
+ {{- if .Values.alertmanager.alertmanagerSpec.scheme }}
+ scheme: {{ .Values.alertmanager.alertmanagerSpec.scheme }}
+ {{- end }}
+ {{- if .Values.alertmanager.alertmanagerSpec.tlsConfig }}
+ tlsConfig:
+{{ toYaml .Values.alertmanager.alertmanagerSpec.tlsConfig | indent 10 }}
{{- end }}
apiVersion: {{ .Values.alertmanager.apiVersion }}
-{{- else }}
- []
+{{- end }}
{{- end }}
{{- if .Values.prometheus.prometheusSpec.apiserverConfig }}
apiserverConfig:
{{ toYaml .Values.prometheus.prometheusSpec.apiserverConfig | indent 4}}
{{- end }}
{{- if .Values.prometheus.prometheusSpec.image }}
- baseImage: {{ .Values.prometheus.prometheusSpec.image.repository }}
- version: {{ .Values.prometheus.prometheusSpec.image.tag }}
-{{- end }}
+ {{- $registry := .Values.global.imageRegistry | default .Values.prometheus.prometheusSpec.image.registry -}}
+ {{- if and .Values.prometheus.prometheusSpec.image.tag .Values.prometheus.prometheusSpec.image.sha }}
+ image: "{{ $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: "{{ $registry }}/{{ .Values.prometheus.prometheusSpec.image.repository }}@sha256:{{ .Values.prometheus.prometheusSpec.image.sha }}"
+ {{- else if .Values.prometheus.prometheusSpec.image.tag }}
+ image: "{{ $registry }}/{{ .Values.prometheus.prometheusSpec.image.repository }}:{{ .Values.prometheus.prometheusSpec.image.tag }}"
+ {{- else }}
+ image: "{{ $registry }}/{{ .Values.prometheus.prometheusSpec.image.repository }}"
+ {{- end }}
+ version: {{ default .Values.prometheus.prometheusSpec.image.tag .Values.prometheus.prometheusSpec.version }}
+{{- end }}
+{{- if .Values.prometheus.prometheusSpec.additionalArgs }}
+ additionalArgs:
+{{ toYaml .Values.prometheus.prometheusSpec.additionalArgs | indent 4}}
+{{- end -}}
{{- if .Values.prometheus.prometheusSpec.externalLabels }}
externalLabels:
-{{ toYaml .Values.prometheus.prometheusSpec.externalLabels | indent 4}}
+{{ tpl (toYaml .Values.prometheus.prometheusSpec.externalLabels | indent 4) . }}
{{- end }}
{{- if .Values.prometheus.prometheusSpec.prometheusExternalLabelNameClear }}
prometheusExternalLabelName: ""
@@ -49,12 +74,15 @@ spec:
{{- 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: "{{ .Values.prometheus.prometheusSpec.externalUrl }}"
+ externalUrl: "{{ tpl .Values.prometheus.prometheusSpec.externalUrl . }}"
{{- else if and .Values.prometheus.ingress.enabled .Values.prometheus.ingress.hosts }}
- externalUrl: "http://{{ index .Values.prometheus.ingress.hosts 0 }}{{ .Values.prometheus.prometheusSpec.routePrefix }}"
+ externalUrl: "http://{{ tpl (index .Values.prometheus.ingress.hosts 0) . }}{{ .Values.prometheus.prometheusSpec.routePrefix }}"
{{- else }}
- externalUrl: http://{{ template "prometheus-operator.fullname" . }}-prometheus.{{ $.Release.Namespace }}:{{ .Values.prometheus.service.port }}
+ externalUrl: http://{{ template "kube-prometheus-stack.fullname" . }}-prometheus.{{ template "kube-prometheus-stack.namespace" . }}:{{ .Values.prometheus.service.port }}
{{- end }}
{{- if .Values.prometheus.prometheusSpec.nodeSelector }}
nodeSelector:
@@ -62,26 +90,56 @@ spec:
{{- 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 }}
+{{- if not .Values.prometheus.agentMode }}
enableAdminAPI: {{ .Values.prometheus.prometheusSpec.enableAdminAPI }}
+{{- end }}
+{{- if .Values.prometheus.prometheusSpec.web }}
+ web:
+{{ toYaml .Values.prometheus.prometheusSpec.web | indent 4 }}
+{{- end }}
+{{- if and (not .Values.prometheus.agentMode) .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.evaluationInterval }}
+{{- if .Values.prometheus.prometheusSpec.scrapeTimeout }}
+ scrapeTimeout: {{ .Values.prometheus.prometheusSpec.scrapeTimeout }}
+{{- end }}
+{{- if and (not .Values.prometheus.agentMode) .Values.prometheus.prometheusSpec.evaluationInterval }}
evaluationInterval: {{ .Values.prometheus.prometheusSpec.evaluationInterval }}
{{- end }}
{{- if .Values.prometheus.prometheusSpec.resources }}
resources:
{{ toYaml .Values.prometheus.prometheusSpec.resources | indent 4 }}
{{- end }}
+{{- if not .Values.prometheus.agentMode }}
retention: {{ .Values.prometheus.prometheusSpec.retention | quote }}
{{- if .Values.prometheus.prometheusSpec.retentionSize }}
retentionSize: {{ .Values.prometheus.prometheusSpec.retentionSize | quote }}
{{- end }}
-{{- if .Values.prometheus.prometheusSpec.walCompression }}
- walCompression: {{ .Values.prometheus.prometheusSpec.walCompression }}
+{{- if .Values.prometheus.prometheusSpec.tsdb }}
+ tsdb:
+ {{- if .Values.prometheus.prometheusSpec.tsdb.outOfOrderTimeWindow }}
+ outOfOrderTimeWindow: {{ .Values.prometheus.prometheusSpec.tsdb.outOfOrderTimeWindow }}
+ {{- end }}
+{{- end }}
+{{- 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 }}
@@ -94,10 +152,10 @@ spec:
configMaps:
{{ toYaml .Values.prometheus.prometheusSpec.configMaps | indent 4 }}
{{- end }}
- serviceAccountName: {{ template "prometheus-operator.prometheus.serviceAccountName" . }}
+ serviceAccountName: {{ template "kube-prometheus-stack.prometheus.serviceAccountName" . }}
{{- if .Values.prometheus.prometheusSpec.serviceMonitorSelector }}
serviceMonitorSelector:
-{{ toYaml .Values.prometheus.prometheusSpec.serviceMonitorSelector | indent 4 }}
+{{ tpl (toYaml .Values.prometheus.prometheusSpec.serviceMonitorSelector | indent 4) . }}
{{ else if .Values.prometheus.prometheusSpec.serviceMonitorSelectorNilUsesHelmValues }}
serviceMonitorSelector:
matchLabels:
@@ -107,13 +165,13 @@ spec:
{{- end }}
{{- if .Values.prometheus.prometheusSpec.serviceMonitorNamespaceSelector }}
serviceMonitorNamespaceSelector:
-{{ toYaml .Values.prometheus.prometheusSpec.serviceMonitorNamespaceSelector | indent 4 }}
+{{ tpl (toYaml .Values.prometheus.prometheusSpec.serviceMonitorNamespaceSelector | indent 4) . }}
{{ else }}
serviceMonitorNamespaceSelector: {}
{{- end }}
{{- if .Values.prometheus.prometheusSpec.podMonitorSelector }}
podMonitorSelector:
-{{ toYaml .Values.prometheus.prometheusSpec.podMonitorSelector | indent 4 }}
+{{ tpl (toYaml .Values.prometheus.prometheusSpec.podMonitorSelector | indent 4) . }}
{{ else if .Values.prometheus.prometheusSpec.podMonitorSelectorNilUsesHelmValues }}
podMonitorSelector:
matchLabels:
@@ -123,48 +181,91 @@ spec:
{{- end }}
{{- if .Values.prometheus.prometheusSpec.podMonitorNamespaceSelector }}
podMonitorNamespaceSelector:
-{{ toYaml .Values.prometheus.prometheusSpec.podMonitorNamespaceSelector | indent 4 }}
+{{ tpl (toYaml .Values.prometheus.prometheusSpec.podMonitorNamespaceSelector | indent 4) . }}
{{ else }}
podMonitorNamespaceSelector: {}
{{- end }}
-{{- if .Values.prometheus.prometheusSpec.remoteRead }}
+{{- if .Values.prometheus.prometheusSpec.probeSelector }}
+ probeSelector:
+{{ tpl (toYaml .Values.prometheus.prometheusSpec.probeSelector | indent 4) . }}
+{{ else if .Values.prometheus.prometheusSpec.probeSelectorNilUsesHelmValues }}
+ probeSelector:
+ matchLabels:
+ release: {{ $.Release.Name | quote }}
+{{ else }}
+ probeSelector: {}
+{{- end }}
+{{- if .Values.prometheus.prometheusSpec.probeNamespaceSelector }}
+ probeNamespaceSelector:
+{{ tpl (toYaml .Values.prometheus.prometheusSpec.probeNamespaceSelector | indent 4) . }}
+{{ else }}
+ probeNamespaceSelector: {}
+{{- end }}
+{{- if and (not .Values.prometheus.agentMode) (or .Values.prometheus.prometheusSpec.remoteRead .Values.prometheus.prometheusSpec.additionalRemoteRead) }}
remoteRead:
-{{ toYaml .Values.prometheus.prometheusSpec.remoteRead | indent 4 }}
+{{- if .Values.prometheus.prometheusSpec.remoteRead }}
+{{ tpl (toYaml .Values.prometheus.prometheusSpec.remoteRead | indent 4) . }}
{{- end }}
-{{- if .Values.prometheus.prometheusSpec.remoteWrite }}
+{{- if .Values.prometheus.prometheusSpec.additionalRemoteRead }}
+{{ toYaml .Values.prometheus.prometheusSpec.additionalRemoteRead | indent 4 }}
+{{- end }}
+{{- end }}
+{{- if (or .Values.prometheus.prometheusSpec.remoteWrite .Values.prometheus.prometheusSpec.additionalRemoteWrite) }}
remoteWrite:
-{{ toYaml .Values.prometheus.prometheusSpec.remoteWrite | indent 4 }}
+{{- if .Values.prometheus.prometheusSpec.remoteWrite }}
+{{ tpl (toYaml .Values.prometheus.prometheusSpec.remoteWrite | indent 4) . }}
+{{- end }}
+{{- if .Values.prometheus.prometheusSpec.additionalRemoteWrite }}
+{{ toYaml .Values.prometheus.prometheusSpec.additionalRemoteWrite | indent 4 }}
+{{- end }}
{{- end }}
{{- if .Values.prometheus.prometheusSpec.securityContext }}
securityContext:
{{ toYaml .Values.prometheus.prometheusSpec.securityContext | indent 4 }}
{{- end }}
+{{- if not .Values.prometheus.agentMode }}
{{- if .Values.prometheus.prometheusSpec.ruleNamespaceSelector }}
ruleNamespaceSelector:
-{{ toYaml .Values.prometheus.prometheusSpec.ruleNamespaceSelector | indent 4 }}
+{{ tpl (toYaml .Values.prometheus.prometheusSpec.ruleNamespaceSelector | indent 4) . }}
{{ else }}
ruleNamespaceSelector: {}
{{- end }}
{{- if .Values.prometheus.prometheusSpec.ruleSelector }}
ruleSelector:
-{{ toYaml .Values.prometheus.prometheusSpec.ruleSelector | indent 4}}
+{{ tpl (toYaml .Values.prometheus.prometheusSpec.ruleSelector | indent 4) . }}
{{- else if .Values.prometheus.prometheusSpec.ruleSelectorNilUsesHelmValues }}
ruleSelector:
matchLabels:
- app: {{ template "prometheus-operator.name" . }}
release: {{ $.Release.Name | quote }}
{{ else }}
ruleSelector: {}
{{- end }}
+{{- end }}
+{{- if .Values.prometheus.prometheusSpec.scrapeConfigSelector }}
+ scrapeConfigSelector:
+{{ tpl (toYaml .Values.prometheus.prometheusSpec.scrapeConfigSelector | indent 4) . }}
+{{ else if .Values.prometheus.prometheusSpec.scrapeConfigSelectorNilUsesHelmValues }}
+ scrapeConfigSelector:
+ matchLabels:
+ release: {{ $.Release.Name | quote }}
+{{ else }}
+ scrapeConfigSelector: {}
+{{- end }}
+{{- if .Values.prometheus.prometheusSpec.scrapeConfigNamespaceSelector }}
+ scrapeConfigNamespaceSelector:
+{{ tpl (toYaml .Values.prometheus.prometheusSpec.scrapeConfigNamespaceSelector | indent 4) . }}
+{{ else }}
+ scrapeConfigNamespaceSelector: {}
+{{- 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:
-{{ toYaml .Values.prometheus.prometheusSpec.podMetadata | indent 4 }}
+{{ tpl (toYaml .Values.prometheus.prometheusSpec.podMetadata | indent 4) . }}
{{- end }}
-{{- if .Values.prometheus.prometheusSpec.query }}
+{{- if and (not .Values.prometheus.agentMode) .Values.prometheus.prometheusSpec.query }}
query:
{{ toYaml .Values.prometheus.prometheusSpec.query | indent 4}}
{{- end }}
@@ -178,9 +279,9 @@ spec:
requiredDuringSchedulingIgnoredDuringExecution:
- topologyKey: {{ .Values.prometheus.prometheusSpec.podAntiAffinityTopologyKey }}
labelSelector:
- matchLabels:
- app: prometheus
- prometheus: {{ template "prometheus-operator.fullname" . }}-prometheus
+ matchExpressions:
+ - {key: app.kubernetes.io/name, operator: In, values: [prometheus]}
+ - {key: prometheus, operator: In, values: [{{ template "kube-prometheus-stack.prometheus.crname" . }}]}
{{- else if eq .Values.prometheus.prometheusSpec.podAntiAffinity "soft" }}
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
@@ -188,34 +289,59 @@ spec:
podAffinityTerm:
topologyKey: {{ .Values.prometheus.prometheusSpec.podAntiAffinityTopologyKey }}
labelSelector:
- matchLabels:
- app: prometheus
- prometheus: {{ template "prometheus-operator.fullname" . }}-prometheus
+ matchExpressions:
+ - {key: app.kubernetes.io/name, operator: In, values: [prometheus]}
+ - {key: prometheus, operator: In, values: [{{ template "kube-prometheus-stack.prometheus.crname" . }}]}
{{- end }}
{{- end }}
{{- if .Values.prometheus.prometheusSpec.tolerations }}
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:
-{{ toYaml .Values.global.imagePullSecrets | indent 4 }}
+{{ include "kube-prometheus-stack.imagePullSecrets" . | trim | indent 4 }}
{{- end }}
-{{- if or .Values.prometheus.prometheusSpec.additionalScrapeConfigs .Values.prometheus.prometheusSpec.additionalScrapeConfigsExternal }}
+{{- if .Values.prometheus.prometheusSpec.additionalScrapeConfigs }}
additionalScrapeConfigs:
- name: {{ template "prometheus-operator.fullname" . }}-prometheus-scrape-confg
+ name: {{ template "kube-prometheus-stack.fullname" . }}-prometheus-scrape-confg
key: additional-scrape-configs.yaml
{{- end }}
-{{- if .Values.prometheus.prometheusSpec.additionalAlertManagerConfigs }}
+{{- if .Values.prometheus.prometheusSpec.additionalScrapeConfigsSecret.enabled }}
+ additionalScrapeConfigs:
+ name: {{ .Values.prometheus.prometheusSpec.additionalScrapeConfigsSecret.name }}
+ key: {{ .Values.prometheus.prometheusSpec.additionalScrapeConfigsSecret.key }}
+{{- end }}
+{{- if not .Values.prometheus.agentMode }}
+{{- if or .Values.prometheus.prometheusSpec.additionalAlertManagerConfigs .Values.prometheus.prometheusSpec.additionalAlertManagerConfigsSecret }}
additionalAlertManagerConfigs:
- name: {{ template "prometheus-operator.fullname" . }}-prometheus-am-confg
+{{- if .Values.prometheus.prometheusSpec.additionalAlertManagerConfigs }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-prometheus-am-confg
key: additional-alertmanager-configs.yaml
{{- end }}
+{{- 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 "prometheus-operator.fullname" . }}-prometheus-am-relabel-confg
+ 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 }}
+{{- end }}
{{- if .Values.prometheus.prometheusSpec.containers }}
containers:
{{ toYaml .Values.prometheus.prometheusSpec.containers | indent 4 }}
@@ -227,15 +353,92 @@ spec:
{{- if .Values.prometheus.prometheusSpec.priorityClassName }}
priorityClassName: {{ .Values.prometheus.prometheusSpec.priorityClassName }}
{{- end }}
+{{- if not .Values.prometheus.agentMode }}
{{- if .Values.prometheus.prometheusSpec.thanos }}
thanos:
{{ toYaml .Values.prometheus.prometheusSpec.thanos | indent 4 }}
{{- end }}
{{- if .Values.prometheus.prometheusSpec.disableCompaction }}
disableCompaction: {{ .Values.prometheus.prometheusSpec.disableCompaction }}
+{{- end }}
{{- 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 }}
+{{- if .Values.prometheus.prometheusSpec.ignoreNamespaceSelectors }}
+ ignoreNamespaceSelectors: {{ .Values.prometheus.prometheusSpec.ignoreNamespaceSelectors }}
{{- end }}
{{- if .Values.prometheus.prometheusSpec.enforcedNamespaceLabel }}
enforcedNamespaceLabel: {{ .Values.prometheus.prometheusSpec.enforcedNamespaceLabel }}
+{{- $prometheusDefaultRulesExcludedFromEnforce := (include "rules.names" .) | fromYaml }}
+{{- if not .Values.prometheus.agentMode }}
+ prometheusRulesExcludedFromEnforce:
+{{- range $prometheusDefaultRulesExcludedFromEnforce.rules }}
+ - ruleNamespace: "{{ template "kube-prometheus-stack.namespace" $ }}"
+ ruleName: "{{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) . | trunc 63 | trimSuffix "-" }}"
+{{- end }}
+{{- if .Values.prometheus.prometheusSpec.prometheusRulesExcludedFromEnforce }}
+{{ toYaml .Values.prometheus.prometheusSpec.prometheusRulesExcludedFromEnforce | indent 4 }}
+{{- end }}
+{{- end }}
+ excludedFromEnforcement:
+{{- range $prometheusDefaultRulesExcludedFromEnforce.rules }}
+ - group: monitoring.coreos.com
+ 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 and (not .Values.prometheus.agentMode) .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 and (not .Values.prometheus.agentMode) .Values.prometheus.prometheusSpec.allowOverlappingBlocks }}
+ allowOverlappingBlocks: {{ .Values.prometheus.prometheusSpec.allowOverlappingBlocks }}
+{{- end }}
+{{- if .Values.prometheus.prometheusSpec.minReadySeconds }}
+ minReadySeconds: {{ .Values.prometheus.prometheusSpec.minReadySeconds }}
+{{- end }}
+ hostNetwork: {{ .Values.prometheus.prometheusSpec.hostNetwork }}
+{{- if .Values.prometheus.prometheusSpec.hostAliases }}
+ hostAliases:
+{{ toYaml .Values.prometheus.prometheusSpec.hostAliases | indent 4 }}
+{{- end }}
+{{- if .Values.prometheus.prometheusSpec.tracingConfig }}
+ tracingConfig:
+{{ toYaml .Values.prometheus.prometheusSpec.tracingConfig | indent 4 }}
+{{- end }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/psp-clusterrole.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/psp-clusterrole.yaml
old mode 100755
new mode 100644
index d5523d662c..872feb6066
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/psp-clusterrole.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/psp-clusterrole.yaml
@@ -1,11 +1,12 @@
{{- if and .Values.prometheus.enabled .Values.global.rbac.create .Values.global.rbac.pspEnabled }}
+{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-prometheus-psp
+ name: {{ template "kube-prometheus-stack.fullname" . }}-prometheus-psp
labels:
- app: {{ template "prometheus-operator.name" . }}-prometheus
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}-prometheus
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
rules:
{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
{{- if semverCompare "> 1.15.0-0" $kubeTargetVersion }}
@@ -16,5 +17,6 @@ rules:
resources: ['podsecuritypolicies']
verbs: ['use']
resourceNames:
- - {{ template "prometheus-operator.fullname" . }}-prometheus
+ - {{ template "kube-prometheus-stack.fullname" . }}-prometheus
+{{- end }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/psp-clusterrolebinding.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/psp-clusterrolebinding.yaml
old mode 100755
new mode 100644
index 596273c46b..50e3617704
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/psp-clusterrolebinding.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/psp-clusterrolebinding.yaml
@@ -1,18 +1,19 @@
{{- if and .Values.prometheus.enabled .Values.global.rbac.create .Values.global.rbac.pspEnabled }}
+{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-prometheus-psp
+ name: {{ template "kube-prometheus-stack.fullname" . }}-prometheus-psp
labels:
- app: {{ template "prometheus-operator.name" . }}-prometheus
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}-prometheus
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
- name: {{ template "prometheus-operator.fullname" . }}-prometheus-psp
+ name: {{ template "kube-prometheus-stack.fullname" . }}-prometheus-psp
subjects:
- kind: ServiceAccount
- name: {{ template "prometheus-operator.prometheus.serviceAccountName" . }}
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.prometheus.serviceAccountName" . }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
+{{- end }}
{{- end }}
-
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/psp.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/psp.yaml
old mode 100755
new mode 100644
index e31dd7da30..b53808daa5
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/psp.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/psp.yaml
@@ -1,24 +1,18 @@
{{- if and .Values.prometheus.enabled .Values.global.rbac.create .Values.global.rbac.pspEnabled }}
+{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-prometheus
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-prometheus
labels:
- app: {{ template "prometheus-operator.name" . }}-prometheus
+ app: {{ template "kube-prometheus-stack.name" . }}-prometheus
{{- if .Values.global.rbac.pspAnnotations }}
annotations:
{{ toYaml .Values.global.rbac.pspAnnotations | indent 4 }}
{{- end }}
-{{ include "prometheus-operator.labels" . | indent 4 }}
+{{ 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'
@@ -27,6 +21,9 @@ spec:
- 'secret'
- 'downwardAPI'
- 'persistentVolumeClaim'
+{{- if .Values.prometheus.podSecurityPolicy.volumes }}
+{{ toYaml .Values.prometheus.podSecurityPolicy.volumes | indent 4 }}
+{{- end }}
hostNetwork: false
hostIPC: false
hostPID: false
@@ -39,13 +36,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
@@ -53,4 +50,9 @@ spec:
allowedCapabilities:
{{ toYaml .Values.prometheus.podSecurityPolicy.allowedCapabilities | indent 4 }}
{{- end }}
+{{- if .Values.prometheus.podSecurityPolicy.allowedHostPaths }}
+ allowedHostPaths:
+{{ toYaml .Values.prometheus.podSecurityPolicy.allowedHostPaths | indent 4 }}
+{{- end }}
+{{- end }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/alertmanager.rules.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/alertmanager.rules.yaml
old mode 100755
new mode 100644
index 974346dfb8..d2e0c8bb7e
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/alertmanager.rules.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/alertmanager.rules.yaml
@@ -1,21 +1,20 @@
{{- /*
-Generated from 'alertmanager.rules' group from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/prometheus-rules.yaml
+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/helm/charts/tree/master/stable/prometheus-operator/hack
+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 }}
-{{- $operatorJob := printf "%s-%s" (include "prometheus-operator.fullname" .) "operator" }}
-{{- $alertmanagerJob := printf "%s-%s" (include "prometheus-operator.fullname" .) "alertmanager" }}
-{{- $namespace := .Release.Namespace }}
+{{- $alertmanagerJob := printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "alertmanager" }}
+{{- $namespace := printf "%s" (include "kube-prometheus-stack.namespace" .) }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "alertmanager.rules" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "alertmanager.rules" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
{{- if .Values.defaultRules.labels }}
{{ toYaml .Values.defaultRules.labels | indent 4 }}
{{- end }}
@@ -27,28 +26,278 @@ spec:
groups:
- name: alertmanager.rules
rules:
- - alert: AlertmanagerConfigInconsistent
+{{- if not (.Values.defaultRules.disabled.AlertmanagerFailedReload | default false) }}
+ - alert: AlertmanagerFailedReload
annotations:
- message: The configuration of the instances of the Alertmanager cluster `{{`{{`}}$labels.service{{`}}`}}` are out of sync.
- expr: count_values("config_hash", alertmanager_config_hash{job="{{ $alertmanagerJob }}",namespace="{{ $namespace }}"}) BY (service) / ON(service) GROUP_LEFT() label_replace(max(prometheus_operator_spec_replicas{job="{{ $operatorJob }}",namespace="{{ $namespace }}",controller="alertmanager"}) by (name, job, namespace, controller), "service", "$1", "name", "(.*)") != 1
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.alertmanager }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.alertmanager | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.alertmanager }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.alertmanager }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.AlertmanagerMembersInconsistent | default false) }}
+ - alert: AlertmanagerMembersInconsistent
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.alertmanager }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.alertmanager | 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,cluster) group_left
+ count by (namespace,service,cluster) (max_over_time(alertmanager_cluster_members{job="{{ $alertmanagerJob }}",namespace="{{ $namespace }}"}[5m]))
+ for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.alertmanager }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.alertmanager }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.AlertmanagerFailedToSendAlerts | default false) }}
+ - alert: AlertmanagerFailedToSendAlerts
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.alertmanager }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.alertmanager | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.alertmanager }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.alertmanager }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.AlertmanagerClusterFailedToSendAlerts | default false) }}
+ - alert: AlertmanagerClusterFailedToSendAlerts
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.alertmanager }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.alertmanager | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: critical
- - alert: AlertmanagerFailedReload
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.alertmanager }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.alertmanager }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.AlertmanagerClusterFailedToSendAlerts | default false) }}
+ - alert: AlertmanagerClusterFailedToSendAlerts
annotations:
- message: Reloading Alertmanager's configuration has failed for {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod{{`}}`}}.
- expr: alertmanager_config_last_reload_successful{job="{{ $alertmanagerJob }}",namespace="{{ $namespace }}"} == 0
- for: 10m
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.alertmanager }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.alertmanager | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
- - alert: AlertmanagerMembersInconsistent
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.alertmanager }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.alertmanager }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.AlertmanagerConfigInconsistent | default false) }}
+ - alert: AlertmanagerConfigInconsistent
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.alertmanager }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.alertmanager | 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,cluster) (
+ count_values by (namespace,service,cluster) ("config_hash", alertmanager_config_hash{job="{{ $alertmanagerJob }}",namespace="{{ $namespace }}"})
+ )
+ != 1
+ for: 20m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.alertmanager }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.alertmanager }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.AlertmanagerClusterDown | default false) }}
+ - alert: AlertmanagerClusterDown
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.alertmanager }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.alertmanager | 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,cluster) (
+ avg_over_time(up{job="{{ $alertmanagerJob }}",namespace="{{ $namespace }}"}[5m]) < 0.5
+ )
+ /
+ count by (namespace,service,cluster) (
+ up{job="{{ $alertmanagerJob }}",namespace="{{ $namespace }}"}
+ )
+ )
+ >= 0.5
+ for: 5m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.alertmanager }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.alertmanager }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.AlertmanagerClusterCrashlooping | default false) }}
+ - alert: AlertmanagerClusterCrashlooping
annotations:
- message: Alertmanager has not found all other members of the cluster.
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.alertmanager }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.alertmanager | 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: |-
- alertmanager_cluster_members{job="{{ $alertmanagerJob }}",namespace="{{ $namespace }}"}
- != on (service) GROUP_LEFT()
- count by (service) (alertmanager_cluster_members{job="{{ $alertmanagerJob }}",namespace="{{ $namespace }}"})
+ (
+ count by (namespace,service,cluster) (
+ changes(process_start_time_seconds{job="{{ $alertmanagerJob }}",namespace="{{ $namespace }}"}[10m]) > 4
+ )
+ /
+ count by (namespace,service,cluster) (
+ up{job="{{ $alertmanagerJob }}",namespace="{{ $namespace }}"}
+ )
+ )
+ >= 0.5
for: 5m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.alertmanager }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.alertmanager }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/config-reloaders.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/config-reloaders.yaml
new file mode 100644
index 0000000000..3c51730641
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/config-reloaders.yaml
@@ -0,0 +1,57 @@
+{{- /*
+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 }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.configReloaders }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.configReloaders | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.configReloaders }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.configReloaders }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/etcd.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/etcd.yaml
old mode 100755
new mode 100644
index 09fa80a44f..8380d27eb5
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/etcd.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/etcd.yaml
@@ -1,18 +1,18 @@
{{- /*
-Generated from 'etcd' group from https://raw.githubusercontent.com/etcd-io/etcd/master/Documentation/op-guide/etcd3_alert.rules.yml
+Generated from 'etcd' group from contrib/mixin/mixin.libsonnet
Do not change in-place! In order to change this file first read following link:
-https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
+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.kubeEtcd.enabled .Values.defaultRules.rules.etcd }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "etcd" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "etcd" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
{{- if .Values.defaultRules.labels }}
{{ toYaml .Values.defaultRules.labels | indent 4 }}
{{- end }}
@@ -24,117 +24,436 @@ 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 }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.etcd }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.etcd | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.etcd }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.etcd }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- 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 }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.etcd }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.etcd | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.etcd }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.etcd }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- 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 }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.etcd }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.etcd | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.etcd }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.etcd }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- 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 }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.etcd }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.etcd | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.etcd }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.etcd }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- 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 }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.etcd }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.etcd | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.etcd }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.etcd }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- 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 }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.etcd }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.etcd | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.etcd }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.etcd }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- 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 }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.etcd }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.etcd | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.etcd }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.etcd }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- 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 }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.etcd }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.etcd | 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
for: 10m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.etcd }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.etcd }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- 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 }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.etcd }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.etcd | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.etcd }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.etcd }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- 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 }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.etcd }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.etcd | 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
for: 10m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.etcd }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.etcd }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.etcdHighFsyncDurations | default false) }}
+ - alert: etcdHighFsyncDurations
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.etcd }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.etcd | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.etcd }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.etcd }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- 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 }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.etcd }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.etcd | 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
for: 10m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
- - alert: etcdHighNumberOfFailedHTTPRequests
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.etcd }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.etcd }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- 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 }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.etcd }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.etcd | 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{job=~".*etcd.*"}[5m]) / last_over_time(etcd_server_quota_backend_bytes{job=~".*etcd.*"}[5m]))*100 > 95
for: 10m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
- severity: warning
- - alert: etcdHighNumberOfFailedHTTPRequests
+ severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.etcd }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.etcd }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- 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 }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.etcd }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.etcd | 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{job=~".*etcd.*"}[4h], 4*60*60) > etcd_server_quota_backend_bytes{job=~".*etcd.*"}
for: 10m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
- severity: critical
- - alert: etcdHTTPRequestsSlow
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.etcd }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.etcd }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- 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 }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.etcd }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.etcd | 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{job=~".*etcd.*"}[5m]) / last_over_time(etcd_mvcc_db_total_size_in_bytes{job=~".*etcd.*"}[5m])) < 0.5 and etcd_mvcc_db_total_size_in_use_in_bytes{job=~".*etcd.*"} > 104857600
for: 10m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.etcd }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.etcd }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/general.rules.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/general.rules.yaml
old mode 100755
new mode 100644
index 9cecf35e08..ce8dbd1795
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/general.rules.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/general.rules.yaml
@@ -1,18 +1,18 @@
{{- /*
-Generated from 'general.rules' group from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/prometheus-rules.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/helm/charts/tree/master/stable/prometheus-operator/hack
+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 "prometheus-operator.fullname" .) "general.rules" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "general.rules" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
{{- if .Values.defaultRules.labels }}
{{ toYaml .Values.defaultRules.labels | indent 4 }}
{{- end }}
@@ -24,16 +24,44 @@ spec:
groups:
- name: general.rules
rules:
+{{- if not (.Values.defaultRules.disabled.TargetDown | default false) }}
- alert: TargetDown
annotations:
- message: '{{`{{`}} printf "%.4g" $value {{`}}`}}% of the {{`{{`}} $labels.job {{`}}`}}/{{`{{`}} $labels.service {{`}}`}} targets in {{`{{`}} $labels.namespace {{`}}`}} namespace are down.'
- expr: 100 * (count(up == 0) BY (job, namespace, service) / count(up) BY (job, namespace, service)) > 10
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.general }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.general | 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 (cluster,namespace, service) / count(up) BY (cluster,namespace, service)) > 10
for: 10m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.general }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.general }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.Watchdog | default false) }}
- alert: Watchdog
annotations:
- message: 'This is an alert meant to ensure that the entire alerting pipeline is functional.
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.general }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.general | 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
@@ -44,7 +72,54 @@ spec:
"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
-{{- end }}
\ No newline at end of file
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.general }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.general }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.InfoInhibitor | default false) }}
+ - alert: InfoInhibitor
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.general }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.general | 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 or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.general }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.general }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/k8s.rules.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/k8s.rules.yaml
old mode 100755
new mode 100644
index 2db65338b5..f697e2b994
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/k8s.rules.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/k8s.rules.yaml
@@ -1,18 +1,18 @@
{{- /*
-Generated from 'k8s.rules' group from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/prometheus-rules.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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.k8s }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "k8s.rules" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "k8s.rules" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
{{- if .Values.defaultRules.labels }}
{{ toYaml .Values.defaultRules.labels | indent 4 }}
{{- end }}
@@ -24,63 +24,222 @@ spec:
groups:
- name: k8s.rules
rules:
- - expr: sum(rate(container_cpu_usage_seconds_total{job="kubelet", metrics_path="/metrics/cadvisor", image!="", container!="POD"}[5m])) by (namespace)
- record: namespace:container_cpu_usage_seconds_total:sum_rate
- expr: |-
sum by (cluster, namespace, pod, container) (
- rate(container_cpu_usage_seconds_total{job="kubelet", metrics_path="/metrics/cadvisor", image!="", container!="POD"}[5m])
+ irate(container_cpu_usage_seconds_total{job="kubelet", metrics_path="/metrics/cadvisor", image!=""}[5m])
) * on (cluster, namespace, pod) group_left(node) topk by (cluster, namespace, pod) (
- 1, max by(cluster, namespace, pod, node) (kube_pod_info)
+ 1, max by(cluster, namespace, pod, node) (kube_pod_info{node!=""})
)
- record: node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate
+ record: node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.k8s }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.k8s }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
- expr: |-
container_memory_working_set_bytes{job="kubelet", metrics_path="/metrics/cadvisor", image!=""}
- * on (namespace, pod) group_left(node) topk by(namespace, pod) (1,
- max by(namespace, pod, node) (kube_pod_info)
+ * on (cluster, namespace, pod) group_left(node) topk by(cluster, namespace, pod) (1,
+ max by(cluster, namespace, pod, node) (kube_pod_info{node!=""})
)
record: node_namespace_pod_container:container_memory_working_set_bytes
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.k8s }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.k8s }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
- expr: |-
container_memory_rss{job="kubelet", metrics_path="/metrics/cadvisor", image!=""}
- * on (namespace, pod) group_left(node) topk by(namespace, pod) (1,
- max by(namespace, pod, node) (kube_pod_info)
+ * on (cluster, namespace, pod) group_left(node) topk by(cluster, namespace, pod) (1,
+ max by(cluster, namespace, pod, node) (kube_pod_info{node!=""})
)
record: node_namespace_pod_container:container_memory_rss
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.k8s }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.k8s }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
- expr: |-
container_memory_cache{job="kubelet", metrics_path="/metrics/cadvisor", image!=""}
- * on (namespace, pod) group_left(node) topk by(namespace, pod) (1,
- max by(namespace, pod, node) (kube_pod_info)
+ * on (cluster, namespace, pod) group_left(node) topk by(cluster, namespace, pod) (1,
+ max by(cluster, namespace, pod, node) (kube_pod_info{node!=""})
)
record: node_namespace_pod_container:container_memory_cache
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.k8s }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.k8s }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
- expr: |-
container_memory_swap{job="kubelet", metrics_path="/metrics/cadvisor", image!=""}
- * on (namespace, pod) group_left(node) topk by(namespace, pod) (1,
- max by(namespace, pod, node) (kube_pod_info)
+ * on (cluster, namespace, pod) group_left(node) topk by(cluster, namespace, pod) (1,
+ max by(cluster, namespace, pod, node) (kube_pod_info{node!=""})
)
record: node_namespace_pod_container:container_memory_swap
- - expr: sum(container_memory_usage_bytes{job="kubelet", metrics_path="/metrics/cadvisor", image!="", container!="POD"}) by (namespace)
- record: namespace:container_memory_usage_bytes:sum
- - expr: |-
- sum by (namespace) (
- sum by (namespace, pod) (
- max by (namespace, pod, container) (
- kube_pod_container_resource_requests_memory_bytes{job="kube-state-metrics"}
- ) * on(namespace, pod) group_left() max by (namespace, pod) (
- kube_pod_status_phase{phase=~"Pending|Running"} == 1
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.k8s }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.k8s }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: |-
+ kube_pod_container_resource_requests{resource="memory",job="kube-state-metrics"} * on (namespace, pod, cluster)
+ 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
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.k8s }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.k8s }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: |-
+ sum by (namespace, cluster) (
+ 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, cluster) (
+ kube_pod_status_phase{phase=~"Pending|Running"} == 1
)
)
)
- record: namespace:kube_pod_container_resource_requests_memory_bytes:sum
+ record: namespace_memory:kube_pod_container_resource_requests:sum
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.k8s }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.k8s }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
- expr: |-
- sum by (namespace) (
- sum by (namespace, pod) (
- max by (namespace, pod, container) (
- kube_pod_container_resource_requests_cpu_cores{job="kube-state-metrics"}
- ) * on(namespace, pod) group_left() max by (namespace, pod) (
+ kube_pod_container_resource_requests{resource="cpu",job="kube-state-metrics"} * on (namespace, pod, cluster)
+ 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
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.k8s }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.k8s }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: |-
+ sum by (namespace, cluster) (
+ 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, cluster) (
kube_pod_status_phase{phase=~"Pending|Running"} == 1
)
)
)
- record: namespace:kube_pod_container_resource_requests_cpu_cores:sum
+ record: namespace_cpu:kube_pod_container_resource_requests:sum
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.k8s }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.k8s }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: |-
+ kube_pod_container_resource_limits{resource="memory",job="kube-state-metrics"} * on (namespace, pod, cluster)
+ 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
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.k8s }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.k8s }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: |-
+ sum by (namespace, cluster) (
+ 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, cluster) (
+ kube_pod_status_phase{phase=~"Pending|Running"} == 1
+ )
+ )
+ )
+ record: namespace_memory:kube_pod_container_resource_limits:sum
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.k8s }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.k8s }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: |-
+ kube_pod_container_resource_limits{resource="cpu",job="kube-state-metrics"} * on (namespace, pod, cluster)
+ 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
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.k8s }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.k8s }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: |-
+ sum by (namespace, cluster) (
+ 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, cluster) (
+ kube_pod_status_phase{phase=~"Pending|Running"} == 1
+ )
+ )
+ )
+ record: namespace_cpu:kube_pod_container_resource_limits:sum
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.k8s }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.k8s }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
- expr: |-
max by (cluster, namespace, workload, pod) (
label_replace(
@@ -97,7 +256,15 @@ spec:
)
labels:
workload_type: deployment
- record: mixin_pod_workload
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.k8s }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.k8s }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ record: namespace_workload_pod:kube_pod_owner:relabel
- expr: |-
max by (cluster, namespace, workload, pod) (
label_replace(
@@ -107,7 +274,15 @@ spec:
)
labels:
workload_type: daemonset
- record: mixin_pod_workload
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.k8s }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.k8s }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ record: namespace_workload_pod:kube_pod_owner:relabel
- expr: |-
max by (cluster, namespace, workload, pod) (
label_replace(
@@ -117,5 +292,31 @@ spec:
)
labels:
workload_type: statefulset
- record: mixin_pod_workload
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.k8s }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.k8s }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ 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
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.k8s }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.k8s }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ record: namespace_workload_pod:kube_pod_owner:relabel
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-apiserver-availability.rules.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-apiserver-availability.rules.yaml
new file mode 100644
index 0000000000..206b30f265
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-apiserver-availability.rules.yaml
@@ -0,0 +1,273 @@
+{{- /*
+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
+*/ -}}
+{{- $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.kubeApiserverAvailability }}
+apiVersion: monitoring.coreos.com/v1
+kind: PrometheusRule
+metadata:
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "kube-apiserver-availability.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:
+ - interval: 3m
+ name: kube-apiserver-availability.rules
+ rules:
+ - expr: avg_over_time(code_verb:apiserver_request_total:increase1h[30d]) * 24 * 30
+ record: code_verb:apiserver_request_total:increase30d
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverAvailability }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverAvailability }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: sum by (cluster, code) (code_verb:apiserver_request_total:increase30d{verb=~"LIST|GET"})
+ labels:
+ verb: read
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverAvailability }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverAvailability }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ record: code:apiserver_request_total:increase30d
+ - expr: sum by (cluster, code) (code_verb:apiserver_request_total:increase30d{verb=~"POST|PUT|PATCH|DELETE"})
+ labels:
+ verb: write
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverAvailability }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverAvailability }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ record: code:apiserver_request_total:increase30d
+ - expr: sum by (cluster, verb, scope) (increase(apiserver_request_slo_duration_seconds_count{job="apiserver"}[1h]))
+ record: cluster_verb_scope:apiserver_request_slo_duration_seconds_count:increase1h
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverAvailability }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverAvailability }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: sum by (cluster, verb, scope) (avg_over_time(cluster_verb_scope:apiserver_request_slo_duration_seconds_count:increase1h[30d]) * 24 * 30)
+ record: cluster_verb_scope:apiserver_request_slo_duration_seconds_count:increase30d
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverAvailability }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverAvailability }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: sum by (cluster, verb, scope, le) (increase(apiserver_request_slo_duration_seconds_bucket[1h]))
+ record: cluster_verb_scope_le:apiserver_request_slo_duration_seconds_bucket:increase1h
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverAvailability }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverAvailability }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: sum by (cluster, verb, scope, le) (avg_over_time(cluster_verb_scope_le:apiserver_request_slo_duration_seconds_bucket:increase1h[30d]) * 24 * 30)
+ record: cluster_verb_scope_le:apiserver_request_slo_duration_seconds_bucket:increase30d
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverAvailability }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverAvailability }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: |-
+ 1 - (
+ (
+ # write too slow
+ sum by (cluster) (cluster_verb_scope:apiserver_request_slo_duration_seconds_count:increase30d{verb=~"POST|PUT|PATCH|DELETE"})
+ -
+ sum by (cluster) (cluster_verb_scope_le:apiserver_request_slo_duration_seconds_bucket:increase30d{verb=~"POST|PUT|PATCH|DELETE",le="1"})
+ ) +
+ (
+ # read too slow
+ sum by (cluster) (cluster_verb_scope:apiserver_request_slo_duration_seconds_count:increase30d{verb=~"LIST|GET"})
+ -
+ (
+ (
+ sum by (cluster) (cluster_verb_scope_le:apiserver_request_slo_duration_seconds_bucket:increase30d{verb=~"LIST|GET",scope=~"resource|",le="1"})
+ or
+ vector(0)
+ )
+ +
+ sum by (cluster) (cluster_verb_scope_le:apiserver_request_slo_duration_seconds_bucket:increase30d{verb=~"LIST|GET",scope="namespace",le="5"})
+ +
+ sum by (cluster) (cluster_verb_scope_le:apiserver_request_slo_duration_seconds_bucket:increase30d{verb=~"LIST|GET",scope="cluster",le="30"})
+ )
+ ) +
+ # errors
+ sum by (cluster) (code:apiserver_request_total:increase30d{code=~"5.."} or vector(0))
+ )
+ /
+ sum by (cluster) (code:apiserver_request_total:increase30d)
+ labels:
+ verb: all
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverAvailability }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverAvailability }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ record: apiserver_request:availability30d
+ - expr: |-
+ 1 - (
+ sum by (cluster) (cluster_verb_scope:apiserver_request_slo_duration_seconds_count:increase30d{verb=~"LIST|GET"})
+ -
+ (
+ # too slow
+ (
+ sum by (cluster) (cluster_verb_scope_le:apiserver_request_slo_duration_seconds_bucket:increase30d{verb=~"LIST|GET",scope=~"resource|",le="1"})
+ or
+ vector(0)
+ )
+ +
+ sum by (cluster) (cluster_verb_scope_le:apiserver_request_slo_duration_seconds_bucket:increase30d{verb=~"LIST|GET",scope="namespace",le="5"})
+ +
+ sum by (cluster) (cluster_verb_scope_le:apiserver_request_slo_duration_seconds_bucket:increase30d{verb=~"LIST|GET",scope="cluster",le="30"})
+ )
+ +
+ # errors
+ sum by (cluster) (code:apiserver_request_total:increase30d{verb="read",code=~"5.."} or vector(0))
+ )
+ /
+ sum by (cluster) (code:apiserver_request_total:increase30d{verb="read"})
+ labels:
+ verb: read
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverAvailability }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverAvailability }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ record: apiserver_request:availability30d
+ - expr: |-
+ 1 - (
+ (
+ # too slow
+ sum by (cluster) (cluster_verb_scope:apiserver_request_slo_duration_seconds_count:increase30d{verb=~"POST|PUT|PATCH|DELETE"})
+ -
+ sum by (cluster) (cluster_verb_scope_le:apiserver_request_slo_duration_seconds_bucket:increase30d{verb=~"POST|PUT|PATCH|DELETE",le="1"})
+ )
+ +
+ # errors
+ sum by (cluster) (code:apiserver_request_total:increase30d{verb="write",code=~"5.."} or vector(0))
+ )
+ /
+ sum by (cluster) (code:apiserver_request_total:increase30d{verb="write"})
+ labels:
+ verb: write
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverAvailability }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverAvailability }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ record: apiserver_request:availability30d
+ - expr: sum by (cluster,code,resource) (rate(apiserver_request_total{job="apiserver",verb=~"LIST|GET"}[5m]))
+ labels:
+ verb: read
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverAvailability }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverAvailability }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ 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
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverAvailability }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverAvailability }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ record: code_resource:apiserver_request_total:rate5m
+ - expr: sum by (cluster, code, verb) (increase(apiserver_request_total{job="apiserver",verb=~"LIST|GET|POST|PUT|PATCH|DELETE",code=~"2.."}[1h]))
+ record: code_verb:apiserver_request_total:increase1h
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverAvailability }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverAvailability }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: sum by (cluster, code, verb) (increase(apiserver_request_total{job="apiserver",verb=~"LIST|GET|POST|PUT|PATCH|DELETE",code=~"3.."}[1h]))
+ record: code_verb:apiserver_request_total:increase1h
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverAvailability }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverAvailability }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: sum by (cluster, code, verb) (increase(apiserver_request_total{job="apiserver",verb=~"LIST|GET|POST|PUT|PATCH|DELETE",code=~"4.."}[1h]))
+ record: code_verb:apiserver_request_total:increase1h
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverAvailability }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverAvailability }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: sum by (cluster, code, verb) (increase(apiserver_request_total{job="apiserver",verb=~"LIST|GET|POST|PUT|PATCH|DELETE",code=~"5.."}[1h]))
+ record: code_verb:apiserver_request_total:increase1h
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverAvailability }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverAvailability }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-apiserver-burnrate.rules.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-apiserver-burnrate.rules.yaml
new file mode 100644
index 0000000000..3134a1bfe5
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-apiserver-burnrate.rules.yaml
@@ -0,0 +1,440 @@
+{{- /*
+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 .Values.kubeApiServer.enabled .Values.defaultRules.rules.kubeApiserverBurnrate }}
+apiVersion: monitoring.coreos.com/v1
+kind: PrometheusRule
+metadata:
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "kube-apiserver-burnrate.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-burnrate.rules
+ rules:
+ - expr: |-
+ (
+ (
+ # too slow
+ sum by (cluster) (rate(apiserver_request_slo_duration_seconds_count{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward"}[1d]))
+ -
+ (
+ (
+ sum by (cluster) (rate(apiserver_request_slo_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_slo_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_slo_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward",scope="cluster",le="30"}[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
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverBurnrate }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverBurnrate }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ record: apiserver_request:burnrate1d
+ - expr: |-
+ (
+ (
+ # too slow
+ sum by (cluster) (rate(apiserver_request_slo_duration_seconds_count{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward"}[1h]))
+ -
+ (
+ (
+ sum by (cluster) (rate(apiserver_request_slo_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_slo_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_slo_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward",scope="cluster",le="30"}[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
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverBurnrate }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverBurnrate }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ record: apiserver_request:burnrate1h
+ - expr: |-
+ (
+ (
+ # too slow
+ sum by (cluster) (rate(apiserver_request_slo_duration_seconds_count{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward"}[2h]))
+ -
+ (
+ (
+ sum by (cluster) (rate(apiserver_request_slo_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_slo_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_slo_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward",scope="cluster",le="30"}[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
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverBurnrate }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverBurnrate }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ record: apiserver_request:burnrate2h
+ - expr: |-
+ (
+ (
+ # too slow
+ sum by (cluster) (rate(apiserver_request_slo_duration_seconds_count{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward"}[30m]))
+ -
+ (
+ (
+ sum by (cluster) (rate(apiserver_request_slo_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_slo_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_slo_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward",scope="cluster",le="30"}[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
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverBurnrate }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverBurnrate }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ record: apiserver_request:burnrate30m
+ - expr: |-
+ (
+ (
+ # too slow
+ sum by (cluster) (rate(apiserver_request_slo_duration_seconds_count{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward"}[3d]))
+ -
+ (
+ (
+ sum by (cluster) (rate(apiserver_request_slo_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_slo_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_slo_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward",scope="cluster",le="30"}[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
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverBurnrate }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverBurnrate }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ record: apiserver_request:burnrate3d
+ - expr: |-
+ (
+ (
+ # too slow
+ sum by (cluster) (rate(apiserver_request_slo_duration_seconds_count{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward"}[5m]))
+ -
+ (
+ (
+ sum by (cluster) (rate(apiserver_request_slo_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_slo_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_slo_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward",scope="cluster",le="30"}[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
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverBurnrate }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverBurnrate }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ record: apiserver_request:burnrate5m
+ - expr: |-
+ (
+ (
+ # too slow
+ sum by (cluster) (rate(apiserver_request_slo_duration_seconds_count{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward"}[6h]))
+ -
+ (
+ (
+ sum by (cluster) (rate(apiserver_request_slo_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_slo_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_slo_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward",scope="cluster",le="30"}[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
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverBurnrate }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverBurnrate }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ record: apiserver_request:burnrate6h
+ - expr: |-
+ (
+ (
+ # too slow
+ sum by (cluster) (rate(apiserver_request_slo_duration_seconds_count{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",subresource!~"proxy|attach|log|exec|portforward"}[1d]))
+ -
+ sum by (cluster) (rate(apiserver_request_slo_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]))
+ )
+ /
+ sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[1d]))
+ labels:
+ verb: write
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverBurnrate }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverBurnrate }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ record: apiserver_request:burnrate1d
+ - expr: |-
+ (
+ (
+ # too slow
+ sum by (cluster) (rate(apiserver_request_slo_duration_seconds_count{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",subresource!~"proxy|attach|log|exec|portforward"}[1h]))
+ -
+ sum by (cluster) (rate(apiserver_request_slo_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]))
+ )
+ /
+ sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[1h]))
+ labels:
+ verb: write
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverBurnrate }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverBurnrate }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ record: apiserver_request:burnrate1h
+ - expr: |-
+ (
+ (
+ # too slow
+ sum by (cluster) (rate(apiserver_request_slo_duration_seconds_count{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",subresource!~"proxy|attach|log|exec|portforward"}[2h]))
+ -
+ sum by (cluster) (rate(apiserver_request_slo_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]))
+ )
+ /
+ sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[2h]))
+ labels:
+ verb: write
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverBurnrate }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverBurnrate }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ record: apiserver_request:burnrate2h
+ - expr: |-
+ (
+ (
+ # too slow
+ sum by (cluster) (rate(apiserver_request_slo_duration_seconds_count{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",subresource!~"proxy|attach|log|exec|portforward"}[30m]))
+ -
+ sum by (cluster) (rate(apiserver_request_slo_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]))
+ )
+ /
+ sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[30m]))
+ labels:
+ verb: write
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverBurnrate }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverBurnrate }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ record: apiserver_request:burnrate30m
+ - expr: |-
+ (
+ (
+ # too slow
+ sum by (cluster) (rate(apiserver_request_slo_duration_seconds_count{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",subresource!~"proxy|attach|log|exec|portforward"}[3d]))
+ -
+ sum by (cluster) (rate(apiserver_request_slo_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]))
+ )
+ /
+ sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[3d]))
+ labels:
+ verb: write
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverBurnrate }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverBurnrate }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ record: apiserver_request:burnrate3d
+ - expr: |-
+ (
+ (
+ # too slow
+ sum by (cluster) (rate(apiserver_request_slo_duration_seconds_count{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",subresource!~"proxy|attach|log|exec|portforward"}[5m]))
+ -
+ sum by (cluster) (rate(apiserver_request_slo_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]))
+ )
+ /
+ sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[5m]))
+ labels:
+ verb: write
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverBurnrate }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverBurnrate }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ record: apiserver_request:burnrate5m
+ - expr: |-
+ (
+ (
+ # too slow
+ sum by (cluster) (rate(apiserver_request_slo_duration_seconds_count{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",subresource!~"proxy|attach|log|exec|portforward"}[6h]))
+ -
+ sum by (cluster) (rate(apiserver_request_slo_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]))
+ )
+ /
+ sum by (cluster) (rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[6h]))
+ labels:
+ verb: write
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverBurnrate }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverBurnrate }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ record: apiserver_request:burnrate6h
+{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-apiserver-error.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-apiserver-error.yaml
deleted file mode 100755
index baa6b79e2f..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-apiserver-error.yaml
+++ /dev/null
@@ -1,173 +0,0 @@
-# Generated from 'kube-apiserver-error' group from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/prometheus-rules.yaml
-# Do not change in-place! In order to change this file first read following link:
-# https://github.com/helm/charts/tree/master/stable/prometheus-operator/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 }}
-apiVersion: monitoring.coreos.com/v1
-kind: PrometheusRule
-metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kube-apiserver-error" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
- labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.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-error
- rules:
- - alert: ErrorBudgetBurn
- annotations:
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-errorbudgetburn
- expr: |-
- (
- status_class_5xx:apiserver_request_total:ratio_rate1h{job="apiserver"} > (14.4*0.010000)
- and
- status_class_5xx:apiserver_request_total:ratio_rate5m{job="apiserver"} > (14.4*0.010000)
- )
- or
- (
- status_class_5xx:apiserver_request_total:ratio_rate6h{job="apiserver"} > (6*0.010000)
- and
- status_class_5xx:apiserver_request_total:ratio_rate30m{job="apiserver"} > (6*0.010000)
- )
- labels:
- job: apiserver
- severity: critical
- - alert: ErrorBudgetBurn
- annotations:
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-errorbudgetburn
- expr: |-
- (
- status_class_5xx:apiserver_request_total:ratio_rate1d{job="apiserver"} > (3*0.010000)
- and
- status_class_5xx:apiserver_request_total:ratio_rate2h{job="apiserver"} > (3*0.010000)
- )
- or
- (
- status_class_5xx:apiserver_request_total:ratio_rate3d{job="apiserver"} > (0.010000)
- and
- status_class_5xx:apiserver_request_total:ratio_rate6h{job="apiserver"} > (0.010000)
- )
- labels:
- job: apiserver
- severity: warning
- - expr: |-
- sum by (status_class) (
- label_replace(
- rate(apiserver_request_total{job="apiserver"}[5m]
- ), "status_class", "${1}xx", "code", "([0-9])..")
- )
- labels:
- job: apiserver
- record: status_class:apiserver_request_total:rate5m
- - expr: |-
- sum by (status_class) (
- label_replace(
- rate(apiserver_request_total{job="apiserver"}[30m]
- ), "status_class", "${1}xx", "code", "([0-9])..")
- )
- labels:
- job: apiserver
- record: status_class:apiserver_request_total:rate30m
- - expr: |-
- sum by (status_class) (
- label_replace(
- rate(apiserver_request_total{job="apiserver"}[1h]
- ), "status_class", "${1}xx", "code", "([0-9])..")
- )
- labels:
- job: apiserver
- record: status_class:apiserver_request_total:rate1h
- - expr: |-
- sum by (status_class) (
- label_replace(
- rate(apiserver_request_total{job="apiserver"}[2h]
- ), "status_class", "${1}xx", "code", "([0-9])..")
- )
- labels:
- job: apiserver
- record: status_class:apiserver_request_total:rate2h
- - expr: |-
- sum by (status_class) (
- label_replace(
- rate(apiserver_request_total{job="apiserver"}[6h]
- ), "status_class", "${1}xx", "code", "([0-9])..")
- )
- labels:
- job: apiserver
- record: status_class:apiserver_request_total:rate6h
- - expr: |-
- sum by (status_class) (
- label_replace(
- rate(apiserver_request_total{job="apiserver"}[1d]
- ), "status_class", "${1}xx", "code", "([0-9])..")
- )
- labels:
- job: apiserver
- record: status_class:apiserver_request_total:rate1d
- - expr: |-
- sum by (status_class) (
- label_replace(
- rate(apiserver_request_total{job="apiserver"}[3d]
- ), "status_class", "${1}xx", "code", "([0-9])..")
- )
- labels:
- job: apiserver
- record: status_class:apiserver_request_total:rate3d
- - expr: |-
- sum(status_class:apiserver_request_total:rate5m{job="apiserver",status_class="5xx"})
- /
- sum(status_class:apiserver_request_total:rate5m{job="apiserver"})
- labels:
- job: apiserver
- record: status_class_5xx:apiserver_request_total:ratio_rate5m
- - expr: |-
- sum(status_class:apiserver_request_total:rate30m{job="apiserver",status_class="5xx"})
- /
- sum(status_class:apiserver_request_total:rate30m{job="apiserver"})
- labels:
- job: apiserver
- record: status_class_5xx:apiserver_request_total:ratio_rate30m
- - expr: |-
- sum(status_class:apiserver_request_total:rate1h{job="apiserver",status_class="5xx"})
- /
- sum(status_class:apiserver_request_total:rate1h{job="apiserver"})
- labels:
- job: apiserver
- record: status_class_5xx:apiserver_request_total:ratio_rate1h
- - expr: |-
- sum(status_class:apiserver_request_total:rate2h{job="apiserver",status_class="5xx"})
- /
- sum(status_class:apiserver_request_total:rate2h{job="apiserver"})
- labels:
- job: apiserver
- record: status_class_5xx:apiserver_request_total:ratio_rate2h
- - expr: |-
- sum(status_class:apiserver_request_total:rate6h{job="apiserver",status_class="5xx"})
- /
- sum(status_class:apiserver_request_total:rate6h{job="apiserver"})
- labels:
- job: apiserver
- record: status_class_5xx:apiserver_request_total:ratio_rate6h
- - expr: |-
- sum(status_class:apiserver_request_total:rate1d{job="apiserver",status_class="5xx"})
- /
- sum(status_class:apiserver_request_total:rate1d{job="apiserver"})
- labels:
- job: apiserver
- record: status_class_5xx:apiserver_request_total:ratio_rate1d
- - expr: |-
- sum(status_class:apiserver_request_total:rate3d{job="apiserver",status_class="5xx"})
- /
- sum(status_class:apiserver_request_total:rate3d{job="apiserver"})
- labels:
- job: apiserver
- record: status_class_5xx:apiserver_request_total:ratio_rate3d
-{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-apiserver-histogram.rules.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-apiserver-histogram.rules.yaml
new file mode 100644
index 0000000000..1e8346e2a0
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-apiserver-histogram.rules.yaml
@@ -0,0 +1,53 @@
+{{- /*
+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 .Values.kubeApiServer.enabled .Values.defaultRules.rules.kubeApiserverHistogram }}
+apiVersion: monitoring.coreos.com/v1
+kind: PrometheusRule
+metadata:
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "kube-apiserver-histogram.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-histogram.rules
+ rules:
+ - expr: histogram_quantile(0.99, sum by (cluster, le, resource) (rate(apiserver_request_slo_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",subresource!~"proxy|attach|log|exec|portforward"}[5m]))) > 0
+ labels:
+ quantile: '0.99'
+ verb: read
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverHistogram }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverHistogram }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ record: cluster_quantile:apiserver_request_slo_duration_seconds:histogram_quantile
+ - expr: histogram_quantile(0.99, sum by (cluster, le, resource) (rate(apiserver_request_slo_duration_seconds_bucket{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",subresource!~"proxy|attach|log|exec|portforward"}[5m]))) > 0
+ labels:
+ quantile: '0.99'
+ verb: write
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverHistogram }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverHistogram }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ record: cluster_quantile:apiserver_request_slo_duration_seconds:histogram_quantile
+{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-apiserver-slos.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-apiserver-slos.yaml
old mode 100755
new mode 100644
index f9a1dff5c6..075bb9da12
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-apiserver-slos.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-apiserver-slos.yaml
@@ -1,18 +1,18 @@
{{- /*
-Generated from 'kube-apiserver-slos' group from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/prometheus-rules.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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.kubeApiserverSlos }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kube-apiserver-slos" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "kube-apiserver-slos" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
{{- if .Values.defaultRules.labels }}
{{ toYaml .Values.defaultRules.labels | indent 4 }}
{{- end }}
@@ -24,48 +24,136 @@ spec:
groups:
- name: kube-apiserver-slos
rules:
+{{- if not (.Values.defaultRules.disabled.KubeAPIErrorBudgetBurn | default false) }}
- alert: KubeAPIErrorBudgetBurn
annotations:
- message: The API server is burning too much error budget
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeapierrorbudgetburn
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubeApiserverSlos }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubeApiserverSlos | indent 8 }}
+{{- end }}
+ description: The API server is burning too much error budget.
+ 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)
and
sum(apiserver_request:burnrate5m) > (14.40 * 0.01000)
for: 2m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
+ long: 1h
severity: critical
+ short: 5m
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverSlos }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverSlos }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeAPIErrorBudgetBurn | default false) }}
- alert: KubeAPIErrorBudgetBurn
annotations:
- message: The API server is burning too much error budget
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeapierrorbudgetburn
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubeApiserverSlos }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubeApiserverSlos | indent 8 }}
+{{- end }}
+ description: The API server is burning too much error budget.
+ 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)
and
sum(apiserver_request:burnrate30m) > (6.00 * 0.01000)
for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
+ long: 6h
severity: critical
+ short: 30m
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverSlos }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverSlos }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeAPIErrorBudgetBurn | default false) }}
- alert: KubeAPIErrorBudgetBurn
annotations:
- message: The API server is burning too much error budget
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeapierrorbudgetburn
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubeApiserverSlos }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubeApiserverSlos | indent 8 }}
+{{- end }}
+ description: The API server is burning too much error budget.
+ 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)
and
sum(apiserver_request:burnrate2h) > (3.00 * 0.01000)
for: 1h
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
+ long: 1d
severity: warning
+ short: 2h
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverSlos }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverSlos }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeAPIErrorBudgetBurn | default false) }}
- alert: KubeAPIErrorBudgetBurn
annotations:
- message: The API server is burning too much error budget
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeapierrorbudgetburn
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubeApiserverSlos }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubeApiserverSlos | indent 8 }}
+{{- end }}
+ description: The API server is burning too much error budget.
+ 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)
and
sum(apiserver_request:burnrate6h) > (1.00 * 0.01000)
for: 3h
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
+ long: 3d
severity: warning
+ short: 6h
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverSlos }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeApiserverSlos }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-apiserver.rules.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-apiserver.rules.yaml
deleted file mode 100755
index 06d6351415..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-apiserver.rules.yaml
+++ /dev/null
@@ -1,393 +0,0 @@
-{{- /*
-Generated from 'kube-apiserver.rules' group from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/prometheus-rules.yaml
-Do not change in-place! In order to change this file first read following link:
-https://github.com/helm/charts/tree/master/stable/prometheus-operator/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 "prometheus-operator.fullname" .) "kube-apiserver.rules" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
- labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.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(rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"LIST|GET"}[1d]))
- -
- (
- sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="resource",le="0.1"}[1d])) +
- sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="namespace",le="0.5"}[1d])) +
- sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="cluster",le="5"}[1d]))
- )
- )
- +
- # errors
- sum(rate(apiserver_request_total{job="apiserver",verb=~"LIST|GET",code=~"5.."}[1d]))
- )
- /
- sum(rate(apiserver_request_total{job="apiserver",verb=~"LIST|GET"}[1d]))
- labels:
- verb: read
- record: apiserver_request:burnrate1d
- - expr: |-
- (
- (
- # too slow
- sum(rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"LIST|GET"}[1h]))
- -
- (
- sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="resource",le="0.1"}[1h])) +
- sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="namespace",le="0.5"}[1h])) +
- sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="cluster",le="5"}[1h]))
- )
- )
- +
- # errors
- sum(rate(apiserver_request_total{job="apiserver",verb=~"LIST|GET",code=~"5.."}[1h]))
- )
- /
- sum(rate(apiserver_request_total{job="apiserver",verb=~"LIST|GET"}[1h]))
- labels:
- verb: read
- record: apiserver_request:burnrate1h
- - expr: |-
- (
- (
- # too slow
- sum(rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"LIST|GET"}[2h]))
- -
- (
- sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="resource",le="0.1"}[2h])) +
- sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="namespace",le="0.5"}[2h])) +
- sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="cluster",le="5"}[2h]))
- )
- )
- +
- # errors
- sum(rate(apiserver_request_total{job="apiserver",verb=~"LIST|GET",code=~"5.."}[2h]))
- )
- /
- sum(rate(apiserver_request_total{job="apiserver",verb=~"LIST|GET"}[2h]))
- labels:
- verb: read
- record: apiserver_request:burnrate2h
- - expr: |-
- (
- (
- # too slow
- sum(rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"LIST|GET"}[30m]))
- -
- (
- sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="resource",le="0.1"}[30m])) +
- sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="namespace",le="0.5"}[30m])) +
- sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="cluster",le="5"}[30m]))
- )
- )
- +
- # errors
- sum(rate(apiserver_request_total{job="apiserver",verb=~"LIST|GET",code=~"5.."}[30m]))
- )
- /
- sum(rate(apiserver_request_total{job="apiserver",verb=~"LIST|GET"}[30m]))
- labels:
- verb: read
- record: apiserver_request:burnrate30m
- - expr: |-
- (
- (
- # too slow
- sum(rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"LIST|GET"}[3d]))
- -
- (
- sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="resource",le="0.1"}[3d])) +
- sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="namespace",le="0.5"}[3d])) +
- sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="cluster",le="5"}[3d]))
- )
- )
- +
- # errors
- sum(rate(apiserver_request_total{job="apiserver",verb=~"LIST|GET",code=~"5.."}[3d]))
- )
- /
- sum(rate(apiserver_request_total{job="apiserver",verb=~"LIST|GET"}[3d]))
- labels:
- verb: read
- record: apiserver_request:burnrate3d
- - expr: |-
- (
- (
- # too slow
- sum(rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"LIST|GET"}[5m]))
- -
- (
- sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="resource",le="0.1"}[5m])) +
- sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="namespace",le="0.5"}[5m])) +
- sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="cluster",le="5"}[5m]))
- )
- )
- +
- # errors
- sum(rate(apiserver_request_total{job="apiserver",verb=~"LIST|GET",code=~"5.."}[5m]))
- )
- /
- sum(rate(apiserver_request_total{job="apiserver",verb=~"LIST|GET"}[5m]))
- labels:
- verb: read
- record: apiserver_request:burnrate5m
- - expr: |-
- (
- (
- # too slow
- sum(rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"LIST|GET"}[6h]))
- -
- (
- sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="resource",le="0.1"}[6h])) +
- sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="namespace",le="0.5"}[6h])) +
- sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="cluster",le="5"}[6h]))
- )
- )
- +
- # errors
- sum(rate(apiserver_request_total{job="apiserver",verb=~"LIST|GET",code=~"5.."}[6h]))
- )
- /
- sum(rate(apiserver_request_total{job="apiserver",verb=~"LIST|GET"}[6h]))
- labels:
- verb: read
- record: apiserver_request:burnrate6h
- - expr: |-
- (
- (
- # too slow
- sum(rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[1d]))
- -
- sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",le="1"}[1d]))
- )
- +
- sum(rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",code=~"5.."}[1d]))
- )
- /
- sum(rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[1d]))
- labels:
- verb: write
- record: apiserver_request:burnrate1d
- - expr: |-
- (
- (
- # too slow
- sum(rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[1h]))
- -
- sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",le="1"}[1h]))
- )
- +
- sum(rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",code=~"5.."}[1h]))
- )
- /
- sum(rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[1h]))
- labels:
- verb: write
- record: apiserver_request:burnrate1h
- - expr: |-
- (
- (
- # too slow
- sum(rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[2h]))
- -
- sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",le="1"}[2h]))
- )
- +
- sum(rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",code=~"5.."}[2h]))
- )
- /
- sum(rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[2h]))
- labels:
- verb: write
- record: apiserver_request:burnrate2h
- - expr: |-
- (
- (
- # too slow
- sum(rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[30m]))
- -
- sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",le="1"}[30m]))
- )
- +
- sum(rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",code=~"5.."}[30m]))
- )
- /
- sum(rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[30m]))
- labels:
- verb: write
- record: apiserver_request:burnrate30m
- - expr: |-
- (
- (
- # too slow
- sum(rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[3d]))
- -
- sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",le="1"}[3d]))
- )
- +
- sum(rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",code=~"5.."}[3d]))
- )
- /
- sum(rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[3d]))
- labels:
- verb: write
- record: apiserver_request:burnrate3d
- - expr: |-
- (
- (
- # too slow
- sum(rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[5m]))
- -
- sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",le="1"}[5m]))
- )
- +
- sum(rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",code=~"5.."}[5m]))
- )
- /
- sum(rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[5m]))
- labels:
- verb: write
- record: apiserver_request:burnrate5m
- - expr: |-
- (
- (
- # too slow
- sum(rate(apiserver_request_duration_seconds_count{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[6h]))
- -
- sum(rate(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",le="1"}[6h]))
- )
- +
- sum(rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE",code=~"5.."}[6h]))
- )
- /
- sum(rate(apiserver_request_total{job="apiserver",verb=~"POST|PUT|PATCH|DELETE"}[6h]))
- labels:
- verb: write
- record: apiserver_request:burnrate6h
- - expr: |-
- 1 - (
- (
- # write too slow
- sum(increase(apiserver_request_duration_seconds_count{verb=~"POST|PUT|PATCH|DELETE"}[30d]))
- -
- sum(increase(apiserver_request_duration_seconds_bucket{verb=~"POST|PUT|PATCH|DELETE",le="1"}[30d]))
- ) +
- (
- # read too slow
- sum(increase(apiserver_request_duration_seconds_count{verb=~"LIST|GET"}[30d]))
- -
- (
- sum(increase(apiserver_request_duration_seconds_bucket{verb=~"LIST|GET",scope="resource",le="0.1"}[30d])) +
- sum(increase(apiserver_request_duration_seconds_bucket{verb=~"LIST|GET",scope="namespace",le="0.5"}[30d])) +
- sum(increase(apiserver_request_duration_seconds_bucket{verb=~"LIST|GET",scope="cluster",le="5"}[30d]))
- )
- ) +
- # errors
- sum(code:apiserver_request_total:increase30d{code=~"5.."})
- )
- /
- sum(code:apiserver_request_total:increase30d)
- labels:
- verb: all
- record: apiserver_request:availability30d
- - expr: |-
- 1 - (
- sum(increase(apiserver_request_duration_seconds_count{job="apiserver",verb=~"LIST|GET"}[30d]))
- -
- (
- # too slow
- sum(increase(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="resource",le="0.1"}[30d])) +
- sum(increase(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="namespace",le="0.5"}[30d])) +
- sum(increase(apiserver_request_duration_seconds_bucket{job="apiserver",verb=~"LIST|GET",scope="cluster",le="5"}[30d]))
- )
- +
- # errors
- sum(code:apiserver_request_total:increase30d{verb="read",code=~"5.."})
- )
- /
- sum(code:apiserver_request_total:increase30d{verb="read"})
- labels:
- verb: read
- record: apiserver_request:availability30d
- - expr: |-
- 1 - (
- (
- # too slow
- sum(increase(apiserver_request_duration_seconds_count{verb=~"POST|PUT|PATCH|DELETE"}[30d]))
- -
- sum(increase(apiserver_request_duration_seconds_bucket{verb=~"POST|PUT|PATCH|DELETE",le="1"}[30d]))
- )
- +
- # errors
- sum(code:apiserver_request_total:increase30d{verb="write",code=~"5.."})
- )
- /
- sum(code:apiserver_request_total:increase30d{verb="write"})
- labels:
- verb: write
- record: apiserver_request:availability30d
- - expr: sum by (code, verb) (increase(apiserver_request_total{job="apiserver"}[30d]))
- record: code_verb:apiserver_request_total:increase30d
- - expr: sum by (code) (code_verb:apiserver_request_total:increase30d{verb=~"LIST|GET"})
- labels:
- verb: read
- record: code:apiserver_request_total:increase30d
- - expr: sum by (code) (code_verb:apiserver_request_total:increase30d{verb=~"POST|PUT|PATCH|DELETE"})
- labels:
- verb: write
- record: code:apiserver_request_total:increase30d
- - expr: sum by (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 (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 (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 (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: |-
- sum(rate(apiserver_request_duration_seconds_sum{subresource!="log",verb!~"LIST|WATCH|WATCHLIST|DELETECOLLECTION|PROXY|CONNECT"}[5m])) without(instance, pod)
- /
- sum(rate(apiserver_request_duration_seconds_count{subresource!="log",verb!~"LIST|WATCH|WATCHLIST|DELETECOLLECTION|PROXY|CONNECT"}[5m])) without(instance, pod)
- record: cluster:apiserver_request_duration_seconds:mean5m
- - 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/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-prometheus-general.rules.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-prometheus-general.rules.yaml
old mode 100755
new mode 100644
index d93547b175..b6e378508f
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-prometheus-general.rules.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-prometheus-general.rules.yaml
@@ -1,18 +1,18 @@
{{- /*
-Generated from 'kube-prometheus-general.rules' group from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/prometheus-rules.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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.kubePrometheusGeneral }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kube-prometheus-general.rules" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "kube-prometheus-general.rules" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
{{- if .Values.defaultRules.labels }}
{{ toYaml .Values.defaultRules.labels | indent 4 }}
{{- end }}
@@ -26,6 +26,24 @@ spec:
rules:
- expr: count without(instance, pod, node) (up == 1)
record: count:up1
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubePrometheusGeneral }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubePrometheusGeneral }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
- expr: count without(instance, pod, node) (up == 0)
record: count:up0
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubePrometheusGeneral }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubePrometheusGeneral }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-prometheus-node-recording.rules.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-prometheus-node-recording.rules.yaml
old mode 100755
new mode 100644
index e41fc46b0b..7d8e937d68
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-prometheus-node-recording.rules.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-prometheus-node-recording.rules.yaml
@@ -1,18 +1,18 @@
{{- /*
-Generated from 'kube-prometheus-node-recording.rules' group from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/prometheus-rules.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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.kubePrometheusNodeRecording }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kube-prometheus-node-recording.rules" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "kube-prometheus-node-recording.rules" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
{{- if .Values.defaultRules.labels }}
{{ toYaml .Values.defaultRules.labels | indent 4 }}
{{- end }}
@@ -24,18 +24,70 @@ spec:
groups:
- name: kube-prometheus-node-recording.rules
rules:
- - expr: sum(rate(node_cpu_seconds_total{mode!="idle",mode!="iowait"}[3m])) BY (instance)
+ - expr: sum(rate(node_cpu_seconds_total{mode!="idle",mode!="iowait",mode!="steal"}[3m])) BY (instance)
record: instance:node_cpu:rate:sum
- - expr: sum((node_filesystem_size_bytes{mountpoint="/"} - node_filesystem_free_bytes{mountpoint="/"})) BY (instance)
- record: instance:node_filesystem_usage:sum
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubePrometheusNodeRecording }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubePrometheusNodeRecording }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
- expr: sum(rate(node_network_receive_bytes_total[3m])) BY (instance)
record: instance:node_network_receive_bytes:rate:sum
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubePrometheusNodeRecording }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubePrometheusNodeRecording }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
- expr: sum(rate(node_network_transmit_bytes_total[3m])) BY (instance)
record: instance:node_network_transmit_bytes:rate:sum
- - expr: sum(rate(node_cpu_seconds_total{mode!="idle",mode!="iowait"}[5m])) WITHOUT (cpu, mode) / ON(instance) GROUP_LEFT() count(sum(node_cpu_seconds_total) BY (instance, cpu)) BY (instance)
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubePrometheusNodeRecording }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubePrometheusNodeRecording }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: sum(rate(node_cpu_seconds_total{mode!="idle",mode!="iowait",mode!="steal"}[5m])) WITHOUT (cpu, mode) / ON(instance) GROUP_LEFT() count(sum(node_cpu_seconds_total) BY (instance, cpu)) BY (instance)
record: instance:node_cpu:ratio
- - expr: sum(rate(node_cpu_seconds_total{mode!="idle",mode!="iowait"}[5m]))
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubePrometheusNodeRecording }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubePrometheusNodeRecording }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - 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))
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubePrometheusNodeRecording }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubePrometheusNodeRecording }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: cluster:node_cpu:sum_rate5m / count(sum(node_cpu_seconds_total) BY (instance, cpu))
record: cluster:node_cpu:ratio
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubePrometheusNodeRecording }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubePrometheusNodeRecording }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-scheduler.rules.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-scheduler.rules.yaml
old mode 100755
new mode 100644
index 53d730a43d..ef5639e07d
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-scheduler.rules.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-scheduler.rules.yaml
@@ -1,18 +1,18 @@
{{- /*
-Generated from 'kube-scheduler.rules' group from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/prometheus-rules.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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.kubeScheduler.enabled .Values.defaultRules.rules.kubeScheduler }}
+{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.kubeScheduler.enabled .Values.defaultRules.rules.kubeSchedulerRecording }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kube-scheduler.rules" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "kube-scheduler.rules" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
{{- if .Values.defaultRules.labels }}
{{ toYaml .Values.defaultRules.labels | indent 4 }}
{{- end }}
@@ -27,37 +27,109 @@ spec:
- expr: histogram_quantile(0.99, sum(rate(scheduler_e2e_scheduling_duration_seconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod))
labels:
quantile: '0.99'
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeSchedulerRecording }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeSchedulerRecording }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
record: cluster_quantile:scheduler_e2e_scheduling_duration_seconds:histogram_quantile
- expr: histogram_quantile(0.99, sum(rate(scheduler_scheduling_algorithm_duration_seconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod))
labels:
quantile: '0.99'
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeSchedulerRecording }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeSchedulerRecording }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
record: cluster_quantile:scheduler_scheduling_algorithm_duration_seconds:histogram_quantile
- expr: histogram_quantile(0.99, sum(rate(scheduler_binding_duration_seconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod))
labels:
quantile: '0.99'
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeSchedulerRecording }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeSchedulerRecording }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
record: cluster_quantile:scheduler_binding_duration_seconds:histogram_quantile
- expr: histogram_quantile(0.9, sum(rate(scheduler_e2e_scheduling_duration_seconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod))
labels:
quantile: '0.9'
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeSchedulerRecording }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeSchedulerRecording }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
record: cluster_quantile:scheduler_e2e_scheduling_duration_seconds:histogram_quantile
- expr: histogram_quantile(0.9, sum(rate(scheduler_scheduling_algorithm_duration_seconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod))
labels:
quantile: '0.9'
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeSchedulerRecording }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeSchedulerRecording }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
record: cluster_quantile:scheduler_scheduling_algorithm_duration_seconds:histogram_quantile
- expr: histogram_quantile(0.9, sum(rate(scheduler_binding_duration_seconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod))
labels:
quantile: '0.9'
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeSchedulerRecording }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeSchedulerRecording }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
record: cluster_quantile:scheduler_binding_duration_seconds:histogram_quantile
- expr: histogram_quantile(0.5, sum(rate(scheduler_e2e_scheduling_duration_seconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod))
labels:
quantile: '0.5'
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeSchedulerRecording }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeSchedulerRecording }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
record: cluster_quantile:scheduler_e2e_scheduling_duration_seconds:histogram_quantile
- expr: histogram_quantile(0.5, sum(rate(scheduler_scheduling_algorithm_duration_seconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod))
labels:
quantile: '0.5'
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeSchedulerRecording }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeSchedulerRecording }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
record: cluster_quantile:scheduler_scheduling_algorithm_duration_seconds:histogram_quantile
- expr: histogram_quantile(0.5, sum(rate(scheduler_binding_duration_seconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod))
labels:
quantile: '0.5'
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeSchedulerRecording }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeSchedulerRecording }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
record: cluster_quantile:scheduler_binding_duration_seconds:histogram_quantile
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-state-metrics.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-state-metrics.yaml
old mode 100755
new mode 100644
index 56a1891323..55ca01658a
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-state-metrics.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-state-metrics.yaml
@@ -1,18 +1,18 @@
{{- /*
-Generated from 'kube-state-metrics' group from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/prometheus-rules.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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.kubeStateMetrics }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kube-state-metrics" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "kube-state-metrics" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
{{- if .Values.defaultRules.labels }}
{{ toYaml .Values.defaultRules.labels | indent 4 }}
{{- end }}
@@ -24,28 +24,128 @@ spec:
groups:
- name: kube-state-metrics
rules:
+{{- if not (.Values.defaultRules.disabled.KubeStateMetricsListErrors | default false) }}
- alert: KubeStateMetricsListErrors
annotations:
- message: 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
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubeStateMetrics }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubeStateMetrics | 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 }}/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]))
+ (sum(rate(kube_state_metrics_list_total{job="kube-state-metrics",result="error"}[5m])) by (cluster)
/
- sum(rate(kube_state_metrics_list_total{job="kube-state-metrics"}[5m])))
+ sum(rate(kube_state_metrics_list_total{job="kube-state-metrics"}[5m])) by (cluster))
> 0.01
for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeStateMetrics }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeStateMetrics }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeStateMetricsWatchErrors | default false) }}
- alert: KubeStateMetricsWatchErrors
annotations:
- message: 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
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubeStateMetrics }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubeStateMetrics | 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 }}/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]))
+ (sum(rate(kube_state_metrics_watch_total{job="kube-state-metrics",result="error"}[5m])) by (cluster)
/
- sum(rate(kube_state_metrics_watch_total{job="kube-state-metrics"}[5m])))
+ sum(rate(kube_state_metrics_watch_total{job="kube-state-metrics"}[5m])) by (cluster))
> 0.01
for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeStateMetrics }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeStateMetrics }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeStateMetricsShardingMismatch | default false) }}
+ - alert: KubeStateMetricsShardingMismatch
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubeStateMetrics }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubeStateMetrics | 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 }}/kube-state-metrics/kubestatemetricsshardingmismatch
+ summary: kube-state-metrics sharding is misconfigured.
+ expr: stdvar (kube_state_metrics_total_shards{job="kube-state-metrics"}) by (cluster) != 0
+ for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeStateMetrics }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeStateMetrics }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeStateMetricsShardsMissing | default false) }}
+ - alert: KubeStateMetricsShardsMissing
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubeStateMetrics }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubeStateMetrics | indent 8 }}
+{{- end }}
+ description: kube-state-metrics shards are missing, some Kubernetes objects are not being exposed.
+ 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"}) by (cluster) - 1
+ -
+ sum( 2 ^ max by (cluster, shard_ordinal) (kube_state_metrics_shard_ordinal{job="kube-state-metrics"}) ) by (cluster)
+ != 0
+ for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeStateMetrics }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeStateMetrics }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubelet.rules.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubelet.rules.yaml
old mode 100755
new mode 100644
index f21f36c4ca..891af33dcb
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubelet.rules.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubelet.rules.yaml
@@ -1,18 +1,18 @@
{{- /*
-Generated from 'kubelet.rules' group from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/prometheus-rules.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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.kubelet.enabled .Values.defaultRules.rules.kubelet }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubelet.rules" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "kubelet.rules" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
{{- if .Values.defaultRules.labels }}
{{ toYaml .Values.defaultRules.labels | indent 4 }}
{{- end }}
@@ -24,16 +24,40 @@ 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="kubelet", metrics_path="/metrics"})
+ - expr: histogram_quantile(0.99, sum(rate(kubelet_pleg_relist_duration_seconds_bucket{job="kubelet", metrics_path="/metrics"}[5m])) by (cluster, instance, le) * on(cluster, instance) group_left(node) kubelet_node_name{job="kubelet", metrics_path="/metrics"})
labels:
quantile: '0.99'
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubelet }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubelet }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
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="kubelet", metrics_path="/metrics"})
+ - expr: histogram_quantile(0.9, sum(rate(kubelet_pleg_relist_duration_seconds_bucket{job="kubelet", metrics_path="/metrics"}[5m])) by (cluster, instance, le) * on(cluster, instance) group_left(node) kubelet_node_name{job="kubelet", metrics_path="/metrics"})
labels:
quantile: '0.9'
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubelet }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubelet }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
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="kubelet", metrics_path="/metrics"})
+ - expr: histogram_quantile(0.5, sum(rate(kubelet_pleg_relist_duration_seconds_bucket{job="kubelet", metrics_path="/metrics"}[5m])) by (cluster, instance, le) * on(cluster, instance) group_left(node) kubelet_node_name{job="kubelet", metrics_path="/metrics"})
labels:
quantile: '0.5'
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubelet }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubelet }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
record: node_quantile:kubelet_pleg_relist_duration_seconds:histogram_quantile
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-absent.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-absent.yaml
deleted file mode 100755
index e94c303a0c..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-absent.yaml
+++ /dev/null
@@ -1,127 +0,0 @@
-# Generated from 'kubernetes-absent' group from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/prometheus-rules.yaml
-# Do not change in-place! In order to change this file first read following link:
-# https://github.com/helm/charts/tree/master/stable/prometheus-operator/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.kubernetesAbsent }}
-{{- $operatorJob := printf "%s-%s" (include "prometheus-operator.fullname" .) "operator" }}
-{{- $prometheusJob := printf "%s-%s" (include "prometheus-operator.fullname" .) "prometheus" }}
-{{- $alertmanagerJob := printf "%s-%s" (include "prometheus-operator.fullname" .) "alertmanager" }}
-{{- $namespace := .Release.Namespace }}
-apiVersion: monitoring.coreos.com/v1
-kind: PrometheusRule
-metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubernetes-absent" | trunc 63 | trimSuffix "-" }}
- namespace: {{ $namespace }}
- labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.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-absent
- rules:
-{{- if .Values.alertmanager.enabled }}
- - alert: AlertmanagerDown
- annotations:
- message: Alertmanager has disappeared from Prometheus target discovery.
- runbook_url: {{ .Values.defaultRules.runbook_url }}alert-name-alertmanagerdown
- expr: absent(up{job="{{ $alertmanagerJob }}",namespace="{{ $namespace }}"} == 1)
- for: 15m
- labels:
- severity: critical
-{{- end }}
-{{- if .Values.kubeDns.enabled }}
- - alert: CoreDNSDown
- annotations:
- message: CoreDNS has disappeared from Prometheus target discovery.
- runbook_url: {{ .Values.defaultRules.runbook_url }}alert-name-corednsdown
- expr: absent(up{job="kube-dns"} == 1)
- for: 15m
- labels:
- severity: critical
-{{- end }}
-{{- if .Values.kubeApiServer.enabled }}
- - alert: KubeAPIDown
- annotations:
- message: KubeAPI has disappeared from Prometheus target discovery.
- runbook_url: {{ .Values.defaultRules.runbook_url }}alert-name-kubeapidown
- expr: absent(up{job="apiserver"} == 1)
- for: 15m
- labels:
- severity: critical
-{{- end }}
-{{- if .Values.kubeControllerManager.enabled }}
- - alert: KubeControllerManagerDown
- annotations:
- message: KubeControllerManager has disappeared from Prometheus target discovery.
- runbook_url: {{ .Values.defaultRules.runbook_url }}alert-name-kubecontrollermanagerdown
- expr: absent(up{job="kube-controller-manager"} == 1)
- for: 15m
- labels:
- severity: critical
-{{- end }}
-{{- if .Values.kubeScheduler.enabled }}
- - alert: KubeSchedulerDown
- annotations:
- message: KubeScheduler has disappeared from Prometheus target discovery.
- runbook_url: {{ .Values.defaultRules.runbook_url }}alert-name-kubeschedulerdown
- expr: absent(up{job="kube-scheduler"} == 1)
- for: 15m
- labels:
- severity: critical
-{{- end }}
-{{- if .Values.kubeStateMetrics.enabled }}
- - alert: KubeStateMetricsDown
- annotations:
- message: KubeStateMetrics has disappeared from Prometheus target discovery.
- runbook_url: {{ .Values.defaultRules.runbook_url }}alert-name-kubestatemetricsdown
- expr: absent(up{job="kube-state-metrics"} == 1)
- for: 15m
- labels:
- severity: critical
-{{- end }}
-{{- if .Values.prometheusOperator.kubeletService.enabled }}
- - alert: KubeletDown
- annotations:
- message: Kubelet has disappeared from Prometheus target discovery.
- runbook_url: {{ .Values.defaultRules.runbook_url }}alert-name-kubeletdown
- expr: absent(up{job="kubelet"} == 1)
- for: 15m
- labels:
- severity: critical
-{{- end }}
-{{- if .Values.nodeExporter.enabled }}
- - alert: NodeExporterDown
- annotations:
- message: NodeExporter has disappeared from Prometheus target discovery.
- runbook_url: {{ .Values.defaultRules.runbook_url }}alert-name-nodeexporterdown
- expr: absent(up{job="node-exporter"} == 1)
- for: 15m
- labels:
- severity: critical
-{{- end }}
- - alert: PrometheusDown
- annotations:
- message: Prometheus has disappeared from Prometheus target discovery.
- runbook_url: {{ .Values.defaultRules.runbook_url }}alert-name-prometheusdown
- expr: absent(up{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"} == 1)
- for: 15m
- labels:
- severity: critical
-{{- if .Values.prometheusOperator.enabled }}
- - alert: PrometheusOperatorDown
- annotations:
- message: PrometheusOperator has disappeared from Prometheus target discovery.
- runbook_url: {{ .Values.defaultRules.runbook_url }}alert-name-prometheusoperatordown
- expr: absent(up{job="{{ $operatorJob }}",namespace="{{ $namespace }}"} == 1)
- for: 15m
- labels:
- severity: critical
-{{- end }}
-{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-apps.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-apps.yaml
old mode 100755
new mode 100644
index 8e64868d67..513a1f309e
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-apps.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-apps.yaml
@@ -1,19 +1,19 @@
{{- /*
-Generated from 'kubernetes-apps' group from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/prometheus-rules.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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.kubeStateMetrics.enabled .Values.defaultRules.rules.kubernetesApps }}
+{{- 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 "prometheus-operator.fullname" .) "kubernetes-apps" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "kubernetes-apps" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
{{- if .Values.defaultRules.labels }}
{{ toYaml .Values.defaultRules.labels | indent 4 }}
{{- end }}
@@ -25,181 +25,543 @@ spec:
groups:
- name: kubernetes-apps
rules:
+{{- if not (.Values.defaultRules.disabled.KubePodCrashLooping | default false) }}
- alert: KubePodCrashLooping
annotations:
- message: Pod {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod {{`}}`}} ({{`{{`}} $labels.container {{`}}`}}) is restarting {{`{{`}} printf "%.2f" $value {{`}}`}} times / 5 minutes.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubepodcrashlooping
- expr: rate(kube_pod_container_status_restarts_total{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}[15m]) * 60 * 5 > 0
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesApps }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesApps | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
- severity: critical
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesApps }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesApps }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubePodNotReady | default false) }}
- alert: KubePodNotReady
annotations:
- message: 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
- expr: sum by (namespace, pod) (max by(namespace, pod) (kube_pod_status_phase{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}", phase=~"Pending|Unknown"}) * on(namespace, pod) group_left(owner_kind) max by(namespace, pod, owner_kind) (kube_pod_owner{owner_kind!="Job"})) > 0
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesApps }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesApps | 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|Failed"}
+ ) * 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
- severity: critical
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesApps }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesApps }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeDeploymentGenerationMismatch | default false) }}
- alert: KubeDeploymentGenerationMismatch
annotations:
- message: 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
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesApps }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesApps | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
- severity: critical
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesApps }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesApps }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeDeploymentReplicasMismatch | default false) }}
- alert: KubeDeploymentReplicasMismatch
annotations:
- message: 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
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesApps }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesApps | 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 }}"}[5m])
+ changes(kube_deployment_status_replicas_updated{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}[10m])
==
0
)
for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesApps }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesApps }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeDeploymentRolloutStuck | default false) }}
+ - alert: KubeDeploymentRolloutStuck
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesApps }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesApps | indent 8 }}
+{{- end }}
+ description: Rollout of deployment {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.deployment {{`}}`}} is not progressing for longer than 15 minutes.
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubedeploymentrolloutstuck
+ summary: Deployment rollout is not progressing.
+ expr: |-
+ kube_deployment_status_condition{condition="Progressing", status="false",job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}
+ != 0
+ for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
- severity: critical
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesApps }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesApps }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeStatefulSetReplicasMismatch | default false) }}
- alert: KubeStatefulSetReplicasMismatch
annotations:
- message: 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
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesApps }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesApps | 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: StatefulSet 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 }}"}[5m])
+ changes(kube_statefulset_status_replicas_updated{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}[10m])
==
0
)
for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
- severity: critical
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesApps }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesApps }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeStatefulSetGenerationMismatch | default false) }}
- alert: KubeStatefulSetGenerationMismatch
annotations:
- message: 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
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesApps }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesApps | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
- severity: critical
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesApps }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesApps }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeStatefulSetUpdateNotRolledOut | default false) }}
- alert: KubeStatefulSetUpdateNotRolledOut
annotations:
- message: StatefulSet {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.statefulset {{`}}`}} update has not been rolled out.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubestatefulsetupdatenotrolledout
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesApps }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesApps | 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 }}"}
+ 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
- severity: critical
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesApps }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesApps }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeDaemonSetRolloutStuck | default false) }}
- alert: KubeDaemonSetRolloutStuck
annotations:
- message: Only {{`{{`}} $value | humanizePercentage {{`}}`}} of the desired Pods of DaemonSet {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.daemonset {{`}}`}} are scheduled and ready.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubedaemonsetrolloutstuck
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesApps }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesApps | 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_number_ready{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}
- /
- kube_daemonset_status_desired_number_scheduled{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} < 1.00
+ (
+ (
+ 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
- severity: critical
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesApps }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesApps }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeContainerWaiting | default false) }}
- alert: KubeContainerWaiting
annotations:
- message: 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
- expr: sum by (namespace, pod, container) (kube_pod_container_status_waiting_reason{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}) > 0
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesApps }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesApps | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesApps }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesApps }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeDaemonSetNotScheduled | default false) }}
- alert: KubeDaemonSetNotScheduled
annotations:
- message: '{{`{{`}} $value {{`}}`}} Pods of DaemonSet {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.daemonset {{`}}`}} are not scheduled.'
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubedaemonsetnotscheduled
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesApps }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesApps | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesApps }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesApps }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeDaemonSetMisScheduled | default false) }}
- alert: KubeDaemonSetMisScheduled
annotations:
- message: '{{`{{`}} $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
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesApps }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesApps | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
- - alert: KubeCronJobRunning
- annotations:
- message: CronJob {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.cronjob {{`}}`}} is taking more than 1h to complete.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubecronjobrunning
- expr: time() - kube_cronjob_next_schedule_time{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} > 3600
- for: 1h
- labels:
- severity: warning
- - alert: KubeJobCompletion
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesApps }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesApps }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeJobNotCompleted | default false) }}
+ - alert: KubeJobNotCompleted
annotations:
- message: Job {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.job_name {{`}}`}} is taking more than one hour to complete.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubejobcompletion
- expr: kube_job_spec_completions{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} - kube_job_status_succeeded{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} > 0
- for: 1h
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesApps }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesApps | 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 or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesApps }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesApps }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeJobFailed | default false) }}
- alert: KubeJobFailed
annotations:
- message: Job {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.job_name {{`}}`}} failed to complete.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubejobfailed
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesApps }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesApps | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesApps }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesApps }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeHpaReplicasMismatch | default false) }}
- alert: KubeHpaReplicasMismatch
annotations:
- message: HPA {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.hpa {{`}}`}} has not matched the desired number of replicas for longer than 15 minutes.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubehpareplicasmismatch
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesApps }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesApps | 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_hpa_status_desired_replicas{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}
+ (kube_horizontalpodautoscaler_status_desired_replicas{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}
!=
- kube_hpa_status_current_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
- changes(kube_hpa_status_current_replicas[15m]) == 0
+ (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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesApps }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesApps }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeHpaMaxedOut | default false) }}
- alert: KubeHpaMaxedOut
annotations:
- message: HPA {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.hpa {{`}}`}} has been running at max replicas for longer than 15 minutes.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubehpamaxedout
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesApps }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesApps | 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_hpa_status_current_replicas{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}
+ kube_horizontalpodautoscaler_status_current_replicas{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}
==
- kube_hpa_spec_max_replicas{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}
+ kube_horizontalpodautoscaler_spec_max_replicas{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}
for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesApps }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesApps }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-resources.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-resources.yaml
old mode 100755
new mode 100644
index 105bd542f8..324b6e1e49
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-resources.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-resources.yaml
@@ -1,18 +1,18 @@
{{- /*
-Generated from 'kubernetes-resources' group from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/prometheus-rules.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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.kubernetesResources }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubernetes-resources" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "kubernetes-resources" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
{{- if .Values.defaultRules.labels }}
{{ toYaml .Values.defaultRules.labels | indent 4 }}
{{- end }}
@@ -24,80 +24,258 @@ spec:
groups:
- name: kubernetes-resources
rules:
+{{- if not (.Values.defaultRules.disabled.KubeCPUOvercommit | default false) }}
- alert: KubeCPUOvercommit
annotations:
- message: 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 }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesResources }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesResources | indent 8 }}
+{{- end }}
+ description: Cluster {{`{{`}} $labels.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:kube_pod_container_resource_requests_cpu_cores:sum{})
- /
- sum(kube_node_status_allocatable_cpu_cores)
- >
- (count(kube_node_status_allocatable_cpu_cores)-1) / count(kube_node_status_allocatable_cpu_cores)
- for: 5m
+ sum(namespace_cpu:kube_pod_container_resource_requests:sum{job="kube-state-metrics",}) by (cluster) - (sum(kube_node_status_allocatable{job="kube-state-metrics",resource="cpu"}) by (cluster) - max(kube_node_status_allocatable{job="kube-state-metrics",resource="cpu"}) by (cluster)) > 0
+ and
+ (sum(kube_node_status_allocatable{job="kube-state-metrics",resource="cpu"}) by (cluster) - max(kube_node_status_allocatable{job="kube-state-metrics",resource="cpu"}) by (cluster)) > 0
+ for: 10m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesResources }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesResources }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeMemoryOvercommit | default false) }}
- alert: KubeMemoryOvercommit
annotations:
- message: 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 }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesResources }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesResources | indent 8 }}
+{{- end }}
+ description: Cluster {{`{{`}} $labels.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:kube_pod_container_resource_requests_memory_bytes:sum{})
- /
- sum(kube_node_status_allocatable_memory_bytes)
- >
- (count(kube_node_status_allocatable_memory_bytes)-1)
- /
- count(kube_node_status_allocatable_memory_bytes)
- for: 5m
+ sum(namespace_memory:kube_pod_container_resource_requests:sum{}) by (cluster) - (sum(kube_node_status_allocatable{resource="memory", job="kube-state-metrics"}) by (cluster) - max(kube_node_status_allocatable{resource="memory", job="kube-state-metrics"}) by (cluster)) > 0
+ and
+ (sum(kube_node_status_allocatable{resource="memory", job="kube-state-metrics"}) by (cluster) - max(kube_node_status_allocatable{resource="memory", job="kube-state-metrics"}) by (cluster)) > 0
+ for: 10m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesResources }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesResources }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeCPUQuotaOvercommit | default false) }}
- alert: KubeCPUQuotaOvercommit
annotations:
- message: Cluster has overcommitted CPU resource requests for Namespaces.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubecpuquotaovercommit
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesResources }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesResources | indent 8 }}
+{{- end }}
+ description: Cluster {{`{{`}} $labels.cluster {{`}}`}} has overcommitted CPU resource requests for Namespaces.
+ 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)"})) by (cluster)
/
- sum(kube_node_status_allocatable_cpu_cores)
+ sum(kube_node_status_allocatable{resource="cpu", job="kube-state-metrics"}) by (cluster)
> 1.5
for: 5m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesResources }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesResources }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeMemoryQuotaOvercommit | default false) }}
- alert: KubeMemoryQuotaOvercommit
annotations:
- message: Cluster has overcommitted memory resource requests for Namespaces.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubememoryquotaovercommit
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesResources }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesResources | indent 8 }}
+{{- end }}
+ description: Cluster {{`{{`}} $labels.cluster {{`}}`}} has overcommitted memory resource requests for Namespaces.
+ 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)"})) by (cluster)
/
- sum(kube_node_status_allocatable_memory_bytes{job="node-exporter"})
+ sum(kube_node_status_allocatable{resource="memory", job="kube-state-metrics"}) by (cluster)
> 1.5
for: 5m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesResources }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesResources }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeQuotaAlmostFull | default false) }}
+ - alert: KubeQuotaAlmostFull
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesResources }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesResources | indent 8 }}
+{{- end }}
+ description: Namespace {{`{{`}} $labels.namespace {{`}}`}} is using {{`{{`}} $value | humanizePercentage {{`}}`}} of its {{`{{`}} $labels.resource {{`}}`}} quota.
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubequotaalmostfull
+ summary: Namespace quota is going to be full.
+ expr: |-
+ kube_resourcequota{job="kube-state-metrics", type="used"}
+ / ignoring(instance, job, type)
+ (kube_resourcequota{job="kube-state-metrics", type="hard"} > 0)
+ > 0.9 < 1
+ for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: info
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesResources }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesResources }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeQuotaFullyUsed | default false) }}
+ - alert: KubeQuotaFullyUsed
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesResources }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesResources | indent 8 }}
+{{- end }}
+ description: Namespace {{`{{`}} $labels.namespace {{`}}`}} is using {{`{{`}} $value | humanizePercentage {{`}}`}} of its {{`{{`}} $labels.resource {{`}}`}} quota.
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubequotafullyused
+ summary: Namespace quota is fully used.
+ expr: |-
+ kube_resourcequota{job="kube-state-metrics", type="used"}
+ / ignoring(instance, job, type)
+ (kube_resourcequota{job="kube-state-metrics", type="hard"} > 0)
+ == 1
+ for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: info
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesResources }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesResources }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeQuotaExceeded | default false) }}
- alert: KubeQuotaExceeded
annotations:
- message: Namespace {{`{{`}} $labels.namespace {{`}}`}} is using {{`{{`}} $value | humanizePercentage {{`}}`}} of its {{`{{`}} $labels.resource {{`}}`}} quota.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubequotaexceeded
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesResources }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesResources | indent 8 }}
+{{- end }}
+ description: Namespace {{`{{`}} $labels.namespace {{`}}`}} is using {{`{{`}} $value | humanizePercentage {{`}}`}} of its {{`{{`}} $labels.resource {{`}}`}} quota.
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubequotaexceeded
+ summary: Namespace quota has exceeded the limits.
expr: |-
kube_resourcequota{job="kube-state-metrics", type="used"}
/ ignoring(instance, job, type)
(kube_resourcequota{job="kube-state-metrics", type="hard"} > 0)
- > 0.90
+ > 1
for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesResources }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesResources }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.CPUThrottlingHigh | default false) }}
- alert: CPUThrottlingHigh
annotations:
- message: '{{`{{`}} $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
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesResources }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesResources | 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 }}/kubernetes/cputhrottlinghigh
+ summary: Processes experience elevated CPU throttling.
expr: |-
sum(increase(container_cpu_cfs_throttled_periods_total{container!="", }[5m])) by (container, pod, namespace)
/
sum(increase(container_cpu_cfs_periods_total{}[5m])) by (container, pod, namespace)
> ( 25 / 100 )
for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
- severity: warning
+ severity: info
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesResources }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesResources }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-storage.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-storage.yaml
old mode 100755
new mode 100644
index 2d755596db..631af0e18b
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-storage.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-storage.yaml
@@ -1,7 +1,7 @@
{{- /*
-Generated from 'kubernetes-storage' group from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/prometheus-rules.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/helm/charts/tree/master/stable/prometheus-operator/hack
+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 }}
@@ -9,11 +9,11 @@ https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubernetes-storage" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "kubernetes-storage" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
{{- if .Values.defaultRules.labels }}
{{ toYaml .Values.defaultRules.labels | indent 4 }}
{{- end }}
@@ -25,22 +25,57 @@ spec:
groups:
- name: kubernetes-storage
rules:
+{{- if not (.Values.defaultRules.disabled.KubePersistentVolumeFillingUp | default false) }}
- alert: KubePersistentVolumeFillingUp
annotations:
- message: The PersistentVolume claimed by {{`{{`}} $labels.persistentvolumeclaim {{`}}`}} in Namespace {{`{{`}} $labels.namespace {{`}}`}} is only {{`{{`}} $value | humanizePercentage {{`}}`}} free.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubepersistentvolumefillingup
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesStorage }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesStorage | 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{job="kubelet", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"}
- /
- kubelet_volume_stats_capacity_bytes{job="kubelet", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"}
- < 0.03
+ (
+ kubelet_volume_stats_available_bytes{job="kubelet", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"}
+ /
+ kubelet_volume_stats_capacity_bytes{job="kubelet", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"}
+ ) < 0.03
+ and
+ kubelet_volume_stats_used_bytes{job="kubelet", 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesStorage }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesStorage }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubePersistentVolumeFillingUp | default false) }}
- alert: KubePersistentVolumeFillingUp
annotations:
- message: 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
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesStorage }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesStorage | 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{job="kubelet", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"}
@@ -48,16 +83,134 @@ spec:
kubelet_volume_stats_capacity_bytes{job="kubelet", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"}
) < 0.15
and
+ kubelet_volume_stats_used_bytes{job="kubelet", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} > 0
+ and
predict_linear(kubelet_volume_stats_available_bytes{job="kubelet", 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesStorage }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesStorage }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubePersistentVolumeInodesFillingUp | default false) }}
+ - alert: KubePersistentVolumeInodesFillingUp
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesStorage }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesStorage | 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="kubelet", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"}
+ /
+ kubelet_volume_stats_inodes{job="kubelet", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"}
+ ) < 0.03
+ and
+ kubelet_volume_stats_inodes_used{job="kubelet", 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesStorage }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesStorage }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubePersistentVolumeInodesFillingUp | default false) }}
+ - alert: KubePersistentVolumeInodesFillingUp
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesStorage }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesStorage | 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="kubelet", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"}
+ /
+ kubelet_volume_stats_inodes{job="kubelet", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"}
+ ) < 0.15
+ and
+ kubelet_volume_stats_inodes_used{job="kubelet", namespace=~"{{ $targetNamespace }}", metrics_path="/metrics"} > 0
+ and
+ predict_linear(kubelet_volume_stats_inodes_free{job="kubelet", 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesStorage }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesStorage }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubePersistentVolumeErrors | default false) }}
- alert: KubePersistentVolumeErrors
annotations:
- message: The persistent volume {{`{{`}} $labels.persistentvolume {{`}}`}} has status {{`{{`}} $labels.phase {{`}}`}}.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubepersistentvolumeerrors
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesStorage }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesStorage | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesStorage }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesStorage }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system-apiserver.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system-apiserver.yaml
old mode 100755
new mode 100644
index f975a51636..bf4f27a0d2
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system-apiserver.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system-apiserver.yaml
@@ -1,18 +1,18 @@
{{- /*
-Generated from 'kubernetes-system-apiserver' group from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/prometheus-rules.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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.kubernetesSystem }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubernetes-system-apiserver" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "kubernetes-system-apiserver" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
{{- if .Values.defaultRules.labels }}
{{ toYaml .Values.defaultRules.labels | indent 4 }}
{{- end }}
@@ -24,77 +24,170 @@ spec:
groups:
- name: kubernetes-system-apiserver
rules:
- - alert: KubeAPILatencyHigh
- annotations:
- message: The API server has an abnormal latency of {{`{{`}} $value {{`}}`}} seconds for {{`{{`}} $labels.verb {{`}}`}} {{`{{`}} $labels.resource {{`}}`}}.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeapilatencyhigh
- expr: |-
- (
- cluster:apiserver_request_duration_seconds:mean5m{job="apiserver"}
- >
- on (verb) group_left()
- (
- avg by (verb) (cluster:apiserver_request_duration_seconds:mean5m{job="apiserver"} >= 0)
- +
- 2*stddev by (verb) (cluster:apiserver_request_duration_seconds:mean5m{job="apiserver"} >= 0)
- )
- ) > on (verb) group_left()
- 1.2 * avg by (verb) (cluster:apiserver_request_duration_seconds:mean5m{job="apiserver"} >= 0)
- and on (verb,resource)
- cluster_quantile:apiserver_request_duration_seconds:histogram_quantile{job="apiserver",quantile="0.99"}
- >
- 1
- for: 5m
- labels:
- severity: warning
- - alert: KubeAPIErrorsHigh
- annotations:
- message: API server is returning errors for {{`{{`}} $value | humanizePercentage {{`}}`}} of requests for {{`{{`}} $labels.verb {{`}}`}} {{`{{`}} $labels.resource {{`}}`}} {{`{{`}} $labels.subresource {{`}}`}}.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeapierrorshigh
- expr: |-
- sum(rate(apiserver_request_total{job="apiserver",code=~"5.."}[5m])) by (resource,subresource,verb)
- /
- sum(rate(apiserver_request_total{job="apiserver"}[5m])) by (resource,subresource,verb) > 0.05
- for: 10m
- labels:
- severity: warning
+{{- if not (.Values.defaultRules.disabled.KubeClientCertificateExpiration | default false) }}
- alert: KubeClientCertificateExpiration
annotations:
- message: 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 }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem | 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
+ for: 5m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeClientCertificateExpiration | default false) }}
- alert: KubeClientCertificateExpiration
annotations:
- message: 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 }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem | 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
+ for: 5m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: critical
- - alert: AggregatedAPIErrors
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeAggregatedAPIErrors | default false) }}
+ - alert: KubeAggregatedAPIErrors
annotations:
- message: An aggregated API {{`{{`}} $labels.name {{`}}`}}/{{`{{`}} $labels.namespace {{`}}`}} has reported errors. The number of errors have increased for it in the past five minutes. High values indicate that the availability of the service changes too often.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-aggregatedapierrors
- expr: sum by(name, namespace)(increase(aggregator_unavailable_apiservice_count[5m])) > 2
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem | 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{job="apiserver"}[10m])) > 4
labels:
severity: warning
- - alert: AggregatedAPIDown
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeAggregatedAPIDown | default false) }}
+ - alert: KubeAggregatedAPIDown
annotations:
- message: An aggregated API {{`{{`}} $labels.name {{`}}`}}/{{`{{`}} $labels.namespace {{`}}`}} is down. It has not been available at least for the past five minutes.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-aggregatedapidown
- expr: sum by(name, namespace)(sum_over_time(aggregator_unavailable_apiservice[5m])) > 0
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem | 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{job="apiserver"}[10m]))) * 100 < 85
for: 5m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
{{- if .Values.kubeApiServer.enabled }}
+{{- if not (.Values.defaultRules.disabled.KubeAPIDown | default false) }}
- alert: KubeAPIDown
annotations:
- message: KubeAPI has disappeared from Prometheus target discovery.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeapidown
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem | indent 8 }}
+{{- end }}
+ description: KubeAPI has disappeared from Prometheus target discovery.
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubeapidown
+ summary: Target disappeared from Prometheus target discovery.
expr: absent(up{job="apiserver"} == 1)
for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeAPITerminatedRequests | default false) }}
+ - alert: KubeAPITerminatedRequests
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system-controller-manager.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system-controller-manager.yaml
old mode 100755
new mode 100644
index e758e35b0d..8c8d94379c
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system-controller-manager.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system-controller-manager.yaml
@@ -1,18 +1,18 @@
{{- /*
-Generated from 'kubernetes-system-controller-manager' group from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/prometheus-rules.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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.kubeControllerManager.enabled }}
+{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.kubeControllerManager.enabled .Values.defaultRules.rules.kubeControllerManager }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubernetes-system-controller-manager" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "kubernetes-system-controller-manager" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
{{- if .Values.defaultRules.labels }}
{{ toYaml .Values.defaultRules.labels | indent 4 }}
{{- end }}
@@ -25,13 +25,33 @@ spec:
- name: kubernetes-system-controller-manager
rules:
{{- if .Values.kubeControllerManager.enabled }}
+{{- if not (.Values.defaultRules.disabled.KubeControllerManagerDown | default false) }}
- alert: KubeControllerManagerDown
annotations:
- message: KubeControllerManager has disappeared from Prometheus target discovery.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubecontrollermanagerdown
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubeControllerManager }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubeControllerManager | indent 8 }}
+{{- end }}
+ description: KubeControllerManager has disappeared from Prometheus target discovery.
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubecontrollermanagerdown
+ summary: Target disappeared from Prometheus target discovery.
expr: absent(up{job="kube-controller-manager"} == 1)
for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeControllerManager }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeControllerManager }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system-kube-proxy.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system-kube-proxy.yaml
new file mode 100644
index 0000000000..f52f36d4f6
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system-kube-proxy.yaml
@@ -0,0 +1,57 @@
+{{- /*
+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.kubeProxy.enabled .Values.defaultRules.rules.kubeProxy }}
+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 or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupAnnotations.kubeProxy }}
+ {{- with .Values.defaultRules.additionalRuleAnnotations }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupAnnotations.kubeProxy }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- 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="kube-proxy"} == 1)
+ for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeProxy }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeProxy }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system-kubelet.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system-kubelet.yaml
old mode 100755
new mode 100644
index 38050de6f4..643ec0f3fb
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system-kubelet.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system-kubelet.yaml
@@ -1,18 +1,18 @@
{{- /*
-Generated from 'kubernetes-system-kubelet' group from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/prometheus-rules.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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.kubernetesSystem }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubernetes-system-kubelet" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "kubernetes-system-kubelet" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
{{- if .Values.defaultRules.labels }}
{{ toYaml .Values.defaultRules.labels | indent 4 }}
{{- end }}
@@ -24,62 +24,361 @@ spec:
groups:
- name: kubernetes-system-kubelet
rules:
+{{- if not (.Values.defaultRules.disabled.KubeNodeNotReady | default false) }}
- alert: KubeNodeNotReady
annotations:
- message: '{{`{{`}} $labels.node {{`}}`}} has been unready for more than 15 minutes.'
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubenodenotready
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem | indent 8 }}
+{{- end }}
+ description: '{{`{{`}} $labels.node {{`}}`}} has been unready for more than 15 minutes.'
+ 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeNodeUnreachable | default false) }}
- alert: KubeNodeUnreachable
annotations:
- message: '{{`{{`}} $labels.node {{`}}`}} is unreachable and some workloads may be rescheduled.'
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubenodeunreachable
- expr: kube_node_spec_taint{job="kube-state-metrics",key="node.kubernetes.io/unreachable",effect="NoSchedule"} == 1
- for: 2m
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem | indent 8 }}
+{{- end }}
+ description: '{{`{{`}} $labels.node {{`}}`}} is unreachable and some workloads may be rescheduled.'
+ 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeletTooManyPods | default false) }}
- alert: KubeletTooManyPods
annotations:
- message: Kubelet '{{`{{`}} $labels.node {{`}}`}}' is running at {{`{{`}} $value | humanizePercentage {{`}}`}} of its Pod capacity.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubelettoomanypods
- expr: max(max(kubelet_running_pod_count{job="kubelet", metrics_path="/metrics"}) by(instance) * on(instance) group_left(node) kubelet_node_name{job="kubelet", metrics_path="/metrics"}) by(node) / max(kube_node_status_capacity_pods{job="kube-state-metrics"} != 1) by(node) > 0.95
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem | indent 8 }}
+{{- end }}
+ description: Kubelet '{{`{{`}} $labels.node {{`}}`}}' is running at {{`{{`}} $value | humanizePercentage {{`}}`}} of its Pod capacity.
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubelettoomanypods
+ summary: Kubelet is running at capacity.
+ expr: |-
+ 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(cluster, node) (
+ kube_node_status_capacity{job="kube-state-metrics",resource="pods"} != 1
+ ) > 0.95
for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
- severity: warning
+ severity: info
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeNodeReadinessFlapping | default false) }}
- alert: KubeNodeReadinessFlapping
annotations:
- message: The readiness status of node {{`{{`}} $labels.node {{`}}`}} has changed {{`{{`}} $value {{`}}`}} times in the last 15 minutes.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubenodereadinessflapping
- expr: sum(changes(kube_node_status_condition{status="true",condition="Ready"}[15m])) by (node) > 2
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem | 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 }}/kubernetes/kubenodereadinessflapping
+ summary: Node readiness status is flapping.
+ expr: sum(changes(kube_node_status_condition{job="kube-state-metrics",status="true",condition="Ready"}[15m])) by (cluster, node) > 2
for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeletPlegDurationHigh | default false) }}
- alert: KubeletPlegDurationHigh
annotations:
- message: 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
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem | 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 }}/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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeletPodStartUpLatencyHigh | default false) }}
- alert: KubeletPodStartUpLatencyHigh
annotations:
- message: Kubelet Pod startup 99th percentile latency is {{`{{`}} $value {{`}}`}} seconds on node {{`{{`}} $labels.node {{`}}`}}.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeletpodstartuplatencyhigh
- expr: histogram_quantile(0.99, sum(rate(kubelet_pod_worker_duration_seconds_bucket{job="kubelet", metrics_path="/metrics"}[5m])) by (instance, le)) * on(instance) group_left(node) kubelet_node_name{job="kubelet", metrics_path="/metrics"} > 60
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem | indent 8 }}
+{{- end }}
+ description: Kubelet Pod startup 99th percentile latency is {{`{{`}} $value {{`}}`}} seconds on node {{`{{`}} $labels.node {{`}}`}}.
+ 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="kubelet", metrics_path="/metrics"}[5m])) by (cluster, instance, le)) * on(cluster, instance) group_left(node) kubelet_node_name{job="kubelet", metrics_path="/metrics"} > 60
for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeletClientCertificateExpiration | default false) }}
+ - alert: KubeletClientCertificateExpiration
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem | indent 8 }}
+{{- end }}
+ description: Client certificate for Kubelet on node {{`{{`}} $labels.node {{`}}`}} expires in {{`{{`}} $value | humanizeDuration {{`}}`}}.
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubeletclientcertificateexpiration
+ summary: Kubelet client certificate is about to expire.
+ expr: kubelet_certificate_manager_client_ttl_seconds < 604800
+ labels:
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeletClientCertificateExpiration | default false) }}
+ - alert: KubeletClientCertificateExpiration
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem | indent 8 }}
+{{- end }}
+ description: Client certificate for Kubelet on node {{`{{`}} $labels.node {{`}}`}} expires in {{`{{`}} $value | humanizeDuration {{`}}`}}.
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubeletclientcertificateexpiration
+ summary: Kubelet client certificate is about to expire.
+ expr: kubelet_certificate_manager_client_ttl_seconds < 86400
+ labels:
+ severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeletServerCertificateExpiration | default false) }}
+ - alert: KubeletServerCertificateExpiration
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem | indent 8 }}
+{{- end }}
+ description: Server certificate for Kubelet on node {{`{{`}} $labels.node {{`}}`}} expires in {{`{{`}} $value | humanizeDuration {{`}}`}}.
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubeletservercertificateexpiration
+ summary: Kubelet server certificate is about to expire.
+ expr: kubelet_certificate_manager_server_ttl_seconds < 604800
+ labels:
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeletServerCertificateExpiration | default false) }}
+ - alert: KubeletServerCertificateExpiration
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem | indent 8 }}
+{{- end }}
+ description: Server certificate for Kubelet on node {{`{{`}} $labels.node {{`}}`}} expires in {{`{{`}} $value | humanizeDuration {{`}}`}}.
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubeletservercertificateexpiration
+ summary: Kubelet server certificate is about to expire.
+ expr: kubelet_certificate_manager_server_ttl_seconds < 86400
+ labels:
+ severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeletClientCertificateRenewalErrors | default false) }}
+ - alert: KubeletClientCertificateRenewalErrors
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem | 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 }}/kubernetes/kubeletclientcertificaterenewalerrors
+ summary: Kubelet has failed to renew its client certificate.
+ expr: increase(kubelet_certificate_manager_client_expiration_renew_errors[5m]) > 0
+ for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeletServerCertificateRenewalErrors | default false) }}
+ - alert: KubeletServerCertificateRenewalErrors
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem | 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 }}/kubernetes/kubeletservercertificaterenewalerrors
+ summary: Kubelet has failed to renew its server certificate.
+ expr: increase(kubelet_server_expiration_renew_errors[5m]) > 0
+ for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
{{- if .Values.prometheusOperator.kubeletService.enabled }}
+{{- if not (.Values.defaultRules.disabled.KubeletDown | default false) }}
- alert: KubeletDown
annotations:
- message: Kubelet has disappeared from Prometheus target discovery.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeletdown
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem | indent 8 }}
+{{- end }}
+ description: Kubelet has disappeared from Prometheus target discovery.
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubeletdown
+ summary: Target disappeared from Prometheus target discovery.
expr: absent(up{job="kubelet", metrics_path="/metrics"} == 1)
for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system-scheduler.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system-scheduler.yaml
old mode 100755
new mode 100644
index e2b84b5d95..7ca3c9b9fd
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system-scheduler.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system-scheduler.yaml
@@ -1,18 +1,18 @@
{{- /*
-Generated from 'kubernetes-system-scheduler' group from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/prometheus-rules.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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.kubeScheduler.enabled .Values.defaultRules.rules.kubeScheduler }}
+{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.kubeScheduler.enabled .Values.defaultRules.rules.kubeSchedulerAlerting }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubernetes-system-scheduler" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "kubernetes-system-scheduler" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
{{- if .Values.defaultRules.labels }}
{{ toYaml .Values.defaultRules.labels | indent 4 }}
{{- end }}
@@ -25,13 +25,33 @@ spec:
- name: kubernetes-system-scheduler
rules:
{{- if .Values.kubeScheduler.enabled }}
+{{- if not (.Values.defaultRules.disabled.KubeSchedulerDown | default false) }}
- alert: KubeSchedulerDown
annotations:
- message: KubeScheduler has disappeared from Prometheus target discovery.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeschedulerdown
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubeSchedulerAlerting }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubeSchedulerAlerting | indent 8 }}
+{{- end }}
+ description: KubeScheduler has disappeared from Prometheus target discovery.
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubeschedulerdown
+ summary: Target disappeared from Prometheus target discovery.
expr: absent(up{job="kube-scheduler"} == 1)
for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubeSchedulerAlerting }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubeSchedulerAlerting }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system.yaml
old mode 100755
new mode 100644
index 83b348f7e4..f75ba36ee9
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system.yaml
@@ -1,18 +1,18 @@
{{- /*
-Generated from 'kubernetes-system' group from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/prometheus-rules.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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.kubernetesSystem }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubernetes-system" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "kubernetes-system" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
{{- if .Values.defaultRules.labels }}
{{ toYaml .Values.defaultRules.labels | indent 4 }}
{{- end }}
@@ -24,24 +24,64 @@ spec:
groups:
- name: kubernetes-system
rules:
+{{- if not (.Values.defaultRules.disabled.KubeVersionMismatch | default false) }}
- alert: KubeVersionMismatch
annotations:
- message: There are {{`{{`}} $value {{`}}`}} different semantic versions of Kubernetes components running.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeversionmismatch
- expr: count(count by (gitVersion) (label_replace(kubernetes_build_info{job!~"kube-dns|coredns"},"gitVersion","$1","gitVersion","(v[0-9]*.[0-9]*.[0-9]*).*"))) > 1
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem | indent 8 }}
+{{- end }}
+ description: There are {{`{{`}} $value {{`}}`}} different semantic versions of Kubernetes components running.
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/kubernetes/kubeversionmismatch
+ summary: Different semantic versions of Kubernetes components running.
+ 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.KubeClientErrors | default false) }}
- alert: KubeClientErrors
annotations:
- message: Kubernetes API server client '{{`{{`}} $labels.job {{`}}`}}/{{`{{`}} $labels.instance {{`}}`}}' is experiencing {{`{{`}} $value | humanizePercentage {{`}}`}} errors.'
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeclienterrors
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.kubernetesSystem | indent 8 }}
+{{- end }}
+ description: Kubernetes API server client '{{`{{`}} $labels.job {{`}}`}}/{{`{{`}} $labels.instance {{`}}`}}' is experiencing {{`{{`}} $value | humanizePercentage {{`}}`}} errors.'
+ 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{job="apiserver",code=~"5.."}[5m])) by (cluster, instance, job, namespace)
/
- sum(rate(rest_client_requests_total[5m])) by (instance, job))
+ sum(rate(rest_client_requests_total{job="apiserver"}[5m])) by (cluster, instance, job, namespace))
> 0.01
for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.kubernetesSystem }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node-exporter.rules.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node-exporter.rules.yaml
old mode 100755
new mode 100644
index b52853545a..6ca42338ff
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node-exporter.rules.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node-exporter.rules.yaml
@@ -1,18 +1,18 @@
{{- /*
-Generated from 'node-exporter.rules' group from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/prometheus-rules.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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.nodeExporter.enabled .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:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "node-exporter.rules" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "node-exporter.rules" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
{{- if .Values.defaultRules.labels }}
{{ toYaml .Values.defaultRules.labels | indent 4 }}
{{- end }}
@@ -25,17 +25,33 @@ 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
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.nodeExporterRecording }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.nodeExporterRecording }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
- expr: |-
- 1 - avg without (cpu, mode) (
- rate(node_cpu_seconds_total{job="node-exporter", mode="idle"}[1m])
+ 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:rate1m
+ record: instance:node_cpu_utilisation:rate5m
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.nodeExporterRecording }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.nodeExporterRecording }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
- expr: |-
(
node_load1{job="node-exporter"}
@@ -43,37 +59,130 @@ spec:
instance:node_num_cpu:sum{job="node-exporter"}
)
record: instance:node_load1_per_cpu:ratio
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.nodeExporterRecording }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.nodeExporterRecording }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
- 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"}[1m])
- record: instance:node_vmstat_pgmajfault:rate1m
- - expr: rate(node_disk_io_time_seconds_total{job="node-exporter", device=~"nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+"}[1m])
- record: instance_device:node_disk_io_time_seconds:rate1m
- - expr: rate(node_disk_io_time_weighted_seconds_total{job="node-exporter", device=~"nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+"}[1m])
- record: instance_device:node_disk_io_time_weighted_seconds:rate1m
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.nodeExporterRecording }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.nodeExporterRecording }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: rate(node_vmstat_pgmajfault{job="node-exporter"}[5m])
+ record: instance:node_vmstat_pgmajfault:rate5m
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.nodeExporterRecording }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.nodeExporterRecording }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: rate(node_disk_io_time_seconds_total{job="node-exporter", device=~"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)"}[5m])
+ record: instance_device:node_disk_io_time_seconds:rate5m
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.nodeExporterRecording }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.nodeExporterRecording }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: rate(node_disk_io_time_weighted_seconds_total{job="node-exporter", device=~"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)"}[5m])
+ record: instance_device:node_disk_io_time_weighted_seconds:rate5m
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.nodeExporterRecording }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.nodeExporterRecording }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
- expr: |-
sum without (device) (
- rate(node_network_receive_bytes_total{job="node-exporter", device!="lo"}[1m])
+ rate(node_network_receive_bytes_total{job="node-exporter", device!="lo"}[5m])
)
- record: instance:node_network_receive_bytes_excluding_lo:rate1m
+ record: instance:node_network_receive_bytes_excluding_lo:rate5m
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.nodeExporterRecording }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.nodeExporterRecording }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
- expr: |-
sum without (device) (
- rate(node_network_transmit_bytes_total{job="node-exporter", device!="lo"}[1m])
+ rate(node_network_transmit_bytes_total{job="node-exporter", device!="lo"}[5m])
)
- record: instance:node_network_transmit_bytes_excluding_lo:rate1m
+ record: instance:node_network_transmit_bytes_excluding_lo:rate5m
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.nodeExporterRecording }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.nodeExporterRecording }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
- expr: |-
sum without (device) (
- rate(node_network_receive_drop_total{job="node-exporter", device!="lo"}[1m])
+ rate(node_network_receive_drop_total{job="node-exporter", device!="lo"}[5m])
)
- record: instance:node_network_receive_drop_excluding_lo:rate1m
+ record: instance:node_network_receive_drop_excluding_lo:rate5m
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.nodeExporterRecording }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.nodeExporterRecording }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
- expr: |-
sum without (device) (
- rate(node_network_transmit_drop_total{job="node-exporter", device!="lo"}[1m])
+ rate(node_network_transmit_drop_total{job="node-exporter", device!="lo"}[5m])
)
- record: instance:node_network_transmit_drop_excluding_lo:rate1m
+ record: instance:node_network_transmit_drop_excluding_lo:rate5m
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.nodeExporterRecording }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.nodeExporterRecording }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node-exporter.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node-exporter.yaml
old mode 100755
new mode 100644
index 75e0b27916..5c14e28f75
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node-exporter.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node-exporter.yaml
@@ -1,18 +1,18 @@
{{- /*
-Generated from 'node-exporter' group from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/prometheus-rules.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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.nodeExporter.enabled .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:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "node-exporter" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "node-exporter" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
{{- if .Values.defaultRules.labels }}
{{ toYaml .Values.defaultRules.labels | indent 4 }}
{{- end }}
@@ -24,179 +24,750 @@ spec:
groups:
- name: node-exporter
rules:
+{{- if not (.Values.defaultRules.disabled.NodeFilesystemSpaceFillingUp | default false) }}
- alert: NodeFilesystemSpaceFillingUp
annotations:
- 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
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting | indent 8 }}
+{{- end }}
+ description: Filesystem on {{`{{`}} $labels.device {{`}}`}}, mounted on {{`{{`}} $labels.mountpoint {{`}}`}}, at {{`{{`}} $labels.instance {{`}}`}} has only {{`{{`}} printf "%.2f" $value {{`}}`}}% available space left and is filling up.
+ 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!="",mountpoint!=""} / node_filesystem_size_bytes{job="node-exporter",fstype!="",mountpoint!=""} * 100 < 15
and
- predict_linear(node_filesystem_avail_bytes{job="node-exporter",fstype!=""}[6h], 24*60*60) < 0
+ predict_linear(node_filesystem_avail_bytes{job="node-exporter",fstype!="",mountpoint!=""}[6h], 24*60*60) < 0
and
- node_filesystem_readonly{job="node-exporter",fstype!=""} == 0
+ node_filesystem_readonly{job="node-exporter",fstype!="",mountpoint!=""} == 0
)
for: 1h
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.NodeFilesystemSpaceFillingUp | default false) }}
- alert: NodeFilesystemSpaceFillingUp
annotations:
- 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
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting | indent 8 }}
+{{- end }}
+ description: Filesystem on {{`{{`}} $labels.device {{`}}`}}, mounted on {{`{{`}} $labels.mountpoint {{`}}`}}, at {{`{{`}} $labels.instance {{`}}`}} has only {{`{{`}} printf "%.2f" $value {{`}}`}}% available space left and is filling up fast.
+ 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!="",mountpoint!=""} / node_filesystem_size_bytes{job="node-exporter",fstype!="",mountpoint!=""} * 100 < 10
and
- predict_linear(node_filesystem_avail_bytes{job="node-exporter",fstype!=""}[6h], 4*60*60) < 0
+ predict_linear(node_filesystem_avail_bytes{job="node-exporter",fstype!="",mountpoint!=""}[6h], 4*60*60) < 0
and
- node_filesystem_readonly{job="node-exporter",fstype!=""} == 0
+ node_filesystem_readonly{job="node-exporter",fstype!="",mountpoint!=""} == 0
)
for: 1h
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.NodeFilesystemAlmostOutOfSpace | default false) }}
- alert: NodeFilesystemAlmostOutOfSpace
annotations:
- description: Filesystem on {{`{{`}} $labels.device {{`}}`}} at {{`{{`}} $labels.instance {{`}}`}} has only {{`{{`}} printf "%.2f" $value {{`}}`}}% available space left.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-nodefilesystemalmostoutofspace
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting | indent 8 }}
+{{- end }}
+ description: Filesystem on {{`{{`}} $labels.device {{`}}`}}, mounted on {{`{{`}} $labels.mountpoint {{`}}`}}, at {{`{{`}} $labels.instance {{`}}`}} has only {{`{{`}} printf "%.2f" $value {{`}}`}}% available space left.
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/nodefilesystemalmostoutofspace
summary: Filesystem has less than 5% space left.
expr: |-
(
- node_filesystem_avail_bytes{job="node-exporter",fstype!=""} / node_filesystem_size_bytes{job="node-exporter",fstype!=""} * 100 < 5
+ node_filesystem_avail_bytes{job="node-exporter",fstype!="",mountpoint!=""} / node_filesystem_size_bytes{job="node-exporter",fstype!="",mountpoint!=""} * 100 < 5
and
- node_filesystem_readonly{job="node-exporter",fstype!=""} == 0
+ node_filesystem_readonly{job="node-exporter",fstype!="",mountpoint!=""} == 0
)
- for: 1h
+ for: 30m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.NodeFilesystemAlmostOutOfSpace | default false) }}
- alert: NodeFilesystemAlmostOutOfSpace
annotations:
- description: Filesystem on {{`{{`}} $labels.device {{`}}`}} at {{`{{`}} $labels.instance {{`}}`}} has only {{`{{`}} printf "%.2f" $value {{`}}`}}% available space left.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-nodefilesystemalmostoutofspace
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting | indent 8 }}
+{{- end }}
+ description: Filesystem on {{`{{`}} $labels.device {{`}}`}}, mounted on {{`{{`}} $labels.mountpoint {{`}}`}}, at {{`{{`}} $labels.instance {{`}}`}} has only {{`{{`}} printf "%.2f" $value {{`}}`}}% available space left.
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/nodefilesystemalmostoutofspace
summary: Filesystem has less than 3% space left.
expr: |-
(
- node_filesystem_avail_bytes{job="node-exporter",fstype!=""} / node_filesystem_size_bytes{job="node-exporter",fstype!=""} * 100 < 3
+ node_filesystem_avail_bytes{job="node-exporter",fstype!="",mountpoint!=""} / node_filesystem_size_bytes{job="node-exporter",fstype!="",mountpoint!=""} * 100 < 3
and
- node_filesystem_readonly{job="node-exporter",fstype!=""} == 0
+ node_filesystem_readonly{job="node-exporter",fstype!="",mountpoint!=""} == 0
)
- for: 1h
+ for: 30m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.NodeFilesystemFilesFillingUp | default false) }}
- alert: NodeFilesystemFilesFillingUp
annotations:
- 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
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting | indent 8 }}
+{{- end }}
+ description: Filesystem on {{`{{`}} $labels.device {{`}}`}}, mounted on {{`{{`}} $labels.mountpoint {{`}}`}}, at {{`{{`}} $labels.instance {{`}}`}} has only {{`{{`}} printf "%.2f" $value {{`}}`}}% available inodes left and is filling up.
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/nodefilesystemfilesfillingup
summary: Filesystem is predicted to run out of inodes within the next 24 hours.
expr: |-
(
- node_filesystem_files_free{job="node-exporter",fstype!=""} / node_filesystem_files{job="node-exporter",fstype!=""} * 100 < 40
+ node_filesystem_files_free{job="node-exporter",fstype!="",mountpoint!=""} / node_filesystem_files{job="node-exporter",fstype!="",mountpoint!=""} * 100 < 40
and
- predict_linear(node_filesystem_files_free{job="node-exporter",fstype!=""}[6h], 24*60*60) < 0
+ predict_linear(node_filesystem_files_free{job="node-exporter",fstype!="",mountpoint!=""}[6h], 24*60*60) < 0
and
- node_filesystem_readonly{job="node-exporter",fstype!=""} == 0
+ node_filesystem_readonly{job="node-exporter",fstype!="",mountpoint!=""} == 0
)
for: 1h
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.NodeFilesystemFilesFillingUp | default false) }}
- alert: NodeFilesystemFilesFillingUp
annotations:
- 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
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting | indent 8 }}
+{{- end }}
+ description: Filesystem on {{`{{`}} $labels.device {{`}}`}}, mounted on {{`{{`}} $labels.mountpoint {{`}}`}}, at {{`{{`}} $labels.instance {{`}}`}} has only {{`{{`}} printf "%.2f" $value {{`}}`}}% available inodes left and is filling up fast.
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/nodefilesystemfilesfillingup
summary: Filesystem is predicted to run out of inodes within the next 4 hours.
expr: |-
(
- node_filesystem_files_free{job="node-exporter",fstype!=""} / node_filesystem_files{job="node-exporter",fstype!=""} * 100 < 20
+ node_filesystem_files_free{job="node-exporter",fstype!="",mountpoint!=""} / node_filesystem_files{job="node-exporter",fstype!="",mountpoint!=""} * 100 < 20
and
- predict_linear(node_filesystem_files_free{job="node-exporter",fstype!=""}[6h], 4*60*60) < 0
+ predict_linear(node_filesystem_files_free{job="node-exporter",fstype!="",mountpoint!=""}[6h], 4*60*60) < 0
and
- node_filesystem_readonly{job="node-exporter",fstype!=""} == 0
+ node_filesystem_readonly{job="node-exporter",fstype!="",mountpoint!=""} == 0
)
for: 1h
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.NodeFilesystemAlmostOutOfFiles | default false) }}
- alert: NodeFilesystemAlmostOutOfFiles
annotations:
- description: Filesystem on {{`{{`}} $labels.device {{`}}`}} at {{`{{`}} $labels.instance {{`}}`}} has only {{`{{`}} printf "%.2f" $value {{`}}`}}% available inodes left.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-nodefilesystemalmostoutoffiles
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting | indent 8 }}
+{{- end }}
+ description: Filesystem on {{`{{`}} $labels.device {{`}}`}}, mounted on {{`{{`}} $labels.mountpoint {{`}}`}}, at {{`{{`}} $labels.instance {{`}}`}} has only {{`{{`}} printf "%.2f" $value {{`}}`}}% available inodes left.
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/nodefilesystemalmostoutoffiles
summary: Filesystem has less than 5% inodes left.
expr: |-
(
- node_filesystem_files_free{job="node-exporter",fstype!=""} / node_filesystem_files{job="node-exporter",fstype!=""} * 100 < 5
+ node_filesystem_files_free{job="node-exporter",fstype!="",mountpoint!=""} / node_filesystem_files{job="node-exporter",fstype!="",mountpoint!=""} * 100 < 5
and
- node_filesystem_readonly{job="node-exporter",fstype!=""} == 0
+ node_filesystem_readonly{job="node-exporter",fstype!="",mountpoint!=""} == 0
)
for: 1h
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.NodeFilesystemAlmostOutOfFiles | default false) }}
- alert: NodeFilesystemAlmostOutOfFiles
annotations:
- description: Filesystem on {{`{{`}} $labels.device {{`}}`}} at {{`{{`}} $labels.instance {{`}}`}} has only {{`{{`}} printf "%.2f" $value {{`}}`}}% available inodes left.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-nodefilesystemalmostoutoffiles
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting | indent 8 }}
+{{- end }}
+ description: Filesystem on {{`{{`}} $labels.device {{`}}`}}, mounted on {{`{{`}} $labels.mountpoint {{`}}`}}, at {{`{{`}} $labels.instance {{`}}`}} has only {{`{{`}} printf "%.2f" $value {{`}}`}}% available inodes left.
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/nodefilesystemalmostoutoffiles
summary: Filesystem has less than 3% inodes left.
expr: |-
(
- node_filesystem_files_free{job="node-exporter",fstype!=""} / node_filesystem_files{job="node-exporter",fstype!=""} * 100 < 3
+ node_filesystem_files_free{job="node-exporter",fstype!="",mountpoint!=""} / node_filesystem_files{job="node-exporter",fstype!="",mountpoint!=""} * 100 < 3
and
- node_filesystem_readonly{job="node-exporter",fstype!=""} == 0
+ node_filesystem_readonly{job="node-exporter",fstype!="",mountpoint!=""} == 0
)
for: 1h
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.NodeNetworkReceiveErrs | default false) }}
- alert: NodeNetworkReceiveErrs
annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting | 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: increase(node_network_receive_errs_total[2m]) > 10
+ expr: rate(node_network_receive_errs_total{job="node-exporter"}[2m]) / rate(node_network_receive_packets_total{job="node-exporter"}[2m]) > 0.01
for: 1h
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.NodeNetworkTransmitErrs | default false) }}
- alert: NodeNetworkTransmitErrs
annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting | 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: increase(node_network_transmit_errs_total[2m]) > 10
+ expr: rate(node_network_transmit_errs_total{job="node-exporter"}[2m]) / rate(node_network_transmit_packets_total{job="node-exporter"}[2m]) > 0.01
for: 1h
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.NodeHighNumberConntrackEntriesUsed | default false) }}
- alert: NodeHighNumberConntrackEntriesUsed
annotations:
- description: '{{`{{`}} $value | humanizePercentage {{`}}`}} of conntrack entries are used'
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-nodehighnumberconntrackentriesused
- summary: Number of conntrack are getting close to the limit
- expr: (node_nf_conntrack_entries / node_nf_conntrack_entries_limit) > 0.75
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting | indent 8 }}
+{{- end }}
+ description: '{{`{{`}} $value | humanizePercentage {{`}}`}} of conntrack entries are used.'
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/nodehighnumberconntrackentriesused
+ summary: Number of conntrack are getting close to the limit.
+ expr: (node_nf_conntrack_entries{job="node-exporter"} / node_nf_conntrack_entries_limit) > 0.75
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.NodeTextFileCollectorScrapeError | default false) }}
+ - alert: NodeTextFileCollectorScrapeError
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting | indent 8 }}
+{{- end }}
+ description: Node Exporter text file collector on {{`{{`}} $labels.instance {{`}}`}} failed to scrape.
+ 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:
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.NodeClockSkewDetected | default false) }}
- alert: NodeClockSkewDetected
annotations:
- message: 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
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting | indent 8 }}
+{{- end }}
+ description: Clock at {{`{{`}} $labels.instance {{`}}`}} is out of sync by more than 0.05s. Ensure NTP is configured correctly on this host.
+ 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.NodeClockNotSynchronising | default false) }}
- alert: NodeClockNotSynchronising
annotations:
- message: Clock on {{`{{`}} $labels.instance {{`}}`}} is not synchronising. Ensure NTP is configured on this host.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-nodeclocknotsynchronising
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting | indent 8 }}
+{{- end }}
+ description: Clock at {{`{{`}} $labels.instance {{`}}`}} is not synchronising. Ensure NTP is configured on this host.
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/nodeclocknotsynchronising
summary: Clock not synchronising.
- expr: min_over_time(node_timex_sync_status[5m]) == 0
+ expr: |-
+ min_over_time(node_timex_sync_status{job="node-exporter"}[5m]) == 0
+ and
+ node_timex_maxerror_seconds{job="node-exporter"} >= 16
for: 10m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.NodeRAIDDegraded | default false) }}
+ - alert: NodeRAIDDegraded
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting | indent 8 }}
+{{- end }}
+ description: RAID array '{{`{{`}} $labels.device {{`}}`}}' at {{`{{`}} $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 }}/node/noderaiddegraded
+ summary: RAID Array is degraded.
+ expr: node_md_disks_required{job="node-exporter",device=~"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)"} - ignoring (state) (node_md_disks{state="active",job="node-exporter",device=~"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)"}) > 0
+ for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.NodeRAIDDiskFailure | default false) }}
+ - alert: NodeRAIDDiskFailure
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting | indent 8 }}
+{{- end }}
+ description: At least one device in RAID array at {{`{{`}} $labels.instance {{`}}`}} failed. Array '{{`{{`}} $labels.device {{`}}`}}' needs attention and possibly a disk swap.
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/noderaiddiskfailure
+ summary: Failed device in RAID array.
+ expr: node_md_disks{state="failed",job="node-exporter",device=~"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)"} > 0
+ labels:
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.NodeFileDescriptorLimit | default false) }}
+ - alert: NodeFileDescriptorLimit
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting | indent 8 }}
+{{- end }}
+ description: File descriptors limit at {{`{{`}} $labels.instance {{`}}`}} is currently at {{`{{`}} printf "%.2f" $value {{`}}`}}%.
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/nodefiledescriptorlimit
+ summary: Kernel is predicted to exhaust file descriptors limit soon.
+ expr: |-
+ (
+ node_filefd_allocated{job="node-exporter"} * 100 / node_filefd_maximum{job="node-exporter"} > 70
+ )
+ for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.NodeFileDescriptorLimit | default false) }}
+ - alert: NodeFileDescriptorLimit
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting | indent 8 }}
+{{- end }}
+ description: File descriptors limit at {{`{{`}} $labels.instance {{`}}`}} is currently at {{`{{`}} printf "%.2f" $value {{`}}`}}%.
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/nodefiledescriptorlimit
+ summary: Kernel is predicted to exhaust file descriptors limit soon.
+ expr: |-
+ (
+ node_filefd_allocated{job="node-exporter"} * 100 / node_filefd_maximum{job="node-exporter"} > 90
+ )
+ for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.NodeCPUHighUsage | default false) }}
+ - alert: NodeCPUHighUsage
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting | indent 8 }}
+{{- end }}
+ description: 'CPU usage at {{`{{`}} $labels.instance {{`}}`}} has been above 90% for the last 15 minutes, is currently at {{`{{`}} printf "%.2f" $value {{`}}`}}%.
+
+ '
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/nodecpuhighusage
+ summary: High CPU usage.
+ expr: sum without(mode) (avg without (cpu) (rate(node_cpu_seconds_total{job="node-exporter", mode!="idle"}[2m]))) * 100 > 90
+ for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: info
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.NodeSystemSaturation | default false) }}
+ - alert: NodeSystemSaturation
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting | indent 8 }}
+{{- end }}
+ description: 'System load per core at {{`{{`}} $labels.instance {{`}}`}} has been above 2 for the last 15 minutes, is currently at {{`{{`}} printf "%.2f" $value {{`}}`}}.
+
+ This might indicate this instance resources saturation and can cause it becoming unresponsive.
+
+ '
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/nodesystemsaturation
+ summary: System saturated, load per core is very high.
+ expr: |-
+ node_load1{job="node-exporter"}
+ / count without (cpu, mode) (node_cpu_seconds_total{job="node-exporter", mode="idle"}) > 2
+ for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.NodeMemoryMajorPagesFaults | default false) }}
+ - alert: NodeMemoryMajorPagesFaults
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting | indent 8 }}
+{{- end }}
+ description: 'Memory major pages are occurring at very high rate at {{`{{`}} $labels.instance {{`}}`}}, 500 major page faults per second for the last 15 minutes, is currently at {{`{{`}} printf "%.2f" $value {{`}}`}}.
+
+ Please check that there is enough memory available at this instance.
+
+ '
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/nodememorymajorpagesfaults
+ summary: Memory major page faults are occurring at very high rate.
+ expr: rate(node_vmstat_pgmajfault{job="node-exporter"}[5m]) > 500
+ for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.NodeMemoryHighUtilization | default false) }}
+ - alert: NodeMemoryHighUtilization
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting | indent 8 }}
+{{- end }}
+ description: 'Memory is filling up at {{`{{`}} $labels.instance {{`}}`}}, has been above 90% for the last 15 minutes, is currently at {{`{{`}} printf "%.2f" $value {{`}}`}}%.
+
+ '
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/nodememoryhighutilization
+ summary: Host is running out of memory.
+ expr: 100 - (node_memory_MemAvailable_bytes{job="node-exporter"} / node_memory_MemTotal_bytes{job="node-exporter"} * 100) > 90
+ for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.NodeDiskIOSaturation | default false) }}
+ - alert: NodeDiskIOSaturation
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting | indent 8 }}
+{{- end }}
+ description: 'Disk IO queue (aqu-sq) is high on {{`{{`}} $labels.device {{`}}`}} at {{`{{`}} $labels.instance {{`}}`}}, has been above 10 for the last 15 minutes, is currently at {{`{{`}} printf "%.2f" $value {{`}}`}}.
+
+ This symptom might indicate disk saturation.
+
+ '
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/nodediskiosaturation
+ summary: Disk IO queue is high.
+ expr: rate(node_disk_io_time_weighted_seconds_total{job="node-exporter", device=~"(/dev/)?(mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|md.+|dasd.+)"}[5m]) > 10
+ for: 30m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.NodeSystemdServiceFailed | default false) }}
+ - alert: NodeSystemdServiceFailed
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting | indent 8 }}
+{{- end }}
+ description: Systemd service {{`{{`}} $labels.name {{`}}`}} has entered failed state at {{`{{`}} $labels.instance {{`}}`}}
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/nodesystemdservicefailed
+ summary: Systemd service has entered failed state.
+ expr: node_systemd_unit_state{job="node-exporter", state="failed"} == 1
+ for: 5m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.nodeExporterAlerting }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node-network.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node-network.yaml
old mode 100755
new mode 100644
index 0bba952b61..bc390506fb
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node-network.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node-network.yaml
@@ -1,18 +1,18 @@
{{- /*
-Generated from 'node-network' group from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/prometheus-rules.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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.network }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "node-network" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "node-network" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
{{- if .Values.defaultRules.labels }}
{{ toYaml .Values.defaultRules.labels | indent 4 }}
{{- end }}
@@ -24,11 +24,32 @@ spec:
groups:
- name: node-network
rules:
+{{- if not (.Values.defaultRules.disabled.NodeNetworkInterfaceFlapping | default false) }}
- alert: NodeNetworkInterfaceFlapping
annotations:
- message: Network interface "{{`{{`}} $labels.device {{`}}`}}" changing it's up status often on node-exporter {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod {{`}}`}}"
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.network }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.network | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.network }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.network }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node-time.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node-time.yaml
deleted file mode 100755
index f4e01e5e4e..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node-time.yaml
+++ /dev/null
@@ -1,32 +0,0 @@
-# Generated from 'node-time' group from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/prometheus-rules.yaml
-# Do not change in-place! In order to change this file first read following link:
-# https://github.com/helm/charts/tree/master/stable/prometheus-operator/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.time }}
-apiVersion: monitoring.coreos.com/v1
-kind: PrometheusRule
-metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "node-time" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
- labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.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: node-time
- rules:
- - alert: ClockSkewDetected
- annotations:
- message: Clock skew detected on node-exporter {{`{{ $labels.namespace }}`}}/{{`{{ $labels.pod }}`}}. Ensure NTP is configured correctly on this host.
- expr: abs(node_timex_offset_seconds{job="node-exporter"}) > 0.05
- for: 2m
- labels:
- severity: warning
-{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node.rules.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node.rules.yaml
old mode 100755
new mode 100644
index 35a11ac52e..ca01c6b913
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node.rules.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node.rules.yaml
@@ -1,18 +1,18 @@
{{- /*
-Generated from 'node.rules' group from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/prometheus-rules.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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.nodeExporter.enabled .Values.defaultRules.rules.node }}
+{{- if and (semverCompare ">=1.14.0-0" $kubeTargetVersion) (semverCompare "<9.9.9-9" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.node }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "node.rules" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "node.rules" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
{{- if .Values.defaultRules.labels }}
{{ toYaml .Values.defaultRules.labels | indent 4 }}
{{- end }}
@@ -24,21 +24,37 @@ spec:
groups:
- name: node.rules
rules:
- - expr: sum(min(kube_pod_info) by (cluster, node))
- record: ':kube_pod_info_node_count:'
- expr: |-
- topk by(namespace, pod) (1,
- max by (node, namespace, pod) (
- label_replace(kube_pod_info{job="kube-state-metrics"}, "pod", "$1", "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:'
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.node }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.node }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
- expr: |-
- count by (cluster, node) (sum by (node, cpu) (
- node_cpu_seconds_total{job="node-exporter"}
- * on (namespace, pod) group_left(node)
- node_namespace_pod:kube_pod_info:
- ))
+ count by (cluster, node) (
+ node_cpu_seconds_total{mode="idle",job="node-exporter"}
+ * on (namespace, pod) group_left(node)
+ topk by(namespace, pod) (1, node_namespace_pod:kube_pod_info:)
+ )
record: node:node_num_cpu:sum
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.node }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.node }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
- expr: |-
sum(
node_memory_MemAvailable_bytes{job="node-exporter"} or
@@ -50,4 +66,43 @@ spec:
)
) by (cluster)
record: :node_memory_MemAvailable_bytes:sum
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.node }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.node }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: |-
+ avg by (cluster, node) (
+ sum without (mode) (
+ rate(node_cpu_seconds_total{mode!="idle",mode!="iowait",mode!="steal",job="node-exporter"}[5m])
+ )
+ )
+ record: node:node_cpu_utilization:ratio_rate5m
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.node }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.node }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: |-
+ avg by (cluster) (
+ node:node_cpu_utilization:ratio_rate5m
+ )
+ record: cluster:node_cpu:ratio_rate5m
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.node }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.node }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/prometheus-operator.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/prometheus-operator.yaml
old mode 100755
new mode 100644
index 492966e9e1..a5d679c013
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/prometheus-operator.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/prometheus-operator.yaml
@@ -1,20 +1,20 @@
{{- /*
-Generated from 'prometheus-operator' group from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/prometheus-rules.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/helm/charts/tree/master/stable/prometheus-operator/hack
+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.prometheusOperator }}
-{{- $operatorJob := printf "%s-%s" (include "prometheus-operator.fullname" .) "operator" }}
-{{- $namespace := .Release.Namespace }}
+{{- $operatorJob := printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "operator" }}
+{{- $namespace := printf "%s" (include "kube-prometheus-stack.namespace" .) }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "prometheus-operator" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "prometheus-operator" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
{{- if .Values.defaultRules.labels }}
{{ toYaml .Values.defaultRules.labels | indent 4 }}
{{- end }}
@@ -26,18 +26,200 @@ 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 }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.prometheusOperator }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.prometheusOperator | indent 8 }}
+{{- end }}
+ description: Errors while performing List operations in controller {{`{{`}}$labels.controller{{`}}`}} in {{`{{`}}$labels.namespace{{`}}`}} namespace.
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus-operator/prometheusoperatorlisterrors
+ summary: Errors while performing list operations in controller.
+ expr: (sum by (cluster,controller,namespace) (rate(prometheus_operator_list_operations_failed_total{job="{{ $operatorJob }}",namespace="{{ $namespace }}"}[10m])) / sum by (cluster,controller,namespace) (rate(prometheus_operator_list_operations_total{job="{{ $operatorJob }}",namespace="{{ $namespace }}"}[10m]))) > 0.4
+ for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.prometheusOperator }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.prometheusOperator }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.PrometheusOperatorWatchErrors | default false) }}
+ - alert: PrometheusOperatorWatchErrors
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.prometheusOperator }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.prometheusOperator | indent 8 }}
+{{- end }}
+ description: Errors while performing watch operations in controller {{`{{`}}$labels.controller{{`}}`}} in {{`{{`}}$labels.namespace{{`}}`}} namespace.
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus-operator/prometheusoperatorwatcherrors
+ summary: Errors while performing watch operations in controller.
+ expr: (sum by (cluster,controller,namespace) (rate(prometheus_operator_watch_operations_failed_total{job="{{ $operatorJob }}",namespace="{{ $namespace }}"}[5m])) / sum by (cluster,controller,namespace) (rate(prometheus_operator_watch_operations_total{job="{{ $operatorJob }}",namespace="{{ $namespace }}"}[5m]))) > 0.4
+ for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.prometheusOperator }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.prometheusOperator }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.PrometheusOperatorSyncFailed | default false) }}
+ - alert: PrometheusOperatorSyncFailed
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.prometheusOperator }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.prometheusOperator | indent 8 }}
+{{- end }}
+ description: Controller {{`{{`}} $labels.controller {{`}}`}} in {{`{{`}} $labels.namespace {{`}}`}} namespace fails to reconcile {{`{{`}} $value {{`}}`}} objects.
+ 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.prometheusOperator }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.prometheusOperator }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.PrometheusOperatorReconcileErrors | default false) }}
- alert: PrometheusOperatorReconcileErrors
annotations:
- message: Errors while reconciling {{`{{`}} $labels.controller {{`}}`}} in {{`{{`}} $labels.namespace {{`}}`}} Namespace.
- expr: rate(prometheus_operator_reconcile_errors_total{job="{{ $operatorJob }}",namespace="{{ $namespace }}"}[5m]) > 0.1
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.prometheusOperator }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.prometheusOperator | indent 8 }}
+{{- end }}
+ description: '{{`{{`}} $value | humanizePercentage {{`}}`}} of reconciling operations failed for {{`{{`}} $labels.controller {{`}}`}} controller in {{`{{`}} $labels.namespace {{`}}`}} namespace.'
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus-operator/prometheusoperatorreconcileerrors
+ summary: Errors while reconciling controller.
+ expr: (sum by (cluster,controller,namespace) (rate(prometheus_operator_reconcile_errors_total{job="{{ $operatorJob }}",namespace="{{ $namespace }}"}[5m]))) / (sum by (cluster,controller,namespace) (rate(prometheus_operator_reconcile_operations_total{job="{{ $operatorJob }}",namespace="{{ $namespace }}"}[5m]))) > 0.1
for: 10m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.prometheusOperator }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.prometheusOperator }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.PrometheusOperatorNodeLookupErrors | default false) }}
- alert: PrometheusOperatorNodeLookupErrors
annotations:
- message: Errors while reconciling Prometheus in {{`{{`}} $labels.namespace {{`}}`}} Namespace.
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.prometheusOperator }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.prometheusOperator | indent 8 }}
+{{- end }}
+ description: Errors while reconciling Prometheus in {{`{{`}} $labels.namespace {{`}}`}} Namespace.
+ 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.prometheusOperator }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.prometheusOperator }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.PrometheusOperatorNotReady | default false) }}
+ - alert: PrometheusOperatorNotReady
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.prometheusOperator }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.prometheusOperator | indent 8 }}
+{{- end }}
+ description: Prometheus operator in {{`{{`}} $labels.namespace {{`}}`}} namespace isn't ready to reconcile {{`{{`}} $labels.controller {{`}}`}} resources.
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus-operator/prometheusoperatornotready
+ summary: Prometheus operator not ready
+ expr: min by (cluster,controller,namespace) (max_over_time(prometheus_operator_ready{job="{{ $operatorJob }}",namespace="{{ $namespace }}"}[5m]) == 0)
+ for: 5m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.prometheusOperator }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.prometheusOperator }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.PrometheusOperatorRejectedResources | default false) }}
+ - alert: PrometheusOperatorRejectedResources
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.prometheusOperator }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.prometheusOperator | 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 }}/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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.prometheusOperator }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.prometheusOperator }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/prometheus.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/prometheus.yaml
old mode 100755
new mode 100644
index bbd51e219f..48cfc7a449
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/prometheus.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/prometheus.yaml
@@ -1,20 +1,20 @@
{{- /*
-Generated from 'prometheus' group from https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/prometheus-rules.yaml
+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/helm/charts/tree/master/stable/prometheus-operator/hack
+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 "prometheus-operator.fullname" .) "prometheus" }}
-{{- $namespace := .Release.Namespace }}
+{{- $prometheusJob := printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "prometheus" }}
+{{- $namespace := printf "%s" (include "kube-prometheus-stack.namespace" .) }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "prometheus" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "prometheus" | trunc 63 | trimSuffix "-" }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
{{- if .Values.defaultRules.labels }}
{{ toYaml .Values.defaultRules.labels | indent 4 }}
{{- end }}
@@ -26,20 +26,76 @@ 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 }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.prometheus }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.prometheus | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.PrometheusSDRefreshFailure | default false) }}
+ - alert: PrometheusSDRefreshFailure
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.prometheus }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.prometheus | indent 8 }}
+{{- end }}
+ description: Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} has failed to refresh SD with mechanism {{`{{`}}$labels.mechanism{{`}}`}}.
+ runbook_url: {{ .Values.defaultRules.runbookUrl }}/prometheus/prometheussdrefreshfailure
+ summary: Failed Prometheus SD refresh.
+ expr: increase(prometheus_sd_refresh_failures_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[10m]) > 0
+ for: 20m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.PrometheusNotificationQueueRunningFull | default false) }}
- alert: PrometheusNotificationQueueRunningFull
annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.prometheus }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.prometheus | 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
@@ -50,11 +106,31 @@ spec:
min_over_time(prometheus_notifications_queue_capacity{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m])
)
for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.PrometheusErrorSendingAlertsToSomeAlertmanagers | default false) }}
- alert: PrometheusErrorSendingAlertsToSomeAlertmanagers
annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.prometheus }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.prometheus | 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: |-
(
@@ -65,112 +141,286 @@ spec:
* 100
> 1
for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
- - alert: PrometheusErrorSendingAlertsToAnyAlertmanager
- annotations:
- description: '{{`{{`}} printf "%.1f" $value {{`}}`}}% minimum errors while sending alerts from Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} to any Alertmanager.'
- 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 }}"}[5m])
- /
- rate(prometheus_notifications_sent_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m])
- )
- * 100
- > 3
- for: 15m
- labels:
- severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.PrometheusNotConnectedToAlertmanagers | default false) }}
- alert: PrometheusNotConnectedToAlertmanagers
annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.prometheus }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.prometheus | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.PrometheusTSDBReloadsFailing | default false) }}
- alert: PrometheusTSDBReloadsFailing
annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.prometheus }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.prometheus | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.PrometheusTSDBCompactionsFailing | default false) }}
- alert: PrometheusTSDBCompactionsFailing
annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.prometheus }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.prometheus | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.PrometheusNotIngestingSamples | default false) }}
- alert: PrometheusNotIngestingSamples
annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.prometheus }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.prometheus | 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
+ 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.PrometheusDuplicateTimestamps | default false) }}
- alert: PrometheusDuplicateTimestamps
annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.prometheus }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.prometheus | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.PrometheusOutOfOrderTimestamps | default false) }}
- alert: PrometheusOutOfOrderTimestamps
annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.prometheus }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.prometheus | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.PrometheusRemoteStorageFailures | default false) }}
- alert: PrometheusRemoteStorageFailures
annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.prometheus }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.prometheus | 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])
+ (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])
+ (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])
+ (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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.PrometheusRemoteWriteBehind | default false) }}
- alert: PrometheusRemoteWriteBehind
annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.prometheus }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.prometheus | 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])
- - on(job, instance) group_right
+ - 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.PrometheusRemoteWriteDesiredShards | default false) }}
- alert: PrometheusRemoteWriteDesiredShards
annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.prometheus }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.prometheus | 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
@@ -181,22 +431,277 @@ spec:
max_over_time(prometheus_remote_storage_shards_max{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m])
)
for: 15m
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.PrometheusRuleFailures | default false) }}
- alert: PrometheusRuleFailures
annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.prometheus }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.prometheus | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.PrometheusMissingRuleEvaluations | default false) }}
- alert: PrometheusMissingRuleEvaluations
annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.prometheus }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.prometheus | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.PrometheusTargetLimitHit | default false) }}
+ - alert: PrometheusTargetLimitHit
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.prometheus }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.prometheus | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
labels:
severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.PrometheusLabelLimitHit | default false) }}
+ - alert: PrometheusLabelLimitHit
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.prometheus }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.prometheus | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.PrometheusScrapeBodySizeLimitHit | default false) }}
+ - alert: PrometheusScrapeBodySizeLimitHit
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.prometheus }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.prometheus | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.PrometheusScrapeSampleLimitHit | default false) }}
+ - alert: PrometheusScrapeSampleLimitHit
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.prometheus }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.prometheus | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.PrometheusTargetSyncFailure | default false) }}
+ - alert: PrometheusTargetSyncFailure
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.prometheus }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.prometheus | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.PrometheusHighQueryLoad | default false) }}
+ - alert: PrometheusHighQueryLoad
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.prometheus }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.prometheus | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: warning
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- if not (.Values.defaultRules.disabled.PrometheusErrorSendingAlertsToAnyAlertmanager | default false) }}
+ - alert: PrometheusErrorSendingAlertsToAnyAlertmanager
+ annotations:
+{{- if .Values.defaultRules.additionalRuleAnnotations }}
+{{ toYaml .Values.defaultRules.additionalRuleAnnotations | indent 8 }}
+{{- end }}
+{{- if .Values.defaultRules.additionalRuleGroupAnnotations.prometheus }}
+{{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.prometheus | 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
+ {{- with .Values.defaultRules.keepFiringFor }}
+ keep_firing_for: "{{ . }}"
+ {{- end }}
+ labels:
+ severity: critical
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.prometheus }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/windows.node.rules.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/windows.node.rules.yaml
new file mode 100644
index 0000000000..d7fef54984
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/windows.node.rules.yaml
@@ -0,0 +1,301 @@
+{{- /*
+Generated from 'windows.node.rules' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/examples/windows.jsonnet
+In order to change this file first read following link:
+https://github.com/prometheus-community/helm-charts/pull/3083
+*/ -}}
+{{- $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.windowsMonitoring.enabled .Values.defaultRules.rules.windows }}
+apiVersion: monitoring.coreos.com/v1
+kind: PrometheusRule
+metadata:
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "windows.node.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: windows.node.rules
+ rules:
+ - expr: |-
+ count (
+ windows_system_system_up_time{job="windows-exporter"}
+ )
+ record: node:windows_node:sum
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: |-
+ count by (instance) (sum by (instance, core) (
+ windows_cpu_time_total{job="windows-exporter"}
+ ))
+ record: node:windows_node_num_cpu:sum
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: 1 - avg(rate(windows_cpu_time_total{job="windows-exporter",mode="idle"}[1m]))
+ record: :windows_node_cpu_utilisation:avg1m
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: |-
+ 1 - avg by (instance) (
+ rate(windows_cpu_time_total{job="windows-exporter",mode="idle"}[1m])
+ )
+ record: node:windows_node_cpu_utilisation:avg1m
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: |-
+ 1 -
+ sum(windows_memory_available_bytes{job="windows-exporter"})
+ /
+ sum(windows_os_visible_memory_bytes{job="windows-exporter"})
+ record: ':windows_node_memory_utilisation:'
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: sum(windows_memory_available_bytes{job="windows-exporter"} + windows_memory_cache_bytes{job="windows-exporter"})
+ record: :windows_node_memory_MemFreeCached_bytes:sum
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: (windows_memory_cache_bytes{job="windows-exporter"} + windows_memory_modified_page_list_bytes{job="windows-exporter"} + windows_memory_standby_cache_core_bytes{job="windows-exporter"} + windows_memory_standby_cache_normal_priority_bytes{job="windows-exporter"} + windows_memory_standby_cache_reserve_bytes{job="windows-exporter"})
+ record: node:windows_node_memory_totalCached_bytes:sum
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: sum(windows_os_visible_memory_bytes{job="windows-exporter"})
+ record: :windows_node_memory_MemTotal_bytes:sum
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: |-
+ sum by (instance) (
+ (windows_memory_available_bytes{job="windows-exporter"})
+ )
+ record: node:windows_node_memory_bytes_available:sum
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: |-
+ sum by (instance) (
+ windows_os_visible_memory_bytes{job="windows-exporter"}
+ )
+ record: node:windows_node_memory_bytes_total:sum
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: |-
+ (node:windows_node_memory_bytes_total:sum - node:windows_node_memory_bytes_available:sum)
+ /
+ scalar(sum(node:windows_node_memory_bytes_total:sum))
+ record: node:windows_node_memory_utilisation:ratio
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: 1 - (node:windows_node_memory_bytes_available:sum / node:windows_node_memory_bytes_total:sum)
+ record: 'node:windows_node_memory_utilisation:'
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: irate(windows_memory_swap_page_operations_total{job="windows-exporter"}[5m])
+ record: node:windows_node_memory_swap_io_pages:irate
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: |-
+ avg(irate(windows_logical_disk_read_seconds_total{job="windows-exporter"}[1m]) +
+ irate(windows_logical_disk_write_seconds_total{job="windows-exporter"}[1m])
+ )
+ record: :windows_node_disk_utilisation:avg_irate
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: |-
+ avg by (instance) (
+ (irate(windows_logical_disk_read_seconds_total{job="windows-exporter"}[1m]) +
+ irate(windows_logical_disk_write_seconds_total{job="windows-exporter"}[1m]))
+ )
+ record: node:windows_node_disk_utilisation:avg_irate
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: |-
+ max by (instance,volume)(
+ (windows_logical_disk_size_bytes{job="windows-exporter"}
+ - windows_logical_disk_free_bytes{job="windows-exporter"})
+ / windows_logical_disk_size_bytes{job="windows-exporter"}
+ )
+ record: 'node:windows_node_filesystem_usage:'
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: max by (instance, volume) (windows_logical_disk_free_bytes{job="windows-exporter"} / windows_logical_disk_size_bytes{job="windows-exporter"})
+ record: 'node:windows_node_filesystem_avail:'
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: sum(irate(windows_net_bytes_total{job="windows-exporter"}[1m]))
+ record: :windows_node_net_utilisation:sum_irate
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: |-
+ sum by (instance) (
+ (irate(windows_net_bytes_total{job="windows-exporter"}[1m]))
+ )
+ record: node:windows_node_net_utilisation:sum_irate
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: |-
+ sum(irate(windows_net_packets_received_discarded_total{job="windows-exporter"}[1m])) +
+ sum(irate(windows_net_packets_outbound_discarded_total{job="windows-exporter"}[1m]))
+ record: :windows_node_net_saturation:sum_irate
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: |-
+ sum by (instance) (
+ (irate(windows_net_packets_received_discarded_total{job="windows-exporter"}[1m]) +
+ irate(windows_net_packets_outbound_discarded_total{job="windows-exporter"}[1m]))
+ )
+ record: node:windows_node_net_saturation:sum_irate
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/windows.pod.rules.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/windows.pod.rules.yaml
new file mode 100644
index 0000000000..febb99333c
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/windows.pod.rules.yaml
@@ -0,0 +1,157 @@
+{{- /*
+Generated from 'windows.pod.rules' group from https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/examples/windows.jsonnet
+In order to change this file first read following link:
+https://github.com/prometheus-community/helm-charts/pull/3083
+*/ -}}
+{{- $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.windowsMonitoring.enabled .Values.defaultRules.rules.windows }}
+apiVersion: monitoring.coreos.com/v1
+kind: PrometheusRule
+metadata:
+ name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" .) "windows.pod.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: windows.pod.rules
+ rules:
+ - expr: windows_container_available{job="windows-exporter", container_id != ""} * on(container_id) group_left(container, pod, namespace) max(kube_pod_container_info{job="kube-state-metrics", container_id != ""}) by(container, container_id, pod, namespace)
+ record: windows_pod_container_available
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: windows_container_cpu_usage_seconds_total{job="windows-exporter", container_id != ""} * on(container_id) group_left(container, pod, namespace) max(kube_pod_container_info{job="kube-state-metrics", container_id != ""}) by(container, container_id, pod, namespace)
+ record: windows_container_total_runtime
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: windows_container_memory_usage_commit_bytes{job="windows-exporter", container_id != ""} * on(container_id) group_left(container, pod, namespace) max(kube_pod_container_info{job="kube-state-metrics", container_id != ""}) by(container, container_id, pod, namespace)
+ record: windows_container_memory_usage
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: windows_container_memory_usage_private_working_set_bytes{job="windows-exporter", container_id != ""} * on(container_id) group_left(container, pod, namespace) max(kube_pod_container_info{job="kube-state-metrics", container_id != ""}) by(container, container_id, pod, namespace)
+ record: windows_container_private_working_set_usage
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: windows_container_network_receive_bytes_total{job="windows-exporter", container_id != ""} * on(container_id) group_left(container, pod, namespace) max(kube_pod_container_info{job="kube-state-metrics", container_id != ""}) by(container, container_id, pod, namespace)
+ record: windows_container_network_received_bytes_total
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: windows_container_network_transmit_bytes_total{job="windows-exporter", container_id != ""} * on(container_id) group_left(container, pod, namespace) max(kube_pod_container_info{job="kube-state-metrics", container_id != ""}) by(container, container_id, pod, namespace)
+ record: windows_container_network_transmitted_bytes_total
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: |-
+ max by (namespace, pod, container) (
+ kube_pod_container_resource_requests{resource="memory",job="kube-state-metrics"}
+ ) * on(container,pod,namespace) (windows_pod_container_available)
+ record: kube_pod_windows_container_resource_memory_request
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: kube_pod_container_resource_limits{resource="memory",job="kube-state-metrics"} * on(container,pod,namespace) (windows_pod_container_available)
+ record: kube_pod_windows_container_resource_memory_limit
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: |-
+ max by (namespace, pod, container) (
+ kube_pod_container_resource_requests{resource="cpu",job="kube-state-metrics"}
+ ) * on(container,pod,namespace) (windows_pod_container_available)
+ record: kube_pod_windows_container_resource_cpu_cores_request
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: kube_pod_container_resource_limits{resource="cpu",job="kube-state-metrics"} * on(container,pod,namespace) (windows_pod_container_available)
+ record: kube_pod_windows_container_resource_cpu_cores_limit
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+ - expr: |-
+ sum by (namespace, pod, container) (
+ rate(windows_container_total_runtime{}[5m])
+ )
+ record: namespace_pod_container:windows_container_cpu_usage_seconds_total:sum_rate
+ {{- if or .Values.defaultRules.additionalRuleLabels .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ labels:
+ {{- with .Values.defaultRules.additionalRuleLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.defaultRules.additionalRuleGroupLabels.windows }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/alertmanager.rules.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/alertmanager.rules.yaml
deleted file mode 100755
index f1a7400042..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/alertmanager.rules.yaml
+++ /dev/null
@@ -1,54 +0,0 @@
-{{- /*
-Generated from 'alertmanager.rules' group from https://raw.githubusercontent.com/coreos/kube-prometheus/release-0.1/manifests/prometheus-rules.yaml
-Do not change in-place! In order to change this file first read following link:
-https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
-*/ -}}
-{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.alertmanager }}
-{{- $operatorJob := printf "%s-%s" (include "prometheus-operator.fullname" .) "operator" }}
-{{- $alertmanagerJob := printf "%s-%s" (include "prometheus-operator.fullname" .) "alertmanager" }}
-{{- $namespace := .Release.Namespace }}
-apiVersion: monitoring.coreos.com/v1
-kind: PrometheusRule
-metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "alertmanager.rules" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
- labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.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:
- - alert: AlertmanagerConfigInconsistent
- annotations:
- message: The configuration of the instances of the Alertmanager cluster `{{`{{`}}$labels.service{{`}}`}}` are out of sync.
- expr: count_values("config_hash", alertmanager_config_hash{job="{{ $alertmanagerJob }}",namespace="{{ $namespace }}"}) BY (service) / ON(service) GROUP_LEFT() label_replace(max(prometheus_operator_spec_replicas{job="{{ $operatorJob }}",namespace="{{ $namespace }}",controller="alertmanager"}) by (name, job, namespace, controller), "service", "$1", "name", "(.*)") != 1
- for: 5m
- labels:
- severity: critical
- - alert: AlertmanagerFailedReload
- annotations:
- message: Reloading Alertmanager's configuration has failed for {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod{{`}}`}}.
- expr: alertmanager_config_last_reload_successful{job="{{ $alertmanagerJob }}",namespace="{{ $namespace }}"} == 0
- for: 10m
- labels:
- severity: warning
- - alert: AlertmanagerMembersInconsistent
- annotations:
- message: Alertmanager has not found all other members of the cluster.
- expr: |-
- alertmanager_cluster_members{job="{{ $alertmanagerJob }}",namespace="{{ $namespace }}"}
- != on (service) GROUP_LEFT()
- count by (service) (alertmanager_cluster_members{job="{{ $alertmanagerJob }}",namespace="{{ $namespace }}"})
- for: 5m
- labels:
- severity: critical
-{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/etcd.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/etcd.yaml
deleted file mode 100755
index 5de9b83286..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/etcd.yaml
+++ /dev/null
@@ -1,140 +0,0 @@
-{{- /*
-Generated from 'etcd' group from https://raw.githubusercontent.com/etcd-io/etcd/master/Documentation/op-guide/etcd3_alert.rules.yml
-Do not change in-place! In order to change this file first read following link:
-https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
-*/ -}}
-{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.kubeEtcd.enabled .Values.defaultRules.rules.etcd }}
-apiVersion: monitoring.coreos.com/v1
-kind: PrometheusRule
-metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "etcd" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
- labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.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: etcd
- rules:
- - 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)
- for: 3m
- labels:
- severity: critical
- - alert: etcdNoLeader
- annotations:
- message: 'etcd cluster "{{`{{`}} $labels.job {{`}}`}}": member {{`{{`}} $labels.instance {{`}}`}} has no leader.'
- expr: etcd_server_has_leader{job=~".*etcd.*"} == 0
- for: 1m
- labels:
- severity: critical
- - 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
- labels:
- severity: warning
- - alert: etcdHighNumberOfFailedGRPCRequests
- annotations:
- message: 'etcd cluster "{{`{{`}} $labels.job {{`}}`}}": {{`{{`}} $value {{`}}`}}% of requests for {{`{{`}} $labels.grpc_method {{`}}`}} failed on etcd instance {{`{{`}} $labels.instance {{`}}`}}.'
- expr: |-
- 100 * sum(rate(grpc_server_handled_total{job=~".*etcd.*", grpc_code!="OK"}[5m])) BY (job, instance, grpc_service, grpc_method)
- /
- sum(rate(grpc_server_handled_total{job=~".*etcd.*"}[5m])) BY (job, instance, grpc_service, grpc_method)
- > 1
- for: 10m
- labels:
- severity: warning
- - alert: etcdHighNumberOfFailedGRPCRequests
- annotations:
- message: 'etcd cluster "{{`{{`}} $labels.job {{`}}`}}": {{`{{`}} $value {{`}}`}}% of requests for {{`{{`}} $labels.grpc_method {{`}}`}} failed on etcd instance {{`{{`}} $labels.instance {{`}}`}}.'
- expr: |-
- 100 * sum(rate(grpc_server_handled_total{job=~".*etcd.*", grpc_code!="OK"}[5m])) BY (job, instance, grpc_service, grpc_method)
- /
- sum(rate(grpc_server_handled_total{job=~".*etcd.*"}[5m])) BY (job, instance, grpc_service, grpc_method)
- > 5
- for: 5m
- labels:
- severity: critical
- - alert: etcdGRPCRequestsSlow
- annotations:
- message: 'etcd cluster "{{`{{`}} $labels.job {{`}}`}}": gRPC requests to {{`{{`}} $labels.grpc_method {{`}}`}} are taking {{`{{`}} $value {{`}}`}}s on etcd instance {{`{{`}} $labels.instance {{`}}`}}.'
- 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))
- > 0.15
- for: 10m
- labels:
- severity: critical
- - alert: etcdMemberCommunicationSlow
- annotations:
- message: 'etcd cluster "{{`{{`}} $labels.job {{`}}`}}": member communication with {{`{{`}} $labels.To {{`}}`}} is taking {{`{{`}} $value {{`}}`}}s on etcd instance {{`{{`}} $labels.instance {{`}}`}}.'
- expr: |-
- histogram_quantile(0.99, rate(etcd_network_peer_round_trip_time_seconds_bucket{job=~".*etcd.*"}[5m]))
- > 0.15
- for: 10m
- labels:
- severity: warning
- - alert: etcdHighNumberOfFailedProposals
- annotations:
- message: 'etcd cluster "{{`{{`}} $labels.job {{`}}`}}": {{`{{`}} $value {{`}}`}} proposal failures within the last hour on etcd instance {{`{{`}} $labels.instance {{`}}`}}.'
- expr: rate(etcd_server_proposals_failed_total{job=~".*etcd.*"}[15m]) > 5
- for: 15m
- labels:
- severity: warning
- - alert: etcdHighFsyncDurations
- annotations:
- message: 'etcd cluster "{{`{{`}} $labels.job {{`}}`}}": 99th percentile fync durations are {{`{{`}} $value {{`}}`}}s on etcd instance {{`{{`}} $labels.instance {{`}}`}}.'
- expr: |-
- histogram_quantile(0.99, rate(etcd_disk_wal_fsync_duration_seconds_bucket{job=~".*etcd.*"}[5m]))
- > 0.5
- for: 10m
- labels:
- severity: warning
- - alert: etcdHighCommitDurations
- annotations:
- message: 'etcd cluster "{{`{{`}} $labels.job {{`}}`}}": 99th percentile commit durations {{`{{`}} $value {{`}}`}}s on etcd instance {{`{{`}} $labels.instance {{`}}`}}.'
- expr: |-
- histogram_quantile(0.99, rate(etcd_disk_backend_commit_duration_seconds_bucket{job=~".*etcd.*"}[5m]))
- > 0.25
- for: 10m
- labels:
- severity: warning
- - alert: etcdHighNumberOfFailedHTTPRequests
- 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
- for: 10m
- labels:
- severity: warning
- - alert: etcdHighNumberOfFailedHTTPRequests
- 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
- for: 10m
- labels:
- severity: critical
- - alert: etcdHTTPRequestsSlow
- 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
- for: 10m
- labels:
- severity: warning
-{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/general.rules.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/general.rules.yaml
deleted file mode 100755
index 74823b8844..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/general.rules.yaml
+++ /dev/null
@@ -1,50 +0,0 @@
-{{- /*
-Generated from 'general.rules' group from https://raw.githubusercontent.com/coreos/kube-prometheus/release-0.1/manifests/prometheus-rules.yaml
-Do not change in-place! In order to change this file first read following link:
-https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
-*/ -}}
-{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.general }}
-apiVersion: monitoring.coreos.com/v1
-kind: PrometheusRule
-metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "general.rules" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
- labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.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:
- - alert: TargetDown
- annotations:
- message: '{{`{{`}} $value {{`}}`}}% of the {{`{{`}} $labels.job {{`}}`}} targets are down.'
- expr: 100 * (count(up == 0) BY (job) / count(up) BY (job)) > 10
- for: 10m
- labels:
- severity: warning
- - alert: Watchdog
- annotations:
- message: '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.
-
- '
- expr: vector(1)
- labels:
- severity: none
-{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/k8s.rules.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/k8s.rules.yaml
deleted file mode 100755
index 5f8917cee5..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/k8s.rules.yaml
+++ /dev/null
@@ -1,83 +0,0 @@
-{{- /*
-Generated from 'k8s.rules' group from https://raw.githubusercontent.com/coreos/kube-prometheus/release-0.1/manifests/prometheus-rules.yaml
-Do not change in-place! In order to change this file first read following link:
-https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
-*/ -}}
-{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.k8s }}
-apiVersion: monitoring.coreos.com/v1
-kind: PrometheusRule
-metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "k8s.rules" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
- labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.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: k8s.rules
- rules:
- - expr: sum(rate(container_cpu_usage_seconds_total{job="kubelet", image!="", container_name!=""}[5m])) by (namespace)
- record: namespace:container_cpu_usage_seconds_total:sum_rate
- - expr: sum(container_memory_usage_bytes{job="kubelet", image!="", container_name!=""}) by (namespace)
- record: namespace:container_memory_usage_bytes:sum
- - expr: |-
- sum by (namespace, pod_name, container_name) (
- rate(container_cpu_usage_seconds_total{job="kubelet", image!="", container_name!=""}[5m])
- )
- record: namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate
- - expr: |-
- sum by(namespace) (
- kube_pod_container_resource_requests_memory_bytes{job="kube-state-metrics"}
- * on (endpoint, instance, job, namespace, pod, service)
- group_left(phase) (kube_pod_status_phase{phase=~"^(Pending|Running)$"} == 1)
- )
- record: namespace_name:kube_pod_container_resource_requests_memory_bytes:sum
- - expr: |-
- sum by (namespace) (
- kube_pod_container_resource_requests_cpu_cores{job="kube-state-metrics"}
- * on (endpoint, instance, job, namespace, pod, service)
- group_left(phase) (kube_pod_status_phase{phase=~"^(Pending|Running)$"} == 1)
- )
- record: namespace_name:kube_pod_container_resource_requests_cpu_cores:sum
- - expr: |-
- sum(
- label_replace(
- label_replace(
- kube_pod_owner{job="kube-state-metrics", owner_kind="ReplicaSet"},
- "replicaset", "$1", "owner_name", "(.*)"
- ) * on(replicaset, namespace) group_left(owner_name) kube_replicaset_owner{job="kube-state-metrics"},
- "workload", "$1", "owner_name", "(.*)"
- )
- ) by (namespace, workload, pod)
- labels:
- workload_type: deployment
- record: mixin_pod_workload
- - expr: |-
- sum(
- label_replace(
- kube_pod_owner{job="kube-state-metrics", owner_kind="DaemonSet"},
- "workload", "$1", "owner_name", "(.*)"
- )
- ) by (namespace, workload, pod)
- labels:
- workload_type: daemonset
- record: mixin_pod_workload
- - expr: |-
- sum(
- label_replace(
- kube_pod_owner{job="kube-state-metrics", owner_kind="StatefulSet"},
- "workload", "$1", "owner_name", "(.*)"
- )
- ) by (namespace, workload, pod)
- labels:
- workload_type: statefulset
- record: mixin_pod_workload
-{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kube-apiserver.rules.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kube-apiserver.rules.yaml
deleted file mode 100755
index a576d56da2..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kube-apiserver.rules.yaml
+++ /dev/null
@@ -1,39 +0,0 @@
-{{- /*
-Generated from 'kube-apiserver.rules' group from https://raw.githubusercontent.com/coreos/kube-prometheus/release-0.1/manifests/prometheus-rules.yaml
-Do not change in-place! In order to change this file first read following link:
-https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
-*/ -}}
-{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.kubeApiServer.enabled .Values.defaultRules.rules.kubeApiserver }}
-apiVersion: monitoring.coreos.com/v1
-kind: PrometheusRule
-metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kube-apiserver.rules" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
- labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.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: histogram_quantile(0.99, sum(rate(apiserver_request_latencies_bucket{job="apiserver"}[5m])) without(instance, pod)) / 1e+06
- labels:
- quantile: '0.99'
- record: cluster_quantile:apiserver_request_latencies:histogram_quantile
- - expr: histogram_quantile(0.9, sum(rate(apiserver_request_latencies_bucket{job="apiserver"}[5m])) without(instance, pod)) / 1e+06
- labels:
- quantile: '0.9'
- record: cluster_quantile:apiserver_request_latencies:histogram_quantile
- - expr: histogram_quantile(0.5, sum(rate(apiserver_request_latencies_bucket{job="apiserver"}[5m])) without(instance, pod)) / 1e+06
- labels:
- quantile: '0.5'
- record: cluster_quantile:apiserver_request_latencies:histogram_quantile
-{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kube-prometheus-node-alerting.rules.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kube-prometheus-node-alerting.rules.yaml
deleted file mode 100755
index 741f5a7bcb..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kube-prometheus-node-alerting.rules.yaml
+++ /dev/null
@@ -1,41 +0,0 @@
-{{- /*
-Generated from 'kube-prometheus-node-alerting.rules' group from https://raw.githubusercontent.com/coreos/kube-prometheus/release-0.1/manifests/prometheus-rules.yaml
-Do not change in-place! In order to change this file first read following link:
-https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
-*/ -}}
-{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.kubePrometheusNodeAlerting }}
-apiVersion: monitoring.coreos.com/v1
-kind: PrometheusRule
-metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kube-prometheus-node-alerting.rules" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
- labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.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-prometheus-node-alerting.rules
- rules:
- - alert: NodeDiskRunningFull
- annotations:
- message: Device {{`{{`}} $labels.device {{`}}`}} of node-exporter {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod {{`}}`}} will be full within the next 24 hours.
- expr: '(node:node_filesystem_usage: > 0.85) and (predict_linear(node:node_filesystem_avail:[6h], 3600 * 24) < 0)'
- for: 30m
- labels:
- severity: warning
- - alert: NodeDiskRunningFull
- annotations:
- message: Device {{`{{`}} $labels.device {{`}}`}} of node-exporter {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod {{`}}`}} will be full within the next 2 hours.
- expr: '(node:node_filesystem_usage: > 0.85) and (predict_linear(node:node_filesystem_avail:[30m], 3600 * 2) < 0)'
- for: 10m
- labels:
- severity: critical
-{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kube-prometheus-node-recording.rules.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kube-prometheus-node-recording.rules.yaml
deleted file mode 100755
index 26089fcf33..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kube-prometheus-node-recording.rules.yaml
+++ /dev/null
@@ -1,41 +0,0 @@
-{{- /*
-Generated from 'kube-prometheus-node-recording.rules' group from https://raw.githubusercontent.com/coreos/kube-prometheus/release-0.1/manifests/prometheus-rules.yaml
-Do not change in-place! In order to change this file first read following link:
-https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
-*/ -}}
-{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.kubePrometheusNodeRecording }}
-apiVersion: monitoring.coreos.com/v1
-kind: PrometheusRule
-metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kube-prometheus-node-recording.rules" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
- labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.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-prometheus-node-recording.rules
- rules:
- - expr: sum(rate(node_cpu_seconds_total{mode!="idle",mode!="iowait"}[3m])) BY (instance)
- record: instance:node_cpu:rate:sum
- - expr: sum((node_filesystem_size_bytes{mountpoint="/"} - node_filesystem_free_bytes{mountpoint="/"})) BY (instance)
- record: instance:node_filesystem_usage:sum
- - expr: sum(rate(node_network_receive_bytes_total[3m])) BY (instance)
- record: instance:node_network_receive_bytes:rate:sum
- - expr: sum(rate(node_network_transmit_bytes_total[3m])) BY (instance)
- record: instance:node_network_transmit_bytes:rate:sum
- - expr: sum(rate(node_cpu_seconds_total{mode!="idle",mode!="iowait"}[5m])) WITHOUT (cpu, mode) / ON(instance) GROUP_LEFT() count(sum(node_cpu_seconds_total) BY (instance, cpu)) BY (instance)
- record: instance:node_cpu:ratio
- - expr: sum(rate(node_cpu_seconds_total{mode!="idle",mode!="iowait"}[5m]))
- record: cluster:node_cpu:sum_rate5m
- - expr: cluster:node_cpu_seconds_total: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/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kube-scheduler.rules.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kube-scheduler.rules.yaml
deleted file mode 100755
index 5d52b74d88..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kube-scheduler.rules.yaml
+++ /dev/null
@@ -1,63 +0,0 @@
-{{- /*
-Generated from 'kube-scheduler.rules' group from https://raw.githubusercontent.com/coreos/kube-prometheus/release-0.1/manifests/prometheus-rules.yaml
-Do not change in-place! In order to change this file first read following link:
-https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
-*/ -}}
-{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.kubeScheduler.enabled .Values.defaultRules.rules.kubeScheduler }}
-apiVersion: monitoring.coreos.com/v1
-kind: PrometheusRule
-metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kube-scheduler.rules" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
- labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.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-scheduler.rules
- rules:
- - expr: histogram_quantile(0.99, sum(rate(scheduler_e2e_scheduling_latency_microseconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod)) / 1e+06
- labels:
- quantile: '0.99'
- record: cluster_quantile:scheduler_e2e_scheduling_latency:histogram_quantile
- - expr: histogram_quantile(0.99, sum(rate(scheduler_scheduling_algorithm_latency_microseconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod)) / 1e+06
- labels:
- quantile: '0.99'
- record: cluster_quantile:scheduler_scheduling_algorithm_latency:histogram_quantile
- - expr: histogram_quantile(0.99, sum(rate(scheduler_binding_latency_microseconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod)) / 1e+06
- labels:
- quantile: '0.99'
- record: cluster_quantile:scheduler_binding_latency:histogram_quantile
- - expr: histogram_quantile(0.9, sum(rate(scheduler_e2e_scheduling_latency_microseconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod)) / 1e+06
- labels:
- quantile: '0.9'
- record: cluster_quantile:scheduler_e2e_scheduling_latency:histogram_quantile
- - expr: histogram_quantile(0.9, sum(rate(scheduler_scheduling_algorithm_latency_microseconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod)) / 1e+06
- labels:
- quantile: '0.9'
- record: cluster_quantile:scheduler_scheduling_algorithm_latency:histogram_quantile
- - expr: histogram_quantile(0.9, sum(rate(scheduler_binding_latency_microseconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod)) / 1e+06
- labels:
- quantile: '0.9'
- record: cluster_quantile:scheduler_binding_latency:histogram_quantile
- - expr: histogram_quantile(0.5, sum(rate(scheduler_e2e_scheduling_latency_microseconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod)) / 1e+06
- labels:
- quantile: '0.5'
- record: cluster_quantile:scheduler_e2e_scheduling_latency:histogram_quantile
- - expr: histogram_quantile(0.5, sum(rate(scheduler_scheduling_algorithm_latency_microseconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod)) / 1e+06
- labels:
- quantile: '0.5'
- record: cluster_quantile:scheduler_scheduling_algorithm_latency:histogram_quantile
- - expr: histogram_quantile(0.5, sum(rate(scheduler_binding_latency_microseconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod)) / 1e+06
- labels:
- quantile: '0.5'
- record: cluster_quantile:scheduler_binding_latency:histogram_quantile
-{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kubernetes-absent.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kubernetes-absent.yaml
deleted file mode 100755
index 41beceab02..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kubernetes-absent.yaml
+++ /dev/null
@@ -1,129 +0,0 @@
-{{- /*
-Generated from 'kubernetes-absent' group from https://raw.githubusercontent.com/coreos/kube-prometheus/release-0.1/manifests/prometheus-rules.yaml
-Do not change in-place! In order to change this file first read following link:
-https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
-*/ -}}
-{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.kubernetesAbsent }}
-{{- $operatorJob := printf "%s-%s" (include "prometheus-operator.fullname" .) "operator" }}
-{{- $prometheusJob := printf "%s-%s" (include "prometheus-operator.fullname" .) "prometheus" }}
-{{- $alertmanagerJob := printf "%s-%s" (include "prometheus-operator.fullname" .) "alertmanager" }}
-{{- $namespace := .Release.Namespace }}
-apiVersion: monitoring.coreos.com/v1
-kind: PrometheusRule
-metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubernetes-absent" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
- labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.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-absent
- rules:
-{{- if .Values.alertmanager.enabled }}
- - alert: AlertmanagerDown
- annotations:
- message: Alertmanager has disappeared from Prometheus target discovery.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-alertmanagerdown
- expr: absent(up{job="{{ $alertmanagerJob }}",namespace="{{ $namespace }}"} == 1)
- for: 15m
- labels:
- severity: critical
-{{- end }}
-{{- if .Values.kubeDns.enabled }}
- - alert: CoreDNSDown
- annotations:
- message: CoreDNS has disappeared from Prometheus target discovery.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-corednsdown
- expr: absent(up{job="kube-dns"} == 1)
- for: 15m
- labels:
- severity: critical
-{{- end }}
-{{- if .Values.kubeApiServer.enabled }}
- - alert: KubeAPIDown
- annotations:
- message: KubeAPI has disappeared from Prometheus target discovery.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeapidown
- expr: absent(up{job="apiserver"} == 1)
- for: 15m
- labels:
- severity: critical
-{{- end }}
-{{- if .Values.kubeControllerManager.enabled }}
- - alert: KubeControllerManagerDown
- annotations:
- message: KubeControllerManager has disappeared from Prometheus target discovery.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubecontrollermanagerdown
- expr: absent(up{job="kube-controller-manager"} == 1)
- for: 15m
- labels:
- severity: critical
-{{- end }}
-{{- if .Values.kubeScheduler.enabled }}
- - alert: KubeSchedulerDown
- annotations:
- message: KubeScheduler has disappeared from Prometheus target discovery.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeschedulerdown
- expr: absent(up{job="kube-scheduler"} == 1)
- for: 15m
- labels:
- severity: critical
-{{- end }}
-{{- if .Values.kubeStateMetrics.enabled }}
- - alert: KubeStateMetricsDown
- annotations:
- message: KubeStateMetrics has disappeared from Prometheus target discovery.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubestatemetricsdown
- expr: absent(up{job="kube-state-metrics"} == 1)
- for: 15m
- labels:
- severity: critical
-{{- end }}
-{{- if .Values.prometheusOperator.kubeletService.enabled }}
- - alert: KubeletDown
- annotations:
- message: Kubelet has disappeared from Prometheus target discovery.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeletdown
- expr: absent(up{job="kubelet"} == 1)
- for: 15m
- labels:
- severity: critical
-{{- end }}
-{{- if .Values.nodeExporter.enabled }}
- - alert: NodeExporterDown
- annotations:
- message: NodeExporter has disappeared from Prometheus target discovery.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-nodeexporterdown
- expr: absent(up{job="node-exporter"} == 1)
- for: 15m
- labels:
- severity: critical
-{{- end }}
- - alert: PrometheusDown
- annotations:
- message: Prometheus has disappeared from Prometheus target discovery.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheusdown
- expr: absent(up{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"} == 1)
- for: 15m
- labels:
- severity: critical
-{{- if .Values.prometheusOperator.enabled }}
- - alert: PrometheusOperatorDown
- annotations:
- message: PrometheusOperator has disappeared from Prometheus target discovery.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-prometheusoperatordown
- expr: absent(up{job="{{ $operatorJob }}",namespace="{{ $namespace }}"} == 1)
- for: 15m
- labels:
- severity: critical
-{{- end }}
-{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kubernetes-apps.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kubernetes-apps.yaml
deleted file mode 100755
index 3e8a8b2981..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kubernetes-apps.yaml
+++ /dev/null
@@ -1,161 +0,0 @@
-{{- /*
-Generated from 'kubernetes-apps' group from https://raw.githubusercontent.com/coreos/kube-prometheus/release-0.1/manifests/prometheus-rules.yaml
-Do not change in-place! In order to change this file first read following link:
-https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
-*/ -}}
-{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.kubeStateMetrics.enabled .Values.defaultRules.rules.kubernetesApps }}
-{{- $targetNamespace := .Values.defaultRules.appNamespacesTarget }}
-apiVersion: monitoring.coreos.com/v1
-kind: PrometheusRule
-metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubernetes-apps" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
- labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.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:
- - alert: KubePodCrashLooping
- annotations:
- message: Pod {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod {{`}}`}} ({{`{{`}} $labels.container {{`}}`}}) is restarting {{`{{`}} printf "%.2f" $value {{`}}`}} times / 5 minutes.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubepodcrashlooping
- expr: rate(kube_pod_container_status_restarts_total{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}[15m]) * 60 * 5 > 0
- for: 1h
- labels:
- severity: critical
- - alert: KubePodNotReady
- annotations:
- message: Pod {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod {{`}}`}} has been in a non-ready state for longer than an hour.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubepodnotready
- expr: sum by (namespace, pod) (kube_pod_status_phase{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}", phase=~"Pending|Unknown"}) > 0
- for: 1h
- labels:
- severity: critical
- - alert: KubeDeploymentGenerationMismatch
- annotations:
- message: 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
- 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: critical
- - alert: KubeDeploymentReplicasMismatch
- annotations:
- message: Deployment {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.deployment {{`}}`}} has not matched the expected number of replicas for longer than an hour.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubedeploymentreplicasmismatch
- expr: |-
- kube_deployment_spec_replicas{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}
- !=
- kube_deployment_status_replicas_available{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}
- for: 1h
- labels:
- severity: critical
- - alert: KubeStatefulSetReplicasMismatch
- annotations:
- message: 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
- expr: |-
- kube_statefulset_status_replicas_ready{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}
- !=
- kube_statefulset_status_replicas{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}
- for: 15m
- labels:
- severity: critical
- - alert: KubeStatefulSetGenerationMismatch
- annotations:
- message: 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
- 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: critical
- - alert: KubeStatefulSetUpdateNotRolledOut
- annotations:
- message: StatefulSet {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.statefulset {{`}}`}} update has not been rolled out.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubestatefulsetupdatenotrolledout
- 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 }}"}
- )
- for: 15m
- labels:
- severity: critical
- - alert: KubeDaemonSetRolloutStuck
- annotations:
- message: Only {{`{{`}} $value {{`}}`}}% of the desired Pods of DaemonSet {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.daemonset {{`}}`}} are scheduled and ready.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubedaemonsetrolloutstuck
- expr: |-
- kube_daemonset_status_number_ready{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"}
- /
- kube_daemonset_status_desired_number_scheduled{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} * 100 < 100
- for: 15m
- labels:
- severity: critical
- - alert: KubeDaemonSetNotScheduled
- annotations:
- message: '{{`{{`}} $value {{`}}`}} Pods of DaemonSet {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.daemonset {{`}}`}} are not scheduled.'
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubedaemonsetnotscheduled
- 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
- - alert: KubeDaemonSetMisScheduled
- annotations:
- message: '{{`{{`}} $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
- expr: kube_daemonset_status_number_misscheduled{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} > 0
- for: 10m
- labels:
- severity: warning
- - alert: KubeCronJobRunning
- annotations:
- message: CronJob {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.cronjob {{`}}`}} is taking more than 1h to complete.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubecronjobrunning
- expr: time() - kube_cronjob_next_schedule_time{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} > 3600
- for: 1h
- labels:
- severity: warning
- - alert: KubeJobCompletion
- annotations:
- message: Job {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.job_name {{`}}`}} is taking more than one hour to complete.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubejobcompletion
- expr: kube_job_spec_completions{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} - kube_job_status_succeeded{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} > 0
- for: 1h
- labels:
- severity: warning
- - alert: KubeJobFailed
- annotations:
- message: Job {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.job_name {{`}}`}} failed to complete.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubejobfailed
- expr: kube_job_status_failed{job="kube-state-metrics", namespace=~"{{ $targetNamespace }}"} > 0
- for: 1h
- labels:
- severity: warning
-{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kubernetes-resources.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kubernetes-resources.yaml
deleted file mode 100755
index cc1bee7347..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kubernetes-resources.yaml
+++ /dev/null
@@ -1,103 +0,0 @@
-{{- /*
-Generated from 'kubernetes-resources' group from https://raw.githubusercontent.com/coreos/kube-prometheus/release-0.1/manifests/prometheus-rules.yaml
-Do not change in-place! In order to change this file first read following link:
-https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
-*/ -}}
-{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.kubernetesResources }}
-apiVersion: monitoring.coreos.com/v1
-kind: PrometheusRule
-metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubernetes-resources" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
- labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.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-resources
- rules:
- - alert: KubeCPUOvercommit
- annotations:
- message: Cluster has overcommitted CPU resource requests for Pods and cannot tolerate node failure.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubecpuovercommit
- expr: |-
- sum(namespace_name:kube_pod_container_resource_requests_cpu_cores:sum)
- /
- sum(node:node_num_cpu:sum)
- >
- (count(node:node_num_cpu:sum)-1) / count(node:node_num_cpu:sum)
- for: 5m
- labels:
- severity: warning
- - alert: KubeMemOvercommit
- annotations:
- message: Cluster has overcommitted memory resource requests for Pods and cannot tolerate node failure.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubememovercommit
- expr: |-
- sum(namespace_name:kube_pod_container_resource_requests_memory_bytes:sum)
- /
- sum(node_memory_MemTotal_bytes)
- >
- (count(node:node_num_cpu:sum)-1)
- /
- count(node:node_num_cpu:sum)
- for: 5m
- labels:
- severity: warning
- - alert: KubeCPUOvercommit
- annotations:
- message: Cluster has overcommitted CPU resource requests for Namespaces.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubecpuovercommit
- expr: |-
- sum(kube_resourcequota{job="kube-state-metrics", type="hard", resource="cpu"})
- /
- sum(node:node_num_cpu:sum)
- > 1.5
- for: 5m
- labels:
- severity: warning
- - alert: KubeMemOvercommit
- annotations:
- message: Cluster has overcommitted memory resource requests for Namespaces.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubememovercommit
- expr: |-
- sum(kube_resourcequota{job="kube-state-metrics", type="hard", resource="memory"})
- /
- sum(node_memory_MemTotal_bytes{job="node-exporter"})
- > 1.5
- for: 5m
- labels:
- severity: warning
- - alert: KubeQuotaExceeded
- annotations:
- message: Namespace {{`{{`}} $labels.namespace {{`}}`}} is using {{`{{`}} printf "%0.0f" $value {{`}}`}}% of its {{`{{`}} $labels.resource {{`}}`}} quota.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubequotaexceeded
- expr: |-
- 100 * kube_resourcequota{job="kube-state-metrics", type="used"}
- / ignoring(instance, job, type)
- (kube_resourcequota{job="kube-state-metrics", type="hard"} > 0)
- > 90
- for: 15m
- labels:
- severity: warning
- - alert: CPUThrottlingHigh
- annotations:
- message: '{{`{{`}} printf "%0.0f" $value {{`}}`}}% throttling of CPU in namespace {{`{{`}} $labels.namespace {{`}}`}} for container {{`{{`}} $labels.container_name {{`}}`}} in pod {{`{{`}} $labels.pod_name {{`}}`}}.'
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-cputhrottlinghigh
- expr: |-
- 100 * sum(increase(container_cpu_cfs_throttled_periods_total{container_name!="", }[5m])) by (container_name, pod_name, namespace)
- /
- sum(increase(container_cpu_cfs_periods_total{}[5m])) by (container_name, pod_name, namespace)
- > 25
- for: 15m
- labels:
- severity: warning
-{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kubernetes-storage.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kubernetes-storage.yaml
deleted file mode 100755
index 2962407fc2..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kubernetes-storage.yaml
+++ /dev/null
@@ -1,63 +0,0 @@
-{{- /*
-Generated from 'kubernetes-storage' group from https://raw.githubusercontent.com/coreos/kube-prometheus/release-0.1/manifests/prometheus-rules.yaml
-Do not change in-place! In order to change this file first read following link:
-https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
-*/ -}}
-{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $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 "prometheus-operator.fullname" .) "kubernetes-storage" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
- labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.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:
- - alert: KubePersistentVolumeUsageCritical
- annotations:
- message: The PersistentVolume claimed by {{`{{`}} $labels.persistentvolumeclaim {{`}}`}} in Namespace {{`{{`}} $labels.namespace {{`}}`}} is only {{`{{`}} printf "%0.2f" $value {{`}}`}}% free.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubepersistentvolumeusagecritical
- expr: |-
- 100 * kubelet_volume_stats_available_bytes{job="kubelet", namespace=~"{{ $targetNamespace }}"}
- /
- kubelet_volume_stats_capacity_bytes{job="kubelet", namespace=~"{{ $targetNamespace }}"}
- < 3
- for: 1m
- labels:
- severity: critical
- - alert: KubePersistentVolumeFullInFourDays
- annotations:
- message: Based on recent sampling, the PersistentVolume claimed by {{`{{`}} $labels.persistentvolumeclaim {{`}}`}} in Namespace {{`{{`}} $labels.namespace {{`}}`}} is expected to fill up within four days. Currently {{`{{`}} printf "%0.2f" $value {{`}}`}}% is available.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubepersistentvolumefullinfourdays
- expr: |-
- 100 * (
- kubelet_volume_stats_available_bytes{job="kubelet", namespace=~"{{ $targetNamespace }}"}
- /
- kubelet_volume_stats_capacity_bytes{job="kubelet", namespace=~"{{ $targetNamespace }}"}
- ) < 15
- and
- predict_linear(kubelet_volume_stats_available_bytes{job="kubelet", namespace=~"{{ $targetNamespace }}"}[6h], 4 * 24 * 3600) < 0
- for: 5m
- labels:
- severity: critical
- - alert: KubePersistentVolumeErrors
- annotations:
- message: The persistent volume {{`{{`}} $labels.persistentvolume {{`}}`}} has status {{`{{`}} $labels.phase {{`}}`}}.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubepersistentvolumeerrors
- expr: kube_persistentvolume_status_phase{phase=~"Failed|Pending",job="kube-state-metrics"} > 0
- for: 5m
- labels:
- severity: critical
-{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kubernetes-system.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kubernetes-system.yaml
deleted file mode 100755
index a12a3c0fa9..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kubernetes-system.yaml
+++ /dev/null
@@ -1,145 +0,0 @@
-{{- /*
-Generated from 'kubernetes-system' group from https://raw.githubusercontent.com/coreos/kube-prometheus/release-0.1/manifests/prometheus-rules.yaml
-Do not change in-place! In order to change this file first read following link:
-https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
-*/ -}}
-{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.kubernetesSystem }}
-apiVersion: monitoring.coreos.com/v1
-kind: PrometheusRule
-metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubernetes-system" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
- labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.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
- rules:
- - alert: KubeNodeNotReady
- annotations:
- message: '{{`{{`}} $labels.node {{`}}`}} has been unready for more than an hour.'
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubenodenotready
- expr: kube_node_status_condition{job="kube-state-metrics",condition="Ready",status="true"} == 0
- for: 1h
- labels:
- severity: warning
- - alert: KubeVersionMismatch
- annotations:
- message: There are {{`{{`}} $value {{`}}`}} different semantic versions of Kubernetes components running.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeversionmismatch
- expr: count(count by (gitVersion) (label_replace(kubernetes_build_info{job!~"kube-dns|coredns"},"gitVersion","$1","gitVersion","(v[0-9]*.[0-9]*.[0-9]*).*"))) > 1
- for: 1h
- labels:
- severity: warning
- - alert: KubeClientErrors
- annotations:
- message: Kubernetes API server client '{{`{{`}} $labels.job {{`}}`}}/{{`{{`}} $labels.instance {{`}}`}}' is experiencing {{`{{`}} printf "%0.0f" $value {{`}}`}}% errors.'
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeclienterrors
- expr: |-
- (sum(rate(rest_client_requests_total{code=~"5.."}[5m])) by (instance, job)
- /
- sum(rate(rest_client_requests_total[5m])) by (instance, job))
- * 100 > 1
- for: 15m
- labels:
- severity: warning
- - alert: KubeClientErrors
- annotations:
- message: Kubernetes API server client '{{`{{`}} $labels.job {{`}}`}}/{{`{{`}} $labels.instance {{`}}`}}' is experiencing {{`{{`}} printf "%0.0f" $value {{`}}`}} errors / second.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeclienterrors
- expr: sum(rate(ksm_scrape_error_total{job="kube-state-metrics"}[5m])) by (instance, job) > 0.1
- for: 15m
- labels:
- severity: warning
- - alert: KubeletTooManyPods
- annotations:
- message: Kubelet {{`{{`}} $labels.instance {{`}}`}} is running {{`{{`}} $value {{`}}`}} Pods, close to the limit of 110.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubelettoomanypods
- expr: kubelet_running_pod_count{job="kubelet"} > 110 * 0.9
- for: 15m
- labels:
- severity: warning
- - alert: KubeAPILatencyHigh
- annotations:
- message: The API server has a 99th percentile latency of {{`{{`}} $value {{`}}`}} seconds for {{`{{`}} $labels.verb {{`}}`}} {{`{{`}} $labels.resource {{`}}`}}.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeapilatencyhigh
- expr: cluster_quantile:apiserver_request_latencies:histogram_quantile{job="apiserver",quantile="0.99",subresource!="log",verb!~"^(?:LIST|WATCH|WATCHLIST|PROXY|CONNECT)$"} > 1
- for: 10m
- labels:
- severity: warning
- - alert: KubeAPILatencyHigh
- annotations:
- message: The API server has a 99th percentile latency of {{`{{`}} $value {{`}}`}} seconds for {{`{{`}} $labels.verb {{`}}`}} {{`{{`}} $labels.resource {{`}}`}}.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeapilatencyhigh
- expr: cluster_quantile:apiserver_request_latencies:histogram_quantile{job="apiserver",quantile="0.99",subresource!="log",verb!~"^(?:LIST|WATCH|WATCHLIST|PROXY|CONNECT)$"} > 4
- for: 10m
- labels:
- severity: critical
- - alert: KubeAPIErrorsHigh
- annotations:
- message: API server is returning errors for {{`{{`}} $value {{`}}`}}% of requests.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeapierrorshigh
- expr: |-
- sum(rate(apiserver_request_count{job="apiserver",code=~"^(?:5..)$"}[5m]))
- /
- sum(rate(apiserver_request_count{job="apiserver"}[5m])) * 100 > 3
- for: 10m
- labels:
- severity: critical
- - alert: KubeAPIErrorsHigh
- annotations:
- message: API server is returning errors for {{`{{`}} $value {{`}}`}}% of requests.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeapierrorshigh
- expr: |-
- sum(rate(apiserver_request_count{job="apiserver",code=~"^(?:5..)$"}[5m]))
- /
- sum(rate(apiserver_request_count{job="apiserver"}[5m])) * 100 > 1
- for: 10m
- labels:
- severity: warning
- - alert: KubeAPIErrorsHigh
- annotations:
- message: API server is returning errors for {{`{{`}} $value {{`}}`}}% of requests for {{`{{`}} $labels.verb {{`}}`}} {{`{{`}} $labels.resource {{`}}`}} {{`{{`}} $labels.subresource {{`}}`}}.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeapierrorshigh
- expr: |-
- sum(rate(apiserver_request_count{job="apiserver",code=~"^(?:5..)$"}[5m])) by (resource,subresource,verb)
- /
- sum(rate(apiserver_request_count{job="apiserver"}[5m])) by (resource,subresource,verb) * 100 > 10
- for: 10m
- labels:
- severity: critical
- - alert: KubeAPIErrorsHigh
- annotations:
- message: API server is returning errors for {{`{{`}} $value {{`}}`}}% of requests for {{`{{`}} $labels.verb {{`}}`}} {{`{{`}} $labels.resource {{`}}`}} {{`{{`}} $labels.subresource {{`}}`}}.
- runbook_url: {{ .Values.defaultRules.runbookUrl }}alert-name-kubeapierrorshigh
- expr: |-
- sum(rate(apiserver_request_count{job="apiserver",code=~"^(?:5..)$"}[5m])) by (resource,subresource,verb)
- /
- sum(rate(apiserver_request_count{job="apiserver"}[5m])) by (resource,subresource,verb) * 100 > 5
- for: 10m
- labels:
- severity: warning
- - alert: KubeClientCertificateExpiration
- annotations:
- message: 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
- expr: apiserver_client_certificate_expiration_seconds_count{job="apiserver"} > 0 and histogram_quantile(0.01, sum by (job, le) (rate(apiserver_client_certificate_expiration_seconds_bucket{job="apiserver"}[5m]))) < 604800
- labels:
- severity: warning
- - alert: KubeClientCertificateExpiration
- annotations:
- message: 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
- expr: apiserver_client_certificate_expiration_seconds_count{job="apiserver"} > 0 and histogram_quantile(0.01, sum by (job, le) (rate(apiserver_client_certificate_expiration_seconds_bucket{job="apiserver"}[5m]))) < 86400
- labels:
- severity: critical
-{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/node-network.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/node-network.yaml
deleted file mode 100755
index 10e1640362..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/node-network.yaml
+++ /dev/null
@@ -1,48 +0,0 @@
-{{- /*
-Generated from 'node-network' group from https://raw.githubusercontent.com/coreos/kube-prometheus/release-0.1/manifests/prometheus-rules.yaml
-Do not change in-place! In order to change this file first read following link:
-https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
-*/ -}}
-{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.network }}
-apiVersion: monitoring.coreos.com/v1
-kind: PrometheusRule
-metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "node-network" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
- labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.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: node-network
- rules:
- - alert: NetworkReceiveErrors
- annotations:
- message: Network interface "{{`{{`}} $labels.device {{`}}`}}" showing receive errors on node-exporter {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod {{`}}`}}"
- expr: rate(node_network_receive_errs_total{job="node-exporter",device!~"veth.+"}[2m]) > 0
- for: 2m
- labels:
- severity: warning
- - alert: NetworkTransmitErrors
- annotations:
- message: Network interface "{{`{{`}} $labels.device {{`}}`}}" showing transmit errors on node-exporter {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod {{`}}`}}"
- expr: rate(node_network_transmit_errs_total{job="node-exporter",device!~"veth.+"}[2m]) > 0
- for: 2m
- labels:
- severity: warning
- - alert: NodeNetworkInterfaceFlapping
- annotations:
- message: Network interface "{{`{{`}} $labels.device {{`}}`}}" changing it's up status often on node-exporter {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod {{`}}`}}"
- expr: changes(node_network_up{job="node-exporter",device!~"veth.+"}[2m]) > 2
- for: 2m
- labels:
- severity: warning
-{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/node-time.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/node-time.yaml
deleted file mode 100755
index 00b9d4b170..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/node-time.yaml
+++ /dev/null
@@ -1,34 +0,0 @@
-{{- /*
-Generated from 'node-time' group from https://raw.githubusercontent.com/coreos/kube-prometheus/release-0.1/manifests/prometheus-rules.yaml
-Do not change in-place! In order to change this file first read following link:
-https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
-*/ -}}
-{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.time }}
-apiVersion: monitoring.coreos.com/v1
-kind: PrometheusRule
-metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "node-time" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
- labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.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: node-time
- rules:
- - alert: ClockSkewDetected
- annotations:
- message: Clock skew detected on node-exporter {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod {{`}}`}}. Ensure NTP is configured correctly on this host.
- expr: abs(node_timex_offset_seconds{job="node-exporter"}) > 0.03
- for: 2m
- labels:
- severity: warning
-{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/node.rules.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/node.rules.yaml
deleted file mode 100755
index 8273441eab..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/node.rules.yaml
+++ /dev/null
@@ -1,202 +0,0 @@
-{{- /*
-Generated from 'node.rules' group from https://raw.githubusercontent.com/coreos/kube-prometheus/release-0.1/manifests/prometheus-rules.yaml
-Do not change in-place! In order to change this file first read following link:
-https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
-*/ -}}
-{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.nodeExporter.enabled .Values.defaultRules.rules.node }}
-apiVersion: monitoring.coreos.com/v1
-kind: PrometheusRule
-metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "node.rules" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
- labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.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: node.rules
- rules:
- - expr: sum(min(kube_pod_info) by (node))
- record: ':kube_pod_info_node_count:'
- - expr: max(label_replace(kube_pod_info{job="kube-state-metrics"}, "pod", "$1", "pod", "(.*)")) by (node, namespace, pod)
- record: 'node_namespace_pod:kube_pod_info:'
- - expr: |-
- count by (node) (sum by (node, cpu) (
- node_cpu_seconds_total{job="node-exporter"}
- * on (namespace, pod) group_left(node)
- node_namespace_pod:kube_pod_info:
- ))
- record: node:node_num_cpu:sum
- - expr: 1 - avg(rate(node_cpu_seconds_total{job="node-exporter",mode="idle"}[1m]))
- record: :node_cpu_utilisation:avg1m
- - expr: |-
- 1 - avg by (node) (
- rate(node_cpu_seconds_total{job="node-exporter",mode="idle"}[1m])
- * on (namespace, pod) group_left(node)
- node_namespace_pod:kube_pod_info:)
- record: node:node_cpu_utilisation:avg1m
- - expr: |-
- node:node_cpu_utilisation:avg1m
- *
- node:node_num_cpu:sum
- /
- scalar(sum(node:node_num_cpu:sum))
- record: node:cluster_cpu_utilisation:ratio
- - expr: |-
- sum(node_load1{job="node-exporter"})
- /
- sum(node:node_num_cpu:sum)
- record: ':node_cpu_saturation_load1:'
- - expr: |-
- sum by (node) (
- node_load1{job="node-exporter"}
- * on (namespace, pod) group_left(node)
- node_namespace_pod:kube_pod_info:
- )
- /
- node:node_num_cpu:sum
- record: 'node:node_cpu_saturation_load1:'
- - expr: |-
- 1 -
- sum(node_memory_MemFree_bytes{job="node-exporter"} + node_memory_Cached_bytes{job="node-exporter"} + node_memory_Buffers_bytes{job="node-exporter"})
- /
- sum(node_memory_MemTotal_bytes{job="node-exporter"})
- record: ':node_memory_utilisation:'
- - expr: sum(node_memory_MemFree_bytes{job="node-exporter"} + node_memory_Cached_bytes{job="node-exporter"} + node_memory_Buffers_bytes{job="node-exporter"})
- record: :node_memory_MemFreeCachedBuffers_bytes:sum
- - expr: sum(node_memory_MemTotal_bytes{job="node-exporter"})
- record: :node_memory_MemTotal_bytes:sum
- - expr: |-
- sum by (node) (
- (node_memory_MemFree_bytes{job="node-exporter"} + node_memory_Cached_bytes{job="node-exporter"} + node_memory_Buffers_bytes{job="node-exporter"})
- * on (namespace, pod) group_left(node)
- node_namespace_pod:kube_pod_info:
- )
- record: node:node_memory_bytes_available:sum
- - expr: |-
- sum by (node) (
- node_memory_MemTotal_bytes{job="node-exporter"}
- * on (namespace, pod) group_left(node)
- node_namespace_pod:kube_pod_info:
- )
- record: node:node_memory_bytes_total:sum
- - expr: |-
- (node:node_memory_bytes_total:sum - node:node_memory_bytes_available:sum)
- /
- node:node_memory_bytes_total:sum
- record: node:node_memory_utilisation:ratio
- - expr: |-
- (node:node_memory_bytes_total:sum - node:node_memory_bytes_available:sum)
- /
- scalar(sum(node:node_memory_bytes_total:sum))
- record: node:cluster_memory_utilisation:ratio
- - expr: |-
- 1e3 * sum(
- (rate(node_vmstat_pgpgin{job="node-exporter"}[1m])
- + rate(node_vmstat_pgpgout{job="node-exporter"}[1m]))
- )
- record: :node_memory_swap_io_bytes:sum_rate
- - expr: |-
- 1 -
- sum by (node) (
- (node_memory_MemFree_bytes{job="node-exporter"} + node_memory_Cached_bytes{job="node-exporter"} + node_memory_Buffers_bytes{job="node-exporter"})
- * on (namespace, pod) group_left(node)
- node_namespace_pod:kube_pod_info:
- )
- /
- sum by (node) (
- node_memory_MemTotal_bytes{job="node-exporter"}
- * on (namespace, pod) group_left(node)
- node_namespace_pod:kube_pod_info:
- )
- record: 'node:node_memory_utilisation:'
- - expr: 1 - (node:node_memory_bytes_available:sum / node:node_memory_bytes_total:sum)
- record: 'node:node_memory_utilisation_2:'
- - expr: |-
- 1e3 * sum by (node) (
- (rate(node_vmstat_pgpgin{job="node-exporter"}[1m])
- + rate(node_vmstat_pgpgout{job="node-exporter"}[1m]))
- * on (namespace, pod) group_left(node)
- node_namespace_pod:kube_pod_info:
- )
- record: node:node_memory_swap_io_bytes:sum_rate
- - expr: avg(irate(node_disk_io_time_seconds_total{job="node-exporter",device=~"nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+"}[1m]))
- record: :node_disk_utilisation:avg_irate
- - expr: |-
- avg by (node) (
- irate(node_disk_io_time_seconds_total{job="node-exporter",device=~"nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+"}[1m])
- * on (namespace, pod) group_left(node)
- node_namespace_pod:kube_pod_info:
- )
- record: node:node_disk_utilisation:avg_irate
- - expr: avg(irate(node_disk_io_time_weighted_seconds_total{job="node-exporter",device=~"nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+"}[1m]))
- record: :node_disk_saturation:avg_irate
- - expr: |-
- avg by (node) (
- irate(node_disk_io_time_weighted_seconds_total{job="node-exporter",device=~"nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+"}[1m])
- * on (namespace, pod) group_left(node)
- node_namespace_pod:kube_pod_info:
- )
- record: node:node_disk_saturation:avg_irate
- - expr: |-
- max by (instance, namespace, pod, device) ((node_filesystem_size_bytes{fstype=~"ext[234]|btrfs|xfs|zfs"}
- - node_filesystem_avail_bytes{fstype=~"ext[234]|btrfs|xfs|zfs"})
- / node_filesystem_size_bytes{fstype=~"ext[234]|btrfs|xfs|zfs"})
- record: 'node:node_filesystem_usage:'
- - expr: max by (instance, namespace, pod, device) (node_filesystem_avail_bytes{fstype=~"ext[234]|btrfs|xfs|zfs"} / node_filesystem_size_bytes{fstype=~"ext[234]|btrfs|xfs|zfs"})
- record: 'node:node_filesystem_avail:'
- - expr: |-
- sum(irate(node_network_receive_bytes_total{job="node-exporter",device!~"veth.+"}[1m])) +
- sum(irate(node_network_transmit_bytes_total{job="node-exporter",device!~"veth.+"}[1m]))
- record: :node_net_utilisation:sum_irate
- - expr: |-
- sum by (node) (
- (irate(node_network_receive_bytes_total{job="node-exporter",device!~"veth.+"}[1m]) +
- irate(node_network_transmit_bytes_total{job="node-exporter",device!~"veth.+"}[1m]))
- * on (namespace, pod) group_left(node)
- node_namespace_pod:kube_pod_info:
- )
- record: node:node_net_utilisation:sum_irate
- - expr: |-
- sum(irate(node_network_receive_drop_total{job="node-exporter",device!~"veth.+"}[1m])) +
- sum(irate(node_network_transmit_drop_total{job="node-exporter",device!~"veth.+"}[1m]))
- record: :node_net_saturation:sum_irate
- - expr: |-
- sum by (node) (
- (irate(node_network_receive_drop_total{job="node-exporter",device!~"veth.+"}[1m]) +
- irate(node_network_transmit_drop_total{job="node-exporter",device!~"veth.+"}[1m]))
- * on (namespace, pod) group_left(node)
- node_namespace_pod:kube_pod_info:
- )
- record: node:node_net_saturation:sum_irate
- - expr: |-
- max(
- max(
- kube_pod_info{job="kube-state-metrics", host_ip!=""}
- ) by (node, host_ip)
- * on (host_ip) group_right (node)
- label_replace(
- (max(node_filesystem_files{job="node-exporter", mountpoint="/"}) by (instance)), "host_ip", "$1", "instance", "(.*):.*"
- )
- ) by (node)
- record: 'node:node_inodes_total:'
- - expr: |-
- max(
- max(
- kube_pod_info{job="kube-state-metrics", host_ip!=""}
- ) by (node, host_ip)
- * on (host_ip) group_right (node)
- label_replace(
- (max(node_filesystem_files_free{job="node-exporter", mountpoint="/"}) by (instance)), "host_ip", "$1", "instance", "(.*):.*"
- )
- ) by (node)
- record: 'node:node_inodes_free:'
-{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/prometheus-operator.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/prometheus-operator.yaml
deleted file mode 100755
index fa109c40db..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/prometheus-operator.yaml
+++ /dev/null
@@ -1,43 +0,0 @@
-{{- /*
-Generated from 'prometheus-operator' group from https://raw.githubusercontent.com/coreos/kube-prometheus/release-0.1/manifests/prometheus-rules.yaml
-Do not change in-place! In order to change this file first read following link:
-https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
-*/ -}}
-{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.prometheusOperator }}
-{{- $operatorJob := printf "%s-%s" (include "prometheus-operator.fullname" .) "operator" }}
-{{- $namespace := .Release.Namespace }}
-apiVersion: monitoring.coreos.com/v1
-kind: PrometheusRule
-metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "prometheus-operator" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
- labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.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-operator
- rules:
- - alert: PrometheusOperatorReconcileErrors
- annotations:
- message: Errors while reconciling {{`{{`}} $labels.controller {{`}}`}} in {{`{{`}} $labels.namespace {{`}}`}} Namespace.
- expr: rate(prometheus_operator_reconcile_errors_total{job="{{ $operatorJob }}",namespace="{{ $namespace }}"}[5m]) > 0.1
- for: 10m
- labels:
- severity: warning
- - alert: PrometheusOperatorNodeLookupErrors
- annotations:
- message: Errors while reconciling Prometheus in {{`{{`}} $labels.namespace {{`}}`}} Namespace.
- expr: rate(prometheus_operator_node_address_lookup_errors_total{job="{{ $operatorJob }}",namespace="{{ $namespace }}"}[5m]) > 0.1
- for: 10m
- labels:
- severity: warning
-{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/prometheus.rules.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/prometheus.rules.yaml
deleted file mode 100755
index 82f19dadea..0000000000
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/prometheus.rules.yaml
+++ /dev/null
@@ -1,109 +0,0 @@
-{{- /*
-Generated from 'prometheus.rules' group from https://raw.githubusercontent.com/coreos/kube-prometheus/release-0.1/manifests/prometheus-rules.yaml
-Do not change in-place! In order to change this file first read following link:
-https://github.com/helm/charts/tree/master/stable/prometheus-operator/hack
-*/ -}}
-{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
-{{- if and (semverCompare ">=1.10.0-0" $kubeTargetVersion) (semverCompare "<1.14.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.prometheus }}
-{{- $prometheusJob := printf "%s-%s" (include "prometheus-operator.fullname" .) "prometheus" }}
-{{- $namespace := .Release.Namespace }}
-apiVersion: monitoring.coreos.com/v1
-kind: PrometheusRule
-metadata:
- name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "prometheus.rules" | trunc 63 | trimSuffix "-" }}
- namespace: {{ .Release.Namespace }}
- labels:
- app: {{ template "prometheus-operator.name" . }}
-{{ include "prometheus-operator.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
- rules:
- - alert: PrometheusConfigReloadFailed
- annotations:
- description: Reloading Prometheus' configuration has failed for {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}}
- summary: Reloading Prometheus' configuration failed
- expr: prometheus_config_last_reload_successful{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"} == 0
- for: 10m
- labels:
- severity: warning
- - alert: PrometheusNotificationQueueRunningFull
- annotations:
- description: Prometheus' alert notification queue is running full for {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}} $labels.pod{{`}}`}}
- summary: Prometheus' alert notification queue is running full
- expr: predict_linear(prometheus_notifications_queue_length{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m], 60 * 30) > prometheus_notifications_queue_capacity{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}
- for: 10m
- labels:
- severity: warning
- - alert: PrometheusErrorSendingAlerts
- annotations:
- description: Errors while sending alerts from Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}} $labels.pod{{`}}`}} to Alertmanager {{`{{`}}$labels.Alertmanager{{`}}`}}
- summary: Errors while sending alert from Prometheus
- expr: rate(prometheus_notifications_errors_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) / rate(prometheus_notifications_sent_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) > 0.01
- for: 10m
- labels:
- severity: warning
- - alert: PrometheusErrorSendingAlerts
- annotations:
- description: Errors while sending alerts from Prometheus {{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}} $labels.pod{{`}}`}} to Alertmanager {{`{{`}}$labels.Alertmanager{{`}}`}}
- summary: Errors while sending alerts from Prometheus
- expr: rate(prometheus_notifications_errors_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) / rate(prometheus_notifications_sent_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) > 0.03
- for: 10m
- labels:
- severity: critical
- - alert: PrometheusNotConnectedToAlertmanagers
- annotations:
- description: Prometheus {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod{{`}}`}} is not connected to any Alertmanagers
- summary: Prometheus is not connected to any Alertmanagers
- expr: prometheus_notifications_alertmanagers_discovered{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"} < 1
- for: 10m
- labels:
- severity: warning
- - alert: PrometheusTSDBReloadsFailing
- annotations:
- description: '{{`{{`}}$labels.job{{`}}`}} at {{`{{`}}$labels.instance{{`}}`}} had {{`{{`}}$value | humanize{{`}}`}} reload failures over the last four hours.'
- summary: Prometheus has issues reloading data blocks from disk
- expr: increase(prometheus_tsdb_reloads_failures_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[2h]) > 0
- for: 12h
- labels:
- severity: warning
- - alert: PrometheusTSDBCompactionsFailing
- annotations:
- description: '{{`{{`}}$labels.job{{`}}`}} at {{`{{`}}$labels.instance{{`}}`}} had {{`{{`}}$value | humanize{{`}}`}} compaction failures over the last four hours.'
- summary: Prometheus has issues compacting sample blocks
- expr: increase(prometheus_tsdb_compactions_failed_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[2h]) > 0
- for: 12h
- labels:
- severity: warning
- - alert: PrometheusTSDBWALCorruptions
- annotations:
- description: '{{`{{`}}$labels.job{{`}}`}} at {{`{{`}}$labels.instance{{`}}`}} has a corrupted write-ahead log (WAL).'
- summary: Prometheus write-ahead log is corrupted
- expr: prometheus_tsdb_wal_corruptions_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"} > 0
- for: 4h
- labels:
- severity: warning
- - alert: PrometheusNotIngestingSamples
- annotations:
- description: Prometheus {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod{{`}}`}} isn't ingesting samples.
- summary: Prometheus isn't ingesting samples
- expr: rate(prometheus_tsdb_head_samples_appended_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) <= 0
- for: 10m
- labels:
- severity: warning
- - alert: PrometheusTargetScrapesDuplicate
- annotations:
- description: '{{`{{`}}$labels.namespace{{`}}`}}/{{`{{`}}$labels.pod{{`}}`}} has many samples rejected due to duplicate timestamps but different values'
- summary: Prometheus has many samples rejected
- expr: increase(prometheus_target_scrapes_sample_duplicate_timestamp_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) > 0
- for: 10m
- labels:
- severity: warning
-{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/service.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/service.yaml
old mode 100755
new mode 100644
index be9cb25938..7834dedd2f
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/service.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/service.yaml
@@ -1,13 +1,14 @@
+{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }}
{{- if .Values.prometheus.enabled }}
apiVersion: v1
kind: Service
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-prometheus
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-prometheus
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}-prometheus
+ app: {{ template "kube-prometheus-stack.name" . }}-prometheus
self-monitor: {{ .Values.prometheus.serviceMonitor.selfMonitor | quote }}
-{{ include "prometheus-operator.labels" . | indent 4 }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
{{- if .Values.prometheus.service.labels }}
{{ toYaml .Values.prometheus.service.labels | indent 4 }}
{{- end }}
@@ -31,6 +32,9 @@ spec:
{{- 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 }}
@@ -39,12 +43,31 @@ spec:
{{- end }}
port: {{ .Values.prometheus.service.port }}
targetPort: {{ .Values.prometheus.service.targetPort }}
+ - name: reloader-web
+ {{- if semverCompare "> 1.20.0-0" $kubeTargetVersion }}
+ appProtocol: http
+ {{- end }}
+ port: 8080
+ targetPort: reloader-web
+ {{- if .Values.prometheus.thanosIngress.enabled }}
+ - name: grpc
+ {{- if eq .Values.prometheus.service.type "NodePort" }}
+ nodePort: {{ .Values.prometheus.thanosIngress.nodePort }}
+ {{- end }}
+ port: {{ .Values.prometheus.thanosIngress.servicePort }}
+ targetPort: {{ .Values.prometheus.thanosIngress.servicePort }}
+ {{- end }}
{{- if .Values.prometheus.service.additionalPorts }}
{{ toYaml .Values.prometheus.service.additionalPorts | indent 2 }}
{{- end }}
+ publishNotReadyAddresses: {{ .Values.prometheus.service.publishNotReadyAddresses }}
selector:
- app: prometheus
- prometheus: {{ template "prometheus-operator.fullname" . }}-prometheus
+ {{- if .Values.prometheus.agentMode }}
+ app.kubernetes.io/name: prometheus-agent
+ {{- else }}
+ app.kubernetes.io/name: prometheus
+ {{- end }}
+ operator.prometheus.io/name: {{ template "kube-prometheus-stack.prometheus.crname" . }}
{{- if .Values.prometheus.service.sessionAffinity }}
sessionAffinity: {{ .Values.prometheus.service.sessionAffinity }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/serviceThanosSidecar.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/serviceThanosSidecar.yaml
new file mode 100644
index 0000000000..15b89c8c23
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/serviceThanosSidecar.yaml
@@ -0,0 +1,39 @@
+{{- if and .Values.prometheus.enabled .Values.prometheus.thanosService.enabled }}
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ template "kube-prometheus-stack.fullname" . }}-thanos-discovery
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ labels:
+ app: {{ template "kube-prometheus-stack.name" . }}-thanos-discovery
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
+{{- if .Values.prometheus.thanosService.labels }}
+{{ toYaml .Values.prometheus.thanosService.labels | indent 4 }}
+{{- end }}
+{{- if .Values.prometheus.thanosService.annotations }}
+ annotations:
+{{ toYaml .Values.prometheus.thanosService.annotations | indent 4 }}
+{{- end }}
+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 }}
+ targetPort: {{ .Values.prometheus.thanosService.targetPort }}
+ {{- if eq .Values.prometheus.thanosService.type "NodePort" }}
+ nodePort: {{ .Values.prometheus.thanosService.nodePort }}
+ {{- end }}
+ - name: {{ .Values.prometheus.thanosService.httpPortName }}
+ port: {{ .Values.prometheus.thanosService.httpPort }}
+ targetPort: {{ .Values.prometheus.thanosService.targetHttpPort }}
+ {{- if eq .Values.prometheus.thanosService.type "NodePort" }}
+ nodePort: {{ .Values.prometheus.thanosService.httpNodePort }}
+ {{- end }}
+ selector:
+ app.kubernetes.io/name: prometheus
+ operator.prometheus.io/name: {{ template "kube-prometheus-stack.prometheus.crname" . }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/serviceThanosSidecarExternal.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/serviceThanosSidecarExternal.yaml
new file mode 100644
index 0000000000..453eed7f1b
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/serviceThanosSidecarExternal.yaml
@@ -0,0 +1,46 @@
+{{- if and .Values.prometheus.enabled .Values.prometheus.thanosServiceExternal.enabled }}
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ template "kube-prometheus-stack.fullname" . }}-thanos-external
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ labels:
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
+{{- if .Values.prometheus.thanosServiceExternal.labels }}
+{{ toYaml .Values.prometheus.thanosServiceExternal.labels | indent 4 }}
+{{- end }}
+{{- if .Values.prometheus.thanosServiceExternal.annotations }}
+ annotations:
+{{ toYaml .Values.prometheus.thanosServiceExternal.annotations | indent 4 }}
+{{- end }}
+spec:
+ type: {{ .Values.prometheus.thanosServiceExternal.type }}
+{{- if .Values.prometheus.thanosServiceExternal.loadBalancerIP }}
+ loadBalancerIP: {{ .Values.prometheus.thanosServiceExternal.loadBalancerIP }}
+{{- end }}
+{{- if .Values.prometheus.thanosServiceExternal.loadBalancerSourceRanges }}
+ loadBalancerSourceRanges:
+ {{- 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 }}
+ port: {{ .Values.prometheus.thanosServiceExternal.port }}
+ targetPort: {{ .Values.prometheus.thanosServiceExternal.targetPort }}
+ {{- if eq .Values.prometheus.thanosServiceExternal.type "NodePort" }}
+ nodePort: {{ .Values.prometheus.thanosServiceExternal.nodePort }}
+ {{- end }}
+ - name: {{ .Values.prometheus.thanosServiceExternal.httpPortName }}
+ port: {{ .Values.prometheus.thanosServiceExternal.httpPort }}
+ targetPort: {{ .Values.prometheus.thanosServiceExternal.targetHttpPort }}
+ {{- if eq .Values.prometheus.thanosServiceExternal.type "NodePort" }}
+ nodePort: {{ .Values.prometheus.thanosServiceExternal.httpNodePort }}
+ {{- end }}
+ selector:
+ app.kubernetes.io/name: prometheus
+ operator.prometheus.io/name: {{ template "kube-prometheus-stack.prometheus.crname" . }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/serviceaccount.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/serviceaccount.yaml
old mode 100755
new mode 100644
index ba6e49e88b..dde1632d6f
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/serviceaccount.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/serviceaccount.yaml
@@ -2,15 +2,19 @@
apiVersion: v1
kind: ServiceAccount
metadata:
- name: {{ template "prometheus-operator.prometheus.serviceAccountName" . }}
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.prometheus.serviceAccountName" . }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}-prometheus
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}-prometheus
+ app.kubernetes.io/name: {{ template "kube-prometheus-stack.name" . }}-prometheus
+ app.kubernetes.io/component: prometheus
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
{{- 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/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/servicemonitor.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/servicemonitor.yaml
old mode 100755
new mode 100644
index e2b6044a51..e5d2389d9d
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/servicemonitor.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/servicemonitor.yaml
@@ -2,20 +2,24 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
- name: {{ template "prometheus-operator.fullname" . }}-prometheus
- namespace: {{ $.Release.Namespace }}
+ name: {{ template "kube-prometheus-stack.fullname" . }}-prometheus
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
labels:
- app: {{ template "prometheus-operator.name" . }}-prometheus
-{{ include "prometheus-operator.labels" . | indent 4 }}
+ app: {{ template "kube-prometheus-stack.name" . }}-prometheus
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
+{{- with .Values.prometheus.serviceMonitor.additionalLabels }}
+{{- toYaml . | nindent 4 }}
+{{- end }}
spec:
+ {{- include "servicemonitor.scrapeLimits" .Values.prometheus.serviceMonitor | nindent 2 }}
selector:
matchLabels:
- app: {{ template "prometheus-operator.name" . }}-prometheus
+ app: {{ template "kube-prometheus-stack.name" . }}-prometheus
release: {{ $.Release.Name | quote }}
self-monitor: "true"
namespaceSelector:
matchNames:
- - {{ $.Release.Namespace | quote }}
+ - {{ printf "%s" (include "kube-prometheus-stack.namespace" .) | quote }}
endpoints:
- port: {{ .Values.prometheus.prometheusSpec.portName }}
{{- if .Values.prometheus.serviceMonitor.interval }}
@@ -25,18 +29,61 @@ spec:
scheme: {{ .Values.prometheus.serviceMonitor.scheme }}
{{- end }}
{{- if .Values.prometheus.serviceMonitor.tlsConfig }}
- tlsConfig: {{ toYaml .Values.prometheus.serviceMonitor.tlsConfig | nindent 6 }}
+ 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 }}
+ {{- if .Values.prometheus.serviceMonitor.metricRelabelings }}
+ metricRelabelings: {{- tpl (toYaml .Values.prometheus.serviceMonitor.metricRelabelings | nindent 6) . }}
+ {{- end }}
+ {{- if .Values.prometheus.serviceMonitor.relabelings }}
+ relabelings: {{- toYaml .Values.prometheus.serviceMonitor.relabelings | nindent 6 }}
+ {{- end }}
+ - port: reloader-web
+ {{- 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: "/metrics"
+ {{- if .Values.prometheus.serviceMonitor.metricRelabelings }}
+ metricRelabelings: {{- tpl (toYaml .Values.prometheus.serviceMonitor.metricRelabelings | nindent 6) . }}
+ {{- end }}
+ {{- if .Values.prometheus.serviceMonitor.relabelings }}
+ relabelings: {{- toYaml .Values.prometheus.serviceMonitor.relabelings | nindent 6 }}
+ {{- end }}
+ {{- range .Values.prometheus.serviceMonitor.additionalEndpoints }}
+ - port: {{ .port }}
+ {{- if or $.Values.prometheus.serviceMonitor.interval .interval }}
+ interval: {{ default $.Values.prometheus.serviceMonitor.interval .interval }}
+ {{- end }}
+ {{- if or $.Values.prometheus.serviceMonitor.proxyUrl .proxyUrl }}
+ proxyUrl: {{ default $.Values.prometheus.serviceMonitor.proxyUrl .proxyUrl }}
+ {{- end }}
+ {{- if or $.Values.prometheus.serviceMonitor.scheme .scheme }}
+ scheme: {{ default $.Values.prometheus.serviceMonitor.scheme .scheme }}
+ {{- end }}
+ {{- if or $.Values.prometheus.serviceMonitor.bearerTokenFile .bearerTokenFile }}
+ bearerTokenFile: {{ default $.Values.prometheus.serviceMonitor.bearerTokenFile .bearerTokenFile }}
+ {{- end }}
+ {{- if or $.Values.prometheus.serviceMonitor.tlsConfig .tlsConfig }}
+ tlsConfig: {{- default $.Values.prometheus.serviceMonitor.tlsConfig .tlsConfig | toYaml | nindent 6 }}
+ {{- end }}
+ path: {{ .path }}
+ {{- if or $.Values.prometheus.serviceMonitor.metricRelabelings .metricRelabelings }}
+ metricRelabelings: {{- tpl (default $.Values.prometheus.serviceMonitor.metricRelabelings .metricRelabelings | toYaml | nindent 6) . }}
+ {{- end }}
+ {{- if or $.Values.prometheus.serviceMonitor.relabelings .relabelings }}
+ relabelings: {{- default $.Values.prometheus.serviceMonitor.relabelings .relabelings | toYaml | nindent 6 }}
+ {{- end }}
+ {{- end }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/servicemonitorThanosSidecar.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/servicemonitorThanosSidecar.yaml
new file mode 100644
index 0000000000..5643099e62
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/servicemonitorThanosSidecar.yaml
@@ -0,0 +1,45 @@
+{{- if and .Values.prometheus.thanosService.enabled .Values.prometheus.thanosServiceMonitor.enabled }}
+apiVersion: monitoring.coreos.com/v1
+kind: ServiceMonitor
+metadata:
+ name: {{ template "kube-prometheus-stack.fullname" . }}-thanos-sidecar
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ labels:
+ app: {{ template "kube-prometheus-stack.name" . }}-thanos-sidecar
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
+{{- with .Values.prometheus.thanosServiceMonitor.additionalLabels }}
+{{- toYaml . | nindent 4 }}
+{{- end }}
+spec:
+ {{- include "servicemonitor.scrapeLimits" .Values.prometheus.thanosServiceMonitor | nindent 2 }}
+ selector:
+ matchLabels:
+ app: {{ template "kube-prometheus-stack.name" . }}-thanos-discovery
+ release: {{ $.Release.Name | quote }}
+ namespaceSelector:
+ matchNames:
+ - {{ printf "%s" (include "kube-prometheus-stack.namespace" .) | quote }}
+ endpoints:
+ - port: {{ .Values.prometheus.thanosService.httpPortName }}
+ {{- if .Values.prometheus.thanosServiceMonitor.interval }}
+ interval: {{ .Values.prometheus.thanosServiceMonitor.interval }}
+ {{- end }}
+ {{- if .Values.prometheus.thanosServiceMonitor.scheme }}
+ scheme: {{ .Values.prometheus.thanosServiceMonitor.scheme }}
+ {{- end }}
+ {{- if .Values.prometheus.thanosServiceMonitor.tlsConfig }}
+ tlsConfig: {{ toYaml .Values.prometheus.thanosServiceMonitor.tlsConfig | nindent 6 }}
+ {{- end }}
+ {{- if .Values.prometheus.thanosServiceMonitor.bearerTokenFile }}
+ bearerTokenFile: {{ .Values.prometheus.thanosServiceMonitor.bearerTokenFile }}
+ {{- end }}
+ path: "/metrics"
+{{- if .Values.prometheus.thanosServiceMonitor.metricRelabelings }}
+ metricRelabelings:
+{{ tpl (toYaml .Values.prometheus.thanosServiceMonitor.metricRelabelings | indent 6) . }}
+{{- end }}
+{{- if .Values.prometheus.thanosServiceMonitor.relabelings }}
+ relabelings:
+{{ toYaml .Values.prometheus.thanosServiceMonitor.relabelings | indent 6 }}
+{{- end }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/servicemonitors.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/servicemonitors.yaml
old mode 100755
new mode 100644
index cdfef1a3d0..a7a301babc
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/servicemonitors.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/servicemonitors.yaml
@@ -7,14 +7,15 @@ items:
kind: ServiceMonitor
metadata:
name: {{ .name }}
- namespace: {{ $.Release.Namespace }}
+ namespace: {{ template "kube-prometheus-stack.namespace" $ }}
labels:
- app: {{ template "prometheus-operator.name" $ }}-prometheus
-{{ include "prometheus-operator.labels" $ | indent 8 }}
+ app: {{ template "kube-prometheus-stack.name" $ }}-prometheus
+{{ include "kube-prometheus-stack.labels" $ | indent 8 }}
{{- if .additionalLabels }}
{{ toYaml .additionalLabels | indent 8 }}
{{- end }}
spec:
+ {{- include "servicemonitor.scrapeLimits" . | nindent 6 }}
endpoints:
{{ toYaml .endpoints | indent 8 }}
{{- if .jobLabel }}
@@ -30,5 +31,17 @@ items:
targetLabels:
{{ toYaml .targetLabels | indent 8 }}
{{- end }}
+ {{- if .podTargetLabels }}
+ podTargetLabels:
+{{ toYaml .podTargetLabels | indent 8 }}
+ {{- end }}
+ {{- if .metricRelabelings }}
+ metricRelabelings:
+{{ toYaml .metricRelabelings | indent 8 }}
+ {{- end }}
+ {{- if .relabelings }}
+ relabelings:
+{{ toYaml .relabelings | indent 8 }}
+ {{- end }}
{{- end }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/serviceperreplica.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/serviceperreplica.yaml
old mode 100755
new mode 100644
index a57c0b2db3..4bc7f7b869
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/serviceperreplica.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/serviceperreplica.yaml
@@ -1,21 +1,21 @@
{{- 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:
- name: {{ include "prometheus-operator.fullname" $ }}-prometheus-serviceperreplica
- namespace: {{ $.Release.Namespace }}
+ name: {{ include "kube-prometheus-stack.fullname" $ }}-prometheus-serviceperreplica
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
items:
{{- range $i, $e := until $count }}
- apiVersion: v1
kind: Service
metadata:
- name: {{ include "prometheus-operator.fullname" $ }}-prometheus-{{ $i }}
- namespace: {{ $.Release.Namespace }}
+ name: {{ include "kube-prometheus-stack.fullname" $ }}-prometheus-{{ $i }}
+ namespace: {{ template "kube-prometheus-stack.namespace" $ }}
labels:
- app: {{ include "prometheus-operator.name" $ }}-prometheus
-{{ include "prometheus-operator.labels" $ | indent 8 }}
+ app: {{ include "kube-prometheus-stack.name" $ }}-prometheus
+{{ include "kube-prometheus-stack.labels" $ | indent 8 }}
{{- if $serviceValues.annotations }}
annotations:
{{ toYaml $serviceValues.annotations | indent 8 }}
@@ -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" }}
@@ -38,9 +41,14 @@ items:
port: {{ $serviceValues.port }}
targetPort: {{ $serviceValues.targetPort }}
selector:
- app: prometheus
- prometheus: {{ include "prometheus-operator.fullname" $ }}-prometheus
- statefulset.kubernetes.io/pod-name: prometheus-{{ include "prometheus-operator.fullname" $ }}-prometheus-{{ $i }}
+ {{- if $.Values.prometheus.agentMode }}
+ app.kubernetes.io/name: prometheus-agent
+ statefulset.kubernetes.io/pod-name: prom-agent-{{ include "kube-prometheus-stack.prometheus.crname" $ }}-{{ $i }}
+ {{- else }}
+ app.kubernetes.io/name: prometheus
+ statefulset.kubernetes.io/pod-name: prometheus-{{ include "kube-prometheus-stack.prometheus.crname" $ }}-{{ $i }}
+ {{- end }}
+ operator.prometheus.io/name: {{ template "kube-prometheus-stack.prometheus.crname" $ }}
type: "{{ $serviceValues.type }}"
{{- end }}
{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/thanos-ruler/extrasecret.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/thanos-ruler/extrasecret.yaml
new file mode 100644
index 0000000000..587fca2dca
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/thanos-ruler/extrasecret.yaml
@@ -0,0 +1,20 @@
+{{- if .Values.thanosRuler.extraSecret.data -}}
+{{- $secretName := printf "%s-extra" (include "kube-prometheus-stack.thanosRuler.name" . ) -}}
+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.thanosRuler.name" . }}
+ 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/kubernetes/helm_charts/monitoring/prometheus-operator/templates/thanos-ruler/ingress.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/thanos-ruler/ingress.yaml
new file mode 100644
index 0000000000..aed9db280f
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/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 := include "kube-prometheus-stack.thanosRuler.name" . }}
+{{- $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.thanosRuler.name" . }}
+{{- 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/kubernetes/helm_charts/monitoring/prometheus-operator/templates/thanos-ruler/podDisruptionBudget.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/thanos-ruler/podDisruptionBudget.yaml
new file mode 100644
index 0000000000..83e54edf9b
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/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.thanosRuler.name" . }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ labels:
+ app: {{ template "kube-prometheus-stack.thanosRuler.name" . }}
+{{ 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.thanosRuler.name" . }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/thanos-ruler/ruler.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/thanos-ruler/ruler.yaml
new file mode 100644
index 0000000000..6d8c12a93a
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/thanos-ruler/ruler.yaml
@@ -0,0 +1,174 @@
+{{- if .Values.thanosRuler.enabled }}
+apiVersion: monitoring.coreos.com/v1
+kind: ThanosRuler
+metadata:
+ name: {{ template "kube-prometheus-stack.thanosRuler.name" . }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ labels:
+ app: {{ include "kube-prometheus-stack.thanosRuler.name" . }}
+{{- 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 }}
+ {{- $registry := .Values.global.imageRegistry | default .Values.thanosRuler.thanosRulerSpec.image.registry -}}
+ {{- if and .Values.thanosRuler.thanosRulerSpec.image.tag .Values.thanosRuler.thanosRulerSpec.image.sha }}
+ image: "{{ $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: "{{ $registry }}/{{ .Values.thanosRuler.thanosRulerSpec.image.repository }}@sha256:{{ .Values.thanosRuler.thanosRulerSpec.image.sha }}"
+ {{- else if .Values.thanosRuler.thanosRulerSpec.image.tag }}
+ image: "{{ $registry }}/{{ .Values.thanosRuler.thanosRulerSpec.image.repository }}:{{ .Values.thanosRuler.thanosRulerSpec.image.tag }}"
+ {{- else }}
+ image: "{{ $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.thanosRuler.name" . }}.{{ template "kube-prometheus-stack.namespace" . }}:{{ .Values.thanosRuler.service.port }}
+{{- end }}
+{{- if .Values.thanosRuler.thanosRulerSpec.nodeSelector }}
+ 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:
+{{ tpl (toYaml .Values.thanosRuler.thanosRulerSpec.ruleNamespaceSelector | indent 4) . }}
+{{ else }}
+ ruleNamespaceSelector: {}
+{{- end }}
+{{- if .Values.thanosRuler.thanosRulerSpec.ruleSelector }}
+ ruleSelector:
+{{ tpl (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:
+ key: alertmanager-configs.yaml
+ name: {{ template "kube-prometheus-stack.thanosRuler.name" . }}
+{{- end }}
+{{- if .Values.thanosRuler.thanosRulerSpec.queryEndpoints }}
+ queryEndpoints:
+{{ toYaml .Values.thanosRuler.thanosRulerSpec.queryEndpoints | indent 4 }}
+{{- end }}
+{{- if .Values.thanosRuler.thanosRulerSpec.queryConfig }}
+ queryConfig:
+{{ toYaml .Values.thanosRuler.thanosRulerSpec.queryConfig | 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.thanosRuler.name" . }}]}
+{{- 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.thanosRuler.name" . }}]}
+{{- end }}
+{{- if .Values.thanosRuler.thanosRulerSpec.tolerations }}
+ 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/kubernetes/helm_charts/monitoring/prometheus-operator/templates/thanos-ruler/secret.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/thanos-ruler/secret.yaml
new file mode 100644
index 0000000000..ede29be714
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/thanos-ruler/secret.yaml
@@ -0,0 +1,14 @@
+{{- if .Values.thanosRuler.enabled }}
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ template "kube-prometheus-stack.thanosRuler.name" . }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ labels:
+ app: {{ include "kube-prometheus-stack.thanosRuler.name" . }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
+data:
+{{- if .Values.thanosRuler.thanosRulerSpec.alertmanagersConfig }}
+ alertmanager-configs.yaml: {{ toYaml .Values.thanosRuler.thanosRulerSpec.alertmanagersConfig | b64enc | quote }}
+{{- end }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/thanos-ruler/service.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/thanos-ruler/service.yaml
new file mode 100644
index 0000000000..be0c844591
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/thanos-ruler/service.yaml
@@ -0,0 +1,53 @@
+{{- if .Values.thanosRuler.enabled }}
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ template "kube-prometheus-stack.thanosRuler.name" . }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ labels:
+ app: {{ template "kube-prometheus-stack.thanosRuler.name" . }}
+ 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.thanosRuler.name" . }}
+ type: "{{ .Values.thanosRuler.service.type }}"
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/thanos-ruler/serviceaccount.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/thanos-ruler/serviceaccount.yaml
new file mode 100644
index 0000000000..b58f1cd4df
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/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.thanosRuler.name" . }}
+ app.kubernetes.io/name: {{ template "kube-prometheus-stack.thanosRuler.name" . }}
+ 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/kubernetes/helm_charts/monitoring/prometheus-operator/templates/thanos-ruler/servicemonitor.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/thanos-ruler/servicemonitor.yaml
new file mode 100644
index 0000000000..83bd8ba216
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/thanos-ruler/servicemonitor.yaml
@@ -0,0 +1,72 @@
+{{- if and .Values.thanosRuler.enabled .Values.thanosRuler.serviceMonitor.selfMonitor }}
+apiVersion: monitoring.coreos.com/v1
+kind: ServiceMonitor
+metadata:
+ name: {{ template "kube-prometheus-stack.thanosRuler.name" . }}
+ namespace: {{ template "kube-prometheus-stack.namespace" . }}
+ labels:
+ app: {{ template "kube-prometheus-stack.thanosRuler.name" . }}
+{{ include "kube-prometheus-stack.labels" . | indent 4 }}
+{{- with .Values.thanosRuler.serviceMonitor.additionalLabels }}
+{{- toYaml . | nindent 4 }}
+{{- end }}
+spec:
+ {{- include "servicemonitor.scrapeLimits" .Values.thanosRuler.serviceMonitor | nindent 2 }}
+ selector:
+ matchLabels:
+ app: {{ template "kube-prometheus-stack.thanosRuler.name" . }}
+ 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 | nindent 6) . }}
+ {{- end }}
+ {{- if .Values.thanosRuler.serviceMonitor.relabelings }}
+ relabelings: {{- toYaml .Values.thanosRuler.serviceMonitor.relabelings | nindent 6 }}
+ {{- end }}
+ {{- range .Values.thanosRuler.serviceMonitor.additionalEndpoints }}
+ - port: {{ .port }}
+ {{- if or $.Values.thanosRuler.serviceMonitor.interval .interval }}
+ interval: {{ default $.Values.thanosRuler.serviceMonitor.interval .interval }}
+ {{- end }}
+ {{- if or $.Values.thanosRuler.serviceMonitor.proxyUrl .proxyUrl }}
+ proxyUrl: {{ default $.Values.thanosRuler.serviceMonitor.proxyUrl .proxyUrl }}
+ {{- end }}
+ {{- if or $.Values.thanosRuler.serviceMonitor.scheme .scheme }}
+ scheme: {{ default $.Values.thanosRuler.serviceMonitor.scheme .scheme }}
+ {{- end }}
+ {{- if or $.Values.thanosRuler.serviceMonitor.bearerTokenFile .bearerTokenFile }}
+ bearerTokenFile: {{ default $.Values.thanosRuler.serviceMonitor.bearerTokenFile .bearerTokenFile }}
+ {{- end }}
+ {{- if or $.Values.thanosRuler.serviceMonitor.tlsConfig .tlsConfig }}
+ tlsConfig: {{- default $.Values.thanosRuler.serviceMonitor.tlsConfig .tlsConfig | toYaml | nindent 6 }}
+ {{- end }}
+ path: {{ .path }}
+ {{- if or $.Values.thanosRuler.serviceMonitor.metricRelabelings .metricRelabelings }}
+ metricRelabelings: {{- tpl (default $.Values.thanosRuler.serviceMonitor.metricRelabelings .metricRelabelings | toYaml | nindent 6) . }}
+ {{- end }}
+ {{- if or $.Values.thanosRuler.serviceMonitor.relabelings .relabelings }}
+ relabelings: {{- default $.Values.thanosRuler.serviceMonitor.relabelings .relabelings | toYaml | nindent 6 }}
+ {{- end }}
+ {{- end }}
+{{- end }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/unittests/alertmanager/alertmanager_test.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/unittests/alertmanager/alertmanager_test.yaml
new file mode 100644
index 0000000000..f94e749e53
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/unittests/alertmanager/alertmanager_test.yaml
@@ -0,0 +1,26 @@
+suite: test alertmanager
+templates:
+ - alertmanager/alertmanager.yaml
+tests:
+ # 1417
+ - it: should be empty if alertmanager is not enabled
+ set:
+ alertmanager.enabled: false
+ alertmanager.alertmanagerSpec.clusterAdvertiseAddress: xxx
+ asserts:
+ - hasDocuments:
+ count: 0
+ # 1572
+ - it: should have tolerations if affinity is not set
+ set:
+ alertmanager.alertmanagerSpec.tolerations:
+ - key: "key1"
+ operator: "Equal"
+ value: "value1"
+ effect: "NoSchedule"
+ asserts:
+ - hasDocuments:
+ count: 1
+ - equal:
+ path: spec.tolerations[0].key
+ value: key1
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/unittests/alertmanager/ingress_test.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/unittests/alertmanager/ingress_test.yaml
new file mode 100644
index 0000000000..7bbd36eecf
--- /dev/null
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/unittests/alertmanager/ingress_test.yaml
@@ -0,0 +1,67 @@
+suite: test ingress
+templates:
+ - alertmanager/ingress.yaml
+tests:
+ - it: should be empty if alertmanager is not enabled
+ set:
+ alertmanager.enabled: false
+ alertmanager.ingress.enabled: true
+ asserts:
+ - hasDocuments:
+ count: 0
+ - it: should be empty if ingress is not enabled
+ set:
+ alertmanager.enabled: true
+ alertmanager.ingress.enabled: false
+ asserts:
+ - hasDocuments:
+ count: 0
+ - it: should have apiVersion networking.k8s.io/v1 for k8s >= 1.19 < 1.22
+ set:
+ alertmanager.enabled: true
+ alertmanager.ingress.enabled: true
+ capabilities:
+ majorVersion: 1
+ minorVersion: 19
+ apiVersions:
+ - networking.k8s.io/v1
+ - networking.k8s.io/v1beta1
+ asserts:
+ - hasDocuments:
+ count: 1
+ - isKind:
+ of: Ingress
+ - isAPIVersion:
+ of: networking.k8s.io/v1beta1
+ - it: should have apiVersion networking.k8s.io/v1 for k8s >= 1.22
+ set:
+ alertmanager.enabled: true
+ alertmanager.ingress.enabled: true
+ capabilities:
+ majorVersion: 1
+ minorVersion: 22
+ apiVersions:
+ - networking.k8s.io/v1
+ asserts:
+ - hasDocuments:
+ count: 1
+ - isKind:
+ of: Ingress
+ - isAPIVersion:
+ of: networking.k8s.io/v1
+
+ - it: should have explicit pathType ImplementationSpecific for networking.k8s.io/v1 by default
+ set:
+ alertmanager.enabled: true
+ alertmanager.ingress.enabled: true
+ capabilities:
+ majorVersion: 1
+ minorVersion: 19
+ apiVersions:
+ - networking.k8s.io/v1
+ asserts:
+ - hasDocuments:
+ count: 1
+ - equal:
+ path: spec.rules[0].http.paths[0].pathType
+ value: ImplementationSpecific
diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/values.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/values.yaml
old mode 100755
new mode 100644
index 70b4126e5a..e9930ba86d
--- a/kubernetes/helm_charts/monitoring/prometheus-operator/values.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-operator/values.yaml
@@ -1,15 +1,23 @@
-# Default values for prometheus-operator.
+# Default values for kube-prometheus-stack.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
-## Provide a name in place of prometheus-operator for `app:` labels
+## Provide a name in place of kube-prometheus-stack for `app:` labels
##
nameOverride: ""
-## Provide a k8s version to auto dashboard import script example: kubeTargetVersionOverride: 1.16.6
+## Override the deployment namespace
+##
+namespaceOverride: ""
+
+## Provide a k8s version to auto dashboard import script example: kubeTargetVersionOverride: 1.26.6
##
kubeTargetVersionOverride: ""
+## Allow kubeVersion to be overridden while creating the ingress
+##
+kubeVersionOverride: ""
+
## Provide a name to substitute for the full names of resources
##
fullnameOverride: ""
@@ -20,6 +28,11 @@ commonLabels: {}
# scmhash: abc123
# myLabel: aakkmd
+## Install Prometheus Operator CRDs
+##
+crds:
+ enabled: true
+
## Create default rules for monitoring the cluster
##
defaultRules:
@@ -27,37 +40,121 @@ defaultRules:
rules:
alertmanager: true
etcd: true
+ configReloaders: true
general: true
k8s: true
- kubeApiserver: true
- kubeApiserverError: true
- kubePrometheusNodeAlerting: true
+ kubeApiserverAvailability: true
+ kubeApiserverBurnrate: true
+ kubeApiserverHistogram: true
+ kubeApiserverSlos: true
+ kubeControllerManager: true
+ kubelet: true
+ kubeProxy: true
+ kubePrometheusGeneral: true
kubePrometheusNodeRecording: true
- kubernetesAbsent: true
kubernetesApps: true
kubernetesResources: true
kubernetesStorage: true
kubernetesSystem: true
- kubeScheduler: true
+ kubeSchedulerAlerting: true
+ kubeSchedulerRecording: true
+ kubeStateMetrics: true
network: true
node: true
+ nodeExporterAlerting: true
+ nodeExporterRecording: true
prometheus: true
prometheusOperator: true
- time: true
+ windows: 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: ".*"
+ ## Set keep_firing_for for all alerts
+ keepFiringFor: ""
+
## Labels for default rules
labels: {}
## Annotations for default rules
annotations: {}
-## Provide custom recording or alerting rules to be deployed into the cluster.
+ ## Additional labels for PrometheusRule alerts
+ additionalRuleLabels: {}
+
+ ## Additional annotations for PrometheusRule alerts
+ additionalRuleAnnotations: {}
+
+ ## Additional labels for specific PrometheusRule alert groups
+ additionalRuleGroupLabels:
+ alertmanager: {}
+ etcd: {}
+ configReloaders: {}
+ general: {}
+ k8s: {}
+ kubeApiserverAvailability: {}
+ kubeApiserverBurnrate: {}
+ kubeApiserverHistogram: {}
+ kubeApiserverSlos: {}
+ kubeControllerManager: {}
+ kubelet: {}
+ kubeProxy: {}
+ kubePrometheusGeneral: {}
+ kubePrometheusNodeRecording: {}
+ kubernetesApps: {}
+ kubernetesResources: {}
+ kubernetesStorage: {}
+ kubernetesSystem: {}
+ kubeSchedulerAlerting: {}
+ kubeSchedulerRecording: {}
+ kubeStateMetrics: {}
+ network: {}
+ node: {}
+ nodeExporterAlerting: {}
+ nodeExporterRecording: {}
+ prometheus: {}
+ prometheusOperator: {}
+
+ ## Additional annotations for specific PrometheusRule alerts groups
+ additionalRuleGroupAnnotations:
+ alertmanager: {}
+ etcd: {}
+ configReloaders: {}
+ general: {}
+ k8s: {}
+ kubeApiserverAvailability: {}
+ kubeApiserverBurnrate: {}
+ kubeApiserverHistogram: {}
+ kubeApiserverSlos: {}
+ kubeControllerManager: {}
+ kubelet: {}
+ kubeProxy: {}
+ kubePrometheusGeneral: {}
+ kubePrometheusNodeRecording: {}
+ kubernetesApps: {}
+ kubernetesResources: {}
+ kubernetesStorage: {}
+ kubernetesSystem: {}
+ kubeSchedulerAlerting: {}
+ kubeSchedulerRecording: {}
+ kubeStateMetrics: {}
+ network: {}
+ node: {}
+ nodeExporterAlerting: {}
+ nodeExporterRecording: {}
+ prometheus: {}
+ prometheusOperator: {}
+
+ ## 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: {}
+ # KubeAPIDown: true
+ # NodeRAIDDegraded: true
+
+## Deprecated way to provide custom recording or alerting rules to be deployed into the cluster.
##
-additionalPrometheusRules: []
+# additionalPrometheusRules: []
# - name: my-rule-file
# groups:
# - name: my_group
@@ -65,11 +162,25 @@ additionalPrometheusRules: []
# - record: my_record
# expr: 100 * my_record
+## Provide custom recording or alerting rules to be deployed into the cluster.
+##
+additionalPrometheusRulesMap: {}
+# rule-name:
+# groups:
+# - name: my_group
+# rules:
+# - record: my_record
+# expr: 100 * my_record
+
##
global:
rbac:
create: true
- pspEnabled: true
+
+ ## Create ClusterRoles that extend the existing view, edit and admin ClusterRoles to interact with prometheus-operator CRDs
+ ## Ref: https://kubernetes.io/docs/reference/access-authn-authz/rbac/#aggregated-clusterroles
+ createAggregateClusterRoles: false
+ pspEnabled: false
pspAnnotations: {}
## Specify pod annotations
## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#apparmor
@@ -80,11 +191,43 @@ global:
# seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default'
# apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default'
+ ## Global image registry to use if it needs to be overriden for some specific use cases (e.g local registries, custom images, ...)
+ ##
+ imageRegistry: ""
+
## 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"
+
+windowsMonitoring:
+ ## Deploys the windows-exporter and Windows-specific dashboards and rules (job name must be 'windows-exporter')
+ enabled: false
+
+## Configuration for prometheus-windows-exporter
+## ref: https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus-windows-exporter
+##
+prometheus-windows-exporter:
+ ## Enable ServiceMonitor and set Kubernetes label to use as a job label
+ ##
+ prometheus:
+ monitor:
+ enabled: true
+ jobLabel: jobLabel
+
+ ## Set job label to 'windows-exporter' as required by the default Prometheus rules and Grafana dashboards
+ ##
+ podLabels:
+ jobLabel: windows-exporter
+
+ ## Enable memory and container metrics as required by the default Prometheus rules and Grafana dashboards
+ ##
+ config: |-
+ collectors:
+ enabled: '[defaults],memory,container'
## Configuration for alertmanager
## ref: https://prometheus.io/docs/alerting/alertmanager/
@@ -95,6 +238,10 @@ alertmanager:
##
enabled: true
+ ## Annotations for Alertmanager
+ ##
+ annotations: {}
+
## Api that prometheus will use to communicate with alertmanager. Possible values are v1, v2
##
apiVersion: v2
@@ -105,6 +252,8 @@ alertmanager:
serviceAccount:
create: true
name: ""
+ annotations: {}
+ automountServiceAccountToken: true
## Configure pod disruption budgets for Alertmanager
## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget
@@ -123,30 +272,64 @@ alertmanager:
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:
+ - '/etc/alertmanager/config/*.tmpl'
+
+ ## Alertmanager configuration directives (as string type, preferred over the config hash map)
+ ## stringConfig will be used only, if tplConfig is true
+ ## ref: https://prometheus.io/docs/alerting/configuration/#configuration-file
+ ## https://prometheus.io/webtools/alerting/routing-tree-editor/
+ ##
+ stringConfig: ""
## 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/#%3Ctmpl_string%3E
+ ## 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/
##
@@ -160,21 +343,33 @@ alertmanager:
# {{- $root := . -}}
# {{ range .Alerts }}
# *Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}`
- # *Cluster:* {{ template "cluster" $root }}
+ # *Cluster:* {{ template "cluster" $root }}
# *Description:* {{ .Annotations.description }}
# *Graph:* <{{ .GeneratorURL }}|:chart_with_upwards_trend:>
# *Runbook:* <{{ .Annotations.runbook }}|:spiral_note_pad:>
# *Details:*
- # {{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
+ # {{ range .Labels.SortedPairs }} - *{{ .Name }}:* `{{ .Value }}`
# {{ 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: {}
+ ## Override ingress to a different defined port on the service
+ # servicePort: 8081
+ ## Override ingress to a different service then the default, this is useful if you need to
+ ## point to a specific instance of the alertmanager (eg kube-prometheus-stack-alertmanager-0)
+ # serviceName: kube-prometheus-stack-alertmanager-0
+
## Hosts must be provided if Ingress is enabled.
##
hosts: []
@@ -185,6 +380,10 @@ alertmanager:
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
##
@@ -203,6 +402,11 @@ alertmanager:
##
ingressPerReplica:
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: {}
@@ -220,6 +424,10 @@ alertmanager:
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
+
## Secret name containing the TLS certificate for alertmanager per replica ingress
## Secret must be manually created in the namespace
tlsSecretName: ""
@@ -253,9 +461,30 @@ alertmanager:
## 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: []
+ # - name: oauth-proxy
+ # port: 8081
+ # targetPort: 8081
+ # - name: oauth-metrics
+ # port: 8082
+ # targetPort: 8082
+
externalIPs: []
loadBalancerIP: ""
loadBalancerSourceRanges: []
+
+ ## Denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints
+ ##
+ externalTrafficPolicy: Cluster
+
+ ## If you want to make sure that connections from a particular client are passed to the same Pod each time
+ ## Accepts 'ClientIP' or ''
+ ##
+ sessionAffinity: ""
+
## Service type
##
type: ClusterIP
@@ -279,8 +508,13 @@ alertmanager:
nodePort: 30904
## Loadbalancer source IP ranges
- ## Only used if servicePerReplica.type is "loadbalancer"
+ ## Only used if servicePerReplica.type is "LoadBalancer"
loadBalancerSourceRanges: []
+
+ ## Denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints
+ ##
+ externalTrafficPolicy: Cluster
+
## Service type
##
type: ClusterIP
@@ -293,14 +527,57 @@ alertmanager:
interval: ""
selfMonitor: true
- ## metric relabel configs to apply to samples before ingestion.
+ ## Additional labels
+ ##
+ additionalLabels: {}
+
+ ## SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
+ ##
+ sampleLimit: 0
+
+ ## TargetLimit defines a limit on the number of scraped targets that will be accepted.
+ ##
+ targetLimit: 0
+
+ ## Per-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelLimit: 0
+
+ ## Per-scrape limit on length of labels name that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelNameLengthLimit: 0
+
+ ## Per-scrape limit on length of labels value that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelValueLengthLimit: 0
+
+ ## 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: ""
+
+ ## enableHttp2: Whether to enable HTTP2.
+ ## See https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#endpoint
+ enableHttp2: true
+
+ ## 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__]
- # relabel configs to apply to samples before ingestion.
+ ## 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]
@@ -310,11 +587,17 @@ alertmanager:
# replacement: $1
# action: replace
+ ## Additional Endpoints
+ ##
+ additionalEndpoints: []
+ # - port: oauth-metrics
+ # path: /metrics
+
## Settings affecting alertmanagerSpec
- ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#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
+ ## 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: {}
@@ -322,8 +605,10 @@ alertmanager:
## Image of Alertmanager
##
image:
- repository: quay.io/prometheus/alertmanager
- tag: v0.20.0
+ registry: quay.io
+ repository: prometheus/alertmanager
+ tag: v0.26.0
+ sha: ""
## If true then the user will be responsible to provide a secret with alertmanager configuration
## So when true the config part will be ignored (including templateFiles) and the one in the secret will be used
@@ -345,8 +630,62 @@ alertmanager:
##
# 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: {}
+ ## Example which selects all alertmanagerConfig resources
+ ## with label "alertconfig" with values any of "example-config" or "example-config-2"
+ # alertmanagerConfigSelector:
+ # matchExpressions:
+ # - key: alertconfig
+ # operator: In
+ # values:
+ # - example-config
+ # - example-config-2
+ #
+ ## Example which selects all alertmanagerConfig resources with label "role" set to "example-config"
+ # alertmanagerConfigSelector:
+ # matchLabels:
+ # role: example-config
+
+ ## Namespaces to be selected for AlertmanagerConfig discovery. If nil, only check own namespace.
+ ##
+ alertmanagerConfigNamespaceSelector: {}
+ ## Example which selects all namespaces
+ ## with label "alertmanagerconfig" with values any of "example-namespace" or "example-namespace-2"
+ # alertmanagerConfigNamespaceSelector:
+ # matchExpressions:
+ # - key: alertmanagerconfig
+ # operator: In
+ # values:
+ # - example-namespace
+ # - example-namespace-2
+
+ ## Example which selects all namespaces with label "alertmanagerconfig" set to "enabled"
+ # alertmanagerConfigNamespaceSelector:
+ # matchLabels:
+ # alertmanagerconfig: enabled
+
+ ## AlermanagerConfig to be used as top level configuration
+ ##
+ alertmanagerConfiguration: {}
+ ## Example with select a global alertmanagerconfig
+ # alertmanagerConfiguration:
+ # name: global-alertmanager-Configuration
+
+ ## Defines the strategy used by AlertmanagerConfig objects to match alerts. eg:
+ ##
+ alertmanagerConfigMatcherStrategy: {}
+ ## Example with use OnNamespace strategy
+ # alertmanagerConfigMatcherStrategy:
+ # type: OnNamespace
+
## Define Log Format
- # Use logfmt (default) or json-formatted logging
+ # Use logfmt (default) or json logging
logFormat: logfmt
## Log level for Alertmanager to be configured with.
@@ -363,7 +702,7 @@ alertmanager:
retention: 120h
## Storage is the definition of how storage will be used by the Alertmanager instances.
- ## ref: https://github.com/coreos/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:
@@ -373,18 +712,25 @@ alertmanager:
# 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
+ ## 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,
+ ## 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: /
+ ## scheme: HTTP scheme to use. Can be used with `tlsConfig` for example if using istio mTLS.
+ scheme: ""
+
+ ## tlsConfig: TLS configuration to use when connect to the endpoint. For example if using istio mTLS.
+ ## Of type: https://github.com/coreos/prometheus-operator/blob/main/Documentation/api.md#tlsconfig
+ tlsConfig: {}
+
## If set to true all actions on the underlying managed objects are not going to be performed, except for delete actions.
##
paused: false
@@ -436,14 +782,28 @@ alertmanager:
# 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
+ ## 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
+ seccompProfile:
+ type: RuntimeDefault
## 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.
@@ -453,6 +813,32 @@ alertmanager:
## 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.5.1
+ # args:
+ # - --upstream=http://127.0.0.1:9093
+ # - --http-address=0.0.0.0:8081
+ # - --metrics-address=0.0.0.0:8082
+ # - ...
+ # ports:
+ # - containerPort: 8081
+ # name: oauth-proxy
+ # protocol: TCP
+ # - containerPort: 8082
+ # name: oauth-metrics
+ # 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
##
@@ -464,25 +850,83 @@ alertmanager:
## 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
+ ##
+ clusterAdvertiseAddress: false
+
+ ## clusterGossipInterval determines interval between gossip attempts.
+ ## Needs to be specified as GoDuration, a time duration that can be parsed by Go’s time.ParseDuration() (e.g. 45ms, 30s, 1m, 1h20m15s)
+ clusterGossipInterval: ""
+
+ ## clusterPeerTimeout determines timeout for cluster peering.
+ ## Needs to be specified as GoDuration, a time duration that can be parsed by Go’s time.ParseDuration() (e.g. 45ms, 30s, 1m, 1h20m15s)
+ clusterPeerTimeout: ""
+
+ ## clusterPushpullInterval determines interval between pushpull attempts.
+ ## Needs to be specified as GoDuration, a time duration that can be parsed by Go’s time.ParseDuration() (e.g. 45ms, 30s, 1m, 1h20m15s)
+ clusterPushpullInterval: ""
+ ## 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
-## Using default values from https://github.com/helm/charts/blob/master/stable/grafana/values.yaml
+ ## 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: ""
+
+ ## 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.
+ ## 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
+ rbac:
+ ## If true, Grafana PSPs will be created
+ ##
+ pspEnabled: false
+
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: {}
@@ -515,20 +959,62 @@ grafana:
dashboards:
enabled: true
label: grafana_dashboard
+ labelValue: "1"
+ # Allow discovery in all namespaces for dashboards
+ searchNamespace: ALL
+
+ ## Annotations for Grafana dashboard configmaps
+ ##
+ annotations: {}
+ multicluster:
+ global:
+ enabled: false
+ etcd:
+ enabled: false
+ provider:
+ allowUiUpdates: false
datasources:
enabled: true
defaultDatasourceEnabled: true
+ isDefaultDatasource: true
+
+ uid: prometheus
+
+ ## URL of prometheus datasource
+ ##
+ # url: http://prometheus-stack-prometheus:9090/
+
+ ## Prometheus request timeout in seconds
+ # timeout: 30
+
+ # If not defined, will use prometheus.prometheusSpec.scrapeInterval or its default
+ # defaultDatasourceScrapeInterval: 15s
## Annotations for Grafana datasource configmaps
##
annotations: {}
+ ## Set method for HTTP to send query to datasource
+ httpMethod: POST
+
## 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
+ alertmanager:
+ enabled: true
+ uid: alertmanager
+ handleGrafanaManagedAlerts: false
+ implementation: prometheus
extraConfigmapMounts: []
# - name: certs-configmap
@@ -536,7 +1022,11 @@ grafana:
# configMap: certs-configmap
# readOnly: true
- ## Configure additional grafana datasources
+ 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
@@ -549,30 +1039,38 @@ grafana:
# tlsSkipVerify: true
# orgId: 1
# type: prometheus
- # url: https://prometheus.svc:9090
+ # url: https://{{ printf "%s-prometheus.svc" .Release.Name }}:9090
# version: 1
## Passed to grafana subchart and used by servicemonitor below
##
service:
- portName: service
+ portName: http-web
- ## 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
- ## metric relabel configs to apply to samples before ingestion.
- ##
- metricRelabelings: []
- # - action: keep
- # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+'
- # sourceLabels: [__name__]
+ # 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
- # relabel configs to apply to samples before ingestion.
+ ## 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]
@@ -582,6 +1080,11 @@ grafana:
# replacement: $1
# action: replace
+## Flag to disable all the kubernetes component scrapers
+##
+kubernetesServiceMonitors:
+ enabled: true
+
## Component scraping the kube api server
##
kubeApiServer:
@@ -589,36 +1092,73 @@ kubeApiServer:
tlsConfig:
serverName: kubernetes
insecureSkipVerify: false
-
- ## If your API endpoint address is not reachable (as in AKS) you can replace it with the kubernetes service
- ##
- relabelings: []
- # - sourceLabels:
- # - __meta_kubernetes_namespace
- # - __meta_kubernetes_service_name
- # - __meta_kubernetes_endpoint_port_name
- # action: keep
- # regex: default;kubernetes;https
- # - targetLabel: __address__
- # replacement: kubernetes.default.svc:443
-
serviceMonitor:
## Scrape interval. If not set, the Prometheus default scrape interval is used.
##
interval: ""
+
+ ## SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
+ ##
+ sampleLimit: 0
+
+ ## TargetLimit defines a limit on the number of scraped targets that will be accepted.
+ ##
+ targetLimit: 0
+
+ ## Per-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelLimit: 0
+
+ ## Per-scrape limit on length of labels name that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelNameLengthLimit: 0
+
+ ## Per-scrape limit on length of labels value that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelValueLengthLimit: 0
+
+ ## proxyUrl: URL of a proxy that should be used for scraping.
+ ##
+ proxyUrl: ""
+
jobLabel: component
selector:
matchLabels:
component: apiserver
provider: kubernetes
- ## metric relabel configs to apply to samples before ingestion.
+ ## 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: []
+ 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/main/Documentation/api.md#relabelconfig
+ ##
+ relabelings: []
+ # - sourceLabels:
+ # - __meta_kubernetes_namespace
+ # - __meta_kubernetes_service_name
+ # - __meta_kubernetes_endpoint_port_name
+ # action: keep
+ # regex: default;kubernetes;https
+ # - targetLabel: __address__
+ # replacement: kubernetes.default.svc:443
+
+ ## Additional labels
+ ##
+ additionalLabels: {}
+ # foo: bar
+
## Component scraping the kubelet and kubelet-hosted cAdvisor
##
kubelet:
@@ -626,12 +1166,41 @@ kubelet:
namespace: kube-system
serviceMonitor:
+ ## Attach metadata to discovered targets. Requires Prometheus v2.45 for endpoints created by the operator.
+ ##
+ attachMetadata:
+ node: false
+
## Scrape interval. If not set, the Prometheus default scrape interval is used.
##
interval: ""
+ ## SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
+ ##
+ sampleLimit: 0
+
+ ## TargetLimit defines a limit on the number of scraped targets that will be accepted.
+ ##
+ targetLimit: 0
+
+ ## Per-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelLimit: 0
+
+ ## Per-scrape limit on length of labels name that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelNameLengthLimit: 0
+
+ ## Per-scrape limit on length of labels value that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelValueLengthLimit: 0
+
+ ## proxyUrl: URL of a proxy that should be used for scraping.
+ ##
+ proxyUrl: ""
+
## Enable scraping the kubelet over https. For requirements to enable this see
- ## https://github.com/coreos/prometheus-operator/issues/926
+ ## https://github.com/prometheus-operator/prometheus-operator/issues/926
##
https: true
@@ -639,9 +1208,60 @@ kubelet:
##
cAdvisor: true
- ## Metric relabellings to apply to samples before ingestion
+ ## Enable scraping /metrics/probes from kubelet's service
+ ##
+ probes: true
+
+ ## Enable scraping /metrics/resource from kubelet's service
+ ## This is disabled by default because container metrics are already exposed by cAdvisor
+ ##
+ resource: false
+ # From kubernetes 1.18, /metrics/resource/v1alpha1 renamed to /metrics/resource
+ resourcePath: "/metrics/resource/v1alpha1"
+
+ ## MetricRelabelConfigs to apply to samples after scraping, but before ingestion.
+ ## 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_]+);
+ # replacement: $1
+ # action: drop
+ # - sourceLabels: [__name__]
+ # separator: ;
+ # regex: container_(network_tcp_usage_total|network_udp_usage_total|tasks_state|cpu_load_average_10s)
+ # replacement: $1
+ # action: drop
+
+ ## MetricRelabelConfigs to apply to samples after scraping, but before ingestion.
+ ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig
##
- cAdvisorMetricRelabelings: []
+ probesMetricRelabelings: []
# - sourceLabels: [__name__, image]
# separator: ;
# regex: container_([a-z_]+);
@@ -653,11 +1273,41 @@ kubelet:
# replacement: $1
# action: drop
- # relabel configs to apply to samples before ingestion.
- # metrics_path is required to match upstream rules and charts
+ ## RelabelConfigs to apply to samples before scraping
+ ## 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:
- - sourceLabels: [__metrics_path__]
+ - action: replace
+ sourceLabels: [__metrics_path__]
+ targetLabel: metrics_path
+ # - sourceLabels: [__meta_kubernetes_pod_node_name]
+ # separator: ;
+ # regex: ^(.*)$
+ # targetLabel: nodename
+ # replacement: $1
+ # action: replace
+
+ ## RelabelConfigs to apply to samples before scraping
+ ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig
+ ##
+ probesRelabelings:
+ - action: replace
+ sourceLabels: [__metrics_path__]
+ targetLabel: metrics_path
+ # - sourceLabels: [__meta_kubernetes_pod_node_name]
+ # separator: ;
+ # regex: ^(.*)$
+ # targetLabel: nodename
+ # replacement: $1
+ # action: replace
+
+ ## RelabelConfigs to apply to samples before scraping
+ ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig
+ ##
+ resourceRelabelings:
+ - action: replace
+ sourceLabels: [__metrics_path__]
targetLabel: metrics_path
# - sourceLabels: [__meta_kubernetes_pod_node_name]
# separator: ;
@@ -666,6 +1316,9 @@ kubelet:
# 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: []
# - sourceLabels: [__name__, image]
# separator: ;
@@ -678,11 +1331,13 @@ kubelet:
# replacement: $1
# action: drop
- # relabel configs to apply to samples before ingestion.
- # metrics_path is required to match upstream rules and charts
+ ## RelabelConfigs to apply to samples before scraping
+ ## 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:
- - sourceLabels: [__metrics_path__]
+ - action: replace
+ sourceLabels: [__metrics_path__]
targetLabel: metrics_path
# - sourceLabels: [__meta_kubernetes_pod_node_name]
# separator: ;
@@ -691,6 +1346,11 @@ kubelet:
# replacement: $1
# action: replace
+ ## Additional labels
+ ##
+ additionalLabels: {}
+ # foo: bar
+
## Component scraping the kube controller manager
##
kubeControllerManager:
@@ -706,20 +1366,50 @@ kubeControllerManager:
## If using kubeControllerManager.endpoints only the port and targetPort are used
##
service:
- port: 10252
- targetPort: 10252
+ enabled: true
+ ## 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
serviceMonitor:
+ enabled: true
## Scrape interval. If not set, the Prometheus default scrape interval is used.
##
interval: ""
+ ## SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
+ ##
+ sampleLimit: 0
+
+ ## TargetLimit defines a limit on the number of scraped targets that will be accepted.
+ ##
+ targetLimit: 0
+
+ ## Per-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelLimit: 0
+
+ ## Per-scrape limit on length of labels name that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelNameLengthLimit: 0
+
+ ## Per-scrape limit on length of labels value that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelValueLengthLimit: 0
+
+ ## proxyUrl: URL of a proxy that should be used for scraping.
+ ##
+ 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
@@ -727,14 +1417,16 @@ kubeControllerManager:
# Name of the server to use when validating TLS certificate
serverName: null
- ## metric relabel configs to apply to samples before ingestion.
+ ## 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__]
- # relabel configs to apply to samples before ingestion.
+ ## 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]
@@ -744,6 +1436,11 @@ kubeControllerManager:
# replacement: $1
# action: replace
+ ## Additional labels
+ ##
+ additionalLabels: {}
+ # foo: bar
+
## Component scraping coreDns. Use either this or kubeDns
##
coreDns:
@@ -758,14 +1455,40 @@ coreDns:
##
interval: ""
- ## metric relabel configs to apply to samples before ingestion.
+ ## SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
##
- metricRelabelings: []
+ sampleLimit: 0
+
+ ## TargetLimit defines a limit on the number of scraped targets that will be accepted.
+ ##
+ targetLimit: 0
+
+ ## Per-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelLimit: 0
+
+ ## Per-scrape limit on length of labels name that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelNameLengthLimit: 0
+
+ ## Per-scrape limit on length of labels value that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelValueLengthLimit: 0
+
+ ## 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: []
# - action: keep
# regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+'
# sourceLabels: [__name__]
- # relabel configs to apply to samples before ingestion.
+ ## 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]
@@ -775,6 +1498,11 @@ coreDns:
# replacement: $1
# action: replace
+ ## Additional labels
+ ##
+ additionalLabels: {}
+ # foo: bar
+
## Component scraping kubeDns. Use either this or coreDns
##
kubeDns:
@@ -793,14 +1521,40 @@ kubeDns:
##
interval: ""
- ## metric relabel configs to apply to samples before ingestion.
+ ## SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
+ ##
+ sampleLimit: 0
+
+ ## TargetLimit defines a limit on the number of scraped targets that will be accepted.
+ ##
+ targetLimit: 0
+
+ ## Per-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelLimit: 0
+
+ ## Per-scrape limit on length of labels name that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelNameLengthLimit: 0
+
+ ## Per-scrape limit on length of labels value that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelValueLengthLimit: 0
+
+ ## 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: []
# - action: keep
# regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+'
# sourceLabels: [__name__]
- # relabel configs to apply to samples before ingestion.
+ ## 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]
@@ -809,12 +1563,17 @@ kubeDns:
# targetLabel: nodename
# 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
+ ##
dnsmasqMetricRelabelings: []
# - action: keep
# regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+'
# sourceLabels: [__name__]
- # relabel configs to apply to samples before ingestion.
+ ## RelabelConfigs to apply to samples before scraping
+ ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig
##
dnsmasqRelabelings: []
# - sourceLabels: [__meta_kubernetes_pod_node_name]
@@ -824,6 +1583,11 @@ kubeDns:
# replacement: $1
# action: replace
+ ## Additional labels
+ ##
+ additionalLabels: {}
+ # foo: bar
+
## Component scraping etcd
##
kubeEtcd:
@@ -839,8 +1603,9 @@ kubeEtcd:
## Etcd service. If using kubeEtcd.endpoints only the port and targetPort are used
##
service:
- port: 2379
- targetPort: 2379
+ enabled: true
+ port: 2381
+ targetPort: 2381
# selector:
# component: etcd
@@ -856,9 +1621,34 @@ kubeEtcd:
## keyFile: /etc/prometheus/secrets/etcd-client-cert/etcd-client-key
##
serviceMonitor:
+ enabled: true
## Scrape interval. If not set, the Prometheus default scrape interval is used.
##
interval: ""
+
+ ## SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
+ ##
+ sampleLimit: 0
+
+ ## TargetLimit defines a limit on the number of scraped targets that will be accepted.
+ ##
+ targetLimit: 0
+
+ ## Per-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelLimit: 0
+
+ ## Per-scrape limit on length of labels name that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelNameLengthLimit: 0
+
+ ## Per-scrape limit on length of labels value that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelValueLengthLimit: 0
+
+ ## proxyUrl: URL of a proxy that should be used for scraping.
+ ##
+ proxyUrl: ""
scheme: http
insecureSkipVerify: false
serverName: ""
@@ -866,14 +1656,16 @@ kubeEtcd:
certFile: ""
keyFile: ""
- ## metric relabel configs to apply to samples before ingestion.
+ ## 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__]
- # relabel configs to apply to samples before ingestion.
+ ## 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]
@@ -883,6 +1675,10 @@ kubeEtcd:
# replacement: $1
# action: replace
+ ## Additional labels
+ ##
+ additionalLabels: {}
+ # foo: bar
## Component scraping kube scheduler
##
@@ -899,19 +1695,49 @@ kubeScheduler:
## If using kubeScheduler.endpoints only the port and targetPort are used
##
service:
- port: 10251
- targetPort: 10251
+ enabled: true
+ ## 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
serviceMonitor:
+ enabled: true
## Scrape interval. If not set, the Prometheus default scrape interval is used.
##
interval: ""
+
+ ## SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
+ ##
+ sampleLimit: 0
+
+ ## TargetLimit defines a limit on the number of scraped targets that will be accepted.
+ ##
+ targetLimit: 0
+
+ ## Per-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelLimit: 0
+
+ ## Per-scrape limit on length of labels name that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelNameLengthLimit: 0
+
+ ## Per-scrape limit on length of labels value that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelValueLengthLimit: 0
+
+ ## proxyUrl: URL of a proxy that should be used for scraping.
+ ##
+ 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
@@ -919,14 +1745,16 @@ kubeScheduler:
## Name of the server to use when validating TLS certificate
serverName: null
- ## metric relabel configs to apply to samples before ingestion.
+ ## 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__]
- # relabel configs to apply to samples before ingestion.
+ ## 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]
@@ -936,6 +1764,10 @@ kubeScheduler:
# replacement: $1
# action: replace
+ ## Additional labels
+ ##
+ additionalLabels: {}
+ # foo: bar
## Component scraping kube proxy
##
@@ -950,158 +1782,327 @@ kubeProxy:
# - 10.141.4.24
service:
+ enabled: true
port: 10249
targetPort: 10249
# selector:
# k8s-app: kube-proxy
serviceMonitor:
+ enabled: true
## Scrape interval. If not set, the Prometheus default scrape interval is used.
##
interval: ""
+ ## SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
+ ##
+ sampleLimit: 0
+
+ ## TargetLimit defines a limit on the number of scraped targets that will be accepted.
+ ##
+ targetLimit: 0
+
+ ## Per-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelLimit: 0
+
+ ## Per-scrape limit on length of labels name that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelNameLengthLimit: 0
+
+ ## Per-scrape limit on length of labels value that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelValueLengthLimit: 0
+
+ ## proxyUrl: URL of a proxy that should be used for scraping.
+ ##
+ proxyUrl: ""
+
## Enable scraping kube-proxy over https.
## Requires proper certs (not self-signed) and delegated authentication/authorization checks
##
https: false
- ## metric relabel configs to apply to samples before ingestion.
+ ## 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__]
- # relabel configs to apply to samples before ingestion.
+ ## RelabelConfigs to apply to samples before scraping
+ ## 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: ""
-
- ## 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
## Configuration for kube-state-metrics subchart
##
kube-state-metrics:
+ namespaceOverride: ""
rbac:
create: true
- podSecurityPolicy:
- enabled: true
+ 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
+ ## SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
+ ##
+ sampleLimit: 0
- serviceMonitor:
- ## Scrape interval. If not set, the Prometheus default scrape interval is used.
- ##
- interval: ""
+ ## TargetLimit defines a limit on the number of scraped targets that will be accepted.
+ ##
+ targetLimit: 0
- ## How long until a scrape request times out. If not set, the Prometheus default scape timeout is used.
- ##
- scrapeTimeout: ""
+ ## Per-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelLimit: 0
- ## metric relabel configs to apply to samples before ingestion.
- ##
- metricRelabelings: []
- # - sourceLabels: [__name__]
- # separator: ;
- # regex: ^node_mountstats_nfs_(event|operations|transport)_.+
- # replacement: $1
- # action: drop
+ ## Per-scrape limit on length of labels name that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelNameLengthLimit: 0
- ## relabel configs to apply to samples before ingestion.
- ##
- relabelings: []
- # - sourceLabels: [__meta_kubernetes_pod_node_name]
- # separator: ;
- # regex: ^(.*)$
- # targetLabel: nodename
- # replacement: $1
- # action: replace
+ ## Per-scrape limit on length of labels value that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelValueLengthLimit: 0
+
+ ## 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: ""
+
+ # Keep labels from scraped data, overriding server-side labels
+ ##
+ honorLabels: true
+
+ ## 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
+
+ selfMonitor:
+ enabled: false
+
+## Deploy node exporter as a daemonset to all nodes
+##
+nodeExporter:
+ enabled: true
+ operatingSystems:
+ linux:
+ enabled: true
+ darwin:
+ enabled: true
## Configuration for prometheus-node-exporter subchart
##
prometheus-node-exporter:
+ namespaceOverride: ""
podLabels:
## 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/.+)($|/)
- - --collector.filesystem.ignored-fs-types=^(autofs|binfmt_misc|cgroup|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|mqueue|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|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:
+ portName: http-metrics
+ prometheus:
+ monitor:
+ enabled: true
+
+ jobLabel: jobLabel
+
+ ## Scrape interval. If not set, the Prometheus default scrape interval is used.
+ ##
+ interval: ""
+
+ ## SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
+ ##
+ sampleLimit: 0
+
+ ## TargetLimit defines a limit on the number of scraped targets that will be accepted.
+ ##
+ targetLimit: 0
+
+ ## Per-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelLimit: 0
+
+ ## Per-scrape limit on length of labels name that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelNameLengthLimit: 0
+
+ ## Per-scrape limit on length of labels value that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelValueLengthLimit: 0
+
+ ## 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
+ rbac:
+ ## If true, create PSPs for node-exporter
+ ##
+ pspEnabled: false
## Manages Prometheus and Alertmanager components
##
prometheusOperator:
enabled: true
- # If true prometheus operator will create and update its CRDs on startup
- manageCrds: true
+ ## Number of old replicasets to retain ##
+ ## The default value is 10, 0 will garbage-collect old replicasets ##
+ revisionHistoryLimit: 10
- tlsProxy:
+ ## Prometheus-Operator v0.39.0 and later support TLS natively.
+ ##
+ tls:
enabled: true
- image:
- repository: squareup/ghostunnel
- tag: v1.5.2
- pullPolicy: IfNotPresent
- resources: {}
+ # Value must match version names from https://golang.org/pkg/crypto/tls/#pkg-constants
+ tlsMinVersion: VersionTLS13
+ # The default webhook port is 10250 in order to work out-of-the-box in GKE private clusters and avoid adding firewall rules.
+ internalPort: 10250
## Admission webhook support for PrometheusRules resources added in Prometheus Operator 0.30 can be enabled to prevent incorrectly formatted
## rules from making their way into prometheus and potentially preventing the container from starting
admissionWebhooks:
- failurePolicy: Fail
+ ## Valid values: Fail, Ignore, IgnoreOnInstallOnly
+ ## IgnoreOnInstallOnly - If Release.IsInstall returns "true", set "Ignore" otherwise "Fail"
+ failurePolicy: ""
+ ## 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.
+ caBundle: ""
## If enabled, generate a self-signed certificate, then patch the webhook configurations with the generated data.
## On chart upgrades (or if the secret exists) the cert will not be re-generated. You can use this to provide your own
## certs ahead of time if you wish.
##
+ annotations: {}
+ # argocd.argoproj.io/hook: PreSync
+ # argocd.argoproj.io/hook-delete-policy: HookSucceeded
patch:
enabled: true
image:
- repository: jettech/kube-webhook-certgen
- tag: v1.2.0
+ registry: registry.k8s.io
+ repository: ingress-nginx/kube-webhook-certgen
+ tag: v20221220-controller-v1.5.1-58-g787ea74b6
+ sha: ""
pullPolicy: IfNotPresent
resources: {}
## Provide a priority class name to the webhook patching job
##
priorityClassName: ""
+ annotations: {}
+ # argocd.argoproj.io/hook: PreSync
+ # argocd.argoproj.io/hook-delete-policy: HookSucceeded
podAnnotations: {}
nodeSelector: {}
affinity: {}
tolerations: []
+ ## SecurityContext holds pod-level security attributes and common container settings.
+ ## This defaults to non root user with uid 2000 and gid 2000. *v1.PodSecurityContext false
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
+ ##
+ securityContext:
+ runAsGroup: 2000
+ runAsNonRoot: true
+ runAsUser: 2000
+ seccompProfile:
+ type: RuntimeDefault
+
+ # Security context for create job container
+ createSecretJob:
+ securityContext:
+ allowPrivilegeEscalation: false
+ readOnlyRootFilesystem: true
+ capabilities:
+ drop:
+ - ALL
+
+ # Security context for patch job container
+ patchWebhookJob:
+ securityContext:
+ allowPrivilegeEscalation: false
+ readOnlyRootFilesystem: true
+ capabilities:
+ drop:
+ - ALL
+
+ # 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"
+
## Namespaces to scope the interaction of the Prometheus Operator and the apiserver (allow list).
## This is mutually exclusive with denyNamespaces. Setting this to an empty object will disable the configuration
##
@@ -1114,7 +2115,37 @@ prometheusOperator:
##
denyNamespaces: []
- ## Service account for Alertmanager to use.
+ ## Filter namespaces to look for prometheus-operator custom resources
+ ##
+ alertmanagerInstanceNamespaces: []
+ alertmanagerConfigNamespaces: []
+ prometheusInstanceNamespaces: []
+ thanosRulerInstanceNamespaces: []
+
+ ## The clusterDomain value will be added to the cluster.peer option of the alertmanager.
+ ## Without this specified option cluster.peer will have value alertmanager-monitoring-alertmanager-0.alertmanager-operated:9094 (default value)
+ ## With this specified option cluster.peer will have value alertmanager-monitoring-alertmanager-0.alertmanager-operated.namespace.svc.cluster-domain:9094
+ ##
+ # clusterDomain: "cluster.local"
+
+ networkPolicy:
+ ## Enable creation of NetworkPolicy resources.
+ ##
+ enabled: false
+
+ ## Flavor of the network policy to use.
+ # Can be:
+ # * kubernetes for networking.k8s.io/v1/NetworkPolicy
+ # * cilium for cilium.io/v2/CiliumNetworkPolicy
+ flavor: kubernetes
+
+ # cilium:
+ # egress:
+
+ ## match labels used in selector
+ # matchLabels: {}
+
+ ## Service account for Prometheus Operator to use.
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
##
serviceAccount:
@@ -1135,19 +2166,23 @@ prometheusOperator:
nodePortTls: 30443
- ## Additional ports to open for Prometheus service
+ ## Additional ports to open for Prometheus operator service
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#multi-port-services
##
additionalPorts: []
## Loadbalancer IP
- ## Only use if service.type is "loadbalancer"
+ ## 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
- ## NodePort, ClusterIP, loadbalancer
+ ## NodePort, ClusterIP, LoadBalancer
##
type: ClusterIP
@@ -1156,13 +2191,13 @@ prometheusOperator:
##
externalIPs: []
- ## Deploy CRDs used by Prometheus Operator.
- ##
- createCustomResource: true
+ # ## Labels to add to the operator deployment
+ # ##
+ labels: {}
- ## Attempt to clean up CRDs created by Prometheus Operator.
+ ## Annotations to add to the operator deployment
##
- cleanupCustomResource: false
+ annotations: {}
## Labels to add to the operator pod
##
@@ -1176,35 +2211,63 @@ prometheusOperator:
# priorityClassName: ""
## Define Log Format
- # Use logfmt (default) or json-formatted logging
+ # Use logfmt (default) or json logging
# logFormat: logfmt
## Decrease log verbosity to errors only
# logLevel: error
## If true, the operator will create and maintain a service for scraping kubelets
- ## ref: https://github.com/coreos/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
##
serviceMonitor:
+ ## Labels for ServiceMonitor
+ additionalLabels: {}
+
## Scrape interval. If not set, the Prometheus default scrape interval is used.
##
interval: ""
+
+ ## SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
+ ##
+ sampleLimit: 0
+
+ ## TargetLimit defines a limit on the number of scraped targets that will be accepted.
+ ##
+ targetLimit: 0
+
+ ## Per-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelLimit: 0
+
+ ## Per-scrape limit on length of labels name that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelNameLengthLimit: 0
+
+ ## Per-scrape limit on length of labels value that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelValueLengthLimit: 0
+
+ ## Scrape timeout. If not set, the Prometheus default scrape timeout is used.
+ scrapeTimeout: ""
selfMonitor: true
- ## metric relabel configs to apply to samples before ingestion.
+ ## 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.
+ # relabel configs to apply to samples before ingestion.
##
relabelings: []
# - sourceLabels: [__meta_kubernetes_pod_node_name]
@@ -1224,6 +2287,11 @@ prometheusOperator:
# cpu: 100m
# memory: 100Mi
+ # 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
+
## Define which Nodes the Pods are scheduled on.
## ref: https://kubernetes.io/docs/user-guide/node-selection/
##
@@ -1251,75 +2319,289 @@ prometheusOperator:
# values:
# - e2e-az1
# - e2e-az2
-
+ dnsConfig: {}
+ # nameservers:
+ # - 1.2.3.4
+ # searches:
+ # - ns1.svc.cluster-domain.example
+ # - my.dns.search.suffix
+ # options:
+ # - name: ndots
+ # value: "2"
+ # - name: edns0
securityContext:
+ fsGroup: 65534
+ runAsGroup: 65534
runAsNonRoot: true
runAsUser: 65534
+ seccompProfile:
+ type: RuntimeDefault
+
+ ## Container-specific security context configuration
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
+ ##
+ containerSecurityContext:
+ allowPrivilegeEscalation: false
+ readOnlyRootFilesystem: true
+ capabilities:
+ drop:
+ - ALL
+
+ # Enable vertical pod autoscaler support for prometheus-operator
+ verticalPodAutoscaler:
+ enabled: false
+
+ # Recommender responsible for generating recommendation for the object.
+ # List should be empty (then the default recommender will generate the recommendation)
+ # or contain exactly one recommender.
+ # recommenders:
+ # - name: custom-recommender-performance
+
+ # List of resources that the vertical pod autoscaler can control. Defaults to cpu and memory
+ controlledResources: []
+ # Specifies which resource values should be controlled: RequestsOnly or RequestsAndLimits.
+ # controlledValues: RequestsAndLimits
+
+ # Define the max allowed resources for the pod
+ maxAllowed: {}
+ # cpu: 200m
+ # memory: 100Mi
+ # Define the min allowed resources for the pod
+ minAllowed: {}
+ # cpu: 200m
+ # memory: 100Mi
+
+ updatePolicy:
+ # Specifies minimal number of replicas which need to be alive for VPA Updater to attempt pod eviction
+ # minReplicas: 1
+ # Specifies whether recommended updates are applied when a Pod is started and whether recommended updates
+ # are applied during the life of a Pod. Possible values are "Off", "Initial", "Recreate", and "Auto".
+ updateMode: Auto
## Prometheus-operator image
##
image:
- repository: quay.io/coreos/prometheus-operator
- tag: v0.38.1
+ registry: quay.io
+ repository: prometheus-operator/prometheus-operator
+ # if not set appVersion field from Chart.yaml is used
+ tag: ""
+ sha: ""
pullPolicy: IfNotPresent
- ## Configmap-reload image to use for reloading configmaps
+ ## Prometheus image to use for prometheuses managed by the operator
##
- configmapReloadImage:
- repository: quay.io/coreos/configmap-reload
- tag: v0.0.1
+ # prometheusDefaultBaseImage: prometheus/prometheus
- ## Prometheus-config-reloader image to use for config and rule reloading
+ ## Prometheus image registry to use for prometheuses managed by the operator
##
- prometheusConfigReloaderImage:
- repository: quay.io/coreos/prometheus-config-reloader
- tag: v0.38.1
+ # prometheusDefaultBaseImageRegistry: quay.io
- ## Set the prometheus config reloader side-car CPU limit
+ ## Alertmanager image to use for alertmanagers managed by the operator
##
- configReloaderCpu: 100m
+ # alertmanagerDefaultBaseImage: prometheus/alertmanager
- ## Set the prometheus config reloader side-car memory limit
+ ## Alertmanager image registry to use for alertmanagers managed by the operator
##
- configReloaderMemory: 25Mi
+ # alertmanagerDefaultBaseImageRegistry: quay.io
- ## Hyperkube image to use when cleaning up
+ ## Prometheus-config-reloader
##
- hyperkubeImage:
- repository: k8s.gcr.io/hyperkube
- tag: v1.12.1
- pullPolicy: IfNotPresent
+ prometheusConfigReloader:
+ image:
+ registry: quay.io
+ repository: prometheus-operator/prometheus-config-reloader
+ # if not set appVersion field from Chart.yaml is used
+ tag: ""
+ sha: ""
+
+ # add prometheus config reloader liveness and readiness probe. Default: false
+ enableProbe: false
+
+ # resource config for prometheusConfigReloader
+ resources: {}
+ # requests:
+ # cpu: 200m
+ # memory: 50Mi
+ # limits:
+ # cpu: 200m
+ # memory: 50Mi
+
+ ## Thanos side-car image when configured
+ ##
+ thanosImage:
+ registry: quay.io
+ repository: thanos/thanos
+ tag: v0.32.4
+ sha: ""
+
+ ## Set a Label Selector to filter watched prometheus and prometheusAgent
+ ##
+ prometheusInstanceSelector: ""
+
+ ## Set a Label Selector to filter watched alertmanager
+ ##
+ alertmanagerInstanceSelector: ""
+
+ ## Set a Label Selector to filter watched thanosRuler
+ thanosRulerInstanceSelector: ""
+
+ ## Set a Field Selector to filter watched secrets
+ ##
+ secretFieldSelector: "type!=kubernetes.io/dockercfg,type!=kubernetes.io/service-account-token,type!=helm.sh/release.v1"
## Deploy a Prometheus instance
##
prometheus:
-
enabled: true
+ ## Toggle prometheus into agent mode
+ ## Note many of features described below (e.g. rules, query, alerting, remote read, thanos) will not work in agent mode.
+ ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/designs/prometheus-agent.md
+ ##
+ agentMode: false
+
## Annotations for Prometheus
##
annotations: {}
+ ## Configure network policy for the prometheus
+ networkPolicy:
+ enabled: false
+
+ ## Flavor of the network policy to use.
+ # Can be:
+ # * kubernetes for networking.k8s.io/v1/NetworkPolicy
+ # * cilium for cilium.io/v2/CiliumNetworkPolicy
+ flavor: kubernetes
+
+ # cilium:
+ # endpointSelector:
+ # egress:
+ # ingress:
+
+ # egress:
+ # - {}
+ # ingress:
+ # - {}
+ # podSelector:
+ # matchLabels:
+ # app: prometheus
+
## 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:
+ # Service for thanos service discovery on sidecar
+ # Enable this can make Thanos Query can use
+ # `--store=dnssrv+_grpc._tcp.${kube-prometheus-stack.fullname}-thanos-discovery.${namespace}.svc.cluster.local` to discovery
+ # Thanos sidecar on prometheus nodes
+ # (Please remember to change ${kube-prometheus-stack.fullname} and ${namespace}. Not just copy and paste!)
+ thanosService:
+ enabled: false
annotations: {}
labels: {}
- clusterIP: ""
- ## Port for Prometheus Service 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
+ ## Service type
+ ##
+ type: ClusterIP
+
+ ## gRPC port config
+ portName: grpc
+ port: 10901
+ targetPort: "grpc"
+
+ ## HTTP port config (for metrics)
+ httpPortName: http
+ httpPort: 10902
+ targetHttpPort: "http"
+
+ ## ClusterIP to assign
+ # Default is to make this a headless service ("None")
+ clusterIP: "None"
+
+ ## Port to expose on each node, if service type is NodePort
+ ##
+ nodePort: 30901
+ httpNodePort: 30902
+
+ # ServiceMonitor to scrape Sidecar metrics
+ # Needs thanosService to be enabled as well
+ thanosServiceMonitor:
+ enabled: false
+ interval: ""
+
+ ## Additional labels
+ ##
+ additionalLabels: {}
+
+ ## 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: []
+
+ ## relabel configs to apply to samples before ingestion.
+ relabelings: []
+
+ # Service for external access to sidecar
+ # Enabling this creates a service to expose thanos-sidecar outside the cluster.
+ thanosServiceExternal:
+ enabled: false
+ annotations: {}
+ labels: {}
+ loadBalancerIP: ""
+ loadBalancerSourceRanges: []
+
+ ## gRPC port config
+ portName: grpc
+ port: 10901
+ targetPort: "grpc"
+
+ ## HTTP port config (for metrics)
+ httpPortName: http
+ 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
+
+ ## Port to expose on each node
+ ##
+ nodePort: 30901
+ httpNodePort: 30902
+
+ ## 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: 9090
## List of IP addresses at which the Prometheus server service is available
## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips
@@ -1332,13 +2614,33 @@ prometheus:
nodePort: 30090
## Loadbalancer IP
- ## Only use if service.type is "loadbalancer"
+ ## 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 ports to open for Prometheus service
+ ##
+ additionalPorts: []
+ # additionalPorts:
+ # - name: oauth-proxy
+ # port: 8081
+ # targetPort: 8081
+ # - name: oauth-metrics
+ # port: 8082
+ # targetPort: 8082
+
+ ## 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: ""
## Configuration for creating a separate Service for each statefulset Prometheus replica
@@ -1360,8 +2662,13 @@ prometheus:
nodePort: 30091
## Loadbalancer source IP ranges
- ## Only used if servicePerReplica.type is "loadbalancer"
+ ## Only used if servicePerReplica.type is "LoadBalancer"
loadBalancerSourceRanges: []
+
+ ## Denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints
+ ##
+ externalTrafficPolicy: Cluster
+
## Service type
##
type: ClusterIP
@@ -1376,11 +2683,70 @@ prometheus:
minAvailable: 1
maxUnavailable: ""
+ # Ingress exposes thanos sidecar outside the cluster
+ thanosIngress:
+ 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: {}
+ servicePort: 10901
+
+ ## Port to expose on each node
+ ## Only used if service.type is 'NodePort'
+ ##
+ nodePort: 30901
+
+ ## Hosts must be provided if Ingress is enabled.
+ ##
+ hosts: []
+ # - thanos-gateway.domain.com
+
+ ## Paths to use for ingress rules
+ ##
+ 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 Thanos Ingress
+ ## Secret must be manually created in the namespace
+ ##
+ tls: []
+ # - secretName: thanos-gateway-tls
+ # hosts:
+ # - thanos-gateway.domain.com
+ #
+
+ ## 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.
##
@@ -1393,6 +2759,10 @@ prometheus:
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
##
@@ -1406,6 +2776,11 @@ prometheus:
##
ingressPerReplica:
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: {}
@@ -1423,6 +2798,10 @@ prometheus:
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
+
## Secret name containing the TLS certificate for Prometheus per replica ingress
## Secret must be manually created in the namespace
tlsSecretName: ""
@@ -1440,6 +2819,8 @@ prometheus:
## ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/
podSecurityPolicy:
allowedCapabilities: []
+ allowedHostPaths: []
+ volumes: []
serviceMonitor:
## Scrape interval. If not set, the Prometheus default scrape interval is used.
@@ -1447,23 +2828,47 @@ prometheus:
interval: ""
selfMonitor: true
+ ## Additional labels
+ ##
+ additionalLabels: {}
+
+ ## SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
+ ##
+ sampleLimit: 0
+
+ ## TargetLimit defines a limit on the number of scraped targets that will be accepted.
+ ##
+ targetLimit: 0
+
+ ## Per-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelLimit: 0
+
+ ## Per-scrape limit on length of labels name that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelNameLengthLimit: 0
+
+ ## Per-scrape limit on length of labels value that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelValueLengthLimit: 0
+
## 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/master/Documentation/api.md#tlsconfig
+ ## Of type: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#tlsconfig
tlsConfig: {}
bearerTokenFile:
- ## metric relabel configs to apply to samples before ingestion.
+ ## 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.
+ # relabel configs to apply to samples before ingestion.
##
relabelings: []
# - sourceLabels: [__meta_kubernetes_pod_node_name]
@@ -1473,22 +2878,38 @@ prometheus:
# replacement: $1
# action: replace
+ ## Additional Endpoints
+ ##
+ additionalEndpoints: []
+ # - port: oauth-metrics
+ # path: /metrics
+
## Settings affecting prometheusSpec
- ## ref: https://github.com/coreos/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/coreos/prometheus-operator/blob/master/Documentation/api.md#apiserverconfig
+ ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#apiserverconfig
##
apiserverConfig: {}
+ ## Allows setting additional arguments for the Prometheus container
+ ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#monitoring.coreos.com/v1.Prometheus
+ additionalArgs: []
+
## 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: ""
@@ -1503,11 +2924,34 @@ prometheus:
##
enableAdminAPI: false
+ ## Sets version of Prometheus overriding the Prometheus version as derived
+ ## from the image tag. Useful in cases where the tag does not follow semver v2.
+ version: ""
+
+ ## 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: quay.io/prometheus/prometheus
- tag: v2.17.2
+ registry: quay.io
+ repository: prometheus/prometheus
+ tag: v2.47.1
+ sha: ""
## Tolerations for use with node taints
## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
@@ -1518,8 +2962,19 @@ prometheus:
# 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/coreos/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
##
@@ -1537,6 +2992,10 @@ prometheus:
##
externalLabels: {}
+ ## enable --web.enable-remote-write-receiver flag on prometheus-server
+ ##
+ enableRemoteWriteReceiver: false
+
## Name of the external label used to denote replica name
##
replicaExternalLabelName: ""
@@ -1575,15 +3034,16 @@ prometheus:
configMaps: []
## QuerySpec defines the query command line flags when starting Prometheus.
- ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#queryspec
+ ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#queryspec
##
query: {}
- ## Namespaces to be selected for PrometheusRules discovery.
- ## If nil, select own namespace. Namespaces to be selected for ServiceMonitor discovery.
- ## See https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#namespaceselector for usage
- ##
+ ## If nil, select own namespace. Namespaces to be selected for PrometheusRules discovery.
ruleNamespaceSelector: {}
+ ## Example which selects PrometheusRules in namespaces with label "prometheus" set to "somelabel"
+ # ruleNamespaceSelector:
+ # matchLabels:
+ # prometheus: somelabel
## 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,
@@ -1592,10 +3052,10 @@ prometheus:
ruleSelectorNilUsesHelmValues: true
## PrometheusRules to be selected for target discovery.
- ## If {}, select all ServiceMonitors
+ ## If {}, select all PrometheusRules
##
ruleSelector: {}
- ## Example which select all prometheusrules resources
+ ## Example which select all PrometheusRules resources
## with label "prometheus" with values any of "example-rules" or "example-rules-2"
# ruleSelector:
# matchExpressions:
@@ -1605,7 +3065,7 @@ prometheus:
# - example-rules
# - example-rules-2
#
- ## Example which select all prometheusrules resources with label "role" set to "example-rules"
+ ## Example which select all PrometheusRules resources with label "role" set to "example-rules"
# ruleSelector:
# matchLabels:
# role: example-rules
@@ -1626,9 +3086,12 @@ prometheus:
# prometheus: somelabel
## Namespaces to be selected for ServiceMonitor discovery.
- ## See https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#namespaceselector for usage
##
serviceMonitorNamespaceSelector: {}
+ ## Example which selects ServiceMonitors in namespaces with label "prometheus" set to "somelabel"
+ # serviceMonitorNamespaceSelector:
+ # matchLabels:
+ # prometheus: somelabel
## 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,
@@ -1645,10 +3108,56 @@ prometheus:
# matchLabels:
# prometheus: somelabel
- ## Namespaces to be selected for PodMonitor discovery.
- ## See https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#namespaceselector for usage
- ##
+ ## If nil, select own namespace. Namespaces to be selected for PodMonitor discovery.
podMonitorNamespaceSelector: {}
+ ## Example which selects PodMonitor in namespaces with label "prometheus" set to "somelabel"
+ # podMonitorNamespaceSelector:
+ # matchLabels:
+ # prometheus: somelabel
+
+ ## 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: {}
+ ## Example which selects Probes with label "prometheus" set to "somelabel"
+ # probeSelector:
+ # matchLabels:
+ # prometheus: somelabel
+
+ ## If nil, select own namespace. Namespaces to be selected for Probe discovery.
+ probeNamespaceSelector: {}
+ ## Example which selects Probe in namespaces with label "prometheus" set to "somelabel"
+ # probeNamespaceSelector:
+ # matchLabels:
+ # prometheus: somelabel
+
+ ## If true, a nil or {} value for prometheus.prometheusSpec.scrapeConfigSelector will cause the
+ ## prometheus resource to be created with selectors based on values in the helm deployment,
+ ## which will also match the scrapeConfigs created
+ ##
+ scrapeConfigSelectorNilUsesHelmValues: true
+
+ ## scrapeConfigs to be selected for target discovery.
+ ## If {}, select all scrapeConfigs
+ ##
+ scrapeConfigSelector: {}
+ ## Example which selects scrapeConfigs with label "prometheus" set to "somelabel"
+ # scrapeConfig:
+ # matchLabels:
+ # prometheus: somelabel
+
+ ## If nil, select own namespace. Namespaces to be selected for scrapeConfig discovery.
+ scrapeConfigNamespaceSelector: {}
+ ## Example which selects scrapeConfig in namespaces with label "prometheus" set to "somelabel"
+ # scrapeConfigNamespaceSelector:
+ # matchLabels:
+ # prometheus: somelabel
## How long to retain metrics
##
@@ -1658,18 +3167,33 @@ prometheus:
##
retentionSize: ""
+ ## Allow out-of-order/out-of-bounds samples ingested into Prometheus for a specified duration
+ ## See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#tsdb
+ tsdb:
+ outOfOrderTimeWindow: 0s
+
## Enable compression of the write-ahead log using Snappy.
##
- walCompression: false
+ walCompression: true
## If true, the Operator won't process any Prometheus configuration changes
##
paused: false
- ## Number of Prometheus replicas desired
+ ## 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
@@ -1683,7 +3207,7 @@ prometheus:
##
routePrefix: /
- ## Standard object’s metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata
+ ## 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: {}
@@ -1717,14 +3241,18 @@ prometheus:
# - e2e-az2
## The remote_read spec configuration for Prometheus.
- ## ref: https://github.com/coreos/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/coreos/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
+ additionalRemoteWrite: []
## Enable/Disable Grafana dashboards provisioning for prometheus remote write feature
remoteWriteDashboards: false
@@ -1736,9 +3264,11 @@ prometheus:
# memory: 400Mi
## Prometheus StorageSpec for persistent data
- ## ref: https://github.com/coreos/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
+ ##
# volumeClaimTemplate:
# spec:
# storageClassName: gluster
@@ -1748,6 +3278,17 @@ prometheus:
# storage: 50Gi
# selector: {}
+ ## Using tmpfs volume
+ ##
+ # emptyDir:
+ # medium: Memory
+
+ # Additional volumes on the output StatefulSet definition.
+ volumes: []
+
+ # Additional VolumeMounts on the output StatefulSet definition.
+ volumeMounts: []
+
## AdditionalScrapeConfigs allows specifying additional Prometheus scrape configurations. Scrape configurations
## are appended to the configurations generated by the Prometheus Operator. Job configurations must have the form
## as specified in the official Prometheus documentation:
@@ -1755,8 +3296,9 @@ prometheus:
## 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 configuraiton example below will find master nodes, provided they have the name .*mst.*, relabel the
+ ## 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
##
additionalScrapeConfigs: []
@@ -1787,6 +3329,28 @@ prometheus:
# 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
+ ## Cannot be used with additionalScrapeConfigs
+ additionalScrapeConfigsSecret: {}
+ # enabled: false
+ # name:
+ # key:
## additionalPrometheusSecretsAnnotations allows to add annotations to the kubernetes secret. This can be useful
## when deploying via spinnaker to disable versioning on the secret, strategy.spinnaker.io/versioned: 'false'
@@ -1808,6 +3372,15 @@ prometheus:
# services:
# - metrics-prometheus-alertmanager
+ ## If additional alertmanager 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 additionalAlertManagerConfigs
+ 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
## official Prometheus documentation: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alert_relabel_configs.
@@ -1821,49 +3394,167 @@ prometheus:
# 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/coreos/prometheus-operator/blob/master/Documentation/api.md
+ ## https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md
##
securityContext:
+ runAsGroup: 2000
runAsNonRoot: true
runAsUser: 1000
fsGroup: 2000
+ seccompProfile:
+ type: RuntimeDefault
- ## Priority class assigned to the Pods
+ ## Priority class assigned to the Pods
##
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/coreos/prometheus-operator/blob/master/Documentation/api.md#thanosspec
+ ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#thanosspec
##
thanos: {}
+ # secretProviderClass:
+ # provider: gcp
+ # parameters:
+ # secrets: |
+ # - resourceName: "projects/$PROJECT_ID/secrets/testsecret/versions/latest"
+ # fileName: "objstore.yaml"
+ # objectStorageConfigFile: /var/secrets/object-store.yaml
## 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
+ ## if using proxy extraContainer update targetPort with proxy container port
containers: []
+ # containers:
+ # - name: oauth-proxy
+ # image: quay.io/oauth2-proxy/oauth2-proxy:v7.5.1
+ # args:
+ # - --upstream=http://127.0.0.1:9090
+ # - --http-address=0.0.0.0:8081
+ # - --metrics-address=0.0.0.0:8082
+ # - ...
+ # ports:
+ # - containerPort: 8081
+ # name: oauth-proxy
+ # protocol: TCP
+ # - containerPort: 8082
+ # name: oauth-metrics
+ # protocol: TCP
+ # resources: {}
## InitContainers allows injecting additional initContainers. This is meant to allow doing some changes
## (permissions, dir tree) on mounted volumes before starting prometheus
initContainers: []
- ## Enable additional scrape configs that are managed externally to this chart. Note that the prometheus
- ## will fail to provision if the correct secret does not exist.
- ## This option requires that you are maintaining a secret in the same namespace as Prometheus with
- ## a name of 'prometheus-operator-prometheus-scrape-confg' and a key of 'additional-scrape-configs.yaml' that
- ## contains a list of scrape_config's. The name of the secret may vary if you utilize the "fullnameOverride".
- ## This feature cannot be used in conjunction with the additionalScrapeConfigs attribute (the helm-generated
- ## secret will overwrite your self-maintained secret).
- ##
- ## scrape_config docs: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config
- ## explanation of "confg" typo: https://github.com/helm/charts/issues/13368
- additionalScrapeConfigsExternal: false
-
## PortName to use for Prometheus.
##
- portName: "web"
+ 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
+
+ ## IgnoreNamespaceSelectors if set to true will ignore NamespaceSelector settings from the podmonitor and servicemonitor
+ ## configs, and they will only discover endpoints within their current namespace. Defaults to false.
+ ignoreNamespaceSelectors: 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
+
+ # 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
+ # Use the host's network namespace if true. Make sure to understand the security implications if you want to enable it.
+ # When hostNetwork is enabled, this will set dnsPolicy to ClusterFirstWithHostNet automatically.
+ hostNetwork: false
+
+ # HostAlias holds the mapping between IP and hostnames that will be injected
+ # as an entry in the pod’s hosts file.
+ hostAliases: []
+ # - ip: 10.10.0.100
+ # hostnames:
+ # - a1.app.local
+ # - b1.app.local
+
+ ## TracingConfig configures tracing in Prometheus.
+ ## See https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#prometheustracingconfig
+ tracingConfig: {}
+
+ additionalRulesForClusterRole: []
+ # - apiGroups: [ "" ]
+ # resources:
+ # - nodes/proxy
+ # verbs: [ "get", "list", "watch" ]
additionalServiceMonitors: []
## Name of the ServiceMonitor to create
@@ -1882,7 +3573,11 @@ prometheus:
## labels to transfer from the kubernetes service to the target
##
- # targetLabels: ""
+ # targetLabels: []
+
+ ## labels to transfer from the kubernetes pods to the target
+ ##
+ # podTargetLabels: []
## Label selector for services to which this ServiceMonitor applies
##
@@ -1950,6 +3645,25 @@ prometheus:
##
# serverName: ""
+ ## 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
+
additionalPodMonitors: []
## Name of the PodMonitor to create
##
@@ -1989,6 +3703,431 @@ prometheus:
# matchNames: []
## Endpoints of the selected pods to be monitored
- ## https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#podmetricsendpoint
+ ## https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#podmetricsendpoint
##
# podMetricsEndpoints: []
+
+## 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
+
+ ## Additional labels
+ ##
+ additionalLabels: {}
+
+ ## SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
+ ##
+ sampleLimit: 0
+
+ ## TargetLimit defines a limit on the number of scraped targets that will be accepted.
+ ##
+ targetLimit: 0
+
+ ## Per-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelLimit: 0
+
+ ## Per-scrape limit on length of labels name that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelNameLengthLimit: 0
+
+ ## Per-scrape limit on length of labels value that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer.
+ ##
+ labelValueLengthLimit: 0
+
+ ## 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
+
+ ## Additional Endpoints
+ ##
+ additionalEndpoints: []
+ # - port: oauth-metrics
+ # path: /metrics
+
+ ## 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:
+ registry: quay.io
+ repository: thanos/thanos
+ tag: v0.32.3
+ 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: ""
+
+ ## QueryEndpoints defines Thanos querier endpoints from which to query metrics.
+ ## Maps to the --query flag of thanos ruler.
+ queryEndpoints: []
+
+ ## Define configuration for connecting to thanos query instances. If this is defined, the queryEndpoints field will be ignored.
+ ## Maps to the query.config CLI argument. Only available with thanos v0.11.0 and higher.
+ queryConfig: {}
+
+ ## 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
+ seccompProfile:
+ type: RuntimeDefault
+
+ ## 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
+
+## Extra manifests to deploy as an array
+extraManifests: []
+ # - apiVersion: v1
+ # kind: ConfigMap
+ # metadata:
+ # labels:
+ # name: prometheus-extra
+ # data:
+ # extra-data: "value"
diff --git a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/podsecuritypolicy.yaml b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/podsecuritypolicy.yaml
index 0bacacd49f..33100b84e4 100755
--- a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/podsecuritypolicy.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/podsecuritypolicy.yaml
@@ -1,5 +1,5 @@
{{- if .Values.rbac.pspEnabled }}
-apiVersion: policy/v1beta1
+apiVersion: policy/v1
kind: PodSecurityPolicy
metadata:
name: {{ template "prometheus-redis-exporter.fullname" . }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/role.yaml b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/role.yaml
index c1ef9fde18..f891cea457 100755
--- a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/role.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/role.yaml
@@ -1,5 +1,5 @@
{{- if .Values.rbac.create }}
-apiVersion: rbac.authorization.k8s.io/v1beta1
+apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ template "prometheus-redis-exporter.fullname" . }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/rolebinding.yaml b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/rolebinding.yaml
index 6b960a603b..99e4afe4fb 100755
--- a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/rolebinding.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/rolebinding.yaml
@@ -1,5 +1,5 @@
{{- if .Values.rbac.create -}}
-apiVersion: rbac.authorization.k8s.io/v1beta1
+apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ template "prometheus-redis-exporter.fullname" . }}
diff --git a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/values.yaml b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/values.yaml
index c19f7a4ad5..18f95eb00f 100755
--- a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/values.yaml
+++ b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/values.yaml
@@ -1,8 +1,8 @@
rbac:
# Specifies whether RBAC resources should be created
- create: true
+ create: false
# Specifies whether a PodSecurityPolicy should be created
- pspEnabled: true
+ pspEnabled: false
serviceAccount:
# Specifies whether a ServiceAccount should be created
create: true
diff --git a/kubernetes/helm_charts/networkconfig/templates/private-vs.yaml b/kubernetes/helm_charts/networkconfig/templates/private-vs.yaml
index 71a002e5a3..2a358c1069 100644
--- a/kubernetes/helm_charts/networkconfig/templates/private-vs.yaml
+++ b/kubernetes/helm_charts/networkconfig/templates/private-vs.yaml
@@ -31,14 +31,14 @@ spec:
host: kiali.istio-system.svc.cluster.local
- match:
- uri:
- prefix: /learner/
+ prefix: /userorg/
- uri:
- prefix: /learner
+ prefix: /userorg
rewrite:
uri: /
route:
- destination:
- host: learner-service
+ host: userorg-service
- match:
- uri:
prefix: /api/
diff --git a/kubernetes/helm_charts/sunbird-RC/certificateapi/templates/hpa.yaml b/kubernetes/helm_charts/sunbird-RC/certificateapi/templates/hpa.yaml
index cb527919ea..fd75ba3280 100644
--- a/kubernetes/helm_charts/sunbird-RC/certificateapi/templates/hpa.yaml
+++ b/kubernetes/helm_charts/sunbird-RC/certificateapi/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
-{{- end }}
+{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/sunbird-RC/certificatesign/configs/config.json b/kubernetes/helm_charts/sunbird-RC/certificatesign/configs/config.json
new file mode 100644
index 0000000000..98052b982e
--- /dev/null
+++ b/kubernetes/helm_charts/sunbird-RC/certificatesign/configs/config.json
@@ -0,0 +1,11 @@
+{
+ "issuers": {
+ "default": {
+ "publicKey": "{{ CERTIFICATESIGN_PUBLIC_KEY | default('') }}",
+ "privateKey": "{{ CERTIFICATESIGN_PRIVATE_KEY | default('') }}",
+ "signatureType": "RSA",
+ "verificationMethod": "did:india",
+ "$comment": "The above are test keys and it needs to be replaced before going to production"
+ }
+ }
+}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/sunbird-RC/certificatesign/templates/configmap.yaml b/kubernetes/helm_charts/sunbird-RC/certificatesign/templates/configmap.yaml
index 05b928173d..587c7e9dfb 100644
--- a/kubernetes/helm_charts/sunbird-RC/certificatesign/templates/configmap.yaml
+++ b/kubernetes/helm_charts/sunbird-RC/certificatesign/templates/configmap.yaml
@@ -9,3 +9,16 @@ metadata:
creationTimestamp: null
name: {{ .Chart.Name }}-config
namespace: {{ .Values.namespace }}
+
+---
+
+{{- $configs := .Files.Glob "configs/*" }}
+{{ if $configs }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ .Chart.Name }}-conf
+ namespace: {{ .Values.namespace }}
+data:
+{{ (.Files.Glob "configs/*").AsConfig | indent 2 }}
+{{ end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/sunbird-RC/certificatesign/templates/deployment.yaml b/kubernetes/helm_charts/sunbird-RC/certificatesign/templates/deployment.yaml
index 7fa927020a..c271409ef9 100644
--- a/kubernetes/helm_charts/sunbird-RC/certificatesign/templates/deployment.yaml
+++ b/kubernetes/helm_charts/sunbird-RC/certificatesign/templates/deployment.yaml
@@ -34,6 +34,13 @@ spec:
{{ toYaml .Values.resources | indent 10 }}
ports:
- containerPort: {{ .Values.network.port }}
+ volumeMounts:
+ - name: {{ .Chart.Name }}-conf
+ mountPath: /etc/signer
+ volumes:
+ - name: {{ .Chart.Name }}-conf
+ configMap:
+ name: {{ .Chart.Name }}-conf
---
diff --git a/kubernetes/helm_charts/sunbird-RC/certificatesign/templates/hpa.yaml b/kubernetes/helm_charts/sunbird-RC/certificatesign/templates/hpa.yaml
index cb527919ea..fd75ba3280 100644
--- a/kubernetes/helm_charts/sunbird-RC/certificatesign/templates/hpa.yaml
+++ b/kubernetes/helm_charts/sunbird-RC/certificatesign/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
-{{- end }}
+{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/sunbird-RC/certificatesign/values.j2 b/kubernetes/helm_charts/sunbird-RC/certificatesign/values.j2
index 9895ebf05c..9e6beb68d4 100644
--- a/kubernetes/helm_charts/sunbird-RC/certificatesign/values.j2
+++ b/kubernetes/helm_charts/sunbird-RC/certificatesign/values.j2
@@ -31,8 +31,7 @@ certificatesignenv:
PORT: "8079"
QR_TYPE: {{ QR_TYPE|default('URL') }}
CERTIFICATE_DOMAIN_URL: "https://{{domain_name}}"
- CERTIFICATE_PUBLIC_KEY: {{CERTIFICATE_PUBLIC_KEY | default("''")}}
- CERTIFICATE_PRIVATE_KEY: |-
- {{ CERTIFICATE_PRIVATE_KEY | default("''") | indent(width=4) }}
+ CERTIFICATE_PUBLIC_KEY: "{{ CERTIFICATESIGN_PUBLIC_KEY | default('') }}"
+ CERTIFICATE_PRIVATE_KEY: "{{ CERTIFICATESIGN_PRIVATE_KEY | default('') }}"
SIGNING_KEY_TYPE: "{{ SIGNING_KEY_TYPE|default('RSA')}}"
- CACHE_CONTEXT_URLS: "{{ cache_context_urls | default('https://' + sunbird_public_storage_account_name + '.blob.core.windows.net/' + sunbird_content_azure_storage_container + '/schema/v1_context.json,https://' + sunbird_public_storage_account_name + '.blob.core.windows.net/' + sunbird_content_azure_storage_container + '/schema/sunbird_context.json,https://' + sunbird_public_storage_account_name + '.blob.core.windows.net/' + sunbird_content_azure_storage_container + '/schema/credential_template.json')}}"
\ No newline at end of file
+ CACHE_CONTEXT_URLS: "{{ cache_context_urls | default(upstream_url + '/schema/v1_context.json,' + upstream_url + '/schema/sunbird_context.json,' + upstream_url + '/schema/credential_template.json') }}"
\ No newline at end of file
diff --git a/kubernetes/helm_charts/sunbird-RC/registry/schemas/ProjectCertificate.json b/kubernetes/helm_charts/sunbird-RC/registry/schemas/ProjectCertificate.json
new file mode 100644
index 0000000000..cdfce21ac4
--- /dev/null
+++ b/kubernetes/helm_charts/sunbird-RC/registry/schemas/ProjectCertificate.json
@@ -0,0 +1,76 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema",
+ "type": "object",
+ "properties": {
+ "ProjectCertificate": {
+ "$ref": "#/definitions/ProjectCertificate"
+ }
+ },
+ "required": [
+ "ProjectCertificate"
+ ],
+ "title": "ProjectCertificate",
+ "definitions": {
+ "ProjectCertificate": {
+ "$id": "#/properties/ProjectCertificate",
+ "type": "object",
+ "title": "The ProjectCertificate Schema",
+ "required": [
+ "recipient"
+ ],
+ "properties": {
+ "status": {
+ "type": "string",
+ "enum": ["ACTIVE", "REVOKED", "DELETED"]
+ },
+ "recipient":{
+ "$id": "#/properties/recipient",
+ "$ref": "Recipient.json#/definitions/Recipient"
+ },
+ "templateUrl": {
+ "type": "string"
+ },
+ "issuer":{
+ "$id": "#/properties/issuer",
+ "$ref": "Issuer.json#/definitions/Issuer"
+ },
+ "projectName":{
+ "type": "string"
+ },
+ "projectId":{
+ "type": "string"
+ },
+ "solutionId":{
+ "type": "string"
+ },
+ "solutionName":{
+ "type": "string"
+ },
+ "programId":{
+ "type": "string"
+ },
+ "programName":{
+ "type": "string"
+ },
+ "completedDate": {
+ "type": "string"
+ }
+
+ }
+ }
+ },
+ "_osConfig": {
+ "uniqueIndexFields": [
+ ],
+ "ownershipAttributes": [],
+ "roles": [
+ "anonymous"
+ ],
+ "inviteRoles": [
+ "anonymous"
+ ],
+ "systemFields": ["osCreatedAt", "osUpdatedAt", "osCreatedBy", "osUpdatedBy"],
+ "enableLogin": false,
+ "credentialTemplate": "{{ upstream_url }}/schema/project_credential_template.json"
+ }
+}
diff --git a/kubernetes/helm_charts/sunbird-RC/registry/schemas/TrainingCertificate.json b/kubernetes/helm_charts/sunbird-RC/registry/schemas/TrainingCertificate.json
index 2906929f2d..3f5a5fed18 100644
--- a/kubernetes/helm_charts/sunbird-RC/registry/schemas/TrainingCertificate.json
+++ b/kubernetes/helm_charts/sunbird-RC/registry/schemas/TrainingCertificate.json
@@ -53,8 +53,10 @@
},
"certificateLabel":{
"type": "string"
+ },
+ "issuedOn": {
+ "type": "string"
}
-
}
}
},
@@ -69,6 +71,6 @@
],
"systemFields": ["osCreatedAt", "osUpdatedAt", "osCreatedBy", "osUpdatedBy"],
"enableLogin": false,
- "credentialTemplate": "https://{{upstream_url}}/schema/credential_template.json"
+ "credentialTemplate": "{{ upstream_url }}/schema/credential_template.json"
}
}
diff --git a/kubernetes/helm_charts/sunbird-RC/registry/templates/hpa.yaml b/kubernetes/helm_charts/sunbird-RC/registry/templates/hpa.yaml
index cb527919ea..fd75ba3280 100644
--- a/kubernetes/helm_charts/sunbird-RC/registry/templates/hpa.yaml
+++ b/kubernetes/helm_charts/sunbird-RC/registry/templates/hpa.yaml
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
-apiVersion: autoscaling/v2beta1
+apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
@@ -16,12 +16,16 @@ spec:
- type: Resource
resource:
name: cpu
- targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
- targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
-{{- end }}
+{{- end }}
\ No newline at end of file
diff --git a/kubernetes/helm_charts/sunbird-RC/registry/values.j2 b/kubernetes/helm_charts/sunbird-RC/registry/values.j2
index e7e6e6f31c..433edbfc92 100644
--- a/kubernetes/helm_charts/sunbird-RC/registry/values.j2
+++ b/kubernetes/helm_charts/sunbird-RC/registry/values.j2
@@ -44,6 +44,19 @@ rccoreenv:
connectionInfo_maxPoolSize: {{ registry_connectionInfo_maxPoolSize|default('200')}}
auditTaskExecutor_queueCapacity: {{ registry_auditTaskExecutor_queueCapacity|default('100')}}
taskExecutor_index_queueCapacity: {{ registry_taskExecutor_index_queueCapacity|default('100')}}
+ authentication_enabled: {{ registry_authentication_enabled|default('false')}}
+ async_enabled: {{ registry_async_enabled|default('true')}}
+ webhook_enabled: {{ registry_webhook_enabled|default('true')}}
+ ZOOKEEPER_CLIENT_PORT: {{ registry_zookeeper_client_port|default('2181')}}
+ ZOOKEEPER_TICK_TIME: {{ registry_zookeeper_tick_time|default('2000')}}
+ KAFKA_BROKER_ID: {{ registry_kafka_broker_id|default('1')}}
+ KAFKA_ZOOKEEPER_CONNECT: "{{groups['processing-cluster-zookeepers']|join(':2181,')}}:2181"
+ KAFKA_ADVERTISED_LISTENERS: "{{groups['processing-cluster-kafka']|join(':9092,')}}:9092"
+ kafka_bootstrap_address: "{{groups['processing-cluster-kafka']|join(':9092,')}}:9092"
+ KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: {{ registry_listener_security_protocol_map|default('INTERNAL:PLAINTEXT,OUTSIDE:PLAINTEXT')}}
+ KAFKA_INTER_BROKER_LISTENER_NAME: {{ registry_inter_broker_listener_name|default('INTERNAL')}}
+ KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: {{ registry_offsets_topic_replication_factor|default('1')}}
+ logging.level.root : {{ registry_logging_level|default('INFO')}}
{# The below should get enabled once the service has probes implemented #}
{# {{ registry_liveness_readiness | to_nice_yaml }} #}
diff --git a/kubernetes/opa/analytics/policies.rego b/kubernetes/opa/analytics/policies.rego
index a76d5d03ac..b590c6e3e8 100644
--- a/kubernetes/opa/analytics/policies.rego
+++ b/kubernetes/opa/analytics/policies.rego
@@ -57,7 +57,7 @@ submitDataExhaustRequest {
roles :=["PROGRAM_MANAGER", "PROGRAM_DESIGNER"]
super.acls_check(acls)
super.role_check(roles)
- input.parsed_body.request.dataset in ["druid-dataset"]
+ input.parsed_body.request.dataset in ["druid-dataset","program-user-exhaust"]
x_channel_id
x_authenticated_userid == super.userid
}
@@ -65,4 +65,4 @@ submitDataExhaustRequest {
submitDataExhaustRequest {
not x_authenticated_user_token
not x_authenticated_userid
-}
\ No newline at end of file
+}
diff --git a/kubernetes/opa/learner/common.rego b/kubernetes/opa/userorg/common.rego
similarity index 100%
rename from kubernetes/opa/learner/common.rego
rename to kubernetes/opa/userorg/common.rego
diff --git a/kubernetes/opa/learner/main.rego b/kubernetes/opa/userorg/main.rego
similarity index 100%
rename from kubernetes/opa/learner/main.rego
rename to kubernetes/opa/userorg/main.rego
diff --git a/kubernetes/opa/learner/policies.rego b/kubernetes/opa/userorg/policies.rego
similarity index 95%
rename from kubernetes/opa/learner/policies.rego
rename to kubernetes/opa/userorg/policies.rego
index 6bdfd97441..f74915c766 100644
--- a/kubernetes/opa/learner/policies.rego
+++ b/kubernetes/opa/userorg/policies.rego
@@ -27,7 +27,8 @@ urls_to_action_mapping := {
"/v1/user/consent/update": "updateUserConsent",
"/v2/org/preferences/read": "readTenantPreferences",
"/v2/org/preferences/create": "createTenantPreferences",
- "/v2/org/preferences/update": "updateTenantPreferences"
+ "/v2/org/preferences/update": "updateTenantPreferences",
+ "/v1/user/delete": "deleteUser"
}
# Tnc API policy updates to handle different scenarios as explained below
@@ -304,4 +305,18 @@ updateTenantPreferences {
roles := ["ORG_ADMIN"]
super.acls_check(acls)
super.role_check(roles)
-}
\ No newline at end of file
+}
+
+
+deleteUser {
+ super.public_role_check
+ input.parsed_body.request.userId == super.userid
+}
+
+# Org admin is allowed to delete any user info using the /v1/user/delete endpoint
+deleteUser {
+ acls := ["updateUser","deleteUser","updateUserV2","userUpdate"]
+ roles := ["ORG_ADMIN"]
+ super.acls_check(acls)
+ super.role_check(roles)
+}
diff --git a/kubernetes/opa/learner/policies_test.rego b/kubernetes/opa/userorg/policies_test.rego
similarity index 94%
rename from kubernetes/opa/learner/policies_test.rego
rename to kubernetes/opa/userorg/policies_test.rego
index ca2ab15ee0..cbefccdfdf 100644
--- a/kubernetes/opa/learner/policies_test.rego
+++ b/kubernetes/opa/userorg/policies_test.rego
@@ -917,4 +917,53 @@ test_update_tenant_preferences {
}
}
}
-}
\ No newline at end of file
+}
+
+
+test_delete_user_as_public_user {
+ data.main.allow.allowed
+ with data.common.current_time as current_time
+ with data.common.iss as iss
+ with input as
+ {
+ "attributes": {
+ "request": {
+ "http": {
+ "headers": {
+ "x-authenticated-user-token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6ImFjY2Vzc3YxX2tleTEifQ.eyJhdWQiOiJodHRwczovL3N1bmJpcmRlZC5vcmcvYXV0aC9yZWFsbXMvc3VuYmlyZCIsInN1YiI6ImY6NWJiNmM4N2MtN2M4OC00ZDJiLWFmN2UtNTM0YTJmZWY5NzhkOjI4YjBkMDhmLWMyZWEtNDBkMS1iY2QwLThhZTAwZmNhNjZiZSIsInJvbGVzIjpbeyJyb2xlIjoiQk9PS19DUkVBVE9SIiwic2NvcGUiOlt7Im9yZ2FuaXNhdGlvbklkIjoiMDEzNjk4Nzg3OTc1MDM2OTI4MTAifV19LHsicm9sZSI6IkNPTlRFTlRfQ1JFQVRPUiIsInNjb3BlIjpbeyJvcmdhbmlzYXRpb25JZCI6IjAxMzY5ODc4Nzk3NTAzNjkyODEwIn1dfSx7InJvbGUiOiJDT05URU5UX1JFVklFV0VSIiwic2NvcGUiOlt7Im9yZ2FuaXNhdGlvbklkIjoiMDEzNjk4Nzg3OTc1MDM2OTI4MTAifV19LHsicm9sZSI6IkNPVVJTRV9NRU5UT1IiLCJzY29wZSI6W3sib3JnYW5pc2F0aW9uSWQiOiIwMTM2OTg3ODc5NzUwMzY5MjgxMCJ9XX0seyJyb2xlIjoiUFJPR1JBTV9ERVNJR05FUiIsInNjb3BlIjpbeyJvcmdhbmlzYXRpb25JZCI6IjAxMzY5ODc4Nzk3NTAzNjkyODEwIn1dfSx7InJvbGUiOiJSRVBPUlRfVklFV0VSIiwic2NvcGUiOlt7Im9yZ2FuaXNhdGlvbklkIjoiMDEzNjk4Nzg3OTc1MDM2OTI4MTAifV19LHsicm9sZSI6Ik9SR19BRE1JTiIsInNjb3BlIjpbeyJvcmdhbmlzYXRpb25JZCI6IjAxMzY5ODc4Nzk3NTAzNjkyODEwIn0seyJvcmdhbmlzYXRpb25JZCI6IjAxNDcxOTIzNTY3ODEyMzQ1Njc4In1dfSx7InJvbGUiOiJQVUJMSUMiLCJzY29wZSI6W119XSwiaXNzIjoiaHR0cHM6Ly9zdW5iaXJkZWQub3JnL2F1dGgvcmVhbG1zL3N1bmJpcmQiLCJuYW1lIjoiZGVtbyIsInR5cCI6IkJlYXJlciIsImV4cCI6MTY0MDIzNjEwMiwiaWF0IjoxNjQwMTQ5NzA1fQ.B3-TSdYSOlawPHjFdiRjXwvRbYQ_eH_HTiLKlH7vGS0rCOJ6HQbYyWOhZ7vbZPb3virkuyfhykFcYCEHBCkHY-fwGAeU58Pmhi0dnNJkR59Fa9y_75W98JXZW68HROp62ntEAKCA1oot_U4tYi-8UNoR17Gszj9iYzFEBc6TZA4Lrom_9gqhBOYzL0ISFWSS6oG94EaaKDYHyWzCSjU2nYRB_fn-tODmnVJ12GRJAc1oM9y54o8neNYsl4T_xPyD34v-CinUJM8jzDjFqK5_O3HnAbcmXvkZjFRgfk4mF1V4s5hlsTJGyhi2JOPh90C5N-HbAY8QsPBnzgYFQU_sww"
+ },
+ "path": "/v1/user/delete"
+ }
+ }
+ },
+ "parsed_body": {
+ "request": {
+ "userId": "28b0d08f-c2ea-40d1-bcd0-8ae00fca66be"
+ }
+ }
+ }
+}
+
+test_delete_user_as_org_admin {
+ data.main.allow.allowed
+ with data.common.current_time as current_time
+ with data.common.iss as iss
+ with input as
+ {
+ "attributes": {
+ "request": {
+ "http": {
+ "headers": {
+ "x-authenticated-user-token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6ImFjY2Vzc3YxX2tleTEifQ.eyJhdWQiOiJodHRwczovL3N1bmJpcmRlZC5vcmcvYXV0aC9yZWFsbXMvc3VuYmlyZCIsInN1YiI6ImY6NWJiNmM4N2MtN2M4OC00ZDJiLWFmN2UtNTM0YTJmZWY5NzhkOjI4YjBkMDhmLWMyZWEtNDBkMS1iY2QwLThhZTAwZmNhNjZiZSIsInJvbGVzIjpbeyJyb2xlIjoiQk9PS19DUkVBVE9SIiwic2NvcGUiOlt7Im9yZ2FuaXNhdGlvbklkIjoiMDEzNjk4Nzg3OTc1MDM2OTI4MTAifV19LHsicm9sZSI6IkNPTlRFTlRfQ1JFQVRPUiIsInNjb3BlIjpbeyJvcmdhbmlzYXRpb25JZCI6IjAxMzY5ODc4Nzk3NTAzNjkyODEwIn1dfSx7InJvbGUiOiJDT05URU5UX1JFVklFV0VSIiwic2NvcGUiOlt7Im9yZ2FuaXNhdGlvbklkIjoiMDEzNjk4Nzg3OTc1MDM2OTI4MTAifV19LHsicm9sZSI6IkNPVVJTRV9NRU5UT1IiLCJzY29wZSI6W3sib3JnYW5pc2F0aW9uSWQiOiIwMTM2OTg3ODc5NzUwMzY5MjgxMCJ9XX0seyJyb2xlIjoiUFJPR1JBTV9ERVNJR05FUiIsInNjb3BlIjpbeyJvcmdhbmlzYXRpb25JZCI6IjAxMzY5ODc4Nzk3NTAzNjkyODEwIn1dfSx7InJvbGUiOiJSRVBPUlRfVklFV0VSIiwic2NvcGUiOlt7Im9yZ2FuaXNhdGlvbklkIjoiMDEzNjk4Nzg3OTc1MDM2OTI4MTAifV19LHsicm9sZSI6Ik9SR19BRE1JTiIsInNjb3BlIjpbeyJvcmdhbmlzYXRpb25JZCI6IjAxMzY5ODc4Nzk3NTAzNjkyODEwIn0seyJvcmdhbmlzYXRpb25JZCI6IjAxNDcxOTIzNTY3ODEyMzQ1Njc4In1dfSx7InJvbGUiOiJQVUJMSUMiLCJzY29wZSI6W119XSwiaXNzIjoiaHR0cHM6Ly9zdW5iaXJkZWQub3JnL2F1dGgvcmVhbG1zL3N1bmJpcmQiLCJuYW1lIjoiZGVtbyIsInR5cCI6IkJlYXJlciIsImV4cCI6MTY0MDIzNjEwMiwiaWF0IjoxNjQwMTQ5NzA1fQ.B3-TSdYSOlawPHjFdiRjXwvRbYQ_eH_HTiLKlH7vGS0rCOJ6HQbYyWOhZ7vbZPb3virkuyfhykFcYCEHBCkHY-fwGAeU58Pmhi0dnNJkR59Fa9y_75W98JXZW68HROp62ntEAKCA1oot_U4tYi-8UNoR17Gszj9iYzFEBc6TZA4Lrom_9gqhBOYzL0ISFWSS6oG94EaaKDYHyWzCSjU2nYRB_fn-tODmnVJ12GRJAc1oM9y54o8neNYsl4T_xPyD34v-CinUJM8jzDjFqK5_O3HnAbcmXvkZjFRgfk4mF1V4s5hlsTJGyhi2JOPh90C5N-HbAY8QsPBnzgYFQU_sww"
+ },
+ "path": "/v1/user/delete"
+ }
+ }
+ },
+ "parsed_body": {
+ "request": {
+ "userId": "81c28eac-bf0f-11ec-8e6f-4f07103b952d"
+ }
+ }
+ }
+}
diff --git a/kubernetes/pipelines/post-install/Jenkinsfile b/kubernetes/pipelines/post-install/Jenkinsfile
index deda3ff045..bab10fb0fa 100644
--- a/kubernetes/pipelines/post-install/Jenkinsfile
+++ b/kubernetes/pipelines/post-install/Jenkinsfile
@@ -24,7 +24,7 @@ node() {
jobName = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-1].trim().toLowerCase()
currentWs = sh(returnStdout: true, script: 'pwd').trim()
ansiblePlaybook = "$currentWs/ansible/post-install.yaml"
- ansibleExtraArgs = "--vault-password-file /var/lib/jenkins/secrets/vault-pass --tags ${params.tag} -v"
+ ansibleExtraArgs = "--vault-password-file /var/lib/jenkins/secrets/vault-pass -v"
values.put('currentWs', currentWs)
values.put('env', envDir)
values.put('module', module)
diff --git a/pipelines/backup/es-backup/Jenkinsfile b/pipelines/backup/es-backup/Jenkinsfile
index 81d46a2a2b..a941380cb9 100644
--- a/pipelines/backup/es-backup/Jenkinsfile
+++ b/pipelines/backup/es-backup/Jenkinsfile
@@ -25,7 +25,7 @@ node() {
jobName = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-1].trim()
currentWs = sh(returnStdout: true, script: 'pwd').trim()
ansiblePlaybook = "${currentWs}/ansible/es.yml"
- ansibleExtraArgs = "--tags \"es_backup\" -v --vault-password-file /var/lib/jenkins/secrets/vault-pass"
+ ansibleExtraArgs = "--tags \"es_backup\" --vault-password-file /var/lib/jenkins/secrets/vault-pass"
values.put('currentWs', currentWs)
values.put('env', envDir)
values.put('module', module)
diff --git a/pipelines/backup/jenkins-backup/Jenkinsfile b/pipelines/backup/jenkins-backup/Jenkinsfile
index 27570e2a87..787a44fe17 100644
--- a/pipelines/backup/jenkins-backup/Jenkinsfile
+++ b/pipelines/backup/jenkins-backup/Jenkinsfile
@@ -25,7 +25,7 @@ node() {
jobName = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-1].trim()
currentWs = sh(returnStdout: true, script: 'pwd').trim()
ansiblePlaybook = "${currentWs}/ansible/jenkins-backup.yml"
- ansibleExtraArgs = "-v --vault-password-file /var/lib/jenkins/secrets/vault-pass"
+ ansibleExtraArgs = "--vault-password-file /var/lib/jenkins/secrets/vault-pass"
values.put('currentWs', currentWs)
values.put('env', envDir)
values.put('module', module)
diff --git a/pipelines/backup/managed-postgres-backup/Jenkinsfile b/pipelines/backup/managed-postgres-backup/Jenkinsfile
index 66acf4baee..f27e665bd5 100644
--- a/pipelines/backup/managed-postgres-backup/Jenkinsfile
+++ b/pipelines/backup/managed-postgres-backup/Jenkinsfile
@@ -25,7 +25,7 @@ node() {
jobName = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-1].trim()
currentWs = sh(returnStdout: true, script: 'pwd').trim()
ansiblePlaybook = "${currentWs}/ansible/postgres-managed-service-backup.yml"
- ansibleExtraArgs = "--tags postgres-azure-managed-service --extra-vars \"postgres_env=${params.postgres_env}\" --vault-password-file /var/lib/jenkins/secrets/vault-pass"
+ ansibleExtraArgs = "--tags postgres-managed-service --extra-vars \"postgres_env=${params.postgres_env}\" --vault-password-file /var/lib/jenkins/secrets/vault-pass"
values.put('currentWs', currentWs)
values.put('env', envDir)
values.put('module', module)
diff --git a/pipelines/certs-templates/Jenkinsfile b/pipelines/certs-templates/Jenkinsfile
index ea4617aa53..eebc455109 100644
--- a/pipelines/certs-templates/Jenkinsfile
+++ b/pipelines/certs-templates/Jenkinsfile
@@ -10,39 +10,40 @@ node() {
stage('checkout utils repo') {
cleanWs()
checkout scm
- sh """
- git clone https://github.com/project-sunbird/sunbird-utils.git -b ${sunbird_util_branch_or_tag} cert-templates
- """
+ sh "git clone https://github.com/project-sunbird/sunbird-utils.git -b ${sunbird_util_branch_or_tag} cert-templates"
}
- ansiColor('xterm') {
- stage('inject vars') {
- values = [:]
- currentWs = sh(returnStdout: true, script: 'pwd').trim()
- envDir = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-3].trim()
- module = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-2].trim()
- jobName = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-1].trim()
-
- ansiblePlaybook = "${currentWs}/ansible/cert-templates.yml --vault-password-file /var/lib/jenkins/secrets/vault-pass "
- if (params.badgeType == "createBadge") {
- ansibleExtraArgs = " --extra-vars \"cert_location=$currentWs createBadge=True\""
- } else if (params.badgeType == "createIssuer") {
- ansibleExtraArgs = " --extra-vars \"cert_location=$currentWs createIssuer=True\""
- }else if (params.badgeType == "createPublicKey") {
- ansibleExtraArgs = " --extra-vars \"cert_location=$currentWs createPublicKey=True\""
- }else {
- ansibleExtraArgs = " --extra-vars \"cert_location=$currentWs\""
- }
-
+ ansiColor('xterm') {
+ stage('inject vars') {
+ values = [:]
+ currentWs = sh(returnStdout: true, script: 'pwd').trim()
+ envDir = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-3].trim()
+ module = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-2].trim()
+ jobName = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-1].trim()
+ ansiblePlaybook = "${currentWs}/ansible/cert-templates.yml --vault-password-file /var/lib/jenkins/secrets/vault-pass"
+ if (params.badgeType == "createBadge") {
+ ansibleExtraArgs = " --extra-vars \"cert_location=$currentWs createBadge=True\""
+ }
+ else if (params.badgeType == "createIssuer") {
+ ansibleExtraArgs = " --extra-vars \"cert_location=$currentWs createIssuer=True\""
+ }
+ else if (params.badgeType == "createPublicKey") {
+ ansibleExtraArgs = " --extra-vars \"cert_location=$currentWs createPublicKey=True\""
+ }
+ else {
+ ansibleExtraArgs = " --extra-vars \"cert_location=$currentWs\""
+ }
values.put('currentWs', currentWs)
values.put('env', envDir)
- values.put('module', module)
- values.put('jobName', jobName)
- values.put('ansiblePlaybook', ansiblePlaybook)
- values.put('ansibleExtraArgs', ansibleExtraArgs)
- println values
- ansible_playbook_run(values)
- }
+ values.put('module', module)
+ values.put('jobName', jobName)
+ values.put('ansiblePlaybook', ansiblePlaybook)
+ values.put('ansibleExtraArgs', ansibleExtraArgs)
+ println values
+ ansible_playbook_run(values)
+ currentBuild.result = 'SUCCESS'
+ currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}"
}
+ }
}
catch (err) {
currentBuild.result = "FAILURE"
diff --git a/pipelines/certs-templates/Jenkinsfile.upload b/pipelines/certs-templates/Jenkinsfile.upload
deleted file mode 100644
index 8b0ef0a6bd..0000000000
--- a/pipelines/certs-templates/Jenkinsfile.upload
+++ /dev/null
@@ -1,61 +0,0 @@
-@Library('deploy-conf') _
-node() {
- try {
- String ANSI_GREEN = "\u001B[32m"
- String ANSI_NORMAL = "\u001B[0m"
- String ANSI_BOLD = "\u001B[1m"
- String ANSI_RED = "\u001B[31m"
- String ANSI_YELLOW = "\u001B[33m"
-
- stage("upload") {
- def inputFile = input message: 'Upload file', parameters: [file(name: 'certUploadedfile')]
- new hudson.FilePath(new File("tmp/certUploadedfile")).copyFrom(inputFile)
- }
-
- stage('checkout public repo') {
- folder = new File("$WORKSPACE/.git")
- if (folder.exists())
- {
- println "Found .git folder. Clearing it.."
- sh'git clean -fxd'
- }
- checkout scm
- }
-
- ansiColor('xterm') {
- stage('deploy'){
- values = [:]
- envDir = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-3].trim()
- module = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-2].trim()
- jobName = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-1].trim()
- currentWs = sh(returnStdout: true, script: 'pwd').trim()
- ansiblePlaybook = "${currentWs}/ansible/cert-file-upload.yml"
- ansibleExtraArgs = "--extra-vars \"file_name=${params.file_name}\" --vault-password-file /var/lib/jenkins/secrets/vault-pass"
- values.put('currentWs', currentWs)
- values.put('env', envDir)
- values.put('module', module)
- values.put('jobName', jobName)
- values.put('ansiblePlaybook', ansiblePlaybook)
- values.put('ansibleExtraArgs', ansibleExtraArgs)
- println values
- ansible_playbook_run(values)
- currentBuild.result = "SUCCESS"
- currentBuild.description = "Artifact: ${values.artifact_version}, Private: ${params.private_branch}, Public: ${params.branch_or_tag}"
- }
- }
-
- stage('remove tmp file'){
- sh """
- rm -rf /tmp/certUploadedfile
- """
- }
- }
- catch (err) {
- currentBuild.result = "FAILURE"
- throw err
- }
- finally {
- slack_notify(currentBuild.result)
- email_notify()
- }
-}
diff --git a/pipelines/deploy/CEPlugins/Jenkinsfile b/pipelines/deploy/CEPlugins/Jenkinsfile
index fea1e80819..135f45be3c 100644
--- a/pipelines/deploy/CEPlugins/Jenkinsfile
+++ b/pipelines/deploy/CEPlugins/Jenkinsfile
@@ -31,11 +31,10 @@ node() {
sh """
unzip ${artifact}
unzip content-plugins.zip
- chmod a+x content-plugins/az_copy.sh
mv content-plugins ansible
"""
ansiblePlaybook = "${currentWs}/ansible/deploy-plugins.yml"
- ansibleExtraArgs = "--tags plugins --extra-vars \" source_file=${currentWs}/ansible/content-plugins az_file_path=${currentWs}/ansible/content-plugins/az_copy.sh\" --vault-password-file /var/lib/jenkins/secrets/vault-pass"
+ ansibleExtraArgs = "--tags plugins --extra-vars \"source_folder=${currentWs}/ansible/content-plugins plugins_to_delete_and_upload=${currentWs}/ansible/content-plugins/plugins_to_delete_and_upload.txt\" --vault-password-file /var/lib/jenkins/secrets/vault-pass"
values.put('ansiblePlaybook', ansiblePlaybook)
values.put('ansibleExtraArgs', ansibleExtraArgs)
println values
diff --git a/pipelines/deploy/ContentFramework/Jenkinsfile b/pipelines/deploy/ContentFramework/Jenkinsfile
index c495bce266..f85dc9b7d3 100644
--- a/pipelines/deploy/ContentFramework/Jenkinsfile
+++ b/pipelines/deploy/ContentFramework/Jenkinsfile
@@ -44,6 +44,8 @@ node() {
sh """
zip -r content-editor-artifact.zip ansible/content-editor
cd ansible/content-editor
+ nvm use 6
+ sudo npm install -g gulp
npm install
npm install promise
gulp minifyJs
diff --git a/pipelines/deploy/cassandra-deploy/Jenkinsfile b/pipelines/deploy/cassandra-deploy/Jenkinsfile
index 903c1568bd..051774137c 100644
--- a/pipelines/deploy/cassandra-deploy/Jenkinsfile
+++ b/pipelines/deploy/cassandra-deploy/Jenkinsfile
@@ -29,8 +29,12 @@ node() {
sh """
unzip ${artifact}
"""
+ sh """
+ rm -rf script_repo
+ git clone ${params.script_repo} -b ${params.script_repo_branch_or_tag} script_repo
+ """
ansiblePlaybook = "${currentWs}/ansible/cassandra-deploy.yml"
- ansibleExtraArgs = "--vault-password-file /var/lib/jenkins/secrets/vault-pass -v"
+ ansibleExtraArgs = "--extra-vars \"script_location=${currentWs}/script_repo/sunbird-cassandra-migration/cassandra-migration/src/main/resources/db/migration/cassandra/${params.cassandra_keyspace_to_migrate} cassandra_keyspace_to_migrate=${params.cassandra_keyspace_to_migrate}\" --vault-password-file /var/lib/jenkins/secrets/vault-pass -v"
values.put('ansiblePlaybook', ansiblePlaybook)
values.put('ansibleExtraArgs', ansibleExtraArgs)
println values
diff --git a/pipelines/deploy/desktop-faq/Jenkinsfile b/pipelines/deploy/desktop-faq/Jenkinsfile
index 620c5c2f5f..1b1a8d7f0d 100644
--- a/pipelines/deploy/desktop-faq/Jenkinsfile
+++ b/pipelines/deploy/desktop-faq/Jenkinsfile
@@ -25,7 +25,7 @@ node() {
jobName = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-1].trim()
currentWs = sh(returnStdout: true, script: 'pwd').trim()
ansiblePlaybook = "${currentWs}/ansible/desktop-faq-upload.yml"
- ansibleExtraArgs = "--extra-vars \" desktop_container=${params.desktop_container} src_file_path=${params.src_file_path} destination_path=${params.destination_path} env_name=$envDir\" --vault-password-file /var/lib/jenkins/secrets/vault-pass --tags ${params.tag}"
+ ansibleExtraArgs = "--extra-vars \" src_file_path=${params.src_file_path} destination_path=${params.destination_path} env_name=$envDir\" --vault-password-file /var/lib/jenkins/secrets/vault-pass --tags ${params.tag}"
values.put('currentWs', currentWs)
values.put('env', envDir)
values.put('module', module)
diff --git a/pipelines/deploy/learner/Jenkinsfile b/pipelines/deploy/learner/Jenkinsfile
deleted file mode 100644
index c012522516..0000000000
--- a/pipelines/deploy/learner/Jenkinsfile
+++ /dev/null
@@ -1,36 +0,0 @@
-@Library('deploy-conf') _
-node() {
- try {
- stage('checkout public repo') {
- folder = new File("$WORKSPACE/.git")
- if (folder.exists())
- {
- println "Found .git folder. Clearing it.."
- sh'git clean -fxd'
- }
- checkout scm
- }
-
- stage('deploy') {
- values = docker_params()
- currentWs = sh(returnStdout: true, script: 'pwd').trim()
- ansiblePlaybook = "$currentWs/ansible/deploy.yml"
- ansibleExtraArgs = "--tags \"stack-sunbird\" --extra-vars \"hub_org=$hub_org image_name=$values.image_name image_tag=$values.image_tag service_name=learner-service deploy_learner=True\" --vault-password-file /var/lib/jenkins/secrets/vault-pass"
- values.put('currentWs', currentWs)
- values.put('ansiblePlaybook', ansiblePlaybook)
- values.put('ansibleExtraArgs', ansibleExtraArgs)
- ansible_playbook_run(values)
- archiveArtifacts 'metadata.json'
- currentBuild.description = "Image: ${values.image_tag}, Private: ${params.private_branch}, Public: ${params.branch_or_tag}"
- }
- summary()
- }
- catch (err) {
- currentBuild.result = "FAILURE"
- throw err
- }
- finally {
- slack_notify(currentBuild.result)
- email_notify()
- }
-}
diff --git a/pipelines/deploy/ml-analytics-adhoc/Jenkinsfile b/pipelines/deploy/ml-analytics-adhoc/Jenkinsfile
new file mode 100644
index 0000000000..8a2f010d6b
--- /dev/null
+++ b/pipelines/deploy/ml-analytics-adhoc/Jenkinsfile
@@ -0,0 +1,47 @@
+@Library('deploy-conf') _
+node() {
+ try {
+ String ANSI_GREEN = "\u001B[32m"
+ String ANSI_NORMAL = "\u001B[0m"
+ String ANSI_BOLD = "\u001B[1m"
+ String ANSI_RED = "\u001B[31m"
+ String ANSI_YELLOW = "\u001B[33m"
+
+ stage('checkout public repo') {
+ cleanWs()
+ checkout scm
+ }
+ ansiColor('xterm') {
+
+ stage('Deploy') {
+ values = [:]
+ sh 'echo "${currentWs} is this"'
+ currentWs = sh(returnStdout: true, script: 'pwd').trim()
+ envDir = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-3].trim()
+ module = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-2].trim()
+ jobName = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-1].trim()
+ values.put('currentWs', currentWs)
+ values.put('env', envDir)
+ values.put('module', module)
+ values.put('jobName', jobName)
+ ansiblePlaybook = "${currentWs}/ansible/ml-analytics-adhoc.yaml"
+ ansibleExtraArgs = "--tags ${params.action} --vault-password-file /var/lib/jenkins/secrets/vault-pass"
+ values.put('ansiblePlaybook', ansiblePlaybook)
+ values.put('ansibleExtraArgs', ansibleExtraArgs)
+ println values
+ ansible_playbook_run(values)
+ currentBuild.result = "SUCCESS"
+ currentBuild.description = "Artifact: ${values.artifact_version}, Private: ${params.private_branch}, Public: ${params.branch_or_tag}"
+ }
+ summary()
+ }
+ }
+ catch (err) {
+ currentBuild.result = "FAILURE"
+ throw err
+ }
+ finally {
+ slack_notify(currentBuild.result)
+ email_notify()
+ }
+}
diff --git a/pipelines/deploy/org_sunbird_questionunit_quml/Jenkinsfile b/pipelines/deploy/org_sunbird_questionunit_quml/Jenkinsfile
index b8173de1a0..9d4521b956 100644
--- a/pipelines/deploy/org_sunbird_questionunit_quml/Jenkinsfile
+++ b/pipelines/deploy/org_sunbird_questionunit_quml/Jenkinsfile
@@ -34,8 +34,8 @@ node() {
chmod a+x content-plugins/az_copy.sh
mv content-plugins ansible
"""
- ansiblePlaybook = "${currentWs}/ansible/plugin.yml"
- ansibleExtraArgs = "--tags org_sunbird_questionunit_quml --extra-vars \" plugins_name=${params.plugin_name} source_file=${currentWs}/ansible/content-plugins/${params.plugin_name}\" --vault-password-file /var/lib/jenkins/secrets/vault-pass"
+ ansiblePlaybook = "${currentWs}/ansible/plugins.yml"
+ ansibleExtraArgs = "--extra-vars \" plugins_name=${params.plugin_name} source_file=${currentWs}/ansible/content-plugins/${params.plugin_name}\" --vault-password-file /var/lib/jenkins/secrets/vault-pass"
values.put('ansiblePlaybook', ansiblePlaybook)
values.put('ansibleExtraArgs', ansibleExtraArgs)
println values
diff --git a/pipelines/deploy/userorg/Jenkinsfile b/pipelines/deploy/userorg/Jenkinsfile
index 9f8b96da02..4c3e8fa95f 100644
--- a/pipelines/deploy/userorg/Jenkinsfile
+++ b/pipelines/deploy/userorg/Jenkinsfile
@@ -15,7 +15,7 @@ node() {
values = docker_params()
currentWs = sh(returnStdout: true, script: 'pwd').trim()
ansiblePlaybook = "$currentWs/ansible/deploy.yml"
- ansibleExtraArgs = "--tags \"stack-sunbird\" --extra-vars \"hub_org=$hub_org image_name=$values.image_name image_tag=$values.image_tag service_name=user-org-service deploy_user_org=True\" --vault-password-file /var/lib/jenkins/secrets/vault-pass"
+ ansibleExtraArgs = "--tags \"stack-sunbird\" --extra-vars \"hub_org=$hub_org image_name=$values.image_name image_tag=$values.image_tag service_name=userorg-service deploy_userorg=True\" --vault-password-file /var/lib/jenkins/secrets/vault-pass"
values.put('currentWs', currentWs)
values.put('ansiblePlaybook', ansiblePlaybook)
values.put('ansibleExtraArgs', ansibleExtraArgs)
diff --git a/pipelines/functional-tests/JenkinsFile b/pipelines/functional-tests/JenkinsFile
new file mode 100644
index 0000000000..145e14e533
--- /dev/null
+++ b/pipelines/functional-tests/JenkinsFile
@@ -0,0 +1,56 @@
+@Library('deploy-conf') _
+node() {
+ try {
+ String ANSI_GREEN = "\u001B[32m"
+ String ANSI_NORMAL = "\u001B[0m"
+ String ANSI_BOLD = "\u001B[1m"
+ String ANSI_RED = "\u001B[31m"
+ String ANSI_YELLOW = "\u001B[33m"
+
+ stage('checkout public repo') {
+ folder = new File("$WORKSPACE/.git")
+ if (folder.exists())
+ {
+ println "Found .git folder. Clearing it.."
+ sh'git clean -fxd'
+ }
+ checkout scm
+ }
+
+ ansiColor('xterm') {
+ values = [:]
+ currentWs = sh(returnStdout: true, script: 'pwd').trim()
+ envDir = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-3].trim()
+ module = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-2].trim()
+ jobName = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-1].trim()
+ stage('deploy artifact'){
+ sh """
+ rm -rf test_repo
+ git clone ${params.test_repo} -b ${params.test_repo_branch_or_tag} test_repo
+ """
+ ansiblePlaybook = "${currentWs}/ansible/functional-tests.yml"
+ ansibleExtraArgs = "--extra-vars \" source_name=${currentWs}/test_repo/functional-tests/${params.file_version} inquiry_api_version=${params.inquiry_api_version} file_version=${params.file_version} inquiry_host_url=${params.inquiry_host_url} inquiry_channel_id=${params.inquiry_channel_id} inquiry_framework_id=${params.inquiry_framework_id} \" --vault-password-file /var/lib/jenkins/secrets/vault-pass"
+ values.put('currentWs', currentWs)
+ values.put('env', envDir)
+ values.put('module', module)
+ values.put('jobName', jobName)
+ values.put('ansiblePlaybook', ansiblePlaybook)
+ values.put('ansibleExtraArgs', ansibleExtraArgs)
+ println values
+ ansible_playbook_run(values)
+ currentBuild.result = 'SUCCESS'
+ currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}, test_repo_branch_or_tag: ${params.test_repo_branch_or_tag}"
+ archiveArtifacts "ansible/functional-tests-files/newman/report.html"
+ }
+ }
+ summary()
+ }
+ catch (err) {
+ currentBuild.result = 'FAILURE'
+ throw err
+ }
+ finally {
+ slack_notify(currentBuild.result)
+ email_notify()
+ }
+}
\ No newline at end of file
diff --git a/pipelines/offlineinstaller/Jenkinsfile.Deploy b/pipelines/offlineinstaller/Jenkinsfile.Deploy
deleted file mode 100644
index 710cfebc48..0000000000
--- a/pipelines/offlineinstaller/Jenkinsfile.Deploy
+++ /dev/null
@@ -1,80 +0,0 @@
-@Library('deploy-conf') _
-node() {
- try {
- String ANSI_GREEN = "\u001B[32m"
- String ANSI_NORMAL = "\u001B[0m"
- String ANSI_BOLD = "\u001B[1m"
- String ANSI_RED = "\u001B[31m"
- String ANSI_YELLOW = "\u001B[33m"
-
- stage('checkout public repo') {
- cleanWs()
- checkout scm
- }
- ansiColor('xterm') {
- values = lp_dp_params()
- stage('get artifact') {
- currentWs = sh(returnStdout: true, script: 'pwd').trim()
- artifact = values.artifact_name + ":" + values.artifact_version
- values.put('currentWs', currentWs)
- values.put('artifact', artifact)
- artifact_download(values)
- }
- stage('deploy artifact') {
- sh """
- unzip ${artifact}
- mkdir offline-installer-repo
- tar -xvzf src.tar.gz -C offline-installer-repo/
- """
-
- ansiblePlaybook = "${currentWs}/ansible/offline-installer.yml"
- ansibleExtraArgs = "--extra-vars \"offline_repo_location=$currentWs offline_installer_type=${params.offline_installer_type}\" --vault-password-file /var/lib/jenkins/secrets/vault-pass"
- values.put('ansiblePlaybook', ansiblePlaybook)
- values.put('ansibleExtraArgs', ansibleExtraArgs)
- println values
- ansible_playbook_run(values)
- currentBuild.result = "SUCCESS"
- currentBuild.description = "Artifact: ${values.artifact_version}, Private: ${params.private_branch}, Public: ${params.branch_or_tag}"
- archiveArtifacts artifacts: "${artifact}", fingerprint: true, onlyIfSuccessful: true
- archiveArtifacts artifacts: 'metadata.json', onlyIfSuccessful: true
- }
-
- try {
- stage('Build Installer, create and upload it to azure') {
- dir('offline-installer-repo') {
- sh """
- bash -x build.sh
- """
- }
- ansiblePlaybook = "${currentWs}/ansible/offline-installer.yml --vault-password-file /var/lib/jenkins/secrets/vault-pass "
- ansibleExtraArgs = " --extra-vars \"offline_repo_location=$currentWs uploadInstaller=True offline_installer_type=${offline_installer_type}\""
- values.put('currentWs', currentWs)
- values.put('ansiblePlaybook', ansiblePlaybook)
- values.put('ansibleExtraArgs', ansibleExtraArgs)
- println values
- ansible_playbook_run(values)
- archiveArtifacts artifacts: '*.zip', onlyIfSuccessful: true
- archiveArtifacts artifacts: 'latest.json', onlyIfSuccessful: true
- }
- }
- catch (err) {
- ansiblePlaybook = "${currentWs}/ansible/offline-installer.yml --vault-password-file /var/lib/jenkins/secrets/vault-pass "
- ansibleExtraArgs = " --extra-vars \"offline_repo_location=$currentWs removeOfflineInstallerFolder=True offline_installer_type=${offline_installer_type}\""
- values.put('currentWs', currentWs)
- values.put('ansiblePlaybook', ansiblePlaybook)
- values.put('ansibleExtraArgs', ansibleExtraArgs)
- println values
- ansible_playbook_run(values)
- currentBuild.result = 'SUCCESS'
- }
- }
- }
- catch (err) {
- currentBuild.result = "FAILURE"
- throw err
- }
- finally {
- slack_notify(currentBuild.result)
- email_notify()
- }
-}
diff --git a/pipelines/backup/jenkins-backup-upload/Jenkinsfile b/pipelines/ops/kill-spark-jobs/Jenkinsfile
similarity index 88%
rename from pipelines/backup/jenkins-backup-upload/Jenkinsfile
rename to pipelines/ops/kill-spark-jobs/Jenkinsfile
index cd880c9390..37bad74c46 100644
--- a/pipelines/backup/jenkins-backup-upload/Jenkinsfile
+++ b/pipelines/ops/kill-spark-jobs/Jenkinsfile
@@ -24,8 +24,8 @@ node() {
envDir = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-3].trim()
module = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-2].trim()
jobName = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-1].trim()
- ansiblePlaybook = "${currentWs}/ansible/jenkins-backup.yml"
- ansibleExtraArgs = "--vault-password-file /var/lib/jenkins/secrets/vault-pass"
+ ansiblePlaybook = "${currentWs}/ansible/kill_spark_jobs.yaml"
+ ansibleExtraArgs = "-v"
values.put('currentWs', currentWs)
values.put('env', envDir)
values.put('module', module)
@@ -38,13 +38,14 @@ node() {
currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}"
}
}
- }
+ summary()
+ }
catch (err) {
- currentBuild.result = "FAILURE"
+ currentBuild.result = 'FAILURE'
throw err
- }
+ }
finally {
slack_notify(currentBuild.result)
email_notify()
}
-}
+}
diff --git a/pipelines/upload/chatbot/Jenkinsfile b/pipelines/upload/chatbot/Jenkinsfile
index 6aaf6d0c39..da0774f382 100644
--- a/pipelines/upload/chatbot/Jenkinsfile
+++ b/pipelines/upload/chatbot/Jenkinsfile
@@ -38,7 +38,7 @@ node() {
jobName = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-1].trim()
currentWs = sh(returnStdout: true, script: 'pwd').trim()
ansiblePlaybook = "${currentWs}/ansible/desktop-faq-upload.yml"
- ansibleExtraArgs = "--extra-vars \" desktop_container=${params.container_name} src_file_path=${params.source_path} destination_path=${params.destination_path}\" --vault-password-file /var/lib/jenkins/secrets/vault-pass --tags ${params.tag}"
+ ansibleExtraArgs = "--extra-vars \" src_file_path=${params.source_path} destination_path=${params.destination_path}\" --vault-password-file /var/lib/jenkins/secrets/vault-pass --tags ${params.tag}"
values.put('currentWs', currentWs)
values.put('env', envDir)
values.put('module', module)
@@ -47,12 +47,19 @@ node() {
values.put('ansibleExtraArgs', ansibleExtraArgs)
println values
ansible_playbook_run(values)
+ currentBuild.result = 'SUCCESS'
+ currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}"
}
}
summary()
}
catch (err) {
+ currentBuild.result = 'FAILURE'
throw err
+ }
+ finally {
+ slack_notify(currentBuild.result)
+ email_notify()
}
}
diff --git a/pipelines/upload/discussion-UI/Jenkinsfile b/pipelines/upload/discussion-UI/Jenkinsfile
index 4de3383796..067158e445 100644
--- a/pipelines/upload/discussion-UI/Jenkinsfile
+++ b/pipelines/upload/discussion-UI/Jenkinsfile
@@ -30,7 +30,7 @@ node() {
unzip ${artifact}
"""
ansiblePlaybook = "${currentWs}/ansible/desktop-faq-upload.yml"
- ansibleExtraArgs = "--extra-vars \" desktop_container=${params.container_name} src_file_path=${params.source_path} destination_path=${params.destination_path}\" --vault-password-file /var/lib/jenkins/secrets/vault-pass --tags ${params.tag}"
+ ansibleExtraArgs = "--extra-vars \" src_file_path=${params.source_path} destination_path=${params.destination_path}\" --vault-password-file /var/lib/jenkins/secrets/vault-pass --tags ${params.tag}"
values.put('ansiblePlaybook', ansiblePlaybook)
values.put('ansibleExtraArgs', ansibleExtraArgs)
println values
diff --git a/pipelines/upload/faqs/Jenkinsfile b/pipelines/upload/faqs/Jenkinsfile
index 00588a8dd7..f44c1b5020 100644
--- a/pipelines/upload/faqs/Jenkinsfile
+++ b/pipelines/upload/faqs/Jenkinsfile
@@ -25,7 +25,7 @@ node() {
jobName = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-1].trim()
currentWs = sh(returnStdout: true, script: 'pwd').trim()
ansiblePlaybook = "${currentWs}/ansible/uploadFAQs.yml"
- ansibleExtraArgs = "--tags ${params.tag} --extra-vars \"container_name=${params.blob_container} source_folder=${params.source_folder} destination_path=${params.blob_container}\" --vault-password-file /var/lib/jenkins/secrets/vault-pass"
+ ansibleExtraArgs = "--tags ${params.tag} --extra-vars \" source_folder=${params.source_folder}\" --vault-password-file /var/lib/jenkins/secrets/vault-pass"
values.put('currentWs', currentWs)
values.put('env', envDir)
values.put('module', module)
diff --git a/pipelines/upload/portal-csv/Jenkinsfile b/pipelines/upload/portal-csv/Jenkinsfile
index c8194f6694..502fadcdbb 100644
--- a/pipelines/upload/portal-csv/Jenkinsfile
+++ b/pipelines/upload/portal-csv/Jenkinsfile
@@ -27,7 +27,7 @@ node() {
jobName = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-1].trim()
currentWs = sh(returnStdout: true, script: 'pwd').trim()
ansiblePlaybook = "${currentWs}/ansible/desktop-faq-upload.yml"
- ansibleExtraArgs = "--extra-vars \" desktop_container=${params.container_name} src_file_path=${params.source_path} destination_path=${params.destination_path}\" --vault-password-file /var/lib/jenkins/secrets/vault-pass --tags ${params.tag}"
+ ansibleExtraArgs = "--extra-vars \" src_file_path=${params.source_path} destination_path=${params.destination_path}\" --vault-password-file /var/lib/jenkins/secrets/vault-pass --tags ${params.tag}"
values.put('currentWs', currentWs)
values.put('env', envDir)
values.put('module', module)
@@ -36,11 +36,18 @@ node() {
values.put('ansibleExtraArgs', ansibleExtraArgs)
println values
ansible_playbook_run(values)
+ currentBuild.result = 'SUCCESS'
+ currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}"
}
}
summary()
}
catch (err) {
+ currentBuild.result = 'FAILURE'
throw err
+ }
+ finally {
+ slack_notify(currentBuild.result)
+ email_notify()
}
}
diff --git a/pipelines/upload/schema/dial/Jenkinsfile b/pipelines/upload/schema/dial/Jenkinsfile
index 1a0216c740..a91956eaf1 100644
--- a/pipelines/upload/schema/dial/Jenkinsfile
+++ b/pipelines/upload/schema/dial/Jenkinsfile
@@ -29,7 +29,7 @@ node() {
git clone https://github.com/project-sunbird/sunbird-dial-service.git -b ${params.dial_branch_or_tag}
"""
ansiblePlaybook = "${currentWs}/ansible/dial_upload-schema.yml"
- ansibleExtraArgs = "--extra-vars \" source_name=${currentWs}/sunbird-dial-service/schemas \" --vault-password-file /var/lib/jenkins/secrets/vault-pass"
+ ansibleExtraArgs = "--extra-vars \" source_name=${currentWs}/sunbird-dial-service/jsonld-schema \" --vault-password-file /var/lib/jenkins/secrets/vault-pass"
values.put('currentWs', currentWs)
values.put('env', envDir)
values.put('module', module)
diff --git a/pipelines/deploy/NodebbUI/Jenkinsfile b/pipelines/upload/schema/inquiry/Jenkinsfile
similarity index 51%
rename from pipelines/deploy/NodebbUI/Jenkinsfile
rename to pipelines/upload/schema/inquiry/Jenkinsfile
index 150a57f442..f37147a563 100644
--- a/pipelines/deploy/NodebbUI/Jenkinsfile
+++ b/pipelines/upload/schema/inquiry/Jenkinsfile
@@ -18,35 +18,32 @@ node() {
}
ansiColor('xterm') {
- values = lp_dp_params()
- values.put('module', 'Core')
- stage('get artifact') {
- currentWs = sh(returnStdout: true, script: 'pwd').trim()
- artifact = values.artifact_name + ":" + values.artifact_version
- values.put('currentWs', currentWs)
- values.put('artifact', artifact)
- artifact_download(values)
- }
+ values = [:]
+ currentWs = sh(returnStdout: true, script: 'pwd').trim()
+ envDir = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-3].trim()
+ module = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-2].trim()
+ jobName = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-1].trim()
stage('deploy artifact'){
sh """
- unzip -o ${artifact} -d discussion-ui
+ rm -rf schema_repo
+ git clone ${params.schema_repo} -b ${params.schema_repo_branch_or_tag} schema_repo
"""
-
- ansiblePlaybook = "${currentWs}/ansible/nodebbui-upload.yml"
- ansibleExtraArgs = "--extra-vars \"source_name=${currentWs}/discussion-ui\" --vault-password-file /var/lib/jenkins/secrets/vault-pass"
+ ansiblePlaybook = "${currentWs}/ansible/kp_upload-schema.yml"
+ ansibleExtraArgs = "--extra-vars \" source_name=${currentWs}/schema_repo/schemas \" --vault-password-file /var/lib/jenkins/secrets/vault-pass"
+ values.put('currentWs', currentWs)
+ values.put('env', envDir)
+ values.put('module', module)
+ values.put('jobName', jobName)
values.put('ansiblePlaybook', ansiblePlaybook)
values.put('ansibleExtraArgs', ansibleExtraArgs)
println values
ansible_playbook_run(values)
-
currentBuild.result = 'SUCCESS'
- archiveArtifacts artifacts: "${artifact}", fingerprint: true, onlyIfSuccessful: true
- archiveArtifacts artifacts: 'metadata.json', onlyIfSuccessful: true
- currentBuild.description = "Artifact: ${values.artifact_version}, Private: ${params.private_branch}, Public: ${params.branch_or_tag}"
+ currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}, schema_repo_branch_or_tag: ${params.schema_repo_branch_or_tag}"
}
}
- summary()
- }
+ summary()
+ }
catch (err) {
currentBuild.result = 'FAILURE'
throw err
diff --git a/private_repo/ansible/inventory/dev/Core/common.yml b/private_repo/ansible/inventory/dev/Core/common.yml
index e54937985e..da2d8a9694 100644
--- a/private_repo/ansible/inventory/dev/Core/common.yml
+++ b/private_repo/ansible/inventory/dev/Core/common.yml
@@ -1,40 +1,103 @@
# ------------------------------------------------------------------------------------------------------------ #
# Mandatorty variables - DO NOT LEAVE ANYTHING BLANK #
# ------------------------------------------------------------------------------------------------------------ #
+cloud_service_provider: "" # Your cloud service provider name. Supported values are aws, azure, gcloud
domain_name: "" # your domain name like example.com
dockerhub: "change.docker.url" # docker hub username or url incase of private registry
# This ip should be in the kubenetes subnet range. For example, if your kube cluster is running in `10.0.0.0/24, then it can be 10.0.0.5. Make sure this ip is not allocated to any other things.`
private_ingressgateway_ip: "" # your private kubernetes load balancer ip
-# For sendgrid, if you want to change, update the following
-mail_server_host: "smtp.sendgrid.net" # Email host, can be any email provider
-mail_server_username: "apikey" # Email provider username; for sendgrid you can use "apikey"
-
-# This mail id should be verified by your provider. This is the mail id which will be used for `From Address`. For example,
-#
-# From: support@sunbird.org
-# Subject: Forgot password
-# Hi.....
-sunbird_mail_server_from_email: "support@myorg.com" # Email ID that should be as from address in mails
-# List of mail ids to whome the monitoring alerts should be sent.
-alerts_mailing_list : "devops@myorg.com" # Comma separated mail list for Alerts; eg: user1@mail.com, user2@mail.com
-# Note - You can use the same azure account for the below variables or have separate azure accounts
-sunbird_public_storage_account_name: "change.azure.storage.account.name" # Azure account name for storing public data (like contents)
-sunbird_private_storage_account_name: "change.azure.storage.account.name" # Azure account name for storing private data (like reports, telemetry data)
-sunbird_artifact_storage_account_name: "change.azure.storage.account.name" # Azure account name for storing artifacts data (like jenkins build zip files)
-sunbird_management_storage_account_name: "change.azure.storage.account.name" # Azure account name for storing backup data (like cassandra backups)
+# Cloud Service Provider Variables
+# If cloud_service_provider is AWS then update with access key as value
+# Example: cloud_public_storage_accountname: "AKSHKSJHFJDHJDSHFKSD"
+# If cloud_service_provider is gloud(GCP) then update with service account name
+# Example: cloud_public_storage_accountname: "cloudstorage-gcp-test.iam.gserviceaccount.com"
+# If cloud_service_provider is AZURE then update with stoage account name
+# Example: cloud_public_storage_accountname: "azurestotageaccount"
+cloud_public_storage_accountname: ""
+# If cloud_service_provider is AWS then update with region
+# Example: cloud_public_storage_region: us-east-1
+cloud_public_storage_region: ""
+# If cloud_service_provider is gcp then update this variable with project id
+# Example: cloud_public_storage_project: "sunbird-gcp-test"
+cloud_public_storage_project: ""
-# Define the below if you are using Azure Cloud
-# Management Storage Account
-azure_management_storage_account_name: "{{ sunbird_management_storage_account_name }}"
-# Define the below if you are using AWS Cloud
-# Management Storage Bucket
-aws_management_bucket_name: ""
+# Create object storage for each below mentioned variables and update accordingly
+# If cloud_service_provider is AWS update with bucket name
+# If cloud_service_provider is gcloud(GCP) update with bucket name
+# If cloud_service_provider is AZURE update with container name
+# Example: cloud_storage_certqr_bucketname: "certqr-storage"
+cloud_storage_certqr_bucketname: ""
+# This storage contains chatbot related data
+# Example: cloud_storage_chatbot_bucketname: "chatbot-storage"
+cloud_storage_chatbot_bucketname: ""
+# This storage contains dial related data
+# Example: cloud_storage_dial_bucketname: "dial-storage"
+cloud_storage_dial_bucketname: ""
+# This storage contains flink checkpoint data
+# Example: cloud_storage_flink_bucketname: "flink-storage"
+cloud_storage_flink_bucketname: ""
+# This storage contains portal cdn file
+# Example: cloud_storage_playercdn_bucketname: "playercdn-storage"
+cloud_storage_playercdn_bucketname: ""
+# This storage contains public data
+# Example: cloud_storage_public_bucketname: "public-storage"
+cloud_storage_public_bucketname: ""
+# This storage contains public reports data
+# Example: cloud_storage_publicreports_bucketname: "publicreports-storage"
+cloud_storage_publicreports_bucketname: ""
+# This storage contains private reports data
+# Example: cloud_storage_privatereports_bucketname: "privatereports-storage"
+cloud_storage_privatereports_bucketname: ""
+# This storage contains samiksha data
+# Example: cloud_storage_samiksha_bucketname: "samiksha-storage"
+cloud_storage_samiksha_bucketname: ""
+# This storage contains schema data
+# Example: cloud_storage_schema_bucketname: "schema-storage"
+cloud_storage_schema_bucketname: ""
+# This storage contains sourcing related data
+# Example: cloud_storage_sourcing_bucketname: "sourcing-storage"
+cloud_storage_sourcing_bucketname: ""
+# This storage contains desktop app data
+# Example: cloud_storage_offlineinstaller_bucketname: "offlineinstaller-storage"
+cloud_storage_offlineinstaller_bucketname: ""
+# This storage contains public schemas, contents
+# Example: cloud_storage_content_bucketname: "content-storage"
+cloud_storage_content_bucketname: ""
+# This storage contains telemetry data
+# Example: cloud_storage_telemetry_bucketname: "telemetry-storage"
+cloud_storage_telemetry_bucketname: ""
+# This storage contains T & C data
+# Example: cloud_storage_termsandcondtions_bucketname: "termsandconditions-storage"
+cloud_storage_termsandcondtions_bucketname: ""
+# Example: cloud_storage_user_bucketname: "user-storage"
+cloud_storage_user_bucketname: ""
+# This storage contains crashlogs
+# Example: cloud_storage_desktopappcrashlogs_bucketname: "desktopappcrashlogs-storage"
+cloud_storage_desktopappcrashlogs_bucketname: ""
+# This storage contains labels data
+# Example: cloud_storage_label_bucketname: "label-storage"
+cloud_storage_label_bucketname: ""
+# Example: cloud_storage_certservice_bucketname: "certservice-storage"
+cloud_storage_certservice_bucketname: ""
+# This storage contains UCI services data
+# Example: cloud_storage_uci_bucketname: "uci-storage"
+cloud_storage_uci_bucketname: ""
+# This storage contains artifacts data
+# Example: cloud_storage_artifacts_bucketname: "artifact-storage"
+cloud_storage_artifacts_bucketname: ""
+# This storage contains backups data
+# Example: cloud_storage_management_bucketname: "management-storage"
+cloud_storage_management_bucketname: ""
-# Define the below if you are using Google Cloud
-# Management Storage Bucket
-gcs_management_bucket_name: ""
+# Uncomment the variable based on your cloud provider (as a default we have kept Azure variable uncommented)
+# GCP
+# cloud_storage_url: https://storage.googleapis.com
+# AWS
+# cloud_storage_url: "https://s3.{{ cloud_public_storage_region }}.amazonaws.com"
+# Azure
+cloud_storage_url: "https://{{ cloud_public_storage_accountname }}.blob.core.windows.net"
# ------------------------------------------------------------------------------------------------------------ #
# Cloud / Infra Specific values - Check these and update accordingly
@@ -52,6 +115,8 @@ nginx_private_ingress_annotations:
# ------------------------------------------------------------------------------------------------------------ #
+graylog_trusted_proxies: "1.2.3.4/21" # This should be the kubernetes nodes subnet CIDR range
+
## Optional
learningservice_ip: "10.0.1.5" # Load balancer IP or server ip
@@ -61,7 +126,6 @@ proto: https # http or https, preferably https
sunbird_default_channel: sunbird # default sunbird channel name
environment_id: "10000003" # A 8 digit number for example like 1000000, should be same as defined in KP common.yml
-sunbird_content_azure_storage_container: contents # Azure container name for storing public data (like contents), should be same as azure_public_container defined in KP common.yml
# This sms sender id should be verified by your provider. This is the sender id which will be used for `From Address`. For example,
#
# From: SBSMS
@@ -93,6 +157,19 @@ certs_badge_root_org_id: "" # Root org ID for which the certs will be c
certs_badge_issuer_name: "" # The issuer of the certs name e.g value is "Government of karnataka"
certs_badge_issuer_url: "" # Issuer organisation official URL e.g value is "https://testdomain.in"
+# For sendgrid, if you want to change, update the following
+mail_server_host: "smtp.sendgrid.net" # Email host, can be any email provider
+mail_server_username: "apikey" # Email provider username; for sendgrid you can use "apikey"
+
+# This mail id should be verified by your provider. This is the mail id which will be used for `From Address`. For example,
+#
+# From: support@sunbird.org
+# Subject: Forgot password
+# Hi.....
+sunbird_mail_server_from_email: "support@myorg.com" # Email ID that should be as from address in mails
+# List of mail ids to whome the monitoring alerts should be sent.
+alerts_mailing_list : "devops@myorg.com" # Comma separated mail list for Alerts; eg: user1@mail.com, user2@mail.com
+
# ------------------------------------------------------------------------------------------------------------ #
# Sensible defaults which you need not change - But if you would like to change, you are free to do so
env_name: "{{ env }}"
@@ -107,14 +184,6 @@ postgres:
db_admin_user: postgres
db_admin_password: "{{core_vault_postgres_password}}"
-# Azure account related vars
-sunbird_azure_public_storage_account_name: "{{ sunbird_public_storage_account_name }}"
-upstream_url: "{{sunbird_azure_public_storage_account_name}}.blob.core.windows.net/{{sunbird_content_azure_storage_container}}" # Proxy url to get /assets/public
-plugin_upstream_url: "{{upstream_url}}"
-azure_plugin_storage_account_name: "{{sunbird_azure_public_storage_account_name}}"
-azure_plugin_storage_account_key: "{{sunbird_public_storage_account_key}}"
-plugin_container_name: "{{sunbird_content_azure_storage_container}}"
-kp_schema_base_path: "{{proto}}://{{sunbird_public_storage_account_name}}.blob.core.windows.net/{{plugin_container_name}}/schemas/local"
keycloak_api_management_user_email: "admin@sunbird.org"
sunbird_installation_email: "admin@sunbird.org"
@@ -122,7 +191,6 @@ sunbird_installation_email: "admin@sunbird.org"
# Other vars
cert_service_container_name: e-credentials # Conatiner name for cert service to store cert templates
cert_service_cloud_storage_type: azure # Changes this if you use other clouds like aws, gcp
-artifacts_container: artifacts # Azure blob container name to save built artifacts, default it can be arti
dataexhaust_super_admin_channel: sunbird
dedup_redis_host: "{{ groups['dp-redis'][0] }}" # for router service
namespace: "{{ env }}" # required for bot and router, these helm charts should be moved to devops repo
@@ -136,9 +204,51 @@ monitor_alerts_mail_from_email: "{{ sunbird_mail_server_from_email }}"
ekstep_s3_env: "" # This variable is not used and leave the value as empty
freshDesk_token: ""
+
+# provide the s3 compatible endpoint
+# for AWS
+# cloud_public_storage_endpoint: "https://s3.{{ cloud_public_storage_region }}.amazonaws.com"
+# for OCI
+#cloud_public_storage_endpoint: "https://.compat.objectstorage.{{cloud_public_storage_region}}.oraclecloud.com"
+cloud_public_storage_endpoint: ""
+
+# Update below vars if seperate object storage is required
+cloud_private_storage_accountname: "{{ cloud_public_storage_accountname }}"
+cloud_private_storage_endpoint: "{{ cloud_public_storage_endpoint }}"
+cloud_private_storage_region: "{{ cloud_public_storage_region }}"
+cloud_private_storage_project: "{{ cloud_public_storage_project }}"
+
+cloud_management_storage_accountname: "{{ cloud_public_storage_accountname }}"
+cloud_management_storage_endpoint: "{{ cloud_public_storage_endpoint }}"
+cloud_management_storage_region: "{{ cloud_public_storage_region }}"
+cloud_management_storage_project: "{{ cloud_public_storage_project }}"
+
+cloud_artifact_storage_accountname: "{{ cloud_public_storage_accountname }}"
+cloud_artifact_storage_endpoint: "{{ cloud_public_storage_endpoint }}"
+cloud_artifact_storage_region: "{{ cloud_public_storage_region }}"
+cloud_artifact_storage_project: "{{ cloud_public_storage_project }}"
+
+## Enable below vars to upload database backups in seperate buckets
+# cloud_storage_cassandrabackup_bucketname: ""
+# cloud_storage_dpcassandrabackup_bucketname: ""
+# cloud_storage_dppostgresbackup_bucketname: ""
+# cloud_storage_dpredisbackup_bucketname: ""
+# cloud_storage_esbackup_bucketname: ""
+# cloud_storage_influxdbbackup_bucketname: ""
+# cloud_storage_jenkinsbackup_bucketname: ""
+# cloud_storage_mongobackup_bucketname: ""
+# cloud_storage_neo4jbackup_bucketname: ""
+# cloud_storage_redisbackup_bucketname: ""
+
+# Building block vars
+cloud_storage_base_url: "{{ cloud_storage_url }}"
+cloudstorage_base_path: "{{ cloud_storage_url }}"
+valid_cloudstorage_base_urls: '["{{cloud_storage_url}}"]'
+cloudstorage_relative_path_prefix: "CONTENT_STORAGE_BASE_PATH"
+
# Provide the admin-api consumer access to all API's - The public repo restricts this for security reasons
-# If you dont want to key to have access to all API's, please remove the variables kong_all_consumer_groups and kong_consumers or edit the groups to have a smaller subset
-kong_all_consumer_groups:
+# If you dont want the admin api key to have access to all API's, please remove the variables "all_apis_access_group" and "kong_consumers" or edit the groups to have a smaller subset
+all_apis_access_group:
- announcementAccess
- anonymousAppAccess
- anonymousCertificateAccess
@@ -260,8 +370,43 @@ kong_all_consumer_groups:
kong_consumers:
- username: api-admin
+ groups: "{{ all_apis_access_group }}"
+ state: present
+ - username: mobile_admin
+ groups: "{{ mobile_admin_groups }}"
+ print_credentials: true
+ state: present
+ - username: mobile_app
+ groups: "{{ mobile_app_groups }}"
+ state: present
+ - username: mobile_device
+ groups: "{{ mobile_device_groups }}"
+ state: present
+ - username: mobile_devicev2
+ groups: "{{ mobile_device_groups }}"
+ state: present
+ - username: portal_anonymous_register
+ groups: "{{ portal_anonymous_register }}"
+ state: present
+ - username: portal_loggedin_register
+ groups: "{{ portal_loggedin_register }}"
+ state: present
+ - username: portal_anonymous
+ groups: "{{ anonymous_user_groups }}"
+ state: present
+ - username: portal_loggedin
+ groups: "{{ kong_all_consumer_groups }}"
+ state: present
+ - username: portal_anonymous_fallback_token
+ groups: "{{ anonymous_user_groups }}"
+ state: present
+ - username: portal_loggedin_fallback_token
groups: "{{ kong_all_consumer_groups }}"
state: present
+ - username: adminutil_learner_api_key
+ groups: "{{ userAccess }}"
+ state: present
+
## Grafana oauth
@@ -289,3 +434,66 @@ grafana_login_whitelisted_emails: |-
# Add below var to monitor report-cassandra server
report_cassandra_server_count: "{{ groups['report-cassandra'] | length }}"
+
+# graylog variables
+graylog_open_to_public: true # allows you to access via domain/graylog
+send_logs_to_graylog: true # filebeat agents will send logs to graylog instead of ES
+graylog_root_timezone: "Asia/Kolkata" # timezone
+graylog_elasticsearch_discovery_enabled: "true" # auto discover ES nodes and version
+graylog_allow_leading_wildcard_searches: "true" # allows wild card searching
+graylog_allow_highlighting: "true" # shows yellow highlights on matches
+graylog_transport_email_enabled: "true" # enables emails to be sent via graylog
+graylog_transport_email_hostname: "{{ mail_server_host }}" # email server host name
+graylog_transport_email_auth_username: "apikey" # sendgrid / email service api key
+graylog_transport_email_from_email: "{{ sunbird_mail_server_from_email }}" # from email address
+graylog_transport_email_use_ssl: "false" # cannot use both tls and ssl, so disabling ssl as tls is enabled by default
+
+# Opa and Adminutils
+# Prefixes will match the starting part of the files under keys dirctory in inventory
+adminutil__device_keyprefix: "mobile_devicev2_key" # private key prefix for mobile apps
+adminutil__device_keystart: 1 # starting number of the key file
+adminutil__device_keycount: 10 # ending number of the key file
+adminutil__access_keyprefix: "accessv1_key" # private key prefix for user access tokens
+adminutil__access_keystart: 1 # starting number of the key file
+adminutil__access_keycount: 10 # ending number of the key file
+adminutil__desktop_keyprefix: "desktop_devicev2_key" # private key prefix for desktop apps
+adminutil__desktop_keystart: 1 # starting number of the key file
+adminutil__desktop_keycount: 10 # ending number of the key file
+adminutil__portal_anonymous_keyprefix: "portal_anonymous_key" # private key prefix for portal anonymous sessions
+adminutil__portal_anonymous_keystart: 1 # starting number of the key file
+adminutil__portal_anonymous_keycount: 10 # ending number of the key file
+adminutil__portal_loggedin_keyprefix: "portal_loggedin_key" # private key prefix for portal loggedin sessions
+adminutil__portal_loggedin_keystart: 1 # starting number of the key file
+adminutil__portal_loggedin_keycount: 10 # ending number of the key file
+adminutil_embed_role: 'true' # embeds user roles in access tokens
+
+# Kong and Adminutils
+# Consumer names will match the starting part of the files under keys dirctory in inventory
+kong_mobile_v2_consumer: "mobile_devicev2" # kong consumer name for mobile apps
+kong_desktop_v2_consumer: "desktop_devicev2" # kong consumer name for desktop apps
+kong_portal_anonymous_consumer: "portal_anonymous" # kong consumer name for portal anonymous sessions
+kong_portal_loggedin_consumer: "portal_loggedin" # kong consumer name for portal loggedin sessions
+kong_desktop_device_consumer_names_for_opa: '["desktop_devicev2", "desktop_device"]' # ops checks will be skipped for desktop consumers
+
+# Portal sessions
+sunbird_kong_device_register: 'true' # enables refersh token api call after login
+sunbird_kong_device_register_anonymous: 'true' # enables anonymous sessions
+sunbird_session_store_type: redis # uses redis for session data instead of cassandra
+portal_redis_connection_string: "redis://:@{{ sunbird_redis_host }}:6379/3" # Uses KP redis and DB number 3 to store session data
+
+#### ML Analytics Service #####
+ml_analytics_cname_url: # Reference value - https://obj.dev.sunbirded.org/samiksha/
+
+### Variables added as part of 6.0.0 release - https://github.com/Sunbird-Ed/ml-analytics-service/tree/release-6.0.0/release-notes/6.0.0.md
+ml_analytics_client_id : project-sunbird-dev-client # Keycloak client group
+ml_analytics_username : reportAdmin1 # Username of a user which has roles of "PROGRAM_MANAGER", "PROGRAM_DESIGNER", "REPORT_ADMIN", "REPORT_VIEWER"
+ml_analytics_createdBy : fb85a044-d9eb-479b-a55a-faf1bfaea14d # Unique system generated user UUID which is the same user as above
+ml_container: samiksha
+
+# provide the s3 compatible endpoint
+# for AWS
+# cloud_private_storage_account_endpoint: "https://s3.{{ cloud_public_storage_region }}.amazonaws.com"
+# for OCI
+#cloud_private_storage_account_endpoint: "https://.compat.objectstorage.{{cloud_public_storage_region}}.oraclecloud.com"
+cloud_private_storage_account_endpoint: "{{ cloud_public_storage_endpoint }}" # Leave Blank for Azure
+bb_name: "" #Leave Blank
diff --git a/private_repo/ansible/inventory/dev/Core/hosts b/private_repo/ansible/inventory/dev/Core/hosts
index 58fb6eeb95..9b5aeef7a9 100644
--- a/private_repo/ansible/inventory/dev/Core/hosts
+++ b/private_repo/ansible/inventory/dev/Core/hosts
@@ -9,12 +9,6 @@ ansible_ssh_private_key_file=/var/lib/jenkins/secrets/deployer_ssh_key
[keycloak:children]
keycloak-1
-[log-es-1]
-10.0.1.9 es_instance_name=log-es-1 node_name=log-es-1 es_etc_node_master=true es_etc_node_data=true
-
-[log-es:children]
-log-es-1
-
[mongo_master]
10.0.1.8 mongodb_master=True
@@ -124,6 +118,18 @@ localhost
yarn-master
yarn-slave
+[graylog-1]
+10.0.1.9 mongodb_master=True graylog_is_master=True
+
+[graylog:children]
+graylog-1
+
+[log-es-1]
+10.0.1.9 es_instance_name=log-es-1 node_name=log-es-1 es_etc_node_master=true es_etc_node_data=true
+
+[log-es:children]
+log-es-1
+
[node-exporter]
# Add all your VM IP's under this group
10.1.4.4
@@ -137,6 +143,7 @@ node-exporter
[core:children]
es
+graylog
log-es
cassandra
postgresql-master
diff --git a/private_repo/ansible/inventory/dev/Core/secrets.yml b/private_repo/ansible/inventory/dev/Core/secrets.yml
index 798aceb7e0..c7f3e5b7e4 100644
--- a/private_repo/ansible/inventory/dev/Core/secrets.yml
+++ b/private_repo/ansible/inventory/dev/Core/secrets.yml
@@ -8,31 +8,38 @@ core_vault_docker_registry_url: "change.docker.url" # for docker hub "https
core_vault_docker_registry_user: "change.docker.username"
core_vault_docker_registry_password: "change.docker.password"
-# Run the below command in shell
-# date +'%Y-%m-%dT%H:%m:%SZ' -d '+1 year'
-# sas_token=?`az storage account generate-sas --account-name "{{ azure_plugin_storage_account_name }}" --account-key "{{ azure_plugin_storage_account_key }}" --expiry $sas_expire_time --https-only --permissions acdlpruw --resource-types sco --services bfqt | xargs`
-# generate a sas for the blob for entire storage accout with write and read access
-artifact_azure_account_sas: "change.azure.storage.account.sas" # SAS token value generated from above command
-sunbird_artifact_storage_account_sas: "change.azure.storage.account.sas" # SAS token value generated from above command
-sunbird_public_storage_account_sas: "change.azure.storage.account.sas" # SAS token value generated from above command
-sunbird_public_storage_account_key: "change.azure.storage.account.key"
-sunbird_private_storage_account_key: "change.azure.storage.account.key"
-sunbird_management_storage_account_key: "change.azure.storage.account.key"
-
-# Define the below if you are using Azure Cloud
-# Management Storage Account
-azure_management_storage_account_key: "{{ sunbird_management_storage_account_key }}"
-
-# Define the below if you are using AWS Cloud
-# Management Storage Bucket
-aws_management_bucket_user_access_key: ""
-aws_management_bucket_user_secret_key: ""
-
-
-# Define the below if you are using Google Cloud
-# Management Storage Bucket
-gcs_management_bucket_service_account: |
-
+# Cloud Service Provider Secret Variables
+# If cloud_service_provider is aws then update secret access key
+# Example: cloud_management_storage_secret: "xkxjfjsdsfjdfjdhgjfhgjdhfgjdgjdfgdjgjdgdjhgjhd"
+
+# If cloud_service_provider is gcp then update with service account json file content
+# Example: cloud_management_storage_secret: |
+# {
+# "type": "service_account",
+# "project_id": "your-project-id",
+# "private_key_id": "...",
+# "private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n",
+# "client_email": "service-account-for-your-repository@your-project-id.iam.gserviceaccount.com",
+# "client_id": "...",
+# "auth_uri": "https://accounts.google.com/o/oauth2/auth",
+# "token_uri": "https://accounts.google.com/o/oauth2/token",
+# "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
+# "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/your-bucket@your-project-id.iam.gserviceaccount.com"
+# }
+
+# If cloud_service_provider is azure then update with storage account key
+# Example: cloud_management_storage_secret: "BfoOQwA6UFI7URwkFjkjdjsdhjhjhjsdhjfM//lsTbXDmHOFR5GqEwAwzyrKXOUDywojCpOC/g=="
+cloud_management_storage_secret: ""
+
+# If cloud_service_provider is aws then update secret access key
+# Example: cloud_public_storage_secret: "xkxjfjsdsfjdfjdhgjfhgjdhfgjdgjdfgdjgjdgdjhgjhd"
+
+# If cloud_service_provider is gcp then update with private-key which is in service account json file
+# Example: cloud_public_storage_secret: "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"
+
+# If cloud_service_provider is azure then update with storage account key
+# Example: cloud_public_storage_secret: "BfoOQwA6UFI7URwkFjkjdjsdhjhjhjsdhjfM//lsTbXDmHOFR5GqEwAwzyrKXOUDywojCpOC/g=="
+cloud_public_storage_secret: ""
# The proxy key and crt values should be padded to the right by a couple of spaces
# Example:
@@ -110,7 +117,7 @@ mongodb_keyfile_content: |
# 4. Again vist Admin Panel post restart -> Click on Plugins => Write API
# 5. Under MASTER TOKENS section, click on create token button, It will generate a token.
discussionsmw_nodebb_authorization_token: # Read the comment above to generate this key
-core_vault_mail_server_password: "" # Email server password
+core_vault_mail_server_password: "" # Email server password / api token
# Oauth keys
core_vault_sunbird_google_oauth_clientId_portal: # Google oauth client id
@@ -119,6 +126,20 @@ core_vault_sunbird_google_captcha_site_key_portal: # Google recaptch site
google_captcha_private_key: # Google recaptch private key
learning_content_drive_apiKey: # Google drive api key
+### Graylog ###
+graylog_password_secret: "" # Random secret. Generate using the command: pwgen -s 96 1
+graylog_root_password_sha2: "" # Random secret. Generate using the command: echo -n "Enter Password: " && head -1 .compat.objectstorage.{{cloud_public_storage_region}}.oraclecloud.com"
+
+cloud_public_storage_endpoint: ""
+
+# Update below vars if seperate object storage is required
+cloud_private_storage_accountname: "{{ cloud_public_storage_accountname }}"
+cloud_private_storage_endpoint: "{{ cloud_public_storage_endpoint }}"
+cloud_private_storage_region: "{{ cloud_public_storage_region }}"
+cloud_private_storage_project: "{{ cloud_public_storage_project }}"
+
+cloud_management_storage_accountname: "{{ cloud_public_storage_accountname }}"
+cloud_management_storage_endpoint: "{{ cloud_public_storage_endpoint }}"
+cloud_management_storage_region: "{{ cloud_public_storage_region }}"
+cloud_management_storage_project: "{{ cloud_public_storage_project }}"
+
+cloud_artifact_storage_accountname: "{{ cloud_public_storage_accountname }}"
+cloud_artifact_storage_endpoint: "{{ cloud_public_storage_endpoint }}"
+cloud_artifact_storage_region: "{{ cloud_public_storage_region }}"
+cloud_artifact_storage_project: "{{ cloud_public_storage_project }}"
+
+## Enable below vars to upload database backups in seperate buckets
+# cloud_storage_cassandrabackup_bucketname: ""
+# cloud_storage_dpcassandrabackup_bucketname: ""
+# cloud_storage_dppostgresbackup_bucketname: ""
+# cloud_storage_dpredisbackup_bucketname: ""
+# cloud_storage_esbackup_bucketname: ""
+# cloud_storage_influxdbbackup_bucketname: ""
+# cloud_storage_jenkinsbackup_bucketname: ""
+# cloud_storage_mongobackup_bucketname: ""
+# cloud_storage_neo4jbackup_bucketname: ""
+# cloud_storage_redisbackup_bucketname: ""
+
+# Building block vars
+cloud_storage_base_url: "{{ cloud_storage_url }}"
+cloudstorage_base_path: "{{ cloud_storage_url }}"
+valid_cloudstorage_base_urls: '["{{ cloud_storage_url }}"]'
+cloudstorage_relative_path_prefix: "CONTENT_STORAGE_BASE_PATH"
+
# The below sets the kafka topics retention time to 1 day, if you use the defaults from the public repo, it will be 7 days
# If you want to retain the topics for 7 days, remove the below sections completely
# Ensure you have atleast 1 TB of disk to retain data for 7 days
@@ -168,3 +293,6 @@ processing_kafka_overriden_topics:
- name: ml.observation.druid
retention_time: 86400000
replication_factor: 1
+
+# graylog
+send_logs_to_graylog: true # filebeat agents will send logs to graylog instead of ES
\ No newline at end of file
diff --git a/private_repo/ansible/inventory/dev/DataPipeline/hosts b/private_repo/ansible/inventory/dev/DataPipeline/hosts
index 2ecf51e3bc..199392ce08 100644
--- a/private_repo/ansible/inventory/dev/DataPipeline/hosts
+++ b/private_repo/ansible/inventory/dev/DataPipeline/hosts
@@ -19,6 +19,12 @@ core-es-1
[log-es:children]
log-es-1
+[graylog-1]
+10.0.1.9
+
+[graylog:children]
+graylog-1
+
################# KP ##########################
[learning]
10.0.1.5
diff --git a/private_repo/ansible/inventory/dev/DataPipeline/secrets.yml b/private_repo/ansible/inventory/dev/DataPipeline/secrets.yml
index d18a6d1e0e..2b711a27a2 100644
--- a/private_repo/ansible/inventory/dev/DataPipeline/secrets.yml
+++ b/private_repo/ansible/inventory/dev/DataPipeline/secrets.yml
@@ -4,13 +4,38 @@ dp_vault_pgdb_password: "change.postgres.password" # postgres p
dp_vault_pgdb_admin_password: "change.postgres.password" # postgres password for admin
dp_vault_druid_postgress_pass: "change.postgres.password" # postgres password for druid db
-# Azure storage account credentials - Note if you are using a single account, you can set the same key for the belows
-sunbird_management_storage_account_key: "change.azure.storage.account.key"
-sunbird_artifact_storage_account_key: "change.azure.storage.account.key"
-sunbird_private_storage_account_key: "change.azure.storage.account.key"
-sunbird_public_storage_account_key: "change.azure.storage.account.key"
-sunbird_druid_storage_account_key: "change.azure.storage.account.key"
-sunbird_artifact_storage_account_sas: "change.azure.storage.account.sas" # this must be the sas token from Core directory that your generated
+# Cloud Service Provider Secret Variables
+# If cloud_service_provider is aws then update secret access key
+# Example: cloud_management_storage_secret: "xkxjfjsdsfjdfjdhgjfhgjdhfgjdgjdfgdjgjdgdjhgjhd"
+
+# If cloud_service_provider is gcp then update with service account json file content
+# Example: cloud_management_storage_secret: |
+# {
+# "type": "service_account",
+# "project_id": "your-project-id",
+# "private_key_id": "...",
+# "private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n",
+# "client_email": "service-account-for-your-repository@your-project-id.iam.gserviceaccount.com",
+# "client_id": "...",
+# "auth_uri": "https://accounts.google.com/o/oauth2/auth",
+# "token_uri": "https://accounts.google.com/o/oauth2/token",
+# "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
+# "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/your-bucket@your-project-id.iam.gserviceaccount.com"
+# }
+
+# If cloud_service_provider is azure then update with storage account key
+# Example: cloud_management_storage_secret: "BfoOQwA6UFI7URwkFjkjdjsdhjhjhjsdhjfM//lsTbXDmHOFR5GqEwAwzyrKXOUDywojCpOC/g=="
+cloud_management_storage_secret: ""
+
+# If cloud_service_provider is aws then update secret access key
+# Example: cloud_public_storage_secret: "xkxjfjsdsfjdfjdhgjfhgjdhfgjdgjdfgdjgjdgdjhgjhd"
+
+# If cloud_service_provider is gcp then update with private-key which is in service account json file
+# Example: cloud_public_storage_secret: "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"
+
+# If cloud_service_provider is azure then update with storage account key
+# Example: cloud_public_storage_secret: "BfoOQwA6UFI7URwkFjkjdjsdhjhjhjsdhjfM//lsTbXDmHOFR5GqEwAwzyrKXOUDywojCpOC/g=="
+cloud_public_storage_secret: ""
core_vault_docker_registry_url: "change.docker.url" # for docker hub use https://index.docker.io/v1
core_vault_docker_registry_user: "change.docker.user"
@@ -25,4 +50,7 @@ dp_vault_data_exhaust_token: # slack api token
# ------------------------------------------------------------------------------------------------------------ #
# Sensible defaults which you need not change - But if you would like to change, you are free to do so
-dp_vault_artifacts_container: artifacts
+
+# update if seperate object storage is used
+cloud_private_storage_secret: "{{ cloud_public_storage_secret }}"
+cloud_artifact_storage_secret: "{{ cloud_public_storage_secret }}"
\ No newline at end of file
diff --git a/private_repo/ansible/inventory/dev/KnowledgePlatform/common.yml b/private_repo/ansible/inventory/dev/KnowledgePlatform/common.yml
index 24f0320615..d87400b63c 100644
--- a/private_repo/ansible/inventory/dev/KnowledgePlatform/common.yml
+++ b/private_repo/ansible/inventory/dev/KnowledgePlatform/common.yml
@@ -1,22 +1,111 @@
# ------------------------------------------------------------------------------------------------------------ #
# Mandatorty variables - DO NOT LEAVE ANYTHING BLANK #
# docker hub details
+cloud_service_provider: "" # Your cloud service provider name. Supported values are aws, azure, gcloud
dockerhub: "change.docker.url" # docker hub username or url incase of private registry
private_ingressgateway_ip: "" # your private kubernetes load balancer ip
domain_name: "" # your domain name like example.com
-# Note - You can use the same azure account for the below variables or have separate azure accounts
-sunbird_public_storage_account_name: "change.azure.storage.account.name" # Azure account name for storing public data (like contents)
-sunbird_private_storage_account_name: "change.azure.storage.account.name" # Azure account name for storing private data (like reports, telemetry data)
-sunbird_artifact_storage_account_name: "change.azure.storage.account.name" # Azure account name for storing artifacts data (like jenkins build zip files)
-sunbird_management_storage_account_name: "change.azure.storage.account.name" # Azure account name for storing backup data (like cassandra backups)
+
+# Cloud Service Provider Variables
+# If cloud_service_provider is AWS then update with access key as value
+# Example: cloud_public_storage_accountname: "AKSHKSJHFJDHJDSHFKSD"
+# If cloud_service_provider is gloud(GCP) then update with service account name
+# Example: cloud_public_storage_accountname: "cloudstorage-gcp-test.iam.gserviceaccount.com"
+# If cloud_service_provider is AZURE then update with stoage account name
+# Example: cloud_public_storage_accountname: "azurestotageaccount"
+cloud_public_storage_accountname: ""
+# If cloud_service_provider is AWS then update with region
+# Example: cloud_public_storage_region: us-east-1
+cloud_public_storage_region: ""
+# If cloud_service_provider is gcp then update this variable with project id
+# Example: cloud_public_storage_project: "sunbird-gcp-test"
+cloud_public_storage_project: ""
+# If cloud_service_provider is oci update this variable with namespace
+# Example: cloud_public_storage_namespace: "apsjfhudfjs"
+cloud_public_storage_namespace: ""
+
+
+# Create object storage for each below mentioned variables and update accordingly
+# If cloud_service_provider is AWS update with bucket name
+# If cloud_service_provider is gcloud(GCP) update with bucket name
+# If cloud_service_provider is AZURE update with container name
+# Example: cloud_storage_certqr_bucketname: "certqr-storage"
+cloud_storage_certqr_bucketname: ""
+# This storage contains chatbot related data
+# Example: cloud_storage_chatbot_bucketname: "chatbot-storage"
+cloud_storage_chatbot_bucketname: ""
+# This storage contains dial related data
+# Example: cloud_storage_dial_bucketname: "dial-storage"
+cloud_storage_dial_bucketname: ""
+# This storage contains flink checkpoint data
+# Example: cloud_storage_flink_bucketname: "flink-storage"
+cloud_storage_flink_bucketname: ""
+# This storage contains portal cdn file
+# Example: cloud_storage_playercdn_bucketname: "playercdn-storage"
+cloud_storage_playercdn_bucketname: ""
+# This storage contains public data
+# Example: cloud_storage_public_bucketname: "public-storage"
+cloud_storage_public_bucketname: ""
+# This storage contains public reports data
+# Example: cloud_storage_publicreports_bucketname: "publicreports-storage"
+cloud_storage_publicreports_bucketname: ""
+# This storage contains private reports data
+# Example: cloud_storage_privatereports_bucketname: "privatereports-storage"
+cloud_storage_privatereports_bucketname: ""
+# This storage contains samiksha data
+# Example: cloud_storage_samiksha_bucketname: "samiksha-storage"
+cloud_storage_samiksha_bucketname: ""
+# This storage contains schema data
+# Example: cloud_storage_schema_bucketname: "schema-storage"
+cloud_storage_schema_bucketname: ""
+# This storage contains sourcing related data
+# Example: cloud_storage_sourcing_bucketname: "sourcing-storage"
+cloud_storage_sourcing_bucketname: ""
+# This storage contains desktop app data
+# Example: cloud_storage_offlineinstaller_bucketname: "offlineinstaller-storage"
+cloud_storage_offlineinstaller_bucketname: ""
+# This storage contains public schemas, contents
+# Example: cloud_storage_content_bucketname: "content-storage"
+cloud_storage_content_bucketname: ""
+# This storage contains telemetry data
+# Example: cloud_storage_telemetry_bucketname: "telemetry-storage"
+cloud_storage_telemetry_bucketname: ""
+# This storage contains T & C data
+# Example: cloud_storage_termsandcondtions_bucketname: "termsandconditions-storage"
+cloud_storage_termsandcondtions_bucketname: ""
+# Example: cloud_storage_user_bucketname: "user-storage"
+cloud_storage_user_bucketname: ""
+# This storage contains crashlogs
+# Example: cloud_storage_desktopappcrashlogs_bucketname: "desktopappcrashlogs-storage"
+cloud_storage_desktopappcrashlogs_bucketname: ""
+# This storage contains labels data
+# Example: cloud_storage_label_bucketname: "label-storage"
+cloud_storage_label_bucketname: ""
+# Example: cloud_storage_certservice_bucketname: "certservice-storage"
+cloud_storage_certservice_bucketname: ""
+# This storage contains UCI services data
+# Example: cloud_storage_uci_bucketname: "uci-storage"
+cloud_storage_uci_bucketname: ""
+# This storage contains artifacts data
+# Example: cloud_storage_artifacts_bucketname: "artifact-storage"
+cloud_storage_artifacts_bucketname: ""
+# This storage contains backups data
+# Example: cloud_storage_management_bucketname: "management-storage"
+cloud_storage_management_bucketname: ""
+
+# Uncomment the variable based on your cloud provider (as a default we have kept Azure variable uncommented)
+# GCP
+# cloud_storage_url: https://storage.googleapis.com
+# AWS
+# cloud_storage_url: "https://s3.{{ cloud_public_storage_region }}.amazonaws.com"
+# Azure
+cloud_storage_url: "https://{{ cloud_public_storage_accountname }}.blob.core.windows.net"
# Optional
env: dev # some name like dev, preprod etc
proto: https # http or https, preferably https
-azure_public_container: contents # Azure container name for storing public data (like contents)
-
environment_id: "10000003" # A 8 digit number for example like 1000000,
# Important: same as the one in core/common.yaml
neo4j_zip: neo4j-community-3.3.9-unix.tar.gz # Neo4j file name present in the azure blob artifacts folder (only neo4j 3.4 and below is supported)
@@ -27,8 +116,107 @@ neo4j_enterprise: false # Set this to true if you use
# ------------------------------------------------------------------------------------------------------------ #
# Sensible defaults which you need not change - But if you would like to change, you are free to do so
ekstep_domain_name: "{{ proto }}://{{ domain_name }}"
-artifacts_container: artifacts
-plugin_container_name: "{{azure_public_container}}"
-kp_schema_base_path: "{{proto}}://{{sunbird_public_storage_account_name}}.blob.core.windows.net/{{plugin_container_name}}/schemas/local"
+
+# SB-31155 - This should be deprecated in future in favour of plugin_storage
+plugin_container_name: "{{ cloud_storage_content_bucketname }}"
+
+kp_schema_base_path: "{{ cloud_storage_url }}/{{ cloud_storage_content_bucketname }}/schemas/local"
imagepullsecrets: "{{env}}registrysecret" # kubernetes imagePullSecrets
kubeconfig_path: /var/lib/jenkins/secrets/k8s.yaml # kubeconfig file path on jenkins
+
+# provide the s3 compatible endpoint
+# for AWS
+# cloud_public_storage_endpoint: "https://s3.{{ cloud_public_storage_region }}.amazonaws.com"
+# for OCI
+#cloud_public_storage_endpoint: "https://.compat.objectstorage.{{cloud_public_storage_region}}.oraclecloud.com"
+
+cloud_public_storage_endpoint: ""
+
+# Update below vars if seperate object storage is required
+cloud_private_storage_accountname: "{{ cloud_public_storage_accountname }}"
+cloud_private_storage_endpoint: "{{ cloud_public_storage_endpoint }}"
+cloud_private_storage_region: "{{ cloud_public_storage_region }}"
+cloud_private_storage_project: "{{ cloud_public_storage_project }}"
+cloud_private_storage_namespace: "{{ cloud_public_storage_namespace }}"
+
+cloud_management_storage_accountname: "{{ cloud_public_storage_accountname }}"
+cloud_management_storage_endpoint: "{{ cloud_public_storage_endpoint }}"
+cloud_management_storage_region: "{{ cloud_public_storage_region }}"
+cloud_management_storage_project: "{{ cloud_public_storage_project }}"
+cloud_management_storage_namespace: "{{ cloud_public_storage_namespace }}"
+
+cloud_artifact_storage_accountname: "{{ cloud_public_storage_accountname }}"
+cloud_artifact_storage_endpoint: "{{ cloud_public_storage_endpoint }}"
+cloud_artifact_storage_region: "{{ cloud_public_storage_region }}"
+cloud_artifact_storage_project: "{{ cloud_public_storage_project }}"
+cloud_artifact_storage_namespace: "{{ cloud_public_storage_namespace }}"
+
+## Enable below vars to upload database backups in seperate buckets
+# cloud_storage_cassandrabackup_bucketname: ""
+# cloud_storage_dpcassandrabackup_bucketname: ""
+# cloud_storage_dppostgresbackup_bucketname: ""
+# cloud_storage_dpredisbackup_bucketname: ""
+# cloud_storage_esbackup_bucketname: ""
+# cloud_storage_influxdbbackup_bucketname: ""
+# cloud_storage_jenkinsbackup_bucketname: ""
+# cloud_storage_mongobackup_bucketname: ""
+# cloud_storage_neo4jbackup_bucketname: ""
+# cloud_storage_redisbackup_bucketname: ""
+
+# Building block vars
+cloud_storage_base_url: "{{ cloud_storage_url }}"
+cloudstorage_base_path: "{{ cloud_storage_url }}"
+valid_cloudstorage_base_urls: '["{{ cloud_storage_url }}"]'
+cloudstorage_relative_path_prefix: "CONTENT_STORAGE_BASE_PATH"
+cloud_storage_pathstyle_access: false
+
+### Lern BB - Adding Lern specific vars here. In future if we want to move it to seperate folder this can be used as the starting point
+
+# Mandatorty variables - DO NOT LEAVE ANYTHING BLANK #
+is_multidc_enabled: false # Change this to true if you plan to use cassandra multi data center setup
+#Assessment Aggregator Content Read API
+content_read_api_host: "" # Your domain host ex: http://test.com
+content_read_api_endpoint: "" # ex: api/content/v1/read/
+
+# For sendgrid, if you want to change, update the following
+sunbird_mail_server_host: "smtp.sendgrid.net" # Email host, can be any email provider
+sunbird_mail_server_username: "apikey" # Email provider username; for sendgrid you can use "apikey"
+sunbird_mail_server_port: ## Email server SMTP port ex: 587
+# This mail id should be verified by your provider. This is the mail id which will be used for `From Address`. For example,
+# From: support@sunbird.org
+# Subject: Forgot password
+# Hi.....
+sunbird_mail_server_from_email: "support@myorg.com" # Email ID that should be as from address in mails
+
+# Optional variables - Can be left blank if you dont plan to use the intended features
+# data exhaust alerts
+data_exhaust_webhook_url: "slack.com" # Slack webhook url
+data_exhaust_Channel: "slack.com" # Slack channel for data products alerts
+
+# This sms sender id should be verified by your provider. This is the sender id which will be used for `From Address`. For example,
+# From: SBSMS
+# Hi.....
+# This is optional.
+# If not set, you won't get sms OTPs. You'll get it in mail though.
+sunbird_notification_msg_default_sender: # SMS from Address; exact 6 char like SBSUNB
+
+
+# Sensible defaults which you need not change - But if you would like to change, you are free to do so
+data_exhaust_name: "lern-datapipeline-monitoring" # Slack notification name
+postgres:
+ db_url: "{{ groups['postgres'][0] }}"
+ db_username: analytics
+ db_name: analytics
+ db_table_name: "{{env}}_consumer_channel_mapping"
+ db_port: 5432
+ db_admin_user: postgres
+ db_admin_password: "{{dp_vault_pgdb_admin_password}}"
+
+# graylog
+send_logs_to_graylog: true # filebeat agents will send logs to graylog instead of ES
+
+druid_storage_type: "" # Your cloud service provider name. Supported values are aws, azure, gcloud
+
+# Optional variables - Can be left blank
+cloud_storage_report_verfication_bucketname: ""
+dp_storage_endpoint_config: ""
diff --git a/private_repo/ansible/inventory/dev/KnowledgePlatform/hosts b/private_repo/ansible/inventory/dev/KnowledgePlatform/hosts
index e735ac4c01..62df0088f2 100644
--- a/private_repo/ansible/inventory/dev/KnowledgePlatform/hosts
+++ b/private_repo/ansible/inventory/dev/KnowledgePlatform/hosts
@@ -17,7 +17,7 @@ learning1
redis1
[dial1]
-18.3.1.5
+10.0.1.5
[dial:children]
dial1
@@ -62,6 +62,12 @@ core-es-1
[log-es:children]
log-es-1
+[graylog-1]
+10.0.1.9
+
+[graylog:children]
+graylog-1
+
[composite-search-cluster]
10.1.4.5
@@ -106,3 +112,33 @@ lp
[mlworkbench]
0.0.0.0
+
+### Lern BB - Adding Lern specific vars here. In future if we want to move it to seperate folder this can be used as the starting point
+[spark]
+10.0.2.4
+
+[learning]
+10.0.2.7
+
+[raw-coordinator]
+10.0.2.7
+
+[raw-overlord]
+10.0.2.7
+
+[raw-broker]
+10.0.2.7
+
+[postgres]
+10.0.2.5
+
+[report-cassandra:children]
+core-cassandra
+
+[lp-cassandra]
+10.0.2.5
+
+[redis]
+10.0.2.2
+
+### Lern BB
diff --git a/private_repo/ansible/inventory/dev/KnowledgePlatform/secrets.yml b/private_repo/ansible/inventory/dev/KnowledgePlatform/secrets.yml
index fb1af29c0a..0a03bfdb43 100644
--- a/private_repo/ansible/inventory/dev/KnowledgePlatform/secrets.yml
+++ b/private_repo/ansible/inventory/dev/KnowledgePlatform/secrets.yml
@@ -1,11 +1,38 @@
# ------------------------------------------------------------------------------------------------------------ #
# Mandatorty variables - DO NOT LEAVE ANYTHING BLANK #
-# Azure storage account credentials - Note if you are using a single account, you can set the same key for the belows
-sunbird_private_storage_account_key: "change.azure.storage.account.key"
-sunbird_public_storage_account_key: "change.azure.storage.account.key"
-sunbird_management_storage_account_key: "change.azure.storage.account.key"
-sunbird_artifact_storage_account_key: "change.azure.storage.account.key"
-sunbird_artifact_storage_account_sas: "change.azure.storage.account.sas"
+
+# Cloud Service Provider Secret Variables
+# If cloud_service_provider is aws then update secret access key
+# Example: cloud_management_storage_secret: "xkxjfjsdsfjdfjdhgjfhgjdhfgjdgjdfgdjgjdgdjhgjhd"
+
+# If cloud_service_provider is gcp then update with service account json file content
+# Example: cloud_management_storage_secret: |
+# {
+# "type": "service_account",
+# "project_id": "your-project-id",
+# "private_key_id": "...",
+# "private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n",
+# "client_email": "service-account-for-your-repository@your-project-id.iam.gserviceaccount.com",
+# "client_id": "...",
+# "auth_uri": "https://accounts.google.com/o/oauth2/auth",
+# "token_uri": "https://accounts.google.com/o/oauth2/token",
+# "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
+# "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/your-bucket@your-project-id.iam.gserviceaccount.com"
+# }
+
+# If cloud_service_provider is azure then update with storage account key
+# Example: cloud_management_storage_secret: "BfoOQwA6UFI7URwkFjkjdjsdhjhjhjsdhjfM//lsTbXDmHOFR5GqEwAwzyrKXOUDywojCpOC/g=="
+cloud_management_storage_secret: ""
+
+# If cloud_service_provider is aws then update secret access key
+# Example: cloud_public_storage_secret: "xkxjfjsdsfjdfjdhgjfhgjdhfgjdgjdfgdjgjdgdjhgjhd"
+
+# If cloud_service_provider is gcp then update with private-key which is in service account json file
+# Example: cloud_public_storage_secret: "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"
+
+# If cloud_service_provider is azure then update with storage account key
+# Example: cloud_public_storage_secret: "BfoOQwA6UFI7URwkFjkjdjsdhjhjhjsdhjfM//lsTbXDmHOFR5GqEwAwzyrKXOUDywojCpOC/g=="
+cloud_public_storage_secret: ""
core_vault_docker_registry_url: "change.docker.url" # for docker hub use https://index.docker.io/v1
core_vault_docker_registry_user: "change.docker.user"
@@ -18,3 +45,32 @@ lp_vault_youtube_api_key: # youtube api token if you want
# ------------------------------------------------------------------------------------------------------------ #
# Sensible defaults which you need not change - But if you would like to change, you are free to do so
lp_vault_graph_passport_key: "long-secret-to-calm-entropy-gods"
+
+# update if seperate object storage is used
+# If cloud_service_provider is aws then update secret access key
+# Example: cloud_public_storage_secret: "xkxjfjsdsfjdfjdhgjfhgjdhfgjdgjdfgdjgjdgdjhgjhd"
+
+# If cloud_service_provider is gcp then update with private-key which is in service account json file
+# Example: cloud_public_storage_secret: "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"
+
+# If cloud_service_provider is azure then update with storage account key
+# Example: cloud_public_storage_secret: "BfoOQwA6UFI7URwkFjkjdjsdhjhjhjsdhjfM//lsTbXDmHOFR5GqEwAwzyrKXOUDywojCpOC/g=="
+cloud_private_storage_secret: "{{ cloud_public_storage_secret }}"
+cloud_artifact_storage_secret: "{{ cloud_public_storage_secret }}"
+
+### Lern BB - Adding Lern specific vars here. In future if we want to move it to seperate folder this can be used as the starting point
+
+# Mandatorty variables - DO NOT LEAVE ANYTHING BLANK #
+core_vault_sunbird_api_auth_token: # copy value form variable core_vault_sunbird_api_auth_token from core/secrets.yml
+dp_vault_pgdb_password: "change.postgres.password" # postgres password for analytics db
+dp_vault_druid_postgress_pass: "change.postgres.password" # postgres password for druid db
+dp_vault_pgdb_admin_password: "change.postgres.password" # postgres password for admin
+core_vault_sunbird_encryption_key: "" # copy value from variable core_vault_sunbird_encryption_key from core secrets.yml
+
+# Optional variables - Can be left blank if you dont plan to use the intended features
+core_vault_sunbird_fcm_account_key: "" # Firebase Cloud Messaging API Key
+sunbird_msg_91_auth: "" # API key for sending OTP SMS
+sunbird_mail_server_password: "" # Email server password
+dp_vault_data_exhaust_token: "" # slack api token
+
+### Lern BB
diff --git a/private_repo/ansible/inventory/dev/Kubernetes/keys b/private_repo/ansible/inventory/dev/Kubernetes/keys
new file mode 120000
index 0000000000..442dd3e557
--- /dev/null
+++ b/private_repo/ansible/inventory/dev/Kubernetes/keys
@@ -0,0 +1 @@
+../Core/keys/
\ No newline at end of file
diff --git a/private_repo/ansible/inventory/dev/Lern/common.yml b/private_repo/ansible/inventory/dev/Lern/common.yml
new file mode 120000
index 0000000000..1168242b3a
--- /dev/null
+++ b/private_repo/ansible/inventory/dev/Lern/common.yml
@@ -0,0 +1 @@
+../KnowledgePlatform/common.yml
\ No newline at end of file
diff --git a/private_repo/ansible/inventory/dev/Lern/hosts b/private_repo/ansible/inventory/dev/Lern/hosts
new file mode 120000
index 0000000000..d54fc1e61a
--- /dev/null
+++ b/private_repo/ansible/inventory/dev/Lern/hosts
@@ -0,0 +1 @@
+../KnowledgePlatform/hosts
\ No newline at end of file
diff --git a/private_repo/ansible/inventory/dev/Lern/secrets.yml b/private_repo/ansible/inventory/dev/Lern/secrets.yml
new file mode 120000
index 0000000000..1a0f3f3224
--- /dev/null
+++ b/private_repo/ansible/inventory/dev/Lern/secrets.yml
@@ -0,0 +1 @@
+../KnowledgePlatform/secrets.yml
\ No newline at end of file
diff --git a/private_repo/ansible/inventory/dev/Sunbird-RC/common.yml b/private_repo/ansible/inventory/dev/Sunbird-RC/common.yml
new file mode 120000
index 0000000000..1465b46671
--- /dev/null
+++ b/private_repo/ansible/inventory/dev/Sunbird-RC/common.yml
@@ -0,0 +1 @@
+../Core/common.yml
\ No newline at end of file
diff --git a/private_repo/ansible/inventory/dev/Sunbird-RC/hosts b/private_repo/ansible/inventory/dev/Sunbird-RC/hosts
new file mode 120000
index 0000000000..fb74d690d4
--- /dev/null
+++ b/private_repo/ansible/inventory/dev/Sunbird-RC/hosts
@@ -0,0 +1 @@
+../Core/hosts
\ No newline at end of file
diff --git a/private_repo/ansible/inventory/dev/Sunbird-RC/keys b/private_repo/ansible/inventory/dev/Sunbird-RC/keys
new file mode 120000
index 0000000000..442dd3e557
--- /dev/null
+++ b/private_repo/ansible/inventory/dev/Sunbird-RC/keys
@@ -0,0 +1 @@
+../Core/keys/
\ No newline at end of file
diff --git a/private_repo/ansible/inventory/dev/Sunbird-RC/secrets.yml b/private_repo/ansible/inventory/dev/Sunbird-RC/secrets.yml
new file mode 120000
index 0000000000..6bbc077aab
--- /dev/null
+++ b/private_repo/ansible/inventory/dev/Sunbird-RC/secrets.yml
@@ -0,0 +1 @@
+../Core/secrets.yml
\ No newline at end of file
diff --git a/private_repo/ansible/inventory/dev/UCI/common.yml b/private_repo/ansible/inventory/dev/UCI/common.yml
new file mode 120000
index 0000000000..1465b46671
--- /dev/null
+++ b/private_repo/ansible/inventory/dev/UCI/common.yml
@@ -0,0 +1 @@
+../Core/common.yml
\ No newline at end of file
diff --git a/private_repo/ansible/inventory/dev/UCI/hosts b/private_repo/ansible/inventory/dev/UCI/hosts
new file mode 120000
index 0000000000..fb74d690d4
--- /dev/null
+++ b/private_repo/ansible/inventory/dev/UCI/hosts
@@ -0,0 +1 @@
+../Core/hosts
\ No newline at end of file
diff --git a/private_repo/ansible/inventory/dev/UCI/keys b/private_repo/ansible/inventory/dev/UCI/keys
new file mode 120000
index 0000000000..442dd3e557
--- /dev/null
+++ b/private_repo/ansible/inventory/dev/UCI/keys
@@ -0,0 +1 @@
+../Core/keys/
\ No newline at end of file
diff --git a/private_repo/ansible/inventory/dev/UCI/secrets.yml b/private_repo/ansible/inventory/dev/UCI/secrets.yml
new file mode 120000
index 0000000000..6bbc077aab
--- /dev/null
+++ b/private_repo/ansible/inventory/dev/UCI/secrets.yml
@@ -0,0 +1 @@
+../Core/secrets.yml
\ No newline at end of file
diff --git a/private_repo/ansible/inventory/dev/key-generate.sh b/private_repo/ansible/inventory/dev/key-generate.sh
new file mode 100755
index 0000000000..e0514c6dd6
--- /dev/null
+++ b/private_repo/ansible/inventory/dev/key-generate.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+set -euo pipefail
+read -s -p 'Enter the ansible vault password (redacted): ' vault_pass
+echo
+read -s -p 'Re-enter the ansible vault password (redacted): ' confirm_vault_pass
+echo
+if [[ $vault_pass == $confirm_vault_pass ]]
+then
+ echo "$vault_pass" > temp_vault_pass
+ mkdir -p Core/keys && cd Core/keys
+ for i in {1..10}; do openssl genrsa -out mobile_devicev2_c$i 2048 && openssl pkcs8 -topk8 -inform PEM -in mobile_devicev2_c$i -out mobile_devicev2_key$i -nocrypt && rm -rf mobile_devicev2_c$i ; done
+ for i in {1..10}; do openssl genrsa -out accessv1_c$i 2048 && openssl pkcs8 -topk8 -inform PEM -in accessv1_c$i -out accessv1_key$i -nocrypt && rm -rf accessv1_c$i ; done
+ for i in {1..10}; do openssl genrsa -out desktop_devicev2_c$i 2048 && openssl pkcs8 -topk8 -inform PEM -in desktop_devicev2_c$i -out desktop_devicev2_key$i -nocrypt && rm -rf desktop_devicev2_c$i ; done
+ for i in {1..10}; do openssl genrsa -out portal_anonymous_c$i 2048 && openssl pkcs8 -topk8 -inform PEM -in portal_anonymous_c$i -out portal_anonymous_key$i -nocrypt && rm -rf portal_anonymous_c$i ; done
+ for i in {1..10}; do openssl genrsa -out portal_loggedin_c$i 2048 && openssl pkcs8 -topk8 -inform PEM -in portal_loggedin_c$i -out portal_loggedin_key$i -nocrypt && rm -rf portal_loggedin_c$i ; done
+ while read -r line; do ansible-vault encrypt $line --vault-password-file ../../temp_vault_pass; done <<< $(ls)
+ cd ../.. && rm temp_vault_pass
+ echo "OK"
+else
+ echo "Vault passwords dont match"
+fi
\ No newline at end of file
diff --git a/private_repo/ansible/inventory/dev/managed-learn/common.yml b/private_repo/ansible/inventory/dev/managed-learn/common.yml
new file mode 120000
index 0000000000..1465b46671
--- /dev/null
+++ b/private_repo/ansible/inventory/dev/managed-learn/common.yml
@@ -0,0 +1 @@
+../Core/common.yml
\ No newline at end of file
diff --git a/private_repo/ansible/inventory/dev/managed-learn/hosts b/private_repo/ansible/inventory/dev/managed-learn/hosts
new file mode 120000
index 0000000000..fb74d690d4
--- /dev/null
+++ b/private_repo/ansible/inventory/dev/managed-learn/hosts
@@ -0,0 +1 @@
+../Core/hosts
\ No newline at end of file
diff --git a/private_repo/ansible/inventory/dev/managed-learn/keys b/private_repo/ansible/inventory/dev/managed-learn/keys
new file mode 120000
index 0000000000..442dd3e557
--- /dev/null
+++ b/private_repo/ansible/inventory/dev/managed-learn/keys
@@ -0,0 +1 @@
+../Core/keys/
\ No newline at end of file
diff --git a/private_repo/ansible/inventory/dev/managed-learn/secrets.yml b/private_repo/ansible/inventory/dev/managed-learn/secrets.yml
new file mode 120000
index 0000000000..6bbc077aab
--- /dev/null
+++ b/private_repo/ansible/inventory/dev/managed-learn/secrets.yml
@@ -0,0 +1 @@
+../Core/secrets.yml
\ No newline at end of file
diff --git a/utils/sunbird-RC/schema/credential_template.json b/utils/sunbird-RC/schema/credential_template.json
index 8f467986cc..123457817b 100644
--- a/utils/sunbird-RC/schema/credential_template.json
+++ b/utils/sunbird-RC/schema/credential_template.json
@@ -1,14 +1,20 @@
{
"@context": [
- "https://{{upstream_url}}/schema/v1_context.json",
- "https://{{upstream_url}}/schema/sunbird_context.json"
+ "https://www.w3.org/2018/credentials/v1",
+ "{{ upstream_url }}/schema/v1_context.json",
+ "{{ upstream_url }}/schema/sunbird_context.json"
],
"type": [
"VerifiableCredential"
],
{% raw %}
"id":"did:sunbird:{{osid}}",
+ {{#if issuedOn}}
+ "issuanceDate": "{{issuedOn}}",
+ {{/if}}
+ {{#unless issuedOn}}
"issuanceDate": "{{osCreatedAt}}",
+ {{/unless}}
"credentialSubject": {
"type":"{{certificateLabel}}",
"recipientName": "{{recipient.name}}",
diff --git a/utils/sunbird-RC/schema/project_credential_template.json b/utils/sunbird-RC/schema/project_credential_template.json
new file mode 100644
index 0000000000..6041f69d41
--- /dev/null
+++ b/utils/sunbird-RC/schema/project_credential_template.json
@@ -0,0 +1,30 @@
+{
+ "@context": [
+ "https://www.w3.org/2018/credentials/v1",
+ "{{ upstream_url }}/schema/project_v1_context.json",
+ "{{ upstream_url }}/schema/project_sunbird_context.json"
+ ],
+ "type": [
+ "VerifiableCredential"
+ ],
+{% raw %}
+ "id":"did:sunbird:{{osid}}",
+ "issuanceDate": "{{completedDate}}",
+ "credentialSubject": {
+ "type":"project",
+ "recipientName": "{{recipient.name}}",
+ "projectName": "{{projectName}}",
+ "projectId": "{{projectId}}",
+ "solutionId": "{{solutionId}}",
+ "solutionName": "{{solutionName}}"
+ },
+ "issuer":{
+ "id":"https://raw.githubusercontent.com/project-sunbird/sunbird-devops/release-4.8.0/kubernetes/helm_charts/sunbird-RC/registry/templates/READ.md#Issuer",
+ "type":[
+ "Issuer"
+ ],
+ "name":"{{issuer.name}}",
+ "publicKey":["{{issuer.kid}}"]
+ }
+ }
+{% endraw %}
diff --git a/utils/sunbird-RC/schema/project_sunbird_context.json b/utils/sunbird-RC/schema/project_sunbird_context.json
new file mode 100644
index 0000000000..bbc31a4010
--- /dev/null
+++ b/utils/sunbird-RC/schema/project_sunbird_context.json
@@ -0,0 +1,91 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+ "ProjectCertificate": {
+ "@id": "https://raw.githubusercontent.com/project-sunbird/sunbird-devops/release-4.8.0/kubernetes/helm_charts/sunbird-RC/registry/templates/READ.md#ProjectCertificate",
+ "@context": {
+ "id": "@id",
+ "@version": 1.1,
+ "@protected": true,
+ "ProjectCertificate": "schema:Text"
+ }
+ },
+ "projectName":{
+ "@id":"https://raw.githubusercontent.com/project-sunbird/sunbird-devops/release-4.8.0/kubernetes/helm_charts/sunbird-RC/registry/templates/READ.md#projectName",
+ "@context": {
+ "name":"schema:Text"
+ }
+ },
+ "projectId":{
+ "@id":"https://raw.githubusercontent.com/project-sunbird/sunbird-devops/release-4.8.0/kubernetes/helm_charts/sunbird-RC/registry/templates/READ.md#projectId",
+ "@context": {
+ "name":"schema:Text"
+ }
+ },
+ "solutionName":{
+ "@id":"https://raw.githubusercontent.com/project-sunbird/sunbird-devops/release-4.8.0/kubernetes/helm_charts/sunbird-RC/registry/templates/READ.md#solutionName",
+ "@context": {
+ "name":"schema:Text"
+ }
+ },
+ "solutionId":{
+ "@id":"https://raw.githubusercontent.com/project-sunbird/sunbird-devops/release-4.8.0/kubernetes/helm_charts/sunbird-RC/registry/templates/READ.md#solutionId",
+ "@context": {
+ "name":"schema:Text"
+ }
+ },
+ "recipientName":{
+ "@id":"https://raw.githubusercontent.com/project-sunbird/sunbird-devops/release-4.8.0/kubernetes/helm_charts/sunbird-RC/registry/templates/READ.md#recipientName",
+ "@context": {
+ "name":"schema:Text"
+ }
+ },
+ "name":{
+ "@id":"https://raw.githubusercontent.com/project-sunbird/sunbird-devops/release-4.8.0/kubernetes/helm_charts/sunbird-RC/registry/templates/READ.md#name",
+ "@context": {
+ "name":"schema:Text"
+ }
+ },
+ "publicKey":{
+ "@id":"https://raw.githubusercontent.com/project-sunbird/sunbird-devops/release-4.8.0/kubernetes/helm_charts/sunbird-RC/registry/templates/READ.md#publicKey",
+ "@context": {
+ "name":"schema:Text"
+ }
+ },
+ "url":{
+ "@id":"https://raw.githubusercontent.com/project-sunbird/sunbird-devops/release-4.8.0/kubernetes/helm_charts/sunbird-RC/registry/templates/READ.md#url",
+ "@context": {
+ "name":"schema:Text"
+ }
+ },
+ "designation":{
+ "@id":"https://raw.githubusercontent.com/project-sunbird/sunbird-devops/release-4.8.0/kubernetes/helm_charts/sunbird-RC/registry/templates/READ.md#designation",
+ "@context": {
+ "name":"schema:Text"
+ }
+ },
+ "image":{
+ "@id":"https://raw.githubusercontent.com/project-sunbird/sunbird-devops/release-4.8.0/kubernetes/helm_charts/sunbird-RC/registry/templates/READ.md#image",
+ "@context": {
+ "name":"schema:Text"
+ }
+ },
+ "identity":{
+ "@id":"https://raw.githubusercontent.com/project-sunbird/sunbird-devops/release-4.8.0/kubernetes/helm_charts/sunbird-RC/registry/templates/READ.md#identity",
+ "@context": {
+ "name":"schema:Text"
+ }
+ },
+ "signatory": {
+ "@id":"https://github.com/sunbird-specs/vc-specs#signatory",
+ "@container": "@list"
+ },
+ "templateUrl": {
+ "@id": "https://raw.githubusercontent.com/project-sunbird/sunbird-devops/release-4.8.0/kubernetes/helm_charts/sunbird-RC/registry/templates/READ.md#templateUrl",
+ "@context": {
+ "name": "schema:Text"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/utils/sunbird-RC/schema/project_v1_context.json b/utils/sunbird-RC/schema/project_v1_context.json
new file mode 100644
index 0000000000..d028ec2a3f
--- /dev/null
+++ b/utils/sunbird-RC/schema/project_v1_context.json
@@ -0,0 +1,237 @@
+{
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+
+ "id": "@id",
+ "type": "@type",
+
+ "VerifiableCredential": {
+ "@id": "https://www.w3.org/2018/credentials#VerifiableCredential",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+
+ "id": "@id",
+ "type": "@type",
+
+ "cred": "https://www.w3.org/2018/credentials#",
+ "sec": "https://w3id.org/security#",
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
+
+ "credentialSchema": {
+ "@id": "cred:credentialSchema",
+ "@type": "@id",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+
+ "id": "@id",
+ "type": "@type",
+
+ "cred": "https://www.w3.org/2018/credentials#",
+
+ "JsonSchemaValidator2018": "cred:JsonSchemaValidator2018"
+ }
+ },
+ "credentialStatus": {"@id": "cred:credentialStatus", "@type": "@id"},
+ "credentialSubject": {"@id": "cred:credentialSubject", "@type": "@id"},
+ "evidence": {"@id": "cred:evidence", "@type": "@id"},
+ "expirationDate": {"@id": "cred:expirationDate", "@type": "xsd:dateTime"},
+ "holder": {"@id": "cred:holder", "@type": "@id"},
+ "issued": {"@id": "cred:issued", "@type": "xsd:dateTime"},
+ "issuer": {"@id": "cred:issuer", "@type": "@id"},
+ "issuanceDate": {"@id": "cred:issuanceDate", "@type": "xsd:dateTime"},
+ "proof": {"@id": "sec:proof", "@type": "@id", "@container": "@graph"},
+ "refreshService": {
+ "@id": "cred:refreshService",
+ "@type": "@id",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+
+ "id": "@id",
+ "type": "@type",
+
+ "cred": "https://www.w3.org/2018/credentials#",
+
+ "ManualRefreshService2018": "cred:ManualRefreshService2018"
+ }
+ },
+ "termsOfUse": {"@id": "cred:termsOfUse", "@type": "@id"},
+ "validFrom": {"@id": "cred:validFrom", "@type": "xsd:dateTime"},
+ "validUntil": {"@id": "cred:validUntil", "@type": "xsd:dateTime"}
+ }
+ },
+
+ "VerifiablePresentation": {
+ "@id": "https://www.w3.org/2018/credentials#VerifiablePresentation",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+
+ "id": "@id",
+ "type": "@type",
+
+ "cred": "https://www.w3.org/2018/credentials#",
+ "sec": "https://w3id.org/security#",
+
+ "holder": {"@id": "cred:holder", "@type": "@id"},
+ "proof": {"@id": "sec:proof", "@type": "@id", "@container": "@graph"},
+ "verifiableCredential": {"@id": "cred:verifiableCredential", "@type": "@id", "@container": "@graph"}
+ }
+ },
+
+ "EcdsaSecp256k1Signature2019": {
+ "@id": "https://w3id.org/security#EcdsaSecp256k1Signature2019",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+
+ "id": "@id",
+ "type": "@type",
+
+ "sec": "https://w3id.org/security#",
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
+
+ "challenge": "sec:challenge",
+ "created": {"@id": "http://purl.org/dc/terms/created", "@type": "xsd:dateTime"},
+ "domain": "sec:domain",
+ "expires": {"@id": "sec:expiration", "@type": "xsd:dateTime"},
+ "jws": "sec:jws",
+ "nonce": "sec:nonce",
+ "proofPurpose": {
+ "@id": "sec:proofPurpose",
+ "@type": "@vocab",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+
+ "id": "@id",
+ "type": "@type",
+
+ "sec": "https://w3id.org/security#",
+
+ "assertionMethod": {"@id": "sec:assertionMethod", "@type": "@id", "@container": "@set"},
+ "authentication": {"@id": "sec:authenticationMethod", "@type": "@id", "@container": "@set"}
+ }
+ },
+ "proofValue": "sec:proofValue",
+ "verificationMethod": {"@id": "sec:verificationMethod", "@type": "@id"}
+ }
+ },
+
+ "EcdsaSecp256r1Signature2019": {
+ "@id": "https://w3id.org/security#EcdsaSecp256r1Signature2019",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+
+ "id": "@id",
+ "type": "@type",
+
+ "sec": "https://w3id.org/security#",
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
+
+ "challenge": "sec:challenge",
+ "created": {"@id": "http://purl.org/dc/terms/created", "@type": "xsd:dateTime"},
+ "domain": "sec:domain",
+ "expires": {"@id": "sec:expiration", "@type": "xsd:dateTime"},
+ "jws": "sec:jws",
+ "nonce": "sec:nonce",
+ "proofPurpose": {
+ "@id": "sec:proofPurpose",
+ "@type": "@vocab",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+
+ "id": "@id",
+ "type": "@type",
+
+ "sec": "https://w3id.org/security#",
+
+ "assertionMethod": {"@id": "sec:assertionMethod", "@type": "@id", "@container": "@set"},
+ "authentication": {"@id": "sec:authenticationMethod", "@type": "@id", "@container": "@set"}
+ }
+ },
+ "proofValue": "sec:proofValue",
+ "verificationMethod": {"@id": "sec:verificationMethod", "@type": "@id"}
+ }
+ },
+
+ "Ed25519Signature2018": {
+ "@id": "https://w3id.org/security#Ed25519Signature2018",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+
+ "id": "@id",
+ "type": "@type",
+
+ "sec": "https://w3id.org/security#",
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
+
+ "challenge": "sec:challenge",
+ "created": {"@id": "http://purl.org/dc/terms/created", "@type": "xsd:dateTime"},
+ "domain": "sec:domain",
+ "expires": {"@id": "sec:expiration", "@type": "xsd:dateTime"},
+ "jws": "sec:jws",
+ "nonce": "sec:nonce",
+ "proofPurpose": {
+ "@id": "sec:proofPurpose",
+ "@type": "@vocab",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+
+ "id": "@id",
+ "type": "@type",
+
+ "sec": "https://w3id.org/security#",
+
+ "assertionMethod": {"@id": "sec:assertionMethod", "@type": "@id", "@container": "@set"},
+ "authentication": {"@id": "sec:authenticationMethod", "@type": "@id", "@container": "@set"}
+ }
+ },
+ "proofValue": "sec:proofValue",
+ "verificationMethod": {"@id": "sec:verificationMethod", "@type": "@id"}
+ }
+ },
+
+ "RsaSignature2018": {
+ "@id": "https://w3id.org/security#RsaSignature2018",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+
+ "challenge": "sec:challenge",
+ "created": {"@id": "http://purl.org/dc/terms/created", "@type": "xsd:dateTime"},
+ "domain": "sec:domain",
+ "expires": {"@id": "sec:expiration", "@type": "xsd:dateTime"},
+ "jws": "sec:jws",
+ "nonce": "sec:nonce",
+ "proofPurpose": {
+ "@id": "sec:proofPurpose",
+ "@type": "@vocab",
+ "@context": {
+ "@version": 1.1,
+ "@protected": true,
+
+ "id": "@id",
+ "type": "@type",
+
+ "sec": "https://w3id.org/security#",
+
+ "assertionMethod": {"@id": "sec:assertionMethod", "@type": "@id", "@container": "@set"},
+ "authentication": {"@id": "sec:authenticationMethod", "@type": "@id", "@container": "@set"}
+ }
+ },
+ "proofValue": "sec:proofValue",
+ "verificationMethod": {"@id": "sec:verificationMethod", "@type": "@id"}
+ }
+ },
+
+ "proof": {"@id": "https://w3id.org/security#proof", "@type": "@id", "@container": "@graph"}
+ }
+ }
\ No newline at end of file