From d1c477d901319440cbe8f13ddf1ab1639f316b7c Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 13:01:50 +0530 Subject: [PATCH 0001/2894] Issue #000 feat: Creating keycloak migration script 1. taking db backup and create new db 2. with postfix_601 3. restore the data --- ansible/keycloak-migration.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 ansible/keycloak-migration.yaml diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml new file mode 100644 index 000000000..22dbc61b0 --- /dev/null +++ b/ansible/keycloak-migration.yaml @@ -0,0 +1,21 @@ +--- +- hosts: localhost + tasks: + - name: taking backup of keycloak db + postgresql_db: + name: "{{ keycloak_postgres_database }}" + state: dump + target: /root/keycloak.sql + login_user: "{{keycloak_postgres_user }}" + login_password: "{{ keycloak_postgres_password }}" + login_host: "{{ keycloak_postgres_host }}" + port: 5432 + - name: restoring keycloak old db to new db named "{{ keycloak_postgres_database }}_601" + postgresql_db: + name: "{{ keycloak_postgres_database }}_601" + state: restore + target: /root/keycloak.sql + login_user: "{{ keycloak_postgres_user }}" + login_password: "{{ keycloak_postgres_password }}" + login_host: "{{ keycloak_postgres_host }}" + port: 5432 From ae7366d44718dd11eb62da957ed50f05464ea0ad Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 13:10:32 +0530 Subject: [PATCH 0002/2894] Issue #000 feat: Pipeline for Kyecloak migtration --- .../deploy/keycloak-migration/Jenkinsfile | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 pipelines/deploy/keycloak-migration/Jenkinsfile diff --git a/pipelines/deploy/keycloak-migration/Jenkinsfile b/pipelines/deploy/keycloak-migration/Jenkinsfile new file mode 100644 index 000000000..8a976be09 --- /dev/null +++ b/pipelines/deploy/keycloak-migration/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 + sh "git clone https://github.com/project-sunbird/sunbird-auth.git -b ${sunbird_auth_branch_or_tag}" + } + ansiColor('xterm') { + stage('get artifact') { + values = lp_dp_params() + 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 ('Taking db dump and creating a new db') { + ansiblePlaybook = "${currentWs}/ansible/keycloak-migration.yml" + ansibleExtraArgs = """\ + --vault-password-file /var/lib/jenkins/secrets/vault-pass + """.stripIndent().replace("\n", " ") + 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}" + + } + } + } + catch (err) { + currentBuild.result = "FAILURE" + throw err + } + finally { + slack_notify(currentBuild.result) + email_notify() + } +} From 575761236dd24c2dbfcfba36e0cc2fb1543d5061 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 13:17:58 +0530 Subject: [PATCH 0003/2894] Issue #000 feat: removing cloning for sunbird-auth --- pipelines/deploy/keycloak-migration/Jenkinsfile | 1 - 1 file changed, 1 deletion(-) diff --git a/pipelines/deploy/keycloak-migration/Jenkinsfile b/pipelines/deploy/keycloak-migration/Jenkinsfile index 8a976be09..761cffab1 100644 --- a/pipelines/deploy/keycloak-migration/Jenkinsfile +++ b/pipelines/deploy/keycloak-migration/Jenkinsfile @@ -10,7 +10,6 @@ node() { stage('checkout public repo') { cleanWs() checkout scm - sh "git clone https://github.com/project-sunbird/sunbird-auth.git -b ${sunbird_auth_branch_or_tag}" } ansiColor('xterm') { stage('get artifact') { From 5d8c7bc77dd7890cff97da954fb07be3be524ea0 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 13:29:43 +0530 Subject: [PATCH 0004/2894] Issue #000 fix: spelling mistake --- pipelines/deploy/keycloak-migration/Jenkinsfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pipelines/deploy/keycloak-migration/Jenkinsfile b/pipelines/deploy/keycloak-migration/Jenkinsfile index 761cffab1..486ce9c54 100644 --- a/pipelines/deploy/keycloak-migration/Jenkinsfile +++ b/pipelines/deploy/keycloak-migration/Jenkinsfile @@ -21,7 +21,7 @@ node() { artifact_download(values) } stage ('Taking db dump and creating a new db') { - ansiblePlaybook = "${currentWs}/ansible/keycloak-migration.yml" + ansiblePlaybook = "${currentWs}/ansible/keycloak-migration.yaml" ansibleExtraArgs = """\ --vault-password-file /var/lib/jenkins/secrets/vault-pass """.stripIndent().replace("\n", " ") @@ -31,7 +31,6 @@ node() { ansible_playbook_run(values) currentBuild.result = 'SUCCESS' currentBuild.description = "Artifact: ${values.artifact_version}, Private: ${params.private_branch}, Public: ${params.branch_or_tag}" - } } } From b4cbdfe06783a7c50368cb9b2f05c4fd1fedfb99 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 13:40:19 +0530 Subject: [PATCH 0005/2894] Issue #000 feat: changing host to local --- ansible/keycloak-migration.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 22dbc61b0..5cffe7d9a 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -1,5 +1,5 @@ --- -- hosts: localhost +- hosts: local tasks: - name: taking backup of keycloak db postgresql_db: @@ -19,3 +19,13 @@ login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" port: 5432 + - name: Stopping keycloak + shell: /etc/init.d/keycloak stop || pkill keycloak + - name: Backing up old keycloak + copy: + dest: /opt/keycloak_bak + src: /opt/keycloak + force: yes + remote_src: yes + follow: no + local_follow: yes From 2f89b53a2837346dc781a7ef15546c524b27553a Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 13:43:30 +0530 Subject: [PATCH 0006/2894] Issue #000 feat: Adding secrets file --- ansible/keycloak-migration.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 5cffe7d9a..8be324eca 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -1,5 +1,7 @@ --- - hosts: local + vars_files: + - "{{ inventory_dir }}/secrets.yml" tasks: - name: taking backup of keycloak db postgresql_db: From 64e70bddbfd35af00a710e6e0e8b7cbaf8a9c94f Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 13:49:14 +0530 Subject: [PATCH 0007/2894] Issue #000 feat: taking backup in the current dir --- ansible/keycloak-migration.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 8be324eca..2ebd7e8bd 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -7,7 +7,7 @@ postgresql_db: name: "{{ keycloak_postgres_database }}" state: dump - target: /root/keycloak.sql + target: keycloak.sql login_user: "{{keycloak_postgres_user }}" login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" @@ -16,7 +16,7 @@ postgresql_db: name: "{{ keycloak_postgres_database }}_601" state: restore - target: /root/keycloak.sql + target: keycloak.sql login_user: "{{ keycloak_postgres_user }}" login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" From bcb597171598d8df0398e4777b32ad7899856bf9 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 13:53:52 +0530 Subject: [PATCH 0008/2894] Issue #000 feat: creating db prior restoring --- ansible/keycloak-migration.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 2ebd7e8bd..6e1f4d797 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -12,6 +12,13 @@ login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" port: 5432 + - name: creating newdb "{{ keycloak_postgres_database }}_601" + postgresql_db: + name: "{{ keycloak_postgres_database }}_601" + state: present + login_user: "{{ keycloak_postgres_user }}" + login_password: "{{ keycloak_postgres_password }}" + login_host: "{{ keycloak_postgres_host }}" - name: restoring keycloak old db to new db named "{{ keycloak_postgres_database }}_601" postgresql_db: name: "{{ keycloak_postgres_database }}_601" From 0de9047c5d7757054956f0e3911b9b773bec54da Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 13:56:34 +0530 Subject: [PATCH 0009/2894] Issue #000 feat: Addinkg keycloak tasks --- ansible/keycloak-migration.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 6e1f4d797..862e45c5e 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -28,6 +28,8 @@ login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" port: 5432 +- hosts: keycloak + tasks: - name: Stopping keycloak shell: /etc/init.d/keycloak stop || pkill keycloak - name: Backing up old keycloak From 814e2a3b6f129deb38fe4609f32364fed9d2ac5e Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 14:28:36 +0530 Subject: [PATCH 0010/2894] Issue #000 feat: back and creation of new keycloak instances --- ansible/keycloak-migration.yaml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 862e45c5e..3d01a33ef 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -29,14 +29,22 @@ login_host: "{{ keycloak_postgres_host }}" port: 5432 - hosts: keycloak + vars_files: + - "{{ inventory_dir }}/secrets.yml" tasks: - - name: Stopping keycloak - shell: /etc/init.d/keycloak stop || pkill keycloak + # - name: Stopping keycloak + # shell: /etc/init.d/keycloak stop || pkill keycloak - name: Backing up old keycloak copy: dest: /opt/keycloak_bak src: /opt/keycloak force: yes remote_src: yes - follow: no - local_follow: yes + - name: downloading and unarchiving new keycloak 6.0.1 + unarchive: + src: https://sunbirdpublic.blob.core.windows.net/installation/keycloak-6.0.1.tar.gz + dest: /opt/keycloak_new + copy: yes + creates: yes + owner: keycloak + group: keycloak From f6b10b75fad3716bf49fd877125106d37408ee39 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 16:27:49 +0530 Subject: [PATCH 0011/2894] Issue #000 feat: changing to root to store backup in root dir --- ansible/keycloak-migration.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 3d01a33ef..f180dc418 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -4,10 +4,11 @@ - "{{ inventory_dir }}/secrets.yml" tasks: - name: taking backup of keycloak db + become: yes postgresql_db: name: "{{ keycloak_postgres_database }}" state: dump - target: keycloak.sql + target: /root/keycloak.sql login_user: "{{keycloak_postgres_user }}" login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" @@ -20,10 +21,11 @@ login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" - name: restoring keycloak old db to new db named "{{ keycloak_postgres_database }}_601" + become: yes postgresql_db: name: "{{ keycloak_postgres_database }}_601" state: restore - target: keycloak.sql + target: /root/keycloak.sql login_user: "{{ keycloak_postgres_user }}" login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" @@ -32,8 +34,8 @@ vars_files: - "{{ inventory_dir }}/secrets.yml" tasks: - # - name: Stopping keycloak - # shell: /etc/init.d/keycloak stop || pkill keycloak + - name: Stopping keycloak + shell: /etc/init.d/keycloak stop || pkill keycloak - name: Backing up old keycloak copy: dest: /opt/keycloak_bak From 7f5c861eca3227283293f2aff38dd6f764c100f1 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 16:42:31 +0530 Subject: [PATCH 0012/2894] Issue #000 feat: enabling recursive copy for directory --- ansible/keycloak-migration.yaml | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index f180dc418..b9115c805 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -34,19 +34,38 @@ vars_files: - "{{ inventory_dir }}/secrets.yml" tasks: - - name: Stopping keycloak - shell: /etc/init.d/keycloak stop || pkill keycloak + # - name: Stopping keycloak + # shell: /etc/init.d/keycloak stop || pkill keycloak - name: Backing up old keycloak copy: - dest: /opt/keycloak_bak - src: /opt/keycloak + dest: /opt/keycloak_old/ + src: /opt/keycloak/ + backup: no force: yes + directory_mode: yes remote_src: yes + follow: no + local_follow: yes + owner: keycloak + group: keycloak + - name: downloading and unarchiving new keycloak 6.0.1 unarchive: src: https://sunbirdpublic.blob.core.windows.net/installation/keycloak-6.0.1.tar.gz dest: /opt/keycloak_new copy: yes creates: yes + directory_mode: yes owner: keycloak group: keycloak + # - name: copying old modules to new keycloak + # copy: + # dest: "{{ item }}" + # src: "{{ item }}" + # force: yes + # directory_mode: yes + # remote_src: yes + # follow: no + # local_follow: yes + # owner: keycloak + # group: keycloak From 24c938deb0d4dbf3402cd8c60c259c31843cfa84 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 16:57:31 +0530 Subject: [PATCH 0013/2894] Issue #000 feat: chaginging to command from copy mode as it doesn't support recursive copy for remoe content --- ansible/keycloak-migration.yaml | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index b9115c805..77bb14cf3 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -37,27 +37,16 @@ # - name: Stopping keycloak # shell: /etc/init.d/keycloak stop || pkill keycloak - name: Backing up old keycloak - copy: - dest: /opt/keycloak_old/ - src: /opt/keycloak/ - backup: no - force: yes - directory_mode: yes - remote_src: yes - follow: no - local_follow: yes - owner: keycloak - group: keycloak - + become: yes + shell: cp -rf /opt/keycloak /opt/keycloak_old && chown -R keycloak:keycloak /opt/keycloak_old - name: downloading and unarchiving new keycloak 6.0.1 unarchive: src: https://sunbirdpublic.blob.core.windows.net/installation/keycloak-6.0.1.tar.gz dest: /opt/keycloak_new - copy: yes - creates: yes - directory_mode: yes + remote_src: yes owner: keycloak group: keycloak + creates: yes # - name: copying old modules to new keycloak # copy: # dest: "{{ item }}" From eb17e76a10930922535332d8901c5c29c0c140d3 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 18:08:01 +0530 Subject: [PATCH 0014/2894] Issue #000 feat: creating keycloak dir prior --- ansible/keycloak-migration.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 77bb14cf3..86eb17297 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -39,6 +39,14 @@ - name: Backing up old keycloak become: yes shell: cp -rf /opt/keycloak /opt/keycloak_old && chown -R keycloak:keycloak /opt/keycloak_old + - name: make sure keycloak path exists + become: yes + file: + path: /opt/keycloak_new + state: directory + owner: keycloak + group: keycloak + - name: downloading and unarchiving new keycloak 6.0.1 unarchive: src: https://sunbirdpublic.blob.core.windows.net/installation/keycloak-6.0.1.tar.gz @@ -46,7 +54,7 @@ remote_src: yes owner: keycloak group: keycloak - creates: yes + # - name: copying old modules to new keycloak # copy: # dest: "{{ item }}" From 8bb58bf3d9e2fb6436b80b38c39edcb5c34d6a98 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 18:13:44 +0530 Subject: [PATCH 0015/2894] Issue #000 feat: variabilizing keycloak --- ansible/keycloak-migration.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 86eb17297..07f66cf92 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -31,6 +31,8 @@ login_host: "{{ keycloak_postgres_host }}" port: 5432 - hosts: keycloak + vars: + keycloak_dir: /opt/keycloak vars_files: - "{{ inventory_dir }}/secrets.yml" tasks: @@ -38,23 +40,21 @@ # shell: /etc/init.d/keycloak stop || pkill keycloak - name: Backing up old keycloak become: yes - shell: cp -rf /opt/keycloak /opt/keycloak_old && chown -R keycloak:keycloak /opt/keycloak_old + shell: "cp -rf {{ keycloak_dir }} {{ keycloak_dir }}_old && chown -R keycloak:keycloak {{ keycloak_dir }}_old" - name: make sure keycloak path exists become: yes file: - path: /opt/keycloak_new + path: "{{ keycloak_dir }}_new" state: directory owner: keycloak group: keycloak - - name: downloading and unarchiving new keycloak 6.0.1 unarchive: src: https://sunbirdpublic.blob.core.windows.net/installation/keycloak-6.0.1.tar.gz - dest: /opt/keycloak_new + dest: "{{ keycloak_dir }}_new" remote_src: yes owner: keycloak group: keycloak - # - name: copying old modules to new keycloak # copy: # dest: "{{ item }}" From cfcd6ae0318c7588efd46c924625e7dc934c0b19 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 18:16:56 +0530 Subject: [PATCH 0016/2894] Issue #000 feat: Running tasks as keycloak user --- ansible/keycloak-migration.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 07f66cf92..82e8670d7 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -31,6 +31,8 @@ login_host: "{{ keycloak_postgres_host }}" port: 5432 - hosts: keycloak + become: yes + become_user: keycloak vars: keycloak_dir: /opt/keycloak vars_files: From ca7566a76145462c6dd4e3d73e88d53d5f5b6410 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 18:17:56 +0530 Subject: [PATCH 0017/2894] Issue #000 feat: removing clean workspace as it's not necessary --- pipelines/deploy/keycloak-migration/Jenkinsfile | 1 - 1 file changed, 1 deletion(-) diff --git a/pipelines/deploy/keycloak-migration/Jenkinsfile b/pipelines/deploy/keycloak-migration/Jenkinsfile index 486ce9c54..e77a0fdb4 100644 --- a/pipelines/deploy/keycloak-migration/Jenkinsfile +++ b/pipelines/deploy/keycloak-migration/Jenkinsfile @@ -8,7 +8,6 @@ node() { String ANSI_YELLOW = "\u001B[33m" stage('checkout public repo') { - cleanWs() checkout scm } ansiColor('xterm') { From 2a3e182e245efe0d08baa46f34ec1685c1d0f908 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 18:20:59 +0530 Subject: [PATCH 0018/2894] Issue #000 feat: Running as root user and changing permissions --- ansible/keycloak-migration.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 82e8670d7..9b86ce9bd 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -31,8 +31,6 @@ login_host: "{{ keycloak_postgres_host }}" port: 5432 - hosts: keycloak - become: yes - become_user: keycloak vars: keycloak_dir: /opt/keycloak vars_files: @@ -51,6 +49,7 @@ owner: keycloak group: keycloak - name: downloading and unarchiving new keycloak 6.0.1 + become: yes unarchive: src: https://sunbirdpublic.blob.core.windows.net/installation/keycloak-6.0.1.tar.gz dest: "{{ keycloak_dir }}_new" From 493756fb74bfa01d1c4555cedf27e03868765d32 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 18:34:49 +0530 Subject: [PATCH 0019/2894] Issue #000 feat: removing parent directory while unarchiving --- ansible/keycloak-migration.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 9b86ce9bd..c4e7e2851 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -56,6 +56,18 @@ remote_src: yes owner: keycloak group: keycloak + extra_opts: [--strip-components=1] + - name: Copying old files to new keycloak for migration + become: yes + become_user: keycloak + shell: "cp -rf {{ keycloak_dir }}_old/standalone/ {{ keycloak_dir }}_new/standalone/ " + + - name: Running migration + becom: yes + become_user: keycloak + script: bin/jboss-cli.sh --file=bin/migrate-standalone.cli + chdir: "{{ keycloak_dir }}" + # - name: copying old modules to new keycloak # copy: # dest: "{{ item }}" From e52e7cd8c81944239af845728d077c7252827e3e Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 18:39:46 +0530 Subject: [PATCH 0020/2894] Issue #000 feat: looping migration script --- ansible/keycloak-migration.yaml | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index c4e7e2851..2d2c09f69 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -65,17 +65,8 @@ - name: Running migration becom: yes become_user: keycloak - script: bin/jboss-cli.sh --file=bin/migrate-standalone.cli + shell: "bash {{ item }}" + whith_items: + - "bin/jboss-cli.sh --file=bin/migrate-standalone.cli" + - "bin/jboss-cli.sh --file=bin/migrate-standalone-ha.cli" chdir: "{{ keycloak_dir }}" - - # - name: copying old modules to new keycloak - # copy: - # dest: "{{ item }}" - # src: "{{ item }}" - # force: yes - # directory_mode: yes - # remote_src: yes - # follow: no - # local_follow: yes - # owner: keycloak - # group: keycloak From 8534b464e73a4b2084001efc25fc480d497c1278 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 18:46:28 +0530 Subject: [PATCH 0021/2894] Issue #000 feat: removing surrounding "" --- ansible/keycloak-migration.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 2d2c09f69..d43332f78 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -13,7 +13,7 @@ login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" port: 5432 - - name: creating newdb "{{ keycloak_postgres_database }}_601" + - name: creating newdb {{ keycloak_postgres_database }}_601 postgresql_db: name: "{{ keycloak_postgres_database }}_601" state: present @@ -63,10 +63,11 @@ shell: "cp -rf {{ keycloak_dir }}_old/standalone/ {{ keycloak_dir }}_new/standalone/ " - name: Running migration - becom: yes + become: yes become_user: keycloak shell: "bash {{ item }}" - whith_items: + with_items: - "bin/jboss-cli.sh --file=bin/migrate-standalone.cli" - "bin/jboss-cli.sh --file=bin/migrate-standalone-ha.cli" - chdir: "{{ keycloak_dir }}" + args: + chdir: "{{ keycloak_dir }}_new" From c5050e00a8db07f425bee79c5f87314ffbb2722a Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 19:39:33 +0530 Subject: [PATCH 0022/2894] Issue #000 fix: copy issue --- ansible/keycloak-migration.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index d43332f78..47542a2d2 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -60,7 +60,7 @@ - name: Copying old files to new keycloak for migration become: yes become_user: keycloak - shell: "cp -rf {{ keycloak_dir }}_old/standalone/ {{ keycloak_dir }}_new/standalone/ " + shell: "cp -rf {{ keycloak_dir }}_old/standalone/* {{ keycloak_dir }}_new/standalone/ " - name: Running migration become: yes From 8908f82ad095370b6db0eb80b072e9e9f9da40da Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 19:48:56 +0530 Subject: [PATCH 0023/2894] Issue #000 feat: copying all files for migration --- ansible/keycloak-migration.yaml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 47542a2d2..4dfc7c817 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -60,14 +60,17 @@ - name: Copying old files to new keycloak for migration become: yes become_user: keycloak - shell: "cp -rf {{ keycloak_dir }}_old/standalone/* {{ keycloak_dir }}_new/standalone/ " - - - name: Running migration - become: yes - become_user: keycloak - shell: "bash {{ item }}" + shell: "cp -rf {{ keycloak_dir }}_old/{{ item }}/* {{ keycloak_dir }}_new/{{ item }}/ " with_items: - - "bin/jboss-cli.sh --file=bin/migrate-standalone.cli" - - "bin/jboss-cli.sh --file=bin/migrate-standalone-ha.cli" - args: - chdir: "{{ keycloak_dir }}_new" + - standalone + - domain + + # - name: Running migration + # become: yes + # become_user: keycloak + # shell: "bash {{ item }}" + # with_items: + # - "bin/jboss-cli.sh --file=bin/migrate-standalone.cli" + # - "bin/jboss-cli.sh --file=bin/migrate-standalone-ha.cli" + # args: + # chdir: "{{ keycloak_dir }}_new" From 86c51ec0f47f01b91660a146d786e5d6966acc45 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 22:18:29 +0530 Subject: [PATCH 0024/2894] Starting migration on existing dbs, but creating a db for backup --- ansible/keycloak-migration.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 4dfc7c817..69072f652 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -13,17 +13,17 @@ login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" port: 5432 - - name: creating newdb {{ keycloak_postgres_database }}_601 + - name: creating newdb {{ keycloak_postgres_database }}_301 postgresql_db: - name: "{{ keycloak_postgres_database }}_601" + name: "{{ keycloak_postgres_database }}_301" state: present login_user: "{{ keycloak_postgres_user }}" login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" - - name: restoring keycloak old db to new db named "{{ keycloak_postgres_database }}_601" + - name: restoring keycloak old db to new db named "{{ keycloak_postgres_database }}_301" become: yes postgresql_db: - name: "{{ keycloak_postgres_database }}_601" + name: "{{ keycloak_postgres_database }}_301" state: restore target: /root/keycloak.sql login_user: "{{ keycloak_postgres_user }}" From 05a2c1eecacf2f15290b90bde8797f13ea42eb03 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 22:19:27 +0530 Subject: [PATCH 0025/2894] Issue #000 feat: debugging status variable --- ansible/keycloak-migration.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 69072f652..6127a078b 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -20,6 +20,9 @@ login_user: "{{ keycloak_postgres_user }}" login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" + register: status + - debug: + var: status - name: restoring keycloak old db to new db named "{{ keycloak_postgres_database }}_301" become: yes postgresql_db: From cc81dfdbd6bd28aa0774ab684aa09e89111335e2 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 22:23:17 +0530 Subject: [PATCH 0026/2894] Issue #000 feat: creating database only at the first time --- ansible/keycloak-migration.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 6127a078b..3e6e75286 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -21,8 +21,6 @@ login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" register: status - - debug: - var: status - name: restoring keycloak old db to new db named "{{ keycloak_postgres_database }}_301" become: yes postgresql_db: @@ -33,6 +31,7 @@ login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" port: 5432 + when: status.failed not false - hosts: keycloak vars: keycloak_dir: /opt/keycloak From 18c8d16c4f94a5f6b4c9f0a812d0244f3e53e80e Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 22:26:09 +0530 Subject: [PATCH 0027/2894] Issue #000 feat: creating db backup location variable --- ansible/keycloak-migration.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 3e6e75286..a150121dc 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -2,13 +2,15 @@ - hosts: local vars_files: - "{{ inventory_dir }}/secrets.yml" + vars: + db_backup_name: "/root/keycloak{{ ansible_date_time.epoch }}.sql" tasks: - name: taking backup of keycloak db become: yes postgresql_db: name: "{{ keycloak_postgres_database }}" state: dump - target: /root/keycloak.sql + target: "{{ db_backup_name }}" login_user: "{{keycloak_postgres_user }}" login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" @@ -21,17 +23,18 @@ login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" register: status + - name: restoring keycloak old db to new db named "{{ keycloak_postgres_database }}_301" become: yes postgresql_db: name: "{{ keycloak_postgres_database }}_301" state: restore - target: /root/keycloak.sql + target: "{{ db_backup_name }}" login_user: "{{ keycloak_postgres_user }}" login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" port: 5432 - when: status.failed not false + when: status.failed != false - hosts: keycloak vars: keycloak_dir: /opt/keycloak From 2a09cc096e721c14057e965dd1a3306788cc305e Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 23:12:32 +0530 Subject: [PATCH 0028/2894] Issue #000 feat: test db creation --- ansible/keycloak-migration.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index a150121dc..7f1a586c8 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -15,6 +15,13 @@ login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" port: 5432 + - name: deleting newdb {{ keycloak_postgres_database }}_301 + postgresql_db: + name: "{{ keycloak_postgres_database }}_301" + state: absent + login_user: "{{ keycloak_postgres_user }}" + login_password: "{{ keycloak_postgres_password }}" + login_host: "{{ keycloak_postgres_host }}" - name: creating newdb {{ keycloak_postgres_database }}_301 postgresql_db: name: "{{ keycloak_postgres_database }}_301" @@ -23,7 +30,6 @@ login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" register: status - - name: restoring keycloak old db to new db named "{{ keycloak_postgres_database }}_301" become: yes postgresql_db: From 368f095076ff88499832cd79dd76007237cb0b25 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 23:16:11 +0530 Subject: [PATCH 0029/2894] Issue #000 feat: debugging --- ansible/keycloak-migration.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 7f1a586c8..3b5f6c622 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -30,6 +30,9 @@ login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" register: status + - name: debugging + debug: + var: status - name: restoring keycloak old db to new db named "{{ keycloak_postgres_database }}_301" become: yes postgresql_db: From 469d6e3586b06d02d8700176f8721fac402a2e45 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 23:20:04 +0530 Subject: [PATCH 0030/2894] Issue #000 feat: triggering restoring only while creating db --- ansible/keycloak-migration.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 3b5f6c622..1e1fcb87f 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -43,7 +43,7 @@ login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" port: 5432 - when: status.failed != false + when: status.changed - hosts: keycloak vars: keycloak_dir: /opt/keycloak From 9826acdbea1ca5b51022848829cceb908fffd497 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 23:21:47 +0530 Subject: [PATCH 0031/2894] Issue #000 feat: removing delete --- ansible/keycloak-migration.yaml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 1e1fcb87f..2571c64b3 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -15,13 +15,6 @@ login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" port: 5432 - - name: deleting newdb {{ keycloak_postgres_database }}_301 - postgresql_db: - name: "{{ keycloak_postgres_database }}_301" - state: absent - login_user: "{{ keycloak_postgres_user }}" - login_password: "{{ keycloak_postgres_password }}" - login_host: "{{ keycloak_postgres_host }}" - name: creating newdb {{ keycloak_postgres_database }}_301 postgresql_db: name: "{{ keycloak_postgres_database }}_301" From a5c7c7e188c90a8632df7fc784754524e164d9ac Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 23:36:27 +0530 Subject: [PATCH 0032/2894] Issue #000 feat: staring/stopping keycloak --- ansible/keycloak-migration.yaml | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 2571c64b3..4681c53c3 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -15,7 +15,7 @@ login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" port: 5432 - - name: creating newdb {{ keycloak_postgres_database }}_301 + - name: creating backup db {{ keycloak_postgres_database }}_301 postgresql_db: name: "{{ keycloak_postgres_database }}_301" state: present @@ -26,7 +26,7 @@ - name: debugging debug: var: status - - name: restoring keycloak old db to new db named "{{ keycloak_postgres_database }}_301" + - name: creating backup keycloak old db {{ keycloak_postgres_database }}_301 for the first time become: yes postgresql_db: name: "{{ keycloak_postgres_database }}_301" @@ -43,8 +43,8 @@ vars_files: - "{{ inventory_dir }}/secrets.yml" tasks: - # - name: Stopping keycloak - # shell: /etc/init.d/keycloak stop || pkill keycloak + - name: Stopping keycloak + shell: /etc/init.d/keycloak stop || pkill keycloak - name: Backing up old keycloak become: yes shell: "cp -rf {{ keycloak_dir }} {{ keycloak_dir }}_old && chown -R keycloak:keycloak {{ keycloak_dir }}_old" @@ -71,13 +71,15 @@ with_items: - standalone - domain - - # - name: Running migration - # become: yes - # become_user: keycloak - # shell: "bash {{ item }}" - # with_items: - # - "bin/jboss-cli.sh --file=bin/migrate-standalone.cli" - # - "bin/jboss-cli.sh --file=bin/migrate-standalone-ha.cli" - # args: - # chdir: "{{ keycloak_dir }}_new" + - name: Running migration + become: yes + become_user: keycloak + shell: "bash {{ item }}" + with_items: + - "bin/jboss-cli.sh --file=bin/migrate-standalone.cli" + - "bin/jboss-cli.sh --file=bin/migrate-standalone-ha.cli" + args: + chdir: "{{ keycloak_dir }}_new" + - name: starting keycloak + become: yes + shell: /etc/init.d/keycloak start From 620d73c67c2466d7120c7ab712cabb81649485a1 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 12:27:29 +0530 Subject: [PATCH 0033/2894] Issue #000 feat: passing pre-built keycloak for migration --- pipelines/deploy/keycloak-migration/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipelines/deploy/keycloak-migration/Jenkinsfile b/pipelines/deploy/keycloak-migration/Jenkinsfile index e77a0fdb4..19c3671e4 100644 --- a/pipelines/deploy/keycloak-migration/Jenkinsfile +++ b/pipelines/deploy/keycloak-migration/Jenkinsfile @@ -22,7 +22,7 @@ node() { stage ('Taking db dump and creating a new db') { ansiblePlaybook = "${currentWs}/ansible/keycloak-migration.yaml" ansibleExtraArgs = """\ - --vault-password-file /var/lib/jenkins/secrets/vault-pass + --extra-args keycloak_zip=${artifact} --vault-password-file /var/lib/jenkins/secrets/vault-pass """.stripIndent().replace("\n", " ") values.put('ansiblePlaybook', ansiblePlaybook) values.put('ansibleExtraArgs', ansibleExtraArgs) From 3f65c5f3b5bc844b4817b33a770b59bfedb76541 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 12:41:49 +0530 Subject: [PATCH 0034/2894] Issue #000 feat: removing redundant deployment code --- ansible/keycloak-migration.yaml | 4 +-- .../roles/keycloak-deploy/tasks/deploy.yml | 27 +++++-------------- 2 files changed, 9 insertions(+), 22 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 4681c53c3..3f17519da 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -55,10 +55,10 @@ state: directory owner: keycloak group: keycloak - - name: downloading and unarchiving new keycloak 6.0.1 + - name: copy and unarchiving new keycloak 6.0.1 become: yes unarchive: - src: https://sunbirdpublic.blob.core.windows.net/installation/keycloak-6.0.1.tar.gz + src: "{{keycoak_zip}}" dest: "{{ keycloak_dir }}_new" remote_src: yes owner: keycloak diff --git a/ansible/roles/keycloak-deploy/tasks/deploy.yml b/ansible/roles/keycloak-deploy/tasks/deploy.yml index 019e65a9d..78d0e7783 100644 --- a/ansible/roles/keycloak-deploy/tasks/deploy.yml +++ b/ansible/roles/keycloak-deploy/tasks/deploy.yml @@ -39,34 +39,21 @@ group: "{{ wildfly_group }}" force: true -- name: Paste keycloak package on server - copy: - src: "{{ artifact_path }}" - dest: "/opt/" +- name: Creating keycloak directory + become: true + file: + path: "{{ keycloak_home }}" + state: directory owner: "{{ wildfly_user }}" group: "{{ wildfly_group }}" - force: true - name: Extarct the folder unarchive: - src: "/opt/{{ artifact }}" - dest: /opt/ - copy: false + src: "{{ artifact }}" + dest: "{{ keycloak_home }}" owner: "{{ wildfly_user }}" group: "{{ wildfly_group }}" -- name: Move the folder name - command: mv sunbird_auth_{{ sunbird_auth_version }} keycloak - args: - chdir: /opt - -- name: Remove the opt/{{ artifact }} - become: true - file: - path: "/opt/{{ artifact }}" - state: absent - force: true - - name: Create required directories file: path: "{{ item.dest }}" From 1cd0bfe372ad86d45c5f88600c901f1b22d25871 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 12:46:30 +0530 Subject: [PATCH 0035/2894] Issue #000 feat: using prebuilt keycloak from build job --- ansible/keycloak-migration.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 3f17519da..7f5e157ae 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -60,7 +60,6 @@ unarchive: src: "{{keycoak_zip}}" dest: "{{ keycloak_dir }}_new" - remote_src: yes owner: keycloak group: keycloak extra_opts: [--strip-components=1] From 23a5202d2d2eacd59a258d4c82b4cc7d40a2e2ee Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 13:47:56 +0530 Subject: [PATCH 0036/2894] Issue #000 feat: removing keyoack starting step, as it's not necessary --- ansible/keycloak-migration.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 7f5e157ae..5e5568e59 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -79,6 +79,3 @@ - "bin/jboss-cli.sh --file=bin/migrate-standalone-ha.cli" args: chdir: "{{ keycloak_dir }}_new" - - name: starting keycloak - become: yes - shell: /etc/init.d/keycloak start From c721dd48de834369d66e591d87a21233b2d299a4 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 13:51:21 +0530 Subject: [PATCH 0037/2894] Issue #000 fix: ansible extra vars --- pipelines/deploy/keycloak-migration/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipelines/deploy/keycloak-migration/Jenkinsfile b/pipelines/deploy/keycloak-migration/Jenkinsfile index 19c3671e4..2eef1d172 100644 --- a/pipelines/deploy/keycloak-migration/Jenkinsfile +++ b/pipelines/deploy/keycloak-migration/Jenkinsfile @@ -22,7 +22,7 @@ node() { stage ('Taking db dump and creating a new db') { ansiblePlaybook = "${currentWs}/ansible/keycloak-migration.yaml" ansibleExtraArgs = """\ - --extra-args keycloak_zip=${artifact} --vault-password-file /var/lib/jenkins/secrets/vault-pass + --extra-vars keycloak_zip=${artifact} --vault-password-file /var/lib/jenkins/secrets/vault-pass """.stripIndent().replace("\n", " ") values.put('ansiblePlaybook', ansiblePlaybook) values.put('ansibleExtraArgs', ansibleExtraArgs) From 2ca79d5f2042805ec6d1a36e16628ebebf08208a Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 13:53:26 +0530 Subject: [PATCH 0038/2894] Issue #000 feat: updating keycloak stop method --- ansible/keycloak-migration.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 5e5568e59..54b87186a 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -44,7 +44,8 @@ - "{{ inventory_dir }}/secrets.yml" tasks: - name: Stopping keycloak - shell: /etc/init.d/keycloak stop || pkill keycloak + become: yes + shell: /bin/bash -c "/etc/init.d/keycloak stop || pkill keycloak" - name: Backing up old keycloak become: yes shell: "cp -rf {{ keycloak_dir }} {{ keycloak_dir }}_old && chown -R keycloak:keycloak {{ keycloak_dir }}_old" From 3af412723bd83745b624e20f1ecc3aee02c887bb Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 13:56:27 +0530 Subject: [PATCH 0039/2894] Issue #000 fix: keycloak src variable --- ansible/keycloak-migration.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 54b87186a..08d764adb 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -59,7 +59,7 @@ - name: copy and unarchiving new keycloak 6.0.1 become: yes unarchive: - src: "{{keycoak_zip}}" + src: "{{keycloak_zip}}" dest: "{{ keycloak_dir }}_new" owner: keycloak group: keycloak From efd21babf2d330501a8d8f6216dbfafff0b70475 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 14:09:02 +0530 Subject: [PATCH 0040/2894] Issue #000 feat: not exiting even if keycloak kill says failure --- ansible/keycloak-migration.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 08d764adb..7d70d3669 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -45,7 +45,7 @@ tasks: - name: Stopping keycloak become: yes - shell: /bin/bash -c "/etc/init.d/keycloak stop || pkill keycloak" + shell: /bin/bash -c "/etc/init.d/keycloak stop || pkill keycloak && true" - name: Backing up old keycloak become: yes shell: "cp -rf {{ keycloak_dir }} {{ keycloak_dir }}_old && chown -R keycloak:keycloak {{ keycloak_dir }}_old" From 833d2bf09dea4ce03269740cd925edc10fd16b69 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 14:13:12 +0530 Subject: [PATCH 0041/2894] Issue #000 feat: waiting for keycloak to stop --- ansible/keycloak-migration.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 7d70d3669..709f4304a 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -46,6 +46,11 @@ - name: Stopping keycloak become: yes shell: /bin/bash -c "/etc/init.d/keycloak stop || pkill keycloak && true" + - name: Waiting for keycloak to exit + wait_for: + port: 8080 + state: stopped + timeout: 30 - name: Backing up old keycloak become: yes shell: "cp -rf {{ keycloak_dir }} {{ keycloak_dir }}_old && chown -R keycloak:keycloak {{ keycloak_dir }}_old" From 70bfa3e0eebdfc476e2b95a1b8bcfedc73a1e497 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 14:26:32 +0530 Subject: [PATCH 0042/2894] Issue #000 feat: appending keycloak path with artifact --- pipelines/deploy/keycloak-migration/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipelines/deploy/keycloak-migration/Jenkinsfile b/pipelines/deploy/keycloak-migration/Jenkinsfile index 2eef1d172..51548dd15 100644 --- a/pipelines/deploy/keycloak-migration/Jenkinsfile +++ b/pipelines/deploy/keycloak-migration/Jenkinsfile @@ -22,7 +22,7 @@ node() { stage ('Taking db dump and creating a new db') { ansiblePlaybook = "${currentWs}/ansible/keycloak-migration.yaml" ansibleExtraArgs = """\ - --extra-vars keycloak_zip=${artifact} --vault-password-file /var/lib/jenkins/secrets/vault-pass + --extra-vars keycloak_zip=${currentWs}/${artifact} --vault-password-file /var/lib/jenkins/secrets/vault-pass """.stripIndent().replace("\n", " ") values.put('ansiblePlaybook', ansiblePlaybook) values.put('ansibleExtraArgs', ansibleExtraArgs) From d407dedd9f57903d3e101fdf4c42b38fb4231d8b Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 14:44:35 +0530 Subject: [PATCH 0043/2894] Issue #000 feat: never failing --- ansible/keycloak-migration.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 709f4304a..dd1a70938 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -45,7 +45,8 @@ tasks: - name: Stopping keycloak become: yes - shell: /bin/bash -c "/etc/init.d/keycloak stop || pkill keycloak && true" + shell: /bin/bash -c "/etc/init.d/keycloak stop || pkill keycloak" + failed_when: false - name: Waiting for keycloak to exit wait_for: port: 8080 From 7e1b8147d5e9bde6cf373a02d0b8bb3c9270d390 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 15:35:01 +0530 Subject: [PATCH 0044/2894] Issue #000 feat: removing tar strip, because of zip --- ansible/keycloak-migration.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index dd1a70938..0b8259a33 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -69,7 +69,6 @@ dest: "{{ keycloak_dir }}_new" owner: keycloak group: keycloak - extra_opts: [--strip-components=1] - name: Copying old files to new keycloak for migration become: yes become_user: keycloak From 2089837e28bb631cc72d57844f8340fe88865d2e Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 15:43:20 +0530 Subject: [PATCH 0045/2894] Issue #000 feat: moving sunbird_auth to keycloak --- ansible/keycloak-migration.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 0b8259a33..bb07cc054 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -66,13 +66,16 @@ become: yes unarchive: src: "{{keycloak_zip}}" - dest: "{{ keycloak_dir }}_new" + dest: "/opt/" owner: keycloak group: keycloak + - name: Renaming keycloak artifact + become: yes + shell: "mv /opt/sunbird_auth_1.0v {{ keycloak_dir }}_new ; chown -R keycloak:keycloak {{keycloak_dir}}_new" - name: Copying old files to new keycloak for migration become: yes become_user: keycloak - shell: "cp -rf {{ keycloak_dir }}_old/{{ item }}/* {{ keycloak_dir }}_new/{{ item }}/ " + shell: "cp -rf {{ keycloak_dir }}_old/{{ item }}/* {{ keycloak_dir }}_new/{{ item }}/" with_items: - standalone - domain From ed10ccf684e1ebf143d5e37e2ecaec529a1d50ba Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 17:37:35 +0530 Subject: [PATCH 0046/2894] Issue #000 feat: testing unzip ansible --- ansible/keycloak-migration.yaml | 38 ++++++++++++++++----------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index bb07cc054..b72b89690 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -65,26 +65,26 @@ - name: copy and unarchiving new keycloak 6.0.1 become: yes unarchive: - src: "{{keycloak_zip}}" - dest: "/opt/" + src: "{{ keycloak_zip }}" + dest: "/opt/keycloak_new" owner: keycloak group: keycloak - name: Renaming keycloak artifact become: yes - shell: "mv /opt/sunbird_auth_1.0v {{ keycloak_dir }}_new ; chown -R keycloak:keycloak {{keycloak_dir}}_new" - - name: Copying old files to new keycloak for migration - become: yes - become_user: keycloak - shell: "cp -rf {{ keycloak_dir }}_old/{{ item }}/* {{ keycloak_dir }}_new/{{ item }}/" - with_items: - - standalone - - domain - - name: Running migration - become: yes - become_user: keycloak - shell: "bash {{ item }}" - with_items: - - "bin/jboss-cli.sh --file=bin/migrate-standalone.cli" - - "bin/jboss-cli.sh --file=bin/migrate-standalone-ha.cli" - args: - chdir: "{{ keycloak_dir }}_new" + shell: "mv {{ keycloak_dir }}_new/sunbird_auth_1.0v/* {{ keycloak_dir }}_new/ ; rm -rf {{ keycloak_dir }}_new/sunbird_auth_1.0v ; chown -R keycloak:keycloak {{ keycloak_dir }}_new" + # - name: Copying old files to new keycloak for migration + # become: yes + # become_user: keycloak + # shell: "cp -rf {{ keycloak_dir }}_old/{{ item }}/* {{ keycloak_dir }}_new/{{ item }}/" + # with_items: + # - standalone + # - domain + # - name: Running migration + # become: yes + # become_user: keycloak + # shell: "bash {{ item }}" + # with_items: + # - "bin/jboss-cli.sh --file=bin/migrate-standalone.cli" + # - "bin/jboss-cli.sh --file=bin/migrate-standalone-ha.cli" + # args: + # chdir: "{{ keycloak_dir }}_new" From 3124f6d3dff22ede2989fceb1e3cc9a9144a7251 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 17:57:45 +0530 Subject: [PATCH 0047/2894] Issue #000 feat: finalizing script --- ansible/keycloak-migration.yaml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index b72b89690..e3bc32b88 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -72,19 +72,19 @@ - name: Renaming keycloak artifact become: yes shell: "mv {{ keycloak_dir }}_new/sunbird_auth_1.0v/* {{ keycloak_dir }}_new/ ; rm -rf {{ keycloak_dir }}_new/sunbird_auth_1.0v ; chown -R keycloak:keycloak {{ keycloak_dir }}_new" - # - name: Copying old files to new keycloak for migration - # become: yes - # become_user: keycloak - # shell: "cp -rf {{ keycloak_dir }}_old/{{ item }}/* {{ keycloak_dir }}_new/{{ item }}/" - # with_items: - # - standalone - # - domain - # - name: Running migration - # become: yes - # become_user: keycloak - # shell: "bash {{ item }}" - # with_items: - # - "bin/jboss-cli.sh --file=bin/migrate-standalone.cli" - # - "bin/jboss-cli.sh --file=bin/migrate-standalone-ha.cli" - # args: - # chdir: "{{ keycloak_dir }}_new" + - name: Copying old files to new keycloak for migration + become: yes + become_user: keycloak + shell: "cp -rf {{ keycloak_dir }}_old/{{ item }}/* {{ keycloak_dir }}_new/{{ item }}/" + with_items: + - standalone + - domain + - name: Running migration + become: yes + become_user: keycloak + shell: "bash {{ item }}" + with_items: + - "bin/jboss-cli.sh --file=bin/migrate-standalone.cli" + - "bin/jboss-cli.sh --file=bin/migrate-standalone-ha.cli" + args: + chdir: "{{ keycloak_dir }}_new" From 6c1f84674a5a7de602884645da2d1ffc90b73346 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 18:06:33 +0530 Subject: [PATCH 0048/2894] Issue #000 feat: Adding comments --- ansible/keycloak-migration.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index e3bc32b88..6ec5e54aa 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -1,4 +1,10 @@ --- +# This ansible playbook will do keycloak migration from 3.0.1 to 6.0.1 +# Prerequisites +# 1. Keycloak build artifact with 6.0.1 +# 2. Creates /opt/keycloak_new directory for migration +# 3. Create /opt/keyloak_old with current keycloak backup + - hosts: local vars_files: - "{{ inventory_dir }}/secrets.yml" @@ -37,6 +43,7 @@ login_host: "{{ keycloak_postgres_host }}" port: 5432 when: status.changed + - hosts: keycloak vars: keycloak_dir: /opt/keycloak From 8f6f443cdadb36b06523beb419f5c45d7da39c0e Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 18:08:16 +0530 Subject: [PATCH 0049/2894] Issue #000 feat: disabling postgres logs with sensitive info --- ansible/keycloak-migration.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 6ec5e54aa..34a14cbb3 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -10,6 +10,7 @@ - "{{ inventory_dir }}/secrets.yml" vars: db_backup_name: "/root/keycloak{{ ansible_date_time.epoch }}.sql" + no_log: true tasks: - name: taking backup of keycloak db become: yes From 11206bd408d83a54bd856846d0c422545659769e Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 18:08:59 +0530 Subject: [PATCH 0050/2894] Issue #000 feat: enabling verbose mode --- pipelines/deploy/keycloak-migration/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipelines/deploy/keycloak-migration/Jenkinsfile b/pipelines/deploy/keycloak-migration/Jenkinsfile index 51548dd15..05c3fdfe2 100644 --- a/pipelines/deploy/keycloak-migration/Jenkinsfile +++ b/pipelines/deploy/keycloak-migration/Jenkinsfile @@ -22,7 +22,7 @@ node() { stage ('Taking db dump and creating a new db') { ansiblePlaybook = "${currentWs}/ansible/keycloak-migration.yaml" ansibleExtraArgs = """\ - --extra-vars keycloak_zip=${currentWs}/${artifact} --vault-password-file /var/lib/jenkins/secrets/vault-pass + --extra-vars keycloak_zip=${currentWs}/${artifact} --vault-password-file /var/lib/jenkins/secrets/vault-pass -v """.stripIndent().replace("\n", " ") values.put('ansiblePlaybook', ansiblePlaybook) values.put('ansibleExtraArgs', ansibleExtraArgs) From 4424b0fb2a44de00824af7904e419c1f12dcf7ec Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 18:45:19 +0530 Subject: [PATCH 0051/2894] Issue #000 feat: changing name to Keycloak migration --- pipelines/deploy/keycloak-migration/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipelines/deploy/keycloak-migration/Jenkinsfile b/pipelines/deploy/keycloak-migration/Jenkinsfile index 05c3fdfe2..0d969f34a 100644 --- a/pipelines/deploy/keycloak-migration/Jenkinsfile +++ b/pipelines/deploy/keycloak-migration/Jenkinsfile @@ -19,7 +19,7 @@ node() { values.put('artifact', artifact) artifact_download(values) } - stage ('Taking db dump and creating a new db') { + stage ('Keycloak migration') { ansiblePlaybook = "${currentWs}/ansible/keycloak-migration.yaml" ansibleExtraArgs = """\ --extra-vars keycloak_zip=${currentWs}/${artifact} --vault-password-file /var/lib/jenkins/secrets/vault-pass -v From fa90303cb5cc097fb8d9ad7d7e08af4487fd508c Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 19:06:59 +0530 Subject: [PATCH 0052/2894] Issue #000 feat: hard-coding host --- ansible/keycloak-migration.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 34a14cbb3..ed041438b 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -10,6 +10,7 @@ - "{{ inventory_dir }}/secrets.yml" vars: db_backup_name: "/root/keycloak{{ ansible_date_time.epoch }}.sql" + keycloak_postgres_host: postgres-backup.postgres.database.azure.com no_log: true tasks: - name: taking backup of keycloak db From 8061cf377cd9712c78455d4655a04d8ffdf3b812 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 19:46:33 +0530 Subject: [PATCH 0053/2894] Issue #000 feat: dropping current db and restoring old one --- ansible/keycloak-migration.yaml | 139 ++++++++++++++++++-------------- 1 file changed, 77 insertions(+), 62 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index ed041438b..13c7e25cb 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -10,90 +10,105 @@ - "{{ inventory_dir }}/secrets.yml" vars: db_backup_name: "/root/keycloak{{ ansible_date_time.epoch }}.sql" - keycloak_postgres_host: postgres-backup.postgres.database.azure.com + # keycloak_postgres_host: postgres-backup.postgres.database.azure.com no_log: true tasks: - - name: taking backup of keycloak db + - name: dropping keycloak db become: yes postgresql_db: - name: "{{ keycloak_postgres_database }}" - state: dump - target: "{{ db_backup_name }}" + name: "{{ item }}" + state: absent login_user: "{{keycloak_postgres_user }}" login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" port: 5432 + with_items: + - "{{ keycloak_postgres_database }}" + - "{{ keycloak_postgres_database }}_301" + # - name: taking backup of keycloak db + # become: yes + # postgresql_db: + # name: "{{ keycloak_postgres_database }}" + # state: dump + # target: "{{ db_backup_name }}" + # login_user: "{{keycloak_postgres_user }}" + # login_password: "{{ keycloak_postgres_password }}" + # login_host: "{{ keycloak_postgres_host }}" + # port: 5432 - name: creating backup db {{ keycloak_postgres_database }}_301 postgresql_db: - name: "{{ keycloak_postgres_database }}_301" + name: "{{ item }}" state: present login_user: "{{ keycloak_postgres_user }}" login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" + with_items: + - "{{ keycloak_postgres_database }}" + - "{{ keycloak_postgres_database }}_301" register: status - - name: debugging - debug: - var: status - name: creating backup keycloak old db {{ keycloak_postgres_database }}_301 for the first time become: yes postgresql_db: - name: "{{ keycloak_postgres_database }}_301" + name: "{{ keycloak_postgres_database }}" state: restore - target: "{{ db_backup_name }}" + target: /root/keycloak1570714667.sql login_user: "{{ keycloak_postgres_user }}" login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" port: 5432 + with_items: + - "{{ keycloak_postgres_database }}" + - "{{ keycloak_postgres_database }}_301" when: status.changed -- hosts: keycloak - vars: - keycloak_dir: /opt/keycloak - vars_files: - - "{{ inventory_dir }}/secrets.yml" - tasks: - - name: Stopping keycloak - become: yes - shell: /bin/bash -c "/etc/init.d/keycloak stop || pkill keycloak" - failed_when: false - - name: Waiting for keycloak to exit - wait_for: - port: 8080 - state: stopped - timeout: 30 - - name: Backing up old keycloak - become: yes - shell: "cp -rf {{ keycloak_dir }} {{ keycloak_dir }}_old && chown -R keycloak:keycloak {{ keycloak_dir }}_old" - - name: make sure keycloak path exists - become: yes - file: - path: "{{ keycloak_dir }}_new" - state: directory - owner: keycloak - group: keycloak - - name: copy and unarchiving new keycloak 6.0.1 - become: yes - unarchive: - src: "{{ keycloak_zip }}" - dest: "/opt/keycloak_new" - owner: keycloak - group: keycloak - - name: Renaming keycloak artifact - become: yes - shell: "mv {{ keycloak_dir }}_new/sunbird_auth_1.0v/* {{ keycloak_dir }}_new/ ; rm -rf {{ keycloak_dir }}_new/sunbird_auth_1.0v ; chown -R keycloak:keycloak {{ keycloak_dir }}_new" - - name: Copying old files to new keycloak for migration - become: yes - become_user: keycloak - shell: "cp -rf {{ keycloak_dir }}_old/{{ item }}/* {{ keycloak_dir }}_new/{{ item }}/" - with_items: - - standalone - - domain - - name: Running migration - become: yes - become_user: keycloak - shell: "bash {{ item }}" - with_items: - - "bin/jboss-cli.sh --file=bin/migrate-standalone.cli" - - "bin/jboss-cli.sh --file=bin/migrate-standalone-ha.cli" - args: - chdir: "{{ keycloak_dir }}_new" +# - hosts: keycloak +# vars: +# keycloak_dir: /opt/keycloak +# vars_files: +# - "{{ inventory_dir }}/secrets.yml" +# tasks: +# - name: Stopping keycloak +# become: yes +# shell: /bin/bash -c "/etc/init.d/keycloak stop || pkill keycloak" +# failed_when: false +# - name: Waiting for keycloak to exit +# wait_for: +# port: 8080 +# state: stopped +# timeout: 30 +# - name: Backing up old keycloak +# become: yes +# shell: "cp -rf {{ keycloak_dir }} {{ keycloak_dir }}_old && chown -R keycloak:keycloak {{ keycloak_dir }}_old" +# - name: make sure keycloak path exists +# become: yes +# file: +# path: "{{ keycloak_dir }}_new" +# state: directory +# owner: keycloak +# group: keycloak +# - name: copy and unarchiving new keycloak 6.0.1 +# become: yes +# unarchive: +# src: "{{ keycloak_zip }}" +# dest: "/opt/keycloak_new" +# owner: keycloak +# group: keycloak +# - name: Renaming keycloak artifact +# become: yes +# shell: "mv {{ keycloak_dir }}_new/sunbird_auth_1.0v/* {{ keycloak_dir }}_new/ ; rm -rf {{ keycloak_dir }}_new/sunbird_auth_1.0v ; chown -R keycloak:keycloak {{ keycloak_dir }}_new" +# - name: Copying old files to new keycloak for migration +# become: yes +# become_user: keycloak +# shell: "cp -rf {{ keycloak_dir }}_old/{{ item }}/* {{ keycloak_dir }}_new/{{ item }}/" +# with_items: +# - standalone +# - domain +# - name: Running migration +# become: yes +# become_user: keycloak +# shell: "bash {{ item }}" +# with_items: +# - "bin/jboss-cli.sh --file=bin/migrate-standalone.cli" +# - "bin/jboss-cli.sh --file=bin/migrate-standalone-ha.cli" +# args: +# chdir: "{{ keycloak_dir }}_new" From 75b0f8b1f180deffe9d295ac2f4e5c4e9d19e6b3 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 20:27:01 +0530 Subject: [PATCH 0054/2894] Issue #000 feat: Keycloak migration --- ansible/keycloak-migration.yaml | 135 ++++++++++++++------------------ 1 file changed, 58 insertions(+), 77 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 13c7e25cb..e55148708 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -10,105 +10,86 @@ - "{{ inventory_dir }}/secrets.yml" vars: db_backup_name: "/root/keycloak{{ ansible_date_time.epoch }}.sql" - # keycloak_postgres_host: postgres-backup.postgres.database.azure.com no_log: true tasks: - - name: dropping keycloak db + - name: taking backup of keycloak db become: yes postgresql_db: - name: "{{ item }}" - state: absent + name: "{{ keycloak_postgres_database }}" + state: dump + target: "{{ db_backup_name }}" login_user: "{{keycloak_postgres_user }}" login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" port: 5432 - with_items: - - "{{ keycloak_postgres_database }}" - - "{{ keycloak_postgres_database }}_301" - # - name: taking backup of keycloak db - # become: yes - # postgresql_db: - # name: "{{ keycloak_postgres_database }}" - # state: dump - # target: "{{ db_backup_name }}" - # login_user: "{{keycloak_postgres_user }}" - # login_password: "{{ keycloak_postgres_password }}" - # login_host: "{{ keycloak_postgres_host }}" - # port: 5432 - name: creating backup db {{ keycloak_postgres_database }}_301 postgresql_db: - name: "{{ item }}" + name: "{{ keycloak_postgres_database }}_301" state: present login_user: "{{ keycloak_postgres_user }}" login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" - with_items: - - "{{ keycloak_postgres_database }}" - - "{{ keycloak_postgres_database }}_301" register: status - name: creating backup keycloak old db {{ keycloak_postgres_database }}_301 for the first time become: yes postgresql_db: - name: "{{ keycloak_postgres_database }}" + name: "{{ keycloak_postgres_database }}_301" state: restore - target: /root/keycloak1570714667.sql + target: "{{ db_backup_name }}" login_user: "{{ keycloak_postgres_user }}" login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" port: 5432 - with_items: - - "{{ keycloak_postgres_database }}" - - "{{ keycloak_postgres_database }}_301" when: status.changed -# - hosts: keycloak -# vars: -# keycloak_dir: /opt/keycloak -# vars_files: -# - "{{ inventory_dir }}/secrets.yml" -# tasks: -# - name: Stopping keycloak -# become: yes -# shell: /bin/bash -c "/etc/init.d/keycloak stop || pkill keycloak" -# failed_when: false -# - name: Waiting for keycloak to exit -# wait_for: -# port: 8080 -# state: stopped -# timeout: 30 -# - name: Backing up old keycloak -# become: yes -# shell: "cp -rf {{ keycloak_dir }} {{ keycloak_dir }}_old && chown -R keycloak:keycloak {{ keycloak_dir }}_old" -# - name: make sure keycloak path exists -# become: yes -# file: -# path: "{{ keycloak_dir }}_new" -# state: directory -# owner: keycloak -# group: keycloak -# - name: copy and unarchiving new keycloak 6.0.1 -# become: yes -# unarchive: -# src: "{{ keycloak_zip }}" -# dest: "/opt/keycloak_new" -# owner: keycloak -# group: keycloak -# - name: Renaming keycloak artifact -# become: yes -# shell: "mv {{ keycloak_dir }}_new/sunbird_auth_1.0v/* {{ keycloak_dir }}_new/ ; rm -rf {{ keycloak_dir }}_new/sunbird_auth_1.0v ; chown -R keycloak:keycloak {{ keycloak_dir }}_new" -# - name: Copying old files to new keycloak for migration -# become: yes -# become_user: keycloak -# shell: "cp -rf {{ keycloak_dir }}_old/{{ item }}/* {{ keycloak_dir }}_new/{{ item }}/" -# with_items: -# - standalone -# - domain -# - name: Running migration -# become: yes -# become_user: keycloak -# shell: "bash {{ item }}" -# with_items: -# - "bin/jboss-cli.sh --file=bin/migrate-standalone.cli" -# - "bin/jboss-cli.sh --file=bin/migrate-standalone-ha.cli" -# args: -# chdir: "{{ keycloak_dir }}_new" +- hosts: keycloak + vars: + keycloak_dir: /opt/keycloak + vars_files: + - "{{ inventory_dir }}/secrets.yml" + tasks: + - name: Stopping keycloak + become: yes + shell: /bin/bash -c "/etc/init.d/keycloak stop || pkill keycloak" + failed_when: false + - name: Waiting for keycloak to exit + wait_for: + port: 8080 + state: stopped + timeout: 30 + - name: Backing up old keycloak + become: yes + shell: "cp -rf {{ keycloak_dir }} {{ keycloak_dir }}_old && chown -R keycloak:keycloak {{ keycloak_dir }}_old" + - name: make sure keycloak path exists + become: yes + file: + path: "{{ keycloak_dir }}_new" + state: directory + owner: keycloak + group: keycloak + - name: copy and unarchiving new keycloak 6.0.1 + become: yes + unarchive: + src: "{{ keycloak_zip }}" + dest: "/opt/keycloak_new" + owner: keycloak + group: keycloak + - name: Renaming keycloak artifact + become: yes + shell: "mv {{ keycloak_dir }}_new/sunbird_auth_1.0v/* {{ keycloak_dir }}_new/ ; rm -rf {{ keycloak_dir }}_new/sunbird_auth_1.0v ; chown -R keycloak:keycloak {{ keycloak_dir }}_new" + - name: Copying old files to new keycloak for migration + become: yes + become_user: keycloak + shell: "cp -rf {{ keycloak_dir }}_old/{{ item }}/* {{ keycloak_dir }}_new/{{ item }}/" + with_items: + - standalone + - domain + - name: Running migration + become: yes + become_user: keycloak + shell: "bash {{ item }}" + with_items: + - "bin/jboss-cli.sh --file=bin/migrate-standalone.cli" + - "bin/jboss-cli.sh --file=bin/migrate-standalone-ha.cli" + args: + chdir: "{{ keycloak_dir }}_new" From d180b71fabcf5187ad03b138ce4b90242f77d9de Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 20:28:42 +0530 Subject: [PATCH 0055/2894] Issue #000 feat: removing keycloak new and old prior creation --- ansible/keycloak-migration.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index e55148708..64b0b9143 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -57,6 +57,15 @@ port: 8080 state: stopped timeout: 30 + - name: deleting keycloak new and old directory if present + become: yes + file: + path: "{{ item }}" + state: absent + force: yes + with_items: + - "{{ keycloak_dir }}_new" + - "{{ keycloak_dir }}_old" - name: Backing up old keycloak become: yes shell: "cp -rf {{ keycloak_dir }} {{ keycloak_dir }}_old && chown -R keycloak:keycloak {{ keycloak_dir }}_old" From eed81a8448794336597d622e8e62b638109b514f Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 21:31:51 +0530 Subject: [PATCH 0056/2894] Issue #000 feat: reverting the keycloak migration from upstream keycloak --- ansible/keycloak-migration.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 64b0b9143..d274b0922 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -76,23 +76,23 @@ state: directory owner: keycloak group: keycloak - - name: copy and unarchiving new keycloak 6.0.1 + - name: unarchive keycloak become: yes unarchive: - src: "{{ keycloak_zip }}" - dest: "/opt/keycloak_new" + src: https://sunbirdpublic.blob.core.windows.net/installation/keycloak-6.0.1.tar.gz + dest: "{{ keycloak_dir }}_new" + extra_opts: ['--strip-components=1'] + remote_src: yes owner: keycloak group: keycloak - - name: Renaming keycloak artifact - become: yes - shell: "mv {{ keycloak_dir }}_new/sunbird_auth_1.0v/* {{ keycloak_dir }}_new/ ; rm -rf {{ keycloak_dir }}_new/sunbird_auth_1.0v ; chown -R keycloak:keycloak {{ keycloak_dir }}_new" - name: Copying old files to new keycloak for migration become: yes become_user: keycloak - shell: "cp -rf {{ keycloak_dir }}_old/{{ item }}/* {{ keycloak_dir }}_new/{{ item }}/" + shell: "cp -rf {{ keycloak_dir }}_old/{{ item }} {{ keycloak_dir }}_new/{{ item }}" with_items: - standalone - domain + - modules/system/layers/keycloak/org/postgresql - name: Running migration become: yes become_user: keycloak From 789b851163b7bac0803528b65640789c3406db90 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 22:51:00 +0530 Subject: [PATCH 0057/2894] Issue #000 feat: changing deployment for keycloak --- ansible/roles/keycloak-deploy/tasks/deploy.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ansible/roles/keycloak-deploy/tasks/deploy.yml b/ansible/roles/keycloak-deploy/tasks/deploy.yml index 78d0e7783..4234a26c5 100644 --- a/ansible/roles/keycloak-deploy/tasks/deploy.yml +++ b/ansible/roles/keycloak-deploy/tasks/deploy.yml @@ -49,11 +49,15 @@ - name: Extarct the folder unarchive: - src: "{{ artifact }}" + src: "{{ artifact_path }}" dest: "{{ keycloak_home }}" owner: "{{ wildfly_user }}" group: "{{ wildfly_group }}" +- name: Creating keycloak directory in proper structure + become: yes + shell: "cd {{ keycloak_home }} ; mv /sunbird_auth_1.0v/* ./ ; rm -rf sunbird_auth_1.0v; chown -R keycloak:keycloak {{ keycloak_home }}" + - name: Create required directories file: path: "{{ item.dest }}" From 8a6b89138f88e18a9b2cefada838e19848ebdc8a Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 23:01:52 +0530 Subject: [PATCH 0058/2894] Issue #000 feat: removing clean workspace --- pipelines/deploy/keycloak/Jenkinsfile | 1 - 1 file changed, 1 deletion(-) diff --git a/pipelines/deploy/keycloak/Jenkinsfile b/pipelines/deploy/keycloak/Jenkinsfile index 087ce5ee8..a664f52e7 100644 --- a/pipelines/deploy/keycloak/Jenkinsfile +++ b/pipelines/deploy/keycloak/Jenkinsfile @@ -8,7 +8,6 @@ node() { String ANSI_YELLOW = "\u001B[33m" stage('checkout public repo') { - cleanWs() checkout scm sh "git clone https://github.com/project-sunbird/sunbird-auth.git -b ${sunbird_auth_branch_or_tag}" } From 1f483925d5f4d3e8bd91dfd024f38c8dcc8ba836 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 23:02:47 +0530 Subject: [PATCH 0059/2894] Issue #000 fix: path for sunbird_auth_1 --- ansible/roles/keycloak-deploy/tasks/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/keycloak-deploy/tasks/deploy.yml b/ansible/roles/keycloak-deploy/tasks/deploy.yml index 4234a26c5..ca246942f 100644 --- a/ansible/roles/keycloak-deploy/tasks/deploy.yml +++ b/ansible/roles/keycloak-deploy/tasks/deploy.yml @@ -56,7 +56,7 @@ - name: Creating keycloak directory in proper structure become: yes - shell: "cd {{ keycloak_home }} ; mv /sunbird_auth_1.0v/* ./ ; rm -rf sunbird_auth_1.0v; chown -R keycloak:keycloak {{ keycloak_home }}" + shell: "cd {{ keycloak_home }} ; mv sunbird_auth_1.0v/* ./ ; rm -rf sunbird_auth_1.0v; chown -R keycloak:keycloak {{ keycloak_home }}" - name: Create required directories file: From 1b65cf40dab2625554a5d808a770959a1f6c42fe Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Fri, 11 Oct 2019 00:10:55 +0530 Subject: [PATCH 0060/2894] Issue #000 fix: keycloak copy path --- ansible/keycloak-migration.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index d274b0922..4121a96d5 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -88,7 +88,7 @@ - name: Copying old files to new keycloak for migration become: yes become_user: keycloak - shell: "cp -rf {{ keycloak_dir }}_old/{{ item }} {{ keycloak_dir }}_new/{{ item }}" + shell: "cp -rf {{ keycloak_dir }}_old/{{ item }}/* {{ keycloak_dir }}_new/{{ item }}/" with_items: - standalone - domain From 179a2cdb7abfe7f925af44b5c41e98d5ac611795 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Fri, 11 Oct 2019 09:24:23 +0530 Subject: [PATCH 0061/2894] Issue #000 feat: Updating postgres driver --- ansible/roles/keycloak-deploy/templates/module.xml.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/keycloak-deploy/templates/module.xml.j2 b/ansible/roles/keycloak-deploy/templates/module.xml.j2 index bcfe36a40..11f2c5247 100644 --- a/ansible/roles/keycloak-deploy/templates/module.xml.j2 +++ b/ansible/roles/keycloak-deploy/templates/module.xml.j2 @@ -1,7 +1,7 @@ - + - + From 623cece866ee7c08406e6a8347b13ee60713fd65 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Fri, 11 Oct 2019 09:27:42 +0530 Subject: [PATCH 0062/2894] Issue #000 feat: upgrading keycloak-standalone-ha.xml to 6.0.1 --- .../templates/standalone-ha.xml | 324 +++++++++++------- 1 file changed, 204 insertions(+), 120 deletions(-) diff --git a/ansible/roles/keycloak-deploy/templates/standalone-ha.xml b/ansible/roles/keycloak-deploy/templates/standalone-ha.xml index d705fd885..392c23f86 100644 --- a/ansible/roles/keycloak-deploy/templates/standalone-ha.xml +++ b/ansible/roles/keycloak-deploy/templates/standalone-ha.xml @@ -1,6 +1,6 @@ - + @@ -9,10 +9,8 @@ - - @@ -22,7 +20,12 @@ + + + + + @@ -39,6 +42,11 @@ + + + + + @@ -53,7 +61,7 @@ - + @@ -62,7 +70,8 @@ - + + @@ -77,7 +86,7 @@ - + @@ -92,20 +101,12 @@ - - - - - - - - - - - + + + @@ -117,7 +118,6 @@ - @@ -128,9 +128,10 @@ - + + - + jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE h2 @@ -138,40 +139,13 @@ sa - - jdbc:h2:${jboss.server.data.dir}/keycloak;AUTO_SERVER=TRUE - h2 - - sa - sa - - - - - jdbc:postgresql://thisnotwork:5432/keycloak + jdbc:postgresql://{{keycloak_postgres_host}}:5432/{{ keycloak_postgres_database }}?sslmode=require postgresql - - 100 - {{ keycloak_postgres_user }} {{ keycloak_postgres_password }} - - true - 10000 - - - @@ -205,7 +179,7 @@ - + @@ -215,9 +189,8 @@ - - + @@ -233,7 +206,12 @@ - + + + + @@ -242,47 +220,50 @@ + - + - - + + - + - + - - - - + + + + + + - + - + - + - - + + - + - + @@ -290,28 +271,28 @@ - + - + - + - + - + - + - + @@ -330,17 +311,16 @@ - - + - + - + - + @@ -349,28 +329,21 @@ - + - - {{groups['keycloak']|join('[7600],')}}[7600] - - 10 - 3000 - 2 - - + - - + + - + @@ -382,24 +355,22 @@ - - + - - + + - + - - + @@ -410,7 +381,107 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -427,11 +498,6 @@ - - - - - @@ -440,25 +506,35 @@ + + + + + - - + + + + - + + + + - + + - - + @@ -468,10 +544,6 @@ - - - - auth @@ -522,7 +594,7 @@ default - + @@ -537,6 +609,20 @@ + + ${keycloak.x509cert.lookup.provider:default} + + + + request + + + + + + + + @@ -556,12 +642,10 @@ - + - - - + From 6d7306d6eeafe31d553bde117b22183e7c8ffa80 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Fri, 11 Oct 2019 09:47:42 +0530 Subject: [PATCH 0063/2894] Issue #000 feat: using checkout scm to clone sunbird-auth --- pipelines/deploy/keycloak/Jenkinsfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pipelines/deploy/keycloak/Jenkinsfile b/pipelines/deploy/keycloak/Jenkinsfile index a664f52e7..942f97bcd 100644 --- a/pipelines/deploy/keycloak/Jenkinsfile +++ b/pipelines/deploy/keycloak/Jenkinsfile @@ -9,7 +9,9 @@ node() { stage('checkout public repo') { checkout scm - sh "git clone https://github.com/project-sunbird/sunbird-auth.git -b ${sunbird_auth_branch_or_tag}" + checkout([$class: 'GitSCM', branches: [[name: "${sunbird_auth_branch_or_tag}"]], + extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'sunbird-auth']], + userRemoteConfigs: [[url: 'https://github.com/project-sunbird/sunbird-auth.git']]]) } ansiColor('xterm') { stage('get artifact') { From 2673ed12290a7103db98350e9c3f882de5c6e0cb Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 24 Oct 2019 15:08:19 +0530 Subject: [PATCH 0064/2894] Issue #000 feat: DB rollback script for fixing partial keycloak migration --- .../keycloak_301_rollback.sql | 26 +++++++++++++++++++ ansible/keycloak-migration.yaml | 16 ++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 ansible/generic_templates/keycloak_301_rollback.sql diff --git a/ansible/generic_templates/keycloak_301_rollback.sql b/ansible/generic_templates/keycloak_301_rollback.sql new file mode 100644 index 000000000..f5684efbe --- /dev/null +++ b/ansible/generic_templates/keycloak_301_rollback.sql @@ -0,0 +1,26 @@ +ALTER TABLE REALM_SUPPORTED_LOCALES ADD COLUMN id SERIAL; +select count(*) from public.REALM_SUPPORTED_LOCALES; +DELETE FROM REALM_SUPPORTED_LOCALES a USING REALM_SUPPORTED_LOCALES b WHERE a.id < b.id AND a.value = b.value; +select count(*) from public.REALM_SUPPORTED_LOCALES; +ALTER TABLE REALM_SUPPORTED_LOCALES DROP COLUMN id; +ALTER TABLE composite_role ADD COLUMN id SERIAL; +select count(*) from public.composite_role; +DELETE FROM composite_role a USING composite_role b WHERE a.id < b.id AND a.composite = b.composite AND a.child_role = b.child_role; +select count(*) from public.composite_role; +ALTER TABLE composite_role DROP COLUMN id; +ALTER TABLE realm_events_listeners ADD COLUMN id SERIAL; +select count(*) from public.realm_events_listeners; +DELETE FROM realm_events_listeners a USING realm_events_listeners b WHERE a.id < b.id AND a.realm_id = b.realm_id AND a.value = b.value; +select count(*) from public.realm_events_listeners; +ALTER TABLE realm_events_listeners DROP COLUMN id; +ALTER TABLE redirect_uris ADD COLUMN id SERIAL; +select count(*) from public.redirect_uris; +DELETE FROM redirect_uris a USING redirect_uris b WHERE a.id < b.id AND a.client_id = b.client_id AND a.value = b.value; +select count(*) from public.redirect_uris; +ALTER TABLE redirect_uris DROP COLUMN id; +ALTER TABLE web_origins ADD COLUMN id SERIAL; +select count(*) from public.web_origins; +DELETE FROM web_origins a USING web_origins b WHERE a.id < b.id AND a.client_id = b.client_id AND a.value = b.value; +select count(*) from public.web_origins; +ALTER TABLE web_origins DROP COLUMN id; +ALTER TABLE public.USER_ENTITY DROP COLUMN NOT_BEFORE; diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 4121a96d5..0a0786885 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -41,6 +41,22 @@ login_host: "{{ keycloak_postgres_host }}" port: 5432 when: status.changed + - name: copying keycloak db revert script. + copy: + src: generic_templates/keycloak_301_rollback.sql + dest: /tmp/keycloak_301_rollback.sql + when: fail_db is defined + - name: Reverting back the keycloak db if migration failed. Please use this with caution + become: yes + postgresql_db: + name: "{{ keycloak_postgres_database }}" + state: restore + target: /tmp/keycloak_301_rollback.sql + login_user: "{{keycloak_postgres_user }}" + login_password: "{{ keycloak_postgres_password }}" + login_host: "{{ keycloak_postgres_host }}" + port: 5432 + when: fail_db is defined - hosts: keycloak vars: From 5446baf27e9c04bb4c522ea721fc926e4f681bd7 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 24 Oct 2019 15:31:49 +0530 Subject: [PATCH 0065/2894] Issue #000 feat: completing keycloak migration script --- ansible/keycloak-migration.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 0a0786885..43100651f 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -108,7 +108,23 @@ with_items: - standalone - domain + - name: Copying old files to new keycloak for migration + become: yes + become_user: keycloak + shell: "cp -rf {{ keycloak_dir }}_old/{{ item }} {{ keycloak_dir }}_new/{{ item }}" + with_items: - modules/system/layers/keycloak/org/postgresql + - name: Deleting unnecessary fields from standalone.xml file + become: yes + become_user: keycloak + lineinfile: + path: "{{keycloak_dir }}_new/standalone/configuration/standalone-ha.xml" + state: absent + regexp: "{{ item }}" + with_items: + - '.*' + - '.*' + - '.*' - name: Running migration become: yes become_user: keycloak @@ -118,3 +134,10 @@ - "bin/jboss-cli.sh --file=bin/migrate-standalone-ha.cli" args: chdir: "{{ keycloak_dir }}_new" + - name: Starting keycloak to make sure migration completed + become: yes + become_user: keycloak + shell: ./bin/standalone.sh -b 0.0.0.0 -bprivate=$(hostname -i) --server-config standalone-ha.xml + args: + chdir: "{{ keycloak_dir }}_new" + From f51a1485ff109f0b8f03f302419fa21436dd2d0c Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 24 Oct 2019 16:49:35 +0530 Subject: [PATCH 0066/2894] Adding reference jira ticket --- ansible/keycloak-migration.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 43100651f..ebe8a47bc 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -4,6 +4,8 @@ # 1. Keycloak build artifact with 6.0.1 # 2. Creates /opt/keycloak_new directory for migration # 3. Create /opt/keyloak_old with current keycloak backup +# +# Ref: https://project-sunbird.atlassian.net/wiki/spaces/UM/pages/1087504491/KeyCloak+6.0.1+upgrade - hosts: local vars_files: From 20fc5fe50d32ac88aba03d511fe1b0d313669f68 Mon Sep 17 00:00:00 2001 From: G33tha Date: Wed, 30 Oct 2019 13:18:23 +0530 Subject: [PATCH 0067/2894] Issue #000 feat: added helm charts and ansible roles --- ansible/helm.yml | 9 ++ ansible/inventory/env/group_vars/all.yml | 8 ++ .../roles/sunbird-deploy/defaults/main.yml | 1 + ansible/roles/sunbird-deploy/tasks/main.yml | 10 ++ helm_charts/Chart.yaml | 5 + helm_charts/sunbird/.helmignore | 22 +++ helm_charts/sunbird/Chart.yaml | 5 + .../sunbird/charts/apimanager/Chart.yaml | 5 + .../apimanager/templates/configmap.yaml | 13 ++ .../apimanager/templates/deployment.yaml | 62 +++++++++ .../sunbird/charts/apimanager/values.j2 | 34 +++++ helm_charts/sunbird/charts/cert/Chart.yaml | 5 + .../charts/cert/templates/configmap.yaml | 11 ++ .../charts/cert/templates/deployment.yaml | 52 +++++++ helm_charts/sunbird/charts/cert/values.j2 | 31 +++++ .../sunbird/charts/content/.helmignore | 22 +++ helm_charts/sunbird/charts/content/Chart.yaml | 5 + .../charts/content/templates/_helpers.tpl | 45 ++++++ .../charts/content/templates/configmap.yaml | 10 ++ .../charts/content/templates/deployment.yaml | 52 +++++++ helm_charts/sunbird/charts/content/values.j2 | 72 ++++++++++ helm_charts/sunbird/charts/enc/Chart.yaml | 5 + .../charts/enc/templates/configmap.yaml | 10 ++ .../charts/enc/templates/deployment.yaml | 52 +++++++ helm_charts/sunbird/charts/enc/values.j2 | 34 +++++ .../sunbird/charts/learner/.helmignore | 22 +++ helm_charts/sunbird/charts/learner/Chart.yaml | 5 + .../charts/learner/templates/_helpers.tpl | 45 ++++++ .../charts/learner/templates/configmap.yaml | 10 ++ .../charts/learner/templates/deployment.yaml | 52 +++++++ helm_charts/sunbird/charts/learner/values.j2 | 128 +++++++++++++++++ helm_charts/sunbird/charts/lms/Chart.yaml | 5 + .../charts/lms/templates/configmap.yaml | 10 ++ .../charts/lms/templates/deployment.yaml | 52 +++++++ helm_charts/sunbird/charts/lms/values.j2 | 131 ++++++++++++++++++ helm_charts/sunbird/charts/player/.helmignore | 22 +++ helm_charts/sunbird/charts/player/Chart.yaml | 5 + .../charts/player/templates/_helpers.tpl | 45 ++++++ .../charts/player/templates/configmap.yaml | 10 ++ .../charts/player/templates/deployment.yaml | 52 +++++++ helm_charts/sunbird/charts/player/values.j2 | 97 +++++++++++++ .../sunbird/charts/telemetry/.helmignore | 22 +++ .../sunbird/charts/telemetry/Chart.yaml | 5 + .../charts/telemetry/templates/_helpers.tpl | 45 ++++++ .../charts/telemetry/templates/configmap.yaml | 10 ++ .../telemetry/templates/deployment.yaml | 52 +++++++ .../sunbird/charts/telemetry/values.j2 | 28 ++++ helm_charts/sunbird/charts/userorg/Chart.yaml | 5 + .../charts/userorg/templates/configmap.yaml | 10 ++ .../charts/userorg/templates/deployment.yaml | 52 +++++++ helm_charts/sunbird/charts/userorg/values.j2 | 41 ++++++ pipelines/helm/Jenkinsfile | 31 +++++ 52 files changed, 1572 insertions(+) create mode 100644 ansible/helm.yml create mode 100644 ansible/roles/sunbird-deploy/defaults/main.yml create mode 100644 ansible/roles/sunbird-deploy/tasks/main.yml create mode 100644 helm_charts/Chart.yaml create mode 100644 helm_charts/sunbird/.helmignore create mode 100644 helm_charts/sunbird/Chart.yaml create mode 100755 helm_charts/sunbird/charts/apimanager/Chart.yaml create mode 100755 helm_charts/sunbird/charts/apimanager/templates/configmap.yaml create mode 100755 helm_charts/sunbird/charts/apimanager/templates/deployment.yaml create mode 100755 helm_charts/sunbird/charts/apimanager/values.j2 create mode 100644 helm_charts/sunbird/charts/cert/Chart.yaml create mode 100644 helm_charts/sunbird/charts/cert/templates/configmap.yaml create mode 100644 helm_charts/sunbird/charts/cert/templates/deployment.yaml create mode 100644 helm_charts/sunbird/charts/cert/values.j2 create mode 100644 helm_charts/sunbird/charts/content/.helmignore create mode 100644 helm_charts/sunbird/charts/content/Chart.yaml create mode 100644 helm_charts/sunbird/charts/content/templates/_helpers.tpl create mode 100644 helm_charts/sunbird/charts/content/templates/configmap.yaml create mode 100644 helm_charts/sunbird/charts/content/templates/deployment.yaml create mode 100644 helm_charts/sunbird/charts/content/values.j2 create mode 100644 helm_charts/sunbird/charts/enc/Chart.yaml create mode 100644 helm_charts/sunbird/charts/enc/templates/configmap.yaml create mode 100644 helm_charts/sunbird/charts/enc/templates/deployment.yaml create mode 100644 helm_charts/sunbird/charts/enc/values.j2 create mode 100644 helm_charts/sunbird/charts/learner/.helmignore create mode 100644 helm_charts/sunbird/charts/learner/Chart.yaml create mode 100644 helm_charts/sunbird/charts/learner/templates/_helpers.tpl create mode 100644 helm_charts/sunbird/charts/learner/templates/configmap.yaml create mode 100644 helm_charts/sunbird/charts/learner/templates/deployment.yaml create mode 100644 helm_charts/sunbird/charts/learner/values.j2 create mode 100644 helm_charts/sunbird/charts/lms/Chart.yaml create mode 100644 helm_charts/sunbird/charts/lms/templates/configmap.yaml create mode 100644 helm_charts/sunbird/charts/lms/templates/deployment.yaml create mode 100644 helm_charts/sunbird/charts/lms/values.j2 create mode 100644 helm_charts/sunbird/charts/player/.helmignore create mode 100644 helm_charts/sunbird/charts/player/Chart.yaml create mode 100644 helm_charts/sunbird/charts/player/templates/_helpers.tpl create mode 100644 helm_charts/sunbird/charts/player/templates/configmap.yaml create mode 100644 helm_charts/sunbird/charts/player/templates/deployment.yaml create mode 100644 helm_charts/sunbird/charts/player/values.j2 create mode 100644 helm_charts/sunbird/charts/telemetry/.helmignore create mode 100644 helm_charts/sunbird/charts/telemetry/Chart.yaml create mode 100644 helm_charts/sunbird/charts/telemetry/templates/_helpers.tpl create mode 100644 helm_charts/sunbird/charts/telemetry/templates/configmap.yaml create mode 100644 helm_charts/sunbird/charts/telemetry/templates/deployment.yaml create mode 100644 helm_charts/sunbird/charts/telemetry/values.j2 create mode 100644 helm_charts/sunbird/charts/userorg/Chart.yaml create mode 100644 helm_charts/sunbird/charts/userorg/templates/configmap.yaml create mode 100644 helm_charts/sunbird/charts/userorg/templates/deployment.yaml create mode 100644 helm_charts/sunbird/charts/userorg/values.j2 create mode 100644 pipelines/helm/Jenkinsfile diff --git a/ansible/helm.yml b/ansible/helm.yml new file mode 100644 index 000000000..ff7b9629e --- /dev/null +++ b/ansible/helm.yml @@ -0,0 +1,9 @@ +--- +- hosts: local + gather_facts: no + vars_files: + - "{{inventory_dir}}/secrets.yml" + environment: + KUBECONFIG: "{{ kubeconfig_path }}" + roles: + - sunbird-deploy diff --git a/ansible/inventory/env/group_vars/all.yml b/ansible/inventory/env/group_vars/all.yml index eb51998eb..9a27313d7 100644 --- a/ansible/inventory/env/group_vars/all.yml +++ b/ansible/inventory/env/group_vars/all.yml @@ -678,3 +678,11 @@ kafka_assessment_topic: "{{env_name}}.telemetry.assess" # Portal vars for reports sunbird_portal_azure_storage_account: "{{sunbird_azure_storage_account}}" sunbird_portal_azure_storage_key: "{{sunbird_azure_storage_key}}" + +########### kubernetes variables ############## + +sunbird_apimanager_service_base_url: "http://apimanager-service.{{namespace}}.svc.cluster.local:8000" +sunbird_telemetry_service_url: "http://telemetry-service.{{namespace}}.svc.cluster.local:9001" +sunbird_content_service_url: "http://content-service.{{namespace}}.svc.cluster.local:5000" +sunbird_cert_service_url: "http://cert-service.{{namespace}}.svc.cluster.local:9000" +sunbird_learner_service_url: "http://learner-service.{{namespace}}.svc.cluster.local:9000" \ No newline at end of file diff --git a/ansible/roles/sunbird-deploy/defaults/main.yml b/ansible/roles/sunbird-deploy/defaults/main.yml new file mode 100644 index 000000000..7bb151ec0 --- /dev/null +++ b/ansible/roles/sunbird-deploy/defaults/main.yml @@ -0,0 +1 @@ +#chart_path: \ No newline at end of file diff --git a/ansible/roles/sunbird-deploy/tasks/main.yml b/ansible/roles/sunbird-deploy/tasks/main.yml new file mode 100644 index 000000000..c34fd59fe --- /dev/null +++ b/ansible/roles/sunbird-deploy/tasks/main.yml @@ -0,0 +1,10 @@ + +- name: rename template + template: + src: "{{ chart_path }}/values.j2" + dest: "{{ chart_path }}/values.yaml" + + +- name: helm install + shell: helm upgrade --install {{ release_name }} {{ chart_path }} --debug + #shell: helm template {{ chart_path }} > /tmp/test.yaml diff --git a/helm_charts/Chart.yaml b/helm_charts/Chart.yaml new file mode 100644 index 000000000..aa9e76e07 --- /dev/null +++ b/helm_charts/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for sunbird +name: sunbird +version: 0.1.0 diff --git a/helm_charts/sunbird/.helmignore b/helm_charts/sunbird/.helmignore new file mode 100644 index 000000000..50af03172 --- /dev/null +++ b/helm_charts/sunbird/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/helm_charts/sunbird/Chart.yaml b/helm_charts/sunbird/Chart.yaml new file mode 100644 index 000000000..13ab481d1 --- /dev/null +++ b/helm_charts/sunbird/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: sunbird +version: 0.1.0 diff --git a/helm_charts/sunbird/charts/apimanager/Chart.yaml b/helm_charts/sunbird/charts/apimanager/Chart.yaml new file mode 100755 index 000000000..33becb417 --- /dev/null +++ b/helm_charts/sunbird/charts/apimanager/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: apimanager +version: 0.1.0 diff --git a/helm_charts/sunbird/charts/apimanager/templates/configmap.yaml b/helm_charts/sunbird/charts/apimanager/templates/configmap.yaml new file mode 100755 index 000000000..8c154993c --- /dev/null +++ b/helm_charts/sunbird/charts/apimanager/templates/configmap.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +data: + {{- range $key, $val := .Values.apimanagerenv }} + {{ $key }}: {{ $val }} + {{- end }} + {{- range $key, $val := .Values.apimanagerenvOptional }} + {{ $key }}: {{ $val }} + {{- end }} +kind: ConfigMap +metadata: + creationTimestamp: null + name: {{ .Chart.Name }}-config + namespace: {{ .Values.namespace }} \ No newline at end of file diff --git a/helm_charts/sunbird/charts/apimanager/templates/deployment.yaml b/helm_charts/sunbird/charts/apimanager/templates/deployment.yaml new file mode 100755 index 000000000..70e3ced63 --- /dev/null +++ b/helm_charts/sunbird/charts/apimanager/templates/deployment.yaml @@ -0,0 +1,62 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Chart.Name }} + namespace: {{ .Values.namespace }} +spec: + replicas: {{ .Values.replicaCount }} + strategy: + type: {{ .Values.strategy.type }} + rollingUpdate: + maxSurge: {{ .Values.strategy.maxsurge }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} + selector: + matchLabels: + app: {{ .Chart.Name }} + template: + metadata: + annotations: + readiness.status.sidecar.istio.io/applicationPorts: "" + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + labels: + app: {{ .Chart.Name }} + spec: + imagePullSecrets: + - name: {{ .Values.imagepullsecrets }} + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" + envFrom: + - configMapRef: + name: {{ .Chart.Name }}-config + resources: + requests: + cpu: {{ quote .Values.resources.cpu }} + memory: {{ quote .Values.resources.memory }} + ports: + - containerPort: {{ .Values.network.port }} + name: network + - containerPort: {{ .Values.service.port }} + name: service + +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ .Chart.Name }}-service + namespace: {{ .Values.namespace }} + labels: + app: {{ .Chart.Name }} +spec: + ports: + - name: network + protocol: TCP + port: {{ .Values.network.port }} + targetPort: {{ .Values.network.targetport }} + - name: service + protocol: TCP + port: {{ .Values.service.port }} + targetPort: {{ .Values.service.targetport }} + selector: + app: {{ .Chart.Name }} # metadataname of deployment diff --git a/helm_charts/sunbird/charts/apimanager/values.j2 b/helm_charts/sunbird/charts/apimanager/values.j2 new file mode 100755 index 000000000..4340fc447 --- /dev/null +++ b/helm_charts/sunbird/charts/apimanager/values.j2 @@ -0,0 +1,34 @@ +### variables for apimanager-kong service ### + +namespace: {{ namespace }} +imagepullsecrets: {{ imagepullsecrets }} +dockerhub: {{ dockerhub }} + +replicaCount: {{replicacount|default(1)}} +repository: {{kong_repository|default('kong')}} +image_tag: {{image_tag }} +resources: + cpu: {{api_manager_cpu|default('50m')}} + memory: {{api_manager_memory|default('50Mi')}} +network: + port: 8000 + targetport: 8000 +service: + port: 8001 + targetport: 8001 +strategy: + type: RollingUpdate + maxsurge: 1 + maxunavailable: 0 + +apimanagerenv: + KONG_LOG_LEVEL: info + KONG_DATABASE: postgres + KONG_PG_HOST: {{kong_postgres_host}} + KONG_PG_SSL: "'{{kong_ssl|default('True')}}'" + KONG_PG_USER: {{kong_postgres_user}} + KONG_PG_PASSWORD: {{ kong_postgres_password }} + KONG_PG_DATABASE: {{ kong_postgres_database }} + +apimanagerenvOptional: + {{api_optional|default('')}} diff --git a/helm_charts/sunbird/charts/cert/Chart.yaml b/helm_charts/sunbird/charts/cert/Chart.yaml new file mode 100644 index 000000000..06916f3b5 --- /dev/null +++ b/helm_charts/sunbird/charts/cert/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: cert +version: 0.1.0 diff --git a/helm_charts/sunbird/charts/cert/templates/configmap.yaml b/helm_charts/sunbird/charts/cert/templates/configmap.yaml new file mode 100644 index 000000000..6c58dbbf6 --- /dev/null +++ b/helm_charts/sunbird/charts/cert/templates/configmap.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +data: + {{- range $key, $val := .Values.certenv }} + {{ $key }}: {{ $val }} + {{- end }} +kind: ConfigMap +metadata: + creationTimestamp: null + name: {{ .Chart.Name }}-config + namespace: {{ .Values.namespace }} + diff --git a/helm_charts/sunbird/charts/cert/templates/deployment.yaml b/helm_charts/sunbird/charts/cert/templates/deployment.yaml new file mode 100644 index 000000000..c974a2bd4 --- /dev/null +++ b/helm_charts/sunbird/charts/cert/templates/deployment.yaml @@ -0,0 +1,52 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Chart.Name }} + namespace: {{ .Values.namespace }} +spec: + replicas: {{ .Values.replicaCount }} + strategy: + type: {{ .Values.strategy.type }} + rollingUpdate: + maxsurge: {{ .Values.strategy.maxsurge }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} + selector: + matchLabels: + app: {{ .Chart.Name }} + template: + metadata: + annotations: + readiness.status.sidecar.istio.io/applicationPorts: "" + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + labels: + app: {{ .Chart.Name }} + spec: + imagePullSecrets: + - name: {{ .Values.imagepullsecrets }} + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" + envFrom: + - configMapRef: + name: {{ .Chart.Name }}-config + resources: + requests: + cpu: {{ quote .Values.resources.cpu }} + memory: {{ quote .Values.resources.memory }} + ports: + - containerPort: {{ .Values.network.port }} + +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ .Chart.Name }}-service + namespace: {{ .Values.namespace }} + labels: + app: {{ .Chart.Name }} +spec: + ports: + - port: {{ .Values.network.targetport }} + selector: + app: {{ .Chart.Name }} diff --git a/helm_charts/sunbird/charts/cert/values.j2 b/helm_charts/sunbird/charts/cert/values.j2 new file mode 100644 index 000000000..8abf4787f --- /dev/null +++ b/helm_charts/sunbird/charts/cert/values.j2 @@ -0,0 +1,31 @@ +### Default variable file for cert-service ### + +#release-2.3.0_48008e6 +namespace: {{ namespace }} +imagepullsecrets: {{ imagepullsecrets }} +dockerhub: {{ dockerhub }} + +replicaCount: {{replicacount|default(1)}} +repository: {{cert_repository|default('cert_service')}} +image_tag: {{image_tag }} +resources: + cpu: {{cert_service_cpu|default('50m')}} + memory: {{cert_service_memory|default('50Mi')}} +network: + port: 9011 + targetport: 9000 +strategy: + type: RollingUpdate + maxsurge: 1 + maxunavailable: 0 + +certenv: + CONTAINER_NAME: {{cert_service_container_name}} + CLOUD_STORAGE_TYPE: {{cert_service_cloud_storage_type}} + AZURE_STORAGE_SECRET: {{sunbird_azure_storage_key}} + AZURE_STORAGE_KEY: {{sunbird_azure_storage_account}} + sunbird_cert_domain_url: {{proto}}://{{proxy_server_name}} + sunbird_cert_enc_service_url: "http://enc-service.{{namespace}}.svc.cluster.local:9010" + download_link_expiry_timeout: "'600'" + + diff --git a/helm_charts/sunbird/charts/content/.helmignore b/helm_charts/sunbird/charts/content/.helmignore new file mode 100644 index 000000000..50af03172 --- /dev/null +++ b/helm_charts/sunbird/charts/content/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/helm_charts/sunbird/charts/content/Chart.yaml b/helm_charts/sunbird/charts/content/Chart.yaml new file mode 100644 index 000000000..dbf9d485c --- /dev/null +++ b/helm_charts/sunbird/charts/content/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: content +version: 0.1.0 diff --git a/helm_charts/sunbird/charts/content/templates/_helpers.tpl b/helm_charts/sunbird/charts/content/templates/_helpers.tpl new file mode 100644 index 000000000..4dda28416 --- /dev/null +++ b/helm_charts/sunbird/charts/content/templates/_helpers.tpl @@ -0,0 +1,45 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "content.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "content.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "content.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "content.labels" -}} +app.kubernetes.io/name: {{ include "content.name" . }} +helm.sh/chart: {{ include "content.chart" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} diff --git a/helm_charts/sunbird/charts/content/templates/configmap.yaml b/helm_charts/sunbird/charts/content/templates/configmap.yaml new file mode 100644 index 000000000..148a02e29 --- /dev/null +++ b/helm_charts/sunbird/charts/content/templates/configmap.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +data: + {{- range $key, $val := .Values.contentenv }} + {{ $key }}: {{ $val }} + {{- end }} +kind: ConfigMap +metadata: + creationTimestamp: null + name: {{ .Chart.Name }}-config + namespace: {{ .Values.namespace }} \ No newline at end of file diff --git a/helm_charts/sunbird/charts/content/templates/deployment.yaml b/helm_charts/sunbird/charts/content/templates/deployment.yaml new file mode 100644 index 000000000..c974a2bd4 --- /dev/null +++ b/helm_charts/sunbird/charts/content/templates/deployment.yaml @@ -0,0 +1,52 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Chart.Name }} + namespace: {{ .Values.namespace }} +spec: + replicas: {{ .Values.replicaCount }} + strategy: + type: {{ .Values.strategy.type }} + rollingUpdate: + maxsurge: {{ .Values.strategy.maxsurge }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} + selector: + matchLabels: + app: {{ .Chart.Name }} + template: + metadata: + annotations: + readiness.status.sidecar.istio.io/applicationPorts: "" + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + labels: + app: {{ .Chart.Name }} + spec: + imagePullSecrets: + - name: {{ .Values.imagepullsecrets }} + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" + envFrom: + - configMapRef: + name: {{ .Chart.Name }}-config + resources: + requests: + cpu: {{ quote .Values.resources.cpu }} + memory: {{ quote .Values.resources.memory }} + ports: + - containerPort: {{ .Values.network.port }} + +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ .Chart.Name }}-service + namespace: {{ .Values.namespace }} + labels: + app: {{ .Chart.Name }} +spec: + ports: + - port: {{ .Values.network.targetport }} + selector: + app: {{ .Chart.Name }} diff --git a/helm_charts/sunbird/charts/content/values.j2 b/helm_charts/sunbird/charts/content/values.j2 new file mode 100644 index 000000000..a529cdb2b --- /dev/null +++ b/helm_charts/sunbird/charts/content/values.j2 @@ -0,0 +1,72 @@ +### Default variable file for content-service ### + +namespace: {{ namespace }} +imagepullsecrets: {{ imagepullsecrets }} +dockerhub: {{ dockerhub }} + +replicaCount: {{replicacount|default(1)}} +repository: {{content_repository|default('content-service')}} +image_tag: {{ image_tag }} +resources: + cpu: {{content_service_cpu|default('50m')}} + memory: {{content_service_memory|default('50Mi')}} +network: + port: 5000 + targetport: 5000 +strategy: + type: RollingUpdate + maxsurge: 1 + maxunavailable: 0 + +contentenv: + sunbird_content_plugin_base_url: {{sunbird_ekstep_proxy_base_url}} + sunbird_learner_service_api_key: {{sunbird_api_auth_token}} + sunbird_learner_service_base_url: "{{sunbird_apimanager_service_base_url}}/" + sunbird_keycloak_auth_server_url: {{keycloak_auth_server_url}}/ + sunbird_keycloak_realm: {{keycloak_realm}} + 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|default('1800')}}"' + sunbird_image_storage_url: {{sunbird_image_storage_url}} + sunbird_azure_account_name: {{sunbird_account_name}} + sunbird_azure_account_key: {{sunbird_account_key}} + sunbird_dial_code_registry_url: https://{{proxy_server_name}}/dial/ + sunbird_telemetry_sync_batch_size: '"{{sunbird_telemetry_sync_batch_size}}"' + sunbird_environment: {{sunbird_environment}} + sunbird_instance: {{sunbird_instance}} + sunbird_content_service_whitelisted_channels: {{content_service_whitelisted_channels}} + sunbird_content_service_blacklisted_channels: {{content_service_blacklisted_channels}} + sunbird_default_channel: {{sunbird_default_channel}} + sunbird_content_repo_api_base_url: {{sunbird_content_repo_api_base_url}} + sunbird_content_repo_api_key: {{sunbird_content_repo_api_key}} + sunbird_search_service_api_base_url: {{sunbird_search_service_api_base_url}} + sunbird_search_service_api_key: {{sunbird_search_service_api_key}} + sunbird_dial_repo_api_base_url: {{sunbird_dial_repo_api_base_url}} + sunbird_dial_repo_api_key: {{sunbird_dial_repo_api_key}} + sunbird_plugin_repo_api_base_url: {{sunbird_plugin_repo_api_base_url}} + sunbird_plugin_repo_api_key: {{sunbird_plugin_repo_api_key}} + sunbird_data_service_api_base_url: {{sunbird_data_service_api_base_url}} + sunbird_data_service_api_key: {{sunbird_data_service_api_key}} + sunbird_content_service_channel_refresh_cron: "'{{content_service_channel_refresh_cron}}'" + sunbird_content_service_whitelisted_framework: {{content_service_whitelisted_framework}} + sunbird_content_service_blacklisted_framework: {{content_service_blacklisted_framework}} + sunbird_content_service_blacklisted_contenttype: {{content_service_blacklisted_contenttype}} + sunbird_content_service_blacklisted_resourcetype: {{content_service_blacklisted_resourcetype}} + sunbird_content_service_blacklisted_mimetype: {{content_service_blacklisted_mimetype}} + sunbird_content_service_enable_logging: '"{{sunbird_content_service_enable_logging}}"' + sunbird_content_service_whitelisted_mimetype: {{content_service_whitelisted_mimetype}} + sunbird_content_service_whitelisted_resourcetype: {{content_service_whitelisted_resourcetype}} + sunbird_language_service_api_key: {{sunbird_language_service_api_key}} + sunbird_language_service_api_base_url: {{sunbird_language_service_api_base_url}} + sunbird_portal_base_url: {{sunbird_portal_base_url}} + sunbird_cassandra_urls: {{sunbird_cassandra_urls}} + sunbird_kafka_host: {{sunbird_processing_kafka_host}} + sunbird_qrimage_topic: {{sunbird_qrimage_topic}} + sunbird_lock_expiry_time: '"{{sunbird_lock_expiry_time}}"' + sunbird_content_service_log_level: {{sunbird_content_service_log_level}} + sunbird_cassandra_replication_strategy: '{"class":"NetworkTopologyStrategy","datacenter1":2}' + sunbird_cassandra_consistency_level: quorum + sunbird_health_check_enable: '"{{sunbird_health_check_enable}}"' + + \ No newline at end of file diff --git a/helm_charts/sunbird/charts/enc/Chart.yaml b/helm_charts/sunbird/charts/enc/Chart.yaml new file mode 100644 index 000000000..91c8b3224 --- /dev/null +++ b/helm_charts/sunbird/charts/enc/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: enc +version: 0.1.0 diff --git a/helm_charts/sunbird/charts/enc/templates/configmap.yaml b/helm_charts/sunbird/charts/enc/templates/configmap.yaml new file mode 100644 index 000000000..50c57f70f --- /dev/null +++ b/helm_charts/sunbird/charts/enc/templates/configmap.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +data: + {{- range $key, $val := .Values.encenv }} + {{ $key }}: {{ $val }} + {{- end }} +kind: ConfigMap +metadata: + creationTimestamp: null + name: {{ .Chart.Name }}-config + namespace: {{ .Values.namespace }} diff --git a/helm_charts/sunbird/charts/enc/templates/deployment.yaml b/helm_charts/sunbird/charts/enc/templates/deployment.yaml new file mode 100644 index 000000000..c974a2bd4 --- /dev/null +++ b/helm_charts/sunbird/charts/enc/templates/deployment.yaml @@ -0,0 +1,52 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Chart.Name }} + namespace: {{ .Values.namespace }} +spec: + replicas: {{ .Values.replicaCount }} + strategy: + type: {{ .Values.strategy.type }} + rollingUpdate: + maxsurge: {{ .Values.strategy.maxsurge }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} + selector: + matchLabels: + app: {{ .Chart.Name }} + template: + metadata: + annotations: + readiness.status.sidecar.istio.io/applicationPorts: "" + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + labels: + app: {{ .Chart.Name }} + spec: + imagePullSecrets: + - name: {{ .Values.imagepullsecrets }} + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" + envFrom: + - configMapRef: + name: {{ .Chart.Name }}-config + resources: + requests: + cpu: {{ quote .Values.resources.cpu }} + memory: {{ quote .Values.resources.memory }} + ports: + - containerPort: {{ .Values.network.port }} + +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ .Chart.Name }}-service + namespace: {{ .Values.namespace }} + labels: + app: {{ .Chart.Name }} +spec: + ports: + - port: {{ .Values.network.targetport }} + selector: + app: {{ .Chart.Name }} diff --git a/helm_charts/sunbird/charts/enc/values.j2 b/helm_charts/sunbird/charts/enc/values.j2 new file mode 100644 index 000000000..d4ab11569 --- /dev/null +++ b/helm_charts/sunbird/charts/enc/values.j2 @@ -0,0 +1,34 @@ +### Default variable file for enc-service ### + +namespace: {{ namespace }} +imagepullsecrets: {{ imagepullsecrets }} +dockerhub: {{ dockerhub }} + +replicaCount: {{replicacount|default(1)}} +repository: {{enc_repository|default('enc_service')}} +image_tag: {{image_tag }} +resources: + cpu: {{enc_service_cpu|default('50m')}} + memory: {{enc_service_memory|default('50Mi')}} +network: + port: 9010 + targetport: 8013 +strategy: + type: RollingUpdate + maxsurge: 1 + maxunavailable: 0 + +encenv: + DB_HOST: {{enc_postgres_host}} + DB_PORT: '"{{postgres_port|default('5432')}}"' + DB_USER: {{enc_postgres_user}} + DB_PASSWORD: {{enc_postgres_password}} + DB_NAME: {{enc_postgres_database}} + DB_DIALECT: {{enc_dialect|default('postgres')}} + DB_SSL: '"True"' + ENTRY_PASS: {{enc_entry_password}} + MASTER_PASS: {{enc_master_pass}} + N_KEYS: {{enc_n_keys}} + N_RESERVED_KEYS: {{enc_n_reserved_keys}} + + diff --git a/helm_charts/sunbird/charts/learner/.helmignore b/helm_charts/sunbird/charts/learner/.helmignore new file mode 100644 index 000000000..50af03172 --- /dev/null +++ b/helm_charts/sunbird/charts/learner/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/helm_charts/sunbird/charts/learner/Chart.yaml b/helm_charts/sunbird/charts/learner/Chart.yaml new file mode 100644 index 000000000..d2c54a936 --- /dev/null +++ b/helm_charts/sunbird/charts/learner/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: learner +version: 0.1.0 diff --git a/helm_charts/sunbird/charts/learner/templates/_helpers.tpl b/helm_charts/sunbird/charts/learner/templates/_helpers.tpl new file mode 100644 index 000000000..420ba7943 --- /dev/null +++ b/helm_charts/sunbird/charts/learner/templates/_helpers.tpl @@ -0,0 +1,45 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "learner.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "learner.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "learner.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" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} diff --git a/helm_charts/sunbird/charts/learner/templates/configmap.yaml b/helm_charts/sunbird/charts/learner/templates/configmap.yaml new file mode 100644 index 000000000..056b64f93 --- /dev/null +++ b/helm_charts/sunbird/charts/learner/templates/configmap.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +data: + {{- range $key, $val := .Values.learnerenv }} + {{ $key }}: {{ $val }} + {{- end }} +kind: ConfigMap +metadata: + creationTimestamp: null + name: {{ .Chart.Name }}-config + namespace: {{ .Values.namespace }} diff --git a/helm_charts/sunbird/charts/learner/templates/deployment.yaml b/helm_charts/sunbird/charts/learner/templates/deployment.yaml new file mode 100644 index 000000000..c974a2bd4 --- /dev/null +++ b/helm_charts/sunbird/charts/learner/templates/deployment.yaml @@ -0,0 +1,52 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Chart.Name }} + namespace: {{ .Values.namespace }} +spec: + replicas: {{ .Values.replicaCount }} + strategy: + type: {{ .Values.strategy.type }} + rollingUpdate: + maxsurge: {{ .Values.strategy.maxsurge }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} + selector: + matchLabels: + app: {{ .Chart.Name }} + template: + metadata: + annotations: + readiness.status.sidecar.istio.io/applicationPorts: "" + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + labels: + app: {{ .Chart.Name }} + spec: + imagePullSecrets: + - name: {{ .Values.imagepullsecrets }} + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" + envFrom: + - configMapRef: + name: {{ .Chart.Name }}-config + resources: + requests: + cpu: {{ quote .Values.resources.cpu }} + memory: {{ quote .Values.resources.memory }} + ports: + - containerPort: {{ .Values.network.port }} + +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ .Chart.Name }}-service + namespace: {{ .Values.namespace }} + labels: + app: {{ .Chart.Name }} +spec: + ports: + - port: {{ .Values.network.targetport }} + selector: + app: {{ .Chart.Name }} diff --git a/helm_charts/sunbird/charts/learner/values.j2 b/helm_charts/sunbird/charts/learner/values.j2 new file mode 100644 index 000000000..152ce34a8 --- /dev/null +++ b/helm_charts/sunbird/charts/learner/values.j2 @@ -0,0 +1,128 @@ + +### Default variable file for learner-service ### + +namespace: {{ namespace }} +imagepullsecrets: {{ imagepullsecrets }} +dockerhub: {{ dockerhub }} + +replicaCount: {{replicacount|default(1)}} +repository: {{learner_repository|default('learner_service')}} +image_tag: {{image_tag }} +resources: + cpu: {{learner_service_cpu|default('50m')}} + memory: {{learner_service_memory|default('50Mi')}} +network: + port: 9000 + targetport: 9000 +strategy: + type: RollingUpdate + maxsurge: 1 + maxunavailable: 0 + +encenv: + sunbird_sso_publickey: {{sunbird_sso_publickey}} + sunbird_sso_url: {{keycloak_auth_server_url}}/ + sunbird_sso_realm: {{keycloak_realm}} + sunbird_sso_username: {{sunbird_sso_username}} + sunbird_sso_password: {{sunbird_sso_password}} + sunbird_sso_client_id: {{sunbird_sso_client_id}} + sunbird_es_host: {{sunbird_es_host}} + sunbird_es_port: '"{{sunbird_es_port}}"' + 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}} + sunbird_pg_user: {{sunbird_pg_user}} + 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_mail_server_host: {{sunbird_mail_server_host}} + sunbird_mail_server_port: '"{{sunbird_mail_server_port}}"' + sunbird_mail_server_username: {{sunbird_mail_server_username}} + 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_account_name}} + sunbird_account_key: {{sunbird_account_key}} + sunbird_quartz_mode: {{sunbird_sunbird_quartz_mode}} + sunbird_env_logo_url: {{sunbird_env_logo_url|default('""')}} + sunbird_web_url: {{sunbird_web_url}} + sunbird_fcm_account_key: {{sunbird_fcm_account_key}} + sunbird_msg_91_auth: {{sunbird_msg_91_auth}} + sunbird_msg_sender: {{sunbird_msg_sender}} + sunbird_installation_email: {{sunbird_installation_email}} + {% if groups['cassandra-2'] is defined %} +sunbird_cassandra_host: {{groups['cassandra']|join(',')}} + sunbird_cassandra_port: 9042,9042,9042 + sunbird_cassandra_consistency_level: quorum + {% else %} + sunbird_cassandra_host: {{sunbird_cassandra_host}} + sunbird_cassandra_port: 9042 + sunbird_cassandra_consistency_level: {{sunbird_cassandra_consistency_level}} + {% endif %} + + sunbird_mw_system_host: learner-service + sunbird_mw_system_port: '"8088"' + background_actor_provider: local + api_actor_provider: local + badging_authorization_key: {{vault_badging_authorization_key}} + sunbird_badger_baseurl: http://badger-service:8004 + sunbird_remote_req_router_path: akka.tcp://SunbirdMWSystem@actor-service:8088/user/RequestRouter + sunbird_remote_bg_req_router_path: akka.tcp://SunbirdMWSystem@actor-service:8088/user/BackgroundRequestRouter + sunbird_api_base_url: {{sunbird_content_service_url}} + sunbird_authorization: {{sunbird_api_auth_token}} + telemetry_pdata_id: {{sunbird_telemetry_pdata_id}} + telemetry_pdata_pid: learner-service + sunbird_telemetry_base_url: {{sunbird_telemetry_service_url}} + telemetry_queue_threshold_value: '"100"' + sunbird_default_channel: {{sunbird_default_channel}} + sunbird_api_mgr_base_url: {{sunbird_content_service_url}} + sunbird_cs_base_url: {{sunbird_content_service_url}} + sunbird_cs_search_path: /v1/content/search + +sunbird_user_bulk_upload_size: '"{{sunbird_user_bulk_upload_size}}"' +sunbird_installation_display_name: {{sunbird_installation_display_name}} + +sunbird_app_name: {{sunbird_app_name|default('Sunbird')}} +sunbird_registry_service_baseurl: http://registry_registry:8080/ +sunbird_open_saber_bridge_enable: '"{{sunbird_open_saber_bridge_enable|default('false')}}"' +sunbird_environment: {{sunbird_environment}} +sunbird_instance: {{sunbird_instance}} +sunbird_email_max_recipients_limit: '"{{sunbird_email_max_recipients_limit}}"' +sunbird_url_shortner_access_token: {{sunbird_url_shortner_access_token}} +sunbird_url_shortner_enable: '"{{sunbird_url_shortner_enable}}"' +sunbird_user_profile_field_default_visibility: {{sunbird_user_profile_field_default_visibility}} +sunbird_keycloak_required_action_link_expiration_seconds: '"{{sunbird_keycloak_required_action_link_expiration_seconds}}"' +sunbird_course_batch_notification_enabled: '"{{sunbird_course_batch_notification_enabled}}"' +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}} +# Release-1.14 +sunbird_time_zone: {{sunbird_time_zone|default('Asia/Kolkata')}} +# 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_analytics_blob_account_name}} +sunbird_analytics_blob_account_key: {{sunbird_analytics_blob_account_key}} +# Optional for caching +sunbird_cache_enable: '"{{sunbird_cache_enable | default(false)}}"' +# Set below variables if above true +sunbird_redis_host: {{sunbird_redis_host}} +sunbird_redis_port: '"{{sunbird_redis_port|default(6379)}}"' +kafka_urls: {{kafka_urls}} +sunbird_user_cert_kafka_topic: {{env_name}}.lms.user.account.merge +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('')}}/ +sunbird_cert_service_base_url: {{sunbird_cert_service_url}} \ No newline at end of file diff --git a/helm_charts/sunbird/charts/lms/Chart.yaml b/helm_charts/sunbird/charts/lms/Chart.yaml new file mode 100644 index 000000000..5ebad8066 --- /dev/null +++ b/helm_charts/sunbird/charts/lms/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: lms +version: 0.1.0 diff --git a/helm_charts/sunbird/charts/lms/templates/configmap.yaml b/helm_charts/sunbird/charts/lms/templates/configmap.yaml new file mode 100644 index 000000000..faa63a036 --- /dev/null +++ b/helm_charts/sunbird/charts/lms/templates/configmap.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +data: + {{- range $key, $val := .Values.lmsenv }} + {{ $key }}: {{ $val }} + {{- end }} +kind: ConfigMap +metadata: + creationTimestamp: null + name: {{ .Chart.Name }}-config + namespace: {{ .Values.namespace }} diff --git a/helm_charts/sunbird/charts/lms/templates/deployment.yaml b/helm_charts/sunbird/charts/lms/templates/deployment.yaml new file mode 100644 index 000000000..c974a2bd4 --- /dev/null +++ b/helm_charts/sunbird/charts/lms/templates/deployment.yaml @@ -0,0 +1,52 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Chart.Name }} + namespace: {{ .Values.namespace }} +spec: + replicas: {{ .Values.replicaCount }} + strategy: + type: {{ .Values.strategy.type }} + rollingUpdate: + maxsurge: {{ .Values.strategy.maxsurge }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} + selector: + matchLabels: + app: {{ .Chart.Name }} + template: + metadata: + annotations: + readiness.status.sidecar.istio.io/applicationPorts: "" + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + labels: + app: {{ .Chart.Name }} + spec: + imagePullSecrets: + - name: {{ .Values.imagepullsecrets }} + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" + envFrom: + - configMapRef: + name: {{ .Chart.Name }}-config + resources: + requests: + cpu: {{ quote .Values.resources.cpu }} + memory: {{ quote .Values.resources.memory }} + ports: + - containerPort: {{ .Values.network.port }} + +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ .Chart.Name }}-service + namespace: {{ .Values.namespace }} + labels: + app: {{ .Chart.Name }} +spec: + ports: + - port: {{ .Values.network.targetport }} + selector: + app: {{ .Chart.Name }} diff --git a/helm_charts/sunbird/charts/lms/values.j2 b/helm_charts/sunbird/charts/lms/values.j2 new file mode 100644 index 000000000..e6c749cc6 --- /dev/null +++ b/helm_charts/sunbird/charts/lms/values.j2 @@ -0,0 +1,131 @@ +### Default variable file for lms-service ### + +namespace: {{ namespace }} +imagepullsecrets: {{ imagepullsecrets }} +dockerhub: {{ dockerhub }} + +replicaCount: {{replicacount|default(1)}} +repository: {{lms_repository|default('lms_service')}} +image_tag: {{image_tag }} +resources: + cpu: {{lms_service_cpu|default('50m')}} + memory: {{lms_service_memory|default('50Mi')}} +network: + port: 9005 + targetport: 9000 +strategy: + type: RollingUpdate + maxsurge: 1 + maxunavailable: 0 + +lmsenv: + sunbird_sso_publickey: {{sunbird_sso_publickey}} + sunbird_sso_url: {{keycloak_auth_server_url}}/ + sunbird_sso_realm: {{keycloak_realm}} + sunbird_sso_username: {{sunbird_sso_username}} + sunbird_sso_password: {{sunbird_sso_password}} + sunbird_sso_client_id: {{sunbird_sso_client_id}} + sunbird_es_host: {{sunbird_es_host}} + sunbird_es_port: '"{{sunbird_es_port}}"' + 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}} + sunbird_pg_user: {{sunbird_pg_user}} + 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_mail_server_host: {{sunbird_mail_server_host}} + sunbird_mail_server_port: '"{{sunbird_mail_server_port}}"' + sunbird_mail_server_username: {{sunbird_mail_server_username}} + 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_account_name}} + sunbird_account_key: {{sunbird_account_key}} + sunbird_quartz_mode: {{sunbird_sunbird_quartz_mode}} + sunbird_env_logo_url: {{sunbird_env_logo_url|default('""')}} + sunbird_web_url: {{sunbird_web_url}} + sunbird_fcm_account_key: {{sunbird_fcm_account_key}} + sunbird_msg_91_auth: {{sunbird_msg_91_auth}} + sunbird_msg_sender: {{sunbird_msg_sender}} + sunbird_installation_email: {{sunbird_installation_email}} + {% if groups['cassandra-2'] is defined %} +sunbird_cassandra_host: {{groups['cassandra']|join(',')}} + sunbird_cassandra_port: 9042,9042,9042 + sunbird_cassandra_consistency_level: quorum + {% else %} + sunbird_cassandra_host: {{sunbird_cassandra_host}} + sunbird_cassandra_port: 9042 + sunbird_cassandra_consistency_level: {{sunbird_cassandra_consistency_level}} + {% endif %} + + sunbird_mw_system_host: lms-service + sunbird_mw_system_port: '"8088"' + background_actor_provider: local + api_actor_provider: local + badging_authorization_key: {{vault_badging_authorization_key}} + sunbird_badger_baseurl: http://badger-service:8004 + sunbird_remote_req_router_path: akka.tcp://SunbirdMWSystem@actor-service:8088/user/RequestRouter + sunbird_remote_bg_req_router_path: akka.tcp://SunbirdMWSystem@actor-service:8088/user/BackgroundRequestRouter + sunbird_api_base_url: {{sunbird_content_service_url}} + sunbird_authorization: {{sunbird_api_auth_token}} + telemetry_pdata_id: {{sunbird_telemetry_pdata_id}} + telemetry_pdata_pid: lms-service + sunbird_telemetry_base_url: sunbird_telemetry_service_url + telemetry_queue_threshold_value: '"100"' + sunbird_default_channel: {{sunbird_default_channel}} + sunbird_api_mgr_base_url: {{sunbird_content_service_url}} + sunbird_cs_base_url: {{sunbird_content_service_url}} + sunbird_cs_search_path: /v1/content/search + + sunbird_user_bulk_upload_size: '"{{sunbird_user_bulk_upload_size}}"' + sunbird_installation_display_name: {{sunbird_installation_display_name}} + + sunbird_app_name: {{sunbird_app_name|default('Sunbird')}} + sunbird_registry_service_baseurl: http://registry_registry:8080/ + sunbird_open_saber_bridge_enable: '"{{sunbird_open_saber_bridge_enable|default('false')}}"' + sunbird_environment: {{sunbird_environment}} + sunbird_instance: {{sunbird_instance}} + sunbird_email_max_recipients_limit: '"{{sunbird_email_max_recipients_limit}}"' + sunbird_url_shortner_access_token: {{sunbird_url_shortner_access_token}} + sunbird_url_shortner_enable: '"{{sunbird_url_shortner_enable}}"' + sunbird_user_profile_field_default_visibility: {{sunbird_user_profile_field_default_visibility}} + sunbird_keycloak_required_action_link_expiration_seconds: '"{{sunbird_keycloak_required_action_link_expiration_seconds}}"' + sunbird_course_batch_notification_enabled: '"{{sunbird_course_batch_notification_enabled}}"' + 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}} + # Release-1.14 + sunbird_time_zone: {{sunbird_time_zone|default('Asia/Kolkata')}} + # 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_analytics_blob_account_name}} + sunbird_analytics_blob_account_key: {{sunbird_analytics_blob_account_key}} + # Optional for caching + sunbird_cache_enable: '"{{sunbird_cache_enable | default(false)}}"' + # Set below variables if above true + sunbird_redis_host: {{sunbird_redis_host}} + sunbird_redis_port: '"{{sunbird_redis_port|default(6379)}}"' + sunbird_user_org_api_base_url: {{sunbird_learner_service_url}} + + kafka_topics_instruction: {{kafka_topics_instruction}} + kafka_urls: {{kafka_urls}} + kafka_topics_certificate_instruction: {{kafka_topics_certificate_instruction}} + kafka_assessment_topic: {{kafka_assessment_topic}} + + + + diff --git a/helm_charts/sunbird/charts/player/.helmignore b/helm_charts/sunbird/charts/player/.helmignore new file mode 100644 index 000000000..50af03172 --- /dev/null +++ b/helm_charts/sunbird/charts/player/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/helm_charts/sunbird/charts/player/Chart.yaml b/helm_charts/sunbird/charts/player/Chart.yaml new file mode 100644 index 000000000..673a6a73f --- /dev/null +++ b/helm_charts/sunbird/charts/player/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: player +version: 0.1.0 diff --git a/helm_charts/sunbird/charts/player/templates/_helpers.tpl b/helm_charts/sunbird/charts/player/templates/_helpers.tpl new file mode 100644 index 000000000..2317f3842 --- /dev/null +++ b/helm_charts/sunbird/charts/player/templates/_helpers.tpl @@ -0,0 +1,45 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "player.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "player.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "player.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "player.labels" -}} +app.kubernetes.io/name: {{ include "player.name" . }} +helm.sh/chart: {{ include "player.chart" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} diff --git a/helm_charts/sunbird/charts/player/templates/configmap.yaml b/helm_charts/sunbird/charts/player/templates/configmap.yaml new file mode 100644 index 000000000..94eecafe7 --- /dev/null +++ b/helm_charts/sunbird/charts/player/templates/configmap.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +data: + {{- range $key, $val := .Values.playerenv }} + {{ $key }}: {{ $val }} + {{- end }} +kind: ConfigMap +metadata: + creationTimestamp: null + name: {{ .Chart.Name }}-config + namespace: {{ .Values.namespace }} diff --git a/helm_charts/sunbird/charts/player/templates/deployment.yaml b/helm_charts/sunbird/charts/player/templates/deployment.yaml new file mode 100644 index 000000000..c974a2bd4 --- /dev/null +++ b/helm_charts/sunbird/charts/player/templates/deployment.yaml @@ -0,0 +1,52 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Chart.Name }} + namespace: {{ .Values.namespace }} +spec: + replicas: {{ .Values.replicaCount }} + strategy: + type: {{ .Values.strategy.type }} + rollingUpdate: + maxsurge: {{ .Values.strategy.maxsurge }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} + selector: + matchLabels: + app: {{ .Chart.Name }} + template: + metadata: + annotations: + readiness.status.sidecar.istio.io/applicationPorts: "" + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + labels: + app: {{ .Chart.Name }} + spec: + imagePullSecrets: + - name: {{ .Values.imagepullsecrets }} + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" + envFrom: + - configMapRef: + name: {{ .Chart.Name }}-config + resources: + requests: + cpu: {{ quote .Values.resources.cpu }} + memory: {{ quote .Values.resources.memory }} + ports: + - containerPort: {{ .Values.network.port }} + +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ .Chart.Name }}-service + namespace: {{ .Values.namespace }} + labels: + app: {{ .Chart.Name }} +spec: + ports: + - port: {{ .Values.network.targetport }} + selector: + app: {{ .Chart.Name }} diff --git a/helm_charts/sunbird/charts/player/values.j2 b/helm_charts/sunbird/charts/player/values.j2 new file mode 100644 index 000000000..5192656fb --- /dev/null +++ b/helm_charts/sunbird/charts/player/values.j2 @@ -0,0 +1,97 @@ +### Default variable file for player-service ### + +namespace: {{ namespace }} +imagepullsecrets: {{ imagepullsecrets }} +dockerhub: {{ dockerhub }} + +replicaCount: {{replicacount|default(1)}} +repository: {{player_repository|default('player')}} +image_tag: {{image_tag }} +resources: + cpu: {{player_service_cpu|default('50m')}} + memory: {{player_service_memory|default('50Mi')}} +network: + port: 3000 + targetport: 3000 +strategy: + type: RollingUpdate + maxsurge: 1 + maxunavailable: 0 + +playerenv: + sunbird_port: '"3000"' + sunbird_content_player_url: {{sunbird_apimanager_service_base_url}} + sunbird_learner_player_url: {{sunbird_apimanager_service_base_url}} + sunbird_content_proxy_url: {{sunbird_content_service_url}} + sunbird_echo_api_url: {{sunbird_echo_api_url}} + sunbird_autocreate_trampoline_user: '"false"' + sunbird_portal_realm: {{keycloak_realm}} + sunbird_portal_auth_server_url: {{keycloak_auth_server_url}} + sunbird_portal_auth_server_client: {{sunbird_portal_auth_server_client}} + sunbird_trampoline_client_id: {{sunbird_trampoline_client_id}} + sunbird_trampoline_secret: {{sunbird_trampoline_secret}} + ekstep_env: {{sunbird_env}} + sunbird_default_channel: {{sunbird_default_channel}} + 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_azure_storage_account}} + AZURE_STORAGE_KEY: {{sunbird_azure_storage_key}} + sunbird_dataservice_url: {{sunbird_dataservice_url}} + sunbird_telemetry_packet_size: '"{{sunbird_telemetry_packet_size}}"' + sunbird_environment: {{sunbird_environment}} + sunbird_instance: {{sunbird_instance}} + sunbird_android_app_url: {{sunbird_android_app_url}} + sunbird_external_content_whitelisted_domains: {{sunbird_external_content_whitelisted_domains}} + sunbird_portal_cdn_url: {{sunbird_portal_cdn_url}} + sunbird_portal_cdn_blob_url: {{sunbird_portal_cdn_blob_url|default('""')}} + sunbird_portal_title_name: {{sunbird_portal_title_name}} + sunbird_enable_signup: '"{{sunbird_enable_signup}}"' + sunbird_tenant_cdn_url: {{sunbird_tenant_cdn_url}} + sunbird_cloud_storage_urls: {{sunbird_cloud_storage_urls}} + sunbird_config_service_url: {{sunbird_config_service_url}} + sunbird_portal_user_upload_ref_link: {{sunbird_portal_user_upload_ref_link}} + sunbird_build_number: {{sunbird_build_number|default('""')}} + config_service_enabled: '"{{config_service_enabled}}"' + config_refresh_interval: '"{{config_refresh_interval}}"' + sunbird_device_register_api: {{sunbird_device_register_api}} + # Release-1.13 + sunbird_google_oauth_clientId: {{sunbird_google_oauth_clientId}} + sunbird_google_oauth_clientSecret: {{sunbird_google_oauth_clientSecret}} + 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_azure_account_name}} + sunbird_azure_account_key: {{sunbird_azure_storage_key}} + sunbird_response_cache_ttl: '"{{sunbird_response_cache_ttl|default('180')}}"' + sunbird_portal_preview_cdn_url: {{sunbird_portal_preview_cdn_url}} + {% if groups['cassandra-2'] is defined %} +sunbird_cassandra_replication_strategy: {{sunbird_cassandra_replication_strategy}} + sunbird_cassandra_consistency_level: quorum + {% else %} + sunbird_cassandra_replication_strategy: '{"class":"NetworkTopologyStrategy","datacenter1":2}' + sunbird_cassandra_consistency_level: {{sunbird_cassandra_consistency_level}} + {% endif %} +sunbird_health_check_enable: '"{{sunbird_health_check_enable}}"' + sunbird_portal_player_cdn_enabled: {{sunbird_portal_player_cdn_enabled|default('""')}} + # Release-2.0 + sunbird_processing_kafka_host: {{sunbird_processing_kafka_host}} + sunbird_sso_kafka_topic: {{sunbird_sso_kafka_topic}} + sunbird_portal_offline_tenant: {{sunbird_portal_offline_tenant}} + sunbird_portal_offline_supported_languages: {{sunbird_portal_offline_supported_languages}} + sunbird_portal_offline_app_release_date: {{sunbird_portal_offline_app_release_date}} + sunbird_portal_offline_app_version: {{sunbird_portal_offline_app_version}} + sunbird_portal_offline_app_download_url: {{sunbird_portal_offline_app_download_url}} + sunbird_portal_log_level: {{sunbird_portal_log_level}} + sunbird_google_android_keycloak_client_id: {{sunbird_google_android_keycloak_client_id}} + sunbird_google_android_keycloak_secret: {{sunbird_google_android_keycloak_secret}} + sunbird_trampoline_android_keycloak_client_id: {{sunbird_trampoline_android_keycloak_client_id}} + sunbird_trampoline_android_keycloak_secret: {{sunbird_trampoline_android_keycloak_secret}} + sunbird_android_keycloak_client_id: {{sunbird_android_keycloak_client_id}} + + #Release-2.3.5 + sunbird_portal_merge_auth_server_url: {{sunbird_subdomain_keycloak_base_url | d('')}} + \ No newline at end of file diff --git a/helm_charts/sunbird/charts/telemetry/.helmignore b/helm_charts/sunbird/charts/telemetry/.helmignore new file mode 100644 index 000000000..50af03172 --- /dev/null +++ b/helm_charts/sunbird/charts/telemetry/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/helm_charts/sunbird/charts/telemetry/Chart.yaml b/helm_charts/sunbird/charts/telemetry/Chart.yaml new file mode 100644 index 000000000..e4f277fdf --- /dev/null +++ b/helm_charts/sunbird/charts/telemetry/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: telemetry +version: 0.1.0 diff --git a/helm_charts/sunbird/charts/telemetry/templates/_helpers.tpl b/helm_charts/sunbird/charts/telemetry/templates/_helpers.tpl new file mode 100644 index 000000000..590205843 --- /dev/null +++ b/helm_charts/sunbird/charts/telemetry/templates/_helpers.tpl @@ -0,0 +1,45 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "telemetry.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "telemetry.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "telemetry.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "telemetry.labels" -}} +app.kubernetes.io/name: {{ include "telemetry.name" . }} +helm.sh/chart: {{ include "telemetry.chart" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} diff --git a/helm_charts/sunbird/charts/telemetry/templates/configmap.yaml b/helm_charts/sunbird/charts/telemetry/templates/configmap.yaml new file mode 100644 index 000000000..d671051a9 --- /dev/null +++ b/helm_charts/sunbird/charts/telemetry/templates/configmap.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +data: + {{- range $key, $val := .Values.telemetryenv }} + {{ $key }}: {{ $val }} + {{- end }} +kind: ConfigMap +metadata: + creationTimestamp: null + name: {{ .Chart.Name }}-config + namespace: {{ .Values.namespace }} diff --git a/helm_charts/sunbird/charts/telemetry/templates/deployment.yaml b/helm_charts/sunbird/charts/telemetry/templates/deployment.yaml new file mode 100644 index 000000000..c974a2bd4 --- /dev/null +++ b/helm_charts/sunbird/charts/telemetry/templates/deployment.yaml @@ -0,0 +1,52 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Chart.Name }} + namespace: {{ .Values.namespace }} +spec: + replicas: {{ .Values.replicaCount }} + strategy: + type: {{ .Values.strategy.type }} + rollingUpdate: + maxsurge: {{ .Values.strategy.maxsurge }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} + selector: + matchLabels: + app: {{ .Chart.Name }} + template: + metadata: + annotations: + readiness.status.sidecar.istio.io/applicationPorts: "" + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + labels: + app: {{ .Chart.Name }} + spec: + imagePullSecrets: + - name: {{ .Values.imagepullsecrets }} + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" + envFrom: + - configMapRef: + name: {{ .Chart.Name }}-config + resources: + requests: + cpu: {{ quote .Values.resources.cpu }} + memory: {{ quote .Values.resources.memory }} + ports: + - containerPort: {{ .Values.network.port }} + +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ .Chart.Name }}-service + namespace: {{ .Values.namespace }} + labels: + app: {{ .Chart.Name }} +spec: + ports: + - port: {{ .Values.network.targetport }} + selector: + app: {{ .Chart.Name }} diff --git a/helm_charts/sunbird/charts/telemetry/values.j2 b/helm_charts/sunbird/charts/telemetry/values.j2 new file mode 100644 index 000000000..62873a07d --- /dev/null +++ b/helm_charts/sunbird/charts/telemetry/values.j2 @@ -0,0 +1,28 @@ + +### variables for telemetry service ### + +namespace: {{ namespace }} +imagepullsecrets: {{ imagepullsecrets }} +dockerhub: {{ dockerhub }} + +replicaCount: {{replicacount|default(1)}} +repository: {{telemetry_repository|default('telemetry-service')}} +image_tag: {{image_tag }} +resources: + cpu: {{telemetry_service_cpu|default('50m')}} + memory: {{telemetry_service_memory|default('50Mi')}} +network: + port: 9001 + targetport: 9001 +strategy: + type: RollingUpdate + maxsurge: 1 + maxunavailable: 0 + +telemetryenv: + telemetry_service_threads: '"2"' + telemetry_local_storage_enabled: '"true"' + telemetry_local_storage_type: {{sunbird_telemetry_dispatchers|default('kafka')}} + telemetry_kafka_broker_list: "{{groups['kafka']|join(':9092,')}}:9092" + telemetry_kafka_topic: {{sunbird_telemetry_kafka_topic}} + diff --git a/helm_charts/sunbird/charts/userorg/Chart.yaml b/helm_charts/sunbird/charts/userorg/Chart.yaml new file mode 100644 index 000000000..c7c993ab6 --- /dev/null +++ b/helm_charts/sunbird/charts/userorg/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: userorg +version: 0.1.0 diff --git a/helm_charts/sunbird/charts/userorg/templates/configmap.yaml b/helm_charts/sunbird/charts/userorg/templates/configmap.yaml new file mode 100644 index 000000000..749c76000 --- /dev/null +++ b/helm_charts/sunbird/charts/userorg/templates/configmap.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +data: + {{- range $key, $val := .Values.userorgenv }} + {{ $key }}: {{ $val }} + {{- end }} +kind: ConfigMap +metadata: + creationTimestamp: null + name: {{ .Chart.Name }}-config + namespace: {{ .Values.namespace }} diff --git a/helm_charts/sunbird/charts/userorg/templates/deployment.yaml b/helm_charts/sunbird/charts/userorg/templates/deployment.yaml new file mode 100644 index 000000000..c974a2bd4 --- /dev/null +++ b/helm_charts/sunbird/charts/userorg/templates/deployment.yaml @@ -0,0 +1,52 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Chart.Name }} + namespace: {{ .Values.namespace }} +spec: + replicas: {{ .Values.replicaCount }} + strategy: + type: {{ .Values.strategy.type }} + rollingUpdate: + maxsurge: {{ .Values.strategy.maxsurge }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} + selector: + matchLabels: + app: {{ .Chart.Name }} + template: + metadata: + annotations: + readiness.status.sidecar.istio.io/applicationPorts: "" + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + labels: + app: {{ .Chart.Name }} + spec: + imagePullSecrets: + - name: {{ .Values.imagepullsecrets }} + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" + envFrom: + - configMapRef: + name: {{ .Chart.Name }}-config + resources: + requests: + cpu: {{ quote .Values.resources.cpu }} + memory: {{ quote .Values.resources.memory }} + ports: + - containerPort: {{ .Values.network.port }} + +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ .Chart.Name }}-service + namespace: {{ .Values.namespace }} + labels: + app: {{ .Chart.Name }} +spec: + ports: + - port: {{ .Values.network.targetport }} + selector: + app: {{ .Chart.Name }} diff --git a/helm_charts/sunbird/charts/userorg/values.j2 b/helm_charts/sunbird/charts/userorg/values.j2 new file mode 100644 index 000000000..43e14ee88 --- /dev/null +++ b/helm_charts/sunbird/charts/userorg/values.j2 @@ -0,0 +1,41 @@ +### Default variable file for userorg-service ### + +#release-2.2.0-prime_708a498-50 +namespace: {{ namespace }} +imagepullsecrets: {{ imagepullsecrets }} +dockerhub: {{ dockerhub }} + +replicaCount: {{replicacount|default(1)}} +repository: {{userorg_repository|default('user_org_service')}} +image_tag: {{image_tag }} +resources: + cpu: {{userorg_service_cpu|default('50m')}} + memory: {{userorg_service_memory|default('50Mi')}} +network: + port: 9008 + targetport: 9000 +strategy: + type: RollingUpdate + maxsurge: 1 + maxunavailable: 0 + +userorgenv: + sunbird_es_host: {{user_org_sunbird_es_host}} + sunbird_es_port: '"{{user_org_sunbird_es_port}}"' + database_connectionInfo_0_shardId: '"{{user_org_database_connectionInfo_0_shardId}}"' + database_connectionInfo_0_shardLabel: '"{{user_org_database_connectionInfo_0_shardLabel}}"' + database_connectionInfo_0_username: {{user_org_database_connectionInfo_0_username}} + database_connectionInfo_0_password: {{user_org_database_connectionInfo_0_password}} + database_connectionInfo_0_uri: {{user_org_database_connectionInfo_0_uri}} + database_connectionInfo_1_shardId: '"{{user_org_database_connectionInfo_1_shardId}}"' + database_connectionInfo_1_shardLabel: '"{{user_org_database_connectionInfo_1_shardLabel}}"' + database_connectionInfo_1_username: {{user_org_database_connectionInfo_1_username}} + database_connectionInfo_1_password: {{user_org_database_connectionInfo_1_password}} + database_connectionInfo_1_uri: {{user_org_database_connectionInfo_1_uri}} + database_connectionInfo_2_shardId_: '"{{user_org_database_connectionInfo_2_shardId}}"' + database_connectionInfo_2_shardLabel: '"{{user_org_database_connectionInfo_2_shardLabel}}"' + database_connectionInfo_2_username: {{user_org_database_connectionInfo_2_username}} + database_connectionInfo_2_password: {{user_org_database_connectionInfo_2_password}} + database_connectionInfo_2_uri: {{user_org_database_connectionInfo_2_uri}} + + \ No newline at end of file diff --git a/pipelines/helm/Jenkinsfile b/pipelines/helm/Jenkinsfile new file mode 100644 index 000000000..cb299ed47 --- /dev/null +++ b/pipelines/helm/Jenkinsfile @@ -0,0 +1,31 @@ +@Library('deploy-conf') _ +node() { + try { + stage('checkout public repo') { + cleanWs() + checkout scm + } + + stage('deploy') { + values = docker_params() + jobName = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-1].trim() + currentWs = sh(returnStdout: true, script: 'pwd').trim() + ansiblePlaybook = "$currentWs/ansible/helm.yml" + ansibleExtraArgs = "--extra-vars \"chart_path=${currentWs}/helm_charts/sunbird/charts/$jobName release_name=$jobName image_tag=${params.image_tag}\" --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}" + } + } + catch (err) { + currentBuild.result = "FAILURE" + throw err + } + finally { + slack_notify(currentBuild.result) + email_notify() + } +} From 07fa15054563d45b1ba7e59cc2a3608bf1358213 Mon Sep 17 00:00:00 2001 From: G33tha Date: Wed, 30 Oct 2019 14:36:23 +0530 Subject: [PATCH 0068/2894] Issue #000 feat: added helm charts and ansible roles --- pipelines/helm/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipelines/helm/Jenkinsfile b/pipelines/helm/Jenkinsfile index cb299ed47..aa3e545d1 100644 --- a/pipelines/helm/Jenkinsfile +++ b/pipelines/helm/Jenkinsfile @@ -11,7 +11,7 @@ node() { jobName = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-1].trim() currentWs = sh(returnStdout: true, script: 'pwd').trim() ansiblePlaybook = "$currentWs/ansible/helm.yml" - ansibleExtraArgs = "--extra-vars \"chart_path=${currentWs}/helm_charts/sunbird/charts/$jobName release_name=$jobName image_tag=${params.image_tag}\" --vault-password-file /var/lib/jenkins/secrets/vault-pass" + ansibleExtraArgs = "--extra-vars \"chart_path=${currentWs}/helm_charts/sunbird/charts/$jobName release_name=$jobName image_tag=$values.image_tag\" --vault-password-file /var/lib/jenkins/secrets/vault-pass" values.put('currentWs', currentWs) values.put('ansiblePlaybook', ansiblePlaybook) values.put('ansibleExtraArgs', ansibleExtraArgs) From 837087628f22058d5024b0114e3b5da24c5c6905 Mon Sep 17 00:00:00 2001 From: G33tha Date: Wed, 30 Oct 2019 14:55:26 +0530 Subject: [PATCH 0069/2894] Issue #000 feat: added helm charts and ansible roles --- helm_charts/sunbird/charts/content/values.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm_charts/sunbird/charts/content/values.j2 b/helm_charts/sunbird/charts/content/values.j2 index a529cdb2b..4c3908bbd 100644 --- a/helm_charts/sunbird/charts/content/values.j2 +++ b/helm_charts/sunbird/charts/content/values.j2 @@ -65,7 +65,7 @@ contentenv: sunbird_qrimage_topic: {{sunbird_qrimage_topic}} sunbird_lock_expiry_time: '"{{sunbird_lock_expiry_time}}"' sunbird_content_service_log_level: {{sunbird_content_service_log_level}} - sunbird_cassandra_replication_strategy: '{"class":"NetworkTopologyStrategy","datacenter1":2}' + sunbird_cassandra_replication_strategy: "'{"class":"NetworkTopologyStrategy","datacenter1":2}'" sunbird_cassandra_consistency_level: quorum sunbird_health_check_enable: '"{{sunbird_health_check_enable}}"' From 2d320da1845055cd6089d632d6e509fa947eb51c Mon Sep 17 00:00:00 2001 From: G33tha Date: Wed, 30 Oct 2019 15:17:38 +0530 Subject: [PATCH 0070/2894] Issue #000 feat: added helm charts and ansible roles --- helm_charts/sunbird/charts/cert/values.j2 | 1 - helm_charts/sunbird/charts/content/values.j2 | 2 +- helm_charts/sunbird/charts/userorg/values.j2 | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/helm_charts/sunbird/charts/cert/values.j2 b/helm_charts/sunbird/charts/cert/values.j2 index 8abf4787f..d3acf12b4 100644 --- a/helm_charts/sunbird/charts/cert/values.j2 +++ b/helm_charts/sunbird/charts/cert/values.j2 @@ -1,6 +1,5 @@ ### Default variable file for cert-service ### -#release-2.3.0_48008e6 namespace: {{ namespace }} imagepullsecrets: {{ imagepullsecrets }} dockerhub: {{ dockerhub }} diff --git a/helm_charts/sunbird/charts/content/values.j2 b/helm_charts/sunbird/charts/content/values.j2 index 4c3908bbd..c061f6942 100644 --- a/helm_charts/sunbird/charts/content/values.j2 +++ b/helm_charts/sunbird/charts/content/values.j2 @@ -65,7 +65,7 @@ contentenv: sunbird_qrimage_topic: {{sunbird_qrimage_topic}} sunbird_lock_expiry_time: '"{{sunbird_lock_expiry_time}}"' sunbird_content_service_log_level: {{sunbird_content_service_log_level}} - sunbird_cassandra_replication_strategy: "'{"class":"NetworkTopologyStrategy","datacenter1":2}'" + sunbird_cassandra_replication_strategy: '"{"class":"NetworkTopologyStrategy","datacenter1":2}"' sunbird_cassandra_consistency_level: quorum sunbird_health_check_enable: '"{{sunbird_health_check_enable}}"' diff --git a/helm_charts/sunbird/charts/userorg/values.j2 b/helm_charts/sunbird/charts/userorg/values.j2 index 43e14ee88..f03089574 100644 --- a/helm_charts/sunbird/charts/userorg/values.j2 +++ b/helm_charts/sunbird/charts/userorg/values.j2 @@ -1,6 +1,5 @@ ### Default variable file for userorg-service ### -#release-2.2.0-prime_708a498-50 namespace: {{ namespace }} imagepullsecrets: {{ imagepullsecrets }} dockerhub: {{ dockerhub }} From b1d46fe91a59d0f5784a80753550fd7a9b19a4f1 Mon Sep 17 00:00:00 2001 From: G33tha Date: Wed, 30 Oct 2019 15:46:50 +0530 Subject: [PATCH 0071/2894] Issue #000 feat: added helm chart --- helm_charts/sunbird/charts/enc/values.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helm_charts/sunbird/charts/enc/values.j2 b/helm_charts/sunbird/charts/enc/values.j2 index d4ab11569..2c6e4602b 100644 --- a/helm_charts/sunbird/charts/enc/values.j2 +++ b/helm_charts/sunbird/charts/enc/values.j2 @@ -28,7 +28,7 @@ encenv: DB_SSL: '"True"' ENTRY_PASS: {{enc_entry_password}} MASTER_PASS: {{enc_master_pass}} - N_KEYS: {{enc_n_keys}} - N_RESERVED_KEYS: {{enc_n_reserved_keys}} + N_KEYS: '"{{enc_n_keys}}"' + N_RESERVED_KEYS: '"{{enc_n_reserved_keys}}"' From 4c899e516901c0f3d710f807e84c4a15ecbd3831 Mon Sep 17 00:00:00 2001 From: G33tha Date: Wed, 30 Oct 2019 17:35:00 +0530 Subject: [PATCH 0072/2894] Issue #000 feat: added helm charts for notification service --- helm_charts/sunbird/charts/content/values.j2 | 2 +- .../sunbird/charts/notification/Chart.yaml | 5 ++ .../notification/templates/configmap.yaml | 10 ++++ .../notification/templates/deployment.yaml | 52 +++++++++++++++++++ .../sunbird/charts/notification/values.j2 | 33 ++++++++++++ 5 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 helm_charts/sunbird/charts/notification/Chart.yaml create mode 100644 helm_charts/sunbird/charts/notification/templates/configmap.yaml create mode 100644 helm_charts/sunbird/charts/notification/templates/deployment.yaml create mode 100644 helm_charts/sunbird/charts/notification/values.j2 diff --git a/helm_charts/sunbird/charts/content/values.j2 b/helm_charts/sunbird/charts/content/values.j2 index c061f6942..4c3908bbd 100644 --- a/helm_charts/sunbird/charts/content/values.j2 +++ b/helm_charts/sunbird/charts/content/values.j2 @@ -65,7 +65,7 @@ contentenv: sunbird_qrimage_topic: {{sunbird_qrimage_topic}} sunbird_lock_expiry_time: '"{{sunbird_lock_expiry_time}}"' sunbird_content_service_log_level: {{sunbird_content_service_log_level}} - sunbird_cassandra_replication_strategy: '"{"class":"NetworkTopologyStrategy","datacenter1":2}"' + sunbird_cassandra_replication_strategy: "'{"class":"NetworkTopologyStrategy","datacenter1":2}'" sunbird_cassandra_consistency_level: quorum sunbird_health_check_enable: '"{{sunbird_health_check_enable}}"' diff --git a/helm_charts/sunbird/charts/notification/Chart.yaml b/helm_charts/sunbird/charts/notification/Chart.yaml new file mode 100644 index 000000000..e4f958f07 --- /dev/null +++ b/helm_charts/sunbird/charts/notification/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: notification +version: 0.1.0 diff --git a/helm_charts/sunbird/charts/notification/templates/configmap.yaml b/helm_charts/sunbird/charts/notification/templates/configmap.yaml new file mode 100644 index 000000000..bd1b9e0c8 --- /dev/null +++ b/helm_charts/sunbird/charts/notification/templates/configmap.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +data: + {{- range $key, $val := .Values.notificationenv }} + {{ $key }}: {{ $val }} + {{- end }} +kind: ConfigMap +metadata: + creationTimestamp: null + name: {{ .Chart.Name }}-config + namespace: {{ .Values.namespace }} diff --git a/helm_charts/sunbird/charts/notification/templates/deployment.yaml b/helm_charts/sunbird/charts/notification/templates/deployment.yaml new file mode 100644 index 000000000..c974a2bd4 --- /dev/null +++ b/helm_charts/sunbird/charts/notification/templates/deployment.yaml @@ -0,0 +1,52 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Chart.Name }} + namespace: {{ .Values.namespace }} +spec: + replicas: {{ .Values.replicaCount }} + strategy: + type: {{ .Values.strategy.type }} + rollingUpdate: + maxsurge: {{ .Values.strategy.maxsurge }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} + selector: + matchLabels: + app: {{ .Chart.Name }} + template: + metadata: + annotations: + readiness.status.sidecar.istio.io/applicationPorts: "" + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + labels: + app: {{ .Chart.Name }} + spec: + imagePullSecrets: + - name: {{ .Values.imagepullsecrets }} + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" + envFrom: + - configMapRef: + name: {{ .Chart.Name }}-config + resources: + requests: + cpu: {{ quote .Values.resources.cpu }} + memory: {{ quote .Values.resources.memory }} + ports: + - containerPort: {{ .Values.network.port }} + +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ .Chart.Name }}-service + namespace: {{ .Values.namespace }} + labels: + app: {{ .Chart.Name }} +spec: + ports: + - port: {{ .Values.network.targetport }} + selector: + app: {{ .Chart.Name }} diff --git a/helm_charts/sunbird/charts/notification/values.j2 b/helm_charts/sunbird/charts/notification/values.j2 new file mode 100644 index 000000000..45defd9c8 --- /dev/null +++ b/helm_charts/sunbird/charts/notification/values.j2 @@ -0,0 +1,33 @@ +### Default variable file for enc-service ### + +namespace: {{ namespace }} +imagepullsecrets: {{ imagepullsecrets }} +dockerhub: {{ dockerhub }} + +replicaCount: {{replicacount|default(1)}} +repository: {{notification_repository|default('notification_service')}} +image_tag: {{image_tag }} +resources: + cpu: {{notification_service_cpu|default('50m')}} + memory: {{notification_service_memory|default('50Mi')}} +network: + port: 9012 + targetport: 9000 +strategy: + type: RollingUpdate + maxsurge: 1 + maxunavailable: 0 + +notificationenv: + sunbird_notification_fcm_account_key: {{sunbird_fcm_account_key}} + sunbird_notification_kafka_servers_config: {{sunbird_processing_kafka_host}} + sunbird_notification_kafka_topic: {{env_name}}.lms.notification + sunbird_notification_msg_default_sender: {{sunbird_msg_sender}} + sunbird_msg_91_auth: {{sunbird_msg_91_auth}} + sunbird_mail_server_from_email: {{sunbird_mail_server_from_email}} + sunbird_mail_server_host: {{sunbird_mail_server_host}} + sunbird_mail_server_password: {{sunbird_mail_server_password}} + sunbird_mail_server_username: {{sunbird_mail_server_username}} + sunbird_mail_server_port: {{sunbird_mail_server_port}} + + From a128c0d0b9ee05f703708e7e6357464c4253f59b Mon Sep 17 00:00:00 2001 From: G33tha Date: Wed, 30 Oct 2019 17:47:06 +0530 Subject: [PATCH 0073/2894] Issue #000 feat: added helm charts for notification service --- helm_charts/sunbird/charts/notification/values.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm_charts/sunbird/charts/notification/values.j2 b/helm_charts/sunbird/charts/notification/values.j2 index 45defd9c8..1dc63d7a8 100644 --- a/helm_charts/sunbird/charts/notification/values.j2 +++ b/helm_charts/sunbird/charts/notification/values.j2 @@ -28,6 +28,6 @@ notificationenv: sunbird_mail_server_host: {{sunbird_mail_server_host}} sunbird_mail_server_password: {{sunbird_mail_server_password}} sunbird_mail_server_username: {{sunbird_mail_server_username}} - sunbird_mail_server_port: {{sunbird_mail_server_port}} + sunbird_mail_server_port: '"{{sunbird_mail_server_port}}"' From b9d0eff79afe8cc5590e5eba9cd601f9a7427275 Mon Sep 17 00:00:00 2001 From: G33tha Date: Thu, 31 Oct 2019 12:56:27 +0530 Subject: [PATCH 0074/2894] Issue #000 feat: updated helm charts for content and player service --- .../sunbird/charts/content/templates/configmap.yaml | 1 + helm_charts/sunbird/charts/content/values.j2 | 11 +++++++---- .../sunbird/charts/player/templates/configmap.yaml | 1 + helm_charts/sunbird/charts/player/values.j2 | 11 ++++------- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/helm_charts/sunbird/charts/content/templates/configmap.yaml b/helm_charts/sunbird/charts/content/templates/configmap.yaml index 148a02e29..9c597330a 100644 --- a/helm_charts/sunbird/charts/content/templates/configmap.yaml +++ b/helm_charts/sunbird/charts/content/templates/configmap.yaml @@ -3,6 +3,7 @@ data: {{- range $key, $val := .Values.contentenv }} {{ $key }}: {{ $val }} {{- end }} + sunbird_cassandra_replication_strategy: {{ .Values.sunbird_cassandra_replication_strategy | toJson }} kind: ConfigMap metadata: creationTimestamp: null diff --git a/helm_charts/sunbird/charts/content/values.j2 b/helm_charts/sunbird/charts/content/values.j2 index 4c3908bbd..27d5bfca8 100644 --- a/helm_charts/sunbird/charts/content/values.j2 +++ b/helm_charts/sunbird/charts/content/values.j2 @@ -65,8 +65,11 @@ contentenv: sunbird_qrimage_topic: {{sunbird_qrimage_topic}} sunbird_lock_expiry_time: '"{{sunbird_lock_expiry_time}}"' sunbird_content_service_log_level: {{sunbird_content_service_log_level}} - sunbird_cassandra_replication_strategy: "'{"class":"NetworkTopologyStrategy","datacenter1":2}'" - sunbird_cassandra_consistency_level: quorum sunbird_health_check_enable: '"{{sunbird_health_check_enable}}"' - - \ No newline at end of file + {% if groups['cassandra-2'] is defined %} +sunbird_cassandra_consistency_level: quorum + {% else %} +sunbird_cassandra_consistency_level: {{sunbird_cassandra_consistency_level}} + {% endif %} + +sunbird_cassandra_replication_strategy: '{{sunbird_cassandra_replication_strategy}}' \ No newline at end of file diff --git a/helm_charts/sunbird/charts/player/templates/configmap.yaml b/helm_charts/sunbird/charts/player/templates/configmap.yaml index 94eecafe7..89dd7d0eb 100644 --- a/helm_charts/sunbird/charts/player/templates/configmap.yaml +++ b/helm_charts/sunbird/charts/player/templates/configmap.yaml @@ -3,6 +3,7 @@ data: {{- range $key, $val := .Values.playerenv }} {{ $key }}: {{ $val }} {{- end }} + sunbird_cassandra_replication_strategy: {{ .Values.sunbird_cassandra_replication_strategy | toJson }} kind: ConfigMap metadata: creationTimestamp: null diff --git a/helm_charts/sunbird/charts/player/values.j2 b/helm_charts/sunbird/charts/player/values.j2 index 5192656fb..65692ed13 100644 --- a/helm_charts/sunbird/charts/player/values.j2 +++ b/helm_charts/sunbird/charts/player/values.j2 @@ -69,11 +69,9 @@ playerenv: sunbird_response_cache_ttl: '"{{sunbird_response_cache_ttl|default('180')}}"' sunbird_portal_preview_cdn_url: {{sunbird_portal_preview_cdn_url}} {% if groups['cassandra-2'] is defined %} -sunbird_cassandra_replication_strategy: {{sunbird_cassandra_replication_strategy}} - sunbird_cassandra_consistency_level: quorum +sunbird_cassandra_consistency_level: quorum {% else %} - sunbird_cassandra_replication_strategy: '{"class":"NetworkTopologyStrategy","datacenter1":2}' - sunbird_cassandra_consistency_level: {{sunbird_cassandra_consistency_level}} +sunbird_cassandra_consistency_level: {{sunbird_cassandra_consistency_level}} {% endif %} sunbird_health_check_enable: '"{{sunbird_health_check_enable}}"' sunbird_portal_player_cdn_enabled: {{sunbird_portal_player_cdn_enabled|default('""')}} @@ -91,7 +89,6 @@ sunbird_health_check_enable: '"{{sunbird_health_check_enable}}"' sunbird_trampoline_android_keycloak_client_id: {{sunbird_trampoline_android_keycloak_client_id}} sunbird_trampoline_android_keycloak_secret: {{sunbird_trampoline_android_keycloak_secret}} sunbird_android_keycloak_client_id: {{sunbird_android_keycloak_client_id}} - - #Release-2.3.5 sunbird_portal_merge_auth_server_url: {{sunbird_subdomain_keycloak_base_url | d('')}} - \ No newline at end of file + +sunbird_cassandra_replication_strategy: '{{sunbird_cassandra_replication_strategy}}' \ No newline at end of file From 0587a809cc3ef7e77612e9221eb6f2f43f6954c1 Mon Sep 17 00:00:00 2001 From: G33tha Date: Thu, 31 Oct 2019 13:26:03 +0530 Subject: [PATCH 0075/2894] Issue #000 feat: updated port name --- .../sunbird/charts/apimanager/templates/deployment.yaml | 4 ++-- helm_charts/sunbird/charts/cert/templates/deployment.yaml | 4 +++- helm_charts/sunbird/charts/content/templates/deployment.yaml | 4 +++- helm_charts/sunbird/charts/enc/templates/deployment.yaml | 4 +++- helm_charts/sunbird/charts/learner/templates/deployment.yaml | 4 +++- helm_charts/sunbird/charts/lms/templates/deployment.yaml | 4 +++- .../sunbird/charts/notification/templates/deployment.yaml | 4 +++- helm_charts/sunbird/charts/player/templates/deployment.yaml | 4 +++- .../sunbird/charts/telemetry/templates/deployment.yaml | 4 +++- helm_charts/sunbird/charts/userorg/templates/deployment.yaml | 4 +++- 10 files changed, 29 insertions(+), 11 deletions(-) diff --git a/helm_charts/sunbird/charts/apimanager/templates/deployment.yaml b/helm_charts/sunbird/charts/apimanager/templates/deployment.yaml index 70e3ced63..74b5cd41e 100755 --- a/helm_charts/sunbird/charts/apimanager/templates/deployment.yaml +++ b/helm_charts/sunbird/charts/apimanager/templates/deployment.yaml @@ -50,11 +50,11 @@ metadata: app: {{ .Chart.Name }} spec: ports: - - name: network + - name: {{ .Chart.Name }}-port-http protocol: TCP port: {{ .Values.network.port }} targetPort: {{ .Values.network.targetport }} - - name: service + - name: {{ .Chart.Name }}-port-admin protocol: TCP port: {{ .Values.service.port }} targetPort: {{ .Values.service.targetport }} diff --git a/helm_charts/sunbird/charts/cert/templates/deployment.yaml b/helm_charts/sunbird/charts/cert/templates/deployment.yaml index c974a2bd4..63314aef7 100644 --- a/helm_charts/sunbird/charts/cert/templates/deployment.yaml +++ b/helm_charts/sunbird/charts/cert/templates/deployment.yaml @@ -47,6 +47,8 @@ metadata: app: {{ .Chart.Name }} spec: ports: - - port: {{ .Values.network.targetport }} + - name: {{ .Chart.Name }}-port + protocol: TCP + port: {{ .Values.network.targetport }} selector: app: {{ .Chart.Name }} diff --git a/helm_charts/sunbird/charts/content/templates/deployment.yaml b/helm_charts/sunbird/charts/content/templates/deployment.yaml index c974a2bd4..63314aef7 100644 --- a/helm_charts/sunbird/charts/content/templates/deployment.yaml +++ b/helm_charts/sunbird/charts/content/templates/deployment.yaml @@ -47,6 +47,8 @@ metadata: app: {{ .Chart.Name }} spec: ports: - - port: {{ .Values.network.targetport }} + - name: {{ .Chart.Name }}-port + protocol: TCP + port: {{ .Values.network.targetport }} selector: app: {{ .Chart.Name }} diff --git a/helm_charts/sunbird/charts/enc/templates/deployment.yaml b/helm_charts/sunbird/charts/enc/templates/deployment.yaml index c974a2bd4..63314aef7 100644 --- a/helm_charts/sunbird/charts/enc/templates/deployment.yaml +++ b/helm_charts/sunbird/charts/enc/templates/deployment.yaml @@ -47,6 +47,8 @@ metadata: app: {{ .Chart.Name }} spec: ports: - - port: {{ .Values.network.targetport }} + - name: {{ .Chart.Name }}-port + protocol: TCP + port: {{ .Values.network.targetport }} selector: app: {{ .Chart.Name }} diff --git a/helm_charts/sunbird/charts/learner/templates/deployment.yaml b/helm_charts/sunbird/charts/learner/templates/deployment.yaml index c974a2bd4..63314aef7 100644 --- a/helm_charts/sunbird/charts/learner/templates/deployment.yaml +++ b/helm_charts/sunbird/charts/learner/templates/deployment.yaml @@ -47,6 +47,8 @@ metadata: app: {{ .Chart.Name }} spec: ports: - - port: {{ .Values.network.targetport }} + - name: {{ .Chart.Name }}-port + protocol: TCP + port: {{ .Values.network.targetport }} selector: app: {{ .Chart.Name }} diff --git a/helm_charts/sunbird/charts/lms/templates/deployment.yaml b/helm_charts/sunbird/charts/lms/templates/deployment.yaml index c974a2bd4..63314aef7 100644 --- a/helm_charts/sunbird/charts/lms/templates/deployment.yaml +++ b/helm_charts/sunbird/charts/lms/templates/deployment.yaml @@ -47,6 +47,8 @@ metadata: app: {{ .Chart.Name }} spec: ports: - - port: {{ .Values.network.targetport }} + - name: {{ .Chart.Name }}-port + protocol: TCP + port: {{ .Values.network.targetport }} selector: app: {{ .Chart.Name }} diff --git a/helm_charts/sunbird/charts/notification/templates/deployment.yaml b/helm_charts/sunbird/charts/notification/templates/deployment.yaml index c974a2bd4..63314aef7 100644 --- a/helm_charts/sunbird/charts/notification/templates/deployment.yaml +++ b/helm_charts/sunbird/charts/notification/templates/deployment.yaml @@ -47,6 +47,8 @@ metadata: app: {{ .Chart.Name }} spec: ports: - - port: {{ .Values.network.targetport }} + - name: {{ .Chart.Name }}-port + protocol: TCP + port: {{ .Values.network.targetport }} selector: app: {{ .Chart.Name }} diff --git a/helm_charts/sunbird/charts/player/templates/deployment.yaml b/helm_charts/sunbird/charts/player/templates/deployment.yaml index c974a2bd4..63314aef7 100644 --- a/helm_charts/sunbird/charts/player/templates/deployment.yaml +++ b/helm_charts/sunbird/charts/player/templates/deployment.yaml @@ -47,6 +47,8 @@ metadata: app: {{ .Chart.Name }} spec: ports: - - port: {{ .Values.network.targetport }} + - name: {{ .Chart.Name }}-port + protocol: TCP + port: {{ .Values.network.targetport }} selector: app: {{ .Chart.Name }} diff --git a/helm_charts/sunbird/charts/telemetry/templates/deployment.yaml b/helm_charts/sunbird/charts/telemetry/templates/deployment.yaml index c974a2bd4..63314aef7 100644 --- a/helm_charts/sunbird/charts/telemetry/templates/deployment.yaml +++ b/helm_charts/sunbird/charts/telemetry/templates/deployment.yaml @@ -47,6 +47,8 @@ metadata: app: {{ .Chart.Name }} spec: ports: - - port: {{ .Values.network.targetport }} + - name: {{ .Chart.Name }}-port + protocol: TCP + port: {{ .Values.network.targetport }} selector: app: {{ .Chart.Name }} diff --git a/helm_charts/sunbird/charts/userorg/templates/deployment.yaml b/helm_charts/sunbird/charts/userorg/templates/deployment.yaml index c974a2bd4..63314aef7 100644 --- a/helm_charts/sunbird/charts/userorg/templates/deployment.yaml +++ b/helm_charts/sunbird/charts/userorg/templates/deployment.yaml @@ -47,6 +47,8 @@ metadata: app: {{ .Chart.Name }} spec: ports: - - port: {{ .Values.network.targetport }} + - name: {{ .Chart.Name }}-port + protocol: TCP + port: {{ .Values.network.targetport }} selector: app: {{ .Chart.Name }} From af2bc2141c9d8f7adb15f047f21a3b7160143c00 Mon Sep 17 00:00:00 2001 From: G33tha Date: Thu, 31 Oct 2019 13:59:08 +0530 Subject: [PATCH 0076/2894] Issue #000 feat: removed sunbird main chart --- helm_charts/Chart.yaml | 5 ----- .../charts => }/apimanager/Chart.yaml | 0 .../apimanager/templates/configmap.yaml | 0 .../apimanager/templates/deployment.yaml | 0 .../{sunbird/charts => }/apimanager/values.j2 | 0 .../{sunbird/charts => }/cert/Chart.yaml | 0 .../charts => }/cert/templates/configmap.yaml | 0 .../cert/templates/deployment.yaml | 0 .../{sunbird/charts => }/cert/values.j2 | 0 helm_charts/{sunbird => content}/.helmignore | 0 .../{sunbird/charts => }/content/Chart.yaml | 0 .../content/templates/_helpers.tpl | 0 .../content/templates/configmap.yaml | 0 .../content/templates/deployment.yaml | 0 .../{sunbird/charts => }/content/values.j2 | 0 .../{sunbird/charts => }/enc/Chart.yaml | 0 .../charts => }/enc/templates/configmap.yaml | 0 .../charts => }/enc/templates/deployment.yaml | 0 .../{sunbird/charts => }/enc/values.j2 | 0 .../charts/content => learner}/.helmignore | 0 .../{sunbird/charts => }/learner/Chart.yaml | 0 .../learner/templates/_helpers.tpl | 0 .../learner/templates/configmap.yaml | 0 .../learner/templates/deployment.yaml | 0 .../{sunbird/charts => }/learner/values.j2 | 0 .../{sunbird/charts => }/lms/Chart.yaml | 0 .../charts => }/lms/templates/configmap.yaml | 0 .../charts => }/lms/templates/deployment.yaml | 0 .../{sunbird/charts => }/lms/values.j2 | 0 .../charts => }/notification/Chart.yaml | 0 .../notification/templates/configmap.yaml | 0 .../notification/templates/deployment.yaml | 0 .../charts => }/notification/values.j2 | 0 .../charts/learner => player}/.helmignore | 0 .../{sunbird/charts => }/player/Chart.yaml | 0 .../charts => }/player/templates/_helpers.tpl | 0 .../player/templates/configmap.yaml | 0 .../player/templates/deployment.yaml | 0 .../{sunbird/charts => }/player/values.j2 | 0 helm_charts/sunbird/Chart.yaml | 5 ----- .../sunbird/charts/telemetry/.helmignore | 22 ------------------- .../charts/player => telemetry}/.helmignore | 0 .../{sunbird/charts => }/telemetry/Chart.yaml | 0 .../telemetry/templates/_helpers.tpl | 0 .../telemetry/templates/configmap.yaml | 0 .../telemetry/templates/deployment.yaml | 0 .../{sunbird/charts => }/telemetry/values.j2 | 0 .../{sunbird/charts => }/userorg/Chart.yaml | 0 .../userorg/templates/configmap.yaml | 0 .../userorg/templates/deployment.yaml | 0 .../{sunbird/charts => }/userorg/values.j2 | 0 pipelines/helm/Jenkinsfile | 2 +- 52 files changed, 1 insertion(+), 33 deletions(-) delete mode 100644 helm_charts/Chart.yaml rename helm_charts/{sunbird/charts => }/apimanager/Chart.yaml (100%) rename helm_charts/{sunbird/charts => }/apimanager/templates/configmap.yaml (100%) rename helm_charts/{sunbird/charts => }/apimanager/templates/deployment.yaml (100%) rename helm_charts/{sunbird/charts => }/apimanager/values.j2 (100%) rename helm_charts/{sunbird/charts => }/cert/Chart.yaml (100%) rename helm_charts/{sunbird/charts => }/cert/templates/configmap.yaml (100%) rename helm_charts/{sunbird/charts => }/cert/templates/deployment.yaml (100%) rename helm_charts/{sunbird/charts => }/cert/values.j2 (100%) rename helm_charts/{sunbird => content}/.helmignore (100%) rename helm_charts/{sunbird/charts => }/content/Chart.yaml (100%) rename helm_charts/{sunbird/charts => }/content/templates/_helpers.tpl (100%) rename helm_charts/{sunbird/charts => }/content/templates/configmap.yaml (100%) rename helm_charts/{sunbird/charts => }/content/templates/deployment.yaml (100%) rename helm_charts/{sunbird/charts => }/content/values.j2 (100%) rename helm_charts/{sunbird/charts => }/enc/Chart.yaml (100%) rename helm_charts/{sunbird/charts => }/enc/templates/configmap.yaml (100%) rename helm_charts/{sunbird/charts => }/enc/templates/deployment.yaml (100%) rename helm_charts/{sunbird/charts => }/enc/values.j2 (100%) rename helm_charts/{sunbird/charts/content => learner}/.helmignore (100%) rename helm_charts/{sunbird/charts => }/learner/Chart.yaml (100%) rename helm_charts/{sunbird/charts => }/learner/templates/_helpers.tpl (100%) rename helm_charts/{sunbird/charts => }/learner/templates/configmap.yaml (100%) rename helm_charts/{sunbird/charts => }/learner/templates/deployment.yaml (100%) rename helm_charts/{sunbird/charts => }/learner/values.j2 (100%) rename helm_charts/{sunbird/charts => }/lms/Chart.yaml (100%) rename helm_charts/{sunbird/charts => }/lms/templates/configmap.yaml (100%) rename helm_charts/{sunbird/charts => }/lms/templates/deployment.yaml (100%) rename helm_charts/{sunbird/charts => }/lms/values.j2 (100%) rename helm_charts/{sunbird/charts => }/notification/Chart.yaml (100%) rename helm_charts/{sunbird/charts => }/notification/templates/configmap.yaml (100%) rename helm_charts/{sunbird/charts => }/notification/templates/deployment.yaml (100%) rename helm_charts/{sunbird/charts => }/notification/values.j2 (100%) rename helm_charts/{sunbird/charts/learner => player}/.helmignore (100%) rename helm_charts/{sunbird/charts => }/player/Chart.yaml (100%) rename helm_charts/{sunbird/charts => }/player/templates/_helpers.tpl (100%) rename helm_charts/{sunbird/charts => }/player/templates/configmap.yaml (100%) rename helm_charts/{sunbird/charts => }/player/templates/deployment.yaml (100%) rename helm_charts/{sunbird/charts => }/player/values.j2 (100%) delete mode 100644 helm_charts/sunbird/Chart.yaml delete mode 100644 helm_charts/sunbird/charts/telemetry/.helmignore rename helm_charts/{sunbird/charts/player => telemetry}/.helmignore (100%) rename helm_charts/{sunbird/charts => }/telemetry/Chart.yaml (100%) rename helm_charts/{sunbird/charts => }/telemetry/templates/_helpers.tpl (100%) rename helm_charts/{sunbird/charts => }/telemetry/templates/configmap.yaml (100%) rename helm_charts/{sunbird/charts => }/telemetry/templates/deployment.yaml (100%) rename helm_charts/{sunbird/charts => }/telemetry/values.j2 (100%) rename helm_charts/{sunbird/charts => }/userorg/Chart.yaml (100%) rename helm_charts/{sunbird/charts => }/userorg/templates/configmap.yaml (100%) rename helm_charts/{sunbird/charts => }/userorg/templates/deployment.yaml (100%) rename helm_charts/{sunbird/charts => }/userorg/values.j2 (100%) diff --git a/helm_charts/Chart.yaml b/helm_charts/Chart.yaml deleted file mode 100644 index aa9e76e07..000000000 --- a/helm_charts/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "1.0" -description: A Helm chart for sunbird -name: sunbird -version: 0.1.0 diff --git a/helm_charts/sunbird/charts/apimanager/Chart.yaml b/helm_charts/apimanager/Chart.yaml similarity index 100% rename from helm_charts/sunbird/charts/apimanager/Chart.yaml rename to helm_charts/apimanager/Chart.yaml diff --git a/helm_charts/sunbird/charts/apimanager/templates/configmap.yaml b/helm_charts/apimanager/templates/configmap.yaml similarity index 100% rename from helm_charts/sunbird/charts/apimanager/templates/configmap.yaml rename to helm_charts/apimanager/templates/configmap.yaml diff --git a/helm_charts/sunbird/charts/apimanager/templates/deployment.yaml b/helm_charts/apimanager/templates/deployment.yaml similarity index 100% rename from helm_charts/sunbird/charts/apimanager/templates/deployment.yaml rename to helm_charts/apimanager/templates/deployment.yaml diff --git a/helm_charts/sunbird/charts/apimanager/values.j2 b/helm_charts/apimanager/values.j2 similarity index 100% rename from helm_charts/sunbird/charts/apimanager/values.j2 rename to helm_charts/apimanager/values.j2 diff --git a/helm_charts/sunbird/charts/cert/Chart.yaml b/helm_charts/cert/Chart.yaml similarity index 100% rename from helm_charts/sunbird/charts/cert/Chart.yaml rename to helm_charts/cert/Chart.yaml diff --git a/helm_charts/sunbird/charts/cert/templates/configmap.yaml b/helm_charts/cert/templates/configmap.yaml similarity index 100% rename from helm_charts/sunbird/charts/cert/templates/configmap.yaml rename to helm_charts/cert/templates/configmap.yaml diff --git a/helm_charts/sunbird/charts/cert/templates/deployment.yaml b/helm_charts/cert/templates/deployment.yaml similarity index 100% rename from helm_charts/sunbird/charts/cert/templates/deployment.yaml rename to helm_charts/cert/templates/deployment.yaml diff --git a/helm_charts/sunbird/charts/cert/values.j2 b/helm_charts/cert/values.j2 similarity index 100% rename from helm_charts/sunbird/charts/cert/values.j2 rename to helm_charts/cert/values.j2 diff --git a/helm_charts/sunbird/.helmignore b/helm_charts/content/.helmignore similarity index 100% rename from helm_charts/sunbird/.helmignore rename to helm_charts/content/.helmignore diff --git a/helm_charts/sunbird/charts/content/Chart.yaml b/helm_charts/content/Chart.yaml similarity index 100% rename from helm_charts/sunbird/charts/content/Chart.yaml rename to helm_charts/content/Chart.yaml diff --git a/helm_charts/sunbird/charts/content/templates/_helpers.tpl b/helm_charts/content/templates/_helpers.tpl similarity index 100% rename from helm_charts/sunbird/charts/content/templates/_helpers.tpl rename to helm_charts/content/templates/_helpers.tpl diff --git a/helm_charts/sunbird/charts/content/templates/configmap.yaml b/helm_charts/content/templates/configmap.yaml similarity index 100% rename from helm_charts/sunbird/charts/content/templates/configmap.yaml rename to helm_charts/content/templates/configmap.yaml diff --git a/helm_charts/sunbird/charts/content/templates/deployment.yaml b/helm_charts/content/templates/deployment.yaml similarity index 100% rename from helm_charts/sunbird/charts/content/templates/deployment.yaml rename to helm_charts/content/templates/deployment.yaml diff --git a/helm_charts/sunbird/charts/content/values.j2 b/helm_charts/content/values.j2 similarity index 100% rename from helm_charts/sunbird/charts/content/values.j2 rename to helm_charts/content/values.j2 diff --git a/helm_charts/sunbird/charts/enc/Chart.yaml b/helm_charts/enc/Chart.yaml similarity index 100% rename from helm_charts/sunbird/charts/enc/Chart.yaml rename to helm_charts/enc/Chart.yaml diff --git a/helm_charts/sunbird/charts/enc/templates/configmap.yaml b/helm_charts/enc/templates/configmap.yaml similarity index 100% rename from helm_charts/sunbird/charts/enc/templates/configmap.yaml rename to helm_charts/enc/templates/configmap.yaml diff --git a/helm_charts/sunbird/charts/enc/templates/deployment.yaml b/helm_charts/enc/templates/deployment.yaml similarity index 100% rename from helm_charts/sunbird/charts/enc/templates/deployment.yaml rename to helm_charts/enc/templates/deployment.yaml diff --git a/helm_charts/sunbird/charts/enc/values.j2 b/helm_charts/enc/values.j2 similarity index 100% rename from helm_charts/sunbird/charts/enc/values.j2 rename to helm_charts/enc/values.j2 diff --git a/helm_charts/sunbird/charts/content/.helmignore b/helm_charts/learner/.helmignore similarity index 100% rename from helm_charts/sunbird/charts/content/.helmignore rename to helm_charts/learner/.helmignore diff --git a/helm_charts/sunbird/charts/learner/Chart.yaml b/helm_charts/learner/Chart.yaml similarity index 100% rename from helm_charts/sunbird/charts/learner/Chart.yaml rename to helm_charts/learner/Chart.yaml diff --git a/helm_charts/sunbird/charts/learner/templates/_helpers.tpl b/helm_charts/learner/templates/_helpers.tpl similarity index 100% rename from helm_charts/sunbird/charts/learner/templates/_helpers.tpl rename to helm_charts/learner/templates/_helpers.tpl diff --git a/helm_charts/sunbird/charts/learner/templates/configmap.yaml b/helm_charts/learner/templates/configmap.yaml similarity index 100% rename from helm_charts/sunbird/charts/learner/templates/configmap.yaml rename to helm_charts/learner/templates/configmap.yaml diff --git a/helm_charts/sunbird/charts/learner/templates/deployment.yaml b/helm_charts/learner/templates/deployment.yaml similarity index 100% rename from helm_charts/sunbird/charts/learner/templates/deployment.yaml rename to helm_charts/learner/templates/deployment.yaml diff --git a/helm_charts/sunbird/charts/learner/values.j2 b/helm_charts/learner/values.j2 similarity index 100% rename from helm_charts/sunbird/charts/learner/values.j2 rename to helm_charts/learner/values.j2 diff --git a/helm_charts/sunbird/charts/lms/Chart.yaml b/helm_charts/lms/Chart.yaml similarity index 100% rename from helm_charts/sunbird/charts/lms/Chart.yaml rename to helm_charts/lms/Chart.yaml diff --git a/helm_charts/sunbird/charts/lms/templates/configmap.yaml b/helm_charts/lms/templates/configmap.yaml similarity index 100% rename from helm_charts/sunbird/charts/lms/templates/configmap.yaml rename to helm_charts/lms/templates/configmap.yaml diff --git a/helm_charts/sunbird/charts/lms/templates/deployment.yaml b/helm_charts/lms/templates/deployment.yaml similarity index 100% rename from helm_charts/sunbird/charts/lms/templates/deployment.yaml rename to helm_charts/lms/templates/deployment.yaml diff --git a/helm_charts/sunbird/charts/lms/values.j2 b/helm_charts/lms/values.j2 similarity index 100% rename from helm_charts/sunbird/charts/lms/values.j2 rename to helm_charts/lms/values.j2 diff --git a/helm_charts/sunbird/charts/notification/Chart.yaml b/helm_charts/notification/Chart.yaml similarity index 100% rename from helm_charts/sunbird/charts/notification/Chart.yaml rename to helm_charts/notification/Chart.yaml diff --git a/helm_charts/sunbird/charts/notification/templates/configmap.yaml b/helm_charts/notification/templates/configmap.yaml similarity index 100% rename from helm_charts/sunbird/charts/notification/templates/configmap.yaml rename to helm_charts/notification/templates/configmap.yaml diff --git a/helm_charts/sunbird/charts/notification/templates/deployment.yaml b/helm_charts/notification/templates/deployment.yaml similarity index 100% rename from helm_charts/sunbird/charts/notification/templates/deployment.yaml rename to helm_charts/notification/templates/deployment.yaml diff --git a/helm_charts/sunbird/charts/notification/values.j2 b/helm_charts/notification/values.j2 similarity index 100% rename from helm_charts/sunbird/charts/notification/values.j2 rename to helm_charts/notification/values.j2 diff --git a/helm_charts/sunbird/charts/learner/.helmignore b/helm_charts/player/.helmignore similarity index 100% rename from helm_charts/sunbird/charts/learner/.helmignore rename to helm_charts/player/.helmignore diff --git a/helm_charts/sunbird/charts/player/Chart.yaml b/helm_charts/player/Chart.yaml similarity index 100% rename from helm_charts/sunbird/charts/player/Chart.yaml rename to helm_charts/player/Chart.yaml diff --git a/helm_charts/sunbird/charts/player/templates/_helpers.tpl b/helm_charts/player/templates/_helpers.tpl similarity index 100% rename from helm_charts/sunbird/charts/player/templates/_helpers.tpl rename to helm_charts/player/templates/_helpers.tpl diff --git a/helm_charts/sunbird/charts/player/templates/configmap.yaml b/helm_charts/player/templates/configmap.yaml similarity index 100% rename from helm_charts/sunbird/charts/player/templates/configmap.yaml rename to helm_charts/player/templates/configmap.yaml diff --git a/helm_charts/sunbird/charts/player/templates/deployment.yaml b/helm_charts/player/templates/deployment.yaml similarity index 100% rename from helm_charts/sunbird/charts/player/templates/deployment.yaml rename to helm_charts/player/templates/deployment.yaml diff --git a/helm_charts/sunbird/charts/player/values.j2 b/helm_charts/player/values.j2 similarity index 100% rename from helm_charts/sunbird/charts/player/values.j2 rename to helm_charts/player/values.j2 diff --git a/helm_charts/sunbird/Chart.yaml b/helm_charts/sunbird/Chart.yaml deleted file mode 100644 index 13ab481d1..000000000 --- a/helm_charts/sunbird/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "1.0" -description: A Helm chart for Kubernetes -name: sunbird -version: 0.1.0 diff --git a/helm_charts/sunbird/charts/telemetry/.helmignore b/helm_charts/sunbird/charts/telemetry/.helmignore deleted file mode 100644 index 50af03172..000000000 --- a/helm_charts/sunbird/charts/telemetry/.helmignore +++ /dev/null @@ -1,22 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/helm_charts/sunbird/charts/player/.helmignore b/helm_charts/telemetry/.helmignore similarity index 100% rename from helm_charts/sunbird/charts/player/.helmignore rename to helm_charts/telemetry/.helmignore diff --git a/helm_charts/sunbird/charts/telemetry/Chart.yaml b/helm_charts/telemetry/Chart.yaml similarity index 100% rename from helm_charts/sunbird/charts/telemetry/Chart.yaml rename to helm_charts/telemetry/Chart.yaml diff --git a/helm_charts/sunbird/charts/telemetry/templates/_helpers.tpl b/helm_charts/telemetry/templates/_helpers.tpl similarity index 100% rename from helm_charts/sunbird/charts/telemetry/templates/_helpers.tpl rename to helm_charts/telemetry/templates/_helpers.tpl diff --git a/helm_charts/sunbird/charts/telemetry/templates/configmap.yaml b/helm_charts/telemetry/templates/configmap.yaml similarity index 100% rename from helm_charts/sunbird/charts/telemetry/templates/configmap.yaml rename to helm_charts/telemetry/templates/configmap.yaml diff --git a/helm_charts/sunbird/charts/telemetry/templates/deployment.yaml b/helm_charts/telemetry/templates/deployment.yaml similarity index 100% rename from helm_charts/sunbird/charts/telemetry/templates/deployment.yaml rename to helm_charts/telemetry/templates/deployment.yaml diff --git a/helm_charts/sunbird/charts/telemetry/values.j2 b/helm_charts/telemetry/values.j2 similarity index 100% rename from helm_charts/sunbird/charts/telemetry/values.j2 rename to helm_charts/telemetry/values.j2 diff --git a/helm_charts/sunbird/charts/userorg/Chart.yaml b/helm_charts/userorg/Chart.yaml similarity index 100% rename from helm_charts/sunbird/charts/userorg/Chart.yaml rename to helm_charts/userorg/Chart.yaml diff --git a/helm_charts/sunbird/charts/userorg/templates/configmap.yaml b/helm_charts/userorg/templates/configmap.yaml similarity index 100% rename from helm_charts/sunbird/charts/userorg/templates/configmap.yaml rename to helm_charts/userorg/templates/configmap.yaml diff --git a/helm_charts/sunbird/charts/userorg/templates/deployment.yaml b/helm_charts/userorg/templates/deployment.yaml similarity index 100% rename from helm_charts/sunbird/charts/userorg/templates/deployment.yaml rename to helm_charts/userorg/templates/deployment.yaml diff --git a/helm_charts/sunbird/charts/userorg/values.j2 b/helm_charts/userorg/values.j2 similarity index 100% rename from helm_charts/sunbird/charts/userorg/values.j2 rename to helm_charts/userorg/values.j2 diff --git a/pipelines/helm/Jenkinsfile b/pipelines/helm/Jenkinsfile index aa3e545d1..1251d8c33 100644 --- a/pipelines/helm/Jenkinsfile +++ b/pipelines/helm/Jenkinsfile @@ -11,7 +11,7 @@ node() { jobName = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-1].trim() currentWs = sh(returnStdout: true, script: 'pwd').trim() ansiblePlaybook = "$currentWs/ansible/helm.yml" - ansibleExtraArgs = "--extra-vars \"chart_path=${currentWs}/helm_charts/sunbird/charts/$jobName release_name=$jobName image_tag=$values.image_tag\" --vault-password-file /var/lib/jenkins/secrets/vault-pass" + ansibleExtraArgs = "--extra-vars \"chart_path=${currentWs}/helm_charts/$jobName release_name=$jobName image_tag=$values.image_tag\" --vault-password-file /var/lib/jenkins/secrets/vault-pass" values.put('currentWs', currentWs) values.put('ansiblePlaybook', ansiblePlaybook) values.put('ansibleExtraArgs', ansibleExtraArgs) From 3342a5600dcf329faf04a538dd3c3bce69551917 Mon Sep 17 00:00:00 2001 From: G33tha Date: Thu, 31 Oct 2019 14:46:39 +0530 Subject: [PATCH 0077/2894] Issue #000 feat: removed sunbird main chart --- helm_charts/{ => core}/apimanager/Chart.yaml | 0 helm_charts/{ => core}/apimanager/templates/configmap.yaml | 0 helm_charts/{ => core}/apimanager/templates/deployment.yaml | 0 helm_charts/{ => core}/apimanager/values.j2 | 0 helm_charts/{ => core}/cert/Chart.yaml | 0 helm_charts/{ => core}/cert/templates/configmap.yaml | 0 helm_charts/{ => core}/cert/templates/deployment.yaml | 0 helm_charts/{ => core}/cert/values.j2 | 0 helm_charts/{ => core}/content/.helmignore | 0 helm_charts/{ => core}/content/Chart.yaml | 0 helm_charts/{ => core}/content/templates/_helpers.tpl | 0 helm_charts/{ => core}/content/templates/configmap.yaml | 0 helm_charts/{ => core}/content/templates/deployment.yaml | 0 helm_charts/{ => core}/content/values.j2 | 0 helm_charts/{ => core}/enc/Chart.yaml | 0 helm_charts/{ => core}/enc/templates/configmap.yaml | 0 helm_charts/{ => core}/enc/templates/deployment.yaml | 0 helm_charts/{ => core}/enc/values.j2 | 0 helm_charts/{ => core}/learner/.helmignore | 0 helm_charts/{ => core}/learner/Chart.yaml | 0 helm_charts/{ => core}/learner/templates/_helpers.tpl | 0 helm_charts/{ => core}/learner/templates/configmap.yaml | 0 helm_charts/{ => core}/learner/templates/deployment.yaml | 0 helm_charts/{ => core}/learner/values.j2 | 0 helm_charts/{ => core}/lms/Chart.yaml | 0 helm_charts/{ => core}/lms/templates/configmap.yaml | 0 helm_charts/{ => core}/lms/templates/deployment.yaml | 0 helm_charts/{ => core}/lms/values.j2 | 0 helm_charts/{ => core}/notification/Chart.yaml | 0 helm_charts/{ => core}/notification/templates/configmap.yaml | 0 helm_charts/{ => core}/notification/templates/deployment.yaml | 0 helm_charts/{ => core}/notification/values.j2 | 0 helm_charts/{ => core}/player/.helmignore | 0 helm_charts/{ => core}/player/Chart.yaml | 0 helm_charts/{ => core}/player/templates/_helpers.tpl | 0 helm_charts/{ => core}/player/templates/configmap.yaml | 0 helm_charts/{ => core}/player/templates/deployment.yaml | 0 helm_charts/{ => core}/player/values.j2 | 0 helm_charts/{ => core}/telemetry/.helmignore | 0 helm_charts/{ => core}/telemetry/Chart.yaml | 0 helm_charts/{ => core}/telemetry/templates/_helpers.tpl | 0 helm_charts/{ => core}/telemetry/templates/configmap.yaml | 0 helm_charts/{ => core}/telemetry/templates/deployment.yaml | 0 helm_charts/{ => core}/telemetry/values.j2 | 0 helm_charts/{ => core}/userorg/Chart.yaml | 0 helm_charts/{ => core}/userorg/templates/configmap.yaml | 0 helm_charts/{ => core}/userorg/templates/deployment.yaml | 0 helm_charts/{ => core}/userorg/values.j2 | 0 48 files changed, 0 insertions(+), 0 deletions(-) rename helm_charts/{ => core}/apimanager/Chart.yaml (100%) rename helm_charts/{ => core}/apimanager/templates/configmap.yaml (100%) rename helm_charts/{ => core}/apimanager/templates/deployment.yaml (100%) rename helm_charts/{ => core}/apimanager/values.j2 (100%) rename helm_charts/{ => core}/cert/Chart.yaml (100%) rename helm_charts/{ => core}/cert/templates/configmap.yaml (100%) rename helm_charts/{ => core}/cert/templates/deployment.yaml (100%) rename helm_charts/{ => core}/cert/values.j2 (100%) rename helm_charts/{ => core}/content/.helmignore (100%) rename helm_charts/{ => core}/content/Chart.yaml (100%) rename helm_charts/{ => core}/content/templates/_helpers.tpl (100%) rename helm_charts/{ => core}/content/templates/configmap.yaml (100%) rename helm_charts/{ => core}/content/templates/deployment.yaml (100%) rename helm_charts/{ => core}/content/values.j2 (100%) rename helm_charts/{ => core}/enc/Chart.yaml (100%) rename helm_charts/{ => core}/enc/templates/configmap.yaml (100%) rename helm_charts/{ => core}/enc/templates/deployment.yaml (100%) rename helm_charts/{ => core}/enc/values.j2 (100%) rename helm_charts/{ => core}/learner/.helmignore (100%) rename helm_charts/{ => core}/learner/Chart.yaml (100%) rename helm_charts/{ => core}/learner/templates/_helpers.tpl (100%) rename helm_charts/{ => core}/learner/templates/configmap.yaml (100%) rename helm_charts/{ => core}/learner/templates/deployment.yaml (100%) rename helm_charts/{ => core}/learner/values.j2 (100%) rename helm_charts/{ => core}/lms/Chart.yaml (100%) rename helm_charts/{ => core}/lms/templates/configmap.yaml (100%) rename helm_charts/{ => core}/lms/templates/deployment.yaml (100%) rename helm_charts/{ => core}/lms/values.j2 (100%) rename helm_charts/{ => core}/notification/Chart.yaml (100%) rename helm_charts/{ => core}/notification/templates/configmap.yaml (100%) rename helm_charts/{ => core}/notification/templates/deployment.yaml (100%) rename helm_charts/{ => core}/notification/values.j2 (100%) rename helm_charts/{ => core}/player/.helmignore (100%) rename helm_charts/{ => core}/player/Chart.yaml (100%) rename helm_charts/{ => core}/player/templates/_helpers.tpl (100%) rename helm_charts/{ => core}/player/templates/configmap.yaml (100%) rename helm_charts/{ => core}/player/templates/deployment.yaml (100%) rename helm_charts/{ => core}/player/values.j2 (100%) rename helm_charts/{ => core}/telemetry/.helmignore (100%) rename helm_charts/{ => core}/telemetry/Chart.yaml (100%) rename helm_charts/{ => core}/telemetry/templates/_helpers.tpl (100%) rename helm_charts/{ => core}/telemetry/templates/configmap.yaml (100%) rename helm_charts/{ => core}/telemetry/templates/deployment.yaml (100%) rename helm_charts/{ => core}/telemetry/values.j2 (100%) rename helm_charts/{ => core}/userorg/Chart.yaml (100%) rename helm_charts/{ => core}/userorg/templates/configmap.yaml (100%) rename helm_charts/{ => core}/userorg/templates/deployment.yaml (100%) rename helm_charts/{ => core}/userorg/values.j2 (100%) diff --git a/helm_charts/apimanager/Chart.yaml b/helm_charts/core/apimanager/Chart.yaml similarity index 100% rename from helm_charts/apimanager/Chart.yaml rename to helm_charts/core/apimanager/Chart.yaml diff --git a/helm_charts/apimanager/templates/configmap.yaml b/helm_charts/core/apimanager/templates/configmap.yaml similarity index 100% rename from helm_charts/apimanager/templates/configmap.yaml rename to helm_charts/core/apimanager/templates/configmap.yaml diff --git a/helm_charts/apimanager/templates/deployment.yaml b/helm_charts/core/apimanager/templates/deployment.yaml similarity index 100% rename from helm_charts/apimanager/templates/deployment.yaml rename to helm_charts/core/apimanager/templates/deployment.yaml diff --git a/helm_charts/apimanager/values.j2 b/helm_charts/core/apimanager/values.j2 similarity index 100% rename from helm_charts/apimanager/values.j2 rename to helm_charts/core/apimanager/values.j2 diff --git a/helm_charts/cert/Chart.yaml b/helm_charts/core/cert/Chart.yaml similarity index 100% rename from helm_charts/cert/Chart.yaml rename to helm_charts/core/cert/Chart.yaml diff --git a/helm_charts/cert/templates/configmap.yaml b/helm_charts/core/cert/templates/configmap.yaml similarity index 100% rename from helm_charts/cert/templates/configmap.yaml rename to helm_charts/core/cert/templates/configmap.yaml diff --git a/helm_charts/cert/templates/deployment.yaml b/helm_charts/core/cert/templates/deployment.yaml similarity index 100% rename from helm_charts/cert/templates/deployment.yaml rename to helm_charts/core/cert/templates/deployment.yaml diff --git a/helm_charts/cert/values.j2 b/helm_charts/core/cert/values.j2 similarity index 100% rename from helm_charts/cert/values.j2 rename to helm_charts/core/cert/values.j2 diff --git a/helm_charts/content/.helmignore b/helm_charts/core/content/.helmignore similarity index 100% rename from helm_charts/content/.helmignore rename to helm_charts/core/content/.helmignore diff --git a/helm_charts/content/Chart.yaml b/helm_charts/core/content/Chart.yaml similarity index 100% rename from helm_charts/content/Chart.yaml rename to helm_charts/core/content/Chart.yaml diff --git a/helm_charts/content/templates/_helpers.tpl b/helm_charts/core/content/templates/_helpers.tpl similarity index 100% rename from helm_charts/content/templates/_helpers.tpl rename to helm_charts/core/content/templates/_helpers.tpl diff --git a/helm_charts/content/templates/configmap.yaml b/helm_charts/core/content/templates/configmap.yaml similarity index 100% rename from helm_charts/content/templates/configmap.yaml rename to helm_charts/core/content/templates/configmap.yaml diff --git a/helm_charts/content/templates/deployment.yaml b/helm_charts/core/content/templates/deployment.yaml similarity index 100% rename from helm_charts/content/templates/deployment.yaml rename to helm_charts/core/content/templates/deployment.yaml diff --git a/helm_charts/content/values.j2 b/helm_charts/core/content/values.j2 similarity index 100% rename from helm_charts/content/values.j2 rename to helm_charts/core/content/values.j2 diff --git a/helm_charts/enc/Chart.yaml b/helm_charts/core/enc/Chart.yaml similarity index 100% rename from helm_charts/enc/Chart.yaml rename to helm_charts/core/enc/Chart.yaml diff --git a/helm_charts/enc/templates/configmap.yaml b/helm_charts/core/enc/templates/configmap.yaml similarity index 100% rename from helm_charts/enc/templates/configmap.yaml rename to helm_charts/core/enc/templates/configmap.yaml diff --git a/helm_charts/enc/templates/deployment.yaml b/helm_charts/core/enc/templates/deployment.yaml similarity index 100% rename from helm_charts/enc/templates/deployment.yaml rename to helm_charts/core/enc/templates/deployment.yaml diff --git a/helm_charts/enc/values.j2 b/helm_charts/core/enc/values.j2 similarity index 100% rename from helm_charts/enc/values.j2 rename to helm_charts/core/enc/values.j2 diff --git a/helm_charts/learner/.helmignore b/helm_charts/core/learner/.helmignore similarity index 100% rename from helm_charts/learner/.helmignore rename to helm_charts/core/learner/.helmignore diff --git a/helm_charts/learner/Chart.yaml b/helm_charts/core/learner/Chart.yaml similarity index 100% rename from helm_charts/learner/Chart.yaml rename to helm_charts/core/learner/Chart.yaml diff --git a/helm_charts/learner/templates/_helpers.tpl b/helm_charts/core/learner/templates/_helpers.tpl similarity index 100% rename from helm_charts/learner/templates/_helpers.tpl rename to helm_charts/core/learner/templates/_helpers.tpl diff --git a/helm_charts/learner/templates/configmap.yaml b/helm_charts/core/learner/templates/configmap.yaml similarity index 100% rename from helm_charts/learner/templates/configmap.yaml rename to helm_charts/core/learner/templates/configmap.yaml diff --git a/helm_charts/learner/templates/deployment.yaml b/helm_charts/core/learner/templates/deployment.yaml similarity index 100% rename from helm_charts/learner/templates/deployment.yaml rename to helm_charts/core/learner/templates/deployment.yaml diff --git a/helm_charts/learner/values.j2 b/helm_charts/core/learner/values.j2 similarity index 100% rename from helm_charts/learner/values.j2 rename to helm_charts/core/learner/values.j2 diff --git a/helm_charts/lms/Chart.yaml b/helm_charts/core/lms/Chart.yaml similarity index 100% rename from helm_charts/lms/Chart.yaml rename to helm_charts/core/lms/Chart.yaml diff --git a/helm_charts/lms/templates/configmap.yaml b/helm_charts/core/lms/templates/configmap.yaml similarity index 100% rename from helm_charts/lms/templates/configmap.yaml rename to helm_charts/core/lms/templates/configmap.yaml diff --git a/helm_charts/lms/templates/deployment.yaml b/helm_charts/core/lms/templates/deployment.yaml similarity index 100% rename from helm_charts/lms/templates/deployment.yaml rename to helm_charts/core/lms/templates/deployment.yaml diff --git a/helm_charts/lms/values.j2 b/helm_charts/core/lms/values.j2 similarity index 100% rename from helm_charts/lms/values.j2 rename to helm_charts/core/lms/values.j2 diff --git a/helm_charts/notification/Chart.yaml b/helm_charts/core/notification/Chart.yaml similarity index 100% rename from helm_charts/notification/Chart.yaml rename to helm_charts/core/notification/Chart.yaml diff --git a/helm_charts/notification/templates/configmap.yaml b/helm_charts/core/notification/templates/configmap.yaml similarity index 100% rename from helm_charts/notification/templates/configmap.yaml rename to helm_charts/core/notification/templates/configmap.yaml diff --git a/helm_charts/notification/templates/deployment.yaml b/helm_charts/core/notification/templates/deployment.yaml similarity index 100% rename from helm_charts/notification/templates/deployment.yaml rename to helm_charts/core/notification/templates/deployment.yaml diff --git a/helm_charts/notification/values.j2 b/helm_charts/core/notification/values.j2 similarity index 100% rename from helm_charts/notification/values.j2 rename to helm_charts/core/notification/values.j2 diff --git a/helm_charts/player/.helmignore b/helm_charts/core/player/.helmignore similarity index 100% rename from helm_charts/player/.helmignore rename to helm_charts/core/player/.helmignore diff --git a/helm_charts/player/Chart.yaml b/helm_charts/core/player/Chart.yaml similarity index 100% rename from helm_charts/player/Chart.yaml rename to helm_charts/core/player/Chart.yaml diff --git a/helm_charts/player/templates/_helpers.tpl b/helm_charts/core/player/templates/_helpers.tpl similarity index 100% rename from helm_charts/player/templates/_helpers.tpl rename to helm_charts/core/player/templates/_helpers.tpl diff --git a/helm_charts/player/templates/configmap.yaml b/helm_charts/core/player/templates/configmap.yaml similarity index 100% rename from helm_charts/player/templates/configmap.yaml rename to helm_charts/core/player/templates/configmap.yaml diff --git a/helm_charts/player/templates/deployment.yaml b/helm_charts/core/player/templates/deployment.yaml similarity index 100% rename from helm_charts/player/templates/deployment.yaml rename to helm_charts/core/player/templates/deployment.yaml diff --git a/helm_charts/player/values.j2 b/helm_charts/core/player/values.j2 similarity index 100% rename from helm_charts/player/values.j2 rename to helm_charts/core/player/values.j2 diff --git a/helm_charts/telemetry/.helmignore b/helm_charts/core/telemetry/.helmignore similarity index 100% rename from helm_charts/telemetry/.helmignore rename to helm_charts/core/telemetry/.helmignore diff --git a/helm_charts/telemetry/Chart.yaml b/helm_charts/core/telemetry/Chart.yaml similarity index 100% rename from helm_charts/telemetry/Chart.yaml rename to helm_charts/core/telemetry/Chart.yaml diff --git a/helm_charts/telemetry/templates/_helpers.tpl b/helm_charts/core/telemetry/templates/_helpers.tpl similarity index 100% rename from helm_charts/telemetry/templates/_helpers.tpl rename to helm_charts/core/telemetry/templates/_helpers.tpl diff --git a/helm_charts/telemetry/templates/configmap.yaml b/helm_charts/core/telemetry/templates/configmap.yaml similarity index 100% rename from helm_charts/telemetry/templates/configmap.yaml rename to helm_charts/core/telemetry/templates/configmap.yaml diff --git a/helm_charts/telemetry/templates/deployment.yaml b/helm_charts/core/telemetry/templates/deployment.yaml similarity index 100% rename from helm_charts/telemetry/templates/deployment.yaml rename to helm_charts/core/telemetry/templates/deployment.yaml diff --git a/helm_charts/telemetry/values.j2 b/helm_charts/core/telemetry/values.j2 similarity index 100% rename from helm_charts/telemetry/values.j2 rename to helm_charts/core/telemetry/values.j2 diff --git a/helm_charts/userorg/Chart.yaml b/helm_charts/core/userorg/Chart.yaml similarity index 100% rename from helm_charts/userorg/Chart.yaml rename to helm_charts/core/userorg/Chart.yaml diff --git a/helm_charts/userorg/templates/configmap.yaml b/helm_charts/core/userorg/templates/configmap.yaml similarity index 100% rename from helm_charts/userorg/templates/configmap.yaml rename to helm_charts/core/userorg/templates/configmap.yaml diff --git a/helm_charts/userorg/templates/deployment.yaml b/helm_charts/core/userorg/templates/deployment.yaml similarity index 100% rename from helm_charts/userorg/templates/deployment.yaml rename to helm_charts/core/userorg/templates/deployment.yaml diff --git a/helm_charts/userorg/values.j2 b/helm_charts/core/userorg/values.j2 similarity index 100% rename from helm_charts/userorg/values.j2 rename to helm_charts/core/userorg/values.j2 From 318f016b2dc5a9ea3499d781fc1f51ca23efd907 Mon Sep 17 00:00:00 2001 From: G33tha Date: Thu, 31 Oct 2019 14:49:49 +0530 Subject: [PATCH 0078/2894] Issue #000 feat: removed sunbird main chart --- pipelines/helm/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipelines/helm/Jenkinsfile b/pipelines/helm/Jenkinsfile index 1251d8c33..1e5922452 100644 --- a/pipelines/helm/Jenkinsfile +++ b/pipelines/helm/Jenkinsfile @@ -11,7 +11,7 @@ node() { jobName = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-1].trim() currentWs = sh(returnStdout: true, script: 'pwd').trim() ansiblePlaybook = "$currentWs/ansible/helm.yml" - ansibleExtraArgs = "--extra-vars \"chart_path=${currentWs}/helm_charts/$jobName release_name=$jobName image_tag=$values.image_tag\" --vault-password-file /var/lib/jenkins/secrets/vault-pass" + ansibleExtraArgs = "--extra-vars \"chart_path=${currentWs}/helm_charts/core/$jobName release_name=$jobName image_tag=$values.image_tag\" --vault-password-file /var/lib/jenkins/secrets/vault-pass" values.put('currentWs', currentWs) values.put('ansiblePlaybook', ansiblePlaybook) values.put('ansibleExtraArgs', ansibleExtraArgs) From f449a27a66b7d44a9a2b3a9b3ad56d044565dc12 Mon Sep 17 00:00:00 2001 From: G33tha Date: Thu, 31 Oct 2019 15:08:56 +0530 Subject: [PATCH 0079/2894] Issue #000 feat: updated helm charts and pipelines and ansible folder --- {ansible => kubernetes/ansible}/helm.yml | 0 .../ansible}/roles/sunbird-deploy/defaults/main.yml | 0 .../ansible}/roles/sunbird-deploy/tasks/main.yml | 0 .../helm_charts}/core/apimanager/Chart.yaml | 0 .../helm_charts}/core/apimanager/templates/configmap.yaml | 0 .../helm_charts}/core/apimanager/templates/deployment.yaml | 0 {helm_charts => kubernetes/helm_charts}/core/apimanager/values.j2 | 0 {helm_charts => kubernetes/helm_charts}/core/cert/Chart.yaml | 0 .../helm_charts}/core/cert/templates/configmap.yaml | 0 .../helm_charts}/core/cert/templates/deployment.yaml | 0 {helm_charts => kubernetes/helm_charts}/core/cert/values.j2 | 0 {helm_charts => kubernetes/helm_charts}/core/content/.helmignore | 0 {helm_charts => kubernetes/helm_charts}/core/content/Chart.yaml | 0 .../helm_charts}/core/content/templates/_helpers.tpl | 0 .../helm_charts}/core/content/templates/configmap.yaml | 0 .../helm_charts}/core/content/templates/deployment.yaml | 0 {helm_charts => kubernetes/helm_charts}/core/content/values.j2 | 0 {helm_charts => kubernetes/helm_charts}/core/enc/Chart.yaml | 0 .../helm_charts}/core/enc/templates/configmap.yaml | 0 .../helm_charts}/core/enc/templates/deployment.yaml | 0 {helm_charts => kubernetes/helm_charts}/core/enc/values.j2 | 0 {helm_charts => kubernetes/helm_charts}/core/learner/.helmignore | 0 {helm_charts => kubernetes/helm_charts}/core/learner/Chart.yaml | 0 .../helm_charts}/core/learner/templates/_helpers.tpl | 0 .../helm_charts}/core/learner/templates/configmap.yaml | 0 .../helm_charts}/core/learner/templates/deployment.yaml | 0 {helm_charts => kubernetes/helm_charts}/core/learner/values.j2 | 0 {helm_charts => kubernetes/helm_charts}/core/lms/Chart.yaml | 0 .../helm_charts}/core/lms/templates/configmap.yaml | 0 .../helm_charts}/core/lms/templates/deployment.yaml | 0 {helm_charts => kubernetes/helm_charts}/core/lms/values.j2 | 0 .../helm_charts}/core/notification/Chart.yaml | 0 .../helm_charts}/core/notification/templates/configmap.yaml | 0 .../helm_charts}/core/notification/templates/deployment.yaml | 0 .../helm_charts}/core/notification/values.j2 | 0 {helm_charts => kubernetes/helm_charts}/core/player/.helmignore | 0 {helm_charts => kubernetes/helm_charts}/core/player/Chart.yaml | 0 .../helm_charts}/core/player/templates/_helpers.tpl | 0 .../helm_charts}/core/player/templates/configmap.yaml | 0 .../helm_charts}/core/player/templates/deployment.yaml | 0 {helm_charts => kubernetes/helm_charts}/core/player/values.j2 | 0 .../helm_charts}/core/telemetry/.helmignore | 0 {helm_charts => kubernetes/helm_charts}/core/telemetry/Chart.yaml | 0 .../helm_charts}/core/telemetry/templates/_helpers.tpl | 0 .../helm_charts}/core/telemetry/templates/configmap.yaml | 0 .../helm_charts}/core/telemetry/templates/deployment.yaml | 0 {helm_charts => kubernetes/helm_charts}/core/telemetry/values.j2 | 0 {helm_charts => kubernetes/helm_charts}/core/userorg/Chart.yaml | 0 .../helm_charts}/core/userorg/templates/configmap.yaml | 0 .../helm_charts}/core/userorg/templates/deployment.yaml | 0 {helm_charts => kubernetes/helm_charts}/core/userorg/values.j2 | 0 {pipelines/helm => kubernetes/pipelines/deploy_core}/Jenkinsfile | 0 52 files changed, 0 insertions(+), 0 deletions(-) rename {ansible => kubernetes/ansible}/helm.yml (100%) rename {ansible => kubernetes/ansible}/roles/sunbird-deploy/defaults/main.yml (100%) rename {ansible => kubernetes/ansible}/roles/sunbird-deploy/tasks/main.yml (100%) rename {helm_charts => kubernetes/helm_charts}/core/apimanager/Chart.yaml (100%) rename {helm_charts => kubernetes/helm_charts}/core/apimanager/templates/configmap.yaml (100%) rename {helm_charts => kubernetes/helm_charts}/core/apimanager/templates/deployment.yaml (100%) rename {helm_charts => kubernetes/helm_charts}/core/apimanager/values.j2 (100%) rename {helm_charts => kubernetes/helm_charts}/core/cert/Chart.yaml (100%) rename {helm_charts => kubernetes/helm_charts}/core/cert/templates/configmap.yaml (100%) rename {helm_charts => kubernetes/helm_charts}/core/cert/templates/deployment.yaml (100%) rename {helm_charts => kubernetes/helm_charts}/core/cert/values.j2 (100%) rename {helm_charts => kubernetes/helm_charts}/core/content/.helmignore (100%) rename {helm_charts => kubernetes/helm_charts}/core/content/Chart.yaml (100%) rename {helm_charts => kubernetes/helm_charts}/core/content/templates/_helpers.tpl (100%) rename {helm_charts => kubernetes/helm_charts}/core/content/templates/configmap.yaml (100%) rename {helm_charts => kubernetes/helm_charts}/core/content/templates/deployment.yaml (100%) rename {helm_charts => kubernetes/helm_charts}/core/content/values.j2 (100%) rename {helm_charts => kubernetes/helm_charts}/core/enc/Chart.yaml (100%) rename {helm_charts => kubernetes/helm_charts}/core/enc/templates/configmap.yaml (100%) rename {helm_charts => kubernetes/helm_charts}/core/enc/templates/deployment.yaml (100%) rename {helm_charts => kubernetes/helm_charts}/core/enc/values.j2 (100%) rename {helm_charts => kubernetes/helm_charts}/core/learner/.helmignore (100%) rename {helm_charts => kubernetes/helm_charts}/core/learner/Chart.yaml (100%) rename {helm_charts => kubernetes/helm_charts}/core/learner/templates/_helpers.tpl (100%) rename {helm_charts => kubernetes/helm_charts}/core/learner/templates/configmap.yaml (100%) rename {helm_charts => kubernetes/helm_charts}/core/learner/templates/deployment.yaml (100%) rename {helm_charts => kubernetes/helm_charts}/core/learner/values.j2 (100%) rename {helm_charts => kubernetes/helm_charts}/core/lms/Chart.yaml (100%) rename {helm_charts => kubernetes/helm_charts}/core/lms/templates/configmap.yaml (100%) rename {helm_charts => kubernetes/helm_charts}/core/lms/templates/deployment.yaml (100%) rename {helm_charts => kubernetes/helm_charts}/core/lms/values.j2 (100%) rename {helm_charts => kubernetes/helm_charts}/core/notification/Chart.yaml (100%) rename {helm_charts => kubernetes/helm_charts}/core/notification/templates/configmap.yaml (100%) rename {helm_charts => kubernetes/helm_charts}/core/notification/templates/deployment.yaml (100%) rename {helm_charts => kubernetes/helm_charts}/core/notification/values.j2 (100%) rename {helm_charts => kubernetes/helm_charts}/core/player/.helmignore (100%) rename {helm_charts => kubernetes/helm_charts}/core/player/Chart.yaml (100%) rename {helm_charts => kubernetes/helm_charts}/core/player/templates/_helpers.tpl (100%) rename {helm_charts => kubernetes/helm_charts}/core/player/templates/configmap.yaml (100%) rename {helm_charts => kubernetes/helm_charts}/core/player/templates/deployment.yaml (100%) rename {helm_charts => kubernetes/helm_charts}/core/player/values.j2 (100%) rename {helm_charts => kubernetes/helm_charts}/core/telemetry/.helmignore (100%) rename {helm_charts => kubernetes/helm_charts}/core/telemetry/Chart.yaml (100%) rename {helm_charts => kubernetes/helm_charts}/core/telemetry/templates/_helpers.tpl (100%) rename {helm_charts => kubernetes/helm_charts}/core/telemetry/templates/configmap.yaml (100%) rename {helm_charts => kubernetes/helm_charts}/core/telemetry/templates/deployment.yaml (100%) rename {helm_charts => kubernetes/helm_charts}/core/telemetry/values.j2 (100%) rename {helm_charts => kubernetes/helm_charts}/core/userorg/Chart.yaml (100%) rename {helm_charts => kubernetes/helm_charts}/core/userorg/templates/configmap.yaml (100%) rename {helm_charts => kubernetes/helm_charts}/core/userorg/templates/deployment.yaml (100%) rename {helm_charts => kubernetes/helm_charts}/core/userorg/values.j2 (100%) rename {pipelines/helm => kubernetes/pipelines/deploy_core}/Jenkinsfile (100%) diff --git a/ansible/helm.yml b/kubernetes/ansible/helm.yml similarity index 100% rename from ansible/helm.yml rename to kubernetes/ansible/helm.yml diff --git a/ansible/roles/sunbird-deploy/defaults/main.yml b/kubernetes/ansible/roles/sunbird-deploy/defaults/main.yml similarity index 100% rename from ansible/roles/sunbird-deploy/defaults/main.yml rename to kubernetes/ansible/roles/sunbird-deploy/defaults/main.yml diff --git a/ansible/roles/sunbird-deploy/tasks/main.yml b/kubernetes/ansible/roles/sunbird-deploy/tasks/main.yml similarity index 100% rename from ansible/roles/sunbird-deploy/tasks/main.yml rename to kubernetes/ansible/roles/sunbird-deploy/tasks/main.yml diff --git a/helm_charts/core/apimanager/Chart.yaml b/kubernetes/helm_charts/core/apimanager/Chart.yaml similarity index 100% rename from helm_charts/core/apimanager/Chart.yaml rename to kubernetes/helm_charts/core/apimanager/Chart.yaml diff --git a/helm_charts/core/apimanager/templates/configmap.yaml b/kubernetes/helm_charts/core/apimanager/templates/configmap.yaml similarity index 100% rename from helm_charts/core/apimanager/templates/configmap.yaml rename to kubernetes/helm_charts/core/apimanager/templates/configmap.yaml diff --git a/helm_charts/core/apimanager/templates/deployment.yaml b/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml similarity index 100% rename from helm_charts/core/apimanager/templates/deployment.yaml rename to kubernetes/helm_charts/core/apimanager/templates/deployment.yaml diff --git a/helm_charts/core/apimanager/values.j2 b/kubernetes/helm_charts/core/apimanager/values.j2 similarity index 100% rename from helm_charts/core/apimanager/values.j2 rename to kubernetes/helm_charts/core/apimanager/values.j2 diff --git a/helm_charts/core/cert/Chart.yaml b/kubernetes/helm_charts/core/cert/Chart.yaml similarity index 100% rename from helm_charts/core/cert/Chart.yaml rename to kubernetes/helm_charts/core/cert/Chart.yaml diff --git a/helm_charts/core/cert/templates/configmap.yaml b/kubernetes/helm_charts/core/cert/templates/configmap.yaml similarity index 100% rename from helm_charts/core/cert/templates/configmap.yaml rename to kubernetes/helm_charts/core/cert/templates/configmap.yaml diff --git a/helm_charts/core/cert/templates/deployment.yaml b/kubernetes/helm_charts/core/cert/templates/deployment.yaml similarity index 100% rename from helm_charts/core/cert/templates/deployment.yaml rename to kubernetes/helm_charts/core/cert/templates/deployment.yaml diff --git a/helm_charts/core/cert/values.j2 b/kubernetes/helm_charts/core/cert/values.j2 similarity index 100% rename from helm_charts/core/cert/values.j2 rename to kubernetes/helm_charts/core/cert/values.j2 diff --git a/helm_charts/core/content/.helmignore b/kubernetes/helm_charts/core/content/.helmignore similarity index 100% rename from helm_charts/core/content/.helmignore rename to kubernetes/helm_charts/core/content/.helmignore diff --git a/helm_charts/core/content/Chart.yaml b/kubernetes/helm_charts/core/content/Chart.yaml similarity index 100% rename from helm_charts/core/content/Chart.yaml rename to kubernetes/helm_charts/core/content/Chart.yaml diff --git a/helm_charts/core/content/templates/_helpers.tpl b/kubernetes/helm_charts/core/content/templates/_helpers.tpl similarity index 100% rename from helm_charts/core/content/templates/_helpers.tpl rename to kubernetes/helm_charts/core/content/templates/_helpers.tpl diff --git a/helm_charts/core/content/templates/configmap.yaml b/kubernetes/helm_charts/core/content/templates/configmap.yaml similarity index 100% rename from helm_charts/core/content/templates/configmap.yaml rename to kubernetes/helm_charts/core/content/templates/configmap.yaml diff --git a/helm_charts/core/content/templates/deployment.yaml b/kubernetes/helm_charts/core/content/templates/deployment.yaml similarity index 100% rename from helm_charts/core/content/templates/deployment.yaml rename to kubernetes/helm_charts/core/content/templates/deployment.yaml diff --git a/helm_charts/core/content/values.j2 b/kubernetes/helm_charts/core/content/values.j2 similarity index 100% rename from helm_charts/core/content/values.j2 rename to kubernetes/helm_charts/core/content/values.j2 diff --git a/helm_charts/core/enc/Chart.yaml b/kubernetes/helm_charts/core/enc/Chart.yaml similarity index 100% rename from helm_charts/core/enc/Chart.yaml rename to kubernetes/helm_charts/core/enc/Chart.yaml diff --git a/helm_charts/core/enc/templates/configmap.yaml b/kubernetes/helm_charts/core/enc/templates/configmap.yaml similarity index 100% rename from helm_charts/core/enc/templates/configmap.yaml rename to kubernetes/helm_charts/core/enc/templates/configmap.yaml diff --git a/helm_charts/core/enc/templates/deployment.yaml b/kubernetes/helm_charts/core/enc/templates/deployment.yaml similarity index 100% rename from helm_charts/core/enc/templates/deployment.yaml rename to kubernetes/helm_charts/core/enc/templates/deployment.yaml diff --git a/helm_charts/core/enc/values.j2 b/kubernetes/helm_charts/core/enc/values.j2 similarity index 100% rename from helm_charts/core/enc/values.j2 rename to kubernetes/helm_charts/core/enc/values.j2 diff --git a/helm_charts/core/learner/.helmignore b/kubernetes/helm_charts/core/learner/.helmignore similarity index 100% rename from helm_charts/core/learner/.helmignore rename to kubernetes/helm_charts/core/learner/.helmignore diff --git a/helm_charts/core/learner/Chart.yaml b/kubernetes/helm_charts/core/learner/Chart.yaml similarity index 100% rename from helm_charts/core/learner/Chart.yaml rename to kubernetes/helm_charts/core/learner/Chart.yaml diff --git a/helm_charts/core/learner/templates/_helpers.tpl b/kubernetes/helm_charts/core/learner/templates/_helpers.tpl similarity index 100% rename from helm_charts/core/learner/templates/_helpers.tpl rename to kubernetes/helm_charts/core/learner/templates/_helpers.tpl diff --git a/helm_charts/core/learner/templates/configmap.yaml b/kubernetes/helm_charts/core/learner/templates/configmap.yaml similarity index 100% rename from helm_charts/core/learner/templates/configmap.yaml rename to kubernetes/helm_charts/core/learner/templates/configmap.yaml diff --git a/helm_charts/core/learner/templates/deployment.yaml b/kubernetes/helm_charts/core/learner/templates/deployment.yaml similarity index 100% rename from helm_charts/core/learner/templates/deployment.yaml rename to kubernetes/helm_charts/core/learner/templates/deployment.yaml diff --git a/helm_charts/core/learner/values.j2 b/kubernetes/helm_charts/core/learner/values.j2 similarity index 100% rename from helm_charts/core/learner/values.j2 rename to kubernetes/helm_charts/core/learner/values.j2 diff --git a/helm_charts/core/lms/Chart.yaml b/kubernetes/helm_charts/core/lms/Chart.yaml similarity index 100% rename from helm_charts/core/lms/Chart.yaml rename to kubernetes/helm_charts/core/lms/Chart.yaml diff --git a/helm_charts/core/lms/templates/configmap.yaml b/kubernetes/helm_charts/core/lms/templates/configmap.yaml similarity index 100% rename from helm_charts/core/lms/templates/configmap.yaml rename to kubernetes/helm_charts/core/lms/templates/configmap.yaml diff --git a/helm_charts/core/lms/templates/deployment.yaml b/kubernetes/helm_charts/core/lms/templates/deployment.yaml similarity index 100% rename from helm_charts/core/lms/templates/deployment.yaml rename to kubernetes/helm_charts/core/lms/templates/deployment.yaml diff --git a/helm_charts/core/lms/values.j2 b/kubernetes/helm_charts/core/lms/values.j2 similarity index 100% rename from helm_charts/core/lms/values.j2 rename to kubernetes/helm_charts/core/lms/values.j2 diff --git a/helm_charts/core/notification/Chart.yaml b/kubernetes/helm_charts/core/notification/Chart.yaml similarity index 100% rename from helm_charts/core/notification/Chart.yaml rename to kubernetes/helm_charts/core/notification/Chart.yaml diff --git a/helm_charts/core/notification/templates/configmap.yaml b/kubernetes/helm_charts/core/notification/templates/configmap.yaml similarity index 100% rename from helm_charts/core/notification/templates/configmap.yaml rename to kubernetes/helm_charts/core/notification/templates/configmap.yaml diff --git a/helm_charts/core/notification/templates/deployment.yaml b/kubernetes/helm_charts/core/notification/templates/deployment.yaml similarity index 100% rename from helm_charts/core/notification/templates/deployment.yaml rename to kubernetes/helm_charts/core/notification/templates/deployment.yaml diff --git a/helm_charts/core/notification/values.j2 b/kubernetes/helm_charts/core/notification/values.j2 similarity index 100% rename from helm_charts/core/notification/values.j2 rename to kubernetes/helm_charts/core/notification/values.j2 diff --git a/helm_charts/core/player/.helmignore b/kubernetes/helm_charts/core/player/.helmignore similarity index 100% rename from helm_charts/core/player/.helmignore rename to kubernetes/helm_charts/core/player/.helmignore diff --git a/helm_charts/core/player/Chart.yaml b/kubernetes/helm_charts/core/player/Chart.yaml similarity index 100% rename from helm_charts/core/player/Chart.yaml rename to kubernetes/helm_charts/core/player/Chart.yaml diff --git a/helm_charts/core/player/templates/_helpers.tpl b/kubernetes/helm_charts/core/player/templates/_helpers.tpl similarity index 100% rename from helm_charts/core/player/templates/_helpers.tpl rename to kubernetes/helm_charts/core/player/templates/_helpers.tpl diff --git a/helm_charts/core/player/templates/configmap.yaml b/kubernetes/helm_charts/core/player/templates/configmap.yaml similarity index 100% rename from helm_charts/core/player/templates/configmap.yaml rename to kubernetes/helm_charts/core/player/templates/configmap.yaml diff --git a/helm_charts/core/player/templates/deployment.yaml b/kubernetes/helm_charts/core/player/templates/deployment.yaml similarity index 100% rename from helm_charts/core/player/templates/deployment.yaml rename to kubernetes/helm_charts/core/player/templates/deployment.yaml diff --git a/helm_charts/core/player/values.j2 b/kubernetes/helm_charts/core/player/values.j2 similarity index 100% rename from helm_charts/core/player/values.j2 rename to kubernetes/helm_charts/core/player/values.j2 diff --git a/helm_charts/core/telemetry/.helmignore b/kubernetes/helm_charts/core/telemetry/.helmignore similarity index 100% rename from helm_charts/core/telemetry/.helmignore rename to kubernetes/helm_charts/core/telemetry/.helmignore diff --git a/helm_charts/core/telemetry/Chart.yaml b/kubernetes/helm_charts/core/telemetry/Chart.yaml similarity index 100% rename from helm_charts/core/telemetry/Chart.yaml rename to kubernetes/helm_charts/core/telemetry/Chart.yaml diff --git a/helm_charts/core/telemetry/templates/_helpers.tpl b/kubernetes/helm_charts/core/telemetry/templates/_helpers.tpl similarity index 100% rename from helm_charts/core/telemetry/templates/_helpers.tpl rename to kubernetes/helm_charts/core/telemetry/templates/_helpers.tpl diff --git a/helm_charts/core/telemetry/templates/configmap.yaml b/kubernetes/helm_charts/core/telemetry/templates/configmap.yaml similarity index 100% rename from helm_charts/core/telemetry/templates/configmap.yaml rename to kubernetes/helm_charts/core/telemetry/templates/configmap.yaml diff --git a/helm_charts/core/telemetry/templates/deployment.yaml b/kubernetes/helm_charts/core/telemetry/templates/deployment.yaml similarity index 100% rename from helm_charts/core/telemetry/templates/deployment.yaml rename to kubernetes/helm_charts/core/telemetry/templates/deployment.yaml diff --git a/helm_charts/core/telemetry/values.j2 b/kubernetes/helm_charts/core/telemetry/values.j2 similarity index 100% rename from helm_charts/core/telemetry/values.j2 rename to kubernetes/helm_charts/core/telemetry/values.j2 diff --git a/helm_charts/core/userorg/Chart.yaml b/kubernetes/helm_charts/core/userorg/Chart.yaml similarity index 100% rename from helm_charts/core/userorg/Chart.yaml rename to kubernetes/helm_charts/core/userorg/Chart.yaml diff --git a/helm_charts/core/userorg/templates/configmap.yaml b/kubernetes/helm_charts/core/userorg/templates/configmap.yaml similarity index 100% rename from helm_charts/core/userorg/templates/configmap.yaml rename to kubernetes/helm_charts/core/userorg/templates/configmap.yaml diff --git a/helm_charts/core/userorg/templates/deployment.yaml b/kubernetes/helm_charts/core/userorg/templates/deployment.yaml similarity index 100% rename from helm_charts/core/userorg/templates/deployment.yaml rename to kubernetes/helm_charts/core/userorg/templates/deployment.yaml diff --git a/helm_charts/core/userorg/values.j2 b/kubernetes/helm_charts/core/userorg/values.j2 similarity index 100% rename from helm_charts/core/userorg/values.j2 rename to kubernetes/helm_charts/core/userorg/values.j2 diff --git a/pipelines/helm/Jenkinsfile b/kubernetes/pipelines/deploy_core/Jenkinsfile similarity index 100% rename from pipelines/helm/Jenkinsfile rename to kubernetes/pipelines/deploy_core/Jenkinsfile From d99368eb03e6472c324b1a123e153cac71510221 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 31 Oct 2019 15:14:39 +0530 Subject: [PATCH 0080/2894] Issue #000 feat: Adding helm charts and ansible --- kubernetes/ansible/bootstrap.yaml | 8 + kubernetes/ansible/monitoring.yaml | 7 + .../ansible/roles/bootstrap-k8s/README.md | 38 + .../roles/bootstrap-k8s/defaults/main.yml | 8 + .../roles/bootstrap-k8s/handlers/main.yml | 2 + .../ansible/roles/bootstrap-k8s/meta/main.yml | 57 + .../roles/bootstrap-k8s/tasks/main.yml | 22 + .../bootstrap-k8s/templates/gateway.yaml | 22 + .../bootstrap-k8s/templates/namespace.yaml | 6 + .../bootstrap-k8s/templates/serviceentry.yaml | 18 + .../templates/virtualservice.yaml | 148 + .../roles/bootstrap-k8s/tests/inventory | 2 + .../roles/bootstrap-k8s/tests/test.yml | 5 + .../ansible/roles/bootstrap-k8s/vars/main.yml | 2 + .../roles/sunbird-monitoring/README.md | 38 + .../sunbird-monitoring/defaults/main.yml | 35 + .../sunbird-monitoring/handlers/main.yml | 2 + .../roles/sunbird-monitoring/meta/main.yml | 57 + .../roles/sunbird-monitoring/tasks/main.yml | 20 + .../templates/additional-scrape-configs.yaml | 181 + .../templates/blackbox-exporter.yaml | 0 .../templates/cassandra-jmx-exporter.yaml | 0 .../templates/elasticsearch-exporter.yaml | 2 + .../templates/kafka-lag-exporter.yaml | 2 + .../templates/prometheus-operator.yaml | 19 + .../templates/statsd-exporter.yaml | 0 .../roles/sunbird-monitoring/tests/inventory | 2 + .../roles/sunbird-monitoring/tests/test.yml | 5 + .../roles/sunbird-monitoring/vars/main.yml | 2 + .../kube-system/coredns-custom.yaml | 23 + .../additional-scrape-configs/.helmignore | 22 + .../additional-scrape-configs/Chart.yaml | 21 + .../templates/_helpers.tpl | 63 + .../templates/secrets.yaml | 10 + .../additional-scrape-configs/values.yaml | 10 + .../monitoring/blackbox-exporter/Chart.yaml | 17 + .../monitoring/blackbox-exporter/OWNERS | 6 + .../monitoring/blackbox-exporter/README.md | 118 + .../blackbox-exporter/ci/default-values.yaml | 0 .../blackbox-exporter/ci/secret-values.yaml | 1 + .../blackbox-exporter/templates/NOTES.txt | 1 + .../blackbox-exporter/templates/_helpers.tpl | 31 + .../templates/configmap.yaml | 14 + .../templates/deployment.yaml | 108 + .../blackbox-exporter/templates/ingress.yaml | 30 + .../templates/poddisruptionbudget.yaml | 17 + .../blackbox-exporter/templates/service.yaml | 29 + .../templates/servicemonitor.yaml | 45 + .../monitoring/blackbox-exporter/values.yaml | 133 + .../monitoring/blackbox-exporter/values1.yaml | 155 + .../cassandra-jmx-exporter/.helmignore | 22 + .../cassandra-jmx-exporter/Chart.yaml | 21 + .../templates/NOTES.txt | 21 + .../templates/_helpers.tpl | 63 + .../templates/deployment.yaml | 60 + .../templates/ingress.yaml | 41 + .../templates/jmx-httpserver-configmap.yaml | 10 + .../logging-properties-configmap.yaml | 10 + .../templates/service.yaml | 13 + .../templates/serviceMonitor.yml | 25 + .../templates/serviceaccount.yaml | 8 + .../templates/tests/test-connection.yaml | 15 + .../cassandra-jmx-exporter/values.yaml | 99 + .../elasticsearch-exporter/.helmignore | 24 + .../elasticsearch-exporter/Chart.yaml | 17 + .../elasticsearch-exporter/README.md | 108 + .../ci/default-values.yaml | 1 + .../ci/security-context.yaml | 5 + .../templates/NOTES.txt | 15 + .../templates/_helpers.tpl | 33 + .../templates/cert-secret.yaml | 16 + .../templates/deployment.yaml | 152 + .../templates/prometheusrule.yaml | 24 + .../templates/service.yaml | 25 + .../templates/servicemonitor.yaml | 36 + .../elasticsearch-exporter/values.yaml | 180 + .../elasticsearch-exporter/values1.yaml | 179 + .../monitoring/kafka-lag-exporter/.helmignore | 22 + .../monitoring/kafka-lag-exporter/Chart.yaml | 21 + .../kafka-lag-exporter/templates/NOTES.txt | 21 + .../kafka-lag-exporter/templates/_helpers.tpl | 63 + .../templates/deployment.yaml | 47 + .../kafka-lag-exporter/templates/ingress.yaml | 41 + .../kafka-lag-exporter/templates/service.yaml | 13 + .../templates/serviceMonitor.yml | 25 + .../templates/serviceaccount.yaml | 8 + .../templates/tests/test-connection.yaml | 15 + .../monitoring/kafka-lag-exporter/values.yaml | 88 + .../prometheus-operator/.helmignore | 26 + .../prometheus-operator/CONTRIBUTING.md | 11 + .../monitoring/prometheus-operator/Chart.yaml | 19 + .../monitoring/prometheus-operator/README.md | 643 +++ .../charts/grafana/.helmignore | 23 + .../charts/grafana/Chart.yaml | 18 + .../charts/grafana/README.md | 294 ++ .../grafana/dashboards/custom-dashboard.json | 1 + .../charts/grafana/templates/NOTES.txt | 37 + .../charts/grafana/templates/_helpers.tpl | 51 + .../charts/grafana/templates/_pod.tpl | 355 ++ .../charts/grafana/templates/clusterrole.yaml | 28 + .../grafana/templates/clusterrolebinding.yaml | 23 + .../configmap-dashboard-provider.yaml | 27 + .../charts/grafana/templates/configmap.yaml | 72 + .../templates/dashboards-json-configmap.yaml | 32 + .../charts/grafana/templates/deployment.yaml | 49 + .../grafana/templates/headless-service.yaml | 22 + .../charts/grafana/templates/ingress.yaml | 41 + .../templates/poddisruptionbudget.yaml | 25 + .../grafana/templates/podsecuritypolicy.yaml | 55 + .../charts/grafana/templates/pvc.yaml | 29 + .../charts/grafana/templates/role.yaml | 35 + .../charts/grafana/templates/rolebinding.yaml | 30 + .../charts/grafana/templates/secret-env.yaml | 17 + .../charts/grafana/templates/secret.yaml | 23 + .../charts/grafana/templates/service.yaml | 50 + .../grafana/templates/serviceaccount.yaml | 12 + .../charts/grafana/templates/statefulset.yaml | 49 + .../templates/tests/test-configmap.yaml | 20 + .../tests/test-podsecuritypolicy.yaml | 32 + .../grafana/templates/tests/test-role.yaml | 17 + .../templates/tests/test-rolebinding.yaml | 20 + .../templates/tests/test-serviceaccount.yaml | 12 + .../charts/grafana/templates/tests/test.yaml | 67 + .../charts/grafana/values.yaml | 459 +++ .../charts/kube-state-metrics/.helmignore | 21 + .../charts/kube-state-metrics/Chart.yaml | 18 + .../charts/kube-state-metrics/OWNERS | 8 + .../charts/kube-state-metrics/README.md | 68 + .../kube-state-metrics/templates/NOTES.txt | 10 + .../kube-state-metrics/templates/_helpers.tpl | 36 + .../templates/clusterrole.yaml | 156 + .../templates/clusterrolebinding.yaml | 19 + .../templates/deployment.yaml | 150 + .../templates/podsecuritypolicy.yaml | 39 + .../templates/psp-clusterrole.yaml | 17 + .../templates/psp-clusterrolebinding.yaml | 19 + .../kube-state-metrics/templates/service.yaml | 35 + .../templates/serviceaccount.yaml | 13 + .../templates/servicemonitor.yaml | 24 + .../charts/kube-state-metrics/values.yaml | 111 + .../prometheus-node-exporter/.helmignore | 21 + .../prometheus-node-exporter/Chart.yaml | 15 + .../charts/prometheus-node-exporter/OWNERS | 4 + .../charts/prometheus-node-exporter/README.md | 83 + .../templates/NOTES.txt | 15 + .../templates/_helpers.tpl | 55 + .../templates/daemonset.yaml | 111 + .../templates/endpoints.yaml | 17 + .../templates/monitor.yaml | 20 + .../templates/psp-clusterrole.yaml | 15 + .../templates/psp-clusterrolebinding.yaml | 17 + .../templates/psp.yaml | 51 + .../templates/service.yaml | 22 + .../templates/serviceaccount.yaml | 15 + .../prometheus-node-exporter/values.yaml | 107 + .../prometheus-operator/requirements.lock | 12 + .../prometheus-operator/requirements.yaml | 16 + .../prometheus-operator/templates/NOTES.txt | 5 + .../templates/_helpers.tpl | 91 + .../templates/alertmanager/alertmanager.yaml | 103 + .../templates/alertmanager/ingress.yaml | 49 + .../alertmanager/podDisruptionBudget.yaml | 21 + .../alertmanager/psp-clusterrole.yaml | 16 + .../alertmanager/psp-clusterrolebinding.yaml | 18 + .../templates/alertmanager/psp.yaml | 49 + .../templates/alertmanager/secret.yaml | 23 + .../templates/alertmanager/service.yaml | 43 + .../alertmanager/serviceaccount.yaml | 12 + .../alertmanager/servicemonitor.yaml | 32 + .../templates/exporters/core-dns/service.yaml | 21 + .../exporters/core-dns/servicemonitor.yaml | 33 + .../kube-api-server/servicemonitor.yaml | 36 + .../kube-controller-manager/endpoints.yaml | 21 + .../kube-controller-manager/service.yaml | 24 + .../servicemonitor.yaml | 44 + .../templates/exporters/kube-dns/service.yaml | 25 + .../exporters/kube-dns/servicemonitor.yaml | 46 + .../exporters/kube-etcd/endpoints.yaml | 21 + .../exporters/kube-etcd/service.yaml | 24 + .../exporters/kube-etcd/servicemonitor.yaml | 50 + .../exporters/kube-proxy/service.yaml | 22 + .../exporters/kube-proxy/servicemonitor.yaml | 38 + .../exporters/kube-scheduler/endpoints.yaml | 21 + .../exporters/kube-scheduler/service.yaml | 24 + .../kube-scheduler/servicemonitor.yaml | 44 + .../kube-state-metrics/serviceMonitor.yaml | 30 + .../exporters/kubelet/servicemonitor.yaml | 86 + .../node-exporter/servicemonitor.yaml | 32 + .../grafana/configmap-dashboards.yaml | 24 + .../grafana/configmaps-datasources.yaml | 34 + .../grafana/dashboards-1.14/apiserver.yaml | 1298 +++++++ .../dashboards-1.14/controller-manager.yaml | 1128 ++++++ .../grafana/dashboards-1.14/etcd.yaml | 1111 ++++++ .../grafana/dashboards-1.14/k8s-coredns.yaml | 1324 +++++++ .../k8s-resources-cluster.yaml | 1474 +++++++ .../k8s-resources-namespace.yaml | 958 +++++ .../dashboards-1.14/k8s-resources-node.yaml | 958 +++++ .../dashboards-1.14/k8s-resources-pod.yaml | 1001 +++++ .../k8s-resources-workload.yaml | 931 +++++ .../k8s-resources-workloads-namespace.yaml | 967 +++++ .../grafana/dashboards-1.14/kubelet.yaml | 2466 ++++++++++++ .../node-cluster-rsrc-use.yaml | 959 +++++ .../dashboards-1.14/node-rsrc-use.yaml | 986 +++++ .../grafana/dashboards-1.14/nodes.yaml | 982 +++++ .../persistentvolumesusage.yaml | 568 +++ .../grafana/dashboards-1.14/pods.yaml | 675 ++++ .../prometheus-remote-write.yaml | 971 +++++ .../grafana/dashboards-1.14/prometheus.yaml | 1217 ++++++ .../grafana/dashboards-1.14/proxy.yaml | 1206 ++++++ .../grafana/dashboards-1.14/scheduler.yaml | 1053 +++++ .../grafana/dashboards-1.14/statefulset.yaml | 921 +++++ .../templates/grafana/dashboards/etcd.yaml | 1111 ++++++ .../dashboards/k8s-cluster-rsrc-use.yaml | 954 +++++ .../grafana/dashboards/k8s-coredns.yaml | 1324 +++++++ .../grafana/dashboards/k8s-node-rsrc-use.yaml | 981 +++++ .../dashboards/k8s-resources-cluster.yaml | 1474 +++++++ .../dashboards/k8s-resources-namespace.yaml | 958 +++++ .../grafana/dashboards/k8s-resources-pod.yaml | 1001 +++++ .../dashboards/k8s-resources-workload.yaml | 931 +++++ .../k8s-resources-workloads-namespace.yaml | 967 +++++ .../templates/grafana/dashboards/nodes.yaml | 1378 +++++++ .../dashboards/persistentvolumesusage.yaml | 568 +++ .../templates/grafana/dashboards/pods.yaml | 675 ++++ .../grafana/dashboards/statefulset.yaml | 921 +++++ .../templates/grafana/servicemonitor.yaml | 32 + .../job-patch/clusterrole.yaml | 29 + .../job-patch/clusterrolebinding.yaml | 21 + .../job-patch/job-createSecret.yaml | 50 + .../job-patch/job-patchWebhook.yaml | 51 + .../admission-webhooks/job-patch/psp.yaml | 51 + .../admission-webhooks/job-patch/role.yaml | 21 + .../job-patch/rolebinding.yaml | 21 + .../job-patch/serviceaccount.yaml | 13 + .../mutatingWebhookConfiguration.yaml | 32 + .../validatingWebhookConfiguration.yaml | 32 + .../prometheus-operator/cleanup-crds.yaml | 44 + .../prometheus-operator/clusterrole.yaml | 76 + .../clusterrolebinding.yaml | 18 + .../prometheus-operator/crd-alertmanager.yaml | 2407 ++++++++++++ .../prometheus-operator/crd-podmonitor.yaml | 247 ++ .../prometheus-operator/crd-prometheus.yaml | 3458 +++++++++++++++++ .../crd-prometheusrules.yaml | 404 ++ .../crd-servicemonitor.yaml | 315 ++ .../prometheus-operator/deployment.yaml | 112 + .../prometheus-operator/psp-clusterrole.yaml | 16 + .../psp-clusterrolebinding.yaml | 18 + .../templates/prometheus-operator/psp.yaml | 48 + .../prometheus-operator/service.yaml | 50 + .../prometheus-operator/serviceaccount.yaml | 12 + .../prometheus-operator/servicemonitor.yaml | 32 + .../additionalAlertRelabelConfigs.yaml | 12 + .../additionalAlertmanagerConfigs.yaml | 12 + .../prometheus/additionalPrometheusRules.yaml | 40 + .../prometheus/additionalScrapeConfigs.yaml | 12 + .../templates/prometheus/clusterrole.yaml | 37 + .../prometheus/clusterrolebinding.yaml | 19 + .../templates/prometheus/ingress.yaml | 49 + .../prometheus/ingressperreplica.yaml | 45 + .../prometheus/podDisruptionBudget.yaml | 21 + .../templates/prometheus/podmonitors.yaml | 37 + .../templates/prometheus/prometheus.yaml | 225 ++ .../templates/prometheus/psp-clusterrole.yaml | 16 + .../prometheus/psp-clusterrolebinding.yaml | 19 + .../templates/prometheus/psp.yaml | 52 + .../rules-1.14/alertmanager.rules.yaml | 51 + .../templates/prometheus/rules-1.14/etcd.yaml | 137 + .../prometheus/rules-1.14/general.rules.yaml | 47 + .../prometheus/rules-1.14/k8s.rules.yaml | 80 + .../rules-1.14/kube-apiserver.rules.yaml | 36 + .../kube-prometheus-node-recording.rules.yaml | 38 + .../rules-1.14/kube-scheduler.rules.yaml | 60 + .../rules-1.14/kubernetes-absent.yaml | 126 + .../rules-1.14/kubernetes-apps.yaml | 157 + .../rules-1.14/kubernetes-resources.yaml | 100 + .../rules-1.14/kubernetes-storage.yaml | 59 + .../rules-1.14/kubernetes-system.yaml | 142 + .../rules-1.14/node-exporter.rules.yaml | 81 + .../prometheus/rules-1.14/node-exporter.yaml | 162 + .../prometheus/rules-1.14/node-network.yaml | 31 + .../prometheus/rules-1.14/node-time.yaml | 31 + .../prometheus/rules-1.14/node.rules.yaml | 37 + .../rules-1.14/prometheus-operator.yaml | 40 + .../prometheus/rules-1.14/prometheus.yaml | 192 + .../prometheus/rules/alertmanager.rules.yaml | 51 + .../templates/prometheus/rules/etcd.yaml | 137 + .../prometheus/rules/general.rules.yaml | 47 + .../templates/prometheus/rules/k8s.rules.yaml | 80 + .../rules/kube-apiserver.rules.yaml | 36 + .../kube-prometheus-node-alerting.rules.yaml | 38 + .../kube-prometheus-node-recording.rules.yaml | 38 + .../rules/kube-scheduler.rules.yaml | 60 + .../prometheus/rules/kubernetes-absent.yaml | 126 + .../prometheus/rules/kubernetes-apps.yaml | 157 + .../rules/kubernetes-resources.yaml | 100 + .../prometheus/rules/kubernetes-storage.yaml | 59 + .../prometheus/rules/kubernetes-system.yaml | 142 + .../prometheus/rules/node-network.yaml | 45 + .../templates/prometheus/rules/node-time.yaml | 31 + .../prometheus/rules/node.rules.yaml | 199 + .../prometheus/rules/prometheus-operator.yaml | 40 + .../prometheus/rules/prometheus.rules.yaml | 106 + .../templates/prometheus/service.yaml | 49 + .../templates/prometheus/serviceaccount.yaml | 16 + .../templates/prometheus/servicemonitor.yaml | 33 + .../templates/prometheus/servicemonitors.yaml | 34 + .../prometheus/serviceperreplica.yaml | 46 + .../prometheus-operator/values.yaml | 1801 +++++++++ .../monitoring/statsd-exporter/.helmignore | 22 + .../monitoring/statsd-exporter/Chart.yaml | 21 + .../statsd-exporter/templates/NOTES.txt | 21 + .../statsd-exporter/templates/_helpers.tpl | 63 + .../statsd-exporter/templates/configMap.yaml | 9 + .../statsd-exporter/templates/deployment.yaml | 54 + .../statsd-exporter/templates/ingress.yaml | 42 + .../statsd-exporter/templates/service.yaml | 13 + .../templates/serviceMonitor.yml | 25 + .../templates/serviceaccount.yaml | 9 + .../templates/tests/test-connection.yaml | 15 + .../monitoring/statsd-exporter/values.yaml | 122 + 319 files changed, 58474 insertions(+) create mode 100644 kubernetes/ansible/bootstrap.yaml create mode 100644 kubernetes/ansible/monitoring.yaml create mode 100644 kubernetes/ansible/roles/bootstrap-k8s/README.md create mode 100644 kubernetes/ansible/roles/bootstrap-k8s/defaults/main.yml create mode 100644 kubernetes/ansible/roles/bootstrap-k8s/handlers/main.yml create mode 100644 kubernetes/ansible/roles/bootstrap-k8s/meta/main.yml create mode 100644 kubernetes/ansible/roles/bootstrap-k8s/tasks/main.yml create mode 100644 kubernetes/ansible/roles/bootstrap-k8s/templates/gateway.yaml create mode 100644 kubernetes/ansible/roles/bootstrap-k8s/templates/namespace.yaml create mode 100644 kubernetes/ansible/roles/bootstrap-k8s/templates/serviceentry.yaml create mode 100644 kubernetes/ansible/roles/bootstrap-k8s/templates/virtualservice.yaml create mode 100644 kubernetes/ansible/roles/bootstrap-k8s/tests/inventory create mode 100644 kubernetes/ansible/roles/bootstrap-k8s/tests/test.yml create mode 100644 kubernetes/ansible/roles/bootstrap-k8s/vars/main.yml create mode 100644 kubernetes/ansible/roles/sunbird-monitoring/README.md create mode 100644 kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml create mode 100644 kubernetes/ansible/roles/sunbird-monitoring/handlers/main.yml create mode 100644 kubernetes/ansible/roles/sunbird-monitoring/meta/main.yml create mode 100644 kubernetes/ansible/roles/sunbird-monitoring/tasks/main.yml create mode 100644 kubernetes/ansible/roles/sunbird-monitoring/templates/additional-scrape-configs.yaml create mode 100644 kubernetes/ansible/roles/sunbird-monitoring/templates/blackbox-exporter.yaml create mode 100644 kubernetes/ansible/roles/sunbird-monitoring/templates/cassandra-jmx-exporter.yaml create mode 100644 kubernetes/ansible/roles/sunbird-monitoring/templates/elasticsearch-exporter.yaml create mode 100644 kubernetes/ansible/roles/sunbird-monitoring/templates/kafka-lag-exporter.yaml create mode 100644 kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-operator.yaml create mode 100644 kubernetes/ansible/roles/sunbird-monitoring/templates/statsd-exporter.yaml create mode 100644 kubernetes/ansible/roles/sunbird-monitoring/tests/inventory create mode 100644 kubernetes/ansible/roles/sunbird-monitoring/tests/test.yml create mode 100644 kubernetes/ansible/roles/sunbird-monitoring/vars/main.yml create mode 100644 kubernetes/helm_charts/kube-system/coredns-custom.yaml create mode 100644 kubernetes/helm_charts/monitoring/additional-scrape-configs/.helmignore create mode 100644 kubernetes/helm_charts/monitoring/additional-scrape-configs/Chart.yaml create mode 100644 kubernetes/helm_charts/monitoring/additional-scrape-configs/templates/_helpers.tpl create mode 100644 kubernetes/helm_charts/monitoring/additional-scrape-configs/templates/secrets.yaml create mode 100644 kubernetes/helm_charts/monitoring/additional-scrape-configs/values.yaml create mode 100755 kubernetes/helm_charts/monitoring/blackbox-exporter/Chart.yaml create mode 100755 kubernetes/helm_charts/monitoring/blackbox-exporter/OWNERS create mode 100755 kubernetes/helm_charts/monitoring/blackbox-exporter/README.md create mode 100755 kubernetes/helm_charts/monitoring/blackbox-exporter/ci/default-values.yaml create mode 100755 kubernetes/helm_charts/monitoring/blackbox-exporter/ci/secret-values.yaml create mode 100755 kubernetes/helm_charts/monitoring/blackbox-exporter/templates/NOTES.txt create mode 100755 kubernetes/helm_charts/monitoring/blackbox-exporter/templates/_helpers.tpl create mode 100755 kubernetes/helm_charts/monitoring/blackbox-exporter/templates/configmap.yaml create mode 100755 kubernetes/helm_charts/monitoring/blackbox-exporter/templates/deployment.yaml create mode 100755 kubernetes/helm_charts/monitoring/blackbox-exporter/templates/ingress.yaml create mode 100755 kubernetes/helm_charts/monitoring/blackbox-exporter/templates/poddisruptionbudget.yaml create mode 100755 kubernetes/helm_charts/monitoring/blackbox-exporter/templates/service.yaml create mode 100755 kubernetes/helm_charts/monitoring/blackbox-exporter/templates/servicemonitor.yaml create mode 100755 kubernetes/helm_charts/monitoring/blackbox-exporter/values.yaml create mode 100755 kubernetes/helm_charts/monitoring/blackbox-exporter/values1.yaml create mode 100644 kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/.helmignore create mode 100644 kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/Chart.yaml create mode 100644 kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/NOTES.txt create mode 100644 kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/_helpers.tpl create mode 100644 kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/deployment.yaml create mode 100644 kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/ingress.yaml create mode 100644 kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/jmx-httpserver-configmap.yaml create mode 100644 kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/logging-properties-configmap.yaml create mode 100644 kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/service.yaml create mode 100644 kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/serviceMonitor.yml create mode 100644 kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/serviceaccount.yaml create mode 100644 kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/tests/test-connection.yaml create mode 100644 kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/values.yaml create mode 100755 kubernetes/helm_charts/monitoring/elasticsearch-exporter/.helmignore create mode 100755 kubernetes/helm_charts/monitoring/elasticsearch-exporter/Chart.yaml create mode 100755 kubernetes/helm_charts/monitoring/elasticsearch-exporter/README.md create mode 100755 kubernetes/helm_charts/monitoring/elasticsearch-exporter/ci/default-values.yaml create mode 100755 kubernetes/helm_charts/monitoring/elasticsearch-exporter/ci/security-context.yaml create mode 100755 kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/NOTES.txt create mode 100755 kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/_helpers.tpl create mode 100755 kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/cert-secret.yaml create mode 100755 kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/deployment.yaml create mode 100755 kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/prometheusrule.yaml create mode 100755 kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/service.yaml create mode 100755 kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/servicemonitor.yaml create mode 100755 kubernetes/helm_charts/monitoring/elasticsearch-exporter/values.yaml create mode 100755 kubernetes/helm_charts/monitoring/elasticsearch-exporter/values1.yaml create mode 100644 kubernetes/helm_charts/monitoring/kafka-lag-exporter/.helmignore create mode 100644 kubernetes/helm_charts/monitoring/kafka-lag-exporter/Chart.yaml create mode 100644 kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/NOTES.txt create mode 100644 kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/_helpers.tpl create mode 100644 kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/deployment.yaml create mode 100644 kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/ingress.yaml create mode 100644 kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/service.yaml create mode 100644 kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/serviceMonitor.yml create mode 100644 kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/serviceaccount.yaml create mode 100644 kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/tests/test-connection.yaml create mode 100644 kubernetes/helm_charts/monitoring/kafka-lag-exporter/values.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/.helmignore create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/CONTRIBUTING.md create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/Chart.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/README.md create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/.helmignore create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/Chart.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/README.md create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/dashboards/custom-dashboard.json create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/NOTES.txt create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/_helpers.tpl create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/_pod.tpl create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/clusterrole.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/clusterrolebinding.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/configmap-dashboard-provider.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/configmap.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/dashboards-json-configmap.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/deployment.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/headless-service.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/ingress.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/poddisruptionbudget.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/podsecuritypolicy.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/pvc.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/role.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/rolebinding.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/secret-env.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/secret.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/service.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/serviceaccount.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/statefulset.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test-configmap.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test-podsecuritypolicy.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test-role.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test-rolebinding.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test-serviceaccount.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/values.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/.helmignore create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/Chart.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/OWNERS create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/README.md create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/NOTES.txt create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/_helpers.tpl create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/clusterrole.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/clusterrolebinding.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/deployment.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/podsecuritypolicy.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/psp-clusterrole.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/psp-clusterrolebinding.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/service.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/serviceaccount.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/servicemonitor.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/values.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/.helmignore create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/Chart.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/OWNERS create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/README.md create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/NOTES.txt create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/_helpers.tpl create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/daemonset.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/endpoints.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/monitor.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/psp-clusterrole.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/psp-clusterrolebinding.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/psp.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/service.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/serviceaccount.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/values.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/requirements.lock create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/requirements.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/NOTES.txt create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/_helpers.tpl create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/alertmanager.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/ingress.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/podDisruptionBudget.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/psp-clusterrole.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/psp-clusterrolebinding.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/psp.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/secret.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/service.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/serviceaccount.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/servicemonitor.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/core-dns/service.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/core-dns/servicemonitor.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-api-server/servicemonitor.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-controller-manager/endpoints.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-controller-manager/service.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-controller-manager/servicemonitor.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-dns/service.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-dns/servicemonitor.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-etcd/endpoints.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-etcd/service.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-etcd/servicemonitor.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-proxy/service.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-proxy/servicemonitor.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-scheduler/endpoints.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-scheduler/service.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-scheduler/servicemonitor.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-state-metrics/serviceMonitor.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kubelet/servicemonitor.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/node-exporter/servicemonitor.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/configmap-dashboards.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/configmaps-datasources.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/apiserver.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/controller-manager.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/etcd.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-coredns.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-cluster.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-node.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/kubelet.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/node-cluster-rsrc-use.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/node-rsrc-use.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/nodes.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/pods.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/prometheus-remote-write.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/prometheus.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/proxy.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/scheduler.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/statefulset.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/etcd.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-cluster-rsrc-use.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-coredns.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-node-rsrc-use.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-resources-cluster.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-resources-namespace.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-resources-pod.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-resources-workload.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-resources-workloads-namespace.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/nodes.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/persistentvolumesusage.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/pods.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/statefulset.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/servicemonitor.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/clusterrole.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/clusterrolebinding.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/job-createSecret.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/job-patchWebhook.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/psp.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/role.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/rolebinding.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/serviceaccount.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/mutatingWebhookConfiguration.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/validatingWebhookConfiguration.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/cleanup-crds.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/clusterrole.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/clusterrolebinding.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/crd-alertmanager.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/crd-podmonitor.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/crd-prometheus.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/crd-prometheusrules.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/crd-servicemonitor.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/deployment.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/psp-clusterrole.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/psp-clusterrolebinding.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/psp.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/service.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/serviceaccount.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/servicemonitor.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/additionalAlertRelabelConfigs.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/additionalAlertmanagerConfigs.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/additionalPrometheusRules.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/additionalScrapeConfigs.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/clusterrole.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/clusterrolebinding.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/ingress.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/ingressperreplica.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/podDisruptionBudget.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/podmonitors.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/prometheus.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/psp-clusterrole.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/psp-clusterrolebinding.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/psp.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/alertmanager.rules.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/etcd.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/general.rules.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/k8s.rules.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-apiserver.rules.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-prometheus-node-recording.rules.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-scheduler.rules.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-absent.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-apps.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-resources.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-storage.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node-exporter.rules.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node-exporter.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node-network.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node-time.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node.rules.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/prometheus-operator.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/prometheus.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/alertmanager.rules.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/etcd.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/general.rules.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/k8s.rules.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kube-apiserver.rules.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kube-prometheus-node-alerting.rules.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kube-prometheus-node-recording.rules.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kube-scheduler.rules.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kubernetes-absent.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kubernetes-apps.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kubernetes-resources.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kubernetes-storage.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kubernetes-system.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/node-network.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/node-time.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/node.rules.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/prometheus-operator.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/prometheus.rules.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/service.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/serviceaccount.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/servicemonitor.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/servicemonitors.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/serviceperreplica.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/values.yaml create mode 100644 kubernetes/helm_charts/monitoring/statsd-exporter/.helmignore create mode 100644 kubernetes/helm_charts/monitoring/statsd-exporter/Chart.yaml create mode 100644 kubernetes/helm_charts/monitoring/statsd-exporter/templates/NOTES.txt create mode 100644 kubernetes/helm_charts/monitoring/statsd-exporter/templates/_helpers.tpl create mode 100644 kubernetes/helm_charts/monitoring/statsd-exporter/templates/configMap.yaml create mode 100644 kubernetes/helm_charts/monitoring/statsd-exporter/templates/deployment.yaml create mode 100644 kubernetes/helm_charts/monitoring/statsd-exporter/templates/ingress.yaml create mode 100644 kubernetes/helm_charts/monitoring/statsd-exporter/templates/service.yaml create mode 100644 kubernetes/helm_charts/monitoring/statsd-exporter/templates/serviceMonitor.yml create mode 100644 kubernetes/helm_charts/monitoring/statsd-exporter/templates/serviceaccount.yaml create mode 100644 kubernetes/helm_charts/monitoring/statsd-exporter/templates/tests/test-connection.yaml create mode 100644 kubernetes/helm_charts/monitoring/statsd-exporter/values.yaml diff --git a/kubernetes/ansible/bootstrap.yaml b/kubernetes/ansible/bootstrap.yaml new file mode 100644 index 000000000..0c4d16947 --- /dev/null +++ b/kubernetes/ansible/bootstrap.yaml @@ -0,0 +1,8 @@ +--- +- hosts: local + gather_facts: no + roles: + - bootstrap-k8s + environment: + KUBECONFIG: /home/rajeshr/.kube/tmp-config + diff --git a/kubernetes/ansible/monitoring.yaml b/kubernetes/ansible/monitoring.yaml new file mode 100644 index 000000000..0f6d13dbc --- /dev/null +++ b/kubernetes/ansible/monitoring.yaml @@ -0,0 +1,7 @@ +--- +- hosts: localhost + gather_facts: false + roles: + - sunbird-monitoring + # environment: + # KUBECONFIG: /home/rajeshr/.config/k3d/rancher/kubeconfig.yaml diff --git a/kubernetes/ansible/roles/bootstrap-k8s/README.md b/kubernetes/ansible/roles/bootstrap-k8s/README.md new file mode 100644 index 000000000..225dd44b9 --- /dev/null +++ b/kubernetes/ansible/roles/bootstrap-k8s/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/kubernetes/ansible/roles/bootstrap-k8s/defaults/main.yml b/kubernetes/ansible/roles/bootstrap-k8s/defaults/main.yml new file mode 100644 index 000000000..a43776847 --- /dev/null +++ b/kubernetes/ansible/roles/bootstrap-k8s/defaults/main.yml @@ -0,0 +1,8 @@ +--- +# defaults file for bootstrap-k8s +bootstrap_items: + - namespace + - gateway + - serviceentry + - virtualservice +namespace: dev diff --git a/kubernetes/ansible/roles/bootstrap-k8s/handlers/main.yml b/kubernetes/ansible/roles/bootstrap-k8s/handlers/main.yml new file mode 100644 index 000000000..274ffa5f6 --- /dev/null +++ b/kubernetes/ansible/roles/bootstrap-k8s/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for bootstrap-k8s \ No newline at end of file diff --git a/kubernetes/ansible/roles/bootstrap-k8s/meta/main.yml b/kubernetes/ansible/roles/bootstrap-k8s/meta/main.yml new file mode 100644 index 000000000..722379974 --- /dev/null +++ b/kubernetes/ansible/roles/bootstrap-k8s/meta/main.yml @@ -0,0 +1,57 @@ +galaxy_info: + author: your name + description: your description + 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 + + # Some suggested licenses: + # - BSD (default) + # - MIT + # - GPLv2 + # - GPLv3 + # - Apache + # - CC-BY + license: license (GPLv2, CC-BY, etc) + + min_ansible_version: 1.2 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # Optionally specify the branch Galaxy will use when accessing the GitHub + # repo for this role. During role install, if no tags are available, + # Galaxy will use this branch. During import Galaxy will access files on + # this branch. If Travis integration is configured, only notifications for this + # branch will be accepted. Otherwise, in all cases, the repo's default branch + # (usually master) will be used. + #github_branch: + + # + # platforms is a list of platforms, and each platform has a name and a list of versions. + # + # 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/kubernetes/ansible/roles/bootstrap-k8s/tasks/main.yml b/kubernetes/ansible/roles/bootstrap-k8s/tasks/main.yml new file mode 100644 index 000000000..182fa9e2f --- /dev/null +++ b/kubernetes/ansible/roles/bootstrap-k8s/tasks/main.yml @@ -0,0 +1,22 @@ +--- +# tasks file for bootstrap-k8s +- name: templating yamls to /tmp + template: + src: "{{ item }}.yaml" + dest: "/tmp/{{ item }}.yaml" + with_items: "{{ bootstrap_items }}" + +- name: Creating namespace "{{ namespace }}" with istio-injection enabled + shell: kubectl apply -f /tmp/namespace.yaml + +# - name: Creating domain sssl +# shell: | +# cat {{ ssl_cert_file }} | kubectl apply -f +# no_log: true + +- name: "Creating {{item}}" + shell: "kubectl apply -f /tmp/{{ item }}.yaml" + with_items: + - gateway + - serviceentry + - virtualservice diff --git a/kubernetes/ansible/roles/bootstrap-k8s/templates/gateway.yaml b/kubernetes/ansible/roles/bootstrap-k8s/templates/gateway.yaml new file mode 100644 index 000000000..657a27cfd --- /dev/null +++ b/kubernetes/ansible/roles/bootstrap-k8s/templates/gateway.yaml @@ -0,0 +1,22 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: Gateway +metadata: + name: public-gateway + namespace: dev +spec: + servers: + - port: + number: 80 + name: http + protocol: HTTP + hosts: + - dev.centralindia.cloudapp.azure.com + - port: + number: 443 + name: https + protocol: HTTPS + tls: + mode: SIMPLE + credentialName: ingress-cert # must be the same as secret + hosts: + - dev.centralindia.cloudapp.azure.com diff --git a/kubernetes/ansible/roles/bootstrap-k8s/templates/namespace.yaml b/kubernetes/ansible/roles/bootstrap-k8s/templates/namespace.yaml new file mode 100644 index 000000000..19d968518 --- /dev/null +++ b/kubernetes/ansible/roles/bootstrap-k8s/templates/namespace.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: Namespace +metadata: + labels: + istio-injection: enabled + name: "{{ namespace }}" diff --git a/kubernetes/ansible/roles/bootstrap-k8s/templates/serviceentry.yaml b/kubernetes/ansible/roles/bootstrap-k8s/templates/serviceentry.yaml new file mode 100644 index 000000000..da9960a75 --- /dev/null +++ b/kubernetes/ansible/roles/bootstrap-k8s/templates/serviceentry.yaml @@ -0,0 +1,18 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: ServiceEntry +metadata: + name: "kecloak-{{namespace}}" + namespace: "{{namespace}}" +spec: + hosts: + - "keycloak.{{ namespace }}.global" + addresses: + - "{{ groups['keycloak'][0] }}" + ports: + - number: 8080 + name: keycloak + protocol: HTTP + location: MESH_INTERNAL + resolution: DNS +# endpoints: +# - address: 11.2.0.129 diff --git a/kubernetes/ansible/roles/bootstrap-k8s/templates/virtualservice.yaml b/kubernetes/ansible/roles/bootstrap-k8s/templates/virtualservice.yaml new file mode 100644 index 000000000..bc6afd30a --- /dev/null +++ b/kubernetes/ansible/roles/bootstrap-k8s/templates/virtualservice.yaml @@ -0,0 +1,148 @@ +--- +apiVersion: networking.istio.io/v1alpha3 +kind: VirtualService +metadata: + name: virtual-istio + namespace: "{{namespace}}" +spec: + gateways: + - public-gateway + hosts: + - dev.centralindia.cloudapp.azure.com + http: + - match: + - uri: + prefix: /grafana/ + rewrite: + uri: / + route: + - destination: + host: grafana.istio-system.svc.cluster.local + - match: + - uri: + prefix: /auth/admin/master/console/ + rewrite: + uri: / + route: + - destination: + host: player-service + - match: + - uri: + prefix: /auth/ + rewrite: + uri: /auth/ + route: + - destination: + host: keycloak.{{namespace}}.global + port: + number: 8080 + - match: + - uri: + prefix: /api/ + rewrite: + uri: / + route: + - destination: + host: api-manager-kong + port: + number: 8000 + - match: + - uri: + prefix: /content/preview/ + rewrite: + authority: sunbirddev.blob.core.windows.net + uri: /sunbird-content-dev/v3/preview/ + route: + - destination: + host: sunbirddev.blob.core.windows.net + - match: + - uri: + prefix: /assets/public/ + rewrite: + authority: sunbirddev.blob.core.windows.net + uri: /sunbird-content-dev/ + route: + - destination: + host: sunbirddev.blob.core.windows.net + headers: + request: + add: + Accept: '*/*' + Access-Control-Allow-Methods: GET + Access-Control-Allow-Origin: '*' + Authorization: "" + Cache-Control: public + Host: sunbirddev.blob.core.windows.net + Pragma: public + remove: + - Access-Control-Allow-Origin + - Access-Control-Allow-Methods + - x-amz-id-2 + - x-amz-request-id + - Set-Cookie + - match: + - uri: + prefix: /content-plugins/ + rewrite: + authority: sunbirddev.blob.core.windows.net + uri: /sunbird-content-dev/content-plugins/ + route: + - destination: + host: sunbirddev.blob.core.windows.net + headers: + request: + add: + Access-Control-Allow-Methods: GET + Access-Control-Allow-Origin: '*' + Authorization: "" + Cache-Control: public + Host: sunbirddev.blob.core.windows.net + Pragma: public + remove: + - Access-Control-Allow-Origin + - Access-Control-Allow-Methods + - x-amz-id-2 + - x-amz-request-id + - Set-Cookie + - match: + - uri: + prefix: /thirdparty/ + rewrite: + uri: / + route: + - destination: + host: player-service + headers: + request: + add: + Cache-Control: public + Pragma: public + - match: + - uri: + prefix: /kibana + route: + - destination: + host: oauth2-proxy-service.logging.svc.cluster.local + port: + number: 4180 + - match: + - uri: + prefix: /oauth2 + route: + - destination: + host: oauth2-proxy-service.logging.svc.cluster.local + port: + number: 4180 + - match: + - uri: + prefix: / + route: + - destination: + host: player-service + - match: + - uri: + prefix: /test/ + route: + - destination: + host: test-service + diff --git a/kubernetes/ansible/roles/bootstrap-k8s/tests/inventory b/kubernetes/ansible/roles/bootstrap-k8s/tests/inventory new file mode 100644 index 000000000..878877b07 --- /dev/null +++ b/kubernetes/ansible/roles/bootstrap-k8s/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/kubernetes/ansible/roles/bootstrap-k8s/tests/test.yml b/kubernetes/ansible/roles/bootstrap-k8s/tests/test.yml new file mode 100644 index 000000000..871bafbef --- /dev/null +++ b/kubernetes/ansible/roles/bootstrap-k8s/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - bootstrap-k8s \ No newline at end of file diff --git a/kubernetes/ansible/roles/bootstrap-k8s/vars/main.yml b/kubernetes/ansible/roles/bootstrap-k8s/vars/main.yml new file mode 100644 index 000000000..fec7c5650 --- /dev/null +++ b/kubernetes/ansible/roles/bootstrap-k8s/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for bootstrap-k8s \ No newline at end of file diff --git a/kubernetes/ansible/roles/sunbird-monitoring/README.md b/kubernetes/ansible/roles/sunbird-monitoring/README.md new file mode 100644 index 000000000..225dd44b9 --- /dev/null +++ b/kubernetes/ansible/roles/sunbird-monitoring/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml b/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml new file mode 100644 index 000000000..c8f5367df --- /dev/null +++ b/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml @@ -0,0 +1,35 @@ +--- +# defaults file for sunbird-monitoring +monitoring_stack: + - prometheus-operator + - kafka-lag-exporter + - cassandra-jmx-exporter + - statsd-exporter + - elasticsearch-exporter + - blackbox-exporter + - additional-scrape-configs + +namespace: monitoring + + +service_blackbox_checks: + - service_name: 'analytics-api' + probe_module: http_2xx + targets: + - "{{sunbird_analytics_api_base_url}}/health" + - service_name: 'learning-service' + probe_module: http_2xx + targets: + - "{{sunbird_content_repo_api_base_url}}/health" + - service_name: 'search-service' + probe_module: http_2xx + targets: + - "{{sunbird_search_service_api_base_url}}/health" + - service_name: 'monit' + probe_module: http_2xx + targets: + - "http://{{ groups['swarm-bootstrap-manager'][0] }}:2812" + - service_name: 'keycloak' + probe_module: http_2xx + targets: + - "{{proto}}://{{proxy_server_name}}/auth/realms/sunbird/protocol/openid-connect/auth?client_id=portal&state=foo&redirect_uri=https%3A%2F%2F{{proxy_server_name}}%2Fprivate%2Findex%3Fauth_callback%3D1&scope=openid&response_type=code" diff --git a/kubernetes/ansible/roles/sunbird-monitoring/handlers/main.yml b/kubernetes/ansible/roles/sunbird-monitoring/handlers/main.yml new file mode 100644 index 000000000..b34ace797 --- /dev/null +++ b/kubernetes/ansible/roles/sunbird-monitoring/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for sunbird-monitoring \ No newline at end of file diff --git a/kubernetes/ansible/roles/sunbird-monitoring/meta/main.yml b/kubernetes/ansible/roles/sunbird-monitoring/meta/main.yml new file mode 100644 index 000000000..722379974 --- /dev/null +++ b/kubernetes/ansible/roles/sunbird-monitoring/meta/main.yml @@ -0,0 +1,57 @@ +galaxy_info: + author: your name + description: your description + 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 + + # Some suggested licenses: + # - BSD (default) + # - MIT + # - GPLv2 + # - GPLv3 + # - Apache + # - CC-BY + license: license (GPLv2, CC-BY, etc) + + min_ansible_version: 1.2 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # Optionally specify the branch Galaxy will use when accessing the GitHub + # repo for this role. During role install, if no tags are available, + # Galaxy will use this branch. During import Galaxy will access files on + # this branch. If Travis integration is configured, only notifications for this + # branch will be accepted. Otherwise, in all cases, the repo's default branch + # (usually master) will be used. + #github_branch: + + # + # platforms is a list of platforms, and each platform has a name and a list of versions. + # + # 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/kubernetes/ansible/roles/sunbird-monitoring/tasks/main.yml b/kubernetes/ansible/roles/sunbird-monitoring/tasks/main.yml new file mode 100644 index 000000000..0a8f6ab94 --- /dev/null +++ b/kubernetes/ansible/roles/sunbird-monitoring/tasks/main.yml @@ -0,0 +1,20 @@ +--- +# tasks file for sunbird-monitoring +- name: tempating variables + template: + src: "{{ item }}.yaml" + dest: "/tmp/{{item}}.yaml" + with_items: "{{ monitoring_stack }}" + +- name: Creating prometheusOperator CRDs manually + # refer issue https://github.com/helm/helm/issues/6130#issuecomment-537814539 + shell: | + kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/release-0.32/example/prometheus-operator-crd/alertmanager.crd.yaml + kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/release-0.32/example/prometheus-operator-crd/prometheus.crd.yaml + kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/release-0.32/example/prometheus-operator-crd/prometheusrule.crd.yaml + kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/release-0.32/example/prometheus-operator-crd/servicemonitor.crd.yaml + kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/release-0.32/example/prometheus-operator-crd/podmonitor.crd.yaml + +- name: Creating sunbird monitoring stack + shell: "helm3 upgrade --install {{ item }} {{helm_dir}}/{{ item }} --namespace {{ namespace }} -f /tmp/{{ item }}.yaml" + with_items: "{{ monitoring_stack }}" diff --git a/kubernetes/ansible/roles/sunbird-monitoring/templates/additional-scrape-configs.yaml b/kubernetes/ansible/roles/sunbird-monitoring/templates/additional-scrape-configs.yaml new file mode 100644 index 000000000..c2c796219 --- /dev/null +++ b/kubernetes/ansible/roles/sunbird-monitoring/templates/additional-scrape-configs.yaml @@ -0,0 +1,181 @@ +{# +# This name is used to define the +# additionalScrapeConfigs name +# {{ fullnameOverride }}-prometheus-scrape-confg +# If you change this, make sure to update the value in +# additionalScrapeConfigs/defautls/main.yaml +#} + +fullnameOverride: "sunbird-monitoring" + +scrapeconfig: + - job_name: 'Druid' + metrics_path: /metrics/druid + static_configs: + - targets: ["{{groups['dp-analytics-ps'][0]}}:9000"] + labels: + "service_name": "druid" + + - job_name: 'vm-node-exporter' + static_configs: + - targets: ["{{ groups['node-exporter'] | difference(['swarm-nodes']) | difference(["localhost"]) | map('regex_replace', '^(.*)$', '\\1:9100') | list | join("\", \"") }}"] + + - job_name: 'process-exporter' + metrics_path: /metrics + static_configs: + - targets: ["{{ groups['process-exporter'] | difference(["localhost"]) | map('regex_replace', '^(.*)$', '\\1:1111' ) | list | join("\", \"") }}"] + + - job_name: 'helm-exporter' + static_configs: + - targets: ['helm-exporter.monitoring.svc.cluster.local:9571'] + # Istio metrics + - job_name: istio-mesh + scrape_interval: 15s + scrape_timeout: 10s + metrics_path: /metrics + scheme: http + kubernetes_sd_configs: + - role: endpoints + namespaces: + names: + - istio-system + relabel_configs: + - source_labels: [__meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name] + separator: ; + regex: istio-telemetry;prometheus + replacement: $1 + action: keep + - job_name: envoy-stats + scrape_interval: 15s + scrape_timeout: 10s + metrics_path: /stats/prometheus + scheme: http + kubernetes_sd_configs: + - role: pod + relabel_configs: + - source_labels: [__meta_kubernetes_pod_container_port_name] + separator: ; + regex: .*-envoy-prom + replacement: $1 + action: keep + - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port] + separator: ; + regex: ([^:]+)(?::\d+)?;(\d+) + target_label: __address__ + replacement: $1:15090 + action: replace + - separator: ; + regex: __meta_kubernetes_pod_label_(.+) + replacement: $1 + action: labelmap + - source_labels: [__meta_kubernetes_namespace] + separator: ; + regex: (.*) + target_label: namespace + replacement: $1 + action: replace + - source_labels: [__meta_kubernetes_pod_name] + separator: ; + regex: (.*) + target_label: pod_name + replacement: $1 + action: replace + - job_name: istio-policy + scrape_interval: 15s + scrape_timeout: 10s + metrics_path: /metrics + scheme: http + kubernetes_sd_configs: + - role: endpoints + namespaces: + names: + - istio-system + relabel_configs: + - source_labels: [__meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name] + separator: ; + regex: istio-policy;http-monitoring + replacement: $1 + action: keep + - job_name: istio-telemetry + scrape_interval: 15s + scrape_timeout: 10s + metrics_path: /metrics + scheme: http + kubernetes_sd_configs: + - role: endpoints + namespaces: + names: + - istio-system + relabel_configs: + - source_labels: [__meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name] + separator: ; + regex: istio-telemetry;http-monitoring + replacement: $1 + action: keep + - job_name: pilot + scrape_interval: 15s + scrape_timeout: 10s + metrics_path: /metrics + scheme: http + kubernetes_sd_configs: + - role: endpoints + namespaces: + names: + - istio-system + relabel_configs: + - source_labels: [__meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name] + separator: ; + regex: istio-pilot;http-monitoring + replacement: $1 + action: keep + - job_name: galley + scrape_interval: 15s + scrape_timeout: 10s + metrics_path: /metrics + scheme: http + kubernetes_sd_configs: + - role: endpoints + namespaces: + names: + - istio-system + relabel_configs: + - source_labels: [__meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name] + separator: ; + regex: istio-galley;http-monitoring + replacement: $1 + action: keep + - job_name: citadel + scrape_interval: 15s + scrape_timeout: 10s + metrics_path: /metrics + scheme: http + kubernetes_sd_configs: + - role: endpoints + namespaces: + names: + - istio-system + relabel_configs: + - source_labels: [__meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name] + separator: ; + regex: istio-citadel;http-monitoring + replacement: $1 + action: keep + + {% for item in service_blackbox_checks %} + # This empty line ensures indentation is correct after ansible jinja2 template is materialized + - job_name: 'availability_{{ item.service_name }}' + metrics_path: /metrics + params: + module: [{{ item.probe_module }}] + static_configs: + - targets: {{ item.targets | to_json }} + labels: + "service_name": "{{ item.service_name }}" + relabel_configs: + - source_labels: [__address__] + target_label: __param_target + - source_labels: [__param_target] + target_label: instance + - target_label: __address__ + replacement: blackbox-exporter-prometheus-blackbox-exporter:9115 + {% endfor %} diff --git a/kubernetes/ansible/roles/sunbird-monitoring/templates/blackbox-exporter.yaml b/kubernetes/ansible/roles/sunbird-monitoring/templates/blackbox-exporter.yaml new file mode 100644 index 000000000..e69de29bb diff --git a/kubernetes/ansible/roles/sunbird-monitoring/templates/cassandra-jmx-exporter.yaml b/kubernetes/ansible/roles/sunbird-monitoring/templates/cassandra-jmx-exporter.yaml new file mode 100644 index 000000000..e69de29bb diff --git a/kubernetes/ansible/roles/sunbird-monitoring/templates/elasticsearch-exporter.yaml b/kubernetes/ansible/roles/sunbird-monitoring/templates/elasticsearch-exporter.yaml new file mode 100644 index 000000000..6f56a5e00 --- /dev/null +++ b/kubernetes/ansible/roles/sunbird-monitoring/templates/elasticsearch-exporter.yaml @@ -0,0 +1,2 @@ +es: + uri: "http://{{ groups['es-1'][0] }}:9200" diff --git a/kubernetes/ansible/roles/sunbird-monitoring/templates/kafka-lag-exporter.yaml b/kubernetes/ansible/roles/sunbird-monitoring/templates/kafka-lag-exporter.yaml new file mode 100644 index 000000000..a92d54088 --- /dev/null +++ b/kubernetes/ansible/roles/sunbird-monitoring/templates/kafka-lag-exporter.yaml @@ -0,0 +1,2 @@ +kafka: "{{ groups['processing-cluster-kafka'] | join(':9092 --kafka.server=')}}:9092" +zookeeper: "{{ groups['processing-cluster-kafka'] | join(':2181 --zookeeper.server=')}}:2181" diff --git a/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-operator.yaml b/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-operator.yaml new file mode 100644 index 000000000..b85a684b4 --- /dev/null +++ b/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-operator.yaml @@ -0,0 +1,19 @@ +{# +# This name is used to define the +# additionalScrapeConfigs name +# {{ fullnameOverride }}-prometheus-scrape-confg +# If you change this, make sure to update the value in +# additionalScrapeConfigs/defautls/main.yaml +#} +fullnameOverride: sunbird-monitoring + +# Enabling external prometheus scrape config +prometheus: + prometheusSpec: + additionalScrapeConfigsExternal: true + +# Enabling monitoring kubelet monitoring over http +kubelet: + serviceMonitor: + https: false + diff --git a/kubernetes/ansible/roles/sunbird-monitoring/templates/statsd-exporter.yaml b/kubernetes/ansible/roles/sunbird-monitoring/templates/statsd-exporter.yaml new file mode 100644 index 000000000..e69de29bb diff --git a/kubernetes/ansible/roles/sunbird-monitoring/tests/inventory b/kubernetes/ansible/roles/sunbird-monitoring/tests/inventory new file mode 100644 index 000000000..878877b07 --- /dev/null +++ b/kubernetes/ansible/roles/sunbird-monitoring/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/kubernetes/ansible/roles/sunbird-monitoring/tests/test.yml b/kubernetes/ansible/roles/sunbird-monitoring/tests/test.yml new file mode 100644 index 000000000..5f63280f1 --- /dev/null +++ b/kubernetes/ansible/roles/sunbird-monitoring/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - sunbird-monitoring \ No newline at end of file diff --git a/kubernetes/ansible/roles/sunbird-monitoring/vars/main.yml b/kubernetes/ansible/roles/sunbird-monitoring/vars/main.yml new file mode 100644 index 000000000..d22cd7503 --- /dev/null +++ b/kubernetes/ansible/roles/sunbird-monitoring/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for sunbird-monitoring \ No newline at end of file diff --git a/kubernetes/helm_charts/kube-system/coredns-custom.yaml b/kubernetes/helm_charts/kube-system/coredns-custom.yaml new file mode 100644 index 000000000..4f35a5c10 --- /dev/null +++ b/kubernetes/helm_charts/kube-system/coredns-custom.yaml @@ -0,0 +1,23 @@ +# enabling istioctl serviceentries to create dns entries +# +# resolves *.sunbird to istiocoredns +# +# TODO: is there any way to change the ip to domain +# of istiodns +--- +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + addonmanager.kubernetes.io/mode: EnsureExists + k8s-app: kube-dns + kubernetes.io/cluster-service: "true" + name: coredns-custom + namespace: kube-system +data: + Sunbird.server: |- + global:53 { + errors + cache 30 + forward . 172.16.143.190 + } diff --git a/kubernetes/helm_charts/monitoring/additional-scrape-configs/.helmignore b/kubernetes/helm_charts/monitoring/additional-scrape-configs/.helmignore new file mode 100644 index 000000000..50af03172 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/additional-scrape-configs/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/kubernetes/helm_charts/monitoring/additional-scrape-configs/Chart.yaml b/kubernetes/helm_charts/monitoring/additional-scrape-configs/Chart.yaml new file mode 100644 index 000000000..2ac719df1 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/additional-scrape-configs/Chart.yaml @@ -0,0 +1,21 @@ +apiVersion: v2 +name: additional-scrape-configs +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. +appVersion: 1.16.0 diff --git a/kubernetes/helm_charts/monitoring/additional-scrape-configs/templates/_helpers.tpl b/kubernetes/helm_charts/monitoring/additional-scrape-configs/templates/_helpers.tpl new file mode 100644 index 000000000..c66316674 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/additional-scrape-configs/templates/_helpers.tpl @@ -0,0 +1,63 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "additional-scrape-configs.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "additional-scrape-configs.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "additional-scrape-configs.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "additional-scrape-configs.labels" -}} +helm.sh/chart: {{ include "additional-scrape-configs.chart" . }} +{{ include "additional-scrape-configs.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} + +{{/* +Selector labels +*/}} +{{- define "additional-scrape-configs.selectorLabels" -}} +app.kubernetes.io/name: {{ include "additional-scrape-configs.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "additional-scrape-configs.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "additional-scrape-configs.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} diff --git a/kubernetes/helm_charts/monitoring/additional-scrape-configs/templates/secrets.yaml b/kubernetes/helm_charts/monitoring/additional-scrape-configs/templates/secrets.yaml new file mode 100644 index 000000000..cbc1ca218 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/additional-scrape-configs/templates/secrets.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Secret +metadata: + name: {{ .Values.fullnameOverride }}-prometheus-scrape-confg + namespace: {{ default .Values.namespace .Release.Namespace }} + labels: + {{- include "additional-scrape-configs.labels" . | nindent 4 }} + app: {{ .Values.fullnameOverride }}-scrape-confg +data: + additional-scrape-configs.yaml: {{ toYaml .Values.scrapeconfig | b64enc | quote }} diff --git a/kubernetes/helm_charts/monitoring/additional-scrape-configs/values.yaml b/kubernetes/helm_charts/monitoring/additional-scrape-configs/values.yaml new file mode 100644 index 000000000..9d81e6af5 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/additional-scrape-configs/values.yaml @@ -0,0 +1,10 @@ +# This value will help to scrape external configs, +# which your prometheus have to watch +scrapeconfig: [] + # - job_name: 'Druid' + # metrics_path: /metrics/druid + # static_configs: + # - targets: ["11.2.4.31:9000"] + # labels: + # "service_name": "druid" +fullnameOverride: "sunbird-monitoring" diff --git a/kubernetes/helm_charts/monitoring/blackbox-exporter/Chart.yaml b/kubernetes/helm_charts/monitoring/blackbox-exporter/Chart.yaml new file mode 100755 index 000000000..1f6954d3f --- /dev/null +++ b/kubernetes/helm_charts/monitoring/blackbox-exporter/Chart.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +appVersion: 0.15.1 +description: Prometheus Blackbox Exporter +home: https://github.com/prometheus/blackbox_exporter +keywords: +- prometheus +- blackbox +- monitoring +maintainers: +- email: cedric@desaintmartin.fr + name: desaintmartin +- email: gianrubio@gmail.com + name: gianrubio +name: prometheus-blackbox-exporter +sources: +- https://github.com/prometheus/blackbox_exporter +version: 1.3.1 diff --git a/kubernetes/helm_charts/monitoring/blackbox-exporter/OWNERS b/kubernetes/helm_charts/monitoring/blackbox-exporter/OWNERS new file mode 100755 index 000000000..e6bd0652f --- /dev/null +++ b/kubernetes/helm_charts/monitoring/blackbox-exporter/OWNERS @@ -0,0 +1,6 @@ +approvers: +- desaintmartin +- gianrubio +reviewers: +- desaintmartin +- gianrubio diff --git a/kubernetes/helm_charts/monitoring/blackbox-exporter/README.md b/kubernetes/helm_charts/monitoring/blackbox-exporter/README.md new file mode 100755 index 000000000..f5d4970ce --- /dev/null +++ b/kubernetes/helm_charts/monitoring/blackbox-exporter/README.md @@ -0,0 +1,118 @@ +# Prometheus Blackbox Exporter + +Prometheus exporter for blackbox testing + +Learn more: [https://github.com/prometheus/blackbox_exporter](https://github.com/prometheus/blackbox_exporter) + +## TL;DR; + +```bash +$ helm install stable/prometheus-blackbox-exporter +``` + +## Introduction + +This chart creates a Blackbox-Exporter deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. + +## Prerequisites + +- Kubernetes 1.8+ with Beta APIs enabled + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```bash +$ helm install --name my-release stable/prometheus-blackbox-exporter +``` + +The command deploys Blackbox Exporter on the Kubernetes cluster using the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. + +## Uninstalling the Chart + +To uninstall/delete the `my-release` deployment: + +```bash +$ helm delete --purge my-release +``` +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 Blackbox-Exporter chart and their default values. + +| Parameter | Description | Default | +| -------------------------------------- | ------------------------------------------------- | ----------------------------- | +| `config` | Prometheus blackbox configuration | {} | +| `secretConfig` | Whether to treat blackbox configuration as secret | `false` | +| `configmapReload.name` | configmap-reload container name | `configmap-reload` | +| `configmapReload.runAsUser` | User to run configmap-reload container as | `65534` | +| `configmapReload.runAsNonRoot` | Run configmap-reload container as non-root | `true` | +| `configmapReload.image.repository` | configmap-reload container image repository | `jimmidyson/configmap-reload` | +| `configmapReload.image.tag` | configmap-reload container image tag | `v0.2.2` | +| `configmapReload.image.pullPolicy` | configmap-reload container image pull policy | `IfNotPresent` | +| `configmapReload.extraArgs` | Additional configmap-reload container arguments | `{}` | +| `configmapReload.extraConfigmapMounts` | Additional configmap-reload configMap mounts | `[]` | +| `configmapReload.resources` | configmap-reload pod resource requests & limits | `{}` | +| `extraArgs` | Optional flags for blackbox | `[]` | +| `image.repository` | container image repository | `prom/blackbox-exporter` | +| `image.tag` | container image tag | `v0.15.1` | +| `image.pullPolicy` | container image pull policy | `IfNotPresent` | +| `image.pullSecrets` | container image pull secrets | `[]` | +| `ingress.annotations` | Ingress annotations | None | +| `ingress.enabled` | Enables Ingress | `false` | +| `ingress.hosts` | Ingress accepted hostnames | None | +| `ingress.tls` | Ingress TLS configuration | None | +| `nodeSelector` | node labels for pod assignment | `{}` | +| `runAsUser` | User to run blackbox-exporter container as | `1000` | +| `readOnlyRootFilesystem` | Set blackbox-exporter file-system to read-only | `true` | +| `runAsNonRoot` | Run blackbox-exporter as non-root | `true` | +| `tolerations` | node tolerations for pod assignment | `[]` | +| `affinity` | node affinity for pod assignment | `{}` | +| `podAnnotations` | annotations to add to each pod | `{}` | +| `podDisruptionBudget` | pod disruption budget | `{maxUnavailable: 0}` | +| `priorityClassName` | priority class name | None | +| `resources` | pod resource requests & limits | `{}` | +| `restartPolicy` | container restart policy | `Always` | +| `service.annotations` | annotations for the service | `{}` | +| `service.labels` | additional labels for the service | None | +| `service.type` | type of service to create | `ClusterIP` | +| `service.port` | port for the blackbox http service | `9115` | +| `service.externalIPs` | list of external ips | [] | +| `serviceMonitor.enabled` | If true, a ServiceMonitor CRD is created for a prometheus operator | `false` | +| `serviceMonitor.labels` | Labels for prometheus operator | `{}` | +| `serviceMonitor.interval` | Interval for prometheus operator endpoint | `30s` | +| `serviceMonitor.module` | The module that blackbox will use if serviceMonitor is enabled | `http_2xx` | +| `serviceMonitor.url` | The URL that blackbox will scrape if serviceMonitor is enabled | `http://example.com/healthz` | +| `serviceMonitor.urlHumanReadable` | Optional human readable URL that will appear in Prometheus / AlertManager | `nil` | +| `strategy` | strategy used to replace old Pods with new ones | `{"rollingUpdate":{"maxSurge":1,"maxUnavailable":0},"type":"RollingUpdate"}` | + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, + +```bash +$ helm install --name my-release \ + --set key_1=value_1,key_2=value_2 \ + stable/prometheus-blackbox-exporter +``` + +Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, + +```bash +# example for staging +$ helm install --name my-release -f values.yaml stable/prometheus-blackbox-exporter +``` + +> **Tip**: You can use the default [values.yaml](values.yaml) + +## Upgrading an existing Release to a new major version + +### 1.0.0 + +This version introduce the new recommended labels. + +In order to upgrade, delete the Deployment before upgrading: +```bash +$ kubectl delete deployment my-release-prometheus-blackbox-exporter +``` + +Note that this will cause downtime of the blackbox. diff --git a/kubernetes/helm_charts/monitoring/blackbox-exporter/ci/default-values.yaml b/kubernetes/helm_charts/monitoring/blackbox-exporter/ci/default-values.yaml new file mode 100755 index 000000000..e69de29bb diff --git a/kubernetes/helm_charts/monitoring/blackbox-exporter/ci/secret-values.yaml b/kubernetes/helm_charts/monitoring/blackbox-exporter/ci/secret-values.yaml new file mode 100755 index 000000000..92664ab04 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/blackbox-exporter/ci/secret-values.yaml @@ -0,0 +1 @@ +secretConfig: true diff --git a/kubernetes/helm_charts/monitoring/blackbox-exporter/templates/NOTES.txt b/kubernetes/helm_charts/monitoring/blackbox-exporter/templates/NOTES.txt new file mode 100755 index 000000000..d3ee88394 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/blackbox-exporter/templates/NOTES.txt @@ -0,0 +1 @@ +See https://github.com/prometheus/blackbox_exporter/ for how to configure Prometheus and the Blackbox Exporter. diff --git a/kubernetes/helm_charts/monitoring/blackbox-exporter/templates/_helpers.tpl b/kubernetes/helm_charts/monitoring/blackbox-exporter/templates/_helpers.tpl new file mode 100755 index 000000000..c537fd623 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/blackbox-exporter/templates/_helpers.tpl @@ -0,0 +1,31 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "prometheus-blackbox-exporter.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +*/}} +{{- define "prometheus-blackbox-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 -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "prometheus-blackbox-exporter.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/kubernetes/helm_charts/monitoring/blackbox-exporter/templates/configmap.yaml b/kubernetes/helm_charts/monitoring/blackbox-exporter/templates/configmap.yaml new file mode 100755 index 000000000..54908d326 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/blackbox-exporter/templates/configmap.yaml @@ -0,0 +1,14 @@ +{{- if .Values.config }} +apiVersion: v1 +kind: {{ if .Values.secretConfig -}} Secret {{- else -}} ConfigMap {{- end }} +metadata: + name: {{ template "prometheus-blackbox-exporter.fullname" . }} + labels: + app.kubernetes.io/name: {{ include "prometheus-blackbox-exporter.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + helm.sh/chart: {{ include "prometheus-blackbox-exporter.chart" . }} +{{ if .Values.secretConfig -}} stringData: {{- else -}} data: {{- end }} + blackbox.yaml: | +{{ toYaml .Values.config | indent 4 }} +{{- end }} diff --git a/kubernetes/helm_charts/monitoring/blackbox-exporter/templates/deployment.yaml b/kubernetes/helm_charts/monitoring/blackbox-exporter/templates/deployment.yaml new file mode 100755 index 000000000..d951d32b1 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/blackbox-exporter/templates/deployment.yaml @@ -0,0 +1,108 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "prometheus-blackbox-exporter.fullname" . }} + labels: + app.kubernetes.io/name: {{ include "prometheus-blackbox-exporter.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + helm.sh/chart: {{ include "prometheus-blackbox-exporter.chart" . }} +spec: + replicas: {{ .Values.replicas }} + selector: + matchLabels: + app.kubernetes.io/name: {{ include "prometheus-blackbox-exporter.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + strategy: +{{ toYaml .Values.strategy | indent 4 }} + template: + metadata: + labels: + app.kubernetes.io/name: {{ include "prometheus-blackbox-exporter.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + helm.sh/chart: {{ include "prometheus-blackbox-exporter.chart" . }} + annotations: +{{ toYaml .Values.podAnnotations | indent 8 }} + spec: + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 8 }} + {{- end }} + {{- if .Values.tolerations }} + tolerations: +{{ toYaml .Values.tolerations | indent 6 }} + {{- end }} + {{- if .Values.image.pullSecrets }} + imagePullSecrets: + {{- range .Values.image.pullSecrets }} + - name: {{ . }} + {{- end }} + {{- end }} + + restartPolicy: {{ .Values.restartPolicy }} + + {{- if .Values.priorityClassName }} + priorityClassName: "{{ .Values.priorityClassName }}" + {{- end }} + containers: + - name: blackbox-exporter + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + securityContext: + readOnlyRootFilesystem: {{ .Values.readOnlyRootFilesystem }} + runAsNonRoot: {{ .Values.runAsNonRoot }} + runAsUser: {{ .Values.runAsUser }} + args: +{{- if .Values.config }} + - "--config.file=/config/blackbox.yaml" +{{- else }} + - "--config.file=/etc/blackbox_exporter/config.yml" +{{- end }} + {{- if .Values.extraArgs }} +{{ toYaml .Values.extraArgs | indent 12 }} + {{- end }} + resources: +{{ toYaml .Values.resources | indent 12 }} + ports: + - containerPort: {{ .Values.service.port }} + name: http + livenessProbe: + httpGet: + path: /health + port: http + readinessProbe: + httpGet: + path: /health + port: http + volumeMounts: + - mountPath: /config + name: config + - name: configmap-reload + image: "{{ .Values.configmapReload.image.repository }}:{{ .Values.configmapReload.image.tag }}" + imagePullPolicy: "{{ .Values.configmapReload.image.pullPolicy }}" + securityContext: + runAsNonRoot: {{ .Values.configmapReload.runAsNonRoot }} + runAsUser: {{ .Values.configmapReload.runAsUser }} + args: + - --volume-dir=/etc/config + - --webhook-url=http://localhost:{{ .Values.service.port }}/-/reload + resources: +{{ toYaml .Values.configmapReload.resources | indent 12 }} + volumeMounts: + - mountPath: /etc/config + name: config + readOnly: true + volumes: + - name: config +{{- if .Values.secretConfig }} + secret: + secretName: {{ template "prometheus-blackbox-exporter.fullname" . }} +{{- else }} + configMap: + name: {{ template "prometheus-blackbox-exporter.fullname" . }} +{{- end }} diff --git a/kubernetes/helm_charts/monitoring/blackbox-exporter/templates/ingress.yaml b/kubernetes/helm_charts/monitoring/blackbox-exporter/templates/ingress.yaml new file mode 100755 index 000000000..4ef3fc438 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/blackbox-exporter/templates/ingress.yaml @@ -0,0 +1,30 @@ +{{- if .Values.ingress.enabled -}} +{{- $serviceName := include "prometheus-blackbox-exporter.fullname" . -}} +{{- $servicePort := .Values.service.port -}} +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: {{ template "prometheus-blackbox-exporter.fullname" . }} + labels: + app.kubernetes.io/name: {{ include "prometheus-blackbox-exporter.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + helm.sh/chart: {{ include "prometheus-blackbox-exporter.chart" . }} + annotations: +{{ toYaml .Values.ingress.annotations | indent 4 }} +spec: + rules: + {{- range $host := .Values.ingress.hosts }} + - host: {{ $host }} + http: + paths: + - path: / + backend: + serviceName: {{ $serviceName }} + servicePort: {{ $servicePort }} + {{- end -}} + {{- if .Values.ingress.tls }} + tls: +{{ toYaml .Values.ingress.tls | indent 4 }} + {{- end -}} +{{- end -}} diff --git a/kubernetes/helm_charts/monitoring/blackbox-exporter/templates/poddisruptionbudget.yaml b/kubernetes/helm_charts/monitoring/blackbox-exporter/templates/poddisruptionbudget.yaml new file mode 100755 index 000000000..8d54718ed --- /dev/null +++ b/kubernetes/helm_charts/monitoring/blackbox-exporter/templates/poddisruptionbudget.yaml @@ -0,0 +1,17 @@ +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: {{ template "prometheus-blackbox-exporter.fullname" . }} + labels: + app.kubernetes.io/name: {{ include "prometheus-blackbox-exporter.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + helm.sh/chart: {{ include "prometheus-blackbox-exporter.chart" . }} +spec: + selector: + matchLabels: + app.kubernetes.io/name: {{ include "prometheus-blackbox-exporter.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + helm.sh/chart: {{ include "prometheus-blackbox-exporter.chart" . }} +{{ toYaml .Values.podDisruptionBudget | indent 2 }} diff --git a/kubernetes/helm_charts/monitoring/blackbox-exporter/templates/service.yaml b/kubernetes/helm_charts/monitoring/blackbox-exporter/templates/service.yaml new file mode 100755 index 000000000..b2daf5aee --- /dev/null +++ b/kubernetes/helm_charts/monitoring/blackbox-exporter/templates/service.yaml @@ -0,0 +1,29 @@ +kind: Service +apiVersion: v1 +metadata: + name: {{ template "prometheus-blackbox-exporter.fullname" . }} + {{- if .Values.service.annotations }} + annotations: +{{ toYaml .Values.service.annotations | indent 4 }} +{{- end }} + labels: + app.kubernetes.io/name: {{ include "prometheus-blackbox-exporter.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + helm.sh/chart: {{ include "prometheus-blackbox-exporter.chart" . }} +{{- if .Values.service.labels }} +{{ toYaml .Values.service.labels | indent 4 }} +{{- end }} +spec: + type: {{ .Values.service.type }} + ports: + - name: http + port: {{ .Values.service.port }} + protocol: TCP +{{- if .Values.service.externalIPs }} + externalIPs: +{{ toYaml .Values.service.externalIPs | indent 4 }} +{{- end }} + selector: + app.kubernetes.io/name: {{ include "prometheus-blackbox-exporter.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} diff --git a/kubernetes/helm_charts/monitoring/blackbox-exporter/templates/servicemonitor.yaml b/kubernetes/helm_charts/monitoring/blackbox-exporter/templates/servicemonitor.yaml new file mode 100755 index 000000000..1a5664f8e --- /dev/null +++ b/kubernetes/helm_charts/monitoring/blackbox-exporter/templates/servicemonitor.yaml @@ -0,0 +1,45 @@ +{{- if .Values.serviceMonitor.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ template "prometheus-blackbox-exporter.fullname" . }} + labels: + app.kubernetes.io/name: {{ include "prometheus-blackbox-exporter.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + helm.sh/chart: {{ include "prometheus-blackbox-exporter.chart" . }} + {{- if .Values.serviceMonitor.labels }} + {{- toYaml .Values.serviceMonitor.labels | nindent 4 }} + {{- end }} +spec: + endpoints: + - port: http + scheme: http + path: "/probe" + interval: {{ .Values.serviceMonitor.interval }} + scrapeTimeout: {{ .Values.serviceMonitor.scrapeTimeout }} + params: + module: + - {{ .Values.serviceMonitor.module }} + target: + - {{ .Values.serviceMonitor.url }} + metricRelabelings: + - sourceLabels: [__address__] + targetLabel: __param_target + - sourceLabels: [__param_target] + targetLabel: instance + - targetLabel: target + {{- if .Values.serviceMonitor.urlHumanReadable }} + replacement: {{ .Values.serviceMonitor.urlHumanReadable }} + {{- else }} + replacement: {{ .Values.serviceMonitor.url }} + {{- end }} + jobLabel: "{{ .Release.Name }}" + selector: + matchLabels: + app.kubernetes.io/name: {{ include "prometheus-blackbox-exporter.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} +{{- end }} diff --git a/kubernetes/helm_charts/monitoring/blackbox-exporter/values.yaml b/kubernetes/helm_charts/monitoring/blackbox-exporter/values.yaml new file mode 100755 index 000000000..6ff39c865 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/blackbox-exporter/values.yaml @@ -0,0 +1,133 @@ +restartPolicy: Always + +podDisruptionBudget: + maxUnavailable: 0 + +strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + type: RollingUpdate + +image: + repository: prom/blackbox-exporter + tag: v0.15.1 + 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/ + ## + # pullSecrets: + # - myRegistrKeySecretName + +## User to run blackbox-exporter container as +runAsUser: 1000 +readOnlyRootFilesystem: true +runAsNonRoot: true + +nodeSelector: {} +tolerations: [] +affinity: {} + +secretConfig: false +config: + modules: + http_2xx: + prober: http + timeout: 5s + http: + valid_http_versions: ["HTTP/1.1", "HTTP/2"] + no_follow_redirects: false + preferred_ip_protocol: "ip4" + +resources: {} + # limits: + # memory: 300Mi + # requests: + # memory: 50Mi + +priorityClassName: "" + +service: + annotations: {} + type: ClusterIP + port: 9115 + +## An Ingress resource can provide name-based virtual hosting and TLS +## termination among other things for CouchDB deployments which are accessed +## from outside the Kubernetes cluster. +## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/ +ingress: + enabled: false + hosts: [] + # - chart-example.local + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + tls: [] + # Secrets must be manually created in the namespace. + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +podAnnotations: {} + +extraArgs: [] +# --history.limit=1000 + +replicas: 1 +## Monitors ConfigMap changes and POSTs to a URL +## Ref: https://github.com/jimmidyson/configmap-reload +## +configmapReload: + ## configmap-reload container name + ## + name: configmap-reload + + ## User to run configmap-reload container as + ## + runAsUser: 65534 + runAsNonRoot: true + + ## configmap-reload container image + ## + image: + repository: jimmidyson/configmap-reload + tag: v0.2.2 + pullPolicy: IfNotPresent + + ## configmap-reload resource requests and limits + ## Ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + +serviceMonitor: + ## If true, a ServiceMonitor CRD is created for a prometheus operator + ## https://github.com/coreos/prometheus-operator + ## + enabled: false + labels: { release: sunbird-monitoring } + interval: 30s + scrapeTimeout: 30s + module: http_2xx + # The URL that blackbox will scrape + url: http://11.2.4.19:8080/learning-service/health + + # Optional human readable URL that will appear in Prometheus / AlertManager + urlHumanReadable: # www.changemeoriwillfail.com + + #serviceMonitor: + # ## If true, a ServiceMonitor CRD is created for a prometheus operator + # ## https://github.com/coreos/prometheus-operator + # ## + # enabled: true + # name: analytics + # labels: { release: sunbird-monitoring } + # interval: 30s + # scrapeTimeout: 30s + # module: http_2xx + # # The URL that blackbox will scrape + # url: http://11.2.4.21:9000/health + # # Optional human readable URL that will appear in Prometheus / AlertManager + # urlHumanReadable: # www.changemeoriwillfail.com diff --git a/kubernetes/helm_charts/monitoring/blackbox-exporter/values1.yaml b/kubernetes/helm_charts/monitoring/blackbox-exporter/values1.yaml new file mode 100755 index 000000000..23eb1ac40 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/blackbox-exporter/values1.yaml @@ -0,0 +1,155 @@ +restartPolicy: Always + +podDisruptionBudget: + maxUnavailable: 0 + +strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + type: RollingUpdate + +image: + repository: prom/blackbox-exporter + tag: v0.15.1 + 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/ + ## + # pullSecrets: + # - myRegistrKeySecretName + +## User to run blackbox-exporter container as +runAsUser: 1000 +readOnlyRootFilesystem: true +runAsNonRoot: true + +nodeSelector: {} +tolerations: [] +affinity: {} + +secretConfig: false +config: + # modules: + # http_2xx: + # prober: http + # timeout: 5s + # http: + # valid_http_versions: ["HTTP/1.1", "HTTP/2"] + # no_follow_redirects: false + # preferred_ip_protocol: "ip4" + modules: + http_2xx: + prober: http + timeout: 5s + http: + valid_http_versions: ["HTTP/1.0", "HTTP/1.1", "HTTP/2"] + valid_status_codes: [] # Defaults to 2xx + method: GET + http_4xx_auth: + prober: http + timeout: 5s + http: + valid_http_versions: ["HTTP/1.0", "HTTP/1.1", "HTTP/2"] + valid_status_codes: [401, 403] + method: GET + tcp_connect: + prober: tcp + timeout: 5s + composite_search: + prober: http + timeout: 5s + http: + method: POST + headers: + Content-Type: application/json + Authorization: Bearer {{ kong__test_jwt }} + body: '{ + "request": { + "filters":{ + "contentType": "Course", + "objectType": ["Content"], + "status": ["Live"] + }, + "limit": 1, + "fields": ["name", "contentType"] + } + }' + + +resources: {} + # limits: + # memory: 300Mi + # requests: + # memory: 50Mi + +priorityClassName: "" + +service: + annotations: {} + type: ClusterIP + port: 9115 + +## An Ingress resource can provide name-based virtual hosting and TLS +## termination among other things for CouchDB deployments which are accessed +## from outside the Kubernetes cluster. +## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/ +ingress: + enabled: false + hosts: [] + # - chart-example.local + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + tls: [] + # Secrets must be manually created in the namespace. + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +podAnnotations: {} + +extraArgs: [] +# --history.limit=1000 + +replicas: 1 +## Monitors ConfigMap changes and POSTs to a URL +## Ref: https://github.com/jimmidyson/configmap-reload +## +configmapReload: + ## configmap-reload container name + ## + name: configmap-reload + + ## User to run configmap-reload container as + ## + runAsUser: 65534 + runAsNonRoot: true + + ## configmap-reload container image + ## + image: + repository: jimmidyson/configmap-reload + tag: v0.2.2 + pullPolicy: IfNotPresent + + ## configmap-reload resource requests and limits + ## Ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + +serviceMonitor: + ## If true, a ServiceMonitor CRD is created for a prometheus operator + ## https://github.com/coreos/prometheus-operator + ## + enabled: false + labels: {} + interval: 30s + scrapeTimeout: 30s + module: http_2xx + # The URL that blackbox will scrape + url: http://example.com/healthz + # Optional human readable URL that will appear in Prometheus / AlertManager + urlHumanReadable: # www.changemeoriwillfail.com diff --git a/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/.helmignore b/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/.helmignore new file mode 100644 index 000000000..50af03172 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/Chart.yaml b/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/Chart.yaml new file mode 100644 index 000000000..94d30a471 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/Chart.yaml @@ -0,0 +1,21 @@ +apiVersion: v2 +name: cassandra-jmx-exporter +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. +appVersion: 1.16.0 diff --git a/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/NOTES.txt b/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/NOTES.txt new file mode 100644 index 000000000..396e0c112 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/NOTES.txt @@ -0,0 +1,21 @@ +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range $host := .Values.ingress.hosts }} + {{- range .paths }} + http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }} + {{- end }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "cassandra-jmx-exporter.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "cassandra-jmx-exporter.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "cassandra-jmx-exporter.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + echo http://$SERVICE_IP:{{ .Values.service.port }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "cassandra-jmx-exporter.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl port-forward $POD_NAME 8080:80 +{{- end }} diff --git a/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/_helpers.tpl b/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/_helpers.tpl new file mode 100644 index 000000000..439f26533 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/_helpers.tpl @@ -0,0 +1,63 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "cassandra-jmx-exporter.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "cassandra-jmx-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 -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "cassandra-jmx-exporter.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "cassandra-jmx-exporter.labels" -}} +helm.sh/chart: {{ include "cassandra-jmx-exporter.chart" . }} +{{ include "cassandra-jmx-exporter.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} + +{{/* +Selector labels +*/}} +{{- define "cassandra-jmx-exporter.selectorLabels" -}} +app.kubernetes.io/name: {{ include "cassandra-jmx-exporter.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "cassandra-jmx-exporter.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "cassandra-jmx-exporter.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} diff --git a/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/deployment.yaml b/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/deployment.yaml new file mode 100644 index 000000000..2eb9a71cb --- /dev/null +++ b/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/deployment.yaml @@ -0,0 +1,60 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "cassandra-jmx-exporter.fullname" . }} + namespace: {{ default .Values.namespace .Release.Namespace }} + labels: + {{- include "cassandra-jmx-exporter.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "cassandra-jmx-exporter.selectorLabels" . | nindent 6 }} + template: + metadata: + labels: + {{- include "cassandra-jmx-exporter.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "cassandra-jmx-exporter.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + volumes: + - name: logging-properties + configMap: + name: {{ include "cassandra-jmx-exporter.name" . }}-logging-properties + - name: jmx-httpserver + configMap: + name: {{ include "cassandra-jmx-exporter.name" . }}-jmx-httpserver + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.imageTag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + volumeMounts: + - mountPath: /opt/app/jmx_httpserver.yml + subPath: jmx_httpserver.yml + name: jmx-httpserver + - mountPath: /opt/app/logging.properties + subPath: logging.properties + name: logging-properties + ports: + {{- toYaml .Values.ports | nindent 12 }} + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/ingress.yaml b/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/ingress.yaml new file mode 100644 index 000000000..05df6d4da --- /dev/null +++ b/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/ingress.yaml @@ -0,0 +1,41 @@ +{{- if .Values.ingress.enabled -}} +{{- $fullName := include "cassandra-jmx-exporter.fullname" . -}} +{{- $svcPort := .Values.service.port -}} +{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1beta1 +{{- else -}} +apiVersion: extensions/v1beta1 +{{- end }} +kind: Ingress +metadata: + name: {{ $fullName }} + labels: + {{- include "cassandra-jmx-exporter.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: +{{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} +{{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ . }} + backend: + serviceName: {{ $fullName }} + servicePort: {{ $svcPort }} + {{- end }} + {{- end }} +{{- end }} diff --git a/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/jmx-httpserver-configmap.yaml b/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/jmx-httpserver-configmap.yaml new file mode 100644 index 000000000..f25d9ff7a --- /dev/null +++ b/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/jmx-httpserver-configmap.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +data: + jmx_httpserver.yml: | + {{- range $key, $val := .Values.configMapValuesJmxHttpServer }} + {{ $key }}: {{ $val }} + {{- end }} +kind: ConfigMap +metadata: + name: {{ include "cassandra-jmx-exporter.name" . }}-jmx-httpserver + namespace: {{ default .Values.namespace .Release.Namespace }} diff --git a/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/logging-properties-configmap.yaml b/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/logging-properties-configmap.yaml new file mode 100644 index 000000000..7aff7e195 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/logging-properties-configmap.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +data: + logging.properties: | + {{- range $key, $val := .Values.configMpapValuesLoggingProperties }} + {{ $key }}={{ $val }} + {{- end }} +kind: ConfigMap +metadata: + name: {{ include "cassandra-jmx-exporter.name" . }}-logging-properties + namespace: {{ default .Values.namespace .Release.Namespace }} diff --git a/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/service.yaml b/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/service.yaml new file mode 100644 index 000000000..01c640241 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/service.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "cassandra-jmx-exporter.fullname" . }} + namespace: {{ default .Values.namespace .Release.Namespace }} + labels: + {{- include "cassandra-jmx-exporter.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + {{- toYaml .Values.service.ports | nindent 4 }} + selector: + {{- include "cassandra-jmx-exporter.selectorLabels" . | nindent 4 }} diff --git a/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/serviceMonitor.yml b/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/serviceMonitor.yml new file mode 100644 index 000000000..aafc26e62 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/serviceMonitor.yml @@ -0,0 +1,25 @@ +{{- if .Values.serviceMonitor.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ include "cassandra-jmx-exporter.fullname" . }} + namespace: {{ default .Values.namespace .Release.Namespace }} + labels: + {{- include "cassandra-jmx-exporter.labels" . | nindent 4 }} + {{- toYaml .Values.serviceMonitor.labels | nindent 4 }} +spec: + endpoints: + - honorLabels: true + interval: 30s + path: /metrics + port: http + scheme: http + scrapeTimeout: 10s + jobLabel: cassadra-jmx-exporter + namespaceSelector: + matchNames: + - {{ default .Values.namespace .Release.Namespace }} + selector: + matchLabels: + {{- include "cassandra-jmx-exporter.labels" . | nindent 6 }} +{{- end }} diff --git a/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/serviceaccount.yaml b/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/serviceaccount.yaml new file mode 100644 index 000000000..4163fb267 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/serviceaccount.yaml @@ -0,0 +1,8 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "cassandra-jmx-exporter.serviceAccountName" . }} + labels: +{{ include "cassandra-jmx-exporter.labels" . | nindent 4 }} +{{- end -}} diff --git a/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/tests/test-connection.yaml b/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/tests/test-connection.yaml new file mode 100644 index 000000000..eccbf4c49 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/tests/test-connection.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Pod +metadata: + name: "{{ include "cassandra-jmx-exporter.fullname" . }}-test-connection" + labels: +{{ include "cassandra-jmx-exporter.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": test-success +spec: + containers: + - name: wget + image: busybox + command: ['wget'] + args: ['{{ include "cassandra-jmx-exporter.fullname" . }}:{{ .Values.service.port }}'] + restartPolicy: Never diff --git a/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/values.yaml b/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/values.yaml new file mode 100644 index 000000000..48f01950b --- /dev/null +++ b/kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/values.yaml @@ -0,0 +1,99 @@ +# Default values for cassandra-jmx-exporter. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: + repository: sunbird/cassandra_jmx_exporter + pullPolicy: IfNotPresent + imageTag: 0.11 + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" +namespace: monitoring + +serviceAccount: + # Specifies whether a service account should be created + create: true + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +ports: + - containerPort: 5556 + name: http + protocol: TCP + +service: + type: ClusterIP + ports: + - port: 5556 + name: http + targetPort: 5556 + +ingress: + enabled: false + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: chart-example.local + paths: [] + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +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:'. + requests: + cpu: 50m + memory: 128Mi + limits: + cpu: 100m + memory: 256Mi + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +# Config map values for jmx http server +configMapValuesJmxHttpServer: + hostPort: '"11.2.3.63:7199,11.2.3.64:7199,11.2.3.66:7199:7199"' # In private this should be an asible variable + username: + password: + # Following values should be in '' because of go templating. + whitelistObjectNames: '["org.apache.cassandra.metrics:type=Keyspace,name=CasProposeLatency,*"]' + blacklistObjectNames: '["org.apache.cassandra.metrics:type=ColumnFamily,*"]' + +# Configmap for cassandra exporter logger properties +configMpapValuesLoggingProperties: + handlers: java.util.logging.ConsoleHandler + java.util.logging.ConsoleHandler.level: INFO + io.prometheus.jmx.level: INFO + io.prometheus.jmx.shaded.io.prometheus.jmx.level: INFO + +# This section will create service monitor for prometheus operator +serviceMonitor: + enabled: true + labels: # labels with which the prometheus choose the serviceMonitor + app: monitoring + release: prometheus-operator diff --git a/kubernetes/helm_charts/monitoring/elasticsearch-exporter/.helmignore b/kubernetes/helm_charts/monitoring/elasticsearch-exporter/.helmignore new file mode 100755 index 000000000..9e7b0bbbc --- /dev/null +++ b/kubernetes/helm_charts/monitoring/elasticsearch-exporter/.helmignore @@ -0,0 +1,24 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +# OWNERS file for Kubernetes +OWNERS +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/kubernetes/helm_charts/monitoring/elasticsearch-exporter/Chart.yaml b/kubernetes/helm_charts/monitoring/elasticsearch-exporter/Chart.yaml new file mode 100755 index 000000000..a456f4299 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/elasticsearch-exporter/Chart.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +appVersion: 1.1.0 +description: Elasticsearch stats exporter for Prometheus +home: https://github.com/justwatchcom/elasticsearch_exporter +keywords: +- metrics +- elasticsearch +- monitoring +maintainers: +- email: sven.mueller@commercetools.com + name: svenmueller +- email: carlos@carlosbecker.com + name: caarlos0 +name: elasticsearch-exporter +sources: +- https://github.com/justwatchcom/elasticsearch_exporter +version: 1.10.1 diff --git a/kubernetes/helm_charts/monitoring/elasticsearch-exporter/README.md b/kubernetes/helm_charts/monitoring/elasticsearch-exporter/README.md new file mode 100755 index 000000000..a1ad12506 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/elasticsearch-exporter/README.md @@ -0,0 +1,108 @@ +# Elasticsearch Exporter + +Prometheus exporter for various metrics about ElasticSearch, written in Go. + +Learn more: https://github.com/justwatchcom/elasticsearch_exporter + +## TL;DR; + +```bash +$ helm install stable/elasticsearch-exporter +``` + +## Introduction + +This chart creates an Elasticsearch-Exporter deployment on a [Kubernetes](http://kubernetes.io) +cluster using the [Helm](https://helm.sh) package manager. + +## Prerequisites + +- Kubernetes 1.8+ with Beta APIs enabled + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```bash +$ helm install --name my-release stable/elasticsearch-exporter +``` + +The command deploys Elasticsearch-Exporter on the Kubernetes cluster using the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. + +## Uninstalling the Chart + +To uninstall/delete the `my-release` deployment: + +```bash +$ helm delete --purge my-release +``` +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 Elasticsearch-Exporter chart and their default values. + +Parameter | Description | Default +--- | --- | --- +`replicaCount` | desired number of pods | `1` +`restartPolicy` | container restart policy | `Always` +`image.repository` | container image repository | `justwatch/elasticsearch_exporter` +`image.tag` | container image tag | `1.1.0` +`image.pullPolicy` | container image pull policy | `IfNotPresent` +`image.pullSecret` | container image pull secret | `""` +`resources` | resource requests & limits | `{}` +`priorityClassName` | priorityClassName | `nil` +`nodeSelector` | Node labels for pod assignment | `{}` +`tolerations` | Node tolerations for pod assignment | `{}` +`podAnnotations` | Pod annotations | `{}` | +`service.type` | type of service to create | `ClusterIP` +`service.httpPort` | port for the http service | `9108` +`service.metricsPort.name` | name for the http service | `http` +`service.annotations` | Annotations on the http service | `{}` +`service.labels` | Additional labels for the service definition | `{}` +`env` | Extra environment variables passed to pod | `{}` +`secretMounts` | list of secrets and their paths to mount inside the pod | `[]` +`affinity` | Affinity rules | `{}` +`es.uri` | address of the Elasticsearch node to connect to | `localhost:9200` +`es.all` | if `true`, query stats for all nodes in the cluster, rather than just the node we connect to | `true` +`es.indices` | if true, query stats for all indices in the cluster | `true` +`es.shards` | if true, query stats for shards in the cluster | `true` +`es.cluster_settings` | if true, query stats for cluster settings | `true` +`es.snapshots` | if true, query stats for snapshots in the cluster | `true` +`es.timeout` | timeout for trying to get stats from Elasticsearch | `30s` +`es.ssl.enabled` | If true, a secure connection to Elasticsearch cluster is used | `false` +`es.ssl.useExistingSecrets` | If true, certs from secretMounts will be used | `false` +`es.ssl.ca.pem` | PEM that contains trusted CAs used for setting up secure Elasticsearch connection | +`es.ssl.ca.path` | Path of ca pem file which should match a secretMount path | +`es.ssl.client.pem` | PEM that contains the client cert to connect to Elasticsearch | +`es.ssl.client.pemPath` | Path of client pem file which should match a secretMount path | +`es.ssl.client.key` | Private key for client auth when connecting to Elasticsearch | +`es.ssl.client.keyPath` | Path of client key file which should match a secretMount path | +`web.path` | path under which to expose metrics | `/metrics` +`serviceMonitor.enabled` | If true, a ServiceMonitor CRD is created for a prometheus operator | `false` +`serviceMonitor.namespace` | If set, the ServiceMonitor will be installed in a different namespace | `""` +`serviceMonitor.labels` | Labels for prometheus operator | `{}` +`serviceMonitor.interval` | Interval at which metrics should be scraped | `10s` +`serviceMonitor.scrapeTimeout` | Timeout after which the scrape is ended | `10s` +`serviceMonitor.scheme` | Scheme to use for scraping | `http` +`prometheusRule.enabled` | If true, a PrometheusRule CRD is created for a prometheus operator | `false` +`prometheusRule.namespace` | If set, the PrometheusRule will be installed in a different namespace | `""` +`prometheusRule.labels` | Labels for prometheus operator | `{}` +`prometheusRule.rules` | List of Prometheus rules | `[]` + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, + +```bash +$ helm install --name my-release \ + --set key_1=value_1,key_2=value_2 \ + stable/elasticsearch-exporter +``` + +Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, + +```bash +# example for staging +$ helm install --name my-release -f values.yaml stable/elasticsearch-exporter +``` + +> **Tip**: You can use the default [values.yaml](values.yaml) diff --git a/kubernetes/helm_charts/monitoring/elasticsearch-exporter/ci/default-values.yaml b/kubernetes/helm_charts/monitoring/elasticsearch-exporter/ci/default-values.yaml new file mode 100755 index 000000000..fc2ba605a --- /dev/null +++ b/kubernetes/helm_charts/monitoring/elasticsearch-exporter/ci/default-values.yaml @@ -0,0 +1 @@ +# Leave this file empty to ensure that CI runs builds against the default configuration in values.yaml. diff --git a/kubernetes/helm_charts/monitoring/elasticsearch-exporter/ci/security-context.yaml b/kubernetes/helm_charts/monitoring/elasticsearch-exporter/ci/security-context.yaml new file mode 100755 index 000000000..c33dc9f21 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/elasticsearch-exporter/ci/security-context.yaml @@ -0,0 +1,5 @@ +--- +# Set default security context for kubernetes + +securityContext: + disable: true diff --git a/kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/NOTES.txt b/kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/NOTES.txt new file mode 100755 index 000000000..4311f1046 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/NOTES.txt @@ -0,0 +1,15 @@ +1. Get the application URL by running these commands: +{{- if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "elasticsearch-exporter.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT{{ .Values.web.path }} +{{- 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 -w {{ template "elasticsearch-exporter.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "elasticsearch-exporter.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + echo http://$SERVICE_IP:{{ .Values.service.httpPort }}{{ .Values.web.path }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "elasticsearch-exporter.fullname" . }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:{{ .Values.service.httpPort }}{{ .Values.web.path }} to use your application" + kubectl port-forward $POD_NAME {{ .Values.service.httpPort }}:{{ .Values.service.httpPort }} --namespace {{ .Release.Namespace }} +{{- end }} diff --git a/kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/_helpers.tpl b/kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/_helpers.tpl new file mode 100755 index 000000000..1b098d1f6 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/_helpers.tpl @@ -0,0 +1,33 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "elasticsearch-exporter.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "elasticsearch-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 -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "elasticsearch-exporter.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + diff --git a/kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/cert-secret.yaml b/kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/cert-secret.yaml new file mode 100755 index 000000000..c662e2dfa --- /dev/null +++ b/kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/cert-secret.yaml @@ -0,0 +1,16 @@ +{{- if and .Values.es.ssl.enabled (eq .Values.es.ssl.useExistingSecrets false) }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ template "elasticsearch-exporter.fullname" . }}-cert + labels: + chart: {{ template "elasticsearch-exporter.chart" . }} + app: {{ template "elasticsearch-exporter.name" . }} + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" +type: Opaque +data: + ca.pem: {{ .Values.es.ssl.ca.pem | b64enc }} + client.pem: {{ .Values.es.ssl.client.pem | b64enc }} + client.key: {{ .Values.es.ssl.client.key | b64enc }} +{{- end }} diff --git a/kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/deployment.yaml b/kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/deployment.yaml new file mode 100755 index 000000000..dc598b13c --- /dev/null +++ b/kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/deployment.yaml @@ -0,0 +1,152 @@ +apiVersion: apps/v1beta2 +kind: Deployment +metadata: + name: {{ template "elasticsearch-exporter.fullname" . }} + labels: + chart: {{ template "elasticsearch-exporter.chart" . }} + app: {{ template "elasticsearch-exporter.name" . }} + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ template "elasticsearch-exporter.name" . }} + release: "{{ .Release.Name }}" + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + type: RollingUpdate + template: + metadata: + labels: + app: {{ template "elasticsearch-exporter.name" . }} + release: "{{ .Release.Name }}" + {{- if .Values.podAnnotations }} + annotations: +{{ toYaml .Values.podAnnotations | indent 8 }} + {{- end }} + spec: +{{- if .Values.priorityClassName }} + priorityClassName: "{{ .Values.priorityClassName }}" +{{- end }} +{{- if .Values.image.pullSecret }} + imagePullSecrets: + - name: {{ .Values.image.pullSecret }} +{{- end }} + restartPolicy: {{ .Values.restartPolicy }} + {{- if .Values.securityContext.enabled }} + securityContext: + runAsNonRoot: true + runAsUser: {{ .Values.securityContext.runAsUser }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + {{- if .Values.env }} + env: + {{- range $key, $value := .Values.env }} + - name: {{ $key }} + value: "{{ $value }}" + {{- end }} + {{- end }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + command: ["elasticsearch_exporter", + "--es.uri={{ .Values.es.uri }}", + {{- if .Values.es.all }} + "--es.all", + {{- end }} + {{- if .Values.es.indices }} + "--es.indices", + {{- end }} + {{- if .Values.es.shards }} + "--es.shards", + {{- end }} + {{- if .Values.es.snapshots }} + "--es.snapshots", + {{- end }} + {{- if .Values.es.cluster_settings }} + "--es.cluster_settings", + {{- end }} + "--es.timeout={{ .Values.es.timeout }}", + {{- if .Values.es.sslSkipVerify }} + "--es.ssl-skip-verify", + {{- end }} + {{- if .Values.es.ssl.enabled }} + "--es.ca={{.Values.es.ssl.ca.path | default "/ssl/ca.pem" }}", + "--es.client-cert={{.Values.es.ssl.client.pemPath | default "/ssl/client.pem" }}", + "--es.client-private-key={{.Values.es.ssl.client.keyPath | default "/ssl/client.key" }}", + {{- end }} + "--web.listen-address=:{{ .Values.service.httpPort }}", + "--web.telemetry-path={{ .Values.web.path }}"] + securityContext: + capabilities: + drop: + - SETPCAP + - MKNOD + - AUDIT_WRITE + - CHOWN + - NET_RAW + - DAC_OVERRIDE + - FOWNER + - FSETID + - KILL + - SETGID + - SETUID + - NET_BIND_SERVICE + - SYS_CHROOT + - SETFCAP + readOnlyRootFilesystem: true + resources: +{{ toYaml .Values.resources | indent 12 }} + ports: + - containerPort: {{ .Values.service.httpPort }} + name: http + livenessProbe: + httpGet: + path: /health + port: http + initialDelaySeconds: 30 + timeoutSeconds: 10 + readinessProbe: + httpGet: + path: /health + port: http + initialDelaySeconds: 10 + timeoutSeconds: 10 + volumeMounts: + {{- if and .Values.es.ssl.enabled (eq .Values.es.ssl.useExistingSecrets false) }} + - mountPath: /ssl + name: ssl + {{- end }} + {{- range .Values.secretMounts }} + - name: {{ .name }} + mountPath: {{ .path }} + {{- if .subPath }} + subPath: {{ .subPath }} + {{- end }} + {{- end }} +{{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 8 }} +{{- end }} +{{- if .Values.tolerations }} + tolerations: +{{ toYaml .Values.tolerations | indent 8 }} +{{- end }} +{{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 8 }} +{{- end }} + volumes: + {{- if and .Values.es.ssl.enabled (eq .Values.es.ssl.useExistingSecrets false) }} + - name: ssl + secret: + secretName: {{ template "elasticsearch-exporter.fullname" . }}-cert + {{- end }} + {{- range .Values.secretMounts }} + - name: {{ .name }} + secret: + secretName: {{ .secretName }} + {{- end }} diff --git a/kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/prometheusrule.yaml b/kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/prometheusrule.yaml new file mode 100755 index 000000000..62e07e057 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/prometheusrule.yaml @@ -0,0 +1,24 @@ +{{- if .Values.prometheusRule.enabled }} +--- +apiVersion: monitoring.coreos.com/v1 +kind: PrometheusRule +metadata: + name: {{ template "elasticsearch-exporter.fullname" . }} + {{- if .Values.prometheusRule.namespace }} + namespace: {{ .Values.prometheusRule.namespace }} + {{- end }} + labels: + chart: {{ template "elasticsearch-exporter.chart" . }} + app: {{ template "elasticsearch-exporter.name" . }} + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" + {{- if .Values.prometheusRule.labels }} + {{- toYaml .Values.prometheusRule.labels | nindent 4 }} + {{- end }} +spec: + {{- with .Values.prometheusRule.rules }} + groups: + - name: {{ template "elasticsearch-exporter.name" $ }} + rules: {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/service.yaml b/kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/service.yaml new file mode 100755 index 000000000..d268ca574 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/service.yaml @@ -0,0 +1,25 @@ +kind: Service +apiVersion: v1 +metadata: + name: {{ template "elasticsearch-exporter.fullname" . }} + labels: + chart: {{ template "elasticsearch-exporter.chart" . }} + app: {{ template "elasticsearch-exporter.name" . }} + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" +{{- if .Values.service.labels }} +{{ toYaml .Values.service.labels | indent 4 }} +{{- end }} +{{- if .Values.service.annotations }} + annotations: +{{ toYaml .Values.service.annotations | indent 4 }} +{{- end }} +spec: + type: {{ .Values.service.type }} + ports: + - name: {{ .Values.service.metricsPort.name }} + port: {{ .Values.service.httpPort }} + protocol: TCP + selector: + app: {{ template "elasticsearch-exporter.name" . }} + release: "{{ .Release.Name }}" diff --git a/kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/servicemonitor.yaml b/kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/servicemonitor.yaml new file mode 100755 index 000000000..69d7e0ace --- /dev/null +++ b/kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/servicemonitor.yaml @@ -0,0 +1,36 @@ +{{- if .Values.serviceMonitor.enabled }} +--- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ template "elasticsearch-exporter.fullname" . }} + {{- if .Values.serviceMonitor.namespace }} + namespace: {{ .Values.serviceMonitor.namespace }} + {{- end }} + labels: + chart: {{ template "elasticsearch-exporter.chart" . }} + app: {{ template "elasticsearch-exporter.name" . }} + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" + {{- if .Values.serviceMonitor.labels }} + {{- toYaml .Values.serviceMonitor.labels | nindent 4 }} + {{- end }} +spec: + endpoints: + - interval: {{ .Values.serviceMonitor.interval }} + {{- if .Values.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ .Values.serviceMonitor.scrapeTimeout }} + {{- end }} + honorLabels: true + port: {{ .Values.service.metricsPort.name }} + path: {{ .Values.web.path }} + scheme: {{ .Values.serviceMonitor.scheme }} + jobLabel: "{{ .Release.Name }}" + selector: + matchLabels: + app: {{ template "elasticsearch-exporter.name" . }} + release: "{{ .Release.Name }}" + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} +{{- end }} diff --git a/kubernetes/helm_charts/monitoring/elasticsearch-exporter/values.yaml b/kubernetes/helm_charts/monitoring/elasticsearch-exporter/values.yaml new file mode 100755 index 000000000..f23e569d5 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/elasticsearch-exporter/values.yaml @@ -0,0 +1,180 @@ +## number of exporter instances +## +replicaCount: 1 + +## restart policy for all containers +## +restartPolicy: Always + +image: + repository: justwatch/elasticsearch_exporter + tag: 1.1.0 + pullPolicy: IfNotPresent + pullSecret: "" + +## Set enabled to false if you don't want securityContext +## in your Deployment. +## The below values are the default for kubernetes. +## Openshift won't deploy with runAsUser: 1000 without additional permissions. +securityContext: + enabled: true # Should be set to false when running on OpenShift + runAsUser: 1000 + + resources: + requests: + cpu: 50m + memory: 128Mi + limits: + cpu: 100m + memory: 128Mi + +priorityClassName: "" + +nodeSelector: {} + +tolerations: {} + +podAnnotations: {} + +affinity: {} + +service: + type: ClusterIP + httpPort: 9108 + metricsPort: + name: http + +## Extra environment variables that will be passed into the exporter pod +## example: +## env: +## KEY_1: value1 +## KEY_2: value2 +# env: + +# A list of secrets and their paths to mount inside the pod +# This is useful for mounting certificates for security +secretMounts: [] +# - name: elastic-certs +# secretName: elastic-certs +# path: /ssl + +es: + ## Address (host and port) of the Elasticsearch node we should connect to. + ## This could be a local node (localhost:9200, for instance), or the address + ## of a remote Elasticsearch server. When basic auth is needed, + ## specify as: ://:@:. e.g., http://admin:pass@localhost:9200. + ## + #uri: http://:9200 + # Override these values with you elasticsearch ip. + uri: "" + ## If true, query stats for all nodes in the cluster, rather than just the + ## node we connect to. + ## + all: true + ## If true, query stats for all indices in the cluster. + ## + indices: false + + ## If true, query stats for shards in the cluster. + ## + shards: false + + ## If true, query stats for snapshots in the cluster. + ## + snapshots: false + + ## If true, query stats for cluster settings. + ## + cluster_settings: false + + ## Timeout for trying to get stats from Elasticsearch. (ex: 20s) + ## + timeout: 20s + + ## Skip SSL verification when connecting to Elasticsearch + ## (only available if image.tag >= 1.0.4rc1) + ## + sslSkipVerify: false + + + ssl: + ## If true, a secure connection to ES cluster is used (requires SSL certs below) + ## + enabled: false + + ## If true, certs from secretMounts will be need to be referenced instead of certs below + ## + useExistingSecrets: false + + ca: + + ## PEM that contains trusted CAs used for setting up secure Elasticsearch connection + ## + # pem: + + # Path of ca pem file which should match a secretMount path + # path: /ssl/ca.pem + client: + + ## PEM that contains the client cert to connect to Elasticsearch. + ## + # pem: + + # Path of client pem file which should match a secretMount path + # pemPath: /ssl/client.pem + + ## Private key for client auth when connecting to Elasticsearch + ## + # key: + + # Path of client key file which should match a secretMount path + # keyPath: /ssl/client.key +web: + ## Path under which to expose metrics. + ## + path: /metrics + +serviceMonitor: + ## If true, a ServiceMonitor CRD is created for a prometheus operator + ## https://github.com/coreos/prometheus-operator + ## + enabled: true + # namespace: monitoring + labels: + # labels with which prometheus operator selects serviceMonitor + app: monitoring + release: prometheus-operator + interval: 120s + scrapeTimeout: 20s + scheme: http + +prometheusRule: + ## If true, a PrometheusRule CRD is created for a prometheus operator + ## https://github.com/coreos/prometheus-operator + ## + enabled: false + # namespace: monitoring + labels: {} + rules: [] + # - record: elasticsearch_filesystem_data_used_percent + # expr: 100 * (elasticsearch_filesystem_data_size_bytes - elasticsearch_filesystem_data_free_bytes) + # / elasticsearch_filesystem_data_size_bytes + # - record: elasticsearch_filesystem_data_free_percent + # expr: 100 - elasticsearch_filesystem_data_used_percent + # - alert: ElasticsearchTooFewNodesRunning + # expr: elasticsearch_cluster_health_number_of_nodes < 3 + # for: 5m + # labels: + # severity: critical + # annotations: + # description: There are only {{$value}} < 3 ElasticSearch nodes running + # summary: ElasticSearch running on less than 3 nodes + # - alert: ElasticsearchHeapTooHigh + # expr: elasticsearch_jvm_memory_used_bytes{area="heap"} / elasticsearch_jvm_memory_max_bytes{area="heap"} + # > 0.9 + # for: 15m + # labels: + # severity: critical + # annotations: + # description: The heap usage is over 90% for 15m + # summary: ElasticSearch node {{$labels.node}} heap usage is high diff --git a/kubernetes/helm_charts/monitoring/elasticsearch-exporter/values1.yaml b/kubernetes/helm_charts/monitoring/elasticsearch-exporter/values1.yaml new file mode 100755 index 000000000..43d5d2163 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/elasticsearch-exporter/values1.yaml @@ -0,0 +1,179 @@ +## number of exporter instances +## +replicaCount: 1 + +## restart policy for all containers +## +restartPolicy: Always + +image: + repository: justwatch/elasticsearch_exporter + tag: 1.1.0 + pullPolicy: IfNotPresent + pullSecret: "" + +## Set enabled to false if you don't want securityContext +## in your Deployment. +## The below values are the default for kubernetes. +## Openshift won't deploy with runAsUser: 1000 without additional permissions. +securityContext: + enabled: true # Should be set to false when running on OpenShift + runAsUser: 1000 + +resources: {} + # requests: + # cpu: 100m + # memory: 128Mi + # limits: + # cpu: 100m + # memory: 128Mi + +priorityClassName: "" + +nodeSelector: {} + +tolerations: {} + +podAnnotations: {} + +affinity: {} + +service: + type: ClusterIP + httpPort: 9108 + metricsPort: + name: http + annotations: {} + labels: {} + +## Extra environment variables that will be passed into the exporter pod +## example: +## env: +## KEY_1: value1 +## KEY_2: value2 +# env: + +# A list of secrets and their paths to mount inside the pod +# This is useful for mounting certificates for security +secretMounts: [] +# - name: elastic-certs +# secretName: elastic-certs +# path: /ssl + +es: + ## Address (host and port) of the Elasticsearch node we should connect to. + ## This could be a local node (localhost:9200, for instance), or the address + ## of a remote Elasticsearch server. When basic auth is needed, + ## specify as: ://:@:. e.g., http://admin:pass@localhost:9200. + ## + uri: http://11.2.3.58:9200 + + ## If true, query stats for all nodes in the cluster, rather than just the + ## node we connect to. + ## + all: true + + ## If true, query stats for all indices in the cluster. + ## + indices: true + + ## If true, query stats for shards in the cluster. + ## + shards: true + + ## If true, query stats for snapshots in the cluster. + ## + snapshots: true + + ## If true, query stats for cluster settings. + ## + cluster_settings: false + + ## Timeout for trying to get stats from Elasticsearch. (ex: 20s) + ## + timeout: 30s + + ## Skip SSL verification when connecting to Elasticsearch + ## (only available if image.tag >= 1.0.4rc1) + ## + sslSkipVerify: false + + + ssl: + ## If true, a secure connection to ES cluster is used (requires SSL certs below) + ## + enabled: false + + ## If true, certs from secretMounts will be need to be referenced instead of certs below + ## + useExistingSecrets: false + + ca: + + ## PEM that contains trusted CAs used for setting up secure Elasticsearch connection + ## + # pem: + + # Path of ca pem file which should match a secretMount path + # path: /ssl/ca.pem + client: + + ## PEM that contains the client cert to connect to Elasticsearch. + ## + # pem: + + # Path of client pem file which should match a secretMount path + # pemPath: /ssl/client.pem + + ## Private key for client auth when connecting to Elasticsearch + ## + # key: + + # Path of client key file which should match a secretMount path + # keyPath: /ssl/client.key +web: + ## Path under which to expose metrics. + ## + path: /metrics + +serviceMonitor: + ## If true, a ServiceMonitor CRD is created for a prometheus operator + ## https://github.com/coreos/prometheus-operator + ## + enabled: false + # namespace: monitoring + labels: {} + interval: 10s + scrapeTimeout: 10s + scheme: http + +prometheusRule: + ## If true, a PrometheusRule CRD is created for a prometheus operator + ## https://github.com/coreos/prometheus-operator + ## + enabled: false + # namespace: monitoring + labels: {} + rules: [] + # - record: elasticsearch_filesystem_data_used_percent + # expr: 100 * (elasticsearch_filesystem_data_size_bytes - elasticsearch_filesystem_data_free_bytes) + # / elasticsearch_filesystem_data_size_bytes + # - record: elasticsearch_filesystem_data_free_percent + # expr: 100 - elasticsearch_filesystem_data_used_percent + # - alert: ElasticsearchTooFewNodesRunning + # expr: elasticsearch_cluster_health_number_of_nodes < 3 + # for: 5m + # labels: + # severity: critical + # annotations: + # description: There are only {{$value}} < 3 ElasticSearch nodes running + # summary: ElasticSearch running on less than 3 nodes + # - alert: ElasticsearchHeapTooHigh + # expr: elasticsearch_jvm_memory_used_bytes{area="heap"} / elasticsearch_jvm_memory_max_bytes{area="heap"} + # > 0.9 + # for: 15m + # labels: + # severity: critical + # annotations: + # description: The heap usage is over 90% for 15m + # summary: ElasticSearch node {{$labels.node}} heap usage is high diff --git a/kubernetes/helm_charts/monitoring/kafka-lag-exporter/.helmignore b/kubernetes/helm_charts/monitoring/kafka-lag-exporter/.helmignore new file mode 100644 index 000000000..50af03172 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/kafka-lag-exporter/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/kubernetes/helm_charts/monitoring/kafka-lag-exporter/Chart.yaml b/kubernetes/helm_charts/monitoring/kafka-lag-exporter/Chart.yaml new file mode 100644 index 000000000..6a522b212 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/kafka-lag-exporter/Chart.yaml @@ -0,0 +1,21 @@ +apiVersion: v2 +name: kafka-lag-exporter +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. +appVersion: 1.16.0 diff --git a/kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/NOTES.txt b/kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/NOTES.txt new file mode 100644 index 000000000..3c4ccf621 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/NOTES.txt @@ -0,0 +1,21 @@ +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range $host := .Values.ingress.hosts }} + {{- range .paths }} + http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }} + {{- end }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "kafka-lag-exporter.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "kafka-lag-exporter.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "kafka-lag-exporter.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + echo http://$SERVICE_IP:{{ .Values.service.port }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "kafka-lag-exporter.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl port-forward $POD_NAME 8080:80 +{{- end }} diff --git a/kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/_helpers.tpl b/kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/_helpers.tpl new file mode 100644 index 000000000..06bea447d --- /dev/null +++ b/kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/_helpers.tpl @@ -0,0 +1,63 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "kafka-lag-exporter.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "kafka-lag-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 -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "kafka-lag-exporter.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "kafka-lag-exporter.labels" -}} +helm.sh/chart: {{ include "kafka-lag-exporter.chart" . }} +{{ include "kafka-lag-exporter.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} + +{{/* +Selector labels +*/}} +{{- define "kafka-lag-exporter.selectorLabels" -}} +app.kubernetes.io/name: {{ include "kafka-lag-exporter.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "kafka-lag-exporter.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "kafka-lag-exporter.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} diff --git a/kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/deployment.yaml b/kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/deployment.yaml new file mode 100644 index 000000000..8fcc463d1 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/deployment.yaml @@ -0,0 +1,47 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "kafka-lag-exporter.fullname" . }} + namespace: {{ default .Values.namespace .Release.Namespace }} + labels: + {{- include "kafka-lag-exporter.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "kafka-lag-exporter.selectorLabels" . | nindent 6 }} + template: + metadata: + labels: + {{- include "kafka-lag-exporter.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "kafka-lag-exporter.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.imageTag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + args: ["--kafka.server={{default "127.0.0.1:9092" .Values.kafka }} --zookeeper.server={{ default "127.0.0.1:2181" .Values.zookeeper }} --use.consumelag.zookeeper"] + ports: + {{- toYaml .Values.ports | nindent 12 }} + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/ingress.yaml b/kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/ingress.yaml new file mode 100644 index 000000000..5b74ec17b --- /dev/null +++ b/kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/ingress.yaml @@ -0,0 +1,41 @@ +{{- if .Values.ingress.enabled -}} +{{- $fullName := include "kafka-lag-exporter.fullname" . -}} +{{- $svcPort := .Values.service.port -}} +{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1beta1 +{{- else -}} +apiVersion: extensions/v1beta1 +{{- end }} +kind: Ingress +metadata: + name: {{ $fullName }} + labels: + {{- include "kafka-lag-exporter.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: +{{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} +{{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ . }} + backend: + serviceName: {{ $fullName }} + servicePort: {{ $svcPort }} + {{- end }} + {{- end }} +{{- end }} diff --git a/kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/service.yaml b/kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/service.yaml new file mode 100644 index 000000000..6aef6c7d3 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/service.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "kafka-lag-exporter.fullname" . }} + namespace: {{ default .Values.namespace .Release.Namespace }} + labels: + {{- include "kafka-lag-exporter.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + {{- toYaml .Values.service.ports | nindent 4 }} + selector: + {{- include "kafka-lag-exporter.selectorLabels" . | nindent 4 }} diff --git a/kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/serviceMonitor.yml b/kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/serviceMonitor.yml new file mode 100644 index 000000000..1152467e5 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/serviceMonitor.yml @@ -0,0 +1,25 @@ +{{- if .Values.serviceMonitor.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ include "kafka-lag-exporter.fullname" . }} + namespace: {{ default .Values.namespace .Release.Namespace }} + labels: + {{- include "kafka-lag-exporter.labels" . | nindent 4 }} + {{- toYaml .Values.serviceMonitor.labels | nindent 4 }} +spec: + endpoints: + - honorLabels: true + interval: 30s + path: /metrics + port: http + scheme: http + scrapeTimeout: 10s + jobLabel: kafka-lag-exporter + namespaceSelector: + matchNames: + - {{ default .Values.namespace .Release.Namespace }} + selector: + matchLabels: + {{- include "kafka-lag-exporter.labels" . | nindent 6 }} +{{- end }} diff --git a/kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/serviceaccount.yaml b/kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/serviceaccount.yaml new file mode 100644 index 000000000..96b4c5764 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/serviceaccount.yaml @@ -0,0 +1,8 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "kafka-lag-exporter.serviceAccountName" . }} + labels: +{{ include "kafka-lag-exporter.labels" . | nindent 4 }} +{{- end -}} diff --git a/kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/tests/test-connection.yaml b/kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/tests/test-connection.yaml new file mode 100644 index 000000000..5ed96336b --- /dev/null +++ b/kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/tests/test-connection.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Pod +metadata: + name: "{{ include "kafka-lag-exporter.fullname" . }}-test-connection" + labels: +{{ include "kafka-lag-exporter.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": test-success +spec: + containers: + - name: wget + image: busybox + command: ['wget'] + args: ['{{ include "kafka-lag-exporter.fullname" . }}:{{ .Values.service.port }}'] + restartPolicy: Never diff --git a/kubernetes/helm_charts/monitoring/kafka-lag-exporter/values.yaml b/kubernetes/helm_charts/monitoring/kafka-lag-exporter/values.yaml new file mode 100644 index 000000000..0edb46068 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/kafka-lag-exporter/values.yaml @@ -0,0 +1,88 @@ +# Default values for kafka-lag-exporter. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: + repository: danielqsj/kafka-exporter + pullPolicy: IfNotPresent + imageTag: latest + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" +namespace: monitoring + +# Override these values with your kafka and zookeeper ips +# kafka: kafka1.domain.name:9092, kafka2.domain.name:9092 +kafka: "" +# zookeeper: zookeeper1.domain.name:2181, zookeeper2.domain.name:2181 +zookeeper: "" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +ports: + - containerPort: 9308 + name: http + protocol: TCP + +service: + type: ClusterIP + ports: + - port: 9308 + name: http + targetPort: 9308 + +ingress: + enabled: false + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: chart-example.local + paths: [] + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +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:'. + requests: + cpu: 50m + memory: 128Mi + limits: + cpu: 100m + memory: 256Mi + +nodeSelector: {} + +tolerations: [] + +affinity: {} +# This section will create service monitor for prometheus operator +serviceMonitor: + enabled: true + labels: # labels with which the prometheus choose the serviceMonitor + app: monitoring + release: prometheus-operator diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/.helmignore b/kubernetes/helm_charts/monitoring/prometheus-operator/.helmignore new file mode 100755 index 000000000..aba2fa8ce --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/.helmignore @@ -0,0 +1,26 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +# helm/charts +OWNERS +hack/ +ci/ +prometheus-operator-*.tgz diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/CONTRIBUTING.md b/kubernetes/helm_charts/monitoring/prometheus-operator/CONTRIBUTING.md new file mode 100755 index 000000000..2fba4f200 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/CONTRIBUTING.md @@ -0,0 +1,11 @@ +# 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. When making changes to values.yaml, update the files in `ci/` by running `hack/update-ci.sh` +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 diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/Chart.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/Chart.yaml new file mode 100755 index 000000000..45000e769 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/Chart.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +appVersion: 0.32.0 +description: Provides easy monitoring definitions for Kubernetes services, and deployment + and management of Prometheus instances. +engine: gotpl +home: https://github.com/coreos/prometheus-operator +icon: https://raw.githubusercontent.com/prometheus/prometheus.github.io/master/assets/prometheus_logo-cb55bb5c346.png +keywords: +- operator +- prometheus +maintainers: +- email: gianrubio@gmail.com + name: gianrubio +- name: vsliouniaev +name: prometheus-operator +sources: +- https://github.com/coreos/prometheus-operator +- https://coreos.com/operators/prometheus +version: 6.20.3 diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/README.md b/kubernetes/helm_charts/monitoring/prometheus-operator/README.md new file mode 100755 index 000000000..65f53e181 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/README.md @@ -0,0 +1,643 @@ +# prometheus-operator + +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. + +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 + +With the installation, the chart also includes dashboards and alerts. + +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. + +## TL;DR; + +```console +$ helm install stable/prometheus-operator +``` + +## Introduction + +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. + +## Prerequisites + - Kubernetes 1.10+ with Beta APIs + - Helm 2.10+ (For a workaround using an earlier version see [below](#helm-210-workaround)) + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```console +$ helm install --name my-release stable/prometheus-operator +``` + +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. + +The default installation includes Prometheus Operator, Alertmanager, Grafana, and configuration for scraping Kubernetes infrastructure. + +## Uninstalling the Chart + +To uninstall/delete the `my-release` deployment: + +```console +$ helm delete my-release +``` + +The command removes all the Kubernetes components associated with the chart and deletes the release. + +CRDs created by this chart are not removed by default and should be manually cleaned up: + +```console +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 alertmanagers.monitoring.coreos.com +``` + +## 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`. + +### Helm fails to create CRDs +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: + +1. Create CRDs +```console +kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/master/example/prometheus-operator-crd/alertmanager.crd.yaml +kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/master/example/prometheus-operator-crd/prometheus.crd.yaml +kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/master/example/prometheus-operator-crd/prometheusrule.crd.yaml +kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/master/example/prometheus-operator-crd/servicemonitor.crd.yaml +kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/master/example/prometheus-operator-crd/podmonitor.crd.yaml +``` + +2. Wait for CRDs to be created, which should only take a few seconds + +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 +``` + +### Helm <2.10 workaround +The `crd-install` hook is required to deploy the prometheus operator CRDs before they are used. If you are forced to use an earlier version of Helm you can work around this requirement as follows: +1. Install prometheus-operator by itself, disabling everything but the prometheus-operator component, and also setting `prometheusOperator.serviceMonitor.selfMonitor=false` +2. Install all the other components, and configure `prometheus.additionalServiceMonitors` to scrape the prometheus-operator service. + +### Upgrading from 5.x.x to 6.x.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: + +``` +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 + +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.create` | Create default rules for monitoring the cluster | `true` | +| `defaultRules.labels` | Labels for default rules for monitoring the cluster | `{}` | +| `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.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` | +| `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` |`""`| + +### 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.0.0` | +| `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.cleanupCustomResourceBeforeInstall` | Remove CRDs before running the crd-install hook on changes. | `false` | +| `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.crdApiGroup` | Specify the API Group for the CustomResourceDefinitions | `monitoring.coreos.com` | +| `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 | `true` | +| `prometheusOperator.denyNamespaces` | Namespaces not to scope the interaction of the Prometheus Operator (deny list). | `{}` | +| `prometheusOperator.enabled` | Deploy Prometheus Operator. Only one of these should be deployed into the cluster | `true` | +| `prometheusOperator.hyperkubeImage.repository` | 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.32.0` | +| `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.32.0` | +| `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.4.1` | +| `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.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. 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.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.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.enableAdminAPI` | EnableAdminAPI enables Prometheus the administrative HTTP API which includes functionality such as deleting time series. | `false` | +| `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.12.0` | +| `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.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.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 | `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.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.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.19.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.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.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.type` | Alertmanager 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.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.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.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.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.cAdvisorMetricRelabelings` | The `metric_relabel_configs` for scraping cAdvisor. | `` | +| `kubelet.serviceMonitor.cAdvisorRelabelings` | The `relabel_configs` for scraping cAdvisor. | `` | +| `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. | `` | +| `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) + + +## 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. +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. + +### 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. + +## Further Information + +For more in-depth documentation of configuration options meanings, please see +- [Prometheus Operator](https://github.com/coreos/prometheus-operator) +- [Prometheus](https://prometheus.io/docs/introduction/overview/) +- [Grafana](https://github.com/helm/charts/tree/master/stable/grafana#grafana-helm-chart) + +# 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. + +There is no simple and direct migration path between the charts as the changes are extensive and intended to make the chart easier to support. + +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). + +## 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 + +### 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. + +### 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) + +### 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` + +### 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 +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: +``` +apiVersion: v1 +kind: PersistentVolume +metadata: + name: pvc-prometheus-migration-prometheus-0 +spec: + accessModes: + - ReadWriteOnce + azureDisk: + cachingMode: None + diskName: pvc-prometheus-migration-prometheus-0 + diskURI: /subscriptions/f5125d82-2622-4c50-8d25-3f7ba3e9ac4b/resourceGroups/sample-migration-resource-group/providers/Microsoft.Compute/disks/pvc-prometheus-migration-prometheus-0 + fsType: "" + kind: Managed + readOnly: false + capacity: + storage: 1Gi + persistentVolumeReclaimPolicy: Delete + storageClassName: prometheus + volumeMode: Filesystem +``` +``` +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + labels: + app: 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 + +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` in ConfigMap `kube-system/kube-proxy` if you want to collect them. For example: + +``` +kubectl -n kube-system edit cm kube-proxy +``` + +``` +apiVersion: v1 +data: + config.conf: |- + apiVersion: kubeproxy.config.k8s.io/v1alpha1 + kind: KubeProxyConfiguration + # ... + # metricsBindAddress: 127.0.0.1:10249 + metricsBindAddress: 0.0.0.0:10249 + # ... + kubeconfig.conf: |- + # ... +kind: ConfigMap +metadata: + labels: + app: kube-proxy + name: kube-proxy + namespace: kube-system +``` diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/.helmignore b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/.helmignore new file mode 100755 index 000000000..8cade1318 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.vscode +.project +.idea/ +*.tmproj +OWNERS diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/Chart.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/Chart.yaml new file mode 100755 index 000000000..6151eee30 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/Chart.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +appVersion: 6.4.2 +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 +version: 3.10.2 diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/README.md b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/README.md new file mode 100755 index 000000000..1f8f0c6a3 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/README.md @@ -0,0 +1,294 @@ +# Grafana Helm Chart + +* Installs the web dashboarding system [Grafana](http://grafana.org/) + +## TL;DR; + +```console +$ helm install stable/grafana +``` + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```console +$ helm install --name my-release stable/grafana +``` + +## Uninstalling the Chart + +To uninstall/delete the my-release deployment: + +```console +$ helm delete my-release +``` + +The command removes all the Kubernetes components associated with the chart and deletes the release. + + +## Configuration + +| Parameter | Description | Default | +|-------------------------------------------|-----------------------------------------------|---------------------------------------------------------| +| `replicas` | Number of nodes | `1` | +| `podDisruptionBudget.minAvailable` | Pod disruption minimum available | `nil` | +| `podDisruptionBudget.maxUnavailable` | Pod disruption maximum unavailable | `nil` | +| `deploymentStrategy` | Deployment strategy | `{ "type": "RollingUpdate" }` | +| `livenessProbe` | Liveness Probe settings | `{ "httpGet": { "path": "/api/health", "port": 3000 } "initialDelaySeconds": 60, "timeoutSeconds": 30, "failureThreshold": 10 }` | +| `readinessProbe` | Readiness Probe settings | `{ "httpGet": { "path": "/api/health", "port": 3000 } }`| +| `securityContext` | Deployment securityContext | `{"runAsUser": 472, "fsGroup": 472}` | +| `priorityClassName` | Name of Priority Class to assign pods | `nil` | +| `image.repository` | Image repository | `grafana/grafana` | +| `image.tag` | Image tag (`Must be >= 5.0.0`) | `6.3.5` | +| `image.pullPolicy` | Image pull policy | `IfNotPresent` | +| `image.pullSecrets` | Image pull secrets | `{}` | +| `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.targetPort` | Internal service is port | `3000` | +| `service.annotations` | Service annotations | `{}` | +| `service.labels` | Custom labels | `{}` | +| `ingress.enabled` | Enables Ingress | `false` | +| `ingress.annotations` | Ingress annotations | `{}` | +| `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.tls` | Ingress TLS configuration | `[]` | +| `resources` | CPU/Memory resource requests/limits | `{}` | +| `nodeSelector` | Node labels for pod assignment | `{}` | +| `tolerations` | Toleration labels for pod assignment | `[]` | +| `affinity` | Affinity settings for pod assignment | `{}` | +| `extraInitContainers` | Init containers to add to the grafana pod | `{}` | +| `extraContainers` | Sidecar containers to add to the grafana pod | `{}` | +| `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`) | `false` | +| `persistence.size` | Size of persistent volume claim | `10Gi` | +| `persistence.existingClaim` | Use an existing PVC to persist data | `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` | +| `initChownData.enabled` | If false, don't reset data ownership at startup | true | +| `initChownData.image.repository` | init-chown-data container image repository | `busybox` | +| `initChownData.image.tag` | init-chown-data container image tag | `latest` | +| `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 | `{}` | +| `envFromSecret` | Sensible environment variables passed to pods and stored as secret | `{}` | +| `extraSecretMounts` | Additional grafana server secret mounts | `[]` | +| `extraVolumeMounts` | Additional grafana server volume mounts | `[]` | +| `extraConfigmapMounts` | Additional grafana server configMap volume mounts | `[]` | +| `extraEmptyDirMounts` | Additional grafana server emptyDir volume mounts | `[]` | +| `plugins` | Plugins to be loaded along with Grafana | `[]` | +| `datasources` | Configure grafana datasources (passed through tpl) | `{}` | +| `notifiers` | Configure grafana notifiers | `{}` | +| `dashboardProviders` | Configure grafana dashboard providers | `{}` | +| `dashboards` | Dashboards to import | `{}` | +| `dashboardsConfigMaps` | ConfigMaps reference that contains dashboards | `{}` | +| `grafana.ini` | Grafana's primary configuration | `{}` | +| `ldap_enabled` | Enable LDAP authentication | `false` | +| `ldap.existingSecret` | The name of an existing secret containing the `ldap.toml` file, this must have the key `ldap-toml`. | `""` | +| `ldap.config ` | Grafana's LDAP configuration | `""` | +| `annotations` | Deployment annotations | `{}` | +| `labels` | Deployment labels | `{}` | +| `podAnnotations` | Pod annotations | `{}` | +| `podLabels` | Pod labels | `{}` | +| `podPortName` | Name of the grafana port on the pod | `grafana` | +| `sidecar.image` | Sidecar image | `kiwigrid/k8s-sidecar:0.1.20` | +| `sidecar.imagePullPolicy` | Sidecar image pull policy | `IfNotPresent` | +| `sidecar.resources` | Sidecar resources | `{}` | +| `sidecar.dashboards.enabled` | Enables the cluster wide search for dashboards and adds/updates/deletes them in grafana | `false` | +| `sidecar.dashboards.provider.name` | Unique name of the grafana provider | `sidecarProvider` | +| `sidecar.dashboards.provider.orgid` | Id of the organisation, to which the dashboards should be added | `1` | +| `sidecar.dashboards.provider.folder` | Logical folder in which grafana groups dashboards | `""` | +| `sidecar.dashboards.provider.disableDelete` | Activate to avoid the deletion of imported dashboards | `false` | +| `sidecar.dashboards.provider.type` | Provider type | `file` | +| `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.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.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.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` | +| `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.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.create` | Create service account | `true` | +| `serviceAccount.name` | Service account name to use, when empty will be set to created account if `serviceAccount.create` is set else to `default` | `` | +| `serviceAccount.nameTest` | Service account name to use for test, when empty will be set to created account if `serviceAccount.create` is set else to `default` | `` | +| `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.extraRoleRules` | Additional rules to add to the Role | [] | +| `rbac.extraClusterRoleRules` | Additional rules to add to the ClusterRole | [] | +| `command` | Define command to be executed by grafana container at startup | `nil` | +| `testFramework.enabled` | Whether to create test-related resources | `true` | +| `testFramework.image` | `test-framework` image repository. | `dduportal/bats` | +| `testFramework.tag` | `test-framework` image tag. | `0.4.0` | +| `testFramework.securityContext` | `test-framework` securityContext | `{}` | +| `downloadDashboards.env` | Environment variables to be passed to the `download-dashboards` container | `{}` | + + +### Example of extraVolumeMounts + +```yaml +- extraVolumeMounts: + - name: plugins + mountPath: /var/lib/grafana/plugins + subPath: configs/grafana/plugins + existingClaim: existing-grafana-claim + readOnly: false +``` + +## Import dashboards + +There are a few methods to import dashboards to Grafana. Below are some examples and explanations as to how to use each method: + +```yaml +dashboards: + default: + some-dashboard: + json: | + { + "annotations": + + ... + # Complete json file here + ... + + "title": "Some Dashboard", + "uid": "abcd1234", + "version": 1 + } + custom-dashboard: + # This is a path to a file inside the dashboards directory inside the chart directory + file: dashboards/custom-dashboard.json + prometheus-stats: + # Ref: https://grafana.com/dashboards/2 + gnetId: 2 + revision: 2 + datasource: Prometheus + local-dashboard: + url: https://raw.githubusercontent.com/user/repository/master/dashboards/dashboard.json +``` + +## BASE64 dashboards + +Dashboards could be storaged in 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 + +## Sidecar for dashboards + +If the parameter `sidecar.dashboards.enabled` is set, a sidecar container is deployed in the grafana +pod. This container watches all configmaps (or secrets) in the cluster and filters out the ones with +a label as defined in `sidecar.dashboards.label`. The files defined in those configmaps are written +to a folder and accessed by grafana. Changes to the configmaps are monitored and the imported +dashboards are deleted/updated. + +A recommendation is to use one configmap per dashboard, as a reduction of multiple dashboards inside +one configmap is currently not properly mirrored in grafana. + +Example dashboard config: +``` +apiVersion: v1 +kind: ConfigMap +metadata: + name: sample-grafana-dashboard + labels: + grafana_dashboard: "1" +data: + k8s-dashboard.json: |- + [...] +``` + +## Sidecar for datasources + +If the parameter `sidecar.datasources.enabled` is set, an init container is deployed in the grafana +pod. This container lists all secrets (or configmaps, though not recommended) in the cluster and +filters out the ones with a label as defined in `sidecar.datasources.label`. The files defined in +those secrets are written to a folder and accessed by grafana on startup. Using these yaml files, +the data sources in grafana can be imported. The secrets must be created before `helm install` so +that the datasources init container can list the secrets. + +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. + +Example datasource config adapted from [Grafana](http://docs.grafana.org/administration/provisioning/#example-datasource-config-file): +``` +apiVersion: v1 +kind: Secret +metadata: + name: sample-grafana-datasource + labels: + grafana_datasource: "1" +type: Opaque +stringData: + datasource.yaml: |- + # config file version + apiVersion: 1 + + # list of datasources that should be deleted from the database + deleteDatasources: + - name: Graphite + orgId: 1 + + # list of datasources to insert/update depending + # whats available in the database + datasources: + # name of the datasource. Required + - name: Graphite + # datasource type. Required + type: graphite + # access mode. proxy or direct (Server or Browser in the UI). Required + access: proxy + # org id. will default to orgId 1 if not specified + orgId: 1 + # url + url: http://localhost:8080 + # database password, if used + password: + # database user, if used + user: + # database name, if used + database: + # enable/disable basic auth + basicAuth: + # basic auth username + basicAuthUser: + # basic auth password + basicAuthPassword: + # enable/disable with credentials headers + withCredentials: + # mark as default datasource. Max one per org + isDefault: + # fields that will be converted to json and stored in json_data + jsonData: + graphiteVersion: "1.1" + tlsAuth: true + tlsAuthWithCACert: true + # json object of data that will be encrypted. + secureJsonData: + tlsCACert: "..." + tlsClientCert: "..." + tlsClientKey: "..." + version: 1 + # allow users to edit datasources from the UI. + editable: false + +``` 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 new file mode 100755 index 000000000..9e26dfeeb --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/dashboards/custom-dashboard.json @@ -0,0 +1 @@ +{} \ No newline at end of file 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 new file mode 100755 index 000000000..1193aa05e --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/NOTES.txt @@ -0,0 +1,37 @@ +1. Get your '{{ .Values.adminUser }}' user password by running: + + kubectl get secret --namespace {{ .Release.Namespace }} {{ template "grafana.fullname" . }} -o jsonpath="{.data.admin-password}" | base64 --decode ; echo + +2. The Grafana server can be accessed via port {{ .Values.service.port }} on the following DNS name from within your cluster: + + {{ template "grafana.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local +{{ if .Values.ingress.enabled }} + From outside the cluster, the server URL(s) are: +{{- range .Values.ingress.hosts }} + http://{{ . }} +{{- end }} +{{ else }} + Get the Grafana URL to visit by running these commands in the same shell: +{{ if contains "NodePort" .Values.service.type -}} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "grafana.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{ else if contains "LoadBalancer" .Values.service.type -}} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "grafana.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "grafana.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + http://$SERVICE_IP:{{ .Values.service.port -}} +{{ else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "grafana.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 3000 +{{- end }} +{{- end }} + +3. Login with the password from step 1 and the username: {{ .Values.adminUser }} + +{{- if not .Values.persistence.enabled }} +################################################################################# +###### WARNING: Persistence is disabled!!! You will lose your data when ##### +###### the Grafana pod is terminated. ##### +################################################################################# +{{- end }} diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/_helpers.tpl b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/_helpers.tpl new file mode 100755 index 000000000..f6880cdfa --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/_helpers.tpl @@ -0,0 +1,51 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "grafana.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "grafana.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "grafana.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create the name of the service account +*/}} +{{- define "grafana.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "grafana.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} + +{{- define "grafana.serviceAccountNameTest" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (print (include "grafana.fullname" .) "-test") .Values.serviceAccount.nameTest }} +{{- else -}} + {{ default "default" .Values.serviceAccount.nameTest }} +{{- end -}} +{{- end -}} 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 new file mode 100755 index 000000000..35e6e9acb --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/_pod.tpl @@ -0,0 +1,355 @@ +{{- define "grafana.pod" -}} +{{- if .Values.schedulerName }} +schedulerName: "{{ .Values.schedulerName }}" +{{- end }} +serviceAccountName: {{ template "grafana.serviceAccountName" . }} +{{- if .Values.schedulerName }} +schedulerName: "{{ .Values.schedulerName }}" +{{- end }} +{{- if .Values.securityContext }} +securityContext: +{{ toYaml .Values.securityContext | indent 2 }} +{{- end }} +{{- if .Values.priorityClassName }} +priorityClassName: {{ .Values.priorityClassName }} +{{- end }} +{{- if ( or .Values.persistence.enabled .Values.dashboards .Values.sidecar.datasources.enabled .Values.extraInitContainers) }} +initContainers: +{{- end }} +{{- if ( and .Values.persistence.enabled .Values.initChownData.enabled ) }} + - name: init-chown-data + image: "{{ .Values.initChownData.image.repository }}:{{ .Values.initChownData.image.tag }}" + imagePullPolicy: {{ .Values.initChownData.image.pullPolicy }} + securityContext: + runAsUser: 0 + command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.runAsUser }}", "/var/lib/grafana"] + resources: +{{ toYaml .Values.initChownData.resources | indent 6 }} + volumeMounts: + - name: storage + mountPath: "/var/lib/grafana" +{{- if .Values.persistence.subPath }} + subPath: {{ .Values.persistence.subPath }} +{{- end }} +{{- end }} +{{- if .Values.dashboards }} + - name: download-dashboards + image: "{{ .Values.downloadDashboardsImage.repository }}:{{ .Values.downloadDashboardsImage.tag }}" + imagePullPolicy: {{ .Values.downloadDashboardsImage.pullPolicy }} + command: ["/bin/sh"] + args: [ "-c", "mkdir -p /var/lib/grafana/dashboards/default && /bin/sh /etc/grafana/download_dashboards.sh" ] + env: +{{- range $key, $value := .Values.downloadDashboards.env }} + - name: "{{ $key }}" + value: "{{ $value }}" +{{- 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 }} + - name: {{ .name }} + mountPath: {{ .mountPath }} + readOnly: {{ .readOnly }} + {{- end }} +{{- end }} +{{- if .Values.sidecar.datasources.enabled }} + - name: {{ template "grafana.name" . }}-sc-datasources + image: "{{ .Values.sidecar.image }}" + imagePullPolicy: {{ .Values.sidecar.imagePullPolicy }} + env: + - name: METHOD + value: LIST + - name: LABEL + value: "{{ .Values.sidecar.datasources.label }}" + - name: FOLDER + value: "/etc/grafana/provisioning/datasources" + - name: RESOURCE + value: "both" + {{- if .Values.sidecar.datasources.searchNamespace }} + - name: NAMESPACE + value: "{{ .Values.sidecar.datasources.searchNamespace }}" + {{- end }} + {{- if .Values.sidecar.skipTlsVerify }} + - name: SKIP_TLS_VERIFY + value: "{{ .Values.sidecar.skipTlsVerify }}" + {{- end }} + resources: +{{ toYaml .Values.sidecar.resources | indent 6 }} + volumeMounts: + - name: sc-datasources-volume + mountPath: "/etc/grafana/provisioning/datasources" +{{- end}} +{{- if .Values.extraInitContainers }} +{{ toYaml .Values.extraInitContainers | indent 2 }} +{{- end }} +{{- if .Values.image.pullSecrets }} +imagePullSecrets: +{{- range .Values.image.pullSecrets }} + - name: {{ . }} +{{- end}} +{{- end }} +containers: +{{- if .Values.sidecar.dashboards.enabled }} + - name: {{ template "grafana.name" . }}-sc-dashboard + image: "{{ .Values.sidecar.image }}" + imagePullPolicy: {{ .Values.sidecar.imagePullPolicy }} + env: + - name: LABEL + value: "{{ .Values.sidecar.dashboards.label }}" + - name: FOLDER + value: "{{ .Values.sidecar.dashboards.folder }}{{- with .Values.sidecar.dashboards.defaultFolderName }}/{{ . }}{{- end }}" + - name: RESOURCE + value: "both" + {{- if .Values.sidecar.dashboards.searchNamespace }} + - name: NAMESPACE + value: "{{ .Values.sidecar.dashboards.searchNamespace }}" + {{- end }} + {{- if .Values.sidecar.skipTlsVerify }} + - name: SKIP_TLS_VERIFY + value: "{{ .Values.sidecar.skipTlsVerify }}" + {{- end }} + resources: +{{ toYaml .Values.sidecar.resources | indent 6 }} + volumeMounts: + - name: sc-dashboard-volume + mountPath: {{ .Values.sidecar.dashboards.folder | quote }} +{{- end}} + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + {{- if .Values.command }} + command: + {{- range .Values.command }} + - {{ . }} + {{- end }} + {{- end}} + volumeMounts: + - name: config + mountPath: "/etc/grafana/grafana.ini" + subPath: grafana.ini + {{- if .Values.ldap.enabled }} + - name: ldap + mountPath: "/etc/grafana/ldap.toml" + subPath: ldap.toml + {{- end }} + {{- range .Values.extraConfigmapMounts }} + - name: {{ .name }} + mountPath: {{ .mountPath }} + subPath: {{ .subPath | default "" }} + 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")) }} + - 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 }} + - name: dashboards-{{ . }} + mountPath: "/var/lib/grafana/dashboards/{{ . }}" +{{- end }} +{{- end }} +{{- if .Values.datasources }} + - name: config + mountPath: "/etc/grafana/provisioning/datasources/datasources.yaml" + subPath: datasources.yaml +{{- end }} +{{- if .Values.notifiers }} + - name: config + mountPath: "/etc/grafana/provisioning/notifiers/notifiers.yaml" + subPath: notifiers.yaml +{{- end }} +{{- if .Values.dashboardProviders }} + - name: config + mountPath: "/etc/grafana/provisioning/dashboards/dashboardproviders.yaml" + subPath: dashboardproviders.yaml +{{- end }} +{{- if .Values.sidecar.dashboards.enabled }} + - name: sc-dashboard-volume + mountPath: {{ .Values.sidecar.dashboards.folder | quote }} + - name: sc-dashboard-provider + mountPath: "/etc/grafana/provisioning/dashboards/sc-dashboardproviders.yaml" + subPath: provider.yaml +{{- end}} +{{- if .Values.sidecar.datasources.enabled }} + - name: sc-datasources-volume + mountPath: "/etc/grafana/provisioning/datasources" +{{- end}} + {{- range .Values.extraSecretMounts }} + - name: {{ .name }} + mountPath: {{ .mountPath }} + readOnly: {{ .readOnly }} + {{- end }} + {{- range .Values.extraVolumeMounts }} + - name: {{ .name }} + mountPath: {{ .mountPath }} + subPath: {{ .subPath | default "" }} + readOnly: {{ .readOnly }} + {{- end }} + {{- range .Values.extraEmptyDirMounts }} + - name: {{ .name }} + mountPath: {{ .mountPath }} + {{- end }} + ports: + - name: {{ .Values.service.portName }} + containerPort: {{ .Values.service.port }} + protocol: TCP + - name: {{ .Values.podPortName }} + containerPort: 3000 + protocol: TCP + env: + {{- if not .Values.env.GF_SECURITY_ADMIN_USER }} + - name: GF_SECURITY_ADMIN_USER + valueFrom: + secretKeyRef: + name: {{ .Values.admin.existingSecret | default (include "grafana.fullname" .) }} + key: {{ .Values.admin.userKey | default "admin-user" }} + {{- end }} + {{- if not .Values.env.GF_SECURITY_ADMIN_PASSWORD }} + - name: GF_SECURITY_ADMIN_PASSWORD + valueFrom: + secretKeyRef: + name: {{ .Values.admin.existingSecret | default (include "grafana.fullname" .) }} + key: {{ .Values.admin.passwordKey | default "admin-password" }} + {{- end }} + {{- if .Values.plugins }} + - name: GF_INSTALL_PLUGINS + valueFrom: + configMapKeyRef: + name: {{ template "grafana.fullname" . }} + key: plugins + {{- end }} + {{- if .Values.smtp.existingSecret }} + - name: GF_SMTP_USER + valueFrom: + secretKeyRef: + name: {{ .Values.smtp.existingSecret }} + key: {{ .Values.smtp.userKey | default "user" }} + - name: GF_SMTP_PASSWORD + valueFrom: + secretKeyRef: + name: {{ .Values.smtp.existingSecret }} + key: {{ .Values.smtp.passwordKey | default "password" }} + {{- end }} +{{- range $key, $value := .Values.env }} + - name: "{{ $key }}" + value: "{{ $value }}" +{{- end }} + {{- if .Values.envFromSecret }} + envFrom: + - secretRef: + name: {{ template "grafana.fullname" . }}-env + {{- end }} + livenessProbe: +{{ toYaml .Values.livenessProbe | indent 6 }} + readinessProbe: +{{ toYaml .Values.readinessProbe | indent 6 }} + resources: +{{ toYaml .Values.resources | indent 6 }} +{{- if .Values.extraContainers }} +{{ toYaml .Values.extraContainers | indent 2}} +{{- end }} +{{- with .Values.nodeSelector }} +nodeSelector: +{{ toYaml . | indent 2 }} +{{- end }} +{{- with .Values.affinity }} +affinity: +{{ toYaml . | indent 2 }} +{{- end }} +{{- with .Values.tolerations }} +tolerations: +{{ toYaml . | indent 2 }} +{{- end }} +volumes: + - name: config + configMap: + name: {{ template "grafana.fullname" . }} +{{- range .Values.extraConfigmapMounts }} + - name: {{ .name }} + configMap: + name: {{ .configMap }} +{{- end }} + {{- if .Values.dashboards }} + {{- range keys .Values.dashboards }} + - name: dashboards-{{ . }} + configMap: + name: {{ template "grafana.fullname" $ }}-dashboards-{{ . }} + {{- end }} + {{- end }} + {{- if .Values.dashboardsConfigMaps }} + {{ $root := . }} + {{- range $provider, $name := .Values.dashboardsConfigMaps }} + - name: dashboards-{{ $provider }} + configMap: + name: {{ tpl $name $root }} + {{- end }} + {{- end }} + {{- if .Values.ldap.enabled }} + - name: ldap + secret: + {{- if .Values.ldap.existingSecret }} + secretName: {{ .Values.ldap.existingSecret }} + {{- else }} + secretName: {{ template "grafana.fullname" . }} + {{- end }} + items: + - key: ldap-toml + path: ldap.toml + {{- end }} +{{- if and .Values.persistence.enabled (eq .Values.persistence.type "pvc") }} + - name: storage + persistentVolumeClaim: + claimName: {{ .Values.persistence.existingClaim | default (include "grafana.fullname" .) }} +{{- else if and .Values.persistence.enabled (eq .Values.persistence.type "statefulset") }} +# nothing +{{- else }} + - name: storage + emptyDir: {} +{{- end -}} +{{- if .Values.sidecar.dashboards.enabled }} + - name: sc-dashboard-volume + emptyDir: {} +{{- if .Values.sidecar.dashboards.enabled }} + - name: sc-dashboard-provider + configMap: + name: {{ template "grafana.fullname" . }}-config-dashboards +{{- end }} +{{- end }} +{{- if .Values.sidecar.datasources.enabled }} + - name: sc-datasources-volume + emptyDir: {} +{{- end -}} +{{- range .Values.extraSecretMounts }} + - name: {{ .name }} + secret: + secretName: {{ .secretName }} + defaultMode: {{ .defaultMode }} +{{- end }} +{{- range .Values.extraVolumeMounts }} + - name: {{ .name }} + persistentVolumeClaim: + claimName: {{ .existingClaim }} +{{- end }} +{{- range .Values.extraEmptyDirMounts }} + - name: {{ .name }} + emptyDir: {} +{{- 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 new file mode 100755 index 000000000..d14128001 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/clusterrole.yaml @@ -0,0 +1,28 @@ +{{- if and .Values.rbac.create (not .Values.rbac.namespaced) }} +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + labels: + app: {{ template "grafana.name" . }} + chart: {{ template "grafana.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +{{- 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) }} +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}} +{{- else }} +rules: [] +{{- end}} +{{- 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 new file mode 100755 index 000000000..0ffe9ff2f --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/clusterrolebinding.yaml @@ -0,0 +1,23 @@ +{{- if and .Values.rbac.create (not .Values.rbac.namespaced) }} +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ template "grafana.fullname" . }}-clusterrolebinding + labels: + app: {{ template "grafana.name" . }} + chart: {{ template "grafana.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +{{- with .Values.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +subjects: + - kind: ServiceAccount + name: {{ template "grafana.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} +roleRef: + kind: ClusterRole + name: {{ template "grafana.fullname" . }}-clusterrole + apiGroup: rbac.authorization.k8s.io +{{- end -}} 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 new file mode 100755 index 000000000..c65e4157a --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/configmap-dashboard-provider.yaml @@ -0,0 +1,27 @@ +{{- if .Values.sidecar.dashboards.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app: {{ template "grafana.name" . }} + chart: {{ template "grafana.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +{{- with .Values.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} + name: {{ template "grafana.fullname" . }}-config-dashboards + namespace: {{ .Release.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 }} + options: + 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 new file mode 100755 index 000000000..d24d0c8d7 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/configmap.yaml @@ -0,0 +1,72 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "grafana.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "grafana.name" . }} + chart: {{ template "grafana.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: +{{- if .Values.plugins }} + plugins: {{ join "," .Values.plugins }} +{{- end }} + grafana.ini: | +{{- range $key, $value := index .Values "grafana.ini" }} + [{{ $key }}] + {{- range $elem, $elemVal := $value }} + {{ $elem }} = {{ $elemVal }} + {{- end }} +{{- end }} + +{{- if .Values.datasources }} +{{ $root := . }} + {{- range $key, $value := .Values.datasources }} + {{ $key }}: | +{{ tpl (toYaml $value | indent 4) $root }} + {{- end -}} +{{- end -}} + +{{- if .Values.notifiers }} + {{- range $key, $value := .Values.notifiers }} + {{ $key }}: | +{{ toYaml $value | indent 4 }} + {{- end -}} +{{- end -}} + +{{- if .Values.dashboardProviders }} + {{- range $key, $value := .Values.dashboardProviders }} + {{ $key }}: | +{{ toYaml $value | indent 4 }} + {{- end -}} +{{- end -}} + +{{- if .Values.dashboards }} + download_dashboards.sh: | + #!/usr/bin/env sh + set -euf + {{- if .Values.dashboardProviders }} + {{- range $key, $value := .Values.dashboardProviders }} + {{- range $value.providers }} + mkdir -p {{ .options.path }} + {{- end }} + {{- end }} + {{- end }} + + {{- range $provider, $dashboards := .Values.dashboards }} + {{- range $key, $value := $dashboards }} + {{- if (or (hasKey $value "gnetId") (hasKey $value "url")) }} + curl -sk \ + --connect-timeout 60 \ + --max-time 60 \ + {{- if not $value.b64content }} + -H "Accept: application/json" \ + -H "Content-Type: application/json;charset=UTF-8" \ + {{- end }} + {{- if $value.url -}}{{ $value.url }}{{- else -}} https://grafana.com/api/dashboards/{{ $value.gnetId }}/revisions/{{- if $value.revision -}}{{ $value.revision }}{{- else -}}1{{- end -}}/download{{- end -}}{{ if $value.datasource }}| sed 's|\"datasource\":[^,]*|\"datasource\": \"{{ $value.datasource }}\"|g'{{ end }}{{- if $value.b64content -}} | base64 -d {{- end -}} \ + > /var/lib/grafana/dashboards/{{ $provider }}/{{ $key }}.json + {{- 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 new file mode 100755 index 000000000..0e26ffaa6 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/dashboards-json-configmap.yaml @@ -0,0 +1,32 @@ +{{- if .Values.dashboards }} +{{ $files := .Files }} +{{- range $provider, $dashboards := .Values.dashboards }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "grafana.fullname" $ }}-dashboards-{{ $provider }} + namespace: {{ $.Release.Namespace }} + labels: + app: {{ template "grafana.name" $ }} + chart: {{ template "grafana.chart" $ }} + release: {{ $.Release.Name }} + heritage: {{ $.Release.Service }} + dashboard-provider: {{ $provider }} +{{- if $dashboards }} +data: +{{- range $key, $value := $dashboards }} +{{- if (or (hasKey $value "json") (hasKey $value "file")) }} +{{ print $key | indent 2 }}.json: +{{- if hasKey $value "json" }} + |- +{{ $value.json | indent 6 }} +{{- end }} +{{- if hasKey $value "file" }} +{{ toYaml ( $files.Get $value.file ) | indent 4}} +{{- end }} +{{- end }} +{{- end }} +{{- end }} +{{- end }} +{{- end }} 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 new file mode 100755 index 000000000..ce94d846e --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/deployment.yaml @@ -0,0 +1,49 @@ +{{ if (or (not .Values.persistence.enabled) (eq .Values.persistence.type "pvc")) }} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "grafana.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "grafana.name" . }} + chart: {{ template "grafana.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +{{- if .Values.labels }} +{{ toYaml .Values.labels | indent 4 }} +{{- end }} +{{- with .Values.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +spec: + replicas: {{ .Values.replicas }} + selector: + matchLabels: + app: {{ template "grafana.name" . }} + release: {{ .Release.Name }} +{{- with .Values.deploymentStrategy }} + strategy: +{{ toYaml . | trim | indent 4 }} +{{- end }} + template: + metadata: + labels: + app: {{ template "grafana.name" . }} + release: {{ .Release.Name }} +{{- with .Values.podLabels }} +{{ toYaml . | indent 8 }} +{{- end }} + annotations: + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + checksum/dashboards-json-config: {{ include (print $.Template.BasePath "/dashboards-json-configmap.yaml") . | sha256sum }} + checksum/sc-dashboard-provider-config: {{ include (print $.Template.BasePath "/configmap-dashboard-provider.yaml") . | sha256sum }} +{{- if not .Values.admin.existingSecret }} + checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} +{{- end }} +{{- with .Values.podAnnotations }} +{{ toYaml . | indent 8 }} +{{- end }} + spec: + {{- include "grafana.pod" . | nindent 6 }} +{{- end }} \ No newline at end of file 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 new file mode 100755 index 000000000..c0c182a74 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/headless-service.yaml @@ -0,0 +1,22 @@ +{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) (eq .Values.persistence.type "statefulset")}} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "grafana.fullname" . }}-headless + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "grafana.name" . }} + chart: {{ template "grafana.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +{{- with .Values.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +spec: + clusterIP: None + selector: + app: {{ template "grafana.name" . }} + release: {{ .Release.Name }} + type: ClusterIP +{{- 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 new file mode 100755 index 000000000..6077c10d7 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/ingress.yaml @@ -0,0 +1,41 @@ +{{- if .Values.ingress.enabled -}} +{{- $fullName := include "grafana.fullname" . -}} +{{- $servicePort := .Values.service.port -}} +{{- $ingressPath := .Values.ingress.path -}} +{{- $extraPaths := .Values.ingress.extraPaths -}} +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: {{ $fullName }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "grafana.name" . }} + chart: {{ template "grafana.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +{{- if .Values.ingress.labels }} +{{ toYaml .Values.ingress.labels | indent 4 }} +{{- end }} +{{- with .Values.ingress.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +spec: +{{- if .Values.ingress.tls }} + tls: +{{ toYaml .Values.ingress.tls | indent 4 }} +{{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ . }} + http: + paths: +{{ if $extraPaths }} +{{ toYaml $extraPaths | indent 10 }} +{{- end }} + - path: {{ $ingressPath }} + backend: + serviceName: {{ $fullName }} + servicePort: {{ $servicePort }} + {{- 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 new file mode 100755 index 000000000..60f58bf76 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/poddisruptionbudget.yaml @@ -0,0 +1,25 @@ +{{- if .Values.podDisruptionBudget }} +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: {{ template "grafana.name" . }} + labels: + app: {{ template "grafana.name" . }} + chart: {{ template "grafana.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +{{- if .Values.labels }} +{{ toYaml .Values.labels | indent 4 }} +{{- end }} +spec: +{{- if .Values.podDisruptionBudget.minAvailble }} + minAvailable: {{ .Values.podDisruptionBudget.minAvailble }} +{{- end }} +{{- if .Values.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }} +{{- end }} + selector: + matchLabels: + app: {{ template "grafana.name" . }} + release: {{ .Release.Name }} +{{- end }} 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 new file mode 100755 index 000000000..a1d87c8b9 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/podsecuritypolicy.yaml @@ -0,0 +1,55 @@ +{{- if .Values.rbac.pspEnabled }} +apiVersion: policy/v1beta1 +kind: PodSecurityPolicy +metadata: + name: {{ template "grafana.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "grafana.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} + annotations: + seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'docker/default' + seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default' + {{- if .Values.rbac.pspUseAppArmor }} + apparmor.security.beta.kubernetes.io/allowedProfileNames: 'runtime/default' + apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default' + {{- end }} +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 + volumes: + - 'configMap' + - 'emptyDir' + - 'projected' + - 'secret' + - 'downwardAPI' + - 'persistentVolumeClaim' + hostNetwork: false + hostIPC: false + hostPID: false + runAsUser: + rule: 'RunAsAny' + seLinux: + rule: 'RunAsAny' + supplementalGroups: + rule: 'RunAsAny' + fsGroup: + rule: 'RunAsAny' + 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 new file mode 100755 index 000000000..780de6c89 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/pvc.yaml @@ -0,0 +1,29 @@ +{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) (eq .Values.persistence.type "pvc")}} +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ template "grafana.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "grafana.name" . }} + chart: {{ template "grafana.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + {{- with .Values.persistence.annotations }} + annotations: +{{ toYaml . | indent 4 }} + {{- end }} + {{- with .Values.persistence.finalizers }} + finalizers: +{{ toYaml . | indent 4 }} + {{- end }} +spec: + accessModes: + {{- range .Values.persistence.accessModes }} + - {{ . | quote }} + {{- end }} + resources: + requests: + storage: {{ .Values.persistence.size | quote }} + storageClassName: {{ .Values.persistence.storageClassName }} +{{- 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 new file mode 100755 index 000000000..2653f6cfc --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/role.yaml @@ -0,0 +1,35 @@ +{{- if .Values.rbac.create -}} +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: Role +metadata: + name: {{ template "grafana.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "grafana.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} +{{- 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))) }} +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}} +{{- else }} +rules: [] +{{- end }} +{{- 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 new file mode 100755 index 000000000..680be2858 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/rolebinding.yaml @@ -0,0 +1,30 @@ +{{- if .Values.rbac.create -}} +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: RoleBinding +metadata: + name: {{ template "grafana.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "grafana.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} +{{- with .Values.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ template "grafana.fullname" . }} +subjects: +- kind: ServiceAccount + name: {{ template "grafana.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} +{{- if .Values.rbac.namespaced }} +roleRef: + kind: Role + name: {{ template "grafana.fullname" . }} + apiGroup: rbac.authorization.k8s.io +{{- 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 new file mode 100755 index 000000000..76ae7719b --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/secret-env.yaml @@ -0,0 +1,17 @@ +{{- if .Values.envFromSecret }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ template "grafana.fullname" . }}-env + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "grafana.name" . }} + chart: {{ template "grafana.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +type: Opaque +data: +{{- range $key, $val := .Values.envFromSecret }} + {{ $key }}: {{ $val | 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 new file mode 100755 index 000000000..4f02fa3bd --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/secret.yaml @@ -0,0 +1,23 @@ +{{- if not .Values.admin.existingSecret }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ template "grafana.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "grafana.name" . }} + chart: {{ template "grafana.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +type: Opaque +data: + admin-user: {{ .Values.adminUser | b64enc | quote }} + {{- if .Values.adminPassword }} + admin-password: {{ .Values.adminPassword | b64enc | quote }} + {{- else }} + admin-password: {{ randAlphaNum 40 | b64enc | quote }} + {{- end }} + {{- if not .Values.ldap.existingSecret }} + ldap-toml: {{ .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 new file mode 100755 index 000000000..f18df46d7 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/service.yaml @@ -0,0 +1,50 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ template "grafana.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "grafana.name" . }} + chart: {{ template "grafana.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +{{- if .Values.service.labels }} +{{ toYaml .Values.service.labels | indent 4 }} +{{- end }} +{{- with .Values.service.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +spec: +{{- if (or (eq .Values.service.type "ClusterIP") (empty .Values.service.type)) }} + type: ClusterIP + {{- if .Values.service.clusterIP }} + clusterIP: {{ .Values.service.clusterIP }} + {{end}} +{{- else if eq .Values.service.type "LoadBalancer" }} + type: {{ .Values.service.type }} + {{- if .Values.service.loadBalancerIP }} + loadBalancerIP: {{ .Values.service.loadBalancerIP }} + {{- end }} + {{- if .Values.service.loadBalancerSourceRanges }} + loadBalancerSourceRanges: +{{ toYaml .Values.service.loadBalancerSourceRanges | indent 4 }} + {{- end -}} +{{- else }} + type: {{ .Values.service.type }} +{{- end }} +{{- if .Values.service.externalIPs }} + externalIPs: +{{ toYaml .Values.service.externalIPs | indent 4 }} +{{- end }} + ports: + - name: {{ .Values.service.portName }} + port: {{ .Values.service.port }} + protocol: TCP + targetPort: {{ .Values.service.targetPort }} +{{ if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }} + nodePort: {{.Values.service.nodePort}} +{{ end }} + selector: + app: {{ template "grafana.name" . }} + release: {{ .Release.Name }} 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 new file mode 100755 index 000000000..7c2a5986d --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccount.create }} +apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + app: {{ template "grafana.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} + name: {{ template "grafana.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} +{{- 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 new file mode 100755 index 000000000..ebe3c2c90 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/statefulset.yaml @@ -0,0 +1,49 @@ +{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) (eq .Values.persistence.type "statefulset")}} +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: {{ template "grafana.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "grafana.name" . }} + chart: {{ template "grafana.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +{{- with .Values.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +spec: + replicas: {{ .Values.replicas }} + selector: + matchLabels: + app: {{ template "grafana.name" . }} + release: {{ .Release.Name }} + serviceName: {{ template "grafana.fullname" . }}-headless + template: + metadata: + labels: + app: {{ template "grafana.name" . }} + release: {{ .Release.Name }} + 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 }} + checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} +{{- end }} +{{- with .Values.podAnnotations }} +{{ toYaml . | indent 8 }} +{{- end }} + spec: + {{- include "grafana.pod" . | nindent 6 }} + volumeClaimTemplates: + - metadata: + name: storage + spec: + accessModes: {{ .Values.persistence.accessModes }} + storageClassName: {{ .Values.persistence.storageClassName }} + resources: + requests: + storage: {{ .Values.persistence.size }} +{{- 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 new file mode 100755 index 000000000..bf5bde3ae --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test-configmap.yaml @@ -0,0 +1,20 @@ +{{- if .Values.testFramework.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "grafana.fullname" . }}-test + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "grafana.fullname" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + heritage: "{{ .Release.Service }}" + release: "{{ .Release.Name }}" +data: + run.sh: |- + @test "Test Health" { + url="http://{{ template "grafana.fullname" . }}/api/health" + + code=$(curl -s -o /dev/null -I -w "%{http_code}" $url) + [ "$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 new file mode 100755 index 000000000..662d4a237 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test-podsecuritypolicy.yaml @@ -0,0 +1,32 @@ +{{- if and .Values.testFramework.enabled .Values.rbac.pspEnabled }} +apiVersion: policy/v1beta1 +kind: PodSecurityPolicy +metadata: + name: {{ template "grafana.fullname" . }}-test + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "grafana.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} +spec: + allowPrivilegeEscalation: true + privileged: false + hostNetwork: false + hostIPC: false + hostPID: false + fsGroup: + rule: RunAsAny + seLinux: + rule: RunAsAny + supplementalGroups: + rule: RunAsAny + runAsUser: + rule: RunAsAny + volumes: + - configMap + - downwardAPI + - emptyDir + - projected + - 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 new file mode 100755 index 000000000..9d34fbdd6 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test-role.yaml @@ -0,0 +1,17 @@ +{{- if and .Values.testFramework.enabled .Values.rbac.pspEnabled -}} +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ template "grafana.fullname" . }}-test + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "grafana.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} +rules: +- apiGroups: ['policy'] + resources: ['podsecuritypolicies'] + verbs: ['use'] + resourceNames: [{{ template "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 new file mode 100755 index 000000000..0a11db2f0 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test-rolebinding.yaml @@ -0,0 +1,20 @@ +{{- if and .Values.testFramework.enabled .Values.rbac.pspEnabled -}} +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ template "grafana.fullname" . }}-test + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "grafana.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ template "grafana.fullname" . }}-test +subjects: +- kind: ServiceAccount + name: {{ template "grafana.serviceAccountNameTest" . }} + namespace: {{ .Release.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 new file mode 100755 index 000000000..e6a46f92f --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test-serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if and .Values.testFramework.enabled .Values.serviceAccount.create }} +apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + app: {{ template "grafana.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} + name: {{ template "grafana.serviceAccountNameTest" . }} + namespace: {{ .Release.Namespace }} +{{- 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 new file mode 100755 index 000000000..e0e4883bc --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test.yaml @@ -0,0 +1,67 @@ +{{- if .Values.testFramework.enabled }} +apiVersion: v1 +kind: Pod +metadata: + name: {{ template "grafana.fullname" . }}-test + labels: + app: {{ template "grafana.fullname" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + heritage: "{{ .Release.Service }}" + release: "{{ .Release.Name }}" + annotations: + "helm.sh/hook": test-success + namespace: {{ .Release.Namespace }} +spec: + serviceAccountName: {{ template "grafana.serviceAccountNameTest" . }} + {{- if .Values.testFramework.securityContext }} + securityContext: {{ toYaml .Values.testFramework.securityContext | nindent 4 }} + {{- end }} + initContainers: + - name: test-framework + image: "{{ .Values.testFramework.image}}:{{ .Values.testFramework.tag }}" + command: + - "bash" + - "-c" + - | + set -ex + # copy bats to tools dir + cp -R /usr/local/libexec/ /tools/bats/ + volumeMounts: + - mountPath: /tools + name: tools + {{- if .Values.image.pullSecrets }} + imagePullSecrets: + {{- range .Values.image.pullSecrets }} + - name: {{ . }} + {{- end}} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 4 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 4 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 4 }} + {{- end }} + containers: + - name: {{ .Release.Name }}-test + image: "{{ .Values.testFramework.image}}:{{ .Values.testFramework.tag }}" + command: ["/tools/bats/bats", "-t", "/tests/run.sh"] + volumeMounts: + - mountPath: /tests + name: tests + readOnly: true + - mountPath: /tools + name: tools + volumes: + - name: tests + configMap: + name: {{ template "grafana.fullname" . }}-test + - name: tools + emptyDir: {} + 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 new file mode 100755 index 000000000..d3970be6c --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/values.yaml @@ -0,0 +1,459 @@ +rbac: + create: true + pspEnabled: true + pspUseAppArmor: true + namespaced: false + extraRoleRules: [] + # - apiGroups: [] + # resources: [] + # verbs: [] + extraClusterRoleRules: [] + # - apiGroups: [] + # resources: [] + # verbs: [] +serviceAccount: + create: true + name: + nameTest: + +replicas: 1 + +## See `kubectl explain poddisruptionbudget.spec` for more +## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/ +podDisruptionBudget: {} +# minAvailble: 1 +# maxUnavailable: 1 + +## See `kubectl explain deployment.spec.strategy` for more +## ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy +deploymentStrategy: + type: RollingUpdate + +readinessProbe: + httpGet: + path: /api/health + port: 3000 + +livenessProbe: + httpGet: + path: /api/health + port: 3000 + initialDelaySeconds: 60 + timeoutSeconds: 30 + failureThreshold: 10 + +## Use an alternate scheduler, e.g. "stork". +## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ +## +# schedulerName: "default-scheduler" + +image: + repository: grafana/grafana + tag: 6.4.2 + 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/ + ## + # pullSecrets: + # - myRegistrKeySecretName + +testFramework: + enabled: true + image: "dduportal/bats" + tag: "0.4.0" + securityContext: {} + +securityContext: + runAsUser: 472 + fsGroup: 472 + + +extraConfigmapMounts: [] + # - name: certs-configmap + # mountPath: /etc/grafana/ssl/ + # subPath: certificates.crt # (optional) + # configMap: certs-configmap + # readOnly: true + + +extraEmptyDirMounts: [] + # - name: provisioning-notifiers + # mountPath: /etc/grafana/provisioning/notifiers + + +## Assign a PriorityClassName to pods if set +# priorityClassName: + +downloadDashboardsImage: + repository: appropriate/curl + tag: latest + pullPolicy: IfNotPresent + +downloadDashboards: + env: {} + +## Pod Annotations +# podAnnotations: {} + +## Pod Labels +# podLabels: {} + +podPortName: grafana + +## Deployment annotations +# annotations: {} + +## Expose the grafana service to be accessed from outside the cluster (LoadBalancer service). +## or access it from within the cluster (ClusterIP service). Set the service type and the port to serve it. +## ref: http://kubernetes.io/docs/user-guide/services/ +## +service: + type: ClusterIP + port: 80 + targetPort: 3000 + # targetPort: 4181 To be used with a proxy extraContainer + annotations: {} + labels: {} + portName: service + +ingress: + enabled: false + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + labels: {} + path: / + hosts: + - chart-example.local + ## Extra paths to prepend to every host configuration. This is useful when working with annotation based services. + extraPaths: [] + # - path: /* + # backend: + # serviceName: ssl-redirect + # servicePort: use-annotation + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +resources: {} +# limits: +# cpu: 100m +# memory: 128Mi +# requests: +# cpu: 100m +# memory: 128Mi + +## Node labels for pod assignment +## ref: https://kubernetes.io/docs/user-guide/node-selection/ +# +nodeSelector: {} + +## Tolerations for pod assignment +## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ +## +tolerations: [] + +## Affinity for pod assignment +## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity +## +affinity: {} + +extraInitContainers: [] + +## Enable an Specify container in extraContainers. This is meant to allow adding an authentication proxy to a grafana pod +extraContainers: | +# - name: proxy +# image: quay.io/gambol99/keycloak-proxy:latest +# args: +# - -provider=github +# - -client-id= +# - -client-secret= +# - -github-org= +# - -email-domain=* +# - -cookie-secret= +# - -http-address=http://0.0.0.0:4181 +# - -upstream-url=http://127.0.0.1:3000 +# ports: +# - name: proxy-web +# containerPort: 4181 + +## Enable persistence using Persistent Volume Claims +## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ +## +persistence: + type: pvc + enabled: false + # storageClassName: default + accessModes: + - ReadWriteOnce + size: 10Gi + # annotations: {} + finalizers: + - kubernetes.io/pvc-protection + # subPath: "" + # existingClaim: + +initChownData: + ## If false, data ownership will not be reset at startup + ## This allows the prometheus-server to be run with an arbitrary user + ## + enabled: true + + ## initChownData container image + ## + image: + repository: busybox + tag: "1.30" + pullPolicy: IfNotPresent + + ## initChownData resource requests and limits + ## Ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + + +# Administrator credentials when not using an existing secret (see below) +adminUser: admin +# adminPassword: strongpassword + +# Use an existing secret for the admin user. +admin: + existingSecret: "" + userKey: admin-user + passwordKey: admin-password + +## Define command to be executed at startup by grafana container +## Needed if using `vault-env` to manage secrets (ref: https://banzaicloud.com/blog/inject-secrets-into-pods-vault/) +## Default is "run.sh" as defined in grafana's Dockerfile +# command: +# - "sh" +# - "/run.sh" + +## Use an alternate scheduler, e.g. "stork". +## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ +## +# schedulerName: + +## Extra environment variables that will be pass onto deployment pods +env: {} + +## Sensible environment variables that will be stored as secret +## This can be useful for auth tokens, etc +envFromSecret: {} + +## Additional grafana server secret mounts +# Defines additional mounts with secrets. Secrets must be manually created in the namespace. +extraSecretMounts: [] + # - name: secret-files + # mountPath: /etc/secrets + # secretName: grafana-secret-files + # readOnly: true + +## Additional grafana server volume mounts +# Defines additional volume mounts. +extraVolumeMounts: [] + # - name: extra-volume + # mountPath: /mnt/volume + # readOnly: true + # existingClaim: volume-claim + +## Pass the plugins you want installed as a list. +## +plugins: [] + # - digrich-bubblechart-panel + # - grafana-clock-panel + +## Configure grafana datasources +## ref: http://docs.grafana.org/administration/provisioning/#datasources +## +datasources: {} +# datasources.yaml: +# apiVersion: 1 +# datasources: +# - name: Prometheus +# type: prometheus +# url: http://prometheus-prometheus-server +# access: proxy +# isDefault: true + +## Configure notifiers +## ref: http://docs.grafana.org/administration/provisioning/#alert-notification-channels +## +notifiers: {} +# notifiers.yaml: +# notifiers: +# - name: email-notifier +# type: email +# uid: email1 +# # either: +# org_id: 1 +# # or +# org_name: Main Org. +# is_default: true +# settings: +# addresses: an_email_address@example.com +# delete_notifiers: + +## Configure grafana dashboard providers +## ref: http://docs.grafana.org/administration/provisioning/#dashboards +## +## `path` must be /var/lib/grafana/dashboards/ +## +dashboardProviders: {} +# dashboardproviders.yaml: +# apiVersion: 1 +# providers: +# - name: 'default' +# orgId: 1 +# folder: '' +# type: file +# disableDeletion: false +# editable: true +# options: +# path: /var/lib/grafana/dashboards/default + +## Configure grafana dashboard to import +## NOTE: To use dashboards you must also enable/configure dashboardProviders +## ref: https://grafana.com/dashboards +## +## dashboards per provider, use provider name as key. +## +dashboards: {} + # default: + # some-dashboard: + # json: | + # $RAW_JSON + # custom-dashboard: + # file: dashboards/custom-dashboard.json + # prometheus-stats: + # gnetId: 2 + # revision: 2 + # datasource: Prometheus + # local-dashboard: + # url: https://example.com/repository/test.json + # local-dashboard-base64: + # url: https://example.com/repository/test-b64.json + # b64content: true + +## Reference to external ConfigMap per provider. Use provider name as key and ConfiMap name as value. +## A provider dashboards must be defined either by external ConfigMaps or in values.yaml, not in both. +## ConfigMap data example: +## +## data: +## example-dashboard.json: | +## RAW_JSON +## +dashboardsConfigMaps: {} +# default: "" + +## Grafana's primary configuration +## NOTE: values in map will be converted to ini format +## ref: http://docs.grafana.org/installation/configuration/ +## +grafana.ini: + paths: + data: /var/lib/grafana/data + logs: /var/log/grafana + plugins: /var/lib/grafana/plugins + provisioning: /etc/grafana/provisioning + analytics: + check_for_updates: true + log: + mode: console + grafana_net: + url: https://grafana.net +## LDAP Authentication can be enabled with the following values on grafana.ini +## NOTE: Grafana will fail to start if the value for ldap.toml is invalid + # auth.ldap: + # enabled: true + # allow_sign_up: true + # config_file: /etc/grafana/ldap.toml + +## Grafana's LDAP configuration +## Templated by the template in _helpers.tpl +## NOTE: To enable the grafana.ini must be configured with auth.ldap.enabled +## ref: http://docs.grafana.org/installation/configuration/#auth-ldap +## ref: http://docs.grafana.org/installation/ldap/#configuration +ldap: + enabled: false + # `existingSecret` is a reference to an existing secret containing the ldap configuration + # for Grafana in a key `ldap-toml`. + existingSecret: "" + # `config` is the content of `ldap.toml` that will be stored in the created secret + config: "" + # config: |- + # verbose_logging = true + + # [[servers]] + # host = "my-ldap-server" + # port = 636 + # use_ssl = true + # start_tls = false + # ssl_skip_verify = false + # bind_dn = "uid=%s,ou=users,dc=myorg,dc=com" + +## Grafana's SMTP configuration +## NOTE: To enable, grafana.ini must be configured with smtp.enabled +## ref: http://docs.grafana.org/installation/configuration/#smtp +smtp: + # `existingSecret` is a reference to an existing secret containing the smtp configuration + # for Grafana. + existingSecret: "" + userKey: "user" + passwordKey: "password" + +## Sidecars that collect the configmaps with specified label and stores the included files them into the respective folders +## Requires at least Grafana 5 to work and can't be used together with parameters dashboardProviders, datasources and dashboards +sidecar: + image: kiwigrid/k8s-sidecar:0.1.20 + imagePullPolicy: IfNotPresent + resources: {} +# limits: +# cpu: 100m +# memory: 100Mi +# requests: +# cpu: 50m +# memory: 50Mi + # skipTlsVerify Set to true to skip tls verification for kube api calls + # skipTlsVerify: true + dashboards: + enabled: false + # label that the configmaps with dashboards are marked with + label: grafana_dashboard + # 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. + # 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 + # provider configuration that lets grafana manage the dashboards + provider: + # name of the provider, should be unique + name: sidecarProvider + # orgid as configured in grafana + orgid: 1 + # folder in which the dashboards should be imported in grafana + folder: '' + # type of the provider + type: file + # disableDelete to activate a import-only behaviour + disableDelete: false + datasources: + enabled: false + # label that the configmaps with datasources are marked with + label: grafana_datasource + # 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 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 new file mode 100755 index 000000000..f0c131944 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj 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 new file mode 100755 index 000000000..6094b1eef --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/Chart.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +appVersion: 1.8.0 +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 +name: kube-state-metrics +sources: +- https://github.com/kubernetes/kube-state-metrics/ +version: 2.4.1 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 new file mode 100755 index 000000000..6ffd97d74 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/OWNERS @@ -0,0 +1,8 @@ +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 new file mode 100755 index 000000000..6c7f36422 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/README.md @@ -0,0 +1,68 @@ +# kube-state-metrics Helm Chart + +* Installs the [kube-state-metrics agent](https://github.com/kubernetes/kube-state-metrics). + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```bash +$ helm install stable/kube-state-metrics +``` + +## 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.8.0` | +| `image.pullPolicy` | Image pull policy | `IfNotPresent` | +| `replicas` | Number of replicas | `1` | +| `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 | `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 | {} | +| `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.namespaces` | Enable the namespaces 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.verticalpodautoscalers` | Enable the verticalpodautoscalers collector. | `false` | +| `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` | 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 new file mode 100755 index 000000000..d804011e7 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/NOTES.txt @@ -0,0 +1,10 @@ +kube-state-metrics is a simple service that listens to the Kubernetes API server and generates metrics about the state of the objects. +The exposed metrics can be found here: +https://github.com/kubernetes/kube-state-metrics/blob/master/docs/README.md#exposed-metrics + +The metrics are exported on the HTTP endpoint /metrics on the listening port. +In your case, {{ template "kube-state-metrics.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }}/metrics + +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. + 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 new file mode 100755 index 000000000..e59ada57c --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/_helpers.tpl @@ -0,0 +1,36 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "kube-state-metrics.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "kube-state-metrics.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "kube-state-metrics.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "kube-state-metrics.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- 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/clusterrole.yaml new file mode 100755 index 000000000..4f68a1f05 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/clusterrole.yaml @@ -0,0 +1,156 @@ +{{- if .Values.rbac.create -}} +apiVersion: rbac.authorization.k8s.io/v1beta1 +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 }} + name: {{ template "kube-state-metrics.fullname" . }} +rules: +{{ if .Values.collectors.certificatesigningrequests }} +- apiGroups: ["certificates.k8s.io"] + resources: + - certificatesigningrequests + verbs: ["list", "watch"] +{{ end -}} +{{ if .Values.collectors.configmaps }} +- apiGroups: [""] + resources: + - configmaps + verbs: ["list", "watch"] +{{ end -}} +{{ if .Values.collectors.cronjobs }} +- apiGroups: ["batch"] + resources: + - cronjobs + verbs: ["list", "watch"] +{{ end -}} +{{ if .Values.collectors.daemonsets }} +- apiGroups: ["extensions", "apps"] + resources: + - daemonsets + verbs: ["list", "watch"] +{{ end -}} +{{ if .Values.collectors.deployments }} +- apiGroups: ["extensions", "apps"] + resources: + - deployments + verbs: ["list", "watch"] +{{ end -}} +{{ if .Values.collectors.endpoints }} +- apiGroups: [""] + resources: + - endpoints + verbs: ["list", "watch"] +{{ end -}} +{{ if .Values.collectors.horizontalpodautoscalers }} +- apiGroups: ["autoscaling"] + resources: + - horizontalpodautoscalers + verbs: ["list", "watch"] +{{ end -}} +{{ if .Values.collectors.ingresses }} +- apiGroups: ["extensions", "networking.k8s.io"] + resources: + - ingresses + verbs: ["list", "watch"] +{{ end -}} +{{ if .Values.collectors.jobs }} +- apiGroups: ["batch"] + resources: + - jobs + verbs: ["list", "watch"] +{{ end -}} +{{ if .Values.collectors.limitranges }} +- apiGroups: [""] + resources: + - limitranges + verbs: ["list", "watch"] +{{ end -}} +{{ if .Values.collectors.namespaces }} +- apiGroups: [""] + resources: + - namespaces + verbs: ["list", "watch"] +{{ end -}} +{{ if .Values.collectors.nodes }} +- apiGroups: [""] + resources: + - nodes + verbs: ["list", "watch"] +{{ end -}} +{{ if .Values.collectors.persistentvolumeclaims }} +- apiGroups: [""] + resources: + - persistentvolumeclaims + verbs: ["list", "watch"] +{{ end -}} +{{ if .Values.collectors.persistentvolumes }} +- apiGroups: [""] + resources: + - persistentvolumes + verbs: ["list", "watch"] +{{ end -}} +{{ if .Values.collectors.poddisruptionbudgets }} +- apiGroups: ["policy"] + resources: + - poddisruptionbudgets + verbs: ["list", "watch"] +{{ end -}} +{{ if .Values.collectors.pods }} +- apiGroups: [""] + resources: + - pods + verbs: ["list", "watch"] +{{ end -}} +{{ if .Values.collectors.replicasets }} +- apiGroups: ["extensions", "apps"] + resources: + - replicasets + verbs: ["list", "watch"] +{{ end -}} +{{ if .Values.collectors.replicationcontrollers }} +- apiGroups: [""] + resources: + - replicationcontrollers + verbs: ["list", "watch"] +{{ end -}} +{{ if .Values.collectors.resourcequotas }} +- apiGroups: [""] + resources: + - resourcequotas + verbs: ["list", "watch"] +{{ end -}} +{{ if .Values.collectors.secrets }} +- apiGroups: [""] + resources: + - secrets + verbs: ["list", "watch"] +{{ end -}} +{{ if .Values.collectors.services }} +- apiGroups: [""] + resources: + - services + verbs: ["list", "watch"] +{{ end -}} +{{ if .Values.collectors.statefulsets }} +- apiGroups: ["apps"] + resources: + - statefulsets + verbs: ["list", "watch"] +{{ end -}} +{{ if .Values.collectors.storageclasses }} +- apiGroups: ["storage.k8s.io"] + resources: + - storageclasses + verbs: ["list", "watch"] +{{ end -}} +{{ if .Values.collectors.verticalpodautoscalers }} +- apiGroups: ["autoscaling.k8s.io"] + resources: + - verticalpodautoscalers + verbs: ["list", "watch"] +{{ 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 new file mode 100755 index 000000000..b4586fb7e --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/clusterrolebinding.yaml @@ -0,0 +1,19 @@ +{{- if .Values.rbac.create -}} +apiVersion: rbac.authorization.k8s.io/v1beta1 +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 }} + name: {{ template "kube-state-metrics.fullname" . }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ template "kube-state-metrics.fullname" . }} +subjects: +- kind: ServiceAccount + name: {{ template "kube-state-metrics.fullname" . }} + namespace: {{ .Release.Namespace }} +{{- 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 new file mode 100755 index 000000000..492df2441 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/deployment.yaml @@ -0,0 +1,150 @@ +apiVersion: apps/v1 +kind: Deployment +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/instance: "{{ .Release.Name }}" + app.kubernetes.io/managed-by: "{{ .Release.Service }}" +{{- if .Values.customLabels }} +{{ toYaml .Values.customLabels | indent 4 }} +{{- end }} +spec: + selector: + matchLabels: + app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }} + replicas: {{ .Values.replicas }} + 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 }} + annotations: +{{ toYaml .Values.podAnnotations | indent 8 }} +{{- end }} + spec: + hostNetwork: {{ .Values.hostNetwork }} + serviceAccountName: {{ template "kube-state-metrics.serviceAccountName" . }} + {{- if .Values.securityContext.enabled }} + securityContext: + fsGroup: {{ .Values.securityContext.fsGroup }} + runAsUser: {{ .Values.securityContext.runAsUser }} + {{- end }} + {{- if .Values.priorityClassName }} + priorityClassName: {{ .Values.priorityClassName }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + 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.namespaces }} + - --collectors=namespaces +{{ 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.verticalpodautoscalers }} + - --collectors=verticalpodautoscalers +{{ end }} +{{ if .Values.namespace }} + - --namespace={{ .Values.namespace }} +{{ end }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + ports: + - containerPort: 8080 + livenessProbe: + httpGet: + path: /healthz + port: 8080 + initialDelaySeconds: 5 + timeoutSeconds: 5 + readinessProbe: + httpGet: + path: / + port: 8080 + initialDelaySeconds: 5 + timeoutSeconds: 5 +{{- if .Values.resources }} + resources: +{{ toYaml .Values.resources | indent 10 }} +{{- end }} +{{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 8 }} +{{- end }} +{{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 8 }} +{{- end }} +{{- if .Values.tolerations }} + tolerations: +{{ toYaml .Values.tolerations | indent 8 }} +{{- 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 new file mode 100755 index 000000000..aeff11791 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/podsecuritypolicy.yaml @@ -0,0 +1,39 @@ +{{- if .Values.podSecurityPolicy.enabled }} +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 }} +{{- if .Values.podSecurityPolicy.annotations }} + annotations: +{{ toYaml .Values.podSecurityPolicy.annotations | indent 4 }} +{{- end }} +spec: + privileged: false + volumes: + - 'secret' + hostNetwork: false + hostIPC: false + hostPID: false + runAsUser: + rule: 'MustRunAsNonRoot' + seLinux: + rule: 'RunAsAny' + supplementalGroups: + rule: 'MustRunAs' + ranges: + # Forbid adding the root group. + - min: 1 + max: 65535 + fsGroup: + rule: 'MustRunAs' + ranges: + # Forbid adding the root group. + - min: 1 + max: 65535 + readOnlyRootFilesystem: false +{{- end }} 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 new file mode 100755 index 000000000..dcd65e13e --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/psp-clusterrole.yaml @@ -0,0 +1,17 @@ +{{- if and .Values.podSecurityPolicy.enabled -}} +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 }} + name: psp-{{ template "kube-state-metrics.fullname" . }} +rules: +- apiGroups: ['extensions'] + resources: ['podsecuritypolicies'] + verbs: ['use'] + resourceNames: + - {{ template "kube-state-metrics.fullname" . }} +{{- end }} 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 new file mode 100755 index 000000000..741861826 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/psp-clusterrolebinding.yaml @@ -0,0 +1,19 @@ +{{- if and .Values.podSecurityPolicy.enabled -}} +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 }} + name: psp-{{ template "kube-state-metrics.fullname" . }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: psp-{{ template "kube-state-metrics.fullname" . }} +subjects: + - kind: ServiceAccount + name: {{ template "kube-state-metrics.fullname" . }} + namespace: {{ .Release.Namespace }} +{{- 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 new file mode 100755 index 000000000..a880bf912 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/service.yaml @@ -0,0 +1,35 @@ +apiVersion: v1 +kind: Service +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/instance: "{{ .Release.Name }}" + app.kubernetes.io/managed-by: "{{ .Release.Service }}" +{{- if .Values.customLabels }} +{{ toYaml .Values.customLabels | indent 4 }} +{{- end }} + annotations: + {{- if .Values.prometheusScrape }} + prometheus.io/scrape: '{{ .Values.prometheusScrape }}' + {{- end }} + {{- if .Values.service.annotations }} + {{- toYaml .Values.service.annotations | nindent 4 }} + {{- end }} +spec: + type: "{{ .Values.service.type }}" + ports: + - name: "http" + protocol: TCP + port: {{ .Values.service.port }} + {{- if .Values.service.nodePort }} + nodePort: {{ .Values.service.nodePort }} + {{- end }} + targetPort: 8080 +{{- if .Values.service.loadBalancerIP }} + loadBalancerIP: "{{ .Values.service.loadBalancerIP }}" +{{- end }} + selector: + app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} 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 new file mode 100755 index 000000000..e2bf7c012 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +{{- if .Values.serviceAccount.create -}} +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" . }} +imagePullSecrets: +{{ toYaml .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 new file mode 100755 index 000000000..6405bd47b --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/servicemonitor.yaml @@ -0,0 +1,24 @@ +{{- if .Values.prometheus.monitor.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +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/instance: "{{ .Release.Name }}" + app.kubernetes.io/managed-by: "{{ .Release.Service }}" + {{- if .Values.prometheus.monitor.additionalLabels }} +{{ toYaml .Values.prometheus.monitor.additionalLabels | indent 4 }} + {{- end }} +spec: + selector: + matchLabels: + app.kubernetes.io/name: {{ template "kube-state-metrics.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + endpoints: + - port: http + {{- if .Values.prometheus.monitor.honorLabels }} + honorLabels: true + {{- 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 new file mode 100755 index 000000000..2bf5b3085 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/values.yaml @@ -0,0 +1,111 @@ +# Default values for kube-state-metrics. +prometheusScrape: true +image: + repository: quay.io/coreos/kube-state-metrics + tag: v1.8.0 + pullPolicy: IfNotPresent + +replicas: 1 + +service: + port: 8080 + # Default to clusterIP for backward compatibility + type: ClusterIP + nodePort: 0 + loadBalancerIP: "" + annotations: {} + +customLabels: {} + +hostNetwork: false + +rbac: + # If true, create & use RBAC resources + create: true + +serviceAccount: + # Specifies whether a ServiceAccount should be created, require rbac true + create: true + # The name of the ServiceAccount to use. + # If not set and create is true, a name is generated using the fullname template + name: + # 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: [] + +prometheus: + monitor: + enabled: false + additionalLabels: {} + namespace: "" + honorLabels: false + +## Specify if a Pod Security Policy for kube-state-metrics must be created +## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/ +## +podSecurityPolicy: + enabled: false + annotations: {} + ## Specify pod annotations + ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#apparmor + ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#seccomp + ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#sysctl + ## + # seccomp.security.alpha.kubernetes.io/allowedProfileNames: '*' + # seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default' + # apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default' + + +securityContext: + enabled: true + runAsUser: 65534 + fsGroup: 65534 + +## Node labels for pod assignment +## Ref: https://kubernetes.io/docs/user-guide/node-selection/ +nodeSelector: {} + +## Affinity settings for pod assignment +## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ +affinity: {} + +## Tolerations for pod assignment +## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ +tolerations: [] + +# Annotations to be added to the pod +podAnnotations: {} + +## Assign a PriorityClassName to pods if set +# priorityClassName: "" + +# Available collectors for kube-state-metrics. By default all available +# collectors are enabled. +collectors: + certificatesigningrequests: true + configmaps: true + cronjobs: true + daemonsets: true + deployments: true + endpoints: true + horizontalpodautoscalers: true + ingresses: true + jobs: true + limitranges: true + namespaces: 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 + verticalpodautoscalers: false + +# Namespace to be enabled for collecting resources. By default all namespaces are collected. +# namespace: "" 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 new file mode 100755 index 000000000..f0c131944 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj 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 new file mode 100755 index 000000000..99bce84a8 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/Chart.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +appVersion: 0.18.0 +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: prometheus-node-exporter +sources: +- https://github.com/prometheus/node_exporter/ +version: 1.7.0 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 new file mode 100755 index 000000000..fe9b2c3d3 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/OWNERS @@ -0,0 +1,4 @@ +approvers: +- gianrubio +reviewers: +- gianrubio \ 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 new file mode 100755 index 000000000..fb532ef90 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/README.md @@ -0,0 +1,83 @@ +# Prometheus Node Exporter + +* Installs prometheus [node exporter](https://github.com/prometheus/node_exporter) + +## TL;DR; + +```console +$ helm install stable/prometheus-node-exporter +``` + +## Introduction + +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. + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```console +$ helm install --name my-release stable/prometheus-node-exporter +``` + +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. + +## Uninstalling the Chart + +To uninstall/delete the `my-release` deployment: + +```console +$ helm delete my-release +``` + +The command removes all the Kubernetes components associated with the chart and deletes the release. + +## 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.0` | | +| `image.pullPolicy` | Image pull policy | `IfNotPresent` | | +| `extraArgs` | Additional container arguments | `[]` | | +| `extraHostVolumeMounts` | Additional host volume mounts | {} | | +| `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.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. | `{}` | | + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, + +```console +$ helm install --name my-release \ + --set serviceAccount.name=node-exporter \ + stable/prometheus-node-exporter +``` + +Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example, + +```console +$ helm install --name my-release -f values.yaml stable/prometheus-node-exporter +``` 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 new file mode 100755 index 000000000..4902798ff --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/NOTES.txt @@ -0,0 +1,15 @@ +1. Get the application URL by running these commands: +{{- if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "prometheus-node-exporter.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get svc -w {{ template "prometheus-node-exporter.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.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 {{ .Release.Namespace }} -l "app={{ template "prometheus-node-exporter.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl port-forward $POD_NAME 8080:80 +{{- end }} 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 new file mode 100755 index 000000000..4f0e2dfe9 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/_helpers.tpl @@ -0,0 +1,55 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "prometheus-node-exporter.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "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 }} +{{- end }} +{{- end }} + +{{/* +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 -}} + + +{{/* +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 -}} 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 new file mode 100755 index 000000000..0cbc2cc89 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/daemonset.yaml @@ -0,0 +1,111 @@ +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: {{ template "prometheus-node-exporter.fullname" . }} + labels: {{ include "prometheus-node-exporter.labels" . | indent 4 }} +spec: + selector: + matchLabels: + app: {{ template "prometheus-node-exporter.name" . }} + release: {{ .Release.Name }} + updateStrategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 1 + template: + metadata: + labels: {{ include "prometheus-node-exporter.labels" . | indent 8 }} + spec: +{{- if and .Values.rbac.create .Values.serviceAccount.create }} + serviceAccountName: {{ template "prometheus-node-exporter.serviceAccountName" . }} +{{- end }} +{{- if .Values.securityContext }} + securityContext: +{{ toYaml .Values.securityContext | indent 8 }} +{{- end }} +{{- if .Values.priorityClassName }} + priorityClassName: {{ .Values.priorityClassName }} +{{- end }} + containers: + - name: node-exporter + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + args: + - --path.procfs=/host/proc + - --path.sysfs=/host/sys + - --web.listen-address=0.0.0.0:{{ .Values.service.port }} +{{- if .Values.extraArgs }} +{{ toYaml .Values.extraArgs | indent 12 }} +{{- end }} + ports: + - name: metrics + containerPort: {{ .Values.service.targetPort }} + protocol: TCP + livenessProbe: + httpGet: + path: / + port: {{ .Values.service.port }} + readinessProbe: + httpGet: + path: / + port: {{ .Values.service.port }} + resources: +{{ toYaml .Values.resources | indent 12 }} + volumeMounts: + - name: proc + mountPath: /host/proc + readOnly: true + - name: sys + mountPath: /host/sys + readOnly: true + {{- if .Values.extraHostVolumeMounts }} + {{- range $_, $mount := .Values.extraHostVolumeMounts }} + - name: {{ $mount.name }} + mountPath: {{ $mount.mountPath }} + readOnly: {{ $mount.readOnly }} + {{- if $mount.mountPropagation }} + mountPropagation: {{ $mount.mountPropagation }} + {{- end }} + {{- end }} + {{- end }} + {{- if .Values.configmaps }} + {{- range $_, $mount := .Values.configmaps }} + - name: {{ $mount.name }} + mountPath: {{ $mount.mountPath }} + {{- end }} + {{- end }} + hostNetwork: {{ .Values.hostNetwork }} + hostPID: true +{{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 8 }} +{{- end }} +{{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 8 }} +{{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} + volumes: + - name: proc + hostPath: + path: /proc + - name: sys + hostPath: + path: /sys + {{- if .Values.extraHostVolumeMounts }} + {{- range $_, $mount := .Values.extraHostVolumeMounts }} + - name: {{ $mount.name }} + hostPath: + path: {{ $mount.hostPath }} + {{- end }} + {{- end }} + {{- if .Values.configmaps }} + {{- range $_, $mount := .Values.configmaps }} + - name: {{ $mount.name }} + configMap: + name: {{ $mount.name }} + {{- end }} + {{- 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 new file mode 100755 index 000000000..4c5c75fa9 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/endpoints.yaml @@ -0,0 +1,17 @@ +{{- if .Values.endpoints }} +apiVersion: v1 +kind: Endpoints +metadata: + name: {{ template "prometheus-node-exporter.fullname" . }} + labels: +{{ include "prometheus-node-exporter.labels" . | indent 4 }} +subsets: + - addresses: + {{- range .Values.endpoints }} + - ip: {{ . }} + {{- end }} + ports: + - name: metrics + port: 9100 + protocol: TCP +{{- end }} \ No newline at end of file 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 new file mode 100755 index 000000000..04f0e13e0 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/monitor.yaml @@ -0,0 +1,20 @@ +{{- if .Values.prometheus.monitor.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ template "prometheus-node-exporter.fullname" . }} + 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/psp-clusterrole.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/psp-clusterrole.yaml new file mode 100755 index 000000000..b22027c26 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/psp-clusterrole.yaml @@ -0,0 +1,15 @@ +{{- if .Values.rbac.create }} +{{- if .Values.rbac.pspEnabled }} +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + labels: {{ include "prometheus-node-exporter.labels" . | indent 4 }} + name: psp-{{ template "prometheus-node-exporter.fullname" . }} +rules: +- apiGroups: ['extensions'] + resources: ['podsecuritypolicies'] + verbs: ['use'] + resourceNames: + - {{ template "prometheus-node-exporter.fullname" . }} +{{- end }} +{{- 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 new file mode 100755 index 000000000..94d2ac2b6 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/psp-clusterrolebinding.yaml @@ -0,0 +1,17 @@ +{{- if .Values.rbac.create }} +{{- if .Values.rbac.pspEnabled }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + labels: {{ include "prometheus-node-exporter.labels" . | indent 4 }} + name: psp-{{ template "prometheus-node-exporter.fullname" . }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: psp-{{ template "prometheus-node-exporter.fullname" . }} +subjects: + - kind: ServiceAccount + name: {{ template "prometheus-node-exporter.fullname" . }} + namespace: {{ .Release.Namespace }} +{{- end }} +{{- 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 new file mode 100755 index 000000000..05e6ee2e4 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/psp.yaml @@ -0,0 +1,51 @@ +{{- if .Values.rbac.create }} +{{- if .Values.rbac.pspEnabled }} +apiVersion: policy/v1beta1 +kind: PodSecurityPolicy +metadata: + labels: {{ include "prometheus-node-exporter.labels" . | indent 4 }} + name: {{ template "prometheus-node-exporter.fullname" . }} +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' + - 'emptyDir' + - 'projected' + - 'secret' + - 'downwardAPI' + - 'persistentVolumeClaim' + - 'hostPath' + hostNetwork: true + hostIPC: false + hostPID: true + hostPorts: + - min: 0 + max: 65535 + runAsUser: + # Permits the container to run with root privileges as well. + rule: 'RunAsAny' + seLinux: + # This policy assumes the nodes are using AppArmor rather than SELinux. + rule: 'RunAsAny' + supplementalGroups: + rule: 'MustRunAs' + ranges: + # Forbid adding the root group. + - min: 0 + max: 65535 + fsGroup: + rule: 'MustRunAs' + ranges: + # Forbid adding the root group. + - min: 0 + max: 65535 + readOnlyRootFilesystem: false +{{- end }} +{{- end }} 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 new file mode 100755 index 000000000..cffe547b1 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/service.yaml @@ -0,0 +1,22 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ template "prometheus-node-exporter.fullname" . }} +{{- if .Values.service.annotations }} + annotations: +{{ toYaml .Values.service.annotations | indent 4 }} +{{- end }} + labels: {{ include "prometheus-node-exporter.labels" . | indent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + {{- if ( and (eq .Values.service.type "NodePort" ) (not (empty .Values.service.nodePort)) ) }} + nodePort: {{ .Values.service.nodePort }} + {{- end }} + targetPort: {{ .Values.service.targetPort }} + protocol: TCP + name: metrics + selector: + app: {{ template "prometheus-node-exporter.name" . }} + release: {{ .Release.Name }} 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 new file mode 100755 index 000000000..b70745aa6 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/serviceaccount.yaml @@ -0,0 +1,15 @@ +{{- if .Values.rbac.create -}} +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template "prometheus-node-exporter.serviceAccountName" . }} + labels: + app: {{ template "prometheus-node-exporter.name" . }} + chart: {{ template "prometheus-node-exporter.chart" . }} + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" +imagePullSecrets: +{{ toYaml .Values.serviceAccount.imagePullSecrets | indent 2 }} +{{- end -}} +{{- end -}} \ No newline at end of file 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 new file mode 100755 index 000000000..9fa068630 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/values.yaml @@ -0,0 +1,107 @@ +# Default values for prometheus-node-exporter. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. +image: + repository: quay.io/prometheus/node-exporter + tag: v0.18.0 + pullPolicy: IfNotPresent + +service: + type: ClusterIP + port: 9100 + targetPort: 9100 + nodePort: + annotations: + prometheus.io/scrape: "true" + +prometheus: + monitor: + enabled: false + additionalLabels: {} + namespace: "" + + scrapeTimeout: 10s + +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: 200m + # memory: 50Mi + # requests: + # cpu: 100m + # memory: 30Mi + +serviceAccount: + # Specifies whether a ServiceAccount should be created + create: true + # The name of the ServiceAccount to use. + # If not set and create is true, a name is generated using the fullname template + name: + imagePullSecrets: [] + +securityContext: + runAsNonRoot: true + runAsUser: 65534 + +rbac: + ## If true, create & use RBAC resources + ## + create: true + ## If true, create & use Pod Security Policy resources + ## https://kubernetes.io/docs/concepts/policy/pod-security-policy/ + pspEnabled: true + +# for deployments that have node_exporter deployed outside of the cluster, list +# their addresses here +endpoints: [] + +# Expose the service to the host network +hostNetwork: true + +## Assign a group of affinity scheduling rules +## +affinity: {} +# nodeAffinity: +# requiredDuringSchedulingIgnoredDuringExecution: +# nodeSelectorTerms: +# - matchFields: +# - key: metadata.name +# operator: In +# values: +# - target-host-name + +## Assign a nodeSelector if operating a hybrid cluster +## +nodeSelector: {} +# beta.kubernetes.io/arch: amd64 +# beta.kubernetes.io/os: linux + +tolerations: + - effect: NoSchedule + operator: Exists + +## Assign a PriorityClassName to pods if set +# priorityClassName: "" + +## Additional container arguments +## +extraArgs: {} +# - --collector.diskstats.ignored-devices=^(ram|loop|fd|(h|s|v)d[a-z]|nvme\\d+n\\d+p)\\d+$ + +## Additional mounts from the host +## +extraHostVolumeMounts: {} +# - name: +# hostPath: +# mountPath: +# readOnly: true|false +# mountPropagation: None|HostToContainer|Bidirectional + +## Additional configmaps to be mounted. +## +configmaps: {} +# - name: +# mountPath: diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/requirements.lock b/kubernetes/helm_charts/monitoring/prometheus-operator/requirements.lock new file mode 100755 index 000000000..0f271112c --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/requirements.lock @@ -0,0 +1,12 @@ +dependencies: +- name: kube-state-metrics + repository: https://kubernetes-charts.storage.googleapis.com/ + version: 2.4.1 +- name: prometheus-node-exporter + repository: https://kubernetes-charts.storage.googleapis.com/ + version: 1.7.0 +- name: grafana + repository: https://kubernetes-charts.storage.googleapis.com/ + version: 3.10.2 +digest: sha256:76bdb624ab8850dce9fc50f299c7f959fe8e318895754b3e8fb86dd322205783 +generated: "2019-10-17T20:33:18.516405134+03:00" diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/requirements.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/requirements.yaml new file mode 100755 index 000000000..db2d85acd --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/requirements.yaml @@ -0,0 +1,16 @@ +dependencies: + + - name: kube-state-metrics + version: 2.4.* + repository: https://kubernetes-charts.storage.googleapis.com/ + condition: kubeStateMetrics.enabled + + - name: prometheus-node-exporter + version: 1.7.* + repository: https://kubernetes-charts.storage.googleapis.com/ + condition: nodeExporter.enabled + + - name: grafana + version: 3.10.* + 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 new file mode 100755 index 000000000..b5aec7617 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/NOTES.txt @@ -0,0 +1,5 @@ +The Prometheus Operator has been installed. Check its status by running: + kubectl --namespace {{ .Release.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 diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/_helpers.tpl b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/_helpers.tpl new file mode 100755 index 000000000..77992fcf3 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/_helpers.tpl @@ -0,0 +1,91 @@ +{{/* 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" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 50 | trimSuffix "-" -}} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +The components in this chart create additional resources that expand the longest created name strings. +The longest name that gets created adds and extra 37 characters, so truncation should be 63-35=26. +*/}} +{{- define "prometheus-operator.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 26 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 26 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 26 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* Fullname suffixed with operator */}} +{{- define "prometheus-operator.operator.fullname" -}} +{{- printf "%s-operator" (include "prometheus-operator.fullname" .) -}} +{{- end }} + +{{/* Fullname suffixed with prometheus */}} +{{- define "prometheus-operator.prometheus.fullname" -}} +{{- printf "%s-prometheus" (include "prometheus-operator.fullname" .) -}} +{{- end }} + +{{/* Fullname suffixed with alertmanager */}} +{{- define "prometheus-operator.alertmanager.fullname" -}} +{{- printf "%s-alertmanager" (include "prometheus-operator.fullname" .) -}} +{{- end }} + +{{/* Create chart name and version as used by the chart label. */}} +{{- define "prometheus-operator.chartref" -}} +{{- replace "+" "_" .Chart.Version | printf "%s-%s" .Chart.Name -}} +{{- end }} + +{{/* Generate basic labels */}} +{{- define "prometheus-operator.labels" }} +chart: {{ template "prometheus-operator.chartref" . }} +release: {{ .Release.Name | quote }} +heritage: {{ .Release.Service | quote }} +{{- if .Values.commonLabels}} +{{ toYaml .Values.commonLabels }} +{{- end }} +{{- end }} + +{{/* Create the name of prometheus-operator service account to use */}} +{{- define "prometheus-operator.operator.serviceAccountName" -}} +{{- if .Values.prometheusOperator.serviceAccount.create -}} + {{ default (include "prometheus-operator.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" -}} +{{- if .Values.prometheus.serviceAccount.create -}} + {{ default (include "prometheus-operator.prometheus.fullname" .) .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" -}} +{{- if .Values.alertmanager.serviceAccount.create -}} + {{ default (include "prometheus-operator.alertmanager.fullname" .) .Values.alertmanager.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.alertmanager.serviceAccount.name }} +{{- end -}} +{{- end -}} + +{{/* Workaround for https://github.com/helm/helm/issues/3117 */}} +{{- define "prometheus-operator.rangeskipempty" -}} +{{- range $key, $value := . }} +{{- if $value }} +{{ $key }}: {{ $value }} +{{- 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 new file mode 100755 index 000000000..b7ef3d32b --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/alertmanager.yaml @@ -0,0 +1,103 @@ +{{- if .Values.alertmanager.enabled }} +apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: Alertmanager +metadata: + name: {{ template "prometheus-operator.fullname" . }}-alertmanager + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-alertmanager +{{ include "prometheus-operator.labels" . | indent 4 }} +spec: +{{- if .Values.alertmanager.alertmanagerSpec.image }} + baseImage: {{ .Values.alertmanager.alertmanagerSpec.image.repository }} + version: {{ .Values.alertmanager.alertmanagerSpec.image.tag }} +{{- end }} + replicas: {{ .Values.alertmanager.alertmanagerSpec.replicas }} + listenLocal: {{ .Values.alertmanager.alertmanagerSpec.listenLocal }} + serviceAccountName: {{ template "prometheus-operator.alertmanager.serviceAccountName" . }} +{{- if .Values.alertmanager.alertmanagerSpec.externalUrl }} + externalUrl: "{{ .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 }}" +{{- else }} + externalUrl: http://{{ template "prometheus-operator.fullname" . }}-alertmanager.{{ .Release.Namespace }}:9093 +{{- end }} +{{- if .Values.alertmanager.alertmanagerSpec.nodeSelector }} + nodeSelector: +{{ toYaml .Values.alertmanager.alertmanagerSpec.nodeSelector | indent 4 }} +{{- end }} + paused: {{ .Values.alertmanager.alertmanagerSpec.paused }} + logFormat: {{ .Values.alertmanager.alertmanagerSpec.logFormat | quote }} + logLevel: {{ .Values.alertmanager.alertmanagerSpec.logLevel | quote }} + retention: {{ .Values.alertmanager.alertmanagerSpec.retention | quote }} +{{- if .Values.alertmanager.alertmanagerSpec.secrets }} + secrets: +{{ toYaml .Values.alertmanager.alertmanagerSpec.secrets | indent 4 }} +{{- end }} +{{- if .Values.alertmanager.alertmanagerSpec.configMaps }} + configMaps: +{{ toYaml .Values.alertmanager.alertmanagerSpec.configMaps | indent 4 }} +{{- end }} +{{- if .Values.alertmanager.alertmanagerSpec.resources }} + resources: +{{ toYaml .Values.alertmanager.alertmanagerSpec.resources | indent 4 }} +{{- end }} +{{- if .Values.alertmanager.alertmanagerSpec.routePrefix }} + routePrefix: "{{ .Values.alertmanager.alertmanagerSpec.routePrefix }}" +{{- end }} +{{- if .Values.alertmanager.alertmanagerSpec.securityContext }} + securityContext: +{{ toYaml .Values.alertmanager.alertmanagerSpec.securityContext | indent 4 }} +{{- end }} +{{- if .Values.alertmanager.alertmanagerSpec.storage }} + storage: +{{ toYaml .Values.alertmanager.alertmanagerSpec.storage | indent 4 }} +{{- end }} +{{- if .Values.alertmanager.alertmanagerSpec.podMetadata }} + podMetadata: +{{ toYaml .Values.alertmanager.alertmanagerSpec.podMetadata | indent 4 }} +{{- end }} +{{- if or .Values.alertmanager.alertmanagerSpec.podAntiAffinity .Values.alertmanager.alertmanagerSpec.affinity }} + affinity: +{{- if .Values.alertmanager.alertmanagerSpec.affinity }} +{{ toYaml .Values.alertmanager.alertmanagerSpec.affinity | indent 4 }} +{{- end }} +{{- if eq .Values.alertmanager.alertmanagerSpec.podAntiAffinity "hard" }} + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: {{ .Values.alertmanager.alertmanagerSpec.podAntiAffinityTopologyKey }} + labelSelector: + matchLabels: + app: alertmanager + alertmanager: {{ template "prometheus-operator.fullname" . }}-alertmanager +{{- else if eq .Values.alertmanager.alertmanagerSpec.podAntiAffinity "soft" }} + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + podAffinityTerm: + topologyKey: {{ .Values.alertmanager.alertmanagerSpec.podAntiAffinityTopologyKey }} + labelSelector: + matchLabels: + app: alertmanager + alertmanager: {{ template "prometheus-operator.fullname" . }}-alertmanager +{{- end }} +{{- end }} +{{- if .Values.alertmanager.alertmanagerSpec.tolerations }} + tolerations: +{{ toYaml .Values.alertmanager.alertmanagerSpec.tolerations | indent 4 }} +{{- end }} +{{- if .Values.global.imagePullSecrets }} + imagePullSecrets: +{{ toYaml .Values.global.imagePullSecrets | indent 4 }} +{{- end }} +{{- if .Values.alertmanager.alertmanagerSpec.containers }} + containers: +{{ toYaml .Values.alertmanager.alertmanagerSpec.containers | indent 4 }} +{{- end }} +{{- if .Values.alertmanager.alertmanagerSpec.priorityClassName }} + priorityClassName: {{.Values.alertmanager.alertmanagerSpec.priorityClassName }} +{{- end }} +{{- if .Values.alertmanager.alertmanagerSpec.additionalPeers }} + additionalPeers: {{.Values.alertmanager.alertmanagerSpec.additionalPeers }} +{{- 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 new file mode 100755 index 000000000..333c83b15 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/ingress.yaml @@ -0,0 +1,49 @@ +{{- if and .Values.alertmanager.enabled .Values.alertmanager.ingress.enabled }} +{{- $serviceName := printf "%s-%s" (include "prometheus-operator.fullname" .) "alertmanager" }} +{{- $servicePort := 9093 -}} +{{- $routePrefix := list .Values.alertmanager.alertmanagerSpec.routePrefix }} +{{- $paths := .Values.alertmanager.ingress.paths | default $routePrefix -}} +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: {{ $serviceName }} + namespace: {{ .Release.Namespace }} +{{- if .Values.alertmanager.ingress.annotations }} + annotations: +{{ toYaml .Values.alertmanager.ingress.annotations | indent 4 }} +{{- end }} + labels: + app: {{ template "prometheus-operator.name" . }}-alertmanager +{{- if .Values.alertmanager.ingress.labels }} +{{ toYaml .Values.alertmanager.ingress.labels | indent 4 }} +{{- end }} +{{ include "prometheus-operator.labels" . | indent 4 }} +spec: + rules: + {{- if .Values.alertmanager.ingress.hosts }} + {{- range $host := .Values.alertmanager.ingress.hosts }} + - host: {{ tpl $host $ }} + http: + paths: + {{- range $p := $paths }} + - path: {{ tpl $p $ }} + backend: + serviceName: {{ $serviceName }} + servicePort: {{ $servicePort }} + {{- end -}} + {{- end -}} + {{- else }} + - http: + paths: + {{- range $p := $paths }} + - path: {{ tpl $p $ }} + backend: + serviceName: {{ $serviceName }} + servicePort: {{ $servicePort }} + {{- end -}} + {{- end -}} + {{- if .Values.alertmanager.ingress.tls }} + tls: +{{ toYaml .Values.alertmanager.ingress.tls | indent 4 }} + {{- end -}} +{{- end -}} diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/podDisruptionBudget.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/podDisruptionBudget.yaml new file mode 100755 index 000000000..4260a4890 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/podDisruptionBudget.yaml @@ -0,0 +1,21 @@ +{{- if and .Values.alertmanager.enabled .Values.alertmanager.podDisruptionBudget.enabled }} +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: {{ template "prometheus-operator.fullname" . }}-alertmanager + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-alertmanager +{{ include "prometheus-operator.labels" . | indent 4 }} +spec: + {{- if .Values.alertmanager.podDisruptionBudget.minAvailable }} + minAvailable: {{ .Values.alertmanager.podDisruptionBudget.minAvailable }} + {{- end }} + {{- if .Values.alertmanager.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ .Values.alertmanager.podDisruptionBudget.maxUnavailable }} + {{- end }} + selector: + matchLabels: + app: alertmanager + alertmanager: {{ template "prometheus-operator.fullname" . }}-alertmanager +{{- 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 new file mode 100755 index 000000000..d7bb0a594 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/psp-clusterrole.yaml @@ -0,0 +1,16 @@ +{{- 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 + namespace: {{ .Release.Namespace }} + 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 new file mode 100755 index 000000000..3755f6999 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/psp-clusterrolebinding.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.alertmanager.enabled .Values.global.rbac.create .Values.global.rbac.pspEnabled }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ template "prometheus-operator.fullname" . }}-alertmanager + namespace: {{ .Release.Namespace }} + 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.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/psp.yaml new file mode 100755 index 000000000..e4cb5e770 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/psp.yaml @@ -0,0 +1,49 @@ +{{- if and .Values.alertmanager.enabled .Values.global.rbac.create .Values.global.rbac.pspEnabled }} +apiVersion: policy/v1beta1 +kind: PodSecurityPolicy +metadata: + name: {{ template "prometheus-operator.fullname" . }}-alertmanager + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-alertmanager +{{ include "prometheus-operator.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' + - 'emptyDir' + - 'projected' + - 'secret' + - 'downwardAPI' + - 'persistentVolumeClaim' + hostNetwork: false + hostIPC: false + hostPID: false + runAsUser: + # Permits the container to run with root privileges as well. + rule: 'RunAsAny' + seLinux: + # This policy assumes the nodes are using AppArmor rather than SELinux. + rule: 'RunAsAny' + supplementalGroups: + rule: 'MustRunAs' + ranges: + # Forbid adding the root group. + - min: 0 + max: 65535 + fsGroup: + rule: 'MustRunAs' + ranges: + # Forbid adding the root group. + - min: 0 + max: 65535 + readOnlyRootFilesystem: false +{{- 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 new file mode 100755 index 000000000..91714ab1e --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/secret.yaml @@ -0,0 +1,23 @@ +{{- if and (.Values.alertmanager.enabled) (not .Values.alertmanager.alertmanagerSpec.useExistingSecret) }} +apiVersion: v1 +kind: Secret +metadata: + name: alertmanager-{{ template "prometheus-operator.fullname" . }}-alertmanager + namespace: {{ .Release.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 }} +data: +{{- if .Values.alertmanager.tplConfig }} + alertmanager.yaml: {{ tpl (toYaml .Values.alertmanager.config) . | b64enc | quote }} +{{- else }} + alertmanager.yaml: {{ toYaml .Values.alertmanager.config | b64enc | quote }} +{{- end}} +{{- range $key, $val := .Values.alertmanager.templateFiles }} + {{ $key }}: {{ $val | b64enc | quote }} +{{- end }} +{{- 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 new file mode 100755 index 000000000..b48a7787a --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/service.yaml @@ -0,0 +1,43 @@ +{{- if .Values.alertmanager.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "prometheus-operator.fullname" . }}-alertmanager + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-alertmanager +{{ include "prometheus-operator.labels" . | indent 4 }} +{{- if .Values.alertmanager.service.annotations }} + annotations: +{{ toYaml .Values.alertmanager.service.annotations | indent 4 }} +{{- end }} +spec: +{{- if .Values.alertmanager.service.clusterIP }} + clusterIP: {{ .Values.alertmanager.service.clusterIP }} +{{- end }} +{{- if .Values.alertmanager.service.externalIPs }} + externalIPs: +{{ toYaml .Values.alertmanager.service.externalIPs | indent 4 }} +{{- end }} +{{- if .Values.alertmanager.service.loadBalancerIP }} + loadBalancerIP: {{ .Values.alertmanager.service.loadBalancerIP }} +{{- end }} +{{- if .Values.alertmanager.service.loadBalancerSourceRanges }} + loadBalancerSourceRanges: + {{- range $cidr := .Values.alertmanager.service.loadBalancerSourceRanges }} + - {{ $cidr }} + {{- end }} +{{- end }} + ports: + - name: web + {{- if eq .Values.alertmanager.service.type "NodePort" }} + nodePort: {{ .Values.alertmanager.service.nodePort }} + {{- end }} + port: 9093 + targetPort: 9093 + protocol: TCP + selector: + app: alertmanager + alertmanager: {{ template "prometheus-operator.fullname" . }}-alertmanager + 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 new file mode 100755 index 000000000..cb3af54b1 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if and .Values.alertmanager.enabled .Values.alertmanager.serviceAccount.create }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template "prometheus-operator.alertmanager.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-alertmanager +{{ include "prometheus-operator.labels" . | indent 4 }} +imagePullSecrets: +{{ toYaml .Values.global.imagePullSecrets | indent 2 }} +{{- 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 new file mode 100755 index 000000000..d5f9d670b --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/servicemonitor.yaml @@ -0,0 +1,32 @@ +{{- if and .Values.alertmanager.enabled .Values.alertmanager.serviceMonitor.selfMonitor }} +apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: ServiceMonitor +metadata: + name: {{ template "prometheus-operator.fullname" . }}-alertmanager + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-alertmanager +{{ include "prometheus-operator.labels" . | indent 4 }} +spec: + selector: + matchLabels: + app: {{ template "prometheus-operator.name" . }}-alertmanager + release: {{ .Release.Name | quote }} + namespaceSelector: + matchNames: + - {{ .Release.Namespace | quote }} + endpoints: + - port: web + {{- if .Values.alertmanager.serviceMonitor.interval }} + interval: {{ .Values.alertmanager.serviceMonitor.interval }} + {{- end }} + path: "{{ trimSuffix "/" .Values.alertmanager.alertmanagerSpec.routePrefix }}/metrics" +{{- if .Values.alertmanager.serviceMonitor.metricRelabelings }} + metricRelabelings: +{{ tpl (toYaml .Values.alertmanager.serviceMonitor.metricRelabelings | indent 6) . }} +{{- end }} +{{- if .Values.alertmanager.serviceMonitor.relabelings }} + relabelings: +{{ toYaml .Values.alertmanager.serviceMonitor.relabelings | indent 6 }} +{{- end }} +{{- end }} diff --git a/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 new file mode 100755 index 000000000..5804186b0 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/core-dns/service.yaml @@ -0,0 +1,21 @@ +{{- if .Values.coreDns.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "prometheus-operator.fullname" . }}-coredns + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-coredns + jobLabel: coredns +{{ include "prometheus-operator.labels" . | indent 4 }} + namespace: kube-system +spec: + clusterIP: None + ports: + - name: http-metrics + port: {{ .Values.coreDns.service.port }} + protocol: TCP + targetPort: {{ .Values.coreDns.service.targetPort }} + selector: +{{ include "prometheus-operator.rangeskipempty" .Values.coreDns.service.selector | indent 4 }} +{{- end }} 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 new file mode 100755 index 000000000..a6d543047 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/core-dns/servicemonitor.yaml @@ -0,0 +1,33 @@ +{{- if .Values.coreDns.enabled }} +apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: ServiceMonitor +metadata: + name: {{ template "prometheus-operator.fullname" . }}-coredns + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-coredns +{{ include "prometheus-operator.labels" . | indent 4 }} +spec: + jobLabel: jobLabel + selector: + matchLabels: + app: {{ template "prometheus-operator.name" . }}-coredns + release: {{ .Release.Name | quote }} + namespaceSelector: + matchNames: + - "kube-system" + endpoints: + - port: http-metrics + {{- if .Values.coreDns.serviceMonitor.interval}} + interval: {{ .Values.coreDns.serviceMonitor.interval }} + {{- end }} + bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token +{{- if .Values.coreDns.serviceMonitor.metricRelabelings }} + metricRelabelings: +{{ tpl (toYaml .Values.coreDns.serviceMonitor.metricRelabelings | indent 4) . }} +{{- end }} +{{- if .Values.coreDns.serviceMonitor.relabelings }} + relabelings: +{{ 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 new file mode 100755 index 000000000..c191cdf60 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-api-server/servicemonitor.yaml @@ -0,0 +1,36 @@ +{{- if .Values.kubeApiServer.enabled }} +apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: ServiceMonitor +metadata: + name: {{ template "prometheus-operator.fullname" . }}-apiserver + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-apiserver +{{ include "prometheus-operator.labels" . | indent 4 }} +spec: + endpoints: + - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token + {{- if .Values.kubeApiServer.serviceMonitor.interval }} + interval: {{ .Values.kubeApiServer.serviceMonitor.interval }} + {{- end }} + port: https + scheme: https +{{- if .Values.kubeApiServer.serviceMonitor.metricRelabelings }} + metricRelabelings: +{{ tpl (toYaml .Values.kubeApiServer.serviceMonitor.metricRelabelings | indent 6) . }} +{{- end }} +{{- if .Values.kubeApiServer.relabelings }} + relabelings: +{{ toYaml .Values.kubeApiServer.relabelings | indent 6 }} +{{- end }} + tlsConfig: + caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt + serverName: {{ .Values.kubeApiServer.tlsConfig.serverName }} + insecureSkipVerify: {{ .Values.kubeApiServer.tlsConfig.insecureSkipVerify }} + jobLabel: {{ .Values.kubeApiServer.serviceMonitor.jobLabel }} + namespaceSelector: + matchNames: + - default + selector: +{{ toYaml .Values.kubeApiServer.serviceMonitor.selector | indent 4 }} +{{- end}} 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 new file mode 100755 index 000000000..fd4aadcda --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-controller-manager/endpoints.yaml @@ -0,0 +1,21 @@ +{{- if and .Values.kubeControllerManager.enabled .Values.kubeControllerManager.endpoints }} +apiVersion: v1 +kind: Endpoints +metadata: + name: {{ template "prometheus-operator.fullname" . }}-kube-controller-manager + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-kube-controller-manager + k8s-app: kube-controller-manager +{{ include "prometheus-operator.labels" . | indent 4 }} + namespace: kube-system +subsets: + - addresses: + {{- range .Values.kubeControllerManager.endpoints }} + - ip: {{ . }} + {{- end }} + ports: + - name: http-metrics + port: {{ .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 new file mode 100755 index 000000000..841c8e0eb --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-controller-manager/service.yaml @@ -0,0 +1,24 @@ +{{- if .Values.kubeControllerManager.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "prometheus-operator.fullname" . }}-kube-controller-manager + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-kube-controller-manager + jobLabel: kube-controller-manager +{{ include "prometheus-operator.labels" . | indent 4 }} + namespace: kube-system +spec: + clusterIP: None + ports: + - name: http-metrics + port: {{ .Values.kubeControllerManager.service.port }} + protocol: TCP + targetPort: {{ .Values.kubeControllerManager.service.targetPort }} +{{- if .Values.kubeControllerManager.endpoints }}{{- else }} + selector: +{{ include "prometheus-operator.rangeskipempty" .Values.kubeControllerManager.service.selector | indent 4 }} +{{- end }} + type: ClusterIP +{{- end }} 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 new file mode 100755 index 000000000..3ed98bbd2 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-controller-manager/servicemonitor.yaml @@ -0,0 +1,44 @@ +{{- if .Values.kubeControllerManager.enabled }} +apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: ServiceMonitor +metadata: + name: {{ template "prometheus-operator.fullname" . }}-kube-controller-manager + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-kube-controller-manager +{{ include "prometheus-operator.labels" . | indent 4 }} +spec: + jobLabel: jobLabel + selector: + matchLabels: + app: {{ template "prometheus-operator.name" . }}-kube-controller-manager + release: {{ .Release.Name | quote }} + namespaceSelector: + matchNames: + - "kube-system" + endpoints: + - port: http-metrics + {{- if .Values.kubeControllerManager.serviceMonitor.interval }} + interval: {{ .Values.kubeControllerManager.serviceMonitor.interval }} + {{- end }} + bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token + {{- if .Values.kubeControllerManager.serviceMonitor.https }} + scheme: https + tlsConfig: + caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt + {{- if .Values.kubeControllerManager.serviceMonitor.insecureSkipVerify }} + insecureSkipVerify: {{ .Values.kubeControllerManager.serviceMonitor.insecureSkipVerify }} + {{- end }} + {{- if .Values.kubeControllerManager.serviceMonitor.serverName }} + serverName: {{ .Values.kubeControllerManager.serviceMonitor.serverName }} + {{- end }} + {{- end }} +{{- if .Values.kubeControllerManager.serviceMonitor.metricRelabelings }} + metricRelabelings: +{{ tpl (toYaml .Values.kubeControllerManager.serviceMonitor.metricRelabelings | indent 4) . }} +{{- end }} +{{- if .Values.kubeControllerManager.serviceMonitor.relabelings }} + relabelings: +{{ 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 new file mode 100755 index 000000000..441273e03 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-dns/service.yaml @@ -0,0 +1,25 @@ +{{- if .Values.kubeDns.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "prometheus-operator.fullname" . }}-kube-dns + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-kube-dns + jobLabel: kube-dns +{{ include "prometheus-operator.labels" . | indent 4 }} + namespace: kube-system +spec: + clusterIP: None + ports: + - name: http-metrics-dnsmasq + port: 10054 + protocol: TCP + targetPort: 10054 + - name: http-metrics-skydns + port: 10055 + protocol: TCP + targetPort: 10055 + selector: +{{ include "prometheus-operator.rangeskipempty" .Values.kubeDns.service.selector | indent 4 }} +{{- end }} 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 new file mode 100755 index 000000000..8797fdec8 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-dns/servicemonitor.yaml @@ -0,0 +1,46 @@ +{{- if .Values.kubeDns.enabled }} +apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: ServiceMonitor +metadata: + name: {{ template "prometheus-operator.fullname" . }}-kube-dns + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-kube-dns +{{ include "prometheus-operator.labels" . | indent 4 }} +spec: + jobLabel: jobLabel + selector: + matchLabels: + app: {{ template "prometheus-operator.name" . }}-kube-dns + release: {{ .Release.Name | quote }} + namespaceSelector: + matchNames: + - "kube-system" + endpoints: + - port: http-metrics-dnsmasq + {{- if .Values.kubeDns.serviceMonitor.interval }} + interval: {{ .Values.kubeDns.serviceMonitor.interval }} + {{- end }} + bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token +{{- if .Values.kubeDns.serviceMonitor.dnsmasqMetricRelabelings }} + metricRelabelings: +{{ tpl (toYaml .Values.kubeDns.serviceMonitor.dnsmasqMetricRelabelings | indent 4) . }} +{{- end }} +{{- if .Values.kubeDns.serviceMonitor.dnsmasqRelabelings }} + relabelings: +{{ toYaml .Values.kubeDns.serviceMonitor.dnsmasqRelabelings | indent 4 }} +{{- end }} + - port: http-metrics-skydns + {{- if .Values.kubeDns.serviceMonitor.interval }} + interval: {{ .Values.kubeDns.serviceMonitor.interval }} + {{- end }} + bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token +{{- if .Values.kubeDns.serviceMonitor.metricRelabelings }} + metricRelabelings: +{{ tpl (toYaml .Values.kubeDns.serviceMonitor.metricRelabelings | indent 4) . }} +{{- end }} +{{- if .Values.kubeDns.serviceMonitor.relabelings }} + relabelings: +{{ 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 new file mode 100755 index 000000000..640eb659b --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-etcd/endpoints.yaml @@ -0,0 +1,21 @@ +{{- if and .Values.kubeEtcd.enabled .Values.kubeEtcd.endpoints }} +apiVersion: v1 +kind: Endpoints +metadata: + name: {{ template "prometheus-operator.fullname" . }}-kube-etcd + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-kube-etcd + k8s-app: etcd-server +{{ include "prometheus-operator.labels" . | indent 4 }} + namespace: kube-system +subsets: + - addresses: + {{- range .Values.kubeEtcd.endpoints }} + - ip: {{ . }} + {{- end }} + ports: + - name: http-metrics + port: {{ .Values.kubeEtcd.service.port }} + protocol: TCP +{{- end }} 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 new file mode 100755 index 000000000..65479f68d --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-etcd/service.yaml @@ -0,0 +1,24 @@ +{{- if .Values.kubeEtcd.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "prometheus-operator.fullname" . }}-kube-etcd + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-kube-etcd + jobLabel: kube-etcd +{{ include "prometheus-operator.labels" . | indent 4 }} + namespace: kube-system +spec: + clusterIP: None + ports: + - name: http-metrics + port: {{ .Values.kubeEtcd.service.port }} + protocol: TCP + targetPort: {{ .Values.kubeEtcd.service.targetPort }} +{{- if .Values.kubeEtcd.endpoints }}{{- else }} + selector: + {{ include "prometheus-operator.rangeskipempty" .Values.kubeEtcd.service.selector | indent 4 }} +{{- end }} + type: ClusterIP +{{- end -}} 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 new file mode 100755 index 000000000..1bfacbf93 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-etcd/servicemonitor.yaml @@ -0,0 +1,50 @@ +{{- if .Values.kubeEtcd.enabled }} +apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: ServiceMonitor +metadata: + name: {{ template "prometheus-operator.fullname" . }}-kube-etcd + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-kube-etcd +{{ include "prometheus-operator.labels" . | indent 4 }} +spec: + jobLabel: jobLabel + selector: + matchLabels: + app: {{ template "prometheus-operator.name" . }}-kube-etcd + release: {{ .Release.Name | quote }} + namespaceSelector: + matchNames: + - "kube-system" + endpoints: + - port: http-metrics + {{- if .Values.kubeEtcd.serviceMonitor.interval }} + interval: {{ .Values.kubeEtcd.serviceMonitor.interval }} + {{- end }} + bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token + {{- if eq .Values.kubeEtcd.serviceMonitor.scheme "https" }} + scheme: https + tlsConfig: + {{- if .Values.kubeEtcd.serviceMonitor.serverName }} + serverName: {{ .Values.kubeEtcd.serviceMonitor.serverName }} + {{- end }} + {{- if .Values.kubeEtcd.serviceMonitor.caFile }} + caFile: {{ .Values.kubeEtcd.serviceMonitor.caFile }} + {{- end }} + {{- if .Values.kubeEtcd.serviceMonitor.certFile }} + certFile: {{ .Values.kubeEtcd.serviceMonitor.certFile }} + {{- end }} + {{- if .Values.kubeEtcd.serviceMonitor.keyFile }} + keyFile: {{ .Values.kubeEtcd.serviceMonitor.keyFile }} + {{- end}} + insecureSkipVerify: {{ .Values.kubeEtcd.serviceMonitor.insecureSkipVerify }} + {{- end }} +{{- if .Values.kubeEtcd.serviceMonitor.metricRelabelings }} + metricRelabelings: +{{ tpl (toYaml .Values.kubeEtcd.serviceMonitor.metricRelabelings | indent 4) . }} +{{- end }} +{{- if .Values.kubeEtcd.serviceMonitor.relabelings }} + relabelings: +{{ toYaml .Values.kubeEtcd.serviceMonitor.relabelings | indent 4 }} +{{- end }} +{{- end }} 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 new file mode 100755 index 000000000..bfc577a05 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-proxy/service.yaml @@ -0,0 +1,22 @@ +{{- if .Values.kubeProxy.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "prometheus-operator.fullname" . }}-kube-proxy + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-kube-proxy + jobLabel: kube-proxy +{{ include "prometheus-operator.labels" . | indent 4 }} + namespace: kube-system +spec: + clusterIP: None + ports: + - name: http-metrics + port: {{ .Values.kubeProxy.service.port }} + protocol: TCP + targetPort: {{ .Values.kubeProxy.service.targetPort }} + selector: + {{ include "prometheus-operator.rangeskipempty" .Values.kubeProxy.service.selector | indent 4 }} + type: ClusterIP +{{- end -}} 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 new file mode 100755 index 000000000..262f35222 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-proxy/servicemonitor.yaml @@ -0,0 +1,38 @@ +{{- if .Values.kubeProxy.enabled }} +apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: ServiceMonitor +metadata: + name: {{ template "prometheus-operator.fullname" . }}-kube-proxy + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-kube-proxy +{{ include "prometheus-operator.labels" . | indent 4 }} +spec: + jobLabel: jobLabel + selector: + matchLabels: + app: {{ template "prometheus-operator.name" . }}-kube-proxy + release: {{ .Release.Name | quote }} + namespaceSelector: + matchNames: + - "kube-system" + endpoints: + - port: http-metrics + {{- if .Values.kubeProxy.serviceMonitor.interval }} + interval: {{ .Values.kubeProxy.serviceMonitor.interval }} + {{- end }} + bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token + {{- if .Values.kubeProxy.serviceMonitor.https }} + scheme: https + tlsConfig: + caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt + {{- end}} +{{- if .Values.kubeProxy.serviceMonitor.metricRelabelings }} + metricRelabelings: +{{ toYaml .Values.kubeProxy.serviceMonitor.metricRelabelings | indent 4 }} +{{- end }} +{{- if .Values.kubeProxy.serviceMonitor.relabelings }} + relabelings: +{{ 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 new file mode 100755 index 000000000..81e33794f --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-scheduler/endpoints.yaml @@ -0,0 +1,21 @@ +{{- if and .Values.kubeScheduler.enabled .Values.kubeScheduler.endpoints }} +apiVersion: v1 +kind: Endpoints +metadata: + name: {{ template "prometheus-operator.fullname" . }}-kube-scheduler + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-kube-scheduler + k8s-app: kube-scheduler +{{ include "prometheus-operator.labels" . | indent 4 }} + namespace: kube-system +subsets: + - addresses: + {{- range .Values.kubeScheduler.endpoints }} + - ip: {{ . }} + {{- end }} + ports: + - name: http-metrics + port: {{ .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 new file mode 100755 index 000000000..19531ab8e --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-scheduler/service.yaml @@ -0,0 +1,24 @@ +{{- if .Values.kubeScheduler.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "prometheus-operator.fullname" . }}-kube-scheduler + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-kube-scheduler + jobLabel: kube-scheduler +{{ include "prometheus-operator.labels" . | indent 4 }} + namespace: kube-system +spec: + clusterIP: None + ports: + - name: http-metrics + port: {{ .Values.kubeScheduler.service.port}} + protocol: TCP + targetPort: {{ .Values.kubeScheduler.service.targetPort}} +{{- if .Values.kubeScheduler.endpoints }}{{- else }} + selector: + {{ include "prometheus-operator.rangeskipempty" .Values.kubeScheduler.service.selector | indent 4 }} +{{- end }} + type: ClusterIP +{{- end -}} 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 new file mode 100755 index 000000000..c5bd33361 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-scheduler/servicemonitor.yaml @@ -0,0 +1,44 @@ +{{- if .Values.kubeScheduler.enabled }} +apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: ServiceMonitor +metadata: + name: {{ template "prometheus-operator.fullname" . }}-kube-scheduler + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-kube-scheduler +{{ include "prometheus-operator.labels" . | indent 4 }} +spec: + jobLabel: jobLabel + selector: + matchLabels: + app: {{ template "prometheus-operator.name" . }}-kube-scheduler + release: {{ .Release.Name | quote }} + namespaceSelector: + matchNames: + - "kube-system" + endpoints: + - port: http-metrics + {{- if .Values.kubeScheduler.serviceMonitor.interval }} + interval: {{ .Values.kubeScheduler.serviceMonitor.interval }} + {{- end }} + bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token + {{- if .Values.kubeScheduler.serviceMonitor.https }} + scheme: https + tlsConfig: + caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt + {{- if .Values.kubeScheduler.serviceMonitor.insecureSkipVerify }} + insecureSkipVerify: {{ .Values.kubeScheduler.serviceMonitor.insecureSkipVerify }} + {{- end}} + {{- if .Values.kubeScheduler.serviceMonitor.serverName }} + serverName: {{ .Values.kubeScheduler.serviceMonitor.serverName }} + {{- end}} + {{- end}} +{{- if .Values.kubeScheduler.serviceMonitor.metricRelabelings }} + metricRelabelings: +{{ tpl (toYaml .Values.kubeScheduler.serviceMonitor.metricRelabelings | indent 4) . }} +{{- end }} +{{- if .Values.kubeScheduler.serviceMonitor.relabelings }} + relabelings: +{{ 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 new file mode 100755 index 000000000..be8a650be --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-state-metrics/serviceMonitor.yaml @@ -0,0 +1,30 @@ +{{- if .Values.kubeStateMetrics.enabled }} +apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +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 new file mode 100755 index 000000000..9a7e460df --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kubelet/servicemonitor.yaml @@ -0,0 +1,86 @@ +{{- if .Values.kubelet.enabled }} +apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: ServiceMonitor +metadata: + name: {{ template "prometheus-operator.fullname" . }}-kubelet + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-kubelet +{{ include "prometheus-operator.labels" . | indent 4 }} +spec: + endpoints: + {{- if .Values.kubelet.serviceMonitor.https }} + - port: https-metrics + scheme: https + {{- if .Values.kubelet.serviceMonitor.interval }} + interval: {{ .Values.kubelet.serviceMonitor.interval }} + {{- end }} + tlsConfig: + caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt + insecureSkipVerify: true + bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token + honorLabels: true +{{- if .Values.kubelet.serviceMonitor.metricRelabelings }} + metricRelabelings: +{{ tpl (toYaml .Values.kubelet.serviceMonitor.metricRelabelings | indent 4) . }} +{{- end }} +{{- if .Values.kubelet.serviceMonitor.relabelings }} + relabelings: +{{ toYaml .Values.kubelet.serviceMonitor.relabelings | indent 4 }} +{{- end }} + - port: https-metrics + scheme: https + path: /metrics/cadvisor + {{- if .Values.kubelet.serviceMonitor.interval }} + interval: {{ .Values.kubelet.serviceMonitor.interval }} + {{- 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.cAdvisorMetricRelabelings }} + metricRelabelings: +{{ tpl (toYaml .Values.kubelet.serviceMonitor.cAdvisorMetricRelabelings | indent 4) . }} +{{- end }} +{{- if .Values.kubelet.serviceMonitor.cAdvisorRelabelings }} + relabelings: +{{ toYaml .Values.kubelet.serviceMonitor.cAdvisorRelabelings | indent 4 }} +{{- end }} + {{- else }} + - port: http-metrics + {{- if .Values.kubelet.serviceMonitor.interval }} + interval: {{ .Values.kubelet.serviceMonitor.interval }} + {{- end }} + honorLabels: true +{{- if .Values.kubelet.serviceMonitor.metricRelabelings }} + metricRelabelings: +{{ tpl (toYaml .Values.kubelet.serviceMonitor.metricRelabelings | indent 4) . }} +{{- end }} +{{- if .Values.kubelet.serviceMonitor.relabelings }} + relabelings: +{{ toYaml .Values.kubelet.serviceMonitor.relabelings | indent 4 }} +{{- end }} + - port: http-metrics + path: /metrics/cadvisor + {{- if .Values.kubelet.serviceMonitor.interval }} + interval: {{ .Values.kubelet.serviceMonitor.interval }} + {{- end }} + honorLabels: true +{{- if .Values.kubelet.serviceMonitor.cAdvisorMetricRelabelings }} + metricRelabelings: +{{ tpl (toYaml .Values.kubelet.serviceMonitor.cAdvisorMetricRelabelings | indent 4) . }} +{{- end }} +{{- if .Values.kubelet.serviceMonitor.cAdvisorRelabelings }} + relabelings: +{{ toYaml .Values.kubelet.serviceMonitor.cAdvisorRelabelings | indent 4 }} +{{- end }} + {{- end }} + jobLabel: k8s-app + namespaceSelector: + matchNames: + - {{ .Values.kubelet.namespace }} + selector: + matchLabels: + 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 new file mode 100755 index 000000000..4b3a11038 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/node-exporter/servicemonitor.yaml @@ -0,0 +1,32 @@ +{{- if .Values.nodeExporter.enabled }} +apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +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/grafana/configmap-dashboards.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/configmap-dashboards.yaml new file mode 100755 index 000000000..4f28174ca --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/configmap-dashboards.yaml @@ -0,0 +1,24 @@ +{{- if and .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} +{{- $files := .Files.Glob "dashboards/*.json" }} +{{- if $files }} +apiVersion: v1 +kind: ConfigMapList +items: +{{- range $path, $fileContents := $files }} +{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }} +- apiVersion: v1 + kind: ConfigMap + metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) $dashboardName | trunc 63 | trimSuffix "-" }} + namespace: {{ .Release.Namespace }} + 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 6 }} + data: + {{ $dashboardName }}.json: {{ $.Files.Get $path | toJson }} +{{- end }} +{{- end }} +{{- 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 new file mode 100755 index 000000000..ecc4775ea --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/configmaps-datasources.yaml @@ -0,0 +1,34 @@ +{{- if and .Values.grafana.enabled .Values.grafana.sidecar.datasources.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "prometheus-operator.fullname" . }}-grafana-datasource + namespace: {{ .Release.Namespace }} + labels: + {{ $.Values.grafana.sidecar.datasources.label }}: "1" + app: {{ template "prometheus-operator.name" $ }}-grafana +{{ include "prometheus-operator.labels" $ | indent 4 }} +data: + datasource.yaml: |- + apiVersion: 1 + datasources: +{{- if .Values.grafana.sidecar.datasources.defaultDatasourceEnabled }} + - name: Prometheus + type: prometheus + url: http://{{ template "prometheus-operator.fullname" . }}-prometheus:9090/{{ trimPrefix "/" .Values.prometheus.prometheusSpec.routePrefix }} + access: proxy + isDefault: true +{{- 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 }} + access: proxy + isDefault: false +{{- end }} +{{- end }} +{{- end }} +{{- if .Values.grafana.additionalDataSources }} +{{ toYaml .Values.grafana.additionalDataSources | indent 4}} +{{- end }} +{{- end }} 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 new file mode 100755 index 000000000..8c55f1d43 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/apiserver.yaml @@ -0,0 +1,1298 @@ +# Generated from 'apiserver' 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 "<1.16.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.kubeApiServer.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "apiserver" | 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: + apiserver.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": "", + "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\"})", + "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(apiserver_request_total{job=\"apiserver\", instance=~\"$instance\",code=~\"2..\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "2xx", + "refId": "A" + }, + { + "expr": "sum(rate(apiserver_request_total{job=\"apiserver\", instance=~\"$instance\",code=~\"3..\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "3xx", + "refId": "B" + }, + { + "expr": "sum(rate(apiserver_request_total{job=\"apiserver\", instance=~\"$instance\",code=~\"4..\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "4xx", + "refId": "C" + }, + { + "expr": "sum(rate(apiserver_request_total{job=\"apiserver\", 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": 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": 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(apiserver_request_duration_seconds_bucket{job=\"apiserver\", instance=~\"$instance\"}[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": 5, + "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\"}[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": 6, + "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\"}[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": 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(workqueue_queue_duration_seconds_bucket{job=\"apiserver\", 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": 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": "etcd_helper_cache_entry_total{job=\"apiserver\", instance=~\"$instance\"}", + "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": 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": "sum(rate(etcd_helper_cache_hit_total{job=\"apiserver\",instance=~\"$instance\"}[5m])) by (intance)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{instance}}`}} hit", + "refId": "A" + }, + { + "expr": "sum(rate(etcd_helper_cache_miss_total{job=\"apiserver\",instance=~\"$instance\"}[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": 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": "histogram_quantile(0.99,sum(rate(etcd_request_cache_get_duration_seconds_bucket{job=\"apiserver\",instance=~\"$instance\"}[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\"}[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": 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": "process_resident_memory_bytes{job=\"apiserver\",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": 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": "rate(process_cpu_seconds_total{job=\"apiserver\",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": 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": 4, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "go_goroutines{job=\"apiserver\",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": "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": true, + "label": null, + "multi": false, + "name": "instance", + "options": [ + + ], + "query": "label_values(apiserver_request_total{job=\"apiserver\"}, 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 / 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/controller-manager.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/controller-manager.yaml new file mode 100755 index 000000000..13727862a --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/controller-manager.yaml @@ -0,0 +1,1128 @@ +# Generated from 'controller-manager' 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 "<1.16.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.kubeControllerManager.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "controller-manager" | 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: + controller-manager.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": "", + "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": "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": true, + "label": null, + "multi": false, + "name": "instance", + "options": [ + + ], + "query": "label_values(process_cpu_seconds_total{job=\"kube-controller-manager\"}, 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 / 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 new file mode 100755 index 000000000..356e41bb5 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/etcd.yaml @@ -0,0 +1,1111 @@ +# 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.14.0-0" $kubeTargetVersion) (semverCompare "<1.16.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.kubeEtcd.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + 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-1.14/k8s-coredns.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-coredns.yaml new file mode 100755 index 000000000..75fc8c262 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-coredns.yaml @@ -0,0 +1,1324 @@ +# Added manually, can be changed in-place. +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (semverCompare ">=1.14.0" $kubeTargetVersion) (semverCompare "<1.16.0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.coreDns.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-coredns" | 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-coredns.json: |- + { + "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.", + "editable": true, + "gnetId": 5926, + "graphTooltip": 0, + "id": 9, + "iteration": 1539947521873, + "links": [], + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Prometheus", + "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": "Prometheus", + "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": "Prometheus", + "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": "Prometheus", + "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": "Prometheus", + "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": "Prometheus", + "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": "Prometheus", + "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": "Prometheus", + "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": "Prometheus", + "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": "Prometheus", + "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": "Prometheus", + "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": "Prometheus", + "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": [ + { + "allValue": ".*", + "current": { + "selected": true, + "tags": [], + "text": "172.16.1.8:9153", + "value": "172.16.1.8:9153" + }, + "datasource": "Prometheus", + "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 + } +{{- 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 new file mode 100755 index 000000000..a8ebad521 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-cluster.yaml @@ -0,0 +1,1474 @@ +# Generated from 'k8s-resources-cluster' 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 "<1.16.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + 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(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_MemFreeCachedBuffers_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" + } + ], + "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(node_cpu_seconds_total, 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-1.14/k8s-resources-namespace.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml new file mode 100755 index 000000000..634851d3e --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml @@ -0,0 +1,958 @@ +# Generated from 'k8s-resources-namespace' 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 "<1.16.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + 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(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 + } + ], + "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(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": 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_working_set_bytes{cluster=\"$cluster\", namespace=\"$namespace\", 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": 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" + } + ], + "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, 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-1.14/k8s-resources-node.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-node.yaml new file mode 100755 index 000000000..40097347f --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-node.yaml @@ -0,0 +1,958 @@ +# Generated from 'k8s-resources-node' 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 "<1.16.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-resources-node" | 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-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(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(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(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(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(container_memory_rss{cluster=\"$cluster\", node=\"$node\",container!=\"\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + }, + { + "expr": "sum(container_memory_cache{cluster=\"$cluster\", node=\"$node\",container!=\"\"}) by (pod)", + "format": "table", + "instant": true, + "intervalFactor": 2, + "legendFormat": "", + "refId": "G", + "step": 10 + }, + { + "expr": "sum(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": "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, 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_pod_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 / 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 new file mode 100755 index 000000000..0d213c2eb --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml @@ -0,0 +1,1001 @@ +# Generated from 'k8s-resources-pod' 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 "<1.16.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + 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(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 + } + ], + "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(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": 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=\"$pod\", container!=\"POD\", container!=\"\"}) by (container)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{container}}`}} (RSS)", + "legendLink": null, + "step": 10 + }, + { + "expr": "sum(container_memory_cache{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\", container!=\"\"}) by (container)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{container}}`}} (Cache)", + "legendLink": null, + "step": 10 + }, + { + "expr": "sum(container_memory_swap{cluster=\"$cluster\", namespace=\"$namespace\", pod=\"$pod\", container!=\"POD\", container!=\"\"}) by (container)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{container}}`}} (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(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" + } + ], + "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, 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-1.14/k8s-resources-workload.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml new file mode 100755 index 000000000..7090a5432 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml @@ -0,0 +1,931 @@ +# Generated from 'k8s-resources-workload' 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 "<1.16.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + 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 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" + } + ], + "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, 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-1.14/k8s-resources-workloads-namespace.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml new file mode 100755 index 000000000..b77ee921a --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml @@ -0,0 +1,967 @@ +# Generated from 'k8s-resources-workloads-namespace' 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 "<1.16.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + 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 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\"}\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 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\"}\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\"}\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\"}\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\"}\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\"}\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\"}\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\"}\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 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\"}\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 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\"}\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\"}\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\"}\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\"}\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\"}\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\"}\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\"}\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, 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-1.14/kubelet.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/kubelet.yaml new file mode 100755 index 000000000..bcc4698dc --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/kubelet.yaml @@ -0,0 +1,2466 @@ +# Generated from 'kubelet' 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 "<1.16.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.kubelet.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "kubelet" | 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: + kubelet.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": "", + "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=\"kubelet\"})", + "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{job=\"kubelet\", 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{job=\"kubelet\", 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{job=\"kubelet\", 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{job=\"kubelet\", 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{job=\"kubelet\", 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{job=\"kubelet\",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{job=\"kubelet\",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{job=\"kubelet\",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{job=\"kubelet\",instance=~\"$instance\"}[5m])) by (instance)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{instance}}`}} pod", + "refId": "A" + }, + { + "expr": "sum(rate(kubelet_pod_worker_duration_seconds_count{job=\"kubelet\",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{job=\"kubelet\",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{job=\"kubelet\",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{job=\"kubelet\",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{job=\"kubelet\",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{job=\"kubelet\", 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{job=\"kubelet\", 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{job=\"kubelet\", 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{job=\"kubelet\", 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{job=\"kubelet\",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{job=\"kubelet\",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{job=\"kubelet\", instance=~\"$instance\",code=~\"2..\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "2xx", + "refId": "A" + }, + { + "expr": "sum(rate(rest_client_requests_total{job=\"kubelet\", instance=~\"$instance\",code=~\"3..\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "3xx", + "refId": "B" + }, + { + "expr": "sum(rate(rest_client_requests_total{job=\"kubelet\", instance=~\"$instance\",code=~\"4..\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "4xx", + "refId": "C" + }, + { + "expr": "sum(rate(rest_client_requests_total{job=\"kubelet\", 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{job=\"kubelet\", 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{job=\"kubelet\",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{job=\"kubelet\",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{job=\"kubelet\",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": "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": true, + "label": null, + "multi": false, + "name": "instance", + "options": [ + + ], + "query": "label_values(kubelet_runtime_operations{job=\"kubelet\"}, 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 / 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/node-cluster-rsrc-use.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/node-cluster-rsrc-use.yaml new file mode 100755 index 000000000..4fdba5be5 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/node-cluster-rsrc-use.yaml @@ -0,0 +1,959 @@ +# Generated from 'node-cluster-rsrc-use' 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 "<1.16.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.nodeExporter.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "node-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: + 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/ ignoring (instance) group_left\n sum without (instance) (instance:node_num_cpu:sum{job=\"node-exporter\"})\n)\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": "(\n instance:node_load1_per_cpu:ratio{job=\"node-exporter\"}\n/ ignoring (instance) group_left\n count without (instance) (instance:node_load1_per_cpu:ratio{job=\"node-exporter\"})\n)\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": "(\n instance:node_memory_utilisation:ratio{job=\"node-exporter\"}\n/ ignoring (instance) group_left\n count without (instance) (instance:node_memory_utilisation:ratio{job=\"node-exporter\"})\n)\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_memory_swap_io_pages: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 (Swapped Pages)", + "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": "(\n instance_device:node_disk_io_time_seconds:rate1m{job=\"node-exporter\"}\n/ ignoring (instance, device) group_left\n count without (instance, device) (instance_device:node_disk_io_time_seconds:rate1m{job=\"node-exporter\"})\n)\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": "(\n instance_device:node_disk_io_time_weighted_seconds:rate1m{job=\"node-exporter\"}\n/ ignoring (instance, device) group_left\n count without (instance, device) (instance_device:node_disk_io_time_weighted_seconds:rate1m{job=\"node-exporter\"})\n)\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": "(\n 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/ ignoring (instance) group_left\n sum without (instance, device) (\n max without (fstype, mountpoint) (\n node_filesystem_size_bytes{job=\"node-exporter\", fstype!=\"\"}\n )\n )\n) \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": "Prometheus", + "value": "Prometheus" + }, + "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 + } +{{- 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 new file mode 100755 index 000000000..9eaaec94e --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/node-rsrc-use.yaml @@ -0,0 +1,986 @@ +# Generated from 'node-rsrc-use' 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 "<1.16.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.nodeExporter.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "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: + 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_memory_swap_io_pages:rate1m{job=\"node-exporter\", instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Swap IO", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Saturation (pages swapped per second)", + "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": "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": "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 + } +{{- 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 new file mode 100755 index 000000000..9d04fb5fa --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/nodes.yaml @@ -0,0 +1,982 @@ +# Generated from 'nodes' 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 "<1.16.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + 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": 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-.+\"}[$__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-.+\"}[$__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-.+\"}[$__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 + } +{{- 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 new file mode 100755 index 000000000..8b64c4f20 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml @@ -0,0 +1,568 @@ +# Generated from 'persistentvolumesusage' 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 "<1.16.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + 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-1.14/pods.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/pods.yaml new file mode 100755 index 000000000..27d7f0246 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/pods.yaml @@ -0,0 +1,675 @@ +# 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 "<1.16.0-0" $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": 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-1.14/prometheus-remote-write.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/prometheus-remote-write.yaml new file mode 100755 index 000000000..7f7c728a9 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/prometheus-remote-write.yaml @@ -0,0 +1,971 @@ +# Generated from 'prometheus-remote-write' 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 "<1.16.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "prometheus-remote-write" | 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: + prometheus-remote-write.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": "prometheus_remote_storage_highest_timestamp_in_seconds{cluster=~\"$cluster\", instance=~\"$instance\"} - ignoring(queue) group_right(instance) prometheus_remote_storage_queue_highest_sent_timestamp_seconds{cluster=~\"$cluster\", instance=~\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{cluster}}`}}:{{`{{instance}}`}}-{{`{{queue}}`}}", + "legendLink": null, + "step": 10 + } + ], + "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": "s", + "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": "rate(prometheus_remote_storage_highest_timestamp_in_seconds{cluster=~\"$cluster\", instance=~\"$instance\"}[5m]) - ignoring (queue) group_right(instance) rate(prometheus_remote_storage_queue_highest_sent_timestamp_seconds{cluster=~\"$cluster\", instance=~\"$instance\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{cluster}}`}}:{{`{{instance}}`}}-{{`{{queue}}`}}", + "legendLink": null, + "step": 10 + } + ], + "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": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Timestamps", + "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, + "targets": [ + { + "expr": "rate(prometheus_remote_storage_samples_in_total{cluster=~\"$cluster\", instance=~\"$instance\"}[5m])- ignoring(queue) group_right(instance) rate(prometheus_remote_storage_succeeded_samples_total{cluster=~\"$cluster\", instance=~\"$instance\"}[5m]) - rate(prometheus_remote_storage_dropped_samples_total{cluster=~\"$cluster\", instance=~\"$instance\"}[5m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{cluster}}`}}:{{`{{instance}}`}}-{{`{{queue}}`}}", + "legendLink": null, + "step": 10 + } + ], + "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": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Samples", + "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": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "prometheus_remote_storage_shards{cluster=~\"$cluster\", instance=~\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{cluster}}`}}:{{`{{instance}}`}}-{{`{{queue}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "Num. 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": 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": 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": "prometheus_remote_storage_shard_capacity{cluster=~\"$cluster\", instance=~\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{cluster}}`}}:{{`{{instance}}`}}-{{`{{queue}}`}}", + "legendLink": null, + "step": 10 + } + ], + "thresholds": [ + + ], + "timeFrom": null, + "timeShift": null, + "title": "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": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Shards", + "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": 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}}`}}-{{`{{queue}}`}}", + "legendLink": null, + "step": 10 + } + ], + "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": 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": 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": 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}}`}}-{{`{{queue}}`}}", + "legendLink": null, + "step": 10 + } + ], + "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": 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": 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}}`}}-{{`{{queue}}`}}", + "legendLink": null, + "step": 10 + } + ], + "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": 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": 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": 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}}`}}-{{`{{queue}}`}}", + "legendLink": null, + "step": 10 + } + ], + "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": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Misc Rates.", + "titleSize": "h6" + } + ], + "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": { + "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 + }, + { + "allValue": null, + "current": { + "selected": true, + "text": "All", + "value": "$__all" + }, + "datasource": "$datasource", + "hide": 0, + "includeAll": true, + "label": "cluster", + "multi": true, + "name": "cluster", + "options": [ + + ], + "query": "label_values(kube_pod_container_info{image=~\".*prometheus.*\"}, 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": "utc", + "title": "Prometheus Remote Write", + "uid": "", + "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 new file mode 100755 index 000000000..582df6568 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/prometheus.yaml @@ -0,0 +1,1217 @@ +# Generated from 'prometheus' 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 "<1.16.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "prometheus" | 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: + 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": "Prometheus", + "value": "Prometheus" + }, + "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 + } +{{- 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 new file mode 100755 index 000000000..7f32d1586 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/proxy.yaml @@ -0,0 +1,1206 @@ +# Generated from 'proxy' 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 "<1.16.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.kubeProxy.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "proxy" | 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: + proxy.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": "", + "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": "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": 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": 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 / 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 new file mode 100755 index 000000000..dd7a3985d --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/scheduler.yaml @@ -0,0 +1,1053 @@ +# Generated from 'scheduler' 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 "<1.16.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.kubeScheduler.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "scheduler" | 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: + scheduler.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": "", + "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": "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": true, + "label": null, + "multi": false, + "name": "instance", + "options": [ + + ], + "query": "label_values(process_cpu_seconds_total{job=\"kube-scheduler\"}, 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 / 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 new file mode 100755 index 000000000..97be31a0a --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/statefulset.yaml @@ -0,0 +1,921 @@ +# 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 "<1.16.0-0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + 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=~\"$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=~\"$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=~\"$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": "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\", 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": "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": 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/dashboards/etcd.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/etcd.yaml new file mode 100755 index 000000000..81fcbbef6 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/etcd.yaml @@ -0,0 +1,1111 @@ +# 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: + 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 new file mode 100755 index 000000000..4610a9d13 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-cluster-rsrc-use.yaml @@ -0,0 +1,954 @@ +# 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: + 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-coredns.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-coredns.yaml new file mode 100755 index 000000000..a35d91e89 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-coredns.yaml @@ -0,0 +1,1324 @@ +# Added manually, can be changed in-place. +{{- $kubeTargetVersion := default .Capabilities.KubeVersion.GitVersion .Values.kubeTargetVersionOverride }} +{{- if and (semverCompare ">=1.11.0" $kubeTargetVersion) (semverCompare "<1.14.0" $kubeTargetVersion) .Values.grafana.enabled .Values.grafana.defaultDashboardsEnabled .Values.coreDns.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" $) "k8s-coredns" | 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-coredns.json: |- + { + "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.", + "editable": true, + "gnetId": 5926, + "graphTooltip": 0, + "id": 9, + "iteration": 1539947521873, + "links": [], + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Prometheus", + "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": "Prometheus", + "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": "Prometheus", + "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": "Prometheus", + "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": "Prometheus", + "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": "Prometheus", + "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": "Prometheus", + "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": "Prometheus", + "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": "Prometheus", + "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": "Prometheus", + "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": "Prometheus", + "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": "Prometheus", + "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": [ + { + "allValue": ".*", + "current": { + "selected": true, + "tags": [], + "text": "172.16.1.8:9153", + "value": "172.16.1.8:9153" + }, + "datasource": "Prometheus", + "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 + } +{{- end }} 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 new file mode 100755 index 000000000..ab29dcae7 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-node-rsrc-use.yaml @@ -0,0 +1,981 @@ +# 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: + 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 new file mode 100755 index 000000000..935ff3bd6 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-resources-cluster.yaml @@ -0,0 +1,1474 @@ +# 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: + 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 new file mode 100755 index 000000000..b2debf609 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-resources-namespace.yaml @@ -0,0 +1,958 @@ +# 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: + 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 new file mode 100755 index 000000000..1771bb5d4 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-resources-pod.yaml @@ -0,0 +1,1001 @@ +# 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: + 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 new file mode 100755 index 000000000..2e5625bec --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-resources-workload.yaml @@ -0,0 +1,931 @@ +# 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: + 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 new file mode 100755 index 000000000..4755cb1c4 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-resources-workloads-namespace.yaml @@ -0,0 +1,967 @@ +# 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: + 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 new file mode 100755 index 000000000..a283fc8bd --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/nodes.yaml @@ -0,0 +1,1378 @@ +# 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: + 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 new file mode 100755 index 000000000..89f60631e --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/persistentvolumesusage.yaml @@ -0,0 +1,568 @@ +# 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: + 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 new file mode 100755 index 000000000..685872ab8 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/pods.yaml @@ -0,0 +1,675 @@ +# 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: + 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 new file mode 100755 index 000000000..942d09cb3 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/statefulset.yaml @@ -0,0 +1,921 @@ +# 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: + 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 new file mode 100755 index 000000000..a7bf866fd --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/servicemonitor.yaml @@ -0,0 +1,32 @@ +{{- if and .Values.grafana.enabled .Values.grafana.serviceMonitor.selfMonitor }} +apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +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: grafana + release: {{ .Release.Name | quote }} + namespaceSelector: + matchNames: + - {{ .Release.Namespace | quote }} + endpoints: + - port: service + {{- 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/clusterrole.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/clusterrole.yaml new file mode 100755 index 000000000..ba5e2701a --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/clusterrole.yaml @@ -0,0 +1,29 @@ +{{- if and .Values.prometheusOperator.admissionWebhooks.enabled .Values.prometheusOperator.admissionWebhooks.patch.enabled .Values.global.rbac.create }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ template "prometheus-operator.fullname" . }}-admission + namespace: {{ .Release.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 }} +rules: + - apiGroups: + - admissionregistration.k8s.io + resources: + - validatingwebhookconfigurations + - mutatingwebhookconfigurations + verbs: + - get + - update +{{- if .Values.global.rbac.pspEnabled }} + - apiGroups: ['extensions'] + resources: ['podsecuritypolicies'] + verbs: ['use'] + resourceNames: + - {{ template "prometheus-operator.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 new file mode 100755 index 000000000..eb16c0ece --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/clusterrolebinding.yaml @@ -0,0 +1,21 @@ +{{- if and .Values.prometheusOperator.admissionWebhooks.enabled .Values.prometheusOperator.admissionWebhooks.patch.enabled .Values.global.rbac.create }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ template "prometheus-operator.fullname" . }}-admission + namespace: {{ .Release.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 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ template "prometheus-operator.fullname" . }}-admission +subjects: + - kind: ServiceAccount + name: {{ template "prometheus-operator.fullname" . }}-admission + namespace: {{ .Release.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 new file mode 100755 index 000000000..ba3f75dfc --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/job-createSecret.yaml @@ -0,0 +1,50 @@ +{{- if and .Values.prometheusOperator.admissionWebhooks.enabled .Values.prometheusOperator.admissionWebhooks.patch.enabled }} +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ template "prometheus-operator.fullname" . }}-admission-create + namespace: {{ .Release.Namespace }} + annotations: + "helm.sh/hook": pre-install,pre-upgrade + "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded + labels: + app: {{ template "prometheus-operator.name" $ }}-admission-create +{{- include "prometheus-operator.labels" $ | indent 4 }} +spec: + {{- if .Capabilities.APIVersions.Has "batch/v1alpha1" }} + # Alpha feature since k8s 1.12 + ttlSecondsAfterFinished: 0 + {{- end }} + template: + metadata: + name: {{ template "prometheus-operator.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 }} + 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 }} + 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 + restartPolicy: OnFailure + serviceAccountName: {{ template "prometheus-operator.fullname" . }}-admission + {{- with .Values.prometheusOperator.admissionWebhooks.patch.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + securityContext: + runAsNonRoot: true + runAsUser: 2000 +{{- 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 new file mode 100755 index 000000000..8af854e4a --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/job-patchWebhook.yaml @@ -0,0 +1,51 @@ +{{- if and .Values.prometheusOperator.admissionWebhooks.enabled .Values.prometheusOperator.admissionWebhooks.patch.enabled }} +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ template "prometheus-operator.fullname" . }}-admission-patch + namespace: {{ .Release.Namespace }} + annotations: + "helm.sh/hook": post-install,post-upgrade + "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded + labels: + app: {{ template "prometheus-operator.name" $ }}-admission-patch +{{- include "prometheus-operator.labels" $ | indent 4 }} +spec: + {{- if .Capabilities.APIVersions.Has "batch/v1alpha1" }} + # Alpha feature since k8s 1.12 + ttlSecondsAfterFinished: 0 + {{- end }} + template: + metadata: + name: {{ template "prometheus-operator.fullname" . }}-admission-patch +{{- with .Values.prometheusOperator.admissionWebhooks.patch.podAnnotations }} + annotations: +{{ toYaml . | indent 8 }} +{{- end }} + labels: + app: {{ template "prometheus-operator.name" $ }}-admission-patch +{{- include "prometheus-operator.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 }} + args: + - patch + - --webhook-name={{ template "prometheus-operator.fullname" . }}-admission + - --namespace={{ .Release.Namespace }} + - --secret-name={{ template "prometheus-operator.fullname" . }}-admission + - --patch-failure-policy={{ .Values.prometheusOperator.admissionWebhooks.failurePolicy }} + restartPolicy: OnFailure + serviceAccountName: {{ template "prometheus-operator.fullname" . }}-admission + {{- with .Values.prometheusOperator.admissionWebhooks.patch.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + securityContext: + runAsNonRoot: true + runAsUser: 2000 +{{- 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 new file mode 100755 index 000000000..e40e58435 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/psp.yaml @@ -0,0 +1,51 @@ +{{- if and .Values.prometheusOperator.admissionWebhooks.enabled .Values.prometheusOperator.admissionWebhooks.patch.enabled .Values.global.rbac.create .Values.global.rbac.pspEnabled }} +apiVersion: policy/v1beta1 +kind: PodSecurityPolicy +metadata: + name: {{ template "prometheus-operator.fullname" . }}-admission + namespace: {{ .Release.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 }} +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' + - 'emptyDir' + - 'projected' + - 'secret' + - 'downwardAPI' + - 'persistentVolumeClaim' + hostNetwork: false + hostIPC: false + hostPID: false + runAsUser: + # Permits the container to run with root privileges as well. + rule: 'RunAsAny' + seLinux: + # This policy assumes the nodes are using AppArmor rather than SELinux. + rule: 'RunAsAny' + supplementalGroups: + rule: 'MustRunAs' + ranges: + # Forbid adding the root group. + - min: 0 + max: 65535 + fsGroup: + rule: 'MustRunAs' + ranges: + # Forbid adding the root group. + - min: 0 + max: 65535 + readOnlyRootFilesystem: false +{{- end }} 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 new file mode 100755 index 000000000..e067bcc94 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/role.yaml @@ -0,0 +1,21 @@ +{{- if and .Values.prometheusOperator.admissionWebhooks.enabled .Values.prometheusOperator.admissionWebhooks.patch.enabled .Values.global.rbac.create }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ template "prometheus-operator.fullname" . }}-admission + namespace: {{ .Release.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 }} +rules: + - apiGroups: + - "" + resources: + - secrets + verbs: + - get + - create +{{- end }} 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 new file mode 100755 index 000000000..3ed31c2ca --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/rolebinding.yaml @@ -0,0 +1,21 @@ +{{- if and .Values.prometheusOperator.admissionWebhooks.enabled .Values.prometheusOperator.admissionWebhooks.patch.enabled .Values.global.rbac.create }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ template "prometheus-operator.fullname" . }}-admission + namespace: {{ .Release.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 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ template "prometheus-operator.fullname" . }}-admission +subjects: + - kind: ServiceAccount + name: {{ template "prometheus-operator.fullname" . }}-admission + namespace: {{ .Release.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 new file mode 100755 index 000000000..a8b47da20 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/serviceaccount.yaml @@ -0,0 +1,13 @@ +{{- if and .Values.prometheusOperator.admissionWebhooks.enabled .Values.prometheusOperator.admissionWebhooks.patch.enabled .Values.global.rbac.create }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template "prometheus-operator.fullname" . }}-admission + namespace: {{ .Release.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 }} +{{- 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 new file mode 100755 index 000000000..749616afc --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/mutatingWebhookConfiguration.yaml @@ -0,0 +1,32 @@ +{{- if and .Values.prometheusOperator.admissionWebhooks.enabled }} +apiVersion: admissionregistration.k8s.io/v1beta1 +kind: MutatingWebhookConfiguration +metadata: + name: {{ template "prometheus-operator.fullname" . }}-admission + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" $ }}-admission +{{- include "prometheus-operator.labels" $ | indent 4 }} +webhooks: + - name: prometheusrulemutate.monitoring.coreos.com + {{- if .Values.prometheusOperator.admissionWebhooks.patch.enabled }} + failurePolicy: Ignore + {{- else }} + failurePolicy: {{ .Values.prometheusOperator.admissionWebhooks.failurePolicy }} + {{- end }} + rules: + - apiGroups: + - {{ .Values.prometheusOperator.crdApiGroup }} + apiVersions: + - "*" + resources: + - prometheusrules + operations: + - CREATE + - UPDATE + clientConfig: + service: + namespace: {{ .Release.Namespace }} + name: {{ template "prometheus-operator.operator.fullname" $ }} + path: /admission-prometheusrules/mutate +{{- 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 new file mode 100755 index 000000000..0dbdddebb --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/validatingWebhookConfiguration.yaml @@ -0,0 +1,32 @@ +{{- if and .Values.prometheusOperator.admissionWebhooks.enabled }} +apiVersion: admissionregistration.k8s.io/v1beta1 +kind: ValidatingWebhookConfiguration +metadata: + name: {{ template "prometheus-operator.fullname" . }}-admission + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" $ }}-admission +{{- include "prometheus-operator.labels" $ | indent 4 }} +webhooks: + - name: prometheusrulemutate.monitoring.coreos.com + {{- if .Values.prometheusOperator.admissionWebhooks.patch.enabled }} + failurePolicy: Ignore + {{- else }} + failurePolicy: {{ .Values.prometheusOperator.admissionWebhooks.failurePolicy }} + {{- end }} + rules: + - apiGroups: + - {{ .Values.prometheusOperator.crdApiGroup }} + apiVersions: + - "*" + resources: + - prometheusrules + operations: + - CREATE + - UPDATE + clientConfig: + service: + namespace: {{ .Release.Namespace }} + name: {{ template "prometheus-operator.operator.fullname" $ }} + path: /admission-prometheusrules/validate +{{- 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 new file mode 100755 index 000000000..b4bdef9fc --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/cleanup-crds.yaml @@ -0,0 +1,44 @@ +{{- 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; + 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 new file mode 100755 index 000000000..932a90430 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/clusterrole.yaml @@ -0,0 +1,76 @@ +{{- if and .Values.prometheusOperator.enabled .Values.global.rbac.create }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ template "prometheus-operator.fullname" . }}-operator + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-operator +{{ include "prometheus-operator.labels" . | indent 4 }} +rules: +- apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions + verbs: + - '*' +- apiGroups: + - {{ .Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com" }} + resources: + - alertmanagers + - prometheuses + - prometheuses/finalizers + - alertmanagers/finalizers + - servicemonitors + - podmonitors + - prometheusrules + - podmonitors + verbs: + - '*' +- apiGroups: + - apps + resources: + - statefulsets + verbs: + - '*' +- apiGroups: + - "" + resources: + - configmaps + - secrets + verbs: + - '*' +- apiGroups: + - "" + resources: + - pods + verbs: + - list + - delete +- apiGroups: + - "" + resources: + - services + - services/finalizers + - endpoints + verbs: + - get + - create + - update + - delete +- apiGroups: + - "" + resources: + - nodes + verbs: + - list + - watch +- apiGroups: + - "" + resources: + - namespaces + verbs: + - get + - list + - watch +{{- 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 new file mode 100755 index 000000000..28f15462c --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/clusterrolebinding.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.prometheusOperator.enabled .Values.global.rbac.create }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ template "prometheus-operator.fullname" . }}-operator + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-operator +{{ include "prometheus-operator.labels" . | indent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ template "prometheus-operator.fullname" . }}-operator +subjects: +- kind: ServiceAccount + name: {{ template "prometheus-operator.operator.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} +{{- end }} diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/crd-alertmanager.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/crd-alertmanager.yaml new file mode 100755 index 000000000..f39271b54 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/crd-alertmanager.yaml @@ -0,0 +1,2407 @@ +{{- if and .Values.prometheusOperator.enabled .Values.prometheusOperator.createCustomResource -}} +# Source https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/0prometheus-operator-0alertmanagerCustomResourceDefinition.yaml +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + creationTimestamp: null + name: {{ printf "alertmanagers.%s" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-operator +{{ include "prometheus-operator.labels" . | indent 4 }} + annotations: +{{- if .Values.prometheusOperator.cleanupCustomResourceBeforeInstall }} + "helm.sh/hook-delete-policy": "before-hook-creation" +{{- end }} + "helm.sh/hook": crd-install +spec: + group: {{ .Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com" }} + names: + kind: Alertmanager + plural: alertmanagers + scope: Namespaced + validation: + openAPIV3Schema: + 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/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/api-conventions.md#types-kinds' + type: string + spec: + description: 'AlertmanagerSpec is a specification of the desired behavior + of the Alertmanager cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/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: Affinity is a group of affinity scheduling rules. + properties: + nodeAffinity: + description: Node affinity is a group of node affinity scheduling + rules. + 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 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: 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: array + weight: + description: Weight associated with matching the corresponding + nodeSelectorTerm, in the range 1-100. + format: int32 + type: integer + required: + - weight + - preference + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: A node selector represents the union of the results + of one or more label queries over a set of nodes; that is, + it represents the OR of the selectors represented by the node + selector terms. + 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: 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: array + type: array + required: + - nodeSelectorTerms + podAffinity: + description: Pod affinity is a group of inter pod affinity scheduling + rules. + 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: 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 selector is a label query over + a set of resources. The result of matchLabels and + matchExpressions are ANDed. 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: array + matchLabels: + 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 + 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 + weight: + description: weight associated with matching the corresponding + podAffinityTerm, in the range 1-100. + format: int32 + type: integer + required: + - weight + - podAffinityTerm + 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 selector is a label query over a + set of resources. The result of matchLabels and matchExpressions + are ANDed. 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: array + matchLabels: + 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 + 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: array + podAntiAffinity: + description: Pod anti affinity is a group of inter pod anti affinity + scheduling rules. + 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: 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 selector is a label query over + a set of resources. The result of matchLabels and + matchExpressions are ANDed. 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: array + matchLabels: + 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 + 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 + weight: + description: weight associated with matching the corresponding + podAffinityTerm, in the range 1-100. + format: int32 + type: integer + required: + - weight + - podAffinityTerm + 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 selector is a label query over a + set of resources. The result of matchLabels and matchExpressions + are ANDed. 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: array + matchLabels: + 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 + 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: array + 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 + 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: EnvVarSource represents a source for the value + of an EnvVar. + properties: + configMapKeyRef: + description: Selects a key from 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' + type: string + optional: + description: Specify whether the ConfigMap or it's + key must be defined + type: boolean + required: + - key + fieldRef: + description: ObjectFieldSelector selects an APIVersioned + field of an object. + 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 + resourceFieldRef: + description: ResourceFieldSelector represents container + resources (cpu, memory) and their output format + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: {} + resource: + description: 'Required: resource to select' + type: string + required: + - resource + secretKeyRef: + 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' + type: string + optional: + description: Specify whether the Secret or it's + key must be defined + type: boolean + required: + - key + required: + - name + 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: |- + ConfigMapEnvSource selects a ConfigMap to populate the environment variables with. + The contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + prefix: + description: An optional identifier to prepend to each key + in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: |- + SecretEnvSource selects a Secret to populate the environment variables with. + The contents of the target Secret's Data field will represent the key-value pairs as environment variables. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + 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: Lifecycle describes actions that the management system + should take in response to container lifecycle events. For the + PostStart and PreStop lifecycle handlers, management of the + container blocks until the action is complete, unless the container + process fails, in which case the handler is aborted. + properties: + postStart: + description: Handler defines a specific action that should + be taken + properties: + exec: + description: ExecAction describes a "run in container" + action. + 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 + httpGet: + description: HTTPGetAction describes an action based on + HTTP Get requests. + 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: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + tcpSocket: + description: TCPSocketAction describes an action based + on opening a socket + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + preStop: + description: Handler defines a specific action that should + be taken + properties: + exec: + description: ExecAction describes a "run in container" + action. + 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 + httpGet: + description: HTTPGetAction describes an action based on + HTTP Get requests. + 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: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + tcpSocket: + description: TCPSocketAction describes an action based + on opening a socket + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + livenessProbe: + description: Probe describes a health check to be performed against + a container to determine whether it is alive or ready to receive + traffic. + properties: + exec: + description: ExecAction describes a "run in container" action. + 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 + 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: HTTPGetAction describes an action based on HTTP + Get requests. + 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: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + 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. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocketAction describes an action based on + opening a socket + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + 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 + 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: array + readinessProbe: + description: Probe describes a health check to be performed against + a container to determine whether it is alive or ready to receive + traffic. + properties: + exec: + description: ExecAction describes a "run in container" action. + 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 + 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: HTTPGetAction describes an action based on HTTP + Get requests. + 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: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + 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. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocketAction describes an action based on + opening a socket + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + 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 + resources: + description: ResourceRequirements describes the compute resource + requirements. + properties: + limits: + 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: + 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 + securityContext: + description: SecurityContext holds security configuration that + will be applied to a container. Some fields are present in both + SecurityContext and PodSecurityContext. When both are set, + the values in SecurityContext take precedence. + 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: Adds and removes POSIX capabilities from running + containers. + properties: + add: + description: Added capabilities + items: + type: string + type: array + drop: + description: Removed capabilities + items: + type: string + type: array + 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: SELinuxOptions are the labels to be applied to + the 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 + 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: + - name + - devicePath + 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 + required: + - name + - mountPath + 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: 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' + type: string + 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 + logLevel: + description: Log level for Alertmanager to be configured with. + type: string + nodeSelector: + 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: ObjectMeta is metadata that all persisted resources must + have, which includes all objects users must create. + properties: + annotations: + 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 + clusterName: + description: The name of the cluster which the object belongs to. + This is used to distinguish resources with same name and namespace + in different clusters. This field is not set anywhere right now + and apiserver is going to ignore it if set in create or update + request. + type: string + creationTimestamp: + description: Time is a wrapper around time.Time which supports correct + marshaling to YAML and JSON. Wrappers are provided for many of + the factory methods that the time package offers. + format: date-time + type: string + deletionGracePeriodSeconds: + description: Number of seconds allowed for this object to gracefully + terminate before it will be removed from the system. Only set + when deletionTimestamp is also set. May only be shortened. Read-only. + format: int64 + type: integer + deletionTimestamp: + description: Time is a wrapper around time.Time which supports correct + marshaling to YAML and JSON. Wrappers are provided for many of + the factory methods that the time package offers. + format: date-time + type: string + finalizers: + description: Must be empty before the object is deleted from the + registry. Each entry is an identifier for the responsible component + that will remove the entry from the list. If the deletionTimestamp + of the object is non-nil, entries in this list can only be removed. + items: + type: string + type: array + generateName: + description: |- + GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server. + If this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). + Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency + type: string + generation: + description: A sequence number representing a specific generation + of the desired state. Populated by the system. Read-only. + format: int64 + type: integer + initializers: + description: Initializers tracks the progress of initialization. + properties: + pending: + description: Pending is a list of initializers that must execute + in order before this object is visible. When the last pending + initializer is removed, and no failing result is set, the + initializers struct will be set to nil and the object is considered + as initialized and visible to all clients. + items: + description: Initializer is information about an initializer + that has not yet completed. + properties: + name: + description: name of the process that is responsible for + initializing this object. + type: string + required: + - name + type: array + result: + description: Status is a return value for calls that don't return + other objects. + 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/api-conventions.md#resources' + type: string + code: + description: Suggested HTTP return code for this status, + 0 if not set. + format: int32 + type: integer + details: + description: StatusDetails is a set of additional properties + that MAY be set by the server to provide additional information + about a response. The Reason field of a Status object + defines what attributes will be set. Clients must ignore + fields that do not match the defined type of each attribute, + and should assume that any attribute may be empty, invalid, + or under defined. + properties: + causes: + description: The Causes array includes more details + associated with the StatusReason failure. Not all + StatusReasons may provide detailed causes. + items: + description: StatusCause provides more information + about an api.Status failure, including cases when + multiple errors are encountered. + properties: + field: + description: |- + The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional. + Examples: + "name" - the field "name" on the current resource + "items[0].name" - the field "name" on the first array entry in "items" + type: string + message: + description: A human-readable description of the + cause of the error. This field may be presented + as-is to a reader. + type: string + reason: + description: A machine-readable description of + the cause of the error. If this value is empty + there is no information available. + type: string + type: array + group: + description: The group attribute of the resource associated + with the status StatusReason. + type: string + kind: + description: 'The kind attribute of the resource associated + with the status StatusReason. On some operations may + differ from the requested resource Kind. More info: + https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + name: + description: The name attribute of the resource associated + with the status StatusReason (when there is a single + name which can be described). + type: string + retryAfterSeconds: + description: If specified, the time in seconds before + the operation should be retried. Some errors may indicate + the client must take an alternate action - for those + errors this field may indicate how long to wait before + taking the alternate action. + format: int32 + type: integer + uid: + description: 'UID of the resource. (when there is a + single resource which can be described). More info: + http://kubernetes.io/docs/user-guide/identifiers#uids' + 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/api-conventions.md#types-kinds' + type: string + message: + description: A human-readable description of the status + of this operation. + type: string + metadata: + description: ListMeta describes metadata that synthetic + resources must have, including lists and various status + objects. A resource may have only one of {ObjectMeta, + ListMeta}. + properties: + continue: + description: continue may be set if the user set a limit + on the number of items returned, and indicates that + the server has more data available. The value is opaque + and may be used to issue another request to the endpoint + that served this list to retrieve the next set of + available objects. Continuing a consistent list may + not be possible if the server configuration has changed + or more than a few minutes have passed. The resourceVersion + field returned when using this continue value will + be identical to the value in the first response, unless + you have received this token from an error message. + type: string + resourceVersion: + description: 'String that identifies the server''s internal + version of this object that can be used by clients + to determine when objects have changed. Value must + be treated as opaque by clients and passed unmodified + back to the server. Populated by the system. Read-only. + More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency' + type: string + selfLink: + description: selfLink is a URL representing this object. + Populated by the system. Read-only. + type: string + reason: + description: A machine-readable description of why this + operation is in the "Failure" status. If this value is + empty there is no information available. A Reason clarifies + an HTTP status code but does not override it. + type: string + status: + description: 'Status of the operation. One of: "Success" + or "Failure". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status' + type: string + required: + - pending + labels: + 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 + namespace: + description: |- + Namespace defines the space within each name must be unique. An empty namespace is equivalent to the "default" namespace, but "default" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty. + Must be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces + type: string + ownerReferences: + description: List of objects depended by this object. If ALL objects + in the list have been deleted, this object will be garbage collected. + If this object is managed by a controller, then an entry in this + list will point to this controller, with the controller field + set to true. There cannot be more than one managing controller. + items: + description: OwnerReference contains enough information to let + you identify an owning object. An owning object must be in the + same namespace as the dependent, or be cluster-scoped, so there + is no namespace field. + properties: + apiVersion: + description: API version of the referent. + type: string + blockOwnerDeletion: + description: If true, AND if the owner has the "foregroundDeletion" + finalizer, then the owner cannot be deleted from the key-value + store until this reference is removed. Defaults to false. + To set this field, a user needs "delete" permission of the + owner, otherwise 422 (Unprocessable Entity) will be returned. + type: boolean + controller: + description: If true, this reference points to the managing + controller. + type: boolean + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names' + type: string + uid: + description: 'UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids' + type: string + required: + - apiVersion + - kind + - name + - uid + type: array + resourceVersion: + description: |- + An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources. + Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency + type: string + selfLink: + description: SelfLink is a URL representing this object. Populated + by the system. Read-only. + type: string + uid: + description: |- + UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations. + Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids + 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: ResourceRequirements describes the compute resource requirements. + properties: + limits: + 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: + 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 + 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: PodSecurityContext holds pod-level security attributes + and common container settings. Some fields are also present in container.securityContext. Field + values of container.securityContext take precedence over field values + of 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: + 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---- + 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: SELinuxOptions are the labels to be applied to the + 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 + 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: array + 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: StorageSpec defines the configured storage for a group + Prometheus servers. If neither `emptyDir` nor `volumeClaimTemplate` + is specified, then by default an [EmptyDir](https://kubernetes.io/docs/concepts/storage/volumes/#emptydir) + will be used. + properties: + emptyDir: + description: Represents an empty directory for a pod. Empty directory + volumes support ownership management and SELinux relabeling. + 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: {} + volumeClaimTemplate: + description: PersistentVolumeClaim is a user's request for and claim + to a persistent volume + 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/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/api-conventions.md#types-kinds' + type: string + metadata: + description: ObjectMeta is metadata that all persisted resources + must have, which includes all objects users must create. + properties: + annotations: + 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 + clusterName: + description: The name of the cluster which the object belongs + to. This is used to distinguish resources with same name + and namespace in different clusters. This field is not + set anywhere right now and apiserver is going to ignore + it if set in create or update request. + type: string + creationTimestamp: + description: Time is a wrapper around time.Time which supports + correct marshaling to YAML and JSON. Wrappers are provided + for many of the factory methods that the time package + offers. + format: date-time + type: string + deletionGracePeriodSeconds: + description: Number of seconds allowed for this object to + gracefully terminate before it will be removed from the + system. Only set when deletionTimestamp is also set. May + only be shortened. Read-only. + format: int64 + type: integer + deletionTimestamp: + description: Time is a wrapper around time.Time which supports + correct marshaling to YAML and JSON. Wrappers are provided + for many of the factory methods that the time package + offers. + format: date-time + type: string + finalizers: + description: Must be empty before the object is deleted + from the registry. Each entry is an identifier for the + responsible component that will remove the entry from + the list. If the deletionTimestamp of the object is non-nil, + entries in this list can only be removed. + items: + type: string + type: array + generateName: + description: |- + GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server. + If this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). + Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency + type: string + generation: + description: A sequence number representing a specific generation + of the desired state. Populated by the system. Read-only. + format: int64 + type: integer + initializers: + description: Initializers tracks the progress of initialization. + properties: + pending: + description: Pending is a list of initializers that + must execute in order before this object is visible. + When the last pending initializer is removed, and + no failing result is set, the initializers struct + will be set to nil and the object is considered as + initialized and visible to all clients. + items: + description: Initializer is information about an initializer + that has not yet completed. + properties: + name: + description: name of the process that is responsible + for initializing this object. + type: string + required: + - name + type: array + result: + description: Status is a return value for calls that + don't return other objects. + 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/api-conventions.md#resources' + type: string + code: + description: Suggested HTTP return code for this + status, 0 if not set. + format: int32 + type: integer + details: + description: StatusDetails is a set of additional + properties that MAY be set by the server to provide + additional information about a response. The Reason + field of a Status object defines what attributes + will be set. Clients must ignore fields that do + not match the defined type of each attribute, + and should assume that any attribute may be empty, + invalid, or under defined. + properties: + causes: + description: The Causes array includes more + details associated with the StatusReason failure. + Not all StatusReasons may provide detailed + causes. + items: + description: StatusCause provides more information + about an api.Status failure, including cases + when multiple errors are encountered. + properties: + field: + description: |- + The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional. + Examples: + "name" - the field "name" on the current resource + "items[0].name" - the field "name" on the first array entry in "items" + type: string + message: + description: A human-readable description + of the cause of the error. This field + may be presented as-is to a reader. + type: string + reason: + description: A machine-readable description + of the cause of the error. If this value + is empty there is no information available. + type: string + type: array + group: + description: The group attribute of the resource + associated with the status StatusReason. + type: string + kind: + description: 'The kind attribute of the resource + associated with the status StatusReason. On + some operations may differ from the requested + resource Kind. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + name: + description: The name attribute of the resource + associated with the status StatusReason (when + there is a single name which can be described). + type: string + retryAfterSeconds: + description: If specified, the time in seconds + before the operation should be retried. Some + errors may indicate the client must take an + alternate action - for those errors this field + may indicate how long to wait before taking + the alternate action. + format: int32 + type: integer + uid: + description: 'UID of the resource. (when there + is a single resource which can be described). + More info: http://kubernetes.io/docs/user-guide/identifiers#uids' + 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/api-conventions.md#types-kinds' + type: string + message: + description: A human-readable description of the + status of this operation. + type: string + metadata: + description: ListMeta describes metadata that synthetic + resources must have, including lists and various + status objects. A resource may have only one of + {ObjectMeta, ListMeta}. + properties: + continue: + description: continue may be set if the user + set a limit on the number of items returned, + and indicates that the server has more data + available. The value is opaque and may be + used to issue another request to the endpoint + that served this list to retrieve the next + set of available objects. Continuing a consistent + list may not be possible if the server configuration + has changed or more than a few minutes have + passed. The resourceVersion field returned + when using this continue value will be identical + to the value in the first response, unless + you have received this token from an error + message. + type: string + resourceVersion: + description: 'String that identifies the server''s + internal version of this object that can be + used by clients to determine when objects + have changed. Value must be treated as opaque + by clients and passed unmodified back to the + server. Populated by the system. Read-only. + More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency' + type: string + selfLink: + description: selfLink is a URL representing + this object. Populated by the system. Read-only. + type: string + reason: + description: A machine-readable description of why + this operation is in the "Failure" status. If + this value is empty there is no information available. + A Reason clarifies an HTTP status code but does + not override it. + type: string + status: + description: 'Status of the operation. One of: "Success" + or "Failure". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status' + type: string + required: + - pending + labels: + 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 + namespace: + description: |- + Namespace defines the space within each name must be unique. An empty namespace is equivalent to the "default" namespace, but "default" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty. + Must be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces + type: string + ownerReferences: + description: List of objects depended by this object. If + ALL objects in the list have been deleted, this object + will be garbage collected. If this object is managed by + a controller, then an entry in this list will point to + this controller, with the controller field set to true. + There cannot be more than one managing controller. + items: + description: OwnerReference contains enough information + to let you identify an owning object. An owning object + must be in the same namespace as the dependent, or be + cluster-scoped, so there is no namespace field. + properties: + apiVersion: + description: API version of the referent. + type: string + blockOwnerDeletion: + description: If true, AND if the owner has the "foregroundDeletion" + finalizer, then the owner cannot be deleted from + the key-value store until this reference is removed. + Defaults to false. To set this field, a user needs + "delete" permission of the owner, otherwise 422 + (Unprocessable Entity) will be returned. + type: boolean + controller: + description: If true, this reference points to the + managing controller. + type: boolean + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names' + type: string + uid: + description: 'UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids' + type: string + required: + - apiVersion + - kind + - name + - uid + type: array + resourceVersion: + description: |- + An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources. + Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency + type: string + selfLink: + description: SelfLink is a URL representing this object. + Populated by the system. Read-only. + type: string + uid: + description: |- + UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations. + Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids + type: string + spec: + description: PersistentVolumeClaimSpec describes the common + attributes of storage devices and allows a Source for provider-specific + attributes + 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: TypedLocalObjectReference contains enough information + to let you locate the typed referenced object inside the + same namespace. + 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 + resources: + description: ResourceRequirements describes the compute + resource requirements. + properties: + limits: + 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: + 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 + selector: + description: A label selector is a label query over a set + of resources. The result of matchLabels and matchExpressions + are ANDed. 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: array + matchLabels: + 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 + 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 + status: + description: PersistentVolumeClaimStatus is the current status + of a persistent volume claim. + 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: + 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: Time is a wrapper around time.Time which + supports correct marshaling to YAML and JSON. Wrappers + are provided for many of the factory methods that + the time package offers. + format: date-time + type: string + lastTransitionTime: + description: Time is a wrapper around time.Time which + supports correct marshaling to YAML and JSON. Wrappers + are provided for many of the factory methods that + the time package offers. + 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: + type: string + required: + - type + - status + type: array + phase: + description: Phase represents the current phase of PersistentVolumeClaim. + type: string + 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: array + version: + description: Version the cluster should be on. + type: string + status: + description: 'AlertmanagerStatus is the 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/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: + - paused + - replicas + - updatedReplicas + - availableReplicas + - unavailableReplicas + version: v1 +{{- end }} diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/crd-podmonitor.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/crd-podmonitor.yaml new file mode 100755 index 000000000..521dfb7d8 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/crd-podmonitor.yaml @@ -0,0 +1,247 @@ +{{- if and .Values.prometheusOperator.enabled .Values.prometheusOperator.createCustomResource -}} +# Source https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/0prometheus-operator-0podmonitorCustomResourceDefinition.yaml +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + creationTimestamp: null + name: {{ printf "podmonitors.%s" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-operator +{{ include "prometheus-operator.labels" . | indent 4 }} + annotations: +{{- if .Values.prometheusOperator.cleanupCustomResourceBeforeInstall }} + "helm.sh/hook-delete-policy": "before-hook-creation" +{{- end }} + "helm.sh/hook": crd-install +spec: + group: {{ .Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com" }} + names: + kind: PodMonitor + plural: podmonitors + scope: Namespaced + validation: + openAPIV3Schema: + 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/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/api-conventions.md#types-kinds' + type: string + spec: + description: PodMonitorSpec contains specification parameters for a PodMonitor. + properties: + jobLabel: + description: The label to use to retrieve the job name from. + type: string + namespaceSelector: + description: NamespaceSelector is a selector for selecting either all + namespaces or a list of namespaces. + 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 + 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. defailt 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: + description: Optional HTTP URL parameters + type: object + path: + description: HTTP path to scrape for metrics. + type: string + port: + description: Name of the 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. defailt 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: string + - type: integer + 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: A label selector is a label query over a set of resources. + The result of matchLabels and matchExpressions are ANDed. 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: + 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 + type: object + version: v1 +{{- end }} diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/crd-prometheus.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/crd-prometheus.yaml new file mode 100755 index 000000000..dba54cdbc --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/crd-prometheus.yaml @@ -0,0 +1,3458 @@ +{{- if and .Values.prometheusOperator.enabled .Values.prometheusOperator.createCustomResource -}} +# Source https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/0prometheus-operator-0prometheusCustomResourceDefinition.yaml +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + creationTimestamp: null + name: {{ printf "prometheuses.%s" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-operator +{{ include "prometheus-operator.labels" . | indent 4 }} + annotations: +{{- if .Values.prometheusOperator.cleanupCustomResourceBeforeInstall }} + "helm.sh/hook-delete-policy": "before-hook-creation" +{{- end }} + "helm.sh/hook": crd-install +spec: + group: {{ .Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com" }} + names: + kind: Prometheus + plural: prometheuses + scope: Namespaced + validation: + openAPIV3Schema: + 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/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/api-conventions.md#types-kinds' + type: string + spec: + description: 'PrometheusSpec is a specification of the desired behavior + of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status' + properties: + additionalAlertManagerConfigs: + 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' + type: string + optional: + description: Specify whether the Secret or it's key must be defined + type: boolean + required: + - key + type: object + additionalAlertRelabelConfigs: + 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' + type: string + optional: + description: Specify whether the Secret or it's key must be defined + type: boolean + required: + - key + type: object + additionalScrapeConfigs: + 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' + type: string + optional: + description: Specify whether the Secret or it's key must be defined + type: boolean + required: + - key + type: object + affinity: + description: Affinity is a group of affinity scheduling rules. + properties: + nodeAffinity: + description: Node affinity is a group of node affinity scheduling + rules. + 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 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 + weight: + description: Weight associated with matching the corresponding + nodeSelectorTerm, in the range 1-100. + format: int32 + type: integer + required: + - weight + - preference + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: A node selector represents the union of the results + of one or more label queries over a set of nodes; that is, + it represents the OR of the selectors represented by the node + selector terms. + 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: Pod affinity is a group of inter pod affinity scheduling + rules. + 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: 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 selector is a label query over + a set of resources. The result of matchLabels and + matchExpressions are ANDed. 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: + 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: + - weight + - podAffinityTerm + 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 selector is a label query over a + set of resources. The result of matchLabels and matchExpressions + are ANDed. 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: + 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: Pod anti affinity is a group of inter pod anti affinity + scheduling rules. + 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: 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 selector is a label query over + a set of resources. The result of matchLabels and + matchExpressions are ANDed. 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: + 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: + - weight + - podAffinityTerm + 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 selector is a label query over a + set of resources. The result of matchLabels and matchExpressions + are ANDed. 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: + 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: AlertingSpec defines parameters for alerting configuration + of Prometheus servers. + 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: + 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: string + - type: integer + scheme: + description: Scheme to use when firing alerts. + type: string + tlsConfig: + description: TLSConfig specifies TLS configuration parameters. + properties: + caFile: + description: The CA cert to use for the targets. + type: string + certFile: + description: The client cert file for the targets. + type: string + insecureSkipVerify: + description: Disable target certificate validation. + type: boolean + keyFile: + description: The client key file for the targets. + type: string + serverName: + description: Used to verify the hostname for the targets. + type: string + type: object + required: + - namespace + - name + - port + type: object + type: array + required: + - alertmanagers + type: object + apiserverConfig: + description: 'APIServerConfig defines a host and auth methods to access + apiserver. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#kubernetes_sd_config' + properties: + basicAuth: + description: 'BasicAuth allow an endpoint to authenticate over basic + authentication More info: https://prometheus.io/docs/operating/configuration/#endpoints' + properties: + password: + 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' + type: string + optional: + description: Specify whether the Secret or it's key must + be defined + type: boolean + required: + - key + type: object + username: + 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' + type: string + optional: + description: Specify whether the Secret or it's 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: TLSConfig specifies TLS configuration parameters. + properties: + caFile: + description: The CA cert to use for the targets. + type: string + certFile: + description: The client cert file for the targets. + type: string + insecureSkipVerify: + description: Disable target certificate validation. + type: boolean + keyFile: + description: The client key file for the targets. + type: string + serverName: + description: Used to verify the hostname for the targets. + type: string + type: object + required: + - host + 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: EnvVarSource represents a source for the value + of an EnvVar. + properties: + configMapKeyRef: + description: Selects a key from 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' + type: string + optional: + description: Specify whether the ConfigMap or it's + key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: ObjectFieldSelector selects an APIVersioned + field of an object. + 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: ResourceFieldSelector represents container + resources (cpu, memory) and their output format + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: {} + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + 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' + type: string + optional: + description: Specify whether the Secret or it's + 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: |- + ConfigMapEnvSource selects a ConfigMap to populate the environment variables with. + + The contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + 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: |- + SecretEnvSource selects a Secret to populate the environment variables with. + + The contents of the target Secret's Data field will represent the key-value pairs as environment variables. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + 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: Lifecycle describes actions that the management system + should take in response to container lifecycle events. For the + PostStart and PreStop lifecycle handlers, management of the + container blocks until the action is complete, unless the container + process fails, in which case the handler is aborted. + properties: + postStart: + description: Handler defines a specific action that should + be taken + properties: + exec: + description: ExecAction describes a "run in container" + action. + 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: HTTPGetAction describes an action based on + HTTP Get requests. + 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: string + - type: integer + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: TCPSocketAction describes an action based + on opening a socket + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + type: object + type: object + preStop: + description: Handler defines a specific action that should + be taken + properties: + exec: + description: ExecAction describes a "run in container" + action. + 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: HTTPGetAction describes an action based on + HTTP Get requests. + 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: string + - type: integer + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: TCPSocketAction describes an action based + on opening a socket + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + type: object + type: object + type: object + livenessProbe: + description: Probe describes a health check to be performed against + a container to determine whether it is alive or ready to receive + traffic. + properties: + exec: + description: ExecAction describes a "run in container" action. + 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: HTTPGetAction describes an action based on HTTP + Get requests. + 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: string + - type: integer + 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. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocketAction describes an action based on + opening a socket + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: string + - type: integer + 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: Probe describes a health check to be performed against + a container to determine whether it is alive or ready to receive + traffic. + properties: + exec: + description: ExecAction describes a "run in container" action. + 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: HTTPGetAction describes an action based on HTTP + Get requests. + 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: string + - type: integer + 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. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocketAction describes an action based on + opening a socket + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: string + - type: integer + 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: ResourceRequirements describes the compute resource + requirements. + properties: + limits: + 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: + 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: SecurityContext holds security configuration that + will be applied to a container. Some fields are present in both + SecurityContext and PodSecurityContext. When both are set, + the values in SecurityContext take precedence. + 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: Adds and removes POSIX capabilities from running + containers. + properties: + add: + description: Added capabilities + items: + type: string + type: array + drop: + description: Removed capabilities + items: + 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: SELinuxOptions are the labels to be applied to + the 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 + 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: + - name + - devicePath + 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. This field is alpha in 1.14. + type: string + required: + - name + - mountPath + 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 + 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 + evaluationInterval: + description: Interval between consecutive evaluations. + type: string + externalLabels: + 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 + 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' + type: string + 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: + description: Define which Nodes the Pods are scheduled on. + type: object + paused: + description: When a Prometheus deployment is paused, no actions except + for deletion will be performed on the underlying objects. + type: boolean + podMetadata: + description: ObjectMeta is metadata that all persisted resources must + have, which includes all objects users must create. + properties: + annotations: + 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 + clusterName: + description: The name of the cluster which the object belongs to. + This is used to distinguish resources with same name and namespace + in different clusters. This field is not set anywhere right now + and apiserver is going to ignore it if set in create or update + request. + type: string + creationTimestamp: + description: Time is a wrapper around time.Time which supports correct + marshaling to YAML and JSON. Wrappers are provided for many of + the factory methods that the time package offers. + format: date-time + type: string + deletionGracePeriodSeconds: + description: Number of seconds allowed for this object to gracefully + terminate before it will be removed from the system. Only set + when deletionTimestamp is also set. May only be shortened. Read-only. + format: int64 + type: integer + deletionTimestamp: + description: Time is a wrapper around time.Time which supports correct + marshaling to YAML and JSON. Wrappers are provided for many of + the factory methods that the time package offers. + format: date-time + type: string + finalizers: + description: Must be empty before the object is deleted from the + registry. Each entry is an identifier for the responsible component + that will remove the entry from the list. If the deletionTimestamp + of the object is non-nil, entries in this list can only be removed. + items: + type: string + type: array + generateName: + description: |- + GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server. + + If this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). + + Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency + type: string + generation: + description: A sequence number representing a specific generation + of the desired state. Populated by the system. Read-only. + format: int64 + type: integer + initializers: + description: Initializers tracks the progress of initialization. + properties: + pending: + description: Pending is a list of initializers that must execute + in order before this object is visible. When the last pending + initializer is removed, and no failing result is set, the + initializers struct will be set to nil and the object is considered + as initialized and visible to all clients. + items: + description: Initializer is information about an initializer + that has not yet completed. + properties: + name: + description: name of the process that is responsible for + initializing this object. + type: string + required: + - name + type: object + type: array + result: + description: Status is a return value for calls that don't return + other objects. + 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/api-conventions.md#resources' + type: string + code: + description: Suggested HTTP return code for this status, + 0 if not set. + format: int32 + type: integer + details: + description: StatusDetails is a set of additional properties + that MAY be set by the server to provide additional information + about a response. The Reason field of a Status object + defines what attributes will be set. Clients must ignore + fields that do not match the defined type of each attribute, + and should assume that any attribute may be empty, invalid, + or under defined. + properties: + causes: + description: The Causes array includes more details + associated with the StatusReason failure. Not all + StatusReasons may provide detailed causes. + items: + description: StatusCause provides more information + about an api.Status failure, including cases when + multiple errors are encountered. + properties: + field: + description: |- + The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional. + + Examples: + "name" - the field "name" on the current resource + "items[0].name" - the field "name" on the first array entry in "items" + type: string + message: + description: A human-readable description of the + cause of the error. This field may be presented + as-is to a reader. + type: string + reason: + description: A machine-readable description of + the cause of the error. If this value is empty + there is no information available. + type: string + type: object + type: array + group: + description: The group attribute of the resource associated + with the status StatusReason. + type: string + kind: + description: 'The kind attribute of the resource associated + with the status StatusReason. On some operations may + differ from the requested resource Kind. More info: + https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + name: + description: The name attribute of the resource associated + with the status StatusReason (when there is a single + name which can be described). + type: string + retryAfterSeconds: + description: If specified, the time in seconds before + the operation should be retried. Some errors may indicate + the client must take an alternate action - for those + errors this field may indicate how long to wait before + taking the alternate action. + format: int32 + type: integer + uid: + description: 'UID of the resource. (when there is a + single resource which can be described). More info: + http://kubernetes.io/docs/user-guide/identifiers#uids' + type: string + type: object + 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/api-conventions.md#types-kinds' + type: string + message: + description: A human-readable description of the status + of this operation. + type: string + metadata: + description: ListMeta describes metadata that synthetic + resources must have, including lists and various status + objects. A resource may have only one of {ObjectMeta, + ListMeta}. + properties: + continue: + description: continue may be set if the user set a limit + on the number of items returned, and indicates that + the server has more data available. The value is opaque + and may be used to issue another request to the endpoint + that served this list to retrieve the next set of + available objects. Continuing a consistent list may + not be possible if the server configuration has changed + or more than a few minutes have passed. The resourceVersion + field returned when using this continue value will + be identical to the value in the first response, unless + you have received this token from an error message. + type: string + resourceVersion: + description: 'String that identifies the server''s internal + version of this object that can be used by clients + to determine when objects have changed. Value must + be treated as opaque by clients and passed unmodified + back to the server. Populated by the system. Read-only. + More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency' + type: string + selfLink: + description: selfLink is a URL representing this object. + Populated by the system. Read-only. + type: string + type: object + reason: + description: A machine-readable description of why this + operation is in the "Failure" status. If this value is + empty there is no information available. A Reason clarifies + an HTTP status code but does not override it. + type: string + status: + description: 'Status of the operation. One of: "Success" + or "Failure". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status' + type: string + type: object + required: + - pending + type: object + labels: + 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 + managedFields: + description: |- + ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like "ci-cd". The set of fields is always in the version that the workflow used when modifying the object. + + This field is alpha and can be changed or removed without notice. + items: + description: ManagedFieldsEntry is a workflow-id, a FieldSet and + the group version of the resource that the fieldset applies + to. + properties: + apiVersion: + description: APIVersion defines the version of this resource + that this field set applies to. The format is "group/version" + just like the top-level APIVersion field. It is necessary + to track the version of a field set because it cannot be + automatically converted. + type: string + fields: + description: 'Fields stores a set of fields in a data structure + like a Trie. To understand how this is used, see: https://github.com/kubernetes-sigs/structured-merge-diff' + type: object + manager: + description: Manager is an identifier of the workflow managing + these fields. + type: string + operation: + description: Operation is the type of operation which lead + to this ManagedFieldsEntry being created. The only valid + values for this field are 'Apply' and 'Update'. + type: string + time: + description: Time is a wrapper around time.Time which supports + correct marshaling to YAML and JSON. Wrappers are provided + for many of the factory methods that the time package offers. + format: date-time + type: string + type: object + type: array + 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 + namespace: + description: |- + Namespace defines the space within each name must be unique. An empty namespace is equivalent to the "default" namespace, but "default" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty. + + Must be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces + type: string + ownerReferences: + description: List of objects depended by this object. If ALL objects + in the list have been deleted, this object will be garbage collected. + If this object is managed by a controller, then an entry in this + list will point to this controller, with the controller field + set to true. There cannot be more than one managing controller. + items: + description: OwnerReference contains enough information to let + you identify an owning object. An owning object must be in the + same namespace as the dependent, or be cluster-scoped, so there + is no namespace field. + properties: + apiVersion: + description: API version of the referent. + type: string + blockOwnerDeletion: + description: If true, AND if the owner has the "foregroundDeletion" + finalizer, then the owner cannot be deleted from the key-value + store until this reference is removed. Defaults to false. + To set this field, a user needs "delete" permission of the + owner, otherwise 422 (Unprocessable Entity) will be returned. + type: boolean + controller: + description: If true, this reference points to the managing + controller. + type: boolean + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names' + type: string + uid: + description: 'UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids' + type: string + required: + - apiVersion + - kind + - name + - uid + type: object + type: array + resourceVersion: + description: |- + An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources. + + Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency + type: string + selfLink: + description: SelfLink is a URL representing this object. Populated + by the system. Read-only. + type: string + uid: + description: |- + UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations. + + Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids + type: string + type: object + podMonitorNamespaceSelector: + description: A label selector is a label query over a set of resources. + The result of matchLabels and matchExpressions are ANDed. 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: + 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: A label selector is a label query over a set of resources. + The result of matchLabels and matchExpressions are ANDed. 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: + 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 + 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 allow an endpoint to authenticate over + basic authentication More info: https://prometheus.io/docs/operating/configuration/#endpoints' + properties: + password: + 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' + type: string + optional: + description: Specify whether the Secret or it's key must + be defined + type: boolean + required: + - key + type: object + username: + 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' + type: string + optional: + description: Specify whether the Secret or it's 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: + 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: TLSConfig specifies TLS configuration parameters. + properties: + caFile: + description: The CA cert to use for the targets. + type: string + certFile: + description: The client cert file for the targets. + type: string + insecureSkipVerify: + description: Disable target certificate validation. + type: boolean + keyFile: + description: The client key file for the targets. + type: string + 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 allow an endpoint to authenticate over + basic authentication More info: https://prometheus.io/docs/operating/configuration/#endpoints' + properties: + password: + 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' + type: string + optional: + description: Specify whether the Secret or it's key must + be defined + type: boolean + required: + - key + type: object + username: + 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' + type: string + optional: + description: Specify whether the Secret or it's 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 the tuning of remote_write queue_config + parameters. This object is referenced in the RemoteWriteSpec + object. + 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. + format: int32 + 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. + format: int32 + type: integer + maxSamplesPerSend: + description: MaxSamplesPerSend is the maximum number of samples + per send. + format: int32 + type: integer + maxShards: + description: MaxShards is the maximum number of shards, i.e. + amount of concurrency. + format: int32 + 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. + format: int32 + type: integer + type: object + remoteTimeout: + description: Timeout for requests to the remote write endpoint. + type: string + tlsConfig: + description: TLSConfig specifies TLS configuration parameters. + properties: + caFile: + description: The CA cert to use for the targets. + type: string + certFile: + description: The client cert file for the targets. + type: string + insecureSkipVerify: + description: Disable target certificate validation. + type: boolean + keyFile: + description: The client key file for the targets. + type: string + 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. defailt 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: ResourceRequirements describes the compute resource requirements. + properties: + limits: + 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: + 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 + walCompression: + description: Enable compression of the write-ahead log using Snappy. + type: boolean + 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: A label selector is a label query over a set of resources. + The result of matchLabels and matchExpressions are ANDed. 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: + 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 is a label query over a set of resources. + The result of matchLabels and matchExpressions are ANDed. 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: + 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: PodSecurityContext holds pod-level security attributes + and common container settings. Some fields are also present in container.securityContext. Field + values of container.securityContext take precedence over field values + of 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: + + 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---- + + 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: SELinuxOptions are the labels to be applied to the + 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 + type: object + serviceAccountName: + description: ServiceAccountName is the name of the ServiceAccount to + use to run the Prometheus Pods. + type: string + serviceMonitorNamespaceSelector: + description: A label selector is a label query over a set of resources. + The result of matchLabels and matchExpressions are ANDed. 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: + 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: A label selector is a label query over a set of resources. + The result of matchLabels and matchExpressions are ANDed. 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: + 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: StorageSpec defines the configured storage for a group + Prometheus servers. If neither `emptyDir` nor `volumeClaimTemplate` + is specified, then by default an [EmptyDir](https://kubernetes.io/docs/concepts/storage/volumes/#emptydir) + will be used. + properties: + emptyDir: + description: Represents an empty directory for a pod. Empty directory + volumes support ownership management and SELinux relabeling. + 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: {} + type: object + volumeClaimTemplate: + description: PersistentVolumeClaim is a user's request for and claim + to a persistent volume + 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/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/api-conventions.md#types-kinds' + type: string + metadata: + description: ObjectMeta is metadata that all persisted resources + must have, which includes all objects users must create. + properties: + annotations: + 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 + clusterName: + description: The name of the cluster which the object belongs + to. This is used to distinguish resources with same name + and namespace in different clusters. This field is not + set anywhere right now and apiserver is going to ignore + it if set in create or update request. + type: string + creationTimestamp: + description: Time is a wrapper around time.Time which supports + correct marshaling to YAML and JSON. Wrappers are provided + for many of the factory methods that the time package + offers. + format: date-time + type: string + deletionGracePeriodSeconds: + description: Number of seconds allowed for this object to + gracefully terminate before it will be removed from the + system. Only set when deletionTimestamp is also set. May + only be shortened. Read-only. + format: int64 + type: integer + deletionTimestamp: + description: Time is a wrapper around time.Time which supports + correct marshaling to YAML and JSON. Wrappers are provided + for many of the factory methods that the time package + offers. + format: date-time + type: string + finalizers: + description: Must be empty before the object is deleted + from the registry. Each entry is an identifier for the + responsible component that will remove the entry from + the list. If the deletionTimestamp of the object is non-nil, + entries in this list can only be removed. + items: + type: string + type: array + generateName: + description: |- + GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server. + + If this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). + + Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency + type: string + generation: + description: A sequence number representing a specific generation + of the desired state. Populated by the system. Read-only. + format: int64 + type: integer + initializers: + description: Initializers tracks the progress of initialization. + properties: + pending: + description: Pending is a list of initializers that + must execute in order before this object is visible. + When the last pending initializer is removed, and + no failing result is set, the initializers struct + will be set to nil and the object is considered as + initialized and visible to all clients. + items: + description: Initializer is information about an initializer + that has not yet completed. + properties: + name: + description: name of the process that is responsible + for initializing this object. + type: string + required: + - name + type: object + type: array + result: + description: Status is a return value for calls that + don't return other objects. + 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/api-conventions.md#resources' + type: string + code: + description: Suggested HTTP return code for this + status, 0 if not set. + format: int32 + type: integer + details: + description: StatusDetails is a set of additional + properties that MAY be set by the server to provide + additional information about a response. The Reason + field of a Status object defines what attributes + will be set. Clients must ignore fields that do + not match the defined type of each attribute, + and should assume that any attribute may be empty, + invalid, or under defined. + properties: + causes: + description: The Causes array includes more + details associated with the StatusReason failure. + Not all StatusReasons may provide detailed + causes. + items: + description: StatusCause provides more information + about an api.Status failure, including cases + when multiple errors are encountered. + properties: + field: + description: |- + The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional. + + Examples: + "name" - the field "name" on the current resource + "items[0].name" - the field "name" on the first array entry in "items" + type: string + message: + description: A human-readable description + of the cause of the error. This field + may be presented as-is to a reader. + type: string + reason: + description: A machine-readable description + of the cause of the error. If this value + is empty there is no information available. + type: string + type: object + type: array + group: + description: The group attribute of the resource + associated with the status StatusReason. + type: string + kind: + description: 'The kind attribute of the resource + associated with the status StatusReason. On + some operations may differ from the requested + resource Kind. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + name: + description: The name attribute of the resource + associated with the status StatusReason (when + there is a single name which can be described). + type: string + retryAfterSeconds: + description: If specified, the time in seconds + before the operation should be retried. Some + errors may indicate the client must take an + alternate action - for those errors this field + may indicate how long to wait before taking + the alternate action. + format: int32 + type: integer + uid: + description: 'UID of the resource. (when there + is a single resource which can be described). + More info: http://kubernetes.io/docs/user-guide/identifiers#uids' + type: string + type: object + 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/api-conventions.md#types-kinds' + type: string + message: + description: A human-readable description of the + status of this operation. + type: string + metadata: + description: ListMeta describes metadata that synthetic + resources must have, including lists and various + status objects. A resource may have only one of + {ObjectMeta, ListMeta}. + properties: + continue: + description: continue may be set if the user + set a limit on the number of items returned, + and indicates that the server has more data + available. The value is opaque and may be + used to issue another request to the endpoint + that served this list to retrieve the next + set of available objects. Continuing a consistent + list may not be possible if the server configuration + has changed or more than a few minutes have + passed. The resourceVersion field returned + when using this continue value will be identical + to the value in the first response, unless + you have received this token from an error + message. + type: string + resourceVersion: + description: 'String that identifies the server''s + internal version of this object that can be + used by clients to determine when objects + have changed. Value must be treated as opaque + by clients and passed unmodified back to the + server. Populated by the system. Read-only. + More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency' + type: string + selfLink: + description: selfLink is a URL representing + this object. Populated by the system. Read-only. + type: string + type: object + reason: + description: A machine-readable description of why + this operation is in the "Failure" status. If + this value is empty there is no information available. + A Reason clarifies an HTTP status code but does + not override it. + type: string + status: + description: 'Status of the operation. One of: "Success" + or "Failure". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status' + type: string + type: object + required: + - pending + type: object + labels: + 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 + managedFields: + description: |- + ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like "ci-cd". The set of fields is always in the version that the workflow used when modifying the object. + + This field is alpha and can be changed or removed without notice. + items: + description: ManagedFieldsEntry is a workflow-id, a FieldSet + and the group version of the resource that the fieldset + applies to. + properties: + apiVersion: + description: APIVersion defines the version of this + resource that this field set applies to. The format + is "group/version" just like the top-level APIVersion + field. It is necessary to track the version of a + field set because it cannot be automatically converted. + type: string + fields: + description: 'Fields stores a set of fields in a data + structure like a Trie. To understand how this is + used, see: https://github.com/kubernetes-sigs/structured-merge-diff' + type: object + manager: + description: Manager is an identifier of the workflow + managing these fields. + type: string + operation: + description: Operation is the type of operation which + lead to this ManagedFieldsEntry being created. The + only valid values for this field are 'Apply' and + 'Update'. + type: string + time: + description: Time is a wrapper around time.Time which + supports correct marshaling to YAML and JSON. Wrappers + are provided for many of the factory methods that + the time package offers. + format: date-time + type: string + type: object + type: array + 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 + namespace: + description: |- + Namespace defines the space within each name must be unique. An empty namespace is equivalent to the "default" namespace, but "default" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty. + + Must be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces + type: string + ownerReferences: + description: List of objects depended by this object. If + ALL objects in the list have been deleted, this object + will be garbage collected. If this object is managed by + a controller, then an entry in this list will point to + this controller, with the controller field set to true. + There cannot be more than one managing controller. + items: + description: OwnerReference contains enough information + to let you identify an owning object. An owning object + must be in the same namespace as the dependent, or be + cluster-scoped, so there is no namespace field. + properties: + apiVersion: + description: API version of the referent. + type: string + blockOwnerDeletion: + description: If true, AND if the owner has the "foregroundDeletion" + finalizer, then the owner cannot be deleted from + the key-value store until this reference is removed. + Defaults to false. To set this field, a user needs + "delete" permission of the owner, otherwise 422 + (Unprocessable Entity) will be returned. + type: boolean + controller: + description: If true, this reference points to the + managing controller. + type: boolean + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names' + type: string + uid: + description: 'UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids' + type: string + required: + - apiVersion + - kind + - name + - uid + type: object + type: array + resourceVersion: + description: |- + An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources. + + Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency + type: string + selfLink: + description: SelfLink is a URL representing this object. + Populated by the system. Read-only. + type: string + uid: + description: |- + UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations. + + Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids + type: string + type: object + spec: + description: PersistentVolumeClaimSpec describes the common + attributes of storage devices and allows a Source for provider-specific + attributes + 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: TypedLocalObjectReference contains enough information + to let you locate the typed referenced object inside the + same namespace. + 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: ResourceRequirements describes the compute + resource requirements. + properties: + limits: + 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: + 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 selector is a label query over a set + of resources. The result of matchLabels and matchExpressions + are ANDed. 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: + 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: PersistentVolumeClaimStatus is the current status + of a persistent volume claim. + 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: + 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: Time is a wrapper around time.Time which + supports correct marshaling to YAML and JSON. Wrappers + are provided for many of the factory methods that + the time package offers. + format: date-time + type: string + lastTransitionTime: + description: Time is a wrapper around time.Time which + supports correct marshaling to YAML and JSON. Wrappers + are provided for many of the factory methods that + the time package offers. + 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: + type: string + required: + - type + - status + 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: ThanosSpec defines parameters for a Prometheus server within + a Thanos deployment. + properties: + baseImage: + description: Thanos base image if other than default. + 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 Thanos + is being configured. + type: string + objectStorageConfig: + 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' + type: string + optional: + description: Specify whether the Secret or it's key must be + defined + type: boolean + required: + - key + type: object + resources: + description: ResourceRequirements describes the compute resource + requirements. + properties: + limits: + 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: + 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 + 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 + type: object + status: + description: 'PrometheusStatus is the 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/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: + - paused + - replicas + - updatedReplicas + - availableReplicas + - unavailableReplicas + type: object + type: object + version: v1 +{{- end }} diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/crd-prometheusrules.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/crd-prometheusrules.yaml new file mode 100755 index 000000000..b2f756c12 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/crd-prometheusrules.yaml @@ -0,0 +1,404 @@ +{{- if and .Values.prometheusOperator.enabled .Values.prometheusOperator.createCustomResource -}} +# Source https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/0prometheus-operator-0prometheusruleCustomResourceDefinition.yaml +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + creationTimestamp: null + name: {{ printf "prometheusrules.%s" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-operator +{{ include "prometheus-operator.labels" . | indent 4 }} + annotations: +{{- if .Values.prometheusOperator.cleanupCustomResourceBeforeInstall }} + "helm.sh/hook-delete-policy": "before-hook-creation" +{{- end }} + "helm.sh/hook": crd-install +spec: + group: {{ .Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com" }} + names: + kind: PrometheusRule + plural: prometheusrules + scope: Namespaced + validation: + openAPIV3Schema: + 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/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/api-conventions.md#types-kinds' + type: string + metadata: + description: ObjectMeta is metadata that all persisted resources must have, + which includes all objects users must create. + properties: + annotations: + 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 + clusterName: + description: The name of the cluster which the object belongs to. This + is used to distinguish resources with same name and namespace in different + clusters. This field is not set anywhere right now and apiserver is + going to ignore it if set in create or update request. + type: string + creationTimestamp: + description: Time is a wrapper around time.Time which supports correct + marshaling to YAML and JSON. Wrappers are provided for many of the + factory methods that the time package offers. + format: date-time + type: string + deletionGracePeriodSeconds: + description: Number of seconds allowed for this object to gracefully + terminate before it will be removed from the system. Only set when + deletionTimestamp is also set. May only be shortened. Read-only. + format: int64 + type: integer + deletionTimestamp: + description: Time is a wrapper around time.Time which supports correct + marshaling to YAML and JSON. Wrappers are provided for many of the + factory methods that the time package offers. + format: date-time + type: string + finalizers: + description: Must be empty before the object is deleted from the registry. + Each entry is an identifier for the responsible component that will + remove the entry from the list. If the deletionTimestamp of the object + is non-nil, entries in this list can only be removed. + items: + type: string + type: array + generateName: + description: |- + GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server. + + If this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). + + Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency + type: string + generation: + description: A sequence number representing a specific generation of + the desired state. Populated by the system. Read-only. + format: int64 + type: integer + initializers: + description: Initializers tracks the progress of initialization. + properties: + pending: + description: Pending is a list of initializers that must execute + in order before this object is visible. When the last pending + initializer is removed, and no failing result is set, the initializers + struct will be set to nil and the object is considered as initialized + and visible to all clients. + items: + description: Initializer is information about an initializer that + has not yet completed. + properties: + name: + description: name of the process that is responsible for initializing + this object. + type: string + required: + - name + type: object + type: array + result: + description: Status is a return value for calls that don't return + other objects. + 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/api-conventions.md#resources' + type: string + code: + description: Suggested HTTP return code for this status, 0 if + not set. + format: int32 + type: integer + details: + description: StatusDetails is a set of additional properties + that MAY be set by the server to provide additional information + about a response. The Reason field of a Status object defines + what attributes will be set. Clients must ignore fields that + do not match the defined type of each attribute, and should + assume that any attribute may be empty, invalid, or under + defined. + properties: + causes: + description: The Causes array includes more details associated + with the StatusReason failure. Not all StatusReasons may + provide detailed causes. + items: + description: StatusCause provides more information about + an api.Status failure, including cases when multiple + errors are encountered. + properties: + field: + description: |- + The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional. + + Examples: + "name" - the field "name" on the current resource + "items[0].name" - the field "name" on the first array entry in "items" + type: string + message: + description: A human-readable description of the cause + of the error. This field may be presented as-is + to a reader. + type: string + reason: + description: A machine-readable description of the + cause of the error. If this value is empty there + is no information available. + type: string + type: object + type: array + group: + description: The group attribute of the resource associated + with the status StatusReason. + type: string + kind: + description: 'The kind attribute of the resource associated + with the status StatusReason. On some operations may differ + from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + name: + description: The name attribute of the resource associated + with the status StatusReason (when there is a single name + which can be described). + type: string + retryAfterSeconds: + description: If specified, the time in seconds before the + operation should be retried. Some errors may indicate + the client must take an alternate action - for those errors + this field may indicate how long to wait before taking + the alternate action. + format: int32 + type: integer + uid: + description: 'UID of the resource. (when there is a single + resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids' + type: string + type: object + 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/api-conventions.md#types-kinds' + type: string + message: + description: A human-readable description of the status of this + operation. + type: string + metadata: + description: ListMeta describes metadata that synthetic resources + must have, including lists and various status objects. A resource + may have only one of {ObjectMeta, ListMeta}. + properties: + continue: + description: continue may be set if the user set a limit + on the number of items returned, and indicates that the + server has more data available. The value is opaque and + may be used to issue another request to the endpoint that + served this list to retrieve the next set of available + objects. Continuing a consistent list may not be possible + if the server configuration has changed or more than a + few minutes have passed. The resourceVersion field returned + when using this continue value will be identical to the + value in the first response, unless you have received + this token from an error message. + type: string + resourceVersion: + description: 'String that identifies the server''s internal + version of this object that can be used by clients to + determine when objects have changed. Value must be treated + as opaque by clients and passed unmodified back to the + server. Populated by the system. Read-only. More info: + https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency' + type: string + selfLink: + description: selfLink is a URL representing this object. + Populated by the system. Read-only. + type: string + type: object + reason: + description: A machine-readable description of why this operation + is in the "Failure" status. If this value is empty there is + no information available. A Reason clarifies an HTTP status + code but does not override it. + type: string + status: + description: 'Status of the operation. One of: "Success" or + "Failure". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status' + type: string + type: object + required: + - pending + type: object + labels: + 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 + managedFields: + description: |- + ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like "ci-cd". The set of fields is always in the version that the workflow used when modifying the object. + + This field is alpha and can be changed or removed without notice. + items: + description: ManagedFieldsEntry is a workflow-id, a FieldSet and the + group version of the resource that the fieldset applies to. + properties: + apiVersion: + description: APIVersion defines the version of this resource that + this field set applies to. The format is "group/version" just + like the top-level APIVersion field. It is necessary to track + the version of a field set because it cannot be automatically + converted. + type: string + fields: + description: 'Fields stores a set of fields in a data structure + like a Trie. To understand how this is used, see: https://github.com/kubernetes-sigs/structured-merge-diff' + type: object + manager: + description: Manager is an identifier of the workflow managing + these fields. + type: string + operation: + description: Operation is the type of operation which lead to + this ManagedFieldsEntry being created. The only valid values + for this field are 'Apply' and 'Update'. + type: string + time: + description: Time is a wrapper around time.Time which supports + correct marshaling to YAML and JSON. Wrappers are provided + for many of the factory methods that the time package offers. + format: date-time + type: string + type: object + type: array + 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 + namespace: + description: |- + Namespace defines the space within each name must be unique. An empty namespace is equivalent to the "default" namespace, but "default" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty. + + Must be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces + type: string + ownerReferences: + description: List of objects depended by this object. If ALL objects + in the list have been deleted, this object will be garbage collected. + If this object is managed by a controller, then an entry in this list + will point to this controller, with the controller field set to true. + There cannot be more than one managing controller. + items: + description: OwnerReference contains enough information to let you + identify an owning object. An owning object must be in the same + namespace as the dependent, or be cluster-scoped, so there is no + namespace field. + properties: + apiVersion: + description: API version of the referent. + type: string + blockOwnerDeletion: + description: If true, AND if the owner has the "foregroundDeletion" + finalizer, then the owner cannot be deleted from the key-value + store until this reference is removed. Defaults to false. To + set this field, a user needs "delete" permission of the owner, + otherwise 422 (Unprocessable Entity) will be returned. + type: boolean + controller: + description: If true, this reference points to the managing controller. + type: boolean + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names' + type: string + uid: + description: 'UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids' + type: string + required: + - apiVersion + - kind + - name + - uid + type: object + type: array + resourceVersion: + description: |- + An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources. + + Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency + type: string + selfLink: + description: SelfLink is a URL representing this object. Populated by + the system. Read-only. + type: string + uid: + description: |- + UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations. + + Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids + type: string + type: object + spec: + description: PrometheusRuleSpec contains specification parameters for a + Rule. + properties: + groups: + description: Content of Prometheus rule file + items: + description: RuleGroup is a list of sequentially evaluated recording + and alerting rules. + properties: + interval: + type: string + name: + type: string + rules: + items: + description: Rule describes an alerting or recording rule. + properties: + alert: + type: string + annotations: + type: object + expr: + anyOf: + - type: string + - type: integer + for: + type: string + labels: + type: object + record: + type: string + required: + - expr + type: object + type: array + required: + - name + - rules + type: object + type: array + type: object + type: object + version: v1 +{{- end }} diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/crd-servicemonitor.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/crd-servicemonitor.yaml new file mode 100755 index 000000000..834143c56 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/crd-servicemonitor.yaml @@ -0,0 +1,315 @@ +{{- if and .Values.prometheusOperator.enabled .Values.prometheusOperator.createCustomResource -}} +# Source: https://raw.githubusercontent.com/coreos/kube-prometheus/master/manifests/0prometheus-operator-0servicemonitorCustomResourceDefinition.yaml +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + creationTimestamp: null + name: {{ printf "servicemonitors.%s" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-operator +{{ include "prometheus-operator.labels" . | indent 4 }} + annotations: +{{- if .Values.prometheusOperator.cleanupCustomResourceBeforeInstall }} + "helm.sh/hook-delete-policy": "before-hook-creation" +{{- end }} + "helm.sh/hook": crd-install +spec: + group: {{ .Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com" }} + names: + kind: ServiceMonitor + plural: servicemonitors + scope: Namespaced + validation: + openAPIV3Schema: + 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/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/api-conventions.md#types-kinds' + type: string + spec: + description: ServiceMonitorSpec contains specification parameters for a + ServiceMonitor. + 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: 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' + type: string + optional: + description: Specify whether the Secret or it's key must + be defined + type: boolean + required: + - key + type: object + username: + 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' + type: string + optional: + description: Specify whether the Secret or it's key must + be defined + type: boolean + required: + - key + type: object + type: object + bearerTokenFile: + description: File to read bearer token for scraping targets. + type: string + honorLabels: + description: HonorLabels chooses the metric's labels on collisions + with target labels. + 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. defailt 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: + 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 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. defailt 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: string + - type: integer + tlsConfig: + description: TLSConfig specifies TLS configuration parameters. + properties: + caFile: + description: The CA cert to use for the targets. + type: string + certFile: + description: The client cert file for the targets. + type: string + insecureSkipVerify: + description: Disable target certificate validation. + type: boolean + keyFile: + description: The client key file for the targets. + type: string + 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: NamespaceSelector is a selector for selecting either all + namespaces or a list of namespaces. + 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: A label selector is a label query over a set of resources. + The result of matchLabels and matchExpressions are ANDed. 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: + 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 + type: object + version: v1 +{{- 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 new file mode 100755 index 000000000..c64feac0d --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/deployment.yaml @@ -0,0 +1,112 @@ +{{- if .Values.prometheusOperator.enabled }} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "prometheus-operator.fullname" . }}-operator + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-operator +{{ include "prometheus-operator.labels" . | indent 4 }} +spec: + replicas: 1 + selector: + matchLabels: + app: {{ template "prometheus-operator.name" . }}-operator + release: {{ .Release.Name | quote }} + template: + metadata: + labels: + app: {{ template "prometheus-operator.name" . }}-operator +{{ include "prometheus-operator.labels" . | indent 8 }} +{{- if .Values.prometheusOperator.podLabels }} +{{ toYaml .Values.prometheusOperator.podLabels | indent 8 }} +{{- end }} +{{- if .Values.prometheusOperator.podAnnotations }} + annotations: +{{ toYaml .Values.prometheusOperator.podAnnotations | indent 8 }} +{{- end }} + spec: + {{- if .Values.prometheusOperator.priorityClassName }} + priorityClassName: {{ .Values.prometheusOperator.priorityClassName }} + {{- end }} + containers: + - name: {{ template "prometheus-operator.name" . }} + image: "{{ .Values.prometheusOperator.image.repository }}:{{ .Values.prometheusOperator.image.tag }}" + imagePullPolicy: "{{ .Values.prometheusOperator.image.pullPolicy }}" + args: + {{- if .Values.prometheusOperator.kubeletService.enabled }} + - --kubelet-service={{ .Values.prometheusOperator.kubeletService.namespace }}/{{ template "prometheus-operator.fullname" . }}-kubelet + {{- end }} + {{- if .Values.prometheusOperator.logFormat }} + - --log-format={{ .Values.prometheusOperator.logFormat }} + {{- end }} + {{- if .Values.prometheusOperator.logLevel }} + - --log-level={{ .Values.prometheusOperator.logLevel }} + {{- end }} + {{- if .Values.prometheusOperator.denyNamespaces }} + - --deny-namespaces={{ .Values.prometheusOperator.denyNamespaces | join "," }} + {{- end }} + - --logtostderr=true + - --crd-apigroup={{ .Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com" }} + - --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 }} + ports: + - containerPort: 8080 + name: http + 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 }} + 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 }} + volumes: + - name: tls-proxy-secret + secret: + defaultMode: 420 + secretName: {{ template "prometheus-operator.fullname" . }}-admission +{{- end }} +{{- if .Values.prometheusOperator.securityContext }} + securityContext: +{{ toYaml .Values.prometheusOperator.securityContext | indent 8 }} +{{- end }} + serviceAccountName: {{ template "prometheus-operator.operator.serviceAccountName" . }} + {{- with .Values.prometheusOperator.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.prometheusOperator.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.prometheusOperator.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- 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 new file mode 100755 index 000000000..0af7e5b9d --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/psp-clusterrole.yaml @@ -0,0 +1,16 @@ +{{- if and .Values.prometheusOperator.enabled .Values.global.rbac.create .Values.global.rbac.pspEnabled }} +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ template "prometheus-operator.fullname" . }}-operator-psp + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-operator +{{ include "prometheus-operator.labels" . | indent 4 }} +rules: +- apiGroups: ['extensions'] + resources: ['podsecuritypolicies'] + verbs: ['use'] + resourceNames: + - {{ template "prometheus-operator.fullname" . }}-operator +{{- 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 new file mode 100755 index 000000000..2101305c9 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/psp-clusterrolebinding.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.prometheusOperator.enabled .Values.global.rbac.create .Values.global.rbac.pspEnabled }} +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ template "prometheus-operator.fullname" . }}-operator-psp + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-operator +{{ include "prometheus-operator.labels" . | indent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ template "prometheus-operator.fullname" . }}-operator-psp +subjects: + - kind: ServiceAccount + name: {{ template "prometheus-operator.operator.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} +{{- 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 new file mode 100755 index 000000000..63dde8f1d --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/psp.yaml @@ -0,0 +1,48 @@ +{{- if and .Values.prometheusOperator.enabled .Values.global.rbac.create .Values.global.rbac.pspEnabled }} +apiVersion: policy/v1beta1 +kind: PodSecurityPolicy +metadata: + name: {{ template "prometheus-operator.fullname" . }}-operator + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-operator +{{ include "prometheus-operator.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' + - 'emptyDir' + - 'projected' + - 'secret' + - 'downwardAPI' + - 'persistentVolumeClaim' + hostNetwork: false + hostIPC: false + hostPID: false + runAsUser: + # Permits the container to run with root privileges as well. + rule: 'RunAsAny' + seLinux: + # This policy assumes the nodes are using AppArmor rather than SELinux. + rule: 'RunAsAny' + supplementalGroups: + rule: 'MustRunAs' + ranges: + # Forbid adding the root group. + - min: 0 + max: 65535 + fsGroup: + rule: 'MustRunAs' + ranges: + # Forbid adding the root group. + - min: 0 + max: 65535 + readOnlyRootFilesystem: false +{{- 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 new file mode 100755 index 000000000..faeafcc09 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/service.yaml @@ -0,0 +1,50 @@ +{{- if .Values.prometheusOperator.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "prometheus-operator.fullname" . }}-operator + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-operator +{{ include "prometheus-operator.labels" . | indent 4 }} +{{- if .Values.prometheusOperator.service.annotations }} + annotations: +{{ toYaml .Values.prometheusOperator.service.annotations | indent 4 }} +{{- end }} +spec: +{{- if .Values.prometheusOperator.service.clusterIP }} + clusterIP: {{ .Values.prometheusOperator.service.clusterIP }} +{{- end }} +{{- if .Values.prometheusOperator.service.externalIPs }} + externalIPs: +{{ toYaml .Values.prometheusOperator.service.externalIPs | indent 4 }} +{{- end }} +{{- if .Values.prometheusOperator.service.loadBalancerIP }} + loadBalancerIP: {{ .Values.prometheusOperator.service.loadBalancerIP }} +{{- end }} +{{- if .Values.prometheusOperator.service.loadBalancerSourceRanges }} + loadBalancerSourceRanges: + {{- range $cidr := .Values.prometheusOperator.service.loadBalancerSourceRanges }} + - {{ $cidr }} + {{- end }} +{{- end }} + ports: + - name: http + {{- if eq .Values.prometheusOperator.service.type "NodePort" }} + nodePort: {{ .Values.prometheusOperator.service.nodePort }} + {{- end }} + port: 8080 + targetPort: http + {{- if .Values.prometheusOperator.tlsProxy.enabled }} + - name: https + {{- if eq .Values.prometheusOperator.service.type "NodePort"}} + nodePort: {{ .Values.prometheusOperator.service.nodePortTls }} + {{- end }} + port: 443 + targetPort: https + {{- end }} + selector: + app: {{ template "prometheus-operator.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 new file mode 100755 index 000000000..bfd28586c --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if and .Values.prometheusOperator.enabled .Values.prometheusOperator.serviceAccount.create }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template "prometheus-operator.operator.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-operator +{{ include "prometheus-operator.labels" . | indent 4 }} +imagePullSecrets: +{{ toYaml .Values.global.imagePullSecrets | indent 2 }} +{{- 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 new file mode 100755 index 000000000..4679accd7 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/servicemonitor.yaml @@ -0,0 +1,32 @@ +{{- if and .Values.prometheusOperator.enabled .Values.prometheusOperator.serviceMonitor.selfMonitor }} +apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: ServiceMonitor +metadata: + name: {{ template "prometheus-operator.fullname" . }}-operator + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-operator +{{ include "prometheus-operator.labels" . | indent 4 }} +spec: + endpoints: + - port: http + honorLabels: true + {{- if .Values.prometheusOperator.serviceMonitor.interval }} + interval: {{ .Values.prometheusOperator.serviceMonitor.interval }} + {{- end }} +{{- if .Values.prometheusOperator.serviceMonitor.metricRelabelings }} + metricRelabelings: +{{ tpl (toYaml .Values.prometheusOperator.serviceMonitor.metricRelabelings | indent 6) . }} +{{- end }} +{{- if .Values.prometheusOperator.serviceMonitor.relabelings }} + relabelings: +{{ toYaml .Values.prometheusOperator.serviceMonitor.relabelings | indent 6 }} +{{- end }} + selector: + matchLabels: + app: {{ template "prometheus-operator.name" . }}-operator + release: {{ .Release.Name | quote }} + namespaceSelector: + matchNames: + - {{ .Release.Namespace | quote }} +{{- end }} diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/additionalAlertRelabelConfigs.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/additionalAlertRelabelConfigs.yaml new file mode 100755 index 000000000..08adf6004 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/additionalAlertRelabelConfigs.yaml @@ -0,0 +1,12 @@ +{{- if and .Values.prometheus.enabled .Values.prometheus.prometheusSpec.additionalAlertRelabelConfigs }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ template "prometheus-operator.fullname" . }}-prometheus-am-relabel-confg + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-prometheus-am-relabel-confg +{{ include "prometheus-operator.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 new file mode 100755 index 000000000..ef22f2521 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/additionalAlertmanagerConfigs.yaml @@ -0,0 +1,12 @@ +{{- if and .Values.prometheus.enabled .Values.prometheus.prometheusSpec.additionalAlertManagerConfigs }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ template "prometheus-operator.fullname" . }}-prometheus-am-confg + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-prometheus-am-confg +{{ include "prometheus-operator.labels" . | indent 4 }} +data: + additional-alertmanager-configs.yaml: {{ 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 new file mode 100755 index 000000000..8f61a4588 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/additionalPrometheusRules.yaml @@ -0,0 +1,40 @@ +{{- if or .Values.additionalPrometheusRules .Values.additionalPrometheusRulesMap}} +apiVersion: v1 +kind: List +items: +{{- if .Values.additionalPrometheusRulesMap }} +{{- range $prometheusRuleName, $prometheusRule := .Values.additionalPrometheusRulesMap }} + - apiVersion: {{ printf "%s/v1" ($.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} + kind: PrometheusRule + metadata: + name: {{ template "prometheus-operator.name" $ }}-{{ $prometheusRuleName }} + namespace: {{ $.Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" $ }} +{{ include "prometheus-operator.labels" $ | indent 8 }} + {{- if $prometheusRule.additionalLabels }} +{{ toYaml $prometheusRule.additionalLabels | indent 8 }} + {{- end }} + spec: + groups: +{{ toYaml $prometheusRule.groups| indent 8 }} +{{- end }} +{{- else }} +{{- range .Values.additionalPrometheusRules }} + - apiVersion: {{ printf "%s/v1" ($.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} + kind: PrometheusRule + metadata: + name: {{ template "prometheus-operator.name" $ }}-{{ .name }} + namespace: {{ $.Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" $ }} +{{ include "prometheus-operator.labels" $ | indent 8 }} + {{- if .additionalLabels }} +{{ toYaml .additionalLabels | indent 8 }} + {{- end }} + spec: + groups: +{{ toYaml .groups| indent 8 }} +{{- end }} +{{- end }} +{{- 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 new file mode 100755 index 000000000..6f4ebf804 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/additionalScrapeConfigs.yaml @@ -0,0 +1,12 @@ +{{- if and .Values.prometheus.enabled .Values.prometheus.prometheusSpec.additionalScrapeConfigs }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ template "prometheus-operator.fullname" . }}-prometheus-scrape-confg + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-prometheus-scrape-confg +{{ include "prometheus-operator.labels" . | indent 4 }} +data: + additional-scrape-configs.yaml: {{ toYaml .Values.prometheus.prometheusSpec.additionalScrapeConfigs | b64enc | quote }} +{{- 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 new file mode 100755 index 000000000..31c6b63a2 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/clusterrole.yaml @@ -0,0 +1,37 @@ +{{- if and .Values.prometheus.enabled .Values.global.rbac.create }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ template "prometheus-operator.fullname" . }}-prometheus + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-prometheus +{{ include "prometheus-operator.labels" . | indent 4 }} +rules: +- apiGroups: + - "" + resources: + - nodes/metrics + verbs: + - get + - list + - watch +# This permission are not in the prometheus-operator repo +# they're grabbed from https://github.com/prometheus/prometheus/blob/master/documentation/examples/rbac-setup.yml +- apiGroups: [""] + resources: + - nodes + - nodes/proxy + - services + - endpoints + - pods + verbs: ["get", "list", "watch"] +- apiGroups: + - extensions + - "networking.k8s.io" + resources: + - ingresses + verbs: ["get", "list", "watch"] +- nonResourceURLs: ["/metrics"] + verbs: ["get"] +{{- 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 new file mode 100755 index 000000000..471892dfa --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/clusterrolebinding.yaml @@ -0,0 +1,19 @@ +{{- if and .Values.prometheus.enabled .Values.global.rbac.create }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ template "prometheus-operator.fullname" . }}-prometheus + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-prometheus +{{ include "prometheus-operator.labels" . | indent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ template "prometheus-operator.fullname" . }}-prometheus +subjects: + - kind: ServiceAccount + name: {{ template "prometheus-operator.prometheus.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} +{{- 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 new file mode 100755 index 000000000..dca48b52e --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/ingress.yaml @@ -0,0 +1,49 @@ +{{- if and .Values.prometheus.enabled .Values.prometheus.ingress.enabled }} +{{- $serviceName := printf "%s-%s" (include "prometheus-operator.fullname" .) "prometheus" }} +{{- $servicePort := 9090 -}} +{{- $routePrefix := list .Values.prometheus.prometheusSpec.routePrefix }} +{{- $paths := .Values.prometheus.ingress.paths | default $routePrefix -}} +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: +{{- if .Values.prometheus.ingress.annotations }} + annotations: +{{ toYaml .Values.prometheus.ingress.annotations | indent 4 }} +{{- end }} + name: {{ $serviceName }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-prometheus +{{ include "prometheus-operator.labels" . | indent 4 }} +{{- if .Values.prometheus.ingress.labels }} +{{ toYaml .Values.prometheus.ingress.labels | indent 4 }} +{{- end }} +spec: + rules: + {{- if .Values.prometheus.ingress.hosts }} + {{- range $host := .Values.prometheus.ingress.hosts }} + - host: {{ tpl $host $ }} + http: + paths: + {{- range $p := $paths }} + - path: {{ tpl $p $ }} + backend: + serviceName: {{ $serviceName }} + servicePort: {{ $servicePort }} + {{- end -}} + {{- end -}} + {{- else }} + - http: + paths: + {{- range $p := $paths }} + - path: {{ tpl $p $ }} + backend: + serviceName: {{ $serviceName }} + servicePort: {{ $servicePort }} + {{- end -}} + {{- end -}} + {{- if .Values.prometheus.ingress.tls }} + tls: +{{ toYaml .Values.prometheus.ingress.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 new file mode 100755 index 000000000..680ab177d --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/ingressperreplica.yaml @@ -0,0 +1,45 @@ +{{- if and .Values.prometheus.enabled .Values.prometheus.servicePerReplica.enabled .Values.prometheus.ingressPerReplica.enabled }} +{{- $count := .Values.prometheus.prometheusSpec.replicas | int -}} +{{- $servicePort := 9090 -}} +{{- $ingressValues := .Values.prometheus.ingressPerReplica -}} +apiVersion: extensions/v1beta1 +kind: IngressList +metadata: + name: {{ include "prometheus-operator.fullname" $ }}-prometheus-ingressperreplica + namespace: {{ .Release.Namespace }} +items: +{{ range $i, $e := until $count }} + - apiVersion: extensions/v1beta1 + kind: Ingress + metadata: + name: {{ include "prometheus-operator.fullname" $ }}-prometheus-{{ $i }} + namespace: {{ $.Release.Namespace }} + labels: + app: {{ include "prometheus-operator.name" $ }}-prometheus +{{ include "prometheus-operator.labels" $ | indent 8 }} + {{- if $ingressValues.labels }} + {{ toYaml $ingressValues.labels | indent 8 }} + {{- end }} + {{- if $ingressValues.annotations }} + annotations: +{{ toYaml $ingressValues.annotations | indent 8 }} + {{- end }} + spec: + rules: + - host: {{ $ingressValues.hostPrefix }}-{{ $i }}.{{ $ingressValues.hostDomain }} + http: + paths: + {{- range $p := $ingressValues.paths }} + - path: {{ tpl $p $ }} + backend: + serviceName: {{ include "prometheus-operator.fullname" $ }}-prometheus-{{ $i }} + servicePort: {{ $servicePort }} + {{- end -}} + {{- if $ingressValues.tlsSecretName }} + tls: + - hosts: + - {{ $ingressValues.hostPrefix }}-{{ $i }}.{{ $ingressValues.hostDomain }} + secretName: {{ $ingressValues.tlsSecretName }} + {{- end }} +{{- 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 new file mode 100755 index 000000000..db5c882b2 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/podDisruptionBudget.yaml @@ -0,0 +1,21 @@ +{{- if and .Values.prometheus.enabled .Values.prometheus.podDisruptionBudget.enabled }} +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: {{ template "prometheus-operator.fullname" . }}-prometheus + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-prometheus +{{ include "prometheus-operator.labels" . | indent 4 }} +spec: + {{- if .Values.prometheus.podDisruptionBudget.minAvailable }} + minAvailable: {{ .Values.prometheus.podDisruptionBudget.minAvailable }} + {{- end }} + {{- if .Values.prometheus.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ .Values.prometheus.podDisruptionBudget.maxUnavailable }} + {{- end }} + selector: + matchLabels: + app: prometheus + prometheus: {{ template "prometheus-operator.fullname" . }}-prometheus +{{- 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 new file mode 100755 index 000000000..f348ccc48 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/podmonitors.yaml @@ -0,0 +1,37 @@ +{{- if and .Values.prometheus.enabled .Values.prometheus.additionalPodMonitors }} +apiVersion: v1 +kind: List +items: +{{- range .Values.prometheus.additionalPodMonitors }} + - apiVersion: {{ printf "%s/v1" ($.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} + kind: PodMonitor + metadata: + name: {{ .name }} + namespace: {{ $.Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" $ }}-prometheus +{{ include "prometheus-operator.labels" $ | indent 8 }} + {{- if .additionalLabels }} +{{ toYaml .additionalLabels | indent 8 }} + {{- end }} + spec: + podMetricsEndpoints: +{{ toYaml .podMetricsEndpoints | indent 8 }} + {{- if .jobLabel }} + jobLabel: {{ .jobLabel }} + {{- end }} + {{- if .namespaceSelector }} + namespaceSelector: +{{ toYaml .namespaceSelector | indent 8 }} + {{- end }} + selector: +{{ toYaml .selector | indent 8 }} + {{- if .podTargetLabels }} + podTargetLabels: +{{ toYaml .podTargetLabels | indent 8 }} + {{- end }} + {{- if .sampleLimit }} + sampleLimit: {{ .sampleLimit }} + {{- end }} +{{- end }} +{{- end }} diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/prometheus.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/prometheus.yaml new file mode 100755 index 000000000..cbfd98526 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/prometheus.yaml @@ -0,0 +1,225 @@ +{{- if .Values.prometheus.enabled }} +apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: Prometheus +metadata: + name: {{ template "prometheus-operator.fullname" . }}-prometheus + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-prometheus +{{ include "prometheus-operator.labels" . | indent 4 }} +{{- if .Values.prometheus.annotations }} + annotations: +{{ toYaml .Values.prometheus.annotations | indent 4 }} +{{- end }} +spec: + alerting: + alertmanagers: +{{- if .Values.prometheus.prometheusSpec.alertingEndpoints }} +{{ toYaml .Values.prometheus.prometheusSpec.alertingEndpoints | indent 6 }} +{{- else if .Values.alertmanager.enabled }} + - namespace: {{ .Release.Namespace }} + name: {{ template "prometheus-operator.fullname" . }}-alertmanager + port: web + {{- if .Values.alertmanager.alertmanagerSpec.routePrefix }} + pathPrefix: "{{ .Values.alertmanager.alertmanagerSpec.routePrefix }}" + {{- end }} +{{- else }} + [] +{{- end }} +{{- if .Values.prometheus.prometheusSpec.image }} + baseImage: {{ .Values.prometheus.prometheusSpec.image.repository }} + version: {{ .Values.prometheus.prometheusSpec.image.tag }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.externalLabels }} + externalLabels: +{{ toYaml .Values.prometheus.prometheusSpec.externalLabels | indent 4}} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.prometheusExternalLabelNameClear }} + prometheusExternalLabelName: "" +{{- else if .Values.prometheus.prometheusSpec.prometheusExternalLabelName }} + prometheusExternalLabelName: "{{ .Values.prometheus.prometheusSpec.prometheusExternalLabelName }}" +{{- end }} +{{- if .Values.prometheus.prometheusSpec.replicaExternalLabelNameClear }} + replicaExternalLabelName: "" +{{- else if .Values.prometheus.prometheusSpec.replicaExternalLabelName }} + replicaExternalLabelName: "{{ .Values.prometheus.prometheusSpec.replicaExternalLabelName }}" +{{- end }} +{{- if .Values.prometheus.prometheusSpec.externalUrl }} + externalUrl: "{{ .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 }}" +{{- else }} + externalUrl: http://{{ template "prometheus-operator.fullname" . }}-prometheus.{{ .Release.Namespace }}:9090 +{{- end }} +{{- if .Values.prometheus.prometheusSpec.nodeSelector }} + nodeSelector: +{{ toYaml .Values.prometheus.prometheusSpec.nodeSelector | indent 4 }} +{{- end }} + paused: {{ .Values.prometheus.prometheusSpec.paused }} + replicas: {{ .Values.prometheus.prometheusSpec.replicas }} + logLevel: {{ .Values.prometheus.prometheusSpec.logLevel }} + logFormat: {{ .Values.prometheus.prometheusSpec.logFormat }} + listenLocal: {{ .Values.prometheus.prometheusSpec.listenLocal }} + enableAdminAPI: {{ .Values.prometheus.prometheusSpec.enableAdminAPI }} +{{- if .Values.prometheus.prometheusSpec.scrapeInterval }} + scrapeInterval: {{ .Values.prometheus.prometheusSpec.scrapeInterval }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.evaluationInterval }} + evaluationInterval: {{ .Values.prometheus.prometheusSpec.evaluationInterval }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.resources }} + resources: +{{ toYaml .Values.prometheus.prometheusSpec.resources | indent 4 }} +{{- end }} + retention: {{ .Values.prometheus.prometheusSpec.retention | quote }} +{{- if .Values.prometheus.prometheusSpec.retentionSize }} + retentionSize: {{ .Values.prometheus.prometheusSpec.retentionSize | quote }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.walCompression }} + walCompression: {{ .Values.prometheus.prometheusSpec.walCompression }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.routePrefix }} + routePrefix: {{ .Values.prometheus.prometheusSpec.routePrefix | quote }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.secrets }} + secrets: +{{ toYaml .Values.prometheus.prometheusSpec.secrets | indent 4 }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.configMaps }} + configMaps: +{{ toYaml .Values.prometheus.prometheusSpec.configMaps | indent 4 }} +{{- end }} + serviceAccountName: {{ template "prometheus-operator.prometheus.serviceAccountName" . }} +{{- if .Values.prometheus.prometheusSpec.serviceMonitorSelector }} + serviceMonitorSelector: +{{ toYaml .Values.prometheus.prometheusSpec.serviceMonitorSelector | indent 4 }} +{{ else if .Values.prometheus.prometheusSpec.serviceMonitorSelectorNilUsesHelmValues }} + serviceMonitorSelector: + matchLabels: + release: {{ .Release.Name | quote }} +{{ else }} + serviceMonitorSelector: {} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.serviceMonitorNamespaceSelector }} + serviceMonitorNamespaceSelector: +{{ toYaml .Values.prometheus.prometheusSpec.serviceMonitorNamespaceSelector | indent 4 }} +{{ else }} + serviceMonitorNamespaceSelector: {} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.podMonitorSelector }} + podMonitorSelector: +{{ toYaml .Values.prometheus.prometheusSpec.podMonitorSelector | indent 4 }} +{{ else if .Values.prometheus.prometheusSpec.podMonitorSelectorNilUsesHelmValues }} + podMonitorSelector: + matchLabels: + release: {{ .Release.Name | quote }} +{{ else }} + podMonitorSelector: {} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.podMonitorNamespaceSelector }} + podMonitorNamespaceSelector: +{{ toYaml .Values.prometheus.prometheusSpec.podMonitorNamespaceSelector | indent 4 }} +{{ else }} + podMonitorNamespaceSelector: {} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.remoteRead }} + remoteRead: +{{ toYaml .Values.prometheus.prometheusSpec.remoteRead | indent 4 }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.remoteWrite }} + remoteWrite: +{{ toYaml .Values.prometheus.prometheusSpec.remoteWrite | indent 4 }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.securityContext }} + securityContext: +{{ toYaml .Values.prometheus.prometheusSpec.securityContext | indent 4 }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.ruleNamespaceSelector }} + ruleNamespaceSelector: +{{ toYaml .Values.prometheus.prometheusSpec.ruleNamespaceSelector | indent 4 }} +{{ else }} + ruleNamespaceSelector: {} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.ruleSelector }} + ruleSelector: +{{ 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 }} +{{- if .Values.prometheus.prometheusSpec.storageSpec }} + storage: +{{ toYaml .Values.prometheus.prometheusSpec.storageSpec | indent 4 }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.podMetadata }} + podMetadata: +{{ toYaml .Values.prometheus.prometheusSpec.podMetadata | indent 4 }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.query }} + query: +{{ toYaml .Values.prometheus.prometheusSpec.query | indent 4}} +{{- end }} +{{- if or .Values.prometheus.prometheusSpec.podAntiAffinity .Values.prometheus.prometheusSpec.affinity }} + affinity: +{{- if .Values.prometheus.prometheusSpec.affinity }} +{{ toYaml .Values.prometheus.prometheusSpec.affinity | indent 4 }} +{{- end }} +{{- if eq .Values.prometheus.prometheusSpec.podAntiAffinity "hard" }} + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: {{ .Values.prometheus.prometheusSpec.podAntiAffinityTopologyKey }} + labelSelector: + matchLabels: + app: prometheus + prometheus: {{ template "prometheus-operator.fullname" . }}-prometheus +{{- else if eq .Values.prometheus.prometheusSpec.podAntiAffinity "soft" }} + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + podAffinityTerm: + topologyKey: {{ .Values.prometheus.prometheusSpec.podAntiAffinityTopologyKey }} + labelSelector: + matchLabels: + app: prometheus + prometheus: {{ template "prometheus-operator.fullname" . }}-prometheus +{{- end }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.tolerations }} + tolerations: +{{ toYaml .Values.prometheus.prometheusSpec.tolerations | indent 4 }} +{{- end }} +{{- if .Values.global.imagePullSecrets }} + imagePullSecrets: +{{ toYaml .Values.global.imagePullSecrets | indent 4 }} +{{- end }} +{{- if or .Values.prometheus.prometheusSpec.additionalScrapeConfigs .Values.prometheus.prometheusSpec.additionalScrapeConfigsExternal }} + additionalScrapeConfigs: + name: {{ template "prometheus-operator.fullname" . }}-prometheus-scrape-confg + key: additional-scrape-configs.yaml +{{- end }} +{{- if .Values.prometheus.prometheusSpec.additionalAlertManagerConfigs }} + additionalAlertManagerConfigs: + name: {{ template "prometheus-operator.fullname" . }}-prometheus-am-confg + key: additional-alertmanager-configs.yaml +{{- end }} +{{- if .Values.prometheus.prometheusSpec.additionalAlertRelabelConfigs }} + additionalAlertRelabelConfigs: + name: {{ template "prometheus-operator.fullname" . }}-prometheus-am-relabel-confg + key: additional-alert-relabel-configs.yaml +{{- end }} +{{- if .Values.prometheus.prometheusSpec.containers }} + containers: +{{ toYaml .Values.prometheus.prometheusSpec.containers | indent 4 }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.priorityClassName }} + priorityClassName: {{ .Values.prometheus.prometheusSpec.priorityClassName }} +{{- end }} +{{- if .Values.prometheus.prometheusSpec.thanos }} + thanos: +{{ toYaml .Values.prometheus.prometheusSpec.thanos | 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 new file mode 100755 index 000000000..771cdef8a --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/psp-clusterrole.yaml @@ -0,0 +1,16 @@ +{{- if and .Values.prometheus.enabled .Values.global.rbac.create .Values.global.rbac.pspEnabled }} +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ template "prometheus-operator.fullname" . }}-prometheus-psp + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-prometheus +{{ include "prometheus-operator.labels" . | indent 4 }} +rules: +- apiGroups: ['extensions'] + resources: ['podsecuritypolicies'] + verbs: ['use'] + resourceNames: + - {{ template "prometheus-operator.fullname" . }}-prometheus +{{- 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 new file mode 100755 index 000000000..d11d28d7f --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/psp-clusterrolebinding.yaml @@ -0,0 +1,19 @@ +{{- if and .Values.prometheus.enabled .Values.global.rbac.create .Values.global.rbac.pspEnabled }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ template "prometheus-operator.fullname" . }}-prometheus-psp + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-prometheus +{{ include "prometheus-operator.labels" . | indent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ template "prometheus-operator.fullname" . }}-prometheus-psp +subjects: + - kind: ServiceAccount + name: {{ template "prometheus-operator.prometheus.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} +{{- 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 new file mode 100755 index 000000000..2e3771efd --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/psp.yaml @@ -0,0 +1,52 @@ +{{- if and .Values.prometheus.enabled .Values.global.rbac.create .Values.global.rbac.pspEnabled }} +apiVersion: policy/v1beta1 +kind: PodSecurityPolicy +metadata: + name: {{ template "prometheus-operator.fullname" . }}-prometheus + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-prometheus +{{ include "prometheus-operator.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' + - 'emptyDir' + - 'projected' + - 'secret' + - 'downwardAPI' + - 'persistentVolumeClaim' + hostNetwork: false + hostIPC: false + hostPID: false + runAsUser: + # Permits the container to run with root privileges as well. + rule: 'RunAsAny' + seLinux: + # This policy assumes the nodes are using AppArmor rather than SELinux. + rule: 'RunAsAny' + supplementalGroups: + rule: 'MustRunAs' + ranges: + # Forbid adding the root group. + - min: 0 + max: 65535 + fsGroup: + rule: 'MustRunAs' + ranges: + # Forbid adding the root group. + - min: 0 + max: 65535 + readOnlyRootFilesystem: false +{{- if .Values.prometheus.podSecurityPolicy.allowedCapabilities }} + allowedCapabilities: +{{ toYaml .Values.prometheus.podSecurityPolicy.allowedCapabilities | indent 4 }} +{{- end }} +{{- end }} diff --git a/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 new file mode 100755 index 000000000..c44a6ebb4 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/alertmanager.rules.yaml @@ -0,0 +1,51 @@ +# Generated from 'alertmanager.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 "<1.16.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: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "alertmanager.rules" | trunc 63 | trimSuffix "-" }} + 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-1.14/etcd.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/etcd.yaml new file mode 100755 index 000000000..5c00fb0f9 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/etcd.yaml @@ -0,0 +1,137 @@ +# 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.14.0-0" $kubeTargetVersion) (semverCompare "<1.16.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.kubeEtcd.enabled .Values.defaultRules.rules.etcd }} +apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "etcd" | trunc 63 | trimSuffix "-" }} + 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-1.14/general.rules.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/general.rules.yaml new file mode 100755 index 000000000..587a9cbcb --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/general.rules.yaml @@ -0,0 +1,47 @@ +# Generated from 'general.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 "<1.16.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.general }} +apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "general.rules" | trunc 63 | trimSuffix "-" }} + 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, namespace, service) / count(up) BY (job, namespace, service)) > 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-1.14/k8s.rules.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/k8s.rules.yaml new file mode 100755 index 000000000..f805b7545 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/k8s.rules.yaml @@ -0,0 +1,80 @@ +# Generated from 'k8s.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 "<1.16.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.k8s }} +apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "k8s.rules" | trunc 63 | trimSuffix "-" }} + 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!="POD"}[5m])) by (namespace) + record: namespace:container_cpu_usage_seconds_total:sum_rate + - expr: |- + sum by (namespace, pod, container) ( + rate(container_cpu_usage_seconds_total{job="kubelet", image!="", container!="POD"}[5m]) + ) + record: namespace_pod_container:container_cpu_usage_seconds_total:sum_rate + - expr: sum(container_memory_usage_bytes{job="kubelet", image!="", container!="POD"}) by (namespace) + record: namespace:container_memory_usage_bytes:sum + - expr: |- + sum by (namespace, label_name) ( + sum(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)) by (namespace, pod) + * on (namespace, pod) + group_left(label_name) kube_pod_labels{job="kube-state-metrics"} + ) + record: namespace:kube_pod_container_resource_requests_memory_bytes:sum + - expr: |- + sum by (namespace, label_name) ( + sum(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)) by (namespace, pod) + * on (namespace, pod) + group_left(label_name) kube_pod_labels{job="kube-state-metrics"} + ) + record: namespace: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-1.14/kube-apiserver.rules.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-apiserver.rules.yaml new file mode 100755 index 000000000..05bfd624e --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-apiserver.rules.yaml @@ -0,0 +1,36 @@ +# 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 "<1.16.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.kubeApiServer.enabled .Values.defaultRules.rules.kubeApiserver }} +apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kube-apiserver.rules" | trunc 63 | trimSuffix "-" }} + 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_duration_seconds_bucket{job="apiserver"}[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"}[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"}[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-node-recording.rules.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-prometheus-node-recording.rules.yaml new file mode 100755 index 000000000..c017a25aa --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-prometheus-node-recording.rules.yaml @@ -0,0 +1,38 @@ +# Generated from 'kube-prometheus-node-recording.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 "<1.16.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.kubePrometheusNodeRecording }} +apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kube-prometheus-node-recording.rules" | trunc 63 | trimSuffix "-" }} + 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-1.14/kube-scheduler.rules.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-scheduler.rules.yaml new file mode 100755 index 000000000..d67f25b71 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-scheduler.rules.yaml @@ -0,0 +1,60 @@ +# Generated from 'kube-scheduler.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 "<1.16.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.kubeScheduler.enabled .Values.defaultRules.rules.kubeScheduler }} +apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kube-scheduler.rules" | trunc 63 | trimSuffix "-" }} + 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_duration_seconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod)) + labels: + quantile: '0.99' + 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' + 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' + 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' + 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' + 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' + 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' + 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' + 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' + 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/kubernetes-absent.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-absent.yaml new file mode 100755 index 000000000..90cb546f4 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-absent.yaml @@ -0,0 +1,126 @@ +# 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 "<1.16.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: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubernetes-absent" | trunc 63 | trimSuffix "-" }} + 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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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-1.14/kubernetes-apps.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-apps.yaml new file mode 100755 index 000000000..1938a72be --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-apps.yaml @@ -0,0 +1,157 @@ +# Generated from 'kubernetes-apps' 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 "<1.16.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.kubeStateMetrics.enabled .Values.defaultRules.rules.kubernetesApps }} +apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubernetes-apps" | trunc 63 | trimSuffix "-" }} + 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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubepodcrashlooping + expr: rate(kube_pod_container_status_restarts_total{job="kube-state-metrics"}[15m]) * 60 * 5 > 0 + for: 15m + labels: + severity: critical + - alert: KubePodNotReady + annotations: + message: Pod {{`{{ $labels.namespace }}`}}/{{`{{ $labels.pod }}`}} has been in a non-ready state for longer than 15 minutes. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubepodnotready + expr: sum by (namespace, pod) (kube_pod_status_phase{job="kube-state-metrics", phase=~"Failed|Pending|Unknown"}) > 0 + for: 15m + 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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubedeploymentgenerationmismatch + expr: |- + kube_deployment_status_observed_generation{job="kube-state-metrics"} + != + kube_deployment_metadata_generation{job="kube-state-metrics"} + 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 15 minutes. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubedeploymentreplicasmismatch + expr: |- + kube_deployment_spec_replicas{job="kube-state-metrics"} + != + kube_deployment_status_replicas_available{job="kube-state-metrics"} + for: 15m + 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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubestatefulsetreplicasmismatch + expr: |- + kube_statefulset_status_replicas_ready{job="kube-state-metrics"} + != + kube_statefulset_status_replicas{job="kube-state-metrics"} + 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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubestatefulsetgenerationmismatch + expr: |- + kube_statefulset_status_observed_generation{job="kube-state-metrics"} + != + kube_statefulset_metadata_generation{job="kube-state-metrics"} + for: 15m + labels: + severity: critical + - alert: KubeStatefulSetUpdateNotRolledOut + annotations: + message: StatefulSet {{`{{ $labels.namespace }}`}}/{{`{{ $labels.statefulset }}`}} update has not been rolled out. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubestatefulsetupdatenotrolledout + expr: |- + max without (revision) ( + kube_statefulset_status_current_revision{job="kube-state-metrics"} + unless + kube_statefulset_status_update_revision{job="kube-state-metrics"} + ) + * + ( + kube_statefulset_replicas{job="kube-state-metrics"} + != + kube_statefulset_status_replicas_updated{job="kube-state-metrics"} + ) + 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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubedaemonsetrolloutstuck + expr: |- + kube_daemonset_status_number_ready{job="kube-state-metrics"} + / + kube_daemonset_status_desired_number_scheduled{job="kube-state-metrics"} * 100 < 100 + for: 15m + labels: + severity: critical + - alert: KubeDaemonSetNotScheduled + annotations: + message: '{{`{{ $value }}`}} Pods of DaemonSet {{`{{ $labels.namespace }}`}}/{{`{{ $labels.daemonset }}`}} are not scheduled.' + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubedaemonsetnotscheduled + expr: |- + kube_daemonset_status_desired_number_scheduled{job="kube-state-metrics"} + - + kube_daemonset_status_current_number_scheduled{job="kube-state-metrics"} > 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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubedaemonsetmisscheduled + expr: kube_daemonset_status_number_misscheduled{job="kube-state-metrics"} > 0 + for: 10m + labels: + severity: warning + - alert: KubeCronJobRunning + annotations: + message: CronJob {{`{{ $labels.namespace }}`}}/{{`{{ $labels.cronjob }}`}} is taking more than 1h to complete. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubecronjobrunning + expr: time() - kube_cronjob_next_schedule_time{job="kube-state-metrics"} > 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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubejobcompletion + expr: kube_job_spec_completions{job="kube-state-metrics"} - kube_job_status_succeeded{job="kube-state-metrics"} > 0 + for: 1h + labels: + severity: warning + - alert: KubeJobFailed + annotations: + message: Job {{`{{ $labels.namespace }}`}}/{{`{{ $labels.job_name }}`}} failed to complete. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubejobfailed + expr: kube_job_status_failed{job="kube-state-metrics"} > 0 + for: 15m + labels: + severity: warning +{{- 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 new file mode 100755 index 000000000..c944c19ab --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-resources.yaml @@ -0,0 +1,100 @@ +# Generated from 'kubernetes-resources' 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 "<1.16.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.kubernetesResources }} +apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubernetes-resources" | trunc 63 | trimSuffix "-" }} + 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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubecpuovercommit + 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 + labels: + severity: warning + - alert: KubeMemOvercommit + annotations: + message: Cluster has overcommitted memory resource requests for Pods and cannot tolerate node failure. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubememovercommit + 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 + labels: + severity: warning + - alert: KubeCPUOvercommit + annotations: + message: Cluster has overcommitted CPU resource requests for Namespaces. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubecpuovercommit + expr: |- + sum(kube_resourcequota{job="kube-state-metrics", type="hard", resource="cpu"}) + / + sum(kube_node_status_allocatable_cpu_cores) + > 1.5 + for: 5m + labels: + severity: warning + - alert: KubeMemOvercommit + annotations: + message: Cluster has overcommitted memory resource requests for Namespaces. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubememovercommit + expr: |- + sum(kube_resourcequota{job="kube-state-metrics", type="hard", resource="memory"}) + / + sum(kube_node_status_allocatable_memory_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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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 }}`}} in pod {{`{{ $labels.pod }}`}}.' + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-cputhrottlinghigh + expr: |- + 100 * 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 + for: 15m + labels: + severity: warning +{{- 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 new file mode 100755 index 000000000..d859908f4 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-storage.yaml @@ -0,0 +1,59 @@ +# Generated from 'kubernetes-storage' 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 "<1.16.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.kubernetesStorage }} +apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubernetes-storage" | trunc 63 | trimSuffix "-" }} + 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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubepersistentvolumeusagecritical + expr: |- + 100 * kubelet_volume_stats_available_bytes{job="kubelet"} + / + kubelet_volume_stats_capacity_bytes{job="kubelet"} + < 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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubepersistentvolumefullinfourdays + expr: |- + 100 * ( + kubelet_volume_stats_available_bytes{job="kubelet"} + / + kubelet_volume_stats_capacity_bytes{job="kubelet"} + ) < 15 + and + predict_linear(kubelet_volume_stats_available_bytes{job="kubelet"}[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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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-1.14/kubernetes-system.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system.yaml new file mode 100755 index 000000000..2da52ae3d --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system.yaml @@ -0,0 +1,142 @@ +# Generated from 'kubernetes-system' 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 "<1.16.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.kubernetesSystem }} +apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubernetes-system" | trunc 63 | trimSuffix "-" }} + 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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubenodenotready + expr: kube_node_status_condition{job="kube-state-metrics",condition="Ready",status="true"} == 0 + for: 15m + labels: + severity: warning + - alert: KubeVersionMismatch + annotations: + message: There are {{`{{ $value }}`}} different semantic versions of Kubernetes components running. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: 15m + labels: + severity: warning + - alert: KubeClientErrors + annotations: + message: Kubernetes API server client '{{`{{ $labels.job }}`}}/{{`{{ $labels.instance }}`}}' is experiencing {{`{{ printf "%0.0f" $value }}`}}% errors.' + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeapilatencyhigh + expr: cluster_quantile:apiserver_request_duration_seconds: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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeapilatencyhigh + expr: cluster_quantile:apiserver_request_duration_seconds: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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeapierrorshigh + expr: |- + sum(rate(apiserver_request_total{job="apiserver",code=~"^(?:5..)$"}[5m])) + / + sum(rate(apiserver_request_total{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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeapierrorshigh + expr: |- + sum(rate(apiserver_request_total{job="apiserver",code=~"^(?:5..)$"}[5m])) + / + sum(rate(apiserver_request_total{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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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) * 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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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) * 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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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-1.14/node-exporter.rules.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node-exporter.rules.yaml new file mode 100755 index 000000000..9a049a5b1 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node-exporter.rules.yaml @@ -0,0 +1,81 @@ +# Generated from 'node-exporter.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 "<1.16.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.nodeExporter.enabled .Values.defaultRules.rules.node }} +apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "node-exporter.rules" | trunc 63 | trimSuffix "-" }} + 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-exporter.rules + rules: + - expr: |- + count without (cpu) ( + count without (mode) ( + node_cpu_seconds_total{job="node-exporter"} + ) + ) + record: instance:node_num_cpu:sum + - expr: |- + 1 - avg without (cpu, mode) ( + rate(node_cpu_seconds_total{job="node-exporter", mode="idle"}[1m]) + ) + record: instance:node_cpu_utilisation:rate1m + - expr: |- + ( + node_load1{job="node-exporter"} + / + instance:node_num_cpu:sum{job="node-exporter"} + ) + record: instance:node_load1_per_cpu:ratio + - expr: |- + 1 - ( + node_memory_MemAvailable_bytes{job="node-exporter"} + / + node_memory_MemTotal_bytes{job="node-exporter"} + ) + record: instance:node_memory_utilisation:ratio + - expr: |- + ( + rate(node_vmstat_pgpgin{job="node-exporter"}[1m]) + + + rate(node_vmstat_pgpgout{job="node-exporter"}[1m]) + ) + record: instance:node_memory_swap_io_pages:rate1m + - expr: rate(node_disk_io_time_seconds_total{job="node-exporter", device=~"nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+"}[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-.+"}[1m]) + record: instance_device:node_disk_io_time_weighted_seconds:rate1m + - expr: |- + sum without (device) ( + rate(node_network_receive_bytes_total{job="node-exporter", device!="lo"}[1m]) + ) + record: instance:node_network_receive_bytes_excluding_lo:rate1m + - expr: |- + sum without (device) ( + rate(node_network_transmit_bytes_total{job="node-exporter", device!="lo"}[1m]) + ) + record: instance:node_network_transmit_bytes_excluding_lo:rate1m + - expr: |- + sum without (device) ( + rate(node_network_receive_drop_total{job="node-exporter", device!="lo"}[1m]) + ) + record: instance:node_network_receive_drop_excluding_lo:rate1m + - expr: |- + sum without (device) ( + rate(node_network_transmit_drop_total{job="node-exporter", device!="lo"}[1m]) + ) + record: instance:node_network_transmit_drop_excluding_lo:rate1m +{{- 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 new file mode 100755 index 000000000..1d542a3d1 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node-exporter.yaml @@ -0,0 +1,162 @@ +# Generated from 'node-exporter' 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 "<1.16.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.nodeExporter.enabled .Values.defaultRules.rules.node }} +apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "node-exporter" | trunc 63 | trimSuffix "-" }} + 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-exporter + rules: + - 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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-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!=""} < 0.4 + and + predict_linear(node_filesystem_avail_bytes{job="node-exporter",fstype!=""}[6h], 24*60*60) < 0 + and + node_filesystem_readonly{job="node-exporter",fstype!=""} == 0 + ) + for: 1h + labels: + severity: warning + - 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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-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!=""} < 0.2 + and + predict_linear(node_filesystem_avail_bytes{job="node-exporter",fstype!=""}[6h], 4*60*60) < 0 + and + node_filesystem_readonly{job="node-exporter",fstype!=""} == 0 + ) + for: 1h + labels: + severity: critical + - alert: NodeFilesystemAlmostOutOfSpace + annotations: + description: Filesystem on {{`{{ $labels.device }}`}} at {{`{{ $labels.instance }}`}} has only {{`{{ printf "%.2f" $value }}`}}% available space left. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-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 + and + node_filesystem_readonly{job="node-exporter",fstype!=""} == 0 + ) + for: 1h + labels: + severity: warning + - alert: NodeFilesystemAlmostOutOfSpace + annotations: + description: Filesystem on {{`{{ $labels.device }}`}} at {{`{{ $labels.instance }}`}} has only {{`{{ printf "%.2f" $value }}`}}% available space left. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-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 + and + node_filesystem_readonly{job="node-exporter",fstype!=""} == 0 + ) + for: 1h + labels: + severity: critical + - 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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-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!=""} < 0.4 + and + predict_linear(node_filesystem_files_free{job="node-exporter",fstype!=""}[6h], 24*60*60) < 0 + and + node_filesystem_readonly{job="node-exporter",fstype!=""} == 0 + ) + for: 1h + labels: + severity: warning + - 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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-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!=""} < 0.2 + and + predict_linear(node_filesystem_files_free{job="node-exporter",fstype!=""}[6h], 4*60*60) < 0 + and + node_filesystem_readonly{job="node-exporter",fstype!=""} == 0 + ) + for: 1h + labels: + severity: critical + - alert: NodeFilesystemAlmostOutOfFiles + annotations: + description: Filesystem on {{`{{ $labels.device }}`}} at {{`{{ $labels.instance }}`}} has only {{`{{ printf "%.2f" $value }}`}}% available inodes left. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-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 + and + node_filesystem_readonly{job="node-exporter",fstype!=""} == 0 + ) + for: 1h + labels: + severity: warning + - alert: NodeFilesystemAlmostOutOfFiles + annotations: + description: Filesystem on {{`{{ $labels.device }}`}} at {{`{{ $labels.instance }}`}} has only {{`{{ printf "%.2f" $value }}`}}% available inodes left. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-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 + and + node_filesystem_readonly{job="node-exporter",fstype!=""} == 0 + ) + for: 1h + labels: + severity: critical + - alert: NodeNetworkReceiveErrs + annotations: + description: '{{`{{ $labels.instance }}`}} interface {{`{{ $labels.device }}`}} has encountered {{`{{ printf "%.0f" $value }}`}} receive errors in the last two minutes.' + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-nodenetworkreceiveerrs + summary: Network interface is reporting many receive errors. + expr: increase(node_network_receive_errs_total[2m]) > 10 + for: 1h + labels: + severity: warning + - alert: NodeNetworkTransmitErrs + annotations: + description: '{{`{{ $labels.instance }}`}} interface {{`{{ $labels.device }}`}} has encountered {{`{{ printf "%.0f" $value }}`}} transmit errors in the last two minutes.' + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-nodenetworktransmiterrs + summary: Network interface is reporting many transmit errors. + expr: increase(node_network_transmit_errs_total[2m]) > 10 + for: 1h + 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-network.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node-network.yaml new file mode 100755 index 000000000..a869ecf61 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node-network.yaml @@ -0,0 +1,31 @@ +# Generated from 'node-network' 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 "<1.16.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.network }} +apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "node-network" | trunc 63 | trimSuffix "-" }} + 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: 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-1.14/node-time.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node-time.yaml new file mode 100755 index 000000000..b57cbc931 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node-time.yaml @@ -0,0 +1,31 @@ +# 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 "<1.16.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.time }} +apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "node-time" | trunc 63 | trimSuffix "-" }} + 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 new file mode 100755 index 000000000..6caac79a1 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node.rules.yaml @@ -0,0 +1,37 @@ +# Generated from 'node.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 "<1.16.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.nodeExporter.enabled .Values.defaultRules.rules.node }} +apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "node.rules" | trunc 63 | trimSuffix "-" }} + 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: 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 +{{- 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 new file mode 100755 index 000000000..e84504e05 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/prometheus-operator.yaml @@ -0,0 +1,40 @@ +# Generated from 'prometheus-operator' 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 "<1.16.0-0" $kubeTargetVersion) .Values.defaultRules.create .Values.defaultRules.rules.prometheusOperator }} +{{- $operatorJob := printf "%s-%s" (include "prometheus-operator.fullname" .) "operator" }} +{{- $namespace := .Release.Namespace }} +apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "prometheus-operator" | trunc 63 | trimSuffix "-" }} + 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-1.14/prometheus.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/prometheus.yaml new file mode 100755 index 000000000..a9b4865c8 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/prometheus.yaml @@ -0,0 +1,192 @@ +# Generated from 'prometheus' 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 "<1.16.0-0" $kubeTargetVersion) .Values.defaultRules.create }} +{{- $prometheusJob := printf "%s-%s" (include "prometheus-operator.fullname" .) "prometheus" }} +{{- $namespace := .Release.Namespace }} +apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "prometheus" | trunc 63 | trimSuffix "-" }} + 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: + - alert: PrometheusBadConfig + annotations: + description: Prometheus {{`{{$labels.namespace}}`}}/{{`{{$labels.pod}}`}} has failed to reload its configuration. + summary: Failed Prometheus configuration reload. + expr: |- + # Without max_over_time, failed scrapes could create false negatives, see + # https://www.robustperception.io/alerting-on-gauges-in-prometheus-2-0 for details. + max_over_time(prometheus_config_last_reload_successful{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) == 0 + for: 10m + labels: + severity: critical + - alert: PrometheusNotificationQueueRunningFull + annotations: + description: Alert notification queue of Prometheus {{`{{$labels.namespace}}`}}/{{`{{$labels.pod}}`}} is running full. + summary: Prometheus alert notification queue predicted to run full in less than 30m. + expr: |- + # Without min_over_time, failed scrapes could create false negatives, see + # https://www.robustperception.io/alerting-on-gauges-in-prometheus-2-0 for details. + ( + predict_linear(prometheus_notifications_queue_length{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m], 60 * 30) + > + min_over_time(prometheus_notifications_queue_capacity{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) + ) + for: 15m + labels: + severity: warning + - alert: PrometheusErrorSendingAlertsToSomeAlertmanagers + annotations: + description: '{{`{{ printf "%.1f" $value }}`}}% errors while sending alerts from Prometheus {{`{{$labels.namespace}}`}}/{{`{{$labels.pod}}`}} to Alertmanager {{`{{$labels.alertmanager}}`}}.' + summary: Prometheus has encountered more than 1% errors sending alerts to a specific Alertmanager. + expr: |- + ( + rate(prometheus_notifications_errors_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) + / + rate(prometheus_notifications_sent_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) + ) + * 100 + > 1 + for: 15m + labels: + severity: warning + - 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 + - alert: PrometheusNotConnectedToAlertmanagers + annotations: + description: Prometheus {{`{{$labels.namespace}}`}}/{{`{{$labels.pod}}`}} is not connected to any Alertmanagers. + summary: Prometheus is not connected to any Alertmanagers. + expr: |- + # Without max_over_time, failed scrapes could create false negatives, see + # https://www.robustperception.io/alerting-on-gauges-in-prometheus-2-0 for details. + max_over_time(prometheus_notifications_alertmanagers_discovered{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) < 1 + for: 10m + labels: + severity: warning + - alert: PrometheusTSDBReloadsFailing + annotations: + description: Prometheus {{`{{$labels.namespace}}`}}/{{`{{$labels.pod}}`}} has detected {{`{{$value | humanize}}`}} reload failures over the last 3h. + summary: Prometheus has issues reloading blocks from disk. + expr: increase(prometheus_tsdb_reloads_failures_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[3h]) > 0 + for: 4h + labels: + severity: warning + - alert: PrometheusTSDBCompactionsFailing + annotations: + description: Prometheus {{`{{$labels.namespace}}`}}/{{`{{$labels.pod}}`}} has detected {{`{{$value | humanize}}`}} compaction failures over the last 3h. + summary: Prometheus has issues compacting blocks. + expr: increase(prometheus_tsdb_compactions_failed_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[3h]) > 0 + for: 4h + labels: + severity: warning + - alert: PrometheusTSDBWALCorruptions + annotations: + description: Prometheus {{`{{$labels.namespace}}`}}/{{`{{$labels.pod}}`}} has detected {{`{{$value | humanize}}`}} corruptions of the write-ahead log (WAL) over the last 3h. + summary: Prometheus is detecting WAL corruptions. + expr: increase(tsdb_wal_corruptions_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[3h]) > 0 + for: 4h + labels: + severity: warning + - alert: PrometheusNotIngestingSamples + annotations: + description: Prometheus {{`{{$labels.namespace}}`}}/{{`{{$labels.pod}}`}} is not ingesting samples. + summary: Prometheus is not ingesting samples. + expr: rate(prometheus_tsdb_head_samples_appended_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) <= 0 + for: 10m + labels: + severity: warning + - alert: PrometheusDuplicateTimestamps + annotations: + description: Prometheus {{`{{$labels.namespace}}`}}/{{`{{$labels.pod}}`}} is dropping {{`{{$value | humanize}}`}} samples/s with different values but duplicated timestamp. + summary: Prometheus is dropping samples with duplicate timestamps. + expr: rate(prometheus_target_scrapes_sample_duplicate_timestamp_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) > 0 + for: 10m + labels: + severity: warning + - alert: PrometheusOutOfOrderTimestamps + annotations: + description: Prometheus {{`{{$labels.namespace}}`}}/{{`{{$labels.pod}}`}} is dropping {{`{{$value | humanize}}`}} samples/s with timestamps arriving out of order. + summary: Prometheus drops samples with out-of-order timestamps. + expr: rate(prometheus_target_scrapes_sample_out_of_order_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) > 0 + for: 10m + labels: + severity: warning + - alert: PrometheusRemoteStorageFailures + annotations: + description: Prometheus {{`{{$labels.namespace}}`}}/{{`{{$labels.pod}}`}} failed to send {{`{{ printf "%.1f" $value }}`}}% of the samples to queue {{`{{$labels.queue}}`}}. + 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]) + + + rate(prometheus_remote_storage_succeeded_samples_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) + ) + ) + * 100 + > 1 + for: 15m + labels: + severity: critical + - alert: PrometheusRemoteWriteBehind + annotations: + description: Prometheus {{`{{$labels.namespace}}`}}/{{`{{$labels.pod}}`}} remote write is {{`{{ printf "%.1f" $value }}`}}s behind for queue {{`{{$labels.queue}}`}}. + 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 + max_over_time(prometheus_remote_storage_queue_highest_sent_timestamp_seconds{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) + ) + > 120 + for: 15m + labels: + severity: critical + - alert: PrometheusRuleFailures + annotations: + description: Prometheus {{`{{$labels.namespace}}`}}/{{`{{$labels.pod}}`}} has failed to evaluate {{`{{ printf "%.0f" $value }}`}} rules in the last 5m. + summary: Prometheus is failing rule evaluations. + expr: increase(prometheus_rule_evaluation_failures_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) > 0 + for: 15m + labels: + severity: critical + - alert: PrometheusMissingRuleEvaluations + annotations: + description: Prometheus {{`{{$labels.namespace}}`}}/{{`{{$labels.pod}}`}} has missed {{`{{ printf "%.0f" $value }}`}} rule group evaluations in the last 5m. + summary: Prometheus is missing rule evaluations due to slow rule group evaluation. + expr: increase(prometheus_rule_group_iterations_missed_total{job="{{ $prometheusJob }}",namespace="{{ $namespace }}"}[5m]) > 0 + for: 15m + labels: + severity: warning +{{- end }} \ No newline at end of file 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 new file mode 100755 index 000000000..9fb040198 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/alertmanager.rules.yaml @@ -0,0 +1,51 @@ +# 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: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "alertmanager.rules" | trunc 63 | trimSuffix "-" }} + 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 new file mode 100755 index 000000000..709b751ac --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/etcd.yaml @@ -0,0 +1,137 @@ +# 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: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "etcd" | trunc 63 | trimSuffix "-" }} + 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 new file mode 100755 index 000000000..ef02a99b1 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/general.rules.yaml @@ -0,0 +1,47 @@ +# 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: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "general.rules" | trunc 63 | trimSuffix "-" }} + 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 new file mode 100755 index 000000000..0a898d8b3 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/k8s.rules.yaml @@ -0,0 +1,80 @@ +# 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: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "k8s.rules" | trunc 63 | trimSuffix "-" }} + 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 new file mode 100755 index 000000000..5e1c38c3e --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kube-apiserver.rules.yaml @@ -0,0 +1,36 @@ +# 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: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kube-apiserver.rules" | trunc 63 | trimSuffix "-" }} + 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 new file mode 100755 index 000000000..495669742 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kube-prometheus-node-alerting.rules.yaml @@ -0,0 +1,38 @@ +# 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: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kube-prometheus-node-alerting.rules" | trunc 63 | trimSuffix "-" }} + 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 new file mode 100755 index 000000000..dd19c9deb --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kube-prometheus-node-recording.rules.yaml @@ -0,0 +1,38 @@ +# 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: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kube-prometheus-node-recording.rules" | trunc 63 | trimSuffix "-" }} + 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 new file mode 100755 index 000000000..1a5406ed4 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kube-scheduler.rules.yaml @@ -0,0 +1,60 @@ +# 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: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kube-scheduler.rules" | trunc 63 | trimSuffix "-" }} + 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 new file mode 100755 index 000000000..a21804771 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kubernetes-absent.yaml @@ -0,0 +1,126 @@ +# 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: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubernetes-absent" | trunc 63 | trimSuffix "-" }} + 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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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 new file mode 100755 index 000000000..b79da95e9 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kubernetes-apps.yaml @@ -0,0 +1,157 @@ +# 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 }} +apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubernetes-apps" | trunc 63 | trimSuffix "-" }} + 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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubepodcrashlooping + expr: rate(kube_pod_container_status_restarts_total{job="kube-state-metrics"}[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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubepodnotready + expr: sum by (namespace, pod) (kube_pod_status_phase{job="kube-state-metrics", 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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubedeploymentgenerationmismatch + expr: |- + kube_deployment_status_observed_generation{job="kube-state-metrics"} + != + kube_deployment_metadata_generation{job="kube-state-metrics"} + 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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubedeploymentreplicasmismatch + expr: |- + kube_deployment_spec_replicas{job="kube-state-metrics"} + != + kube_deployment_status_replicas_available{job="kube-state-metrics"} + 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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubestatefulsetreplicasmismatch + expr: |- + kube_statefulset_status_replicas_ready{job="kube-state-metrics"} + != + kube_statefulset_status_replicas{job="kube-state-metrics"} + 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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubestatefulsetgenerationmismatch + expr: |- + kube_statefulset_status_observed_generation{job="kube-state-metrics"} + != + kube_statefulset_metadata_generation{job="kube-state-metrics"} + for: 15m + labels: + severity: critical + - alert: KubeStatefulSetUpdateNotRolledOut + annotations: + message: StatefulSet {{`{{ $labels.namespace }}`}}/{{`{{ $labels.statefulset }}`}} update has not been rolled out. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubestatefulsetupdatenotrolledout + expr: |- + max without (revision) ( + kube_statefulset_status_current_revision{job="kube-state-metrics"} + unless + kube_statefulset_status_update_revision{job="kube-state-metrics"} + ) + * + ( + kube_statefulset_replicas{job="kube-state-metrics"} + != + kube_statefulset_status_replicas_updated{job="kube-state-metrics"} + ) + 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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubedaemonsetrolloutstuck + expr: |- + kube_daemonset_status_number_ready{job="kube-state-metrics"} + / + kube_daemonset_status_desired_number_scheduled{job="kube-state-metrics"} * 100 < 100 + for: 15m + labels: + severity: critical + - alert: KubeDaemonSetNotScheduled + annotations: + message: '{{`{{ $value }}`}} Pods of DaemonSet {{`{{ $labels.namespace }}`}}/{{`{{ $labels.daemonset }}`}} are not scheduled.' + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubedaemonsetnotscheduled + expr: |- + kube_daemonset_status_desired_number_scheduled{job="kube-state-metrics"} + - + kube_daemonset_status_current_number_scheduled{job="kube-state-metrics"} > 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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubedaemonsetmisscheduled + expr: kube_daemonset_status_number_misscheduled{job="kube-state-metrics"} > 0 + for: 10m + labels: + severity: warning + - alert: KubeCronJobRunning + annotations: + message: CronJob {{`{{ $labels.namespace }}`}}/{{`{{ $labels.cronjob }}`}} is taking more than 1h to complete. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubecronjobrunning + expr: time() - kube_cronjob_next_schedule_time{job="kube-state-metrics"} > 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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubejobcompletion + expr: kube_job_spec_completions{job="kube-state-metrics"} - kube_job_status_succeeded{job="kube-state-metrics"} > 0 + for: 1h + labels: + severity: warning + - alert: KubeJobFailed + annotations: + message: Job {{`{{ $labels.namespace }}`}}/{{`{{ $labels.job_name }}`}} failed to complete. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubejobfailed + expr: kube_job_status_failed{job="kube-state-metrics"} > 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 new file mode 100755 index 000000000..fd60d6e93 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kubernetes-resources.yaml @@ -0,0 +1,100 @@ +# 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: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubernetes-resources" | trunc 63 | trimSuffix "-" }} + 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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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 new file mode 100755 index 000000000..e34b4e6ad --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kubernetes-storage.yaml @@ -0,0 +1,59 @@ +# 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 }} +apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubernetes-storage" | trunc 63 | trimSuffix "-" }} + 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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubepersistentvolumeusagecritical + expr: |- + 100 * kubelet_volume_stats_available_bytes{job="kubelet"} + / + kubelet_volume_stats_capacity_bytes{job="kubelet"} + < 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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubepersistentvolumefullinfourdays + expr: |- + 100 * ( + kubelet_volume_stats_available_bytes{job="kubelet"} + / + kubelet_volume_stats_capacity_bytes{job="kubelet"} + ) < 15 + and + predict_linear(kubelet_volume_stats_available_bytes{job="kubelet"}[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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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 new file mode 100755 index 000000000..d78810a47 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kubernetes-system.yaml @@ -0,0 +1,142 @@ +# 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: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "kubernetes-system" | trunc 63 | trimSuffix "-" }} + 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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#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 new file mode 100755 index 000000000..c8ba60907 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/node-network.yaml @@ -0,0 +1,45 @@ +# 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: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "node-network" | trunc 63 | trimSuffix "-" }} + 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 new file mode 100755 index 000000000..1ec630800 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/node-time.yaml @@ -0,0 +1,31 @@ +# 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: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "node-time" | trunc 63 | trimSuffix "-" }} + 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 new file mode 100755 index 000000000..54b2f3eba --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/node.rules.yaml @@ -0,0 +1,199 @@ +# 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: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "node.rules" | trunc 63 | trimSuffix "-" }} + 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 new file mode 100755 index 000000000..988f26a96 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/prometheus-operator.yaml @@ -0,0 +1,40 @@ +# 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: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "prometheus-operator" | trunc 63 | trimSuffix "-" }} + 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 new file mode 100755 index 000000000..cf0417169 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/prometheus.rules.yaml @@ -0,0 +1,106 @@ +# 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: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: PrometheusRule +metadata: + name: {{ printf "%s-%s" (include "prometheus-operator.fullname" .) "prometheus.rules" | trunc 63 | trimSuffix "-" }} + 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 new file mode 100755 index 000000000..ce9766912 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/service.yaml @@ -0,0 +1,49 @@ +{{- if .Values.prometheus.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "prometheus-operator.fullname" . }}-prometheus + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-prometheus + self-monitor: {{ .Values.prometheus.serviceMonitor.selfMonitor | quote }} +{{ include "prometheus-operator.labels" . | indent 4 }} +{{- if .Values.prometheus.service.annotations }} + annotations: +{{ toYaml .Values.prometheus.service.annotations | indent 4 }} +{{- end }} +spec: +{{- if .Values.prometheus.service.clusterIP }} + clusterIP: {{ .Values.prometheus.service.clusterIP }} +{{- end }} +{{- if .Values.prometheus.service.externalIPs }} + externalIPs: +{{ toYaml .Values.prometheus.service.externalIPs | indent 4 }} +{{- end }} +{{- if .Values.prometheus.service.loadBalancerIP }} + loadBalancerIP: {{ .Values.prometheus.service.loadBalancerIP }} +{{- end }} +{{- if .Values.prometheus.service.loadBalancerSourceRanges }} + loadBalancerSourceRanges: + {{- range $cidr := .Values.prometheus.service.loadBalancerSourceRanges }} + - {{ $cidr }} + {{- end }} +{{- end }} + ports: + - name: web + {{- if eq .Values.prometheus.service.type "NodePort" }} + nodePort: {{ .Values.prometheus.service.nodePort }} + {{- end }} + port: 9090 + targetPort: {{ .Values.prometheus.service.targetPort }} +{{- if .Values.prometheus.service.additionalPorts }} +{{ toYaml .Values.prometheus.service.additionalPorts | indent 2 }} +{{- end }} + selector: + app: prometheus + prometheus: {{ template "prometheus-operator.fullname" . }}-prometheus +{{- if .Values.prometheus.service.sessionAffinity }} + sessionAffinity: {{ .Values.prometheus.service.sessionAffinity }} +{{- end }} + type: "{{ .Values.prometheus.service.type }}" +{{- 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 new file mode 100755 index 000000000..b4e670e8f --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/serviceaccount.yaml @@ -0,0 +1,16 @@ +{{- if and .Values.prometheus.enabled .Values.prometheus.serviceAccount.create }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template "prometheus-operator.prometheus.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-prometheus +{{ include "prometheus-operator.labels" . | indent 4 }} +{{- if .Values.prometheus.serviceAccount.annotations }} + annotations: +{{ toYaml .Values.prometheus.serviceAccount.annotations | indent 4 }} +{{- end }} +imagePullSecrets: +{{ toYaml .Values.global.imagePullSecrets | indent 2 }} +{{- 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 new file mode 100755 index 000000000..43a72f3bb --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/servicemonitor.yaml @@ -0,0 +1,33 @@ +{{- if and .Values.prometheus.enabled .Values.prometheus.serviceMonitor.selfMonitor }} +apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} +kind: ServiceMonitor +metadata: + name: {{ template "prometheus-operator.fullname" . }}-prometheus + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" . }}-prometheus +{{ include "prometheus-operator.labels" . | indent 4 }} +spec: + selector: + matchLabels: + app: {{ template "prometheus-operator.name" . }}-prometheus + release: {{ .Release.Name | quote }} + self-monitor: "true" + namespaceSelector: + matchNames: + - {{ .Release.Namespace | quote }} + endpoints: + - port: web + {{- if .Values.prometheus.serviceMonitor.interval }} + interval: {{ .Values.prometheus.serviceMonitor.interval }} + {{- end }} + path: "{{ trimSuffix "/" .Values.prometheus.prometheusSpec.routePrefix }}/metrics" +{{- if .Values.prometheus.serviceMonitor.metricRelabelings }} + metricRelabelings: +{{ tpl (toYaml .Values.prometheus.serviceMonitor.metricRelabelings | indent 6) . }} +{{- end }} +{{- if .Values.prometheus.serviceMonitor.relabelings }} + relabelings: +{{ toYaml .Values.prometheus.serviceMonitor.relabelings | indent 6 }} +{{- end }} +{{- end }} diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/servicemonitors.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/servicemonitors.yaml new file mode 100755 index 000000000..06e4a2028 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/servicemonitors.yaml @@ -0,0 +1,34 @@ +{{- if and .Values.prometheus.enabled .Values.prometheus.additionalServiceMonitors }} +apiVersion: v1 +kind: List +items: +{{- range .Values.prometheus.additionalServiceMonitors }} + - apiVersion: {{ printf "%s/v1" ($.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }} + kind: ServiceMonitor + metadata: + name: {{ .name }} + namespace: {{ $.Release.Namespace }} + labels: + app: {{ template "prometheus-operator.name" $ }}-prometheus +{{ include "prometheus-operator.labels" $ | indent 8 }} + {{- if .additionalLabels }} +{{ toYaml .additionalLabels | indent 8 }} + {{- end }} + spec: + endpoints: +{{ toYaml .endpoints | indent 8 }} + {{- if .jobLabel }} + jobLabel: {{ .jobLabel }} + {{- end }} + {{- if .namespaceSelector }} + namespaceSelector: +{{ toYaml .namespaceSelector | indent 8 }} + {{- end }} + selector: +{{ toYaml .selector | indent 8 }} + {{- if .targetLabels }} + targetLabels: +{{ toYaml .targetLabels | 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 new file mode 100755 index 000000000..57ca60b9a --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/serviceperreplica.yaml @@ -0,0 +1,46 @@ +{{- if and .Values.prometheus.enabled .Values.prometheus.servicePerReplica.enabled }} +{{- $count := .Values.prometheus.prometheusSpec.replicas | int -}} +{{- $serviceValues := .Values.prometheus.servicePerReplica -}} +apiVersion: v1 +kind: ServiceList +metadata: + name: {{ include "prometheus-operator.fullname" $ }}-prometheus-serviceperreplica + namespace: {{ .Release.Namespace }} +items: +{{ range $i, $e := until $count }} + - apiVersion: v1 + kind: Service + metadata: + name: {{ include "prometheus-operator.fullname" $ }}-prometheus-{{ $i }} + namespace: {{ $.Release.Namespace }} + labels: + app: {{ include "prometheus-operator.name" $ }}-prometheus +{{ include "prometheus-operator.labels" $ | indent 8 }} + {{- if $serviceValues.annotations }} + annotations: +{{ toYaml $serviceValues.annotations | indent 8 }} + {{- end }} + spec: + {{- if $serviceValues.clusterIP }} + clusterIP: {{ $serviceValues.clusterIP }} + {{- end }} + {{- if $serviceValues.loadBalancerSourceRanges }} + loadBalancerSourceRanges: + {{- range $cidr := $serviceValues.loadBalancerSourceRanges }} + - {{ $cidr }} + {{- end }} + {{- end }} + ports: + - name: web + {{- if eq $serviceValues.type "NodePort" }} + nodePort: {{ $serviceValues.nodePort }} + {{- end }} + port: 9090 + targetPort: {{ $serviceValues.targetPort }} + selector: + app: prometheus + prometheus: {{ include "prometheus-operator.fullname" $ }}-prometheus + statefulset.kubernetes.io/pod-name: prometheus-{{ include "prometheus-operator.fullname" $ }}-prometheus-{{ $i }} + type: "{{ $serviceValues.type }}" +{{- end }} +{{- end }} diff --git a/kubernetes/helm_charts/monitoring/prometheus-operator/values.yaml b/kubernetes/helm_charts/monitoring/prometheus-operator/values.yaml new file mode 100755 index 000000000..3d15ed278 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-operator/values.yaml @@ -0,0 +1,1801 @@ +# Default values for prometheus-operator. +# 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 +## +nameOverride: "" + +## Provide a name to substitute for the full names of resources +## +fullnameOverride: "" + +## Labels to apply to all resources +## +commonLabels: {} +# scmhash: abc123 +# myLabel: aakkmd + +## Create default rules for monitoring the cluster +## +defaultRules: + create: true + rules: + alertmanager: true + etcd: true + general: true + k8s: true + kubeApiserver: true + kubePrometheusNodeAlerting: true + kubePrometheusNodeRecording: true + kubernetesAbsent: true + kubernetesApps: true + kubernetesResources: true + kubernetesStorage: true + kubernetesSystem: true + kubeScheduler: true + network: true + node: true + prometheus: true + prometheusOperator: true + time: true + + ## Labels for default rules + labels: {} + ## Annotations for default rules + annotations: {} + +## Provide custom recording or alerting rules to be deployed into the cluster. +## +additionalPrometheusRules: [] +# - name: my-rule-file +# groups: +# - name: my_group +# rules: +# - record: my_record +# expr: 100 * my_record + +## +global: + rbac: + create: true + pspEnabled: true + + ## 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" + +## Configuration for alertmanager +## ref: https://prometheus.io/docs/alerting/alertmanager/ +## +alertmanager: + + ## Deploy alertmanager + ## + enabled: true + + ## Service account for Alertmanager to use. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + ## + serviceAccount: + create: true + name: "" + + ## Configure pod disruption budgets for Alertmanager + ## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget + ## This configuration is immutable once created and will require the PDB to be deleted to be changed + ## https://github.com/kubernetes/kubernetes/issues/45398 + ## + podDisruptionBudget: + enabled: false + minAvailable: 1 + maxUnavailable: "" + + ## Alertmanager configuration directives + ## ref: https://prometheus.io/docs/alerting/configuration/#configuration-file + ## https://prometheus.io/webtools/alerting/routing-tree-editor/ + ## + config: + global: + resolve_timeout: 5m + route: + group_by: ['job'] + group_wait: 30s + group_interval: 5m + repeat_interval: 12h + receiver: 'null' + routes: + - match: + alertname: Watchdog + receiver: 'null' + receivers: + - name: 'null' + + ## 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/notifications/ + ## https://prometheus.io/docs/alerting/notification_examples/ + tplConfig: false + + ## Alertmanager template files to format alerts + ## ref: https://prometheus.io/docs/alerting/notifications/ + ## https://prometheus.io/docs/alerting/notification_examples/ + ## + templateFiles: {} + # + ## An example template: + # template_1.tmpl: |- + # {{ define "cluster" }}{{ .ExternalURL | reReplaceAll ".*alertmanager\\.(.*)" "$1" }}{{ end }} + # + # {{ define "slack.myorg.text" }} + # {{- $root := . -}} + # {{ range .Alerts }} + # *Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}` + # *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 }}` + # {{ end }} + + ingress: + enabled: false + + annotations: {} + + labels: {} + + ## Hosts must be provided if Ingress is enabled. + ## + hosts: [] + # - alertmanager.domain.com + + ## Paths to use for ingress rules - one path should match the alertmanagerSpec.routePrefix + ## + paths: [] + # - / + + ## TLS configuration for Alertmanager Ingress + ## Secret must be manually created in the namespace + ## + tls: [] + # - secretName: alertmanager-general-tls + # hosts: + # - alertmanager.example.com + + ## Configuration for Alertmanager secret + ## + secret: + annotations: {} + + ## Configuration for Alertmanager service + ## + service: + annotations: {} + labels: {} + clusterIP: "" + + ## Port to expose on each node + ## Only used if service.type is 'NodePort' + ## + nodePort: 30903 + ## List of IP addresses at which the Prometheus server service is available + ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips + ## + externalIPs: [] + loadBalancerIP: "" + loadBalancerSourceRanges: [] + ## Service type + ## + type: ClusterIP + + ## If true, create a serviceMonitor for alertmanager + ## + serviceMonitor: + ## Scrape interval. If not set, the Prometheus default scrape interval is used. + ## + interval: "" + selfMonitor: true + + ## 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: ^(.*)$ + # target_label: nodename + # replacement: $1 + # action: replace + + ## Settings affecting alertmanagerSpec + ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#alertmanagerspec + ## + alertmanagerSpec: + ## Standard object’s metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata + ## Metadata Labels and Annotations gets propagated to the Alertmanager pods. + ## + podMetadata: {} + + ## Image of Alertmanager + ## + image: + repository: quay.io/prometheus/alertmanager + tag: v0.19.0 + + ## 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 + ## + useExistingSecret: false + + ## Secrets is a list of Secrets in the same namespace as the Alertmanager object, which shall be mounted into the + ## Alertmanager Pods. The Secrets are mounted into /etc/alertmanager/secrets/. + ## + secrets: [] + + ## ConfigMaps is a list of ConfigMaps in the same namespace as the Alertmanager object, which shall be mounted into the Alertmanager Pods. + ## The ConfigMaps are mounted into /etc/alertmanager/configmaps/. + ## + configMaps: [] + + ## Define Log Format + # Use logfmt (default) or json-formatted logging + logFormat: logfmt + + ## Log level for Alertmanager to be configured with. + ## + logLevel: info + + ## Size is the expected size of the alertmanager cluster. The controller will eventually make the size of the + ## running cluster equal to the expected size. + replicas: 1 + + ## Time duration Alertmanager shall retain data for. Default is '120h', and must match the regular expression + ## [0-9]+(ms|s|m|h) (milliseconds seconds minutes hours). + ## + retention: 120h + + ## Storage is the definition of how storage will be used by the Alertmanager instances. + ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/user-guides/storage.md + ## + storage: {} + # volumeClaimTemplate: + # spec: + # storageClassName: gluster + # accessModes: ["ReadWriteOnce"] + # resources: + # requests: + # storage: 50Gi + # selector: {} + + + ## The external URL the Alertmanager instances will be available under. This is necessary to generate correct URLs. This is necessary if Alertmanager is not served from root of a DNS name. string false + ## + externalUrl: + + ## The route prefix Alertmanager registers HTTP handlers for. This is useful, if using ExternalURL and a proxy is rewriting HTTP routes of a request, and the actual ExternalURL is still true, + ## but the server serves requests under a different route prefix. For example for use with kubectl proxy. + ## + routePrefix: / + + ## If set to true all actions on the underlying managed objects are not going to be performed, except for delete actions. + ## + paused: false + + ## Define which Nodes the Pods are scheduled on. + ## ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Define resources requests and limits for single Pods. + ## ref: https://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + # 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 alertmanager instance + ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + ## + affinity: {} + # nodeAffinity: + # requiredDuringSchedulingIgnoredDuringExecution: + # nodeSelectorTerms: + # - matchExpressions: + # - key: kubernetes.io/e2e-az-name + # operator: In + # values: + # - e2e-az1 + # - e2e-az2 + + ## If specified, the pod's tolerations. + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + # - key: "key" + # operator: "Equal" + # value: "value" + # effect: "NoSchedule" + + ## 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: + runAsNonRoot: true + runAsUser: 1000 + fsGroup: 2000 + + ## ListenLocal makes the Alertmanager server listen on loopback, so that it does not bind against the Pod IP. + ## Note this is only for the Alertmanager UI, not the gossip communication. + ## + listenLocal: false + + ## Containers allows injecting additional containers. This is meant to allow adding an authentication proxy to an Alertmanager pod. + ## + containers: [] + + ## Priority class assigned to the Pods + ## + priorityClassName: "" + + ## AdditionalPeers allows injecting a set of additional Alertmanagers to peer with to form a highly available cluster. + ## + additionalPeers: [] + +## Using default values from https://github.com/helm/charts/blob/master/stable/grafana/values.yaml +## +grafana: + enabled: true + + ## Deploy default dashboards. + ## + defaultDashboardsEnabled: true + + adminPassword: prom-operator + + ingress: + ## If true, Grafana Ingress will be created + ## + enabled: false + + ## Annotations for Grafana Ingress + ## + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + + ## Labels to be added to the Ingress + ## + labels: {} + + ## Hostnames. + ## Must be provided if Ingress is enable. + ## + # hosts: + # - grafana.domain.com + hosts: [] + + ## Path for grafana ingress + path: / + + ## TLS configuration for grafana Ingress + ## Secret must be manually created in the namespace + ## + tls: [] + # - secretName: grafana-general-tls + # hosts: + # - grafana.example.com + + sidecar: + dashboards: + enabled: true + label: grafana_dashboard + datasources: + enabled: true + defaultDatasourceEnabled: true + ## 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 + createPrometheusReplicasDatasources: false + label: grafana_datasource + + extraConfigmapMounts: [] + # - name: certs-configmap + # mountPath: /etc/grafana/ssl/ + # configMap: certs-configmap + # readOnly: true + + ## Configure additional grafana datasources + ## ref: http://docs.grafana.org/administration/provisioning/#datasources + additionalDataSources: [] + # - name: prometheus-sample + # access: proxy + # basicAuth: true + # basicAuthPassword: pass + # basicAuthUser: daco + # editable: false + # jsonData: + # tlsSkipVerify: true + # orgId: 1 + # type: prometheus + # url: https://prometheus.svc:9090 + # version: 1 + + ## If true, create a serviceMonitor for grafana + ## + serviceMonitor: + ## Scrape interval. If not set, the Prometheus default scrape interval is used. + ## + interval: "" + selfMonitor: true + + ## 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: ^(.*)$ + # target_label: nodename + # replacement: $1 + # action: replace + +## Component scraping the kube api server +## +kubeApiServer: + enabled: true + 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: "" + jobLabel: component + selector: + matchLabels: + component: apiserver + provider: kubernetes + + ## metric relabel configs to apply to samples before ingestion. + ## + metricRelabelings: [] + # - action: keep + # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' + # sourceLabels: [__name__] + +## Component scraping the kubelet and kubelet-hosted cAdvisor +## +kubelet: + enabled: true + namespace: kube-system + + serviceMonitor: + ## Scrape interval. If not set, the Prometheus default scrape interval is used. + ## + interval: "" + + ## Enable scraping the kubelet over https. For requirements to enable this see + ## https://github.com/coreos/prometheus-operator/issues/926 + ## + https: true + + ## Metric relabellings to apply to samples before ingestion + ## + cAdvisorMetricRelabelings: [] + # - 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 + + # relabel configs to apply to samples before ingestion. + ## + cAdvisorRelabelings: [] + # - sourceLabels: [__meta_kubernetes_pod_node_name] + # separator: ; + # regex: ^(.*)$ + # target_label: nodename + # replacement: $1 + # action: replace + + metricRelabelings: [] + # - 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 + + # relabel configs to apply to samples before ingestion. + ## + relabelings: [] + # - sourceLabels: [__meta_kubernetes_pod_node_name] + # separator: ; + # regex: ^(.*)$ + # target_label: nodename + # replacement: $1 + # action: replace + +## Component scraping the kube controller manager +## +kubeControllerManager: + enabled: true + + ## If your kube controller manager is not deployed as a pod, specify IPs it can be found on + ## + endpoints: [] + # - 10.141.4.22 + # - 10.141.4.23 + # - 10.141.4.24 + + ## If using kubeControllerManager.endpoints only the port and targetPort are used + ## + service: + port: 10252 + targetPort: 10252 + selector: + component: kube-controller-manager + + serviceMonitor: + ## Scrape interval. If not set, the Prometheus default scrape interval is used. + ## + interval: "" + + ## Enable scraping kube-controller-manager over https. + ## Requires proper certs (not self-signed) and delegated authentication/authorization checks + ## + https: false + + # Skip TLS certificate validation when scraping + insecureSkipVerify: null + + # Name of the server to use when validating TLS certificate + serverName: null + + ## 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: ^(.*)$ + # target_label: nodename + # replacement: $1 + # action: replace + +## Component scraping coreDns. Use either this or kubeDns +## +coreDns: + enabled: true + service: + port: 9153 + targetPort: 9153 + selector: + k8s-app: kube-dns + 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: ^(.*)$ + # target_label: nodename + # replacement: $1 + # action: replace + +## Component scraping kubeDns. Use either this or coreDns +## +kubeDns: + enabled: false + service: + selector: + k8s-app: kube-dns + 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: ^(.*)$ + # target_label: nodename + # replacement: $1 + # action: replace + dnsmasqMetricRelabelings: [] + # - action: keep + # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' + # sourceLabels: [__name__] + + # relabel configs to apply to samples before ingestion. + ## + dnsmasqRelabelings: [] + # - sourceLabels: [__meta_kubernetes_pod_node_name] + # separator: ; + # regex: ^(.*)$ + # target_label: nodename + # replacement: $1 + # action: replace + +## Component scraping etcd +## +kubeEtcd: + enabled: true + + ## If your etcd is not deployed as a pod, specify IPs it can be found on + ## + endpoints: [] + # - 10.141.4.22 + # - 10.141.4.23 + # - 10.141.4.24 + + ## Etcd service. If using kubeEtcd.endpoints only the port and targetPort are used + ## + service: + port: 2379 + targetPort: 2379 + selector: + component: etcd + + ## Configure secure access to the etcd cluster by loading a secret into prometheus and + ## specifying security configuration below. For example, with a secret named etcd-client-cert + ## + ## serviceMonitor: + ## scheme: https + ## insecureSkipVerify: false + ## serverName: localhost + ## caFile: /etc/prometheus/secrets/etcd-client-cert/etcd-ca + ## certFile: /etc/prometheus/secrets/etcd-client-cert/etcd-client + ## keyFile: /etc/prometheus/secrets/etcd-client-cert/etcd-client-key + ## + serviceMonitor: + ## Scrape interval. If not set, the Prometheus default scrape interval is used. + ## + interval: "" + scheme: http + insecureSkipVerify: false + serverName: "" + caFile: "" + certFile: "" + keyFile: "" + + ## 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: ^(.*)$ + # target_label: nodename + # replacement: $1 + # action: replace + + +## Component scraping kube scheduler +## +kubeScheduler: + enabled: true + + ## If your kube scheduler is not deployed as a pod, specify IPs it can be found on + ## + endpoints: [] + # - 10.141.4.22 + # - 10.141.4.23 + # - 10.141.4.24 + + ## If using kubeScheduler.endpoints only the port and targetPort are used + ## + service: + port: 10251 + targetPort: 10251 + selector: + component: kube-scheduler + + serviceMonitor: + ## Scrape interval. If not set, the Prometheus default scrape interval is used. + ## + interval: "" + ## Enable scraping kube-controller-manager over https. + ## Requires proper certs (not self-signed) and delegated authentication/authorization checks + ## + https: false + + ## Skip TLS certificate validation when scraping + insecureSkipVerify: null + + ## Name of the server to use when validating TLS certificate + serverName: null + + ## 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: ^(.*)$ + # target_label: nodename + # replacement: $1 + # action: replace + + +## Component scraping kube proxy +## +kubeProxy: + enabled: true + + service: + port: 10249 + targetPort: 10249 + selector: + k8s-app: kube-proxy + + serviceMonitor: + ## Scrape interval. If not set, the Prometheus default scrape interval is used. + ## + interval: "" + + ## 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. + ## + metricRelabelings: [] + # - action: keep + # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' + # sourceLabels: [__name__] + + # relabel configs to apply to samples before ingestion. + ## + relabelings: [] + # - action: keep + # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' + # sourceLabels: [__name__] + + +## 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: ^(.*)$ + # target_label: nodename + # replacement: $1 + # action: replace + +## Configuration for kube-state-metrics subchart +## +kube-state-metrics: + rbac: + create: true + podSecurityPolicy: + enabled: true + +## Deploy node exporter as a daemonset to all nodes +## +nodeExporter: + enabled: true + + ## Use the value configured in prometheus-node-exporter.podLabels + ## + jobLabel: jobLabel + + serviceMonitor: + ## Scrape interval. If not set, the Prometheus default scrape interval is used. + ## + interval: "" + + ## How long until a scrape request times out. If not set, the Prometheus default scape timeout is used. + ## + scrapeTimeout: "" + + ## metric relabel configs to apply to samples before ingestion. + ## + metricRelabelings: [] + # - sourceLabels: [__name__] + # separator: ; + # regex: ^node_mountstats_nfs_(event|operations|transport)_.+ + # replacement: $1 + # action: drop + + ## relabel configs to apply to samples before ingestion. + ## + relabelings: [] + # - sourceLabels: [__meta_kubernetes_pod_node_name] + # separator: ; + # regex: ^(.*)$ + # target_label: nodename + # replacement: $1 + # action: replace + +## Configuration for prometheus-node-exporter subchart +## +prometheus-node-exporter: + service: + port: 9100 + targetPort: 9100 + + podLabels: + ## Add the 'node-exporter' label to be used by serviceMonitor to match standard common usage in rules and grafana dashboards + ## + jobLabel: node-exporter + 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)$ + +## Manages Prometheus and Alertmanager components +## +prometheusOperator: + enabled: true + + tlsProxy: + enabled: true + image: + repository: squareup/ghostunnel + tag: v1.4.1 + pullPolicy: IfNotPresent + resources: {} + + ## 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 + enabled: true + ## 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. + ## + patch: + enabled: true + image: + repository: jettech/kube-webhook-certgen + tag: v1.0.0 + pullPolicy: IfNotPresent + ## Provide a priority class name to the webhook patching job + ## + priorityClassName: "" + podAnnotations: {} + nodeSelector: {} + + ## Namespaces not to scope the interaction of the Prometheus Operator (deny list). + ## + denyNamespaces: {} + + ## Service account for Alertmanager to use. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + ## + serviceAccount: + create: true + name: "" + + ## Configuration for Prometheus operator service + ## + service: + annotations: {} + labels: {} + clusterIP: "" + + ## Port to expose on each node + ## Only used if service.type is 'NodePort' + ## + nodePort: 30080 + + nodePortTls: 30443 + + ## Additional ports to open for Prometheus service + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#multi-port-services + ## + additionalPorts: [] + + ## Loadbalancer IP + ## Only use if service.type is "loadbalancer" + ## + loadBalancerIP: "" + loadBalancerSourceRanges: [] + + ## Service type + ## NodepPort, ClusterIP, loadbalancer + ## + type: ClusterIP + + ## List of IP addresses at which the Prometheus server service is available + ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips + ## + externalIPs: [] + + ## Deploy CRDs used by Prometheus Operator. + ## + createCustomResource: true + + ## Customize CRDs API Group + crdApiGroup: monitoring.coreos.com + + # Remove CRDs before instaling, created for use on CI environment. + cleanupCustomResourceBeforeInstall: false + + ## Attempt to clean up CRDs created by Prometheus Operator. + ## + cleanupCustomResource: false + + ## Labels to add to the operator pod + ## + podLabels: {} + + ## Annotations to add to the operator pod + ## + podAnnotations: {} + + ## Assign a PriorityClassName to pods if set + # priorityClassName: "" + + ## Define Log Format + # Use logfmt (default) or json-formatted 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 + ## + kubeletService: + enabled: true + namespace: kube-system + + ## Create a servicemonitor for the operator + ## + serviceMonitor: + ## Scrape interval. If not set, the Prometheus default scrape interval is used. + ## + interval: "" + selfMonitor: true + + ## 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: ^(.*)$ + # target_label: nodename + # replacement: $1 + # action: replace + + ## Resource limits & requests + ## + resources: {} + # limits: + # cpu: 200m + # memory: 200Mi + # requests: + # cpu: 100m + # memory: 100Mi + + ## Define which Nodes the Pods are scheduled on. + ## ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for use with node taints + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + # - key: "key" + # operator: "Equal" + # value: "value" + # effect: "NoSchedule" + + ## Assign custom affinity rules to the prometheus operator + ## 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 + + securityContext: + runAsNonRoot: true + runAsUser: 65534 + + ## Prometheus-operator image + ## + image: + repository: quay.io/coreos/prometheus-operator + tag: v0.32.0 + pullPolicy: IfNotPresent + + ## Configmap-reload image to use for reloading configmaps + ## + configmapReloadImage: + repository: quay.io/coreos/configmap-reload + tag: v0.0.1 + + ## Prometheus-config-reloader image to use for config and rule reloading + ## + prometheusConfigReloaderImage: + repository: quay.io/coreos/prometheus-config-reloader + tag: v0.32.0 + + ## Set the prometheus config reloader side-car CPU limit + ## + configReloaderCpu: 100m + + ## Set the prometheus config reloader side-car memory limit + ## + configReloaderMemory: 25Mi + + ## Hyperkube image to use when cleaning up + ## + hyperkubeImage: + repository: k8s.gcr.io/hyperkube + tag: v1.12.1 + pullPolicy: IfNotPresent + +## Deploy a Prometheus instance +## +prometheus: + + enabled: true + + ## Annotations for Prometheus + ## + annotations: {} + + ## Service account for Prometheuses to use. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + ## + serviceAccount: + create: true + name: "" + + ## Configuration for Prometheus service + ## + service: + annotations: {} + labels: {} + clusterIP: "" + + + ## 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 + ## + externalIPs: [] + + ## Port to expose on each node + ## Only used if service.type is 'NodePort' + ## + nodePort: 30090 + + ## Loadbalancer IP + ## Only use if service.type is "loadbalancer" + loadBalancerIP: "" + loadBalancerSourceRanges: [] + ## Service type + ## + type: ClusterIP + + sessionAffinity: "" + + ## Configuration for creating a separate Service for each statefulset Prometheus replica + ## + servicePerReplica: + enabled: false + annotations: {} + + ## To be used with a proxy extraContainer port + targetPort: 9090 + + ## Port to expose on each node + ## Only used if servicePerReplica.type is 'NodePort' + ## + nodePort: 30091 + + ## Loadbalancer source IP ranges + ## Only used if servicePerReplica.type is "loadbalancer" + loadBalancerSourceRanges: [] + ## Service type + ## + type: ClusterIP + + ## Configure pod disruption budgets for Prometheus + ## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget + ## This configuration is immutable once created and will require the PDB to be deleted to be changed + ## https://github.com/kubernetes/kubernetes/issues/45398 + ## + podDisruptionBudget: + enabled: false + minAvailable: 1 + maxUnavailable: "" + + ingress: + enabled: false + annotations: {} + labels: {} + + ## Hostnames. + ## Must be provided if Ingress is enabled. + ## + # hosts: + # - prometheus.domain.com + hosts: [] + + ## Paths to use for ingress rules - one path should match the prometheusSpec.routePrefix + ## + paths: [] + # - / + + ## TLS configuration for Prometheus Ingress + ## Secret must be manually created in the namespace + ## + tls: [] + # - secretName: prometheus-general-tls + # hosts: + # - prometheus.example.com + + ## Configuration for creating an Ingress that will map to each Prometheus replica service + ## prometheus.servicePerReplica must be enabled + ## + ingressPerReplica: + enabled: false + annotations: {} + labels: {} + + ## Final form of the hostname for each per replica ingress is + ## {{ ingressPerReplica.hostPrefix }}-{{ $replicaNumber }}.{{ ingressPerReplica.hostDomain }} + ## + ## Prefix for the per replica ingress that will have `-$replicaNumber` + ## appended to the end + hostPrefix: "" + ## Domain that will be used for the per replica ingress + hostDomain: "" + + ## Paths to use for ingress rules + ## + paths: [] + # - / + + ## Secret name containing the TLS certificate for Prometheus per replica ingress + ## Secret must be manually created in the namespace + tlsSecretName: "" + + ## Configure additional options for default pod security policy for Prometheus + ## ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/ + podSecurityPolicy: + allowedCapabilities: [] + + serviceMonitor: + ## Scrape interval. If not set, the Prometheus default scrape interval is used. + ## + interval: "" + selfMonitor: true + + ## 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: ^(.*)$ + # target_label: nodename + # replacement: $1 + # action: replace + + ## Settings affecting prometheusSpec + ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#prometheusspec + ## + prometheusSpec: + + ## Interval between consecutive scrapes. + ## + scrapeInterval: "" + + ## Interval between consecutive evaluations. + ## + evaluationInterval: "" + + ## ListenLocal makes the Prometheus server listen on loopback, so that it does not bind against the Pod IP. + ## + listenLocal: false + + ## EnableAdminAPI enables Prometheus the administrative HTTP API which includes functionality such as deleting time series. + ## This is disabled by default. + ## ref: https://prometheus.io/docs/prometheus/latest/querying/api/#tsdb-admin-apis + ## + enableAdminAPI: false + + ## Image of Prometheus. + ## + image: + repository: quay.io/prometheus/prometheus + tag: v2.12.0 + + ## Tolerations for use with node taints + ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + # - key: "key" + # operator: "Equal" + # value: "value" + # effect: "NoSchedule" + + ## Alertmanagers to which alerts will be sent + ## ref: 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 + ## + alertingEndpoints: [] + # - name: "" + # namespace: "" + # port: http + # scheme: http + + ## External labels to add to any time series or alerts when communicating with external systems + ## + externalLabels: {} + + ## Name of the external label used to denote replica name + ## + replicaExternalLabelName: "" + + ## If true, the Operator won't add the external label used to denote replica name + ## + replicaExternalLabelNameClear: false + + ## Name of the external label used to denote Prometheus instance name + ## + prometheusExternalLabelName: "" + + ## If true, the Operator won't add the external label used to denote Prometheus instance name + ## + prometheusExternalLabelNameClear: false + + ## External URL at which Prometheus will be reachable. + ## + externalUrl: "" + + ## Define which Nodes the Pods are scheduled on. + ## ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Secrets is a list of Secrets in the same namespace as the Prometheus object, which shall be mounted into the Prometheus Pods. + ## The Secrets are mounted into /etc/prometheus/secrets/. Secrets changes after initial creation of a Prometheus object are not + ## reflected in the running Pods. To change the secrets mounted into the Prometheus Pods, the object must be deleted and recreated + ## with the new list of secrets. + ## + secrets: [] + + ## ConfigMaps is a list of ConfigMaps in the same namespace as the Prometheus object, which shall be mounted into the Prometheus Pods. + ## The ConfigMaps are mounted into /etc/prometheus/configmaps/. + ## + configMaps: [] + + ## QuerySpec defines the query command line flags when starting Prometheus. + ## ref: https://github.com/coreos/prometheus-operator/blob/master/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 + ## + ruleNamespaceSelector: {} + + ## If true, a nil or {} value for prometheus.prometheusSpec.ruleSelector will cause the + ## prometheus resource to be created with selectors based on values in the helm deployment, + ## which will also match the PrometheusRule resources created + ## + ruleSelectorNilUsesHelmValues: true + + ## PrometheusRules to be selected for target discovery. + ## If {}, select all ServiceMonitors + ## + 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 + + ## If true, a nil or {} value for prometheus.prometheusSpec.serviceMonitorSelector will cause the + ## prometheus resource to be created with selectors based on values in the helm deployment, + ## which will also match the servicemonitors created + ## + serviceMonitorSelectorNilUsesHelmValues: true + + ## ServiceMonitors to be selected for target discovery. + ## If {}, select all ServiceMonitors + ## + serviceMonitorSelector: {} + ## Example which selects ServiceMonitors with label "prometheus" set to "somelabel" + # serviceMonitorSelector: + # matchLabels: + # 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: {} + + ## If true, a nil or {} value for prometheus.prometheusSpec.podMonitorSelector will cause the + ## prometheus resource to be created with selectors based on values in the helm deployment, + ## which will also match the podmonitors created + ## + podMonitorSelectorNilUsesHelmValues: true + + ## PodMonitors to be selected for target discovery. + ## If {}, select all PodMonitors + ## + podMonitorSelector: {} + ## Example which selects PodMonitors with label "prometheus" set to "somelabel" + # podMonitorSelector: + # 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 + ## + podMonitorNamespaceSelector: {} + + ## How long to retain metrics + ## + retention: 10d + + ## Maximum size of metrics + ## + retentionSize: "" + + ## Enable compression of the write-ahead log using Snappy. + ## + walCompression: false + + ## If true, the Operator won't process any Prometheus configuration changes + ## + paused: false + + ## Number of Prometheus replicas desired + ## + replicas: 1 + + ## Log level for Prometheus be configured in + ## + logLevel: info + + ## Log format for Prometheus be configured in + ## + logFormat: logfmt + + ## Prefix used to register routes, overriding externalUrl route. + ## Useful for proxies that rewrite URLs. + ## + routePrefix: / + + ## Standard object’s metadata. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata + ## Metadata Labels and Annotations gets propagated to the prometheus pods. + ## + podMetadata: {} + # labels: + # app: prometheus + # k8s-app: prometheus + + ## Pod anti-affinity can prevent the scheduler from placing Prometheus replicas on the same node. + ## The default value "soft" means that the scheduler should *prefer* to not schedule two replica pods onto the same node but no guarantee is provided. + ## The value "hard" means that the scheduler is *required* to not schedule two replica pods onto the same node. + ## The value "" will disable pod anti-affinity so that no anti-affinity rules will be configured. + podAntiAffinity: "" + + ## If anti-affinity is enabled sets the topologyKey to use for anti-affinity. + ## This can be changed to, for example, failure-domain.beta.kubernetes.io/zone + ## + podAntiAffinityTopologyKey: kubernetes.io/hostname + + ## Assign custom affinity rules to the prometheus instance + ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + ## + affinity: {} + # nodeAffinity: + # requiredDuringSchedulingIgnoredDuringExecution: + # nodeSelectorTerms: + # - matchExpressions: + # - key: kubernetes.io/e2e-az-name + # operator: In + # values: + # - e2e-az1 + # - e2e-az2 + + ## The remote_read spec configuration for Prometheus. + ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#remotereadspec + remoteRead: [] + # - url: http://remote1/read + + ## The remote_write spec configuration for Prometheus. + ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#remotewritespec + remoteWrite: [] + # - url: http://remote1/push + + ## Resource limits & requests + ## + resources: {} + # requests: + # memory: 400Mi + + ## Prometheus StorageSpec for persistent data + ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/user-guides/storage.md + ## + storageSpec: {} + # volumeClaimTemplate: + # spec: + # storageClassName: gluster + # accessModes: ["ReadWriteOnce"] + # resources: + # requests: + # storage: 50Gi + # selector: {} + + ## 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. + ## + ## The scrape configuraiton 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: [] + # - job_name: kube-etcd + # kubernetes_sd_configs: + # - role: node + # scheme: https + # tls_config: + # ca_file: /etc/prometheus/secrets/etcd-client-cert/etcd-ca + # cert_file: /etc/prometheus/secrets/etcd-client-cert/etcd-client + # key_file: /etc/prometheus/secrets/etcd-client-cert/etcd-client-key + # relabel_configs: + # - action: labelmap + # regex: __meta_kubernetes_node_label_(.+) + # - source_labels: [__address__] + # action: replace + # target_label: __address__ + # regex: ([^:;]+):(\d+) + # replacement: ${1}:2379 + # - source_labels: [__meta_kubernetes_node_name] + # action: keep + # regex: .*mst.* + # - source_labels: [__meta_kubernetes_node_name] + # action: replace + # target_label: node + # regex: (.*) + # replacement: ${1} + # 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 + + + ## 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. + ## + additionalAlertManagerConfigs: [] + # - consul_sd_configs: + # - server: consul.dev.test:8500 + # scheme: http + # datacenter: dev + # tag_separator: ',' + # services: + # - metrics-prometheus-alertmanager + + ## 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. + ## 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. + ## + additionalAlertRelabelConfigs: [] + # - separator: ; + # regex: prometheus_replica + # replacement: $1 + # action: labeldrop + + ## 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 + ## + securityContext: + runAsNonRoot: true + runAsUser: 1000 + fsGroup: 2000 + + ## 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 + ## + thanos: {} + + ## Containers allows injecting additional containers. This is meant to allow adding an authentication proxy to a Prometheus pod. + ## if using proxy extraContainer update targetPort with proxy container port + containers: [] + + ## 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. + ## + additionalScrapeConfigsExternal: false + + additionalServiceMonitors: [] + ## Name of the ServiceMonitor to create + ## + # - name: "" + + ## Additional labels to set used for the ServiceMonitorSelector. Together with standard labels from + ## the chart + ## + # additionalLabels: {} + + ## Service label for use in assembling a job name of the form - - - - - @@ -61,7 +53,7 @@ - + @@ -70,8 +62,7 @@ - - + @@ -86,7 +77,7 @@ - + @@ -101,12 +92,20 @@ + + + + + + + + + + + - - - @@ -118,6 +117,7 @@ + @@ -128,10 +128,9 @@ - - + - + jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE h2 @@ -139,13 +138,40 @@ sa - + + jdbc:h2:${jboss.server.data.dir}/keycloak;AUTO_SERVER=TRUE + h2 + + sa + sa + + + + + jdbc:postgresql://thisnotwork:5432/keycloak jdbc:postgresql://{{keycloak_postgres_host}}:5432/{{ keycloak_postgres_database }}?sslmode=require postgresql + + 100 + {{ keycloak_postgres_user }} {{ keycloak_postgres_password }} + + true + 10000 + + + @@ -179,7 +205,7 @@ - + @@ -189,8 +215,9 @@ - + + @@ -206,12 +233,7 @@ - - - - + @@ -220,50 +242,47 @@ - - + - - + + - + - + - - - - - - + + + + - + - + - + - - + + - + - + @@ -271,28 +290,28 @@ - + - + - + - + - + - + - + @@ -311,16 +330,17 @@ - + + - + - + - + @@ -329,21 +349,28 @@ - + - + + {{groups['keycloak']|join('[7600],')}}[7600] + + 10 + 3000 + 2 + + - - + + - + @@ -355,22 +382,24 @@ - + + - - + + - + - + + @@ -381,107 +410,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -498,6 +427,11 @@ + + + + + @@ -506,35 +440,25 @@ - - - - - - - + + - - - - - - + - - + - + + @@ -544,6 +468,10 @@ + + + + auth @@ -594,7 +522,7 @@ default - + @@ -609,20 +537,6 @@ - - ${keycloak.x509cert.lookup.provider:default} - - - - request - - - - - - - - @@ -642,10 +556,12 @@ - + + - + + From f3d0d9d81721492f221ccfabe02af0d5b6210691 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 13:01:50 +0530 Subject: [PATCH 0278/2894] Issue #000 feat: Creating keycloak migration script 1. taking db backup and create new db 2. with postfix_601 3. restore the data --- ansible/keycloak-migration.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 ansible/keycloak-migration.yaml diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml new file mode 100644 index 000000000..22dbc61b0 --- /dev/null +++ b/ansible/keycloak-migration.yaml @@ -0,0 +1,21 @@ +--- +- hosts: localhost + tasks: + - name: taking backup of keycloak db + postgresql_db: + name: "{{ keycloak_postgres_database }}" + state: dump + target: /root/keycloak.sql + login_user: "{{keycloak_postgres_user }}" + login_password: "{{ keycloak_postgres_password }}" + login_host: "{{ keycloak_postgres_host }}" + port: 5432 + - name: restoring keycloak old db to new db named "{{ keycloak_postgres_database }}_601" + postgresql_db: + name: "{{ keycloak_postgres_database }}_601" + state: restore + target: /root/keycloak.sql + login_user: "{{ keycloak_postgres_user }}" + login_password: "{{ keycloak_postgres_password }}" + login_host: "{{ keycloak_postgres_host }}" + port: 5432 From 9219d982a0c6c468cd3625181ff0082f1da94c37 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 13:10:32 +0530 Subject: [PATCH 0279/2894] Issue #000 feat: Pipeline for Kyecloak migtration --- .../deploy/keycloak-migration/Jenkinsfile | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 pipelines/deploy/keycloak-migration/Jenkinsfile diff --git a/pipelines/deploy/keycloak-migration/Jenkinsfile b/pipelines/deploy/keycloak-migration/Jenkinsfile new file mode 100644 index 000000000..8a976be09 --- /dev/null +++ b/pipelines/deploy/keycloak-migration/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 + sh "git clone https://github.com/project-sunbird/sunbird-auth.git -b ${sunbird_auth_branch_or_tag}" + } + ansiColor('xterm') { + stage('get artifact') { + values = lp_dp_params() + 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 ('Taking db dump and creating a new db') { + ansiblePlaybook = "${currentWs}/ansible/keycloak-migration.yml" + ansibleExtraArgs = """\ + --vault-password-file /var/lib/jenkins/secrets/vault-pass + """.stripIndent().replace("\n", " ") + 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}" + + } + } + } + catch (err) { + currentBuild.result = "FAILURE" + throw err + } + finally { + slack_notify(currentBuild.result) + email_notify() + } +} From 670154940ff32b0b2b175b7b46f8789cf8532260 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 13:17:58 +0530 Subject: [PATCH 0280/2894] Issue #000 feat: removing cloning for sunbird-auth --- pipelines/deploy/keycloak-migration/Jenkinsfile | 1 - 1 file changed, 1 deletion(-) diff --git a/pipelines/deploy/keycloak-migration/Jenkinsfile b/pipelines/deploy/keycloak-migration/Jenkinsfile index 8a976be09..761cffab1 100644 --- a/pipelines/deploy/keycloak-migration/Jenkinsfile +++ b/pipelines/deploy/keycloak-migration/Jenkinsfile @@ -10,7 +10,6 @@ node() { stage('checkout public repo') { cleanWs() checkout scm - sh "git clone https://github.com/project-sunbird/sunbird-auth.git -b ${sunbird_auth_branch_or_tag}" } ansiColor('xterm') { stage('get artifact') { From e266cd287d39c229b2e72cb576770b36fb3c1c74 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 13:29:43 +0530 Subject: [PATCH 0281/2894] Issue #000 fix: spelling mistake --- pipelines/deploy/keycloak-migration/Jenkinsfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pipelines/deploy/keycloak-migration/Jenkinsfile b/pipelines/deploy/keycloak-migration/Jenkinsfile index 761cffab1..486ce9c54 100644 --- a/pipelines/deploy/keycloak-migration/Jenkinsfile +++ b/pipelines/deploy/keycloak-migration/Jenkinsfile @@ -21,7 +21,7 @@ node() { artifact_download(values) } stage ('Taking db dump and creating a new db') { - ansiblePlaybook = "${currentWs}/ansible/keycloak-migration.yml" + ansiblePlaybook = "${currentWs}/ansible/keycloak-migration.yaml" ansibleExtraArgs = """\ --vault-password-file /var/lib/jenkins/secrets/vault-pass """.stripIndent().replace("\n", " ") @@ -31,7 +31,6 @@ node() { ansible_playbook_run(values) currentBuild.result = 'SUCCESS' currentBuild.description = "Artifact: ${values.artifact_version}, Private: ${params.private_branch}, Public: ${params.branch_or_tag}" - } } } From 6e684656354be13c3f1799cc088f9949299fa499 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 13:40:19 +0530 Subject: [PATCH 0282/2894] Issue #000 feat: changing host to local --- ansible/keycloak-migration.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 22dbc61b0..5cffe7d9a 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -1,5 +1,5 @@ --- -- hosts: localhost +- hosts: local tasks: - name: taking backup of keycloak db postgresql_db: @@ -19,3 +19,13 @@ login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" port: 5432 + - name: Stopping keycloak + shell: /etc/init.d/keycloak stop || pkill keycloak + - name: Backing up old keycloak + copy: + dest: /opt/keycloak_bak + src: /opt/keycloak + force: yes + remote_src: yes + follow: no + local_follow: yes From 8f26f5367d545281c1569ff70e0cabb764d1968a Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 13:43:30 +0530 Subject: [PATCH 0283/2894] Issue #000 feat: Adding secrets file --- ansible/keycloak-migration.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 5cffe7d9a..8be324eca 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -1,5 +1,7 @@ --- - hosts: local + vars_files: + - "{{ inventory_dir }}/secrets.yml" tasks: - name: taking backup of keycloak db postgresql_db: From 0ca642cfce943944088c1d83f42283cc77268b68 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 13:49:14 +0530 Subject: [PATCH 0284/2894] Issue #000 feat: taking backup in the current dir --- ansible/keycloak-migration.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 8be324eca..2ebd7e8bd 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -7,7 +7,7 @@ postgresql_db: name: "{{ keycloak_postgres_database }}" state: dump - target: /root/keycloak.sql + target: keycloak.sql login_user: "{{keycloak_postgres_user }}" login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" @@ -16,7 +16,7 @@ postgresql_db: name: "{{ keycloak_postgres_database }}_601" state: restore - target: /root/keycloak.sql + target: keycloak.sql login_user: "{{ keycloak_postgres_user }}" login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" From 485c42902a9e81e2222c0ef74288eadeec2e0547 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 13:53:52 +0530 Subject: [PATCH 0285/2894] Issue #000 feat: creating db prior restoring --- ansible/keycloak-migration.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 2ebd7e8bd..6e1f4d797 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -12,6 +12,13 @@ login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" port: 5432 + - name: creating newdb "{{ keycloak_postgres_database }}_601" + postgresql_db: + name: "{{ keycloak_postgres_database }}_601" + state: present + login_user: "{{ keycloak_postgres_user }}" + login_password: "{{ keycloak_postgres_password }}" + login_host: "{{ keycloak_postgres_host }}" - name: restoring keycloak old db to new db named "{{ keycloak_postgres_database }}_601" postgresql_db: name: "{{ keycloak_postgres_database }}_601" From 77eefed7d8f702a17b79109a3a96bdb20342aa8b Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 13:56:34 +0530 Subject: [PATCH 0286/2894] Issue #000 feat: Addinkg keycloak tasks --- ansible/keycloak-migration.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 6e1f4d797..862e45c5e 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -28,6 +28,8 @@ login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" port: 5432 +- hosts: keycloak + tasks: - name: Stopping keycloak shell: /etc/init.d/keycloak stop || pkill keycloak - name: Backing up old keycloak From 9f45b8f9a8439a668353297f17890a93d24b0b2a Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 14:28:36 +0530 Subject: [PATCH 0287/2894] Issue #000 feat: back and creation of new keycloak instances --- ansible/keycloak-migration.yaml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 862e45c5e..3d01a33ef 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -29,14 +29,22 @@ login_host: "{{ keycloak_postgres_host }}" port: 5432 - hosts: keycloak + vars_files: + - "{{ inventory_dir }}/secrets.yml" tasks: - - name: Stopping keycloak - shell: /etc/init.d/keycloak stop || pkill keycloak + # - name: Stopping keycloak + # shell: /etc/init.d/keycloak stop || pkill keycloak - name: Backing up old keycloak copy: dest: /opt/keycloak_bak src: /opt/keycloak force: yes remote_src: yes - follow: no - local_follow: yes + - name: downloading and unarchiving new keycloak 6.0.1 + unarchive: + src: https://sunbirdpublic.blob.core.windows.net/installation/keycloak-6.0.1.tar.gz + dest: /opt/keycloak_new + copy: yes + creates: yes + owner: keycloak + group: keycloak From b0b7afa9b4e0eaaf2e61e9332008b15e3882fe3b Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 16:27:49 +0530 Subject: [PATCH 0288/2894] Issue #000 feat: changing to root to store backup in root dir --- ansible/keycloak-migration.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 3d01a33ef..f180dc418 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -4,10 +4,11 @@ - "{{ inventory_dir }}/secrets.yml" tasks: - name: taking backup of keycloak db + become: yes postgresql_db: name: "{{ keycloak_postgres_database }}" state: dump - target: keycloak.sql + target: /root/keycloak.sql login_user: "{{keycloak_postgres_user }}" login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" @@ -20,10 +21,11 @@ login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" - name: restoring keycloak old db to new db named "{{ keycloak_postgres_database }}_601" + become: yes postgresql_db: name: "{{ keycloak_postgres_database }}_601" state: restore - target: keycloak.sql + target: /root/keycloak.sql login_user: "{{ keycloak_postgres_user }}" login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" @@ -32,8 +34,8 @@ vars_files: - "{{ inventory_dir }}/secrets.yml" tasks: - # - name: Stopping keycloak - # shell: /etc/init.d/keycloak stop || pkill keycloak + - name: Stopping keycloak + shell: /etc/init.d/keycloak stop || pkill keycloak - name: Backing up old keycloak copy: dest: /opt/keycloak_bak From 867b62093232108e3134cacc4b741a9aa7b7bc11 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 16:42:31 +0530 Subject: [PATCH 0289/2894] Issue #000 feat: enabling recursive copy for directory --- ansible/keycloak-migration.yaml | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index f180dc418..b9115c805 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -34,19 +34,38 @@ vars_files: - "{{ inventory_dir }}/secrets.yml" tasks: - - name: Stopping keycloak - shell: /etc/init.d/keycloak stop || pkill keycloak + # - name: Stopping keycloak + # shell: /etc/init.d/keycloak stop || pkill keycloak - name: Backing up old keycloak copy: - dest: /opt/keycloak_bak - src: /opt/keycloak + dest: /opt/keycloak_old/ + src: /opt/keycloak/ + backup: no force: yes + directory_mode: yes remote_src: yes + follow: no + local_follow: yes + owner: keycloak + group: keycloak + - name: downloading and unarchiving new keycloak 6.0.1 unarchive: src: https://sunbirdpublic.blob.core.windows.net/installation/keycloak-6.0.1.tar.gz dest: /opt/keycloak_new copy: yes creates: yes + directory_mode: yes owner: keycloak group: keycloak + # - name: copying old modules to new keycloak + # copy: + # dest: "{{ item }}" + # src: "{{ item }}" + # force: yes + # directory_mode: yes + # remote_src: yes + # follow: no + # local_follow: yes + # owner: keycloak + # group: keycloak From 7dc1a104b47149b868c5ccfe05285eb8644bd523 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 16:57:31 +0530 Subject: [PATCH 0290/2894] Issue #000 feat: chaginging to command from copy mode as it doesn't support recursive copy for remoe content --- ansible/keycloak-migration.yaml | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index b9115c805..77bb14cf3 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -37,27 +37,16 @@ # - name: Stopping keycloak # shell: /etc/init.d/keycloak stop || pkill keycloak - name: Backing up old keycloak - copy: - dest: /opt/keycloak_old/ - src: /opt/keycloak/ - backup: no - force: yes - directory_mode: yes - remote_src: yes - follow: no - local_follow: yes - owner: keycloak - group: keycloak - + become: yes + shell: cp -rf /opt/keycloak /opt/keycloak_old && chown -R keycloak:keycloak /opt/keycloak_old - name: downloading and unarchiving new keycloak 6.0.1 unarchive: src: https://sunbirdpublic.blob.core.windows.net/installation/keycloak-6.0.1.tar.gz dest: /opt/keycloak_new - copy: yes - creates: yes - directory_mode: yes + remote_src: yes owner: keycloak group: keycloak + creates: yes # - name: copying old modules to new keycloak # copy: # dest: "{{ item }}" From 77b159b25861738ce8c561abea7e1081ed77ad1d Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 18:08:01 +0530 Subject: [PATCH 0291/2894] Issue #000 feat: creating keycloak dir prior --- ansible/keycloak-migration.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 77bb14cf3..86eb17297 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -39,6 +39,14 @@ - name: Backing up old keycloak become: yes shell: cp -rf /opt/keycloak /opt/keycloak_old && chown -R keycloak:keycloak /opt/keycloak_old + - name: make sure keycloak path exists + become: yes + file: + path: /opt/keycloak_new + state: directory + owner: keycloak + group: keycloak + - name: downloading and unarchiving new keycloak 6.0.1 unarchive: src: https://sunbirdpublic.blob.core.windows.net/installation/keycloak-6.0.1.tar.gz @@ -46,7 +54,7 @@ remote_src: yes owner: keycloak group: keycloak - creates: yes + # - name: copying old modules to new keycloak # copy: # dest: "{{ item }}" From 02f529726fe3c6055eb4760f469dba0d87e938a7 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 18:13:44 +0530 Subject: [PATCH 0292/2894] Issue #000 feat: variabilizing keycloak --- ansible/keycloak-migration.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 86eb17297..07f66cf92 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -31,6 +31,8 @@ login_host: "{{ keycloak_postgres_host }}" port: 5432 - hosts: keycloak + vars: + keycloak_dir: /opt/keycloak vars_files: - "{{ inventory_dir }}/secrets.yml" tasks: @@ -38,23 +40,21 @@ # shell: /etc/init.d/keycloak stop || pkill keycloak - name: Backing up old keycloak become: yes - shell: cp -rf /opt/keycloak /opt/keycloak_old && chown -R keycloak:keycloak /opt/keycloak_old + shell: "cp -rf {{ keycloak_dir }} {{ keycloak_dir }}_old && chown -R keycloak:keycloak {{ keycloak_dir }}_old" - name: make sure keycloak path exists become: yes file: - path: /opt/keycloak_new + path: "{{ keycloak_dir }}_new" state: directory owner: keycloak group: keycloak - - name: downloading and unarchiving new keycloak 6.0.1 unarchive: src: https://sunbirdpublic.blob.core.windows.net/installation/keycloak-6.0.1.tar.gz - dest: /opt/keycloak_new + dest: "{{ keycloak_dir }}_new" remote_src: yes owner: keycloak group: keycloak - # - name: copying old modules to new keycloak # copy: # dest: "{{ item }}" From 3c70a67f8c19ca091031c61b36d7a4c8701298ef Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 18:16:56 +0530 Subject: [PATCH 0293/2894] Issue #000 feat: Running tasks as keycloak user --- ansible/keycloak-migration.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 07f66cf92..82e8670d7 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -31,6 +31,8 @@ login_host: "{{ keycloak_postgres_host }}" port: 5432 - hosts: keycloak + become: yes + become_user: keycloak vars: keycloak_dir: /opt/keycloak vars_files: From b0711e076026f42d4e66ad02d10d84ce6d4476bb Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 18:17:56 +0530 Subject: [PATCH 0294/2894] Issue #000 feat: removing clean workspace as it's not necessary --- pipelines/deploy/keycloak-migration/Jenkinsfile | 1 - 1 file changed, 1 deletion(-) diff --git a/pipelines/deploy/keycloak-migration/Jenkinsfile b/pipelines/deploy/keycloak-migration/Jenkinsfile index 486ce9c54..e77a0fdb4 100644 --- a/pipelines/deploy/keycloak-migration/Jenkinsfile +++ b/pipelines/deploy/keycloak-migration/Jenkinsfile @@ -8,7 +8,6 @@ node() { String ANSI_YELLOW = "\u001B[33m" stage('checkout public repo') { - cleanWs() checkout scm } ansiColor('xterm') { From 693e3dd2d7d919ea54e97fe9641eda6fef0c6751 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 18:20:59 +0530 Subject: [PATCH 0295/2894] Issue #000 feat: Running as root user and changing permissions --- ansible/keycloak-migration.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 82e8670d7..9b86ce9bd 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -31,8 +31,6 @@ login_host: "{{ keycloak_postgres_host }}" port: 5432 - hosts: keycloak - become: yes - become_user: keycloak vars: keycloak_dir: /opt/keycloak vars_files: @@ -51,6 +49,7 @@ owner: keycloak group: keycloak - name: downloading and unarchiving new keycloak 6.0.1 + become: yes unarchive: src: https://sunbirdpublic.blob.core.windows.net/installation/keycloak-6.0.1.tar.gz dest: "{{ keycloak_dir }}_new" From d7069ea1bd5458090c69eb1ccd788e2d3c529fb4 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 18:34:49 +0530 Subject: [PATCH 0296/2894] Issue #000 feat: removing parent directory while unarchiving --- ansible/keycloak-migration.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 9b86ce9bd..c4e7e2851 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -56,6 +56,18 @@ remote_src: yes owner: keycloak group: keycloak + extra_opts: [--strip-components=1] + - name: Copying old files to new keycloak for migration + become: yes + become_user: keycloak + shell: "cp -rf {{ keycloak_dir }}_old/standalone/ {{ keycloak_dir }}_new/standalone/ " + + - name: Running migration + becom: yes + become_user: keycloak + script: bin/jboss-cli.sh --file=bin/migrate-standalone.cli + chdir: "{{ keycloak_dir }}" + # - name: copying old modules to new keycloak # copy: # dest: "{{ item }}" From 1d303564bb998e96261a8e1f5ee0728eb902134f Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 18:39:46 +0530 Subject: [PATCH 0297/2894] Issue #000 feat: looping migration script --- ansible/keycloak-migration.yaml | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index c4e7e2851..2d2c09f69 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -65,17 +65,8 @@ - name: Running migration becom: yes become_user: keycloak - script: bin/jboss-cli.sh --file=bin/migrate-standalone.cli + shell: "bash {{ item }}" + whith_items: + - "bin/jboss-cli.sh --file=bin/migrate-standalone.cli" + - "bin/jboss-cli.sh --file=bin/migrate-standalone-ha.cli" chdir: "{{ keycloak_dir }}" - - # - name: copying old modules to new keycloak - # copy: - # dest: "{{ item }}" - # src: "{{ item }}" - # force: yes - # directory_mode: yes - # remote_src: yes - # follow: no - # local_follow: yes - # owner: keycloak - # group: keycloak From aae3866ce5341b3b76c9c73c3895240c6e329fb4 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 18:46:28 +0530 Subject: [PATCH 0298/2894] Issue #000 feat: removing surrounding "" --- ansible/keycloak-migration.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 2d2c09f69..d43332f78 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -13,7 +13,7 @@ login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" port: 5432 - - name: creating newdb "{{ keycloak_postgres_database }}_601" + - name: creating newdb {{ keycloak_postgres_database }}_601 postgresql_db: name: "{{ keycloak_postgres_database }}_601" state: present @@ -63,10 +63,11 @@ shell: "cp -rf {{ keycloak_dir }}_old/standalone/ {{ keycloak_dir }}_new/standalone/ " - name: Running migration - becom: yes + become: yes become_user: keycloak shell: "bash {{ item }}" - whith_items: + with_items: - "bin/jboss-cli.sh --file=bin/migrate-standalone.cli" - "bin/jboss-cli.sh --file=bin/migrate-standalone-ha.cli" - chdir: "{{ keycloak_dir }}" + args: + chdir: "{{ keycloak_dir }}_new" From 7f714908c2fd0f8444d4a3fae9b0193183fe49de Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 19:39:33 +0530 Subject: [PATCH 0299/2894] Issue #000 fix: copy issue --- ansible/keycloak-migration.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index d43332f78..47542a2d2 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -60,7 +60,7 @@ - name: Copying old files to new keycloak for migration become: yes become_user: keycloak - shell: "cp -rf {{ keycloak_dir }}_old/standalone/ {{ keycloak_dir }}_new/standalone/ " + shell: "cp -rf {{ keycloak_dir }}_old/standalone/* {{ keycloak_dir }}_new/standalone/ " - name: Running migration become: yes From 036466b08a5cbad046cedfffbc7b8b81dfd15a18 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 19:48:56 +0530 Subject: [PATCH 0300/2894] Issue #000 feat: copying all files for migration --- ansible/keycloak-migration.yaml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 47542a2d2..4dfc7c817 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -60,14 +60,17 @@ - name: Copying old files to new keycloak for migration become: yes become_user: keycloak - shell: "cp -rf {{ keycloak_dir }}_old/standalone/* {{ keycloak_dir }}_new/standalone/ " - - - name: Running migration - become: yes - become_user: keycloak - shell: "bash {{ item }}" + shell: "cp -rf {{ keycloak_dir }}_old/{{ item }}/* {{ keycloak_dir }}_new/{{ item }}/ " with_items: - - "bin/jboss-cli.sh --file=bin/migrate-standalone.cli" - - "bin/jboss-cli.sh --file=bin/migrate-standalone-ha.cli" - args: - chdir: "{{ keycloak_dir }}_new" + - standalone + - domain + + # - name: Running migration + # become: yes + # become_user: keycloak + # shell: "bash {{ item }}" + # with_items: + # - "bin/jboss-cli.sh --file=bin/migrate-standalone.cli" + # - "bin/jboss-cli.sh --file=bin/migrate-standalone-ha.cli" + # args: + # chdir: "{{ keycloak_dir }}_new" From ce73d1a3f8b0d8e64a09622a14c775090b869814 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 22:18:29 +0530 Subject: [PATCH 0301/2894] Starting migration on existing dbs, but creating a db for backup --- ansible/keycloak-migration.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 4dfc7c817..69072f652 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -13,17 +13,17 @@ login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" port: 5432 - - name: creating newdb {{ keycloak_postgres_database }}_601 + - name: creating newdb {{ keycloak_postgres_database }}_301 postgresql_db: - name: "{{ keycloak_postgres_database }}_601" + name: "{{ keycloak_postgres_database }}_301" state: present login_user: "{{ keycloak_postgres_user }}" login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" - - name: restoring keycloak old db to new db named "{{ keycloak_postgres_database }}_601" + - name: restoring keycloak old db to new db named "{{ keycloak_postgres_database }}_301" become: yes postgresql_db: - name: "{{ keycloak_postgres_database }}_601" + name: "{{ keycloak_postgres_database }}_301" state: restore target: /root/keycloak.sql login_user: "{{ keycloak_postgres_user }}" From bac9b828d672ee50da66960bf895ead2dd0b5c31 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 22:19:27 +0530 Subject: [PATCH 0302/2894] Issue #000 feat: debugging status variable --- ansible/keycloak-migration.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 69072f652..6127a078b 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -20,6 +20,9 @@ login_user: "{{ keycloak_postgres_user }}" login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" + register: status + - debug: + var: status - name: restoring keycloak old db to new db named "{{ keycloak_postgres_database }}_301" become: yes postgresql_db: From e14ca96ec06f76941131d93c5ac009679b9d1c0f Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 22:23:17 +0530 Subject: [PATCH 0303/2894] Issue #000 feat: creating database only at the first time --- ansible/keycloak-migration.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 6127a078b..3e6e75286 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -21,8 +21,6 @@ login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" register: status - - debug: - var: status - name: restoring keycloak old db to new db named "{{ keycloak_postgres_database }}_301" become: yes postgresql_db: @@ -33,6 +31,7 @@ login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" port: 5432 + when: status.failed not false - hosts: keycloak vars: keycloak_dir: /opt/keycloak From 2f859d3c2d183a104ea7752c2755ea7965e62037 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 22:26:09 +0530 Subject: [PATCH 0304/2894] Issue #000 feat: creating db backup location variable --- ansible/keycloak-migration.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 3e6e75286..a150121dc 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -2,13 +2,15 @@ - hosts: local vars_files: - "{{ inventory_dir }}/secrets.yml" + vars: + db_backup_name: "/root/keycloak{{ ansible_date_time.epoch }}.sql" tasks: - name: taking backup of keycloak db become: yes postgresql_db: name: "{{ keycloak_postgres_database }}" state: dump - target: /root/keycloak.sql + target: "{{ db_backup_name }}" login_user: "{{keycloak_postgres_user }}" login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" @@ -21,17 +23,18 @@ login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" register: status + - name: restoring keycloak old db to new db named "{{ keycloak_postgres_database }}_301" become: yes postgresql_db: name: "{{ keycloak_postgres_database }}_301" state: restore - target: /root/keycloak.sql + target: "{{ db_backup_name }}" login_user: "{{ keycloak_postgres_user }}" login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" port: 5432 - when: status.failed not false + when: status.failed != false - hosts: keycloak vars: keycloak_dir: /opt/keycloak From 1d95357bf6806d2d327a45e53169500a1e3b932d Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 23:12:32 +0530 Subject: [PATCH 0305/2894] Issue #000 feat: test db creation --- ansible/keycloak-migration.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index a150121dc..7f1a586c8 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -15,6 +15,13 @@ login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" port: 5432 + - name: deleting newdb {{ keycloak_postgres_database }}_301 + postgresql_db: + name: "{{ keycloak_postgres_database }}_301" + state: absent + login_user: "{{ keycloak_postgres_user }}" + login_password: "{{ keycloak_postgres_password }}" + login_host: "{{ keycloak_postgres_host }}" - name: creating newdb {{ keycloak_postgres_database }}_301 postgresql_db: name: "{{ keycloak_postgres_database }}_301" @@ -23,7 +30,6 @@ login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" register: status - - name: restoring keycloak old db to new db named "{{ keycloak_postgres_database }}_301" become: yes postgresql_db: From a5bab9fa9149dd7743e2defb1f0f9448fe6b154b Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 23:16:11 +0530 Subject: [PATCH 0306/2894] Issue #000 feat: debugging --- ansible/keycloak-migration.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 7f1a586c8..3b5f6c622 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -30,6 +30,9 @@ login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" register: status + - name: debugging + debug: + var: status - name: restoring keycloak old db to new db named "{{ keycloak_postgres_database }}_301" become: yes postgresql_db: From 23a817151de9feeea61cf9bee1093403560dd349 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 23:20:04 +0530 Subject: [PATCH 0307/2894] Issue #000 feat: triggering restoring only while creating db --- ansible/keycloak-migration.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 3b5f6c622..1e1fcb87f 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -43,7 +43,7 @@ login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" port: 5432 - when: status.failed != false + when: status.changed - hosts: keycloak vars: keycloak_dir: /opt/keycloak From 41ea01871aaf6a21fb0eda231ba1d16fdd482e74 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 23:21:47 +0530 Subject: [PATCH 0308/2894] Issue #000 feat: removing delete --- ansible/keycloak-migration.yaml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 1e1fcb87f..2571c64b3 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -15,13 +15,6 @@ login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" port: 5432 - - name: deleting newdb {{ keycloak_postgres_database }}_301 - postgresql_db: - name: "{{ keycloak_postgres_database }}_301" - state: absent - login_user: "{{ keycloak_postgres_user }}" - login_password: "{{ keycloak_postgres_password }}" - login_host: "{{ keycloak_postgres_host }}" - name: creating newdb {{ keycloak_postgres_database }}_301 postgresql_db: name: "{{ keycloak_postgres_database }}_301" From 5855d8245f7d606d07d68cd871b137c2369c6591 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 9 Oct 2019 23:36:27 +0530 Subject: [PATCH 0309/2894] Issue #000 feat: staring/stopping keycloak --- ansible/keycloak-migration.yaml | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 2571c64b3..4681c53c3 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -15,7 +15,7 @@ login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" port: 5432 - - name: creating newdb {{ keycloak_postgres_database }}_301 + - name: creating backup db {{ keycloak_postgres_database }}_301 postgresql_db: name: "{{ keycloak_postgres_database }}_301" state: present @@ -26,7 +26,7 @@ - name: debugging debug: var: status - - name: restoring keycloak old db to new db named "{{ keycloak_postgres_database }}_301" + - name: creating backup keycloak old db {{ keycloak_postgres_database }}_301 for the first time become: yes postgresql_db: name: "{{ keycloak_postgres_database }}_301" @@ -43,8 +43,8 @@ vars_files: - "{{ inventory_dir }}/secrets.yml" tasks: - # - name: Stopping keycloak - # shell: /etc/init.d/keycloak stop || pkill keycloak + - name: Stopping keycloak + shell: /etc/init.d/keycloak stop || pkill keycloak - name: Backing up old keycloak become: yes shell: "cp -rf {{ keycloak_dir }} {{ keycloak_dir }}_old && chown -R keycloak:keycloak {{ keycloak_dir }}_old" @@ -71,13 +71,15 @@ with_items: - standalone - domain - - # - name: Running migration - # become: yes - # become_user: keycloak - # shell: "bash {{ item }}" - # with_items: - # - "bin/jboss-cli.sh --file=bin/migrate-standalone.cli" - # - "bin/jboss-cli.sh --file=bin/migrate-standalone-ha.cli" - # args: - # chdir: "{{ keycloak_dir }}_new" + - name: Running migration + become: yes + become_user: keycloak + shell: "bash {{ item }}" + with_items: + - "bin/jboss-cli.sh --file=bin/migrate-standalone.cli" + - "bin/jboss-cli.sh --file=bin/migrate-standalone-ha.cli" + args: + chdir: "{{ keycloak_dir }}_new" + - name: starting keycloak + become: yes + shell: /etc/init.d/keycloak start From 8cfa09264adfe07f872f8d769f78be1d99ecc3dc Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 12:27:29 +0530 Subject: [PATCH 0310/2894] Issue #000 feat: passing pre-built keycloak for migration --- pipelines/deploy/keycloak-migration/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipelines/deploy/keycloak-migration/Jenkinsfile b/pipelines/deploy/keycloak-migration/Jenkinsfile index e77a0fdb4..19c3671e4 100644 --- a/pipelines/deploy/keycloak-migration/Jenkinsfile +++ b/pipelines/deploy/keycloak-migration/Jenkinsfile @@ -22,7 +22,7 @@ node() { stage ('Taking db dump and creating a new db') { ansiblePlaybook = "${currentWs}/ansible/keycloak-migration.yaml" ansibleExtraArgs = """\ - --vault-password-file /var/lib/jenkins/secrets/vault-pass + --extra-args keycloak_zip=${artifact} --vault-password-file /var/lib/jenkins/secrets/vault-pass """.stripIndent().replace("\n", " ") values.put('ansiblePlaybook', ansiblePlaybook) values.put('ansibleExtraArgs', ansibleExtraArgs) From 8a750973d5535af0816e1e44023144953a713325 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 12:41:49 +0530 Subject: [PATCH 0311/2894] Issue #000 feat: removing redundant deployment code --- ansible/keycloak-migration.yaml | 4 +-- .../roles/keycloak-deploy/tasks/deploy.yml | 27 +++++-------------- 2 files changed, 9 insertions(+), 22 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 4681c53c3..3f17519da 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -55,10 +55,10 @@ state: directory owner: keycloak group: keycloak - - name: downloading and unarchiving new keycloak 6.0.1 + - name: copy and unarchiving new keycloak 6.0.1 become: yes unarchive: - src: https://sunbirdpublic.blob.core.windows.net/installation/keycloak-6.0.1.tar.gz + src: "{{keycoak_zip}}" dest: "{{ keycloak_dir }}_new" remote_src: yes owner: keycloak diff --git a/ansible/roles/keycloak-deploy/tasks/deploy.yml b/ansible/roles/keycloak-deploy/tasks/deploy.yml index 019e65a9d..78d0e7783 100644 --- a/ansible/roles/keycloak-deploy/tasks/deploy.yml +++ b/ansible/roles/keycloak-deploy/tasks/deploy.yml @@ -39,34 +39,21 @@ group: "{{ wildfly_group }}" force: true -- name: Paste keycloak package on server - copy: - src: "{{ artifact_path }}" - dest: "/opt/" +- name: Creating keycloak directory + become: true + file: + path: "{{ keycloak_home }}" + state: directory owner: "{{ wildfly_user }}" group: "{{ wildfly_group }}" - force: true - name: Extarct the folder unarchive: - src: "/opt/{{ artifact }}" - dest: /opt/ - copy: false + src: "{{ artifact }}" + dest: "{{ keycloak_home }}" owner: "{{ wildfly_user }}" group: "{{ wildfly_group }}" -- name: Move the folder name - command: mv sunbird_auth_{{ sunbird_auth_version }} keycloak - args: - chdir: /opt - -- name: Remove the opt/{{ artifact }} - become: true - file: - path: "/opt/{{ artifact }}" - state: absent - force: true - - name: Create required directories file: path: "{{ item.dest }}" From 330d1abb5eed4690e9662362dda7ffc9a2cf68be Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 12:46:30 +0530 Subject: [PATCH 0312/2894] Issue #000 feat: using prebuilt keycloak from build job --- ansible/keycloak-migration.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 3f17519da..7f5e157ae 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -60,7 +60,6 @@ unarchive: src: "{{keycoak_zip}}" dest: "{{ keycloak_dir }}_new" - remote_src: yes owner: keycloak group: keycloak extra_opts: [--strip-components=1] From a3a10e89c5096ecb76b6d7a51e2c6745e4138878 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 13:47:56 +0530 Subject: [PATCH 0313/2894] Issue #000 feat: removing keyoack starting step, as it's not necessary --- ansible/keycloak-migration.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 7f5e157ae..5e5568e59 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -79,6 +79,3 @@ - "bin/jboss-cli.sh --file=bin/migrate-standalone-ha.cli" args: chdir: "{{ keycloak_dir }}_new" - - name: starting keycloak - become: yes - shell: /etc/init.d/keycloak start From 37e3cbc25486659b254d9795c7beaf65c00a0a8e Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 13:51:21 +0530 Subject: [PATCH 0314/2894] Issue #000 fix: ansible extra vars --- pipelines/deploy/keycloak-migration/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipelines/deploy/keycloak-migration/Jenkinsfile b/pipelines/deploy/keycloak-migration/Jenkinsfile index 19c3671e4..2eef1d172 100644 --- a/pipelines/deploy/keycloak-migration/Jenkinsfile +++ b/pipelines/deploy/keycloak-migration/Jenkinsfile @@ -22,7 +22,7 @@ node() { stage ('Taking db dump and creating a new db') { ansiblePlaybook = "${currentWs}/ansible/keycloak-migration.yaml" ansibleExtraArgs = """\ - --extra-args keycloak_zip=${artifact} --vault-password-file /var/lib/jenkins/secrets/vault-pass + --extra-vars keycloak_zip=${artifact} --vault-password-file /var/lib/jenkins/secrets/vault-pass """.stripIndent().replace("\n", " ") values.put('ansiblePlaybook', ansiblePlaybook) values.put('ansibleExtraArgs', ansibleExtraArgs) From 6eab9d9c7d3b4938bd4305b95a0119af90175fd1 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 13:53:26 +0530 Subject: [PATCH 0315/2894] Issue #000 feat: updating keycloak stop method --- ansible/keycloak-migration.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 5e5568e59..54b87186a 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -44,7 +44,8 @@ - "{{ inventory_dir }}/secrets.yml" tasks: - name: Stopping keycloak - shell: /etc/init.d/keycloak stop || pkill keycloak + become: yes + shell: /bin/bash -c "/etc/init.d/keycloak stop || pkill keycloak" - name: Backing up old keycloak become: yes shell: "cp -rf {{ keycloak_dir }} {{ keycloak_dir }}_old && chown -R keycloak:keycloak {{ keycloak_dir }}_old" From 84648e7691fb2ec10609698bc666e116f3a8cac3 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 13:56:27 +0530 Subject: [PATCH 0316/2894] Issue #000 fix: keycloak src variable --- ansible/keycloak-migration.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 54b87186a..08d764adb 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -59,7 +59,7 @@ - name: copy and unarchiving new keycloak 6.0.1 become: yes unarchive: - src: "{{keycoak_zip}}" + src: "{{keycloak_zip}}" dest: "{{ keycloak_dir }}_new" owner: keycloak group: keycloak From c53614273c49ef68ee24bf735e564a141f64e452 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 14:09:02 +0530 Subject: [PATCH 0317/2894] Issue #000 feat: not exiting even if keycloak kill says failure --- ansible/keycloak-migration.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 08d764adb..7d70d3669 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -45,7 +45,7 @@ tasks: - name: Stopping keycloak become: yes - shell: /bin/bash -c "/etc/init.d/keycloak stop || pkill keycloak" + shell: /bin/bash -c "/etc/init.d/keycloak stop || pkill keycloak && true" - name: Backing up old keycloak become: yes shell: "cp -rf {{ keycloak_dir }} {{ keycloak_dir }}_old && chown -R keycloak:keycloak {{ keycloak_dir }}_old" From e75448d0b1308407c746545f7cce92c4f323eaec Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 14:13:12 +0530 Subject: [PATCH 0318/2894] Issue #000 feat: waiting for keycloak to stop --- ansible/keycloak-migration.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 7d70d3669..709f4304a 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -46,6 +46,11 @@ - name: Stopping keycloak become: yes shell: /bin/bash -c "/etc/init.d/keycloak stop || pkill keycloak && true" + - name: Waiting for keycloak to exit + wait_for: + port: 8080 + state: stopped + timeout: 30 - name: Backing up old keycloak become: yes shell: "cp -rf {{ keycloak_dir }} {{ keycloak_dir }}_old && chown -R keycloak:keycloak {{ keycloak_dir }}_old" From d179ecad48e0159f272271ba03f2bbf2abbaf11b Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 14:26:32 +0530 Subject: [PATCH 0319/2894] Issue #000 feat: appending keycloak path with artifact --- pipelines/deploy/keycloak-migration/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipelines/deploy/keycloak-migration/Jenkinsfile b/pipelines/deploy/keycloak-migration/Jenkinsfile index 2eef1d172..51548dd15 100644 --- a/pipelines/deploy/keycloak-migration/Jenkinsfile +++ b/pipelines/deploy/keycloak-migration/Jenkinsfile @@ -22,7 +22,7 @@ node() { stage ('Taking db dump and creating a new db') { ansiblePlaybook = "${currentWs}/ansible/keycloak-migration.yaml" ansibleExtraArgs = """\ - --extra-vars keycloak_zip=${artifact} --vault-password-file /var/lib/jenkins/secrets/vault-pass + --extra-vars keycloak_zip=${currentWs}/${artifact} --vault-password-file /var/lib/jenkins/secrets/vault-pass """.stripIndent().replace("\n", " ") values.put('ansiblePlaybook', ansiblePlaybook) values.put('ansibleExtraArgs', ansibleExtraArgs) From 0a5441b95cc4c520a1f4207c496f6b2e08c9d3ba Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 14:44:35 +0530 Subject: [PATCH 0320/2894] Issue #000 feat: never failing --- ansible/keycloak-migration.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 709f4304a..dd1a70938 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -45,7 +45,8 @@ tasks: - name: Stopping keycloak become: yes - shell: /bin/bash -c "/etc/init.d/keycloak stop || pkill keycloak && true" + shell: /bin/bash -c "/etc/init.d/keycloak stop || pkill keycloak" + failed_when: false - name: Waiting for keycloak to exit wait_for: port: 8080 From d7587d94199e2de1aec36cd98d5ae403759604db Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 15:35:01 +0530 Subject: [PATCH 0321/2894] Issue #000 feat: removing tar strip, because of zip --- ansible/keycloak-migration.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index dd1a70938..0b8259a33 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -69,7 +69,6 @@ dest: "{{ keycloak_dir }}_new" owner: keycloak group: keycloak - extra_opts: [--strip-components=1] - name: Copying old files to new keycloak for migration become: yes become_user: keycloak From 512b5a85996403be8e57630ed3a01e6fb0f933cb Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 15:43:20 +0530 Subject: [PATCH 0322/2894] Issue #000 feat: moving sunbird_auth to keycloak --- ansible/keycloak-migration.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 0b8259a33..bb07cc054 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -66,13 +66,16 @@ become: yes unarchive: src: "{{keycloak_zip}}" - dest: "{{ keycloak_dir }}_new" + dest: "/opt/" owner: keycloak group: keycloak + - name: Renaming keycloak artifact + become: yes + shell: "mv /opt/sunbird_auth_1.0v {{ keycloak_dir }}_new ; chown -R keycloak:keycloak {{keycloak_dir}}_new" - name: Copying old files to new keycloak for migration become: yes become_user: keycloak - shell: "cp -rf {{ keycloak_dir }}_old/{{ item }}/* {{ keycloak_dir }}_new/{{ item }}/ " + shell: "cp -rf {{ keycloak_dir }}_old/{{ item }}/* {{ keycloak_dir }}_new/{{ item }}/" with_items: - standalone - domain From 17e1f41dce5e27591f26f69f6359d82a3f70c5e6 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 17:37:35 +0530 Subject: [PATCH 0323/2894] Issue #000 feat: testing unzip ansible --- ansible/keycloak-migration.yaml | 38 ++++++++++++++++----------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index bb07cc054..b72b89690 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -65,26 +65,26 @@ - name: copy and unarchiving new keycloak 6.0.1 become: yes unarchive: - src: "{{keycloak_zip}}" - dest: "/opt/" + src: "{{ keycloak_zip }}" + dest: "/opt/keycloak_new" owner: keycloak group: keycloak - name: Renaming keycloak artifact become: yes - shell: "mv /opt/sunbird_auth_1.0v {{ keycloak_dir }}_new ; chown -R keycloak:keycloak {{keycloak_dir}}_new" - - name: Copying old files to new keycloak for migration - become: yes - become_user: keycloak - shell: "cp -rf {{ keycloak_dir }}_old/{{ item }}/* {{ keycloak_dir }}_new/{{ item }}/" - with_items: - - standalone - - domain - - name: Running migration - become: yes - become_user: keycloak - shell: "bash {{ item }}" - with_items: - - "bin/jboss-cli.sh --file=bin/migrate-standalone.cli" - - "bin/jboss-cli.sh --file=bin/migrate-standalone-ha.cli" - args: - chdir: "{{ keycloak_dir }}_new" + shell: "mv {{ keycloak_dir }}_new/sunbird_auth_1.0v/* {{ keycloak_dir }}_new/ ; rm -rf {{ keycloak_dir }}_new/sunbird_auth_1.0v ; chown -R keycloak:keycloak {{ keycloak_dir }}_new" + # - name: Copying old files to new keycloak for migration + # become: yes + # become_user: keycloak + # shell: "cp -rf {{ keycloak_dir }}_old/{{ item }}/* {{ keycloak_dir }}_new/{{ item }}/" + # with_items: + # - standalone + # - domain + # - name: Running migration + # become: yes + # become_user: keycloak + # shell: "bash {{ item }}" + # with_items: + # - "bin/jboss-cli.sh --file=bin/migrate-standalone.cli" + # - "bin/jboss-cli.sh --file=bin/migrate-standalone-ha.cli" + # args: + # chdir: "{{ keycloak_dir }}_new" From dd7afffaf314d8faeef69adccf3936a6f5478013 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 17:57:45 +0530 Subject: [PATCH 0324/2894] Issue #000 feat: finalizing script --- ansible/keycloak-migration.yaml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index b72b89690..e3bc32b88 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -72,19 +72,19 @@ - name: Renaming keycloak artifact become: yes shell: "mv {{ keycloak_dir }}_new/sunbird_auth_1.0v/* {{ keycloak_dir }}_new/ ; rm -rf {{ keycloak_dir }}_new/sunbird_auth_1.0v ; chown -R keycloak:keycloak {{ keycloak_dir }}_new" - # - name: Copying old files to new keycloak for migration - # become: yes - # become_user: keycloak - # shell: "cp -rf {{ keycloak_dir }}_old/{{ item }}/* {{ keycloak_dir }}_new/{{ item }}/" - # with_items: - # - standalone - # - domain - # - name: Running migration - # become: yes - # become_user: keycloak - # shell: "bash {{ item }}" - # with_items: - # - "bin/jboss-cli.sh --file=bin/migrate-standalone.cli" - # - "bin/jboss-cli.sh --file=bin/migrate-standalone-ha.cli" - # args: - # chdir: "{{ keycloak_dir }}_new" + - name: Copying old files to new keycloak for migration + become: yes + become_user: keycloak + shell: "cp -rf {{ keycloak_dir }}_old/{{ item }}/* {{ keycloak_dir }}_new/{{ item }}/" + with_items: + - standalone + - domain + - name: Running migration + become: yes + become_user: keycloak + shell: "bash {{ item }}" + with_items: + - "bin/jboss-cli.sh --file=bin/migrate-standalone.cli" + - "bin/jboss-cli.sh --file=bin/migrate-standalone-ha.cli" + args: + chdir: "{{ keycloak_dir }}_new" From 650ef2613df409635d0ced9afa1dbee6df01b96e Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 18:06:33 +0530 Subject: [PATCH 0325/2894] Issue #000 feat: Adding comments --- ansible/keycloak-migration.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index e3bc32b88..6ec5e54aa 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -1,4 +1,10 @@ --- +# This ansible playbook will do keycloak migration from 3.0.1 to 6.0.1 +# Prerequisites +# 1. Keycloak build artifact with 6.0.1 +# 2. Creates /opt/keycloak_new directory for migration +# 3. Create /opt/keyloak_old with current keycloak backup + - hosts: local vars_files: - "{{ inventory_dir }}/secrets.yml" @@ -37,6 +43,7 @@ login_host: "{{ keycloak_postgres_host }}" port: 5432 when: status.changed + - hosts: keycloak vars: keycloak_dir: /opt/keycloak From 279eba9a1c1e29437ee83787317feccf6eef1084 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 18:08:16 +0530 Subject: [PATCH 0326/2894] Issue #000 feat: disabling postgres logs with sensitive info --- ansible/keycloak-migration.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 6ec5e54aa..34a14cbb3 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -10,6 +10,7 @@ - "{{ inventory_dir }}/secrets.yml" vars: db_backup_name: "/root/keycloak{{ ansible_date_time.epoch }}.sql" + no_log: true tasks: - name: taking backup of keycloak db become: yes From 401cfe108bd46bc6f79bd3c1015cba614c18c14d Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 18:08:59 +0530 Subject: [PATCH 0327/2894] Issue #000 feat: enabling verbose mode --- pipelines/deploy/keycloak-migration/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipelines/deploy/keycloak-migration/Jenkinsfile b/pipelines/deploy/keycloak-migration/Jenkinsfile index 51548dd15..05c3fdfe2 100644 --- a/pipelines/deploy/keycloak-migration/Jenkinsfile +++ b/pipelines/deploy/keycloak-migration/Jenkinsfile @@ -22,7 +22,7 @@ node() { stage ('Taking db dump and creating a new db') { ansiblePlaybook = "${currentWs}/ansible/keycloak-migration.yaml" ansibleExtraArgs = """\ - --extra-vars keycloak_zip=${currentWs}/${artifact} --vault-password-file /var/lib/jenkins/secrets/vault-pass + --extra-vars keycloak_zip=${currentWs}/${artifact} --vault-password-file /var/lib/jenkins/secrets/vault-pass -v """.stripIndent().replace("\n", " ") values.put('ansiblePlaybook', ansiblePlaybook) values.put('ansibleExtraArgs', ansibleExtraArgs) From d99f2766927d57764a121156535501906d73caaf Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 18:45:19 +0530 Subject: [PATCH 0328/2894] Issue #000 feat: changing name to Keycloak migration --- pipelines/deploy/keycloak-migration/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipelines/deploy/keycloak-migration/Jenkinsfile b/pipelines/deploy/keycloak-migration/Jenkinsfile index 05c3fdfe2..0d969f34a 100644 --- a/pipelines/deploy/keycloak-migration/Jenkinsfile +++ b/pipelines/deploy/keycloak-migration/Jenkinsfile @@ -19,7 +19,7 @@ node() { values.put('artifact', artifact) artifact_download(values) } - stage ('Taking db dump and creating a new db') { + stage ('Keycloak migration') { ansiblePlaybook = "${currentWs}/ansible/keycloak-migration.yaml" ansibleExtraArgs = """\ --extra-vars keycloak_zip=${currentWs}/${artifact} --vault-password-file /var/lib/jenkins/secrets/vault-pass -v From fa2ccd729f840c832d5197a21d3c1e6e3c35f1e0 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 19:06:59 +0530 Subject: [PATCH 0329/2894] Issue #000 feat: hard-coding host --- ansible/keycloak-migration.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 34a14cbb3..ed041438b 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -10,6 +10,7 @@ - "{{ inventory_dir }}/secrets.yml" vars: db_backup_name: "/root/keycloak{{ ansible_date_time.epoch }}.sql" + keycloak_postgres_host: postgres-backup.postgres.database.azure.com no_log: true tasks: - name: taking backup of keycloak db From 57fc9ad1c899c6f069bc018ca9fed4ccdf393576 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 19:46:33 +0530 Subject: [PATCH 0330/2894] Issue #000 feat: dropping current db and restoring old one --- ansible/keycloak-migration.yaml | 139 ++++++++++++++++++-------------- 1 file changed, 77 insertions(+), 62 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index ed041438b..13c7e25cb 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -10,90 +10,105 @@ - "{{ inventory_dir }}/secrets.yml" vars: db_backup_name: "/root/keycloak{{ ansible_date_time.epoch }}.sql" - keycloak_postgres_host: postgres-backup.postgres.database.azure.com + # keycloak_postgres_host: postgres-backup.postgres.database.azure.com no_log: true tasks: - - name: taking backup of keycloak db + - name: dropping keycloak db become: yes postgresql_db: - name: "{{ keycloak_postgres_database }}" - state: dump - target: "{{ db_backup_name }}" + name: "{{ item }}" + state: absent login_user: "{{keycloak_postgres_user }}" login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" port: 5432 + with_items: + - "{{ keycloak_postgres_database }}" + - "{{ keycloak_postgres_database }}_301" + # - name: taking backup of keycloak db + # become: yes + # postgresql_db: + # name: "{{ keycloak_postgres_database }}" + # state: dump + # target: "{{ db_backup_name }}" + # login_user: "{{keycloak_postgres_user }}" + # login_password: "{{ keycloak_postgres_password }}" + # login_host: "{{ keycloak_postgres_host }}" + # port: 5432 - name: creating backup db {{ keycloak_postgres_database }}_301 postgresql_db: - name: "{{ keycloak_postgres_database }}_301" + name: "{{ item }}" state: present login_user: "{{ keycloak_postgres_user }}" login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" + with_items: + - "{{ keycloak_postgres_database }}" + - "{{ keycloak_postgres_database }}_301" register: status - - name: debugging - debug: - var: status - name: creating backup keycloak old db {{ keycloak_postgres_database }}_301 for the first time become: yes postgresql_db: - name: "{{ keycloak_postgres_database }}_301" + name: "{{ keycloak_postgres_database }}" state: restore - target: "{{ db_backup_name }}" + target: /root/keycloak1570714667.sql login_user: "{{ keycloak_postgres_user }}" login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" port: 5432 + with_items: + - "{{ keycloak_postgres_database }}" + - "{{ keycloak_postgres_database }}_301" when: status.changed -- hosts: keycloak - vars: - keycloak_dir: /opt/keycloak - vars_files: - - "{{ inventory_dir }}/secrets.yml" - tasks: - - name: Stopping keycloak - become: yes - shell: /bin/bash -c "/etc/init.d/keycloak stop || pkill keycloak" - failed_when: false - - name: Waiting for keycloak to exit - wait_for: - port: 8080 - state: stopped - timeout: 30 - - name: Backing up old keycloak - become: yes - shell: "cp -rf {{ keycloak_dir }} {{ keycloak_dir }}_old && chown -R keycloak:keycloak {{ keycloak_dir }}_old" - - name: make sure keycloak path exists - become: yes - file: - path: "{{ keycloak_dir }}_new" - state: directory - owner: keycloak - group: keycloak - - name: copy and unarchiving new keycloak 6.0.1 - become: yes - unarchive: - src: "{{ keycloak_zip }}" - dest: "/opt/keycloak_new" - owner: keycloak - group: keycloak - - name: Renaming keycloak artifact - become: yes - shell: "mv {{ keycloak_dir }}_new/sunbird_auth_1.0v/* {{ keycloak_dir }}_new/ ; rm -rf {{ keycloak_dir }}_new/sunbird_auth_1.0v ; chown -R keycloak:keycloak {{ keycloak_dir }}_new" - - name: Copying old files to new keycloak for migration - become: yes - become_user: keycloak - shell: "cp -rf {{ keycloak_dir }}_old/{{ item }}/* {{ keycloak_dir }}_new/{{ item }}/" - with_items: - - standalone - - domain - - name: Running migration - become: yes - become_user: keycloak - shell: "bash {{ item }}" - with_items: - - "bin/jboss-cli.sh --file=bin/migrate-standalone.cli" - - "bin/jboss-cli.sh --file=bin/migrate-standalone-ha.cli" - args: - chdir: "{{ keycloak_dir }}_new" +# - hosts: keycloak +# vars: +# keycloak_dir: /opt/keycloak +# vars_files: +# - "{{ inventory_dir }}/secrets.yml" +# tasks: +# - name: Stopping keycloak +# become: yes +# shell: /bin/bash -c "/etc/init.d/keycloak stop || pkill keycloak" +# failed_when: false +# - name: Waiting for keycloak to exit +# wait_for: +# port: 8080 +# state: stopped +# timeout: 30 +# - name: Backing up old keycloak +# become: yes +# shell: "cp -rf {{ keycloak_dir }} {{ keycloak_dir }}_old && chown -R keycloak:keycloak {{ keycloak_dir }}_old" +# - name: make sure keycloak path exists +# become: yes +# file: +# path: "{{ keycloak_dir }}_new" +# state: directory +# owner: keycloak +# group: keycloak +# - name: copy and unarchiving new keycloak 6.0.1 +# become: yes +# unarchive: +# src: "{{ keycloak_zip }}" +# dest: "/opt/keycloak_new" +# owner: keycloak +# group: keycloak +# - name: Renaming keycloak artifact +# become: yes +# shell: "mv {{ keycloak_dir }}_new/sunbird_auth_1.0v/* {{ keycloak_dir }}_new/ ; rm -rf {{ keycloak_dir }}_new/sunbird_auth_1.0v ; chown -R keycloak:keycloak {{ keycloak_dir }}_new" +# - name: Copying old files to new keycloak for migration +# become: yes +# become_user: keycloak +# shell: "cp -rf {{ keycloak_dir }}_old/{{ item }}/* {{ keycloak_dir }}_new/{{ item }}/" +# with_items: +# - standalone +# - domain +# - name: Running migration +# become: yes +# become_user: keycloak +# shell: "bash {{ item }}" +# with_items: +# - "bin/jboss-cli.sh --file=bin/migrate-standalone.cli" +# - "bin/jboss-cli.sh --file=bin/migrate-standalone-ha.cli" +# args: +# chdir: "{{ keycloak_dir }}_new" From 7c13615c4cc63b91483b7d535d234ac12ae46550 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 20:27:01 +0530 Subject: [PATCH 0331/2894] Issue #000 feat: Keycloak migration --- ansible/keycloak-migration.yaml | 135 ++++++++++++++------------------ 1 file changed, 58 insertions(+), 77 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 13c7e25cb..e55148708 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -10,105 +10,86 @@ - "{{ inventory_dir }}/secrets.yml" vars: db_backup_name: "/root/keycloak{{ ansible_date_time.epoch }}.sql" - # keycloak_postgres_host: postgres-backup.postgres.database.azure.com no_log: true tasks: - - name: dropping keycloak db + - name: taking backup of keycloak db become: yes postgresql_db: - name: "{{ item }}" - state: absent + name: "{{ keycloak_postgres_database }}" + state: dump + target: "{{ db_backup_name }}" login_user: "{{keycloak_postgres_user }}" login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" port: 5432 - with_items: - - "{{ keycloak_postgres_database }}" - - "{{ keycloak_postgres_database }}_301" - # - name: taking backup of keycloak db - # become: yes - # postgresql_db: - # name: "{{ keycloak_postgres_database }}" - # state: dump - # target: "{{ db_backup_name }}" - # login_user: "{{keycloak_postgres_user }}" - # login_password: "{{ keycloak_postgres_password }}" - # login_host: "{{ keycloak_postgres_host }}" - # port: 5432 - name: creating backup db {{ keycloak_postgres_database }}_301 postgresql_db: - name: "{{ item }}" + name: "{{ keycloak_postgres_database }}_301" state: present login_user: "{{ keycloak_postgres_user }}" login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" - with_items: - - "{{ keycloak_postgres_database }}" - - "{{ keycloak_postgres_database }}_301" register: status - name: creating backup keycloak old db {{ keycloak_postgres_database }}_301 for the first time become: yes postgresql_db: - name: "{{ keycloak_postgres_database }}" + name: "{{ keycloak_postgres_database }}_301" state: restore - target: /root/keycloak1570714667.sql + target: "{{ db_backup_name }}" login_user: "{{ keycloak_postgres_user }}" login_password: "{{ keycloak_postgres_password }}" login_host: "{{ keycloak_postgres_host }}" port: 5432 - with_items: - - "{{ keycloak_postgres_database }}" - - "{{ keycloak_postgres_database }}_301" when: status.changed -# - hosts: keycloak -# vars: -# keycloak_dir: /opt/keycloak -# vars_files: -# - "{{ inventory_dir }}/secrets.yml" -# tasks: -# - name: Stopping keycloak -# become: yes -# shell: /bin/bash -c "/etc/init.d/keycloak stop || pkill keycloak" -# failed_when: false -# - name: Waiting for keycloak to exit -# wait_for: -# port: 8080 -# state: stopped -# timeout: 30 -# - name: Backing up old keycloak -# become: yes -# shell: "cp -rf {{ keycloak_dir }} {{ keycloak_dir }}_old && chown -R keycloak:keycloak {{ keycloak_dir }}_old" -# - name: make sure keycloak path exists -# become: yes -# file: -# path: "{{ keycloak_dir }}_new" -# state: directory -# owner: keycloak -# group: keycloak -# - name: copy and unarchiving new keycloak 6.0.1 -# become: yes -# unarchive: -# src: "{{ keycloak_zip }}" -# dest: "/opt/keycloak_new" -# owner: keycloak -# group: keycloak -# - name: Renaming keycloak artifact -# become: yes -# shell: "mv {{ keycloak_dir }}_new/sunbird_auth_1.0v/* {{ keycloak_dir }}_new/ ; rm -rf {{ keycloak_dir }}_new/sunbird_auth_1.0v ; chown -R keycloak:keycloak {{ keycloak_dir }}_new" -# - name: Copying old files to new keycloak for migration -# become: yes -# become_user: keycloak -# shell: "cp -rf {{ keycloak_dir }}_old/{{ item }}/* {{ keycloak_dir }}_new/{{ item }}/" -# with_items: -# - standalone -# - domain -# - name: Running migration -# become: yes -# become_user: keycloak -# shell: "bash {{ item }}" -# with_items: -# - "bin/jboss-cli.sh --file=bin/migrate-standalone.cli" -# - "bin/jboss-cli.sh --file=bin/migrate-standalone-ha.cli" -# args: -# chdir: "{{ keycloak_dir }}_new" +- hosts: keycloak + vars: + keycloak_dir: /opt/keycloak + vars_files: + - "{{ inventory_dir }}/secrets.yml" + tasks: + - name: Stopping keycloak + become: yes + shell: /bin/bash -c "/etc/init.d/keycloak stop || pkill keycloak" + failed_when: false + - name: Waiting for keycloak to exit + wait_for: + port: 8080 + state: stopped + timeout: 30 + - name: Backing up old keycloak + become: yes + shell: "cp -rf {{ keycloak_dir }} {{ keycloak_dir }}_old && chown -R keycloak:keycloak {{ keycloak_dir }}_old" + - name: make sure keycloak path exists + become: yes + file: + path: "{{ keycloak_dir }}_new" + state: directory + owner: keycloak + group: keycloak + - name: copy and unarchiving new keycloak 6.0.1 + become: yes + unarchive: + src: "{{ keycloak_zip }}" + dest: "/opt/keycloak_new" + owner: keycloak + group: keycloak + - name: Renaming keycloak artifact + become: yes + shell: "mv {{ keycloak_dir }}_new/sunbird_auth_1.0v/* {{ keycloak_dir }}_new/ ; rm -rf {{ keycloak_dir }}_new/sunbird_auth_1.0v ; chown -R keycloak:keycloak {{ keycloak_dir }}_new" + - name: Copying old files to new keycloak for migration + become: yes + become_user: keycloak + shell: "cp -rf {{ keycloak_dir }}_old/{{ item }}/* {{ keycloak_dir }}_new/{{ item }}/" + with_items: + - standalone + - domain + - name: Running migration + become: yes + become_user: keycloak + shell: "bash {{ item }}" + with_items: + - "bin/jboss-cli.sh --file=bin/migrate-standalone.cli" + - "bin/jboss-cli.sh --file=bin/migrate-standalone-ha.cli" + args: + chdir: "{{ keycloak_dir }}_new" From ca00860bb72a72915da853dc82c228491506dfb2 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 20:28:42 +0530 Subject: [PATCH 0332/2894] Issue #000 feat: removing keycloak new and old prior creation --- ansible/keycloak-migration.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index e55148708..64b0b9143 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -57,6 +57,15 @@ port: 8080 state: stopped timeout: 30 + - name: deleting keycloak new and old directory if present + become: yes + file: + path: "{{ item }}" + state: absent + force: yes + with_items: + - "{{ keycloak_dir }}_new" + - "{{ keycloak_dir }}_old" - name: Backing up old keycloak become: yes shell: "cp -rf {{ keycloak_dir }} {{ keycloak_dir }}_old && chown -R keycloak:keycloak {{ keycloak_dir }}_old" From f36733c573f27fae41a792e5a13bb04a053ce483 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 21:31:51 +0530 Subject: [PATCH 0333/2894] Issue #000 feat: reverting the keycloak migration from upstream keycloak --- ansible/keycloak-migration.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 64b0b9143..d274b0922 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -76,23 +76,23 @@ state: directory owner: keycloak group: keycloak - - name: copy and unarchiving new keycloak 6.0.1 + - name: unarchive keycloak become: yes unarchive: - src: "{{ keycloak_zip }}" - dest: "/opt/keycloak_new" + src: https://sunbirdpublic.blob.core.windows.net/installation/keycloak-6.0.1.tar.gz + dest: "{{ keycloak_dir }}_new" + extra_opts: ['--strip-components=1'] + remote_src: yes owner: keycloak group: keycloak - - name: Renaming keycloak artifact - become: yes - shell: "mv {{ keycloak_dir }}_new/sunbird_auth_1.0v/* {{ keycloak_dir }}_new/ ; rm -rf {{ keycloak_dir }}_new/sunbird_auth_1.0v ; chown -R keycloak:keycloak {{ keycloak_dir }}_new" - name: Copying old files to new keycloak for migration become: yes become_user: keycloak - shell: "cp -rf {{ keycloak_dir }}_old/{{ item }}/* {{ keycloak_dir }}_new/{{ item }}/" + shell: "cp -rf {{ keycloak_dir }}_old/{{ item }} {{ keycloak_dir }}_new/{{ item }}" with_items: - standalone - domain + - modules/system/layers/keycloak/org/postgresql - name: Running migration become: yes become_user: keycloak From 5a6ffd222ecd0dbdc1bb6be28e814ab1c9c0e860 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 22:51:00 +0530 Subject: [PATCH 0334/2894] Issue #000 feat: changing deployment for keycloak --- ansible/roles/keycloak-deploy/tasks/deploy.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ansible/roles/keycloak-deploy/tasks/deploy.yml b/ansible/roles/keycloak-deploy/tasks/deploy.yml index 78d0e7783..4234a26c5 100644 --- a/ansible/roles/keycloak-deploy/tasks/deploy.yml +++ b/ansible/roles/keycloak-deploy/tasks/deploy.yml @@ -49,11 +49,15 @@ - name: Extarct the folder unarchive: - src: "{{ artifact }}" + src: "{{ artifact_path }}" dest: "{{ keycloak_home }}" owner: "{{ wildfly_user }}" group: "{{ wildfly_group }}" +- name: Creating keycloak directory in proper structure + become: yes + shell: "cd {{ keycloak_home }} ; mv /sunbird_auth_1.0v/* ./ ; rm -rf sunbird_auth_1.0v; chown -R keycloak:keycloak {{ keycloak_home }}" + - name: Create required directories file: path: "{{ item.dest }}" From a021d333852f297ad49aa71ebd43beff10e77bf3 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 23:01:52 +0530 Subject: [PATCH 0335/2894] Issue #000 feat: removing clean workspace --- pipelines/deploy/keycloak/Jenkinsfile | 1 - 1 file changed, 1 deletion(-) diff --git a/pipelines/deploy/keycloak/Jenkinsfile b/pipelines/deploy/keycloak/Jenkinsfile index 087ce5ee8..a664f52e7 100644 --- a/pipelines/deploy/keycloak/Jenkinsfile +++ b/pipelines/deploy/keycloak/Jenkinsfile @@ -8,7 +8,6 @@ node() { String ANSI_YELLOW = "\u001B[33m" stage('checkout public repo') { - cleanWs() checkout scm sh "git clone https://github.com/project-sunbird/sunbird-auth.git -b ${sunbird_auth_branch_or_tag}" } From fe58119e475fe7178974cc919ae1542184741706 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 10 Oct 2019 23:02:47 +0530 Subject: [PATCH 0336/2894] Issue #000 fix: path for sunbird_auth_1 --- ansible/roles/keycloak-deploy/tasks/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/keycloak-deploy/tasks/deploy.yml b/ansible/roles/keycloak-deploy/tasks/deploy.yml index 4234a26c5..ca246942f 100644 --- a/ansible/roles/keycloak-deploy/tasks/deploy.yml +++ b/ansible/roles/keycloak-deploy/tasks/deploy.yml @@ -56,7 +56,7 @@ - name: Creating keycloak directory in proper structure become: yes - shell: "cd {{ keycloak_home }} ; mv /sunbird_auth_1.0v/* ./ ; rm -rf sunbird_auth_1.0v; chown -R keycloak:keycloak {{ keycloak_home }}" + shell: "cd {{ keycloak_home }} ; mv sunbird_auth_1.0v/* ./ ; rm -rf sunbird_auth_1.0v; chown -R keycloak:keycloak {{ keycloak_home }}" - name: Create required directories file: From 55a30570ca0c50c345a0b07b7ba6603626da48be Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Fri, 11 Oct 2019 00:10:55 +0530 Subject: [PATCH 0337/2894] Issue #000 fix: keycloak copy path --- ansible/keycloak-migration.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index d274b0922..4121a96d5 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -88,7 +88,7 @@ - name: Copying old files to new keycloak for migration become: yes become_user: keycloak - shell: "cp -rf {{ keycloak_dir }}_old/{{ item }} {{ keycloak_dir }}_new/{{ item }}" + shell: "cp -rf {{ keycloak_dir }}_old/{{ item }}/* {{ keycloak_dir }}_new/{{ item }}/" with_items: - standalone - domain From 2f684ddc742ad34bd79c4dbf27230e015b4f32c7 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Fri, 11 Oct 2019 09:24:23 +0530 Subject: [PATCH 0338/2894] Issue #000 feat: Updating postgres driver --- ansible/roles/keycloak-deploy/templates/module.xml.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/keycloak-deploy/templates/module.xml.j2 b/ansible/roles/keycloak-deploy/templates/module.xml.j2 index bcfe36a40..11f2c5247 100644 --- a/ansible/roles/keycloak-deploy/templates/module.xml.j2 +++ b/ansible/roles/keycloak-deploy/templates/module.xml.j2 @@ -1,7 +1,7 @@ - + - + From 88bc369d69a9ae95806606269dce3561637bc06a Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Fri, 11 Oct 2019 09:27:42 +0530 Subject: [PATCH 0339/2894] Issue #000 feat: upgrading keycloak-standalone-ha.xml to 6.0.1 --- .../templates/standalone-ha.xml | 324 +++++++++++------- 1 file changed, 204 insertions(+), 120 deletions(-) diff --git a/ansible/roles/keycloak-deploy/templates/standalone-ha.xml b/ansible/roles/keycloak-deploy/templates/standalone-ha.xml index d705fd885..392c23f86 100644 --- a/ansible/roles/keycloak-deploy/templates/standalone-ha.xml +++ b/ansible/roles/keycloak-deploy/templates/standalone-ha.xml @@ -1,6 +1,6 @@ - + @@ -9,10 +9,8 @@ - - @@ -22,7 +20,12 @@ + + + + + @@ -39,6 +42,11 @@ + + + + + @@ -53,7 +61,7 @@ - + @@ -62,7 +70,8 @@ - + + @@ -77,7 +86,7 @@ - + @@ -92,20 +101,12 @@ - - - - - - - - - - - + + + @@ -117,7 +118,6 @@ - @@ -128,9 +128,10 @@ - + + - + jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE h2 @@ -138,40 +139,13 @@ sa - - jdbc:h2:${jboss.server.data.dir}/keycloak;AUTO_SERVER=TRUE - h2 - - sa - sa - - - - - jdbc:postgresql://thisnotwork:5432/keycloak + jdbc:postgresql://{{keycloak_postgres_host}}:5432/{{ keycloak_postgres_database }}?sslmode=require postgresql - - 100 - {{ keycloak_postgres_user }} {{ keycloak_postgres_password }} - - true - 10000 - - - @@ -205,7 +179,7 @@ - + @@ -215,9 +189,8 @@ - - + @@ -233,7 +206,12 @@ - + + + + @@ -242,47 +220,50 @@ + - + - - + + - + - + - - - - + + + + + + - + - + - + - - + + - + - + @@ -290,28 +271,28 @@ - + - + - + - + - + - + - + @@ -330,17 +311,16 @@ - - + - + - + - + @@ -349,28 +329,21 @@ - + - - {{groups['keycloak']|join('[7600],')}}[7600] - - 10 - 3000 - 2 - - + - - + + - + @@ -382,24 +355,22 @@ - - + - - + + - + - - + @@ -410,7 +381,107 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -427,11 +498,6 @@ - - - - - @@ -440,25 +506,35 @@ + + + + + - - + + + + - + + + + - + + - - + @@ -468,10 +544,6 @@ - - - - auth @@ -522,7 +594,7 @@ default - + @@ -537,6 +609,20 @@ + + ${keycloak.x509cert.lookup.provider:default} + + + + request + + + + + + + + @@ -556,12 +642,10 @@ - + - - - + From d32060c3ad00130d2054d911afc61c7aab0dd313 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Fri, 11 Oct 2019 09:47:42 +0530 Subject: [PATCH 0340/2894] Issue #000 feat: using checkout scm to clone sunbird-auth --- pipelines/deploy/keycloak/Jenkinsfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pipelines/deploy/keycloak/Jenkinsfile b/pipelines/deploy/keycloak/Jenkinsfile index a664f52e7..942f97bcd 100644 --- a/pipelines/deploy/keycloak/Jenkinsfile +++ b/pipelines/deploy/keycloak/Jenkinsfile @@ -9,7 +9,9 @@ node() { stage('checkout public repo') { checkout scm - sh "git clone https://github.com/project-sunbird/sunbird-auth.git -b ${sunbird_auth_branch_or_tag}" + checkout([$class: 'GitSCM', branches: [[name: "${sunbird_auth_branch_or_tag}"]], + extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'sunbird-auth']], + userRemoteConfigs: [[url: 'https://github.com/project-sunbird/sunbird-auth.git']]]) } ansiColor('xterm') { stage('get artifact') { From 9da87181b051cd54b9cfcd407d440c8d990fc8a9 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 24 Oct 2019 15:08:19 +0530 Subject: [PATCH 0341/2894] Issue #000 feat: DB rollback script for fixing partial keycloak migration --- .../keycloak_301_rollback.sql | 26 +++++++++++++++++++ ansible/keycloak-migration.yaml | 16 ++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 ansible/generic_templates/keycloak_301_rollback.sql diff --git a/ansible/generic_templates/keycloak_301_rollback.sql b/ansible/generic_templates/keycloak_301_rollback.sql new file mode 100644 index 000000000..f5684efbe --- /dev/null +++ b/ansible/generic_templates/keycloak_301_rollback.sql @@ -0,0 +1,26 @@ +ALTER TABLE REALM_SUPPORTED_LOCALES ADD COLUMN id SERIAL; +select count(*) from public.REALM_SUPPORTED_LOCALES; +DELETE FROM REALM_SUPPORTED_LOCALES a USING REALM_SUPPORTED_LOCALES b WHERE a.id < b.id AND a.value = b.value; +select count(*) from public.REALM_SUPPORTED_LOCALES; +ALTER TABLE REALM_SUPPORTED_LOCALES DROP COLUMN id; +ALTER TABLE composite_role ADD COLUMN id SERIAL; +select count(*) from public.composite_role; +DELETE FROM composite_role a USING composite_role b WHERE a.id < b.id AND a.composite = b.composite AND a.child_role = b.child_role; +select count(*) from public.composite_role; +ALTER TABLE composite_role DROP COLUMN id; +ALTER TABLE realm_events_listeners ADD COLUMN id SERIAL; +select count(*) from public.realm_events_listeners; +DELETE FROM realm_events_listeners a USING realm_events_listeners b WHERE a.id < b.id AND a.realm_id = b.realm_id AND a.value = b.value; +select count(*) from public.realm_events_listeners; +ALTER TABLE realm_events_listeners DROP COLUMN id; +ALTER TABLE redirect_uris ADD COLUMN id SERIAL; +select count(*) from public.redirect_uris; +DELETE FROM redirect_uris a USING redirect_uris b WHERE a.id < b.id AND a.client_id = b.client_id AND a.value = b.value; +select count(*) from public.redirect_uris; +ALTER TABLE redirect_uris DROP COLUMN id; +ALTER TABLE web_origins ADD COLUMN id SERIAL; +select count(*) from public.web_origins; +DELETE FROM web_origins a USING web_origins b WHERE a.id < b.id AND a.client_id = b.client_id AND a.value = b.value; +select count(*) from public.web_origins; +ALTER TABLE web_origins DROP COLUMN id; +ALTER TABLE public.USER_ENTITY DROP COLUMN NOT_BEFORE; diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 4121a96d5..0a0786885 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -41,6 +41,22 @@ login_host: "{{ keycloak_postgres_host }}" port: 5432 when: status.changed + - name: copying keycloak db revert script. + copy: + src: generic_templates/keycloak_301_rollback.sql + dest: /tmp/keycloak_301_rollback.sql + when: fail_db is defined + - name: Reverting back the keycloak db if migration failed. Please use this with caution + become: yes + postgresql_db: + name: "{{ keycloak_postgres_database }}" + state: restore + target: /tmp/keycloak_301_rollback.sql + login_user: "{{keycloak_postgres_user }}" + login_password: "{{ keycloak_postgres_password }}" + login_host: "{{ keycloak_postgres_host }}" + port: 5432 + when: fail_db is defined - hosts: keycloak vars: From 8e31c42fe43d34521ae2f320ec3a233da8084e18 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 24 Oct 2019 15:31:49 +0530 Subject: [PATCH 0342/2894] Issue #000 feat: completing keycloak migration script --- ansible/keycloak-migration.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 0a0786885..43100651f 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -108,7 +108,23 @@ with_items: - standalone - domain + - name: Copying old files to new keycloak for migration + become: yes + become_user: keycloak + shell: "cp -rf {{ keycloak_dir }}_old/{{ item }} {{ keycloak_dir }}_new/{{ item }}" + with_items: - modules/system/layers/keycloak/org/postgresql + - name: Deleting unnecessary fields from standalone.xml file + become: yes + become_user: keycloak + lineinfile: + path: "{{keycloak_dir }}_new/standalone/configuration/standalone-ha.xml" + state: absent + regexp: "{{ item }}" + with_items: + - '.*' + - '.*' + - '.*' - name: Running migration become: yes become_user: keycloak @@ -118,3 +134,10 @@ - "bin/jboss-cli.sh --file=bin/migrate-standalone-ha.cli" args: chdir: "{{ keycloak_dir }}_new" + - name: Starting keycloak to make sure migration completed + become: yes + become_user: keycloak + shell: ./bin/standalone.sh -b 0.0.0.0 -bprivate=$(hostname -i) --server-config standalone-ha.xml + args: + chdir: "{{ keycloak_dir }}_new" + From e9561a408120cab1370909e0f19d160781e3208f Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 24 Oct 2019 16:49:35 +0530 Subject: [PATCH 0343/2894] Adding reference jira ticket --- ansible/keycloak-migration.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ansible/keycloak-migration.yaml b/ansible/keycloak-migration.yaml index 43100651f..ebe8a47bc 100644 --- a/ansible/keycloak-migration.yaml +++ b/ansible/keycloak-migration.yaml @@ -4,6 +4,8 @@ # 1. Keycloak build artifact with 6.0.1 # 2. Creates /opt/keycloak_new directory for migration # 3. Create /opt/keyloak_old with current keycloak backup +# +# Ref: https://project-sunbird.atlassian.net/wiki/spaces/UM/pages/1087504491/KeyCloak+6.0.1+upgrade - hosts: local vars_files: From ffe3b902972cf62ad46abf13168e0f6d652e3bc9 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 14 Nov 2019 22:50:23 +0530 Subject: [PATCH 0344/2894] Issue #000 feat: updating keycloak postgresql jar --- ansible/roles/keycloak-deploy/templates/module.xml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/keycloak-deploy/templates/module.xml.j2 b/ansible/roles/keycloak-deploy/templates/module.xml.j2 index 11f2c5247..fc3c43c66 100644 --- a/ansible/roles/keycloak-deploy/templates/module.xml.j2 +++ b/ansible/roles/keycloak-deploy/templates/module.xml.j2 @@ -1,7 +1,7 @@ - + From 0a5922179acbb23395de57f454e3d56cb00e97f7 Mon Sep 17 00:00:00 2001 From: G33tha Date: Fri, 15 Nov 2019 14:16:23 +0530 Subject: [PATCH 0345/2894] Issue #000 feat: renamed AdminUtils helm chart --- kubernetes/helm_charts/core/{adminutil => AdminUtils}/Chart.yaml | 0 .../core/{adminutil => AdminUtils}/templates/configmap.yaml | 0 .../core/{adminutil => AdminUtils}/templates/deployment.yaml | 0 kubernetes/helm_charts/core/{adminutil => AdminUtils}/values.j2 | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename kubernetes/helm_charts/core/{adminutil => AdminUtils}/Chart.yaml (100%) rename kubernetes/helm_charts/core/{adminutil => AdminUtils}/templates/configmap.yaml (100%) rename kubernetes/helm_charts/core/{adminutil => AdminUtils}/templates/deployment.yaml (100%) rename kubernetes/helm_charts/core/{adminutil => AdminUtils}/values.j2 (100%) diff --git a/kubernetes/helm_charts/core/adminutil/Chart.yaml b/kubernetes/helm_charts/core/AdminUtils/Chart.yaml similarity index 100% rename from kubernetes/helm_charts/core/adminutil/Chart.yaml rename to kubernetes/helm_charts/core/AdminUtils/Chart.yaml diff --git a/kubernetes/helm_charts/core/adminutil/templates/configmap.yaml b/kubernetes/helm_charts/core/AdminUtils/templates/configmap.yaml similarity index 100% rename from kubernetes/helm_charts/core/adminutil/templates/configmap.yaml rename to kubernetes/helm_charts/core/AdminUtils/templates/configmap.yaml diff --git a/kubernetes/helm_charts/core/adminutil/templates/deployment.yaml b/kubernetes/helm_charts/core/AdminUtils/templates/deployment.yaml similarity index 100% rename from kubernetes/helm_charts/core/adminutil/templates/deployment.yaml rename to kubernetes/helm_charts/core/AdminUtils/templates/deployment.yaml diff --git a/kubernetes/helm_charts/core/adminutil/values.j2 b/kubernetes/helm_charts/core/AdminUtils/values.j2 similarity index 100% rename from kubernetes/helm_charts/core/adminutil/values.j2 rename to kubernetes/helm_charts/core/AdminUtils/values.j2 From 5497018ed4154777e587006931886dad009c095c Mon Sep 17 00:00:00 2001 From: G33tha Date: Fri, 15 Nov 2019 14:21:45 +0530 Subject: [PATCH 0346/2894] Issue #000 feat: updated jenkins file --- kubernetes/pipelines/deploy_core/Jenkinsfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kubernetes/pipelines/deploy_core/Jenkinsfile b/kubernetes/pipelines/deploy_core/Jenkinsfile index 1e4526c59..5b078f630 100644 --- a/kubernetes/pipelines/deploy_core/Jenkinsfile +++ b/kubernetes/pipelines/deploy_core/Jenkinsfile @@ -7,11 +7,10 @@ node() { } stage('deploy') { - def playbook = "${params.playbook}" ?: "deploy_core_service.yml" values = docker_params() jobName = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-1].trim() currentWs = sh(returnStdout: true, script: 'pwd').trim() - ansiblePlaybook = "$currentWs/kubernetes/ansible/${playbook}" + ansiblePlaybook = "$currentWs/kubernetes/ansible/deploy_core_service.yml" ansibleExtraArgs = "--extra-vars \"chart_path=${currentWs}/kubernetes/helm_charts/core/$jobName release_name=$jobName image_tag=$values.image_tag\" --vault-password-file /var/lib/jenkins/secrets/vault-pass" values.put('currentWs', currentWs) values.put('ansiblePlaybook', ansiblePlaybook) From 85a14486fc91705e6142377946f533239d75f3c5 Mon Sep 17 00:00:00 2001 From: G33tha Date: Fri, 15 Nov 2019 14:54:10 +0530 Subject: [PATCH 0347/2894] Issue #000 feat: updated jenkins file --- .../helm_charts/core/{AdminUtils => adminutils}/Chart.yaml | 0 .../core/{AdminUtils => adminutils}/templates/configmap.yaml | 0 .../core/{AdminUtils => adminutils}/templates/deployment.yaml | 0 .../helm_charts/core/{AdminUtils => adminutils}/values.j2 | 0 kubernetes/pipelines/deploy_core/Jenkinsfile | 2 +- 5 files changed, 1 insertion(+), 1 deletion(-) rename kubernetes/helm_charts/core/{AdminUtils => adminutils}/Chart.yaml (100%) rename kubernetes/helm_charts/core/{AdminUtils => adminutils}/templates/configmap.yaml (100%) rename kubernetes/helm_charts/core/{AdminUtils => adminutils}/templates/deployment.yaml (100%) rename kubernetes/helm_charts/core/{AdminUtils => adminutils}/values.j2 (100%) diff --git a/kubernetes/helm_charts/core/AdminUtils/Chart.yaml b/kubernetes/helm_charts/core/adminutils/Chart.yaml similarity index 100% rename from kubernetes/helm_charts/core/AdminUtils/Chart.yaml rename to kubernetes/helm_charts/core/adminutils/Chart.yaml diff --git a/kubernetes/helm_charts/core/AdminUtils/templates/configmap.yaml b/kubernetes/helm_charts/core/adminutils/templates/configmap.yaml similarity index 100% rename from kubernetes/helm_charts/core/AdminUtils/templates/configmap.yaml rename to kubernetes/helm_charts/core/adminutils/templates/configmap.yaml diff --git a/kubernetes/helm_charts/core/AdminUtils/templates/deployment.yaml b/kubernetes/helm_charts/core/adminutils/templates/deployment.yaml similarity index 100% rename from kubernetes/helm_charts/core/AdminUtils/templates/deployment.yaml rename to kubernetes/helm_charts/core/adminutils/templates/deployment.yaml diff --git a/kubernetes/helm_charts/core/AdminUtils/values.j2 b/kubernetes/helm_charts/core/adminutils/values.j2 similarity index 100% rename from kubernetes/helm_charts/core/AdminUtils/values.j2 rename to kubernetes/helm_charts/core/adminutils/values.j2 diff --git a/kubernetes/pipelines/deploy_core/Jenkinsfile b/kubernetes/pipelines/deploy_core/Jenkinsfile index 5b078f630..c38691bc1 100644 --- a/kubernetes/pipelines/deploy_core/Jenkinsfile +++ b/kubernetes/pipelines/deploy_core/Jenkinsfile @@ -8,7 +8,7 @@ node() { stage('deploy') { values = docker_params() - jobName = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-1].trim() + jobName = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-1].trim().toLowerCase() currentWs = sh(returnStdout: true, script: 'pwd').trim() ansiblePlaybook = "$currentWs/kubernetes/ansible/deploy_core_service.yml" ansibleExtraArgs = "--extra-vars \"chart_path=${currentWs}/kubernetes/helm_charts/core/$jobName release_name=$jobName image_tag=$values.image_tag\" --vault-password-file /var/lib/jenkins/secrets/vault-pass" From c16a3c9f6515f4ad3e13497353b9de887ce76833 Mon Sep 17 00:00:00 2001 From: G33tha Date: Fri, 15 Nov 2019 15:05:03 +0530 Subject: [PATCH 0348/2894] Issue #000 feat: updated jenkins file --- kubernetes/pipelines/deploy_core/Jenkinsfile.badger | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/pipelines/deploy_core/Jenkinsfile.badger b/kubernetes/pipelines/deploy_core/Jenkinsfile.badger index 3c474fc56..d73e3aede 100644 --- a/kubernetes/pipelines/deploy_core/Jenkinsfile.badger +++ b/kubernetes/pipelines/deploy_core/Jenkinsfile.badger @@ -8,7 +8,7 @@ node() { stage('deploy') { values = docker_params() - jobName = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-1].trim() + jobName = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-1].trim().toLowerCase() currentWs = sh(returnStdout: true, script: 'pwd').trim() ansiblePlaybook = "$currentWs/kubernetes/ansible/badger.yml" ansibleExtraArgs = "--extra-vars \"chart_path=${currentWs}/kubernetes/helm_charts/core/$jobName release_name=$jobName image_tag=$values.image_tag\" --vault-password-file /var/lib/jenkins/secrets/vault-pass" From 39ed733c8f8396e178af2b0c0e7a0b88bbae4bdc Mon Sep 17 00:00:00 2001 From: G33tha Date: Fri, 15 Nov 2019 15:11:29 +0530 Subject: [PATCH 0349/2894] Issue #000 feat: updated badger chart --- kubernetes/ansible/roles/deploy-badger/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kubernetes/ansible/roles/deploy-badger/tasks/main.yml b/kubernetes/ansible/roles/deploy-badger/tasks/main.yml index 1a4cb840b..6c449158d 100644 --- a/kubernetes/ansible/roles/deploy-badger/tasks/main.yml +++ b/kubernetes/ansible/roles/deploy-badger/tasks/main.yml @@ -13,13 +13,13 @@ shell: helm upgrade --install {{ release_name }} {{ chart_path }} #shell: helm template {{ chart_path }} > /tmp/test.yaml -- name: Copying user creation script +- name: Copying user creation template template: src: user.j2 dest: /tmp/user.sh mode: 0755 -- name: Copying user creation script +- name: Copying user creation script to badger shell: "kubectl cp /tmp/user.sh --namespace={{namespace}} $(kubectl get pod --namespace={{namespace}} | grep badger-* | awk '{print $1}' | head -n1):/tmp/user.sh" - name: Creating superuser From a09a56fc2d0f13d675e3de68fd658af4de2e680d Mon Sep 17 00:00:00 2001 From: G33tha Date: Fri, 15 Nov 2019 15:35:38 +0530 Subject: [PATCH 0350/2894] Issue #000 feat: updated badger chart --- kubernetes/pipelines/common/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/pipelines/common/Jenkinsfile b/kubernetes/pipelines/common/Jenkinsfile index 4fdb75d22..696b86baa 100644 --- a/kubernetes/pipelines/common/Jenkinsfile +++ b/kubernetes/pipelines/common/Jenkinsfile @@ -12,7 +12,7 @@ node() { 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() + jobName = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-1].trim().toLowerCase() ansiblePlaybook = "$currentWs/kubernetes/ansible/${playbook}" ansibleExtraArgs = "--extra-vars \"chart_path=${currentWs}/kubernetes/helm_charts/$jobName release_name=$jobName\" --vault-password-file /var/lib/jenkins/secrets/vault-pass" values.put('currentWs', currentWs) From 2a88c44dd9ce05ceb9bb6ed90d72e91e1194ecf1 Mon Sep 17 00:00:00 2001 From: G33tha Date: Fri, 15 Nov 2019 16:00:16 +0530 Subject: [PATCH 0351/2894] Issue #000 feat: updated badger chart --- kubernetes/helm_charts/core/cert/templates/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/helm_charts/core/cert/templates/deployment.yaml b/kubernetes/helm_charts/core/cert/templates/deployment.yaml index 30c9925b5..a63c020d2 100644 --- a/kubernetes/helm_charts/core/cert/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/cert/templates/deployment.yaml @@ -41,7 +41,7 @@ spec: apiVersion: v1 kind: Service metadata: - name: {{ .Chart.Name }}-service + name: {{ .Chart.Name }}_service namespace: {{ .Values.namespace }} labels: app: {{ .Chart.Name }} From cd4252a57c4afc663f26c0f2124886ae5e0ffd2a Mon Sep 17 00:00:00 2001 From: G33tha Date: Fri, 15 Nov 2019 16:23:38 +0530 Subject: [PATCH 0352/2894] Issue #000 feat: updated cert service name --- kubernetes/helm_charts/core/cert/templates/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/helm_charts/core/cert/templates/deployment.yaml b/kubernetes/helm_charts/core/cert/templates/deployment.yaml index a63c020d2..30c9925b5 100644 --- a/kubernetes/helm_charts/core/cert/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/cert/templates/deployment.yaml @@ -41,7 +41,7 @@ spec: apiVersion: v1 kind: Service metadata: - name: {{ .Chart.Name }}_service + name: {{ .Chart.Name }}-service namespace: {{ .Values.namespace }} labels: app: {{ .Chart.Name }} From b2c905fa2c3f88349fd521da8cf1aed9d73049f8 Mon Sep 17 00:00:00 2001 From: G33tha Date: Fri, 15 Nov 2019 16:51:11 +0530 Subject: [PATCH 0353/2894] Issue #000 feat: updated player jenkins file --- pipelines/deploy/player/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipelines/deploy/player/Jenkinsfile b/pipelines/deploy/player/Jenkinsfile index 43a826316..ba2ae59d0 100644 --- a/pipelines/deploy/player/Jenkinsfile +++ b/pipelines/deploy/player/Jenkinsfile @@ -14,7 +14,7 @@ node() { } stage('deploy') { values = docker_params() - jobName = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-1].trim() + jobName = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-1].trim().toLowerCase() currentWs = sh(returnStdout: true, script: 'pwd').trim() ansiblePlaybook = "$currentWs/kubernetes/ansible/player.yml" cdn_file_exists = new File("$currentWs/index_cdn.ejs") From dad12e59ebca845ec9e5f4bb6984a659cd218f7c Mon Sep 17 00:00:00 2001 From: G33tha Date: Mon, 18 Nov 2019 12:08:22 +0530 Subject: [PATCH 0354/2894] Issue #000 feat: renaming kube services names --- ansible/inventory/env/group_vars/all.yml | 2 +- .../helm_charts/core/adminutils/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/adminutils/values.j2 | 2 +- .../helm_charts/core/apimanager/templates/apimanager_echo.yaml | 2 +- .../helm_charts/core/apimanager/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/player/templates/deployment.yaml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ansible/inventory/env/group_vars/all.yml b/ansible/inventory/env/group_vars/all.yml index 2ca6737e5..e12dc0e09 100644 --- a/ansible/inventory/env/group_vars/all.yml +++ b/ansible/inventory/env/group_vars/all.yml @@ -681,7 +681,7 @@ sunbird_portal_azure_storage_key: "{{sunbird_azure_storage_key}}" ########### kubernetes variables ############## -sunbird_apimanager_service_base_url: "http://apimanager-service.{{namespace}}.svc.cluster.local:8000" +sunbird_apimanager_service_base_url: "http://kong.{{namespace}}.svc.cluster.local:8000" sunbird_telemetry_service_url: "http://telemetry-service.{{namespace}}.svc.cluster.local:9001" sunbird_content_service_url: "http://content-service.{{namespace}}.svc.cluster.local:5000" sunbird_cert_service_url: "http://cert-service.{{namespace}}.svc.cluster.local:9000" diff --git a/kubernetes/helm_charts/core/adminutils/templates/deployment.yaml b/kubernetes/helm_charts/core/adminutils/templates/deployment.yaml index 30c9925b5..03343eb9c 100644 --- a/kubernetes/helm_charts/core/adminutils/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/adminutils/templates/deployment.yaml @@ -41,7 +41,7 @@ spec: apiVersion: v1 kind: Service metadata: - name: {{ .Chart.Name }}-service + name: adminutil namespace: {{ .Values.namespace }} labels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/adminutils/values.j2 b/kubernetes/helm_charts/core/adminutils/values.j2 index 4c9de7e6d..78110abac 100644 --- a/kubernetes/helm_charts/core/adminutils/values.j2 +++ b/kubernetes/helm_charts/core/adminutils/values.j2 @@ -21,7 +21,7 @@ strategy: adminutilenv: JAVA_OPTS: "-Xms{{adminutil__initial_heap_size|default('256m')}} -Xmx{{adminutil__max_heap_size|default('256m')}}" SERVER_PORT: '"{{adminutil__port|default('4000')}}"' - AM_ADMIN_API_ENDPOINT: "http://apimanager-service.{{namespace}}.svc.cluster.local:8001" + AM_ADMIN_API_ENDPOINT: "http://kong.{{namespace}}.svc.cluster.local:8001" SPRING_PROFILES_ACTIVE: {{adminutil__spring_profile|default('production')}} DEFAULT_CONSUMER_GROUP: {{adminutil__default_consumer_group|default('contentUser')}} ENDPOINTS_HEALTH_ID: {{adminutil__health_id|default('apihealth')}} diff --git a/kubernetes/helm_charts/core/apimanager/templates/apimanager_echo.yaml b/kubernetes/helm_charts/core/apimanager/templates/apimanager_echo.yaml index 4fe82db79..ccb63939b 100644 --- a/kubernetes/helm_charts/core/apimanager/templates/apimanager_echo.yaml +++ b/kubernetes/helm_charts/core/apimanager/templates/apimanager_echo.yaml @@ -38,7 +38,7 @@ spec: apiVersion: v1 kind: Service metadata: - name: {{ .Chart.Name }}echo-service + name: echo namespace: {{ .Values.namespace }} labels: app: {{ .Chart.Name }}echo diff --git a/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml b/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml index e668e4c17..93f8d3e39 100755 --- a/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml @@ -44,7 +44,7 @@ spec: apiVersion: v1 kind: Service metadata: - name: {{ .Chart.Name }}-service + name: kong namespace: {{ .Values.namespace }} labels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/player/templates/deployment.yaml b/kubernetes/helm_charts/core/player/templates/deployment.yaml index 471e20f58..88f82e313 100644 --- a/kubernetes/helm_charts/core/player/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/player/templates/deployment.yaml @@ -53,7 +53,7 @@ spec: apiVersion: v1 kind: Service metadata: - name: {{ .Chart.Name }}-service + name: {{ .Chart.Name }} namespace: {{ .Values.namespace }} labels: app: {{ .Chart.Name }} From 292a2ae758b8abededdca0d1ca59d883d2be92b8 Mon Sep 17 00:00:00 2001 From: G33tha Date: Mon, 18 Nov 2019 13:18:09 +0530 Subject: [PATCH 0355/2894] Issue #000 feat: updated jenkins setup scrit to install kubectl and helm --- deploy/jenkins/jenkins-server-setup.sh | 48 ++++++++++++++++++-------- 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/deploy/jenkins/jenkins-server-setup.sh b/deploy/jenkins/jenkins-server-setup.sh index dc45023b1..9f4524954 100755 --- a/deploy/jenkins/jenkins-server-setup.sh +++ b/deploy/jenkins/jenkins-server-setup.sh @@ -1,7 +1,11 @@ + #!/bin/bash bold=$(tput bold) normal=$(tput sgr0) +echo -e "\n\e[0;32m${bold}Clean up${normal}" +rm -rf /etc/apt/sources.list.d/azure-cli.list /etc/apt/sources.list.d/packages_microsoft_com_repos_azure_cli.list* + echo -e "\n\e[0;32m${bold}Updating the apt repo${normal}\n" apt-get update @@ -12,7 +16,7 @@ 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 - apt-add-repository "deb https://pkg.jenkins.io/debian-stable binary/" apt-get update -apt-get install -y jenkins=2.176.2 +apt-get install -y jenkins=2.190.2 echo -e "\n\e[0;32m${bold}Installating PIP${normal}" apt-get install -y python-pip @@ -44,7 +48,13 @@ apt-get install -y docker-ce docker-ce-cli containerd.io echo -e "\n\e[0;32m${bold}Installating node and npm modules" wget https://nodejs.org/download/release/v6.1.0/node-v6.1.0-linux-x64.tar.gz -tar -xvf node-v6.1.0-linux-x64.tar.gz +tar -xf node-v6.1.0-linux-x64.tar.gz +rm -rf /usr/local/lib/node-v6.1.0-linux-x64 +rm -rf /usr/bin/node +rm -rf /usr/bin/npm +rm -rf /usr/bin/grunt +rm -rf /usr/bin/bower +rm -rf /usr/bin/gulp mv node-v6.1.0-linux-x64 /usr/local/lib/ ln -s /usr/local/lib/node-v6.1.0-linux-x64/bin/node /usr/bin/node ln -s /usr/local/lib/node-v6.1.0-linux-x64/bin/npm /usr/bin/npm @@ -54,27 +64,27 @@ npm install -g bower@1.8.0 ln -s /usr/local/lib/node-v6.1.0-linux-x64/bin/bower /usr/bin/bower npm install -g gulp@3.9.1 ln -s /usr/local/lib/node-v6.1.0-linux-x64/bin/gulp /usr/bin/gulp +rm -rf node-v6.1.0-linux-x64* echo -e "\n\e[0;32m${bold}Installating Ansible${normal}" pip install ansible==2.5.0 echo -e "\n\e[0;32m${bold}Installating azure cli${normal}" -apt-get install curl apt-transport-https lsb-release gpg -curl -sL https://packages.microsoft.com/keys/microsoft.asc | \ - gpg --dearmor | \ +apt-get install ca-certificates curl apt-transport-https lsb-release gnupg +curl -sL https://packages.microsoft.com/keys/microsoft.asc | + gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc.gpg > /dev/null AZ_REPO=$(lsb_release -cs) -echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | \ +echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | sudo tee /etc/apt/sources.list.d/azure-cli.list - -apt-get update -apt-get install azure-cli +sudo apt-get update +sudo apt-get install azure-cli # Install azcopy echo -e "\n\e[0;32m${bold}Installating AzCopy${normal}" apt update wget https://aka.ms/downloadazcopy-v10-linux -tar -xvf downloadazcopy-v10-linux +tar -xf downloadazcopy-v10-linux cp ./azcopy_linux_amd64_*/azcopy /usr/bin/ rm -rf downloadazcopy-v10-linux* azcopy_linux_amd* ### @@ -101,10 +111,6 @@ pip install docker-py echo -e "\n\e[0;32m${bold}Installating colordiff${normal}" apt-get install -y colordiff -echo -e "\n\e[0;32m${bold}Installating git lfs${normal}" -curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash -apt-get install git-lfs - echo -e "\n\e[0;32m${bold}Adding jenkins user to docker group${normal}" usermod -aG docker jenkins @@ -112,4 +118,16 @@ echo -e "\n\e[0;32m${bold}Creating bashrc for jenkins user ${normal}" cp /etc/skel/.bashrc /var/lib/jenkins chown jenkins:jenkins /var/lib/jenkins/.bashrc -echo -e "\n\e[0;32m${bold}Installation complete. Please go to your jenkins URL and continue setup if this first run..${normal}" +echo -e "\n\e[0;32m${bold}Setting timezone to IST ${normal}" +timedatectl set-timezone Asia/Kolkata + +echo -e "\n\e[0;32m${bold}Installing nvm${normal}" +su jenkins bash -c "curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash" + +echo -e "\n\e[0;32m${bold}Installing jmespath${normal}" +pip install jmespath + +echo -e "\n\e[0;32m${bold}Clean up${normal}" +sudo apt -y autoremove + +echo -e "\n\e[0;32m${bold}Installation complete. Please go to your jenkins URL and continue setup if this is the first run..${normal}" \ No newline at end of file From d953cb70c81e43be8fed1a66f91e090fb4479a0a Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Mon, 18 Nov 2019 13:36:53 +0530 Subject: [PATCH 0356/2894] feat: adding dns resolve block --- .../core/apimanager/templates/deployment.yaml | 4 ++++ kubernetes/helm_charts/core/apimanager/values.j2 | 14 +++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml b/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml index 93f8d3e39..0a72b4a1f 100755 --- a/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml @@ -39,6 +39,10 @@ spec: name: network - containerPort: {{ .Values.service.port }} name: service + - name: go-dns + image: "{{ .Values.go-dns.repository }}:{{ .Values.go-dns.image_tag }}" + resources: +{{ toYaml .Values.go-dns.resources | indent 10 }} --- apiVersion: v1 diff --git a/kubernetes/helm_charts/core/apimanager/values.j2 b/kubernetes/helm_charts/core/apimanager/values.j2 index 9aef6a134..7cc9cb982 100755 --- a/kubernetes/helm_charts/core/apimanager/values.j2 +++ b/kubernetes/helm_charts/core/apimanager/values.j2 @@ -6,7 +6,7 @@ dockerhub: {{ dockerhub }} replicaCount: {{replicacount|default(1)}} repository: {{kong_repository|default('kong')}} -image_tag: {{image_tag }} +image_tag: {{ image_tag }} resources: cpu: {{api_manager_cpu|default('50m')}} memory: {{api_manager_memory|default('50Mi')}} @@ -44,6 +44,18 @@ apimanagerenv: KONG_PG_USER: {{kong_postgres_user}} KONG_PG_PASSWORD: {{ kong_postgres_password }} KONG_PG_DATABASE: {{ kong_postgres_database }} + KONG_DNS_RESOLVER: {{ kong_dns_resolver | default('127.0.0.1:53') }} + +go-dns: + repository: {{ go_dns_repository }} + image_tag: {{ go_dns_image_tag }} + resources: + requests: + cpu: {{ go_dns_cpu_req }} + memory: {{ go_dns_mem_req }} + limits: + cpu: {{ go_dns_cpu_limit }} + memory: {{ go_dns_mem_limit }} apimanagerenvOptional: {{api_optional|default('')}} From d6538919e782cf1d1572be0b75fba74e86213719 Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Mon, 18 Nov 2019 13:40:53 +0530 Subject: [PATCH 0357/2894] fix: adding defaults for go dns --- kubernetes/helm_charts/core/apimanager/values.j2 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kubernetes/helm_charts/core/apimanager/values.j2 b/kubernetes/helm_charts/core/apimanager/values.j2 index 7cc9cb982..1dc5c5a12 100755 --- a/kubernetes/helm_charts/core/apimanager/values.j2 +++ b/kubernetes/helm_charts/core/apimanager/values.j2 @@ -47,15 +47,15 @@ apimanagerenv: KONG_DNS_RESOLVER: {{ kong_dns_resolver | default('127.0.0.1:53') }} go-dns: - repository: {{ go_dns_repository }} - image_tag: {{ go_dns_image_tag }} + repository: {{ go_dns_repository | default('docker.io/sunbird/go-dns') }} + image_tag: {{ go_dns_image_tag | default('v1.0') }} resources: requests: - cpu: {{ go_dns_cpu_req }} - memory: {{ go_dns_mem_req }} + cpu: {{ go_dns_cpu_req | default('50m') }} + memory: {{ go_dns_mem_req | default('100Mi') }} limits: - cpu: {{ go_dns_cpu_limit }} - memory: {{ go_dns_mem_limit }} + cpu: {{ go_dns_cpu_limit | default('300m') }} + memory: {{ go_dns_mem_limit | default('350Mi') }} apimanagerenvOptional: {{api_optional|default('')}} From ae909a25ba5de3ff34f96edabcd1a51761ac4fae Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Mon, 18 Nov 2019 13:59:51 +0530 Subject: [PATCH 0358/2894] fix: renaming variable --- .../helm_charts/core/apimanager/templates/deployment.yaml | 4 ++-- kubernetes/helm_charts/core/apimanager/values.j2 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml b/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml index 0a72b4a1f..d09f69d94 100755 --- a/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml @@ -40,9 +40,9 @@ spec: - containerPort: {{ .Values.service.port }} name: service - name: go-dns - image: "{{ .Values.go-dns.repository }}:{{ .Values.go-dns.image_tag }}" + image: "{{ .Values.godns.repository }}:{{ .Values.godns.image_tag }}" resources: -{{ toYaml .Values.go-dns.resources | indent 10 }} +{{ toYaml .Values.godns.resources | indent 10 }} --- apiVersion: v1 diff --git a/kubernetes/helm_charts/core/apimanager/values.j2 b/kubernetes/helm_charts/core/apimanager/values.j2 index 1dc5c5a12..39fe6a6b1 100755 --- a/kubernetes/helm_charts/core/apimanager/values.j2 +++ b/kubernetes/helm_charts/core/apimanager/values.j2 @@ -46,7 +46,7 @@ apimanagerenv: KONG_PG_DATABASE: {{ kong_postgres_database }} KONG_DNS_RESOLVER: {{ kong_dns_resolver | default('127.0.0.1:53') }} -go-dns: +godns: repository: {{ go_dns_repository | default('docker.io/sunbird/go-dns') }} image_tag: {{ go_dns_image_tag | default('v1.0') }} resources: From c3fd6d5754151cacba5b7a214cd7a5d4853372a8 Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Mon, 18 Nov 2019 14:06:22 +0530 Subject: [PATCH 0359/2894] fix: updating service names --- .../templates/private-virtualservice-ingress.yml | 4 ++-- .../networkconfig/templates/virtualservice.yaml | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/kubernetes/helm_charts/networkconfig/templates/private-virtualservice-ingress.yml b/kubernetes/helm_charts/networkconfig/templates/private-virtualservice-ingress.yml index 88af5adf9..df9415382 100644 --- a/kubernetes/helm_charts/networkconfig/templates/private-virtualservice-ingress.yml +++ b/kubernetes/helm_charts/networkconfig/templates/private-virtualservice-ingress.yml @@ -24,7 +24,7 @@ spec: uri: / route: - destination: - host: apimanager-service + host: kong port: number: 8000 - match: @@ -34,7 +34,7 @@ spec: uri: / route: - destination: - host: apimanager-service + host: kong port: number: 8001 - match: diff --git a/kubernetes/helm_charts/networkconfig/templates/virtualservice.yaml b/kubernetes/helm_charts/networkconfig/templates/virtualservice.yaml index 5a9b6da3c..ed6fce9a5 100755 --- a/kubernetes/helm_charts/networkconfig/templates/virtualservice.yaml +++ b/kubernetes/helm_charts/networkconfig/templates/virtualservice.yaml @@ -25,7 +25,7 @@ spec: uri: / route: - destination: - host: player-service + host: player - match: - uri: prefix: /auth/ @@ -41,7 +41,7 @@ spec: uri: / route: - destination: - host: apimanager-service + host: kong port: number: 8000 - match: @@ -109,7 +109,7 @@ spec: uri: / route: - destination: - host: player-service + host: player headers: request: add: @@ -136,6 +136,6 @@ spec: prefix: / route: - destination: - host: player-service + host: player + - \ No newline at end of file From ee8c8f57c0a9cee0d9a64c96adf29fb64579a7ef Mon Sep 17 00:00:00 2001 From: G33tha Date: Mon, 18 Nov 2019 14:09:59 +0530 Subject: [PATCH 0360/2894] Issue #000 feat: updated helm charts --- .../helm_charts/core/telemetry/templates/deployment.yaml | 4 +--- kubernetes/helm_charts/core/telemetry/values.j2 | 8 ++++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/kubernetes/helm_charts/core/telemetry/templates/deployment.yaml b/kubernetes/helm_charts/core/telemetry/templates/deployment.yaml index 30c9925b5..405e85784 100644 --- a/kubernetes/helm_charts/core/telemetry/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/telemetry/templates/deployment.yaml @@ -31,9 +31,7 @@ spec: - configMapRef: name: {{ .Chart.Name }}-config resources: - requests: - cpu: {{ quote .Values.resources.cpu }} - memory: {{ quote .Values.resources.memory }} +{{ toYaml .Values.resources | indent 10 }} ports: - containerPort: {{ .Values.network.port }} diff --git a/kubernetes/helm_charts/core/telemetry/values.j2 b/kubernetes/helm_charts/core/telemetry/values.j2 index 62873a07d..7b78df067 100644 --- a/kubernetes/helm_charts/core/telemetry/values.j2 +++ b/kubernetes/helm_charts/core/telemetry/values.j2 @@ -9,8 +9,12 @@ replicaCount: {{replicacount|default(1)}} repository: {{telemetry_repository|default('telemetry-service')}} image_tag: {{image_tag }} resources: - cpu: {{telemetry_service_cpu|default('50m')}} - memory: {{telemetry_service_memory|default('50Mi')}} + requests: + cpu: {{telemetry_service_cpu_req|default('50m')}} + memory: {{telemetry_service_mem_req|default('50Mi')}} + limits: + cpu: {{telemetry_service_cpu_limit|default('50m')}} + memory: {{telemetry_service_mem_limit|default('50Mi')}} network: port: 9001 targetport: 9001 From 720d4120c8f9f263163011c8cd925b455b6d2699 Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Mon, 18 Nov 2019 14:18:29 +0530 Subject: [PATCH 0361/2894] fix: updating service names --- ansible/roles/kong-api/defaults/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/roles/kong-api/defaults/main.yml b/ansible/roles/kong-api/defaults/main.yml index d85be7d25..9e3a91d44 100644 --- a/ansible/roles/kong-api/defaults/main.yml +++ b/ansible/roles/kong-api/defaults/main.yml @@ -61,9 +61,9 @@ content_service_url: "http://content-service:5000" learning_service_url: "http://learner-service:9000" vm_learning_service_url: "http://{{learningservice_ip}}:8080/learning-service" telemetry_service_url: "http://telemetry-service:9001" -player_service_url: "http://player-service:3000" -echo_service_url: "http://apimanagerecho-service:9595" -am_util_url: "http://adminutil-service:4000" +player_service_url: "http://player:3000" +echo_service_url: "http://echo:9595" +am_util_url: "http://adminutil:4000" config_service_url: "http://config-service:8080" user_org_service_url: "http://userorg-service:9000" lms_service_url: "http://lms-service:9000" From ff20429f36653a43cf45adad1749d3ebd24bb755 Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Mon, 18 Nov 2019 14:29:35 +0530 Subject: [PATCH 0362/2894] fix: updating kong service name --- ansible/inventory/env/group_vars/all.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/inventory/env/group_vars/all.yml b/ansible/inventory/env/group_vars/all.yml index e12dc0e09..fdfc526a2 100644 --- a/ansible/inventory/env/group_vars/all.yml +++ b/ansible/inventory/env/group_vars/all.yml @@ -105,7 +105,7 @@ keystore_password: "{{core_vault_keystore_password}}" #Password to use for encr truststore_password: "{{core_vault_truststore_password}}" #Password to use for encrypting cassandra truststore. Use a strong password. # APPLICATION CONFIGURATION -kong_host: api-manager_kong +kong_host: kong ## DB address application_postgres_host: "{{groups['postgres'][0]}}" #Private IP of Postgres server @@ -166,8 +166,8 @@ cassandra_backup_dir: /data/cassandra/backup keycloak_realm: sunbird -sunbird_content_player_url: "http://api-manager_kong:8000/" -sunbird_learner_player_url: "http://api-manager_kong:8000/" +sunbird_content_player_url: "http://kong:8000/" +sunbird_learner_player_url: "http://kong:8000/" sunbird_sso_client_id: admin-cli sunbird_portal_realm: sunbird sunbird_portal_auth_server_client: portal From ef2956dbc48618b062775c9fccb922d6a0c415e4 Mon Sep 17 00:00:00 2001 From: G33tha Date: Mon, 18 Nov 2019 15:22:34 +0530 Subject: [PATCH 0363/2894] Issue #000 feat: updated helm charts --- .../helm_charts/core/adminutils/templates/deployment.yaml | 4 +--- kubernetes/helm_charts/core/adminutils/values.j2 | 8 ++++++-- .../helm_charts/core/apimanager/templates/deployment.yaml | 4 +--- kubernetes/helm_charts/core/apimanager/values.j2 | 8 ++++++-- .../helm_charts/core/badger/templates/deployment.yaml | 4 +--- kubernetes/helm_charts/core/badger/values.j2 | 8 ++++++-- .../helm_charts/core/cert/templates/deployment.yaml | 4 +--- kubernetes/helm_charts/core/cert/values.j2 | 8 ++++++-- .../helm_charts/core/content/templates/deployment.yaml | 4 +--- kubernetes/helm_charts/core/content/values.j2 | 8 ++++++-- kubernetes/helm_charts/core/enc/templates/deployment.yaml | 4 +--- kubernetes/helm_charts/core/enc/values.j2 | 8 ++++++-- .../helm_charts/core/learner/templates/deployment.yaml | 4 +--- kubernetes/helm_charts/core/learner/values.j2 | 8 ++++++-- kubernetes/helm_charts/core/lms/templates/deployment.yaml | 4 +--- kubernetes/helm_charts/core/lms/values.j2 | 8 ++++++-- .../core/notification/templates/deployment.yaml | 4 +--- kubernetes/helm_charts/core/notification/values.j2 | 8 ++++++-- .../helm_charts/core/player/templates/deployment.yaml | 4 +--- kubernetes/helm_charts/core/player/values.j2 | 8 ++++++-- .../helm_charts/core/userorg/templates/deployment.yaml | 4 +--- kubernetes/helm_charts/core/userorg/values.j2 | 8 ++++++-- .../helm_charts/networkconfig/templates/serviceentry.yaml | 6 +++--- 23 files changed, 80 insertions(+), 58 deletions(-) diff --git a/kubernetes/helm_charts/core/adminutils/templates/deployment.yaml b/kubernetes/helm_charts/core/adminutils/templates/deployment.yaml index 03343eb9c..c9cee0f4c 100644 --- a/kubernetes/helm_charts/core/adminutils/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/adminutils/templates/deployment.yaml @@ -31,9 +31,7 @@ spec: - configMapRef: name: {{ .Chart.Name }}-config resources: - requests: - cpu: {{ quote .Values.resources.cpu }} - memory: {{ quote .Values.resources.memory }} +{{ toYaml .Values.resources | indent 10 }} ports: - containerPort: {{ .Values.network.port }} diff --git a/kubernetes/helm_charts/core/adminutils/values.j2 b/kubernetes/helm_charts/core/adminutils/values.j2 index 78110abac..085d7c0fc 100644 --- a/kubernetes/helm_charts/core/adminutils/values.j2 +++ b/kubernetes/helm_charts/core/adminutils/values.j2 @@ -8,8 +8,12 @@ replicaCount: {{replicacount|default(1)}} repository: {{cert_repository|default('adminutil')}} image_tag: {{image_tag }} resources: - cpu: {{adminutil_service_cpu|default('50m')}} - memory: {{adminutil_service_memory|default('50Mi')}} + requests: + cpu: {{adminutil_service_cpu_req|default('50m')}} + memory: {{adminutil_service_mem_req|default('50Mi')}} + limits: + cpu: {{adminutil_service_cpu_limit|default('100m')}} + memory: {{adminutil_service_memory_limit|default('1024Mi')}} network: port: 4000 targetport: 4000 diff --git a/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml b/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml index d09f69d94..3f1ae84e9 100755 --- a/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml @@ -31,9 +31,7 @@ spec: - configMapRef: name: {{ .Chart.Name }}-config resources: - requests: - cpu: {{ quote .Values.resources.cpu }} - memory: {{ quote .Values.resources.memory }} +{{ toYaml .Values.resources | indent 10 }} ports: - containerPort: {{ .Values.network.port }} name: network diff --git a/kubernetes/helm_charts/core/apimanager/values.j2 b/kubernetes/helm_charts/core/apimanager/values.j2 index 39fe6a6b1..41afaf412 100755 --- a/kubernetes/helm_charts/core/apimanager/values.j2 +++ b/kubernetes/helm_charts/core/apimanager/values.j2 @@ -8,8 +8,12 @@ replicaCount: {{replicacount|default(1)}} repository: {{kong_repository|default('kong')}} image_tag: {{ image_tag }} resources: - cpu: {{api_manager_cpu|default('50m')}} - memory: {{api_manager_memory|default('50Mi')}} + requests: + cpu: {{api_manager_cpu_req|default('50m')}} + memory: {{api_manager_mem_req|default('50Mi')}} + limits: + cpu: {{api_manager_cpu_limit|default('50m')}} + memory: {{api_manager_memory_limit|default('50Mi')}} network: port: 8000 targetport: 8000 diff --git a/kubernetes/helm_charts/core/badger/templates/deployment.yaml b/kubernetes/helm_charts/core/badger/templates/deployment.yaml index 2579daed5..0e121a1f1 100755 --- a/kubernetes/helm_charts/core/badger/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/badger/templates/deployment.yaml @@ -32,9 +32,7 @@ spec: - name: {{ .Chart.Name }} image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" resources: - requests: - cpu: {{ quote .Values.resources.cpu }} - memory: {{ quote .Values.resources.memory }} +{{ toYaml .Values.resources | indent 10 }} ports: - containerPort: {{ .Values.network.port }} volumeMounts: diff --git a/kubernetes/helm_charts/core/badger/values.j2 b/kubernetes/helm_charts/core/badger/values.j2 index 9ff1a552a..453c2d5b1 100755 --- a/kubernetes/helm_charts/core/badger/values.j2 +++ b/kubernetes/helm_charts/core/badger/values.j2 @@ -8,8 +8,12 @@ replicaCount: {{replicacount|default(1)}} repository: {{cert_repository|default('badger')}} image_tag: {{image_tag }} resources: - cpu: {{badger_service_cpu|default('50m')}} - memory: {{badger_service_memory|default('50Mi')}} + requests: + cpu: {{badger_service_cpu_req|default('50m')}} + memory: {{badger_service_mem_req|default('50Mi')}} + limits: + cpu: {{badger_service_cpu_limit|default('50m')}} + memory: {{badger_service_mem_limit|default('50Mi')}} network: port: 8004 targetport: 8004 diff --git a/kubernetes/helm_charts/core/cert/templates/deployment.yaml b/kubernetes/helm_charts/core/cert/templates/deployment.yaml index 30c9925b5..405e85784 100644 --- a/kubernetes/helm_charts/core/cert/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/cert/templates/deployment.yaml @@ -31,9 +31,7 @@ spec: - configMapRef: name: {{ .Chart.Name }}-config resources: - requests: - cpu: {{ quote .Values.resources.cpu }} - memory: {{ quote .Values.resources.memory }} +{{ toYaml .Values.resources | indent 10 }} ports: - containerPort: {{ .Values.network.port }} diff --git a/kubernetes/helm_charts/core/cert/values.j2 b/kubernetes/helm_charts/core/cert/values.j2 index d3acf12b4..56964e9df 100644 --- a/kubernetes/helm_charts/core/cert/values.j2 +++ b/kubernetes/helm_charts/core/cert/values.j2 @@ -8,8 +8,12 @@ replicaCount: {{replicacount|default(1)}} repository: {{cert_repository|default('cert_service')}} image_tag: {{image_tag }} resources: - cpu: {{cert_service_cpu|default('50m')}} - memory: {{cert_service_memory|default('50Mi')}} + requests: + cpu: {{cert_service_cpu_req|default('50m')}} + memory: {{cert_service_mem_req|default('50Mi')}} + limits: + cpu: {{cert_service_cpu_limit|default('50m')}} + memory: {{cert_service_mem_limit|default('50Mi')}} network: port: 9011 targetport: 9000 diff --git a/kubernetes/helm_charts/core/content/templates/deployment.yaml b/kubernetes/helm_charts/core/content/templates/deployment.yaml index 30c9925b5..405e85784 100644 --- a/kubernetes/helm_charts/core/content/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/content/templates/deployment.yaml @@ -31,9 +31,7 @@ spec: - configMapRef: name: {{ .Chart.Name }}-config resources: - requests: - cpu: {{ quote .Values.resources.cpu }} - memory: {{ quote .Values.resources.memory }} +{{ toYaml .Values.resources | indent 10 }} ports: - containerPort: {{ .Values.network.port }} diff --git a/kubernetes/helm_charts/core/content/values.j2 b/kubernetes/helm_charts/core/content/values.j2 index 27d5bfca8..7d72ad789 100644 --- a/kubernetes/helm_charts/core/content/values.j2 +++ b/kubernetes/helm_charts/core/content/values.j2 @@ -8,8 +8,12 @@ replicaCount: {{replicacount|default(1)}} repository: {{content_repository|default('content-service')}} image_tag: {{ image_tag }} resources: - cpu: {{content_service_cpu|default('50m')}} - memory: {{content_service_memory|default('50Mi')}} + requests: + cpu: {{content_service_cpu_req|default('50m')}} + memory: {{content_service_mem_req|default('50Mi')}} + limits: + cpu: {{content_service_cpu_limit|default('50m')}} + memory: {{content_service_mem_limit|default('50Mi')}} network: port: 5000 targetport: 5000 diff --git a/kubernetes/helm_charts/core/enc/templates/deployment.yaml b/kubernetes/helm_charts/core/enc/templates/deployment.yaml index 30c9925b5..405e85784 100644 --- a/kubernetes/helm_charts/core/enc/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/enc/templates/deployment.yaml @@ -31,9 +31,7 @@ spec: - configMapRef: name: {{ .Chart.Name }}-config resources: - requests: - cpu: {{ quote .Values.resources.cpu }} - memory: {{ quote .Values.resources.memory }} +{{ toYaml .Values.resources | indent 10 }} ports: - containerPort: {{ .Values.network.port }} diff --git a/kubernetes/helm_charts/core/enc/values.j2 b/kubernetes/helm_charts/core/enc/values.j2 index 2c6e4602b..856fb1dc5 100644 --- a/kubernetes/helm_charts/core/enc/values.j2 +++ b/kubernetes/helm_charts/core/enc/values.j2 @@ -8,8 +8,12 @@ replicaCount: {{replicacount|default(1)}} repository: {{enc_repository|default('enc_service')}} image_tag: {{image_tag }} resources: - cpu: {{enc_service_cpu|default('50m')}} - memory: {{enc_service_memory|default('50Mi')}} + requests: + cpu: {{enc_service_cpu_req|default('50m')}} + memory: {{enc_service_mem_req|default('50Mi')}} + limits: + cpu: {{enc_service_cpu_limit|default('50m')}} + memory: {{enc_service_memory_limit|default('50Mi')}} network: port: 9010 targetport: 8013 diff --git a/kubernetes/helm_charts/core/learner/templates/deployment.yaml b/kubernetes/helm_charts/core/learner/templates/deployment.yaml index 30c9925b5..405e85784 100644 --- a/kubernetes/helm_charts/core/learner/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/learner/templates/deployment.yaml @@ -31,9 +31,7 @@ spec: - configMapRef: name: {{ .Chart.Name }}-config resources: - requests: - cpu: {{ quote .Values.resources.cpu }} - memory: {{ quote .Values.resources.memory }} +{{ toYaml .Values.resources | indent 10 }} ports: - containerPort: {{ .Values.network.port }} diff --git a/kubernetes/helm_charts/core/learner/values.j2 b/kubernetes/helm_charts/core/learner/values.j2 index 63a264f88..2183188f0 100644 --- a/kubernetes/helm_charts/core/learner/values.j2 +++ b/kubernetes/helm_charts/core/learner/values.j2 @@ -9,8 +9,12 @@ replicaCount: {{replicacount|default(1)}} repository: {{learner_repository|default('learner_service')}} image_tag: {{image_tag }} resources: - cpu: {{learner_service_cpu|default('50m')}} - memory: {{learner_service_memory|default('50Mi')}} + requests: + cpu: {{learner_service_cpu_req|default('50m')}} + memory: {{learner_service_mem_req|default('50Mi')}} + limits: + cpu: {{learner_service_cpu_limit|default('50m')}} + memory: {{learner_service_mem_limit|default('50Mi')}} network: port: 9000 targetport: 9000 diff --git a/kubernetes/helm_charts/core/lms/templates/deployment.yaml b/kubernetes/helm_charts/core/lms/templates/deployment.yaml index 30c9925b5..405e85784 100644 --- a/kubernetes/helm_charts/core/lms/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/lms/templates/deployment.yaml @@ -31,9 +31,7 @@ spec: - configMapRef: name: {{ .Chart.Name }}-config resources: - requests: - cpu: {{ quote .Values.resources.cpu }} - memory: {{ quote .Values.resources.memory }} +{{ toYaml .Values.resources | indent 10 }} ports: - containerPort: {{ .Values.network.port }} diff --git a/kubernetes/helm_charts/core/lms/values.j2 b/kubernetes/helm_charts/core/lms/values.j2 index e6c749cc6..6e303c57a 100644 --- a/kubernetes/helm_charts/core/lms/values.j2 +++ b/kubernetes/helm_charts/core/lms/values.j2 @@ -8,8 +8,12 @@ replicaCount: {{replicacount|default(1)}} repository: {{lms_repository|default('lms_service')}} image_tag: {{image_tag }} resources: - cpu: {{lms_service_cpu|default('50m')}} - memory: {{lms_service_memory|default('50Mi')}} + requests: + cpu: {{lms_service_cpu_req|default('50m')}} + memory: {{lms_service_mem_req|default('50Mi')}} + limits: + cpu: {{lms_service_cpu_limit|default('50m')}} + memory: {{lms_service_mem_limit|default('50Mi')}} network: port: 9005 targetport: 9000 diff --git a/kubernetes/helm_charts/core/notification/templates/deployment.yaml b/kubernetes/helm_charts/core/notification/templates/deployment.yaml index 30c9925b5..405e85784 100644 --- a/kubernetes/helm_charts/core/notification/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/notification/templates/deployment.yaml @@ -31,9 +31,7 @@ spec: - configMapRef: name: {{ .Chart.Name }}-config resources: - requests: - cpu: {{ quote .Values.resources.cpu }} - memory: {{ quote .Values.resources.memory }} +{{ toYaml .Values.resources | indent 10 }} ports: - containerPort: {{ .Values.network.port }} diff --git a/kubernetes/helm_charts/core/notification/values.j2 b/kubernetes/helm_charts/core/notification/values.j2 index 1dc63d7a8..aaa80a296 100644 --- a/kubernetes/helm_charts/core/notification/values.j2 +++ b/kubernetes/helm_charts/core/notification/values.j2 @@ -8,8 +8,12 @@ replicaCount: {{replicacount|default(1)}} repository: {{notification_repository|default('notification_service')}} image_tag: {{image_tag }} resources: - cpu: {{notification_service_cpu|default('50m')}} - memory: {{notification_service_memory|default('50Mi')}} + requests: + cpu: {{notification_service_cpu_req|default('50m')}} + memory: {{notification_service_mem_req|default('50Mi')}} + limits: + cpu: {{notification_service_cpu_limit|default('50m')}} + memory: {{notification_service_mem_limit|default('50Mi')}} network: port: 9012 targetport: 9000 diff --git a/kubernetes/helm_charts/core/player/templates/deployment.yaml b/kubernetes/helm_charts/core/player/templates/deployment.yaml index 88f82e313..de1b6feb3 100644 --- a/kubernetes/helm_charts/core/player/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/player/templates/deployment.yaml @@ -37,9 +37,7 @@ spec: - configMapRef: name: {{ .Chart.Name }}-config resources: - requests: - cpu: {{ quote .Values.resources.cpu }} - memory: {{ quote .Values.resources.memory }} +{{ toYaml .Values.resources | indent 10 }} ports: - containerPort: {{ .Values.network.port }} {{- if .Values.sunbird_portal_player_cdn_enabled }} diff --git a/kubernetes/helm_charts/core/player/values.j2 b/kubernetes/helm_charts/core/player/values.j2 index df5877d2d..5d9d81888 100644 --- a/kubernetes/helm_charts/core/player/values.j2 +++ b/kubernetes/helm_charts/core/player/values.j2 @@ -8,8 +8,12 @@ replicaCount: {{replicacount|default(1)}} repository: {{player_repository|default('player')}} image_tag: {{image_tag }} resources: - cpu: {{player_service_cpu|default('50m')}} - memory: {{player_service_memory|default('50Mi')}} + requests: + cpu: {{player_service_cpu_req|default('50m')}} + memory: {{player_service_mem_req|default('50Mi')}} + limits: + cpu: {{player_service_cpu_limit|default('50m')}} + memory: {{player_service_mem_limit|default('50Mi')}} network: port: 3000 targetport: 3000 diff --git a/kubernetes/helm_charts/core/userorg/templates/deployment.yaml b/kubernetes/helm_charts/core/userorg/templates/deployment.yaml index 30c9925b5..405e85784 100644 --- a/kubernetes/helm_charts/core/userorg/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/userorg/templates/deployment.yaml @@ -31,9 +31,7 @@ spec: - configMapRef: name: {{ .Chart.Name }}-config resources: - requests: - cpu: {{ quote .Values.resources.cpu }} - memory: {{ quote .Values.resources.memory }} +{{ toYaml .Values.resources | indent 10 }} ports: - containerPort: {{ .Values.network.port }} diff --git a/kubernetes/helm_charts/core/userorg/values.j2 b/kubernetes/helm_charts/core/userorg/values.j2 index f03089574..6e0fbbe7e 100644 --- a/kubernetes/helm_charts/core/userorg/values.j2 +++ b/kubernetes/helm_charts/core/userorg/values.j2 @@ -8,8 +8,12 @@ replicaCount: {{replicacount|default(1)}} repository: {{userorg_repository|default('user_org_service')}} image_tag: {{image_tag }} resources: - cpu: {{userorg_service_cpu|default('50m')}} - memory: {{userorg_service_memory|default('50Mi')}} + requests: + cpu: {{userorg_service_cpu_req|default('50m')}} + memory: {{userorg_service_mem_req|default('50Mi')}} + limits: + cpu: {{userorg_service_cpu_limit|default('50m')}} + memory: {{userorg_service_mem_limit|default('50Mi')}} network: port: 9008 targetport: 9000 diff --git a/kubernetes/helm_charts/networkconfig/templates/serviceentry.yaml b/kubernetes/helm_charts/networkconfig/templates/serviceentry.yaml index 1837e6460..af3ebe9e3 100644 --- a/kubernetes/helm_charts/networkconfig/templates/serviceentry.yaml +++ b/kubernetes/helm_charts/networkconfig/templates/serviceentry.yaml @@ -1,7 +1,7 @@ apiVersion: networking.istio.io/v1alpha3 kind: ServiceEntry metadata: - name: {{ .Values.namespace }}-keycloak + name: {{ .Values.namespace }}-blob namespace: {{ .Values.namespace }} spec: hosts: @@ -17,7 +17,7 @@ spec: kind: Service apiVersion: v1 metadata: - name: {{ .Values.namespace }}-blob + name: {{ .Values.namespace }}-keycloak namespace: {{ .Values.namespace }} spec: type: ExternalName @@ -27,7 +27,7 @@ spec: apiVersion: networking.istio.io/v1alpha3 kind: ServiceEntry metadata: - name: {{ .Values.namespace }}-blob + name: {{ .Values.namespace }}-keycloak namespace: {{ .Values.namespace }} spec: hosts: From 8665e1a18101e6f9e5e6a7195b646113299f041f Mon Sep 17 00:00:00 2001 From: G33tha Date: Mon, 18 Nov 2019 15:42:16 +0530 Subject: [PATCH 0364/2894] Issue #000 feat: updated helm charts --- kubernetes/helm_charts/core/apimanager/values.j2 | 4 ++-- kubernetes/helm_charts/core/badger/values.j2 | 4 ++-- kubernetes/helm_charts/core/cert/values.j2 | 4 ++-- kubernetes/helm_charts/core/content/values.j2 | 4 ++-- kubernetes/helm_charts/core/enc/values.j2 | 4 ++-- kubernetes/helm_charts/core/learner/values.j2 | 4 ++-- kubernetes/helm_charts/core/lms/values.j2 | 4 ++-- kubernetes/helm_charts/core/notification/values.j2 | 4 ++-- kubernetes/helm_charts/core/player/values.j2 | 4 ++-- kubernetes/helm_charts/core/telemetry/values.j2 | 4 ++-- kubernetes/helm_charts/core/userorg/values.j2 | 4 ++-- 11 files changed, 22 insertions(+), 22 deletions(-) diff --git a/kubernetes/helm_charts/core/apimanager/values.j2 b/kubernetes/helm_charts/core/apimanager/values.j2 index 41afaf412..bcfa19635 100755 --- a/kubernetes/helm_charts/core/apimanager/values.j2 +++ b/kubernetes/helm_charts/core/apimanager/values.j2 @@ -12,8 +12,8 @@ resources: cpu: {{api_manager_cpu_req|default('50m')}} memory: {{api_manager_mem_req|default('50Mi')}} limits: - cpu: {{api_manager_cpu_limit|default('50m')}} - memory: {{api_manager_memory_limit|default('50Mi')}} + cpu: {{api_manager_cpu_limit|default('1000m')}} + memory: {{api_manager_memory_limit|default('256Mi')}} network: port: 8000 targetport: 8000 diff --git a/kubernetes/helm_charts/core/badger/values.j2 b/kubernetes/helm_charts/core/badger/values.j2 index 453c2d5b1..bda672ca6 100755 --- a/kubernetes/helm_charts/core/badger/values.j2 +++ b/kubernetes/helm_charts/core/badger/values.j2 @@ -12,8 +12,8 @@ resources: cpu: {{badger_service_cpu_req|default('50m')}} memory: {{badger_service_mem_req|default('50Mi')}} limits: - cpu: {{badger_service_cpu_limit|default('50m')}} - memory: {{badger_service_mem_limit|default('50Mi')}} + cpu: {{badger_service_cpu_limit|default('100m')}} + memory: {{badger_service_mem_limit|default('500Mi')}} network: port: 8004 targetport: 8004 diff --git a/kubernetes/helm_charts/core/cert/values.j2 b/kubernetes/helm_charts/core/cert/values.j2 index 56964e9df..527d76510 100644 --- a/kubernetes/helm_charts/core/cert/values.j2 +++ b/kubernetes/helm_charts/core/cert/values.j2 @@ -12,8 +12,8 @@ resources: cpu: {{cert_service_cpu_req|default('50m')}} memory: {{cert_service_mem_req|default('50Mi')}} limits: - cpu: {{cert_service_cpu_limit|default('50m')}} - memory: {{cert_service_mem_limit|default('50Mi')}} + cpu: {{cert_service_cpu_limit|default('1')}} + memory: {{cert_service_mem_limit|default('550Mi')}} network: port: 9011 targetport: 9000 diff --git a/kubernetes/helm_charts/core/content/values.j2 b/kubernetes/helm_charts/core/content/values.j2 index 7d72ad789..4743e1a79 100644 --- a/kubernetes/helm_charts/core/content/values.j2 +++ b/kubernetes/helm_charts/core/content/values.j2 @@ -12,8 +12,8 @@ resources: cpu: {{content_service_cpu_req|default('50m')}} memory: {{content_service_mem_req|default('50Mi')}} limits: - cpu: {{content_service_cpu_limit|default('50m')}} - memory: {{content_service_mem_limit|default('50Mi')}} + cpu: {{content_service_cpu_limit|default('1')}} + memory: {{content_service_mem_limit|default('256Mi')}} network: port: 5000 targetport: 5000 diff --git a/kubernetes/helm_charts/core/enc/values.j2 b/kubernetes/helm_charts/core/enc/values.j2 index 856fb1dc5..dc7960db4 100644 --- a/kubernetes/helm_charts/core/enc/values.j2 +++ b/kubernetes/helm_charts/core/enc/values.j2 @@ -12,8 +12,8 @@ resources: cpu: {{enc_service_cpu_req|default('50m')}} memory: {{enc_service_mem_req|default('50Mi')}} limits: - cpu: {{enc_service_cpu_limit|default('50m')}} - memory: {{enc_service_memory_limit|default('50Mi')}} + cpu: {{enc_service_cpu_limit|default('1')}} + memory: {{enc_service_memory_limit|default('800Mi')}} network: port: 9010 targetport: 8013 diff --git a/kubernetes/helm_charts/core/learner/values.j2 b/kubernetes/helm_charts/core/learner/values.j2 index 2183188f0..0a7689050 100644 --- a/kubernetes/helm_charts/core/learner/values.j2 +++ b/kubernetes/helm_charts/core/learner/values.j2 @@ -13,8 +13,8 @@ resources: cpu: {{learner_service_cpu_req|default('50m')}} memory: {{learner_service_mem_req|default('50Mi')}} limits: - cpu: {{learner_service_cpu_limit|default('50m')}} - memory: {{learner_service_mem_limit|default('50Mi')}} + cpu: {{learner_service_cpu_limit|default('1')}} + memory: {{learner_service_mem_limit|default('1000Mi')}} network: port: 9000 targetport: 9000 diff --git a/kubernetes/helm_charts/core/lms/values.j2 b/kubernetes/helm_charts/core/lms/values.j2 index 6e303c57a..e8955eb11 100644 --- a/kubernetes/helm_charts/core/lms/values.j2 +++ b/kubernetes/helm_charts/core/lms/values.j2 @@ -12,8 +12,8 @@ resources: cpu: {{lms_service_cpu_req|default('50m')}} memory: {{lms_service_mem_req|default('50Mi')}} limits: - cpu: {{lms_service_cpu_limit|default('50m')}} - memory: {{lms_service_mem_limit|default('50Mi')}} + cpu: {{lms_service_cpu_limit|default('1')}} + memory: {{lms_service_mem_limit|default('1000Mi')}} network: port: 9005 targetport: 9000 diff --git a/kubernetes/helm_charts/core/notification/values.j2 b/kubernetes/helm_charts/core/notification/values.j2 index aaa80a296..e48b75fab 100644 --- a/kubernetes/helm_charts/core/notification/values.j2 +++ b/kubernetes/helm_charts/core/notification/values.j2 @@ -12,8 +12,8 @@ resources: cpu: {{notification_service_cpu_req|default('50m')}} memory: {{notification_service_mem_req|default('50Mi')}} limits: - cpu: {{notification_service_cpu_limit|default('50m')}} - memory: {{notification_service_mem_limit|default('50Mi')}} + cpu: {{notification_service_cpu_limit|default('1')}} + memory: {{notification_service_mem_limit|default('500Mi')}} network: port: 9012 targetport: 9000 diff --git a/kubernetes/helm_charts/core/player/values.j2 b/kubernetes/helm_charts/core/player/values.j2 index 5d9d81888..843f9db85 100644 --- a/kubernetes/helm_charts/core/player/values.j2 +++ b/kubernetes/helm_charts/core/player/values.j2 @@ -12,8 +12,8 @@ resources: cpu: {{player_service_cpu_req|default('50m')}} memory: {{player_service_mem_req|default('50Mi')}} limits: - cpu: {{player_service_cpu_limit|default('50m')}} - memory: {{player_service_mem_limit|default('50Mi')}} + cpu: {{player_service_cpu_limit|default('1')}} + memory: {{player_service_mem_limit|default('512Mi')}} network: port: 3000 targetport: 3000 diff --git a/kubernetes/helm_charts/core/telemetry/values.j2 b/kubernetes/helm_charts/core/telemetry/values.j2 index 7b78df067..28fb12499 100644 --- a/kubernetes/helm_charts/core/telemetry/values.j2 +++ b/kubernetes/helm_charts/core/telemetry/values.j2 @@ -13,8 +13,8 @@ resources: cpu: {{telemetry_service_cpu_req|default('50m')}} memory: {{telemetry_service_mem_req|default('50Mi')}} limits: - cpu: {{telemetry_service_cpu_limit|default('50m')}} - memory: {{telemetry_service_mem_limit|default('50Mi')}} + cpu: {{telemetry_service_cpu_limit|default('1')}} + memory: {{telemetry_service_mem_limit|default('300Mi')}} network: port: 9001 targetport: 9001 diff --git a/kubernetes/helm_charts/core/userorg/values.j2 b/kubernetes/helm_charts/core/userorg/values.j2 index 6e0fbbe7e..243187bb6 100644 --- a/kubernetes/helm_charts/core/userorg/values.j2 +++ b/kubernetes/helm_charts/core/userorg/values.j2 @@ -12,8 +12,8 @@ resources: cpu: {{userorg_service_cpu_req|default('50m')}} memory: {{userorg_service_mem_req|default('50Mi')}} limits: - cpu: {{userorg_service_cpu_limit|default('50m')}} - memory: {{userorg_service_mem_limit|default('50Mi')}} + cpu: {{userorg_service_cpu_limit|default('1')}} + memory: {{userorg_service_mem_limit|default('800Mi')}} network: port: 9008 targetport: 9000 From dad70aa0731319ab216f775f7b0d1879c1eb23c7 Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Mon, 18 Nov 2019 16:52:14 +0530 Subject: [PATCH 0365/2894] fix: updating url of kong --- ansible/roles/stack-sunbird/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/stack-sunbird/defaults/main.yml b/ansible/roles/stack-sunbird/defaults/main.yml index ede358fee..7cf864a9e 100644 --- a/ansible/roles/stack-sunbird/defaults/main.yml +++ b/ansible/roles/stack-sunbird/defaults/main.yml @@ -33,7 +33,7 @@ notification_limit_cpu: 1 # This variable is not to access learner service but to call the api # learner-service:9000/org/v1/search -sunbird_learner_service_base_url: http://api-manager_kong:8000/ +sunbird_learner_service_base_url: http://kong:8000/ telemetry_replicas: 1 telemetry_reservation_memory: 300M From 72c591869e38f9f5798b669e6a61c891809962b1 Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Mon, 18 Nov 2019 17:10:40 +0530 Subject: [PATCH 0366/2894] feat: test logstash index --- kubernetes/helm_charts/logging/fluent-bit/values.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/helm_charts/logging/fluent-bit/values.j2 b/kubernetes/helm_charts/logging/fluent-bit/values.j2 index b5ad501ed..bed49d698 100755 --- a/kubernetes/helm_charts/logging/fluent-bit/values.j2 +++ b/kubernetes/helm_charts/logging/fluent-bit/values.j2 @@ -57,7 +57,7 @@ backend: # Elastic Index Name index: fluent-bit type: flb_type - logstash_prefix: fluent-bit +# logstash_prefix: fluent-bit replace_dots: "On" logstash_format: "On" time_key: "@timestamp-fb" From b5bd5bb74eec518a4ce66e6e9ebfeb41be4f7d99 Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Mon, 18 Nov 2019 17:28:44 +0530 Subject: [PATCH 0367/2894] fix: adding log-es host --- kubernetes/helm_charts/logging/fluent-bit/values.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/helm_charts/logging/fluent-bit/values.j2 b/kubernetes/helm_charts/logging/fluent-bit/values.j2 index bed49d698..3986385f8 100755 --- a/kubernetes/helm_charts/logging/fluent-bit/values.j2 +++ b/kubernetes/helm_charts/logging/fluent-bit/values.j2 @@ -52,7 +52,7 @@ backend: tls_debug: 1 shared_key: es: - host: elasticsearch-master + host: {{ log_es_host }} port: 9200 # Elastic Index Name index: fluent-bit From b9edc71119ac677485c62296031d98e4debda4a8 Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Mon, 18 Nov 2019 18:18:05 +0530 Subject: [PATCH 0368/2894] fix: _type for fluent bit and losgstash compatibilty --- kubernetes/helm_charts/logging/fluent-bit/values.j2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kubernetes/helm_charts/logging/fluent-bit/values.j2 b/kubernetes/helm_charts/logging/fluent-bit/values.j2 index 3986385f8..0543135e6 100755 --- a/kubernetes/helm_charts/logging/fluent-bit/values.j2 +++ b/kubernetes/helm_charts/logging/fluent-bit/values.j2 @@ -56,7 +56,8 @@ backend: port: 9200 # Elastic Index Name index: fluent-bit - type: flb_type +# index: flb_type + type: doc # logstash_prefix: fluent-bit replace_dots: "On" logstash_format: "On" From 49e02f87504d5a75ad31ce53b7a9c926e9ab48cb Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Mon, 18 Nov 2019 18:36:58 +0530 Subject: [PATCH 0369/2894] fix: adding json outputs --- .../helm_charts/logging/fluent-bit/values.j2 | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/kubernetes/helm_charts/logging/fluent-bit/values.j2 b/kubernetes/helm_charts/logging/fluent-bit/values.j2 index 0543135e6..2003fc322 100755 --- a/kubernetes/helm_charts/logging/fluent-bit/values.j2 +++ b/kubernetes/helm_charts/logging/fluent-bit/values.j2 @@ -121,17 +121,15 @@ parsers: ## Decode_Field_As escaped log do_next ## Decode_Field_As json log ## - json: [] - -# - name: dockerJson -# extraEntries: |- -# Time_Key time -# Time_Format %Y-%m-%dT%H:%M:%S.%L -# Time_Keep On -# Decode_Field_As escaped log do_next -# Decode_Field_As escaped_utf8 log do_next -# Decode_Field_As json log - + json: + - name: dockerJson + extraEntries: |- + Time_Key time + Time_Format %Y-%m-%dT%H:%M:%S.%L + Time_Keep On + Decode_Field_As escaped log do_next + Decode_Field_As escaped_utf8 log do_next + Decode_Field_As json log env: [] From 8423543b57898f9ad00cd3d611da17d288e8a070 Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Mon, 18 Nov 2019 20:48:19 +0530 Subject: [PATCH 0370/2894] fix: adding merge log key --- kubernetes/helm_charts/logging/fluent-bit/templates/config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/kubernetes/helm_charts/logging/fluent-bit/templates/config.yaml b/kubernetes/helm_charts/logging/fluent-bit/templates/config.yaml index 4759a45ad..349c2629c 100755 --- a/kubernetes/helm_charts/logging/fluent-bit/templates/config.yaml +++ b/kubernetes/helm_charts/logging/fluent-bit/templates/config.yaml @@ -63,6 +63,7 @@ data: Kube_Token_File {{ .Values.filter.kubeTokenFile }} {{- if .Values.filter.mergeJSONLog }} Merge_Log On + Merge_Log_Key fluentbit {{- end }} {{- if .Values.filter.mergeLogKey }} From 1770887f5f0ab8291cac4fdadd3f75ec2548c802 Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Mon, 18 Nov 2019 21:50:56 +0530 Subject: [PATCH 0371/2894] fix: updating log parsing --- kubernetes/helm_charts/logging/fluent-bit/templates/config.yaml | 1 - kubernetes/helm_charts/logging/fluent-bit/values.j2 | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/kubernetes/helm_charts/logging/fluent-bit/templates/config.yaml b/kubernetes/helm_charts/logging/fluent-bit/templates/config.yaml index 349c2629c..4759a45ad 100755 --- a/kubernetes/helm_charts/logging/fluent-bit/templates/config.yaml +++ b/kubernetes/helm_charts/logging/fluent-bit/templates/config.yaml @@ -63,7 +63,6 @@ data: Kube_Token_File {{ .Values.filter.kubeTokenFile }} {{- if .Values.filter.mergeJSONLog }} Merge_Log On - Merge_Log_Key fluentbit {{- end }} {{- if .Values.filter.mergeLogKey }} diff --git a/kubernetes/helm_charts/logging/fluent-bit/values.j2 b/kubernetes/helm_charts/logging/fluent-bit/values.j2 index 2003fc322..657cf2d03 100755 --- a/kubernetes/helm_charts/logging/fluent-bit/values.j2 +++ b/kubernetes/helm_charts/logging/fluent-bit/values.j2 @@ -61,7 +61,7 @@ backend: # logstash_prefix: fluent-bit replace_dots: "On" logstash_format: "On" - time_key: "@timestamp-fb" +# time_key: "@timestamp-fb" # Optional username credential for Elastic X-Pack access http_user: # Password for user defined in HTTP_User From 0e4868dc4c5528cbd8b166178ebfd9edad5780ab Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Mon, 18 Nov 2019 22:15:43 +0530 Subject: [PATCH 0372/2894] fix: updating json decore order --- kubernetes/helm_charts/logging/fluent-bit/values.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/helm_charts/logging/fluent-bit/values.j2 b/kubernetes/helm_charts/logging/fluent-bit/values.j2 index 657cf2d03..a713e2b1d 100755 --- a/kubernetes/helm_charts/logging/fluent-bit/values.j2 +++ b/kubernetes/helm_charts/logging/fluent-bit/values.j2 @@ -127,9 +127,9 @@ parsers: Time_Key time Time_Format %Y-%m-%dT%H:%M:%S.%L Time_Keep On + Decode_Field_As json log Decode_Field_As escaped log do_next Decode_Field_As escaped_utf8 log do_next - Decode_Field_As json log env: [] From 8fcbda1af8b745a7c8ec3ecaed2230ff8b42675c Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Mon, 18 Nov 2019 22:47:56 +0530 Subject: [PATCH 0373/2894] fix: updated envoy parsed and time key --- .../helm_charts/logging/fluent-bit/templates/config.yaml | 6 +++--- kubernetes/helm_charts/logging/fluent-bit/values.j2 | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kubernetes/helm_charts/logging/fluent-bit/templates/config.yaml b/kubernetes/helm_charts/logging/fluent-bit/templates/config.yaml index 4759a45ad..7b385c8cd 100755 --- a/kubernetes/helm_charts/logging/fluent-bit/templates/config.yaml +++ b/kubernetes/helm_charts/logging/fluent-bit/templates/config.yaml @@ -78,10 +78,10 @@ data: {{ .Values.extraEntries.filter | indent 8 }} [FILTER] Name envoyparser - Match kube.*.istio-proxy - Key_Name message + Match kube.istio-proxy.* + Key_Name log Parser envoy - Nest_under message + Reserve_Data On fluent-bit-output.conf: |- {{ if eq .Values.backend.type "test" }} [OUTPUT] diff --git a/kubernetes/helm_charts/logging/fluent-bit/values.j2 b/kubernetes/helm_charts/logging/fluent-bit/values.j2 index a713e2b1d..f81c0497a 100755 --- a/kubernetes/helm_charts/logging/fluent-bit/values.j2 +++ b/kubernetes/helm_charts/logging/fluent-bit/values.j2 @@ -61,7 +61,7 @@ backend: # logstash_prefix: fluent-bit replace_dots: "On" logstash_format: "On" -# time_key: "@timestamp-fb" + time_key: "@timestamp-fb" # Optional username credential for Elastic X-Pack access http_user: # Password for user defined in HTTP_User From a68b6870bcc8fe864106aef0fd9aaa599c3a5bcb Mon Sep 17 00:00:00 2001 From: G33tha Date: Tue, 19 Nov 2019 11:39:33 +0530 Subject: [PATCH 0374/2894] Issue #000 feat: added swarm public ip variable for istio --- kubernetes/ansible/roles/istio/templates/istio.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/kubernetes/ansible/roles/istio/templates/istio.yaml b/kubernetes/ansible/roles/istio/templates/istio.yaml index b7d065fbb..bc613f2be 100644 --- a/kubernetes/ansible/roles/istio/templates/istio.yaml +++ b/kubernetes/ansible/roles/istio/templates/istio.yaml @@ -22,3 +22,4 @@ gateways: istio-ingressgateway: sds: enabled: true + loadBalancerIP: "{{ swarm_public_lb_ip }}" From c510bf3cfc5c89296b95b11200eb913fad40d777 Mon Sep 17 00:00:00 2001 From: G33tha Date: Tue, 19 Nov 2019 11:46:39 +0530 Subject: [PATCH 0375/2894] Issue #000 feat: added ignore_errors for creating secrets --- kubernetes/ansible/bootstrap.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/kubernetes/ansible/bootstrap.yaml b/kubernetes/ansible/bootstrap.yaml index 78cd595cf..a00355730 100644 --- a/kubernetes/ansible/bootstrap.yaml +++ b/kubernetes/ansible/bootstrap.yaml @@ -21,6 +21,7 @@ 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 }} + ignore_errors: yes - name: creating the serviceaccount for tiller shell: kubectl -n kube-system create serviceaccount tiller ignore_errors: yes From b21c3f38e6f7012e50c3a7a510cacc651a1c8e2c Mon Sep 17 00:00:00 2001 From: S M Y Date: Tue, 19 Nov 2019 15:27:44 +0530 Subject: [PATCH 0376/2894] Fixing the issue of invalid issuer token for keycloak ny enabling https --- ansible/roles/keycloak-deploy/templates/standalone-ha.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/keycloak-deploy/templates/standalone-ha.xml b/ansible/roles/keycloak-deploy/templates/standalone-ha.xml index 392c23f86..1717d2795 100644 --- a/ansible/roles/keycloak-deploy/templates/standalone-ha.xml +++ b/ansible/roles/keycloak-deploy/templates/standalone-ha.xml @@ -530,7 +530,7 @@ - + From 1a66a9e66c67b1352415e2699bf6047f790738c0 Mon Sep 17 00:00:00 2001 From: S M Y Date: Tue, 19 Nov 2019 15:33:22 +0530 Subject: [PATCH 0377/2894] jenkins pipeline file changes --- pipelines/deploy/keycloak/Jenkinsfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pipelines/deploy/keycloak/Jenkinsfile b/pipelines/deploy/keycloak/Jenkinsfile index 942f97bcd..087ce5ee8 100644 --- a/pipelines/deploy/keycloak/Jenkinsfile +++ b/pipelines/deploy/keycloak/Jenkinsfile @@ -8,10 +8,9 @@ node() { String ANSI_YELLOW = "\u001B[33m" stage('checkout public repo') { + cleanWs() checkout scm - checkout([$class: 'GitSCM', branches: [[name: "${sunbird_auth_branch_or_tag}"]], - extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'sunbird-auth']], - userRemoteConfigs: [[url: 'https://github.com/project-sunbird/sunbird-auth.git']]]) + sh "git clone https://github.com/project-sunbird/sunbird-auth.git -b ${sunbird_auth_branch_or_tag}" } ansiColor('xterm') { stage('get artifact') { From b8c4eb51193ec2944709ce5b1b076422e93c06fa Mon Sep 17 00:00:00 2001 From: anmol2302 Date: Tue, 19 Nov 2019 16:56:23 +0530 Subject: [PATCH 0378/2894] Issue#SC-1497 changing shadow user scheduler job time change from 1 day to 5 mins daily --- ansible/inventory/env/group_vars/all.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/inventory/env/group_vars/all.yml b/ansible/inventory/env/group_vars/all.yml index 4f782b6e4..0512298ef 100644 --- a/ansible/inventory/env/group_vars/all.yml +++ b/ansible/inventory/env/group_vars/all.yml @@ -679,7 +679,7 @@ kafka_assessment_topic: "{{env_name}}.telemetry.assess" sunbird_portal_azure_storage_account: "{{sunbird_azure_storage_account}}" sunbird_portal_azure_storage_key: "{{sunbird_azure_storage_key}}" sunbird_device_api: "{{proto}}://{{ proxy_server_name }}/api/" -sunbird_quartz_shadow_user_migration_timer: "0 0 1 1/1 * ? *" +sunbird_quartz_shadow_user_migration_timer: "0 0/5 * 1/1 * ? *" # Learning-Service lp_cassandra_connection: "{{groups['cassandra']|join(':9042,')}}:9042" From 9da568975ef46bc8318b82e82c09cf7debb4c0c6 Mon Sep 17 00:00:00 2001 From: G33tha Date: Wed, 20 Nov 2019 17:29:19 +0530 Subject: [PATCH 0379/2894] Issue #000 feat: updated helm charts --- .../templates/{deployment-ingress.yml => deployment-ingress.yaml} | 0 .../{private-gateway-ingress.yml => private-gateway-ingress.yaml} | 0 ...ualservice-ingress.yml => private-virtualservice-ingress.yaml} | 0 .../templates/{service-ingress.yml => service-ingress.yaml} | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename kubernetes/helm_charts/networkconfig/templates/{deployment-ingress.yml => deployment-ingress.yaml} (100%) rename kubernetes/helm_charts/networkconfig/templates/{private-gateway-ingress.yml => private-gateway-ingress.yaml} (100%) rename kubernetes/helm_charts/networkconfig/templates/{private-virtualservice-ingress.yml => private-virtualservice-ingress.yaml} (100%) rename kubernetes/helm_charts/networkconfig/templates/{service-ingress.yml => service-ingress.yaml} (100%) diff --git a/kubernetes/helm_charts/networkconfig/templates/deployment-ingress.yml b/kubernetes/helm_charts/networkconfig/templates/deployment-ingress.yaml similarity index 100% rename from kubernetes/helm_charts/networkconfig/templates/deployment-ingress.yml rename to kubernetes/helm_charts/networkconfig/templates/deployment-ingress.yaml diff --git a/kubernetes/helm_charts/networkconfig/templates/private-gateway-ingress.yml b/kubernetes/helm_charts/networkconfig/templates/private-gateway-ingress.yaml similarity index 100% rename from kubernetes/helm_charts/networkconfig/templates/private-gateway-ingress.yml rename to kubernetes/helm_charts/networkconfig/templates/private-gateway-ingress.yaml diff --git a/kubernetes/helm_charts/networkconfig/templates/private-virtualservice-ingress.yml b/kubernetes/helm_charts/networkconfig/templates/private-virtualservice-ingress.yaml similarity index 100% rename from kubernetes/helm_charts/networkconfig/templates/private-virtualservice-ingress.yml rename to kubernetes/helm_charts/networkconfig/templates/private-virtualservice-ingress.yaml diff --git a/kubernetes/helm_charts/networkconfig/templates/service-ingress.yml b/kubernetes/helm_charts/networkconfig/templates/service-ingress.yaml similarity index 100% rename from kubernetes/helm_charts/networkconfig/templates/service-ingress.yml rename to kubernetes/helm_charts/networkconfig/templates/service-ingress.yaml From f91d9ec5350b6a4ea587488bd14191ca2e333a12 Mon Sep 17 00:00:00 2001 From: G33tha Date: Wed, 20 Nov 2019 18:25:48 +0530 Subject: [PATCH 0380/2894] Issue #000 feat: updated helm charts --- kubernetes/ansible/roles/istio/templates/istio.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/ansible/roles/istio/templates/istio.yaml b/kubernetes/ansible/roles/istio/templates/istio.yaml index bc613f2be..116390fdc 100644 --- a/kubernetes/ansible/roles/istio/templates/istio.yaml +++ b/kubernetes/ansible/roles/istio/templates/istio.yaml @@ -22,4 +22,4 @@ gateways: istio-ingressgateway: sds: enabled: true - loadBalancerIP: "{{ swarm_public_lb_ip }}" + type: NodePort From a0fa87301bc3b3dd1cf353a579efc7b65116b0a1 Mon Sep 17 00:00:00 2001 From: G33tha Date: Wed, 20 Nov 2019 18:30:36 +0530 Subject: [PATCH 0381/2894] Issue #000 feat: updated helm charts --- kubernetes/helm_charts/core/content/values.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/helm_charts/core/content/values.j2 b/kubernetes/helm_charts/core/content/values.j2 index 4743e1a79..f344c7910 100644 --- a/kubernetes/helm_charts/core/content/values.j2 +++ b/kubernetes/helm_charts/core/content/values.j2 @@ -5,7 +5,7 @@ imagepullsecrets: {{ imagepullsecrets }} dockerhub: {{ dockerhub }} replicaCount: {{replicacount|default(1)}} -repository: {{content_repository|default('content-service')}} +repository: {{content_repository|default('knowledge-mw-service')}} image_tag: {{ image_tag }} resources: requests: From c77e970fcd6ab1ad6572e139c9c75456d6ef8a91 Mon Sep 17 00:00:00 2001 From: G33tha Date: Wed, 20 Nov 2019 18:38:55 +0530 Subject: [PATCH 0382/2894] Issue #000 feat: disable cdn --- kubernetes/ansible/roles/deploy-player/tasks/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kubernetes/ansible/roles/deploy-player/tasks/main.yml b/kubernetes/ansible/roles/deploy-player/tasks/main.yml index 07fca5415..6cd0d3dd8 100644 --- a/kubernetes/ansible/roles/deploy-player/tasks/main.yml +++ b/kubernetes/ansible/roles/deploy-player/tasks/main.yml @@ -10,11 +10,13 @@ - name: copy new index file copy: src="{{cdn_file_path}}" dest="/var/lib/jenkins/player_config/index_cdn.ejs" mode=0644 when: sunbird_portal_cdn_url is not none and cdn_file_path is not none + ignore_errors: true - name: remove whitespaces in index file shell: 'sed -i s/\\s\\+$//e /var/lib/jenkins/player_config/index_cdn.ejs' when: sunbird_portal_cdn_url is not none and cdn_file_path is not none - + ignore_errors: true + - name: Remove the existing CDN config shell: "kubectl delete configmap player-cdn-config --namespace={{namespace}}" ignore_errors: true From dec92aeb61b411d15d42eae4a7135506ff2897f5 Mon Sep 17 00:00:00 2001 From: G33tha Date: Wed, 20 Nov 2019 18:43:01 +0530 Subject: [PATCH 0383/2894] Issue #000 feat: disable cdn --- kubernetes/ansible/roles/deploy-player/tasks/main.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/kubernetes/ansible/roles/deploy-player/tasks/main.yml b/kubernetes/ansible/roles/deploy-player/tasks/main.yml index 6cd0d3dd8..003528cd5 100644 --- a/kubernetes/ansible/roles/deploy-player/tasks/main.yml +++ b/kubernetes/ansible/roles/deploy-player/tasks/main.yml @@ -9,21 +9,19 @@ - name: copy new index file copy: src="{{cdn_file_path}}" dest="/var/lib/jenkins/player_config/index_cdn.ejs" mode=0644 - when: sunbird_portal_cdn_url is not none and cdn_file_path is not none - ignore_errors: true + when: sunbird_portal_cdn_url is undefined and cdn_file_path is undefined - name: remove whitespaces in index file shell: 'sed -i s/\\s\\+$//e /var/lib/jenkins/player_config/index_cdn.ejs' - when: sunbird_portal_cdn_url is not none and cdn_file_path is not none - ignore_errors: true - + when: sunbird_portal_cdn_url is undefined and cdn_file_path is undefined + - name: Remove the existing CDN config shell: "kubectl delete configmap player-cdn-config --namespace={{namespace}}" ignore_errors: true - name: Create player-cdn configmap shell: "kubectl create configmap player-cdn-config --from-file=/var/lib/jenkins/player_config/index_cdn.ejs --namespace={{namespace}}" - when: sunbird_portal_cdn_url is not none and cdn_file_path is not none + when: sunbird_portal_cdn_url is undefined and cdn_file_path is undefined - name: rename template template: From 54ec26672697c1a01f75d57b56ca5ea452fbc602 Mon Sep 17 00:00:00 2001 From: G33tha Date: Thu, 21 Nov 2019 12:49:53 +0530 Subject: [PATCH 0384/2894] Update istio.yaml --- kubernetes/ansible/roles/istio/templates/istio.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/ansible/roles/istio/templates/istio.yaml b/kubernetes/ansible/roles/istio/templates/istio.yaml index 116390fdc..bc613f2be 100644 --- a/kubernetes/ansible/roles/istio/templates/istio.yaml +++ b/kubernetes/ansible/roles/istio/templates/istio.yaml @@ -22,4 +22,4 @@ gateways: istio-ingressgateway: sds: enabled: true - type: NodePort + loadBalancerIP: "{{ swarm_public_lb_ip }}" From 8b2b196961f896ac7dbdcbcd8ae6226720405927 Mon Sep 17 00:00:00 2001 From: S M Y Date: Thu, 21 Nov 2019 13:44:53 +0530 Subject: [PATCH 0385/2894] Desktop app changes for proxy and portal to download the offline installer --- ansible/roles/stack-sunbird/defaults/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/ansible/roles/stack-sunbird/defaults/main.yml b/ansible/roles/stack-sunbird/defaults/main.yml index 7cf864a9e..eb6eb4f21 100644 --- a/ansible/roles/stack-sunbird/defaults/main.yml +++ b/ansible/roles/stack-sunbird/defaults/main.yml @@ -132,3 +132,4 @@ sunbird_portal_player_cdn_enabled: sunbird_portal_preview_cdn_url: cdn_file_path: sunbird_portal_cdn_blob_url: +desktop_app_storage_url: "https://{{sunbird_offline_azure_storage_account}}.blob.core.windows.net/{{offline_installer_container_name}}" From cec7cbc0ea672ac3329956bb8a0f5037a450b2d5 Mon Sep 17 00:00:00 2001 From: S M Y Date: Thu, 21 Nov 2019 15:02:14 +0530 Subject: [PATCH 0386/2894] master FTL --- ansible/artifacts/sunbird/login/master.ftl | 1 + 1 file changed, 1 insertion(+) create mode 100644 ansible/artifacts/sunbird/login/master.ftl diff --git a/ansible/artifacts/sunbird/login/master.ftl b/ansible/artifacts/sunbird/login/master.ftl new file mode 100644 index 000000000..85e7c40eb --- /dev/null +++ b/ansible/artifacts/sunbird/login/master.ftl @@ -0,0 +1 @@ +jdbvfkdbvdfbc From 0156ad3a8e2f1d6479a866b91f7573d9cece87d1 Mon Sep 17 00:00:00 2001 From: S M Y Date: Thu, 21 Nov 2019 17:07:17 +0530 Subject: [PATCH 0387/2894] PSQL module changes --- ansible/roles/keycloak-deploy/templates/module.xml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/keycloak-deploy/templates/module.xml.j2 b/ansible/roles/keycloak-deploy/templates/module.xml.j2 index bcfe36a40..fc3c43c66 100644 --- a/ansible/roles/keycloak-deploy/templates/module.xml.j2 +++ b/ansible/roles/keycloak-deploy/templates/module.xml.j2 @@ -1,5 +1,5 @@ - + From 7fd12e01c9c7e4e660412edb2f7188bd28a90ea3 Mon Sep 17 00:00:00 2001 From: S M Y Date: Thu, 21 Nov 2019 17:50:36 +0530 Subject: [PATCH 0388/2894] Remove monit detection and disabling logic from playook level --- ansible/keycloak.yml | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/ansible/keycloak.yml b/ansible/keycloak.yml index a54b953dc..004b1fb32 100644 --- a/ansible/keycloak.yml +++ b/ansible/keycloak.yml @@ -3,31 +3,8 @@ become: true vars_files: - ['{{ inventory_dir }}/secrets.yml', 'secrets/{{ env }}.yml'] - # --tags provision/deployment will trigger respective roles - # --tags bootstrap will trigger user/realm creation - pre_tasks: - - name: Get the list of all the services running in our OS - become: yes - service_facts: - - - name: Stop the monit to ensure that it doesn't start keycloak - service: name=monit state=stopped - become: yes - when: ansible_facts.services.monit is defined - roles: - {role: openjdk, tags: provision} - {role: keycloak-provision, tags: provision} - keycloak-deploy - {role: monit, monit_checks: ['keycloak'], tags: deploy} - - post_tasks: - - name: get the list of all services in the system - become: yes - service_facts: - - - name: After succesful migration and staring of keycloak, start back monit if installed - service: name=monit state=started - become: yes - when: ansible_facts.services.monit is defined - From fe08fcc2bd266f62ce7bee347ba1bca6fbf03afb Mon Sep 17 00:00:00 2001 From: S M Y Date: Thu, 21 Nov 2019 17:51:07 +0530 Subject: [PATCH 0389/2894] Adding monit start and stop without effecting keycloak functionality --- ansible/roles/keycloak-deploy/tasks/deploy.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ansible/roles/keycloak-deploy/tasks/deploy.yml b/ansible/roles/keycloak-deploy/tasks/deploy.yml index ca246942f..957746b19 100644 --- a/ansible/roles/keycloak-deploy/tasks/deploy.yml +++ b/ansible/roles/keycloak-deploy/tasks/deploy.yml @@ -1,3 +1,12 @@ +- name: Get the list of all the services running in our OS + become: yes + service_facts: + +- name: Stop the monit to ensure that it doesn't start keycloak + service: name=monit state=stopped + become: yes + when: ansible_facts.services.monit is defined + - name: Status service become: true command: /etc/init.d/keycloak status @@ -177,3 +186,12 @@ command: /etc/init.d/keycloak start poll: 5 async: 5 + +- name: get the list of all services in the system + become: yes + service_facts: + +- name: After succesful migration and staring of keycloak, start back monit if installed + service: name=monit state=started + become: yes + when: ansible_facts.services.monit is defined From 7acca85bb96bb0f4d38f195c5420402efc3a233c Mon Sep 17 00:00:00 2001 From: S M Y Date: Thu, 21 Nov 2019 18:06:23 +0530 Subject: [PATCH 0390/2894] new themes changes --- ansible/artifacts/sunbird/login/login.ftl | 7 ++++--- ansible/artifacts/sunbird/login/master.ftl | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) delete mode 100644 ansible/artifacts/sunbird/login/master.ftl diff --git a/ansible/artifacts/sunbird/login/login.ftl b/ansible/artifacts/sunbird/login/login.ftl index dd7f0ccf8..ebc500b4e 100644 --- a/ansible/artifacts/sunbird/login/login.ftl +++ b/ansible/artifacts/sunbird/login/login.ftl @@ -39,9 +39,10 @@ <#if usernameEditDisabled??> - + <#-- TODO: need to find alternative for prepopulating username --> + <#else> - +
@@ -57,7 +58,7 @@ ${msg("placeholderForPassword")}
- + ${msg("inCorrectPasswordError")}
diff --git a/ansible/artifacts/sunbird/login/master.ftl b/ansible/artifacts/sunbird/login/master.ftl deleted file mode 100644 index 85e7c40eb..000000000 --- a/ansible/artifacts/sunbird/login/master.ftl +++ /dev/null @@ -1 +0,0 @@ -jdbvfkdbvdfbc From d5b567caa66fc853851547ff09f0d1ecb2d4c259 Mon Sep 17 00:00:00 2001 From: S M Y Date: Thu, 21 Nov 2019 18:18:57 +0530 Subject: [PATCH 0391/2894] Revert old commits --- deploy/jenkins/jenkins-plugins-setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/jenkins/jenkins-plugins-setup.sh b/deploy/jenkins/jenkins-plugins-setup.sh index ee6d0744f..85368199d 100755 --- a/deploy/jenkins/jenkins-plugins-setup.sh +++ b/deploy/jenkins/jenkins-plugins-setup.sh @@ -9,8 +9,8 @@ read -sp 'Jenkins admin Password: ' password if [[ ! -d /var/lib/jenkins/.m2 ]]; then echo -e "\n\e[0;32m${bold}Downloading and copying m2 directory to Jenkins ${normal}" -wget https://sunbirdpublic.blob.core.windows.net/installation/m2_new.zip -unzip m2_new.zip +wget https://sunbirdpublic.blob.core.windows.net/installation/m2_updated.zip +unzip m2_updated.zip mv .m2 /var/lib/jenkins chown -R jenkins:jenkins /var/lib/jenkins/.m2 fi From f56bf58027b36bfb0e96e939b1f6ce996066acc3 Mon Sep 17 00:00:00 2001 From: Mahesh Kumar Gangula Date: Fri, 22 Nov 2019 15:23:06 +0530 Subject: [PATCH 0392/2894] Issue #SC-1423 feat: kong-api rename content_service to knowledge_mw_service --- ansible/roles/kong-api/defaults/main.yml | 180 +++++++++++------------ 1 file changed, 90 insertions(+), 90 deletions(-) diff --git a/ansible/roles/kong-api/defaults/main.yml b/ansible/roles/kong-api/defaults/main.yml index 8395295c9..c7fc7220f 100644 --- a/ansible/roles/kong-api/defaults/main.yml +++ b/ansible/roles/kong-api/defaults/main.yml @@ -32,7 +32,7 @@ large_request_size_limit: 100 # Default service prefixes private_content_prefix: /private/content -content_service_prefix: /content +content_prefix: /content course_service_prefix: /course user_service_prefix: /user data_service_prefix: /data @@ -59,7 +59,7 @@ cert_registry_service_prefix: /certreg desktop_app_prefix: /desktop # Service URLs -content_service_url: "http://knowledge-mw-service:5000" +knowledge_mw_service_url: "http://knowledge-mw-service:5000" learning_service_url: "http://learner-service:9000" vm_learning_service_url: "http://{{learningservice_ip}}:8080/learning-service" telemetry_service_url: "http://telemetry-service:9001" @@ -118,8 +118,8 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" - name: createContent - uris: "{{ content_service_prefix }}/v1/create" - upstream_url: "{{ content_service_url }}/v1/content/create" + uris: "{{ content_prefix }}/v1/create" + upstream_url: "{{ knowledge_mw_service_url }}/v1/content/create" strip_uri: true plugins: - name: jwt @@ -134,8 +134,8 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" - name: searchContent - uris: "{{ content_service_prefix }}/v1/search" - upstream_url: "{{ content_service_url }}/v1/content/search" + uris: "{{ content_prefix }}/v1/search" + upstream_url: "{{ knowledge_mw_service_url }}/v1/content/search" strip_uri: true plugins: - name: cors @@ -147,8 +147,8 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" - name: updateContent - uris: "{{ content_service_prefix }}/v1/update" - upstream_url: "{{ content_service_url }}/v1/content/update" + uris: "{{ content_prefix }}/v1/update" + upstream_url: "{{ knowledge_mw_service_url }}/v1/content/update" strip_uri: true plugins: - name: jwt @@ -163,8 +163,8 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" - name: readContent - uris: "{{ content_service_prefix }}/v1/read" - upstream_url: "{{ content_service_url }}/v1/content/read" + uris: "{{ content_prefix }}/v1/read" + upstream_url: "{{ knowledge_mw_service_url }}/v1/content/read" strip_uri: true plugins: - name: cors @@ -176,8 +176,8 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" - name: submitContentForReview - uris: "{{ content_service_prefix }}/v1/review" - upstream_url: "{{ content_service_url }}/v1/content/review" + uris: "{{ content_prefix }}/v1/review" + upstream_url: "{{ knowledge_mw_service_url }}/v1/content/review" strip_uri: true plugins: - name: jwt @@ -192,8 +192,8 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" - name: publishContent - uris: "{{ content_service_prefix }}/v1/publish" - upstream_url: "{{ content_service_url }}/v1/content/publish" + uris: "{{ content_prefix }}/v1/publish" + upstream_url: "{{ knowledge_mw_service_url }}/v1/content/publish" strip_uri: true plugins: - name: jwt @@ -208,8 +208,8 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" - name: uploadContent - uris: "{{ content_service_prefix }}/v1/upload" - upstream_url: "{{ content_service_url }}/v1/content/upload" + uris: "{{ content_prefix }}/v1/upload" + upstream_url: "{{ knowledge_mw_service_url }}/v1/content/upload" strip_uri: true plugins: - name: jwt @@ -224,8 +224,8 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ large_request_size_limit }}" - name: retireContent - uris: "{{ content_service_prefix }}/v1/retire" - upstream_url: "{{ content_service_url }}/v1/content/retire" + uris: "{{ content_prefix }}/v1/retire" + upstream_url: "{{ knowledge_mw_service_url }}/v1/content/retire" strip_uri: true plugins: - name: jwt @@ -241,7 +241,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: createCourse uris: "{{ course_service_prefix }}/v1/create" - upstream_url: "{{ content_service_url }}/v1/course/create" + upstream_url: "{{ knowledge_mw_service_url }}/v1/course/create" strip_uri: true plugins: - name: jwt @@ -257,7 +257,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: searchCourse uris: "{{ course_service_prefix }}/v1/search" - upstream_url: "{{ content_service_url }}/v1/course/search" + upstream_url: "{{ knowledge_mw_service_url }}/v1/course/search" strip_uri: true plugins: - name: jwt @@ -273,7 +273,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: updateCourse uris: "{{ course_service_prefix }}/v1/update" - upstream_url: "{{ content_service_url }}/v1/course/update" + upstream_url: "{{ knowledge_mw_service_url }}/v1/course/update" strip_uri: true plugins: - name: jwt @@ -289,7 +289,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: readCourse uris: "{{ course_service_prefix }}/v1/read" - upstream_url: "{{ content_service_url }}/v1/course/read" + upstream_url: "{{ knowledge_mw_service_url }}/v1/course/read" strip_uri: true plugins: - name: jwt @@ -305,7 +305,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: submitCourseForReview uris: "{{ course_service_prefix }}/v1/review" - upstream_url: "{{ content_service_url }}/v1/course/review" + upstream_url: "{{ knowledge_mw_service_url }}/v1/course/review" strip_uri: true plugins: - name: jwt @@ -321,7 +321,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: publishCourse uris: "{{ course_service_prefix }}/v1/publish" - upstream_url: "{{ content_service_url }}/v1/course/publish" + upstream_url: "{{ knowledge_mw_service_url }}/v1/course/publish" strip_uri: true plugins: - name: jwt @@ -337,7 +337,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: retireCourse uris: "{{ course_service_prefix }}/v1/retire" - upstream_url: "{{ content_service_url }}/v1/course/retire" + upstream_url: "{{ knowledge_mw_service_url }}/v1/course/retire" strip_uri: true plugins: - name: jwt @@ -353,7 +353,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: getCourseHierarchy uris: "{{ course_service_prefix }}/v1/hierarchy" - upstream_url: "{{ content_service_url }}/v1/course/hierarchy" + upstream_url: "{{ knowledge_mw_service_url }}/v1/course/hierarchy" strip_uri: true plugins: - name: cors @@ -1064,7 +1064,7 @@ kong_apis: - name: compositeSearch uris: "{{ composite_service_prefix }}/v1/search" - upstream_url: "{{ content_service_url }}/v1/search" + upstream_url: "{{ knowledge_mw_service_url }}/v1/search" strip_uri: true plugins: - name: jwt @@ -1080,7 +1080,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: listTerms uris: "{{ meta_service_prefix }}/v1/terms/list" - upstream_url: "{{ content_service_url }}/v1/terms/list" + upstream_url: "{{ knowledge_mw_service_url }}/v1/terms/list" strip_uri: true plugins: - name: jwt @@ -1096,7 +1096,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: listResourceBundles uris: "{{ meta_service_prefix }}/v1/resourcebundles/list" - upstream_url: "{{ content_service_url }}/v1/resourcebundles/list" + upstream_url: "{{ knowledge_mw_service_url }}/v1/resourcebundles/list" strip_uri: true plugins: - name: jwt @@ -1112,7 +1112,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: listOrdinals uris: "{{ meta_service_prefix }}/v1/ordinals/list" - upstream_url: "{{ content_service_url }}/v1/ordinals/list" + upstream_url: "{{ knowledge_mw_service_url }}/v1/ordinals/list" strip_uri: true plugins: - name: jwt @@ -1143,8 +1143,8 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" - name: flagContent - uris: "{{ content_service_prefix }}/v1/flag" - upstream_url: "{{ content_service_url }}/v1/content/flag" + uris: "{{ content_prefix }}/v1/flag" + upstream_url: "{{ knowledge_mw_service_url }}/v1/content/flag" strip_uri: true plugins: - name: jwt @@ -1159,8 +1159,8 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" - name: acceptContentFlag - uris: "{{ content_service_prefix }}/v1/flag/accept" - upstream_url: "{{ content_service_url }}/v1/content/flag/accept" + uris: "{{ content_prefix }}/v1/flag/accept" + upstream_url: "{{ knowledge_mw_service_url }}/v1/content/flag/accept" strip_uri: true plugins: - name: jwt @@ -1175,8 +1175,8 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" - name: rejectContentFlag - uris: "{{ content_service_prefix }}/v1/flag/reject" - upstream_url: "{{ content_service_url }}/v1/content/flag/reject" + uris: "{{ content_prefix }}/v1/flag/reject" + upstream_url: "{{ knowledge_mw_service_url }}/v1/content/flag/reject" strip_uri: true plugins: - name: jwt @@ -1527,7 +1527,7 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" - name: uploadMedia - uris: "{{ content_service_prefix }}/v1/media/upload" + uris: "{{ content_prefix }}/v1/media/upload" upstream_url: "{{ learning_service_url }}/v1/file/upload" strip_uri: true plugins: @@ -1607,8 +1607,8 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" - name: getContentUploadUrl - uris: "{{ content_service_prefix }}/v1/upload/url/read" - upstream_url: "{{ content_service_url }}/v1/content/upload/url" + uris: "{{ content_prefix }}/v1/upload/url/read" + upstream_url: "{{ knowledge_mw_service_url }}/v1/content/upload/url" strip_uri: true plugins: - name: jwt @@ -1623,8 +1623,8 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" - name: rejectContent - uris: "{{ content_service_prefix }}/v1/reject" - upstream_url: "{{ content_service_url }}/v1/content/reject" + uris: "{{ content_prefix }}/v1/reject" + upstream_url: "{{ knowledge_mw_service_url }}/v1/content/reject" strip_uri: true plugins: - name: jwt @@ -2409,7 +2409,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: generateDialcodes uris: "{{ dialcode_service_prefix }}/v1/generate" - upstream_url: "{{ content_service_url }}/v1/dialcode/generate" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dialcode/generate" strip_uri: true plugins: - name: jwt @@ -2425,7 +2425,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: readDialcode uris: "{{ dialcode_service_prefix }}/v1/read" - upstream_url: "{{ content_service_url }}/v1/dialcode/read" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dialcode/read" strip_uri: true plugins: - name: jwt @@ -2441,7 +2441,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: updateDialcode uris: "{{ dialcode_service_prefix }}/v1/update" - upstream_url: "{{ content_service_url }}/v1/dialcode/update" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dialcode/update" strip_uri: true plugins: - name: jwt @@ -2457,7 +2457,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: listDialcodes uris: "{{ dialcode_service_prefix }}/v1/list" - upstream_url: "{{ content_service_url }}/v1/dialcode/list" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dialcode/list" strip_uri: true plugins: - name: jwt @@ -2473,7 +2473,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: publishDialcode uris: "{{ dialcode_service_prefix }}/v1/publish" - upstream_url: "{{ content_service_url }}/v1/dialcode/publish" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dialcode/publish" strip_uri: true plugins: - name: jwt @@ -2489,7 +2489,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: searchDialcodes uris: "{{ dialcode_service_prefix }}/v1/search" - upstream_url: "{{ content_service_url }}/v1/dialcode/search" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dialcode/search" strip_uri: true plugins: - name: jwt @@ -2505,7 +2505,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: qrCodeBatchProcessStatus uris: "{{ dialcode_service_prefix }}/v1/process/status" - upstream_url: "{{ content_service_url }}/v1/dialcode/process/status" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dialcode/process/status" strip_uri: true plugins: - name: jwt @@ -2521,7 +2521,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: qrCodeBatchProcessRetry uris: "{{ dialcode_service_prefix }}/v1/process/retry" - upstream_url: "{{ content_service_url }}/v1/dialcode/process/retry" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dialcode/process/retry" strip_uri: true plugins: - name: jwt @@ -2537,7 +2537,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: createPublisher uris: "{{ dialcode_service_prefix }}/v1/publisher/create" - upstream_url: "{{ content_service_url }}/v1/dialcode/publisher/create" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dialcode/publisher/create" strip_uri: true plugins: - name: jwt @@ -2553,7 +2553,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: updatePublisher uris: "{{ dialcode_service_prefix }}/v1/publisher/update" - upstream_url: "{{ content_service_url }}/v1/dialcode/publisher/update" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dialcode/publisher/update" strip_uri: true plugins: - name: jwt @@ -2569,7 +2569,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: readPublisher uris: "{{ dialcode_service_prefix }}/v1/publisher/read" - upstream_url: "{{ content_service_url }}/v1/dialcode/publisher/read" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dialcode/publisher/read" strip_uri: true plugins: - name: jwt @@ -2585,7 +2585,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: linkDialcodeContent uris: "{{ dialcode_service_prefix }}/v1/content/link" - upstream_url: "{{ content_service_url }}/v1/dialcode/content/link" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dialcode/content/link" strip_uri: true plugins: - name: jwt @@ -2601,7 +2601,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: readChannel uris: "{{ channel_service_prefix }}/v1/read" - upstream_url: "{{ content_service_url }}/v1/channel/read" + upstream_url: "{{ knowledge_mw_service_url }}/v1/channel/read" strip_uri: true plugins: - name: cors @@ -2614,7 +2614,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: listChannel uris: "{{ channel_service_prefix }}/v1/list" - upstream_url: "{{ content_service_url }}/v1/channel/list" + upstream_url: "{{ knowledge_mw_service_url }}/v1/channel/list" strip_uri: true plugins: - name: jwt @@ -2630,7 +2630,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: searchChannel uris: "{{ channel_service_prefix }}/v1/search" - upstream_url: "{{ content_service_url }}/v1/channel/search" + upstream_url: "{{ knowledge_mw_service_url }}/v1/channel/search" strip_uri: true plugins: - name: jwt @@ -2646,7 +2646,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: createChannel uris: "{{ channel_service_prefix }}/v1/create" - upstream_url: "{{ content_service_url }}/v1/channel/create" + upstream_url: "{{ knowledge_mw_service_url }}/v1/channel/create" strip_uri: true plugins: - name: jwt @@ -2662,7 +2662,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: updateChannel uris: "{{ channel_service_prefix }}/v1/update" - upstream_url: "{{ content_service_url }}/v1/channel/update" + upstream_url: "{{ knowledge_mw_service_url }}/v1/channel/update" strip_uri: true plugins: - name: jwt @@ -2678,7 +2678,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: readFramework uris: "{{ framework_service_prefix }}/v1/read" - upstream_url: "{{ content_service_url }}/v1/framework/read" + upstream_url: "{{ knowledge_mw_service_url }}/v1/framework/read" strip_uri: true plugins: - name: cors @@ -2691,7 +2691,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: listFramework uris: "{{ framework_service_prefix }}/v1/list" - upstream_url: "{{ content_service_url }}/v1/framework/list" + upstream_url: "{{ knowledge_mw_service_url }}/v1/framework/list" strip_uri: true plugins: - name: jwt @@ -2707,7 +2707,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: createFramework uris: "{{ framework_service_prefix }}/v1/create" - upstream_url: "{{ content_service_url }}/v1/framework/create" + upstream_url: "{{ knowledge_mw_service_url }}/v1/framework/create" strip_uri: true plugins: - name: jwt @@ -2723,7 +2723,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: updateFramework uris: "{{ framework_service_prefix }}/v1/update" - upstream_url: "{{ content_service_url }}/v1/framework/update" + upstream_url: "{{ knowledge_mw_service_url }}/v1/framework/update" strip_uri: true plugins: - name: jwt @@ -2739,7 +2739,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: copyFramework uris: "{{ framework_service_prefix }}/v1/copy" - upstream_url: "{{ content_service_url }}/v1/framework/copy" + upstream_url: "{{ knowledge_mw_service_url }}/v1/framework/copy" strip_uri: true plugins: - name: jwt @@ -2755,7 +2755,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: readFrameworkTerm uris: "{{ framework_service_prefix }}/v1/term/read" - upstream_url: "{{ content_service_url }}/v1/framework/term/read" + upstream_url: "{{ knowledge_mw_service_url }}/v1/framework/term/read" strip_uri: true plugins: - name: jwt @@ -2771,7 +2771,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: searchFrameworkTerm uris: "{{ framework_service_prefix }}/v1/term/search" - upstream_url: "{{ content_service_url }}/v1/framework/term/search" + upstream_url: "{{ knowledge_mw_service_url }}/v1/framework/term/search" strip_uri: true plugins: - name: jwt @@ -2787,7 +2787,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: createFrameworkTerm uris: "{{ framework_service_prefix }}/v1/term/create" - upstream_url: "{{ content_service_url }}/v1/framework/term/create" + upstream_url: "{{ knowledge_mw_service_url }}/v1/framework/term/create" strip_uri: true plugins: - name: jwt @@ -2803,7 +2803,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: updateFrameworkTerm uris: "{{ framework_service_prefix }}/v1/term/update" - upstream_url: "{{ content_service_url }}/v1/framework/term/update" + upstream_url: "{{ knowledge_mw_service_url }}/v1/framework/term/update" strip_uri: true plugins: - name: jwt @@ -2819,7 +2819,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: readFrameworkCategory uris: "{{ framework_service_prefix }}/v1/category/read" - upstream_url: "{{ content_service_url }}/v1/framework/category/read" + upstream_url: "{{ knowledge_mw_service_url }}/v1/framework/category/read" strip_uri: true plugins: - name: jwt @@ -2835,7 +2835,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: searchFrameworkCategory uris: "{{ framework_service_prefix }}/v1/category/search" - upstream_url: "{{ content_service_url }}/v1/framework/category/search" + upstream_url: "{{ knowledge_mw_service_url }}/v1/framework/category/search" strip_uri: true plugins: - name: jwt @@ -2851,7 +2851,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: createFrameworkCategory uris: "{{ framework_service_prefix }}/v1/category/create" - upstream_url: "{{ content_service_url }}/v1/framework/category/create" + upstream_url: "{{ knowledge_mw_service_url }}/v1/framework/category/create" strip_uri: true plugins: - name: jwt @@ -2867,7 +2867,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: updateFrameworkCategory uris: "{{ framework_service_prefix }}/v1/category/update" - upstream_url: "{{ content_service_url }}/v1/framework/category/update" + upstream_url: "{{ knowledge_mw_service_url }}/v1/framework/category/update" strip_uri: true plugins: - name: jwt @@ -2883,7 +2883,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: updateCourseHierarchy uris: '{{ course_service_prefix }}/v1/hierarchy/update' - upstream_url: '{{ content_service_url }}/v1/course/hierarchy/update' + upstream_url: '{{ knowledge_mw_service_url }}/v1/course/hierarchy/update' strip_uri: true plugins: - name: jwt @@ -2899,7 +2899,7 @@ kong_apis: config.allowed_payload_size: '{{ small_request_size_limit }}' - name: submitDatasetRequest uris: "{{ data_service_prefix }}/v1/dataset/request/submit" - upstream_url: "{{ content_service_url }}/v1/dataset/request/submit" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dataset/request/submit" strip_uri: true plugins: - name: jwt @@ -2915,7 +2915,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: listDatasetRequest uris: "{{ data_service_prefix }}/v1/dataset/request/list" - upstream_url: "{{ content_service_url }}/v1/dataset/request/list" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dataset/request/list" strip_uri: true plugins: - name: jwt @@ -2931,7 +2931,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: readDatasetRequest uris: "{{ data_service_prefix }}/v1/dataset/request/read" - upstream_url: "{{ content_service_url }}/v1/dataset/request/read" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dataset/request/read" strip_uri: true plugins: - name: jwt @@ -2947,7 +2947,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: channelDatasetRequest uris: "{{ data_service_prefix }}/v1/dataset/request" - upstream_url: "{{ content_service_url }}/v1/dataset/request" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dataset/request" strip_uri: true plugins: - name: jwt @@ -3312,8 +3312,8 @@ kong_apis: config.allowed_payload_size: "{{ medium_request_size_limit }}" config.allowed_payload_size: "{{ medium_request_size_limit }}" - name: copyContent - uris: "{{ content_service_prefix }}/v1/copy" - upstream_url: "{{ content_service_url }}/v1/content/copy" + uris: "{{ content_prefix }}/v1/copy" + upstream_url: "{{ knowledge_mw_service_url }}/v1/content/copy" strip_uri: true plugins: - name: jwt @@ -3329,8 +3329,8 @@ kong_apis: config.allowed_payload_size: "{{ medium_request_size_limit }}" config.allowed_payload_size: "{{ medium_request_size_limit }}" - name: fetchURLMetaInformation - uris: "{{ content_service_prefix }}/v1/fetchmeta" - upstream_url: "{{ content_service_url }}/v1/url/fetchmeta" + uris: "{{ content_prefix }}/v1/fetchmeta" + upstream_url: "{{ knowledge_mw_service_url }}/v1/url/fetchmeta" strip_uri: true plugins: - name: jwt @@ -3346,7 +3346,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: publishFramework uris: "{{ framework_service_prefix }}/v1/publish" - upstream_url: "{{ content_service_url }}/v1/framework/publish" + upstream_url: "{{ knowledge_mw_service_url }}/v1/framework/publish" strip_uri: true plugins: - name: jwt @@ -3362,7 +3362,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: pluginSearch uris: "{{ plugin_service_prefix }}/v1/search" - upstream_url: "{{ content_service_url }}/v1/plugins/search" + upstream_url: "{{ knowledge_mw_service_url }}/v1/plugins/search" strip_uri: true plugins: - name: jwt @@ -3377,8 +3377,8 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" - name: updateCollaborators - uris: "{{ content_service_prefix }}/v1/collaborator/update" - upstream_url: "{{ content_service_url }}/v1/content/collaborator/update" + uris: "{{ content_prefix }}/v1/collaborator/update" + upstream_url: "{{ knowledge_mw_service_url }}/v1/content/collaborator/update" strip_uri: true plugins: - name: jwt @@ -3394,7 +3394,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: reserveDialcode uris: "{{ dialcode_service_prefix }}/v1/reserve" - upstream_url: "{{ content_service_url }}/v1/dialcode/reserve" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dialcode/reserve" strip_uri: true plugins: - name: jwt @@ -3410,7 +3410,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: releaseDialcode uris: "{{ dialcode_service_prefix }}/v1/release" - upstream_url: "{{ content_service_url }}/v1/dialcode/release" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dialcode/release" strip_uri: true plugins: - name: jwt @@ -3426,7 +3426,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: createLock uris: "{{ lock_service_prefix }}/v1/create" - upstream_url: "{{ content_service_url }}/v1/lock/create" + upstream_url: "{{ knowledge_mw_service_url }}/v1/lock/create" strip_uri: true plugins: - name: jwt @@ -3442,7 +3442,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: refreshLock uris: "{{ lock_service_prefix }}/v1/refresh" - upstream_url: "{{ content_service_url }}/v1/lock/refresh" + upstream_url: "{{ knowledge_mw_service_url }}/v1/lock/refresh" strip_uri: true plugins: - name: jwt @@ -3458,7 +3458,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: retireLock uris: "{{ lock_service_prefix }}/v1/retire" - upstream_url: "{{ content_service_url }}/v1/lock/retire" + upstream_url: "{{ knowledge_mw_service_url }}/v1/lock/retire" strip_uri: true plugins: - name: jwt @@ -3474,7 +3474,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: listLock uris: "{{ lock_service_prefix }}/v1/list" - upstream_url: "{{ content_service_url }}/v1/lock/list" + upstream_url: "{{ knowledge_mw_service_url }}/v1/lock/list" strip_uri: true plugins: - name: jwt From 0e4f93f8179fed6b2e83dd78457c66850811a257 Mon Sep 17 00:00:00 2001 From: Mahesh Kumar Gangula Date: Fri, 22 Nov 2019 16:45:30 +0530 Subject: [PATCH 0393/2894] Issue #SC-1423 feat: kong-api rename content_service to knowledge_mw_service (#932) --- ansible/roles/kong-api/defaults/main.yml | 180 +++++++++++------------ 1 file changed, 90 insertions(+), 90 deletions(-) diff --git a/ansible/roles/kong-api/defaults/main.yml b/ansible/roles/kong-api/defaults/main.yml index 8395295c9..c7fc7220f 100644 --- a/ansible/roles/kong-api/defaults/main.yml +++ b/ansible/roles/kong-api/defaults/main.yml @@ -32,7 +32,7 @@ large_request_size_limit: 100 # Default service prefixes private_content_prefix: /private/content -content_service_prefix: /content +content_prefix: /content course_service_prefix: /course user_service_prefix: /user data_service_prefix: /data @@ -59,7 +59,7 @@ cert_registry_service_prefix: /certreg desktop_app_prefix: /desktop # Service URLs -content_service_url: "http://knowledge-mw-service:5000" +knowledge_mw_service_url: "http://knowledge-mw-service:5000" learning_service_url: "http://learner-service:9000" vm_learning_service_url: "http://{{learningservice_ip}}:8080/learning-service" telemetry_service_url: "http://telemetry-service:9001" @@ -118,8 +118,8 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" - name: createContent - uris: "{{ content_service_prefix }}/v1/create" - upstream_url: "{{ content_service_url }}/v1/content/create" + uris: "{{ content_prefix }}/v1/create" + upstream_url: "{{ knowledge_mw_service_url }}/v1/content/create" strip_uri: true plugins: - name: jwt @@ -134,8 +134,8 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" - name: searchContent - uris: "{{ content_service_prefix }}/v1/search" - upstream_url: "{{ content_service_url }}/v1/content/search" + uris: "{{ content_prefix }}/v1/search" + upstream_url: "{{ knowledge_mw_service_url }}/v1/content/search" strip_uri: true plugins: - name: cors @@ -147,8 +147,8 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" - name: updateContent - uris: "{{ content_service_prefix }}/v1/update" - upstream_url: "{{ content_service_url }}/v1/content/update" + uris: "{{ content_prefix }}/v1/update" + upstream_url: "{{ knowledge_mw_service_url }}/v1/content/update" strip_uri: true plugins: - name: jwt @@ -163,8 +163,8 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" - name: readContent - uris: "{{ content_service_prefix }}/v1/read" - upstream_url: "{{ content_service_url }}/v1/content/read" + uris: "{{ content_prefix }}/v1/read" + upstream_url: "{{ knowledge_mw_service_url }}/v1/content/read" strip_uri: true plugins: - name: cors @@ -176,8 +176,8 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" - name: submitContentForReview - uris: "{{ content_service_prefix }}/v1/review" - upstream_url: "{{ content_service_url }}/v1/content/review" + uris: "{{ content_prefix }}/v1/review" + upstream_url: "{{ knowledge_mw_service_url }}/v1/content/review" strip_uri: true plugins: - name: jwt @@ -192,8 +192,8 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" - name: publishContent - uris: "{{ content_service_prefix }}/v1/publish" - upstream_url: "{{ content_service_url }}/v1/content/publish" + uris: "{{ content_prefix }}/v1/publish" + upstream_url: "{{ knowledge_mw_service_url }}/v1/content/publish" strip_uri: true plugins: - name: jwt @@ -208,8 +208,8 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" - name: uploadContent - uris: "{{ content_service_prefix }}/v1/upload" - upstream_url: "{{ content_service_url }}/v1/content/upload" + uris: "{{ content_prefix }}/v1/upload" + upstream_url: "{{ knowledge_mw_service_url }}/v1/content/upload" strip_uri: true plugins: - name: jwt @@ -224,8 +224,8 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ large_request_size_limit }}" - name: retireContent - uris: "{{ content_service_prefix }}/v1/retire" - upstream_url: "{{ content_service_url }}/v1/content/retire" + uris: "{{ content_prefix }}/v1/retire" + upstream_url: "{{ knowledge_mw_service_url }}/v1/content/retire" strip_uri: true plugins: - name: jwt @@ -241,7 +241,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: createCourse uris: "{{ course_service_prefix }}/v1/create" - upstream_url: "{{ content_service_url }}/v1/course/create" + upstream_url: "{{ knowledge_mw_service_url }}/v1/course/create" strip_uri: true plugins: - name: jwt @@ -257,7 +257,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: searchCourse uris: "{{ course_service_prefix }}/v1/search" - upstream_url: "{{ content_service_url }}/v1/course/search" + upstream_url: "{{ knowledge_mw_service_url }}/v1/course/search" strip_uri: true plugins: - name: jwt @@ -273,7 +273,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: updateCourse uris: "{{ course_service_prefix }}/v1/update" - upstream_url: "{{ content_service_url }}/v1/course/update" + upstream_url: "{{ knowledge_mw_service_url }}/v1/course/update" strip_uri: true plugins: - name: jwt @@ -289,7 +289,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: readCourse uris: "{{ course_service_prefix }}/v1/read" - upstream_url: "{{ content_service_url }}/v1/course/read" + upstream_url: "{{ knowledge_mw_service_url }}/v1/course/read" strip_uri: true plugins: - name: jwt @@ -305,7 +305,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: submitCourseForReview uris: "{{ course_service_prefix }}/v1/review" - upstream_url: "{{ content_service_url }}/v1/course/review" + upstream_url: "{{ knowledge_mw_service_url }}/v1/course/review" strip_uri: true plugins: - name: jwt @@ -321,7 +321,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: publishCourse uris: "{{ course_service_prefix }}/v1/publish" - upstream_url: "{{ content_service_url }}/v1/course/publish" + upstream_url: "{{ knowledge_mw_service_url }}/v1/course/publish" strip_uri: true plugins: - name: jwt @@ -337,7 +337,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: retireCourse uris: "{{ course_service_prefix }}/v1/retire" - upstream_url: "{{ content_service_url }}/v1/course/retire" + upstream_url: "{{ knowledge_mw_service_url }}/v1/course/retire" strip_uri: true plugins: - name: jwt @@ -353,7 +353,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: getCourseHierarchy uris: "{{ course_service_prefix }}/v1/hierarchy" - upstream_url: "{{ content_service_url }}/v1/course/hierarchy" + upstream_url: "{{ knowledge_mw_service_url }}/v1/course/hierarchy" strip_uri: true plugins: - name: cors @@ -1064,7 +1064,7 @@ kong_apis: - name: compositeSearch uris: "{{ composite_service_prefix }}/v1/search" - upstream_url: "{{ content_service_url }}/v1/search" + upstream_url: "{{ knowledge_mw_service_url }}/v1/search" strip_uri: true plugins: - name: jwt @@ -1080,7 +1080,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: listTerms uris: "{{ meta_service_prefix }}/v1/terms/list" - upstream_url: "{{ content_service_url }}/v1/terms/list" + upstream_url: "{{ knowledge_mw_service_url }}/v1/terms/list" strip_uri: true plugins: - name: jwt @@ -1096,7 +1096,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: listResourceBundles uris: "{{ meta_service_prefix }}/v1/resourcebundles/list" - upstream_url: "{{ content_service_url }}/v1/resourcebundles/list" + upstream_url: "{{ knowledge_mw_service_url }}/v1/resourcebundles/list" strip_uri: true plugins: - name: jwt @@ -1112,7 +1112,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: listOrdinals uris: "{{ meta_service_prefix }}/v1/ordinals/list" - upstream_url: "{{ content_service_url }}/v1/ordinals/list" + upstream_url: "{{ knowledge_mw_service_url }}/v1/ordinals/list" strip_uri: true plugins: - name: jwt @@ -1143,8 +1143,8 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" - name: flagContent - uris: "{{ content_service_prefix }}/v1/flag" - upstream_url: "{{ content_service_url }}/v1/content/flag" + uris: "{{ content_prefix }}/v1/flag" + upstream_url: "{{ knowledge_mw_service_url }}/v1/content/flag" strip_uri: true plugins: - name: jwt @@ -1159,8 +1159,8 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" - name: acceptContentFlag - uris: "{{ content_service_prefix }}/v1/flag/accept" - upstream_url: "{{ content_service_url }}/v1/content/flag/accept" + uris: "{{ content_prefix }}/v1/flag/accept" + upstream_url: "{{ knowledge_mw_service_url }}/v1/content/flag/accept" strip_uri: true plugins: - name: jwt @@ -1175,8 +1175,8 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" - name: rejectContentFlag - uris: "{{ content_service_prefix }}/v1/flag/reject" - upstream_url: "{{ content_service_url }}/v1/content/flag/reject" + uris: "{{ content_prefix }}/v1/flag/reject" + upstream_url: "{{ knowledge_mw_service_url }}/v1/content/flag/reject" strip_uri: true plugins: - name: jwt @@ -1527,7 +1527,7 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" - name: uploadMedia - uris: "{{ content_service_prefix }}/v1/media/upload" + uris: "{{ content_prefix }}/v1/media/upload" upstream_url: "{{ learning_service_url }}/v1/file/upload" strip_uri: true plugins: @@ -1607,8 +1607,8 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" - name: getContentUploadUrl - uris: "{{ content_service_prefix }}/v1/upload/url/read" - upstream_url: "{{ content_service_url }}/v1/content/upload/url" + uris: "{{ content_prefix }}/v1/upload/url/read" + upstream_url: "{{ knowledge_mw_service_url }}/v1/content/upload/url" strip_uri: true plugins: - name: jwt @@ -1623,8 +1623,8 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" - name: rejectContent - uris: "{{ content_service_prefix }}/v1/reject" - upstream_url: "{{ content_service_url }}/v1/content/reject" + uris: "{{ content_prefix }}/v1/reject" + upstream_url: "{{ knowledge_mw_service_url }}/v1/content/reject" strip_uri: true plugins: - name: jwt @@ -2409,7 +2409,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: generateDialcodes uris: "{{ dialcode_service_prefix }}/v1/generate" - upstream_url: "{{ content_service_url }}/v1/dialcode/generate" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dialcode/generate" strip_uri: true plugins: - name: jwt @@ -2425,7 +2425,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: readDialcode uris: "{{ dialcode_service_prefix }}/v1/read" - upstream_url: "{{ content_service_url }}/v1/dialcode/read" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dialcode/read" strip_uri: true plugins: - name: jwt @@ -2441,7 +2441,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: updateDialcode uris: "{{ dialcode_service_prefix }}/v1/update" - upstream_url: "{{ content_service_url }}/v1/dialcode/update" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dialcode/update" strip_uri: true plugins: - name: jwt @@ -2457,7 +2457,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: listDialcodes uris: "{{ dialcode_service_prefix }}/v1/list" - upstream_url: "{{ content_service_url }}/v1/dialcode/list" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dialcode/list" strip_uri: true plugins: - name: jwt @@ -2473,7 +2473,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: publishDialcode uris: "{{ dialcode_service_prefix }}/v1/publish" - upstream_url: "{{ content_service_url }}/v1/dialcode/publish" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dialcode/publish" strip_uri: true plugins: - name: jwt @@ -2489,7 +2489,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: searchDialcodes uris: "{{ dialcode_service_prefix }}/v1/search" - upstream_url: "{{ content_service_url }}/v1/dialcode/search" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dialcode/search" strip_uri: true plugins: - name: jwt @@ -2505,7 +2505,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: qrCodeBatchProcessStatus uris: "{{ dialcode_service_prefix }}/v1/process/status" - upstream_url: "{{ content_service_url }}/v1/dialcode/process/status" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dialcode/process/status" strip_uri: true plugins: - name: jwt @@ -2521,7 +2521,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: qrCodeBatchProcessRetry uris: "{{ dialcode_service_prefix }}/v1/process/retry" - upstream_url: "{{ content_service_url }}/v1/dialcode/process/retry" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dialcode/process/retry" strip_uri: true plugins: - name: jwt @@ -2537,7 +2537,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: createPublisher uris: "{{ dialcode_service_prefix }}/v1/publisher/create" - upstream_url: "{{ content_service_url }}/v1/dialcode/publisher/create" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dialcode/publisher/create" strip_uri: true plugins: - name: jwt @@ -2553,7 +2553,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: updatePublisher uris: "{{ dialcode_service_prefix }}/v1/publisher/update" - upstream_url: "{{ content_service_url }}/v1/dialcode/publisher/update" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dialcode/publisher/update" strip_uri: true plugins: - name: jwt @@ -2569,7 +2569,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: readPublisher uris: "{{ dialcode_service_prefix }}/v1/publisher/read" - upstream_url: "{{ content_service_url }}/v1/dialcode/publisher/read" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dialcode/publisher/read" strip_uri: true plugins: - name: jwt @@ -2585,7 +2585,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: linkDialcodeContent uris: "{{ dialcode_service_prefix }}/v1/content/link" - upstream_url: "{{ content_service_url }}/v1/dialcode/content/link" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dialcode/content/link" strip_uri: true plugins: - name: jwt @@ -2601,7 +2601,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: readChannel uris: "{{ channel_service_prefix }}/v1/read" - upstream_url: "{{ content_service_url }}/v1/channel/read" + upstream_url: "{{ knowledge_mw_service_url }}/v1/channel/read" strip_uri: true plugins: - name: cors @@ -2614,7 +2614,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: listChannel uris: "{{ channel_service_prefix }}/v1/list" - upstream_url: "{{ content_service_url }}/v1/channel/list" + upstream_url: "{{ knowledge_mw_service_url }}/v1/channel/list" strip_uri: true plugins: - name: jwt @@ -2630,7 +2630,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: searchChannel uris: "{{ channel_service_prefix }}/v1/search" - upstream_url: "{{ content_service_url }}/v1/channel/search" + upstream_url: "{{ knowledge_mw_service_url }}/v1/channel/search" strip_uri: true plugins: - name: jwt @@ -2646,7 +2646,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: createChannel uris: "{{ channel_service_prefix }}/v1/create" - upstream_url: "{{ content_service_url }}/v1/channel/create" + upstream_url: "{{ knowledge_mw_service_url }}/v1/channel/create" strip_uri: true plugins: - name: jwt @@ -2662,7 +2662,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: updateChannel uris: "{{ channel_service_prefix }}/v1/update" - upstream_url: "{{ content_service_url }}/v1/channel/update" + upstream_url: "{{ knowledge_mw_service_url }}/v1/channel/update" strip_uri: true plugins: - name: jwt @@ -2678,7 +2678,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: readFramework uris: "{{ framework_service_prefix }}/v1/read" - upstream_url: "{{ content_service_url }}/v1/framework/read" + upstream_url: "{{ knowledge_mw_service_url }}/v1/framework/read" strip_uri: true plugins: - name: cors @@ -2691,7 +2691,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: listFramework uris: "{{ framework_service_prefix }}/v1/list" - upstream_url: "{{ content_service_url }}/v1/framework/list" + upstream_url: "{{ knowledge_mw_service_url }}/v1/framework/list" strip_uri: true plugins: - name: jwt @@ -2707,7 +2707,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: createFramework uris: "{{ framework_service_prefix }}/v1/create" - upstream_url: "{{ content_service_url }}/v1/framework/create" + upstream_url: "{{ knowledge_mw_service_url }}/v1/framework/create" strip_uri: true plugins: - name: jwt @@ -2723,7 +2723,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: updateFramework uris: "{{ framework_service_prefix }}/v1/update" - upstream_url: "{{ content_service_url }}/v1/framework/update" + upstream_url: "{{ knowledge_mw_service_url }}/v1/framework/update" strip_uri: true plugins: - name: jwt @@ -2739,7 +2739,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: copyFramework uris: "{{ framework_service_prefix }}/v1/copy" - upstream_url: "{{ content_service_url }}/v1/framework/copy" + upstream_url: "{{ knowledge_mw_service_url }}/v1/framework/copy" strip_uri: true plugins: - name: jwt @@ -2755,7 +2755,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: readFrameworkTerm uris: "{{ framework_service_prefix }}/v1/term/read" - upstream_url: "{{ content_service_url }}/v1/framework/term/read" + upstream_url: "{{ knowledge_mw_service_url }}/v1/framework/term/read" strip_uri: true plugins: - name: jwt @@ -2771,7 +2771,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: searchFrameworkTerm uris: "{{ framework_service_prefix }}/v1/term/search" - upstream_url: "{{ content_service_url }}/v1/framework/term/search" + upstream_url: "{{ knowledge_mw_service_url }}/v1/framework/term/search" strip_uri: true plugins: - name: jwt @@ -2787,7 +2787,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: createFrameworkTerm uris: "{{ framework_service_prefix }}/v1/term/create" - upstream_url: "{{ content_service_url }}/v1/framework/term/create" + upstream_url: "{{ knowledge_mw_service_url }}/v1/framework/term/create" strip_uri: true plugins: - name: jwt @@ -2803,7 +2803,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: updateFrameworkTerm uris: "{{ framework_service_prefix }}/v1/term/update" - upstream_url: "{{ content_service_url }}/v1/framework/term/update" + upstream_url: "{{ knowledge_mw_service_url }}/v1/framework/term/update" strip_uri: true plugins: - name: jwt @@ -2819,7 +2819,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: readFrameworkCategory uris: "{{ framework_service_prefix }}/v1/category/read" - upstream_url: "{{ content_service_url }}/v1/framework/category/read" + upstream_url: "{{ knowledge_mw_service_url }}/v1/framework/category/read" strip_uri: true plugins: - name: jwt @@ -2835,7 +2835,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: searchFrameworkCategory uris: "{{ framework_service_prefix }}/v1/category/search" - upstream_url: "{{ content_service_url }}/v1/framework/category/search" + upstream_url: "{{ knowledge_mw_service_url }}/v1/framework/category/search" strip_uri: true plugins: - name: jwt @@ -2851,7 +2851,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: createFrameworkCategory uris: "{{ framework_service_prefix }}/v1/category/create" - upstream_url: "{{ content_service_url }}/v1/framework/category/create" + upstream_url: "{{ knowledge_mw_service_url }}/v1/framework/category/create" strip_uri: true plugins: - name: jwt @@ -2867,7 +2867,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: updateFrameworkCategory uris: "{{ framework_service_prefix }}/v1/category/update" - upstream_url: "{{ content_service_url }}/v1/framework/category/update" + upstream_url: "{{ knowledge_mw_service_url }}/v1/framework/category/update" strip_uri: true plugins: - name: jwt @@ -2883,7 +2883,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: updateCourseHierarchy uris: '{{ course_service_prefix }}/v1/hierarchy/update' - upstream_url: '{{ content_service_url }}/v1/course/hierarchy/update' + upstream_url: '{{ knowledge_mw_service_url }}/v1/course/hierarchy/update' strip_uri: true plugins: - name: jwt @@ -2899,7 +2899,7 @@ kong_apis: config.allowed_payload_size: '{{ small_request_size_limit }}' - name: submitDatasetRequest uris: "{{ data_service_prefix }}/v1/dataset/request/submit" - upstream_url: "{{ content_service_url }}/v1/dataset/request/submit" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dataset/request/submit" strip_uri: true plugins: - name: jwt @@ -2915,7 +2915,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: listDatasetRequest uris: "{{ data_service_prefix }}/v1/dataset/request/list" - upstream_url: "{{ content_service_url }}/v1/dataset/request/list" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dataset/request/list" strip_uri: true plugins: - name: jwt @@ -2931,7 +2931,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: readDatasetRequest uris: "{{ data_service_prefix }}/v1/dataset/request/read" - upstream_url: "{{ content_service_url }}/v1/dataset/request/read" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dataset/request/read" strip_uri: true plugins: - name: jwt @@ -2947,7 +2947,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: channelDatasetRequest uris: "{{ data_service_prefix }}/v1/dataset/request" - upstream_url: "{{ content_service_url }}/v1/dataset/request" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dataset/request" strip_uri: true plugins: - name: jwt @@ -3312,8 +3312,8 @@ kong_apis: config.allowed_payload_size: "{{ medium_request_size_limit }}" config.allowed_payload_size: "{{ medium_request_size_limit }}" - name: copyContent - uris: "{{ content_service_prefix }}/v1/copy" - upstream_url: "{{ content_service_url }}/v1/content/copy" + uris: "{{ content_prefix }}/v1/copy" + upstream_url: "{{ knowledge_mw_service_url }}/v1/content/copy" strip_uri: true plugins: - name: jwt @@ -3329,8 +3329,8 @@ kong_apis: config.allowed_payload_size: "{{ medium_request_size_limit }}" config.allowed_payload_size: "{{ medium_request_size_limit }}" - name: fetchURLMetaInformation - uris: "{{ content_service_prefix }}/v1/fetchmeta" - upstream_url: "{{ content_service_url }}/v1/url/fetchmeta" + uris: "{{ content_prefix }}/v1/fetchmeta" + upstream_url: "{{ knowledge_mw_service_url }}/v1/url/fetchmeta" strip_uri: true plugins: - name: jwt @@ -3346,7 +3346,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: publishFramework uris: "{{ framework_service_prefix }}/v1/publish" - upstream_url: "{{ content_service_url }}/v1/framework/publish" + upstream_url: "{{ knowledge_mw_service_url }}/v1/framework/publish" strip_uri: true plugins: - name: jwt @@ -3362,7 +3362,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: pluginSearch uris: "{{ plugin_service_prefix }}/v1/search" - upstream_url: "{{ content_service_url }}/v1/plugins/search" + upstream_url: "{{ knowledge_mw_service_url }}/v1/plugins/search" strip_uri: true plugins: - name: jwt @@ -3377,8 +3377,8 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" - name: updateCollaborators - uris: "{{ content_service_prefix }}/v1/collaborator/update" - upstream_url: "{{ content_service_url }}/v1/content/collaborator/update" + uris: "{{ content_prefix }}/v1/collaborator/update" + upstream_url: "{{ knowledge_mw_service_url }}/v1/content/collaborator/update" strip_uri: true plugins: - name: jwt @@ -3394,7 +3394,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: reserveDialcode uris: "{{ dialcode_service_prefix }}/v1/reserve" - upstream_url: "{{ content_service_url }}/v1/dialcode/reserve" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dialcode/reserve" strip_uri: true plugins: - name: jwt @@ -3410,7 +3410,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: releaseDialcode uris: "{{ dialcode_service_prefix }}/v1/release" - upstream_url: "{{ content_service_url }}/v1/dialcode/release" + upstream_url: "{{ knowledge_mw_service_url }}/v1/dialcode/release" strip_uri: true plugins: - name: jwt @@ -3426,7 +3426,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: createLock uris: "{{ lock_service_prefix }}/v1/create" - upstream_url: "{{ content_service_url }}/v1/lock/create" + upstream_url: "{{ knowledge_mw_service_url }}/v1/lock/create" strip_uri: true plugins: - name: jwt @@ -3442,7 +3442,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: refreshLock uris: "{{ lock_service_prefix }}/v1/refresh" - upstream_url: "{{ content_service_url }}/v1/lock/refresh" + upstream_url: "{{ knowledge_mw_service_url }}/v1/lock/refresh" strip_uri: true plugins: - name: jwt @@ -3458,7 +3458,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: retireLock uris: "{{ lock_service_prefix }}/v1/retire" - upstream_url: "{{ content_service_url }}/v1/lock/retire" + upstream_url: "{{ knowledge_mw_service_url }}/v1/lock/retire" strip_uri: true plugins: - name: jwt @@ -3474,7 +3474,7 @@ kong_apis: config.allowed_payload_size: "{{ small_request_size_limit }}" - name: listLock uris: "{{ lock_service_prefix }}/v1/list" - upstream_url: "{{ content_service_url }}/v1/lock/list" + upstream_url: "{{ knowledge_mw_service_url }}/v1/lock/list" strip_uri: true plugins: - name: jwt From 25be2a481a3ff484b2bff76c7eece0d134ee4126 Mon Sep 17 00:00:00 2001 From: G33tha Date: Fri, 22 Nov 2019 17:21:24 +0530 Subject: [PATCH 0394/2894] Issue #000 feat: updated jenkins file --- .../helm_charts/networkconfig/templates/virtualservice.yaml | 2 +- kubernetes/pipelines/monitoring/Jenkinsfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kubernetes/helm_charts/networkconfig/templates/virtualservice.yaml b/kubernetes/helm_charts/networkconfig/templates/virtualservice.yaml index ed6fce9a5..9b4b72e21 100755 --- a/kubernetes/helm_charts/networkconfig/templates/virtualservice.yaml +++ b/kubernetes/helm_charts/networkconfig/templates/virtualservice.yaml @@ -33,7 +33,7 @@ spec: uri: /auth/ route: - destination: - host: keycloak.{{ .Values.namespace }} + host: keycloak.{{ .Values.namespace }}.global - match: - uri: prefix: /api/ diff --git a/kubernetes/pipelines/monitoring/Jenkinsfile b/kubernetes/pipelines/monitoring/Jenkinsfile index 3f9982b34..1e1a8994f 100644 --- a/kubernetes/pipelines/monitoring/Jenkinsfile +++ b/kubernetes/pipelines/monitoring/Jenkinsfile @@ -8,7 +8,7 @@ node() { stage('deploy') { values = docker_params() - jobName = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-1].trim() + jobName = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-1].trim().toLowerCase() currentWs = sh(returnStdout: true, script: 'pwd').trim() ansiblePlaybook = "$currentWs/kubernetes/ansible/monitoring.yaml" ansibleExtraArgs = "--extra-vars \"chart_path=${currentWs}/kubernetes/helm_charts/$jobName release_name=$jobName image_tag=$values.image_tag\" --vault-password-file /var/lib/jenkins/secrets/vault-pass" From ac1d4bd48aa7fe2a6bf4a57fb8d4514a879035a7 Mon Sep 17 00:00:00 2001 From: G33tha Date: Fri, 22 Nov 2019 17:26:57 +0530 Subject: [PATCH 0395/2894] Issue #000 feat: updated jenkins file --- kubernetes/pipelines/logging/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/pipelines/logging/Jenkinsfile b/kubernetes/pipelines/logging/Jenkinsfile index 0950a064a..ceb527dc7 100644 --- a/kubernetes/pipelines/logging/Jenkinsfile +++ b/kubernetes/pipelines/logging/Jenkinsfile @@ -13,7 +13,7 @@ node() { module = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-2].trim() jobName = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-1].trim() ansiblePlaybook = "$currentWs/kubernetes/ansible/deploy_core_service.yml" - ansibleExtraArgs = "--extra-vars \"chart_path=${currentWs}/kubernetes/helm_charts/logging/${params.chartname} release_name=${params.chartname}\" --vault-password-file /var/lib/jenkins/secrets/vault-pass" + ansibleExtraArgs = "--extra-vars \"chart_path=${currentWs}/kubernetes/helm_charts/Logging/${params.chartname} release_name=${params.chartname}\" --vault-password-file /var/lib/jenkins/secrets/vault-pass" values.put('currentWs', currentWs) values.put('env', envDir) values.put('module', module) From f0b03d640ef0f324ad337e8d4f0585574d5b2df2 Mon Sep 17 00:00:00 2001 From: G33tha Date: Fri, 22 Nov 2019 17:29:20 +0530 Subject: [PATCH 0396/2894] Issue #000 feat: updated jenkins file --- kubernetes/pipelines/logging/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/pipelines/logging/Jenkinsfile b/kubernetes/pipelines/logging/Jenkinsfile index ceb527dc7..0950a064a 100644 --- a/kubernetes/pipelines/logging/Jenkinsfile +++ b/kubernetes/pipelines/logging/Jenkinsfile @@ -13,7 +13,7 @@ node() { module = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-2].trim() jobName = sh(returnStdout: true, script: "echo $JOB_NAME").split('/')[-1].trim() ansiblePlaybook = "$currentWs/kubernetes/ansible/deploy_core_service.yml" - ansibleExtraArgs = "--extra-vars \"chart_path=${currentWs}/kubernetes/helm_charts/Logging/${params.chartname} release_name=${params.chartname}\" --vault-password-file /var/lib/jenkins/secrets/vault-pass" + ansibleExtraArgs = "--extra-vars \"chart_path=${currentWs}/kubernetes/helm_charts/logging/${params.chartname} release_name=${params.chartname}\" --vault-password-file /var/lib/jenkins/secrets/vault-pass" values.put('currentWs', currentWs) values.put('env', envDir) values.put('module', module) From 8404b3b22af4449557930c40b0f74ceae589a22d Mon Sep 17 00:00:00 2001 From: G33tha Date: Mon, 25 Nov 2019 11:31:20 +0530 Subject: [PATCH 0397/2894] Issue #000 feat: updated helm charts variables --- kubernetes/helm_charts/core/adminutils/values.j2 | 4 ++-- kubernetes/helm_charts/core/apimanager/values.j2 | 2 +- kubernetes/helm_charts/core/badger/values.j2 | 4 ++-- kubernetes/helm_charts/core/cert/values.j2 | 2 +- kubernetes/helm_charts/core/content/values.j2 | 2 +- kubernetes/helm_charts/core/enc/values.j2 | 4 ++-- kubernetes/helm_charts/core/learner/values.j2 | 2 +- kubernetes/helm_charts/core/lms/values.j2 | 2 +- kubernetes/helm_charts/core/notification/values.j2 | 2 +- kubernetes/helm_charts/core/player/values.j2 | 2 +- kubernetes/helm_charts/core/telemetry/values.j2 | 2 +- kubernetes/helm_charts/core/userorg/values.j2 | 2 +- 12 files changed, 15 insertions(+), 15 deletions(-) diff --git a/kubernetes/helm_charts/core/adminutils/values.j2 b/kubernetes/helm_charts/core/adminutils/values.j2 index 085d7c0fc..0600e848b 100644 --- a/kubernetes/helm_charts/core/adminutils/values.j2 +++ b/kubernetes/helm_charts/core/adminutils/values.j2 @@ -4,8 +4,8 @@ namespace: {{ namespace }} imagepullsecrets: {{ imagepullsecrets }} dockerhub: {{ dockerhub }} -replicaCount: {{replicacount|default(1)}} -repository: {{cert_repository|default('adminutil')}} +replicaCount: {{adminutil_replicacount|default(1)}} +repository: {{adminutil_repository|default('adminutil')}} image_tag: {{image_tag }} resources: requests: diff --git a/kubernetes/helm_charts/core/apimanager/values.j2 b/kubernetes/helm_charts/core/apimanager/values.j2 index bcfa19635..f3cfd351b 100755 --- a/kubernetes/helm_charts/core/apimanager/values.j2 +++ b/kubernetes/helm_charts/core/apimanager/values.j2 @@ -4,7 +4,7 @@ namespace: {{ namespace }} imagepullsecrets: {{ imagepullsecrets }} dockerhub: {{ dockerhub }} -replicaCount: {{replicacount|default(1)}} +replicaCount: {{kong_replicacount|default(1)}} repository: {{kong_repository|default('kong')}} image_tag: {{ image_tag }} resources: diff --git a/kubernetes/helm_charts/core/badger/values.j2 b/kubernetes/helm_charts/core/badger/values.j2 index bda672ca6..770bfead9 100755 --- a/kubernetes/helm_charts/core/badger/values.j2 +++ b/kubernetes/helm_charts/core/badger/values.j2 @@ -4,8 +4,8 @@ namespace: {{ namespace }} imagepullsecrets: {{ imagepullsecrets }} dockerhub: {{ dockerhub }} -replicaCount: {{replicacount|default(1)}} -repository: {{cert_repository|default('badger')}} +replicaCount: {{badger_replicacount|default(1)}} +repository: {{badger_repository|default('badger')}} image_tag: {{image_tag }} resources: requests: diff --git a/kubernetes/helm_charts/core/cert/values.j2 b/kubernetes/helm_charts/core/cert/values.j2 index 527d76510..7ba656599 100644 --- a/kubernetes/helm_charts/core/cert/values.j2 +++ b/kubernetes/helm_charts/core/cert/values.j2 @@ -4,7 +4,7 @@ namespace: {{ namespace }} imagepullsecrets: {{ imagepullsecrets }} dockerhub: {{ dockerhub }} -replicaCount: {{replicacount|default(1)}} +replicaCount: {{cert_replicacount|default(1)}} repository: {{cert_repository|default('cert_service')}} image_tag: {{image_tag }} resources: diff --git a/kubernetes/helm_charts/core/content/values.j2 b/kubernetes/helm_charts/core/content/values.j2 index f344c7910..5ba64037e 100644 --- a/kubernetes/helm_charts/core/content/values.j2 +++ b/kubernetes/helm_charts/core/content/values.j2 @@ -4,7 +4,7 @@ namespace: {{ namespace }} imagepullsecrets: {{ imagepullsecrets }} dockerhub: {{ dockerhub }} -replicaCount: {{replicacount|default(1)}} +replicaCount: {{content_replicacount|default(1)}} repository: {{content_repository|default('knowledge-mw-service')}} image_tag: {{ image_tag }} resources: diff --git a/kubernetes/helm_charts/core/enc/values.j2 b/kubernetes/helm_charts/core/enc/values.j2 index dc7960db4..86363c754 100644 --- a/kubernetes/helm_charts/core/enc/values.j2 +++ b/kubernetes/helm_charts/core/enc/values.j2 @@ -4,7 +4,7 @@ namespace: {{ namespace }} imagepullsecrets: {{ imagepullsecrets }} dockerhub: {{ dockerhub }} -replicaCount: {{replicacount|default(1)}} +replicaCount: {{enc_replicacount|default(1)}} repository: {{enc_repository|default('enc_service')}} image_tag: {{image_tag }} resources: @@ -13,7 +13,7 @@ resources: memory: {{enc_service_mem_req|default('50Mi')}} limits: cpu: {{enc_service_cpu_limit|default('1')}} - memory: {{enc_service_memory_limit|default('800Mi')}} + memory: {{enc_service_mem_limit|default('800Mi')}} network: port: 9010 targetport: 8013 diff --git a/kubernetes/helm_charts/core/learner/values.j2 b/kubernetes/helm_charts/core/learner/values.j2 index 0a7689050..1ee9ecbcb 100644 --- a/kubernetes/helm_charts/core/learner/values.j2 +++ b/kubernetes/helm_charts/core/learner/values.j2 @@ -5,7 +5,7 @@ namespace: {{ namespace }} imagepullsecrets: {{ imagepullsecrets }} dockerhub: {{ dockerhub }} -replicaCount: {{replicacount|default(1)}} +replicaCount: {{learner_replicacount|default(1)}} repository: {{learner_repository|default('learner_service')}} image_tag: {{image_tag }} resources: diff --git a/kubernetes/helm_charts/core/lms/values.j2 b/kubernetes/helm_charts/core/lms/values.j2 index e8955eb11..47e773352 100644 --- a/kubernetes/helm_charts/core/lms/values.j2 +++ b/kubernetes/helm_charts/core/lms/values.j2 @@ -4,7 +4,7 @@ namespace: {{ namespace }} imagepullsecrets: {{ imagepullsecrets }} dockerhub: {{ dockerhub }} -replicaCount: {{replicacount|default(1)}} +replicaCount: {{lms_replicacount|default(1)}} repository: {{lms_repository|default('lms_service')}} image_tag: {{image_tag }} resources: diff --git a/kubernetes/helm_charts/core/notification/values.j2 b/kubernetes/helm_charts/core/notification/values.j2 index e48b75fab..989b6e58d 100644 --- a/kubernetes/helm_charts/core/notification/values.j2 +++ b/kubernetes/helm_charts/core/notification/values.j2 @@ -4,7 +4,7 @@ namespace: {{ namespace }} imagepullsecrets: {{ imagepullsecrets }} dockerhub: {{ dockerhub }} -replicaCount: {{replicacount|default(1)}} +replicaCount: {{notification_replicacount|default(1)}} repository: {{notification_repository|default('notification_service')}} image_tag: {{image_tag }} resources: diff --git a/kubernetes/helm_charts/core/player/values.j2 b/kubernetes/helm_charts/core/player/values.j2 index 843f9db85..149da3fa4 100644 --- a/kubernetes/helm_charts/core/player/values.j2 +++ b/kubernetes/helm_charts/core/player/values.j2 @@ -4,7 +4,7 @@ namespace: {{ namespace }} imagepullsecrets: {{ imagepullsecrets }} dockerhub: {{ dockerhub }} -replicaCount: {{replicacount|default(1)}} +replicaCount: {{player_replicacount|default(1)}} repository: {{player_repository|default('player')}} image_tag: {{image_tag }} resources: diff --git a/kubernetes/helm_charts/core/telemetry/values.j2 b/kubernetes/helm_charts/core/telemetry/values.j2 index 28fb12499..61d911b67 100644 --- a/kubernetes/helm_charts/core/telemetry/values.j2 +++ b/kubernetes/helm_charts/core/telemetry/values.j2 @@ -5,7 +5,7 @@ namespace: {{ namespace }} imagepullsecrets: {{ imagepullsecrets }} dockerhub: {{ dockerhub }} -replicaCount: {{replicacount|default(1)}} +replicaCount: {{telemetry_replicacount|default(1)}} repository: {{telemetry_repository|default('telemetry-service')}} image_tag: {{image_tag }} resources: diff --git a/kubernetes/helm_charts/core/userorg/values.j2 b/kubernetes/helm_charts/core/userorg/values.j2 index 243187bb6..405688067 100644 --- a/kubernetes/helm_charts/core/userorg/values.j2 +++ b/kubernetes/helm_charts/core/userorg/values.j2 @@ -4,7 +4,7 @@ namespace: {{ namespace }} imagepullsecrets: {{ imagepullsecrets }} dockerhub: {{ dockerhub }} -replicaCount: {{replicacount|default(1)}} +replicaCount: {{userorg_replicacount|default(1)}} repository: {{userorg_repository|default('user_org_service')}} image_tag: {{image_tag }} resources: From e8a535c9870bf46dd0b5d457a878258046177186 Mon Sep 17 00:00:00 2001 From: Mahesh Kumar Gangula Date: Mon, 25 Nov 2019 12:01:06 +0530 Subject: [PATCH 0398/2894] Issue #SC-1423 feat: rename learning-service to content-service --- ansible/roles/stack-sunbird/tasks/content-service.yml | 9 +++++++++ ansible/roles/stack-sunbird/tasks/learning-service.yml | 9 --------- ansible/roles/stack-sunbird/tasks/main.yml | 4 ++-- ..._learning-service.env => sunbird_content-service.env} | 0 pipelines/deploy/{learning => content}/Jenkinsfile | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) create mode 100644 ansible/roles/stack-sunbird/tasks/content-service.yml delete mode 100644 ansible/roles/stack-sunbird/tasks/learning-service.yml rename ansible/roles/stack-sunbird/templates/{sunbird_learning-service.env => sunbird_content-service.env} (100%) rename pipelines/deploy/{learning => content}/Jenkinsfile (88%) diff --git a/ansible/roles/stack-sunbird/tasks/content-service.yml b/ansible/roles/stack-sunbird/tasks/content-service.yml new file mode 100644 index 000000000..2e6cc1318 --- /dev/null +++ b/ansible/roles/stack-sunbird/tasks/content-service.yml @@ -0,0 +1,9 @@ +--- +- name: Remove content-service + shell: "docker service rm content-service" + ignore_errors: yes + +- name: Deploy content-service + shell: "docker service create --with-registry-auth --replicas {{ learner_replicas }} -p 9696:9000 --name content-service --hostname content-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- content-service:9000/health || exit 1' --health-timeout 3s --health-retries 3 --network application_default --env-file /home/deployer/env/sunbird_content-service.env {{hub_org}}/{{image_name}}:{{image_tag}}" + args: + chdir: /home/deployer/stack \ No newline at end of file diff --git a/ansible/roles/stack-sunbird/tasks/learning-service.yml b/ansible/roles/stack-sunbird/tasks/learning-service.yml deleted file mode 100644 index 4c2aa1bb4..000000000 --- a/ansible/roles/stack-sunbird/tasks/learning-service.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -- name: Remove learning service - shell: "docker service rm learning-service" - ignore_errors: yes - -- name: Deploy learning service - shell: "docker service create --with-registry-auth --replicas {{ learner_replicas }} -p 9696:9000 --name learning-service --hostname learning-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- learning-service:9000/health || exit 1' --health-timeout 3s --health-retries 3 --network application_default --env-file /home/deployer/env/sunbird_learning-service.env {{hub_org}}/{{image_name}}:{{image_tag}}" - args: - chdir: /home/deployer/stack \ No newline at end of file diff --git a/ansible/roles/stack-sunbird/tasks/main.yml b/ansible/roles/stack-sunbird/tasks/main.yml index e691934b8..8c62f2aec 100644 --- a/ansible/roles/stack-sunbird/tasks/main.yml +++ b/ansible/roles/stack-sunbird/tasks/main.yml @@ -40,5 +40,5 @@ - include: telemetry_logstash_datapipeline.yml when: deploy_telemetry_logstash_datapipeline is defined - - include: learning-service.yml - when: deploy_learning is defined + - include: content-service.yml + when: deploy_content is defined diff --git a/ansible/roles/stack-sunbird/templates/sunbird_learning-service.env b/ansible/roles/stack-sunbird/templates/sunbird_content-service.env similarity index 100% rename from ansible/roles/stack-sunbird/templates/sunbird_learning-service.env rename to ansible/roles/stack-sunbird/templates/sunbird_content-service.env diff --git a/pipelines/deploy/learning/Jenkinsfile b/pipelines/deploy/content/Jenkinsfile similarity index 88% rename from pipelines/deploy/learning/Jenkinsfile rename to pipelines/deploy/content/Jenkinsfile index e440154d5..0641f390b 100644 --- a/pipelines/deploy/learning/Jenkinsfile +++ b/pipelines/deploy/content/Jenkinsfile @@ -10,7 +10,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=learning-service deploy_learning=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=content-service deploy_content=True\" --vault-password-file /var/lib/jenkins/secrets/vault-pass" values.put('currentWs', currentWs) values.put('ansiblePlaybook', ansiblePlaybook) values.put('ansibleExtraArgs', ansibleExtraArgs) From e37bb50819252d561cc828e81a01061220040cbb Mon Sep 17 00:00:00 2001 From: Harikumar Palemkota Date: Mon, 25 Nov 2019 12:36:25 +0530 Subject: [PATCH 0399/2894] Issue #SC-1498 added the env variables for cert-service to enable license path --- .../roles/stack-sunbird/templates/sunbird_cert-service.env | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ansible/roles/stack-sunbird/templates/sunbird_cert-service.env b/ansible/roles/stack-sunbird/templates/sunbird_cert-service.env index 8bbafae36..cc84b2f0e 100644 --- a/ansible/roles/stack-sunbird/templates/sunbird_cert-service.env +++ b/ansible/roles/stack-sunbird/templates/sunbird_cert-service.env @@ -5,4 +5,6 @@ AZURE_STORAGE_KEY={{sunbird_azure_storage_account}} 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={{sunbird_es_host}}:{{sunbird_es_http_port}} \ No newline at end of file +es_conn_info={{sunbird_es_host}}:{{sunbird_es_http_port}} +ITEXT_LICENSE_ENABLED=true +ITEXT_LICENSE_PATH=/home/sunbird/itext_trail_license.xml From 623261dd34cd1099ccaf0b21de9fe8c818735465 Mon Sep 17 00:00:00 2001 From: G33tha Date: Mon, 25 Nov 2019 15:40:55 +0530 Subject: [PATCH 0400/2894] Issue #000 feat: rename content-service --- .../core/{content => knowledgemw}/.helmignore | 0 .../core/{content => knowledgemw}/Chart.yaml | 2 +- .../templates/_helpers.tpl | 0 .../templates/configmap.yaml | 2 +- .../templates/deployment.yaml | 0 .../core/{content => knowledgemw}/values.j2 | 16 ++++++++-------- 6 files changed, 10 insertions(+), 10 deletions(-) rename kubernetes/helm_charts/core/{content => knowledgemw}/.helmignore (100%) rename kubernetes/helm_charts/core/{content => knowledgemw}/Chart.yaml (82%) rename kubernetes/helm_charts/core/{content => knowledgemw}/templates/_helpers.tpl (100%) rename kubernetes/helm_charts/core/{content => knowledgemw}/templates/configmap.yaml (84%) rename kubernetes/helm_charts/core/{content => knowledgemw}/templates/deployment.yaml (100%) rename kubernetes/helm_charts/core/{content => knowledgemw}/values.j2 (89%) diff --git a/kubernetes/helm_charts/core/content/.helmignore b/kubernetes/helm_charts/core/knowledgemw/.helmignore similarity index 100% rename from kubernetes/helm_charts/core/content/.helmignore rename to kubernetes/helm_charts/core/knowledgemw/.helmignore diff --git a/kubernetes/helm_charts/core/content/Chart.yaml b/kubernetes/helm_charts/core/knowledgemw/Chart.yaml similarity index 82% rename from kubernetes/helm_charts/core/content/Chart.yaml rename to kubernetes/helm_charts/core/knowledgemw/Chart.yaml index dbf9d485c..e1b669a8d 100644 --- a/kubernetes/helm_charts/core/content/Chart.yaml +++ b/kubernetes/helm_charts/core/knowledgemw/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v1 appVersion: "1.0" description: A Helm chart for Kubernetes -name: content +name: knowledge-mw version: 0.1.0 diff --git a/kubernetes/helm_charts/core/content/templates/_helpers.tpl b/kubernetes/helm_charts/core/knowledgemw/templates/_helpers.tpl similarity index 100% rename from kubernetes/helm_charts/core/content/templates/_helpers.tpl rename to kubernetes/helm_charts/core/knowledgemw/templates/_helpers.tpl diff --git a/kubernetes/helm_charts/core/content/templates/configmap.yaml b/kubernetes/helm_charts/core/knowledgemw/templates/configmap.yaml similarity index 84% rename from kubernetes/helm_charts/core/content/templates/configmap.yaml rename to kubernetes/helm_charts/core/knowledgemw/templates/configmap.yaml index 9c597330a..3fb96d3c5 100644 --- a/kubernetes/helm_charts/core/content/templates/configmap.yaml +++ b/kubernetes/helm_charts/core/knowledgemw/templates/configmap.yaml @@ -1,6 +1,6 @@ apiVersion: v1 data: - {{- range $key, $val := .Values.contentenv }} + {{- range $key, $val := .Values.knowledgemwenv }} {{ $key }}: {{ $val }} {{- end }} sunbird_cassandra_replication_strategy: {{ .Values.sunbird_cassandra_replication_strategy | toJson }} diff --git a/kubernetes/helm_charts/core/content/templates/deployment.yaml b/kubernetes/helm_charts/core/knowledgemw/templates/deployment.yaml similarity index 100% rename from kubernetes/helm_charts/core/content/templates/deployment.yaml rename to kubernetes/helm_charts/core/knowledgemw/templates/deployment.yaml diff --git a/kubernetes/helm_charts/core/content/values.j2 b/kubernetes/helm_charts/core/knowledgemw/values.j2 similarity index 89% rename from kubernetes/helm_charts/core/content/values.j2 rename to kubernetes/helm_charts/core/knowledgemw/values.j2 index 5ba64037e..8d1176548 100644 --- a/kubernetes/helm_charts/core/content/values.j2 +++ b/kubernetes/helm_charts/core/knowledgemw/values.j2 @@ -1,19 +1,19 @@ -### Default variable file for content-service ### +### Default variable file for knowledge_mw service ### namespace: {{ namespace }} imagepullsecrets: {{ imagepullsecrets }} dockerhub: {{ dockerhub }} -replicaCount: {{content_replicacount|default(1)}} -repository: {{content_repository|default('knowledge-mw-service')}} +replicaCount: {{knowledge_mw_replicacount|default(1)}} +repository: {{knowledge_mw_repository|default('knowledge-mw-service')}} image_tag: {{ image_tag }} resources: requests: - cpu: {{content_service_cpu_req|default('50m')}} - memory: {{content_service_mem_req|default('50Mi')}} + cpu: {{knowledge_mw_service_cpu_req|default('50m')}} + memory: {{knowledge_mw_service_mem_req|default('50Mi')}} limits: - cpu: {{content_service_cpu_limit|default('1')}} - memory: {{content_service_mem_limit|default('256Mi')}} + cpu: {{knowledge_mw_service_cpu_limit|default('1')}} + memory: {{knowledge_mw_service_mem_limit|default('256Mi')}} network: port: 5000 targetport: 5000 @@ -22,7 +22,7 @@ strategy: maxsurge: 1 maxunavailable: 0 -contentenv: +knowledgemwenv: sunbird_content_plugin_base_url: {{sunbird_ekstep_proxy_base_url}} sunbird_learner_service_api_key: {{sunbird_api_auth_token}} sunbird_learner_service_base_url: "{{sunbird_apimanager_service_base_url}}/" From ed2334f7977cf165064a99207b3f645dd4007e3e Mon Sep 17 00:00:00 2001 From: anmol2302 Date: Mon, 25 Nov 2019 17:43:22 +0530 Subject: [PATCH 0401/2894] Issue#SC-1497 remove private migrate API --- ansible/roles/kong-api/defaults/main.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/ansible/roles/kong-api/defaults/main.yml b/ansible/roles/kong-api/defaults/main.yml index c7fc7220f..d3cb96170 100644 --- a/ansible/roles/kong-api/defaults/main.yml +++ b/ansible/roles/kong-api/defaults/main.yml @@ -3900,17 +3900,6 @@ kong_apis: - {name: 'acl', config.whitelist: 'locationAdmin'} - {name: 'rate-limiting', config.policy: "local", config.hour: "{{ medium_rate_limit_per_hour }}"} - {name: 'request-size-limiting', config.allowed_payload_size: "{{ small_request_size_limit }}" } - - name: "migrateUser" - uris: "{{ user_service_prefix }}/v1/migrate" - upstream_url: "{{ learning_service_url }}/private/user/v1/migrate" - strip_uri: true - plugins: - - {name: 'jwt'} - - {name: 'cors'} - - "{{ statsd_pulgin }}" - - {name: 'acl', config.whitelist: 'publicUser'} - - {name: 'rate-limiting', config.policy: "local", config.hour: "{{ medium_rate_limit_per_hour }}"} - - {name: 'request-size-limiting', config.allowed_payload_size: "{{ small_request_size_limit }}" } - name: "privateUserRead" uris: "{{ user_service_prefix }}/private/v1/read" upstream_url: "{{ learning_service_url }}/private/user/v1/read" From 134c4284695fab4a0eb1d789b020b67787971b10 Mon Sep 17 00:00:00 2001 From: anmol2302 Date: Mon, 25 Nov 2019 17:44:39 +0530 Subject: [PATCH 0402/2894] Issue#SC-1497 remove private migrate API --- ansible/inventory/env/group_vars/all.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/inventory/env/group_vars/all.yml b/ansible/inventory/env/group_vars/all.yml index e4d5bc960..59d1e7023 100644 --- a/ansible/inventory/env/group_vars/all.yml +++ b/ansible/inventory/env/group_vars/all.yml @@ -678,7 +678,7 @@ kafka_assessment_topic: "{{env_name}}.telemetry.assess" sunbird_portal_azure_storage_account: "{{sunbird_azure_storage_account}}" sunbird_portal_azure_storage_key: "{{sunbird_azure_storage_key}}" sunbird_device_api: "{{proto}}://{{ proxy_server_name }}/api/" -sunbird_quartz_shadow_user_migration_timer: "0 0/5 * 1/1 * ? *" +sunbird_quartz_shadow_user_migration_timer: "0 0 1 1/1 * ? *" # Learning-Service lp_cassandra_connection: "{{groups['cassandra']|join(':9042,')}}:9042" From 4bb3e56003816118d7c8cebbe49212562b94cdea Mon Sep 17 00:00:00 2001 From: G33tha Date: Mon, 25 Nov 2019 18:54:41 +0530 Subject: [PATCH 0403/2894] Issue #000 feat: rename content-service --- ansible/inventory/env/group_vars/all.yml | 2 +- kubernetes/helm_charts/core/learner/values.j2 | 6 +++--- kubernetes/helm_charts/core/lms/values.j2 | 6 +++--- kubernetes/helm_charts/core/player/values.j2 | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ansible/inventory/env/group_vars/all.yml b/ansible/inventory/env/group_vars/all.yml index fdfc526a2..7fc790e4b 100644 --- a/ansible/inventory/env/group_vars/all.yml +++ b/ansible/inventory/env/group_vars/all.yml @@ -683,7 +683,7 @@ sunbird_portal_azure_storage_key: "{{sunbird_azure_storage_key}}" sunbird_apimanager_service_base_url: "http://kong.{{namespace}}.svc.cluster.local:8000" sunbird_telemetry_service_url: "http://telemetry-service.{{namespace}}.svc.cluster.local:9001" -sunbird_content_service_url: "http://content-service.{{namespace}}.svc.cluster.local:5000" +sunbird_knowledge_mw_service_url: "http://knowledge-mw-service.{{namespace}}.svc.cluster.local:5000" sunbird_cert_service_url: "http://cert-service.{{namespace}}.svc.cluster.local:9000" sunbird_learner_service_url: "http://learner-service.{{namespace}}.svc.cluster.local:9000" diff --git a/kubernetes/helm_charts/core/learner/values.j2 b/kubernetes/helm_charts/core/learner/values.j2 index 1ee9ecbcb..ff2242683 100644 --- a/kubernetes/helm_charts/core/learner/values.j2 +++ b/kubernetes/helm_charts/core/learner/values.j2 @@ -80,15 +80,15 @@ sunbird_cassandra_host: {{groups['cassandra']|join(',')}} sunbird_badger_baseurl: http://badger-service:8004 sunbird_remote_req_router_path: akka.tcp://SunbirdMWSystem@actor-service:8088/user/RequestRouter sunbird_remote_bg_req_router_path: akka.tcp://SunbirdMWSystem@actor-service:8088/user/BackgroundRequestRouter - sunbird_api_base_url: {{sunbird_content_service_url}} + sunbird_api_base_url: {{sunbird_knowledge_mw_service_url}} sunbird_authorization: {{sunbird_api_auth_token}} telemetry_pdata_id: {{sunbird_telemetry_pdata_id}} telemetry_pdata_pid: learner-service sunbird_telemetry_base_url: {{sunbird_telemetry_service_url}} telemetry_queue_threshold_value: '"100"' sunbird_default_channel: {{sunbird_default_channel}} - sunbird_api_mgr_base_url: {{sunbird_content_service_url}} - sunbird_cs_base_url: {{sunbird_content_service_url}} + sunbird_api_mgr_base_url: {{sunbird_knowledge_mw_service_url}} + sunbird_cs_base_url: {{sunbird_knowledge_mw_service_url}} sunbird_cs_search_path: /v1/content/search sunbird_user_bulk_upload_size: '"{{sunbird_user_bulk_upload_size}}"' diff --git a/kubernetes/helm_charts/core/lms/values.j2 b/kubernetes/helm_charts/core/lms/values.j2 index 47e773352..c0a8bf287 100644 --- a/kubernetes/helm_charts/core/lms/values.j2 +++ b/kubernetes/helm_charts/core/lms/values.j2 @@ -79,15 +79,15 @@ sunbird_cassandra_host: {{groups['cassandra']|join(',')}} sunbird_badger_baseurl: http://badger-service:8004 sunbird_remote_req_router_path: akka.tcp://SunbirdMWSystem@actor-service:8088/user/RequestRouter sunbird_remote_bg_req_router_path: akka.tcp://SunbirdMWSystem@actor-service:8088/user/BackgroundRequestRouter - sunbird_api_base_url: {{sunbird_content_service_url}} + sunbird_api_base_url: {{sunbird_knowledge_mw_service_url}} sunbird_authorization: {{sunbird_api_auth_token}} telemetry_pdata_id: {{sunbird_telemetry_pdata_id}} telemetry_pdata_pid: lms-service sunbird_telemetry_base_url: sunbird_telemetry_service_url telemetry_queue_threshold_value: '"100"' sunbird_default_channel: {{sunbird_default_channel}} - sunbird_api_mgr_base_url: {{sunbird_content_service_url}} - sunbird_cs_base_url: {{sunbird_content_service_url}} + sunbird_api_mgr_base_url: {{sunbird_knowledge_mw_service_url}} + sunbird_cs_base_url: {{sunbird_knowledge_mw_service_url}} sunbird_cs_search_path: /v1/content/search sunbird_user_bulk_upload_size: '"{{sunbird_user_bulk_upload_size}}"' diff --git a/kubernetes/helm_charts/core/player/values.j2 b/kubernetes/helm_charts/core/player/values.j2 index 149da3fa4..70adbb9de 100644 --- a/kubernetes/helm_charts/core/player/values.j2 +++ b/kubernetes/helm_charts/core/player/values.j2 @@ -28,7 +28,7 @@ playerenv: sunbird_port: '"3000"' sunbird_content_player_url: {{sunbird_apimanager_service_base_url}} sunbird_learner_player_url: {{sunbird_apimanager_service_base_url}} - sunbird_content_proxy_url: {{sunbird_content_service_url}} + sunbird_content_proxy_url: {{sunbird_knowledge_mw_service_url}} sunbird_echo_api_url: {{sunbird_echo_api_url}} sunbird_autocreate_trampoline_user: '"false"' sunbird_portal_realm: {{keycloak_realm}} From eae0e0154307dcfb826f352a35501cf7f6f2b461 Mon Sep 17 00:00:00 2001 From: G33tha Date: Tue, 26 Nov 2019 10:24:52 +0530 Subject: [PATCH 0404/2894] Issue #000 feat: added new content service hel charts --- .../helm_charts/core/content/Chart.yaml | 5 ++ .../core/content/templates/configmap.yaml | 11 ++++ .../core/content/templates/deployment.yaml | 52 ++++++++++++++++++ kubernetes/helm_charts/core/content/values.j2 | 54 +++++++++++++++++++ 4 files changed, 122 insertions(+) create mode 100644 kubernetes/helm_charts/core/content/Chart.yaml create mode 100644 kubernetes/helm_charts/core/content/templates/configmap.yaml create mode 100644 kubernetes/helm_charts/core/content/templates/deployment.yaml create mode 100644 kubernetes/helm_charts/core/content/values.j2 diff --git a/kubernetes/helm_charts/core/content/Chart.yaml b/kubernetes/helm_charts/core/content/Chart.yaml new file mode 100644 index 000000000..dbf9d485c --- /dev/null +++ b/kubernetes/helm_charts/core/content/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: content +version: 0.1.0 diff --git a/kubernetes/helm_charts/core/content/templates/configmap.yaml b/kubernetes/helm_charts/core/content/templates/configmap.yaml new file mode 100644 index 000000000..0c2674fed --- /dev/null +++ b/kubernetes/helm_charts/core/content/templates/configmap.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +data: + {{- range $key, $val := .Values.contentenv }} + {{ $key }}: {{ $val }} + {{- end }} +kind: ConfigMap +metadata: + creationTimestamp: null + name: {{ .Chart.Name }}-config + namespace: {{ .Values.namespace }} + diff --git a/kubernetes/helm_charts/core/content/templates/deployment.yaml b/kubernetes/helm_charts/core/content/templates/deployment.yaml new file mode 100644 index 000000000..405e85784 --- /dev/null +++ b/kubernetes/helm_charts/core/content/templates/deployment.yaml @@ -0,0 +1,52 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Chart.Name }} + namespace: {{ .Values.namespace }} +spec: + replicas: {{ .Values.replicaCount }} + strategy: + type: {{ .Values.strategy.type }} + rollingUpdate: + maxsurge: {{ .Values.strategy.maxsurge }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} + selector: + matchLabels: + app: {{ .Chart.Name }} + template: + metadata: + annotations: + readiness.status.sidecar.istio.io/applicationPorts: "" + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + labels: + app: {{ .Chart.Name }} + spec: + imagePullSecrets: + - name: {{ .Values.imagepullsecrets }} + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" + envFrom: + - configMapRef: + name: {{ .Chart.Name }}-config + resources: +{{ toYaml .Values.resources | indent 10 }} + ports: + - containerPort: {{ .Values.network.port }} + +--- +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 }} + selector: + app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/content/values.j2 b/kubernetes/helm_charts/core/content/values.j2 new file mode 100644 index 000000000..71832a4fe --- /dev/null +++ b/kubernetes/helm_charts/core/content/values.j2 @@ -0,0 +1,54 @@ +### Default variable file for cert-service ### + +namespace: {{ namespace }} +imagepullsecrets: {{ imagepullsecrets }} +dockerhub: {{ dockerhub }} + +replicaCount: {{content_replicacount|default(1)}} +repository: {{content_repository|default('learning-service')}} +image_tag: {{image_tag }} +resources: + requests: + cpu: {{content_service_cpu_req|default('50m')}} + memory: {{content_service_mem_req|default('50Mi')}} + limits: + cpu: {{content_service_cpu_limit|default('1')}} + memory: {{content_service_mem_limit|default('550Mi')}} +network: + port: 9696 + targetport: 9000 +strategy: + type: RollingUpdate + maxsurge: 1 + maxunavailable: 0 + +contentenv: + cassandra.lp.connection: {{ lp_cassandra_connection }} + cassandra.lpa.connection: {{ dp_cassandra_connection }} + redis.host: localhost + redis.port: 6379 + redis.maxConnections: 128 + MAX_CONTENT_PACKAGE_FILE_SIZE_LIMIT: 52428800 + MAX_ASSET_FILE_SIZE_LIMIT: 20971520 + RETRY_ASSET_DOWNLOAD_COUNT: 1 + cloud_storage.env: dev + graph.dir: /data/graphDB + akka.request_timeout: 30 + environment.id: {{ environment_id }} + graph.ids: ["domain"] + graph.passport.key.base: {{ graph_passport_key }} + route.domain: {{ learning_neo4j_bolt_url }} + route.bolt.write.domain: {{ learning_write_elb_url }} + route.bolt.read.domain: {{ learning_read_elb_url }} + route.all: {{ language_neo4j_bolt_url }} + route.bolt.write.all: {{ language_write_elb_url }} + route.bolt.read.all: {{ language_read_elb_url }} + shard.id: {{ mw_shard_id }} + platform.auth.check.enabled: false + platform.cache.ttl: 3600000 + telemetry_env: dev + installation.id: ekstep + channel.default: in.ekstep + content.cache.ttl: 86400 + content.cache.read: true + content.cache.hierarchy: true From e6c192daabd685bf486644d5314d9c811a4b8f5f Mon Sep 17 00:00:00 2001 From: G33tha Date: Tue, 26 Nov 2019 10:29:43 +0530 Subject: [PATCH 0405/2894] Update all.yml --- ansible/inventory/env/group_vars/all.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ansible/inventory/env/group_vars/all.yml b/ansible/inventory/env/group_vars/all.yml index 7fc790e4b..008056276 100644 --- a/ansible/inventory/env/group_vars/all.yml +++ b/ansible/inventory/env/group_vars/all.yml @@ -679,6 +679,20 @@ kafka_assessment_topic: "{{env_name}}.telemetry.assess" sunbird_portal_azure_storage_account: "{{sunbird_azure_storage_account}}" sunbird_portal_azure_storage_key: "{{sunbird_azure_storage_key}}" + +# Learning-Service +lp_cassandra_connection: "{{groups['cassandra']|join(':9042,')}}:9042" +dp_cassandra_connection: "{{ groups['dp-cassandra'][0] }}:9042" +environment_id: 10000000 +graph_passport_key: abc123 +learning_neo4j_bolt_url: bolt://{{ groups['learning-neo4j-node1'][0] }}:7687 +language_neo4j_bolt_url: bolt://{{ groups['learning-neo4j-node1'][0] }}:8687 +learning_read_elb_url: bolt://{{ groups['learning-neo4j-node1'][0] }}:7687 +learning_write_elb_url: bolt://{{ groups['learning-neo4j-node1'][0] }}:7687 +language_read_elb_url: bolt://{{ groups['learning-neo4j-node1'][0] }}:8687 +language_write_elb_url: bolt://{{ groups['learning-neo4j-node1'][0] }}:8687 +mw_shard_id: 1 + ########### kubernetes variables ############## sunbird_apimanager_service_base_url: "http://kong.{{namespace}}.svc.cluster.local:8000" From d55300ba1007e8b56c35957b2e68ec57b18440f5 Mon Sep 17 00:00:00 2001 From: G33tha Date: Tue, 26 Nov 2019 10:34:51 +0530 Subject: [PATCH 0406/2894] Issue #000 feat: updated host file --- kubernetes/helm_charts/core/content/values.j2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kubernetes/helm_charts/core/content/values.j2 b/kubernetes/helm_charts/core/content/values.j2 index 71832a4fe..b536db9f4 100644 --- a/kubernetes/helm_charts/core/content/values.j2 +++ b/kubernetes/helm_charts/core/content/values.j2 @@ -44,11 +44,11 @@ contentenv: route.bolt.write.all: {{ language_write_elb_url }} route.bolt.read.all: {{ language_read_elb_url }} shard.id: {{ mw_shard_id }} - platform.auth.check.enabled: false + platform.auth.check.enabled: "'false'" platform.cache.ttl: 3600000 telemetry_env: dev installation.id: ekstep channel.default: in.ekstep content.cache.ttl: 86400 - content.cache.read: true - content.cache.hierarchy: true + content.cache.read: "'true'" + content.cache.hierarchy: "'true'" From 01da60801042aa4c73274f94f4434dd789204d38 Mon Sep 17 00:00:00 2001 From: Harikumar Palemkota Date: Tue, 26 Nov 2019 10:55:32 +0530 Subject: [PATCH 0407/2894] Issue #SC-1498 changes es connection value --- ansible/roles/stack-sunbird/templates/sunbird_cert-service.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/stack-sunbird/templates/sunbird_cert-service.env b/ansible/roles/stack-sunbird/templates/sunbird_cert-service.env index cc84b2f0e..dd9527082 100644 --- a/ansible/roles/stack-sunbird/templates/sunbird_cert-service.env +++ b/ansible/roles/stack-sunbird/templates/sunbird_cert-service.env @@ -5,6 +5,6 @@ AZURE_STORAGE_KEY={{sunbird_azure_storage_account}} 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={{sunbird_es_host}}:{{sunbird_es_http_port}} +es_conn_info={{groups['es']|join(':9200,')}}:9200 ITEXT_LICENSE_ENABLED=true ITEXT_LICENSE_PATH=/home/sunbird/itext_trail_license.xml From b9829c8a61e98061c370d56d95cc54db3a7a1392 Mon Sep 17 00:00:00 2001 From: G33tha Date: Tue, 26 Nov 2019 11:04:57 +0530 Subject: [PATCH 0408/2894] Issue #000 feat: updated content helm charts --- kubernetes/helm_charts/core/content/values.j2 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kubernetes/helm_charts/core/content/values.j2 b/kubernetes/helm_charts/core/content/values.j2 index b536db9f4..031e77de2 100644 --- a/kubernetes/helm_charts/core/content/values.j2 +++ b/kubernetes/helm_charts/core/content/values.j2 @@ -28,14 +28,14 @@ contentenv: redis.host: localhost redis.port: 6379 redis.maxConnections: 128 - MAX_CONTENT_PACKAGE_FILE_SIZE_LIMIT: 52428800 - MAX_ASSET_FILE_SIZE_LIMIT: 20971520 + MAX_CONTENT_PACKAGE_FILE_SIZE_LIMIT: "52428800" + MAX_ASSET_FILE_SIZE_LIMIT: "20971520" RETRY_ASSET_DOWNLOAD_COUNT: 1 cloud_storage.env: dev graph.dir: /data/graphDB akka.request_timeout: 30 - environment.id: {{ environment_id }} - graph.ids: ["domain"] + environment.id: "{{ environment_id }}" + graph.ids: '["domain"]' graph.passport.key.base: {{ graph_passport_key }} route.domain: {{ learning_neo4j_bolt_url }} route.bolt.write.domain: {{ learning_write_elb_url }} @@ -45,7 +45,7 @@ contentenv: route.bolt.read.all: {{ language_read_elb_url }} shard.id: {{ mw_shard_id }} platform.auth.check.enabled: "'false'" - platform.cache.ttl: 3600000 + platform.cache.ttl: "3600000" telemetry_env: dev installation.id: ekstep channel.default: in.ekstep From 544ec4fc74eeec51885629d49d159d0a3aaecfab Mon Sep 17 00:00:00 2001 From: G33tha Date: Tue, 26 Nov 2019 14:16:45 +0530 Subject: [PATCH 0409/2894] Issue #000 feat: updated content helm charts --- .../core/content/templates/configmap.yaml | 1 + kubernetes/helm_charts/core/content/values.j2 | 21 +++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/kubernetes/helm_charts/core/content/templates/configmap.yaml b/kubernetes/helm_charts/core/content/templates/configmap.yaml index 0c2674fed..8341439ba 100644 --- a/kubernetes/helm_charts/core/content/templates/configmap.yaml +++ b/kubernetes/helm_charts/core/content/templates/configmap.yaml @@ -3,6 +3,7 @@ data: {{- range $key, $val := .Values.contentenv }} {{ $key }}: {{ $val }} {{- end }} + graph.ids: {{ ["domain"] | toJson }} kind: ConfigMap metadata: creationTimestamp: null diff --git a/kubernetes/helm_charts/core/content/values.j2 b/kubernetes/helm_charts/core/content/values.j2 index 031e77de2..7d00f4fae 100644 --- a/kubernetes/helm_charts/core/content/values.j2 +++ b/kubernetes/helm_charts/core/content/values.j2 @@ -26,16 +26,15 @@ contentenv: cassandra.lp.connection: {{ lp_cassandra_connection }} cassandra.lpa.connection: {{ dp_cassandra_connection }} redis.host: localhost - redis.port: 6379 - redis.maxConnections: 128 - MAX_CONTENT_PACKAGE_FILE_SIZE_LIMIT: "52428800" - MAX_ASSET_FILE_SIZE_LIMIT: "20971520" - RETRY_ASSET_DOWNLOAD_COUNT: 1 + redis.port: '"6379"' + redis.maxConnections: '"128"' + MAX_CONTENT_PACKAGE_FILE_SIZE_LIMIT: '"52428800"' + MAX_ASSET_FILE_SIZE_LIMIT: '"20971520"' + RETRY_ASSET_DOWNLOAD_COUNT: '"1"' cloud_storage.env: dev graph.dir: /data/graphDB - akka.request_timeout: 30 - environment.id: "{{ environment_id }}" - graph.ids: '["domain"]' + akka.request_timeout: '"30"' + environment.id: '"{{ environment_id }}"' graph.passport.key.base: {{ graph_passport_key }} route.domain: {{ learning_neo4j_bolt_url }} route.bolt.write.domain: {{ learning_write_elb_url }} @@ -43,12 +42,12 @@ contentenv: route.all: {{ language_neo4j_bolt_url }} route.bolt.write.all: {{ language_write_elb_url }} route.bolt.read.all: {{ language_read_elb_url }} - shard.id: {{ mw_shard_id }} + shard.id: '"{{ mw_shard_id }}"' platform.auth.check.enabled: "'false'" - platform.cache.ttl: "3600000" + platform.cache.ttl: '"3600000"' telemetry_env: dev installation.id: ekstep channel.default: in.ekstep - content.cache.ttl: 86400 + content.cache.ttl: '"86400"' content.cache.read: "'true'" content.cache.hierarchy: "'true'" From 6713a511333b8971a9dc44d59d5429450f45937f Mon Sep 17 00:00:00 2001 From: G33tha Date: Tue, 26 Nov 2019 14:27:08 +0530 Subject: [PATCH 0410/2894] Issue #000 feat: updated content helm charts --- kubernetes/helm_charts/core/content/templates/configmap.yaml | 2 +- kubernetes/helm_charts/core/content/values.j2 | 2 ++ kubernetes/helm_charts/core/player/values.j2 | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/kubernetes/helm_charts/core/content/templates/configmap.yaml b/kubernetes/helm_charts/core/content/templates/configmap.yaml index 8341439ba..dd3b426b9 100644 --- a/kubernetes/helm_charts/core/content/templates/configmap.yaml +++ b/kubernetes/helm_charts/core/content/templates/configmap.yaml @@ -3,7 +3,7 @@ data: {{- range $key, $val := .Values.contentenv }} {{ $key }}: {{ $val }} {{- end }} - graph.ids: {{ ["domain"] | toJson }} + graph.ids: {{ .Values.graph_ids | toJson }} kind: ConfigMap metadata: creationTimestamp: null diff --git a/kubernetes/helm_charts/core/content/values.j2 b/kubernetes/helm_charts/core/content/values.j2 index 7d00f4fae..81f8a58ff 100644 --- a/kubernetes/helm_charts/core/content/values.j2 +++ b/kubernetes/helm_charts/core/content/values.j2 @@ -51,3 +51,5 @@ contentenv: content.cache.ttl: '"86400"' content.cache.read: "'true'" content.cache.hierarchy: "'true'" + +graph_ids: '["domain"]' diff --git a/kubernetes/helm_charts/core/player/values.j2 b/kubernetes/helm_charts/core/player/values.j2 index 70adbb9de..f52e268c7 100644 --- a/kubernetes/helm_charts/core/player/values.j2 +++ b/kubernetes/helm_charts/core/player/values.j2 @@ -97,4 +97,6 @@ sunbird_health_check_enable: '"{{sunbird_health_check_enable}}"' sunbird_android_keycloak_client_id: {{sunbird_android_keycloak_client_id}} sunbird_portal_merge_auth_server_url: {{sunbird_subdomain_keycloak_base_url | d('')}} -sunbird_cassandra_replication_strategy: '{{sunbird_cassandra_replication_strategy}}' \ No newline at end of file +sunbird_cassandra_replication_strategy: '{{sunbird_cassandra_replication_strategy}}' + +graph_ids: ["domain"] \ No newline at end of file From ef34d42559cd12652fa70e477b7dd9c1bcaf151b Mon Sep 17 00:00:00 2001 From: niharikasingh84 Date: Tue, 26 Nov 2019 17:41:05 +0530 Subject: [PATCH 0411/2894] User_Org Base URL Changes --- ansible/roles/stack-sunbird/templates/sunbird_lms-service.env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/stack-sunbird/templates/sunbird_lms-service.env b/ansible/roles/stack-sunbird/templates/sunbird_lms-service.env index 67652c19d..7d4084cf5 100644 --- a/ansible/roles/stack-sunbird/templates/sunbird_lms-service.env +++ b/ansible/roles/stack-sunbird/templates/sunbird_lms-service.env @@ -89,7 +89,7 @@ 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_gzip_enable={{sunbird_gzip_ena 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_analytics_blob_account_name}} @@ -99,7 +99,7 @@ sunbird_cache_enable={{sunbird_cache_enable | default(false)}} # Set below variables if above true sunbird_redis_host={{sunbird_redis_host}} sunbird_redis_port={{sunbird_redis_port|default(6379)}} -sunbird_user_org_api_base_url={{sunbird_user_org_api_base_url}} +sunbird_user_org_api_base_url=http://learner-service:9000 kafka_topics_instruction={{kafka_topics_instruction}} kafka_urls={{kafka_urls}} From 0ba9fdd387eb3bebda2b2a99b8f2145b29474fbe Mon Sep 17 00:00:00 2001 From: niharikasingh84 Date: Tue, 26 Nov 2019 17:43:26 +0530 Subject: [PATCH 0412/2894] User_Org Base URL Changes --- ansible/roles/stack-sunbird/templates/sunbird_lms-service.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/stack-sunbird/templates/sunbird_lms-service.env b/ansible/roles/stack-sunbird/templates/sunbird_lms-service.env index 7d4084cf5..ae94563d1 100644 --- a/ansible/roles/stack-sunbird/templates/sunbird_lms-service.env +++ b/ansible/roles/stack-sunbird/templates/sunbird_lms-service.env @@ -89,7 +89,7 @@ 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_ena +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_analytics_blob_account_name}} From ebde57c98d12ee53734af7dee6903fc190fbf040 Mon Sep 17 00:00:00 2001 From: niharikasingh84 Date: Tue, 26 Nov 2019 17:57:44 +0530 Subject: [PATCH 0413/2894] Content Service Base URL Changes --- ansible/roles/stack-sunbird/templates/sunbird_lms-service.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/stack-sunbird/templates/sunbird_lms-service.env b/ansible/roles/stack-sunbird/templates/sunbird_lms-service.env index ae94563d1..d694dc102 100644 --- a/ansible/roles/stack-sunbird/templates/sunbird_lms-service.env +++ b/ansible/roles/stack-sunbird/templates/sunbird_lms-service.env @@ -62,7 +62,7 @@ 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={{sunbird_cs_base_url}} +sunbird_cs_base_url=http://knowledge-mw-service:5000 sunbird_cs_search_path=/v1/content/search sunbird_env_logo_url={{sunbird_env_logo_url}} From 52c467ddc04d4ff2e22b35e8f6f5861f52554f1a Mon Sep 17 00:00:00 2001 From: Mahesh Kumar Gangula Date: Tue, 26 Nov 2019 18:10:40 +0530 Subject: [PATCH 0414/2894] Issue #000 fix: set schema base path. --- .../stack-sunbird/templates/sunbird_content-service.env | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ansible/roles/stack-sunbird/templates/sunbird_content-service.env b/ansible/roles/stack-sunbird/templates/sunbird_content-service.env index 8db5e1e1c..d5278f14a 100644 --- a/ansible/roles/stack-sunbird/templates/sunbird_content-service.env +++ b/ansible/roles/stack-sunbird/templates/sunbird_content-service.env @@ -45,4 +45,7 @@ channel.default=in.ekstep content.cache.ttl=86400 content.cache.read=true -content.cache.hierarchy=true \ No newline at end of file +content.cache.hierarchy=true + + +schema.base_path=https://sunbirddev.blob.core.windows.net/sunbird-content-dev/schemas/{{ env }}/ \ No newline at end of file From db6c0200aac8b3be64cb28604a47a889dad80ac5 Mon Sep 17 00:00:00 2001 From: Mahesh Kumar Gangula Date: Tue, 26 Nov 2019 18:18:49 +0530 Subject: [PATCH 0415/2894] Issue #000 fix: updated container and account name as variable. --- .../roles/stack-sunbird/templates/sunbird_content-service.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/stack-sunbird/templates/sunbird_content-service.env b/ansible/roles/stack-sunbird/templates/sunbird_content-service.env index d5278f14a..67396f370 100644 --- a/ansible/roles/stack-sunbird/templates/sunbird_content-service.env +++ b/ansible/roles/stack-sunbird/templates/sunbird_content-service.env @@ -48,4 +48,4 @@ content.cache.read=true content.cache.hierarchy=true -schema.base_path=https://sunbirddev.blob.core.windows.net/sunbird-content-dev/schemas/{{ env }}/ \ No newline at end of file +schema.base_path=https://{{ azure_account_name }}.blob.core.windows.net/{{ azure_public_container }}/schemas/ \ No newline at end of file From a7f882864c080c82ffa619c90e496ffc1fa5a901 Mon Sep 17 00:00:00 2001 From: Harikumar Palemkota Date: Tue, 26 Nov 2019 18:47:42 +0530 Subject: [PATCH 0416/2894] Issue #SC-1498 changed the license enabled to false --- ansible/roles/stack-sunbird/templates/sunbird_cert-service.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/stack-sunbird/templates/sunbird_cert-service.env b/ansible/roles/stack-sunbird/templates/sunbird_cert-service.env index dd9527082..920001652 100644 --- a/ansible/roles/stack-sunbird/templates/sunbird_cert-service.env +++ b/ansible/roles/stack-sunbird/templates/sunbird_cert-service.env @@ -6,5 +6,5 @@ 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=true +ITEXT_LICENSE_ENABLED=false ITEXT_LICENSE_PATH=/home/sunbird/itext_trail_license.xml From af641193ff0dab507d3eac8f21b51a44aab5fa2c Mon Sep 17 00:00:00 2001 From: Harikumar Palemkota Date: Tue, 26 Nov 2019 18:54:37 +0530 Subject: [PATCH 0417/2894] Issue #SC-1498 changed the license enabled to false and getting the value from default.yml --- ansible/roles/stack-sunbird/defaults/main.yml | 1 + ansible/roles/stack-sunbird/templates/sunbird_cert-service.env | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ansible/roles/stack-sunbird/defaults/main.yml b/ansible/roles/stack-sunbird/defaults/main.yml index b97fac569..cff6f0bb6 100644 --- a/ansible/roles/stack-sunbird/defaults/main.yml +++ b/ansible/roles/stack-sunbird/defaults/main.yml @@ -134,3 +134,4 @@ sunbird_portal_preview_cdn_url: cdn_file_path: sunbird_portal_cdn_blob_url: desktop_app_storage_url: "https://{{sunbird_offline_azure_storage_account}}.blob.core.windows.net/{{offline_installer_container_name}}" +itext_license_enabled: false diff --git a/ansible/roles/stack-sunbird/templates/sunbird_cert-service.env b/ansible/roles/stack-sunbird/templates/sunbird_cert-service.env index 920001652..3a822922d 100644 --- a/ansible/roles/stack-sunbird/templates/sunbird_cert-service.env +++ b/ansible/roles/stack-sunbird/templates/sunbird_cert-service.env @@ -6,5 +6,5 @@ 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=false +ITEXT_LICENSE_ENABLED={{itext_license_enabled}} ITEXT_LICENSE_PATH=/home/sunbird/itext_trail_license.xml From 3cfa167617272d59264f7585bcecaadc8e86c8f6 Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Tue, 26 Nov 2019 19:15:19 +0530 Subject: [PATCH 0418/2894] fix: become yes --- ansible/docker_image_push.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/ansible/docker_image_push.yml b/ansible/docker_image_push.yml index 4c09a904c..40c7b161a 100644 --- a/ansible/docker_image_push.yml +++ b/ansible/docker_image_push.yml @@ -1,6 +1,7 @@ --- - name: "Push docker images to any docker registry" hosts: local + become: yes vars_files: - ['{{inventory_dir}}/secrets.yml'] tasks: From 2cb3cf21117610b1df57c41bb3a9013032b2784c Mon Sep 17 00:00:00 2001 From: manzarul Date: Tue, 26 Nov 2019 19:34:43 +0530 Subject: [PATCH 0419/2894] issue #SB-00 fix: changes for sunbird_cs_base_url value --- .../roles/stack-sunbird/templates/sunbird_learner-service.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/stack-sunbird/templates/sunbird_learner-service.env b/ansible/roles/stack-sunbird/templates/sunbird_learner-service.env index f24d32f01..7eb991f00 100644 --- a/ansible/roles/stack-sunbird/templates/sunbird_learner-service.env +++ b/ansible/roles/stack-sunbird/templates/sunbird_learner-service.env @@ -62,7 +62,7 @@ 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={{sunbird_cs_base_url}} +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}} From eed43828646d037dea1ba0cce9b902b9dd78dcb6 Mon Sep 17 00:00:00 2001 From: SMY ALTAMASH <30286162+SMYALTAMASH@users.noreply.github.com> Date: Tue, 26 Nov 2019 19:57:58 +0530 Subject: [PATCH 0420/2894] Remove trailing slash at the end of variable --- .../roles/stack-sunbird/templates/sunbird_learner-service.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/stack-sunbird/templates/sunbird_learner-service.env b/ansible/roles/stack-sunbird/templates/sunbird_learner-service.env index 7eb991f00..2ae8a5af8 100644 --- a/ansible/roles/stack-sunbird/templates/sunbird_learner-service.env +++ b/ansible/roles/stack-sunbird/templates/sunbird_learner-service.env @@ -62,7 +62,7 @@ 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_base_url=http://knowledge-mw-service:5000 sunbird_cs_search_path=/v1/content/search sunbird_user_bulk_upload_size={{sunbird_user_bulk_upload_size}} From fc5ecd65a7b1ec50f3e7c9756185e77a61525382 Mon Sep 17 00:00:00 2001 From: G33tha Date: Wed, 27 Nov 2019 12:20:44 +0530 Subject: [PATCH 0421/2894] fix: revert incorrect merge --- ansible/api-manager.yml | 8 +- ansible/artifacts-upload.yml | 3 +- ansible/docker_image_push.yml | 5 +- ansible/inventory/env/group_vars/all.yml | 19 +- ansible/keycloak.yml | 1 - ansible/roles/kong-api/defaults/main.yml | 18 +- ansible/roles/kong-api/tasks/main.yml | 18 +- deploy/jenkins/jenkins-server-setup.sh | 18 - images/openbadger/Dockerfile | 2 +- images/openbadger/configure.sh | 2 +- kubernetes/ansible/badger.yml | 9 - kubernetes/ansible/bootstrap.yaml | 35 - kubernetes/ansible/deploy_core_service.yml | 9 - kubernetes/ansible/istio.yaml | 7 - kubernetes/ansible/monitoring.yaml | 9 - kubernetes/ansible/networkconfig.yaml | 9 - kubernetes/ansible/player.yml | 9 - .../roles/deploy-badger/defaults/main.yml | 1 - .../roles/deploy-badger/tasks/main.yml | 51 - .../deploy-badger/templates/configmap.j2 | 158 - .../roles/deploy-badger/templates/user.j2 | 3 - .../roles/deploy-player/tasks/main.yml | 33 - kubernetes/ansible/roles/istio/README.md | 38 - .../ansible/roles/istio/defaults/main.yml | 4 - .../ansible/roles/istio/handlers/main.yml | 2 - kubernetes/ansible/roles/istio/meta/main.yml | 57 - kubernetes/ansible/roles/istio/tasks/main.yml | 18 - .../ansible/roles/istio/templates/istio.yaml | 25 - .../ansible/roles/istio/tests/inventory | 2 - kubernetes/ansible/roles/istio/tests/test.yml | 5 - kubernetes/ansible/roles/istio/vars/main.yml | 2 - kubernetes/ansible/roles/proxy/README.md | 38 - .../ansible/roles/proxy/defaults/main.yml | 7 - kubernetes/ansible/roles/proxy/tasks/main.yml | 30 - .../roles/proxy/templates/gateway.yaml | 22 - .../roles/proxy/templates/serviceentry.yaml | 18 - .../roles/proxy/templates/virtualservice.yaml | 154 - .../roles/sunbird-deploy/defaults/main.yml | 1 - .../roles/sunbird-deploy/tasks/main.yml | 10 - .../roles/sunbird-monitoring/README.md | 49 - .../sunbird-monitoring/defaults/main.yml | 147 - .../sunbird-monitoring/handlers/main.yml | 2 - .../roles/sunbird-monitoring/meta/main.yml | 57 - .../roles/sunbird-monitoring/tasks/main.yml | 21 - .../templates/additional-scrape-configs.yaml | 180 - .../templates/alertrules.yaml | 4 - .../templates/blackbox-exporter.yaml | 0 .../templates/cassandra-jmx-exporter.yaml | 0 .../templates/elasticsearch-exporter.yaml | 2 - .../templates/kafka-lag-exporter.yaml | 2 - .../sunbird-monitoring/templates/logger.yaml | 2 - .../templates/prometheus-operator.yaml | 111 - .../templates/statsd-exporter.yaml | 0 .../roles/sunbird-monitoring/tests/inventory | 2 - .../roles/sunbird-monitoring/tests/test.yml | 5 - .../roles/sunbird-monitoring/vars/main.yml | 2 - .../helm_charts/cattle-system/rancher.yaml | 76 - .../helm_charts/core/adminutils/Chart.yaml | 5 - .../core/adminutils/templates/configmap.yaml | 11 - .../core/adminutils/templates/deployment.yaml | 52 - .../helm_charts/core/adminutils/values.j2 | 34 - .../helm_charts/core/apimanager/Chart.yaml | 5 - .../apimanager/templates/apimanager_echo.yaml | 51 - .../core/apimanager/templates/configmap.yaml | 13 - .../core/apimanager/templates/deployment.yaml | 64 - .../helm_charts/core/apimanager/values.j2 | 65 - kubernetes/helm_charts/core/badger/Chart.yaml | 5 - .../core/badger/templates/deployment.yaml | 57 - kubernetes/helm_charts/core/badger/values.j2 | 23 - kubernetes/helm_charts/core/cert/Chart.yaml | 5 - .../core/cert/templates/configmap.yaml | 11 - .../core/cert/templates/deployment.yaml | 52 - kubernetes/helm_charts/core/cert/values.j2 | 34 - .../helm_charts/core/content/Chart.yaml | 5 - .../core/content/templates/configmap.yaml | 12 - .../core/content/templates/deployment.yaml | 52 - kubernetes/helm_charts/core/content/values.j2 | 55 - kubernetes/helm_charts/core/enc/Chart.yaml | 5 - .../core/enc/templates/configmap.yaml | 10 - .../core/enc/templates/deployment.yaml | 52 - kubernetes/helm_charts/core/enc/values.j2 | 38 - .../helm_charts/core/knowledgemw/.helmignore | 22 - .../helm_charts/core/knowledgemw/Chart.yaml | 5 - .../core/knowledgemw/templates/_helpers.tpl | 45 - .../core/knowledgemw/templates/configmap.yaml | 11 - .../knowledgemw/templates/deployment.yaml | 52 - .../helm_charts/core/knowledgemw/values.j2 | 79 - .../helm_charts/core/learner/.helmignore | 22 - .../helm_charts/core/learner/Chart.yaml | 5 - .../core/learner/templates/_helpers.tpl | 45 - .../core/learner/templates/configmap.yaml | 10 - .../core/learner/templates/deployment.yaml | 52 - kubernetes/helm_charts/core/learner/values.j2 | 132 - kubernetes/helm_charts/core/lms/Chart.yaml | 5 - .../core/lms/templates/configmap.yaml | 10 - .../core/lms/templates/deployment.yaml | 52 - kubernetes/helm_charts/core/lms/values.j2 | 135 - .../helm_charts/core/notification/Chart.yaml | 5 - .../notification/templates/configmap.yaml | 10 - .../notification/templates/deployment.yaml | 52 - .../helm_charts/core/notification/values.j2 | 37 - .../helm_charts/core/player/.helmignore | 22 - kubernetes/helm_charts/core/player/Chart.yaml | 5 - .../core/player/templates/_helpers.tpl | 45 - .../core/player/templates/configmap.yaml | 11 - .../core/player/templates/deployment.yaml | 64 - kubernetes/helm_charts/core/player/values.j2 | 102 - .../helm_charts/core/telemetry/.helmignore | 22 - .../helm_charts/core/telemetry/Chart.yaml | 5 - .../core/telemetry/templates/_helpers.tpl | 45 - .../core/telemetry/templates/configmap.yaml | 10 - .../core/telemetry/templates/deployment.yaml | 52 - .../helm_charts/core/telemetry/values.j2 | 32 - .../helm_charts/core/userorg/Chart.yaml | 5 - .../core/userorg/templates/configmap.yaml | 10 - .../core/userorg/templates/deployment.yaml | 52 - kubernetes/helm_charts/core/userorg/values.j2 | 44 - .../istio-system/istio-init/Chart.yaml | 13 - .../istio-system/istio-init/README.md | 77 - .../istio-system/istio-init/files/crd-10.yaml | 636 --- .../istio-system/istio-init/files/crd-11.yaml | 26 - .../istio-system/istio-init/files/crd-12.yaml | 24 - .../istio-init/files/crd-certmanager-10.yaml | 91 - .../istio-init/files/crd-certmanager-11.yaml | 80 - .../istio-init/templates/clusterrole.yaml | 11 - .../templates/clusterrolebinding.yaml | 15 - .../templates/configmap-crd-10.yaml | 8 - .../templates/configmap-crd-11.yaml | 8 - .../templates/configmap-crd-12.yaml | 8 - .../configmap-crd-certmanager-10.yaml | 10 - .../configmap-crd-certmanager-11.yaml | 10 - .../istio-init/templates/job-crd-10.yaml | 26 - .../istio-init/templates/job-crd-11.yaml | 26 - .../istio-init/templates/job-crd-12.yaml | 26 - .../templates/job-crd-certmanager-10.yaml | 28 - .../templates/job-crd-certmanager-11.yaml | 28 - .../istio-init/templates/serviceaccount.yaml | 15 - .../istio-system/istio-init/values.yaml | 16 - .../helm_charts/istio-system/istio/Chart.yaml | 17 - .../helm_charts/istio-system/istio/README.md | 140 - .../istio/charts/certmanager/Chart.yaml | 6 - .../charts/certmanager/templates/NOTES.txt | 6 - .../charts/certmanager/templates/_helpers.tpl | 32 - .../certmanager/templates/deployment.yaml | 69 - .../charts/certmanager/templates/issuer.yaml | 37 - .../templates/poddisruptionbudget.yaml | 24 - .../charts/certmanager/templates/rbac.yaml | 37 - .../certmanager/templates/serviceaccount.yaml | 16 - .../istio/charts/certmanager/values.yaml | 34 - .../istio/charts/galley/Chart.yaml | 13 - .../charts/galley/templates/_helpers.tpl | 32 - .../charts/galley/templates/clusterrole.yaml | 42 - .../galley/templates/clusterrolebinding.yaml | 17 - .../charts/galley/templates/configmap.yaml | 16 - .../charts/galley/templates/deployment.yaml | 127 - .../galley/templates/poddisruptionbudget.yaml | 22 - .../charts/galley/templates/service.yaml | 21 - .../galley/templates/serviceaccount.yaml | 16 - .../validatingwebhookconfiguration.yaml.tpl | 118 - .../istio/charts/galley/values.yaml | 31 - .../istio/charts/gateways/Chart.yaml | 15 - .../charts/gateways/templates/_affinity.tpl | 93 - .../charts/gateways/templates/_helpers.tpl | 32 - .../charts/gateways/templates/autoscale.yaml | 31 - .../charts/gateways/templates/deployment.yaml | 330 -- .../templates/poddisruptionbudget.yaml | 31 - .../gateways/templates/preconfigured.yaml | 239 -- .../istio/charts/gateways/templates/role.yaml | 18 - .../gateways/templates/rolebindings.yaml | 21 - .../charts/gateways/templates/service.yaml | 59 - .../gateways/templates/serviceaccount.yaml | 24 - .../istio/charts/gateways/values.yaml | 287 -- .../istio/charts/grafana/Chart.yaml | 6 - .../grafana/dashboards/citadel-dashboard.json | 1089 ------ .../grafana/dashboards/galley-dashboard.json | 1819 --------- .../dashboards/istio-mesh-dashboard.json | 1225 ------ .../istio-performance-dashboard.json | 1822 --------- .../dashboards/istio-service-dashboard.json | 2601 ------------- .../dashboards/istio-workload-dashboard.json | 2303 ----------- .../grafana/dashboards/mixer-dashboard.json | 1808 --------- .../grafana/dashboards/pilot-dashboard.json | 1591 -------- .../charts/grafana/templates/_helpers.tpl | 32 - .../templates/configmap-custom-resources.yaml | 16 - .../templates/configmap-dashboards.yaml | 18 - .../charts/grafana/templates/configmap.yaml | 25 - .../create-custom-resources-job.yaml | 101 - .../charts/grafana/templates/deployment.yaml | 138 - .../grafana/templates/grafana-ports-mtls.yaml | 17 - .../charts/grafana/templates/ingress.yaml | 40 - .../istio/charts/grafana/templates/pvc.yaml | 19 - .../charts/grafana/templates/service.yaml | 32 - .../tests/test-grafana-connection.yaml | 37 - .../istio/charts/grafana/values.yaml | 117 - .../istio/charts/istiocoredns/Chart.yaml | 6 - .../istiocoredns/templates/_helpers.tpl | 32 - .../istiocoredns/templates/clusterrole.yaml | 13 - .../templates/clusterrolebinding.yaml | 17 - .../istiocoredns/templates/configmap.yaml | 24 - .../istiocoredns/templates/deployment.yaml | 100 - .../istiocoredns/templates/service.yaml | 20 - .../templates/serviceaccount.yaml | 16 - .../istio/charts/istiocoredns/values.yaml | 35 - .../istio/charts/kiali/Chart.yaml | 7 - .../istio/charts/kiali/templates/_helpers.tpl | 32 - .../charts/kiali/templates/clusterrole.yaml | 267 -- .../kiali/templates/clusterrolebinding.yaml | 37 - .../charts/kiali/templates/configmap.yaml | 32 - .../charts/kiali/templates/demosecret.yaml | 16 - .../charts/kiali/templates/deployment.yaml | 100 - .../istio/charts/kiali/templates/ingress.yaml | 40 - .../istio/charts/kiali/templates/service.yaml | 17 - .../kiali/templates/serviceaccount.yaml | 16 - .../tests/test-kiali-connection.yaml | 37 - .../istio/charts/kiali/values.yaml | 63 - .../istio/charts/mixer/Chart.yaml | 13 - .../istio/charts/mixer/templates/_helpers.tpl | 32 - .../charts/mixer/templates/autoscale.yaml | 29 - .../charts/mixer/templates/clusterrole.yaml | 24 - .../mixer/templates/clusterrolebinding.yaml | 19 - .../istio/charts/mixer/templates/config.yaml | 1088 ------ .../charts/mixer/templates/deployment.yaml | 418 -- .../mixer/templates/poddisruptionbudget.yaml | 32 - .../istio/charts/mixer/templates/service.yaml | 39 - .../mixer/templates/serviceaccount.yaml | 18 - .../istio/charts/mixer/values.yaml | 99 - .../istio/charts/nodeagent/Chart.yaml | 13 - .../charts/nodeagent/templates/_helpers.tpl | 32 - .../nodeagent/templates/clusterrole.yaml | 13 - .../templates/clusterrolebinding.yaml | 17 - .../charts/nodeagent/templates/daemonset.yaml | 70 - .../nodeagent/templates/serviceaccount.yaml | 16 - .../istio/charts/nodeagent/values.yaml | 35 - .../istio/charts/pilot/Chart.yaml | 13 - .../istio/charts/pilot/templates/_helpers.tpl | 32 - .../charts/pilot/templates/autoscale.yaml | 25 - .../charts/pilot/templates/clusterrole.yaml | 34 - .../pilot/templates/clusterrolebinding.yaml | 17 - .../charts/pilot/templates/deployment.yaml | 223 -- .../charts/pilot/templates/meshexpansion.yaml | 91 - .../pilot/templates/poddisruptionbudget.yaml | 22 - .../istio/charts/pilot/templates/service.yaml | 23 - .../pilot/templates/serviceaccount.yaml | 16 - .../istio/charts/pilot/values.yaml | 56 - .../istio/charts/prometheus/Chart.yaml | 6 - .../charts/prometheus/templates/_helpers.tpl | 32 - .../prometheus/templates/clusterrole.yaml | 24 - .../templates/clusterrolebindings.yaml | 17 - .../prometheus/templates/configmap.yaml | 281 -- .../prometheus/templates/deployment.yaml | 80 - .../charts/prometheus/templates/ingress.yaml | 40 - .../charts/prometheus/templates/service.yaml | 45 - .../prometheus/templates/serviceaccount.yaml | 16 - .../tests/test-prometheus-connection.yaml | 36 - .../istio/charts/prometheus/values.yaml | 60 - .../istio/charts/security/Chart.yaml | 13 - .../charts/security/templates/_helpers.tpl | 32 - .../security/templates/clusterrole.yaml | 22 - .../templates/clusterrolebinding.yaml | 17 - .../charts/security/templates/configmap.yaml | 20 - .../create-custom-resources-job.yaml | 107 - .../charts/security/templates/deployment.yaml | 114 - .../security/templates/enable-mesh-mtls.yaml | 63 - .../templates/enable-mesh-permissive.yaml | 16 - .../security/templates/meshexpansion.yaml | 56 - .../charts/security/templates/service.yaml | 23 - .../security/templates/serviceaccount.yaml | 16 - .../tests/test-citadel-connection.yaml | 36 - .../istio/charts/security/values.yaml | 48 - .../charts/sidecarInjectorWebhook/Chart.yaml | 13 - .../templates/_helpers.tpl | 32 - .../templates/clusterrole.yaml | 17 - .../templates/clusterrolebinding.yaml | 18 - .../templates/deployment.yaml | 110 - .../templates/mutatingwebhook.yaml | 39 - .../templates/poddisruptionbudget.yaml | 18 - .../templates/service.yaml | 19 - .../templates/serviceaccount.yaml | 17 - .../charts/sidecarInjectorWebhook/values.yaml | 44 - .../istio/charts/tracing/Chart.yaml | 6 - .../charts/tracing/templates/_helpers.tpl | 32 - .../tracing/templates/deployment-jaeger.yaml | 117 - .../tracing/templates/deployment-zipkin.yaml | 82 - .../charts/tracing/templates/ingress.yaml | 41 - .../istio/charts/tracing/templates/pvc.yaml | 21 - .../tracing/templates/service-jaeger.yaml | 90 - .../charts/tracing/templates/service.yaml | 56 - .../tests/test-tracing-connection.yaml | 40 - .../istio/charts/tracing/values.yaml | 84 - .../istio/example-values/README.md | 5 - .../values-istio-example-sds-vault.yaml | 26 - .../example-values/values-istio-gateways.yaml | 135 - .../example-values/values-istio-googleca.yaml | 28 - .../values-istio-meshexpansion-gateways.yaml | 28 - .../values-istio-multicluster-gateways.yaml | 27 - .../istio/files/injection-template.yaml | 388 -- .../istio-system/istio/requirements.yaml | 40 - .../istio-system/istio/templates/NOTES.txt | 29 - .../istio/templates/_affinity.tpl | 93 - .../istio-system/istio/templates/_helpers.tpl | 46 - .../istio/templates/_podDisruptionBudget.tpl | 3 - .../istio/templates/clusterrole.yaml | 11 - .../istio/templates/clusterrolebinding.yaml | 14 - .../istio/templates/configmap.yaml | 307 -- .../istio/templates/endpoints.yaml | 63 - .../templates/install-custom-resources.sh.tpl | 32 - .../istio-system/istio/templates/service.yaml | 60 - .../istio/templates/serviceaccount.yaml | 5 - .../templates/sidecar-injector-configmap.yaml | 25 - .../istio/values-istio-demo-auth.yaml | 87 - .../istio-system/istio/values-istio-demo.yaml | 88 - .../istio/values-istio-minimal.yaml | 46 - .../istio/values-istio-remote.yaml | 34 - ...-sds-auth-control-plane-auth-disabled.yaml | 21 - .../istio/values-istio-sds-auth.yaml | 21 - .../istio-system/istio/values.yaml | 564 --- .../kube-system/coredns-custom.yaml | 23 - .../logging/elasticsearch/.helmignore | 2 - .../logging/elasticsearch/Chart.yaml | 11 - .../logging/elasticsearch/Makefile | 1 - .../logging/elasticsearch/README.md | 307 -- .../elasticsearch/examples/6.x/Makefile | 15 - .../elasticsearch/examples/6.x/test/goss.yaml | 17 - .../elasticsearch/examples/6.x/values.yaml | 4 - .../elasticsearch/examples/config/Makefile | 19 - .../elasticsearch/examples/config/README.md | 3 - .../examples/config/test/goss.yaml | 26 - .../elasticsearch/examples/config/values.yaml | 31 - .../examples/config/watcher_encryption_key | 1 - .../elasticsearch/examples/default/Makefile | 16 - .../examples/default/rolling_upgrade.sh | 19 - .../examples/default/test/goss.yaml | 39 - .../examples/docker-for-mac/Makefile | 12 - .../examples/docker-for-mac/values.yaml | 23 - .../elasticsearch/examples/migration/Makefile | 10 - .../examples/migration/README.md | 86 - .../examples/migration/client.yml | 23 - .../elasticsearch/examples/migration/data.yml | 17 - .../examples/migration/master.yml | 26 - .../elasticsearch/examples/minikube/Makefile | 12 - .../examples/minikube/values.yaml | 23 - .../elasticsearch/examples/multi/Makefile | 16 - .../elasticsearch/examples/multi/data.yml | 9 - .../elasticsearch/examples/multi/master.yml | 9 - .../examples/multi/test/goss.yaml | 9 - .../elasticsearch/examples/openshift/Makefile | 15 - .../examples/openshift/test/goss.yaml | 17 - .../examples/openshift/values.yaml | 10 - .../elasticsearch/examples/oss/Makefile | 12 - .../elasticsearch/examples/oss/test/goss.yaml | 17 - .../elasticsearch/examples/oss/values.yaml | 4 - .../elasticsearch/examples/security/Makefile | 31 - .../examples/security/security.yml | 38 - .../examples/security/test/goss.yaml | 45 - .../elasticsearch/examples/upgrade/Makefile | 25 - .../examples/upgrade/test/goss.yaml | 17 - .../logging/elasticsearch/templates/NOTES.txt | 4 - .../elasticsearch/templates/_helpers.tpl | 71 - .../elasticsearch/templates/configmap.yaml | 17 - .../elasticsearch/templates/ingress.yaml | 39 - .../templates/poddisruptionbudget.yaml | 13 - .../templates/podsecuritypolicy.yaml | 15 - .../logging/elasticsearch/templates/role.yaml | 26 - .../elasticsearch/templates/rolebinding.yaml | 25 - .../elasticsearch/templates/service.yaml | 54 - .../templates/serviceaccount.yaml | 17 - .../elasticsearch/templates/statefulset.yaml | 345 -- .../test/test-elasticsearch-health.yaml | 18 - .../elasticsearch/tests/elasticsearch_test.py | 971 ----- .../logging/elasticsearch/values.j2 | 241 -- .../helm_charts/logging/fluent-bit/Chart.yaml | 21 - .../helm_charts/logging/fluent-bit/OWNERS | 10 - .../helm_charts/logging/fluent-bit/README.md | 172 - .../logging/fluent-bit/templates/NOTES.txt | 15 - .../logging/fluent-bit/templates/_helpers.tpl | 67 - .../fluent-bit/templates/cluster-role.yaml | 29 - .../templates/cluster-rolebinding.yaml | 20 - .../logging/fluent-bit/templates/config.yaml | 236 -- .../fluent-bit/templates/daemonset.yaml | 176 - .../logging/fluent-bit/templates/psp.yaml | 61 - .../logging/fluent-bit/templates/secret.yaml | 15 - .../logging/fluent-bit/templates/service.yaml | 31 - .../fluent-bit/templates/serviceaccount.yaml | 12 - .../fluent-bit/templates/servicemonitor.yaml | 32 - .../templates/tests/test-configmap.yaml | 48 - .../fluent-bit/templates/tests/test.yaml | 53 - .../helm_charts/logging/fluent-bit/values.j2 | 297 -- .../helm_charts/logging/kibana/.helmignore | 2 - .../helm_charts/logging/kibana/Chart.yaml | 11 - .../helm_charts/logging/kibana/Makefile | 1 - .../helm_charts/logging/kibana/README.md | 135 - .../logging/kibana/examples/6.x/Makefile | 12 - .../kibana/examples/6.x/test/goss.yaml | 10 - .../logging/kibana/examples/6.x/values.yml | 4 - .../logging/kibana/examples/default/Makefile | 13 - .../kibana/examples/default/test/goss.yaml | 14 - .../kibana/examples/openshift/Makefile | 15 - .../kibana/examples/openshift/test/goss.yaml | 4 - .../kibana/examples/openshift/values.yml | 7 - .../logging/kibana/examples/oss/Makefile | 12 - .../kibana/examples/oss/test/goss.yaml | 4 - .../logging/kibana/examples/oss/values.yml | 4 - .../logging/kibana/examples/security/Makefile | 17 - .../kibana/examples/security/security.yml | 38 - .../kibana/examples/security/test/goss.yaml | 27 - .../logging/kibana/templates/_helpers.tpl | 27 - .../logging/kibana/templates/configmap.yaml | 16 - .../logging/kibana/templates/deployment.yaml | 115 - .../logging/kibana/templates/ingress.yaml | 33 - .../logging/kibana/templates/service.yaml | 26 - .../logging/kibana/tests/kibana_test.py | 408 -- .../helm_charts/logging/kibana/values.j2 | 139 - .../logging/oauth2-proxy/.helmignore | 22 - .../logging/oauth2-proxy/Chart.yaml | 5 - .../logging/oauth2-proxy/templates/NOTES.txt | 15 - .../oauth2-proxy/templates/configmap.yaml | 35 - .../oauth2-proxy/templates/deployment.yaml | 78 - .../oauth2-proxy/templates/service.yaml | 16 - .../templates/tests/test-connection.yaml | 15 - .../logging/oauth2-proxy/values.j2 | 59 - .../additional-scrape-configs/.helmignore | 22 - .../additional-scrape-configs/Chart.yaml | 21 - .../templates/_helpers.tpl | 63 - .../templates/secrets.yaml | 10 - .../additional-scrape-configs/values.yaml | 10 - .../monitoring/alertrules/.helmignore | 22 - .../monitoring/alertrules/Chart.yaml | 21 - .../alertrules/templates/promrulesEs.yml | 30 - .../templates/promrulesKafkaLag.yml | 119 - .../alertrules/templates/promrulesLogEs.yml | 38 - .../alertrules/templates/promrulesNode.yml | 118 - .../alertrules/templates/promrulesProcess.yml | 191 - .../monitoring/alertrules/values.yaml | 38 - .../monitoring/blackbox-exporter/Chart.yaml | 17 - .../monitoring/blackbox-exporter/OWNERS | 6 - .../monitoring/blackbox-exporter/README.md | 118 - .../blackbox-exporter/ci/default-values.yaml | 0 .../blackbox-exporter/ci/secret-values.yaml | 1 - .../blackbox-exporter/templates/NOTES.txt | 1 - .../blackbox-exporter/templates/_helpers.tpl | 31 - .../templates/configmap.yaml | 14 - .../templates/deployment.yaml | 108 - .../blackbox-exporter/templates/ingress.yaml | 30 - .../templates/poddisruptionbudget.yaml | 17 - .../blackbox-exporter/templates/service.yaml | 29 - .../templates/servicemonitor.yaml | 45 - .../monitoring/blackbox-exporter/values.yaml | 133 - .../monitoring/blackbox-exporter/values1.yaml | 155 - .../cassandra-jmx-exporter/.helmignore | 22 - .../cassandra-jmx-exporter/Chart.yaml | 21 - .../templates/NOTES.txt | 21 - .../templates/_helpers.tpl | 63 - .../templates/deployment.yaml | 60 - .../templates/ingress.yaml | 41 - .../templates/jmx-httpserver-configmap.yaml | 10 - .../logging-properties-configmap.yaml | 10 - .../templates/service.yaml | 13 - .../templates/serviceMonitor.yml | 25 - .../templates/serviceaccount.yaml | 8 - .../templates/tests/test-connection.yaml | 15 - .../cassandra-jmx-exporter/values.yaml | 99 - .../elasticsearch-exporter/.helmignore | 24 - .../elasticsearch-exporter/Chart.yaml | 17 - .../elasticsearch-exporter/README.md | 108 - .../ci/default-values.yaml | 1 - .../ci/security-context.yaml | 5 - .../templates/NOTES.txt | 15 - .../templates/_helpers.tpl | 33 - .../templates/cert-secret.yaml | 16 - .../templates/deployment.yaml | 152 - .../templates/prometheusrule.yaml | 24 - .../templates/service.yaml | 25 - .../templates/servicemonitor.yaml | 36 - .../elasticsearch-exporter/values.yaml | 180 - .../elasticsearch-exporter/values1.yaml | 179 - .../monitoring/kafka-lag-exporter/.helmignore | 22 - .../monitoring/kafka-lag-exporter/Chart.yaml | 21 - .../kafka-lag-exporter/templates/NOTES.txt | 21 - .../kafka-lag-exporter/templates/_helpers.tpl | 63 - .../templates/deployment.yaml | 47 - .../kafka-lag-exporter/templates/ingress.yaml | 41 - .../kafka-lag-exporter/templates/service.yaml | 13 - .../templates/serviceMonitor.yml | 25 - .../templates/serviceaccount.yaml | 8 - .../templates/tests/test-connection.yaml | 15 - .../monitoring/kafka-lag-exporter/values.yaml | 88 - .../helm_charts/monitoring/logger/.helmignore | 24 - .../helm_charts/monitoring/logger/Chart.yaml | 17 - .../helm_charts/monitoring/logger/README.md | 108 - .../monitoring/logger/ci/default-values.yaml | 1 - .../logger/ci/security-context.yaml | 5 - .../monitoring/logger/templates/NOTES.txt | 15 - .../monitoring/logger/templates/_helpers.tpl | 33 - .../logger/templates/cert-secret.yaml | 16 - .../logger/templates/deployment.yaml | 152 - .../logger/templates/prometheusrule.yaml | 24 - .../monitoring/logger/templates/service.yaml | 25 - .../logger/templates/servicemonitor.yaml | 36 - .../helm_charts/monitoring/logger/values.yaml | 180 - .../monitoring/logger/values1.yaml | 179 - .../prometheus-operator/.helmignore | 26 - .../prometheus-operator/CONTRIBUTING.md | 11 - .../monitoring/prometheus-operator/Chart.yaml | 19 - .../monitoring/prometheus-operator/README.md | 643 --- .../charts/grafana/.helmignore | 23 - .../charts/grafana/Chart.yaml | 18 - .../charts/grafana/README.md | 294 -- .../grafana/dashboards/custom-dashboard.json | 1 - .../charts/grafana/templates/NOTES.txt | 37 - .../charts/grafana/templates/_helpers.tpl | 51 - .../charts/grafana/templates/_pod.tpl | 355 -- .../charts/grafana/templates/clusterrole.yaml | 28 - .../grafana/templates/clusterrolebinding.yaml | 23 - .../configmap-dashboard-provider.yaml | 27 - .../charts/grafana/templates/configmap.yaml | 72 - .../templates/dashboards-json-configmap.yaml | 32 - .../charts/grafana/templates/deployment.yaml | 49 - .../grafana/templates/headless-service.yaml | 22 - .../charts/grafana/templates/ingress.yaml | 41 - .../templates/poddisruptionbudget.yaml | 25 - .../grafana/templates/podsecuritypolicy.yaml | 55 - .../charts/grafana/templates/pvc.yaml | 29 - .../charts/grafana/templates/role.yaml | 35 - .../charts/grafana/templates/rolebinding.yaml | 30 - .../charts/grafana/templates/secret-env.yaml | 17 - .../charts/grafana/templates/secret.yaml | 23 - .../charts/grafana/templates/service.yaml | 50 - .../grafana/templates/serviceaccount.yaml | 12 - .../charts/grafana/templates/statefulset.yaml | 49 - .../templates/tests/test-configmap.yaml | 20 - .../tests/test-podsecuritypolicy.yaml | 32 - .../grafana/templates/tests/test-role.yaml | 17 - .../templates/tests/test-rolebinding.yaml | 20 - .../templates/tests/test-serviceaccount.yaml | 12 - .../charts/grafana/templates/tests/test.yaml | 67 - .../charts/grafana/values.yaml | 459 --- .../charts/kube-state-metrics/.helmignore | 21 - .../charts/kube-state-metrics/Chart.yaml | 18 - .../charts/kube-state-metrics/OWNERS | 8 - .../charts/kube-state-metrics/README.md | 68 - .../kube-state-metrics/templates/NOTES.txt | 10 - .../kube-state-metrics/templates/_helpers.tpl | 36 - .../templates/clusterrole.yaml | 156 - .../templates/clusterrolebinding.yaml | 19 - .../templates/deployment.yaml | 150 - .../templates/podsecuritypolicy.yaml | 39 - .../templates/psp-clusterrole.yaml | 17 - .../templates/psp-clusterrolebinding.yaml | 19 - .../kube-state-metrics/templates/service.yaml | 35 - .../templates/serviceaccount.yaml | 13 - .../templates/servicemonitor.yaml | 24 - .../charts/kube-state-metrics/values.yaml | 111 - .../prometheus-node-exporter/.helmignore | 21 - .../prometheus-node-exporter/Chart.yaml | 15 - .../charts/prometheus-node-exporter/OWNERS | 4 - .../charts/prometheus-node-exporter/README.md | 83 - .../templates/NOTES.txt | 15 - .../templates/_helpers.tpl | 55 - .../templates/daemonset.yaml | 111 - .../templates/endpoints.yaml | 17 - .../templates/monitor.yaml | 20 - .../templates/psp-clusterrole.yaml | 15 - .../templates/psp-clusterrolebinding.yaml | 17 - .../templates/psp.yaml | 51 - .../templates/service.yaml | 22 - .../templates/serviceaccount.yaml | 15 - .../prometheus-node-exporter/values.yaml | 107 - .../prometheus-operator/requirements.lock | 12 - .../prometheus-operator/requirements.yaml | 16 - .../prometheus-operator/templates/NOTES.txt | 5 - .../templates/_helpers.tpl | 91 - .../templates/alertmanager/alertmanager.yaml | 103 - .../templates/alertmanager/ingress.yaml | 49 - .../alertmanager/podDisruptionBudget.yaml | 21 - .../alertmanager/psp-clusterrole.yaml | 16 - .../alertmanager/psp-clusterrolebinding.yaml | 18 - .../templates/alertmanager/psp.yaml | 49 - .../templates/alertmanager/secret.yaml | 23 - .../templates/alertmanager/service.yaml | 43 - .../alertmanager/serviceaccount.yaml | 12 - .../alertmanager/servicemonitor.yaml | 32 - .../templates/exporters/core-dns/service.yaml | 21 - .../exporters/core-dns/servicemonitor.yaml | 33 - .../kube-api-server/servicemonitor.yaml | 36 - .../kube-controller-manager/endpoints.yaml | 21 - .../kube-controller-manager/service.yaml | 24 - .../servicemonitor.yaml | 44 - .../templates/exporters/kube-dns/service.yaml | 25 - .../exporters/kube-dns/servicemonitor.yaml | 46 - .../exporters/kube-etcd/endpoints.yaml | 21 - .../exporters/kube-etcd/service.yaml | 24 - .../exporters/kube-etcd/servicemonitor.yaml | 50 - .../exporters/kube-proxy/service.yaml | 22 - .../exporters/kube-proxy/servicemonitor.yaml | 38 - .../exporters/kube-scheduler/endpoints.yaml | 21 - .../exporters/kube-scheduler/service.yaml | 24 - .../kube-scheduler/servicemonitor.yaml | 44 - .../kube-state-metrics/serviceMonitor.yaml | 30 - .../exporters/kubelet/servicemonitor.yaml | 86 - .../node-exporter/servicemonitor.yaml | 32 - .../grafana/configmap-dashboards.yaml | 24 - .../grafana/configmaps-datasources.yaml | 34 - .../grafana/dashboards-1.14/apiserver.yaml | 1298 ------- .../dashboards-1.14/controller-manager.yaml | 1128 ------ .../grafana/dashboards-1.14/etcd.yaml | 1111 ------ .../grafana/dashboards-1.14/k8s-coredns.yaml | 1324 ------- .../k8s-resources-cluster.yaml | 1474 ------- .../k8s-resources-namespace.yaml | 958 ----- .../dashboards-1.14/k8s-resources-node.yaml | 958 ----- .../dashboards-1.14/k8s-resources-pod.yaml | 1001 ----- .../k8s-resources-workload.yaml | 931 ----- .../k8s-resources-workloads-namespace.yaml | 967 ----- .../grafana/dashboards-1.14/kubelet.yaml | 2466 ------------ .../node-cluster-rsrc-use.yaml | 959 ----- .../dashboards-1.14/node-rsrc-use.yaml | 986 ----- .../grafana/dashboards-1.14/nodes.yaml | 982 ----- .../persistentvolumesusage.yaml | 568 --- .../grafana/dashboards-1.14/pods.yaml | 675 ---- .../prometheus-remote-write.yaml | 971 ----- .../grafana/dashboards-1.14/prometheus.yaml | 1217 ------ .../grafana/dashboards-1.14/proxy.yaml | 1206 ------ .../grafana/dashboards-1.14/scheduler.yaml | 1053 ----- .../grafana/dashboards-1.14/statefulset.yaml | 921 ----- .../templates/grafana/dashboards/etcd.yaml | 1111 ------ .../dashboards/k8s-cluster-rsrc-use.yaml | 954 ----- .../grafana/dashboards/k8s-coredns.yaml | 1324 ------- .../grafana/dashboards/k8s-node-rsrc-use.yaml | 981 ----- .../dashboards/k8s-resources-cluster.yaml | 1474 ------- .../dashboards/k8s-resources-namespace.yaml | 958 ----- .../grafana/dashboards/k8s-resources-pod.yaml | 1001 ----- .../dashboards/k8s-resources-workload.yaml | 931 ----- .../k8s-resources-workloads-namespace.yaml | 967 ----- .../templates/grafana/dashboards/nodes.yaml | 1378 ------- .../dashboards/persistentvolumesusage.yaml | 568 --- .../templates/grafana/dashboards/pods.yaml | 675 ---- .../grafana/dashboards/statefulset.yaml | 921 ----- .../templates/grafana/servicemonitor.yaml | 32 - .../job-patch/clusterrole.yaml | 29 - .../job-patch/clusterrolebinding.yaml | 21 - .../job-patch/job-createSecret.yaml | 50 - .../job-patch/job-patchWebhook.yaml | 51 - .../admission-webhooks/job-patch/psp.yaml | 51 - .../admission-webhooks/job-patch/role.yaml | 21 - .../job-patch/rolebinding.yaml | 21 - .../job-patch/serviceaccount.yaml | 13 - .../mutatingWebhookConfiguration.yaml | 32 - .../validatingWebhookConfiguration.yaml | 32 - .../prometheus-operator/cleanup-crds.yaml | 44 - .../prometheus-operator/clusterrole.yaml | 76 - .../clusterrolebinding.yaml | 18 - .../prometheus-operator/crd-alertmanager.yaml | 2407 ------------ .../prometheus-operator/crd-podmonitor.yaml | 247 -- .../prometheus-operator/crd-prometheus.yaml | 3458 ----------------- .../crd-prometheusrules.yaml | 404 -- .../crd-servicemonitor.yaml | 315 -- .../prometheus-operator/deployment.yaml | 112 - .../prometheus-operator/psp-clusterrole.yaml | 16 - .../psp-clusterrolebinding.yaml | 18 - .../templates/prometheus-operator/psp.yaml | 48 - .../prometheus-operator/service.yaml | 50 - .../prometheus-operator/serviceaccount.yaml | 12 - .../prometheus-operator/servicemonitor.yaml | 32 - .../additionalAlertRelabelConfigs.yaml | 12 - .../additionalAlertmanagerConfigs.yaml | 12 - .../prometheus/additionalPrometheusRules.yaml | 40 - .../prometheus/additionalScrapeConfigs.yaml | 12 - .../templates/prometheus/clusterrole.yaml | 37 - .../prometheus/clusterrolebinding.yaml | 19 - .../templates/prometheus/ingress.yaml | 49 - .../prometheus/ingressperreplica.yaml | 45 - .../prometheus/podDisruptionBudget.yaml | 21 - .../templates/prometheus/podmonitors.yaml | 37 - .../templates/prometheus/prometheus.yaml | 225 -- .../templates/prometheus/psp-clusterrole.yaml | 16 - .../prometheus/psp-clusterrolebinding.yaml | 19 - .../templates/prometheus/psp.yaml | 52 - .../rules-1.14/alertmanager.rules.yaml | 51 - .../templates/prometheus/rules-1.14/etcd.yaml | 137 - .../prometheus/rules-1.14/general.rules.yaml | 47 - .../prometheus/rules-1.14/k8s.rules.yaml | 80 - .../rules-1.14/kube-apiserver.rules.yaml | 36 - .../kube-prometheus-node-recording.rules.yaml | 38 - .../rules-1.14/kube-scheduler.rules.yaml | 60 - .../rules-1.14/kubernetes-absent.yaml | 126 - .../rules-1.14/kubernetes-apps.yaml | 157 - .../rules-1.14/kubernetes-resources.yaml | 100 - .../rules-1.14/kubernetes-storage.yaml | 59 - .../rules-1.14/kubernetes-system.yaml | 142 - .../rules-1.14/node-exporter.rules.yaml | 81 - .../prometheus/rules-1.14/node-exporter.yaml | 162 - .../prometheus/rules-1.14/node-network.yaml | 31 - .../prometheus/rules-1.14/node-time.yaml | 31 - .../prometheus/rules-1.14/node.rules.yaml | 37 - .../rules-1.14/prometheus-operator.yaml | 40 - .../prometheus/rules-1.14/prometheus.yaml | 192 - .../prometheus/rules/alertmanager.rules.yaml | 51 - .../templates/prometheus/rules/etcd.yaml | 137 - .../prometheus/rules/general.rules.yaml | 47 - .../templates/prometheus/rules/k8s.rules.yaml | 80 - .../rules/kube-apiserver.rules.yaml | 36 - .../kube-prometheus-node-alerting.rules.yaml | 38 - .../kube-prometheus-node-recording.rules.yaml | 38 - .../rules/kube-scheduler.rules.yaml | 60 - .../prometheus/rules/kubernetes-absent.yaml | 126 - .../prometheus/rules/kubernetes-apps.yaml | 157 - .../rules/kubernetes-resources.yaml | 100 - .../prometheus/rules/kubernetes-storage.yaml | 59 - .../prometheus/rules/kubernetes-system.yaml | 142 - .../prometheus/rules/node-network.yaml | 45 - .../templates/prometheus/rules/node-time.yaml | 31 - .../prometheus/rules/node.rules.yaml | 199 - .../prometheus/rules/prometheus-operator.yaml | 40 - .../prometheus/rules/prometheus.rules.yaml | 106 - .../templates/prometheus/service.yaml | 49 - .../templates/prometheus/serviceaccount.yaml | 16 - .../templates/prometheus/servicemonitor.yaml | 33 - .../templates/prometheus/servicemonitors.yaml | 34 - .../prometheus/serviceperreplica.yaml | 46 - .../prometheus-operator/values.yaml | 1801 --------- .../monitoring/statsd-exporter/.helmignore | 22 - .../monitoring/statsd-exporter/Chart.yaml | 21 - .../statsd-exporter/templates/NOTES.txt | 21 - .../statsd-exporter/templates/_helpers.tpl | 63 - .../statsd-exporter/templates/configMap.yaml | 9 - .../statsd-exporter/templates/deployment.yaml | 54 - .../statsd-exporter/templates/ingress.yaml | 42 - .../statsd-exporter/templates/service.yaml | 13 - .../templates/serviceMonitor.yml | 25 - .../templates/serviceaccount.yaml | 9 - .../templates/tests/test-connection.yaml | 15 - .../monitoring/statsd-exporter/values.yaml | 122 - .../helm_charts/networkconfig/Chart.yaml | 5 - .../templates/deployment-ingress.yaml | 221 -- .../networkconfig/templates/gateway.yaml | 22 - .../templates/private-gateway-ingress.yaml | 15 - .../private-virtualservice-ingress.yaml | 49 - .../templates/service-ingress.yaml | 16 - .../networkconfig/templates/serviceentry.yaml | 42 - .../templates/virtualservice.yaml | 141 - .../helm_charts/networkconfig/values.j2 | 6 - kubernetes/helm_charts/rancher/.helmignore | 22 - kubernetes/helm_charts/rancher/Chart.yaml | 5 - .../helm_charts/rancher/templates/NOTES.txt | 21 - .../rancher/templates/_helpers.tpl | 56 - .../rancher/templates/deployment.yaml | 76 - kubernetes/helm_charts/rancher/values.yaml | 3 - .../pipelines/bootstrap_core/Jenkinsfile | 31 - kubernetes/pipelines/common/Jenkinsfile | 36 - kubernetes/pipelines/deploy_core/Jenkinsfile | 31 - .../pipelines/deploy_core/Jenkinsfile.badger | 31 - kubernetes/pipelines/logging/Jenkinsfile | 35 - kubernetes/pipelines/monitoring/Jenkinsfile | 31 - kubernetes/pipelines/proxy_config/Jenkinsfile | 31 - kubernetes/utils/cluster_creation.sh | 17 - pipelines/deploy/player/Jenkinsfile | 7 +- 754 files changed, 46 insertions(+), 95036 deletions(-) delete mode 100644 kubernetes/ansible/badger.yml delete mode 100644 kubernetes/ansible/bootstrap.yaml delete mode 100644 kubernetes/ansible/deploy_core_service.yml delete mode 100644 kubernetes/ansible/istio.yaml delete mode 100644 kubernetes/ansible/monitoring.yaml delete mode 100644 kubernetes/ansible/networkconfig.yaml delete mode 100644 kubernetes/ansible/player.yml delete mode 100644 kubernetes/ansible/roles/deploy-badger/defaults/main.yml delete mode 100644 kubernetes/ansible/roles/deploy-badger/tasks/main.yml delete mode 100644 kubernetes/ansible/roles/deploy-badger/templates/configmap.j2 delete mode 100644 kubernetes/ansible/roles/deploy-badger/templates/user.j2 delete mode 100644 kubernetes/ansible/roles/deploy-player/tasks/main.yml delete mode 100644 kubernetes/ansible/roles/istio/README.md delete mode 100644 kubernetes/ansible/roles/istio/defaults/main.yml delete mode 100644 kubernetes/ansible/roles/istio/handlers/main.yml delete mode 100644 kubernetes/ansible/roles/istio/meta/main.yml delete mode 100644 kubernetes/ansible/roles/istio/tasks/main.yml delete mode 100644 kubernetes/ansible/roles/istio/templates/istio.yaml delete mode 100644 kubernetes/ansible/roles/istio/tests/inventory delete mode 100644 kubernetes/ansible/roles/istio/tests/test.yml delete mode 100644 kubernetes/ansible/roles/istio/vars/main.yml delete mode 100644 kubernetes/ansible/roles/proxy/README.md delete mode 100644 kubernetes/ansible/roles/proxy/defaults/main.yml delete mode 100644 kubernetes/ansible/roles/proxy/tasks/main.yml delete mode 100644 kubernetes/ansible/roles/proxy/templates/gateway.yaml delete mode 100644 kubernetes/ansible/roles/proxy/templates/serviceentry.yaml delete mode 100644 kubernetes/ansible/roles/proxy/templates/virtualservice.yaml delete mode 100644 kubernetes/ansible/roles/sunbird-deploy/defaults/main.yml delete mode 100644 kubernetes/ansible/roles/sunbird-deploy/tasks/main.yml delete mode 100644 kubernetes/ansible/roles/sunbird-monitoring/README.md delete mode 100644 kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml delete mode 100644 kubernetes/ansible/roles/sunbird-monitoring/handlers/main.yml delete mode 100644 kubernetes/ansible/roles/sunbird-monitoring/meta/main.yml delete mode 100644 kubernetes/ansible/roles/sunbird-monitoring/tasks/main.yml delete mode 100644 kubernetes/ansible/roles/sunbird-monitoring/templates/additional-scrape-configs.yaml delete mode 100644 kubernetes/ansible/roles/sunbird-monitoring/templates/alertrules.yaml delete mode 100644 kubernetes/ansible/roles/sunbird-monitoring/templates/blackbox-exporter.yaml delete mode 100644 kubernetes/ansible/roles/sunbird-monitoring/templates/cassandra-jmx-exporter.yaml delete mode 100644 kubernetes/ansible/roles/sunbird-monitoring/templates/elasticsearch-exporter.yaml delete mode 100644 kubernetes/ansible/roles/sunbird-monitoring/templates/kafka-lag-exporter.yaml delete mode 100644 kubernetes/ansible/roles/sunbird-monitoring/templates/logger.yaml delete mode 100644 kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-operator.yaml delete mode 100644 kubernetes/ansible/roles/sunbird-monitoring/templates/statsd-exporter.yaml delete mode 100644 kubernetes/ansible/roles/sunbird-monitoring/tests/inventory delete mode 100644 kubernetes/ansible/roles/sunbird-monitoring/tests/test.yml delete mode 100644 kubernetes/ansible/roles/sunbird-monitoring/vars/main.yml delete mode 100644 kubernetes/helm_charts/cattle-system/rancher.yaml delete mode 100644 kubernetes/helm_charts/core/adminutils/Chart.yaml delete mode 100644 kubernetes/helm_charts/core/adminutils/templates/configmap.yaml delete mode 100644 kubernetes/helm_charts/core/adminutils/templates/deployment.yaml delete mode 100644 kubernetes/helm_charts/core/adminutils/values.j2 delete mode 100755 kubernetes/helm_charts/core/apimanager/Chart.yaml delete mode 100644 kubernetes/helm_charts/core/apimanager/templates/apimanager_echo.yaml delete mode 100755 kubernetes/helm_charts/core/apimanager/templates/configmap.yaml delete mode 100755 kubernetes/helm_charts/core/apimanager/templates/deployment.yaml delete mode 100755 kubernetes/helm_charts/core/apimanager/values.j2 delete mode 100755 kubernetes/helm_charts/core/badger/Chart.yaml delete mode 100755 kubernetes/helm_charts/core/badger/templates/deployment.yaml delete mode 100755 kubernetes/helm_charts/core/badger/values.j2 delete mode 100644 kubernetes/helm_charts/core/cert/Chart.yaml delete mode 100644 kubernetes/helm_charts/core/cert/templates/configmap.yaml delete mode 100644 kubernetes/helm_charts/core/cert/templates/deployment.yaml delete mode 100644 kubernetes/helm_charts/core/cert/values.j2 delete mode 100644 kubernetes/helm_charts/core/content/Chart.yaml delete mode 100644 kubernetes/helm_charts/core/content/templates/configmap.yaml delete mode 100644 kubernetes/helm_charts/core/content/templates/deployment.yaml delete mode 100644 kubernetes/helm_charts/core/content/values.j2 delete mode 100644 kubernetes/helm_charts/core/enc/Chart.yaml delete mode 100644 kubernetes/helm_charts/core/enc/templates/configmap.yaml delete mode 100644 kubernetes/helm_charts/core/enc/templates/deployment.yaml delete mode 100644 kubernetes/helm_charts/core/enc/values.j2 delete mode 100644 kubernetes/helm_charts/core/knowledgemw/.helmignore delete mode 100644 kubernetes/helm_charts/core/knowledgemw/Chart.yaml delete mode 100644 kubernetes/helm_charts/core/knowledgemw/templates/_helpers.tpl delete mode 100644 kubernetes/helm_charts/core/knowledgemw/templates/configmap.yaml delete mode 100644 kubernetes/helm_charts/core/knowledgemw/templates/deployment.yaml delete mode 100644 kubernetes/helm_charts/core/knowledgemw/values.j2 delete mode 100644 kubernetes/helm_charts/core/learner/.helmignore delete mode 100644 kubernetes/helm_charts/core/learner/Chart.yaml delete mode 100644 kubernetes/helm_charts/core/learner/templates/_helpers.tpl delete mode 100644 kubernetes/helm_charts/core/learner/templates/configmap.yaml delete mode 100644 kubernetes/helm_charts/core/learner/templates/deployment.yaml delete mode 100644 kubernetes/helm_charts/core/learner/values.j2 delete mode 100644 kubernetes/helm_charts/core/lms/Chart.yaml delete mode 100644 kubernetes/helm_charts/core/lms/templates/configmap.yaml delete mode 100644 kubernetes/helm_charts/core/lms/templates/deployment.yaml delete mode 100644 kubernetes/helm_charts/core/lms/values.j2 delete mode 100644 kubernetes/helm_charts/core/notification/Chart.yaml delete mode 100644 kubernetes/helm_charts/core/notification/templates/configmap.yaml delete mode 100644 kubernetes/helm_charts/core/notification/templates/deployment.yaml delete mode 100644 kubernetes/helm_charts/core/notification/values.j2 delete mode 100644 kubernetes/helm_charts/core/player/.helmignore delete mode 100644 kubernetes/helm_charts/core/player/Chart.yaml delete mode 100644 kubernetes/helm_charts/core/player/templates/_helpers.tpl delete mode 100644 kubernetes/helm_charts/core/player/templates/configmap.yaml delete mode 100644 kubernetes/helm_charts/core/player/templates/deployment.yaml delete mode 100644 kubernetes/helm_charts/core/player/values.j2 delete mode 100644 kubernetes/helm_charts/core/telemetry/.helmignore delete mode 100644 kubernetes/helm_charts/core/telemetry/Chart.yaml delete mode 100644 kubernetes/helm_charts/core/telemetry/templates/_helpers.tpl delete mode 100644 kubernetes/helm_charts/core/telemetry/templates/configmap.yaml delete mode 100644 kubernetes/helm_charts/core/telemetry/templates/deployment.yaml delete mode 100644 kubernetes/helm_charts/core/telemetry/values.j2 delete mode 100644 kubernetes/helm_charts/core/userorg/Chart.yaml delete mode 100644 kubernetes/helm_charts/core/userorg/templates/configmap.yaml delete mode 100644 kubernetes/helm_charts/core/userorg/templates/deployment.yaml delete mode 100644 kubernetes/helm_charts/core/userorg/values.j2 delete mode 100755 kubernetes/helm_charts/istio-system/istio-init/Chart.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio-init/README.md delete mode 100755 kubernetes/helm_charts/istio-system/istio-init/files/crd-10.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio-init/files/crd-11.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio-init/files/crd-12.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio-init/files/crd-certmanager-10.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio-init/files/crd-certmanager-11.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio-init/templates/clusterrole.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio-init/templates/clusterrolebinding.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio-init/templates/configmap-crd-10.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio-init/templates/configmap-crd-11.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio-init/templates/configmap-crd-12.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio-init/templates/configmap-crd-certmanager-10.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio-init/templates/configmap-crd-certmanager-11.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio-init/templates/job-crd-10.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio-init/templates/job-crd-11.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio-init/templates/job-crd-12.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio-init/templates/job-crd-certmanager-10.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio-init/templates/job-crd-certmanager-11.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio-init/templates/serviceaccount.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio-init/values.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/Chart.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/README.md delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/certmanager/Chart.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/certmanager/templates/NOTES.txt delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/certmanager/templates/_helpers.tpl delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/certmanager/templates/deployment.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/certmanager/templates/issuer.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/certmanager/templates/poddisruptionbudget.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/certmanager/templates/rbac.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/certmanager/templates/serviceaccount.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/certmanager/values.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/galley/Chart.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/galley/templates/_helpers.tpl delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/galley/templates/clusterrole.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/galley/templates/clusterrolebinding.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/galley/templates/configmap.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/galley/templates/deployment.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/galley/templates/poddisruptionbudget.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/galley/templates/service.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/galley/templates/serviceaccount.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/galley/templates/validatingwebhookconfiguration.yaml.tpl delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/galley/values.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/gateways/Chart.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/_affinity.tpl delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/_helpers.tpl delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/autoscale.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/deployment.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/poddisruptionbudget.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/preconfigured.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/role.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/rolebindings.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/service.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/serviceaccount.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/gateways/values.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/grafana/Chart.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/grafana/dashboards/citadel-dashboard.json delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/grafana/dashboards/galley-dashboard.json delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/grafana/dashboards/istio-mesh-dashboard.json delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/grafana/dashboards/istio-performance-dashboard.json delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/grafana/dashboards/istio-service-dashboard.json delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/grafana/dashboards/istio-workload-dashboard.json delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/grafana/dashboards/mixer-dashboard.json delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/grafana/dashboards/pilot-dashboard.json delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/_helpers.tpl delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/configmap-custom-resources.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/configmap-dashboards.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/configmap.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/create-custom-resources-job.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/deployment.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/grafana-ports-mtls.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/ingress.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/pvc.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/service.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/tests/test-grafana-connection.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/grafana/values.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/Chart.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/templates/_helpers.tpl delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/templates/clusterrole.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/templates/clusterrolebinding.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/templates/configmap.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/templates/deployment.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/templates/service.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/templates/serviceaccount.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/values.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/kiali/Chart.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/_helpers.tpl delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/clusterrole.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/clusterrolebinding.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/configmap.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/demosecret.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/deployment.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/ingress.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/service.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/serviceaccount.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/tests/test-kiali-connection.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/kiali/values.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/mixer/Chart.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/_helpers.tpl delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/autoscale.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/clusterrole.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/clusterrolebinding.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/config.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/deployment.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/poddisruptionbudget.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/service.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/serviceaccount.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/mixer/values.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/nodeagent/Chart.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/nodeagent/templates/_helpers.tpl delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/nodeagent/templates/clusterrole.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/nodeagent/templates/clusterrolebinding.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/nodeagent/templates/daemonset.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/nodeagent/templates/serviceaccount.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/nodeagent/values.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/pilot/Chart.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/_helpers.tpl delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/autoscale.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/clusterrole.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/clusterrolebinding.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/deployment.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/meshexpansion.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/poddisruptionbudget.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/service.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/serviceaccount.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/pilot/values.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/prometheus/Chart.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/_helpers.tpl delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/clusterrole.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/clusterrolebindings.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/configmap.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/deployment.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/ingress.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/service.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/serviceaccount.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/tests/test-prometheus-connection.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/prometheus/values.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/security/Chart.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/security/templates/_helpers.tpl delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/security/templates/clusterrole.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/security/templates/clusterrolebinding.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/security/templates/configmap.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/security/templates/create-custom-resources-job.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/security/templates/deployment.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/security/templates/enable-mesh-mtls.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/security/templates/enable-mesh-permissive.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/security/templates/meshexpansion.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/security/templates/service.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/security/templates/serviceaccount.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/security/templates/tests/test-citadel-connection.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/security/values.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/Chart.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/templates/_helpers.tpl delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/templates/clusterrole.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/templates/clusterrolebinding.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/templates/deployment.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/templates/mutatingwebhook.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/templates/poddisruptionbudget.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/templates/service.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/templates/serviceaccount.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/values.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/tracing/Chart.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/tracing/templates/_helpers.tpl delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/tracing/templates/deployment-jaeger.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/tracing/templates/deployment-zipkin.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/tracing/templates/ingress.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/tracing/templates/pvc.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/tracing/templates/service-jaeger.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/tracing/templates/service.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/tracing/templates/tests/test-tracing-connection.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/charts/tracing/values.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/example-values/README.md delete mode 100755 kubernetes/helm_charts/istio-system/istio/example-values/values-istio-example-sds-vault.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/example-values/values-istio-gateways.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/example-values/values-istio-googleca.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/example-values/values-istio-meshexpansion-gateways.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/example-values/values-istio-multicluster-gateways.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/files/injection-template.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/requirements.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/templates/NOTES.txt delete mode 100755 kubernetes/helm_charts/istio-system/istio/templates/_affinity.tpl delete mode 100755 kubernetes/helm_charts/istio-system/istio/templates/_helpers.tpl delete mode 100755 kubernetes/helm_charts/istio-system/istio/templates/_podDisruptionBudget.tpl delete mode 100755 kubernetes/helm_charts/istio-system/istio/templates/clusterrole.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/templates/clusterrolebinding.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/templates/configmap.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/templates/endpoints.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/templates/install-custom-resources.sh.tpl delete mode 100755 kubernetes/helm_charts/istio-system/istio/templates/service.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/templates/serviceaccount.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/templates/sidecar-injector-configmap.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/values-istio-demo-auth.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/values-istio-demo.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/values-istio-minimal.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/values-istio-remote.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/values-istio-sds-auth-control-plane-auth-disabled.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/values-istio-sds-auth.yaml delete mode 100755 kubernetes/helm_charts/istio-system/istio/values.yaml delete mode 100644 kubernetes/helm_charts/kube-system/coredns-custom.yaml delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/.helmignore delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/Chart.yaml delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/Makefile delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/README.md delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/examples/6.x/Makefile delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/examples/6.x/test/goss.yaml delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/examples/6.x/values.yaml delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/examples/config/Makefile delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/examples/config/README.md delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/examples/config/test/goss.yaml delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/examples/config/values.yaml delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/examples/config/watcher_encryption_key delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/examples/default/Makefile delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/examples/default/rolling_upgrade.sh delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/examples/default/test/goss.yaml delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/examples/docker-for-mac/Makefile delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/examples/docker-for-mac/values.yaml delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/examples/migration/Makefile delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/examples/migration/README.md delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/examples/migration/client.yml delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/examples/migration/data.yml delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/examples/migration/master.yml delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/examples/minikube/Makefile delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/examples/minikube/values.yaml delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/examples/multi/Makefile delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/examples/multi/data.yml delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/examples/multi/master.yml delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/examples/multi/test/goss.yaml delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/examples/openshift/Makefile delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/examples/openshift/test/goss.yaml delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/examples/openshift/values.yaml delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/examples/oss/Makefile delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/examples/oss/test/goss.yaml delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/examples/oss/values.yaml delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/examples/security/Makefile delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/examples/security/security.yml delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/examples/security/test/goss.yaml delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/examples/upgrade/Makefile delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/examples/upgrade/test/goss.yaml delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/templates/NOTES.txt delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/templates/_helpers.tpl delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/templates/configmap.yaml delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/templates/ingress.yaml delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/templates/poddisruptionbudget.yaml delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/templates/podsecuritypolicy.yaml delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/templates/role.yaml delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/templates/rolebinding.yaml delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/templates/service.yaml delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/templates/serviceaccount.yaml delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/templates/statefulset.yaml delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/templates/test/test-elasticsearch-health.yaml delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/tests/elasticsearch_test.py delete mode 100755 kubernetes/helm_charts/logging/elasticsearch/values.j2 delete mode 100755 kubernetes/helm_charts/logging/fluent-bit/Chart.yaml delete mode 100755 kubernetes/helm_charts/logging/fluent-bit/OWNERS delete mode 100755 kubernetes/helm_charts/logging/fluent-bit/README.md delete mode 100755 kubernetes/helm_charts/logging/fluent-bit/templates/NOTES.txt delete mode 100755 kubernetes/helm_charts/logging/fluent-bit/templates/_helpers.tpl delete mode 100755 kubernetes/helm_charts/logging/fluent-bit/templates/cluster-role.yaml delete mode 100755 kubernetes/helm_charts/logging/fluent-bit/templates/cluster-rolebinding.yaml delete mode 100755 kubernetes/helm_charts/logging/fluent-bit/templates/config.yaml delete mode 100755 kubernetes/helm_charts/logging/fluent-bit/templates/daemonset.yaml delete mode 100755 kubernetes/helm_charts/logging/fluent-bit/templates/psp.yaml delete mode 100755 kubernetes/helm_charts/logging/fluent-bit/templates/secret.yaml delete mode 100755 kubernetes/helm_charts/logging/fluent-bit/templates/service.yaml delete mode 100755 kubernetes/helm_charts/logging/fluent-bit/templates/serviceaccount.yaml delete mode 100755 kubernetes/helm_charts/logging/fluent-bit/templates/servicemonitor.yaml delete mode 100755 kubernetes/helm_charts/logging/fluent-bit/templates/tests/test-configmap.yaml delete mode 100755 kubernetes/helm_charts/logging/fluent-bit/templates/tests/test.yaml delete mode 100755 kubernetes/helm_charts/logging/fluent-bit/values.j2 delete mode 100755 kubernetes/helm_charts/logging/kibana/.helmignore delete mode 100755 kubernetes/helm_charts/logging/kibana/Chart.yaml delete mode 100755 kubernetes/helm_charts/logging/kibana/Makefile delete mode 100755 kubernetes/helm_charts/logging/kibana/README.md delete mode 100755 kubernetes/helm_charts/logging/kibana/examples/6.x/Makefile delete mode 100755 kubernetes/helm_charts/logging/kibana/examples/6.x/test/goss.yaml delete mode 100755 kubernetes/helm_charts/logging/kibana/examples/6.x/values.yml delete mode 100755 kubernetes/helm_charts/logging/kibana/examples/default/Makefile delete mode 100755 kubernetes/helm_charts/logging/kibana/examples/default/test/goss.yaml delete mode 100755 kubernetes/helm_charts/logging/kibana/examples/openshift/Makefile delete mode 100755 kubernetes/helm_charts/logging/kibana/examples/openshift/test/goss.yaml delete mode 100755 kubernetes/helm_charts/logging/kibana/examples/openshift/values.yml delete mode 100755 kubernetes/helm_charts/logging/kibana/examples/oss/Makefile delete mode 100755 kubernetes/helm_charts/logging/kibana/examples/oss/test/goss.yaml delete mode 100755 kubernetes/helm_charts/logging/kibana/examples/oss/values.yml delete mode 100755 kubernetes/helm_charts/logging/kibana/examples/security/Makefile delete mode 100755 kubernetes/helm_charts/logging/kibana/examples/security/security.yml delete mode 100755 kubernetes/helm_charts/logging/kibana/examples/security/test/goss.yaml delete mode 100755 kubernetes/helm_charts/logging/kibana/templates/_helpers.tpl delete mode 100755 kubernetes/helm_charts/logging/kibana/templates/configmap.yaml delete mode 100755 kubernetes/helm_charts/logging/kibana/templates/deployment.yaml delete mode 100755 kubernetes/helm_charts/logging/kibana/templates/ingress.yaml delete mode 100755 kubernetes/helm_charts/logging/kibana/templates/service.yaml delete mode 100755 kubernetes/helm_charts/logging/kibana/tests/kibana_test.py delete mode 100755 kubernetes/helm_charts/logging/kibana/values.j2 delete mode 100755 kubernetes/helm_charts/logging/oauth2-proxy/.helmignore delete mode 100755 kubernetes/helm_charts/logging/oauth2-proxy/Chart.yaml delete mode 100755 kubernetes/helm_charts/logging/oauth2-proxy/templates/NOTES.txt delete mode 100755 kubernetes/helm_charts/logging/oauth2-proxy/templates/configmap.yaml delete mode 100755 kubernetes/helm_charts/logging/oauth2-proxy/templates/deployment.yaml delete mode 100755 kubernetes/helm_charts/logging/oauth2-proxy/templates/service.yaml delete mode 100755 kubernetes/helm_charts/logging/oauth2-proxy/templates/tests/test-connection.yaml delete mode 100755 kubernetes/helm_charts/logging/oauth2-proxy/values.j2 delete mode 100644 kubernetes/helm_charts/monitoring/additional-scrape-configs/.helmignore delete mode 100644 kubernetes/helm_charts/monitoring/additional-scrape-configs/Chart.yaml delete mode 100644 kubernetes/helm_charts/monitoring/additional-scrape-configs/templates/_helpers.tpl delete mode 100644 kubernetes/helm_charts/monitoring/additional-scrape-configs/templates/secrets.yaml delete mode 100644 kubernetes/helm_charts/monitoring/additional-scrape-configs/values.yaml delete mode 100644 kubernetes/helm_charts/monitoring/alertrules/.helmignore delete mode 100644 kubernetes/helm_charts/monitoring/alertrules/Chart.yaml delete mode 100644 kubernetes/helm_charts/monitoring/alertrules/templates/promrulesEs.yml delete mode 100644 kubernetes/helm_charts/monitoring/alertrules/templates/promrulesKafkaLag.yml delete mode 100644 kubernetes/helm_charts/monitoring/alertrules/templates/promrulesLogEs.yml delete mode 100644 kubernetes/helm_charts/monitoring/alertrules/templates/promrulesNode.yml delete mode 100644 kubernetes/helm_charts/monitoring/alertrules/templates/promrulesProcess.yml delete mode 100644 kubernetes/helm_charts/monitoring/alertrules/values.yaml delete mode 100755 kubernetes/helm_charts/monitoring/blackbox-exporter/Chart.yaml delete mode 100755 kubernetes/helm_charts/monitoring/blackbox-exporter/OWNERS delete mode 100755 kubernetes/helm_charts/monitoring/blackbox-exporter/README.md delete mode 100755 kubernetes/helm_charts/monitoring/blackbox-exporter/ci/default-values.yaml delete mode 100755 kubernetes/helm_charts/monitoring/blackbox-exporter/ci/secret-values.yaml delete mode 100755 kubernetes/helm_charts/monitoring/blackbox-exporter/templates/NOTES.txt delete mode 100755 kubernetes/helm_charts/monitoring/blackbox-exporter/templates/_helpers.tpl delete mode 100755 kubernetes/helm_charts/monitoring/blackbox-exporter/templates/configmap.yaml delete mode 100755 kubernetes/helm_charts/monitoring/blackbox-exporter/templates/deployment.yaml delete mode 100755 kubernetes/helm_charts/monitoring/blackbox-exporter/templates/ingress.yaml delete mode 100755 kubernetes/helm_charts/monitoring/blackbox-exporter/templates/poddisruptionbudget.yaml delete mode 100755 kubernetes/helm_charts/monitoring/blackbox-exporter/templates/service.yaml delete mode 100755 kubernetes/helm_charts/monitoring/blackbox-exporter/templates/servicemonitor.yaml delete mode 100755 kubernetes/helm_charts/monitoring/blackbox-exporter/values.yaml delete mode 100755 kubernetes/helm_charts/monitoring/blackbox-exporter/values1.yaml delete mode 100644 kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/.helmignore delete mode 100644 kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/Chart.yaml delete mode 100644 kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/NOTES.txt delete mode 100644 kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/_helpers.tpl delete mode 100644 kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/deployment.yaml delete mode 100644 kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/ingress.yaml delete mode 100644 kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/jmx-httpserver-configmap.yaml delete mode 100644 kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/logging-properties-configmap.yaml delete mode 100644 kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/service.yaml delete mode 100644 kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/serviceMonitor.yml delete mode 100644 kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/serviceaccount.yaml delete mode 100644 kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/templates/tests/test-connection.yaml delete mode 100644 kubernetes/helm_charts/monitoring/cassandra-jmx-exporter/values.yaml delete mode 100755 kubernetes/helm_charts/monitoring/elasticsearch-exporter/.helmignore delete mode 100755 kubernetes/helm_charts/monitoring/elasticsearch-exporter/Chart.yaml delete mode 100755 kubernetes/helm_charts/monitoring/elasticsearch-exporter/README.md delete mode 100755 kubernetes/helm_charts/monitoring/elasticsearch-exporter/ci/default-values.yaml delete mode 100755 kubernetes/helm_charts/monitoring/elasticsearch-exporter/ci/security-context.yaml delete mode 100755 kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/NOTES.txt delete mode 100755 kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/_helpers.tpl delete mode 100755 kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/cert-secret.yaml delete mode 100755 kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/deployment.yaml delete mode 100755 kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/prometheusrule.yaml delete mode 100755 kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/service.yaml delete mode 100755 kubernetes/helm_charts/monitoring/elasticsearch-exporter/templates/servicemonitor.yaml delete mode 100755 kubernetes/helm_charts/monitoring/elasticsearch-exporter/values.yaml delete mode 100755 kubernetes/helm_charts/monitoring/elasticsearch-exporter/values1.yaml delete mode 100644 kubernetes/helm_charts/monitoring/kafka-lag-exporter/.helmignore delete mode 100644 kubernetes/helm_charts/monitoring/kafka-lag-exporter/Chart.yaml delete mode 100644 kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/NOTES.txt delete mode 100644 kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/_helpers.tpl delete mode 100644 kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/deployment.yaml delete mode 100644 kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/ingress.yaml delete mode 100644 kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/service.yaml delete mode 100644 kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/serviceMonitor.yml delete mode 100644 kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/serviceaccount.yaml delete mode 100644 kubernetes/helm_charts/monitoring/kafka-lag-exporter/templates/tests/test-connection.yaml delete mode 100644 kubernetes/helm_charts/monitoring/kafka-lag-exporter/values.yaml delete mode 100755 kubernetes/helm_charts/monitoring/logger/.helmignore delete mode 100755 kubernetes/helm_charts/monitoring/logger/Chart.yaml delete mode 100755 kubernetes/helm_charts/monitoring/logger/README.md delete mode 100755 kubernetes/helm_charts/monitoring/logger/ci/default-values.yaml delete mode 100755 kubernetes/helm_charts/monitoring/logger/ci/security-context.yaml delete mode 100755 kubernetes/helm_charts/monitoring/logger/templates/NOTES.txt delete mode 100755 kubernetes/helm_charts/monitoring/logger/templates/_helpers.tpl delete mode 100755 kubernetes/helm_charts/monitoring/logger/templates/cert-secret.yaml delete mode 100755 kubernetes/helm_charts/monitoring/logger/templates/deployment.yaml delete mode 100755 kubernetes/helm_charts/monitoring/logger/templates/prometheusrule.yaml delete mode 100755 kubernetes/helm_charts/monitoring/logger/templates/service.yaml delete mode 100755 kubernetes/helm_charts/monitoring/logger/templates/servicemonitor.yaml delete mode 100755 kubernetes/helm_charts/monitoring/logger/values.yaml delete mode 100755 kubernetes/helm_charts/monitoring/logger/values1.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/.helmignore delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/CONTRIBUTING.md delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/Chart.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/README.md delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/.helmignore delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/Chart.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/README.md delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/dashboards/custom-dashboard.json delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/NOTES.txt delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/_helpers.tpl delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/_pod.tpl delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/clusterrole.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/clusterrolebinding.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/configmap-dashboard-provider.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/configmap.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/dashboards-json-configmap.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/deployment.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/headless-service.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/ingress.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/poddisruptionbudget.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/podsecuritypolicy.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/pvc.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/role.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/rolebinding.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/secret-env.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/secret.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/service.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/serviceaccount.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/statefulset.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test-configmap.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test-podsecuritypolicy.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test-role.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test-rolebinding.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test-serviceaccount.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/templates/tests/test.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/grafana/values.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/.helmignore delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/Chart.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/OWNERS delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/README.md delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/NOTES.txt delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/_helpers.tpl delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/clusterrole.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/clusterrolebinding.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/deployment.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/podsecuritypolicy.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/psp-clusterrole.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/psp-clusterrolebinding.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/service.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/serviceaccount.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/templates/servicemonitor.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/kube-state-metrics/values.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/.helmignore delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/Chart.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/OWNERS delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/README.md delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/NOTES.txt delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/_helpers.tpl delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/daemonset.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/endpoints.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/monitor.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/psp-clusterrole.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/psp-clusterrolebinding.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/psp.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/service.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/templates/serviceaccount.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/charts/prometheus-node-exporter/values.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/requirements.lock delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/requirements.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/NOTES.txt delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/_helpers.tpl delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/alertmanager.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/ingress.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/podDisruptionBudget.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/psp-clusterrole.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/psp-clusterrolebinding.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/psp.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/secret.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/service.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/serviceaccount.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/alertmanager/servicemonitor.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/core-dns/service.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/core-dns/servicemonitor.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-api-server/servicemonitor.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-controller-manager/endpoints.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-controller-manager/service.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-controller-manager/servicemonitor.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-dns/service.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-dns/servicemonitor.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-etcd/endpoints.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-etcd/service.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-etcd/servicemonitor.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-proxy/service.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-proxy/servicemonitor.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-scheduler/endpoints.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-scheduler/service.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-scheduler/servicemonitor.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kube-state-metrics/serviceMonitor.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/kubelet/servicemonitor.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/exporters/node-exporter/servicemonitor.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/configmap-dashboards.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/configmaps-datasources.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/apiserver.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/controller-manager.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/etcd.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-coredns.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-cluster.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-namespace.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-node.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-pod.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-workload.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/k8s-resources-workloads-namespace.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/kubelet.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/node-cluster-rsrc-use.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/node-rsrc-use.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/nodes.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/persistentvolumesusage.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/pods.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/prometheus-remote-write.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/prometheus.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/proxy.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/scheduler.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards-1.14/statefulset.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/etcd.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-cluster-rsrc-use.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-coredns.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-node-rsrc-use.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-resources-cluster.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-resources-namespace.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-resources-pod.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-resources-workload.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/k8s-resources-workloads-namespace.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/nodes.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/persistentvolumesusage.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/pods.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/dashboards/statefulset.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/grafana/servicemonitor.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/clusterrole.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/clusterrolebinding.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/job-createSecret.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/job-patchWebhook.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/psp.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/role.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/rolebinding.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/job-patch/serviceaccount.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/mutatingWebhookConfiguration.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/admission-webhooks/validatingWebhookConfiguration.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/cleanup-crds.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/clusterrole.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/clusterrolebinding.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/crd-alertmanager.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/crd-podmonitor.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/crd-prometheus.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/crd-prometheusrules.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/crd-servicemonitor.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/deployment.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/psp-clusterrole.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/psp-clusterrolebinding.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/psp.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/service.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/serviceaccount.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus-operator/servicemonitor.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/additionalAlertRelabelConfigs.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/additionalAlertmanagerConfigs.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/additionalPrometheusRules.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/additionalScrapeConfigs.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/clusterrole.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/clusterrolebinding.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/ingress.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/ingressperreplica.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/podDisruptionBudget.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/podmonitors.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/prometheus.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/psp-clusterrole.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/psp-clusterrolebinding.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/psp.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/alertmanager.rules.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/etcd.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/general.rules.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/k8s.rules.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-apiserver.rules.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-prometheus-node-recording.rules.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kube-scheduler.rules.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-absent.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-apps.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-resources.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-storage.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/kubernetes-system.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node-exporter.rules.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node-exporter.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node-network.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node-time.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/node.rules.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/prometheus-operator.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules-1.14/prometheus.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/alertmanager.rules.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/etcd.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/general.rules.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/k8s.rules.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kube-apiserver.rules.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kube-prometheus-node-alerting.rules.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kube-prometheus-node-recording.rules.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kube-scheduler.rules.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kubernetes-absent.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kubernetes-apps.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kubernetes-resources.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kubernetes-storage.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/kubernetes-system.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/node-network.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/node-time.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/node.rules.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/prometheus-operator.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/rules/prometheus.rules.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/service.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/serviceaccount.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/servicemonitor.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/servicemonitors.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/templates/prometheus/serviceperreplica.yaml delete mode 100755 kubernetes/helm_charts/monitoring/prometheus-operator/values.yaml delete mode 100644 kubernetes/helm_charts/monitoring/statsd-exporter/.helmignore delete mode 100644 kubernetes/helm_charts/monitoring/statsd-exporter/Chart.yaml delete mode 100644 kubernetes/helm_charts/monitoring/statsd-exporter/templates/NOTES.txt delete mode 100644 kubernetes/helm_charts/monitoring/statsd-exporter/templates/_helpers.tpl delete mode 100644 kubernetes/helm_charts/monitoring/statsd-exporter/templates/configMap.yaml delete mode 100644 kubernetes/helm_charts/monitoring/statsd-exporter/templates/deployment.yaml delete mode 100644 kubernetes/helm_charts/monitoring/statsd-exporter/templates/ingress.yaml delete mode 100644 kubernetes/helm_charts/monitoring/statsd-exporter/templates/service.yaml delete mode 100644 kubernetes/helm_charts/monitoring/statsd-exporter/templates/serviceMonitor.yml delete mode 100644 kubernetes/helm_charts/monitoring/statsd-exporter/templates/serviceaccount.yaml delete mode 100644 kubernetes/helm_charts/monitoring/statsd-exporter/templates/tests/test-connection.yaml delete mode 100644 kubernetes/helm_charts/monitoring/statsd-exporter/values.yaml delete mode 100644 kubernetes/helm_charts/networkconfig/Chart.yaml delete mode 100644 kubernetes/helm_charts/networkconfig/templates/deployment-ingress.yaml delete mode 100644 kubernetes/helm_charts/networkconfig/templates/gateway.yaml delete mode 100644 kubernetes/helm_charts/networkconfig/templates/private-gateway-ingress.yaml delete mode 100644 kubernetes/helm_charts/networkconfig/templates/private-virtualservice-ingress.yaml delete mode 100644 kubernetes/helm_charts/networkconfig/templates/service-ingress.yaml delete mode 100644 kubernetes/helm_charts/networkconfig/templates/serviceentry.yaml delete mode 100755 kubernetes/helm_charts/networkconfig/templates/virtualservice.yaml delete mode 100644 kubernetes/helm_charts/networkconfig/values.j2 delete mode 100644 kubernetes/helm_charts/rancher/.helmignore delete mode 100644 kubernetes/helm_charts/rancher/Chart.yaml delete mode 100644 kubernetes/helm_charts/rancher/templates/NOTES.txt delete mode 100644 kubernetes/helm_charts/rancher/templates/_helpers.tpl delete mode 100644 kubernetes/helm_charts/rancher/templates/deployment.yaml delete mode 100644 kubernetes/helm_charts/rancher/values.yaml delete mode 100644 kubernetes/pipelines/bootstrap_core/Jenkinsfile delete mode 100644 kubernetes/pipelines/common/Jenkinsfile delete mode 100644 kubernetes/pipelines/deploy_core/Jenkinsfile delete mode 100644 kubernetes/pipelines/deploy_core/Jenkinsfile.badger delete mode 100644 kubernetes/pipelines/logging/Jenkinsfile delete mode 100644 kubernetes/pipelines/monitoring/Jenkinsfile delete mode 100644 kubernetes/pipelines/proxy_config/Jenkinsfile delete mode 100644 kubernetes/utils/cluster_creation.sh diff --git a/ansible/api-manager.yml b/ansible/api-manager.yml index 19cb767eb..8413d2495 100644 --- a/ansible/api-manager.yml +++ b/ansible/api-manager.yml @@ -1,11 +1,7 @@ --- - name: Kong API - hosts: local become: yes - environment: - KUBECONFIG: "{{ kubeconfig_path }}" - vars_files: - - "{{inventory_dir}}/secrets.yml" + hosts: "{{groups['swarm-manager-1'][0]}}" roles: - {role: kong-api, tags: ['kong-api']} - # - {role: kong-consumer, tags: ['kong-consumer']} + - {role: kong-consumer, tags: ['kong-consumer']} diff --git a/ansible/artifacts-upload.yml b/ansible/artifacts-upload.yml index 4d3084047..4071e5132 100644 --- a/ansible/artifacts-upload.yml +++ b/ansible/artifacts-upload.yml @@ -1,5 +1,6 @@ --- -- hosts: local +- hosts: localhost + become: yes vars_files: - "{{inventory_dir}}/secrets.yml" environment: diff --git a/ansible/docker_image_push.yml b/ansible/docker_image_push.yml index 40c7b161a..e7e913c56 100644 --- a/ansible/docker_image_push.yml +++ b/ansible/docker_image_push.yml @@ -4,18 +4,19 @@ become: yes vars_files: - ['{{inventory_dir}}/secrets.yml'] + become: yes tasks: - name: login to registry docker_login: registry: "{{ vault_docker_registry_url }}" username: "{{ vault_docker_registry_user }}" password: "{{ vault_docker_registry_password }}" - + - name: Push image to registry docker_image: name: "{{ hub_org }}/{{ image_name }}:{{ image_tag }}" push: yes - + - file: path: "/root/.docker" state: absent diff --git a/ansible/inventory/env/group_vars/all.yml b/ansible/inventory/env/group_vars/all.yml index 72666dcb4..59d1e7023 100644 --- a/ansible/inventory/env/group_vars/all.yml +++ b/ansible/inventory/env/group_vars/all.yml @@ -270,7 +270,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://{{sunbird_swarm_manager_lb_ip}}:9000" +sunbird_user_service_base_url: "http://{{sunbird_swarm_manager_lb_ip}}:9000" kong_admin_api_url: http://localhost:8001 postgresql_backup_azure_storage_account_name: "{{azure_account_name}}" @@ -357,7 +357,7 @@ sunbird_device_register_api: "{{proto}}://{{api_proxy_name}}/v3/device/register/ sunbird_course_batch_notification_signature: sunbird sunbird_authorization: "{{core_vault_sunbird_api_auth_token}}" -#sunbird_lms_base_url: "http://{{sunbird_swarm_manager_lb_ip}}:8000" +sunbird_lms_base_url: "http://{{sunbird_swarm_manager_lb_ip}}:8000" sunbird_content_service_local_base_url: "http://{{sunbird_swarm_manager_lb_ip}}:5000" sunbird_kafka_host: "{{sunbird_processing_kafka_host}}" sunbird_qrimage_topic: "{{env}}.qrimage.request" @@ -680,7 +680,6 @@ sunbird_portal_azure_storage_key: "{{sunbird_azure_storage_key}}" sunbird_device_api: "{{proto}}://{{ proxy_server_name }}/api/" sunbird_quartz_shadow_user_migration_timer: "0 0 1 1/1 * ? *" - # Learning-Service lp_cassandra_connection: "{{groups['cassandra']|join(':9042,')}}:9042" dp_cassandra_connection: "{{ groups['dp-cassandra'][0] }}:9042" @@ -692,16 +691,4 @@ learning_read_elb_url: bolt://{{ groups['learning-neo4j-node1'][0] }}:7687 learning_write_elb_url: bolt://{{ groups['learning-neo4j-node1'][0] }}:7687 language_read_elb_url: bolt://{{ groups['learning-neo4j-node1'][0] }}:8687 language_write_elb_url: bolt://{{ groups['learning-neo4j-node1'][0] }}:8687 -mw_shard_id: 1 - -########### kubernetes variables ############## - -sunbird_apimanager_service_base_url: "http://kong.{{namespace}}.svc.cluster.local:8000" -sunbird_telemetry_service_url: "http://telemetry-service.{{namespace}}.svc.cluster.local:9001" -sunbird_knowledge_mw_service_url: "http://knowledge-mw-service.{{namespace}}.svc.cluster.local:5000" -sunbird_cert_service_url: "http://cert-service.{{namespace}}.svc.cluster.local:9000" -sunbird_learner_service_url: "http://learner-service.{{namespace}}.svc.cluster.local:9000" - -sunbird_lms_base_url: "{{private_ingressgateway_ip}}/api" -sunbird_user_service_base_url: "http://{{private_ingressgateway_ip}}/learner" - +mw_shard_id: 1 \ No newline at end of file diff --git a/ansible/keycloak.yml b/ansible/keycloak.yml index 1db5ce43f..a5e150930 100644 --- a/ansible/keycloak.yml +++ b/ansible/keycloak.yml @@ -18,4 +18,3 @@ service: name=monit state=started become: yes when: ansible_facts.services.monit is defined - diff --git a/ansible/roles/kong-api/defaults/main.yml b/ansible/roles/kong-api/defaults/main.yml index 859b968d7..d3cb96170 100644 --- a/ansible/roles/kong-api/defaults/main.yml +++ b/ansible/roles/kong-api/defaults/main.yml @@ -1,5 +1,7 @@ --- +kong_admin_api_url: "http://{{kong_host}}:8001" + # Default statsd_metrics statsd_metrics: ["request_count", "status_count", "latency", "upstream_latency", "request_size", "response_size"] statsd_host: monitor_statsd_exporter @@ -65,7 +67,7 @@ player_service_url: "http://player:3000" echo_service_url: "http://echo:9595" am_util_url: "http://adminutil:4000" config_service_url: "http://config-service:8080" -user_org_service_url: "http://userorg-service:9000" +user_org_service_url: "http://user-org-service:9000" lms_service_url: "http://lms-service:9000" cert_service_url: "http://cert-service:9000" cert_registry_service_url: "http://cert-registry-service:9000" @@ -84,7 +86,21 @@ premium_consumer_rate_limits: config.limit_by: credential config.policy: local +# Example: +# kong_apis: +# - name: "readContent" +# uris: "/v3/public/content/read" +# upstream_url: "{{ learning_service_url }}/v3/public/content/read" +# strip_uri: true +# plugins: +# - {name: 'jwt'} +# - {name: 'cors'} +# - {name: 'statsd', config.metrics: "{{ statsd_metrics }}" } +# - {name: 'acl', config.whitelist: 'contentUser'} +# - {name: 'rate-limiting', config.hour: "{{ medium_rate_limit_per_hour }}"} +# - {name: 'request-size-limiting', config.allowed_payload_size: "{{ medium_request_size_limit }}" } kong_apis: + - name: PrivateContentAPIs uris: "{{ private_content_prefix }}/v3" upstream_url: "{{ vm_learning_service_url }}/content/v3" diff --git a/ansible/roles/kong-api/tasks/main.yml b/ansible/roles/kong-api/tasks/main.yml index 1ddf4beca..e38ef6876 100644 --- a/ansible/roles/kong-api/tasks/main.yml +++ b/ansible/roles/kong-api/tasks/main.yml @@ -12,12 +12,22 @@ - name: Copy kong api scripts copy: src=static-files/kong-api-scripts dest=/tmp mode=0755 -- name: Getting private lb ip - command: kubectl get svc -n istio-system ingressgateway-private -o jsonpath='{.status.loadBalancer.ingress[0].ip}' - register: private_lb_ip + #- name: "Ensure kong_admin_api_url is available before running the scripts" + # uri: + # url: "{{ kong_admin_api_url }}/status" + # status_code: 200 + # register: result + # until: result.status == 200 + # retries: 60 + # delay: 5 + +- name: Extracting where the host in which api manager is running + command: bash -lc "sudo docker service ps api-manager_kong | grep Runn | head -n1 | awk '{print $4}'" + register: kong_running_host + delegate_to: "{{groups['swarm-manager-1'][0]}}" - set_fact: - kong_admin_api_url: "http://{{private_lb_ip.stdout}}/admin-api" + kong_admin_api_url: "http://{{kong_running_host.stdout}}:8001" - name: waiting for 30 seconds for api manager to be fully functional pause: diff --git a/deploy/jenkins/jenkins-server-setup.sh b/deploy/jenkins/jenkins-server-setup.sh index 14aba2a4c..979438348 100755 --- a/deploy/jenkins/jenkins-server-setup.sh +++ b/deploy/jenkins/jenkins-server-setup.sh @@ -1,4 +1,3 @@ - #!/bin/bash bold=$(tput bold) normal=$(tput sgr0) @@ -89,22 +88,6 @@ cp ./azcopy_linux_amd64_*/azcopy /usr/bin/ rm -rf downloadazcopy-v10-linux* azcopy_linux_amd* ### -# Install Helm version 2 -echo -e "\n\e[0;32m${bold}Installating Helm${normal}" -wget https://get.helm.sh/helm-v2.15.2-linux-amd64.tar.gz -tar -xzvf helm-v2.15.2-linux-amd64.tar.gz -cp linux-amd64/helm /usr/local/bin/helm -rm -rf helm-v* linux-amd* - -# Install kubectl -echo -e "\n\e[0;32m${bold}Installating kubectl${normal}" -curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - -touch /etc/apt/sources.list.d/kubernetes.list -echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list -apt-get update -apt-get install -y kubectl - - echo -e "\n\e[0;32m${bold}Installating Docker-py${normal}" pip install docker-py @@ -131,4 +114,3 @@ echo -e "\n\e[0;32m${bold}Clean up${normal}" sudo apt -y autoremove echo -e "\n\e[0;32m${bold}Installation complete. Please go to your jenkins URL and continue setup if this is the first run..${normal}" - diff --git a/images/openbadger/Dockerfile b/images/openbadger/Dockerfile index 7f6664657..44a30c92c 100755 --- a/images/openbadger/Dockerfile +++ b/images/openbadger/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:16.04 +FROM ubuntu:17.10 MAINTAINER Rajesh Rajendran # Installing and configuring packages diff --git a/images/openbadger/configure.sh b/images/openbadger/configure.sh index 013a47b87..189b36884 100755 --- a/images/openbadger/configure.sh +++ b/images/openbadger/configure.sh @@ -6,7 +6,7 @@ apt-get update && apt-get install -y \ nodejs npm libffi-dev libxml2-dev libxslt-dev \ postgresql-client -pip install psycopg2-binary +pip install psycopg2 # Cloning source code of badger cd /badger diff --git a/kubernetes/ansible/badger.yml b/kubernetes/ansible/badger.yml deleted file mode 100644 index e9634a5ea..000000000 --- a/kubernetes/ansible/badger.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -- hosts: local - gather_facts: no - vars_files: - - "{{inventory_dir}}/secrets.yml" - environment: - KUBECONFIG: "{{ kubeconfig_path }}" - roles: - - deploy-badger diff --git a/kubernetes/ansible/bootstrap.yaml b/kubernetes/ansible/bootstrap.yaml deleted file mode 100644 index a00355730..000000000 --- a/kubernetes/ansible/bootstrap.yaml +++ /dev/null @@ -1,35 +0,0 @@ ---- -# tasks file for bootstrap-k8s - -- hosts: local - gather_facts: false - environment: - KUBECONFIG: "{{ kubeconfig_path }}" - serial: 1 - vars_files: - - "{{inventory_dir}}/secrets.yml" - pre_tasks: - - name: Creating namespace - shell: "kubectl create namespace {{ item }} " - with_items: - - "{{ namespace }}" - - monitoring - - "{{env}}-logging" - - istio-system - ignore_errors: yes - - 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 }} - ignore_errors: yes - - name: creating the serviceaccount for tiller - shell: kubectl -n kube-system create serviceaccount tiller - ignore_errors: yes - - name: creating the clusterrolebinding for tiller - shell: kubectl create clusterrolebinding tiller --clusterrole=cluster-admin --serviceaccount=kube-system:tiller - ignore_errors: yes - - name: Inizializing the tiller - shell: helm init --service-account tiller - ignore_errors: yes - roles: - - istio diff --git a/kubernetes/ansible/deploy_core_service.yml b/kubernetes/ansible/deploy_core_service.yml deleted file mode 100644 index ff7b9629e..000000000 --- a/kubernetes/ansible/deploy_core_service.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -- hosts: local - gather_facts: no - vars_files: - - "{{inventory_dir}}/secrets.yml" - environment: - KUBECONFIG: "{{ kubeconfig_path }}" - roles: - - sunbird-deploy diff --git a/kubernetes/ansible/istio.yaml b/kubernetes/ansible/istio.yaml deleted file mode 100644 index 44d6fe3c4..000000000 --- a/kubernetes/ansible/istio.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -- hosts: localhost - gather_facts: false - roles: - - istio - environment: - KUBECONFIG: "{{ kubeconfig_path }}" diff --git a/kubernetes/ansible/monitoring.yaml b/kubernetes/ansible/monitoring.yaml deleted file mode 100644 index a4b715aa0..000000000 --- a/kubernetes/ansible/monitoring.yaml +++ /dev/null @@ -1,9 +0,0 @@ ---- -- hosts: localhost - gather_facts: false - vars_files: - - ['{{inventory_dir}}/secrets.yml', 'secrets/{{env}}.yml'] - roles: - - sunbird-monitoring - environment: - KUBECONFIG: "{{ kubeconfig_path }}" diff --git a/kubernetes/ansible/networkconfig.yaml b/kubernetes/ansible/networkconfig.yaml deleted file mode 100644 index 4fdb123a3..000000000 --- a/kubernetes/ansible/networkconfig.yaml +++ /dev/null @@ -1,9 +0,0 @@ ---- -- hosts: local - gather_facts: no - vars_files: - - "{{inventory_dir}}/secrets.yml" - roles: - - proxy - environment: - KUBECONFIG: "{{ kubeconfig_path }}" diff --git a/kubernetes/ansible/player.yml b/kubernetes/ansible/player.yml deleted file mode 100644 index 8a0f5ad92..000000000 --- a/kubernetes/ansible/player.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -- hosts: local - gather_facts: no - vars_files: - - "{{inventory_dir}}/secrets.yml" - environment: - KUBECONFIG: "{{ kubeconfig_path }}" - roles: - - deploy-player diff --git a/kubernetes/ansible/roles/deploy-badger/defaults/main.yml b/kubernetes/ansible/roles/deploy-badger/defaults/main.yml deleted file mode 100644 index 1e5632417..000000000 --- a/kubernetes/ansible/roles/deploy-badger/defaults/main.yml +++ /dev/null @@ -1 +0,0 @@ -badger_admin_user: admin diff --git a/kubernetes/ansible/roles/deploy-badger/tasks/main.yml b/kubernetes/ansible/roles/deploy-badger/tasks/main.yml deleted file mode 100644 index 6c449158d..000000000 --- a/kubernetes/ansible/roles/deploy-badger/tasks/main.yml +++ /dev/null @@ -1,51 +0,0 @@ - -- name: template values file - template: - src: "{{ chart_path }}/values.j2" - dest: "{{ chart_path }}/values.yaml" - -- name: template configmap file - template: - src: "configmap.j2" - dest: "{{ chart_path }}/templates/configmap.yaml" - -- name: helm install - shell: helm upgrade --install {{ release_name }} {{ chart_path }} - #shell: helm template {{ chart_path }} > /tmp/test.yaml - -- name: Copying user creation template - template: - src: user.j2 - dest: /tmp/user.sh - mode: 0755 - -- name: Copying user creation script to badger - shell: "kubectl cp /tmp/user.sh --namespace={{namespace}} $(kubectl get pod --namespace={{namespace}} | grep badger-* | awk '{print $1}' | head -n1):/tmp/user.sh" - -- name: Creating superuser - shell: "kubectl exec --namespace={{namespace}} $(kubectl get pod --namespace={{namespace}} | grep badger-* | awk '{print $1}' | head -n1) /tmp/user.sh" - no_log: true - -- name: Cleaning up secrets in container - shell: "kubectl exec --namespace={{namespace}} $(kubectl get pod --namespace={{namespace}} | grep badger-* | awk '{print $1}' | head -n1) rm /tmp/user.sh" - -- name: Deleting user.sh - become: yes - file: - name: "/tmp/user.sh" - state: absent - -- name: Getting private lb ip - command: kubectl get svc -n istio-system ingressgateway-private -o jsonpath='{.status.loadBalancer.ingress[0].ip}' - register: private_lb_ip - -- set_fact: - badger_url: "http://{{private_lb_ip.stdout}}/badger" - -- name: Getting auth token - shell: curl -X POST '{{badger_url}}' -d "username="{{badger_admin_user}}"&password={{badger_admin_password}}" - register: curl - no_log: true - -- name: Copy admin auth token to desktop - copy: content="{{curl.stdout}}" dest=~/badger_token.txt \ No newline at end of file diff --git a/kubernetes/ansible/roles/deploy-badger/templates/configmap.j2 b/kubernetes/ansible/roles/deploy-badger/templates/configmap.j2 deleted file mode 100644 index 7b3737dce..000000000 --- a/kubernetes/ansible/roles/deploy-badger/templates/configmap.j2 +++ /dev/null @@ -1,158 +0,0 @@ -apiVersion: v1 -data: - settings_local.py: |+ - # settings_local.py is for all instance specific settings - - - from settings import * - from mainsite import TOP_DIR - - DEBUG = False - TEMPLATE_DEBUG = DEBUG - DEBUG_ERRORS = DEBUG - DEBUG_STATIC = DEBUG - DEBUG_MEDIA = DEBUG - - TIME_ZONE = 'America/Los_Angeles' - LANGUAGE_CODE = 'en-us' - - - DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.postgresql_psycopg2', # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. - 'NAME': "{{badger_postgres_database}}", - 'USER': "{{badger_postgres_user}}", # Not used with sqlite3. - 'PASSWORD': "{{badger_postgres_password}}", # Not used with sqlite3. - 'HOST': "{{badger_host}}", # Set to empty string for localhost. Not used with sqlite3. - 'PORT': '5432', # Set to empty string for default. Not used with sqlite3. - 'OPTIONS': { - # "init_command": "SET storage_engine=InnoDB", # Uncomment when using MySQL to ensure consistency across servers - }, - } - } - - - CACHES = { - 'default': { - 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', - 'LOCATION': '', - 'TIMEOUT': 300, - 'KEY_PREFIX': '', - 'VERSION': 1, - } - } - - - - # celery - BROKER_URL = 'amqp://localhost:5672/' - CELERY_RESULT_BACKEND = 'djcelery.backends.cache:CacheBackend' - CELERY_TASK_SERIALIZER = 'json' - CELERY_RESULTS_SERIALIZER = 'json' - CELERY_ACCEPT_CONTENT = ['json'] - - HTTP_ORIGIN = '{{sunbird_http_orgin}}' - - # Optionally restrict issuer creation to accounts that have the 'issuer.add_issuer' permission - BADGR_APPROVED_ISSUERS_ONLY = True - - # If you have an informational front page outside the Django site that can link back to '/login', specify it here - ROOT_INFO_REDIRECT = '/login' - - # For the browsable API documentation at '/docs' - # For local development environment: When you have a user you'd like to make API requests, - # as you can force the '/docs' endpoint to use particular credentials. - # Get a token for your user at '/v1/user/auth-token' - # SWAGGER_SETTINGS = { - # 'api_key': '' - # } - - - #LTI_OAUTH_CREDENTIALS = { - # 'test': 'secret', - # 'test2': 'reallysecret' - #} - - LOGS_DIR = TOP_DIR + '/logs' - - - # Run celery tasks in same thread as webserver - CELERY_ALWAYS_EAGER = True - - - EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' - # EMAIL_BACKEND = 'django_ses.SESBackend' - - # These are optional -- if they're set as environment variables they won't - # need to be set here as well - # AWS_ACCESS_KEY_ID = '' - # AWS_SECRET_ACCESS_KEY = '' - - # Your SES account may only be available for one region. You can specify a region, like so: - # AWS_SES_REGION_NAME = 'us-west-2' - # AWS_SES_REGION_ENDPOINT = 'email.us-west-2.amazonaws.com' - # OR: - # AWS_SES_REGION_NAME = 'us-east-1' - # AWS_SES_REGION_ENDPOINT = 'email.us-east-1.amazonaws.com' - - DEFAULT_FROM_EMAIL = '' - ##AZURE CONFIGURATION### - DEFAULT_FILE_STORAGE = "{{badger_file_storage}}" - AZURE_ACCOUNT_NAME = "{{sunbird_account_name}}" - AZURE_ACCOUNT_KEY = "{{sunbird_account_key}}" - MEDIA_URL = "{{badger_url}}" - AZURE_CONTAINER = "{{badger_container}}" - - LOGS_DIR = os.path.join(TOP_DIR, 'logs') - if not os.path.exists(LOGS_DIR): - os.makedirs(LOGS_DIR) - LOGGING = { - 'version': 1, - 'disable_existing_loggers': False, - 'handlers': { - 'mail_admins': { - 'level': 'ERROR', - 'filters': [], - 'class': 'django.utils.log.AdminEmailHandler' - }, - - # badgr events log to disk by default - 'badgr_events': { - 'level': 'INFO', - 'formatter': 'json', - 'class': 'logging.FileHandler', - 'filename': os.path.join(LOGS_DIR, 'badgr_events.log') - } - }, - 'loggers': { - 'django.request': { - 'handlers': ['mail_admins'], - 'level': 'ERROR', - 'propagate': True, - }, - - # Badgr.Events emits all badge related activity - 'Badgr.Events': { - 'handlers': ['badgr_events'], - 'level': 'INFO', - 'propagate': False, - - } - - }, - 'formatters': { - 'default': { - 'format': '%(asctime)s %(levelname)s %(module)s %(message)s' - }, - 'json': { - '()': 'mainsite.formatters.JsonFormatter', - 'format': '%(asctime)s', - 'datefmt': '%Y-%m-%dT%H:%M:%S%z', - } - }, - } -kind: ConfigMap -metadata: - creationTimestamp: null - name: badger-config - namespace: {{ namespace }} diff --git a/kubernetes/ansible/roles/deploy-badger/templates/user.j2 b/kubernetes/ansible/roles/deploy-badger/templates/user.j2 deleted file mode 100644 index d0d8dceee..000000000 --- a/kubernetes/ansible/roles/deploy-badger/templates/user.j2 +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -echo "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser('{{badger_admin_user}}', '{{badger_admin_email}}', '{{badger_admin_password}}')" | python /badger/code/manage.py shell 2> /dev/null diff --git a/kubernetes/ansible/roles/deploy-player/tasks/main.yml b/kubernetes/ansible/roles/deploy-player/tasks/main.yml deleted file mode 100644 index 003528cd5..000000000 --- a/kubernetes/ansible/roles/deploy-player/tasks/main.yml +++ /dev/null @@ -1,33 +0,0 @@ -- name: Create a directory if it does not exist - file: - path: /var/lib/jenkins/player_config - state: directory - -- name: Remove existing index_cdn.ejs - file: path=/var/lib/jenkins/player_config/index_cdn.ejs state=absent - ignore_errors: true - -- name: copy new index file - copy: src="{{cdn_file_path}}" dest="/var/lib/jenkins/player_config/index_cdn.ejs" mode=0644 - when: sunbird_portal_cdn_url is undefined and cdn_file_path is undefined - -- name: remove whitespaces in index file - shell: 'sed -i s/\\s\\+$//e /var/lib/jenkins/player_config/index_cdn.ejs' - when: sunbird_portal_cdn_url is undefined and cdn_file_path is undefined - -- name: Remove the existing CDN config - shell: "kubectl delete configmap player-cdn-config --namespace={{namespace}}" - ignore_errors: true - -- name: Create player-cdn configmap - shell: "kubectl create configmap player-cdn-config --from-file=/var/lib/jenkins/player_config/index_cdn.ejs --namespace={{namespace}}" - when: sunbird_portal_cdn_url is undefined and cdn_file_path is undefined - -- name: rename template - template: - src: "{{ chart_path }}/values.j2" - dest: "{{ chart_path }}/values.yaml" - -- name: helm install - shell: helm upgrade --install {{ release_name }} {{ chart_path }} - #shell: helm template {{ chart_path }} > /tmp/test.yaml \ No newline at end of file diff --git a/kubernetes/ansible/roles/istio/README.md b/kubernetes/ansible/roles/istio/README.md deleted file mode 100644 index 225dd44b9..000000000 --- a/kubernetes/ansible/roles/istio/README.md +++ /dev/null @@ -1,38 +0,0 @@ -Role Name -========= - -A brief description of the role goes here. - -Requirements ------------- - -Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. - -Role Variables --------------- - -A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. - -Dependencies ------------- - -A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. - -Example Playbook ----------------- - -Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: - - - hosts: servers - roles: - - { role: username.rolename, x: 42 } - -License -------- - -BSD - -Author Information ------------------- - -An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/kubernetes/ansible/roles/istio/defaults/main.yml b/kubernetes/ansible/roles/istio/defaults/main.yml deleted file mode 100644 index 908ffab1e..000000000 --- a/kubernetes/ansible/roles/istio/defaults/main.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -# defaults file for istio - - diff --git a/kubernetes/ansible/roles/istio/handlers/main.yml b/kubernetes/ansible/roles/istio/handlers/main.yml deleted file mode 100644 index 01778cdfb..000000000 --- a/kubernetes/ansible/roles/istio/handlers/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# handlers file for istio \ No newline at end of file diff --git a/kubernetes/ansible/roles/istio/meta/main.yml b/kubernetes/ansible/roles/istio/meta/main.yml deleted file mode 100644 index 722379974..000000000 --- a/kubernetes/ansible/roles/istio/meta/main.yml +++ /dev/null @@ -1,57 +0,0 @@ -galaxy_info: - author: your name - description: your description - 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 - - # Some suggested licenses: - # - BSD (default) - # - MIT - # - GPLv2 - # - GPLv3 - # - Apache - # - CC-BY - license: license (GPLv2, CC-BY, etc) - - min_ansible_version: 1.2 - - # If this a Container Enabled role, provide the minimum Ansible Container version. - # min_ansible_container_version: - - # Optionally specify the branch Galaxy will use when accessing the GitHub - # repo for this role. During role install, if no tags are available, - # Galaxy will use this branch. During import Galaxy will access files on - # this branch. If Travis integration is configured, only notifications for this - # branch will be accepted. Otherwise, in all cases, the repo's default branch - # (usually master) will be used. - #github_branch: - - # - # platforms is a list of platforms, and each platform has a name and a list of versions. - # - # 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/kubernetes/ansible/roles/istio/tasks/main.yml b/kubernetes/ansible/roles/istio/tasks/main.yml deleted file mode 100644 index f81680054..000000000 --- a/kubernetes/ansible/roles/istio/tasks/main.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- -# tasks file for istio -- name: tempating variables - template: - src: "{{ item }}.yaml" - dest: "/tmp/{{item}}.yaml" - with_items: - - istio - -- name: initializing istio-crds - shell: helm upgrade --install istio-init {{ chart_path }}/istio-init --namespace istio-system - -- name: waiting for crds to get completed - pause: - seconds: 30 - -- name: installing istio - shell: helm upgrade --install istio {{ chart_path }}/istio --namespace istio-system -f /tmp/istio.yaml diff --git a/kubernetes/ansible/roles/istio/templates/istio.yaml b/kubernetes/ansible/roles/istio/templates/istio.yaml deleted file mode 100644 index bc613f2be..000000000 --- a/kubernetes/ansible/roles/istio/templates/istio.yaml +++ /dev/null @@ -1,25 +0,0 @@ -nodeagent: - enabled: true - image: node-agent-k8s - env: - CA_PROVIDER: "Citadel" - CA_ADDR: "istio-citadel:8060" - VALID_TOKEN: true -prometheus: - enabled: false -tracing: - enabled: true -kiali: - enabled: true -istiocoredns: - enabled: true -global: - proxy: - accessLogFile: "/dev/stdout" - readinessPeriodSeconds: 5 - -gateways: - istio-ingressgateway: - sds: - enabled: true - loadBalancerIP: "{{ swarm_public_lb_ip }}" diff --git a/kubernetes/ansible/roles/istio/tests/inventory b/kubernetes/ansible/roles/istio/tests/inventory deleted file mode 100644 index 878877b07..000000000 --- a/kubernetes/ansible/roles/istio/tests/inventory +++ /dev/null @@ -1,2 +0,0 @@ -localhost - diff --git a/kubernetes/ansible/roles/istio/tests/test.yml b/kubernetes/ansible/roles/istio/tests/test.yml deleted file mode 100644 index 9ba77038e..000000000 --- a/kubernetes/ansible/roles/istio/tests/test.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- hosts: localhost - remote_user: root - roles: - - istio \ No newline at end of file diff --git a/kubernetes/ansible/roles/istio/vars/main.yml b/kubernetes/ansible/roles/istio/vars/main.yml deleted file mode 100644 index 729c39789..000000000 --- a/kubernetes/ansible/roles/istio/vars/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# vars file for istio \ No newline at end of file diff --git a/kubernetes/ansible/roles/proxy/README.md b/kubernetes/ansible/roles/proxy/README.md deleted file mode 100644 index 225dd44b9..000000000 --- a/kubernetes/ansible/roles/proxy/README.md +++ /dev/null @@ -1,38 +0,0 @@ -Role Name -========= - -A brief description of the role goes here. - -Requirements ------------- - -Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. - -Role Variables --------------- - -A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. - -Dependencies ------------- - -A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. - -Example Playbook ----------------- - -Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: - - - hosts: servers - roles: - - { role: username.rolename, x: 42 } - -License -------- - -BSD - -Author Information ------------------- - -An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/kubernetes/ansible/roles/proxy/defaults/main.yml b/kubernetes/ansible/roles/proxy/defaults/main.yml deleted file mode 100644 index b72c70529..000000000 --- a/kubernetes/ansible/roles/proxy/defaults/main.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -# defaults file for bootstrap-k8s -bootstrap_items: - - gateway - - serviceentry - - virtualservice -namespace: dev diff --git a/kubernetes/ansible/roles/proxy/tasks/main.yml b/kubernetes/ansible/roles/proxy/tasks/main.yml deleted file mode 100644 index a82c33a96..000000000 --- a/kubernetes/ansible/roles/proxy/tasks/main.yml +++ /dev/null @@ -1,30 +0,0 @@ ---- -# Proxy config -- name: Deleting domain ssl if present - shell: "kubectl get secrets ingress-cert -n istio-system && kubectl delete secrets ingress-cert -n istio-system" - ignore_errors: true - -- name: Creating domain sssl - shell: - cmd: | - cat < /tmp/test.yaml diff --git a/kubernetes/ansible/roles/proxy/templates/gateway.yaml b/kubernetes/ansible/roles/proxy/templates/gateway.yaml deleted file mode 100644 index 657a27cfd..000000000 --- a/kubernetes/ansible/roles/proxy/templates/gateway.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: networking.istio.io/v1alpha3 -kind: Gateway -metadata: - name: public-gateway - namespace: dev -spec: - servers: - - port: - number: 80 - name: http - protocol: HTTP - hosts: - - dev.centralindia.cloudapp.azure.com - - port: - number: 443 - name: https - protocol: HTTPS - tls: - mode: SIMPLE - credentialName: ingress-cert # must be the same as secret - hosts: - - dev.centralindia.cloudapp.azure.com diff --git a/kubernetes/ansible/roles/proxy/templates/serviceentry.yaml b/kubernetes/ansible/roles/proxy/templates/serviceentry.yaml deleted file mode 100644 index da9960a75..000000000 --- a/kubernetes/ansible/roles/proxy/templates/serviceentry.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: networking.istio.io/v1alpha3 -kind: ServiceEntry -metadata: - name: "kecloak-{{namespace}}" - namespace: "{{namespace}}" -spec: - hosts: - - "keycloak.{{ namespace }}.global" - addresses: - - "{{ groups['keycloak'][0] }}" - ports: - - number: 8080 - name: keycloak - protocol: HTTP - location: MESH_INTERNAL - resolution: DNS -# endpoints: -# - address: 11.2.0.129 diff --git a/kubernetes/ansible/roles/proxy/templates/virtualservice.yaml b/kubernetes/ansible/roles/proxy/templates/virtualservice.yaml deleted file mode 100644 index 0f5d78026..000000000 --- a/kubernetes/ansible/roles/proxy/templates/virtualservice.yaml +++ /dev/null @@ -1,154 +0,0 @@ ---- -apiVersion: networking.istio.io/v1alpha3 -kind: VirtualService -metadata: - name: virtual-istio - namespace: "{{namespace}}" -spec: - gateways: - - public-gateway - hosts: - - "{{ domain_name}}" - http: - - match: - - uri: - prefix: /kiali/ - rewrite: - uri: / - route: - - destination: - host: kiali.istio-system.svc.cluster.local - - match: - - uri: - prefix: /grafana/ - rewrite: - uri: / - route: - - destination: - host: prometheus-operator-grafana.monitoring.svc.cluster.local - - match: - - uri: - prefix: /auth/admin/master/console/ - rewrite: - uri: / - route: - - destination: - host: player-service - - match: - - uri: - prefix: /auth/ - route: - - destination: - host: keycloak.{{namespace}}.global - port: - number: 8080 - - match: - - uri: - prefix: /api/ - rewrite: - uri: / - route: - - destination: - host: apimanager-service - port: - number: 8000 - - match: - - uri: - prefix: /content/preview/ - rewrite: - authority: sunbirddev.blob.core.windows.net - uri: /sunbird-content-dev/v3/preview/ - route: - - destination: - host: sunbirddev.blob.core.windows.net - - match: - - uri: - prefix: /assets/public/ - rewrite: - authority: sunbirddev.blob.core.windows.net - uri: /sunbird-content-dev/ - route: - - destination: - host: sunbirddev.blob.core.windows.net - headers: - request: - add: - Accept: '*/*' - Access-Control-Allow-Methods: GET - Access-Control-Allow-Origin: '*' - Authorization: "" - Cache-Control: public - Host: sunbirddev.blob.core.windows.net - Pragma: public - remove: - - Access-Control-Allow-Origin - - Access-Control-Allow-Methods - - x-amz-id-2 - - x-amz-request-id - - Set-Cookie - - match: - - uri: - prefix: /content-plugins/ - rewrite: - authority: sunbirddev.blob.core.windows.net - uri: /sunbird-content-dev/content-plugins/ - route: - - destination: - host: sunbirddev.blob.core.windows.net - headers: - request: - add: - Access-Control-Allow-Methods: GET - Access-Control-Allow-Origin: '*' - Authorization: "" - Cache-Control: public - Host: sunbirddev.blob.core.windows.net - Pragma: public - remove: - - Access-Control-Allow-Origin - - Access-Control-Allow-Methods - - x-amz-id-2 - - x-amz-request-id - - Set-Cookie - - match: - - uri: - prefix: /thirdparty/ - rewrite: - uri: / - route: - - destination: - host: player-service - headers: - request: - add: - Cache-Control: public - Pragma: public - - match: - - uri: - prefix: /kibana - route: - - destination: - host: oauth2-proxy-service.logging.svc.cluster.local - port: - number: 4180 - - match: - - uri: - prefix: /oauth2 - route: - - destination: - host: oauth2-proxy-service.logging.svc.cluster.local - port: - number: 4180 - - match: - - uri: - prefix: / - route: - - destination: - host: player-service - - match: - - uri: - prefix: /test/ - route: - - destination: - host: test-service - diff --git a/kubernetes/ansible/roles/sunbird-deploy/defaults/main.yml b/kubernetes/ansible/roles/sunbird-deploy/defaults/main.yml deleted file mode 100644 index 7bb151ec0..000000000 --- a/kubernetes/ansible/roles/sunbird-deploy/defaults/main.yml +++ /dev/null @@ -1 +0,0 @@ -#chart_path: \ No newline at end of file diff --git a/kubernetes/ansible/roles/sunbird-deploy/tasks/main.yml b/kubernetes/ansible/roles/sunbird-deploy/tasks/main.yml deleted file mode 100644 index c6cee68d5..000000000 --- a/kubernetes/ansible/roles/sunbird-deploy/tasks/main.yml +++ /dev/null @@ -1,10 +0,0 @@ - -- name: rename template - template: - src: "{{ chart_path }}/values.j2" - dest: "{{ chart_path }}/values.yaml" - - -- name: helm install - shell: helm upgrade --install {{ release_name }} {{ chart_path }} - #shell: helm template {{ chart_path }} > /tmp/test.yaml diff --git a/kubernetes/ansible/roles/sunbird-monitoring/README.md b/kubernetes/ansible/roles/sunbird-monitoring/README.md deleted file mode 100644 index 9e3454265..000000000 --- a/kubernetes/ansible/roles/sunbird-monitoring/README.md +++ /dev/null @@ -1,49 +0,0 @@ -Role Name -========= - -A brief description of the role goes here. - -Requirements ------------- - -Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. - -Role Variables --------------- - -A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. -* monitor_alerts_mail_from_email: # Email from address -* monitor_alerts_mail_server_host: # Email host address -* monitor_alerts_mail_server_port: 587 # Email server port -* monitor_alerts_mail_server_username: # Email user -* monitor_alerts_mail_server_password: # Email password -* monitor_alerts_slack_url: # Slack URL -* monitor_alerts_slack_channel: # Slack channel -* env: # Environment name -* cluster_name: KUBERNETES # Cluster name -* default_mailing_list: # Default email list for alerts - - -Dependencies ------------- - -A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. - -Example Playbook ----------------- - -Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: - - - hosts: servers - roles: - - { role: username.rolename, x: 42 } - -License -------- - -BSD - -Author Information ------------------- - -An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml b/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml deleted file mode 100644 index 3e1b68fee..000000000 --- a/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml +++ /dev/null @@ -1,147 +0,0 @@ ---- -# defaults file for sunbird-monitoring -fullnameOverride: sunbird-monitoring -monitoring_stack: - - prometheus-operator - - kafka-lag-exporter - - cassandra-jmx-exporter - - statsd-exporter - - elasticsearch-exporter - - logger - - blackbox-exporter - - additional-scrape-configs - - alertrules - -namespace: monitoring - -monitor_alerts_mail_from_email: -monitor_alerts_mail_server_host: -monitor_alerts_mail_server_port: 587 -monitor_alerts_mail_server_username: -monitor_alerts_mail_server_password: -monitor_alerts_slack_url: -monitor_alerts_slack_channel: -env: dev -cluster_name: KUBERNETES - -default_critical_mailing_list: "{{ default_mailing_list }}" -default_fatal_mailing_list: "{{ default_mailing_list }}" -lp_process_exporter_team_mailing_list: "{{ default_mailing_list }}" -lp_process_exporter_team_mailing_list_critical: "{{ default_critical_mailing_list }}" -lp_process_exporter_team_mailing_list_fatal: "{{ default_fatal_mailing_list }}" -druid_team_mailing_list: "{{ default_mailing_list }}" -druid_team_mailing_list_critical: "{{ default_critical_mailing_list }}" -druid_team_mailing_list_fatal: "{{ default_fatal_mailing_list }}" -default_mailing_list: smy.altamash@gmail.com -dp_process_exporter_team_mailing_list: "{{ default_mailing_list }}" -dp_process_exporter_team_mailing_list_critical: "{{ default_critical_mailing_list }}" -dp_process_exporter_team_mailing_list_fatal: "{{ default_fatal_mailing_list }}" -node_exporter_team_mailing_list: "{{ default_mailing_list }}" -node_exporter_team_mailing_list_critical: "{{ default_critical_mailing_list }}" -node_exporter_team_mailing_list_fatal: "{{ default_fatal_mailing_list }}" -elasticsearch_exporter_team_mailing_list: "{{ default_mailing_list }}" -elasticsearch_exporter_team_mailing_list_critical: "{{ default_critical_mailing_list }}" -elasticsearch_exporter_team_mailing_list_fatal: "{{ default_fatal_mailing_list }}" -blackbox_exporter_team_mailing_list: "{{ default_mailing_list }}" -blackbox_exporter_team_mailing_list_critical: "{{ default_critical_mailing_list }}" -blackbox_exporter_team_mailing_list_fatal: "{{ default_fatal_mailing_list }}" - -alert_teams: - - team: lp_process_exporter_team - group: groupname - alerts_mailing_list: "{{ lp_process_exporter_team_mailing_list }}" - services: - - tomcat_.* - - search_.* - - neo4j_.* - - kafka_.* - - zookeeper_.* - - yarn_.* - - redis-server.* - - cassandra_.* - - elasticsearch_.* - - logstash_.* - severity_mailing_filter: - - severity: critical - alerts_mailing_list: "{{ lp_process_exporter_team_mailing_list_critical }}" - - severity: fatal - alerts_mailing_list: "{{ lp_process_exporter_team_mailing_list_fatal }}" - - team: druid_process_exporter_team - group: groupname - alerts_mailing_list: "{{ druid_team_mailing_list }}" - services: - - druidzookeeper.* - - druidpostgres.* - - overlord.* - - coordinator.* - - historical.* - - broker.* - - middle-Manager.* - severity_mailing_filter: - - severity: critical - alerts_mailing_list: "{{ druid_team_mailing_list_critical }}" - - severity: fatal - alerts_mailing_list: "{{ druid_team_mailing_list_fatal }}" - - team: dp_process_exporter_team - group: groupname - alerts_mailing_list: "{{ dp_process_exporter_team_mailing_list }}" - services: - - analytics.* - - influx.* - - secor.* - - kafka_.* - - zookeeper_.* - - yarn_.* - severity_mailing_filter: - - severity: critical - alerts_mailing_list: "{{ dp_process_exporter_team_mailing_list_critical }}" - - severity: fatal - alerts_mailing_list: "{{ dp_process_exporter_team_mailing_list_fatal }}" - - team: node_exporter_team - group: job - alerts_mailing_list: "{{ node_exporter_team_mailing_list }}" - services: - - .*node-exporter - severity_mailing_filter: - - severity: critical - alerts_mailing_list: "{{ node_exporter_team_mailing_list_critical }}" - - severity: fatal - alerts_mailing_list: "{{ node_exporter_team_mailing_list_fatal }}" - - team: elasticsearch_exporter_team - group: service - alerts_mailing_list: "{{ elasticsearch_exporter_team_mailing_list }}" - services: - - .*elasticsearch-exporter - severity_mailing_filter: - - severity: critical - alerts_mailing_list: "{{ elasticsearch_exporter_team_mailing_list_critical }}" - - severity: fatal - alerts_mailing_list: "{{ elasticsearch_exporter_team_mailing_list_fatal }}" - - team: blackbox_exporter_team - group: service_name - alerts_mailing_list: "{{ blackbox_exporter_team_mailing_list }}" - services: - - .*-service - severity_mailing_filter: - - severity: critical - alerts_mailing_list: "{{ blackbox_exporter_team_mailing_list_critical }}" - - severity: fatal - alerts_mailing_list: "{{ blackbox_exporter_team_mailing_list_fatal }}" - -service_blackbox_checks: - - service_name: 'analytics-service' - probe_module: http_2xx - targets: - - "{{sunbird_analytics_api_base_url}}/health" - - service_name: 'learning-service' - probe_module: http_2xx - targets: - - "{{sunbird_content_repo_api_base_url}}/health" - - service_name: 'search-service' - probe_module: http_2xx - targets: - - "{{sunbird_search_service_api_base_url}}/health" - - service_name: 'keycloak-service' - probe_module: http_2xx - targets: - - "{{proto}}://{{proxy_server_name}}/auth/realms/sunbird/protocol/openid-connect/auth?client_id=portal&state=foo&redirect_uri=https%3A%2F%2F{{proxy_server_name}}%2Fprivate%2Findex%3Fauth_callback%3D1&scope=openid&response_type=code" diff --git a/kubernetes/ansible/roles/sunbird-monitoring/handlers/main.yml b/kubernetes/ansible/roles/sunbird-monitoring/handlers/main.yml deleted file mode 100644 index b34ace797..000000000 --- a/kubernetes/ansible/roles/sunbird-monitoring/handlers/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# handlers file for sunbird-monitoring \ No newline at end of file diff --git a/kubernetes/ansible/roles/sunbird-monitoring/meta/main.yml b/kubernetes/ansible/roles/sunbird-monitoring/meta/main.yml deleted file mode 100644 index 722379974..000000000 --- a/kubernetes/ansible/roles/sunbird-monitoring/meta/main.yml +++ /dev/null @@ -1,57 +0,0 @@ -galaxy_info: - author: your name - description: your description - 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 - - # Some suggested licenses: - # - BSD (default) - # - MIT - # - GPLv2 - # - GPLv3 - # - Apache - # - CC-BY - license: license (GPLv2, CC-BY, etc) - - min_ansible_version: 1.2 - - # If this a Container Enabled role, provide the minimum Ansible Container version. - # min_ansible_container_version: - - # Optionally specify the branch Galaxy will use when accessing the GitHub - # repo for this role. During role install, if no tags are available, - # Galaxy will use this branch. During import Galaxy will access files on - # this branch. If Travis integration is configured, only notifications for this - # branch will be accepted. Otherwise, in all cases, the repo's default branch - # (usually master) will be used. - #github_branch: - - # - # platforms is a list of platforms, and each platform has a name and a list of versions. - # - # 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/kubernetes/ansible/roles/sunbird-monitoring/tasks/main.yml b/kubernetes/ansible/roles/sunbird-monitoring/tasks/main.yml deleted file mode 100644 index f858d2b32..000000000 --- a/kubernetes/ansible/roles/sunbird-monitoring/tasks/main.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -# tasks file for sunbird-monitoring -- name: tempating variables - template: - src: "{{ item }}.yaml" - dest: "/tmp/{{item}}.yaml" - with_items: "{{ monitoring_stack }}" - -- name: Creating prometheusOperator CRDs manually - # refer issue https://github.com/helm/helm/issues/6130#issuecomment-537814539 - shell: | - kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/release-0.32/example/prometheus-operator-crd/alertmanager.crd.yaml - kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/release-0.32/example/prometheus-operator-crd/prometheus.crd.yaml - kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/release-0.32/example/prometheus-operator-crd/prometheusrule.crd.yaml - kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/release-0.32/example/prometheus-operator-crd/servicemonitor.crd.yaml - kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/release-0.32/example/prometheus-operator-crd/podmonitor.crd.yaml - ignore_errors: yes - -- name: Creating sunbird monitoring stack - shell: "helm upgrade --install {{ item }} {{chart_path}}/{{ item }} --namespace monitoring -f /tmp/{{ item }}.yaml" - with_items: "{{ monitoring_stack }}" diff --git a/kubernetes/ansible/roles/sunbird-monitoring/templates/additional-scrape-configs.yaml b/kubernetes/ansible/roles/sunbird-monitoring/templates/additional-scrape-configs.yaml deleted file mode 100644 index 465decaad..000000000 --- a/kubernetes/ansible/roles/sunbird-monitoring/templates/additional-scrape-configs.yaml +++ /dev/null @@ -1,180 +0,0 @@ -# This name is used to define the -# additionalScrapeConfigs name -# {{ fullnameOverride }}-prometheus-scrape-confg -# If you change this, make sure to update the value in -# additionalScrapeConfigs/defautls/main.yaml -#} - -fullnameOverride: "sunbird-monitoring" - -scrapeconfig: - - job_name: 'Druid' - metrics_path: /metrics/druid - static_configs: - - targets: ["{{analyticsapi_ip}}:9000"] - labels: - "service_name": "druid" - - - job_name: 'vm-node-exporter' - static_configs: - - targets: ["{{ groups['node-exporter'] | difference(["localhost"]) | map('regex_replace', '^(.*)$', '\\1:9100') | list | join("\", \"") }}"] - - - job_name: 'process-exporter' - metrics_path: /metrics - static_configs: - - targets: ["{{ groups['process-exporter'] | difference(["localhost"]) | map('regex_replace', '^(.*)$', '\\1:1111' ) | list | join("\", \"") }}"] - - - job_name: 'helm-exporter' - static_configs: - - targets: ['helm-exporter.monitoring.svc.cluster.local:9571'] - # Istio metrics - - job_name: istio-mesh - scrape_interval: 15s - scrape_timeout: 10s - metrics_path: /metrics - scheme: http - kubernetes_sd_configs: - - role: endpoints - namespaces: - names: - - istio-system - relabel_configs: - - source_labels: [__meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name] - separator: ; - regex: istio-telemetry;prometheus - replacement: $1 - action: keep - - job_name: envoy-stats - scrape_interval: 15s - scrape_timeout: 10s - metrics_path: /stats/prometheus - scheme: http - kubernetes_sd_configs: - - role: pod - relabel_configs: - - source_labels: [__meta_kubernetes_pod_container_port_name] - separator: ; - regex: .*-envoy-prom - replacement: $1 - action: keep - - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port] - separator: ; - regex: ([^:]+)(?::\d+)?;(\d+) - target_label: __address__ - replacement: $1:15090 - action: replace - - separator: ; - regex: __meta_kubernetes_pod_label_(.+) - replacement: $1 - action: labelmap - - source_labels: [__meta_kubernetes_namespace] - separator: ; - regex: (.*) - target_label: namespace - replacement: $1 - action: replace - - source_labels: [__meta_kubernetes_pod_name] - separator: ; - regex: (.*) - target_label: pod_name - replacement: $1 - action: replace - - job_name: istio-policy - scrape_interval: 15s - scrape_timeout: 10s - metrics_path: /metrics - scheme: http - kubernetes_sd_configs: - - role: endpoints - namespaces: - names: - - istio-system - relabel_configs: - - source_labels: [__meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name] - separator: ; - regex: istio-policy;http-monitoring - replacement: $1 - action: keep - - job_name: istio-telemetry - scrape_interval: 15s - scrape_timeout: 10s - metrics_path: /metrics - scheme: http - kubernetes_sd_configs: - - role: endpoints - namespaces: - names: - - istio-system - relabel_configs: - - source_labels: [__meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name] - separator: ; - regex: istio-telemetry;http-monitoring - replacement: $1 - action: keep - - job_name: pilot - scrape_interval: 15s - scrape_timeout: 10s - metrics_path: /metrics - scheme: http - kubernetes_sd_configs: - - role: endpoints - namespaces: - names: - - istio-system - relabel_configs: - - source_labels: [__meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name] - separator: ; - regex: istio-pilot;http-monitoring - replacement: $1 - action: keep - - job_name: galley - scrape_interval: 15s - scrape_timeout: 10s - metrics_path: /metrics - scheme: http - kubernetes_sd_configs: - - role: endpoints - namespaces: - names: - - istio-system - relabel_configs: - - source_labels: [__meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name] - separator: ; - regex: istio-galley;http-monitoring - replacement: $1 - action: keep - - job_name: citadel - scrape_interval: 15s - scrape_timeout: 10s - metrics_path: /metrics - scheme: http - kubernetes_sd_configs: - - role: endpoints - namespaces: - names: - - istio-system - relabel_configs: - - source_labels: [__meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name] - separator: ; - regex: istio-citadel;http-monitoring - replacement: $1 - action: keep - - {% for item in service_blackbox_checks %} - # This empty line ensures indentation is correct after ansible jinja2 template is materialized - - job_name: 'availability_{{ item.service_name }}' - metrics_path: /metrics - params: - module: [{{ item.probe_module }}] - static_configs: - - targets: {{ item.targets | to_json }} - labels: - "service_name": "{{ item.service_name }}" - relabel_configs: - - source_labels: [__address__] - target_label: __param_target - - source_labels: [__param_target] - target_label: instance - - target_label: __address__ - replacement: blackbox-exporter-prometheus-blackbox-exporter:9115 - {% endfor %} diff --git a/kubernetes/ansible/roles/sunbird-monitoring/templates/alertrules.yaml b/kubernetes/ansible/roles/sunbird-monitoring/templates/alertrules.yaml deleted file mode 100644 index 21e73b265..000000000 --- a/kubernetes/ansible/roles/sunbird-monitoring/templates/alertrules.yaml +++ /dev/null @@ -1,4 +0,0 @@ -kafka_topic_prefix: "{{ env_name }}" -app_es_server_count: "{{ groups['es'] | length }}" -log_es_server_count: "{{ groups['log-es-2'] | length }}" -log_es_threshold: 30 diff --git a/kubernetes/ansible/roles/sunbird-monitoring/templates/blackbox-exporter.yaml b/kubernetes/ansible/roles/sunbird-monitoring/templates/blackbox-exporter.yaml deleted file mode 100644 index e69de29bb..000000000 diff --git a/kubernetes/ansible/roles/sunbird-monitoring/templates/cassandra-jmx-exporter.yaml b/kubernetes/ansible/roles/sunbird-monitoring/templates/cassandra-jmx-exporter.yaml deleted file mode 100644 index e69de29bb..000000000 diff --git a/kubernetes/ansible/roles/sunbird-monitoring/templates/elasticsearch-exporter.yaml b/kubernetes/ansible/roles/sunbird-monitoring/templates/elasticsearch-exporter.yaml deleted file mode 100644 index 6f56a5e00..000000000 --- a/kubernetes/ansible/roles/sunbird-monitoring/templates/elasticsearch-exporter.yaml +++ /dev/null @@ -1,2 +0,0 @@ -es: - uri: "http://{{ groups['es-1'][0] }}:9200" diff --git a/kubernetes/ansible/roles/sunbird-monitoring/templates/kafka-lag-exporter.yaml b/kubernetes/ansible/roles/sunbird-monitoring/templates/kafka-lag-exporter.yaml deleted file mode 100644 index a92d54088..000000000 --- a/kubernetes/ansible/roles/sunbird-monitoring/templates/kafka-lag-exporter.yaml +++ /dev/null @@ -1,2 +0,0 @@ -kafka: "{{ groups['processing-cluster-kafka'] | join(':9092 --kafka.server=')}}:9092" -zookeeper: "{{ groups['processing-cluster-kafka'] | join(':2181 --zookeeper.server=')}}:2181" diff --git a/kubernetes/ansible/roles/sunbird-monitoring/templates/logger.yaml b/kubernetes/ansible/roles/sunbird-monitoring/templates/logger.yaml deleted file mode 100644 index f4ae8cace..000000000 --- a/kubernetes/ansible/roles/sunbird-monitoring/templates/logger.yaml +++ /dev/null @@ -1,2 +0,0 @@ -es: - uri: "http://{{ groups['log-es-2'][0] }}:9200" diff --git a/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-operator.yaml b/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-operator.yaml deleted file mode 100644 index 23f197d1c..000000000 --- a/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-operator.yaml +++ /dev/null @@ -1,111 +0,0 @@ -{# -# This name is used to define the -# additionalScrapeConfigs name -# {{ fullnameOverride }}-prometheus-scrape-confg -# If you change this, make sure to update the value in -# additionalScrapeConfigs/defautls/main.yaml -#} -fullnameOverride: sunbird-monitoring - -# Enabling external prometheus scrape config -prometheus: - prometheusSpec: - additionalScrapeConfigsExternal: true - -# Enabling monitoring kubelet monitoring over http -kubelet: - serviceMonitor: - https: false - -prometheusOperator: - createCustomResource: false - -alertmanager: - config: - global: - smtp_from: "{{ monitor_alerts_mail_from_email }}" - smtp_smarthost: "{{ monitor_alerts_mail_server_host }}:{{ monitor_alerts_mail_server_port}}" - smtp_auth_username: "{{ monitor_alerts_mail_server_username }}" - smtp_auth_password: "{{ monitor_alerts_mail_server_password }}" - - route: - receiver: '{{env}}_devops_team' - group_by: ['alertname'] - group_wait: 30s - group_interval: 5m - repeat_interval: 4h - routes: - - receiver: slack - continue: true - {% for item in alert_teams %} - # Comment to ensure proper indentation while templating - - match_re: - {{ item.group }}: "{{ item.services | join('|') }}" - receiver: "{{ item.team }}" - # Comment to ensure proper indentation while templating - {% if item.severity_mailing_filter is defined and item.severity_mailing_filter|length %} -routes: - {% for filter in item.severity_mailing_filter %} - # Comment to ensure proper indentation while templating - - match: - severity: "{{ filter.severity }}" - receiver: "{{ item.team }}_{{ filter.severity }}" - {% endfor %} - {% endif %} - {% endfor %} - # Comment to ensure proper indentation while templating - - match: - owner: - receiver: {{env}}_devops_team - - receivers: - - name: 'slack' - slack_configs: - - send_resolved: true - api_url: "{{ monitor_alerts_slack_url }}" - username: 'Monitor - Alerter' - channel: "{{ monitor_alerts_slack_channel }}" - text: |- - {{ "{{" }} range .Alerts {{ "}}" }} - *Alert:* {{ "{{" }} .Annotations.message {{ "}}" }} - `{{ "{{" }} .Labels.severity {{ "}}" }}` - *Description:* {{ "{{" }} .Annotations.message {{ "}}" }} - *Details:* - {{ "{{" }} range .Labels.SortedPairs {{ "}}" }} • *{{ "{{" }} .Name {{ "}}" }}:* `{{ "{{" }} .Value {{ "}}" }}` - {{ "{{" }} end {{ "}}" }} - {{ "{{" }} end {{ "}}" }} - icon_emoji: ':dart:' - {% for item in alert_teams %} - # Comment to ensure proper indentation while templating - - name: "{{ item.team }}" - email_configs: - - send_resolved: true - to: '{{ item.alerts_mailing_list }}' - html: '{% raw %}{{ template "email.default.html" . }}{% endraw %}' - headers: - subject: '[{{ env }}-{{cluster_name}}] {% raw %}{{ .GroupLabels.alertname }}{% endraw %}' - {% if item.severity_mailing_filter is defined and item.severity_mailing_filter|length %} - {% for filter in item.severity_mailing_filter %} - # Comment to ensure proper indentation while templating - - name: "{{ item.team }}_{{ filter.severity }}" - email_configs: - - send_resolved: true - to: '{{ filter.alerts_mailing_list }}' - html: '{% raw %}{{ template "email.default.html" . }}{% endraw %}' - headers: - subject: '[{{ env }}-{{cluster_name}}] {% raw %}{{ .GroupLabels.alertname }}{% endraw %}' - {% endfor %} - {% endif %} - {% endfor %} - # Comment to ensure proper indentation while templating - - name: {{env}}_devops_team - email_configs: - - send_resolved: true - to: '{{ default_mailing_list }}' - html: '{% raw %}{{ template "email.default.html" . }}{% endraw %}' - headers: - subject: '[{{ env }}-{{cluster_name}}] {% raw %}{{ .GroupLabels.alertname }}{% endraw %}' - - -grafana: - env: - GF_SERVER_ROOT_URL: http://grafana.local.com/grafana diff --git a/kubernetes/ansible/roles/sunbird-monitoring/templates/statsd-exporter.yaml b/kubernetes/ansible/roles/sunbird-monitoring/templates/statsd-exporter.yaml deleted file mode 100644 index e69de29bb..000000000 diff --git a/kubernetes/ansible/roles/sunbird-monitoring/tests/inventory b/kubernetes/ansible/roles/sunbird-monitoring/tests/inventory deleted file mode 100644 index 878877b07..000000000 --- a/kubernetes/ansible/roles/sunbird-monitoring/tests/inventory +++ /dev/null @@ -1,2 +0,0 @@ -localhost - diff --git a/kubernetes/ansible/roles/sunbird-monitoring/tests/test.yml b/kubernetes/ansible/roles/sunbird-monitoring/tests/test.yml deleted file mode 100644 index 5f63280f1..000000000 --- a/kubernetes/ansible/roles/sunbird-monitoring/tests/test.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- hosts: localhost - remote_user: root - roles: - - sunbird-monitoring \ No newline at end of file diff --git a/kubernetes/ansible/roles/sunbird-monitoring/vars/main.yml b/kubernetes/ansible/roles/sunbird-monitoring/vars/main.yml deleted file mode 100644 index d22cd7503..000000000 --- a/kubernetes/ansible/roles/sunbird-monitoring/vars/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# vars file for sunbird-monitoring \ No newline at end of file diff --git a/kubernetes/helm_charts/cattle-system/rancher.yaml b/kubernetes/helm_charts/cattle-system/rancher.yaml deleted file mode 100644 index fda1860f7..000000000 --- a/kubernetes/helm_charts/cattle-system/rancher.yaml +++ /dev/null @@ -1,76 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: cattle-system ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: rancher - namespace: cattle-system - ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - # "namespace" omitted since ClusterRoles are not namespaced - name: rancher -rules: -- apiGroups: ["*"] - resources: ["*"] - verbs: ["*"] - ---- -apiVersion: rbac.authorization.k8s.io/v1 -# This role binding allows "jane" to read pods in the "default" namespace. -kind: ClusterRoleBinding -metadata: - name: rancher -subjects: -- kind: ServiceAccount - name: rancher - namespace: cattle-system - apiGroup: "" -roleRef: - kind: ClusterRole #this must be Role or ClusterRole - name: rancher - apiGroup: "" ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: rancher - namespace: cattle-system -spec: - replicas: 1 - selector: - matchLabels: - app: rancher - template: - metadata: - labels: - app: rancher - spec: - serviceAccountName: rancher - containers: - - name: name - image: rancher/rancher:v2.3.1 - resources: - requests: - cpu: 100m - memory: 200Mi - ports: - - containerPort: 443 ---- -apiVersion: v1 -kind: Service -metadata: - name: rancher - namespace: cattle-system -spec: - type: LoadBalancer - ports: - - port: 8443 - targetPort: 443 - selector: - app: rancher diff --git a/kubernetes/helm_charts/core/adminutils/Chart.yaml b/kubernetes/helm_charts/core/adminutils/Chart.yaml deleted file mode 100644 index f6321497c..000000000 --- a/kubernetes/helm_charts/core/adminutils/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "1.0" -description: A Helm chart for Kubernetes -name: adminutil -version: 0.1.0 diff --git a/kubernetes/helm_charts/core/adminutils/templates/configmap.yaml b/kubernetes/helm_charts/core/adminutils/templates/configmap.yaml deleted file mode 100644 index c309ad1a9..000000000 --- a/kubernetes/helm_charts/core/adminutils/templates/configmap.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v1 -data: - {{- range $key, $val := .Values.adminutilenv }} - {{ $key }}: {{ $val }} - {{- end }} -kind: ConfigMap -metadata: - creationTimestamp: null - name: {{ .Chart.Name }}-config - namespace: {{ .Values.namespace }} - diff --git a/kubernetes/helm_charts/core/adminutils/templates/deployment.yaml b/kubernetes/helm_charts/core/adminutils/templates/deployment.yaml deleted file mode 100644 index c9cee0f4c..000000000 --- a/kubernetes/helm_charts/core/adminutils/templates/deployment.yaml +++ /dev/null @@ -1,52 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Chart.Name }} - namespace: {{ .Values.namespace }} -spec: - replicas: {{ .Values.replicaCount }} - strategy: - type: {{ .Values.strategy.type }} - rollingUpdate: - maxsurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ .Values.strategy.maxunavailable }} - selector: - matchLabels: - app: {{ .Chart.Name }} - template: - metadata: - annotations: - readiness.status.sidecar.istio.io/applicationPorts: "" - checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - labels: - app: {{ .Chart.Name }} - spec: - imagePullSecrets: - - name: {{ .Values.imagepullsecrets }} - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" - envFrom: - - configMapRef: - name: {{ .Chart.Name }}-config - resources: -{{ toYaml .Values.resources | indent 10 }} - ports: - - containerPort: {{ .Values.network.port }} - ---- -apiVersion: v1 -kind: Service -metadata: - name: adminutil - namespace: {{ .Values.namespace }} - labels: - app: {{ .Chart.Name }} -spec: - ports: - - name: http-{{ .Chart.Name }} - protocol: TCP - port: {{ .Values.network.targetport }} - selector: - app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/adminutils/values.j2 b/kubernetes/helm_charts/core/adminutils/values.j2 deleted file mode 100644 index 0600e848b..000000000 --- a/kubernetes/helm_charts/core/adminutils/values.j2 +++ /dev/null @@ -1,34 +0,0 @@ -### Default variable file for cert-service ### - -namespace: {{ namespace }} -imagepullsecrets: {{ imagepullsecrets }} -dockerhub: {{ dockerhub }} - -replicaCount: {{adminutil_replicacount|default(1)}} -repository: {{adminutil_repository|default('adminutil')}} -image_tag: {{image_tag }} -resources: - requests: - cpu: {{adminutil_service_cpu_req|default('50m')}} - memory: {{adminutil_service_mem_req|default('50Mi')}} - limits: - cpu: {{adminutil_service_cpu_limit|default('100m')}} - memory: {{adminutil_service_memory_limit|default('1024Mi')}} -network: - port: 4000 - targetport: 4000 -strategy: - type: RollingUpdate - maxsurge: 1 - maxunavailable: 0 - -adminutilenv: - JAVA_OPTS: "-Xms{{adminutil__initial_heap_size|default('256m')}} -Xmx{{adminutil__max_heap_size|default('256m')}}" - SERVER_PORT: '"{{adminutil__port|default('4000')}}"' - AM_ADMIN_API_ENDPOINT: "http://kong.{{namespace}}.svc.cluster.local:8001" - SPRING_PROFILES_ACTIVE: {{adminutil__spring_profile|default('production')}} - DEFAULT_CONSUMER_GROUP: {{adminutil__default_consumer_group|default('contentUser')}} - ENDPOINTS_HEALTH_ID: {{adminutil__health_id|default('apihealth')}} - ENDPOINTS_HEALTH_SENSITIVE: '"{{adminutil__is_health_sensitive|default('false')}}"' - ENDPOINTS_METRICS_ID: {{adminutil__metrics_id|default('metrics')}} - ENDPOINTS_METRICS_SENSITIVE: '"{{adminutil__is_metrics_sensitive|default('false')}}"' \ No newline at end of file diff --git a/kubernetes/helm_charts/core/apimanager/Chart.yaml b/kubernetes/helm_charts/core/apimanager/Chart.yaml deleted file mode 100755 index 33becb417..000000000 --- a/kubernetes/helm_charts/core/apimanager/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "1.0" -description: A Helm chart for Kubernetes -name: apimanager -version: 0.1.0 diff --git a/kubernetes/helm_charts/core/apimanager/templates/apimanager_echo.yaml b/kubernetes/helm_charts/core/apimanager/templates/apimanager_echo.yaml deleted file mode 100644 index ccb63939b..000000000 --- a/kubernetes/helm_charts/core/apimanager/templates/apimanager_echo.yaml +++ /dev/null @@ -1,51 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Chart.Name }}echo - namespace: {{ .Values.namespace }} -spec: - replicas: {{ .Values.apimanagerecho.replicaCount }} - strategy: - type: {{ .Values.apimanagerecho.strategy.type }} - rollingUpdate: - maxSurge: {{ .Values.apimanagerecho.strategy.maxsurge }} - maxUnavailable: {{ .Values.apimanagerecho.strategy.maxunavailable }} - selector: - matchLabels: - app: {{ .Chart.Name }}echo - template: - metadata: - annotations: - readiness.status.sidecar.istio.io/applicationPorts: "" - checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - labels: - app: {{ .Chart.Name }}echo - spec: - imagePullSecrets: - - name: {{ .Values.imagepullsecrets }} - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.dockerhub }}/{{ .Values.apimanagerecho.repository }}:{{ .Values.apimanagerecho.image_tag }}" - resources: - requests: - cpu: {{ quote .Values.apimanagerecho.resources.cpu }} - memory: {{ quote .Values.apimanagerecho.resources.memory }} - ports: - - containerPort: {{ .Values.apimanagerecho.network.port }} - ---- -apiVersion: v1 -kind: Service -metadata: - name: echo - namespace: {{ .Values.namespace }} - labels: - app: {{ .Chart.Name }}echo -spec: - ports: - - name: http-{{ .Chart.Name }}echo - protocol: TCP - port: {{ .Values.apimanagerecho.network.targetport }} - selector: - app: {{ .Chart.Name }}echo diff --git a/kubernetes/helm_charts/core/apimanager/templates/configmap.yaml b/kubernetes/helm_charts/core/apimanager/templates/configmap.yaml deleted file mode 100755 index 8c154993c..000000000 --- a/kubernetes/helm_charts/core/apimanager/templates/configmap.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -data: - {{- range $key, $val := .Values.apimanagerenv }} - {{ $key }}: {{ $val }} - {{- end }} - {{- range $key, $val := .Values.apimanagerenvOptional }} - {{ $key }}: {{ $val }} - {{- end }} -kind: ConfigMap -metadata: - creationTimestamp: null - name: {{ .Chart.Name }}-config - namespace: {{ .Values.namespace }} \ No newline at end of file diff --git a/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml b/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml deleted file mode 100755 index 3f1ae84e9..000000000 --- a/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml +++ /dev/null @@ -1,64 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Chart.Name }} - namespace: {{ .Values.namespace }} -spec: - replicas: {{ .Values.replicaCount }} - strategy: - type: {{ .Values.strategy.type }} - rollingUpdate: - maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ .Values.strategy.maxunavailable }} - selector: - matchLabels: - app: {{ .Chart.Name }} - template: - metadata: - annotations: - readiness.status.sidecar.istio.io/applicationPorts: "" - checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - labels: - app: {{ .Chart.Name }} - spec: - imagePullSecrets: - - name: {{ .Values.imagepullsecrets }} - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" - envFrom: - - configMapRef: - name: {{ .Chart.Name }}-config - resources: -{{ toYaml .Values.resources | indent 10 }} - ports: - - containerPort: {{ .Values.network.port }} - name: network - - containerPort: {{ .Values.service.port }} - name: service - - name: go-dns - image: "{{ .Values.godns.repository }}:{{ .Values.godns.image_tag }}" - resources: -{{ toYaml .Values.godns.resources | indent 10 }} - ---- -apiVersion: v1 -kind: Service -metadata: - name: kong - namespace: {{ .Values.namespace }} - labels: - app: {{ .Chart.Name }} -spec: - ports: - - name: http-{{ .Chart.Name }} - protocol: TCP - port: {{ .Values.network.port }} - targetPort: {{ .Values.network.targetport }} - - name: http-admin-{{ .Chart.Name }} - protocol: TCP - port: {{ .Values.service.port }} - targetPort: {{ .Values.service.targetport }} - selector: - app: {{ .Chart.Name }} # metadataname of deployment diff --git a/kubernetes/helm_charts/core/apimanager/values.j2 b/kubernetes/helm_charts/core/apimanager/values.j2 deleted file mode 100755 index f3cfd351b..000000000 --- a/kubernetes/helm_charts/core/apimanager/values.j2 +++ /dev/null @@ -1,65 +0,0 @@ -### variables for apimanager-kong service ### - -namespace: {{ namespace }} -imagepullsecrets: {{ imagepullsecrets }} -dockerhub: {{ dockerhub }} - -replicaCount: {{kong_replicacount|default(1)}} -repository: {{kong_repository|default('kong')}} -image_tag: {{ image_tag }} -resources: - requests: - cpu: {{api_manager_cpu_req|default('50m')}} - memory: {{api_manager_mem_req|default('50Mi')}} - limits: - cpu: {{api_manager_cpu_limit|default('1000m')}} - memory: {{api_manager_memory_limit|default('256Mi')}} -network: - port: 8000 - targetport: 8000 -service: - port: 8001 - targetport: 8001 -strategy: - type: RollingUpdate - maxsurge: 1 - maxunavailable: 0 - -apimanagerecho: - replicaCount: {{replicacount|default(1)}} - repository: {{kong_repository|default('echo-server')}} - image_tag: 1.5.0-gold - resources: - cpu: {{api_manager_echo|default('50m')}} - memory: {{api_manager_echo|default('50Mi')}} - network: - port: 9595 - targetport: 9595 - strategy: - type: RollingUpdate - maxsurge: 1 - maxunavailable: 0 - -apimanagerenv: - KONG_LOG_LEVEL: info - KONG_DATABASE: postgres - KONG_PG_HOST: {{kong_postgres_host}} - KONG_PG_SSL: "'{{kong_ssl|default('True')}}'" - KONG_PG_USER: {{kong_postgres_user}} - KONG_PG_PASSWORD: {{ kong_postgres_password }} - KONG_PG_DATABASE: {{ kong_postgres_database }} - KONG_DNS_RESOLVER: {{ kong_dns_resolver | default('127.0.0.1:53') }} - -godns: - repository: {{ go_dns_repository | default('docker.io/sunbird/go-dns') }} - image_tag: {{ go_dns_image_tag | default('v1.0') }} - resources: - requests: - cpu: {{ go_dns_cpu_req | default('50m') }} - memory: {{ go_dns_mem_req | default('100Mi') }} - limits: - cpu: {{ go_dns_cpu_limit | default('300m') }} - memory: {{ go_dns_mem_limit | default('350Mi') }} - -apimanagerenvOptional: - {{api_optional|default('')}} diff --git a/kubernetes/helm_charts/core/badger/Chart.yaml b/kubernetes/helm_charts/core/badger/Chart.yaml deleted file mode 100755 index c87735cf9..000000000 --- a/kubernetes/helm_charts/core/badger/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "1.0" -description: A Helm chart for Kubernetes -name: badger -version: 0.1.0 diff --git a/kubernetes/helm_charts/core/badger/templates/deployment.yaml b/kubernetes/helm_charts/core/badger/templates/deployment.yaml deleted file mode 100755 index 0e121a1f1..000000000 --- a/kubernetes/helm_charts/core/badger/templates/deployment.yaml +++ /dev/null @@ -1,57 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Chart.Name }} - namespace: {{ .Values.namespace }} -spec: - replicas: {{ .Values.replicaCount }} - strategy: - type: {{ .Values.strategy.type }} - rollingUpdate: - maxsurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ .Values.strategy.maxunavailable }} - selector: - matchLabels: - app: {{ .Chart.Name }} - template: - metadata: - annotations: - readiness.status.sidecar.istio.io/applicationPorts: "" - checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - labels: - app: {{ .Chart.Name }} - spec: - imagePullSecrets: - - name: {{ .Values.imagepullsecrets }} - volumes: - - name: {{ .Chart.Name }}-config - configMap: - name: {{ .Chart.Name }}-config - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" - resources: -{{ toYaml .Values.resources | indent 10 }} - ports: - - containerPort: {{ .Values.network.port }} - volumeMounts: - - name: {{ .Chart.Name }}-config - mountPath: /badger/code/apps/mainsite/settings_local.py - subPath: settings_local.py - ---- -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 }} - selector: - app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/badger/values.j2 b/kubernetes/helm_charts/core/badger/values.j2 deleted file mode 100755 index 770bfead9..000000000 --- a/kubernetes/helm_charts/core/badger/values.j2 +++ /dev/null @@ -1,23 +0,0 @@ -### Default variable file for badger-service ### - -namespace: {{ namespace }} -imagepullsecrets: {{ imagepullsecrets }} -dockerhub: {{ dockerhub }} - -replicaCount: {{badger_replicacount|default(1)}} -repository: {{badger_repository|default('badger')}} -image_tag: {{image_tag }} -resources: - requests: - cpu: {{badger_service_cpu_req|default('50m')}} - memory: {{badger_service_mem_req|default('50Mi')}} - limits: - cpu: {{badger_service_cpu_limit|default('100m')}} - memory: {{badger_service_mem_limit|default('500Mi')}} -network: - port: 8004 - targetport: 8004 -strategy: - type: RollingUpdate - maxsurge: 1 - maxunavailable: 0 \ No newline at end of file diff --git a/kubernetes/helm_charts/core/cert/Chart.yaml b/kubernetes/helm_charts/core/cert/Chart.yaml deleted file mode 100644 index 06916f3b5..000000000 --- a/kubernetes/helm_charts/core/cert/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "1.0" -description: A Helm chart for Kubernetes -name: cert -version: 0.1.0 diff --git a/kubernetes/helm_charts/core/cert/templates/configmap.yaml b/kubernetes/helm_charts/core/cert/templates/configmap.yaml deleted file mode 100644 index 6c58dbbf6..000000000 --- a/kubernetes/helm_charts/core/cert/templates/configmap.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v1 -data: - {{- range $key, $val := .Values.certenv }} - {{ $key }}: {{ $val }} - {{- end }} -kind: ConfigMap -metadata: - creationTimestamp: null - name: {{ .Chart.Name }}-config - namespace: {{ .Values.namespace }} - diff --git a/kubernetes/helm_charts/core/cert/templates/deployment.yaml b/kubernetes/helm_charts/core/cert/templates/deployment.yaml deleted file mode 100644 index 405e85784..000000000 --- a/kubernetes/helm_charts/core/cert/templates/deployment.yaml +++ /dev/null @@ -1,52 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Chart.Name }} - namespace: {{ .Values.namespace }} -spec: - replicas: {{ .Values.replicaCount }} - strategy: - type: {{ .Values.strategy.type }} - rollingUpdate: - maxsurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ .Values.strategy.maxunavailable }} - selector: - matchLabels: - app: {{ .Chart.Name }} - template: - metadata: - annotations: - readiness.status.sidecar.istio.io/applicationPorts: "" - checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - labels: - app: {{ .Chart.Name }} - spec: - imagePullSecrets: - - name: {{ .Values.imagepullsecrets }} - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" - envFrom: - - configMapRef: - name: {{ .Chart.Name }}-config - resources: -{{ toYaml .Values.resources | indent 10 }} - ports: - - containerPort: {{ .Values.network.port }} - ---- -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 }} - selector: - app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/cert/values.j2 b/kubernetes/helm_charts/core/cert/values.j2 deleted file mode 100644 index 7ba656599..000000000 --- a/kubernetes/helm_charts/core/cert/values.j2 +++ /dev/null @@ -1,34 +0,0 @@ -### Default variable file for cert-service ### - -namespace: {{ namespace }} -imagepullsecrets: {{ imagepullsecrets }} -dockerhub: {{ dockerhub }} - -replicaCount: {{cert_replicacount|default(1)}} -repository: {{cert_repository|default('cert_service')}} -image_tag: {{image_tag }} -resources: - requests: - cpu: {{cert_service_cpu_req|default('50m')}} - memory: {{cert_service_mem_req|default('50Mi')}} - limits: - cpu: {{cert_service_cpu_limit|default('1')}} - memory: {{cert_service_mem_limit|default('550Mi')}} -network: - port: 9011 - targetport: 9000 -strategy: - type: RollingUpdate - maxsurge: 1 - maxunavailable: 0 - -certenv: - CONTAINER_NAME: {{cert_service_container_name}} - CLOUD_STORAGE_TYPE: {{cert_service_cloud_storage_type}} - AZURE_STORAGE_SECRET: {{sunbird_azure_storage_key}} - AZURE_STORAGE_KEY: {{sunbird_azure_storage_account}} - sunbird_cert_domain_url: {{proto}}://{{proxy_server_name}} - sunbird_cert_enc_service_url: "http://enc-service.{{namespace}}.svc.cluster.local:9010" - download_link_expiry_timeout: "'600'" - - diff --git a/kubernetes/helm_charts/core/content/Chart.yaml b/kubernetes/helm_charts/core/content/Chart.yaml deleted file mode 100644 index dbf9d485c..000000000 --- a/kubernetes/helm_charts/core/content/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "1.0" -description: A Helm chart for Kubernetes -name: content -version: 0.1.0 diff --git a/kubernetes/helm_charts/core/content/templates/configmap.yaml b/kubernetes/helm_charts/core/content/templates/configmap.yaml deleted file mode 100644 index dd3b426b9..000000000 --- a/kubernetes/helm_charts/core/content/templates/configmap.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v1 -data: - {{- range $key, $val := .Values.contentenv }} - {{ $key }}: {{ $val }} - {{- end }} - graph.ids: {{ .Values.graph_ids | toJson }} -kind: ConfigMap -metadata: - creationTimestamp: null - name: {{ .Chart.Name }}-config - namespace: {{ .Values.namespace }} - diff --git a/kubernetes/helm_charts/core/content/templates/deployment.yaml b/kubernetes/helm_charts/core/content/templates/deployment.yaml deleted file mode 100644 index 405e85784..000000000 --- a/kubernetes/helm_charts/core/content/templates/deployment.yaml +++ /dev/null @@ -1,52 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Chart.Name }} - namespace: {{ .Values.namespace }} -spec: - replicas: {{ .Values.replicaCount }} - strategy: - type: {{ .Values.strategy.type }} - rollingUpdate: - maxsurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ .Values.strategy.maxunavailable }} - selector: - matchLabels: - app: {{ .Chart.Name }} - template: - metadata: - annotations: - readiness.status.sidecar.istio.io/applicationPorts: "" - checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - labels: - app: {{ .Chart.Name }} - spec: - imagePullSecrets: - - name: {{ .Values.imagepullsecrets }} - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" - envFrom: - - configMapRef: - name: {{ .Chart.Name }}-config - resources: -{{ toYaml .Values.resources | indent 10 }} - ports: - - containerPort: {{ .Values.network.port }} - ---- -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 }} - selector: - app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/content/values.j2 b/kubernetes/helm_charts/core/content/values.j2 deleted file mode 100644 index 81f8a58ff..000000000 --- a/kubernetes/helm_charts/core/content/values.j2 +++ /dev/null @@ -1,55 +0,0 @@ -### Default variable file for cert-service ### - -namespace: {{ namespace }} -imagepullsecrets: {{ imagepullsecrets }} -dockerhub: {{ dockerhub }} - -replicaCount: {{content_replicacount|default(1)}} -repository: {{content_repository|default('learning-service')}} -image_tag: {{image_tag }} -resources: - requests: - cpu: {{content_service_cpu_req|default('50m')}} - memory: {{content_service_mem_req|default('50Mi')}} - limits: - cpu: {{content_service_cpu_limit|default('1')}} - memory: {{content_service_mem_limit|default('550Mi')}} -network: - port: 9696 - targetport: 9000 -strategy: - type: RollingUpdate - maxsurge: 1 - maxunavailable: 0 - -contentenv: - cassandra.lp.connection: {{ lp_cassandra_connection }} - cassandra.lpa.connection: {{ dp_cassandra_connection }} - redis.host: localhost - redis.port: '"6379"' - redis.maxConnections: '"128"' - MAX_CONTENT_PACKAGE_FILE_SIZE_LIMIT: '"52428800"' - MAX_ASSET_FILE_SIZE_LIMIT: '"20971520"' - RETRY_ASSET_DOWNLOAD_COUNT: '"1"' - cloud_storage.env: dev - graph.dir: /data/graphDB - akka.request_timeout: '"30"' - environment.id: '"{{ environment_id }}"' - graph.passport.key.base: {{ graph_passport_key }} - route.domain: {{ learning_neo4j_bolt_url }} - route.bolt.write.domain: {{ learning_write_elb_url }} - route.bolt.read.domain: {{ learning_read_elb_url }} - route.all: {{ language_neo4j_bolt_url }} - route.bolt.write.all: {{ language_write_elb_url }} - route.bolt.read.all: {{ language_read_elb_url }} - shard.id: '"{{ mw_shard_id }}"' - platform.auth.check.enabled: "'false'" - platform.cache.ttl: '"3600000"' - telemetry_env: dev - installation.id: ekstep - channel.default: in.ekstep - content.cache.ttl: '"86400"' - content.cache.read: "'true'" - content.cache.hierarchy: "'true'" - -graph_ids: '["domain"]' diff --git a/kubernetes/helm_charts/core/enc/Chart.yaml b/kubernetes/helm_charts/core/enc/Chart.yaml deleted file mode 100644 index 91c8b3224..000000000 --- a/kubernetes/helm_charts/core/enc/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "1.0" -description: A Helm chart for Kubernetes -name: enc -version: 0.1.0 diff --git a/kubernetes/helm_charts/core/enc/templates/configmap.yaml b/kubernetes/helm_charts/core/enc/templates/configmap.yaml deleted file mode 100644 index 50c57f70f..000000000 --- a/kubernetes/helm_charts/core/enc/templates/configmap.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v1 -data: - {{- range $key, $val := .Values.encenv }} - {{ $key }}: {{ $val }} - {{- end }} -kind: ConfigMap -metadata: - creationTimestamp: null - name: {{ .Chart.Name }}-config - namespace: {{ .Values.namespace }} diff --git a/kubernetes/helm_charts/core/enc/templates/deployment.yaml b/kubernetes/helm_charts/core/enc/templates/deployment.yaml deleted file mode 100644 index 405e85784..000000000 --- a/kubernetes/helm_charts/core/enc/templates/deployment.yaml +++ /dev/null @@ -1,52 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Chart.Name }} - namespace: {{ .Values.namespace }} -spec: - replicas: {{ .Values.replicaCount }} - strategy: - type: {{ .Values.strategy.type }} - rollingUpdate: - maxsurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ .Values.strategy.maxunavailable }} - selector: - matchLabels: - app: {{ .Chart.Name }} - template: - metadata: - annotations: - readiness.status.sidecar.istio.io/applicationPorts: "" - checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - labels: - app: {{ .Chart.Name }} - spec: - imagePullSecrets: - - name: {{ .Values.imagepullsecrets }} - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" - envFrom: - - configMapRef: - name: {{ .Chart.Name }}-config - resources: -{{ toYaml .Values.resources | indent 10 }} - ports: - - containerPort: {{ .Values.network.port }} - ---- -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 }} - selector: - app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/enc/values.j2 b/kubernetes/helm_charts/core/enc/values.j2 deleted file mode 100644 index 86363c754..000000000 --- a/kubernetes/helm_charts/core/enc/values.j2 +++ /dev/null @@ -1,38 +0,0 @@ -### Default variable file for enc-service ### - -namespace: {{ namespace }} -imagepullsecrets: {{ imagepullsecrets }} -dockerhub: {{ dockerhub }} - -replicaCount: {{enc_replicacount|default(1)}} -repository: {{enc_repository|default('enc_service')}} -image_tag: {{image_tag }} -resources: - requests: - cpu: {{enc_service_cpu_req|default('50m')}} - memory: {{enc_service_mem_req|default('50Mi')}} - limits: - cpu: {{enc_service_cpu_limit|default('1')}} - memory: {{enc_service_mem_limit|default('800Mi')}} -network: - port: 9010 - targetport: 8013 -strategy: - type: RollingUpdate - maxsurge: 1 - maxunavailable: 0 - -encenv: - DB_HOST: {{enc_postgres_host}} - DB_PORT: '"{{postgres_port|default('5432')}}"' - DB_USER: {{enc_postgres_user}} - DB_PASSWORD: {{enc_postgres_password}} - DB_NAME: {{enc_postgres_database}} - DB_DIALECT: {{enc_dialect|default('postgres')}} - DB_SSL: '"True"' - ENTRY_PASS: {{enc_entry_password}} - MASTER_PASS: {{enc_master_pass}} - N_KEYS: '"{{enc_n_keys}}"' - N_RESERVED_KEYS: '"{{enc_n_reserved_keys}}"' - - diff --git a/kubernetes/helm_charts/core/knowledgemw/.helmignore b/kubernetes/helm_charts/core/knowledgemw/.helmignore deleted file mode 100644 index 50af03172..000000000 --- a/kubernetes/helm_charts/core/knowledgemw/.helmignore +++ /dev/null @@ -1,22 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/kubernetes/helm_charts/core/knowledgemw/Chart.yaml b/kubernetes/helm_charts/core/knowledgemw/Chart.yaml deleted file mode 100644 index e1b669a8d..000000000 --- a/kubernetes/helm_charts/core/knowledgemw/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "1.0" -description: A Helm chart for Kubernetes -name: knowledge-mw -version: 0.1.0 diff --git a/kubernetes/helm_charts/core/knowledgemw/templates/_helpers.tpl b/kubernetes/helm_charts/core/knowledgemw/templates/_helpers.tpl deleted file mode 100644 index 4dda28416..000000000 --- a/kubernetes/helm_charts/core/knowledgemw/templates/_helpers.tpl +++ /dev/null @@ -1,45 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "content.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "content.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "content.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "content.labels" -}} -app.kubernetes.io/name: {{ include "content.name" . }} -helm.sh/chart: {{ include "content.chart" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} diff --git a/kubernetes/helm_charts/core/knowledgemw/templates/configmap.yaml b/kubernetes/helm_charts/core/knowledgemw/templates/configmap.yaml deleted file mode 100644 index 3fb96d3c5..000000000 --- a/kubernetes/helm_charts/core/knowledgemw/templates/configmap.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v1 -data: - {{- range $key, $val := .Values.knowledgemwenv }} - {{ $key }}: {{ $val }} - {{- end }} - sunbird_cassandra_replication_strategy: {{ .Values.sunbird_cassandra_replication_strategy | toJson }} -kind: ConfigMap -metadata: - creationTimestamp: null - name: {{ .Chart.Name }}-config - namespace: {{ .Values.namespace }} \ No newline at end of file diff --git a/kubernetes/helm_charts/core/knowledgemw/templates/deployment.yaml b/kubernetes/helm_charts/core/knowledgemw/templates/deployment.yaml deleted file mode 100644 index 405e85784..000000000 --- a/kubernetes/helm_charts/core/knowledgemw/templates/deployment.yaml +++ /dev/null @@ -1,52 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Chart.Name }} - namespace: {{ .Values.namespace }} -spec: - replicas: {{ .Values.replicaCount }} - strategy: - type: {{ .Values.strategy.type }} - rollingUpdate: - maxsurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ .Values.strategy.maxunavailable }} - selector: - matchLabels: - app: {{ .Chart.Name }} - template: - metadata: - annotations: - readiness.status.sidecar.istio.io/applicationPorts: "" - checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - labels: - app: {{ .Chart.Name }} - spec: - imagePullSecrets: - - name: {{ .Values.imagepullsecrets }} - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" - envFrom: - - configMapRef: - name: {{ .Chart.Name }}-config - resources: -{{ toYaml .Values.resources | indent 10 }} - ports: - - containerPort: {{ .Values.network.port }} - ---- -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 }} - selector: - app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/knowledgemw/values.j2 b/kubernetes/helm_charts/core/knowledgemw/values.j2 deleted file mode 100644 index 8d1176548..000000000 --- a/kubernetes/helm_charts/core/knowledgemw/values.j2 +++ /dev/null @@ -1,79 +0,0 @@ -### Default variable file for knowledge_mw service ### - -namespace: {{ namespace }} -imagepullsecrets: {{ imagepullsecrets }} -dockerhub: {{ dockerhub }} - -replicaCount: {{knowledge_mw_replicacount|default(1)}} -repository: {{knowledge_mw_repository|default('knowledge-mw-service')}} -image_tag: {{ image_tag }} -resources: - requests: - cpu: {{knowledge_mw_service_cpu_req|default('50m')}} - memory: {{knowledge_mw_service_mem_req|default('50Mi')}} - limits: - cpu: {{knowledge_mw_service_cpu_limit|default('1')}} - memory: {{knowledge_mw_service_mem_limit|default('256Mi')}} -network: - port: 5000 - targetport: 5000 -strategy: - type: RollingUpdate - maxsurge: 1 - maxunavailable: 0 - -knowledgemwenv: - sunbird_content_plugin_base_url: {{sunbird_ekstep_proxy_base_url}} - sunbird_learner_service_api_key: {{sunbird_api_auth_token}} - sunbird_learner_service_base_url: "{{sunbird_apimanager_service_base_url}}/" - sunbird_keycloak_auth_server_url: {{keycloak_auth_server_url}}/ - sunbird_keycloak_realm: {{keycloak_realm}} - 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|default('1800')}}"' - sunbird_image_storage_url: {{sunbird_image_storage_url}} - sunbird_azure_account_name: {{sunbird_account_name}} - sunbird_azure_account_key: {{sunbird_account_key}} - sunbird_dial_code_registry_url: https://{{proxy_server_name}}/dial/ - sunbird_telemetry_sync_batch_size: '"{{sunbird_telemetry_sync_batch_size}}"' - sunbird_environment: {{sunbird_environment}} - sunbird_instance: {{sunbird_instance}} - sunbird_content_service_whitelisted_channels: {{content_service_whitelisted_channels}} - sunbird_content_service_blacklisted_channels: {{content_service_blacklisted_channels}} - sunbird_default_channel: {{sunbird_default_channel}} - sunbird_content_repo_api_base_url: {{sunbird_content_repo_api_base_url}} - sunbird_content_repo_api_key: {{sunbird_content_repo_api_key}} - sunbird_search_service_api_base_url: {{sunbird_search_service_api_base_url}} - sunbird_search_service_api_key: {{sunbird_search_service_api_key}} - sunbird_dial_repo_api_base_url: {{sunbird_dial_repo_api_base_url}} - sunbird_dial_repo_api_key: {{sunbird_dial_repo_api_key}} - sunbird_plugin_repo_api_base_url: {{sunbird_plugin_repo_api_base_url}} - sunbird_plugin_repo_api_key: {{sunbird_plugin_repo_api_key}} - sunbird_data_service_api_base_url: {{sunbird_data_service_api_base_url}} - sunbird_data_service_api_key: {{sunbird_data_service_api_key}} - sunbird_content_service_channel_refresh_cron: "'{{content_service_channel_refresh_cron}}'" - sunbird_content_service_whitelisted_framework: {{content_service_whitelisted_framework}} - sunbird_content_service_blacklisted_framework: {{content_service_blacklisted_framework}} - sunbird_content_service_blacklisted_contenttype: {{content_service_blacklisted_contenttype}} - sunbird_content_service_blacklisted_resourcetype: {{content_service_blacklisted_resourcetype}} - sunbird_content_service_blacklisted_mimetype: {{content_service_blacklisted_mimetype}} - sunbird_content_service_enable_logging: '"{{sunbird_content_service_enable_logging}}"' - sunbird_content_service_whitelisted_mimetype: {{content_service_whitelisted_mimetype}} - sunbird_content_service_whitelisted_resourcetype: {{content_service_whitelisted_resourcetype}} - sunbird_language_service_api_key: {{sunbird_language_service_api_key}} - sunbird_language_service_api_base_url: {{sunbird_language_service_api_base_url}} - sunbird_portal_base_url: {{sunbird_portal_base_url}} - sunbird_cassandra_urls: {{sunbird_cassandra_urls}} - sunbird_kafka_host: {{sunbird_processing_kafka_host}} - sunbird_qrimage_topic: {{sunbird_qrimage_topic}} - sunbird_lock_expiry_time: '"{{sunbird_lock_expiry_time}}"' - sunbird_content_service_log_level: {{sunbird_content_service_log_level}} - sunbird_health_check_enable: '"{{sunbird_health_check_enable}}"' - {% if groups['cassandra-2'] is defined %} -sunbird_cassandra_consistency_level: quorum - {% else %} -sunbird_cassandra_consistency_level: {{sunbird_cassandra_consistency_level}} - {% endif %} - -sunbird_cassandra_replication_strategy: '{{sunbird_cassandra_replication_strategy}}' \ No newline at end of file diff --git a/kubernetes/helm_charts/core/learner/.helmignore b/kubernetes/helm_charts/core/learner/.helmignore deleted file mode 100644 index 50af03172..000000000 --- a/kubernetes/helm_charts/core/learner/.helmignore +++ /dev/null @@ -1,22 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/kubernetes/helm_charts/core/learner/Chart.yaml b/kubernetes/helm_charts/core/learner/Chart.yaml deleted file mode 100644 index d2c54a936..000000000 --- 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/_helpers.tpl b/kubernetes/helm_charts/core/learner/templates/_helpers.tpl deleted file mode 100644 index 420ba7943..000000000 --- a/kubernetes/helm_charts/core/learner/templates/_helpers.tpl +++ /dev/null @@ -1,45 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "learner.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "learner.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "learner.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" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} 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 056b64f93..000000000 --- a/kubernetes/helm_charts/core/learner/templates/configmap.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v1 -data: - {{- range $key, $val := .Values.learnerenv }} - {{ $key }}: {{ $val }} - {{- end }} -kind: ConfigMap -metadata: - creationTimestamp: null - name: {{ .Chart.Name }}-config - namespace: {{ .Values.namespace }} 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 405e85784..000000000 --- a/kubernetes/helm_charts/core/learner/templates/deployment.yaml +++ /dev/null @@ -1,52 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Chart.Name }} - namespace: {{ .Values.namespace }} -spec: - replicas: {{ .Values.replicaCount }} - strategy: - type: {{ .Values.strategy.type }} - rollingUpdate: - maxsurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ .Values.strategy.maxunavailable }} - selector: - matchLabels: - app: {{ .Chart.Name }} - template: - metadata: - annotations: - readiness.status.sidecar.istio.io/applicationPorts: "" - checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - labels: - app: {{ .Chart.Name }} - spec: - imagePullSecrets: - - name: {{ .Values.imagepullsecrets }} - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" - envFrom: - - configMapRef: - name: {{ .Chart.Name }}-config - resources: -{{ toYaml .Values.resources | indent 10 }} - ports: - - containerPort: {{ .Values.network.port }} - ---- -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 }} - selector: - app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/learner/values.j2 b/kubernetes/helm_charts/core/learner/values.j2 deleted file mode 100644 index ff2242683..000000000 --- a/kubernetes/helm_charts/core/learner/values.j2 +++ /dev/null @@ -1,132 +0,0 @@ - -### Default variable file for learner-service ### - -namespace: {{ namespace }} -imagepullsecrets: {{ imagepullsecrets }} -dockerhub: {{ dockerhub }} - -replicaCount: {{learner_replicacount|default(1)}} -repository: {{learner_repository|default('learner_service')}} -image_tag: {{image_tag }} -resources: - requests: - cpu: {{learner_service_cpu_req|default('50m')}} - memory: {{learner_service_mem_req|default('50Mi')}} - limits: - cpu: {{learner_service_cpu_limit|default('1')}} - memory: {{learner_service_mem_limit|default('1000Mi')}} -network: - port: 9000 - targetport: 9000 -strategy: - type: RollingUpdate - maxsurge: 1 - maxunavailable: 0 - -learnerenv: - sunbird_sso_publickey: {{sunbird_sso_publickey}} - sunbird_sso_url: {{keycloak_auth_server_url}}/ - sunbird_sso_realm: {{keycloak_realm}} - sunbird_sso_username: {{sunbird_sso_username}} - sunbird_sso_password: {{sunbird_sso_password}} - sunbird_sso_client_id: {{sunbird_sso_client_id}} - sunbird_es_host: {{sunbird_es_host}} - sunbird_es_port: '"{{sunbird_es_port}}"' - 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}} - sunbird_pg_user: {{sunbird_pg_user}} - 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_mail_server_host: {{sunbird_mail_server_host}} - sunbird_mail_server_port: '"{{sunbird_mail_server_port}}"' - sunbird_mail_server_username: {{sunbird_mail_server_username}} - 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_account_name}} - sunbird_account_key: {{sunbird_account_key}} - sunbird_quartz_mode: {{sunbird_sunbird_quartz_mode}} - sunbird_env_logo_url: {{sunbird_env_logo_url|default('""')}} - sunbird_web_url: {{sunbird_web_url}} - sunbird_fcm_account_key: {{sunbird_fcm_account_key}} - sunbird_msg_91_auth: {{sunbird_msg_91_auth}} - sunbird_msg_sender: {{sunbird_msg_sender}} - sunbird_installation_email: {{sunbird_installation_email}} - {% if groups['cassandra-2'] is defined %} -sunbird_cassandra_host: {{groups['cassandra']|join(',')}} - sunbird_cassandra_port: 9042,9042,9042 - sunbird_cassandra_consistency_level: quorum - {% else %} - sunbird_cassandra_host: {{sunbird_cassandra_host}} - sunbird_cassandra_port: 9042 - sunbird_cassandra_consistency_level: {{sunbird_cassandra_consistency_level}} - {% endif %} - - sunbird_mw_system_host: learner-service - sunbird_mw_system_port: '"8088"' - background_actor_provider: local - api_actor_provider: local - badging_authorization_key: {{vault_badging_authorization_key}} - sunbird_badger_baseurl: http://badger-service:8004 - sunbird_remote_req_router_path: akka.tcp://SunbirdMWSystem@actor-service:8088/user/RequestRouter - sunbird_remote_bg_req_router_path: akka.tcp://SunbirdMWSystem@actor-service:8088/user/BackgroundRequestRouter - sunbird_api_base_url: {{sunbird_knowledge_mw_service_url}} - sunbird_authorization: {{sunbird_api_auth_token}} - telemetry_pdata_id: {{sunbird_telemetry_pdata_id}} - telemetry_pdata_pid: learner-service - sunbird_telemetry_base_url: {{sunbird_telemetry_service_url}} - telemetry_queue_threshold_value: '"100"' - sunbird_default_channel: {{sunbird_default_channel}} - sunbird_api_mgr_base_url: {{sunbird_knowledge_mw_service_url}} - sunbird_cs_base_url: {{sunbird_knowledge_mw_service_url}} - sunbird_cs_search_path: /v1/content/search - -sunbird_user_bulk_upload_size: '"{{sunbird_user_bulk_upload_size}}"' -sunbird_installation_display_name: {{sunbird_installation_display_name}} - -sunbird_app_name: {{sunbird_app_name|default('Sunbird')}} -sunbird_registry_service_baseurl: http://registry_registry:8080/ -sunbird_open_saber_bridge_enable: '"{{sunbird_open_saber_bridge_enable|default('false')}}"' -sunbird_environment: {{sunbird_environment}} -sunbird_instance: {{sunbird_instance}} -sunbird_email_max_recipients_limit: '"{{sunbird_email_max_recipients_limit}}"' -sunbird_url_shortner_access_token: {{sunbird_url_shortner_access_token}} -sunbird_url_shortner_enable: '"{{sunbird_url_shortner_enable}}"' -sunbird_user_profile_field_default_visibility: {{sunbird_user_profile_field_default_visibility}} -sunbird_keycloak_required_action_link_expiration_seconds: '"{{sunbird_keycloak_required_action_link_expiration_seconds}}"' -sunbird_course_batch_notification_enabled: '"{{sunbird_course_batch_notification_enabled}}"' -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}} -# Release-1.14 -sunbird_time_zone: {{sunbird_time_zone|default('Asia/Kolkata')}} -# 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_analytics_blob_account_name}} -sunbird_analytics_blob_account_key: {{sunbird_analytics_blob_account_key}} -# Optional for caching -sunbird_cache_enable: '"{{sunbird_cache_enable | default(false)}}"' -# Set below variables if above true -sunbird_redis_host: {{sunbird_redis_host}} -sunbird_redis_port: '"{{sunbird_redis_port|default(6379)}}"' -kafka_urls: {{kafka_urls}} -sunbird_user_cert_kafka_topic: {{env_name}}.lms.user.account.merge -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('')}}/ -sunbird_cert_service_base_url: {{sunbird_cert_service_url}} diff --git a/kubernetes/helm_charts/core/lms/Chart.yaml b/kubernetes/helm_charts/core/lms/Chart.yaml deleted file mode 100644 index 5ebad8066..000000000 --- a/kubernetes/helm_charts/core/lms/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "1.0" -description: A Helm chart for Kubernetes -name: lms -version: 0.1.0 diff --git a/kubernetes/helm_charts/core/lms/templates/configmap.yaml b/kubernetes/helm_charts/core/lms/templates/configmap.yaml deleted file mode 100644 index faa63a036..000000000 --- a/kubernetes/helm_charts/core/lms/templates/configmap.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v1 -data: - {{- range $key, $val := .Values.lmsenv }} - {{ $key }}: {{ $val }} - {{- end }} -kind: ConfigMap -metadata: - creationTimestamp: null - name: {{ .Chart.Name }}-config - namespace: {{ .Values.namespace }} diff --git a/kubernetes/helm_charts/core/lms/templates/deployment.yaml b/kubernetes/helm_charts/core/lms/templates/deployment.yaml deleted file mode 100644 index 405e85784..000000000 --- a/kubernetes/helm_charts/core/lms/templates/deployment.yaml +++ /dev/null @@ -1,52 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Chart.Name }} - namespace: {{ .Values.namespace }} -spec: - replicas: {{ .Values.replicaCount }} - strategy: - type: {{ .Values.strategy.type }} - rollingUpdate: - maxsurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ .Values.strategy.maxunavailable }} - selector: - matchLabels: - app: {{ .Chart.Name }} - template: - metadata: - annotations: - readiness.status.sidecar.istio.io/applicationPorts: "" - checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - labels: - app: {{ .Chart.Name }} - spec: - imagePullSecrets: - - name: {{ .Values.imagepullsecrets }} - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" - envFrom: - - configMapRef: - name: {{ .Chart.Name }}-config - resources: -{{ toYaml .Values.resources | indent 10 }} - ports: - - containerPort: {{ .Values.network.port }} - ---- -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 }} - selector: - app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/lms/values.j2 b/kubernetes/helm_charts/core/lms/values.j2 deleted file mode 100644 index c0a8bf287..000000000 --- a/kubernetes/helm_charts/core/lms/values.j2 +++ /dev/null @@ -1,135 +0,0 @@ -### Default variable file for lms-service ### - -namespace: {{ namespace }} -imagepullsecrets: {{ imagepullsecrets }} -dockerhub: {{ dockerhub }} - -replicaCount: {{lms_replicacount|default(1)}} -repository: {{lms_repository|default('lms_service')}} -image_tag: {{image_tag }} -resources: - requests: - cpu: {{lms_service_cpu_req|default('50m')}} - memory: {{lms_service_mem_req|default('50Mi')}} - limits: - cpu: {{lms_service_cpu_limit|default('1')}} - memory: {{lms_service_mem_limit|default('1000Mi')}} -network: - port: 9005 - targetport: 9000 -strategy: - type: RollingUpdate - maxsurge: 1 - maxunavailable: 0 - -lmsenv: - sunbird_sso_publickey: {{sunbird_sso_publickey}} - sunbird_sso_url: {{keycloak_auth_server_url}}/ - sunbird_sso_realm: {{keycloak_realm}} - sunbird_sso_username: {{sunbird_sso_username}} - sunbird_sso_password: {{sunbird_sso_password}} - sunbird_sso_client_id: {{sunbird_sso_client_id}} - sunbird_es_host: {{sunbird_es_host}} - sunbird_es_port: '"{{sunbird_es_port}}"' - 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}} - sunbird_pg_user: {{sunbird_pg_user}} - 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_mail_server_host: {{sunbird_mail_server_host}} - sunbird_mail_server_port: '"{{sunbird_mail_server_port}}"' - sunbird_mail_server_username: {{sunbird_mail_server_username}} - 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_account_name}} - sunbird_account_key: {{sunbird_account_key}} - sunbird_quartz_mode: {{sunbird_sunbird_quartz_mode}} - sunbird_env_logo_url: {{sunbird_env_logo_url|default('""')}} - sunbird_web_url: {{sunbird_web_url}} - sunbird_fcm_account_key: {{sunbird_fcm_account_key}} - sunbird_msg_91_auth: {{sunbird_msg_91_auth}} - sunbird_msg_sender: {{sunbird_msg_sender}} - sunbird_installation_email: {{sunbird_installation_email}} - {% if groups['cassandra-2'] is defined %} -sunbird_cassandra_host: {{groups['cassandra']|join(',')}} - sunbird_cassandra_port: 9042,9042,9042 - sunbird_cassandra_consistency_level: quorum - {% else %} - sunbird_cassandra_host: {{sunbird_cassandra_host}} - sunbird_cassandra_port: 9042 - sunbird_cassandra_consistency_level: {{sunbird_cassandra_consistency_level}} - {% endif %} - - sunbird_mw_system_host: lms-service - sunbird_mw_system_port: '"8088"' - background_actor_provider: local - api_actor_provider: local - badging_authorization_key: {{vault_badging_authorization_key}} - sunbird_badger_baseurl: http://badger-service:8004 - sunbird_remote_req_router_path: akka.tcp://SunbirdMWSystem@actor-service:8088/user/RequestRouter - sunbird_remote_bg_req_router_path: akka.tcp://SunbirdMWSystem@actor-service:8088/user/BackgroundRequestRouter - sunbird_api_base_url: {{sunbird_knowledge_mw_service_url}} - sunbird_authorization: {{sunbird_api_auth_token}} - telemetry_pdata_id: {{sunbird_telemetry_pdata_id}} - telemetry_pdata_pid: lms-service - sunbird_telemetry_base_url: sunbird_telemetry_service_url - telemetry_queue_threshold_value: '"100"' - sunbird_default_channel: {{sunbird_default_channel}} - sunbird_api_mgr_base_url: {{sunbird_knowledge_mw_service_url}} - sunbird_cs_base_url: {{sunbird_knowledge_mw_service_url}} - sunbird_cs_search_path: /v1/content/search - - sunbird_user_bulk_upload_size: '"{{sunbird_user_bulk_upload_size}}"' - sunbird_installation_display_name: {{sunbird_installation_display_name}} - - sunbird_app_name: {{sunbird_app_name|default('Sunbird')}} - sunbird_registry_service_baseurl: http://registry_registry:8080/ - sunbird_open_saber_bridge_enable: '"{{sunbird_open_saber_bridge_enable|default('false')}}"' - sunbird_environment: {{sunbird_environment}} - sunbird_instance: {{sunbird_instance}} - sunbird_email_max_recipients_limit: '"{{sunbird_email_max_recipients_limit}}"' - sunbird_url_shortner_access_token: {{sunbird_url_shortner_access_token}} - sunbird_url_shortner_enable: '"{{sunbird_url_shortner_enable}}"' - sunbird_user_profile_field_default_visibility: {{sunbird_user_profile_field_default_visibility}} - sunbird_keycloak_required_action_link_expiration_seconds: '"{{sunbird_keycloak_required_action_link_expiration_seconds}}"' - sunbird_course_batch_notification_enabled: '"{{sunbird_course_batch_notification_enabled}}"' - 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}} - # Release-1.14 - sunbird_time_zone: {{sunbird_time_zone|default('Asia/Kolkata')}} - # 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_analytics_blob_account_name}} - sunbird_analytics_blob_account_key: {{sunbird_analytics_blob_account_key}} - # Optional for caching - sunbird_cache_enable: '"{{sunbird_cache_enable | default(false)}}"' - # Set below variables if above true - sunbird_redis_host: {{sunbird_redis_host}} - sunbird_redis_port: '"{{sunbird_redis_port|default(6379)}}"' - sunbird_user_org_api_base_url: {{sunbird_learner_service_url}} - - kafka_topics_instruction: {{kafka_topics_instruction}} - kafka_urls: {{kafka_urls}} - kafka_topics_certificate_instruction: {{kafka_topics_certificate_instruction}} - kafka_assessment_topic: {{kafka_assessment_topic}} - - - - diff --git a/kubernetes/helm_charts/core/notification/Chart.yaml b/kubernetes/helm_charts/core/notification/Chart.yaml deleted file mode 100644 index e4f958f07..000000000 --- a/kubernetes/helm_charts/core/notification/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "1.0" -description: A Helm chart for Kubernetes -name: notification -version: 0.1.0 diff --git a/kubernetes/helm_charts/core/notification/templates/configmap.yaml b/kubernetes/helm_charts/core/notification/templates/configmap.yaml deleted file mode 100644 index bd1b9e0c8..000000000 --- a/kubernetes/helm_charts/core/notification/templates/configmap.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v1 -data: - {{- range $key, $val := .Values.notificationenv }} - {{ $key }}: {{ $val }} - {{- end }} -kind: ConfigMap -metadata: - creationTimestamp: null - name: {{ .Chart.Name }}-config - namespace: {{ .Values.namespace }} diff --git a/kubernetes/helm_charts/core/notification/templates/deployment.yaml b/kubernetes/helm_charts/core/notification/templates/deployment.yaml deleted file mode 100644 index 405e85784..000000000 --- a/kubernetes/helm_charts/core/notification/templates/deployment.yaml +++ /dev/null @@ -1,52 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Chart.Name }} - namespace: {{ .Values.namespace }} -spec: - replicas: {{ .Values.replicaCount }} - strategy: - type: {{ .Values.strategy.type }} - rollingUpdate: - maxsurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ .Values.strategy.maxunavailable }} - selector: - matchLabels: - app: {{ .Chart.Name }} - template: - metadata: - annotations: - readiness.status.sidecar.istio.io/applicationPorts: "" - checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - labels: - app: {{ .Chart.Name }} - spec: - imagePullSecrets: - - name: {{ .Values.imagepullsecrets }} - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" - envFrom: - - configMapRef: - name: {{ .Chart.Name }}-config - resources: -{{ toYaml .Values.resources | indent 10 }} - ports: - - containerPort: {{ .Values.network.port }} - ---- -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 }} - selector: - app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/notification/values.j2 b/kubernetes/helm_charts/core/notification/values.j2 deleted file mode 100644 index 989b6e58d..000000000 --- a/kubernetes/helm_charts/core/notification/values.j2 +++ /dev/null @@ -1,37 +0,0 @@ -### Default variable file for enc-service ### - -namespace: {{ namespace }} -imagepullsecrets: {{ imagepullsecrets }} -dockerhub: {{ dockerhub }} - -replicaCount: {{notification_replicacount|default(1)}} -repository: {{notification_repository|default('notification_service')}} -image_tag: {{image_tag }} -resources: - requests: - cpu: {{notification_service_cpu_req|default('50m')}} - memory: {{notification_service_mem_req|default('50Mi')}} - limits: - cpu: {{notification_service_cpu_limit|default('1')}} - memory: {{notification_service_mem_limit|default('500Mi')}} -network: - port: 9012 - targetport: 9000 -strategy: - type: RollingUpdate - maxsurge: 1 - maxunavailable: 0 - -notificationenv: - sunbird_notification_fcm_account_key: {{sunbird_fcm_account_key}} - sunbird_notification_kafka_servers_config: {{sunbird_processing_kafka_host}} - sunbird_notification_kafka_topic: {{env_name}}.lms.notification - sunbird_notification_msg_default_sender: {{sunbird_msg_sender}} - sunbird_msg_91_auth: {{sunbird_msg_91_auth}} - sunbird_mail_server_from_email: {{sunbird_mail_server_from_email}} - sunbird_mail_server_host: {{sunbird_mail_server_host}} - sunbird_mail_server_password: {{sunbird_mail_server_password}} - sunbird_mail_server_username: {{sunbird_mail_server_username}} - sunbird_mail_server_port: '"{{sunbird_mail_server_port}}"' - - diff --git a/kubernetes/helm_charts/core/player/.helmignore b/kubernetes/helm_charts/core/player/.helmignore deleted file mode 100644 index 50af03172..000000000 --- a/kubernetes/helm_charts/core/player/.helmignore +++ /dev/null @@ -1,22 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/kubernetes/helm_charts/core/player/Chart.yaml b/kubernetes/helm_charts/core/player/Chart.yaml deleted file mode 100644 index 673a6a73f..000000000 --- a/kubernetes/helm_charts/core/player/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "1.0" -description: A Helm chart for Kubernetes -name: player -version: 0.1.0 diff --git a/kubernetes/helm_charts/core/player/templates/_helpers.tpl b/kubernetes/helm_charts/core/player/templates/_helpers.tpl deleted file mode 100644 index 2317f3842..000000000 --- a/kubernetes/helm_charts/core/player/templates/_helpers.tpl +++ /dev/null @@ -1,45 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "player.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "player.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "player.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "player.labels" -}} -app.kubernetes.io/name: {{ include "player.name" . }} -helm.sh/chart: {{ include "player.chart" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} diff --git a/kubernetes/helm_charts/core/player/templates/configmap.yaml b/kubernetes/helm_charts/core/player/templates/configmap.yaml deleted file mode 100644 index 89dd7d0eb..000000000 --- a/kubernetes/helm_charts/core/player/templates/configmap.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v1 -data: - {{- range $key, $val := .Values.playerenv }} - {{ $key }}: {{ $val }} - {{- end }} - sunbird_cassandra_replication_strategy: {{ .Values.sunbird_cassandra_replication_strategy | toJson }} -kind: ConfigMap -metadata: - creationTimestamp: null - name: {{ .Chart.Name }}-config - namespace: {{ .Values.namespace }} diff --git a/kubernetes/helm_charts/core/player/templates/deployment.yaml b/kubernetes/helm_charts/core/player/templates/deployment.yaml deleted file mode 100644 index de1b6feb3..000000000 --- a/kubernetes/helm_charts/core/player/templates/deployment.yaml +++ /dev/null @@ -1,64 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Chart.Name }} - namespace: {{ .Values.namespace }} -spec: - replicas: {{ .Values.replicaCount }} - strategy: - type: {{ .Values.strategy.type }} - rollingUpdate: - maxsurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ .Values.strategy.maxunavailable }} - selector: - matchLabels: - app: {{ .Chart.Name }} - template: - metadata: - annotations: - readiness.status.sidecar.istio.io/applicationPorts: "" - checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - labels: - app: {{ .Chart.Name }} - spec: - imagePullSecrets: - - name: {{ .Values.imagepullsecrets }} - {{- if .Values.sunbird_portal_player_cdn_enabled }} - volumes: - - name: player-cdn-config - configMap: - name: player-cdn-config - {{- end }} - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" - envFrom: - - configMapRef: - name: {{ .Chart.Name }}-config - resources: -{{ toYaml .Values.resources | indent 10 }} - ports: - - containerPort: {{ .Values.network.port }} - {{- if .Values.sunbird_portal_player_cdn_enabled }} - volumeMounts: - - name: player-cdn-config - mountPath: /home/sunbird/app_dist/dist/index_cdn.ejs - subPath: index_cdn.ejs - {{- end }} - ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ .Chart.Name }} - namespace: {{ .Values.namespace }} - labels: - app: {{ .Chart.Name }} -spec: - ports: - - name: http-{{ .Chart.Name }} - protocol: TCP - port: {{ .Values.network.targetport }} - selector: - app: {{ .Chart.Name }} \ No newline at end of file diff --git a/kubernetes/helm_charts/core/player/values.j2 b/kubernetes/helm_charts/core/player/values.j2 deleted file mode 100644 index f52e268c7..000000000 --- a/kubernetes/helm_charts/core/player/values.j2 +++ /dev/null @@ -1,102 +0,0 @@ -### Default variable file for player-service ### - -namespace: {{ namespace }} -imagepullsecrets: {{ imagepullsecrets }} -dockerhub: {{ dockerhub }} - -replicaCount: {{player_replicacount|default(1)}} -repository: {{player_repository|default('player')}} -image_tag: {{image_tag }} -resources: - requests: - cpu: {{player_service_cpu_req|default('50m')}} - memory: {{player_service_mem_req|default('50Mi')}} - limits: - cpu: {{player_service_cpu_limit|default('1')}} - memory: {{player_service_mem_limit|default('512Mi')}} -network: - port: 3000 - targetport: 3000 -strategy: - type: RollingUpdate - maxsurge: 1 - maxunavailable: 0 - -sunbird_portal_player_cdn_enabled: "{{sunbird_portal_player_cdn_enabled}}" - -playerenv: - sunbird_port: '"3000"' - sunbird_content_player_url: {{sunbird_apimanager_service_base_url}} - sunbird_learner_player_url: {{sunbird_apimanager_service_base_url}} - sunbird_content_proxy_url: {{sunbird_knowledge_mw_service_url}} - sunbird_echo_api_url: {{sunbird_echo_api_url}} - sunbird_autocreate_trampoline_user: '"false"' - sunbird_portal_realm: {{keycloak_realm}} - sunbird_portal_auth_server_url: {{keycloak_auth_server_url}} - sunbird_portal_auth_server_client: {{sunbird_portal_auth_server_client}} - sunbird_trampoline_client_id: {{sunbird_trampoline_client_id}} - sunbird_trampoline_secret: {{sunbird_trampoline_secret}} - ekstep_env: {{sunbird_env}} - sunbird_default_channel: {{sunbird_default_channel}} - 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_azure_storage_account}} - AZURE_STORAGE_KEY: {{sunbird_azure_storage_key}} - sunbird_dataservice_url: {{sunbird_dataservice_url}} - sunbird_telemetry_packet_size: '"{{sunbird_telemetry_packet_size}}"' - sunbird_environment: {{sunbird_environment}} - sunbird_instance: {{sunbird_instance}} - sunbird_android_app_url: {{sunbird_android_app_url}} - sunbird_external_content_whitelisted_domains: {{sunbird_external_content_whitelisted_domains}} - sunbird_portal_cdn_url: {{sunbird_portal_cdn_url}} - sunbird_portal_cdn_blob_url: {{sunbird_portal_cdn_blob_url|default('""')}} - sunbird_portal_title_name: {{sunbird_portal_title_name}} - sunbird_enable_signup: '"{{sunbird_enable_signup}}"' - sunbird_tenant_cdn_url: {{sunbird_tenant_cdn_url}} - sunbird_cloud_storage_urls: {{sunbird_cloud_storage_urls}} - sunbird_config_service_url: {{sunbird_config_service_url}} - sunbird_portal_user_upload_ref_link: {{sunbird_portal_user_upload_ref_link}} - sunbird_build_number: {{sunbird_build_number|default('""')}} - config_service_enabled: '"{{config_service_enabled}}"' - config_refresh_interval: '"{{config_refresh_interval}}"' - sunbird_device_register_api: {{sunbird_device_register_api}} - # Release-1.13 - sunbird_google_oauth_clientId: {{sunbird_google_oauth_clientId}} - sunbird_google_oauth_clientSecret: {{sunbird_google_oauth_clientSecret}} - 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_azure_account_name}} - sunbird_azure_account_key: {{sunbird_azure_storage_key}} - sunbird_response_cache_ttl: '"{{sunbird_response_cache_ttl|default('180')}}"' - sunbird_portal_preview_cdn_url: {{sunbird_portal_preview_cdn_url}} - {% if groups['cassandra-2'] is defined %} -sunbird_cassandra_consistency_level: quorum - {% else %} -sunbird_cassandra_consistency_level: {{sunbird_cassandra_consistency_level}} - {% endif %} -sunbird_health_check_enable: '"{{sunbird_health_check_enable}}"' - sunbird_portal_player_cdn_enabled: '"{{sunbird_portal_player_cdn_enabled|default('""')}}"' - # Release-2.0 - sunbird_processing_kafka_host: {{sunbird_processing_kafka_host}} - sunbird_sso_kafka_topic: {{sunbird_sso_kafka_topic}} - sunbird_portal_offline_tenant: {{sunbird_portal_offline_tenant}} - sunbird_portal_offline_supported_languages: {{sunbird_portal_offline_supported_languages}} - sunbird_portal_offline_app_release_date: {{sunbird_portal_offline_app_release_date}} - sunbird_portal_offline_app_version: {{sunbird_portal_offline_app_version}} - sunbird_portal_offline_app_download_url: {{sunbird_portal_offline_app_download_url}} - sunbird_portal_log_level: {{sunbird_portal_log_level}} - sunbird_google_android_keycloak_client_id: {{sunbird_google_android_keycloak_client_id}} - sunbird_google_android_keycloak_secret: {{sunbird_google_android_keycloak_secret}} - sunbird_trampoline_android_keycloak_client_id: {{sunbird_trampoline_android_keycloak_client_id}} - sunbird_trampoline_android_keycloak_secret: {{sunbird_trampoline_android_keycloak_secret}} - sunbird_android_keycloak_client_id: {{sunbird_android_keycloak_client_id}} - sunbird_portal_merge_auth_server_url: {{sunbird_subdomain_keycloak_base_url | d('')}} - -sunbird_cassandra_replication_strategy: '{{sunbird_cassandra_replication_strategy}}' - -graph_ids: ["domain"] \ No newline at end of file diff --git a/kubernetes/helm_charts/core/telemetry/.helmignore b/kubernetes/helm_charts/core/telemetry/.helmignore deleted file mode 100644 index 50af03172..000000000 --- a/kubernetes/helm_charts/core/telemetry/.helmignore +++ /dev/null @@ -1,22 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/kubernetes/helm_charts/core/telemetry/Chart.yaml b/kubernetes/helm_charts/core/telemetry/Chart.yaml deleted file mode 100644 index e4f277fdf..000000000 --- a/kubernetes/helm_charts/core/telemetry/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "1.0" -description: A Helm chart for Kubernetes -name: telemetry -version: 0.1.0 diff --git a/kubernetes/helm_charts/core/telemetry/templates/_helpers.tpl b/kubernetes/helm_charts/core/telemetry/templates/_helpers.tpl deleted file mode 100644 index 590205843..000000000 --- a/kubernetes/helm_charts/core/telemetry/templates/_helpers.tpl +++ /dev/null @@ -1,45 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "telemetry.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "telemetry.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "telemetry.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "telemetry.labels" -}} -app.kubernetes.io/name: {{ include "telemetry.name" . }} -helm.sh/chart: {{ include "telemetry.chart" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} diff --git a/kubernetes/helm_charts/core/telemetry/templates/configmap.yaml b/kubernetes/helm_charts/core/telemetry/templates/configmap.yaml deleted file mode 100644 index d671051a9..000000000 --- a/kubernetes/helm_charts/core/telemetry/templates/configmap.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v1 -data: - {{- range $key, $val := .Values.telemetryenv }} - {{ $key }}: {{ $val }} - {{- end }} -kind: ConfigMap -metadata: - creationTimestamp: null - name: {{ .Chart.Name }}-config - namespace: {{ .Values.namespace }} diff --git a/kubernetes/helm_charts/core/telemetry/templates/deployment.yaml b/kubernetes/helm_charts/core/telemetry/templates/deployment.yaml deleted file mode 100644 index 405e85784..000000000 --- a/kubernetes/helm_charts/core/telemetry/templates/deployment.yaml +++ /dev/null @@ -1,52 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Chart.Name }} - namespace: {{ .Values.namespace }} -spec: - replicas: {{ .Values.replicaCount }} - strategy: - type: {{ .Values.strategy.type }} - rollingUpdate: - maxsurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ .Values.strategy.maxunavailable }} - selector: - matchLabels: - app: {{ .Chart.Name }} - template: - metadata: - annotations: - readiness.status.sidecar.istio.io/applicationPorts: "" - checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - labels: - app: {{ .Chart.Name }} - spec: - imagePullSecrets: - - name: {{ .Values.imagepullsecrets }} - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" - envFrom: - - configMapRef: - name: {{ .Chart.Name }}-config - resources: -{{ toYaml .Values.resources | indent 10 }} - ports: - - containerPort: {{ .Values.network.port }} - ---- -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 }} - selector: - app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/telemetry/values.j2 b/kubernetes/helm_charts/core/telemetry/values.j2 deleted file mode 100644 index 61d911b67..000000000 --- a/kubernetes/helm_charts/core/telemetry/values.j2 +++ /dev/null @@ -1,32 +0,0 @@ - -### variables for telemetry service ### - -namespace: {{ namespace }} -imagepullsecrets: {{ imagepullsecrets }} -dockerhub: {{ dockerhub }} - -replicaCount: {{telemetry_replicacount|default(1)}} -repository: {{telemetry_repository|default('telemetry-service')}} -image_tag: {{image_tag }} -resources: - requests: - cpu: {{telemetry_service_cpu_req|default('50m')}} - memory: {{telemetry_service_mem_req|default('50Mi')}} - limits: - cpu: {{telemetry_service_cpu_limit|default('1')}} - memory: {{telemetry_service_mem_limit|default('300Mi')}} -network: - port: 9001 - targetport: 9001 -strategy: - type: RollingUpdate - maxsurge: 1 - maxunavailable: 0 - -telemetryenv: - telemetry_service_threads: '"2"' - telemetry_local_storage_enabled: '"true"' - telemetry_local_storage_type: {{sunbird_telemetry_dispatchers|default('kafka')}} - telemetry_kafka_broker_list: "{{groups['kafka']|join(':9092,')}}:9092" - telemetry_kafka_topic: {{sunbird_telemetry_kafka_topic}} - diff --git a/kubernetes/helm_charts/core/userorg/Chart.yaml b/kubernetes/helm_charts/core/userorg/Chart.yaml deleted file mode 100644 index c7c993ab6..000000000 --- a/kubernetes/helm_charts/core/userorg/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "1.0" -description: A Helm chart for Kubernetes -name: userorg -version: 0.1.0 diff --git a/kubernetes/helm_charts/core/userorg/templates/configmap.yaml b/kubernetes/helm_charts/core/userorg/templates/configmap.yaml deleted file mode 100644 index 749c76000..000000000 --- a/kubernetes/helm_charts/core/userorg/templates/configmap.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v1 -data: - {{- range $key, $val := .Values.userorgenv }} - {{ $key }}: {{ $val }} - {{- end }} -kind: ConfigMap -metadata: - creationTimestamp: null - name: {{ .Chart.Name }}-config - namespace: {{ .Values.namespace }} diff --git a/kubernetes/helm_charts/core/userorg/templates/deployment.yaml b/kubernetes/helm_charts/core/userorg/templates/deployment.yaml deleted file mode 100644 index 405e85784..000000000 --- a/kubernetes/helm_charts/core/userorg/templates/deployment.yaml +++ /dev/null @@ -1,52 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Chart.Name }} - namespace: {{ .Values.namespace }} -spec: - replicas: {{ .Values.replicaCount }} - strategy: - type: {{ .Values.strategy.type }} - rollingUpdate: - maxsurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ .Values.strategy.maxunavailable }} - selector: - matchLabels: - app: {{ .Chart.Name }} - template: - metadata: - annotations: - readiness.status.sidecar.istio.io/applicationPorts: "" - checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - labels: - app: {{ .Chart.Name }} - spec: - imagePullSecrets: - - name: {{ .Values.imagepullsecrets }} - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" - envFrom: - - configMapRef: - name: {{ .Chart.Name }}-config - resources: -{{ toYaml .Values.resources | indent 10 }} - ports: - - containerPort: {{ .Values.network.port }} - ---- -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 }} - selector: - app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/userorg/values.j2 b/kubernetes/helm_charts/core/userorg/values.j2 deleted file mode 100644 index 405688067..000000000 --- a/kubernetes/helm_charts/core/userorg/values.j2 +++ /dev/null @@ -1,44 +0,0 @@ -### Default variable file for userorg-service ### - -namespace: {{ namespace }} -imagepullsecrets: {{ imagepullsecrets }} -dockerhub: {{ dockerhub }} - -replicaCount: {{userorg_replicacount|default(1)}} -repository: {{userorg_repository|default('user_org_service')}} -image_tag: {{image_tag }} -resources: - requests: - cpu: {{userorg_service_cpu_req|default('50m')}} - memory: {{userorg_service_mem_req|default('50Mi')}} - limits: - cpu: {{userorg_service_cpu_limit|default('1')}} - memory: {{userorg_service_mem_limit|default('800Mi')}} -network: - port: 9008 - targetport: 9000 -strategy: - type: RollingUpdate - maxsurge: 1 - maxunavailable: 0 - -userorgenv: - sunbird_es_host: {{user_org_sunbird_es_host}} - sunbird_es_port: '"{{user_org_sunbird_es_port}}"' - database_connectionInfo_0_shardId: '"{{user_org_database_connectionInfo_0_shardId}}"' - database_connectionInfo_0_shardLabel: '"{{user_org_database_connectionInfo_0_shardLabel}}"' - database_connectionInfo_0_username: {{user_org_database_connectionInfo_0_username}} - database_connectionInfo_0_password: {{user_org_database_connectionInfo_0_password}} - database_connectionInfo_0_uri: {{user_org_database_connectionInfo_0_uri}} - database_connectionInfo_1_shardId: '"{{user_org_database_connectionInfo_1_shardId}}"' - database_connectionInfo_1_shardLabel: '"{{user_org_database_connectionInfo_1_shardLabel}}"' - database_connectionInfo_1_username: {{user_org_database_connectionInfo_1_username}} - database_connectionInfo_1_password: {{user_org_database_connectionInfo_1_password}} - database_connectionInfo_1_uri: {{user_org_database_connectionInfo_1_uri}} - database_connectionInfo_2_shardId_: '"{{user_org_database_connectionInfo_2_shardId}}"' - database_connectionInfo_2_shardLabel: '"{{user_org_database_connectionInfo_2_shardLabel}}"' - database_connectionInfo_2_username: {{user_org_database_connectionInfo_2_username}} - database_connectionInfo_2_password: {{user_org_database_connectionInfo_2_password}} - database_connectionInfo_2_uri: {{user_org_database_connectionInfo_2_uri}} - - \ No newline at end of file diff --git a/kubernetes/helm_charts/istio-system/istio-init/Chart.yaml b/kubernetes/helm_charts/istio-system/istio-init/Chart.yaml deleted file mode 100755 index 2dd6de9d9..000000000 --- a/kubernetes/helm_charts/istio-system/istio-init/Chart.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -appVersion: 1.3.3 -description: Helm chart to initialize Istio CRDs -engine: gotpl -icon: https://istio.io/favicons/android-192x192.png -keywords: -- istio -- crd -name: istio-init -sources: -- http://github.com/istio/istio -tillerVersion: '>=2.7.2-0' -version: 1.3.3 diff --git a/kubernetes/helm_charts/istio-system/istio-init/README.md b/kubernetes/helm_charts/istio-system/istio-init/README.md deleted file mode 100755 index c0a0e34f8..000000000 --- a/kubernetes/helm_charts/istio-system/istio-init/README.md +++ /dev/null @@ -1,77 +0,0 @@ -# Istio - -[Istio](https://istio.io/) is an open platform for providing a uniform way to integrate microservices, manage traffic flow across microservices, enforce policies and aggregate telemetry data. - -## Introduction - -This chart bootstraps Istio's [CRDs](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/#customresourcedefinitions) -which are an internal implementation detail of Istio. CRDs define data structures for storing runtime configuration -specified by a human operator. - -This chart must be run to completion prior to running other Istio charts, or other Istio charts will fail to initialize. - -## Prerequisites - -- Kubernetes 1.9 or newer cluster with RBAC (Role-Based Access Control) enabled is required -- Helm 2.7.2 or newer or alternately the ability to modify RBAC rules is also required - -## Resources Required - -The chart deploys pods that consume minimal resources. - -## Installing the Chart - -1. If a service account has not already been installed for Tiller, install one: - ``` - $ kubectl apply -f install/kubernetes/helm/helm-service-account.yaml - ``` - -1. If Tiller has not already been installed in your cluster, Install Tiller on your cluster with the service account: - ``` - $ helm init --service-account tiller - ``` - -1. Install the Istio initializer chart: - ``` - $ helm install install/kubernetes/helm/istio-init --name istio-init --namespace istio-system - ``` - - > Although you can install the `istio-init` chart to any namespace, it is recommended to install `istio-init` in the same namespace(`istio-system`) as other Istio charts. - -## Configuration - -The Helm chart ships with reasonable defaults. There may be circumstances in which defaults require overrides. -To override Helm values, use `--set key=value` argument during the `helm install` command. Multiple `--set` operations may be used in the same Helm operation. - -Helm charts expose configuration options which are currently in alpha. The currently exposed options are explained in the following table: - -| Parameter | Description | Values | Default | -| --- | --- | --- | --- | -| `global.hub` | Specifies the HUB for most images used by Istio | registry/namespace | `docker.io/istio` | -| `global.tag` | Specifies the TAG for most images used by Istio | valid image tag | `0.8.latest` | -| `global.imagePullPolicy` | Specifies the image pull policy | valid image pull policy | `IfNotPresent` | - - -## Uninstalling the Chart - -> Uninstalling this chart does not delete Istio's registered CRDs. Istio by design expects -> CRDs to leak into the Kubernetes environment. As CRDs contain all runtime configuration -> data in CustomResources the Istio designers feel it is better to explicitly delete this -> configuration rather then unexpectedly lose it. - -To uninstall/delete the `istio-init` release but continue to track the release: - ``` - $ helm delete istio-init - ``` - -To uninstall/delete the `istio-init` release completely and make its name free for later use: - ``` - $ helm delete --purge istio-init - ``` - -> Warning: Deleting CRDs will delete any configuration that you have made to Istio. - -To delete all CRDs, run the following command - ``` - $ for i in istio-init/files/*crd*yaml; do kubectl delete -f $i; done - ``` diff --git a/kubernetes/helm_charts/istio-system/istio-init/files/crd-10.yaml b/kubernetes/helm_charts/istio-system/istio-init/files/crd-10.yaml deleted file mode 100755 index e76e50edc..000000000 --- a/kubernetes/helm_charts/istio-system/istio-init/files/crd-10.yaml +++ /dev/null @@ -1,636 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: virtualservices.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: VirtualService - listKind: VirtualServiceList - plural: virtualservices - singular: virtualservice - shortNames: - - vs - categories: - - istio-io - - networking-istio-io - scope: Namespaced - versions: - - name: v1alpha3 - served: true - storage: true - additionalPrinterColumns: - - JSONPath: .spec.gateways - description: The names of gateways and sidecars that should apply these routes - name: Gateways - type: string - - JSONPath: .spec.hosts - description: The destination hosts to which traffic is being sent - name: Hosts - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: destinationrules.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: DestinationRule - listKind: DestinationRuleList - plural: destinationrules - singular: destinationrule - shortNames: - - dr - categories: - - istio-io - - networking-istio-io - scope: Namespaced - versions: - - name: v1alpha3 - served: true - storage: true - additionalPrinterColumns: - - JSONPath: .spec.host - description: The name of a service from the service registry - name: Host - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: serviceentries.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: ServiceEntry - listKind: ServiceEntryList - plural: serviceentries - singular: serviceentry - shortNames: - - se - categories: - - istio-io - - networking-istio-io - scope: Namespaced - versions: - - name: v1alpha3 - served: true - storage: true - additionalPrinterColumns: - - JSONPath: .spec.hosts - description: The hosts associated with the ServiceEntry - name: Hosts - type: string - - JSONPath: .spec.location - description: Whether the service is external to the mesh or part of the mesh (MESH_EXTERNAL or MESH_INTERNAL) - name: Location - type: string - - JSONPath: .spec.resolution - description: Service discovery mode for the hosts (NONE, STATIC, or DNS) - name: Resolution - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: gateways.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: Gateway - plural: gateways - singular: gateway - shortNames: - - gw - categories: - - istio-io - - networking-istio-io - scope: Namespaced - versions: - - name: v1alpha3 - served: true - storage: true ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: envoyfilters.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: EnvoyFilter - plural: envoyfilters - singular: envoyfilter - categories: - - istio-io - - networking-istio-io - scope: Namespaced - versions: - - name: v1alpha3 - served: true - storage: true ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: clusterrbacconfigs.rbac.istio.io - labels: - app: istio-pilot - istio: rbac - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: ClusterRbacConfig - plural: clusterrbacconfigs - singular: clusterrbacconfig - categories: - - istio-io - - rbac-istio-io - scope: Cluster - versions: - - name: v1alpha1 - served: true - storage: true ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: policies.authentication.istio.io - labels: - app: istio-citadel - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: authentication.istio.io - names: - kind: Policy - plural: policies - singular: policy - categories: - - istio-io - - authentication-istio-io - scope: Namespaced - versions: - - name: v1alpha1 - served: true - storage: true ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: meshpolicies.authentication.istio.io - labels: - app: istio-citadel - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: authentication.istio.io - names: - kind: MeshPolicy - listKind: MeshPolicyList - plural: meshpolicies - singular: meshpolicy - categories: - - istio-io - - authentication-istio-io - scope: Cluster - versions: - - name: v1alpha1 - served: true - storage: true ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: httpapispecbindings.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: HTTPAPISpecBinding - plural: httpapispecbindings - singular: httpapispecbinding - categories: - - istio-io - - apim-istio-io - scope: Namespaced - versions: - - name: v1alpha2 - served: true - storage: true ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: httpapispecs.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: HTTPAPISpec - plural: httpapispecs - singular: httpapispec - categories: - - istio-io - - apim-istio-io - scope: Namespaced - versions: - - name: v1alpha2 - served: true - storage: true ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: quotaspecbindings.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: QuotaSpecBinding - plural: quotaspecbindings - singular: quotaspecbinding - categories: - - istio-io - - apim-istio-io - scope: Namespaced - versions: - - name: v1alpha2 - served: true - storage: true ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: quotaspecs.config.istio.io - labels: - app: istio-mixer - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: QuotaSpec - plural: quotaspecs - singular: quotaspec - categories: - - istio-io - - apim-istio-io - scope: Namespaced - versions: - - name: v1alpha2 - served: true - storage: true ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: rules.config.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: core - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: rule - plural: rules - singular: rule - categories: - - istio-io - - policy-istio-io - scope: Namespaced - versions: - - name: v1alpha2 - served: true - storage: true ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: attributemanifests.config.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: core - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: attributemanifest - plural: attributemanifests - singular: attributemanifest - categories: - - istio-io - - policy-istio-io - scope: Namespaced - versions: - - name: v1alpha2 - served: true - storage: true ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: rbacconfigs.rbac.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: rbac - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: RbacConfig - plural: rbacconfigs - singular: rbacconfig - categories: - - istio-io - - rbac-istio-io - scope: Namespaced - versions: - - name: v1alpha1 - served: true - storage: true ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: serviceroles.rbac.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: rbac - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: ServiceRole - plural: serviceroles - singular: servicerole - categories: - - istio-io - - rbac-istio-io - scope: Namespaced - versions: - - name: v1alpha1 - served: true - storage: true ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: servicerolebindings.rbac.istio.io - labels: - app: mixer - package: istio.io.mixer - istio: rbac - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: rbac.istio.io - names: - kind: ServiceRoleBinding - plural: servicerolebindings - singular: servicerolebinding - categories: - - istio-io - - rbac-istio-io - scope: Namespaced - versions: - - name: v1alpha1 - served: true - storage: true - additionalPrinterColumns: - - JSONPath: .spec.roleRef.name - description: The name of the ServiceRole object being referenced - name: Reference - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: adapters.config.istio.io - labels: - app: mixer - package: adapter - istio: mixer-adapter - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: adapter - plural: adapters - singular: adapter - categories: - - istio-io - - policy-istio-io - scope: Namespaced - versions: - - name: v1alpha2 - served: true - storage: true ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: instances.config.istio.io - labels: - app: mixer - package: instance - istio: mixer-instance - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: instance - plural: instances - singular: instance - categories: - - istio-io - - policy-istio-io - scope: Namespaced - versions: - - name: v1alpha2 - served: true - storage: true ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: templates.config.istio.io - labels: - app: mixer - package: template - istio: mixer-template - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: template - plural: templates - singular: template - categories: - - istio-io - - policy-istio-io - scope: Namespaced - versions: - - name: v1alpha2 - served: true - storage: true ---- -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: handlers.config.istio.io - labels: - app: mixer - package: handler - istio: mixer-handler - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: config.istio.io - names: - kind: handler - plural: handlers - singular: handler - categories: - - istio-io - - policy-istio-io - scope: Namespaced - versions: - - name: v1alpha2 - served: true - storage: true ---- diff --git a/kubernetes/helm_charts/istio-system/istio-init/files/crd-11.yaml b/kubernetes/helm_charts/istio-system/istio-init/files/crd-11.yaml deleted file mode 100755 index 5087d38fa..000000000 --- a/kubernetes/helm_charts/istio-system/istio-init/files/crd-11.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: sidecars.networking.istio.io - labels: - app: istio-pilot - chart: istio - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: networking.istio.io - names: - kind: Sidecar - plural: sidecars - singular: sidecar - categories: - - istio-io - - networking-istio-io - scope: Namespaced - versions: - - name: v1alpha3 - served: true - storage: true ---- diff --git a/kubernetes/helm_charts/istio-system/istio-init/files/crd-12.yaml b/kubernetes/helm_charts/istio-system/istio-init/files/crd-12.yaml deleted file mode 100755 index d9b337244..000000000 --- a/kubernetes/helm_charts/istio-system/istio-init/files/crd-12.yaml +++ /dev/null @@ -1,24 +0,0 @@ -kind: CustomResourceDefinition -apiVersion: apiextensions.k8s.io/v1beta1 -metadata: - name: authorizationpolicies.rbac.istio.io - labels: - app: istio-pilot - istio: rbac - heritage: Tiller - release: istio -spec: - group: rbac.istio.io - names: - kind: AuthorizationPolicy - plural: authorizationpolicies - singular: authorizationpolicy - categories: - - istio-io - - rbac-istio-io - scope: Namespaced - versions: - - name: v1alpha1 - served: true - storage: true ---- diff --git a/kubernetes/helm_charts/istio-system/istio-init/files/crd-certmanager-10.yaml b/kubernetes/helm_charts/istio-system/istio-init/files/crd-certmanager-10.yaml deleted file mode 100755 index d3a3069e8..000000000 --- a/kubernetes/helm_charts/istio-system/istio-init/files/crd-certmanager-10.yaml +++ /dev/null @@ -1,91 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: clusterissuers.certmanager.k8s.io - labels: - app: certmanager - chart: certmanager - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: certmanager.k8s.io - versions: - - name: v1alpha1 - served: true - storage: true - names: - kind: ClusterIssuer - plural: clusterissuers - scope: Cluster ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: issuers.certmanager.k8s.io - labels: - app: certmanager - chart: certmanager - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - group: certmanager.k8s.io - versions: - - name: v1alpha1 - served: true - storage: true - names: - kind: Issuer - plural: issuers - scope: Namespaced ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: certificates.certmanager.k8s.io - labels: - app: certmanager - chart: certmanager - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - additionalPrinterColumns: - - JSONPath: .status.conditions[?(@.type=="Ready")].status - name: Ready - type: string - - JSONPath: .spec.secretName - name: Secret - type: string - - JSONPath: .spec.issuerRef.name - name: Issuer - type: string - priority: 1 - - JSONPath: .status.conditions[?(@.type=="Ready")].message - name: Status - type: string - priority: 1 - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date - group: certmanager.k8s.io - versions: - - name: v1alpha1 - served: true - storage: true - scope: Namespaced - names: - kind: Certificate - plural: certificates - shortNames: - - cert - - certs ---- diff --git a/kubernetes/helm_charts/istio-system/istio-init/files/crd-certmanager-11.yaml b/kubernetes/helm_charts/istio-system/istio-init/files/crd-certmanager-11.yaml deleted file mode 100755 index f63787b68..000000000 --- a/kubernetes/helm_charts/istio-system/istio-init/files/crd-certmanager-11.yaml +++ /dev/null @@ -1,80 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: orders.certmanager.k8s.io - labels: - app: certmanager - chart: certmanager - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - additionalPrinterColumns: - - JSONPath: .status.state - name: State - type: string - - JSONPath: .spec.issuerRef.name - name: Issuer - type: string - priority: 1 - - JSONPath: .status.reason - name: Reason - type: string - priority: 1 - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date - group: certmanager.k8s.io - versions: - - name: v1alpha1 - served: true - storage: true - names: - kind: Order - plural: orders - scope: Namespaced ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: challenges.certmanager.k8s.io - labels: - app: certmanager - chart: certmanager - heritage: Tiller - release: istio - annotations: - "helm.sh/resource-policy": keep -spec: - additionalPrinterColumns: - - JSONPath: .status.state - name: State - type: string - - JSONPath: .spec.dnsName - name: Domain - type: string - - JSONPath: .status.reason - name: Reason - type: string - - JSONPath: .metadata.creationTimestamp - description: |- - CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. - - Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - name: Age - type: date - group: certmanager.k8s.io - versions: - - name: v1alpha1 - served: true - storage: true - names: - kind: Challenge - plural: challenges - scope: Namespaced ---- diff --git a/kubernetes/helm_charts/istio-system/istio-init/templates/clusterrole.yaml b/kubernetes/helm_charts/istio-system/istio-init/templates/clusterrole.yaml deleted file mode 100755 index 0b7c50fbc..000000000 --- a/kubernetes/helm_charts/istio-system/istio-init/templates/clusterrole.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: istio-init-{{ .Release.Namespace }} - labels: - app: istio-init - istio: init -rules: -- apiGroups: ["apiextensions.k8s.io"] - resources: ["customresourcedefinitions"] - verbs: ["create", "get", "list", "watch", "patch"] diff --git a/kubernetes/helm_charts/istio-system/istio-init/templates/clusterrolebinding.yaml b/kubernetes/helm_charts/istio-system/istio-init/templates/clusterrolebinding.yaml deleted file mode 100755 index 481674c0e..000000000 --- a/kubernetes/helm_charts/istio-system/istio-init/templates/clusterrolebinding.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: istio-init-admin-role-binding-{{ .Release.Namespace }} - labels: - app: istio-init - istio: init -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: istio-init-{{ .Release.Namespace }} -subjects: - - kind: ServiceAccount - name: istio-init-service-account - namespace: {{ .Release.Namespace }} diff --git a/kubernetes/helm_charts/istio-system/istio-init/templates/configmap-crd-10.yaml b/kubernetes/helm_charts/istio-system/istio-init/templates/configmap-crd-10.yaml deleted file mode 100755 index 69e37fa14..000000000 --- a/kubernetes/helm_charts/istio-system/istio-init/templates/configmap-crd-10.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - namespace: {{ .Release.Namespace }} - name: istio-crd-10 -data: - crd-10.yaml: |- -{{.Files.Get "files/crd-10.yaml" | printf "%s" | indent 4}} diff --git a/kubernetes/helm_charts/istio-system/istio-init/templates/configmap-crd-11.yaml b/kubernetes/helm_charts/istio-system/istio-init/templates/configmap-crd-11.yaml deleted file mode 100755 index 952640d60..000000000 --- a/kubernetes/helm_charts/istio-system/istio-init/templates/configmap-crd-11.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - namespace: {{ .Release.Namespace }} - name: istio-crd-11 -data: - crd-11.yaml: |- -{{.Files.Get "files/crd-11.yaml" | printf "%s" | indent 4}} diff --git a/kubernetes/helm_charts/istio-system/istio-init/templates/configmap-crd-12.yaml b/kubernetes/helm_charts/istio-system/istio-init/templates/configmap-crd-12.yaml deleted file mode 100755 index a49736534..000000000 --- a/kubernetes/helm_charts/istio-system/istio-init/templates/configmap-crd-12.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - namespace: {{ .Release.Namespace }} - name: istio-crd-12 -data: - crd-12.yaml: |- -{{.Files.Get "files/crd-12.yaml" | printf "%s" | indent 4}} diff --git a/kubernetes/helm_charts/istio-system/istio-init/templates/configmap-crd-certmanager-10.yaml b/kubernetes/helm_charts/istio-system/istio-init/templates/configmap-crd-certmanager-10.yaml deleted file mode 100755 index 8ab3e8356..000000000 --- a/kubernetes/helm_charts/istio-system/istio-init/templates/configmap-crd-certmanager-10.yaml +++ /dev/null @@ -1,10 +0,0 @@ -{{- if .Values.certmanager.enabled }} -apiVersion: v1 -kind: ConfigMap -metadata: - namespace: {{ .Release.Namespace }} - name: istio-crd-certmanager-10 -data: - crd-certmanager-10.yaml: |- -{{.Files.Get "files/crd-certmanager-10.yaml" | printf "%s" | indent 4}} -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio-init/templates/configmap-crd-certmanager-11.yaml b/kubernetes/helm_charts/istio-system/istio-init/templates/configmap-crd-certmanager-11.yaml deleted file mode 100755 index beef3043d..000000000 --- a/kubernetes/helm_charts/istio-system/istio-init/templates/configmap-crd-certmanager-11.yaml +++ /dev/null @@ -1,10 +0,0 @@ -{{- if .Values.certmanager.enabled }} -apiVersion: v1 -kind: ConfigMap -metadata: - namespace: {{ .Release.Namespace }} - name: istio-crd-certmanager-11 -data: - crd-certmanager-11.yaml: |- -{{.Files.Get "files/crd-certmanager-11.yaml" | printf "%s" | indent 4}} -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio-init/templates/job-crd-10.yaml b/kubernetes/helm_charts/istio-system/istio-init/templates/job-crd-10.yaml deleted file mode 100755 index 2f98bc51f..000000000 --- a/kubernetes/helm_charts/istio-system/istio-init/templates/job-crd-10.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - namespace: {{ .Release.Namespace }} - name: istio-init-crd-10-{{ .Values.global.tag | printf "%v" | trunc 32 }} -spec: - template: - metadata: - annotations: - sidecar.istio.io/inject: "false" - spec: - serviceAccountName: istio-init-service-account - containers: - - name: istio-init-crd-10 - image: "{{ .Values.global.hub }}/kubectl:{{ .Values.global.tag }}" - imagePullPolicy: {{ .Values.global.imagePullPolicy }} - volumeMounts: - - name: crd-10 - mountPath: /etc/istio/crd-10 - readOnly: true - command: ["kubectl", "apply", "-f", "/etc/istio/crd-10/crd-10.yaml"] - volumes: - - name: crd-10 - configMap: - name: istio-crd-10 - restartPolicy: OnFailure diff --git a/kubernetes/helm_charts/istio-system/istio-init/templates/job-crd-11.yaml b/kubernetes/helm_charts/istio-system/istio-init/templates/job-crd-11.yaml deleted file mode 100755 index 35996a022..000000000 --- a/kubernetes/helm_charts/istio-system/istio-init/templates/job-crd-11.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - namespace: {{ .Release.Namespace }} - name: istio-init-crd-11-{{ .Values.global.tag | printf "%v" | trunc 32 }} -spec: - template: - metadata: - annotations: - sidecar.istio.io/inject: "false" - spec: - serviceAccountName: istio-init-service-account - containers: - - name: istio-init-crd-11 - image: "{{ .Values.global.hub }}/kubectl:{{ .Values.global.tag }}" - imagePullPolicy: {{ .Values.global.imagePullPolicy }} - volumeMounts: - - name: crd-11 - mountPath: /etc/istio/crd-11 - readOnly: true - command: ["kubectl", "apply", "-f", "/etc/istio/crd-11/crd-11.yaml"] - volumes: - - name: crd-11 - configMap: - name: istio-crd-11 - restartPolicy: OnFailure diff --git a/kubernetes/helm_charts/istio-system/istio-init/templates/job-crd-12.yaml b/kubernetes/helm_charts/istio-system/istio-init/templates/job-crd-12.yaml deleted file mode 100755 index f40425097..000000000 --- a/kubernetes/helm_charts/istio-system/istio-init/templates/job-crd-12.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - namespace: {{ .Release.Namespace }} - name: istio-init-crd-12-{{ .Values.global.tag | printf "%v" | trunc 32 }} -spec: - template: - metadata: - annotations: - sidecar.istio.io/inject: "false" - spec: - serviceAccountName: istio-init-service-account - containers: - - name: istio-init-crd-12 - image: "{{ .Values.global.hub }}/kubectl:{{ .Values.global.tag }}" - imagePullPolicy: {{ .Values.global.imagePullPolicy }} - volumeMounts: - - name: crd-12 - mountPath: /etc/istio/crd-12 - readOnly: true - command: ["kubectl", "apply", "-f", "/etc/istio/crd-12/crd-12.yaml"] - volumes: - - name: crd-12 - configMap: - name: istio-crd-12 - restartPolicy: OnFailure diff --git a/kubernetes/helm_charts/istio-system/istio-init/templates/job-crd-certmanager-10.yaml b/kubernetes/helm_charts/istio-system/istio-init/templates/job-crd-certmanager-10.yaml deleted file mode 100755 index 5b4e0a268..000000000 --- a/kubernetes/helm_charts/istio-system/istio-init/templates/job-crd-certmanager-10.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if .Values.certmanager.enabled }} -apiVersion: batch/v1 -kind: Job -metadata: - namespace: {{ .Release.Namespace }} - name: istio-init-crd-certmanager-10-{{ .Values.global.tag | printf "%v" | trunc 32 }} -spec: - template: - metadata: - annotations: - sidecar.istio.io/inject: "false" - spec: - serviceAccountName: istio-init-service-account - containers: - - name: istio-init-crd-certmanager-10 - image: "{{ .Values.global.hub }}/kubectl:{{ .Values.global.tag }}" - imagePullPolicy: {{ .Values.global.imagePullPolicy }} - volumeMounts: - - name: crd-certmanager-10 - mountPath: /etc/istio/crd-certmanager-10 - readOnly: true - command: ["kubectl", "apply", "-f", "/etc/istio/crd-certmanager-10/crd-certmanager-10.yaml"] - volumes: - - name: crd-certmanager-10 - configMap: - name: istio-crd-certmanager-10 - restartPolicy: OnFailure -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio-init/templates/job-crd-certmanager-11.yaml b/kubernetes/helm_charts/istio-system/istio-init/templates/job-crd-certmanager-11.yaml deleted file mode 100755 index 06092cf58..000000000 --- a/kubernetes/helm_charts/istio-system/istio-init/templates/job-crd-certmanager-11.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if .Values.certmanager.enabled }} -apiVersion: batch/v1 -kind: Job -metadata: - namespace: {{ .Release.Namespace }} - name: istio-init-crd-certmanager-11-{{ .Values.global.tag | printf "%v" | trunc 32 }} -spec: - template: - metadata: - annotations: - sidecar.istio.io/inject: "false" - spec: - serviceAccountName: istio-init-service-account - containers: - - name: istio-init-crd-certmanager-11 - image: "{{ .Values.global.hub }}/kubectl:{{ .Values.global.tag }}" - imagePullPolicy: {{ .Values.global.imagePullPolicy }} - volumeMounts: - - name: crd-certmanager-11 - mountPath: /etc/istio/crd-certmanager-11 - readOnly: true - command: ["kubectl", "apply", "-f", "/etc/istio/crd-certmanager-11/crd-certmanager-11.yaml"] - volumes: - - name: crd-certmanager-11 - configMap: - name: istio-crd-certmanager-11 - restartPolicy: OnFailure -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio-init/templates/serviceaccount.yaml b/kubernetes/helm_charts/istio-system/istio-init/templates/serviceaccount.yaml deleted file mode 100755 index 314666293..000000000 --- a/kubernetes/helm_charts/istio-system/istio-init/templates/serviceaccount.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -{{- if .Values.global.imagePullSecrets }} -imagePullSecrets: -{{- range .Values.global.imagePullSecrets }} - - name: {{ . }} -{{- end }} -{{- end }} -metadata: - name: istio-init-service-account - namespace: {{ .Release.Namespace }} - labels: - app: istio-init - istio: init - diff --git a/kubernetes/helm_charts/istio-system/istio-init/values.yaml b/kubernetes/helm_charts/istio-system/istio-init/values.yaml deleted file mode 100755 index 6a562cb32..000000000 --- a/kubernetes/helm_charts/istio-system/istio-init/values.yaml +++ /dev/null @@ -1,16 +0,0 @@ -global: - # Default hub for Istio images. - # Releases are published to docker hub under 'istio' project. - # Daily builds from prow are on gcr.io - hub: docker.io/istio - - # Default tag for Istio images. - tag: 1.3.3 - - # imagePullPolicy is applied to istio control plane components. - # local tests require IfNotPresent, to avoid uploading to dockerhub. - # TODO: Switch to Always as default, and override in the local tests. - imagePullPolicy: IfNotPresent - -certmanager: - enabled: false diff --git a/kubernetes/helm_charts/istio-system/istio/Chart.yaml b/kubernetes/helm_charts/istio-system/istio/Chart.yaml deleted file mode 100755 index 1b02a34bd..000000000 --- a/kubernetes/helm_charts/istio-system/istio/Chart.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -appVersion: 1.3.3 -description: Helm chart for all istio components -engine: gotpl -icon: https://istio.io/favicons/android-192x192.png -keywords: -- istio -- security -- sidecarInjectorWebhook -- mixer -- pilot -- galley -name: istio -sources: -- http://github.com/istio/istio -tillerVersion: '>=2.7.2-0' -version: 1.3.3 diff --git a/kubernetes/helm_charts/istio-system/istio/README.md b/kubernetes/helm_charts/istio-system/istio/README.md deleted file mode 100755 index de67ba20b..000000000 --- a/kubernetes/helm_charts/istio-system/istio/README.md +++ /dev/null @@ -1,140 +0,0 @@ -# Istio - -[Istio](https://istio.io/) is an open platform for providing a uniform way to integrate microservices, manage traffic flow across microservices, enforce policies and aggregate telemetry data. - - - -The documentation here is for developers only, please follow the installation instructions from [istio.io](https://istio.io/docs/setup/kubernetes/install/helm/) for all other uses. - -## Introduction - -This chart bootstraps all Istio [components](https://istio.io/docs/concepts/what-is-istio/) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. - -## Chart Details - -This chart can install multiple Istio components as subcharts: -- ingressgateway -- egressgateway -- sidecarInjectorWebhook -- galley -- mixer -- pilot -- security(citadel) -- grafana -- prometheus -- tracing(jaeger) -- kiali - -To enable or disable each component, change the corresponding `enabled` flag. - -## Prerequisites - -- Kubernetes 1.9 or newer cluster with RBAC (Role-Based Access Control) enabled is required -- Helm 2.7.2 or newer or alternately the ability to modify RBAC rules is also required -- If you want to enable automatic sidecar injection, Kubernetes 1.9+ with `admissionregistration` API is required, and `kube-apiserver` process must have the `admission-control` flag set with the `MutatingAdmissionWebhook` and `ValidatingAdmissionWebhook` admission controllers added and listed in the correct order. -- The `istio-init` chart must be run to completion prior to install the `istio` chart. - -## Resources Required - -The chart deploys pods that consume minimum resources as specified in the resources configuration parameter. - -## Installing the Chart - -1. If a service account has not already been installed for Tiller, install one: - ``` - $ kubectl apply -f install/kubernetes/helm/helm-service-account.yaml - ``` - -1. Install Tiller on your cluster with the service account: - ``` - $ helm init --service-account tiller - ``` - -1. Set and create the namespace where Istio was installed: - ``` - $ NAMESPACE=istio-system - $ kubectl create ns $NAMESPACE - ``` - -1. If you are enabling `kiali`, you need to create the secret that contains the username and passphrase for `kiali` dashboard: - ``` - $ echo -n 'admin' | base64 - YWRtaW4= - $ echo -n '1f2d1e2e67df' | base64 - MWYyZDFlMmU2N2Rm - $ cat <=1.9.0): - ``` - $ helm install istio --name istio --namespace $NAMESPACE - ``` - - - Without the sidecar injection webhook: - ``` - $ helm install istio --name istio --namespace $NAMESPACE --set sidecarInjectorWebhook.enabled=false - ``` - -## Configuration - -The Helm chart ships with reasonable defaults. There may be circumstances in which defaults require overrides. -To override Helm values, use `--set key=value` argument during the `helm install` command. Multiple `--set` operations may be used in the same Helm operation. - -Helm charts expose configuration options which are currently in alpha. The currently exposed options can be found [here](https://istio.io/docs/reference/config/installation-options/). - -## Uninstalling the Chart - -To uninstall/delete the `istio` release but continue to track the release: - ``` - $ helm delete istio - ``` - -To uninstall/delete the `istio` release completely and make its name free for later use: - ``` - $ helm delete --purge istio - ``` diff --git a/kubernetes/helm_charts/istio-system/istio/charts/certmanager/Chart.yaml b/kubernetes/helm_charts/istio-system/istio/charts/certmanager/Chart.yaml deleted file mode 100755 index 800e40e73..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/certmanager/Chart.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: v1 -appVersion: 0.6.2 -description: A Helm chart for Kubernetes -name: certmanager -tillerVersion: '>=2.7.2' -version: 1.3.3 diff --git a/kubernetes/helm_charts/istio-system/istio/charts/certmanager/templates/NOTES.txt b/kubernetes/helm_charts/istio-system/istio/charts/certmanager/templates/NOTES.txt deleted file mode 100755 index 0307ede4c..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/certmanager/templates/NOTES.txt +++ /dev/null @@ -1,6 +0,0 @@ -certmanager has been deployed successfully! - -More information on the different types of issuers and how to configure them -can be found in our documentation: - -https://cert-manager.readthedocs.io/en/latest/reference/issuers.html \ No newline at end of file diff --git a/kubernetes/helm_charts/istio-system/istio/charts/certmanager/templates/_helpers.tpl b/kubernetes/helm_charts/istio-system/istio/charts/certmanager/templates/_helpers.tpl deleted file mode 100755 index 331a91d43..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/certmanager/templates/_helpers.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "certmanager.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "certmanager.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "certmanager.chart" -}} -{{- .Chart.Name | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/certmanager/templates/deployment.yaml b/kubernetes/helm_charts/istio-system/istio/charts/certmanager/templates/deployment.yaml deleted file mode 100755 index 48e473153..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/certmanager/templates/deployment.yaml +++ /dev/null @@ -1,69 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: certmanager - namespace: {{ .Release.Namespace }} - labels: - app: certmanager - chart: {{ template "certmanager.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - app: certmanager - template: - metadata: - labels: - app: certmanager - chart: {{ template "certmanager.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - {{- if .Values.podLabels }} -{{ toYaml .Values.podLabels | indent 8 }} - {{- end }} - annotations: - sidecar.istio.io/inject: "false" - {{- if .Values.podAnnotations }} -{{ toYaml .Values.podAnnotations | indent 8 }} - {{- end }} - spec: - serviceAccountName: certmanager -{{- if .Values.global.priorityClassName }} - priorityClassName: "{{ .Values.global.priorityClassName }}" -{{- end }} - containers: - - name: certmanager - image: "{{ .Values.hub }}/{{ .Values.image }}:{{ .Values.tag }}" - imagePullPolicy: {{ .Values.global.imagePullPolicy }} - args: - - --cluster-resource-namespace=$(POD_NAMESPACE) - - --leader-election-namespace=$(POD_NAMESPACE) - {{- if .Values.extraArgs }} -{{ toYaml .Values.extraArgs | indent 8 }} - {{- end }} - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - resources: -{{ toYaml .Values.resources | indent 10 }} - {{- if .Values.podDnsPolicy }} - dnsPolicy: {{ .Values.podDnsPolicy }} - {{- end }} - {{- if .Values.podDnsConfig }} - dnsConfig: -{{ toYaml .Values.podDnsConfig | indent 8 }} - {{- end }} - affinity: - {{- include "nodeaffinity" . | indent 6 }} - {{- include "podAntiAffinity" . | indent 6 }} -{{- if .Values.tolerations }} - tolerations: -{{ toYaml .Values.tolerations | indent 6 }} - {{- else if .Values.global.defaultTolerations }} - tolerations: -{{ toYaml .Values.global.defaultTolerations | indent 6 }} - {{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/certmanager/templates/issuer.yaml b/kubernetes/helm_charts/istio-system/istio/charts/certmanager/templates/issuer.yaml deleted file mode 100755 index 59402daea..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/certmanager/templates/issuer.yaml +++ /dev/null @@ -1,37 +0,0 @@ ---- -apiVersion: certmanager.k8s.io/v1alpha1 -kind: ClusterIssuer -metadata: - name: letsencrypt-staging - namespace: {{ .Release.Namespace }} - labels: - app: certmanager - chart: {{ template "certmanager.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - acme: - server: https://acme-staging-v02.api.letsencrypt.org/directory - email: {{ .Values.email }} - # Name of a secret used to store the ACME account private key - privateKeySecretRef: - name: letsencrypt-staging - http01: {} ---- -apiVersion: certmanager.k8s.io/v1alpha1 -kind: ClusterIssuer -metadata: - name: letsencrypt - namespace: {{ .Release.Namespace }} - labels: - app: certmanager - chart: {{ template "certmanager.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - acme: - server: https://acme-v02.api.letsencrypt.org/directory - email: {{ .Values.email }} - privateKeySecretRef: - name: letsencrypt - http01: {} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/certmanager/templates/poddisruptionbudget.yaml b/kubernetes/helm_charts/istio-system/istio/charts/certmanager/templates/poddisruptionbudget.yaml deleted file mode 100755 index b251e3653..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/certmanager/templates/poddisruptionbudget.yaml +++ /dev/null @@ -1,24 +0,0 @@ -{{- if .Values.global.defaultPodDisruptionBudget.enabled }} -apiVersion: policy/v1beta1 -kind: PodDisruptionBudget -metadata: - name: certmanager - namespace: {{ .Release.Namespace }} - labels: - app: certmanager - chart: {{ template "certmanager.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - version: {{ .Chart.Version }} - {{- if .Values.podLabels }} -{{ toYaml .Values.podLabels | indent 4 }} - {{- end }} -spec: -{{- if .Values.global.defaultPodDisruptionBudget.enabled }} -{{ include "podDisruptionBudget.spec" .Values.global.defaultPodDisruptionBudget }} -{{- end }} - selector: - matchLabels: - app: certmanager - release: {{ .Release.Name }} -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/certmanager/templates/rbac.yaml b/kubernetes/helm_charts/istio-system/istio/charts/certmanager/templates/rbac.yaml deleted file mode 100755 index b3a4ef340..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/certmanager/templates/rbac.yaml +++ /dev/null @@ -1,37 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: certmanager - labels: - app: certmanager - chart: {{ template "certmanager.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -rules: - - apiGroups: ["certmanager.k8s.io"] - resources: ["certificates", "certificates/finalizers", "issuers", "clusterissuers", "orders", "orders/finalizers", "challenges"] - verbs: ["*"] - - apiGroups: [""] - resources: ["configmaps", "secrets", "events", "services", "pods"] - verbs: ["*"] - - apiGroups: ["extensions"] - resources: ["ingresses"] - verbs: ["*"] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: certmanager - labels: - app: certmanager - chart: {{ template "certmanager.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: certmanager -subjects: - - name: certmanager - namespace: {{ .Release.Namespace }} - kind: ServiceAccount diff --git a/kubernetes/helm_charts/istio-system/istio/charts/certmanager/templates/serviceaccount.yaml b/kubernetes/helm_charts/istio-system/istio/charts/certmanager/templates/serviceaccount.yaml deleted file mode 100755 index f87543508..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/certmanager/templates/serviceaccount.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -{{- if .Values.global.imagePullSecrets }} -imagePullSecrets: -{{- range .Values.global.imagePullSecrets }} - - name: {{ . }} -{{- end }} -{{- end }} -metadata: - name: certmanager - namespace: {{ .Release.Namespace }} - labels: - app: certmanager - chart: {{ template "certmanager.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/certmanager/values.yaml b/kubernetes/helm_charts/istio-system/istio/charts/certmanager/values.yaml deleted file mode 100755 index 775cbeb1e..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/certmanager/values.yaml +++ /dev/null @@ -1,34 +0,0 @@ -# Certmanager uses ACME to sign certificates. Since Istio gateways are -# mounting the TLS secrets the Certificate CRDs must be created in the -# istio-system namespace. Once the certificate has been created, the -# gateway must be updated by adding 'secretVolumes'. After the gateway -# restart, DestinationRules can be created using the ACME-signed certificates. -enabled: false -replicaCount: 1 -hub: quay.io/jetstack -image: cert-manager-controller -tag: v0.6.2 -resources: {} -nodeSelector: {} -tolerations: [] - -# Specify the pod anti-affinity that allows you to constrain which nodes -# your pod is eligible to be scheduled based on labels on pods that are -# already running on the node rather than based on labels on nodes. -# There are currently two types of anti-affinity: -# "requiredDuringSchedulingIgnoredDuringExecution" -# "preferredDuringSchedulingIgnoredDuringExecution" -# which denote "hard" vs. "soft" requirements, you can define your values -# in "podAntiAffinityLabelSelector" and "podAntiAffinityTermLabelSelector" -# correspondingly. -# For example: -# podAntiAffinityLabelSelector: -# - key: security -# operator: In -# values: S1,S2 -# topologyKey: "kubernetes.io/hostname" -# This pod anti-affinity rule says that the pod requires not to be scheduled -# onto a node if that node is already running a pod with label having key -# "security" and value "S1". -podAntiAffinityLabelSelector: [] -podAntiAffinityTermLabelSelector: [] diff --git a/kubernetes/helm_charts/istio-system/istio/charts/galley/Chart.yaml b/kubernetes/helm_charts/istio-system/istio/charts/galley/Chart.yaml deleted file mode 100755 index 68f0a5c1b..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/galley/Chart.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -appVersion: 1.3.3 -description: Helm chart for galley deployment -engine: gotpl -icon: https://istio.io/favicons/android-192x192.png -keywords: -- istio -- galley -name: galley -sources: -- http://github.com/istio/istio -tillerVersion: '>=2.7.2' -version: 1.3.3 diff --git a/kubernetes/helm_charts/istio-system/istio/charts/galley/templates/_helpers.tpl b/kubernetes/helm_charts/istio-system/istio/charts/galley/templates/_helpers.tpl deleted file mode 100755 index 5d42f4a03..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/galley/templates/_helpers.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "galley.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "galley.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "galley.chart" -}} -{{- .Chart.Name | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/galley/templates/clusterrole.yaml b/kubernetes/helm_charts/istio-system/istio/charts/galley/templates/clusterrole.yaml deleted file mode 100755 index 8abc797ac..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/galley/templates/clusterrole.yaml +++ /dev/null @@ -1,42 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: istio-galley-{{ .Release.Namespace }} - labels: - app: {{ template "galley.name" . }} - chart: {{ template "galley.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -rules: -- apiGroups: ["admissionregistration.k8s.io"] - resources: ["validatingwebhookconfigurations"] - verbs: ["*"] -- apiGroups: ["config.istio.io"] # istio mixer CRD watcher - resources: ["*"] - verbs: ["get", "list", "watch"] -- apiGroups: ["networking.istio.io"] - resources: ["*"] - verbs: ["get", "list", "watch"] -- apiGroups: ["authentication.istio.io"] - resources: ["*"] - verbs: ["get", "list", "watch"] -- apiGroups: ["rbac.istio.io"] - resources: ["*"] - verbs: ["get", "list", "watch"] -- apiGroups: ["extensions","apps"] - resources: ["deployments"] - resourceNames: ["istio-galley"] - verbs: ["get"] -- apiGroups: [""] - resources: ["pods", "nodes", "services", "endpoints", "namespaces"] - verbs: ["get", "list", "watch"] -- apiGroups: ["extensions"] - resources: ["ingresses"] - verbs: ["get", "list", "watch"] -- apiGroups: ["extensions"] - resources: ["deployments/finalizers"] - resourceNames: ["istio-galley"] - verbs: ["update"] -- apiGroups: ["apiextensions.k8s.io"] - resources: ["customresourcedefinitions"] - verbs: ["get", "list", "watch"] diff --git a/kubernetes/helm_charts/istio-system/istio/charts/galley/templates/clusterrolebinding.yaml b/kubernetes/helm_charts/istio-system/istio/charts/galley/templates/clusterrolebinding.yaml deleted file mode 100755 index 88cde2554..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/galley/templates/clusterrolebinding.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: istio-galley-admin-role-binding-{{ .Release.Namespace }} - labels: - app: {{ template "galley.name" . }} - chart: {{ template "galley.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: istio-galley-{{ .Release.Namespace }} -subjects: - - kind: ServiceAccount - name: istio-galley-service-account - namespace: {{ .Release.Namespace }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/galley/templates/configmap.yaml b/kubernetes/helm_charts/istio-system/istio/charts/galley/templates/configmap.yaml deleted file mode 100755 index 662c960b1..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/galley/templates/configmap.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: istio-galley-configuration - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "galley.name" . }} - chart: {{ template "galley.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - istio: galley -data: -{{- if .Values.global.configValidation }} - validatingwebhookconfiguration.yaml: |- - {{- include "validatingwebhookconfiguration.yaml.tpl" . | indent 4}} -{{- end}} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/galley/templates/deployment.yaml b/kubernetes/helm_charts/istio-system/istio/charts/galley/templates/deployment.yaml deleted file mode 100755 index af417ee8e..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/galley/templates/deployment.yaml +++ /dev/null @@ -1,127 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: istio-galley - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "galley.name" . }} - chart: {{ template "galley.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - istio: galley -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - istio: galley - strategy: - rollingUpdate: - maxSurge: {{ .Values.rollingMaxSurge }} - maxUnavailable: {{ .Values.rollingMaxUnavailable }} - template: - metadata: - labels: - app: {{ template "galley.name" . }} - chart: {{ template "galley.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - istio: galley - annotations: - sidecar.istio.io/inject: "false" - spec: - serviceAccountName: istio-galley-service-account -{{- if .Values.global.priorityClassName }} - priorityClassName: "{{ .Values.global.priorityClassName }}" -{{- end }} - containers: - - name: galley -{{- if contains "/" .Values.image }} - image: "{{ .Values.image }}" -{{- else }} - image: "{{ .Values.global.hub }}/{{ .Values.image }}:{{ .Values.global.tag }}" -{{- end }} - imagePullPolicy: {{ .Values.global.imagePullPolicy }} - ports: - - containerPort: 443 - - containerPort: {{ .Values.global.monitoringPort }} - - containerPort: 9901 - command: - - /usr/local/bin/galley - - server - - --meshConfigFile=/etc/mesh-config/mesh - - --livenessProbeInterval=1s - - --livenessProbePath=/healthliveness - - --readinessProbePath=/healthready - - --readinessProbeInterval=1s - - --deployment-namespace={{ .Release.Namespace }} -{{- if $.Values.global.controlPlaneSecurityEnabled}} - - --insecure=false -{{- else }} - - --insecure=true -{{- end }} -{{- if not $.Values.global.useMCP }} - - --enable-server=false -{{- end }} -{{- if not $.Values.global.configValidation }} - - --enable-validation=false -{{- end }} - - --validation-webhook-config-file - - /etc/config/validatingwebhookconfiguration.yaml - - --monitoringPort={{ .Values.global.monitoringPort }} -{{- if $.Values.global.logging.level }} - - --log_output_level={{ $.Values.global.logging.level }} -{{- end}} - volumeMounts: - - name: certs - mountPath: /etc/certs - readOnly: true - - name: config - mountPath: /etc/config - readOnly: true - - name: mesh-config - mountPath: /etc/mesh-config - readOnly: true - livenessProbe: - exec: - command: - - /usr/local/bin/galley - - probe - - --probe-path=/healthliveness - - --interval=10s - initialDelaySeconds: 5 - periodSeconds: 5 - readinessProbe: - exec: - command: - - /usr/local/bin/galley - - probe - - --probe-path=/healthready - - --interval=10s - initialDelaySeconds: 5 - periodSeconds: 5 - resources: -{{- if .Values.resources }} -{{ toYaml .Values.resources | indent 12 }} -{{- else }} -{{ toYaml .Values.global.defaultResources | indent 12 }} -{{- end }} - volumes: - - name: certs - secret: - secretName: istio.istio-galley-service-account - - name: config - configMap: - name: istio-galley-configuration - - name: mesh-config - configMap: - name: istio - affinity: - {{- include "nodeaffinity" . | indent 6 }} - {{- include "podAntiAffinity" . | indent 6 }} - {{- if .Values.tolerations }} - tolerations: -{{ toYaml .Values.tolerations | indent 6 }} - {{- else if .Values.global.defaultTolerations }} - tolerations: -{{ toYaml .Values.global.defaultTolerations | indent 6 }} - {{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/galley/templates/poddisruptionbudget.yaml b/kubernetes/helm_charts/istio-system/istio/charts/galley/templates/poddisruptionbudget.yaml deleted file mode 100755 index 75bf77834..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/galley/templates/poddisruptionbudget.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{- if .Values.global.defaultPodDisruptionBudget.enabled }} -apiVersion: policy/v1beta1 -kind: PodDisruptionBudget -metadata: - name: istio-galley - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "galley.name" . }} - chart: {{ template "galley.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - istio: galley -spec: -{{- if .Values.global.defaultPodDisruptionBudget.enabled }} -{{ include "podDisruptionBudget.spec" .Values.global.defaultPodDisruptionBudget }} -{{- end }} - selector: - matchLabels: - app: {{ template "galley.name" . }} - release: {{ .Release.Name }} - istio: galley -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/galley/templates/service.yaml b/kubernetes/helm_charts/istio-system/istio/charts/galley/templates/service.yaml deleted file mode 100755 index cd21fd192..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/galley/templates/service.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: istio-galley - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "galley.name" . }} - chart: {{ template "galley.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - istio: galley -spec: - ports: - - port: 443 - name: https-validation - - port: {{ .Values.global.monitoringPort }} - name: http-monitoring - - port: 9901 - name: grpc-mcp - selector: - istio: galley diff --git a/kubernetes/helm_charts/istio-system/istio/charts/galley/templates/serviceaccount.yaml b/kubernetes/helm_charts/istio-system/istio/charts/galley/templates/serviceaccount.yaml deleted file mode 100755 index 1ff54c49e..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/galley/templates/serviceaccount.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -{{- if .Values.global.imagePullSecrets }} -imagePullSecrets: -{{- range .Values.global.imagePullSecrets }} - - name: {{ . }} -{{- end }} -{{- end }} -metadata: - name: istio-galley-service-account - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "galley.name" . }} - chart: {{ template "galley.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/galley/templates/validatingwebhookconfiguration.yaml.tpl b/kubernetes/helm_charts/istio-system/istio/charts/galley/templates/validatingwebhookconfiguration.yaml.tpl deleted file mode 100755 index ce68fb8a5..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/galley/templates/validatingwebhookconfiguration.yaml.tpl +++ /dev/null @@ -1,118 +0,0 @@ -{{ define "validatingwebhookconfiguration.yaml.tpl" }} -apiVersion: admissionregistration.k8s.io/v1beta1 -kind: ValidatingWebhookConfiguration -metadata: - name: istio-galley - labels: - app: {{ template "galley.name" . }} - chart: {{ template "galley.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - istio: galley -webhooks: - - name: pilot.validation.istio.io - clientConfig: - service: - name: istio-galley - namespace: {{ .Release.Namespace }} - path: "/admitpilot" - caBundle: "" - rules: - - operations: - - CREATE - - UPDATE - apiGroups: - - config.istio.io - apiVersions: - - v1alpha2 - resources: - - httpapispecs - - httpapispecbindings - - quotaspecs - - quotaspecbindings - - operations: - - CREATE - - UPDATE - apiGroups: - - rbac.istio.io - apiVersions: - - "*" - resources: - - "*" - - operations: - - CREATE - - UPDATE - apiGroups: - - authentication.istio.io - apiVersions: - - "*" - resources: - - "*" - - operations: - - CREATE - - UPDATE - apiGroups: - - networking.istio.io - apiVersions: - - "*" - resources: - - destinationrules - - envoyfilters - - gateways - - serviceentries - - sidecars - - virtualservices - failurePolicy: Fail - sideEffects: None - - name: mixer.validation.istio.io - clientConfig: - service: - name: istio-galley - namespace: {{ .Release.Namespace }} - path: "/admitmixer" - caBundle: "" - rules: - - operations: - - CREATE - - UPDATE - apiGroups: - - config.istio.io - apiVersions: - - v1alpha2 - resources: - - rules - - attributemanifests - - circonuses - - deniers - - fluentds - - kubernetesenvs - - listcheckers - - memquotas - - noops - - opas - - prometheuses - - rbacs - - solarwindses - - stackdrivers - - cloudwatches - - dogstatsds - - statsds - - stdios - - apikeys - - authorizations - - checknothings - # - kuberneteses - - listentries - - logentries - - metrics - - quotas - - reportnothings - - tracespans - - adapters - - handlers - - instances - - templates - - zipkins - failurePolicy: Fail - sideEffects: None -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/galley/values.yaml b/kubernetes/helm_charts/istio-system/istio/charts/galley/values.yaml deleted file mode 100755 index a1d3a8e77..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/galley/values.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# -# galley configuration -# -enabled: true -replicaCount: 1 -rollingMaxSurge: 100% -rollingMaxUnavailable: 25% -image: galley -nodeSelector: {} -tolerations: [] - -# Specify the pod anti-affinity that allows you to constrain which nodes -# your pod is eligible to be scheduled based on labels on pods that are -# already running on the node rather than based on labels on nodes. -# There are currently two types of anti-affinity: -# "requiredDuringSchedulingIgnoredDuringExecution" -# "preferredDuringSchedulingIgnoredDuringExecution" -# which denote "hard" vs. "soft" requirements, you can define your values -# in "podAntiAffinityLabelSelector" and "podAntiAffinityTermLabelSelector" -# correspondingly. -# For example: -# podAntiAffinityLabelSelector: -# - key: security -# operator: In -# values: S1,S2 -# topologyKey: "kubernetes.io/hostname" -# This pod anti-affinity rule says that the pod requires not to be scheduled -# onto a node if that node is already running a pod with label having key -# "security" and value "S1". -podAntiAffinityLabelSelector: [] -podAntiAffinityTermLabelSelector: [] diff --git a/kubernetes/helm_charts/istio-system/istio/charts/gateways/Chart.yaml b/kubernetes/helm_charts/istio-system/istio/charts/gateways/Chart.yaml deleted file mode 100755 index b49a15330..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/gateways/Chart.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -appVersion: 1.3.3 -description: Helm chart for deploying Istio gateways -engine: gotpl -icon: https://istio.io/favicons/android-192x192.png -keywords: -- istio -- ingressgateway -- egressgateway -- gateways -name: gateways -sources: -- http://github.com/istio/istio -tillerVersion: '>=2.7.2' -version: 1.3.3 diff --git a/kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/_affinity.tpl b/kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/_affinity.tpl deleted file mode 100755 index fbd0e9a8f..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/_affinity.tpl +++ /dev/null @@ -1,93 +0,0 @@ -{{/* affinity - https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ */}} - -{{- define "gatewaynodeaffinity" }} - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - {{- include "gatewayNodeAffinityRequiredDuringScheduling" . }} - preferredDuringSchedulingIgnoredDuringExecution: - {{- include "gatewayNodeAffinityPreferredDuringScheduling" . }} -{{- end }} - -{{- define "gatewayNodeAffinityRequiredDuringScheduling" }} - nodeSelectorTerms: - - matchExpressions: - - key: beta.kubernetes.io/arch - operator: In - values: - {{- range $key, $val := .root.Values.global.arch }} - {{- if gt ($val | int) 0 }} - - {{ $key | quote }} - {{- end }} - {{- end }} - {{- $nodeSelector := default .root.Values.global.defaultNodeSelector .nodeSelector -}} - {{- range $key, $val := $nodeSelector }} - - key: {{ $key }} - operator: In - values: - - {{ $val | quote }} - {{- end }} -{{- end }} - -{{- define "gatewayNodeAffinityPreferredDuringScheduling" }} - {{- range $key, $val := .root.Values.global.arch }} - {{- if gt ($val | int) 0 }} - - weight: {{ $val | int }} - preference: - matchExpressions: - - key: beta.kubernetes.io/arch - operator: In - values: - - {{ $key | quote }} - {{- end }} - {{- end }} -{{- end }} - -{{- define "gatewaypodAntiAffinity" }} -{{- if or .podAntiAffinityLabelSelector .podAntiAffinityTermLabelSelector}} - podAntiAffinity: - {{- if .podAntiAffinityLabelSelector }} - requiredDuringSchedulingIgnoredDuringExecution: - {{- include "gatewaypodAntiAffinityRequiredDuringScheduling" . }} - {{- end }} - {{- if .podAntiAffinityTermLabelSelector }} - preferredDuringSchedulingIgnoredDuringExecution: - {{- include "gatewaypodAntiAffinityPreferredDuringScheduling" . }} - {{- end }} -{{- end }} -{{- end }} - -{{- define "gatewaypodAntiAffinityRequiredDuringScheduling" }} - {{- range $index, $item := .podAntiAffinityLabelSelector }} - - labelSelector: - matchExpressions: - - key: {{ $item.key }} - operator: {{ $item.operator }} - {{- if $item.values }} - values: - {{- $vals := split "," $item.values }} - {{- range $i, $v := $vals }} - - {{ $v | quote }} - {{- end }} - {{- end }} - topologyKey: {{ $item.topologyKey }} - {{- end }} -{{- end }} - -{{- define "gatewaypodAntiAffinityPreferredDuringScheduling" }} - {{- range $index, $item := .podAntiAffinityTermLabelSelector }} - - podAffinityTerm: - labelSelector: - matchExpressions: - - key: {{ $item.key }} - operator: {{ $item.operator }} - {{- if $item.values }} - values: - {{- $vals := split "," $item.values }} - {{- range $i, $v := $vals }} - - {{ $v | quote }} - {{- end }} - {{- end }} - topologyKey: {{ $item.topologyKey }} - weight: 100 - {{- end }} -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/_helpers.tpl b/kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/_helpers.tpl deleted file mode 100755 index bfc8bc400..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/_helpers.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "gateway.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "gateway.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "gateway.chart" -}} -{{- .Chart.Name | trunc 63 | trimSuffix "-" -}} -{{- end -}} 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 deleted file mode 100755 index 2455ac345..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/autoscale.yaml +++ /dev/null @@ -1,31 +0,0 @@ -{{- range $key, $spec := .Values }} -{{- if ne $key "enabled" }} -{{- if and $spec.enabled $spec.autoscaleEnabled $spec.autoscaleMin $spec.autoscaleMax }} -apiVersion: autoscaling/v2beta1 -kind: HorizontalPodAutoscaler -metadata: - name: {{ $key }} - namespace: {{ $spec.namespace | default $.Release.Namespace }} - labels: - chart: {{ template "gateway.chart" $ }} - heritage: {{ $.Release.Service }} - release: {{ $.Release.Name }} - {{- range $key, $val := $spec.labels }} - {{ $key }}: {{ $val }} - {{- end }} -spec: - maxReplicas: {{ $spec.autoscaleMax }} - minReplicas: {{ $spec.autoscaleMin }} - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ $key }} - metrics: - - type: Resource - resource: - name: cpu - targetAverageUtilization: {{ $spec.cpu.targetAverageUtilization }} ---- -{{- end }} -{{- end }} -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/deployment.yaml b/kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/deployment.yaml deleted file mode 100755 index 4dcdef778..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/deployment.yaml +++ /dev/null @@ -1,330 +0,0 @@ -{{- range $key, $spec := .Values }} -{{- if ne $key "enabled" }} -{{- if $spec.enabled }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ $key }} - namespace: {{ $spec.namespace | default $.Release.Namespace }} - labels: - chart: {{ template "gateway.chart" $ }} - heritage: {{ $.Release.Service }} - release: {{ $.Release.Name }} - {{- range $key, $val := $spec.labels }} - {{ $key }}: {{ $val }} - {{- end }} -spec: -{{- if not $spec.autoscaleEnabled }} -{{- if $spec.replicaCount }} - replicas: {{ $spec.replicaCount }} -{{- else }} - replicas: 1 -{{- end }} -{{- end }} - selector: - matchLabels: - {{- range $key, $val := $spec.labels }} - {{ $key }}: {{ $val }} - {{- end }} - strategy: - rollingUpdate: - maxSurge: {{ $spec.rollingMaxSurge }} - maxUnavailable: {{ $spec.rollingMaxUnavailable }} - template: - metadata: - labels: - chart: {{ template "gateway.chart" $ }} - heritage: {{ $.Release.Service }} - release: {{ $.Release.Name }} - {{- range $key, $val := $spec.labels }} - {{ $key }}: {{ $val }} - {{- end }} - annotations: - sidecar.istio.io/inject: "false" -{{- if $spec.podAnnotations }} -{{ toYaml $spec.podAnnotations | indent 8 }} -{{ end }} - spec: - serviceAccountName: {{ $key }}-service-account -{{- if $.Values.global.priorityClassName }} - priorityClassName: "{{ $.Values.global.priorityClassName }}" -{{- end }} -{{- if $.Values.global.proxy.enableCoreDump }} - initContainers: - - name: enable-core-dump - image: {{ $.Values.global.proxy.enableCoreDumpImage }} - imagePullPolicy: {{ $.Values.global.imagePullPolicy }} - command: - - /bin/sh - args: - - -c - - sysctl -w kernel.core_pattern=/var/lib/istio/core.proxy && ulimit -c unlimited - securityContext: - privileged: true -{{- end }} - containers: -{{- if $spec.sds }} -{{- if $spec.sds.enabled }} - - name: ingress-sds -{{- if contains "/" $spec.sds.image }} - image: "{{ $spec.sds.image }}" -{{- else }} - image: "{{ $.Values.global.hub }}/{{ $spec.sds.image }}:{{ $.Values.global.tag }}" -{{- end }} - imagePullPolicy: {{ $.Values.global.imagePullPolicy }} - resources: -{{- if $spec.sds.resources }} -{{ toYaml $spec.sds.resources | indent 12 }} -{{- else }} -{{ toYaml $.Values.global.defaultResources | indent 12 }} -{{- end }} - env: - - name: "ENABLE_WORKLOAD_SDS" - value: "false" - - name: "ENABLE_INGRESS_GATEWAY_SDS" - value: "true" - - name: "INGRESS_GATEWAY_NAMESPACE" - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - volumeMounts: - - name: ingressgatewaysdsudspath - mountPath: /var/run/ingress_gateway -{{- end }} -{{- end }} - - name: istio-proxy -{{- if contains "/" $.Values.global.proxy.image }} - image: "{{ $.Values.global.proxy.image }}" -{{- else }} - image: "{{ $.Values.global.hub }}/{{ $.Values.global.proxy.image }}:{{ $.Values.global.tag }}" -{{- end }} - imagePullPolicy: {{ $.Values.global.imagePullPolicy }} - ports: - {{- range $key, $val := $spec.ports }} - - containerPort: {{ $val.port }} - {{- end }} - - containerPort: 15090 - protocol: TCP - name: http-envoy-prom - args: - - proxy - - router - - --domain - - $(POD_NAMESPACE).svc.{{ $.Values.global.proxy.clusterDomain }} - {{- if $.Values.global.proxy.logLevel }} - - --proxyLogLevel={{ $.Values.global.proxy.logLevel }} - {{- end}} - {{- if $.Values.global.proxy.componentLogLevel }} - - --proxyComponentLogLevel={{ $.Values.global.proxy.componentLogLevel }} - {{- end}} - {{- if $.Values.global.logging.level }} - - --log_output_level={{ $.Values.global.logging.level }} - {{- end}} - - --drainDuration - - '45s' #drainDuration - - --parentShutdownDuration - - '1m0s' #parentShutdownDuration - - --connectTimeout - - '10s' #connectTimeout - - --serviceCluster - - {{ $key }} - - --zipkinAddress - {{- if $.Values.global.tracer.zipkin.address }} - - {{ $.Values.global.tracer.zipkin.address }} - {{- else if $.Values.global.istioNamespace }} - - zipkin.{{ $.Values.global.istioNamespace }}:9411 - {{- else }} - - zipkin:9411 - {{- end }} - {{- if $.Values.global.proxy.envoyStatsd.enabled }} - - --statsdUdpAddress - - {{ $.Values.global.proxy.envoyStatsd.host }}:{{ $.Values.global.proxy.envoyStatsd.port }} - {{- end }} - {{- if $.Values.global.proxy.envoyMetricsService.enabled }} - - --envoyMetricsServiceAddress - - {{ $.Values.global.proxy.envoyMetricsService.host }}:{{ $.Values.global.proxy.envoyMetricsService.port }} - {{- end }} - {{- if $.Values.global.proxy.envoyAccessLogService.enabled }} - - --envoyAccessLogService - {{- with $.Values.global.proxy.envoyAccessLogService }} - - '{"address":"{{ .host }}:{{.port }}"{{ if .tlsSettings }},"tlsSettings":{{ .tlsSettings | toJson }}{{- end }}{{ if .tcpKeepalive }},"tcpKeepalive":{{ .tcpKeepalive | toJson }}{{- end }}}' - {{- end }} - {{- end }} - - --proxyAdminPort - - "15000" - - --statusPort - - "15020" - {{- if $.Values.global.controlPlaneSecurityEnabled }} - - --controlPlaneAuthPolicy - - MUTUAL_TLS - - --discoveryAddress - {{- if $.Values.global.istioNamespace }} - - istio-pilot.{{ $.Values.global.istioNamespace }}:15011 - {{- else }} - - istio-pilot:15011 - {{- end }} - {{- else }} - - --controlPlaneAuthPolicy - - NONE - - --discoveryAddress - {{- if $.Values.global.istioNamespace }} - - istio-pilot.{{ $.Values.global.istioNamespace }}:15010 - {{- else }} - - istio-pilot:15010 - {{- end }} - {{- if $spec.applicationPorts }} - - --applicationPorts - - "{{ $spec.applicationPorts }}" - {{- end }} - {{- end }} - {{- if $.Values.global.trustDomain }} - - --trust-domain={{ $.Values.global.trustDomain }} - {{- end }} - readinessProbe: - failureThreshold: 30 - httpGet: - path: /healthz/ready - port: 15020 - scheme: HTTP - initialDelaySeconds: 1 - periodSeconds: 2 - successThreshold: 1 - timeoutSeconds: 1 - resources: -{{- if $spec.resources }} -{{ toYaml $spec.resources | indent 12 }} -{{- else }} -{{ toYaml $.Values.global.defaultResources | indent 12 }} -{{- end }} - env: - - name: NODE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: spec.nodeName - - name: POD_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.name - - name: POD_NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - - name: INSTANCE_IP - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: status.podIP - - name: HOST_IP - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: status.hostIP - - name: SERVICE_ACCOUNT - valueFrom: - fieldRef: - fieldPath: spec.serviceAccountName - - name: ISTIO_META_POD_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.name - - name: ISTIO_META_CONFIG_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: SDS_ENABLED - value: "{{ $.Values.global.sds.enabled }}" - - name: ISTIO_META_WORKLOAD_NAME - value: {{ $key }} - - name: ISTIO_META_OWNER - value: kubernetes://api/apps/v1/namespaces/{{ $spec.namespace | default $.Release.Namespace }}/deployments/{{ $key }} - {{- if $spec.sds }} - {{- if $spec.sds.enabled }} - - name: ISTIO_META_USER_SDS - value: "true" - {{- end }} - {{- end }} - {{- if $spec.env }} - {{- range $key, $val := $spec.env }} - - name: {{ $key }} - value: {{ $val }} - {{- end }} - {{- end }} - volumeMounts: - {{- if $.Values.global.sds.enabled }} - - name: sdsudspath - mountPath: /var/run/sds - readOnly: true - - name: istio-token - mountPath: /var/run/secrets/tokens - {{- end }} - {{- if $spec.sds }} - {{- if $spec.sds.enabled }} - - name: ingressgatewaysdsudspath - mountPath: /var/run/ingress_gateway - {{- end }} - {{- end }} - - name: istio-certs - mountPath: /etc/certs - readOnly: true - {{- range $spec.secretVolumes }} - - name: {{ .name }} - mountPath: {{ .mountPath | quote }} - readOnly: true - {{- end }} -{{- if $spec.additionalContainers }} -{{ toYaml $spec.additionalContainers | indent 8 }} -{{- end }} - volumes: - {{- if $spec.sds }} - {{- if $spec.sds.enabled }} - - name: ingressgatewaysdsudspath - emptyDir: {} - {{- end }} - {{- end }} - {{- if $.Values.global.sds.enabled }} - - name: sdsudspath - hostPath: - path: /var/run/sds - - name: istio-token - projected: - sources: - - serviceAccountToken: - path: istio-token - expirationSeconds: 43200 - audience: {{ $.Values.global.sds.token.aud }} - {{- end }} - - name: istio-certs - secret: - secretName: istio.{{ $key }}-service-account - optional: true - {{- range $spec.secretVolumes }} - - name: {{ .name }} - secret: - secretName: {{ .secretName | quote }} - optional: true - {{- end }} - {{- range $spec.configVolumes }} - - name: {{ .name }} - configMap: - name: {{ .configMapName | quote }} - optional: true - {{- end }} - affinity: - {{- include "gatewaynodeaffinity" (dict "root" $ "nodeSelector" $spec.nodeSelector) | indent 6 }} - {{- include "gatewaypodAntiAffinity" (dict "podAntiAffinityLabelSelector" $spec.podAntiAffinityLabelSelector "podAntiAffinityTermLabelSelector" $spec.podAntiAffinityTermLabelSelector) | indent 6 }} - {{- if $spec.tolerations }} - tolerations: -{{ toYaml $spec.tolerations | indent 6 }} - {{- else if $.Values.global.defaultTolerations }} - tolerations: -{{ toYaml $.Values.global.defaultTolerations | indent 6 }} - {{- end }} ---- -{{- end }} -{{- end }} -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/poddisruptionbudget.yaml b/kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/poddisruptionbudget.yaml deleted file mode 100755 index 36a2d5a9c..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/poddisruptionbudget.yaml +++ /dev/null @@ -1,31 +0,0 @@ -{{- range $key, $spec := .Values }} -{{- if and (ne $key "enabled") }} -{{- if $spec.enabled }} -{{- if $.Values.global.defaultPodDisruptionBudget.enabled }} -apiVersion: policy/v1beta1 -kind: PodDisruptionBudget -metadata: - name: {{ $key }} - namespace: {{ $spec.namespace | default $.Release.Namespace }} - labels: - chart: {{ template "gateway.chart" $ }} - heritage: {{ $.Release.Service }} - release: {{ $.Release.Name }} - {{- range $key, $val := $spec.labels }} - {{ $key }}: {{ $val }} - {{- end }} -spec: -{{- if $.Values.global.defaultPodDisruptionBudget.enabled }} -{{ include "podDisruptionBudget.spec" $.Values.global.defaultPodDisruptionBudget }} -{{- end }} - selector: - matchLabels: - release: {{ $.Release.Name }} - {{- range $key, $val := $spec.labels }} - {{ $key }}: {{ $val }} - {{- end }} ---- -{{- end }} -{{- end }} -{{- end }} -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/preconfigured.yaml b/kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/preconfigured.yaml deleted file mode 100755 index 8d3dee930..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/preconfigured.yaml +++ /dev/null @@ -1,239 +0,0 @@ -{{- if .Values.global.k8sIngress.enabled }} -apiVersion: networking.istio.io/v1alpha3 -kind: Gateway -metadata: - name: istio-autogenerated-k8s-ingress - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "gateway.name" . }} - chart: {{ template "gateway.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - selector: - istio: {{ .Values.global.k8sIngress.gatewayName }} - servers: - - port: - number: 80 - protocol: HTTP2 - name: http - hosts: - - "*" -{{ if .Values.global.k8sIngress.enableHttps }} - - port: - number: 443 - protocol: HTTPS - name: https-default - tls: - mode: SIMPLE - serverCertificate: /etc/istio/ingress-certs/tls.crt - privateKey: /etc/istio/ingress-certs/tls.key - hosts: - - "*" -{{ end }} ---- -{{ end }} - -{{- if .Values.global.meshExpansion.enabled }} -{{- if .Values.global.meshExpansion.useILB }} -apiVersion: networking.istio.io/v1alpha3 -kind: Gateway -metadata: - name: meshexpansion-ilb-gateway - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "gateway.name" . }} - chart: {{ template "gateway.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - selector: - istio: ilbgateway - servers: - - port: - number: 15011 - protocol: TCP - name: tcp-pilot - hosts: - - "*" - - port: - number: 8060 - protocol: TCP - name: tcp-citadel - hosts: - - "*" - - port: - number: 15004 - name: tls-mixer - protocol: TLS - tls: - mode: AUTO_PASSTHROUGH - hosts: - - "*" ---- -{{- else }} -apiVersion: networking.istio.io/v1alpha3 -kind: Gateway -metadata: - name: meshexpansion-gateway - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "gateway.name" . }} - chart: {{ template "gateway.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - selector: - {{- range $key, $spec := .Values }} - {{- if eq $key "istio-ingressgateway" }} - {{- if $spec.enabled }} - {{- range $key, $val := $spec.labels }} - {{ $key }}: {{ $val }} - {{- end }} - {{- end }} - {{- end }} - {{- end }} - servers: - - port: - number: 15011 - protocol: TCP - name: tcp-pilot - hosts: - - "*" - - port: - number: 8060 - protocol: TCP - name: tcp-citadel - hosts: - - "*" - - port: - number: 15004 - name: tls-mixer - protocol: TLS - tls: - mode: AUTO_PASSTHROUGH - hosts: - - "*" ---- -{{- end }} -{{- end }} - -{{- if .Values.global.multiCluster.enabled }} -apiVersion: networking.istio.io/v1alpha3 -kind: Gateway -metadata: - name: istio-multicluster-egressgateway - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "gateway.name" . }} - chart: {{ template "gateway.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - selector: - {{- range $key, $spec := .Values }} - {{- if eq $key "istio-egressgateway" }} - {{- if $spec.enabled }} - {{- range $key, $val := $spec.labels }} - {{ $key }}: {{ $val }} - {{- end }} - {{- end }} - {{- end }} - {{- end }} - servers: - - hosts: - - "*.global" - port: - name: tls - number: 15443 - protocol: TLS - tls: - mode: AUTO_PASSTHROUGH ---- -apiVersion: networking.istio.io/v1alpha3 -kind: Gateway -metadata: - name: istio-multicluster-ingressgateway - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "gateway.name" . }} - chart: {{ template "gateway.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - selector: - {{- range $key, $spec := .Values }} - {{- if eq $key "istio-ingressgateway" }} - {{- if $spec.enabled }} - {{- range $key, $val := $spec.labels }} - {{ $key }}: {{ $val }} - {{- end }} - {{- end }} - {{- end }} - {{- end }} - servers: - - hosts: - - "*.global" - port: - name: tls - number: 15443 - protocol: TLS - tls: - mode: AUTO_PASSTHROUGH ---- -apiVersion: networking.istio.io/v1alpha3 -kind: EnvoyFilter -metadata: - name: istio-multicluster-ingressgateway - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "gateway.name" . }} - chart: {{ template "gateway.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - workloadLabels: - {{- range $key, $spec := .Values }} - {{- if eq $key "istio-ingressgateway" }} - {{- if $spec.enabled }} - {{- range $key, $val := $spec.labels }} - {{ $key }}: {{ $val }} - {{- end }} - {{- end }} - {{- end }} - {{- end }} - filters: - - listenerMatch: - portNumber: 15443 - listenerType: GATEWAY - insertPosition: - index: AFTER - relativeTo: envoy.filters.network.sni_cluster - filterName: envoy.filters.network.tcp_cluster_rewrite - filterType: NETWORK - filterConfig: - cluster_pattern: "\\.global$" - cluster_replacement: ".svc.{{ .Values.global.proxy.clusterDomain }}" ---- -## To ensure all traffic to *.global is using mTLS -apiVersion: networking.istio.io/v1alpha3 -kind: DestinationRule -metadata: - name: istio-multicluster-destinationrule - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "gateway.name" . }} - chart: {{ template "gateway.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - host: "*.global" - {{- if .Values.global.defaultConfigVisibilitySettings }} - exportTo: - - '*' - {{- end }} - trafficPolicy: - tls: - mode: ISTIO_MUTUAL ---- -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/role.yaml b/kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/role.yaml deleted file mode 100755 index 37bdf3ef8..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/role.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{- range $key, $spec := .Values }} -{{- if ne $key "enabled" }} -{{- if $spec.enabled }} -{{- if ($spec.sds) and (eq $spec.sds.enabled true) }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: {{ $key }}-sds - namespace: {{ $spec.namespace | default $.Release.Namespace }} -rules: -- apiGroups: [""] - resources: ["secrets"] - verbs: ["get", "watch", "list"] ---- -{{- end }} -{{- end }} -{{- end }} -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/rolebindings.yaml b/kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/rolebindings.yaml deleted file mode 100755 index cd3245b01..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/rolebindings.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- range $key, $spec := .Values }} -{{- if ne $key "enabled" }} -{{- if $spec.enabled }} -{{- if ($spec.sds) and (eq $spec.sds.enabled true) }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: {{ $key }}-sds - namespace: {{ $spec.namespace | default $.Release.Namespace }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ $key }}-sds -subjects: -- kind: ServiceAccount - name: {{ $key }}-service-account ---- -{{- end }} -{{- end }} -{{- end }} -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/service.yaml b/kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/service.yaml deleted file mode 100755 index 9474f0476..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/service.yaml +++ /dev/null @@ -1,59 +0,0 @@ -{{- range $key, $spec := .Values }} -{{- if ne $key "enabled" }} -{{- if $spec.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ $key }} - namespace: {{ $spec.namespace | default $.Release.Namespace }} - annotations: - {{- range $key, $val := $spec.serviceAnnotations }} - {{ $key }}: {{ $val | quote }} - {{- end }} - labels: - chart: {{ template "gateway.chart" $ }} - heritage: {{ $.Release.Service }} - release: {{ $.Release.Name }} - {{- range $key, $val := $spec.labels }} - {{ $key }}: {{ $val }} - {{- end }} -spec: -{{- if $spec.loadBalancerIP }} - loadBalancerIP: "{{ $spec.loadBalancerIP }}" -{{- end }} -{{- if $spec.loadBalancerSourceRanges }} - loadBalancerSourceRanges: -{{ toYaml $spec.loadBalancerSourceRanges | indent 4 }} -{{- end }} -{{- if $spec.externalTrafficPolicy }} - externalTrafficPolicy: {{$spec.externalTrafficPolicy }} -{{- end }} -{{- if $spec.externalIPs }} - externalIPs: -{{ toYaml $spec.externalIPs | indent 4 }} -{{- end }} - type: {{ .type }} - selector: - release: {{ $.Release.Name }} - {{- range $key, $val := $spec.labels }} - {{ $key }}: {{ $val }} - {{- end }} - ports: - {{- range $key, $val := $spec.ports }} - - - {{- range $pkey, $pval := $val }} - {{ $pkey}}: {{ $pval }} - {{- end }} - {{- end }} - {{- if $.Values.global.meshExpansion.enabled }} - {{- range $key, $val := $spec.meshExpansionPorts }} - - - {{- range $pkey, $pval := $val }} - {{ $pkey}}: {{ $pval }} - {{- end }} - {{- end }} - {{- end }} ---- -{{- end }} -{{- end }} -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/serviceaccount.yaml b/kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/serviceaccount.yaml deleted file mode 100755 index d4f6938c1..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/gateways/templates/serviceaccount.yaml +++ /dev/null @@ -1,24 +0,0 @@ -{{- range $key, $spec := .Values }} -{{- if ne $key "enabled" }} -{{- if $spec.enabled }} -apiVersion: v1 -kind: ServiceAccount -{{- if $.Values.global.imagePullSecrets }} -imagePullSecrets: -{{- range $.Values.global.imagePullSecrets }} - - name: {{ . }} -{{- end }} -{{- end }} -metadata: - name: {{ $key }}-service-account - namespace: {{ $spec.namespace | default $.Release.Namespace }} - labels: - app: {{ $spec.labels.app }} - chart: {{ template "gateway.chart" $ }} - heritage: {{ $.Release.Service }} - release: {{ $.Release.Name }} ---- -{{- end }} -{{- end }} -{{- end }} - diff --git a/kubernetes/helm_charts/istio-system/istio/charts/gateways/values.yaml b/kubernetes/helm_charts/istio-system/istio/charts/gateways/values.yaml deleted file mode 100755 index 2dc682af2..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/gateways/values.yaml +++ /dev/null @@ -1,287 +0,0 @@ -# -# Gateways Configuration -# By default (if enabled) a pair of Ingress and Egress Gateways will be created for the mesh. -# You can add more gateways in addition to the defaults but make sure those are uniquely named -# and that NodePorts are not conflicting. -# Disable specifc gateway by setting the `enabled` to false. -# -enabled: true - -istio-ingressgateway: - enabled: true - # - # Secret Discovery Service (SDS) configuration for ingress gateway. - # - sds: - # If true, ingress gateway fetches credentials from SDS server to handle TLS connections. - enabled: false - # SDS server that watches kubernetes secrets and provisions credentials to ingress gateway. - # This server runs in the same pod as ingress gateway. - image: node-agent-k8s - resources: - requests: - cpu: 100m - memory: 128Mi - limits: - cpu: 2000m - memory: 1024Mi - - labels: - app: istio-ingressgateway - istio: ingressgateway - autoscaleEnabled: true - autoscaleMin: 1 - autoscaleMax: 5 - # specify replicaCount when autoscaleEnabled: false - # replicaCount: 1 - rollingMaxSurge: 100% - rollingMaxUnavailable: 25% - resources: - requests: - cpu: 100m - memory: 128Mi - limits: - cpu: 2000m - memory: 1024Mi - cpu: - targetAverageUtilization: 80 - loadBalancerIP: "" - loadBalancerSourceRanges: [] - externalIPs: [] - serviceAnnotations: {} - podAnnotations: {} - type: LoadBalancer #change to NodePort, ClusterIP or LoadBalancer if need be - #externalTrafficPolicy: Local #change to Local to preserve source IP or Cluster for default behaviour or leave commented out - ports: - ## You can add custom gateway ports - # Note that AWS ELB will by default perform health checks on the first port - # on this list. Setting this to the health check port will ensure that health - # checks always work. https://github.com/istio/istio/issues/12503 - - port: 15020 - targetPort: 15020 - name: status-port - - port: 80 - targetPort: 80 - name: http2 - nodePort: 31380 - - port: 443 - name: https - nodePort: 31390 - # Example of a port to add. Remove if not needed - - port: 31400 - name: tcp - nodePort: 31400 - ### PORTS FOR UI/metrics ##### - ## Disable if not needed - - port: 15029 - targetPort: 15029 - name: https-kiali - - port: 15030 - targetPort: 15030 - name: https-prometheus - - port: 15031 - targetPort: 15031 - name: https-grafana - - port: 15032 - targetPort: 15032 - name: https-tracing - # This is the port where sni routing happens - - port: 15443 - targetPort: 15443 - name: tls - #### MESH EXPANSION PORTS ######## - # Pilot and Citadel MTLS ports are enabled in gateway - but will only redirect - # to pilot/citadel if global.meshExpansion settings are enabled. - # Delete these ports if mesh expansion is not enabled, to avoid - # exposing unnecessary ports on the web. - # You can remove these ports if you are not using mesh expansion - meshExpansionPorts: - - port: 15011 - targetPort: 15011 - name: tcp-pilot-grpc-tls - - port: 15004 - targetPort: 15004 - name: tcp-mixer-grpc-tls - - port: 8060 - targetPort: 8060 - name: tcp-citadel-grpc-tls - - port: 853 - targetPort: 853 - name: tcp-dns-tls - ####### end MESH EXPANSION PORTS ###### - ############## - secretVolumes: - - name: ingressgateway-certs - secretName: istio-ingressgateway-certs - mountPath: /etc/istio/ingressgateway-certs - - name: ingressgateway-ca-certs - secretName: istio-ingressgateway-ca-certs - mountPath: /etc/istio/ingressgateway-ca-certs - ### Advanced options ############ - - # Ports to explicitly check for readiness. If configured, the readiness check will expect a - # listener on these ports. A comma separated list is expected, such as "80,443". - # - # Warning: If you do not have a gateway configured for the ports provided, this check will always - # fail. This is intended for use cases where you always expect to have a listener on the port, - # such as 80 or 443 in typical setups. - applicationPorts: "" - - env: - # A gateway with this mode ensures that pilot generates an additional - # set of clusters for internal services but without Istio mTLS, to - # enable cross cluster routing. - ISTIO_META_ROUTER_MODE: "sni-dnat" - nodeSelector: {} - tolerations: [] - - # Specify the pod anti-affinity that allows you to constrain which nodes - # your pod is eligible to be scheduled based on labels on pods that are - # already running on the node rather than based on labels on nodes. - # There are currently two types of anti-affinity: - # "requiredDuringSchedulingIgnoredDuringExecution" - # "preferredDuringSchedulingIgnoredDuringExecution" - # which denote "hard" vs. "soft" requirements, you can define your values - # in "podAntiAffinityLabelSelector" and "podAntiAffinityTermLabelSelector" - # correspondingly. - # For example: - # podAntiAffinityLabelSelector: - # - key: security - # operator: In - # values: S1,S2 - # topologyKey: "kubernetes.io/hostname" - # This pod anti-affinity rule says that the pod requires not to be scheduled - # onto a node if that node is already running a pod with label having key - # "security" and value "S1". - podAntiAffinityLabelSelector: [] - podAntiAffinityTermLabelSelector: [] - -istio-egressgateway: - enabled: false - labels: - app: istio-egressgateway - istio: egressgateway - autoscaleEnabled: true - autoscaleMin: 1 - autoscaleMax: 5 - # specify replicaCount when autoscaleEnabled: false - # replicaCount: 1 - rollingMaxSurge: 100% - rollingMaxUnavailable: 25% - resources: - requests: - cpu: 100m - memory: 128Mi - limits: - cpu: 2000m - memory: 1024Mi - cpu: - targetAverageUtilization: 80 - serviceAnnotations: {} - podAnnotations: {} - type: ClusterIP #change to NodePort or LoadBalancer if need be - ports: - - port: 80 - name: http2 - - port: 443 - name: https - # This is the port where sni routing happens - - port: 15443 - targetPort: 15443 - name: tls - secretVolumes: - - name: egressgateway-certs - secretName: istio-egressgateway-certs - mountPath: /etc/istio/egressgateway-certs - - name: egressgateway-ca-certs - secretName: istio-egressgateway-ca-certs - mountPath: /etc/istio/egressgateway-ca-certs - #### Advanced options ######## - env: - # Set this to "external" if and only if you want the egress gateway to - # act as a transparent SNI gateway that routes mTLS/TLS traffic to - # external services defined using service entries, where the service - # entry has resolution set to DNS, has one or more endpoints with - # network field set to "external". By default its set to "" so that - # the egress gateway sees the same set of endpoints as the sidecars - # preserving backward compatibility - # ISTIO_META_REQUESTED_NETWORK_VIEW: "" - # A gateway with this mode ensures that pilot generates an additional - # set of clusters for internal services but without Istio mTLS, to - # enable cross cluster routing. - ISTIO_META_ROUTER_MODE: "sni-dnat" - nodeSelector: {} - tolerations: [] - - # Specify the pod anti-affinity that allows you to constrain which nodes - # your pod is eligible to be scheduled based on labels on pods that are - # already running on the node rather than based on labels on nodes. - # There are currently two types of anti-affinity: - # "requiredDuringSchedulingIgnoredDuringExecution" - # "preferredDuringSchedulingIgnoredDuringExecution" - # which denote "hard" vs. "soft" requirements, you can define your values - # in "podAntiAffinityLabelSelector" and "podAntiAffinityTermLabelSelector" - # correspondingly. - # For example: - # podAntiAffinityLabelSelector: - # - key: security - # operator: In - # values: S1,S2 - # topologyKey: "kubernetes.io/hostname" - # This pod anti-affinity rule says that the pod requires not to be scheduled - # onto a node if that node is already running a pod with label having key - # "security" and value "S1". - podAntiAffinityLabelSelector: [] - podAntiAffinityTermLabelSelector: [] - -# Mesh ILB gateway creates a gateway of type InternalLoadBalancer, -# for mesh expansion. It exposes the mtls ports for Pilot,CA as well -# as non-mtls ports to support upgrades and gradual transition. -istio-ilbgateway: - enabled: false - labels: - app: istio-ilbgateway - istio: ilbgateway - autoscaleEnabled: true - autoscaleMin: 1 - autoscaleMax: 5 - # specify replicaCount when autoscaleEnabled: false - # replicaCount: 1 - rollingMaxSurge: 100% - rollingMaxUnavailable: 25% - cpu: - targetAverageUtilization: 80 - resources: - requests: - cpu: 800m - memory: 512Mi - #limits: - # cpu: 1800m - # memory: 256Mi - loadBalancerIP: "" - serviceAnnotations: - cloud.google.com/load-balancer-type: "internal" - podAnnotations: {} - type: LoadBalancer - ports: - ## You can add custom gateway ports - google ILB default quota is 5 ports, - - port: 15011 - name: grpc-pilot-mtls - # Insecure port - only for migration from 0.8. Will be removed in 1.1 - - port: 15010 - name: grpc-pilot - - port: 8060 - targetPort: 8060 - name: tcp-citadel-grpc-tls - # Port 5353 is forwarded to kube-dns - - port: 5353 - name: tcp-dns - secretVolumes: - - name: ilbgateway-certs - secretName: istio-ilbgateway-certs - mountPath: /etc/istio/ilbgateway-certs - - name: ilbgateway-ca-certs - secretName: istio-ilbgateway-ca-certs - mountPath: /etc/istio/ilbgateway-ca-certs - nodeSelector: {} - tolerations: [] diff --git a/kubernetes/helm_charts/istio-system/istio/charts/grafana/Chart.yaml b/kubernetes/helm_charts/istio-system/istio/charts/grafana/Chart.yaml deleted file mode 100755 index ca0b464e5..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/grafana/Chart.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: v1 -appVersion: 1.3.3 -description: A Helm chart for Kubernetes -name: grafana -tillerVersion: '>=2.7.2' -version: 1.3.3 diff --git a/kubernetes/helm_charts/istio-system/istio/charts/grafana/dashboards/citadel-dashboard.json b/kubernetes/helm_charts/istio-system/istio/charts/grafana/dashboards/citadel-dashboard.json deleted file mode 100755 index ffe4551a9..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/grafana/dashboards/citadel-dashboard.json +++ /dev/null @@ -1,1089 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "description": "", - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "links": [], - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 8, - "panels": [], - "title": "Performance", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "description": "CPU usage across Citadel instances.", - "fill": 1, - "gridPos": { - "h": 6, - "w": 8, - "x": 0, - "y": 1 - }, - "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": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(container_cpu_usage_seconds_total{job=\"kubernetes-cadvisor\",container_name=~\"citadel\", pod_name=~\"istio-citadel-.*\"}[1m]))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Citadel CPU usage rate", - "refId": "A" - }, - { - "expr": "irate(process_cpu_seconds_total{job=\"citadel\"}[1m])", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Citadel CPU usage irate", - "refId": "C" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "CPU", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "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 - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "description": "Citadel process memory statistics.", - "fill": 1, - "gridPos": { - "h": 6, - "w": 8, - "x": 8, - "y": 1 - }, - "id": 12, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "process_virtual_memory_bytes{job=\"citadel\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Virtual Memory", - "refId": "A" - }, - { - "expr": "process_resident_memory_bytes{job=\"citadel\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Resident Memory", - "refId": "B" - }, - { - "expr": "go_memstats_heap_sys_bytes{job=\"citadel\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Heap Memory Total", - "refId": "C" - }, - { - "expr": "go_memstats_alloc_bytes{job=\"citadel\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Heap Memory Allocated", - "refId": "E" - }, - { - "expr": "go_memstats_heap_inuse_bytes{job=\"citadel\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Heap Inuse", - "refId": "F" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "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": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "fill": 1, - "gridPos": { - "h": 6, - "w": 8, - "x": 16, - "y": 1 - }, - "id": 14, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "go_goroutines{job=\"citadel\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Goroutines", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "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 - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 7 - }, - "id": 28, - "panels": [], - "title": "General", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "description": "Total number of CSR requests made to Citadel.", - "fill": 1, - "gridPos": { - "h": 5, - "w": 12, - "x": 0, - "y": 8 - }, - "id": 30, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "citadel_server_csr_count{job=\"citadel\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "CSR Request Count", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "CSR Requests", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "description": "The number of certificates issuances that have succeeded.", - "fill": 1, - "gridPos": { - "h": 5, - "w": 12, - "x": 12, - "y": 8 - }, - "id": 32, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "citadel_server_success_cert_issuance_count{job=\"citadel\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Certificates Issued", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Certificates Issued", - "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 - } - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 13 - }, - "id": 23, - "panels": [], - "title": "Errors", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "description": "The number of errors occurred when creating the CSR.", - "fill": 1, - "gridPos": { - "h": 5, - "w": 8, - "x": 0, - "y": 14 - }, - "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": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "citadel_secret_controller_csr_err_count{job=\"citadel\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "CSR Creation Error Count", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "CSR Creation Errors", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "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 - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "fill": 1, - "gridPos": { - "h": 5, - "w": 8, - "x": 8, - "y": 14 - }, - "id": 24, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "citadel_server_csr_parsing_err_count{job=\"citadel\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "CSR Parse Error Count", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "CSR Parse Errors", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "description": "The number of authentication failures.", - "fill": 1, - "gridPos": { - "h": 5, - "w": 8, - "x": 16, - "y": 14 - }, - "id": 26, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "citadel_server_authentication_failure_count{job=\"citadel\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Authentication Failure Count", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Authentication 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": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 19 - }, - "id": 4, - "panels": [], - "title": "Secret Controller", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "description": "The number of certificates created due to service account creation.", - "fill": 1, - "gridPos": { - "h": 5, - "w": 8, - "x": 0, - "y": 20 - }, - "id": 2, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": true, - "targets": [ - { - "expr": "citadel_secret_controller_svc_acc_created_cert_count{job=\"citadel\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "SA Secrets Created", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Service Account Secrets Created (due to SA creation)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": null, - "format": "short", - "label": "Certs Created", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "description": "The number of certificates deleted due to service account deletion.", - "fill": 1, - "gridPos": { - "h": 5, - "w": 8, - "x": 8, - "y": 20 - }, - "id": 16, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": true, - "targets": [ - { - "expr": "citadel_secret_controller_svc_acc_deleted_cert_count{job=\"citadel\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "SA Secrets Deleted", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Service Account Secrets Deleted (due to SA deletion)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": null, - "format": "short", - "label": "Certs Created", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "description": "The number of certificates recreated due to secret deletion (service account still exists).", - "fill": 1, - "gridPos": { - "h": 5, - "w": 8, - "x": 16, - "y": 20 - }, - "id": 6, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": true, - "targets": [ - { - "expr": "citadel_secret_controller_secret_deleted_cert_count{job=\"citadel\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "SA Secrets Recreated", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Service Account Secrets Recreated (due to errant deletion)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": null, - "format": "short", - "label": "Certs Created", - "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": 18, - "style": "dark", - "tags": [], - "templating": { - "list": [] - }, - "time": { - "from": "now-5m", - "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": "Istio Citadel Dashboard", - "uid": "OOyOqb4Wz", - "version": 1 -} \ No newline at end of file diff --git a/kubernetes/helm_charts/istio-system/istio/charts/grafana/dashboards/galley-dashboard.json b/kubernetes/helm_charts/istio-system/istio/charts/grafana/dashboards/galley-dashboard.json deleted file mode 100755 index b9b07daa9..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/grafana/dashboards/galley-dashboard.json +++ /dev/null @@ -1,1819 +0,0 @@ -{ - "__inputs": [ - { - "name": "DS_PROMETHEUS", - "label": "Prometheus", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": false, - "gnetId": null, - "graphTooltip": 0, - "links": [], - "panels": [ - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 5, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 46, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(istio_build{component=\"galley\"}) by (tag)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{ tag }}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Galley Versions", - "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": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 5 - }, - "id": 40, - "panels": [], - "title": "Resource Usage", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 8, - "w": 6, - "x": 0, - "y": 6 - }, - "id": 36, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "process_virtual_memory_bytes{job=\"galley\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Virtual Memory", - "refId": "A" - }, - { - "expr": "process_resident_memory_bytes{job=\"galley\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Resident Memory", - "refId": "B" - }, - { - "expr": "go_memstats_heap_sys_bytes{job=\"galley\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "heap sys", - "refId": "C" - }, - { - "expr": "go_memstats_heap_alloc_bytes{job=\"galley\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "heap alloc", - "refId": "D" - }, - { - "expr": "go_memstats_alloc_bytes{job=\"galley\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Alloc", - "refId": "F" - }, - { - "expr": "go_memstats_heap_inuse_bytes{job=\"galley\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Heap in-use", - "refId": "G" - }, - { - "expr": "go_memstats_stack_inuse_bytes{job=\"galley\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Stack in-use", - "refId": "H" - }, - { - "expr": "sum(container_memory_usage_bytes{job=\"kubernetes-cadvisor\",container_name=~\"galley\", pod_name=~\"istio-galley-.*\"})", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Total (kis)", - "refId": "E" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "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": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "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": "Prometheus", - "fill": 1, - "gridPos": { - "h": 8, - "w": 6, - "x": 6, - "y": 6 - }, - "id": 38, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(container_cpu_usage_seconds_total{job=\"kubernetes-cadvisor\",container_name=~\"galley\", pod_name=~\"istio-galley-.*\"}[1m]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Total (k8s)", - "refId": "A" - }, - { - "expr": "sum(rate(container_cpu_usage_seconds_total{job=\"kubernetes-cadvisor\",container_name=~\"galley\", pod_name=~\"istio-galley-.*\"}[1m])) by (container_name)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{ container_name }} (k8s)", - "refId": "B" - }, - { - "expr": "irate(process_cpu_seconds_total{job=\"galley\"}[1m])", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "galley (self-reported)", - "refId": "C" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "CPU", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 8, - "w": 6, - "x": 12, - "y": 6 - }, - "id": 42, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "process_open_fds{job=\"galley\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Open FDs (galley)", - "refId": "A" - }, - { - "expr": "container_fs_usage_bytes{job=\"kubernetes-cadvisor\",container_name=~\"galley\", pod_name=~\"istio-galley-.*\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{ container_name }} ", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Disk", - "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": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 8, - "w": 6, - "x": 18, - "y": 6 - }, - "id": 44, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "go_goroutines{job=\"galley\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "goroutines_total", - "refId": "A" - }, - { - "expr": "istio_mcp_clients_total{component=\"galley\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "clients_total", - "refId": "B" - }, - { - "expr": "go_goroutines{job=\"galley\"}/sum(istio_mcp_clients_total{component=\"galley\"}) without (component)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "avg_goroutines_per_client", - "refId": "C" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "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 - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 14 - }, - "id": 10, - "panels": [], - "title": "Runtime", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 8, - "x": 0, - "y": 15 - }, - "id": 2, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(galley_runtime_strategy_on_change_total[1m])) * 60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Strategy Change Events", - "refId": "A" - }, - { - "expr": "sum(rate(galley_runtime_processor_events_processed_total[1m])) * 60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Processed Events", - "refId": "B" - }, - { - "expr": "sum(rate(galley_runtime_processor_snapshots_published_total[1m])) * 60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Snapshot Published", - "refId": "C" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Event Rates", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": "Events/min", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": "", - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 8, - "x": 8, - "y": 15 - }, - "id": 4, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(galley_runtime_strategy_timer_max_time_reached_total[1m])) * 60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Max Time Reached", - "refId": "A" - }, - { - "expr": "sum(rate(galley_runtime_strategy_timer_quiesce_reached_total[1m])) * 60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Quiesce Reached", - "refId": "B" - }, - { - "expr": "sum(rate(galley_runtime_strategy_timer_resets_total[1m])) * 60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Timer Resets", - "refId": "C" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Timer Rates", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": "Events/min", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 8, - "x": 16, - "y": 15 - }, - "id": 8, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 3, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.50, sum by (le) (galley_runtime_processor_snapshot_events_total_bucket))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "P50", - "refId": "A" - }, - { - "expr": "histogram_quantile(0.90, sum by (le) (galley_runtime_processor_snapshot_events_total_bucket))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "P90", - "refId": "B" - }, - { - "expr": "histogram_quantile(0.95, sum by (le) (galley_runtime_processor_snapshot_events_total_bucket))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "P95", - "refId": "C" - }, - { - "expr": "histogram_quantile(0.99, sum by (le) (galley_runtime_processor_snapshot_events_total_bucket))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "P99", - "refId": "D" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Events Per Snapshot", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 8, - "x": 8, - "y": 21 - }, - "id": 6, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum by (typeURL) (galley_runtime_state_type_instances_total)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{ typeURL }}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "State Type Instances", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": "Count", - "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 - } - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 27 - }, - "id": 34, - "panels": [], - "title": "Validation", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 8, - "x": 0, - "y": 28 - }, - "id": 28, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "galley_validation_cert_key_updates{job=\"galley\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Key Updates", - "refId": "A" - }, - { - "expr": "galley_validation_cert_key_update_errors{job=\"galley\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Key Update Errors: {{ error }}", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Validation Webhook Certificate", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 8, - "x": 8, - "y": 28 - }, - "id": 30, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(galley_validation_passed{job=\"galley\"}) by (group, version, resource)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Passed: {{ group }}/{{ version }}/{{resource}}", - "refId": "A" - }, - { - "expr": "sum(galley_validation_failed{job=\"galley\"}) by (group, version, resource, reason)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Failed: {{ group }}/{{ version }}/{{resource}} ({{ reason}})", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Resource Validation", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 8, - "x": 16, - "y": 28 - }, - "id": 32, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(galley_validation_http_error{job=\"galley\"}) by (status)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{ status }}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Validation HTTP Errors", - "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 - } - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 34 - }, - "id": 12, - "panels": [], - "title": "Kubernetes Source", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 8, - "x": 0, - "y": 35 - }, - "id": 14, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "rate(galley_source_kube_event_success_total[1m]) * 60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Success", - "refId": "A" - }, - { - "expr": "rate(galley_source_kube_event_error_total[1m]) * 60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Error", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Source Event 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": "Events/min", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 8, - "x": 8, - "y": 35 - }, - "id": 16, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "rate(galley_source_kube_dynamic_converter_success_total[1m]) * 60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{apiVersion=\"{{apiVersion}}\",group=\"{{group}}\",kind=\"{{kind}}\"}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Kubernetes Object Conversion Successes", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": "Conversions/min", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 8, - "x": 16, - "y": 35 - }, - "id": 24, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "rate(galley_source_kube_dynamic_converter_failure_total[1m]) * 60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Error", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Kubernetes Object Conversion 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": "Failures/min", - "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 - } - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 41 - }, - "id": 18, - "panels": [], - "title": "Mesh Configuration Protocol", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 8, - "x": 0, - "y": 42 - }, - "id": 20, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(istio_mcp_clients_total{component=\"galley\"})", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Clients", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Connected Clients", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 8, - "x": 8, - "y": 42 - }, - "id": 22, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum by(collection)(irate(istio_mcp_request_acks_total{component=\"galley\"}[1m]) * 60)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Request ACKs", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": "ACKs/min", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 8, - "x": 16, - "y": 42 - }, - "id": 26, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "rate(istio_mcp_request_nacks_total{component=\"galley\"}[1m]) * 60", - "format": "time_series", - "intervalFactor": 1, - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Request NACKs", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": "NACKs/min", - "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": 16, - "style": "dark", - "tags": [], - "templating": { - "list": [] - }, - "time": { - "from": "now-5m", - "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": "Istio Galley Dashboard", - "uid": "TSEY6jLmk", - "version": 1 -} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/grafana/dashboards/istio-mesh-dashboard.json b/kubernetes/helm_charts/istio-system/istio/charts/grafana/dashboards/istio-mesh-dashboard.json deleted file mode 100755 index 1662e1f1d..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/grafana/dashboards/istio-mesh-dashboard.json +++ /dev/null @@ -1,1225 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": false, - "gnetId": null, - "graphTooltip": 0, - "id": null, - "links": [], - "panels": [ - { - "content": "
\n
\n Istio\n
\n
\n Istio is an open platform that provides a uniform way to connect,\n manage, and \n secure microservices.\n
\n Need help? Join the Istio community.\n
\n
", - "gridPos": { - "h": 3, - "w": 24, - "x": 0, - "y": 0 - }, - "height": "50px", - "id": 13, - "links": [], - "mode": "html", - "style": { - "font-size": "18pt" - }, - "title": "", - "transparent": true, - "type": "text" - }, - { - "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": "Prometheus", - "format": "ops", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 0, - "y": 3 - }, - "id": 20, - "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" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": true, - "lineColor": "rgb(31, 120, 193)", - "show": true - }, - "tableColumn": "", - "targets": [ - { - "expr": "round(sum(irate(istio_requests_total{reporter=\"destination\"}[1m])), 0.001)", - "intervalFactor": 1, - "refId": "A", - "step": 4 - } - ], - "thresholds": "", - "title": "Global Request Volume", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "avg" - }, - { - "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": "Prometheus", - "format": "percentunit", - "gauge": { - "maxValue": 100, - "minValue": 80, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": false - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 6, - "y": 3 - }, - "id": 21, - "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" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": true, - "lineColor": "rgb(31, 120, 193)", - "show": true - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(rate(istio_requests_total{reporter=\"destination\", response_code!~\"5.*\"}[1m])) / sum(rate(istio_requests_total{reporter=\"destination\"}[1m]))", - "format": "time_series", - "intervalFactor": 1, - "refId": "A", - "step": 4 - } - ], - "thresholds": "95, 99, 99.5", - "title": "Global Success Rate (non-5xx responses)", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "avg" - }, - { - "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": "Prometheus", - "format": "ops", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 12, - "y": 3 - }, - "id": 22, - "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" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": true, - "lineColor": "rgb(31, 120, 193)", - "show": true - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(irate(istio_requests_total{reporter=\"destination\", response_code=~\"4.*\"}[1m])) ", - "format": "time_series", - "intervalFactor": 1, - "refId": "A", - "step": 4 - } - ], - "thresholds": "", - "title": "4xxs", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "avg" - }, - { - "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": "Prometheus", - "format": "ops", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 18, - "y": 3 - }, - "id": 23, - "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" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": true, - "lineColor": "rgb(31, 120, 193)", - "show": true - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(irate(istio_requests_total{reporter=\"destination\", response_code=~\"5.*\"}[1m])) ", - "format": "time_series", - "intervalFactor": 1, - "refId": "A", - "step": 4 - } - ], - "thresholds": "", - "title": "5xxs", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "avg" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "#299c46", - "rgba(237, 129, 40, 0.89)", - "#d44a3a" - ], - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 0, - "y": 6 - }, - "id": 113, - "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" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": true - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(galley_istio_networking_virtualservices) / count(up{job=\"galley\"})", - "format": "time_series", - "intervalFactor": 1, - "refId": "A" - } - ], - "thresholds": "", - "timeFrom": null, - "timeShift": null, - "title": "Virtual Services", - "type": "singlestat", - "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" - ], - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 6, - "y": 6 - }, - "id": 114, - "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" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": true - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(galley_istio_networking_destinationrules) / count(up{job=\"galley\"})", - "format": "time_series", - "intervalFactor": 1, - "refId": "A" - } - ], - "thresholds": "", - "timeFrom": null, - "timeShift": null, - "title": "Destination Rules", - "type": "singlestat", - "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" - ], - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 12, - "y": 6 - }, - "id": 115, - "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" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": true - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(galley_istio_networking_gateways) / count(up{job=\"galley\"})", - "format": "time_series", - "intervalFactor": 1, - "refId": "A" - } - ], - "thresholds": "", - "timeFrom": null, - "timeShift": null, - "title": "Gateways", - "type": "singlestat", - "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" - ], - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 18, - "y": 6 - }, - "id": 116, - "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" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": true - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(galley_istio_authentication_meshpolicies) / count(up{job=\"galley\"})", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "refId": "A" - } - ], - "thresholds": "", - "timeFrom": null, - "timeShift": null, - "title": "Authentication Mesh Policies", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "columns": [], - "datasource": "Prometheus", - "fontSize": "100%", - "gridPos": { - "h": 21, - "w": 24, - "x": 0, - "y": 9 - }, - "hideTimeOverride": false, - "id": 73, - "links": [], - "pageSize": null, - "repeat": null, - "repeatDirection": "v", - "scroll": true, - "showHeader": true, - "sort": { - "col": 4, - "desc": true - }, - "styles": [ - { - "alias": "Workload", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "link": false, - "linkTargetBlank": false, - "linkTooltip": "Workload dashboard", - "linkUrl": "/dashboard/db/istio-workload-dashboard?var-namespace=$__cell_2&var-workload=$__cell_", - "pattern": "destination_workload", - "preserveFormat": false, - "sanitize": false, - "thresholds": [], - "type": "hidden", - "unit": "short" - }, - { - "alias": "", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "pattern": "Time", - "thresholds": [], - "type": "hidden", - "unit": "short" - }, - { - "alias": "Requests", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "pattern": "Value #A", - "thresholds": [], - "type": "number", - "unit": "ops" - }, - { - "alias": "P50 Latency", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "pattern": "Value #B", - "thresholds": [], - "type": "number", - "unit": "s" - }, - { - "alias": "P90 Latency", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "pattern": "Value #D", - "thresholds": [], - "type": "number", - "unit": "s" - }, - { - "alias": "P99 Latency", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "pattern": "Value #E", - "thresholds": [], - "type": "number", - "unit": "s" - }, - { - "alias": "Success Rate", - "colorMode": "cell", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "pattern": "Value #F", - "thresholds": [ - ".95", - " 1.00" - ], - "type": "number", - "unit": "percentunit" - }, - { - "alias": "Workload", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "link": true, - "linkTooltip": "$__cell dashboard", - "linkUrl": "/dashboard/db/istio-workload-dashboard?var-workload=$__cell_2&var-namespace=$__cell_3", - "pattern": "destination_workload_var", - "thresholds": [], - "type": "number", - "unit": "short" - }, - { - "alias": "Service", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "link": true, - "linkTooltip": "$__cell dashboard", - "linkUrl": "/dashboard/db/istio-service-dashboard?var-service=$__cell", - "pattern": "destination_service", - "thresholds": [], - "type": "string", - "unit": "short" - }, - { - "alias": "", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "pattern": "destination_workload_namespace", - "thresholds": [], - "type": "hidden", - "unit": "short" - } - ], - "targets": [ - { - "expr": "label_join(sum(rate(istio_requests_total{reporter=\"destination\", response_code=\"200\"}[1m])) by (destination_workload, destination_workload_namespace, destination_service), \"destination_workload_var\", \".\", \"destination_workload\", \"destination_workload_namespace\")", - "format": "table", - "hide": false, - "instant": true, - "intervalFactor": 1, - "legendFormat": "{{ destination_workload}}.{{ destination_workload_namespace }}", - "refId": "A" - }, - { - "expr": "label_join((histogram_quantile(0.50, sum(rate(istio_request_duration_milliseconds_bucket{reporter=\"destination\"}[1m])) by (le, destination_workload, destination_workload_namespace)) / 1000) or histogram_quantile(0.50, sum(rate(istio_request_duration_seconds_bucket{reporter=\"destination\"}[1m])) by (le, destination_workload, destination_workload_namespace)), \"destination_workload_var\", \".\", \"destination_workload\", \"destination_workload_namespace\")", - "format": "table", - "hide": false, - "instant": true, - "intervalFactor": 1, - "legendFormat": "{{ destination_workload}}.{{ destination_workload_namespace }}", - "refId": "B" - }, - { - "expr": "label_join((histogram_quantile(0.90, sum(rate(istio_request_duration_milliseconds_bucket{reporter=\"destination\"}[1m])) by (le, destination_workload, destination_workload_namespace)) / 1000) or histogram_quantile(0.90, sum(rate(istio_request_duration_seconds_bucket{reporter=\"destination\"}[1m])) by (le, destination_workload, destination_workload_namespace)), \"destination_workload_var\", \".\", \"destination_workload\", \"destination_workload_namespace\")", - "format": "table", - "hide": false, - "instant": true, - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}.{{ destination_workload_namespace }}", - "refId": "D" - }, - { - "expr": "label_join((histogram_quantile(0.99, sum(rate(istio_request_duration_milliseconds_bucket{reporter=\"destination\"}[1m])) by (le, destination_workload, destination_workload_namespace)) / 1000) or histogram_quantile(0.99, sum(rate(istio_request_duration_seconds_bucket{reporter=\"destination\"}[1m])) by (le, destination_workload, destination_workload_namespace)), \"destination_workload_var\", \".\", \"destination_workload\", \"destination_workload_namespace\")", - "format": "table", - "hide": false, - "instant": true, - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}.{{ destination_workload_namespace }}", - "refId": "E" - }, - { - "expr": "label_join((sum(rate(istio_requests_total{reporter=\"destination\", response_code!~\"5.*\"}[1m])) by (destination_workload, destination_workload_namespace) / sum(rate(istio_requests_total{reporter=\"destination\"}[1m])) by (destination_workload, destination_workload_namespace)), \"destination_workload_var\", \".\", \"destination_workload\", \"destination_workload_namespace\")", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}.{{ destination_workload_namespace }}", - "refId": "F" - } - ], - "timeFrom": null, - "title": "HTTP/GRPC Workloads", - "transform": "table", - "type": "table" - }, - { - "columns": [], - "datasource": "Prometheus", - "fontSize": "100%", - "gridPos": { - "h": 18, - "w": 24, - "x": 0, - "y": 30 - }, - "hideTimeOverride": false, - "id": 109, - "links": [], - "pageSize": null, - "repeatDirection": "v", - "scroll": true, - "showHeader": true, - "sort": { - "col": 2, - "desc": true - }, - "styles": [ - { - "alias": "Workload", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "link": false, - "linkTargetBlank": false, - "linkTooltip": "$__cell dashboard", - "linkUrl": "/dashboard/db/istio-tcp-workload-dashboard?var-namespace=$__cell_2&&var-workload=$__cell", - "pattern": "destination_workload", - "preserveFormat": false, - "sanitize": false, - "thresholds": [], - "type": "hidden", - "unit": "short" - }, - { - "alias": "Bytes Sent", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "pattern": "Value #A", - "thresholds": [ - "" - ], - "type": "number", - "unit": "Bps" - }, - { - "alias": "Bytes Received", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "pattern": "Value #C", - "thresholds": [], - "type": "number", - "unit": "Bps" - }, - { - "alias": "", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "pattern": "Time", - "thresholds": [], - "type": "hidden", - "unit": "short" - }, - { - "alias": "Workload", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "link": true, - "linkTooltip": "$__cell dashboard", - "linkUrl": "/dashboard/db/istio-workload-dashboard?var-namespace=$__cell_3&var-workload=$__cell_2", - "pattern": "destination_workload_var", - "thresholds": [], - "type": "string", - "unit": "short" - }, - { - "alias": "", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "pattern": "destination_workload_namespace", - "thresholds": [], - "type": "hidden", - "unit": "short" - }, - { - "alias": "Service", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "link": true, - "linkTooltip": "$__cell dashboard", - "linkUrl": "/dashboard/db/istio-service-dashboard?var-service=$__cell", - "pattern": "destination_service", - "thresholds": [], - "type": "number", - "unit": "short" - } - ], - "targets": [ - { - "expr": "label_join(sum(rate(istio_tcp_received_bytes_total{reporter=\"source\"}[1m])) by (destination_workload, destination_workload_namespace, destination_service), \"destination_workload_var\", \".\", \"destination_workload\", \"destination_workload_namespace\")", - "format": "table", - "hide": false, - "instant": true, - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}", - "refId": "C" - }, - { - "expr": "label_join(sum(rate(istio_tcp_sent_bytes_total{reporter=\"source\"}[1m])) by (destination_workload, destination_workload_namespace, destination_service), \"destination_workload_var\", \".\", \"destination_workload\", \"destination_workload_namespace\")", - "format": "table", - "hide": false, - "instant": true, - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}", - "refId": "A" - } - ], - "timeFrom": null, - "title": "TCP Workloads", - "transform": "table", - "type": "table" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 9, - "w": 24, - "x": 0, - "y": 48 - }, - "id": 111, - "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", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(istio_build) by (component, tag)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{ component }}: {{ tag }}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Istio Components by Version", - "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": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "refresh": "5s", - "schemaVersion": 18, - "style": "dark", - "tags": [], - "templating": { - "list": [] - }, - "time": { - "from": "now-5m", - "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": "Istio Mesh Dashboard", - "uid": "G8wLrJIZk", - "version": 5 -} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/grafana/dashboards/istio-performance-dashboard.json b/kubernetes/helm_charts/istio-system/istio/charts/grafana/dashboards/istio-performance-dashboard.json deleted file mode 100755 index 3826fbae8..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/grafana/dashboards/istio-performance-dashboard.json +++ /dev/null @@ -1,1822 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": false, - "gnetId": null, - "graphTooltip": 0, - "id": 9, - "links": [], - "panels": [ - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 21, - "panels": [ - { - "content": "The charts on this dashboard are intended to show Istio main components cost in terms resources utilization under steady load.\n\n- **vCPU/1k rps:** shows vCPU utilization by the main Istio components normalized by 1000 requests/second. When idle or low traffic, this chart will be blank. The curve for istio-proxy refers to the services sidecars only.\n- **vCPU:** vCPU utilization by Istio components, not normalized.\n- **Memory:** memory footprint for the components. Telemetry and policy are normalized by 1k rps, and no data is shown when there is no traffic. For ingress and istio-proxy, the data is per instance.\n- **Bytes transferred/ sec:** shows the number of bytes flowing through each Istio component.\n\n\n", - "gridPos": { - "h": 6, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 19, - "links": [], - "mode": "markdown", - "timeFrom": null, - "timeShift": null, - "title": "Performance Dashboard README", - "transparent": true, - "type": "text" - } - ], - "title": "Performance Dashboard Notes", - "type": "row" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 6, - "panels": [], - "title": "vCPU Usage", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "fill": 1, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 2 - }, - "id": 4, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "(sum(irate(container_cpu_usage_seconds_total{job=\"kubernetes-cadvisor\",pod_name=~\"istio-telemetry-.*\",container_name=~\"mixer|istio-proxy\"}[1m]))/ (round(sum(irate(istio_requests_total[1m])), 0.001)/1000))/ (sum(irate(istio_requests_total{source_workload=\"istio-ingressgateway\"}[1m])) >bool 10)", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "istio-telemetry", - "refId": "A" - }, - { - "expr": "(sum(irate(container_cpu_usage_seconds_total{job=\"kubernetes-cadvisor\",pod_name=~\"istio-ingressgateway-.*\",container_name=\"istio-proxy\"}[1m])) / (round(sum(irate(istio_requests_total{source_workload=\"istio-ingressgateway\", reporter=\"source\"}[1m])), 0.001)/1000))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "istio-ingressgateway", - "refId": "B" - }, - { - "expr": "(sum(irate(container_cpu_usage_seconds_total{job=\"kubernetes-cadvisor\",namespace!=\"istio-system\",container_name=\"istio-proxy\"}[1m]))/ (round(sum(irate(istio_requests_total[1m])), 0.001)/1000))/ (sum(irate(istio_requests_total{source_workload=\"istio-ingressgateway\"}[1m])) >bool 10)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "istio-proxy", - "refId": "C" - }, - { - "expr": "(sum(irate(container_cpu_usage_seconds_total{job=\"kubernetes-cadvisor\",pod_name=~\"istio-policy-.*\",container_name=~\"mixer|istio-proxy\"}[1m]))/ (round(sum(irate(istio_requests_total[1m])), 0.001)/1000))/ (sum(irate(istio_requests_total{source_workload=\"istio-ingressgateway\"}[1m])) >bool 10)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "istio-policy", - "refId": "D" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "vCPU / 1k rps", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "fill": 1, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 2 - }, - "id": 7, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(container_cpu_usage_seconds_total{job=\"kubernetes-cadvisor\",pod_name=~\"istio-telemetry-.*\",container_name=~\"mixer|istio-proxy\"}[1m]))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "istio-telemetry", - "refId": "A" - }, - { - "expr": "sum(rate(container_cpu_usage_seconds_total{job=\"kubernetes-cadvisor\",pod_name=~\"istio-ingressgateway-.*\",container_name=\"istio-proxy\"}[1m]))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "istio-ingressgateway", - "refId": "B" - }, - { - "expr": "sum(rate(container_cpu_usage_seconds_total{job=\"kubernetes-cadvisor\",namespace!=\"istio-system\",container_name=\"istio-proxy\"}[1m]))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "istio-proxy", - "refId": "C" - }, - { - "expr": "sum(rate(container_cpu_usage_seconds_total{job=\"kubernetes-cadvisor\",pod_name=~\"istio-policy-.*\",container_name=~\"mixer|istio-proxy\"}[1m]))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "istio-policy", - "refId": "D" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "vCPU", - "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 - } - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 10 - }, - "id": 13, - "panels": [], - "title": "Memory and Data Rates", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "fill": 1, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 11 - }, - "id": 902, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "(sum(container_memory_usage_bytes{job=\"kubernetes-cadvisor\",pod_name=~\"istio-telemetry-.*\"}) / (sum(irate(istio_requests_total[1m])) / 1000)) / (sum(irate(istio_requests_total{source_workload=\"istio-ingressgateway\"}[1m])) >bool 10)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "istio-telemetry / 1k rps", - "refId": "A" - }, - { - "expr": "sum(container_memory_usage_bytes{job=\"kubernetes-cadvisor\",pod_name=~\"istio-ingressgateway-.*\"}) / count(container_memory_usage_bytes{job=\"kubernetes-cadvisor\",pod_name=~\"istio-ingressgateway-.*\",container_name!=\"POD\"})", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "per istio-ingressgateway", - "refId": "B" - }, - { - "expr": "sum(container_memory_usage_bytes{job=\"kubernetes-cadvisor\",namespace!=\"istio-system\",container_name=\"istio-proxy\"}) / count(container_memory_usage_bytes{job=\"kubernetes-cadvisor\",namespace!=\"istio-system\",container_name=\"istio-proxy\"})", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "per istio proxy", - "refId": "C" - }, - { - "expr": "(sum(container_memory_usage_bytes{job=\"kubernetes-cadvisor\",pod_name=~\"istio-policy-.*\"}) / (sum(irate(istio_requests_total[1m])) / 1000))/ (sum(irate(istio_requests_total{source_workload=\"istio-ingressgateway\"}[1m])) >bool 10)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "istio-policy / 1k rps", - "refId": "D" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "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": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "fill": 1, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 11 - }, - "id": 11, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(irate(istio_response_bytes_sum{destination_workload=\"istio-telemetry\"}[1m])) + sum(irate(istio_request_bytes_sum{destination_workload=\"istio-telemetry\"}[1m]))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "istio-telemetry", - "refId": "A" - }, - { - "expr": "sum(irate(istio_response_bytes_sum{source_workload=\"istio-ingressgateway\", reporter=\"source\"}[1m]))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "istio-ingressgateway", - "refId": "B" - }, - { - "expr": "sum(irate(istio_response_bytes_sum{source_workload_namespace!=\"istio-system\", reporter=\"source\"}[1m])) + sum(irate(istio_response_bytes_sum{destination_workload_namespace!=\"istio-system\", reporter=\"destination\"}[1m])) + sum(irate(istio_request_bytes_sum{source_workload_namespace!=\"istio-system\", reporter=\"source\"}[1m])) + sum(irate(istio_request_bytes_sum{destination_workload_namespace!=\"istio-system\", reporter=\"destination\"}[1m]))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "istio-proxy", - "refId": "C" - }, - { - "expr": "sum(irate(istio_response_bytes_sum{destination_workload=\"istio-policy\"}[1m])) + sum(irate(istio_request_bytes_sum{destination_workload=\"istio-policy\"}[1m]))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "istio_policy", - "refId": "D" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Bytes transferred / sec", - "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": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 19 - }, - "id": 17, - "panels": [], - "title": "Istio Component Versions", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "fill": 1, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 20 - }, - "id": 15, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(istio_build) by (component, tag)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{ component }}: {{ tag }}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Istio Components by Version", - "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 - } - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 31 - }, - "id": 71, - "panels": [], - "title": "Proxy Resource Usage", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 32 - }, - "id": 72, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(container_memory_usage_bytes{job=\"kubernetes-cadvisor\",container_name=\"istio-proxy\"})", - "format": "time_series", - "hide": false, - "intervalFactor": 2, - "legendFormat": "{{ container_name }} (k8s)", - "refId": "B", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "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": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 7, - "w": 6, - "x": 6, - "y": 32 - }, - "id": 73, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(container_cpu_usage_seconds_total{job=\"kubernetes-cadvisor\",container_name=\"istio-proxy\"}[1m]))", - "format": "time_series", - "hide": false, - "intervalFactor": 2, - "legendFormat": "Total (k8s)", - "refId": "A", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "vCPU", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 7, - "w": 6, - "x": 12, - "y": 32 - }, - "id": 702, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(container_fs_usage_bytes{job=\"kubernetes-cadvisor\", container_name=\"istio-proxy\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{ container_name }}", - "refId": "B", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Disk", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": "", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "decimals": null, - "format": "none", - "label": "", - "logBase": 1024, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 39 - }, - "id": 69, - "panels": [], - "title": "Pilot Resource Usage", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 40 - }, - "id": 5, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "process_virtual_memory_bytes{job=\"pilot\"}", - "format": "time_series", - "instant": false, - "intervalFactor": 2, - "legendFormat": "Virtual Memory", - "refId": "I", - "step": 2 - }, - { - "expr": "process_resident_memory_bytes{job=\"pilot\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Resident Memory", - "refId": "H", - "step": 2 - }, - { - "expr": "go_memstats_heap_sys_bytes{job=\"pilot\"}", - "format": "time_series", - "hide": true, - "intervalFactor": 2, - "legendFormat": "heap sys", - "refId": "A" - }, - { - "expr": "go_memstats_heap_alloc_bytes{job=\"pilot\"}", - "format": "time_series", - "hide": true, - "intervalFactor": 2, - "legendFormat": "heap alloc", - "refId": "D" - }, - { - "expr": "go_memstats_alloc_bytes{job=\"pilot\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Alloc", - "refId": "F", - "step": 2 - }, - { - "expr": "go_memstats_heap_inuse_bytes{job=\"pilot\"}", - "format": "time_series", - "hide": false, - "intervalFactor": 2, - "legendFormat": "Heap in-use", - "refId": "E", - "step": 2 - }, - { - "expr": "go_memstats_stack_inuse_bytes{job=\"pilot\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Stack in-use", - "refId": "G", - "step": 2 - }, - { - "expr": "sum(container_memory_usage_bytes{job=\"kubernetes-cadvisor\",container_name=~\"discovery|istio-proxy\", pod_name=~\"istio-pilot-.*\"})", - "format": "time_series", - "hide": false, - "intervalFactor": 2, - "legendFormat": "Total (k8s)", - "refId": "C", - "step": 2 - }, - { - "expr": "container_memory_usage_bytes{job=\"kubernetes-cadvisor\",container_name=~\"discovery|istio-proxy\", pod_name=~\"istio-pilot-.*\"}", - "format": "time_series", - "hide": false, - "intervalFactor": 2, - "legendFormat": "{{ container_name }} (k8s)", - "refId": "B", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "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": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 7, - "w": 6, - "x": 6, - "y": 40 - }, - "id": 602, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(container_cpu_usage_seconds_total{job=\"kubernetes-cadvisor\",container_name=~\"discovery|istio-proxy\", pod_name=~\"istio-pilot-.*\"}[1m]))", - "format": "time_series", - "hide": false, - "intervalFactor": 2, - "legendFormat": "Total (k8s)", - "refId": "A", - "step": 2 - }, - { - "expr": "sum(rate(container_cpu_usage_seconds_total{job=\"kubernetes-cadvisor\",container_name=~\"discovery|istio-proxy\", pod_name=~\"istio-pilot-.*\"}[1m])) by (container_name)", - "format": "time_series", - "hide": false, - "intervalFactor": 2, - "legendFormat": "{{ container_name }} (k8s)", - "refId": "B", - "step": 2 - }, - { - "expr": "irate(process_cpu_seconds_total{job=\"pilot\"}[1m])", - "format": "time_series", - "hide": false, - "intervalFactor": 2, - "legendFormat": "pilot (self-reported)", - "refId": "C", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "vCPU", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 7, - "w": 6, - "x": 12, - "y": 40 - }, - "id": 74, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "process_open_fds{job=\"pilot\"}", - "format": "time_series", - "hide": true, - "instant": false, - "interval": "", - "intervalFactor": 2, - "legendFormat": "Open FDs (pilot)", - "refId": "A" - }, - { - "expr": "container_fs_usage_bytes{job=\"kubernetes-cadvisor\", container_name=~\"discovery|istio-proxy\", pod_name=~\"istio-pilot-.*\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{ container_name }}", - "refId": "B", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Disk", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": "", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "decimals": null, - "format": "none", - "label": "", - "logBase": 1024, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 7, - "w": 6, - "x": 18, - "y": 40 - }, - "id": 402, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "go_goroutines{job=\"pilot\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Number of Goroutines", - "refId": "A", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "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": "", - "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 - } - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 47 - }, - "id": 93, - "panels": [], - "title": "Mixer Resource Usage", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 48 - }, - "id": 94, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "process_virtual_memory_bytes{job=~\"istio-telemetry|istio-policy\"}", - "format": "time_series", - "instant": false, - "intervalFactor": 2, - "legendFormat": "Virtual Memory", - "refId": "I", - "step": 2 - }, - { - "expr": "process_resident_memory_bytes{job=~\"istio-telemetry|istio-policy\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Resident Memory", - "refId": "H", - "step": 2 - }, - { - "expr": "go_memstats_heap_sys_bytes{job=~\"istio-telemetry|istio-policy\"}", - "format": "time_series", - "hide": true, - "intervalFactor": 2, - "legendFormat": "heap sys", - "refId": "A" - }, - { - "expr": "go_memstats_heap_alloc_bytes{job=~\"istio-telemetry|istio-policy\"}", - "format": "time_series", - "hide": true, - "intervalFactor": 2, - "legendFormat": "heap alloc", - "refId": "D" - }, - { - "expr": "go_memstats_alloc_bytes{job=~\"istio-telemetry|istio-policy\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Alloc", - "refId": "F", - "step": 2 - }, - { - "expr": "go_memstats_heap_inuse_bytes{job=~\"istio-telemetry|istio-policy\"}", - "format": "time_series", - "hide": false, - "intervalFactor": 2, - "legendFormat": "Heap in-use", - "refId": "E", - "step": 2 - }, - { - "expr": "go_memstats_stack_inuse_bytes{job=~\"istio-policy|istio-telemetry\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Stack in-use", - "refId": "G", - "step": 2 - }, - { - "expr": "sum(container_memory_usage_bytes{job=\"kubernetes-cadvisor\",container_name=~\"mixer|istio-proxy\", pod_name=~\"istio-telemetry-.*\"})", - "format": "time_series", - "hide": false, - "intervalFactor": 2, - "legendFormat": "Total (k8s)", - "refId": "C", - "step": 2 - }, - { - "expr": "container_memory_usage_bytes{job=\"kubernetes-cadvisor\",container_name=~\"mixer|istio-proxy\", pod_name=~\"istio-telemetry-.*\"}", - "format": "time_series", - "hide": false, - "intervalFactor": 2, - "legendFormat": "{{ container_name }} (k8s)", - "refId": "B", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "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": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 7, - "w": 6, - "x": 6, - "y": 48 - }, - "id": 95, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(container_cpu_usage_seconds_total{job=\"kubernetes-cadvisor\",container_name=~\"mixer|istio-proxy\", pod_name=~\"istio-telemetry-.*\"}[1m]))", - "format": "time_series", - "hide": false, - "intervalFactor": 2, - "legendFormat": "Total (k8s)", - "refId": "A", - "step": 2 - }, - { - "expr": "sum(rate(container_cpu_usage_seconds_total{job=\"kubernetes-cadvisor\",container_name=~\"mixer|istio-proxy\", pod_name=~\"istio-telemetry-.*\"}[1m])) by (container_name)", - "format": "time_series", - "hide": false, - "intervalFactor": 2, - "legendFormat": "{{ container_name }} (k8s)", - "refId": "B", - "step": 2 - }, - { - "expr": "irate(process_cpu_seconds_total{job=~\"istio-policy|istio-telemetry\"}[1m])", - "format": "time_series", - "hide": false, - "intervalFactor": 2, - "legendFormat": "mixer (self-reported)", - "refId": "C", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "vCPU", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 7, - "w": 6, - "x": 12, - "y": 48 - }, - "id": 96, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "process_open_fds{job=~\"istio-policy|istio-telemetry\"}", - "format": "time_series", - "hide": true, - "instant": false, - "interval": "", - "intervalFactor": 2, - "legendFormat": "Open FDs (pilot)", - "refId": "A" - }, - { - "expr": "container_fs_usage_bytes{job=\"kubernetes-cadvisor\", container_name=~\"mixer|istio-proxy\", pod_name=~\"istio-telemetry-.*\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{ container_name }}", - "refId": "B", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Disk", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": "", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "decimals": null, - "format": "none", - "label": "", - "logBase": 1024, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 7, - "w": 6, - "x": 18, - "y": 48 - }, - "id": 97, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "go_goroutines{job=\"istio-telemetry\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Number of Goroutines", - "refId": "A", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "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": "", - "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": "10s", - "schemaVersion": 18, - "style": "dark", - "tags": [], - "templating": { - "list": [] - }, - "time": { - "from": "now-5m", - "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": "Istio Performance Dashboard", - "uid": "vu8e0VWZk", - "version": 22 -} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/grafana/dashboards/istio-service-dashboard.json b/kubernetes/helm_charts/istio-system/istio/charts/grafana/dashboards/istio-service-dashboard.json deleted file mode 100755 index f4d58a296..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/grafana/dashboards/istio-service-dashboard.json +++ /dev/null @@ -1,2601 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": false, - "gnetId": null, - "graphTooltip": 0, - "iteration": 1536442501501, - "links": [], - "panels": [ - { - "content": "
\nSERVICE: $service\n
", - "gridPos": { - "h": 3, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 89, - "links": [], - "mode": "html", - "title": "", - "transparent": true, - "type": "text" - }, - { - "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": "Prometheus", - "format": "ops", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 0, - "y": 3 - }, - "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" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": true, - "lineColor": "rgb(31, 120, 193)", - "show": true - }, - "tableColumn": "", - "targets": [ - { - "expr": "round(sum(irate(istio_requests_total{reporter=\"source\",destination_service=~\"$service\"}[5m])), 0.001)", - "format": "time_series", - "intervalFactor": 1, - "refId": "A", - "step": 4 - } - ], - "thresholds": "", - "title": "Client Request Volume", - "transparent": false, - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "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": "Prometheus", - "decimals": null, - "format": "percentunit", - "gauge": { - "maxValue": 100, - "minValue": 80, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": false - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 6, - "y": 3 - }, - "id": 14, - "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" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": true, - "lineColor": "rgb(31, 120, 193)", - "show": true - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(irate(istio_requests_total{reporter=\"source\",destination_service=~\"$service\",response_code!~\"5.*\"}[5m])) / sum(irate(istio_requests_total{reporter=\"source\",destination_service=~\"$service\"}[5m]))", - "format": "time_series", - "intervalFactor": 1, - "refId": "B" - } - ], - "thresholds": "95, 99, 99.5", - "title": "Client Success Rate (non-5xx responses)", - "transparent": false, - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "avg" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 4, - "w": 6, - "x": 12, - "y": 3 - }, - "id": 87, - "legend": { - "alignAsTable": false, - "avg": false, - "current": false, - "hideEmpty": false, - "hideZero": false, - "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", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "(histogram_quantile(0.50, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"source\",destination_service=~\"$service\"}[1m])) by (le)) / 1000) or histogram_quantile(0.50, sum(irate(istio_request_duration_seconds_bucket{reporter=\"source\",destination_service=~\"$service\"}[1m])) by (le))", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "P50", - "refId": "A" - }, - { - "expr": "(histogram_quantile(0.90, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"source\",destination_service=~\"$service\"}[1m])) by (le)) / 1000) or histogram_quantile(0.90, sum(irate(istio_request_duration_seconds_bucket{reporter=\"source\",destination_service=~\"$service\"}[1m])) by (le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "P90", - "refId": "B" - }, - { - "expr": "(histogram_quantile(0.99, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"source\",destination_service=~\"$service\"}[1m])) by (le)) / 1000) or histogram_quantile(0.99, sum(irate(istio_request_duration_seconds_bucket{reporter=\"source\",destination_service=~\"$service\"}[1m])) by (le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "P99", - "refId": "C" - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Client Request 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": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "#299c46", - "rgba(237, 129, 40, 0.89)", - "#d44a3a" - ], - "datasource": "Prometheus", - "format": "Bps", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 18, - "y": 3 - }, - "id": 84, - "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" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": true, - "lineColor": "rgb(31, 120, 193)", - "show": true - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(irate(istio_tcp_received_bytes_total{reporter=\"source\", destination_service=~\"$service\"}[1m]))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": "", - "title": "TCP Received Bytes", - "transparent": false, - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "avg" - }, - { - "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": "Prometheus", - "format": "ops", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 0, - "y": 7 - }, - "id": 97, - "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" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": true, - "lineColor": "rgb(31, 120, 193)", - "show": true - }, - "tableColumn": "", - "targets": [ - { - "expr": "round(sum(irate(istio_requests_total{reporter=\"destination\",destination_service=~\"$service\"}[5m])), 0.001)", - "format": "time_series", - "intervalFactor": 1, - "refId": "A", - "step": 4 - } - ], - "thresholds": "", - "title": "Server Request Volume", - "transparent": false, - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "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": "Prometheus", - "decimals": null, - "format": "percentunit", - "gauge": { - "maxValue": 100, - "minValue": 80, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": false - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 6, - "y": 7 - }, - "id": 98, - "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" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": true, - "lineColor": "rgb(31, 120, 193)", - "show": true - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(irate(istio_requests_total{reporter=\"destination\",destination_service=~\"$service\",response_code!~\"5.*\"}[5m])) / sum(irate(istio_requests_total{reporter=\"destination\",destination_service=~\"$service\"}[5m]))", - "format": "time_series", - "intervalFactor": 1, - "refId": "B" - } - ], - "thresholds": "95, 99, 99.5", - "title": "Server Success Rate (non-5xx responses)", - "transparent": false, - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "avg" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 4, - "w": 6, - "x": 12, - "y": 7 - }, - "id": 99, - "legend": { - "alignAsTable": false, - "avg": false, - "current": false, - "hideEmpty": false, - "hideZero": false, - "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", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "(histogram_quantile(0.50, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"destination\",destination_service=~\"$service\"}[1m])) by (le)) / 1000) or histogram_quantile(0.50, sum(irate(istio_request_duration_seconds_bucket{reporter=\"destination\",destination_service=~\"$service\"}[1m])) by (le))", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "P50", - "refId": "A" - }, - { - "expr": "(histogram_quantile(0.90, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"destination\",destination_service=~\"$service\"}[1m])) by (le)) / 1000) or histogram_quantile(0.90, sum(irate(istio_request_duration_seconds_bucket{reporter=\"destination\",destination_service=~\"$service\"}[1m])) by (le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "P90", - "refId": "B" - }, - { - "expr": "(histogram_quantile(0.99, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"destination\",destination_service=~\"$service\"}[1m])) by (le)) / 1000) or histogram_quantile(0.99, sum(irate(istio_request_duration_seconds_bucket{reporter=\"destination\",destination_service=~\"$service\"}[1m])) by (le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "P99", - "refId": "C" - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Server Request 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": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "#299c46", - "rgba(237, 129, 40, 0.89)", - "#d44a3a" - ], - "datasource": "Prometheus", - "format": "Bps", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 18, - "y": 7 - }, - "id": 100, - "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" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": true, - "lineColor": "rgb(31, 120, 193)", - "show": true - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(irate(istio_tcp_sent_bytes_total{reporter=\"source\", destination_service=~\"$service\"}[1m])) ", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": "", - "title": "TCP Sent Bytes", - "transparent": false, - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "avg" - }, - { - "content": "
\nCLIENT WORKLOADS\n
", - "gridPos": { - "h": 3, - "w": 24, - "x": 0, - "y": 11 - }, - "id": 45, - "links": [], - "mode": "html", - "title": "", - "transparent": true, - "type": "text" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 0, - "gridPos": { - "h": 6, - "w": 12, - "x": 0, - "y": 14 - }, - "id": 25, - "legend": { - "avg": false, - "current": false, - "hideEmpty": true, - "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, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "round(sum(irate(istio_requests_total{connection_security_policy=\"mutual_tls\",destination_service=~\"$service\",reporter=\"source\",source_workload=~\"$srcwl\",source_workload_namespace=~\"$srcns\"}[5m])) by (source_workload, source_workload_namespace, response_code), 0.001)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{ source_workload }}.{{ source_workload_namespace }} : {{ response_code }} (🔐mTLS)", - "refId": "B", - "step": 2 - }, - { - "expr": "round(sum(irate(istio_requests_total{connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", reporter=\"source\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[5m])) by (source_workload, source_workload_namespace, response_code), 0.001)", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ source_workload }}.{{ source_workload_namespace }} : {{ response_code }}", - "refId": "A", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Incoming Requests by Source And Response Code", - "tooltip": { - "shared": false, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ - "total" - ] - }, - "yaxes": [ - { - "format": "ops", - "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": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 12, - "x": 12, - "y": 14 - }, - "id": 26, - "legend": { - "avg": false, - "current": false, - "hideEmpty": true, - "hideZero": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(irate(istio_requests_total{reporter=\"source\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\",response_code!~\"5.*\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[5m])) by (source_workload, source_workload_namespace) / sum(irate(istio_requests_total{reporter=\"source\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[5m])) by (source_workload, source_workload_namespace)", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ source_workload }}.{{ source_workload_namespace }} (🔐mTLS)", - "refId": "A", - "step": 2 - }, - { - "expr": "sum(irate(istio_requests_total{reporter=\"source\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\",response_code!~\"5.*\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[5m])) by (source_workload, source_workload_namespace) / sum(irate(istio_requests_total{reporter=\"source\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[5m])) by (source_workload, source_workload_namespace)", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ source_workload }}.{{ source_workload_namespace }}", - "refId": "B", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Incoming Success Rate (non-5xx responses) By Source", - "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.01", - "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": "Prometheus", - "description": "", - "fill": 1, - "gridPos": { - "h": 6, - "w": 8, - "x": 0, - "y": 20 - }, - "id": 27, - "legend": { - "alignAsTable": false, - "avg": false, - "current": false, - "hideEmpty": true, - "hideZero": 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", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "(histogram_quantile(0.50, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"source\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le)) / 1000) or histogram_quantile(0.50, sum(irate(istio_request_duration_seconds_bucket{reporter=\"source\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P50 (🔐mTLS)", - "refId": "D", - "step": 2 - }, - { - "expr": "(histogram_quantile(0.90, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"source\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le)) / 1000) or histogram_quantile(0.90, sum(irate(istio_request_duration_seconds_bucket{reporter=\"source\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P90 (🔐mTLS)", - "refId": "A", - "step": 2 - }, - { - "expr": "(histogram_quantile(0.95, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"source\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le)) / 1000) or histogram_quantile(0.95, sum(irate(istio_request_duration_seconds_bucket{reporter=\"source\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P95 (🔐mTLS)", - "refId": "B", - "step": 2 - }, - { - "expr": "(histogram_quantile(0.99, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"source\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le)) / 1000) or histogram_quantile(0.99, sum(irate(istio_request_duration_seconds_bucket{reporter=\"source\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P99 (🔐mTLS)", - "refId": "C", - "step": 2 - }, - { - "expr": "(histogram_quantile(0.50, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"source\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le)) / 1000) or histogram_quantile(0.50, sum(irate(istio_request_duration_seconds_bucket{reporter=\"source\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P50", - "refId": "E", - "step": 2 - }, - { - "expr": "(histogram_quantile(0.90, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"source\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le)) / 1000) or histogram_quantile(0.90, sum(irate(istio_request_duration_seconds_bucket{reporter=\"source\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P90", - "refId": "F", - "step": 2 - }, - { - "expr": "(histogram_quantile(0.95, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"source\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le)) / 1000) or histogram_quantile(0.95, sum(irate(istio_request_duration_seconds_bucket{reporter=\"source\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P95", - "refId": "G", - "step": 2 - }, - { - "expr": "(histogram_quantile(0.99, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"source\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le)) / 1000) or histogram_quantile(0.99, sum(irate(istio_request_duration_seconds_bucket{reporter=\"source\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P99", - "refId": "H", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Incoming Request Duration by Source", - "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": "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": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 8, - "x": 8, - "y": 20 - }, - "id": 28, - "legend": { - "alignAsTable": false, - "avg": false, - "current": false, - "hideEmpty": true, - "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", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.50, sum(irate(istio_request_bytes_bucket{reporter=\"source\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P50 (🔐mTLS)", - "refId": "D", - "step": 2 - }, - { - "expr": "histogram_quantile(0.90, sum(irate(istio_request_bytes_bucket{reporter=\"source\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P90 (🔐mTLS)", - "refId": "A", - "step": 2 - }, - { - "expr": "histogram_quantile(0.95, sum(irate(istio_request_bytes_bucket{reporter=\"source\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P95 (🔐mTLS)", - "refId": "B", - "step": 2 - }, - { - "expr": "histogram_quantile(0.99, sum(irate(istio_request_bytes_bucket{reporter=\"source\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P99 (🔐mTLS)", - "refId": "C", - "step": 2 - }, - { - "expr": "histogram_quantile(0.50, sum(irate(istio_request_bytes_bucket{reporter=\"source\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P50", - "refId": "E", - "step": 2 - }, - { - "expr": "histogram_quantile(0.90, sum(irate(istio_request_bytes_bucket{reporter=\"source\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P90", - "refId": "F", - "step": 2 - }, - { - "expr": "histogram_quantile(0.95, sum(irate(istio_request_bytes_bucket{reporter=\"source\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P95", - "refId": "G", - "step": 2 - }, - { - "expr": "histogram_quantile(0.99, sum(irate(istio_request_bytes_bucket{reporter=\"source\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P99", - "refId": "H", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Incoming Request Size By Source", - "tooltip": { - "shared": true, - "sort": 0, - "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 - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 8, - "x": 16, - "y": 20 - }, - "id": 68, - "legend": { - "alignAsTable": false, - "avg": false, - "current": false, - "hideEmpty": true, - "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", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.50, sum(irate(istio_response_bytes_bucket{reporter=\"source\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P50 (🔐mTLS)", - "refId": "D", - "step": 2 - }, - { - "expr": "histogram_quantile(0.90, sum(irate(istio_response_bytes_bucket{reporter=\"source\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P90 (🔐mTLS)", - "refId": "A", - "step": 2 - }, - { - "expr": "histogram_quantile(0.95, sum(irate(istio_response_bytes_bucket{reporter=\"source\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P95 (🔐mTLS)", - "refId": "B", - "step": 2 - }, - { - "expr": "histogram_quantile(0.99, sum(irate(istio_response_bytes_bucket{reporter=\"source\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P99 (🔐mTLS)", - "refId": "C", - "step": 2 - }, - { - "expr": "histogram_quantile(0.50, sum(irate(istio_response_bytes_bucket{reporter=\"source\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P50", - "refId": "E", - "step": 2 - }, - { - "expr": "histogram_quantile(0.90, sum(irate(istio_response_bytes_bucket{reporter=\"source\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P90", - "refId": "F", - "step": 2 - }, - { - "expr": "histogram_quantile(0.95, sum(irate(istio_response_bytes_bucket{reporter=\"source\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P95", - "refId": "G", - "step": 2 - }, - { - "expr": "histogram_quantile(0.99, sum(irate(istio_response_bytes_bucket{reporter=\"source\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P99", - "refId": "H", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Response Size By Source", - "tooltip": { - "shared": true, - "sort": 0, - "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 - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 12, - "x": 0, - "y": 26 - }, - "id": 80, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "round(sum(irate(istio_tcp_received_bytes_total{reporter=\"source\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace), 0.001)", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ source_workload }}.{{ source_workload_namespace}} (🔐mTLS)", - "refId": "A", - "step": 2 - }, - { - "expr": "round(sum(irate(istio_tcp_received_bytes_total{reporter=\"source\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace), 0.001)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{ source_workload }}.{{ source_workload_namespace}}", - "refId": "B", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Bytes Received from Incoming TCP Connection", - "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": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 12, - "x": 12, - "y": 26 - }, - "id": 82, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "round(sum(irate(istio_tcp_sent_bytes_total{connection_security_policy=\"mutual_tls\", reporter=\"source\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace), 0.001)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{ source_workload }}.{{ source_workload_namespace}} (🔐mTLS)", - "refId": "A", - "step": 2 - }, - { - "expr": "round(sum(irate(istio_tcp_sent_bytes_total{connection_security_policy!=\"mutual_tls\", reporter=\"source\", destination_service=~\"$service\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace), 0.001)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{ source_workload }}.{{ source_workload_namespace}}", - "refId": "B", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Bytes Sent to Incoming TCP Connection", - "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": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "content": "
\nSERVICE WORKLOADS\n
", - "gridPos": { - "h": 3, - "w": 24, - "x": 0, - "y": 32 - }, - "id": 69, - "links": [], - "mode": "html", - "title": "", - "transparent": true, - "type": "text" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 0, - "gridPos": { - "h": 6, - "w": 12, - "x": 0, - "y": 35 - }, - "id": 90, - "legend": { - "avg": false, - "current": false, - "hideEmpty": true, - "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, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "round(sum(irate(istio_requests_total{connection_security_policy=\"mutual_tls\",destination_service=~\"$service\",reporter=\"destination\",destination_workload=~\"$dstwl\",destination_workload_namespace=~\"$dstns\"}[5m])) by (destination_workload, destination_workload_namespace, response_code), 0.001)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}.{{ destination_workload_namespace }} : {{ response_code }} (🔐mTLS)", - "refId": "B", - "step": 2 - }, - { - "expr": "round(sum(irate(istio_requests_total{connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", reporter=\"destination\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[5m])) by (destination_workload, destination_workload_namespace, response_code), 0.001)", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}.{{ destination_workload_namespace }} : {{ response_code }}", - "refId": "A", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Incoming Requests by Destination And Response Code", - "tooltip": { - "shared": false, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ - "total" - ] - }, - "yaxes": [ - { - "format": "ops", - "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": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 12, - "x": 12, - "y": 35 - }, - "id": 91, - "legend": { - "avg": false, - "current": false, - "hideEmpty": true, - "hideZero": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(irate(istio_requests_total{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\",response_code!~\"5.*\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[5m])) by (destination_workload, destination_workload_namespace) / sum(irate(istio_requests_total{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[5m])) by (destination_workload, destination_workload_namespace)", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}.{{ destination_workload_namespace }} (🔐mTLS)", - "refId": "A", - "step": 2 - }, - { - "expr": "sum(irate(istio_requests_total{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\",response_code!~\"5.*\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[5m])) by (destination_workload, destination_workload_namespace) / sum(irate(istio_requests_total{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[5m])) by (destination_workload, destination_workload_namespace)", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}.{{ destination_workload_namespace }}", - "refId": "B", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Incoming Success Rate (non-5xx responses) By Source", - "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.01", - "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": "Prometheus", - "description": "", - "fill": 1, - "gridPos": { - "h": 6, - "w": 8, - "x": 0, - "y": 41 - }, - "id": 94, - "legend": { - "alignAsTable": false, - "avg": false, - "current": false, - "hideEmpty": true, - "hideZero": 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", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "(histogram_quantile(0.50, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace, le)) / 1000) or histogram_quantile(0.50, sum(irate(istio_request_duration_seconds_bucket{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}.{{ destination_workload_namespace }} P50 (🔐mTLS)", - "refId": "D", - "step": 2 - }, - { - "expr": "(histogram_quantile(0.90, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace, le)) / 1000) or histogram_quantile(0.90, sum(irate(istio_request_duration_seconds_bucket{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}.{{ destination_workload_namespace }} P90 (🔐mTLS)", - "refId": "A", - "step": 2 - }, - { - "expr": "(histogram_quantile(0.95, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace, le)) / 1000) or histogram_quantile(0.95, sum(irate(istio_request_duration_seconds_bucket{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}.{{ destination_workload_namespace }} P95 (🔐mTLS)", - "refId": "B", - "step": 2 - }, - { - "expr": "(histogram_quantile(0.99, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace, le)) / 1000) or histogram_quantile(0.99, sum(irate(istio_request_duration_seconds_bucket{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}.{{ destination_workload_namespace }} P99 (🔐mTLS)", - "refId": "C", - "step": 2 - }, - { - "expr": "(histogram_quantile(0.50, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace, le)) / 1000) or histogram_quantile(0.50, sum(irate(istio_request_duration_seconds_bucket{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}.{{ destination_workload_namespace }} P50", - "refId": "E", - "step": 2 - }, - { - "expr": "(histogram_quantile(0.90, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace, le)) / 1000) or histogram_quantile(0.90, sum(irate(istio_request_duration_seconds_bucket{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}.{{ destination_workload_namespace }} P90", - "refId": "F", - "step": 2 - }, - { - "expr": "(histogram_quantile(0.95, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace, le)) / 1000) or histogram_quantile(0.95, sum(irate(istio_request_duration_seconds_bucket{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}.{{ destination_workload_namespace }} P95", - "refId": "G", - "step": 2 - }, - { - "expr": "(histogram_quantile(0.99, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace, le)) / 1000) or histogram_quantile(0.99, sum(irate(istio_request_duration_seconds_bucket{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}.{{ destination_workload_namespace }} P99", - "refId": "H", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Incoming Request Duration by Source", - "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": "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": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 8, - "x": 8, - "y": 41 - }, - "id": 95, - "legend": { - "alignAsTable": false, - "avg": false, - "current": false, - "hideEmpty": true, - "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", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.50, sum(irate(istio_request_bytes_bucket{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}.{{ destination_workload_namespace }} P50 (🔐mTLS)", - "refId": "D", - "step": 2 - }, - { - "expr": "histogram_quantile(0.90, sum(irate(istio_request_bytes_bucket{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}.{{ destination_workload_namespace }} P90 (🔐mTLS)", - "refId": "A", - "step": 2 - }, - { - "expr": "histogram_quantile(0.95, sum(irate(istio_request_bytes_bucket{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}.{{ destination_workload_namespace }} P95 (🔐mTLS)", - "refId": "B", - "step": 2 - }, - { - "expr": "histogram_quantile(0.99, sum(irate(istio_request_bytes_bucket{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}.{{ destination_workload_namespace }} P99 (🔐mTLS)", - "refId": "C", - "step": 2 - }, - { - "expr": "histogram_quantile(0.50, sum(irate(istio_request_bytes_bucket{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}.{{ destination_workload_namespace }} P50", - "refId": "E", - "step": 2 - }, - { - "expr": "histogram_quantile(0.90, sum(irate(istio_request_bytes_bucket{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}.{{ destination_workload_namespace }} P90", - "refId": "F", - "step": 2 - }, - { - "expr": "histogram_quantile(0.95, sum(irate(istio_request_bytes_bucket{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}.{{ destination_workload_namespace }} P95", - "refId": "G", - "step": 2 - }, - { - "expr": "histogram_quantile(0.99, sum(irate(istio_request_bytes_bucket{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}.{{ destination_workload_namespace }} P99", - "refId": "H", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Incoming Request Size By Source", - "tooltip": { - "shared": true, - "sort": 0, - "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 - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 8, - "x": 16, - "y": 41 - }, - "id": 96, - "legend": { - "alignAsTable": false, - "avg": false, - "current": false, - "hideEmpty": true, - "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", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.50, sum(irate(istio_response_bytes_bucket{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}.{{ destination_workload_namespace }} P50 (🔐mTLS)", - "refId": "D", - "step": 2 - }, - { - "expr": "histogram_quantile(0.90, sum(irate(istio_response_bytes_bucket{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}.{{ destination_workload_namespace }} P90 (🔐mTLS)", - "refId": "A", - "step": 2 - }, - { - "expr": "histogram_quantile(0.95, sum(irate(istio_response_bytes_bucket{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}.{{ destination_workload_namespace }} P95 (🔐mTLS)", - "refId": "B", - "step": 2 - }, - { - "expr": "histogram_quantile(0.99, sum(irate(istio_response_bytes_bucket{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}.{{ destination_workload_namespace }} P99 (🔐mTLS)", - "refId": "C", - "step": 2 - }, - { - "expr": "histogram_quantile(0.50, sum(irate(istio_response_bytes_bucket{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}.{{ destination_workload_namespace }} P50", - "refId": "E", - "step": 2 - }, - { - "expr": "histogram_quantile(0.90, sum(irate(istio_response_bytes_bucket{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}.{{ destination_workload_namespace }} P90", - "refId": "F", - "step": 2 - }, - { - "expr": "histogram_quantile(0.95, sum(irate(istio_response_bytes_bucket{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}.{{ destination_workload_namespace }} P95", - "refId": "G", - "step": 2 - }, - { - "expr": "histogram_quantile(0.99, sum(irate(istio_response_bytes_bucket{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}.{{ destination_workload_namespace }} P99", - "refId": "H", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Response Size By Source", - "tooltip": { - "shared": true, - "sort": 0, - "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 - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 12, - "x": 0, - "y": 47 - }, - "id": 92, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "round(sum(irate(istio_tcp_received_bytes_total{reporter=\"source\", connection_security_policy=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace), 0.001)", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}.{{ destination_workload_namespace}} (🔐mTLS)", - "refId": "A", - "step": 2 - }, - { - "expr": "round(sum(irate(istio_tcp_received_bytes_total{reporter=\"source\", connection_security_policy!=\"mutual_tls\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace), 0.001)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}.{{ destination_workload_namespace}}", - "refId": "B", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Bytes Received from Incoming TCP Connection", - "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": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 12, - "x": 12, - "y": 47 - }, - "id": 93, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "round(sum(irate(istio_tcp_sent_bytes_total{connection_security_policy=\"mutual_tls\", reporter=\"source\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace), 0.001)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}.{{destination_workload_namespace }} (🔐mTLS)", - "refId": "A", - "step": 2 - }, - { - "expr": "round(sum(irate(istio_tcp_sent_bytes_total{connection_security_policy!=\"mutual_tls\", reporter=\"source\", destination_service=~\"$service\", destination_workload=~\"$dstwl\", destination_workload_namespace=~\"$dstns\"}[1m])) by (destination_workload, destination_workload_namespace), 0.001)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{ destination_workload }}.{{destination_workload_namespace }}", - "refId": "B", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Bytes Sent to Incoming TCP Connection", - "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": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "refresh": "10s", - "schemaVersion": 16, - "style": "dark", - "tags": [], - "templating": { - "list": [ - { - "allValue": null, - "datasource": "Prometheus", - "hide": 0, - "includeAll": false, - "label": "Service", - "multi": false, - "name": "service", - "options": [], - "query": "label_values(destination_service)", - "refresh": 1, - "regex": "", - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "text": "All", - "value": "$__all" - }, - "datasource": "Prometheus", - "hide": 0, - "includeAll": true, - "label": "Client Workload Namespace", - "multi": true, - "name": "srcns", - "options": [], - "query": "query_result( sum(istio_requests_total{reporter=\"destination\", destination_service=\"$service\"}) by (source_workload_namespace) or sum(istio_tcp_sent_bytes_total{reporter=\"destination\", destination_service=~\"$service\"}) by (source_workload_namespace))", - "refresh": 1, - "regex": "/.*namespace=\"([^\"]*).*/", - "sort": 2, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "text": "All", - "value": "$__all" - }, - "datasource": "Prometheus", - "hide": 0, - "includeAll": true, - "label": "Client Workload", - "multi": true, - "name": "srcwl", - "options": [], - "query": "query_result( sum(istio_requests_total{reporter=\"destination\", destination_service=~\"$service\", source_workload_namespace=~\"$srcns\"}) by (source_workload) or sum(istio_tcp_sent_bytes_total{reporter=\"destination\", destination_service=~\"$service\", source_workload_namespace=~\"$srcns\"}) by (source_workload))", - "refresh": 1, - "regex": "/.*workload=\"([^\"]*).*/", - "sort": 3, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "text": "All", - "value": "$__all" - }, - "datasource": "Prometheus", - "hide": 0, - "includeAll": true, - "label": "Service Workload Namespace", - "multi": true, - "name": "dstns", - "options": [], - "query": "query_result( sum(istio_requests_total{reporter=\"destination\", destination_service=\"$service\"}) by (destination_workload_namespace) or sum(istio_tcp_sent_bytes_total{reporter=\"destination\", destination_service=~\"$service\"}) by (destination_workload_namespace))", - "refresh": 1, - "regex": "/.*namespace=\"([^\"]*).*/", - "sort": 2, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "text": "All", - "value": "$__all" - }, - "datasource": "Prometheus", - "hide": 0, - "includeAll": true, - "label": "Service Workload", - "multi": true, - "name": "dstwl", - "options": [], - "query": "query_result( sum(istio_requests_total{reporter=\"destination\", destination_service=~\"$service\", destination_workload_namespace=~\"$dstns\"}) by (destination_workload) or sum(istio_tcp_sent_bytes_total{reporter=\"destination\", destination_service=~\"$service\", destination_workload_namespace=~\"$dstns\"}) by (destination_workload))", - "refresh": 1, - "regex": "/.*workload=\"([^\"]*).*/", - "sort": 3, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-5m", - "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": "Istio Service Dashboard", - "uid": "LJ_uJAvmk", - "version": 1 -} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/grafana/dashboards/istio-workload-dashboard.json b/kubernetes/helm_charts/istio-system/istio/charts/grafana/dashboards/istio-workload-dashboard.json deleted file mode 100755 index 62ad1b5cf..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/grafana/dashboards/istio-workload-dashboard.json +++ /dev/null @@ -1,2303 +0,0 @@ -{ - "__inputs": [ - { - "name": "DS_PROMETHEUS", - "label": "Prometheus", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" - } - ], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "5.0.4" - }, - { - "type": "panel", - "id": "graph", - "name": "Graph", - "version": "5.0.0" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "5.0.0" - }, - { - "type": "panel", - "id": "singlestat", - "name": "Singlestat", - "version": "5.0.0" - }, - { - "type": "panel", - "id": "text", - "name": "Text", - "version": "5.0.0" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": false, - "gnetId": null, - "graphTooltip": 0, - "id": null, - "iteration": 1531345461465, - "links": [], - "panels": [ - { - "content": "
\nWORKLOAD: $workload.$namespace\n
", - "gridPos": { - "h": 3, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 89, - "links": [], - "mode": "html", - "title": "", - "transparent": true, - "type": "text" - }, - { - "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": "Prometheus", - "format": "ops", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 4, - "w": 8, - "x": 0, - "y": 3 - }, - "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" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": true, - "lineColor": "rgb(31, 120, 193)", - "show": true - }, - "tableColumn": "", - "targets": [ - { - "expr": "round(sum(irate(istio_requests_total{reporter=\"destination\",destination_workload_namespace=~\"$namespace\",destination_workload=~\"$workload\"}[5m])), 0.001)", - "format": "time_series", - "intervalFactor": 1, - "refId": "A", - "step": 4 - } - ], - "thresholds": "", - "title": "Incoming Request Volume", - "transparent": false, - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "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": "Prometheus", - "decimals": null, - "format": "percentunit", - "gauge": { - "maxValue": 100, - "minValue": 80, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": false - }, - "gridPos": { - "h": 4, - "w": 8, - "x": 8, - "y": 3 - }, - "id": 14, - "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" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": true, - "lineColor": "rgb(31, 120, 193)", - "show": true - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(irate(istio_requests_total{reporter=\"destination\",destination_workload_namespace=~\"$namespace\",destination_workload=~\"$workload\",response_code!~\"5.*\"}[5m])) / sum(irate(istio_requests_total{reporter=\"destination\",destination_workload_namespace=~\"$namespace\",destination_workload=~\"$workload\"}[5m]))", - "format": "time_series", - "intervalFactor": 1, - "refId": "B" - } - ], - "thresholds": "95, 99, 99.5", - "title": "Incoming Success Rate (non-5xx responses)", - "transparent": false, - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "avg" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 4, - "w": 8, - "x": 16, - "y": 3 - }, - "id": 87, - "legend": { - "alignAsTable": false, - "avg": false, - "current": false, - "hideEmpty": false, - "hideZero": false, - "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", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "(histogram_quantile(0.50, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"destination\",destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\"}[1m])) by (le)) / 1000) or histogram_quantile(0.50, sum(irate(istio_request_duration_seconds_bucket{reporter=\"destination\",destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\"}[1m])) by (le))", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "P50", - "refId": "A" - }, - { - "expr": "(histogram_quantile(0.50, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"destination\",destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\"}[1m])) by (le)) / 1000) or histogram_quantile(0.90, sum(irate(istio_request_duration_seconds_bucket{reporter=\"destination\",destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\"}[1m])) by (le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "P90", - "refId": "B" - }, - { - "expr": "(histogram_quantile(0.50, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"destination\",destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\"}[1m])) by (le)) / 1000) or histogram_quantile(0.99, sum(irate(istio_request_duration_seconds_bucket{reporter=\"destination\",destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\"}[1m])) by (le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "P99", - "refId": "C" - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Request 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": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "#299c46", - "rgba(237, 129, 40, 0.89)", - "#d44a3a" - ], - "datasource": "Prometheus", - "format": "Bps", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 4, - "w": 12, - "x": 0, - "y": 7 - }, - "id": 84, - "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" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": true, - "lineColor": "rgb(31, 120, 193)", - "show": true - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(irate(istio_tcp_sent_bytes_total{reporter=\"destination\", destination_workload_namespace=~\"$namespace\", destination_workload=~\"$workload\"}[1m])) + sum(irate(istio_tcp_received_bytes_total{reporter=\"destination\", destination_workload_namespace=~\"$namespace\", destination_workload=~\"$workload\"}[1m]))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": "", - "title": "TCP Server Traffic", - "transparent": false, - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "avg" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "#299c46", - "rgba(237, 129, 40, 0.89)", - "#d44a3a" - ], - "datasource": "Prometheus", - "format": "Bps", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 4, - "w": 12, - "x": 12, - "y": 7 - }, - "id": 85, - "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" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": true, - "lineColor": "rgb(31, 120, 193)", - "show": true - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(irate(istio_tcp_sent_bytes_total{reporter=\"source\", source_workload_namespace=~\"$namespace\", source_workload=~\"$workload\"}[1m])) + sum(irate(istio_tcp_received_bytes_total{reporter=\"source\", source_workload_namespace=~\"$namespace\", source_workload=~\"$workload\"}[1m]))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": "", - "title": "TCP Client Traffic", - "transparent": false, - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "avg" - }, - { - "content": "
\nINBOUND WORKLOADS\n
", - "gridPos": { - "h": 3, - "w": 24, - "x": 0, - "y": 11 - }, - "id": 45, - "links": [], - "mode": "html", - "title": "", - "transparent": true, - "type": "text" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 0, - "gridPos": { - "h": 6, - "w": 12, - "x": 0, - "y": 14 - }, - "id": 25, - "legend": { - "avg": false, - "current": false, - "hideEmpty": true, - "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, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "round(sum(irate(istio_requests_total{connection_security_policy=\"mutual_tls\", destination_workload_namespace=~\"$namespace\", destination_workload=~\"$workload\", reporter=\"destination\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[5m])) by (source_workload, source_workload_namespace, response_code), 0.001)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{ source_workload }}.{{ source_workload_namespace }} : {{ response_code }} (🔐mTLS)", - "refId": "B", - "step": 2 - }, - { - "expr": "round(sum(irate(istio_requests_total{connection_security_policy!=\"mutual_tls\", destination_workload_namespace=~\"$namespace\", destination_workload=~\"$workload\", reporter=\"destination\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[5m])) by (source_workload, source_workload_namespace, response_code), 0.001)", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ source_workload }}.{{ source_workload_namespace }} : {{ response_code }}", - "refId": "A", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Incoming Requests by Source And Response Code", - "tooltip": { - "shared": false, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ - "total" - ] - }, - "yaxes": [ - { - "format": "ops", - "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": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 12, - "x": 12, - "y": 14 - }, - "id": 26, - "legend": { - "avg": false, - "current": false, - "hideEmpty": true, - "hideZero": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(irate(istio_requests_total{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_workload_namespace=~\"$namespace\", destination_workload=~\"$workload\",response_code!~\"5.*\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[5m])) by (source_workload, source_workload_namespace) / sum(irate(istio_requests_total{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_workload_namespace=~\"$namespace\", destination_workload=~\"$workload\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[5m])) by (source_workload, source_workload_namespace)", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ source_workload }}.{{ source_workload_namespace }} (🔐mTLS)", - "refId": "A", - "step": 2 - }, - { - "expr": "sum(irate(istio_requests_total{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_workload_namespace=~\"$namespace\", destination_workload=~\"$workload\",response_code!~\"5.*\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[5m])) by (source_workload, source_workload_namespace) / sum(irate(istio_requests_total{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_workload_namespace=~\"$namespace\", destination_workload=~\"$workload\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[5m])) by (source_workload, source_workload_namespace)", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ source_workload }}.{{ source_workload_namespace }}", - "refId": "B", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Incoming Success Rate (non-5xx responses) By Source", - "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.01", - "min": "0", - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "description": "", - "fill": 1, - "gridPos": { - "h": 6, - "w": 8, - "x": 0, - "y": 20 - }, - "id": 27, - "legend": { - "alignAsTable": false, - "avg": false, - "current": false, - "hideEmpty": true, - "hideZero": 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", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "(histogram_quantile(0.50, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le)) / 1000) or histogram_quantile(0.50, sum(irate(istio_request_duration_seconds_bucket{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P50 (🔐mTLS)", - "refId": "D", - "step": 2 - }, - { - "expr": "(histogram_quantile(0.90, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le)) / 1000) or histogram_quantile(0.90, sum(irate(istio_request_duration_seconds_bucket{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P90 (🔐mTLS)", - "refId": "A", - "step": 2 - }, - { - "expr": "(histogram_quantile(0.95, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le)) / 1000) or histogram_quantile(0.95, sum(irate(istio_request_duration_seconds_bucket{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P95 (🔐mTLS)", - "refId": "B", - "step": 2 - }, - { - "expr": "(histogram_quantile(0.99, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le)) / 1000) or histogram_quantile(0.99, sum(irate(istio_request_duration_seconds_bucket{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P99 (🔐mTLS)", - "refId": "C", - "step": 2 - }, - { - "expr": "(histogram_quantile(0.50, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le)) / 1000) or histogram_quantile(0.50, sum(irate(istio_request_duration_seconds_bucket{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P50", - "refId": "E", - "step": 2 - }, - { - "expr": "(histogram_quantile(0.90, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le)) / 1000) or histogram_quantile(0.90, sum(irate(istio_request_duration_seconds_bucket{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P90", - "refId": "F", - "step": 2 - }, - { - "expr": "(histogram_quantile(0.95, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le)) / 1000) or histogram_quantile(0.95, sum(irate(istio_request_duration_seconds_bucket{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P95", - "refId": "G", - "step": 2 - }, - { - "expr": "(histogram_quantile(0.99, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le)) / 1000) or histogram_quantile(0.99, sum(irate(istio_request_duration_seconds_bucket{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P99", - "refId": "H", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Incoming Request Duration by Source", - "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": "0", - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 8, - "x": 8, - "y": 20 - }, - "id": 28, - "legend": { - "alignAsTable": false, - "avg": false, - "current": false, - "hideEmpty": true, - "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", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.50, sum(irate(istio_request_bytes_bucket{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P50 (🔐mTLS)", - "refId": "D", - "step": 2 - }, - { - "expr": "histogram_quantile(0.90, sum(irate(istio_request_bytes_bucket{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P90 (🔐mTLS)", - "refId": "A", - "step": 2 - }, - { - "expr": "histogram_quantile(0.95, sum(irate(istio_request_bytes_bucket{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P95 (🔐mTLS)", - "refId": "B", - "step": 2 - }, - { - "expr": "histogram_quantile(0.99, sum(irate(istio_request_bytes_bucket{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P99 (🔐mTLS)", - "refId": "C", - "step": 2 - }, - { - "expr": "histogram_quantile(0.50, sum(irate(istio_request_bytes_bucket{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P50", - "refId": "E", - "step": 2 - }, - { - "expr": "histogram_quantile(0.90, sum(irate(istio_request_bytes_bucket{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P90", - "refId": "F", - "step": 2 - }, - { - "expr": "histogram_quantile(0.95, sum(irate(istio_request_bytes_bucket{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P95", - "refId": "G", - "step": 2 - }, - { - "expr": "histogram_quantile(0.99, sum(irate(istio_request_bytes_bucket{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P99", - "refId": "H", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Incoming Request Size By Source", - "tooltip": { - "shared": true, - "sort": 0, - "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 - } - ] - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 8, - "x": 16, - "y": 20 - }, - "id": 68, - "legend": { - "alignAsTable": false, - "avg": false, - "current": false, - "hideEmpty": true, - "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", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.50, sum(irate(istio_response_bytes_bucket{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P50 (🔐mTLS)", - "refId": "D", - "step": 2 - }, - { - "expr": "histogram_quantile(0.90, sum(irate(istio_response_bytes_bucket{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P90 (🔐mTLS)", - "refId": "A", - "step": 2 - }, - { - "expr": "histogram_quantile(0.95, sum(irate(istio_response_bytes_bucket{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P95 (🔐mTLS)", - "refId": "B", - "step": 2 - }, - { - "expr": "histogram_quantile(0.99, sum(irate(istio_response_bytes_bucket{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P99 (🔐mTLS)", - "refId": "C", - "step": 2 - }, - { - "expr": "histogram_quantile(0.50, sum(irate(istio_response_bytes_bucket{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P50", - "refId": "E", - "step": 2 - }, - { - "expr": "histogram_quantile(0.90, sum(irate(istio_response_bytes_bucket{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P90", - "refId": "F", - "step": 2 - }, - { - "expr": "histogram_quantile(0.95, sum(irate(istio_response_bytes_bucket{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P95", - "refId": "G", - "step": 2 - }, - { - "expr": "histogram_quantile(0.99, sum(irate(istio_response_bytes_bucket{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_workload=~\"$workload\", destination_workload_namespace=~\"$namespace\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{source_workload}}.{{source_workload_namespace}} P99", - "refId": "H", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Response Size By Source", - "tooltip": { - "shared": true, - "sort": 0, - "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 - } - ] - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 12, - "x": 0, - "y": 26 - }, - "id": 80, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "round(sum(irate(istio_tcp_received_bytes_total{reporter=\"destination\", connection_security_policy=\"mutual_tls\", destination_workload_namespace=~\"$namespace\", destination_workload=~\"$workload\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace), 0.001)", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ source_workload }}.{{ source_workload_namespace}} (🔐mTLS)", - "refId": "A", - "step": 2 - }, - { - "expr": "round(sum(irate(istio_tcp_received_bytes_total{reporter=\"destination\", connection_security_policy!=\"mutual_tls\", destination_workload_namespace=~\"$namespace\", destination_workload=~\"$workload\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace), 0.001)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{ source_workload }}.{{ source_workload_namespace}}", - "refId": "B", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Bytes Received from Incoming TCP Connection", - "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": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ] - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 12, - "x": 12, - "y": 26 - }, - "id": 82, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "round(sum(irate(istio_tcp_sent_bytes_total{connection_security_policy=\"mutual_tls\", reporter=\"destination\", destination_workload_namespace=~\"$namespace\", destination_workload=~\"$workload\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace), 0.001)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{ source_workload }}.{{ source_workload_namespace}} (🔐mTLS)", - "refId": "A", - "step": 2 - }, - { - "expr": "round(sum(irate(istio_tcp_sent_bytes_total{connection_security_policy!=\"mutual_tls\", reporter=\"destination\", destination_workload_namespace=~\"$namespace\", destination_workload=~\"$workload\", source_workload=~\"$srcwl\", source_workload_namespace=~\"$srcns\"}[1m])) by (source_workload, source_workload_namespace), 0.001)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{ source_workload }}.{{ source_workload_namespace}}", - "refId": "B", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Bytes Sent to Incoming TCP Connection", - "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": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ] - }, - { - "content": "
\nOUTBOUND SERVICES\n
", - "gridPos": { - "h": 3, - "w": 24, - "x": 0, - "y": 32 - }, - "id": 69, - "links": [], - "mode": "html", - "title": "", - "transparent": true, - "type": "text" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 0, - "gridPos": { - "h": 6, - "w": 12, - "x": 0, - "y": 35 - }, - "id": 70, - "legend": { - "avg": false, - "current": false, - "hideEmpty": true, - "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, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "round(sum(irate(istio_requests_total{connection_security_policy=\"mutual_tls\", source_workload_namespace=~\"$namespace\", source_workload=~\"$workload\", reporter=\"source\", destination_service=~\"$dstsvc\"}[5m])) by (destination_service, response_code), 0.001)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{ destination_service }} : {{ response_code }} (🔐mTLS)", - "refId": "B", - "step": 2 - }, - { - "expr": "round(sum(irate(istio_requests_total{connection_security_policy!=\"mutual_tls\", source_workload_namespace=~\"$namespace\", source_workload=~\"$workload\", reporter=\"source\", destination_service=~\"$dstsvc\"}[5m])) by (destination_service, response_code), 0.001)", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_service }} : {{ response_code }}", - "refId": "A", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Outgoing Requests by Destination And Response Code", - "tooltip": { - "shared": false, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ - "total" - ] - }, - "yaxes": [ - { - "format": "ops", - "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": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 12, - "x": 12, - "y": 35 - }, - "id": 71, - "legend": { - "avg": false, - "current": false, - "hideEmpty": true, - "hideZero": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(irate(istio_requests_total{reporter=\"source\", connection_security_policy=\"mutual_tls\", source_workload_namespace=~\"$namespace\", source_workload=~\"$workload\",response_code!~\"5.*\", destination_service=~\"$dstsvc\"}[5m])) by (destination_service) / sum(irate(istio_requests_total{reporter=\"source\", connection_security_policy=\"mutual_tls\", source_workload_namespace=~\"$namespace\", source_workload=~\"$workload\", destination_service=~\"$dstsvc\"}[5m])) by (destination_service)", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_service }} (🔐mTLS)", - "refId": "A", - "step": 2 - }, - { - "expr": "sum(irate(istio_requests_total{reporter=\"source\", connection_security_policy!=\"mutual_tls\", source_workload_namespace=~\"$namespace\", source_workload=~\"$workload\",response_code!~\"5.*\", destination_service=~\"$dstsvc\"}[5m])) by (destination_service) / sum(irate(istio_requests_total{reporter=\"source\", connection_security_policy!=\"mutual_tls\", source_workload_namespace=~\"$namespace\", source_workload=~\"$workload\", destination_service=~\"$dstsvc\"}[5m])) by (destination_service)", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{destination_service }}", - "refId": "B", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Outgoing Success Rate (non-5xx responses) By Destination", - "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.01", - "min": "0", - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "description": "", - "fill": 1, - "gridPos": { - "h": 6, - "w": 8, - "x": 0, - "y": 41 - }, - "id": 72, - "legend": { - "alignAsTable": false, - "avg": false, - "current": false, - "hideEmpty": true, - "hideZero": 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", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "(histogram_quantile(0.50, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"source\", connection_security_policy=\"mutual_tls\", source_workload=~\"$workload\", source_workload_namespace=~\"$namespace\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service, le)) / 1000) or histogram_quantile(0.50, sum(irate(istio_request_duration_seconds_bucket{reporter=\"source\", connection_security_policy=\"mutual_tls\", source_workload=~\"$workload\", source_workload_namespace=~\"$namespace\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_service }} P50 (🔐mTLS)", - "refId": "D", - "step": 2 - }, - { - "expr": "(histogram_quantile(0.90, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"source\", connection_security_policy=\"mutual_tls\", source_workload=~\"$workload\", source_workload_namespace=~\"$namespace\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service, le)) / 1000) or histogram_quantile(0.90, sum(irate(istio_request_duration_seconds_bucket{reporter=\"source\", connection_security_policy=\"mutual_tls\", source_workload=~\"$workload\", source_workload_namespace=~\"$namespace\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_service }} P90 (🔐mTLS)", - "refId": "A", - "step": 2 - }, - { - "expr": "(histogram_quantile(0.95, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"source\", connection_security_policy=\"mutual_tls\", source_workload=~\"$workload\", source_workload_namespace=~\"$namespace\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service, le)) / 1000) or histogram_quantile(0.95, sum(irate(istio_request_duration_seconds_bucket{reporter=\"source\", connection_security_policy=\"mutual_tls\", source_workload=~\"$workload\", source_workload_namespace=~\"$namespace\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_service }} P95 (🔐mTLS)", - "refId": "B", - "step": 2 - }, - { - "expr": "(histogram_quantile(0.99, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"source\", connection_security_policy=\"mutual_tls\", source_workload=~\"$workload\", source_workload_namespace=~\"$namespace\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service, le)) / 1000) or histogram_quantile(0.99, sum(irate(istio_request_duration_seconds_bucket{reporter=\"source\", connection_security_policy=\"mutual_tls\", source_workload=~\"$workload\", source_workload_namespace=~\"$namespace\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_service }} P99 (🔐mTLS)", - "refId": "C", - "step": 2 - }, - { - "expr": "(histogram_quantile(0.50, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"source\", connection_security_policy!=\"mutual_tls\", source_workload=~\"$workload\", source_workload_namespace=~\"$namespace\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service, le)) / 1000) or histogram_quantile(0.50, sum(irate(istio_request_duration_seconds_bucket{reporter=\"source\", connection_security_policy!=\"mutual_tls\", source_workload=~\"$workload\", source_workload_namespace=~\"$namespace\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_service }} P50", - "refId": "E", - "step": 2 - }, - { - "expr": "(histogram_quantile(0.90, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"source\", connection_security_policy!=\"mutual_tls\", source_workload=~\"$workload\", source_workload_namespace=~\"$namespace\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service, le)) / 1000) or histogram_quantile(0.90, sum(irate(istio_request_duration_seconds_bucket{reporter=\"source\", connection_security_policy!=\"mutual_tls\", source_workload=~\"$workload\", source_workload_namespace=~\"$namespace\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_service }} P90", - "refId": "F", - "step": 2 - }, - { - "expr": "(histogram_quantile(0.95, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"source\", connection_security_policy!=\"mutual_tls\", source_workload=~\"$workload\", source_workload_namespace=~\"$namespace\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service, le)) / 1000) or histogram_quantile(0.95, sum(irate(istio_request_duration_seconds_bucket{reporter=\"source\", connection_security_policy!=\"mutual_tls\", source_workload=~\"$workload\", source_workload_namespace=~\"$namespace\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_service }} P95", - "refId": "G", - "step": 2 - }, - { - "expr": "(histogram_quantile(0.99, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"source\", connection_security_policy!=\"mutual_tls\", source_workload=~\"$workload\", source_workload_namespace=~\"$namespace\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service, le)) / 1000) or histogram_quantile(0.99, sum(irate(istio_request_duration_seconds_bucket{reporter=\"source\", connection_security_policy!=\"mutual_tls\", source_workload=~\"$workload\", source_workload_namespace=~\"$namespace\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_service }} P99", - "refId": "H", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Outgoing Request Duration by Destination", - "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": "0", - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 8, - "x": 8, - "y": 41 - }, - "id": 73, - "legend": { - "alignAsTable": false, - "avg": false, - "current": false, - "hideEmpty": true, - "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", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.50, sum(irate(istio_request_bytes_bucket{reporter=\"source\", connection_security_policy=\"mutual_tls\", source_workload=~\"$workload\", source_workload_namespace=~\"$namespace\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_service }} P50 (🔐mTLS)", - "refId": "D", - "step": 2 - }, - { - "expr": "histogram_quantile(0.90, sum(irate(istio_request_bytes_bucket{reporter=\"source\", connection_security_policy=\"mutual_tls\", source_workload=~\"$workload\", source_workload_namespace=~\"$namespace\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_service }} P90 (🔐mTLS)", - "refId": "A", - "step": 2 - }, - { - "expr": "histogram_quantile(0.95, sum(irate(istio_request_bytes_bucket{reporter=\"source\", connection_security_policy=\"mutual_tls\", source_workload=~\"$workload\", source_workload_namespace=~\"$namespace\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_service }} P95 (🔐mTLS)", - "refId": "B", - "step": 2 - }, - { - "expr": "histogram_quantile(0.99, sum(irate(istio_request_bytes_bucket{reporter=\"source\", connection_security_policy=\"mutual_tls\", source_workload=~\"$workload\", source_workload_namespace=~\"$namespace\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_service }} P99 (🔐mTLS)", - "refId": "C", - "step": 2 - }, - { - "expr": "histogram_quantile(0.50, sum(irate(istio_request_bytes_bucket{reporter=\"source\", connection_security_policy!=\"mutual_tls\", source_workload=~\"$workload\", source_workload_namespace=~\"$namespace\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_service }} P50", - "refId": "E", - "step": 2 - }, - { - "expr": "histogram_quantile(0.90, sum(irate(istio_request_bytes_bucket{reporter=\"source\", connection_security_policy!=\"mutual_tls\", source_workload=~\"$workload\", source_workload_namespace=~\"$namespace\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_service }} P90", - "refId": "F", - "step": 2 - }, - { - "expr": "histogram_quantile(0.95, sum(irate(istio_request_bytes_bucket{reporter=\"source\", connection_security_policy!=\"mutual_tls\", source_workload=~\"$workload\", source_workload_namespace=~\"$namespace\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_service }} P95", - "refId": "G", - "step": 2 - }, - { - "expr": "histogram_quantile(0.99, sum(irate(istio_request_bytes_bucket{reporter=\"source\", connection_security_policy!=\"mutual_tls\", source_workload=~\"$workload\", source_workload_namespace=~\"$namespace\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_service }} P99", - "refId": "H", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Outgoing Request Size By Destination", - "tooltip": { - "shared": true, - "sort": 0, - "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 - } - ] - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 8, - "x": 16, - "y": 41 - }, - "id": 74, - "legend": { - "alignAsTable": false, - "avg": false, - "current": false, - "hideEmpty": true, - "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", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.50, sum(irate(istio_response_bytes_bucket{reporter=\"source\", connection_security_policy=\"mutual_tls\", source_workload=~\"$workload\", source_workload_namespace=~\"$namespace\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_service }} P50 (🔐mTLS)", - "refId": "D", - "step": 2 - }, - { - "expr": "histogram_quantile(0.90, sum(irate(istio_response_bytes_bucket{reporter=\"source\", connection_security_policy=\"mutual_tls\", source_workload=~\"$workload\", source_workload_namespace=~\"$namespace\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_service }} P90 (🔐mTLS)", - "refId": "A", - "step": 2 - }, - { - "expr": "histogram_quantile(0.95, sum(irate(istio_response_bytes_bucket{reporter=\"source\", connection_security_policy=\"mutual_tls\", source_workload=~\"$workload\", source_workload_namespace=~\"$namespace\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_service }} P95 (🔐mTLS)", - "refId": "B", - "step": 2 - }, - { - "expr": "histogram_quantile(0.99, sum(irate(istio_response_bytes_bucket{reporter=\"source\", connection_security_policy=\"mutual_tls\", source_workload=~\"$workload\", source_workload_namespace=~\"$namespace\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_service }} P99 (🔐mTLS)", - "refId": "C", - "step": 2 - }, - { - "expr": "histogram_quantile(0.50, sum(irate(istio_response_bytes_bucket{reporter=\"source\", connection_security_policy!=\"mutual_tls\", source_workload=~\"$workload\", source_workload_namespace=~\"$namespace\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_service }} P50", - "refId": "E", - "step": 2 - }, - { - "expr": "histogram_quantile(0.90, sum(irate(istio_response_bytes_bucket{reporter=\"source\", connection_security_policy!=\"mutual_tls\", source_workload=~\"$workload\", source_workload_namespace=~\"$namespace\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_service }} P90", - "refId": "F", - "step": 2 - }, - { - "expr": "histogram_quantile(0.95, sum(irate(istio_response_bytes_bucket{reporter=\"source\", connection_security_policy!=\"mutual_tls\", source_workload=~\"$workload\", source_workload_namespace=~\"$namespace\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_service }} P95", - "refId": "G", - "step": 2 - }, - { - "expr": "histogram_quantile(0.99, sum(irate(istio_response_bytes_bucket{reporter=\"source\", connection_security_policy!=\"mutual_tls\", source_workload=~\"$workload\", source_workload_namespace=~\"$namespace\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service, le))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{ destination_service }} P99", - "refId": "H", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Response Size By Destination", - "tooltip": { - "shared": true, - "sort": 0, - "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 - } - ] - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 12, - "x": 0, - "y": 47 - }, - "id": 76, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "round(sum(irate(istio_tcp_sent_bytes_total{connection_security_policy=\"mutual_tls\", reporter=\"source\", source_workload_namespace=~\"$namespace\", source_workload=~\"$workload\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service), 0.001)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{ destination_service }} (🔐mTLS)", - "refId": "A", - "step": 2 - }, - { - "expr": "round(sum(irate(istio_tcp_sent_bytes_total{connection_security_policy!=\"mutual_tls\", reporter=\"source\", source_workload_namespace=~\"$namespace\", source_workload=~\"$workload\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service), 0.001)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{ destination_service }}", - "refId": "B", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Bytes Sent on Outgoing TCP Connection", - "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": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ] - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 12, - "x": 12, - "y": 47 - }, - "id": 78, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "round(sum(irate(istio_tcp_received_bytes_total{reporter=\"source\", connection_security_policy=\"mutual_tls\", source_workload_namespace=~\"$namespace\", source_workload=~\"$workload\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service), 0.001)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{ destination_service }} (🔐mTLS)", - "refId": "A", - "step": 2 - }, - { - "expr": "round(sum(irate(istio_tcp_received_bytes_total{reporter=\"source\", connection_security_policy!=\"mutual_tls\", source_workload_namespace=~\"$namespace\", source_workload=~\"$workload\", destination_service=~\"$dstsvc\"}[1m])) by (destination_service), 0.001)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{ destination_service }}", - "refId": "B", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Bytes Received from Outgoing TCP Connection", - "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": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ] - } - ], - "refresh": "10s", - "schemaVersion": 16, - "style": "dark", - "tags": [], - "templating": { - "list": [ - { - "allValue": null, - "current": {}, - "datasource": "Prometheus", - "hide": 0, - "includeAll": false, - "label": "Namespace", - "multi": false, - "name": "namespace", - "options": [], - "query": "query_result(sum(istio_requests_total) by (destination_workload_namespace) or sum(istio_tcp_sent_bytes_total) by (destination_workload_namespace))", - "refresh": 1, - "regex": "/.*_namespace=\"([^\"]*).*/", - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": {}, - "datasource": "Prometheus", - "hide": 0, - "includeAll": false, - "label": "Workload", - "multi": false, - "name": "workload", - "options": [], - "query": "query_result((sum(istio_requests_total{destination_workload_namespace=~\"$namespace\"}) by (destination_workload) or sum(istio_requests_total{source_workload_namespace=~\"$namespace\"}) by (source_workload)) or (sum(istio_tcp_sent_bytes_total{destination_workload_namespace=~\"$namespace\"}) by (destination_workload) or sum(istio_tcp_sent_bytes_total{source_workload_namespace=~\"$namespace\"}) by (source_workload)))", - "refresh": 1, - "regex": "/.*workload=\"([^\"]*).*/", - "sort": 1, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": {}, - "datasource": "Prometheus", - "hide": 0, - "includeAll": true, - "label": "Inbound Workload Namespace", - "multi": true, - "name": "srcns", - "options": [], - "query": "query_result( sum(istio_requests_total{reporter=\"destination\", destination_workload=\"$workload\", destination_workload_namespace=~\"$namespace\"}) by (source_workload_namespace) or sum(istio_tcp_sent_bytes_total{reporter=\"destination\", destination_workload=\"$workload\", destination_workload_namespace=~\"$namespace\"}) by (source_workload_namespace))", - "refresh": 1, - "regex": "/.*namespace=\"([^\"]*).*/", - "sort": 2, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": {}, - "datasource": "Prometheus", - "hide": 0, - "includeAll": true, - "label": "Inbound Workload", - "multi": true, - "name": "srcwl", - "options": [], - "query": "query_result( sum(istio_requests_total{reporter=\"destination\", destination_workload=\"$workload\", destination_workload_namespace=~\"$namespace\", source_workload_namespace=~\"$srcns\"}) by (source_workload) or sum(istio_tcp_sent_bytes_total{reporter=\"destination\", destination_workload=\"$workload\", destination_workload_namespace=~\"$namespace\", source_workload_namespace=~\"$srcns\"}) by (source_workload))", - "refresh": 1, - "regex": "/.*workload=\"([^\"]*).*/", - "sort": 3, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": {}, - "datasource": "Prometheus", - "hide": 0, - "includeAll": true, - "label": "Destination Service", - "multi": true, - "name": "dstsvc", - "options": [], - "query": "query_result( sum(istio_requests_total{reporter=\"source\", source_workload=~\"$workload\", source_workload_namespace=~\"$namespace\"}) by (destination_service) or sum(istio_tcp_sent_bytes_total{reporter=\"source\", source_workload=~\"$workload\", source_workload_namespace=~\"$namespace\"}) by (destination_service))", - "refresh": 1, - "regex": "/.*destination_service=\"([^\"]*).*/", - "sort": 4, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-5m", - "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": "Istio Workload Dashboard", - "uid": "UbsSZTDik", - "version": 1 -} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/grafana/dashboards/mixer-dashboard.json b/kubernetes/helm_charts/istio-system/istio/charts/grafana/dashboards/mixer-dashboard.json deleted file mode 100755 index b074d13ba..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/grafana/dashboards/mixer-dashboard.json +++ /dev/null @@ -1,1808 +0,0 @@ -{ - "__inputs": [ - { - "name": "DS_PROMETHEUS", - "label": "Prometheus", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" - } - ], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "5.2.3" - }, - { - "type": "panel", - "id": "graph", - "name": "Graph", - "version": "5.0.0" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "5.0.0" - }, - { - "type": "panel", - "id": "text", - "name": "Text", - "version": "5.0.0" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "limit": 100, - "name": "Annotations & Alerts", - "showIn": 0, - "type": "dashboard" - } - ] - }, - "editable": false, - "gnetId": null, - "graphTooltip": 1, - "id": null, - "iteration": 1543881232533, - "links": [], - "panels": [ - { - "content": "

Deployed Versions

", - "gridPos": { - "h": 3, - "w": 24, - "x": 0, - "y": 0 - }, - "height": "40", - "id": 62, - "links": [], - "mode": "html", - "title": "", - "transparent": true, - "type": "text" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 5, - "w": 24, - "x": 0, - "y": 3 - }, - "id": 64, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(istio_build{component=\"mixer\"}) by (tag)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{ tag }}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Mixer Versions", - "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": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "content": "

Resource Usage

", - "gridPos": { - "h": 3, - "w": 24, - "x": 0, - "y": 8 - }, - "height": "40", - "id": 29, - "links": [], - "mode": "html", - "title": "", - "transparent": true, - "type": "text" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 11 - }, - "id": 5, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(process_virtual_memory_bytes{job=~\"istio-telemetry|istio-policy\"}) by (job)", - "format": "time_series", - "instant": false, - "intervalFactor": 2, - "legendFormat": "Virtual Memory ({{ job }})", - "refId": "I" - }, - { - "expr": "sum(process_resident_memory_bytes{job=~\"istio-telemetry|istio-policy\"}) by (job)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Resident Memory ({{ job }})", - "refId": "H" - }, - { - "expr": "sum(go_memstats_heap_sys_bytes{job=~\"istio-telemetry|istio-policy\"}) by (job)", - "format": "time_series", - "hide": true, - "intervalFactor": 2, - "legendFormat": "heap sys ({{ job }})", - "refId": "A" - }, - { - "expr": "sum(go_memstats_heap_alloc_bytes{job=~\"istio-telemetry|istio-policy\"}) by (job)", - "format": "time_series", - "hide": true, - "intervalFactor": 2, - "legendFormat": "heap alloc ({{ job }})", - "refId": "D" - }, - { - "expr": "sum(go_memstats_alloc_bytes{job=~\"istio-telemetry|istio-policy\"}) by (job)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Alloc ({{ job }})", - "refId": "F" - }, - { - "expr": "sum(go_memstats_heap_inuse_bytes{job=~\"istio-telemetry|istio-policy\"}) by (job)", - "format": "time_series", - "hide": false, - "intervalFactor": 2, - "legendFormat": "Heap in-use ({{ job }})", - "refId": "E" - }, - { - "expr": "sum(go_memstats_stack_inuse_bytes{job=~\"istio-telemetry|istio-policy\"}) by (job)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Stack in-use ({{ job }})", - "refId": "G" - }, - { - "expr": "sum(label_replace(container_memory_usage_bytes{job=\"kubernetes-cadvisor\", container_name=~\"mixer|istio-proxy\", pod_name=~\"istio-telemetry-.*|istio-policy-.*\"}, \"service\", \"$1\" , \"pod_name\", \"(istio-telemetry|istio-policy)-.*\")) by (service)", - "format": "time_series", - "hide": false, - "intervalFactor": 2, - "legendFormat": "{{ service }} total (k8s)", - "refId": "C" - }, - { - "expr": "sum(label_replace(container_memory_usage_bytes{job=\"kubernetes-cadvisor\", container_name=~\"mixer|istio-proxy\", pod_name=~\"istio-telemetry-.*|istio-policy-.*\"}, \"service\", \"$1\" , \"pod_name\", \"(istio-telemetry|istio-policy)-.*\")) by (container_name, service)", - "format": "time_series", - "hide": false, - "intervalFactor": 2, - "legendFormat": "{{ service }} - {{ container_name }} (k8s)", - "refId": "B" - } - ], - "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": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 7, - "w": 6, - "x": 6, - "y": 11 - }, - "id": 6, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "label_replace(sum(rate(container_cpu_usage_seconds_total{job=\"kubernetes-cadvisor\",container_name=~\"mixer|istio-proxy\", pod_name=~\"istio-telemetry-.*|istio-policy-.*\"}[1m])) by (pod_name), \"service\", \"$1\" , \"pod_name\", \"(istio-telemetry|istio-policy)-.*\")", - "format": "time_series", - "hide": false, - "intervalFactor": 2, - "legendFormat": "{{ service }} total (k8s)", - "refId": "A" - }, - { - "expr": "label_replace(sum(rate(container_cpu_usage_seconds_total{job=\"kubernetes-cadvisor\",container_name=~\"mixer|istio-proxy\", pod_name=~\"istio-telemetry-.*|istio-policy-.*\"}[1m])) by (container_name, pod_name), \"service\", \"$1\" , \"pod_name\", \"(istio-telemetry|istio-policy)-.*\")", - "format": "time_series", - "hide": false, - "intervalFactor": 2, - "legendFormat": "{{ service }} - {{ container_name }} (k8s)", - "refId": "B" - }, - { - "expr": "sum(irate(process_cpu_seconds_total{job=~\"istio-telemetry|istio-policy\"}[1m])) by (job)", - "format": "time_series", - "hide": false, - "intervalFactor": 2, - "legendFormat": "{{ job }} (self-reported)", - "refId": "C" - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "CPU", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 7, - "w": 6, - "x": 12, - "y": 11 - }, - "id": 7, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(process_open_fds{job=~\"istio-telemetry|istio-policy\"}) by (job)", - "format": "time_series", - "hide": true, - "instant": false, - "interval": "", - "intervalFactor": 2, - "legendFormat": "Open FDs ({{ job }})", - "refId": "A" - }, - { - "expr": "sum(label_replace(container_fs_usage_bytes{job=\"kubernetes-cadvisor\", container_name=~\"mixer|istio-proxy\", pod_name=~\"istio-telemetry-.*|istio-policy-.*\"}, \"service\", \"$1\" , \"pod_name\", \"(istio-telemetry|istio-policy)-.*\")) by (container_name, service)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{ service }} - {{ container_name }}", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Disk", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": "", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "decimals": null, - "format": "none", - "label": "", - "logBase": 1024, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 7, - "w": 6, - "x": 18, - "y": 11 - }, - "id": 4, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(go_goroutines{job=~\"istio-telemetry|istio-policy\"}) by (job)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Number of Goroutines ({{ job }})", - "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": "", - "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 - } - }, - { - "content": "

Mixer Overview

", - "gridPos": { - "h": 3, - "w": 24, - "x": 0, - "y": 18 - }, - "height": "40px", - "id": 30, - "links": [], - "mode": "html", - "title": "", - "transparent": true, - "type": "text" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 6, - "x": 0, - "y": 21 - }, - "id": 9, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(grpc_io_server_completed_rpcs[1m]))", - "format": "time_series", - "hide": false, - "intervalFactor": 2, - "legendFormat": "mixer (Total)", - "refId": "B" - }, - { - "expr": "sum(rate(grpc_io_server_completed_rpcs[1m])) by (grpc_server_method)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "mixer ({{ grpc_server_method }})", - "refId": "C" - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Incoming Requests", - "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": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 6, - "x": 6, - "y": 21 - }, - "id": 8, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "{}", - "yaxis": 1 - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.5, sum(rate(grpc_io_server_server_latency_bucket{}[1m])) by (grpc_server_method, le))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{ grpc_server_method }} 0.5", - "refId": "B" - }, - { - "expr": "histogram_quantile(0.9, sum(rate(grpc_io_server_server_latency_bucket{}[1m])) by (grpc_server_method, le))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{ grpc_server_method }} 0.9", - "refId": "C" - }, - { - "expr": "histogram_quantile(0.99, sum(rate(grpc_io_server_server_latency_bucket{}[1m])) by (grpc_server_method, le))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{ grpc_server_method }} 0.99", - "refId": "D" - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Response Durations", - "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": null, - "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": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 6, - "x": 12, - "y": 21 - }, - "id": 11, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(grpc_server_handled_total{grpc_code=~\"Unknown|Unimplemented|Internal|DataLoss\"}[1m])) by (grpc_method)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Mixer {{ grpc_method }}", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Server Error Rate (5xx responses)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 6, - "w": 6, - "x": 18, - "y": 21 - }, - "id": 12, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(irate(grpc_server_handled_total{grpc_code!=\"OK\",grpc_service=~\".*Mixer\"}[1m])) by (grpc_method)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Mixer {{ grpc_method }}", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Non-successes (4xxs)", - "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 - } - }, - { - "content": "

Adapters and Config

", - "gridPos": { - "h": 3, - "w": 24, - "x": 0, - "y": 27 - }, - "id": 28, - "links": [], - "mode": "html", - "title": "", - "transparent": true, - "type": "text" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 30 - }, - "id": 13, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(irate(mixer_runtime_dispatches_total{adapter=~\"$adapter\"}[1m])) by (adapter)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{ adapter }}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Adapter Dispatch Count", - "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": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 30 - }, - "id": 14, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.5, sum(irate(mixer_runtime_dispatch_duration_seconds_bucket{adapter=~\"$adapter\"}[1m])) by (adapter, le))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{ adapter }} - p50", - "refId": "A" - }, - { - "expr": "histogram_quantile(0.9, sum(irate(mixer_runtime_dispatch_duration_seconds_bucket{adapter=~\"$adapter\"}[1m])) by (adapter, le))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{ adapter }} - p90 ", - "refId": "B" - }, - { - "expr": "histogram_quantile(0.99, sum(irate(mixer_runtime_dispatch_duration_seconds_bucket{adapter=~\"$adapter\"}[1m])) by (adapter, le))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{ adapter }} - p99", - "refId": "C" - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Adapter Dispatch Duration", - "tooltip": { - "shared": true, - "sort": 1, - "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": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 37 - }, - "id": 60, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "scalar(topk(1, max(mixer_config_rule_config_count) by (configID)))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Rules", - "refId": "A" - }, - { - "expr": "scalar(topk(1, max(mixer_config_rule_config_error_count) by (configID)))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Config Errors", - "refId": "B" - }, - { - "expr": "scalar(topk(1, max(mixer_config_rule_config_match_error_count) by (configID)))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Match Errors", - "refId": "C" - }, - { - "expr": "scalar(topk(1, max(mixer_config_unsatisfied_action_handler_count) by (configID)))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Unsatisfied Actions", - "refId": "D" - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Rules", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 7, - "w": 6, - "x": 6, - "y": 37 - }, - "id": 56, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "scalar(topk(1, max(mixer_config_instance_config_count) by (configID)))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Instances", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Instances in Latest Config", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 7, - "w": 6, - "x": 12, - "y": 37 - }, - "id": 54, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "scalar(topk(1, max(mixer_config_handler_config_count) by (configID)))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Handlers", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Handlers in Latest Config", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 7, - "w": 6, - "x": 18, - "y": 37 - }, - "id": 58, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "scalar(topk(1, max(mixer_config_attribute_count) by (configID)))", - "format": "time_series", - "instant": false, - "intervalFactor": 1, - "legendFormat": "Attributes", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Attributes in Latest Config", - "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 - } - }, - { - "content": "

Individual Adapters

", - "gridPos": { - "h": 3, - "w": 24, - "x": 0, - "y": 44 - }, - "id": 23, - "links": [], - "mode": "html", - "title": "", - "transparent": true, - "type": "text" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 47 - }, - "id": 46, - "panels": [], - "repeat": "adapter", - "title": "$adapter Adapter", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 48 - }, - "id": 17, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "label_replace(irate(mixer_runtime_dispatches_total{adapter=~\"$adapter\"}[1m]),\"handler\", \"$1 ($3)\", \"handler\", \"(.*)\\\\.(.*)\\\\.(.*)\")", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{ handler }} (error: {{ error }})", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Dispatch Count By Handler", - "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": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 48 - }, - "id": 18, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "label_replace(histogram_quantile(0.5, sum(rate(mixer_runtime_dispatch_duration_seconds_bucket{adapter=~\"$adapter\"}[1m])) by (handler, error, le)), \"handler_short\", \"$1 ($3)\", \"handler\", \"(.*)\\\\.(.*)\\\\.(.*)\")", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "p50 - {{ handler_short }} (error: {{ error }})", - "refId": "A" - }, - { - "expr": "label_replace(histogram_quantile(0.9, sum(irate(mixer_runtime_dispatch_duration_seconds_bucket{adapter=~\"$adapter\"}[1m])) by (handler, error, le)), \"handler_short\", \"$1 ($3)\", \"handler\", \"(.*)\\\\.(.*)\\\\.(.*)\")", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "p90 - {{ handler_short }} (error: {{ error }})", - "refId": "D" - }, - { - "expr": "label_replace(histogram_quantile(0.99, sum(irate(mixer_runtime_dispatch_duration_seconds_bucket{adapter=~\"$adapter\"}[1m])) by (handler, error, le)), \"handler_short\", \"$1 ($3)\", \"handler\", \"(.*)\\\\.(.*)\\\\.(.*)\")", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "p99 - {{ handler_short }} (error: {{ error }})", - "refId": "E" - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Dispatch Duration By Handler", - "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": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "refresh": "5s", - "schemaVersion": 16, - "style": "dark", - "tags": [], - "templating": { - "list": [ - { - "allValue": null, - "current": {}, - "datasource": "Prometheus", - "hide": 0, - "includeAll": true, - "label": "Adapter", - "multi": true, - "name": "adapter", - "options": [], - "query": "label_values(adapter)", - "refresh": 2, - "regex": "", - "sort": 1, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-5m", - "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": "Istio Mixer Dashboard", - "version": 4 -} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/grafana/dashboards/pilot-dashboard.json b/kubernetes/helm_charts/istio-system/istio/charts/grafana/dashboards/pilot-dashboard.json deleted file mode 100755 index b8ef6d2d7..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/grafana/dashboards/pilot-dashboard.json +++ /dev/null @@ -1,1591 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": false, - "gnetId": null, - "graphTooltip": 1, - "id": 11, - "links": [], - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 60, - "panels": [], - "title": "Deployed Versions", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 5, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 56, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(istio_build{component=\"pilot\"}) by (tag)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{ tag }}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Pilot Versions", - "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": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 6 - }, - "id": 62, - "panels": [], - "title": "Resource Usage", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 7 - }, - "id": 5, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "process_virtual_memory_bytes{job=\"pilot\"}", - "format": "time_series", - "instant": false, - "intervalFactor": 2, - "legendFormat": "Virtual Memory", - "refId": "I", - "step": 2 - }, - { - "expr": "process_resident_memory_bytes{job=\"pilot\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Resident Memory", - "refId": "H", - "step": 2 - }, - { - "expr": "go_memstats_heap_sys_bytes{job=\"pilot\"}", - "format": "time_series", - "hide": true, - "intervalFactor": 2, - "legendFormat": "heap sys", - "refId": "A" - }, - { - "expr": "go_memstats_heap_alloc_bytes{job=\"pilot\"}", - "format": "time_series", - "hide": true, - "intervalFactor": 2, - "legendFormat": "heap alloc", - "refId": "D" - }, - { - "expr": "go_memstats_alloc_bytes{job=\"pilot\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Alloc", - "refId": "F", - "step": 2 - }, - { - "expr": "go_memstats_heap_inuse_bytes{job=\"pilot\"}", - "format": "time_series", - "hide": false, - "intervalFactor": 2, - "legendFormat": "Heap in-use", - "refId": "E", - "step": 2 - }, - { - "expr": "go_memstats_stack_inuse_bytes{job=\"pilot\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Stack in-use", - "refId": "G", - "step": 2 - }, - { - "expr": "container_memory_usage_bytes{job=\"kubernetes-cadvisor\", container_name=~\"discovery\", pod_name=~\"istio-pilot-.*\"}", - "format": "time_series", - "hide": false, - "intervalFactor": 2, - "legendFormat": "Discovery (container)", - "refId": "B", - "step": 2 - }, - { - "expr": "container_memory_usage_bytes{job=\"kubernetes-cadvisor\", container_name=~\"istio-proxy\", pod_name=~\"istio-pilot-.*\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Sidecar (container)", - "refId": "C" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "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": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 7, - "w": 6, - "x": 6, - "y": 7 - }, - "id": 6, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(irate(container_cpu_usage_seconds_total{job=\"kubernetes-cadvisor\",container_name=\"discovery\", pod_name=~\"istio-pilot-.*\"}[1m]))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Discovery (container)", - "refId": "A" - }, - { - "expr": "irate(process_cpu_seconds_total{job=\"pilot\"}[1m])", - "format": "time_series", - "hide": false, - "intervalFactor": 2, - "legendFormat": "Discovery (process)", - "refId": "C", - "step": 2 - }, - { - "expr": "sum(irate(container_cpu_usage_seconds_total{job=\"kubernetes-cadvisor\",container_name=\"istio-proxy\", pod_name=~\"istio-pilot-.*\"}[1m]))", - "format": "time_series", - "hide": false, - "intervalFactor": 2, - "legendFormat": "Sidecar (container)", - "refId": "B", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "CPU", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 7, - "w": 6, - "x": 12, - "y": 7 - }, - "id": 7, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "container_fs_usage_bytes{job=\"kubernetes-cadvisor\", container_name=\"discovery\", pod_name=~\"istio-pilot-.*\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Discovery", - "refId": "B", - "step": 2 - }, - { - "expr": "container_fs_usage_bytes{job=\"kubernetes-cadvisor\", container_name=\"istio-proxy\", pod_name=~\"istio-pilot-.*\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Sidecar", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Disk", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": "", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "decimals": null, - "format": "none", - "label": "", - "logBase": 1024, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 7, - "w": 6, - "x": 18, - "y": 7 - }, - "id": 4, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "go_goroutines{job=\"pilot\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Number of Goroutines", - "refId": "A", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "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": "", - "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 - } - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 14 - }, - "id": 58, - "panels": [], - "title": "Pilot Push Information", - "type": "row" - }, - { - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "description": "Shows the rate of pilot pushes", - "fill": 1, - "gridPos": { - "h": 8, - "w": 8, - "x": 0, - "y": 15 - }, - "id": 622, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": false, - "linewidth": 1, - "links": [], - "nullPointMode": "null as zero", - "paceLength": 10, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "sum(irate(pilot_xds_pushes{type=\"cds\"}[1m]))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Cluster", - "refId": "C" - }, - { - "expr": "sum(irate(pilot_xds_pushes{type=\"eds\"}[1m]))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Endpoints", - "refId": "D" - }, - { - "expr": "sum(irate(pilot_xds_pushes{type=\"lds\"}[1m]))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Listeners", - "refId": "A" - }, - { - "expr": "sum(irate(pilot_xds_pushes{type=\"rds\"}[1m]))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Routes", - "refId": "E" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Pilot Pushes", - "tooltip": { - "shared": false, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ - "total" - ] - }, - "yaxes": [ - { - "format": "ops", - "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": "Prometheus", - "description": "Captures a variety of pilot errors", - "fill": 1, - "gridPos": { - "h": 8, - "w": 8, - "x": 8, - "y": 15 - }, - "id": 67, - "legend": { - "avg": false, - "current": false, - "hideEmpty": true, - "hideZero": true, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(pilot_xds_cds_reject{job=\"pilot\"}) or (absent(pilot_xds_cds_reject{job=\"pilot\"}) - 1)", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "Rejected CDS Configs", - "refId": "C" - }, - { - "expr": "sum(pilot_xds_eds_reject{job=\"pilot\"}) or (absent(pilot_xds_eds_reject{job=\"pilot\"}) - 1)", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "Rejected EDS Configs", - "refId": "D" - }, - { - "expr": "sum(pilot_xds_rds_reject{job=\"pilot\"}) or (absent(pilot_xds_rds_reject{job=\"pilot\"}) - 1)", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "Rejected RDS Configs", - "refId": "A" - }, - { - "expr": "sum(pilot_xds_lds_reject{job=\"pilot\"}) or (absent(pilot_xds_lds_reject{job=\"pilot\"}) - 1)", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "Rejected LDS Configs", - "refId": "B" - }, - { - "expr": "sum(rate(pilot_xds_write_timeout{job=\"pilot\"}[1m]))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Write Timeouts", - "refId": "F" - }, - { - "expr": "sum(rate(pilot_total_xds_internal_errors{job=\"pilot\"}[1m]))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "Internal Errors", - "refId": "H" - }, - { - "expr": "sum(rate(pilot_total_xds_rejects{job=\"pilot\"}[1m]))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "Config Rejection Rate", - "refId": "E" - }, - { - "expr": "sum(rate(pilot_xds_push_context_errors{job=\"pilot\"}[1m]))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "Push Context Errors", - "refId": "K" - }, - { - "expr": "sum(rate(pilot_xds_pushes{type!~\"lds|cds|rds|eds\"}[1m])) by (type)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Push Errors ({{ type }})", - "refId": "L" - }, - { - "expr": "sum(rate(pilot_xds_push_errors{job=\"pilot\"}[1m])) by (type)", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "Push Errors ({{ type }})", - "refId": "I" - }, - { - "expr": "sum(rate(pilot_xds_push_timeout{job=\"pilot\"}[1m]))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Push Timeouts", - "refId": "G" - }, - { - "expr": "sum(rate(pilot_xds_push_timeout_failures{job=\"pilot\"}[1m]))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Push Timeouts Failures", - "refId": "J" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Pilot Errors", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "description": "Shows the total time it takes to push a config update to a proxy", - "fill": 1, - "gridPos": { - "h": 8, - "w": 8, - "x": 16, - "y": 15 - }, - "id": 624, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.5, sum(rate(pilot_proxy_convergence_time_bucket[1m])) by (le))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "p50 ", - "refId": "A" - }, - { - "expr": "histogram_quantile(0.9, sum(rate(pilot_proxy_convergence_time_bucket[1m])) by (le))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "p90", - "refId": "B" - }, - { - "expr": "histogram_quantile(0.99, sum(rate(pilot_proxy_convergence_time_bucket[1m])) by (le))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "p99", - "refId": "C" - }, - { - "expr": "histogram_quantile(0.999, sum(rate(pilot_proxy_convergence_time_bucket[1m])) by (le))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "p99.9", - "refId": "D" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Proxy Push Time", - "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": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 8, - "w": 8, - "x": 0, - "y": 23 - }, - "id": 45, - "legend": { - "avg": false, - "current": false, - "hideEmpty": true, - "hideZero": true, - "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, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "pilot_conflict_inbound_listener{job=\"pilot\"}", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "Inbound Listeners", - "refId": "B" - }, - { - "expr": "pilot_conflict_outbound_listener_http_over_current_tcp{job=\"pilot\"}", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "Outbound Listeners (http over current tcp)", - "refId": "A" - }, - { - "expr": "pilot_conflict_outbound_listener_tcp_over_current_tcp{job=\"pilot\"}", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "Outbound Listeners (tcp over current tcp)", - "refId": "C" - }, - { - "expr": "pilot_conflict_outbound_listener_tcp_over_current_http{job=\"pilot\"}", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "Outbound Listeners (tcp over current http)", - "refId": "D" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Conflicts", - "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": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 8, - "w": 8, - "x": 8, - "y": 23 - }, - "id": 47, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "pilot_virt_services{job=\"pilot\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Virtual Services", - "refId": "A" - }, - { - "expr": "pilot_services{job=\"pilot\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Services", - "refId": "B" - }, - { - "expr": "pilot_xds{job=\"pilot\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Connected Endpoints", - "refId": "E" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "ADS Monitoring", - "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 - } - }, - { - "columns": [], - "datasource": "Prometheus", - "description": "Clusters in this table do not have any endpoints known to pilot. This could be from referencing subsets that do not have any instances, or pods marked as NotReady", - "fontSize": "100%", - "gridPos": { - "h": 8, - "w": 8, - "x": 16, - "y": 23 - }, - "id": 51, - "links": [], - "pageSize": null, - "scroll": true, - "showHeader": true, - "sort": { - "col": null, - "desc": false - }, - "styles": [ - { - "alias": "Time", - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "pattern": "Time", - "type": "date" - }, - { - "alias": "Clusters", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "decimals": 2, - "pattern": "/.*/", - "thresholds": [], - "type": "number", - "unit": "short" - } - ], - "targets": [ - { - "expr": "sum(pilot_xds_eds_instances{job=\"pilot\", cluster=~\".+\\\\|.+\"}) by (cluster) < 1", - "format": "time_series", - "hide": false, - "instant": true, - "intervalFactor": 1, - "legendFormat": "{{cluster}}", - "refId": "B" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Clusters with no known endpoints", - "transform": "timeseries_aggregations", - "type": "table" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 31 - }, - "id": 64, - "panels": [], - "title": "Envoy Information", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "description": "Shows details about Envoy proxies in the mesh", - "fill": 1, - "gridPos": { - "h": 8, - "w": 8, - "x": 0, - "y": 32 - }, - "id": 40, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(irate(envoy_cluster_upstream_cx_total{cluster_name=\"xds-grpc\"}[1m]))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "XDS Connections", - "refId": "C" - }, - { - "expr": "sum(irate(envoy_cluster_upstream_cx_connect_fail{cluster_name=\"xds-grpc\"}[1m]))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "XDS Connection Failures", - "refId": "A" - }, - { - "expr": "sum(increase(envoy_server_hot_restart_epoch[1m]))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Envoy Restarts", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Envoy Details", - "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": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "fill": 1, - "gridPos": { - "h": 8, - "w": 8, - "x": 8, - "y": 32 - }, - "id": 41, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(envoy_cluster_upstream_cx_active{cluster_name=\"xds-grpc\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "XDS Active Connections", - "refId": "C", - "step": 2 - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "XDS Active Connections", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "description": "Shows the size of XDS requests and responses", - "fill": 1, - "gridPos": { - "h": 8, - "w": 8, - "x": 16, - "y": 32 - }, - "id": 42, - "legend": { - "avg": false, - "current": false, - "hideEmpty": false, - "hideZero": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "max(rate(envoy_cluster_upstream_cx_rx_bytes_total{cluster_name=\"xds-grpc\"}[1m]))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "XDS Response Bytes Max", - "refId": "D" - }, - { - "expr": "quantile(0.5, rate(envoy_cluster_upstream_cx_rx_bytes_total{cluster_name=\"xds-grpc\"}[1m]))", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "XDS Response Bytes Average", - "refId": "B" - }, - { - "expr": "max(rate(envoy_cluster_upstream_cx_tx_bytes_total{cluster_name=\"xds-grpc\"}[1m]))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "XDS Request Bytes Max", - "refId": "A" - }, - { - "expr": "quantile(.5, rate(envoy_cluster_upstream_cx_tx_bytes_total{cluster_name=\"xds-grpc\"}[1m]))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "XDS Request Bytes Average", - "refId": "C" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "XDS Requests Size", - "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": "ops", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "refresh": "5s", - "schemaVersion": 18, - "style": "dark", - "tags": [], - "templating": { - "list": [] - }, - "time": { - "from": "now-5m", - "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": "Istio Pilot Dashboard", - "uid": "3--MLVZZk", - "version": 11 -} \ No newline at end of file diff --git a/kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/_helpers.tpl b/kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/_helpers.tpl deleted file mode 100755 index 9d4c59205..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/_helpers.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "grafana.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "grafana.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "grafana.chart" -}} -{{- .Chart.Name | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/configmap-custom-resources.yaml b/kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/configmap-custom-resources.yaml deleted file mode 100755 index b89bc0765..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/configmap-custom-resources.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: istio-grafana-custom-resources - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "grafana.name" . }} - chart: {{ template "grafana.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - istio: grafana -data: - custom-resources.yaml: |- - {{- include "grafana-default.yaml.tpl" . | indent 4}} - run.sh: |- - {{- include "install-custom-resources.sh.tpl" . | indent 4}} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/configmap-dashboards.yaml b/kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/configmap-dashboards.yaml deleted file mode 100755 index dd1ab0d75..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/configmap-dashboards.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{- $files := .Files }} -{{- range $path, $bytes := .Files.Glob "dashboards/*.json" }} -{{- $filename := trimSuffix (ext $path) (base $path) }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: istio-grafana-configuration-dashboards-{{ $filename }} - namespace: {{ $.Release.Namespace }} - labels: - app: {{ template "grafana.name" $ }} - chart: {{ template "grafana.chart" $ }} - heritage: {{ $.Release.Service }} - release: {{ $.Release.Name }} - istio: grafana -data: - {{ base $path }}: '{{ $files.Get $path }}' ---- -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/configmap.yaml b/kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/configmap.yaml deleted file mode 100755 index c86efe1f4..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/configmap.yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: istio-grafana - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "grafana.name" . }} - chart: {{ template "grafana.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - istio: grafana -data: -{{- if .Values.datasources }} - {{- range $key, $value := .Values.datasources }} - {{ $key }}: | -{{ toYaml $value | indent 4 }} - {{- end -}} -{{- end -}} - -{{- if .Values.dashboardProviders }} - {{- range $key, $value := .Values.dashboardProviders }} - {{ $key }}: | -{{ toYaml $value | indent 4 }} - {{- end -}} -{{- end -}} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/create-custom-resources-job.yaml b/kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/create-custom-resources-job.yaml deleted file mode 100755 index 8f179d5cc..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/create-custom-resources-job.yaml +++ /dev/null @@ -1,101 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -{{- if .Values.global.imagePullSecrets }} -imagePullSecrets: -{{- range .Values.global.imagePullSecrets }} - - name: {{ . }} -{{- end }} -{{- end }} -metadata: - name: istio-grafana-post-install-account - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "grafana.name" . }} - chart: {{ template "grafana.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -{{- if .Values.global.imagePullSecrets }} -imagePullSecrets: -{{- range .Values.global.imagePullSecrets }} - - name: {{ . }} -{{- end }} -{{- end }} ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: istio-grafana-post-install-{{ .Release.Namespace }} - labels: - app: {{ template "grafana.name" . }} - chart: {{ template "grafana.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -rules: -- apiGroups: ["authentication.istio.io"] # needed to create default authn policy - resources: ["*"] - verbs: ["*"] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: istio-grafana-post-install-role-binding-{{ .Release.Namespace }} - labels: - app: {{ template "grafana.name" . }} - chart: {{ template "grafana.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: istio-grafana-post-install-{{ .Release.Namespace }} -subjects: - - kind: ServiceAccount - name: istio-grafana-post-install-account - namespace: {{ .Release.Namespace }} ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: istio-grafana-post-install-{{ .Values.global.tag | printf "%v" | trunc 32 }} - namespace: {{ .Release.Namespace }} - annotations: - "helm.sh/hook": post-install - "helm.sh/hook-delete-policy": hook-succeeded - labels: - app: {{ template "grafana.name" . }} - chart: {{ template "grafana.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - template: - metadata: - name: istio-grafana-post-install - labels: - app: istio-grafana - chart: {{ template "grafana.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - spec: - serviceAccountName: istio-grafana-post-install-account - containers: - - name: kubectl - image: "{{ .Values.global.hub }}/kubectl:{{ .Values.global.tag }}" - command: [ "/bin/bash", "/tmp/grafana/run.sh", "/tmp/grafana/custom-resources.yaml" ] - volumeMounts: - - mountPath: "/tmp/grafana" - name: tmp-configmap-grafana - volumes: - - name: tmp-configmap-grafana - configMap: - name: istio-grafana-custom-resources - restartPolicy: OnFailure - affinity: - {{- include "nodeaffinity" . | indent 6 }} - {{- include "podAntiAffinity" . | indent 6 }} - {{- if .Values.tolerations }} - tolerations: -{{ toYaml .Values.tolerations | indent 6 }} - {{- else if .Values.global.defaultTolerations }} - tolerations: -{{ toYaml .Values.global.defaultTolerations | indent 6 }} - {{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/deployment.yaml b/kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/deployment.yaml deleted file mode 100755 index ba3037e04..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/deployment.yaml +++ /dev/null @@ -1,138 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: grafana - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "grafana.name" . }} - chart: {{ template "grafana.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - app: grafana - template: - metadata: - labels: - app: grafana - chart: {{ template "grafana.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - annotations: - sidecar.istio.io/inject: "false" - prometheus.io/scrape: "true" - spec: - securityContext: - runAsUser: 472 - fsGroup: 472 -{{- if .Values.global.priorityClassName }} - priorityClassName: "{{ .Values.global.priorityClassName }}" -{{- end }} -{{- if .Values.global.imagePullSecrets }} - imagePullSecrets: -{{- range .Values.global.imagePullSecrets }} - - name: {{ . }} -{{- end }} -{{- end }} - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.global.imagePullPolicy }} - ports: - - containerPort: 3000 - readinessProbe: - httpGet: - path: /api/health - port: 3000 - env: - - name: GRAFANA_PORT - value: "3000" -{{- if .Values.security.enabled }} - - name: GF_SECURITY_ADMIN_USER - valueFrom: - secretKeyRef: - name: {{ .Values.security.secretName }} - key: {{ .Values.security.usernameKey }} - - name: GF_SECURITY_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.security.secretName }} - key: {{ .Values.security.passphraseKey }} - - name: GF_AUTH_BASIC_ENABLED - value: "true" - - name: GF_AUTH_ANONYMOUS_ENABLED - value: "false" - - name: GF_AUTH_DISABLE_LOGIN_FORM - value: "false" -{{- else }} - - name: GF_AUTH_BASIC_ENABLED - value: "false" - - name: GF_AUTH_ANONYMOUS_ENABLED - value: "true" - - name: GF_AUTH_ANONYMOUS_ORG_ROLE - value: Admin -{{- end }} - - name: GF_PATHS_DATA - value: /data/grafana - {{- range $key, $value := $.Values.env }} - - name: {{ $key }} - value: {{ $value | quote }} - {{- end }} - {{- range $key, $secret := $.Values.envSecrets }} - - name: {{ $key }} - valueFrom: - secretKeyRef: - name: {{ $secret }} - key: {{ $key | quote }} - {{- end }} - resources: -{{- if .Values.resources }} -{{ toYaml .Values.resources | indent 12 }} -{{- else }} -{{ toYaml .Values.global.defaultResources | indent 12 }} -{{- end }} - volumeMounts: - - name: data - mountPath: /data/grafana - {{- range $path, $bytes := .Files.Glob "dashboards/*.json" }} - {{- $filename := trimSuffix (ext $path) (base $path) }} - - name: dashboards-istio-{{ $filename }} - mountPath: "/var/lib/grafana/dashboards/istio/{{ base $path }}" - subPath: {{ base $path }} - readOnly: true - {{- end }} - - name: config - mountPath: "/etc/grafana/provisioning/datasources/datasources.yaml" - subPath: datasources.yaml - - name: config - mountPath: "/etc/grafana/provisioning/dashboards/dashboardproviders.yaml" - subPath: dashboardproviders.yaml - affinity: - {{- include "nodeaffinity" . | indent 6 }} - {{- include "podAntiAffinity" . | indent 6 }} - {{- if .Values.tolerations }} - tolerations: -{{ toYaml .Values.tolerations | indent 6 }} - {{- else if .Values.global.defaultTolerations }} - tolerations: -{{ toYaml .Values.global.defaultTolerations | indent 6 }} - {{- end }} - volumes: - - name: config - configMap: - name: istio-grafana - - name: data -{{- if .Values.persist }} - persistentVolumeClaim: - claimName: istio-grafana-pvc -{{- else }} - emptyDir: {} -{{- end }} -{{- range $path, $bytes := .Files.Glob "dashboards/*.json" }} -{{- $filename := trimSuffix (ext $path) (base $path) }} - - name: dashboards-istio-{{ $filename }} - configMap: - name: istio-grafana-configuration-dashboards-{{ $filename }} -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/grafana-ports-mtls.yaml b/kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/grafana-ports-mtls.yaml deleted file mode 100755 index b9a392651..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/grafana-ports-mtls.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{ define "grafana-default.yaml.tpl" }} -apiVersion: authentication.istio.io/v1alpha1 -kind: Policy -metadata: - name: grafana-ports-mtls-disabled - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "grafana.name" . }} - chart: {{ template "grafana.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - targets: - - name: grafana - ports: - - number: {{ .Values.service.externalPort }} -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/ingress.yaml b/kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/ingress.yaml deleted file mode 100755 index 0ebe71f61..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/ingress.yaml +++ /dev/null @@ -1,40 +0,0 @@ -{{- if .Values.ingress.enabled -}} -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: grafana - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "grafana.name" . }} - chart: {{ template "grafana.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - annotations: - {{- range $key, $value := .Values.ingress.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} -spec: - rules: -{{- if .Values.ingress.hosts }} - {{- range $host := .Values.ingress.hosts }} - - host: {{ $host }} - http: - paths: - - path: {{ if $.Values.contextPath }} {{ $.Values.contextPath }} {{ else }} / {{ end }} - backend: - serviceName: grafana - servicePort: 3000 - {{- end -}} -{{- else }} - - http: - paths: - - path: {{ if .Values.contextPath }} {{ .Values.contextPath }} {{ else }} / {{ end }} - backend: - serviceName: grafana - servicePort: 3000 -{{- end }} - {{- if .Values.ingress.tls }} - tls: -{{ toYaml .Values.ingress.tls | indent 4 }} - {{- end -}} -{{- end -}} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/pvc.yaml b/kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/pvc.yaml deleted file mode 100755 index e376a13a5..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/pvc.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if .Values.persist }} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: istio-grafana-pvc - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "grafana.name" . }} - chart: {{ template "grafana.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - storageClassName: {{ .Values.storageClassName }} - accessModes: - - {{ .Values.accessMode }} - resources: - requests: - storage: 5Gi -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/service.yaml b/kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/service.yaml deleted file mode 100755 index 1dfd82c33..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/service.yaml +++ /dev/null @@ -1,32 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: grafana - namespace: {{ .Release.Namespace }} - annotations: - {{- range $key, $val := .Values.service.annotations }} - {{ $key }}: {{ $val | quote }} - {{- end }} - labels: - app: {{ template "grafana.name" . }} - chart: {{ template "grafana.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.externalPort }} - targetPort: 3000 - protocol: TCP - name: {{ .Values.service.name }} - selector: - app: grafana -{{- if .Values.service.loadBalancerIP }} - loadBalancerIP: "{{ .Values.service.loadBalancerIP }}" -{{- end }} - {{if .Values.service.loadBalancerSourceRanges}} - loadBalancerSourceRanges: - {{range $rangeList := .Values.service.loadBalancerSourceRanges}} - - {{ $rangeList }} - {{end}} - {{end}} \ No newline at end of file diff --git a/kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/tests/test-grafana-connection.yaml b/kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/tests/test-grafana-connection.yaml deleted file mode 100755 index e9268c4b9..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/grafana/templates/tests/test-grafana-connection.yaml +++ /dev/null @@ -1,37 +0,0 @@ -{{- if .Values.global.enableHelmTest }} -apiVersion: v1 -kind: Pod -metadata: - name: {{ template "grafana.fullname" . }}-test - namespace: {{ .Release.Namespace }} - labels: - app: grafana-test - chart: {{ template "grafana.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - istio: grafana - annotations: - sidecar.istio.io/inject: "false" - helm.sh/hook: test-success -spec: -{{- if .Values.global.priorityClassName }} - priorityClassName: "{{ .Values.global.priorityClassName }}" -{{- end }} - containers: - - name: "{{ template "grafana.fullname" . }}-test" - image: pstauffer/curl:v1.0.3 - imagePullPolicy: "{{ .Values.global.imagePullPolicy }}" - command: ['curl'] - args: ['http://grafana:{{ .Values.grafana.service.externalPort }}'] - restartPolicy: Never - affinity: - {{- include "nodeaffinity" . | indent 4 }} - {{- include "podAntiAffinity" . | indent 4 }} - {{- if .Values.tolerations }} - tolerations: -{{ toYaml .Values.tolerations | indent 2 }} - {{- else if .Values.global.defaultTolerations }} - tolerations: -{{ toYaml .Values.global.defaultTolerations | indent 2 }} - {{- end }} -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/grafana/values.yaml b/kubernetes/helm_charts/istio-system/istio/charts/grafana/values.yaml deleted file mode 100755 index d6c192a38..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/grafana/values.yaml +++ /dev/null @@ -1,117 +0,0 @@ -# -# addon grafana configuration -# -enabled: false -replicaCount: 1 -image: - repository: grafana/grafana - tag: 6.1.6 -ingress: - enabled: false - ## Used to create an Ingress record. - hosts: - - grafana.local - annotations: - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - tls: - # Secrets must be manually created in the namespace. - # - secretName: grafana-tls - # hosts: - # - grafana.local -persist: false -storageClassName: "" -accessMode: ReadWriteMany -security: - enabled: false - secretName: grafana - usernameKey: username - passphraseKey: passphrase -nodeSelector: {} -tolerations: [] - -env: {} - # Define additional environment variables for configuring grafana. - # @see https://grafana.com/docs/installation/configuration/#using-environment-variables - # Format: env_variable_name: value - # For example: - # GF_SMTP_ENABLED: true - # GF_SMTP_HOST: email-smtp.eu-west-1.amazonaws.com:2587 - # GF_SMTP_FROM_ADDRESS: alerts@mydomain.com - # GF_SMTP_FROM_NAME: Grafana - -envSecrets: {} - # The key name and ENV name must match in the secrets file. - # @see https://grafana.com/docs/installation/configuration/#using-environment-variables - # For example: - # --- - # apiVersion: v1 - # kind: Secret - # metadata: - # name: grafana-secrets - # namespace: istio-system - # data: - # GF_SMTP_USER: bXl1c2Vy - # GF_SMTP_PASSWORD: bXlwYXNzd29yZA== - # type: Opaque - # --- - # env_variable_key_name: secretsName - # --- - # GF_SMTP_USER: grafana-secrets - # GF_SMTP_PASSWORD: grafana-secrets - -# Specify the pod anti-affinity that allows you to constrain which nodes -# your pod is eligible to be scheduled based on labels on pods that are -# already running on the node rather than based on labels on nodes. -# There are currently two types of anti-affinity: -# "requiredDuringSchedulingIgnoredDuringExecution" -# "preferredDuringSchedulingIgnoredDuringExecution" -# which denote "hard" vs. "soft" requirements, you can define your values -# in "podAntiAffinityLabelSelector" and "podAntiAffinityTermLabelSelector" -# correspondingly. -# For example: -# podAntiAffinityLabelSelector: -# - key: security -# operator: In -# values: S1,S2 -# topologyKey: "kubernetes.io/hostname" -# This pod anti-affinity rule says that the pod requires not to be scheduled -# onto a node if that node is already running a pod with label having key -# "security" and value "S1". -podAntiAffinityLabelSelector: [] -podAntiAffinityTermLabelSelector: [] - -contextPath: /grafana -service: - annotations: {} - name: http - type: ClusterIP - externalPort: 3000 - loadBalancerIP: - loadBalancerSourceRanges: - -datasources: - datasources.yaml: - apiVersion: 1 - datasources: - - name: Prometheus - type: prometheus - orgId: 1 - url: http://prometheus:9090 - access: proxy - isDefault: true - jsonData: - timeInterval: 5s - editable: true - -dashboardProviders: - dashboardproviders.yaml: - apiVersion: 1 - providers: - - name: 'istio' - orgId: 1 - folder: 'istio' - type: file - disableDeletion: false - options: - path: /var/lib/grafana/dashboards/istio diff --git a/kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/Chart.yaml b/kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/Chart.yaml deleted file mode 100755 index 1a87643a6..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/Chart.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: v1 -appVersion: "0.1" -description: Istio CoreDNS provides DNS resolution for services in multicluster setups. -name: istiocoredns -tillerVersion: '>=2.7.2' -version: 1.3.3 diff --git a/kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/templates/_helpers.tpl b/kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/templates/_helpers.tpl deleted file mode 100755 index e7add11bb..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/templates/_helpers.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "istiocoredns.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "istiocoredns.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "istiocoredns.chart" -}} -{{- .Chart.Name | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/templates/clusterrole.yaml b/kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/templates/clusterrole.yaml deleted file mode 100755 index 4242a327f..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/templates/clusterrole.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: istiocoredns - labels: - app: {{ template "istiocoredns.name" . }} - chart: {{ template "istiocoredns.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -rules: -- apiGroups: ["networking.istio.io"] - resources: ["*"] - verbs: ["get", "watch", "list"] diff --git a/kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/templates/clusterrolebinding.yaml b/kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/templates/clusterrolebinding.yaml deleted file mode 100755 index bafd0ca3b..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/templates/clusterrolebinding.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: istio-istiocoredns-role-binding-{{ .Release.Namespace }} - labels: - app: {{ template "istiocoredns.name" . }} - chart: {{ template "istiocoredns.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: istiocoredns -subjects: -- kind: ServiceAccount - name: istiocoredns-service-account - namespace: {{ .Release.Namespace }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/templates/configmap.yaml b/kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/templates/configmap.yaml deleted file mode 100755 index 50d166fe5..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/templates/configmap.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: coredns - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "istiocoredns.name" . }} - chart: {{ template "istiocoredns.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -data: - Corefile: | - .:53 { - errors - health - proxy global 127.0.0.1:8053 { - protocol grpc insecure - } - prometheus :9153 - proxy . /etc/resolv.conf - cache 30 - reload - } ---- diff --git a/kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/templates/deployment.yaml b/kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/templates/deployment.yaml deleted file mode 100755 index 4cd5f002d..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/templates/deployment.yaml +++ /dev/null @@ -1,100 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: istiocoredns - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "istiocoredns.name" . }} - chart: {{ template "istiocoredns.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - app: istiocoredns - strategy: - rollingUpdate: - maxSurge: {{ .Values.rollingMaxSurge }} - maxUnavailable: {{ .Values.rollingMaxUnavailable }} - template: - metadata: - name: istiocoredns - labels: - app: istiocoredns - chart: {{ template "istiocoredns.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - annotations: - sidecar.istio.io/inject: "false" - spec: - serviceAccountName: istiocoredns-service-account -{{- if .Values.global.priorityClassName }} - priorityClassName: "{{ .Values.global.priorityClassName }}" -{{- end }} - containers: - - name: coredns - image: {{ .Values.coreDNSImage }} - imagePullPolicy: {{ .Values.global.imagePullPolicy }} - args: [ "-conf", "/etc/coredns/Corefile" ] - volumeMounts: - - name: config-volume - mountPath: /etc/coredns - ports: - - containerPort: 53 - name: dns - protocol: UDP - - containerPort: 53 - name: dns-tcp - protocol: TCP - - containerPort: 9153 - name: metrics - protocol: TCP - livenessProbe: - httpGet: - path: /health - port: 8080 - scheme: HTTP - initialDelaySeconds: 60 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 5 - resources: -{{- if .Values.resources }} -{{ toYaml .Values.resources | indent 10 }} -{{- else }} -{{ toYaml .Values.global.defaultResources | indent 10 }} -{{- end }} - - name: istio-coredns-plugin - command: - - /usr/local/bin/plugin - image: {{ .Values.coreDNSPluginImage }} - imagePullPolicy: {{ .Values.global.imagePullPolicy }} - ports: - - containerPort: 8053 - name: dns-grpc - protocol: TCP - resources: -{{- if .Values.resources }} -{{ toYaml .Values.resources | indent 10 }} -{{- else }} -{{ toYaml .Values.global.defaultResources | indent 10 }} -{{- end }} - dnsPolicy: Default - volumes: - - name: config-volume - configMap: - name: coredns - items: - - key: Corefile - path: Corefile - affinity: - {{- include "nodeaffinity" . | indent 6 }} - {{- include "podAntiAffinity" . | indent 6 }} - {{- if .Values.tolerations }} - tolerations: -{{ toYaml .Values.tolerations | indent 6 }} - {{- else if .Values.global.defaultTolerations }} - tolerations: -{{ toYaml .Values.global.defaultTolerations | indent 6 }} - {{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/templates/service.yaml b/kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/templates/service.yaml deleted file mode 100755 index a6311017c..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/templates/service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: istiocoredns - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "istiocoredns.name" . }} - chart: {{ template "istiocoredns.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - selector: - app: istiocoredns - ports: - - name: dns - port: 53 - protocol: UDP - - name: dns-tcp - port: 53 - protocol: TCP diff --git a/kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/templates/serviceaccount.yaml b/kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/templates/serviceaccount.yaml deleted file mode 100755 index e2627cf45..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/templates/serviceaccount.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -{{- if .Values.global.imagePullSecrets }} -imagePullSecrets: -{{- range .Values.global.imagePullSecrets }} - - name: {{ . }} -{{- end }} -{{- end }} -metadata: - name: istiocoredns-service-account - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "istiocoredns.name" . }} - chart: {{ template "istiocoredns.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/values.yaml b/kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/values.yaml deleted file mode 100755 index 4724df7e5..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/istiocoredns/values.yaml +++ /dev/null @@ -1,35 +0,0 @@ -# -# addon istiocoredns tracing configuration -# -enabled: false -replicaCount: 1 -rollingMaxSurge: 100% -rollingMaxUnavailable: 25% -coreDNSImage: coredns/coredns:1.1.2 -# Source code for the plugin can be found at -# https://github.com/istio-ecosystem/istio-coredns-plugin -# The plugin listens for DNS requests from coredns server at 127.0.0.1:8053 -coreDNSPluginImage: istio/coredns-plugin:0.2-istio-1.1 -nodeSelector: {} -tolerations: [] - -# Specify the pod anti-affinity that allows you to constrain which nodes -# your pod is eligible to be scheduled based on labels on pods that are -# already running on the node rather than based on labels on nodes. -# There are currently two types of anti-affinity: -# "requiredDuringSchedulingIgnoredDuringExecution" -# "preferredDuringSchedulingIgnoredDuringExecution" -# which denote "hard" vs. "soft" requirements, you can define your values -# in "podAntiAffinityLabelSelector" and "podAntiAffinityTermLabelSelector" -# correspondingly. -# For example: -# podAntiAffinityLabelSelector: -# - key: security -# operator: In -# values: S1,S2 -# topologyKey: "kubernetes.io/hostname" -# This pod anti-affinity rule says that the pod requires not to be scheduled -# onto a node if that node is already running a pod with label having key -# "security" and value "S1". -podAntiAffinityLabelSelector: [] -podAntiAffinityTermLabelSelector: [] diff --git a/kubernetes/helm_charts/istio-system/istio/charts/kiali/Chart.yaml b/kubernetes/helm_charts/istio-system/istio/charts/kiali/Chart.yaml deleted file mode 100755 index a0db26f1e..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/kiali/Chart.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: v1 -appVersion: 1.3.3 -description: Kiali is an open source project for service mesh observability, refer - to https://www.kiali.io for details. -name: kiali -tillerVersion: '>=2.7.2' -version: 1.3.3 diff --git a/kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/_helpers.tpl b/kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/_helpers.tpl deleted file mode 100755 index 6b0095769..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/_helpers.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "kiali.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "kiali.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "kiali.chart" -}} -{{- .Chart.Name | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/clusterrole.yaml b/kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/clusterrole.yaml deleted file mode 100755 index d9091a0b9..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/clusterrole.yaml +++ /dev/null @@ -1,267 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: kiali - labels: - app: {{ template "kiali.name" . }} - chart: {{ template "kiali.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -rules: -- apiGroups: [""] - resources: - - configmaps - - endpoints - - namespaces - - nodes - - pods - - pods/log - - replicationcontrollers - - services - verbs: - - get - - list - - watch -- apiGroups: ["extensions", "apps"] - resources: - - deployments - - replicasets - - statefulsets - verbs: - - get - - list - - watch -- apiGroups: ["autoscaling"] - resources: - - horizontalpodautoscalers - verbs: - - get - - list - - watch -- apiGroups: ["batch"] - resources: - - cronjobs - - jobs - verbs: - - get - - list - - watch -- apiGroups: ["config.istio.io"] - resources: - - adapters - - apikeys - - bypasses - - authorizations - - checknothings - - circonuses - - cloudwatches - - deniers - - dogstatsds - - edges - - fluentds - - handlers - - instances - - kubernetesenvs - - kuberneteses - - listcheckers - - listentries - - logentries - - memquotas - - metrics - - noops - - opas - - prometheuses - - quotas - - quotaspecbindings - - quotaspecs - - rbacs - - redisquotas - - reportnothings - - rules - - signalfxs - - solarwindses - - stackdrivers - - statsds - - stdios - - templates - - tracespans - - zipkins - verbs: - - create - - delete - - get - - list - - patch - - watch -- apiGroups: ["networking.istio.io"] - resources: - - destinationrules - - gateways - - serviceentries - - sidecars - - virtualservices - verbs: - - create - - delete - - get - - list - - patch - - watch -- apiGroups: ["authentication.istio.io"] - resources: - - meshpolicies - - policies - verbs: - - create - - delete - - get - - list - - patch - - watch -- apiGroups: ["rbac.istio.io"] - resources: - - clusterrbacconfigs - - rbacconfigs - - servicerolebindings - - serviceroles - verbs: - - create - - delete - - get - - list - - patch - - watch -- apiGroups: ["monitoring.kiali.io"] - resources: - - monitoringdashboards - verbs: - - get - - list ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: kiali-viewer - labels: - app: {{ template "kiali.name" . }} - chart: {{ template "kiali.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -rules: -- apiGroups: [""] - resources: - - configmaps - - endpoints - - namespaces - - nodes - - pods - - pods/log - - replicationcontrollers - - services - verbs: - - get - - list - - watch -- apiGroups: ["extensions", "apps"] - resources: - - deployments - - replicasets - - statefulsets - verbs: - - get - - list - - watch -- apiGroups: ["autoscaling"] - resources: - - horizontalpodautoscalers - verbs: - - get - - list - - watch -- apiGroups: ["batch"] - resources: - - cronjobs - - jobs - verbs: - - get - - list - - watch -- apiGroups: ["config.istio.io"] - resources: - - adapters - - apikeys - - bypasses - - authorizations - - checknothings - - circonuses - - cloudwatches - - deniers - - dogstatsds - - edges - - fluentds - - handlers - - instances - - kubernetesenvs - - kuberneteses - - listcheckers - - listentries - - logentries - - memquotas - - metrics - - noops - - opas - - prometheuses - - quotas - - quotaspecbindings - - quotaspecs - - rbacs - - redisquotas - - reportnothings - - rules - - signalfxs - - solarwindses - - stackdrivers - - statsds - - stdios - - templates - - tracespans - - zipkins - verbs: - - get - - list - - watch -- apiGroups: ["networking.istio.io"] - resources: - - destinationrules - - gateways - - serviceentries - - sidecars - - virtualservices - verbs: - - get - - list - - watch -- apiGroups: ["authentication.istio.io"] - resources: - - meshpolicies - - policies - verbs: - - get - - list - - watch -- apiGroups: ["rbac.istio.io"] - resources: - - clusterrbacconfigs - - rbacconfigs - - servicerolebindings - - serviceroles - verbs: - - get - - list - - watch -- apiGroups: ["monitoring.kiali.io"] - resources: - - monitoringdashboards - verbs: - - get - - list diff --git a/kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/clusterrolebinding.yaml b/kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/clusterrolebinding.yaml deleted file mode 100755 index 881796716..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/clusterrolebinding.yaml +++ /dev/null @@ -1,37 +0,0 @@ -{{- if not .Values.dashboard.viewOnlyMode }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: istio-kiali-admin-role-binding-{{ .Release.Namespace }} - labels: - app: {{ template "kiali.name" . }} - chart: {{ template "kiali.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: kiali -subjects: -- kind: ServiceAccount - name: kiali-service-account - namespace: {{ .Release.Namespace }} -{{- else }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: istio-kiali-viewer-role-binding-{{ .Release.Namespace }} - labels: - app: {{ template "kiali.name" . }} - chart: {{ template "kiali.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: kiali-viewer -subjects: -- kind: ServiceAccount - name: kiali-service-account - namespace: {{ .Release.Namespace }} -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/configmap.yaml b/kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/configmap.yaml deleted file mode 100755 index cd63a90cc..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/configmap.yaml +++ /dev/null @@ -1,32 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: kiali - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "kiali.name" . }} - chart: {{ template "kiali.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -data: - config.yaml: | - istio_namespace: {{ .Release.Namespace }} - auth: - strategy: {{ .Values.dashboard.auth.strategy }} - server: - port: 20001 -{{- if .Values.contextPath }} - web_root: {{ .Values.contextPath }} -{{- end }} - external_services: - tracing: - url: {{ .Values.dashboard.jaegerURL }} - grafana: - url: {{ .Values.dashboard.grafanaURL }} - prometheus: - url: {{ .Values.prometheusAddr }} -{{- if .Values.security.enabled }} - identity: - cert_file: {{ .Values.security.cert_file }} - private_key_file: {{ .Values.security.private_key_file }} -{{- end}} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/demosecret.yaml b/kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/demosecret.yaml deleted file mode 100755 index ad44298c3..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/demosecret.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if .Values.createDemoSecret }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ .Values.dashboard.secretName }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "kiali.name" . }} - chart: {{ template "kiali.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -type: Opaque -data: - username: YWRtaW4= # admin - passphrase: YWRtaW4= # admin -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/deployment.yaml b/kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/deployment.yaml deleted file mode 100755 index 9389f58d0..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/deployment.yaml +++ /dev/null @@ -1,100 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: kiali - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "kiali.name" . }} - chart: {{ template "kiali.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - app: kiali - template: - metadata: - name: kiali - labels: - app: kiali - chart: {{ template "kiali.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - annotations: - sidecar.istio.io/inject: "false" - scheduler.alpha.kubernetes.io/critical-pod: "" - prometheus.io/scrape: "true" - prometheus.io/port: "9090" - kiali.io/runtimes: go,kiali - spec: - serviceAccountName: kiali-service-account -{{- if .Values.global.priorityClassName }} - priorityClassName: "{{ .Values.global.priorityClassName }}" -{{- end }} - containers: - - image: "{{ .Values.hub }}/{{ .Values.image }}:{{ .Values.tag }}" - imagePullPolicy: {{ .Values.global.imagePullPolicy }} - name: kiali - command: - - "/opt/kiali/kiali" - - "-config" - - "/kiali-configuration/config.yaml" - - "-v" - - "3" - readinessProbe: - httpGet: - path: {{ .Values.contextPath }}/healthz - port: 20001 - scheme: {{ if .Values.security.enabled }} 'HTTPS' {{ else }} 'HTTP' {{ end }} - initialDelaySeconds: 5 - periodSeconds: 30 - livenessProbe: - httpGet: - path: {{ .Values.contextPath }}/healthz - port: 20001 - scheme: {{ if .Values.security.enabled }} 'HTTPS' {{ else }} 'HTTP' {{ end }} - initialDelaySeconds: 5 - periodSeconds: 30 - env: - - name: ACTIVE_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - volumeMounts: - - name: kiali-configuration - mountPath: "/kiali-configuration" - - name: kiali-cert - mountPath: "/kiali-cert" - - name: kiali-secret - mountPath: "/kiali-secret" - resources: -{{- if .Values.resources }} -{{ toYaml .Values.resources | indent 10 }} -{{- else }} -{{ toYaml .Values.global.defaultResources | indent 10 }} -{{- end }} - volumes: - - name: kiali-configuration - configMap: - name: kiali - - name: kiali-cert - secret: - secretName: istio.kiali-service-account -{{- if not .Values.security.enabled }} - optional: true -{{- end }} - - name: kiali-secret - secret: - secretName: {{ .Values.dashboard.secretName }} - optional: true - affinity: - {{- include "nodeaffinity" . | indent 6 }} - {{- include "podAntiAffinity" . | indent 6 }} - {{- if .Values.tolerations }} - tolerations: -{{ toYaml .Values.tolerations | indent 6 }} - {{- else if .Values.global.defaultTolerations }} - tolerations: -{{ toYaml .Values.global.defaultTolerations | indent 6 }} - {{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/ingress.yaml b/kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/ingress.yaml deleted file mode 100755 index 2e2a0de3a..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/ingress.yaml +++ /dev/null @@ -1,40 +0,0 @@ -{{- if .Values.ingress.enabled -}} -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: kiali - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "kiali.name" . }} - chart: {{ template "kiali.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - annotations: - {{- range $key, $value := .Values.ingress.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} -spec: - rules: -{{- if .Values.ingress.hosts }} - {{- range $host := .Values.ingress.hosts }} - - host: {{ $host }} - http: - paths: - - path: {{ if $.Values.contextPath }} {{ $.Values.contextPath }} {{ else }} / {{ end }} - backend: - serviceName: kiali - servicePort: 20001 - {{- end -}} -{{- else }} - - http: - paths: - - path: {{ if .Values.contextPath }} {{ .Values.contextPath }} {{ else }} / {{ end }} - backend: - serviceName: kiali - servicePort: 20001 -{{- end }} - {{- if .Values.ingress.tls }} - tls: -{{ toYaml .Values.ingress.tls | indent 4 }} - {{- end -}} -{{- end -}} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/service.yaml b/kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/service.yaml deleted file mode 100755 index 1aa79bfdb..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: kiali - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "kiali.name" . }} - chart: {{ template "kiali.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - ports: - - name: http-kiali - protocol: TCP - port: 20001 - selector: - app: kiali diff --git a/kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/serviceaccount.yaml b/kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/serviceaccount.yaml deleted file mode 100755 index 2ae38a1ab..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/serviceaccount.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -{{- if .Values.global.imagePullSecrets }} -imagePullSecrets: -{{- range .Values.global.imagePullSecrets }} - - name: {{ . }} -{{- end }} -{{- end }} -metadata: - name: kiali-service-account - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "kiali.name" . }} - chart: {{ template "kiali.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/tests/test-kiali-connection.yaml b/kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/tests/test-kiali-connection.yaml deleted file mode 100755 index d798f7f42..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/kiali/templates/tests/test-kiali-connection.yaml +++ /dev/null @@ -1,37 +0,0 @@ -{{- if .Values.global.enableHelmTest }} -apiVersion: v1 -kind: Pod -metadata: - name: {{ template "kiali.fullname" . }}-test - namespace: {{ .Release.Namespace }} - labels: - app: kiali-test - chart: {{ template "kiali.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - istio: kiali - annotations: - sidecar.istio.io/inject: "false" - helm.sh/hook: test-success -spec: -{{- if .Values.global.priorityClassName }} - priorityClassName: "{{ .Values.global.priorityClassName }}" -{{- end }} - containers: - - name: "{{ template "kiali.fullname" . }}-test" - image: pstauffer/curl:v1.0.3 - imagePullPolicy: "{{ .Values.global.imagePullPolicy }}" - command: ['curl'] - args: ['http://kiali:20001'] - restartPolicy: Never - affinity: - {{- include "nodeaffinity" . | indent 4 }} - {{- include "podAntiAffinity" . | indent 4 }} - {{- if .Values.tolerations }} - tolerations: -{{ toYaml .Values.tolerations | indent 2 }} - {{- else if .Values.global.defaultTolerations }} - tolerations: -{{ toYaml .Values.global.defaultTolerations | indent 2 }} - {{- end }} -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/kiali/values.yaml b/kubernetes/helm_charts/istio-system/istio/charts/kiali/values.yaml deleted file mode 100755 index bb536f1c8..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/kiali/values.yaml +++ /dev/null @@ -1,63 +0,0 @@ -# -# addon kiali -# -enabled: false # Note that if using the demo or demo-auth yaml when installing via Helm, this default will be `true`. -replicaCount: 1 -hub: quay.io/kiali -image: kiali -tag: v1.4 -contextPath: /kiali # The root context path to access the Kiali UI. -nodeSelector: {} -tolerations: [] - -# Specify the pod anti-affinity that allows you to constrain which nodes -# your pod is eligible to be scheduled based on labels on pods that are -# already running on the node rather than based on labels on nodes. -# There are currently two types of anti-affinity: -# "requiredDuringSchedulingIgnoredDuringExecution" -# "preferredDuringSchedulingIgnoredDuringExecution" -# which denote "hard" vs. "soft" requirements, you can define your values -# in "podAntiAffinityLabelSelector" and "podAntiAffinityTermLabelSelector" -# correspondingly. -# For example: -# podAntiAffinityLabelSelector: -# - key: security -# operator: In -# values: S1,S2 -# topologyKey: "kubernetes.io/hostname" -# This pod anti-affinity rule says that the pod requires not to be scheduled -# onto a node if that node is already running a pod with label having key -# "security" and value "S1". -podAntiAffinityLabelSelector: [] -podAntiAffinityTermLabelSelector: [] - -ingress: - enabled: false - ## Used to create an Ingress record. - hosts: - - kiali.local - annotations: - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - tls: - # Secrets must be manually created in the namespace. - # - secretName: kiali-tls - # hosts: - # - kiali.local - -dashboard: - auth: - strategy: login # Can be anonymous, login, or openshift - secretName: kiali # You must create a secret with this name - one is not provided out-of-box. - viewOnlyMode: false # Bind the service account to a role with only read access - grafanaURL: # If you have Grafana installed and it is accessible to client browsers, then set this to its external URL. Kiali will redirect users to this URL when Grafana metrics are to be shown. - jaegerURL: # If you have Jaeger installed and it is accessible to client browsers, then set this property to its external URL. Kiali will redirect users to this URL when Jaeger tracing is to be shown. -prometheusAddr: http://prometheus:9090 - -# When true, a secret will be created with a default username and password. Useful for demos. -createDemoSecret: false - -security: - enabled: false - cert_file: /kiali-cert/cert-chain.pem - private_key_file: /kiali-cert/key.pem diff --git a/kubernetes/helm_charts/istio-system/istio/charts/mixer/Chart.yaml b/kubernetes/helm_charts/istio-system/istio/charts/mixer/Chart.yaml deleted file mode 100755 index 1c7617ee0..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/mixer/Chart.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -appVersion: 1.3.3 -description: Helm chart for mixer deployment -engine: gotpl -icon: https://istio.io/favicons/android-192x192.png -keywords: -- istio -- mixer -name: mixer -sources: -- http://github.com/istio/istio -tillerVersion: '>=2.7.2' -version: 1.3.3 diff --git a/kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/_helpers.tpl b/kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/_helpers.tpl deleted file mode 100755 index dac6da036..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/_helpers.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "mixer.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "mixer.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "mixer.chart" -}} -{{- .Chart.Name | trunc 63 | trimSuffix "-" -}} -{{- end -}} 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 deleted file mode 100755 index 377b47d03..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/autoscale.yaml +++ /dev/null @@ -1,29 +0,0 @@ -{{- 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 -kind: HorizontalPodAutoscaler -metadata: - name: istio-{{ $key }} - namespace: {{ $.Release.Namespace }} - labels: - app: {{ template "mixer.name" $ }} - chart: {{ template "mixer.chart" $ }} - heritage: {{ $.Release.Service }} - release: {{ $.Release.Name }} -spec: - maxReplicas: {{ $spec.autoscaleMax }} - minReplicas: {{ $spec.autoscaleMin }} - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: istio-{{ $key }} - metrics: - - type: Resource - resource: - name: cpu - targetAverageUtilization: {{ $spec.cpu.targetAverageUtilization }} ---- -{{- end }} -{{- end }} -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/clusterrole.yaml b/kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/clusterrole.yaml deleted file mode 100755 index 3d7438f2d..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/clusterrole.yaml +++ /dev/null @@ -1,24 +0,0 @@ -{{- if or (.Values.policy.enabled) (.Values.telemetry.enabled) }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: istio-mixer-{{ .Release.Namespace }} - labels: - app: {{ template "mixer.name" . }} - chart: {{ template "mixer.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -rules: -- apiGroups: ["config.istio.io"] # istio CRD watcher - resources: ["*"] - verbs: ["create", "get", "list", "watch", "patch"] -- apiGroups: ["apiextensions.k8s.io"] - resources: ["customresourcedefinitions"] - verbs: ["get", "list", "watch"] -- apiGroups: [""] - resources: ["configmaps", "endpoints", "pods", "services", "namespaces", "secrets", "replicationcontrollers"] - verbs: ["get", "list", "watch"] -- apiGroups: ["extensions", "apps"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/clusterrolebinding.yaml b/kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/clusterrolebinding.yaml deleted file mode 100755 index 773e68b34..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/clusterrolebinding.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if or (.Values.policy.enabled) (.Values.telemetry.enabled) }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: istio-mixer-admin-role-binding-{{ .Release.Namespace }} - labels: - app: {{ template "mixer.name" . }} - chart: {{ template "mixer.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: istio-mixer-{{ .Release.Namespace }} -subjects: - - kind: ServiceAccount - name: istio-mixer-service-account - namespace: {{ .Release.Namespace }} -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/config.yaml b/kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/config.yaml deleted file mode 100755 index 43b2c5ced..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/config.yaml +++ /dev/null @@ -1,1088 +0,0 @@ -{{- if or (.Values.policy.enabled) (.Values.telemetry.enabled) }} -apiVersion: "config.istio.io/v1alpha2" -kind: attributemanifest -metadata: - name: istioproxy - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mixer.name" . }} - chart: {{ template "mixer.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - attributes: - origin.ip: - valueType: IP_ADDRESS - origin.uid: - valueType: STRING - origin.user: - valueType: STRING - request.headers: - valueType: STRING_MAP - request.id: - valueType: STRING - request.host: - valueType: STRING - request.method: - valueType: STRING - request.path: - valueType: STRING - request.url_path: - valueType: STRING - request.query_params: - valueType: STRING_MAP - request.reason: - valueType: STRING - request.referer: - valueType: STRING - request.scheme: - valueType: STRING - request.total_size: - valueType: INT64 - request.size: - valueType: INT64 - request.time: - valueType: TIMESTAMP - request.useragent: - valueType: STRING - response.code: - valueType: INT64 - response.duration: - valueType: DURATION - response.headers: - valueType: STRING_MAP - response.total_size: - valueType: INT64 - response.size: - valueType: INT64 - response.time: - valueType: TIMESTAMP - response.grpc_status: - valueType: STRING - response.grpc_message: - valueType: STRING - source.uid: - valueType: STRING - source.user: # DEPRECATED - valueType: STRING - source.principal: - valueType: STRING - destination.uid: - valueType: STRING - destination.principal: - valueType: STRING - destination.port: - valueType: INT64 - connection.event: - valueType: STRING - connection.id: - valueType: STRING - connection.received.bytes: - valueType: INT64 - connection.received.bytes_total: - valueType: INT64 - connection.sent.bytes: - valueType: INT64 - connection.sent.bytes_total: - valueType: INT64 - connection.duration: - valueType: DURATION - connection.mtls: - valueType: BOOL - connection.requested_server_name: - valueType: STRING - context.protocol: - valueType: STRING - context.proxy_error_code: - valueType: STRING - context.timestamp: - valueType: TIMESTAMP - context.time: - valueType: TIMESTAMP - # Deprecated, kept for compatibility - context.reporter.local: - valueType: BOOL - context.reporter.kind: - valueType: STRING - context.reporter.uid: - valueType: STRING - api.service: - valueType: STRING - api.version: - valueType: STRING - api.operation: - valueType: STRING - api.protocol: - valueType: STRING - request.auth.principal: - valueType: STRING - request.auth.audiences: - valueType: STRING - request.auth.presenter: - valueType: STRING - request.auth.claims: - valueType: STRING_MAP - request.auth.raw_claims: - valueType: STRING - request.api_key: - valueType: STRING - rbac.permissive.response_code: - valueType: STRING - rbac.permissive.effective_policy_id: - valueType: STRING - check.error_code: - valueType: INT64 - check.error_message: - valueType: STRING - check.cache_hit: - valueType: BOOL - quota.cache_hit: - valueType: BOOL - context.proxy_version: - valueType: STRING - ---- -apiVersion: "config.istio.io/v1alpha2" -kind: attributemanifest -metadata: - name: kubernetes - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mixer.name" . }} - chart: {{ template "mixer.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - attributes: - source.ip: - valueType: IP_ADDRESS - source.labels: - valueType: STRING_MAP - source.metadata: - valueType: STRING_MAP - source.name: - valueType: STRING - source.namespace: - valueType: STRING - source.owner: - valueType: STRING - source.serviceAccount: - valueType: STRING - source.services: - valueType: STRING - source.workload.uid: - valueType: STRING - source.workload.name: - valueType: STRING - source.workload.namespace: - valueType: STRING - destination.ip: - valueType: IP_ADDRESS - destination.labels: - valueType: STRING_MAP - destination.metadata: - valueType: STRING_MAP - destination.owner: - valueType: STRING - destination.name: - valueType: STRING - destination.container.name: - valueType: STRING - destination.namespace: - valueType: STRING - destination.service.uid: - valueType: STRING - destination.service.name: - valueType: STRING - destination.service.namespace: - valueType: STRING - destination.service.host: - valueType: STRING - destination.serviceAccount: - valueType: STRING - destination.workload.uid: - valueType: STRING - destination.workload.name: - valueType: STRING - destination.workload.namespace: - valueType: STRING ---- -{{- if and .Values.adapters.stdio.enabled .Values.telemetry.enabled }} -apiVersion: "config.istio.io/v1alpha2" -kind: handler -metadata: - name: stdio - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mixer.name" . }} - chart: {{ template "mixer.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - compiledAdapter: stdio - params: - outputAsJson: {{ .Values.adapters.stdio.outputAsJson }} ---- -apiVersion: "config.istio.io/v1alpha2" -kind: instance -metadata: - name: accesslog - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mixer.name" . }} - chart: {{ template "mixer.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - compiledTemplate: logentry - params: - severity: '"Info"' - timestamp: request.time - variables: - sourceIp: source.ip | ip("0.0.0.0") - sourceApp: source.labels["app"] | "" - sourcePrincipal: source.principal | "" - sourceName: source.name | "" - sourceWorkload: source.workload.name | "" - sourceNamespace: source.namespace | "" - sourceOwner: source.owner | "" - destinationApp: destination.labels["app"] | "" - destinationIp: destination.ip | ip("0.0.0.0") - destinationServiceHost: destination.service.host | request.host | "" - destinationWorkload: destination.workload.name | "" - destinationName: destination.name | "" - destinationNamespace: destination.namespace | "" - destinationOwner: destination.owner | "" - destinationPrincipal: destination.principal | "" - apiClaims: request.auth.raw_claims | "" - apiKey: request.api_key | request.headers["x-api-key"] | "" - protocol: request.scheme | context.protocol | "http" - method: request.method | "" - url: request.path | "" - responseCode: response.code | 0 - responseFlags: context.proxy_error_code | "" - responseSize: response.size | 0 - permissiveResponseCode: rbac.permissive.response_code | "none" - permissiveResponsePolicyID: rbac.permissive.effective_policy_id | "none" - requestSize: request.size | 0 - requestId: request.headers["x-request-id"] | "" - clientTraceId: request.headers["x-client-trace-id"] | "" - latency: response.duration | "0ms" - connection_security_policy: conditional((context.reporter.kind | "inbound") == "outbound", "unknown", conditional(connection.mtls | false, "mutual_tls", "none")) - requestedServerName: connection.requested_server_name | "" - userAgent: request.useragent | "" - responseTimestamp: response.time - receivedBytes: request.total_size | 0 - sentBytes: response.total_size | 0 - referer: request.referer | "" - httpAuthority: request.headers[":authority"] | request.host | "" - xForwardedFor: request.headers["x-forwarded-for"] | "0.0.0.0" - reporter: conditional((context.reporter.kind | "inbound") == "outbound", "source", "destination") - grpcStatus: response.grpc_status | "" - grpcMessage: response.grpc_message | "" - monitored_resource_type: '"global"' ---- -apiVersion: "config.istio.io/v1alpha2" -kind: instance -metadata: - name: tcpaccesslog - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mixer.name" . }} - chart: {{ template "mixer.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - compiledTemplate: logentry - params: - severity: '"Info"' - timestamp: context.time | timestamp("2017-01-01T00:00:00Z") - variables: - connectionEvent: connection.event | "" - sourceIp: source.ip | ip("0.0.0.0") - sourceApp: source.labels["app"] | "" - sourcePrincipal: source.principal | "" - sourceName: source.name | "" - sourceWorkload: source.workload.name | "" - sourceNamespace: source.namespace | "" - sourceOwner: source.owner | "" - destinationApp: destination.labels["app"] | "" - destinationIp: destination.ip | ip("0.0.0.0") - destinationServiceHost: destination.service.host | "" - destinationWorkload: destination.workload.name | "" - destinationName: destination.name | "" - destinationNamespace: destination.namespace | "" - destinationOwner: destination.owner | "" - destinationPrincipal: destination.principal | "" - protocol: context.protocol | "tcp" - connectionDuration: connection.duration | "0ms" - connection_security_policy: conditional((context.reporter.kind | "inbound") == "outbound", "unknown", conditional(connection.mtls | false, "mutual_tls", "none")) - requestedServerName: connection.requested_server_name | "" - receivedBytes: connection.received.bytes | 0 - sentBytes: connection.sent.bytes | 0 - totalReceivedBytes: connection.received.bytes_total | 0 - totalSentBytes: connection.sent.bytes_total | 0 - reporter: conditional((context.reporter.kind | "inbound") == "outbound", "source", "destination") - responseFlags: context.proxy_error_code | "" - monitored_resource_type: '"global"' ---- -apiVersion: "config.istio.io/v1alpha2" -kind: rule -metadata: - name: stdio - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mixer.name" . }} - chart: {{ template "mixer.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - match: context.protocol == "http" || context.protocol == "grpc" - actions: - - handler: stdio - instances: - - accesslog ---- -apiVersion: "config.istio.io/v1alpha2" -kind: rule -metadata: - name: stdiotcp - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mixer.name" . }} - chart: {{ template "mixer.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - match: context.protocol == "tcp" - actions: - - handler: stdio - instances: - - tcpaccesslog -{{- end }} ---- -{{- if and .Values.adapters.prometheus.enabled .Values.telemetry.enabled }} -apiVersion: "config.istio.io/v1alpha2" -kind: instance -metadata: - name: requestcount - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mixer.name" . }} - chart: {{ template "mixer.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - compiledTemplate: metric - params: - value: "1" - dimensions: - reporter: conditional((context.reporter.kind | "inbound") == "outbound", "source", "destination") - source_workload: source.workload.name | "unknown" - source_workload_namespace: source.workload.namespace | "unknown" - source_principal: source.principal | "unknown" - source_app: source.labels["app"] | "unknown" - source_version: source.labels["version"] | "unknown" - destination_workload: destination.workload.name | "unknown" - destination_workload_namespace: destination.workload.namespace | "unknown" - destination_principal: destination.principal | "unknown" - destination_app: destination.labels["app"] | "unknown" - destination_version: destination.labels["version"] | "unknown" - destination_service: destination.service.host | request.host | "unknown" - destination_service_name: destination.service.name | "unknown" - destination_service_namespace: destination.service.namespace | "unknown" - request_protocol: api.protocol | context.protocol | "unknown" - response_code: response.code | 200 - response_flags: context.proxy_error_code | "-" - permissive_response_code: rbac.permissive.response_code | "none" - permissive_response_policyid: rbac.permissive.effective_policy_id | "none" - connection_security_policy: conditional((context.reporter.kind | "inbound") == "outbound", "unknown", conditional(connection.mtls | false, "mutual_tls", "none")) - monitored_resource_type: '"UNSPECIFIED"' ---- -apiVersion: "config.istio.io/v1alpha2" -kind: instance -metadata: - name: requestduration - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mixer.name" . }} - chart: {{ template "mixer.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - compiledTemplate: metric - params: - value: response.duration | "0ms" - dimensions: - reporter: conditional((context.reporter.kind | "inbound") == "outbound", "source", "destination") - source_workload: source.workload.name | "unknown" - source_workload_namespace: source.workload.namespace | "unknown" - source_principal: source.principal | "unknown" - source_app: source.labels["app"] | "unknown" - source_version: source.labels["version"] | "unknown" - destination_workload: destination.workload.name | "unknown" - destination_workload_namespace: destination.workload.namespace | "unknown" - destination_principal: destination.principal | "unknown" - destination_app: destination.labels["app"] | "unknown" - destination_version: destination.labels["version"] | "unknown" - destination_service: destination.service.host | request.host | "unknown" - destination_service_name: destination.service.name | "unknown" - destination_service_namespace: destination.service.namespace | "unknown" - request_protocol: api.protocol | context.protocol | "unknown" - response_code: response.code | 200 - response_flags: context.proxy_error_code | "-" - permissive_response_code: rbac.permissive.response_code | "none" - permissive_response_policyid: rbac.permissive.effective_policy_id | "none" - connection_security_policy: conditional((context.reporter.kind | "inbound") == "outbound", "unknown", conditional(connection.mtls | false, "mutual_tls", "none")) - monitored_resource_type: '"UNSPECIFIED"' ---- -apiVersion: "config.istio.io/v1alpha2" -kind: instance -metadata: - name: requestsize - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mixer.name" . }} - chart: {{ template "mixer.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - compiledTemplate: metric - params: - value: request.size | 0 - dimensions: - reporter: conditional((context.reporter.kind | "inbound") == "outbound", "source", "destination") - source_workload: source.workload.name | "unknown" - source_workload_namespace: source.workload.namespace | "unknown" - source_principal: source.principal | "unknown" - source_app: source.labels["app"] | "unknown" - source_version: source.labels["version"] | "unknown" - destination_workload: destination.workload.name | "unknown" - destination_workload_namespace: destination.workload.namespace | "unknown" - destination_principal: destination.principal | "unknown" - destination_app: destination.labels["app"] | "unknown" - destination_version: destination.labels["version"] | "unknown" - destination_service: destination.service.host | request.host | "unknown" - destination_service_name: destination.service.name | "unknown" - destination_service_namespace: destination.service.namespace | "unknown" - request_protocol: api.protocol | context.protocol | "unknown" - response_code: response.code | 200 - response_flags: context.proxy_error_code | "-" - permissive_response_code: rbac.permissive.response_code | "none" - permissive_response_policyid: rbac.permissive.effective_policy_id | "none" - connection_security_policy: conditional((context.reporter.kind | "inbound") == "outbound", "unknown", conditional(connection.mtls | false, "mutual_tls", "none")) - monitored_resource_type: '"UNSPECIFIED"' ---- -apiVersion: "config.istio.io/v1alpha2" -kind: instance -metadata: - name: responsesize - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mixer.name" . }} - chart: {{ template "mixer.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - compiledTemplate: metric - params: - value: response.size | 0 - dimensions: - reporter: conditional((context.reporter.kind | "inbound") == "outbound", "source", "destination") - source_workload: source.workload.name | "unknown" - source_workload_namespace: source.workload.namespace | "unknown" - source_principal: source.principal | "unknown" - source_app: source.labels["app"] | "unknown" - source_version: source.labels["version"] | "unknown" - destination_workload: destination.workload.name | "unknown" - destination_workload_namespace: destination.workload.namespace | "unknown" - destination_principal: destination.principal | "unknown" - destination_app: destination.labels["app"] | "unknown" - destination_version: destination.labels["version"] | "unknown" - destination_service: destination.service.host | request.host | "unknown" - destination_service_name: destination.service.name | "unknown" - destination_service_namespace: destination.service.namespace | "unknown" - request_protocol: api.protocol | context.protocol | "unknown" - response_code: response.code | 200 - response_flags: context.proxy_error_code | "-" - permissive_response_code: rbac.permissive.response_code | "none" - permissive_response_policyid: rbac.permissive.effective_policy_id | "none" - connection_security_policy: conditional((context.reporter.kind | "inbound") == "outbound", "unknown", conditional(connection.mtls | false, "mutual_tls", "none")) - monitored_resource_type: '"UNSPECIFIED"' ---- -apiVersion: "config.istio.io/v1alpha2" -kind: instance -metadata: - name: tcpbytesent - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mixer.name" . }} - chart: {{ template "mixer.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - compiledTemplate: metric - params: - value: connection.sent.bytes | 0 - dimensions: - reporter: conditional((context.reporter.kind | "inbound") == "outbound", "source", "destination") - source_workload: source.workload.name | "unknown" - source_workload_namespace: source.workload.namespace | "unknown" - source_principal: source.principal | "unknown" - source_app: source.labels["app"] | "unknown" - source_version: source.labels["version"] | "unknown" - destination_workload: destination.workload.name | "unknown" - destination_workload_namespace: destination.workload.namespace | "unknown" - destination_principal: destination.principal | "unknown" - destination_app: destination.labels["app"] | "unknown" - destination_version: destination.labels["version"] | "unknown" - destination_service: destination.service.host | "unknown" - destination_service_name: destination.service.name | "unknown" - destination_service_namespace: destination.service.namespace | "unknown" - connection_security_policy: conditional((context.reporter.kind | "inbound") == "outbound", "unknown", conditional(connection.mtls | false, "mutual_tls", "none")) - response_flags: context.proxy_error_code | "-" - monitored_resource_type: '"UNSPECIFIED"' ---- -apiVersion: "config.istio.io/v1alpha2" -kind: instance -metadata: - name: tcpbytereceived - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mixer.name" . }} - chart: {{ template "mixer.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - compiledTemplate: metric - params: - value: connection.received.bytes | 0 - dimensions: - reporter: conditional((context.reporter.kind | "inbound") == "outbound", "source", "destination") - source_workload: source.workload.name | "unknown" - source_workload_namespace: source.workload.namespace | "unknown" - source_principal: source.principal | "unknown" - source_app: source.labels["app"] | "unknown" - source_version: source.labels["version"] | "unknown" - destination_workload: destination.workload.name | "unknown" - destination_workload_namespace: destination.workload.namespace | "unknown" - destination_principal: destination.principal | "unknown" - destination_app: destination.labels["app"] | "unknown" - destination_version: destination.labels["version"] | "unknown" - destination_service: destination.service.host | "unknown" - destination_service_name: destination.service.name | "unknown" - destination_service_namespace: destination.service.namespace | "unknown" - connection_security_policy: conditional((context.reporter.kind | "inbound") == "outbound", "unknown", conditional(connection.mtls | false, "mutual_tls", "none")) - response_flags: context.proxy_error_code | "-" - monitored_resource_type: '"UNSPECIFIED"' ---- -apiVersion: "config.istio.io/v1alpha2" -kind: instance -metadata: - name: tcpconnectionsopened - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mixer.name" . }} - chart: {{ template "mixer.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - compiledTemplate: metric - params: - value: "1" - dimensions: - reporter: conditional((context.reporter.kind | "inbound") == "outbound", "source", "destination") - source_workload: source.workload.name | "unknown" - source_workload_namespace: source.workload.namespace | "unknown" - source_principal: source.principal | "unknown" - source_app: source.labels["app"] | "unknown" - source_version: source.labels["version"] | "unknown" - destination_workload: destination.workload.name | "unknown" - destination_workload_namespace: destination.workload.namespace | "unknown" - destination_principal: destination.principal | "unknown" - destination_app: destination.labels["app"] | "unknown" - destination_version: destination.labels["version"] | "unknown" - destination_service: destination.service.host | "unknown" - destination_service_name: destination.service.name | "unknown" - destination_service_namespace: destination.service.namespace | "unknown" - connection_security_policy: conditional((context.reporter.kind | "inbound") == "outbound", "unknown", conditional(connection.mtls | false, "mutual_tls", "none")) - response_flags: context.proxy_error_code | "-" - monitored_resource_type: '"UNSPECIFIED"' ---- -apiVersion: "config.istio.io/v1alpha2" -kind: instance -metadata: - name: tcpconnectionsclosed - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mixer.name" . }} - chart: {{ template "mixer.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - compiledTemplate: metric - params: - value: "1" - dimensions: - reporter: conditional((context.reporter.kind | "inbound") == "outbound", "source", "destination") - source_workload: source.workload.name | "unknown" - source_workload_namespace: source.workload.namespace | "unknown" - source_principal: source.principal | "unknown" - source_app: source.labels["app"] | "unknown" - source_version: source.labels["version"] | "unknown" - destination_workload: destination.workload.name | "unknown" - destination_workload_namespace: destination.workload.namespace | "unknown" - destination_principal: destination.principal | "unknown" - destination_app: destination.labels["app"] | "unknown" - destination_version: destination.labels["version"] | "unknown" - destination_service: destination.service.host | "unknown" - destination_service_name: destination.service.name | "unknown" - destination_service_namespace: destination.service.namespace | "unknown" - connection_security_policy: conditional((context.reporter.kind | "inbound") == "outbound", "unknown", conditional(connection.mtls | false, "mutual_tls", "none")) - response_flags: context.proxy_error_code | "-" - monitored_resource_type: '"UNSPECIFIED"' ---- -apiVersion: "config.istio.io/v1alpha2" -kind: handler -metadata: - name: prometheus - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mixer.name" . }} - chart: {{ template "mixer.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - compiledAdapter: prometheus - params: - metricsExpirationPolicy: - metricsExpiryDuration: "{{ .Values.adapters.prometheus.metricsExpiryDuration }}" - metrics: - - name: requests_total - instance_name: requestcount.instance.{{ .Release.Namespace }} - kind: COUNTER - label_names: - - reporter - - source_app - - source_principal - - source_workload - - source_workload_namespace - - source_version - - destination_app - - destination_principal - - destination_workload - - destination_workload_namespace - - destination_version - - destination_service - - destination_service_name - - destination_service_namespace - - request_protocol - - response_code - - response_flags - - permissive_response_code - - permissive_response_policyid - - connection_security_policy - - name: request_duration_seconds - instance_name: requestduration.instance.{{ .Release.Namespace }} - kind: DISTRIBUTION - label_names: - - reporter - - source_app - - source_principal - - source_workload - - source_workload_namespace - - source_version - - destination_app - - destination_principal - - destination_workload - - destination_workload_namespace - - destination_version - - destination_service - - destination_service_name - - destination_service_namespace - - request_protocol - - response_code - - response_flags - - permissive_response_code - - permissive_response_policyid - - connection_security_policy - buckets: - explicit_buckets: - bounds: [0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10] - - name: request_bytes - instance_name: requestsize.instance.{{ .Release.Namespace }} - kind: DISTRIBUTION - label_names: - - reporter - - source_app - - source_principal - - source_workload - - source_workload_namespace - - source_version - - destination_app - - destination_principal - - destination_workload - - destination_workload_namespace - - destination_version - - destination_service - - destination_service_name - - destination_service_namespace - - request_protocol - - response_code - - response_flags - - permissive_response_code - - permissive_response_policyid - - connection_security_policy - buckets: - exponentialBuckets: - numFiniteBuckets: 8 - scale: 1 - growthFactor: 10 - - name: response_bytes - instance_name: responsesize.instance.{{ .Release.Namespace }} - kind: DISTRIBUTION - label_names: - - reporter - - source_app - - source_principal - - source_workload - - source_workload_namespace - - source_version - - destination_app - - destination_principal - - destination_workload - - destination_workload_namespace - - destination_version - - destination_service - - destination_service_name - - destination_service_namespace - - request_protocol - - response_code - - response_flags - - permissive_response_code - - permissive_response_policyid - - connection_security_policy - buckets: - exponentialBuckets: - numFiniteBuckets: 8 - scale: 1 - growthFactor: 10 - - name: tcp_sent_bytes_total - instance_name: tcpbytesent.instance.{{ .Release.Namespace }} - kind: COUNTER - label_names: - - reporter - - source_app - - source_principal - - source_workload - - source_workload_namespace - - source_version - - destination_app - - destination_principal - - destination_workload - - destination_workload_namespace - - destination_version - - destination_service - - destination_service_name - - destination_service_namespace - - connection_security_policy - - response_flags - - name: tcp_received_bytes_total - instance_name: tcpbytereceived.instance.{{ .Release.Namespace }} - kind: COUNTER - label_names: - - reporter - - source_app - - source_principal - - source_workload - - source_workload_namespace - - source_version - - destination_app - - destination_principal - - destination_workload - - destination_workload_namespace - - destination_version - - destination_service - - destination_service_name - - destination_service_namespace - - connection_security_policy - - response_flags - - name: tcp_connections_opened_total - instance_name: tcpconnectionsopened.instance.{{ .Release.Namespace }} - kind: COUNTER - label_names: - - reporter - - source_app - - source_principal - - source_workload - - source_workload_namespace - - source_version - - destination_app - - destination_principal - - destination_workload - - destination_workload_namespace - - destination_version - - destination_service - - destination_service_name - - destination_service_namespace - - connection_security_policy - - response_flags - - name: tcp_connections_closed_total - instance_name: tcpconnectionsclosed.instance.{{ .Release.Namespace }} - kind: COUNTER - label_names: - - reporter - - source_app - - source_principal - - source_workload - - source_workload_namespace - - source_version - - destination_app - - destination_principal - - destination_workload - - destination_workload_namespace - - destination_version - - destination_service - - destination_service_name - - destination_service_namespace - - connection_security_policy - - response_flags ---- -apiVersion: "config.istio.io/v1alpha2" -kind: rule -metadata: - name: promhttp - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mixer.name" . }} - chart: {{ template "mixer.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - match: (context.protocol == "http" || context.protocol == "grpc") && (match((request.useragent | "-"), "kube-probe*") == false) && (match((request.useragent | "-"), "Prometheus*") == false) - actions: - - handler: prometheus - instances: - - requestcount - - requestduration - - requestsize - - responsesize ---- -apiVersion: "config.istio.io/v1alpha2" -kind: rule -metadata: - name: promtcp - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mixer.name" . }} - chart: {{ template "mixer.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - match: context.protocol == "tcp" - actions: - - handler: prometheus - instances: - - tcpbytesent - - tcpbytereceived ---- -apiVersion: "config.istio.io/v1alpha2" -kind: rule -metadata: - name: promtcpconnectionopen - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mixer.name" . }} - chart: {{ template "mixer.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - match: context.protocol == "tcp" && ((connection.event | "na") == "open") - actions: - - handler: prometheus - instances: - - tcpconnectionsopened ---- -apiVersion: "config.istio.io/v1alpha2" -kind: rule -metadata: - name: promtcpconnectionclosed - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mixer.name" . }} - chart: {{ template "mixer.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - match: context.protocol == "tcp" && ((connection.event | "na") == "close") - actions: - - handler: prometheus - instances: - - tcpconnectionsclosed -{{- end }} ---- -{{- if and .Values.adapters.kubernetesenv.enabled (or .Values.policy.enabled .Values.telemetry.enabled) }} -apiVersion: "config.istio.io/v1alpha2" -kind: handler -metadata: - name: kubernetesenv - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mixer.name" . }} - chart: {{ template "mixer.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - compiledAdapter: kubernetesenv - params: - # when running from mixer root, use the following config after adding a - # symbolic link to a kubernetes config file via: - # - # $ ln -s ~/.kube/config mixer/adapter/kubernetes/kubeconfig - # - # kubeconfig_path: "mixer/adapter/kubernetes/kubeconfig" - ---- -apiVersion: "config.istio.io/v1alpha2" -kind: rule -metadata: - name: kubeattrgenrulerule - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mixer.name" . }} - chart: {{ template "mixer.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - actions: - - handler: kubernetesenv - instances: - - attributes ---- -apiVersion: "config.istio.io/v1alpha2" -kind: rule -metadata: - name: tcpkubeattrgenrulerule - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mixer.name" . }} - chart: {{ template "mixer.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - match: context.protocol == "tcp" - actions: - - handler: kubernetesenv - instances: - - attributes ---- -apiVersion: "config.istio.io/v1alpha2" -kind: instance -metadata: - name: attributes - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mixer.name" . }} - chart: {{ template "mixer.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - compiledTemplate: kubernetes - params: - # Pass the required attribute data to the adapter - source_uid: source.uid | "" - source_ip: source.ip | ip("0.0.0.0") # default to unspecified ip addr - destination_uid: destination.uid | "" - destination_port: destination.port | 0 - attributeBindings: - # Fill the new attributes from the adapter produced output. - # $out refers to an instance of OutputTemplate message - source.ip: $out.source_pod_ip | ip("0.0.0.0") - source.uid: $out.source_pod_uid | "unknown" - source.labels: $out.source_labels | emptyStringMap() - source.name: $out.source_pod_name | "unknown" - source.namespace: $out.source_namespace | "default" - source.owner: $out.source_owner | "unknown" - source.serviceAccount: $out.source_service_account_name | "unknown" - source.workload.uid: $out.source_workload_uid | "unknown" - source.workload.name: $out.source_workload_name | "unknown" - source.workload.namespace: $out.source_workload_namespace | "unknown" - destination.ip: $out.destination_pod_ip | ip("0.0.0.0") - destination.uid: $out.destination_pod_uid | "unknown" - destination.labels: $out.destination_labels | emptyStringMap() - destination.name: $out.destination_pod_name | "unknown" - destination.container.name: $out.destination_container_name | "unknown" - destination.namespace: $out.destination_namespace | "default" - destination.owner: $out.destination_owner | "unknown" - destination.serviceAccount: $out.destination_service_account_name | "unknown" - destination.workload.uid: $out.destination_workload_uid | "unknown" - destination.workload.name: $out.destination_workload_name | "unknown" - destination.workload.namespace: $out.destination_workload_namespace | "unknown" -{{- end }} ---- -{{- if .Values.policy.enabled }} -# Configuration needed by Mixer. -# Mixer cluster is delivered via CDS -# Specify mixer cluster settings -apiVersion: networking.istio.io/v1alpha3 -kind: DestinationRule -metadata: - name: istio-policy - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mixer.name" . }} - chart: {{ template "mixer.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - host: istio-policy.{{ .Release.Namespace }}.svc.{{ .Values.global.proxy.clusterDomain }} - {{- if .Values.global.defaultConfigVisibilitySettings }} - exportTo: - - '*' - {{- end }} - trafficPolicy: - {{- if .Values.global.controlPlaneSecurityEnabled }} - portLevelSettings: - - port: - number: 15004 - tls: - mode: ISTIO_MUTUAL - {{- end}} - connectionPool: - http: - http2MaxRequests: 10000 - maxRequestsPerConnection: 10000 -{{- end }} ---- -{{- if .Values.telemetry.enabled }} -apiVersion: networking.istio.io/v1alpha3 -kind: DestinationRule -metadata: - name: istio-telemetry - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mixer.name" . }} - chart: {{ template "mixer.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - host: istio-telemetry.{{ .Release.Namespace }}.svc.{{ .Values.global.proxy.clusterDomain }} - {{- if .Values.global.defaultConfigVisibilitySettings }} - exportTo: - - '*' - {{- end }} - trafficPolicy: - {{- if .Values.global.controlPlaneSecurityEnabled }} - portLevelSettings: - - port: - number: 15004 - tls: - mode: ISTIO_MUTUAL - {{- end}} - connectionPool: - http: - http2MaxRequests: 10000 - maxRequestsPerConnection: 10000 -{{- end }} ---- -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/deployment.yaml b/kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/deployment.yaml deleted file mode 100755 index 2b32b1e1d..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/deployment.yaml +++ /dev/null @@ -1,418 +0,0 @@ -{{- define "policy_container" }} - spec: - serviceAccountName: istio-mixer-service-account -{{- if $.Values.global.priorityClassName }} - priorityClassName: "{{ $.Values.global.priorityClassName }}" -{{- end }} - volumes: - - name: istio-certs - secret: - secretName: istio.istio-mixer-service-account - optional: true - {{- if $.Values.global.sds.enabled }} - - hostPath: - path: /var/run/sds - name: sds-uds-path - - name: istio-token - projected: - sources: - - serviceAccountToken: - audience: {{ $.Values.global.sds.token.aud }} - expirationSeconds: 43200 - path: istio-token - {{- end }} - - name: uds-socket - emptyDir: {} - - name: policy-adapter-secret - secret: - secretName: policy-adapter-secret - optional: true - affinity: - {{- include "nodeaffinity" . | indent 6 }} - {{- include "podAntiAffinity" . | indent 6 }} - {{- if .Values.tolerations }} - tolerations: -{{ toYaml .Values.tolerations | indent 6 }} - {{- else if .Values.global.defaultTolerations }} - tolerations: -{{ toYaml .Values.global.defaultTolerations | indent 6 }} - {{- end }} - containers: - - name: mixer -{{- if contains "/" .Values.image }} - image: "{{ .Values.image }}" -{{- else }} - image: "{{ $.Values.global.hub }}/{{ $.Values.image }}:{{ $.Values.global.tag }}" -{{- end }} - imagePullPolicy: {{ $.Values.global.imagePullPolicy }} - ports: - - containerPort: {{ .Values.global.monitoringPort }} - - containerPort: 42422 - args: - - --monitoringPort={{ .Values.global.monitoringPort }} - - --address - - unix:///sock/mixer.socket -{{- if $.Values.global.logging.level }} - - --log_output_level={{ $.Values.global.logging.level }} -{{- end}} -{{- if $.Values.global.useMCP }} - {{- if $.Values.global.controlPlaneSecurityEnabled}} - - --configStoreURL=mcps://istio-galley.{{ $.Release.Namespace }}.svc:9901 - {{- else }} - - --configStoreURL=mcp://istio-galley.{{ $.Release.Namespace }}.svc:9901 - {{- end }} -{{- else }} - - --configStoreURL=k8s:// -{{- end }} - - --configDefaultNamespace={{ $.Release.Namespace }} - {{- if $.Values.adapters.useAdapterCRDs }} - - --useAdapterCRDs=true - {{- else }} - - --useAdapterCRDs=false - {{- end }} - - --useTemplateCRDs=false - {{- if $.Values.global.tracer.zipkin.address }} - - --trace_zipkin_url=http://{{- $.Values.global.tracer.zipkin.address }}/api/v1/spans - {{- else }} - - --trace_zipkin_url=http://zipkin.{{ $.Release.Namespace }}:9411/api/v1/spans - {{- end }} - {{- if .Values.env }} - env: - {{- range $key, $val := .Values.env }} - - name: {{ $key }} - value: "{{ $val }}" - {{- end }} - {{- end }} - resources: -{{- if .Values.policy.resources }} -{{ toYaml .Values.policy.resources | indent 10 }} -{{- else if .Values.resources }} -{{ toYaml .Values.resources | indent 10 }} -{{- else }} -{{ toYaml .Values.global.defaultResources | indent 10 }} -{{- end }} - volumeMounts: -{{- if $.Values.global.useMCP }} - - name: istio-certs - mountPath: /etc/certs - readOnly: true -{{- end }} - - name: uds-socket - mountPath: /sock - livenessProbe: - httpGet: - path: /version - port: {{ .Values.global.monitoringPort }} - initialDelaySeconds: 5 - periodSeconds: 5 - - name: istio-proxy -{{- if contains "/" $.Values.global.proxy.image }} - image: "{{ $.Values.global.proxy.image }}" -{{- else }} - image: "{{ $.Values.global.hub }}/{{ $.Values.global.proxy.image }}:{{ $.Values.global.tag }}" -{{- end }} - imagePullPolicy: {{ $.Values.global.imagePullPolicy }} - ports: - - containerPort: 9091 - - containerPort: 15004 - - containerPort: 15090 - protocol: TCP - name: http-envoy-prom - args: - - proxy - - --domain - - $(POD_NAMESPACE).svc.{{ $.Values.global.proxy.clusterDomain }} - - --serviceCluster - - istio-policy - - --templateFile - - /etc/istio/proxy/envoy_policy.yaml.tmpl - {{- if $.Values.global.controlPlaneSecurityEnabled }} - - --controlPlaneAuthPolicy - - MUTUAL_TLS - {{- else }} - - --controlPlaneAuthPolicy - - NONE - {{- end }} - {{- if $.Values.global.trustDomain }} - - --trust-domain={{ $.Values.global.trustDomain }} - {{- end }} - env: - - name: POD_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.name - - name: POD_NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - - name: INSTANCE_IP - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: status.podIP - - name: SDS_ENABLED - value: "{{ $.Values.global.sds.enabled }}" - resources: -{{- if $.Values.global.proxy.resources }} -{{ toYaml $.Values.global.proxy.resources | indent 10 }} -{{- else }} -{{ toYaml .Values.global.defaultResources | indent 10 }} -{{- end }} - volumeMounts: - - name: istio-certs - mountPath: /etc/certs - readOnly: true - {{- if $.Values.global.sds.enabled }} - - name: sds-uds-path - mountPath: /var/run/sds - readOnly: true - - name: istio-token - mountPath: /var/run/secrets/tokens - {{- end }} - - name: uds-socket - mountPath: /sock - - name: policy-adapter-secret - mountPath: /var/run/secrets/istio.io/policy/adapter - readOnly: true -{{- end }} - -{{- define "telemetry_container" }} - spec: - serviceAccountName: istio-mixer-service-account -{{- if $.Values.global.priorityClassName }} - priorityClassName: "{{ $.Values.global.priorityClassName }}" -{{- end }} - volumes: - - name: istio-certs - secret: - secretName: istio.istio-mixer-service-account - optional: true - {{- if $.Values.global.sds.enabled }} - - hostPath: - path: /var/run/sds - name: sds-uds-path - - name: istio-token - projected: - sources: - - serviceAccountToken: - audience: {{ $.Values.global.sds.token.aud }} - expirationSeconds: 43200 - path: istio-token - {{- end }} - - name: uds-socket - emptyDir: {} - - name: telemetry-adapter-secret - secret: - secretName: telemetry-adapter-secret - optional: true - affinity: - {{- include "nodeaffinity" . | indent 6 }} - {{- include "podAntiAffinity" . | indent 6 }} - {{- if .Values.tolerations }} - tolerations: -{{ toYaml .Values.tolerations | indent 6 }} - {{- else if .Values.global.defaultTolerations }} - tolerations: -{{ toYaml .Values.global.defaultTolerations | indent 6 }} - {{- end }} - containers: - - name: mixer -{{- if contains "/" .Values.image }} - image: "{{ .Values.image }}" -{{- else }} - image: "{{ $.Values.global.hub }}/{{ $.Values.image }}:{{ $.Values.global.tag }}" -{{- end }} - imagePullPolicy: {{ $.Values.global.imagePullPolicy }} - ports: - - containerPort: {{ .Values.global.monitoringPort }} - - containerPort: 42422 - args: - - --monitoringPort={{ .Values.global.monitoringPort }} - - --address - - unix:///sock/mixer.socket -{{- if $.Values.global.logging.level }} - - --log_output_level={{ $.Values.global.logging.level }} -{{- end}} -{{- if $.Values.global.useMCP }} - {{- if $.Values.global.controlPlaneSecurityEnabled}} - - --configStoreURL=mcps://istio-galley.{{ $.Release.Namespace }}.svc:9901 - - --certFile=/etc/certs/cert-chain.pem - - --keyFile=/etc/certs/key.pem - - --caCertFile=/etc/certs/root-cert.pem - {{- else }} - - --configStoreURL=mcp://istio-galley.{{ $.Release.Namespace }}.svc:9901 - {{- end }} -{{- else }} - - --configStoreURL=k8s:// -{{- end }} - - --configDefaultNamespace={{ $.Release.Namespace }} - {{- if $.Values.adapters.useAdapterCRDs }} - - --useAdapterCRDs=true - {{- else }} - - --useAdapterCRDs=false - {{- end }} - {{- if $.Values.global.tracer.zipkin.address }} - - --trace_zipkin_url=http://{{- $.Values.global.tracer.zipkin.address }}/api/v1/spans - {{- else }} - - --trace_zipkin_url=http://zipkin.{{ $.Release.Namespace }}:9411/api/v1/spans - {{- end }} - - --averageLatencyThreshold - - {{ $.Values.telemetry.loadshedding.latencyThreshold }} - - --loadsheddingMode - - {{ $.Values.telemetry.loadshedding.mode }} - {{- if .Values.env }} - env: - {{- range $key, $val := .Values.env }} - - name: {{ $key }} - value: "{{ $val }}" - {{- end }} - {{- end }} - resources: -{{- if .Values.telemetry.resources }} -{{ toYaml .Values.telemetry.resources | indent 10 }} -{{- else if .Values.resources }} -{{ toYaml .Values.resources | indent 10 }} -{{- else }} -{{ toYaml .Values.global.defaultResources | indent 10 }} -{{- end }} - volumeMounts: -{{- if $.Values.global.useMCP }} - - name: istio-certs - mountPath: /etc/certs - readOnly: true -{{- end }} - - name: telemetry-adapter-secret - mountPath: /var/run/secrets/istio.io/telemetry/adapter - readOnly: true - - name: uds-socket - mountPath: /sock - livenessProbe: - httpGet: - path: /version - port: {{ .Values.global.monitoringPort }} - initialDelaySeconds: 5 - periodSeconds: 5 - - name: istio-proxy -{{- if contains "/" $.Values.global.proxy.image }} - image: "{{ $.Values.global.proxy.image }}" -{{- else }} - image: "{{ $.Values.global.hub }}/{{ $.Values.global.proxy.image }}:{{ $.Values.global.tag }}" -{{- end }} - imagePullPolicy: {{ $.Values.global.imagePullPolicy }} - ports: - - containerPort: 9091 - - containerPort: 15004 - - containerPort: 15090 - protocol: TCP - name: http-envoy-prom - args: - - proxy - - --domain - - $(POD_NAMESPACE).svc.{{ .Values.global.proxy.clusterDomain }} - - --serviceCluster - - istio-telemetry - - --templateFile - - /etc/istio/proxy/envoy_telemetry.yaml.tmpl - {{- if $.Values.global.controlPlaneSecurityEnabled }} - - --controlPlaneAuthPolicy - - MUTUAL_TLS - {{- else }} - - --controlPlaneAuthPolicy - - NONE - {{- end }} - env: - - name: POD_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.name - - name: POD_NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - - name: INSTANCE_IP - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: status.podIP - - name: SDS_ENABLED - value: "{{ $.Values.global.sds.enabled }}" - resources: -{{- if $.Values.global.proxy.resources }} -{{ toYaml $.Values.global.proxy.resources | indent 10 }} -{{- else }} -{{ toYaml .Values.global.defaultResources | indent 10 }} -{{- end }} - volumeMounts: - - name: istio-certs - mountPath: /etc/certs - readOnly: true - {{- if $.Values.global.sds.enabled }} - - name: sds-uds-path - mountPath: /var/run/sds - readOnly: true - - name: istio-token - mountPath: /var/run/secrets/tokens - {{- end }} - - name: uds-socket - mountPath: /sock -{{- end }} - - -{{- range $key, $spec := .Values }} -{{- if or (eq $key "policy") (eq $key "telemetry") }} -{{- if $spec.enabled }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: istio-{{ $key }} - namespace: {{ $.Release.Namespace }} - labels: - app: istio-mixer - chart: {{ template "mixer.chart" $ }} - heritage: {{ $.Release.Service }} - release: {{ $.Release.Name }} - istio: mixer -spec: -{{- if not $spec.autoscaleEnabled }} -{{- if $spec.replicaCount }} - replicas: {{ $spec.replicaCount }} -{{- else }} - replicas: 1 -{{- end }} -{{- end }} - strategy: - rollingUpdate: - maxSurge: {{ $spec.rollingMaxSurge }} - maxUnavailable: {{ $spec.rollingMaxUnavailable }} - selector: - matchLabels: - istio: mixer - istio-mixer-type: {{ $key }} - template: - metadata: - labels: - app: {{ $key }} - chart: {{ template "mixer.chart" $ }} - heritage: {{ $.Release.Service }} - release: {{ $.Release.Name }} - istio: mixer - istio-mixer-type: {{ $key }} - annotations: - sidecar.istio.io/inject: "false" -{{- with $.Values.podAnnotations }} -{{ toYaml . | indent 8 }} -{{- end }} -{{- if eq $key "policy"}} -{{- template "policy_container" $ }} -{{- else }} -{{- template "telemetry_container" $ }} -{{- end }} - ---- -{{- end }} -{{- end }} -{{- end }} {{/* range */}} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/poddisruptionbudget.yaml b/kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/poddisruptionbudget.yaml deleted file mode 100755 index a6bfe8668..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/poddisruptionbudget.yaml +++ /dev/null @@ -1,32 +0,0 @@ -{{- range $key, $spec := .Values }} -{{- if or (eq $key "policy") (eq $key "telemetry") }} -{{- if $spec.enabled }} -{{- if $.Values.global.defaultPodDisruptionBudget.enabled }} -apiVersion: policy/v1beta1 -kind: PodDisruptionBudget -metadata: - name: istio-{{ $key }} - namespace: {{ $.Release.Namespace }} - labels: - app: {{ $key }} - chart: {{ template "mixer.chart" $ }} - heritage: {{ $.Release.Service }} - release: {{ $.Release.Name }} - version: {{ $.Chart.Version }} - istio: mixer - istio-mixer-type: {{ $key }} -spec: -{{- if $.Values.global.defaultPodDisruptionBudget.enabled }} -{{ include "podDisruptionBudget.spec" $.Values.global.defaultPodDisruptionBudget }} -{{- end }} - selector: - matchLabels: - app: {{ $key }} - release: {{ $.Release.Name }} - istio: mixer - istio-mixer-type: {{ $key }} ---- -{{- end }} -{{- end }} -{{- end }} -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/service.yaml b/kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/service.yaml deleted file mode 100755 index 79cc4a582..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/service.yaml +++ /dev/null @@ -1,39 +0,0 @@ -{{- range $key, $spec := .Values }} -{{- if or (eq $key "policy") (eq $key "telemetry") }} -{{- if $spec.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: istio-{{ $key }} - namespace: {{ $.Release.Namespace }} - annotations: - networking.istio.io/exportTo: "*" - labels: - app: {{ template "mixer.name" $ }} - chart: {{ template "mixer.chart" $ }} - heritage: {{ $.Release.Service }} - release: {{ $.Release.Name }} - istio: mixer -spec: - ports: - - name: grpc-mixer - port: 9091 - - name: grpc-mixer-mtls - port: 15004 - - name: http-monitoring - port: {{ $.Values.global.monitoringPort }} -{{- if eq $key "telemetry" }} - - name: prometheus - port: 42422 -{{- if $spec.sessionAffinityEnabled }} - sessionAffinity: ClientIP -{{- end }} -{{- end }} - selector: - istio: mixer - istio-mixer-type: {{ $key }} ---- -{{- end }} -{{- end }} -{{- end }} - diff --git a/kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/serviceaccount.yaml b/kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/serviceaccount.yaml deleted file mode 100755 index 9d3da7dd6..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/mixer/templates/serviceaccount.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{- if or (.Values.policy.enabled) (.Values.telemetry.enabled) }} -apiVersion: v1 -kind: ServiceAccount -{{- if .Values.global.imagePullSecrets }} -imagePullSecrets: -{{- range .Values.global.imagePullSecrets }} - - name: {{ . }} -{{- end }} -{{- end }} -metadata: - name: istio-mixer-service-account - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mixer.name" . }} - chart: {{ template "mixer.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/mixer/values.yaml b/kubernetes/helm_charts/istio-system/istio/charts/mixer/values.yaml deleted file mode 100755 index 4d9452356..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/mixer/values.yaml +++ /dev/null @@ -1,99 +0,0 @@ -# -# mixer configuration -# -image: mixer - -env: - GODEBUG: gctrace=1 - # max procs should be ceil(cpu limit + 1) - GOMAXPROCS: "6" - -policy: - # if policy is enabled, global.disablePolicyChecks has affect. - enabled: false - replicaCount: 1 - autoscaleEnabled: true - autoscaleMin: 1 - autoscaleMax: 5 - cpu: - targetAverageUtilization: 80 - rollingMaxSurge: 100% - rollingMaxUnavailable: 25% - -telemetry: - enabled: true - replicaCount: 1 - autoscaleEnabled: true - autoscaleMin: 1 - autoscaleMax: 5 - cpu: - targetAverageUtilization: 80 - rollingMaxSurge: 100% - rollingMaxUnavailable: 25% - sessionAffinityEnabled: false - - # mixer load shedding configuration. - # When mixer detects that it is overloaded, it starts rejecting grpc requests. - loadshedding: - # disabled, logonly or enforce - mode: enforce - # based on measurements 100ms p50 translates to p99 of under 1s. This is ok for telemetry which is inherently async. - latencyThreshold: 100ms - resources: - requests: - cpu: 1000m - memory: 1G - limits: - # It is best to do horizontal scaling of mixer using moderate cpu allocation. - # We have experimentally found that these values work well. - cpu: 4800m - memory: 4G - - # Set reportBatchMaxEntries to 0 to use the default batching behavior (i.e., every 100 requests). - # A positive value indicates the number of requests that are batched before telemetry data - # is sent to the mixer server - reportBatchMaxEntries: 100 - - # Set reportBatchMaxTime to 0 to use the default batching behavior (i.e., every 1 second). - # A positive time value indicates the maximum wait time since the last request will telemetry data - # be batched before being sent to the mixer server - reportBatchMaxTime: 1s - -podAnnotations: {} -nodeSelector: {} -tolerations: [] - -# Specify the pod anti-affinity that allows you to constrain which nodes -# your pod is eligible to be scheduled based on labels on pods that are -# already running on the node rather than based on labels on nodes. -# There are currently two types of anti-affinity: -# "requiredDuringSchedulingIgnoredDuringExecution" -# "preferredDuringSchedulingIgnoredDuringExecution" -# which denote "hard" vs. "soft" requirements, you can define your values -# in "podAntiAffinityLabelSelector" and "podAntiAffinityTermLabelSelector" -# correspondingly. -# For example: -# podAntiAffinityLabelSelector: -# - key: security -# operator: In -# values: S1,S2 -# topologyKey: "kubernetes.io/hostname" -# This pod anti-affinity rule says that the pod requires not to be scheduled -# onto a node if that node is already running a pod with label having key -# "security" and value "S1". -podAntiAffinityLabelSelector: [] -podAntiAffinityTermLabelSelector: [] - -adapters: - kubernetesenv: - enabled: true - - # stdio is a debug adapter in istio-telemetry, it is not recommended for production use. - stdio: - enabled: false - outputAsJson: true - prometheus: - enabled: true - metricsExpiryDuration: 10m - # Setting this to false sets the useAdapterCRDs mixer startup argument to false - useAdapterCRDs: false diff --git a/kubernetes/helm_charts/istio-system/istio/charts/nodeagent/Chart.yaml b/kubernetes/helm_charts/istio-system/istio/charts/nodeagent/Chart.yaml deleted file mode 100755 index 8a952758c..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/nodeagent/Chart.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -appVersion: 1.3.3 -description: Helm chart for nodeagent deployment -engine: gotpl -icon: https://istio.io/favicons/android-192x192.png -keywords: -- istio -- nodeagent -name: nodeagent -sources: -- http://github.com/istio/istio -tillerVersion: '>=2.7.2' -version: 1.3.3 diff --git a/kubernetes/helm_charts/istio-system/istio/charts/nodeagent/templates/_helpers.tpl b/kubernetes/helm_charts/istio-system/istio/charts/nodeagent/templates/_helpers.tpl deleted file mode 100755 index fda6043d0..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/nodeagent/templates/_helpers.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "nodeagent.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "nodeagent.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "nodeagent.chart" -}} -{{- .Chart.Name | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/nodeagent/templates/clusterrole.yaml b/kubernetes/helm_charts/istio-system/istio/charts/nodeagent/templates/clusterrole.yaml deleted file mode 100755 index 9127b05e3..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/nodeagent/templates/clusterrole.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: istio-nodeagent-{{ .Release.Namespace }} - labels: - app: {{ template "nodeagent.name" . }} - chart: {{ template "nodeagent.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -rules: -- apiGroups: [""] - resources: ["configmaps"] - verbs: ["get"] \ No newline at end of file diff --git a/kubernetes/helm_charts/istio-system/istio/charts/nodeagent/templates/clusterrolebinding.yaml b/kubernetes/helm_charts/istio-system/istio/charts/nodeagent/templates/clusterrolebinding.yaml deleted file mode 100755 index 963757e72..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/nodeagent/templates/clusterrolebinding.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: istio-nodeagent-{{ .Release.Namespace }} - labels: - app: {{ template "nodeagent.name" . }} - chart: {{ template "nodeagent.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: istio-nodeagent-{{ .Release.Namespace }} -subjects: - - kind: ServiceAccount - name: istio-nodeagent-service-account - namespace: {{ .Release.Namespace }} \ No newline at end of file diff --git a/kubernetes/helm_charts/istio-system/istio/charts/nodeagent/templates/daemonset.yaml b/kubernetes/helm_charts/istio-system/istio/charts/nodeagent/templates/daemonset.yaml deleted file mode 100755 index 00935f9f7..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/nodeagent/templates/daemonset.yaml +++ /dev/null @@ -1,70 +0,0 @@ -apiVersion: apps/v1 -kind: DaemonSet -metadata: - name: istio-nodeagent - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "nodeagent.name" . }} - chart: {{ template "nodeagent.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - istio: nodeagent -spec: - selector: - matchLabels: - istio: nodeagent - template: - metadata: - labels: - app: {{ template "nodeagent.name" . }} - chart: {{ template "nodeagent.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - istio: nodeagent - annotations: - sidecar.istio.io/inject: "false" - spec: - serviceAccountName: istio-nodeagent-service-account -{{- if .Values.global.priorityClassName }} - priorityClassName: "{{ .Values.global.priorityClassName }}" -{{- end }} - containers: - - name: nodeagent -{{- if contains "/" .Values.image }} - image: "{{ .Values.image }}" -{{- else }} - image: "{{ .Values.global.hub }}/{{ .Values.image }}:{{ .Values.global.tag }}" -{{- end }} - imagePullPolicy: {{ .Values.global.imagePullPolicy }} - volumeMounts: - - mountPath: /var/run/sds - name: sdsudspath - env: - {{- if .Values.env }} - {{- range $key, $val := .Values.env }} - - name: {{ $key }} - value: "{{ $val }}" - {{- end }} - {{- end }} - - name: "TRUST_DOMAIN" - value: "{{ .Values.global.trustDomain }}" - - name: NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - volumes: - - name: sdsudspath - hostPath: - path: /var/run/sds - affinity: - {{- include "nodeaffinity" . | indent 6 }} - {{- include "podAntiAffinity" . | indent 6 }} - {{- if .Values.tolerations }} - tolerations: -{{ toYaml .Values.tolerations | indent 6 }} - {{- else if .Values.global.defaultTolerations }} - tolerations: -{{ toYaml .Values.global.defaultTolerations | indent 6 }} - {{- end }} - updateStrategy: - type: RollingUpdate \ No newline at end of file diff --git a/kubernetes/helm_charts/istio-system/istio/charts/nodeagent/templates/serviceaccount.yaml b/kubernetes/helm_charts/istio-system/istio/charts/nodeagent/templates/serviceaccount.yaml deleted file mode 100755 index b52f852d8..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/nodeagent/templates/serviceaccount.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -{{- if .Values.global.imagePullSecrets }} -imagePullSecrets: -{{- range .Values.global.imagePullSecrets }} - - name: {{ . }} -{{- end }} -{{- end }} -metadata: - name: istio-nodeagent-service-account - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "nodeagent.name" . }} - chart: {{ template "nodeagent.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} \ No newline at end of file diff --git a/kubernetes/helm_charts/istio-system/istio/charts/nodeagent/values.yaml b/kubernetes/helm_charts/istio-system/istio/charts/nodeagent/values.yaml deleted file mode 100755 index 76c5503af..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/nodeagent/values.yaml +++ /dev/null @@ -1,35 +0,0 @@ -# -# nodeagent configuration -# -enabled: false -image: node-agent-k8s -env: - # name of authentication provider. - CA_PROVIDER: "" - # CA endpoint. - CA_ADDR: "" - # names of authentication provider's plugins. - PLUGINS: "" -nodeSelector: {} -tolerations: [] - -# Specify the pod anti-affinity that allows you to constrain which nodes -# your pod is eligible to be scheduled based on labels on pods that are -# already running on the node rather than based on labels on nodes. -# There are currently two types of anti-affinity: -# "requiredDuringSchedulingIgnoredDuringExecution" -# "preferredDuringSchedulingIgnoredDuringExecution" -# which denote "hard" vs. "soft" requirements, you can define your values -# in "podAntiAffinityLabelSelector" and "podAntiAffinityTermLabelSelector" -# correspondingly. -# For example: -# podAntiAffinityLabelSelector: -# - key: security -# operator: In -# values: S1,S2 -# topologyKey: "kubernetes.io/hostname" -# This pod anti-affinity rule says that the pod requires not to be scheduled -# onto a node if that node is already running a pod with label having key -# "security" and value "S1". -podAntiAffinityLabelSelector: [] -podAntiAffinityTermLabelSelector: [] diff --git a/kubernetes/helm_charts/istio-system/istio/charts/pilot/Chart.yaml b/kubernetes/helm_charts/istio-system/istio/charts/pilot/Chart.yaml deleted file mode 100755 index 099d16615..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/pilot/Chart.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -appVersion: 1.3.3 -description: Helm chart for pilot deployment -engine: gotpl -icon: https://istio.io/favicons/android-192x192.png -keywords: -- istio -- pilot -name: pilot -sources: -- http://github.com/istio/istio -tillerVersion: '>=2.7.2' -version: 1.3.3 diff --git a/kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/_helpers.tpl b/kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/_helpers.tpl deleted file mode 100755 index c812c3709..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/_helpers.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "pilot.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "pilot.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "pilot.chart" -}} -{{- .Chart.Name | trunc 63 | trimSuffix "-" -}} -{{- end -}} 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 deleted file mode 100755 index 1a9945136..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/autoscale.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{- if and .Values.autoscaleEnabled .Values.autoscaleMin .Values.autoscaleMax }} -apiVersion: autoscaling/v2beta1 -kind: HorizontalPodAutoscaler -metadata: - name: istio-pilot - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "pilot.name" . }} - chart: {{ template "pilot.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - maxReplicas: {{ .Values.autoscaleMax }} - minReplicas: {{ .Values.autoscaleMin }} - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: istio-pilot - metrics: - - type: Resource - resource: - name: cpu - targetAverageUtilization: {{ .Values.cpu.targetAverageUtilization }} ---- -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/clusterrole.yaml b/kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/clusterrole.yaml deleted file mode 100755 index 0435c3ebd..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/clusterrole.yaml +++ /dev/null @@ -1,34 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: istio-pilot-{{ .Release.Namespace }} - labels: - app: {{ template "pilot.name" . }} - chart: {{ template "pilot.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -rules: -- apiGroups: ["config.istio.io"] - resources: ["*"] - verbs: ["*"] -- apiGroups: ["rbac.istio.io"] - resources: ["*"] - verbs: ["get", "watch", "list"] -- apiGroups: ["networking.istio.io"] - resources: ["*"] - verbs: ["*"] -- apiGroups: ["authentication.istio.io"] - resources: ["*"] - verbs: ["*"] -- apiGroups: ["apiextensions.k8s.io"] - resources: ["customresourcedefinitions"] - verbs: ["*"] -- apiGroups: ["extensions"] - resources: ["ingresses", "ingresses/status"] - verbs: ["*"] -- apiGroups: [""] - resources: ["configmaps"] - verbs: ["create", "get", "list", "watch", "update"] -- apiGroups: [""] - resources: ["endpoints", "pods", "services", "namespaces", "nodes", "secrets"] - verbs: ["get", "list", "watch"] diff --git a/kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/clusterrolebinding.yaml b/kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/clusterrolebinding.yaml deleted file mode 100755 index ef9281ca8..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/clusterrolebinding.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: istio-pilot-{{ .Release.Namespace }} - labels: - app: {{ template "pilot.name" . }} - chart: {{ template "pilot.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: istio-pilot-{{ .Release.Namespace }} -subjects: - - kind: ServiceAccount - name: istio-pilot-service-account - namespace: {{ .Release.Namespace }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/deployment.yaml b/kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/deployment.yaml deleted file mode 100755 index e43ea7d9d..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/deployment.yaml +++ /dev/null @@ -1,223 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: istio-pilot - namespace: {{ .Release.Namespace }} - # TODO: default template doesn't have this, which one is right ? - labels: - app: {{ template "pilot.name" . }} - chart: {{ template "pilot.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - istio: pilot - annotations: - checksum/config-volume: {{ template "istio.configmap.checksum" . }} -spec: -{{- if not .Values.autoscaleEnabled }} -{{- if .Values.replicaCount }} - replicas: {{ .Values.replicaCount }} -{{- else }} - replicas: 1 -{{- end }} -{{- end }} - strategy: - rollingUpdate: - maxSurge: {{ .Values.rollingMaxSurge }} - maxUnavailable: {{ .Values.rollingMaxUnavailable }} - selector: - matchLabels: - istio: pilot - template: - metadata: - labels: - app: {{ template "pilot.name" . }} - chart: {{ template "pilot.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - istio: pilot - annotations: - sidecar.istio.io/inject: "false" - spec: - serviceAccountName: istio-pilot-service-account -{{- if .Values.global.priorityClassName }} - priorityClassName: "{{ .Values.global.priorityClassName }}" -{{- end }} - containers: - - name: discovery -{{- if contains "/" .Values.image }} - image: "{{ .Values.image }}" -{{- else }} - image: "{{ .Values.global.hub }}/{{ .Values.image }}:{{ .Values.global.tag }}" -{{- end }} - imagePullPolicy: {{ .Values.global.imagePullPolicy }} - args: - - "discovery" - - --monitoringAddr=:{{ .Values.global.monitoringPort }} -{{- if $.Values.global.logging.level }} - - --log_output_level={{ $.Values.global.logging.level }} -{{- end}} - - --domain - - {{ .Values.global.proxy.clusterDomain }} -{{- if .Values.global.oneNamespace }} - - "-a" - - {{ .Release.Namespace }} -{{- end }} -{{- if and $.Values.global.controlPlaneSecurityEnabled (not .Values.sidecar)}} - - --secureGrpcAddr - - ":15011" -{{- else }} - - --secureGrpcAddr - - "" -{{- end }} -{{- if .Values.global.trustDomain }} - - --trust-domain={{ .Values.global.trustDomain }} -{{- end }} - - --keepaliveMaxServerConnectionAge - - "{{ .Values.keepaliveMaxServerConnectionAge }}" - ports: - - containerPort: 8080 - - containerPort: 15010 -{{- if not .Values.sidecar }} - - containerPort: 15011 -{{- end }} - readinessProbe: - httpGet: - path: /ready - port: 8080 - initialDelaySeconds: 5 - periodSeconds: 30 - timeoutSeconds: 5 - env: - - name: POD_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.name - - name: POD_NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - {{- if .Values.env }} - {{- range $key, $val := .Values.env }} - - name: {{ $key }} - value: "{{ $val }}" - {{- end }} - {{- end }} -{{- if .Values.traceSampling }} - - name: PILOT_TRACE_SAMPLING - value: "{{ .Values.traceSampling }}" -{{- end }} - - name: PILOT_ENABLE_PROTOCOL_SNIFFING_FOR_OUTBOUND - value: "{{ .Values.enableProtocolSniffingForOutbound }}" - - name: PILOT_ENABLE_PROTOCOL_SNIFFING_FOR_INBOUND - value: "{{ .Values.enableProtocolSniffingForInbound }}" - resources: -{{- if .Values.resources }} -{{ toYaml .Values.resources | indent 12 }} -{{- else }} -{{ toYaml .Values.global.defaultResources | indent 12 }} -{{- end }} - volumeMounts: - - name: config-volume - mountPath: /etc/istio/config - - name: istio-certs - mountPath: /etc/certs - readOnly: true -{{- if .Values.sidecar }} - - name: istio-proxy -{{- if contains "/" .Values.global.proxy.image }} - image: "{{ .Values.global.proxy.image }}" -{{- else }} - image: "{{ .Values.global.hub }}/{{ .Values.global.proxy.image }}:{{ .Values.global.tag }}" -{{- end }} - imagePullPolicy: {{ .Values.global.imagePullPolicy }} - ports: - - containerPort: 15003 - - containerPort: 15005 - - containerPort: 15007 - - containerPort: 15011 - args: - - proxy - - --domain - - $(POD_NAMESPACE).svc.{{ .Values.global.proxy.clusterDomain }} - - --serviceCluster - - istio-pilot - - --templateFile - - /etc/istio/proxy/envoy_pilot.yaml.tmpl - {{- if $.Values.global.controlPlaneSecurityEnabled}} - - --controlPlaneAuthPolicy - - MUTUAL_TLS - {{- else }} - - --controlPlaneAuthPolicy - - NONE - {{- end }} - {{- if .Values.global.trustDomain }} - - --trust-domain={{ .Values.global.trustDomain }} - {{- end }} - env: - - name: POD_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.name - - name: POD_NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - - name: INSTANCE_IP - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: status.podIP - - name: SDS_ENABLED - value: "{{ $.Values.global.sds.enabled }}" - resources: -{{- if .Values.global.proxy.resources }} -{{ toYaml .Values.global.proxy.resources | indent 12 }} -{{- else }} -{{ toYaml .Values.global.defaultResources | indent 12 }} -{{- end }} - volumeMounts: - - name: istio-certs - mountPath: /etc/certs - readOnly: true - {{- if $.Values.global.sds.enabled }} - - name: sds-uds-path - mountPath: /var/run/sds - readOnly: true - - name: istio-token - mountPath: /var/run/secrets/tokens - {{- end }} -{{- end }} - volumes: - {{- if $.Values.global.sds.enabled }} - - hostPath: - path: /var/run/sds - name: sds-uds-path - - name: istio-token - projected: - sources: - - serviceAccountToken: - audience: {{ $.Values.global.sds.token.aud }} - expirationSeconds: 43200 - path: istio-token - {{- end }} - - name: config-volume - configMap: - name: istio - - name: istio-certs - secret: - secretName: istio.istio-pilot-service-account - optional: true - affinity: - {{- include "nodeaffinity" . | indent 6 }} - {{- include "podAntiAffinity" . | indent 6 }} - {{- if .Values.tolerations }} - tolerations: -{{ toYaml .Values.tolerations | indent 6 }} - {{- else if .Values.global.defaultTolerations }} - tolerations: -{{ toYaml .Values.global.defaultTolerations | indent 6 }} - {{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/meshexpansion.yaml b/kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/meshexpansion.yaml deleted file mode 100755 index 4f3d59570..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/meshexpansion.yaml +++ /dev/null @@ -1,91 +0,0 @@ -{{- if .Values.global.meshExpansion.enabled }} -{{- if .Values.global.meshExpansion.useILB }} -apiVersion: networking.istio.io/v1alpha3 -kind: VirtualService -metadata: - name: meshexpansion-ilb-vs-pilot - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "pilot.name" . }} - chart: {{ template "pilot.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - hosts: - - istio-pilot.{{ .Release.Namespace }}.svc.{{ .Values.global.proxy.clusterDomain }} - gateways: - - meshexpansion-ilb-gateway - tcp: - - match: - - port: 15011 - route: - - destination: - host: istio-pilot.{{ .Release.Namespace }}.svc.{{ .Values.global.proxy.clusterDomain }} - port: - number: 15011 - - match: - - port: 15010 - route: - - destination: - host: istio-pilot.{{ .Release.Namespace }}.svc.{{ .Values.global.proxy.clusterDomain }} - port: - number: 15010 - - match: - - port: 5353 - route: - - destination: - host: kube-dns.kube-system.svc.{{ .Values.global.proxy.clusterDomain }} - port: - number: 53 ---- -{{- else }} - -apiVersion: networking.istio.io/v1alpha3 -kind: VirtualService -metadata: - name: meshexpansion-vs-pilot - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "pilot.name" . }} - chart: {{ template "pilot.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - hosts: - - istio-pilot.{{ $.Release.Namespace }}.svc.{{ .Values.global.proxy.clusterDomain }} - gateways: - - meshexpansion-gateway - tcp: - - match: - - port: 15011 - route: - - destination: - host: istio-pilot.{{ $.Release.Namespace }}.svc.{{ .Values.global.proxy.clusterDomain }} - port: - number: 15011 ---- -{{- end }} - -{{- if .Values.global.controlPlaneSecurityEnabled }} -apiVersion: networking.istio.io/v1alpha3 -kind: DestinationRule -metadata: - name: meshexpansion-dr-pilot - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "pilot.name" . }} - chart: {{ template "pilot.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - host: istio-pilot.{{ .Release.Namespace }}.svc.{{ .Values.global.proxy.clusterDomain }} - trafficPolicy: - portLevelSettings: - - port: - number: 15011 - tls: - mode: DISABLE ---- -{{- end }} -{{- end }} - diff --git a/kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/poddisruptionbudget.yaml b/kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/poddisruptionbudget.yaml deleted file mode 100755 index fd9e06a71..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/poddisruptionbudget.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{- if .Values.global.defaultPodDisruptionBudget.enabled }} -apiVersion: policy/v1beta1 -kind: PodDisruptionBudget -metadata: - name: istio-pilot - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "pilot.name" . }} - chart: {{ template "pilot.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - istio: pilot -spec: -{{- if .Values.global.defaultPodDisruptionBudget.enabled }} -{{ include "podDisruptionBudget.spec" .Values.global.defaultPodDisruptionBudget }} -{{- end }} - selector: - matchLabels: - app: {{ template "pilot.name" . }} - release: {{ .Release.Name }} - istio: pilot -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/service.yaml b/kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/service.yaml deleted file mode 100755 index a61d93025..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: istio-pilot - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "pilot.name" . }} - chart: {{ template "pilot.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - istio: pilot -spec: - ports: - - port: 15010 - name: grpc-xds # direct - - port: 15011 - name: https-xds # mTLS - - port: 8080 - name: http-legacy-discovery # direct - - port: {{ .Values.global.monitoringPort }} - name: http-monitoring - selector: - istio: pilot diff --git a/kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/serviceaccount.yaml b/kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/serviceaccount.yaml deleted file mode 100755 index 7ec2a66de..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/pilot/templates/serviceaccount.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -{{- if .Values.global.imagePullSecrets }} -imagePullSecrets: -{{- range .Values.global.imagePullSecrets }} - - name: {{ . }} -{{- end }} -{{- end }} -metadata: - name: istio-pilot-service-account - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "pilot.name" . }} - chart: {{ template "pilot.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/pilot/values.yaml b/kubernetes/helm_charts/istio-system/istio/charts/pilot/values.yaml deleted file mode 100755 index 58e2a0357..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/pilot/values.yaml +++ /dev/null @@ -1,56 +0,0 @@ -# -# pilot configuration -# -enabled: true -autoscaleEnabled: true -autoscaleMin: 1 -autoscaleMax: 5 -# specify replicaCount when autoscaleEnabled: false -# replicaCount: 1 -rollingMaxSurge: 100% -rollingMaxUnavailable: 25% -image: pilot -sidecar: true -traceSampling: 1.0 -# if protocol sniffing is enabled for outbound -enableProtocolSniffingForOutbound: true -# if protocol sniffing is enabled for inbound -enableProtocolSniffingForInbound: false -# Resources for a small pilot install -resources: - requests: - cpu: 500m - memory: 2048Mi -env: - PILOT_PUSH_THROTTLE: 100 - GODEBUG: gctrace=1 -cpu: - targetAverageUtilization: 80 -nodeSelector: {} -tolerations: [] - -# Specify the pod anti-affinity that allows you to constrain which nodes -# your pod is eligible to be scheduled based on labels on pods that are -# already running on the node rather than based on labels on nodes. -# There are currently two types of anti-affinity: -# "requiredDuringSchedulingIgnoredDuringExecution" -# "preferredDuringSchedulingIgnoredDuringExecution" -# which denote "hard" vs. "soft" requirements, you can define your values -# in "podAntiAffinityLabelSelector" and "podAntiAffinityTermLabelSelector" -# correspondingly. -# For example: -# podAntiAffinityLabelSelector: -# - key: security -# operator: In -# values: S1,S2 -# topologyKey: "kubernetes.io/hostname" -# This pod anti-affinity rule says that the pod requires not to be scheduled -# onto a node if that node is already running a pod with label having key -# "security" and value "S1". -podAntiAffinityLabelSelector: [] -podAntiAffinityTermLabelSelector: [] - -# The following is used to limit how long a sidecar can be connected -# to a pilot. It balances out load across pilot instances at the cost of -# increasing system churn. -keepaliveMaxServerConnectionAge: 30m diff --git a/kubernetes/helm_charts/istio-system/istio/charts/prometheus/Chart.yaml b/kubernetes/helm_charts/istio-system/istio/charts/prometheus/Chart.yaml deleted file mode 100755 index 8327144e0..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/prometheus/Chart.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: v1 -appVersion: 2.8.0 -description: A Helm chart for Kubernetes -name: prometheus -tillerVersion: '>=2.7.2' -version: 1.3.3 diff --git a/kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/_helpers.tpl b/kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/_helpers.tpl deleted file mode 100755 index 039388329..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/_helpers.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "prometheus.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "prometheus.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "prometheus.chart" -}} -{{- .Chart.Name | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/clusterrole.yaml b/kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/clusterrole.yaml deleted file mode 100755 index 06fdfaf53..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/clusterrole.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: prometheus-{{ .Release.Namespace }} - labels: - app: prometheus - chart: {{ template "prometheus.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -rules: -- apiGroups: [""] - resources: - - nodes - - services - - endpoints - - pods - - nodes/proxy - verbs: ["get", "list", "watch"] -- apiGroups: [""] - resources: - - configmaps - verbs: ["get"] -- nonResourceURLs: ["/metrics"] - verbs: ["get"] diff --git a/kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/clusterrolebindings.yaml b/kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/clusterrolebindings.yaml deleted file mode 100755 index 295e0df72..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/clusterrolebindings.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: prometheus-{{ .Release.Namespace }} - labels: - app: prometheus - chart: {{ template "prometheus.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: prometheus-{{ .Release.Namespace }} -subjects: -- kind: ServiceAccount - name: prometheus - namespace: {{ .Release.Namespace }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/configmap.yaml b/kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/configmap.yaml deleted file mode 100755 index 1b26fa5a1..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/configmap.yaml +++ /dev/null @@ -1,281 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: prometheus - namespace: {{ .Release.Namespace }} - labels: - app: prometheus - chart: {{ template "prometheus.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -data: - prometheus.yml: |- - global: - scrape_interval: {{ .Values.scrapeInterval }} - scrape_configs: - - - job_name: 'istio-mesh' - kubernetes_sd_configs: - - role: endpoints - namespaces: - names: - - {{ .Release.Namespace }} - - relabel_configs: - - source_labels: [__meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name] - action: keep - regex: istio-telemetry;prometheus - - # Scrape config for envoy stats - - job_name: 'envoy-stats' - metrics_path: /stats/prometheus - kubernetes_sd_configs: - - role: pod - - relabel_configs: - - source_labels: [__meta_kubernetes_pod_container_port_name] - action: keep - regex: '.*-envoy-prom' - - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port] - action: replace - regex: ([^:]+)(?::\d+)?;(\d+) - replacement: $1:15090 - target_label: __address__ - - action: labelmap - regex: __meta_kubernetes_pod_label_(.+) - - source_labels: [__meta_kubernetes_namespace] - action: replace - target_label: namespace - - source_labels: [__meta_kubernetes_pod_name] - action: replace - target_label: pod_name - - - job_name: 'istio-policy' - kubernetes_sd_configs: - - role: endpoints - namespaces: - names: - - {{ .Release.Namespace }} - - - relabel_configs: - - source_labels: [__meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name] - action: keep - regex: istio-policy;http-monitoring - - - job_name: 'istio-telemetry' - kubernetes_sd_configs: - - role: endpoints - namespaces: - names: - - {{ .Release.Namespace }} - - relabel_configs: - - source_labels: [__meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name] - action: keep - regex: istio-telemetry;http-monitoring - - - job_name: 'pilot' - kubernetes_sd_configs: - - role: endpoints - namespaces: - names: - - {{ .Release.Namespace }} - - relabel_configs: - - source_labels: [__meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name] - action: keep - regex: istio-pilot;http-monitoring - - - job_name: 'galley' - kubernetes_sd_configs: - - role: endpoints - namespaces: - names: - - {{ .Release.Namespace }} - - relabel_configs: - - source_labels: [__meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name] - action: keep - regex: istio-galley;http-monitoring - - - job_name: 'citadel' - kubernetes_sd_configs: - - role: endpoints - namespaces: - names: - - {{ .Release.Namespace }} - - relabel_configs: - - source_labels: [__meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name] - action: keep - regex: istio-citadel;http-monitoring - - # scrape config for API servers - - job_name: 'kubernetes-apiservers' - kubernetes_sd_configs: - - role: endpoints - namespaces: - names: - - default - scheme: https - tls_config: - ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - relabel_configs: - - source_labels: [__meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name] - action: keep - regex: kubernetes;https - - # scrape config for nodes (kubelet) - - job_name: 'kubernetes-nodes' - scheme: https - tls_config: - ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - kubernetes_sd_configs: - - role: node - relabel_configs: - - action: labelmap - regex: __meta_kubernetes_node_label_(.+) - - target_label: __address__ - replacement: kubernetes.default.svc:443 - - source_labels: [__meta_kubernetes_node_name] - regex: (.+) - target_label: __metrics_path__ - replacement: /api/v1/nodes/${1}/proxy/metrics - - # Scrape config for Kubelet cAdvisor. - # - # This is required for Kubernetes 1.7.3 and later, where cAdvisor metrics - # (those whose names begin with 'container_') have been removed from the - # Kubelet metrics endpoint. This job scrapes the cAdvisor endpoint to - # retrieve those metrics. - # - # In Kubernetes 1.7.0-1.7.2, these metrics are only exposed on the cAdvisor - # HTTP endpoint; use "replacement: /api/v1/nodes/${1}:4194/proxy/metrics" - # in that case (and ensure cAdvisor's HTTP server hasn't been disabled with - # the --cadvisor-port=0 Kubelet flag). - # - # This job is not necessary and should be removed in Kubernetes 1.6 and - # earlier versions, or it will cause the metrics to be scraped twice. - - job_name: 'kubernetes-cadvisor' - scheme: https - tls_config: - ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - kubernetes_sd_configs: - - role: node - relabel_configs: - - action: labelmap - regex: __meta_kubernetes_node_label_(.+) - - target_label: __address__ - replacement: kubernetes.default.svc:443 - - source_labels: [__meta_kubernetes_node_name] - regex: (.+) - target_label: __metrics_path__ - replacement: /api/v1/nodes/${1}/proxy/metrics/cadvisor - - # scrape config for service endpoints. - - job_name: 'kubernetes-service-endpoints' - kubernetes_sd_configs: - - role: endpoints - relabel_configs: - - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape] - action: keep - regex: true - - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme] - action: replace - target_label: __scheme__ - regex: (https?) - - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path] - action: replace - target_label: __metrics_path__ - regex: (.+) - - source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port] - action: replace - target_label: __address__ - regex: ([^:]+)(?::\d+)?;(\d+) - replacement: $1:$2 - - action: labelmap - regex: __meta_kubernetes_service_label_(.+) - - source_labels: [__meta_kubernetes_namespace] - action: replace - target_label: kubernetes_namespace - - source_labels: [__meta_kubernetes_service_name] - action: replace - target_label: kubernetes_name - - - job_name: 'kubernetes-pods' - kubernetes_sd_configs: - - role: pod - relabel_configs: # If first two labels are present, pod should be scraped by the istio-secure job. - - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape] - action: keep - regex: true - # Keep target if there's no sidecar or if prometheus.io/scheme is explicitly set to "http" - - source_labels: [__meta_kubernetes_pod_annotation_sidecar_istio_io_status, __meta_kubernetes_pod_annotation_prometheus_io_scheme] - action: keep - regex: ((;.*)|(.*;http)) - - source_labels: [__meta_kubernetes_pod_annotation_istio_mtls] - action: drop - regex: (true) - - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path] - action: replace - target_label: __metrics_path__ - regex: (.+) - - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port] - action: replace - regex: ([^:]+)(?::\d+)?;(\d+) - replacement: $1:$2 - target_label: __address__ - - action: labelmap - regex: __meta_kubernetes_pod_label_(.+) - - source_labels: [__meta_kubernetes_namespace] - action: replace - target_label: namespace - - source_labels: [__meta_kubernetes_pod_name] - action: replace - target_label: pod_name - - - job_name: 'kubernetes-pods-istio-secure' - scheme: https - tls_config: - ca_file: /etc/istio-certs/root-cert.pem - cert_file: /etc/istio-certs/cert-chain.pem - key_file: /etc/istio-certs/key.pem - insecure_skip_verify: true # prometheus does not support secure naming. - kubernetes_sd_configs: - - role: pod - relabel_configs: - - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape] - action: keep - regex: true - # sidecar status annotation is added by sidecar injector and - # istio_workload_mtls_ability can be specifically placed on a pod to indicate its ability to receive mtls traffic. - - source_labels: [__meta_kubernetes_pod_annotation_sidecar_istio_io_status, __meta_kubernetes_pod_annotation_istio_mtls] - action: keep - regex: (([^;]+);([^;]*))|(([^;]*);(true)) - - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scheme] - action: drop - regex: (http) - - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path] - action: replace - target_label: __metrics_path__ - regex: (.+) - - source_labels: [__address__] # Only keep address that is host:port - action: keep # otherwise an extra target with ':443' is added for https scheme - regex: ([^:]+):(\d+) - - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port] - action: replace - regex: ([^:]+)(?::\d+)?;(\d+) - replacement: $1:$2 - target_label: __address__ - - action: labelmap - regex: __meta_kubernetes_pod_label_(.+) - - source_labels: [__meta_kubernetes_namespace] - action: replace - target_label: namespace - - source_labels: [__meta_kubernetes_pod_name] - action: replace - target_label: pod_name \ No newline at end of file diff --git a/kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/deployment.yaml b/kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/deployment.yaml deleted file mode 100755 index 64214e0de..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/deployment.yaml +++ /dev/null @@ -1,80 +0,0 @@ -# TODO: the original template has service account, roles, etc -apiVersion: apps/v1 -kind: Deployment -metadata: - name: prometheus - namespace: {{ .Release.Namespace }} - labels: - app: prometheus - chart: {{ template "prometheus.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - app: prometheus - template: - metadata: - labels: - app: prometheus - chart: {{ template "prometheus.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - annotations: - sidecar.istio.io/inject: "false" - spec: - serviceAccountName: prometheus -{{- if .Values.global.priorityClassName }} - priorityClassName: "{{ .Values.global.priorityClassName }}" -{{- end }} - containers: - - name: prometheus - image: "{{ .Values.hub }}/{{ .Values.image }}:{{ .Values.tag }}" - imagePullPolicy: {{ .Values.global.imagePullPolicy }} - args: - - '--storage.tsdb.retention={{ .Values.retention }}' - - '--config.file=/etc/prometheus/prometheus.yml' - ports: - - containerPort: 9090 - name: http - livenessProbe: - httpGet: - path: /-/healthy - port: 9090 - readinessProbe: - httpGet: - path: /-/ready - port: 9090 - resources: -{{- if .Values.resources }} -{{ toYaml .Values.resources | indent 12 }} -{{- else }} -{{ toYaml .Values.global.defaultResources | indent 12 }} -{{- end }} - volumeMounts: - - name: config-volume - mountPath: /etc/prometheus - - mountPath: /etc/istio-certs - name: istio-certs - volumes: - - name: config-volume - configMap: - name: prometheus - - name: istio-certs - secret: - defaultMode: 420 -{{- if not .Values.security.enabled }} - optional: true -{{- end }} - secretName: istio.default - affinity: - {{- include "nodeaffinity" . | indent 6 }} - {{- include "podAntiAffinity" . | indent 6 }} - {{- if .Values.tolerations }} - tolerations: -{{ toYaml .Values.tolerations | indent 6 }} - {{- else if .Values.global.defaultTolerations }} - tolerations: -{{ toYaml .Values.global.defaultTolerations | indent 6 }} - {{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/ingress.yaml b/kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/ingress.yaml deleted file mode 100755 index 43be65523..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/ingress.yaml +++ /dev/null @@ -1,40 +0,0 @@ -{{- if .Values.ingress.enabled -}} -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: prometheus - namespace: {{ .Release.Namespace }} - labels: - app: prometheus - chart: {{ template "prometheus.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - annotations: - {{- range $key, $value := .Values.ingress.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} -spec: - rules: -{{- if .Values.ingress.hosts }} - {{- range $host := .Values.ingress.hosts }} - - host: {{ $host }} - http: - paths: - - path: {{ if $.Values.contextPath }} {{ $.Values.contextPath }} {{ else }} / {{ end }} - backend: - serviceName: prometheus - servicePort: 9090 - {{- end -}} -{{- else }} - - http: - paths: - - path: {{ if .Values.contextPath }} {{ .Values.contextPath }} {{ else }} / {{ end }} - backend: - serviceName: prometheus - servicePort: 9090 -{{- end }} - {{- if .Values.ingress.tls }} - tls: -{{ toYaml .Values.ingress.tls | indent 4 }} - {{- end -}} -{{- end -}} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/service.yaml b/kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/service.yaml deleted file mode 100755 index d92525df0..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/service.yaml +++ /dev/null @@ -1,45 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: prometheus - namespace: {{ .Release.Namespace }} - annotations: - prometheus.io/scrape: 'true' - {{- range $key, $val := .Values.service.annotations }} - {{ $key }}: {{ $val | quote }} - {{- end }} - labels: - app: prometheus - chart: {{ template "prometheus.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - selector: - app: prometheus - ports: - - name: http-prometheus - protocol: TCP - port: 9090 - -{{- if .Values.service.nodePort.enabled }} -# Using separate ingress for nodeport, to avoid conflict with pilot e2e test configs. ---- -apiVersion: v1 -kind: Service -metadata: - name: prometheus-nodeport - namespace: {{ .Release.Namespace }} - labels: - app: prometheus - chart: {{ template "prometheus.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - type: NodePort - ports: - - port: 9090 - nodePort: {{ .Values.service.nodePort.port }} - name: http-prometheus - selector: - app: prometheus -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/serviceaccount.yaml b/kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/serviceaccount.yaml deleted file mode 100755 index 7c2fab3f4..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/serviceaccount.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -{{- if .Values.global.imagePullSecrets }} -imagePullSecrets: -{{- range .Values.global.imagePullSecrets }} - - name: {{ . }} -{{- end }} -{{- end }} -metadata: - name: prometheus - namespace: {{ .Release.Namespace }} - labels: - app: prometheus - chart: {{ template "prometheus.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/tests/test-prometheus-connection.yaml b/kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/tests/test-prometheus-connection.yaml deleted file mode 100755 index 45b025edf..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/prometheus/templates/tests/test-prometheus-connection.yaml +++ /dev/null @@ -1,36 +0,0 @@ -{{- if .Values.global.enableHelmTest }} -apiVersion: v1 -kind: Pod -metadata: - name: {{ template "prometheus.fullname" . }}-test - namespace: {{ .Release.Namespace }} - labels: - app: prometheus-test - chart: {{ template "prometheus.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - istio: prometheus - annotations: - sidecar.istio.io/inject: "false" - helm.sh/hook: test-success -spec: -{{- if .Values.global.priorityClassName }} - priorityClassName: "{{ .Values.global.priorityClassName }}" -{{- end }} - containers: - - name: "{{ template "prometheus.fullname" . }}-test" - image: pstauffer/curl:v1.0.3 - imagePullPolicy: "{{ .Values.global.imagePullPolicy }}" - command: ['sh', '-c', 'for i in 1 2 3; do curl http://prometheus:9090/-/ready && exit 0 || sleep 15; done; exit 1'] - restartPolicy: Never - affinity: - {{- include "nodeaffinity" . | indent 4 }} - {{- include "podAntiAffinity" . | indent 4 }} - {{- if .Values.tolerations }} - tolerations: -{{ toYaml .Values.tolerations | indent 2 }} - {{- else if .Values.global.defaultTolerations }} - tolerations: -{{ toYaml .Values.global.defaultTolerations | indent 2 }} - {{- end }} -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/prometheus/values.yaml b/kubernetes/helm_charts/istio-system/istio/charts/prometheus/values.yaml deleted file mode 100755 index c16f99a62..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/prometheus/values.yaml +++ /dev/null @@ -1,60 +0,0 @@ -# -# addon prometheus configuration -# -enabled: true -replicaCount: 1 -hub: docker.io/prom -image: prometheus -tag: v2.8.0 -retention: 6h -nodeSelector: {} -tolerations: [] - -# Specify the pod anti-affinity that allows you to constrain which nodes -# your pod is eligible to be scheduled based on labels on pods that are -# already running on the node rather than based on labels on nodes. -# There are currently two types of anti-affinity: -# "requiredDuringSchedulingIgnoredDuringExecution" -# "preferredDuringSchedulingIgnoredDuringExecution" -# which denote "hard" vs. "soft" requirements, you can define your values -# in "podAntiAffinityLabelSelector" and "podAntiAffinityTermLabelSelector" -# correspondingly. -# For example: -# podAntiAffinityLabelSelector: -# - key: security -# operator: In -# values: S1,S2 -# topologyKey: "kubernetes.io/hostname" -# This pod anti-affinity rule says that the pod requires not to be scheduled -# onto a node if that node is already running a pod with label having key -# "security" and value "S1". -podAntiAffinityLabelSelector: [] -podAntiAffinityTermLabelSelector: [] - -# Controls the frequency of prometheus scraping -scrapeInterval: 15s - -contextPath: /prometheus - -ingress: - enabled: false - ## Used to create an Ingress record. - hosts: - - prometheus.local - annotations: - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - tls: - # Secrets must be manually created in the namespace. - # - secretName: prometheus-tls - # hosts: - # - prometheus.local - -service: - annotations: {} - nodePort: - enabled: false - port: 32090 - -security: - enabled: true diff --git a/kubernetes/helm_charts/istio-system/istio/charts/security/Chart.yaml b/kubernetes/helm_charts/istio-system/istio/charts/security/Chart.yaml deleted file mode 100755 index 61b0b2ac3..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/security/Chart.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -appVersion: 1.3.3 -description: Helm chart for istio authentication -engine: gotpl -icon: https://istio.io/favicons/android-192x192.png -keywords: -- istio -- security -name: security -sources: -- http://github.com/istio/istio -tillerVersion: '>=2.7.2' -version: 1.3.3 diff --git a/kubernetes/helm_charts/istio-system/istio/charts/security/templates/_helpers.tpl b/kubernetes/helm_charts/istio-system/istio/charts/security/templates/_helpers.tpl deleted file mode 100755 index 7f36f9d51..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/security/templates/_helpers.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "security.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "security.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "security.chart" -}} -{{- .Chart.Name | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/security/templates/clusterrole.yaml b/kubernetes/helm_charts/istio-system/istio/charts/security/templates/clusterrole.yaml deleted file mode 100755 index 75f2dec65..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/security/templates/clusterrole.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: istio-citadel-{{ .Release.Namespace }} - labels: - app: {{ template "security.name" . }} - chart: {{ template "security.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -rules: -- apiGroups: [""] - resources: ["configmaps"] - verbs: ["create", "get", "update"] -- apiGroups: [""] - resources: ["secrets"] - verbs: ["create", "get", "watch", "list", "update", "delete"] -- apiGroups: [""] - resources: ["serviceaccounts", "services", "namespaces"] - verbs: ["get", "watch", "list"] -- apiGroups: ["authentication.k8s.io"] - resources: ["tokenreviews"] - verbs: ["create"] diff --git a/kubernetes/helm_charts/istio-system/istio/charts/security/templates/clusterrolebinding.yaml b/kubernetes/helm_charts/istio-system/istio/charts/security/templates/clusterrolebinding.yaml deleted file mode 100755 index 0a15799ce..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/security/templates/clusterrolebinding.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: istio-citadel-{{ .Release.Namespace }} - labels: - app: {{ template "security.name" . }} - chart: {{ template "security.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: istio-citadel-{{ .Release.Namespace }} -subjects: - - kind: ServiceAccount - name: istio-citadel-service-account - namespace: {{ .Release.Namespace }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/security/templates/configmap.yaml b/kubernetes/helm_charts/istio-system/istio/charts/security/templates/configmap.yaml deleted file mode 100755 index 14749fd65..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/security/templates/configmap.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: istio-security-custom-resources - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "security.name" . }} - chart: {{ template "security.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - istio: citadel -data: - custom-resources.yaml: |- - {{- if .Values.global.mtls.enabled }} - {{- include "security-default.yaml.tpl" . | indent 4}} - {{- else }} - {{- include "security-permissive.yaml.tpl" . | indent 4}} - {{- end }} - run.sh: |- - {{- include "install-custom-resources.sh.tpl" . | indent 4}} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/security/templates/create-custom-resources-job.yaml b/kubernetes/helm_charts/istio-system/istio/charts/security/templates/create-custom-resources-job.yaml deleted file mode 100755 index a9658bbce..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/security/templates/create-custom-resources-job.yaml +++ /dev/null @@ -1,107 +0,0 @@ -{{- if .Values.createMeshPolicy }} -apiVersion: v1 -kind: ServiceAccount -{{- if .Values.global.imagePullSecrets }} -imagePullSecrets: -{{- range .Values.global.imagePullSecrets }} - - name: {{ . }} -{{- end }} -{{- end }} -metadata: - name: istio-security-post-install-account - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "security.name" . }} - chart: {{ template "security.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} ---- -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRole -metadata: - name: istio-security-post-install-{{ .Release.Namespace }} - labels: - app: {{ template "security.name" . }} - chart: {{ template "security.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -rules: -- apiGroups: ["authentication.istio.io"] # needed to create default authn policy - resources: ["*"] - verbs: ["*"] -- apiGroups: ["networking.istio.io"] # needed to create security destination rules - resources: ["*"] - verbs: ["*"] -- apiGroups: ["admissionregistration.k8s.io"] - resources: ["validatingwebhookconfigurations"] - verbs: ["get"] -- apiGroups: ["extensions", "apps"] - resources: ["deployments", "replicasets"] - verbs: ["get", "list", "watch"] ---- -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding -metadata: - name: istio-security-post-install-role-binding-{{ .Release.Namespace }} - labels: - app: {{ template "security.name" . }} - chart: {{ template "security.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: istio-security-post-install-{{ .Release.Namespace }} -subjects: - - kind: ServiceAccount - name: istio-security-post-install-account - namespace: {{ .Release.Namespace }} ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: istio-security-post-install-{{ .Values.global.tag | printf "%v" | trunc 32 }} - namespace: {{ .Release.Namespace }} - annotations: - "helm.sh/hook": post-install - "helm.sh/hook-delete-policy": hook-succeeded - labels: - app: {{ template "security.name" . }} - chart: {{ template "security.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - template: - metadata: - name: istio-security-post-install - labels: - app: {{ template "security.name" . }} - chart: {{ template "security.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - spec: - serviceAccountName: istio-security-post-install-account - containers: - - name: kubectl - image: "{{ .Values.global.hub }}/kubectl:{{ .Values.global.tag }}" - imagePullPolicy: IfNotPresent - command: [ "/bin/bash", "/tmp/security/run.sh", "/tmp/security/custom-resources.yaml" ] - volumeMounts: - - mountPath: "/tmp/security" - name: tmp-configmap-security - volumes: - - name: tmp-configmap-security - configMap: - name: istio-security-custom-resources - restartPolicy: OnFailure - affinity: - {{- include "nodeaffinity" . | indent 6 }} - {{- include "podAntiAffinity" . | indent 6 }} - {{- if .Values.tolerations }} - tolerations: -{{ toYaml .Values.tolerations | indent 6 }} - {{- else if .Values.global.defaultTolerations }} - tolerations: -{{ toYaml .Values.global.defaultTolerations | indent 6 }} - {{- end }} -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/security/templates/deployment.yaml b/kubernetes/helm_charts/istio-system/istio/charts/security/templates/deployment.yaml deleted file mode 100755 index 7b43e9a61..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/security/templates/deployment.yaml +++ /dev/null @@ -1,114 +0,0 @@ -# istio CA watching all namespaces -apiVersion: apps/v1 -kind: Deployment -metadata: - name: istio-citadel - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "security.name" . }} - chart: {{ template "security.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - istio: citadel -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - istio: citadel - strategy: - rollingUpdate: - maxSurge: {{ .Values.rollingMaxSurge }} - maxUnavailable: {{ .Values.rollingMaxUnavailable }} - template: - metadata: - labels: - app: {{ template "security.name" . }} - chart: {{ template "security.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - istio: citadel - annotations: - sidecar.istio.io/inject: "false" - spec: - serviceAccountName: istio-citadel-service-account -{{- if .Values.global.priorityClassName }} - priorityClassName: "{{ .Values.global.priorityClassName }}" -{{- end }} - containers: - - name: citadel -{{- if contains "/" .Values.image }} - image: "{{ .Values.image }}" -{{- else }} - image: "{{ .Values.global.hub }}/{{ .Values.image }}:{{ .Values.global.tag }}" -{{- end }} - imagePullPolicy: {{ .Values.global.imagePullPolicy }} - args: - {{- if .Values.global.sds.enabled }} - - --sds-enabled=true - {{- end }} - - --append-dns-names=true - - --grpc-port=8060 - - --citadel-storage-namespace={{ .Release.Namespace }} - - --custom-dns-names=istio-pilot-service-account.{{ .Release.Namespace }}:istio-pilot.{{ .Release.Namespace }} - - --monitoring-port={{ .Values.global.monitoringPort }} - {{- if .Values.selfSigned }} - - --self-signed-ca=true - {{- else }} - - --self-signed-ca=false - - --signing-cert=/etc/cacerts/ca-cert.pem - - --signing-key=/etc/cacerts/ca-key.pem - - --root-cert=/etc/cacerts/root-cert.pem - - --cert-chain=/etc/cacerts/cert-chain.pem - {{- end }} - {{- if .Values.global.trustDomain }} - - --trust-domain={{ .Values.global.trustDomain }} - {{- end }} - {{- if .Values.workloadCertTtl }} - - --workload-cert-ttl={{ .Values.workloadCertTtl }} - {{- end }} - {{- if .Values.citadelHealthCheck }} - - --liveness-probe-path=/tmp/ca.liveness # path to the liveness health check status file - - --liveness-probe-interval=60s # interval for health check file update - - --probe-check-interval=15s # interval for health status check - {{- end }} - env: - - name: CITADEL_ENABLE_NAMESPACES_BY_DEFAULT - value: "{{ .Values.enableNamespacesByDefault }}" - {{- if .Values.citadelHealthCheck }} - livenessProbe: - exec: - command: - - /usr/local/bin/istio_ca - - probe - - --probe-path=/tmp/ca.liveness # path to the liveness health check status file - - --interval=125s # the maximum time gap allowed between the file mtime and the current sys clock - initialDelaySeconds: 60 - periodSeconds: 60 - {{- end }} - resources: -{{- if .Values.resources }} -{{ toYaml .Values.resources | indent 12 }} -{{- else }} -{{ toYaml .Values.global.defaultResources | indent 12 }} -{{- end }} -{{- if not .Values.selfSigned }} - volumeMounts: - - name: cacerts - mountPath: /etc/cacerts - readOnly: true - volumes: - - name: cacerts - secret: - secretName: cacerts - optional: true -{{- end }} - affinity: - {{- include "nodeaffinity" . | indent 6 }} - {{- include "podAntiAffinity" . | indent 6 }} - {{- if .Values.tolerations }} - tolerations: -{{ toYaml .Values.tolerations | indent 6 }} - {{- else if .Values.global.defaultTolerations }} - tolerations: -{{ toYaml .Values.global.defaultTolerations | indent 6 }} - {{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/security/templates/enable-mesh-mtls.yaml b/kubernetes/helm_charts/istio-system/istio/charts/security/templates/enable-mesh-mtls.yaml deleted file mode 100755 index 75e4a18e3..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/security/templates/enable-mesh-mtls.yaml +++ /dev/null @@ -1,63 +0,0 @@ -{{- define "security-default.yaml.tpl" }} -# These policy and destination rules effectively enable mTLS for all services in the mesh. For now, -# they are added to Istio installation yaml for backward compatible. In future, they should be in -# a separated yaml file so that customer can enable mTLS independent from installation. - -# Authentication policy to enable mutual TLS for all services (that have sidecar) in the mesh. -apiVersion: "authentication.istio.io/v1alpha1" -kind: "MeshPolicy" -metadata: - name: "default" - labels: - app: {{ template "security.name" . }} - chart: {{ template "security.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - peers: - - mtls: {} ---- -# Corresponding destination rule to configure client side to use mutual TLS when talking to -# any service (host) in the mesh. -apiVersion: networking.istio.io/v1alpha3 -kind: DestinationRule -metadata: - name: "default" - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "security.name" . }} - chart: {{ template "security.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - host: "*.local" - {{- if .Values.global.defaultConfigVisibilitySettings }} - exportTo: - - '*' - {{- end }} - trafficPolicy: - tls: - mode: ISTIO_MUTUAL ---- -# Destination rule to disable (m)TLS when talking to API server, as API server doesn't have sidecar. -# Customer should add similar destination rules for other services that don't have sidecar. -apiVersion: networking.istio.io/v1alpha3 -kind: DestinationRule -metadata: - name: "api-server" - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "security.name" . }} - chart: {{ template "security.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - host: "kubernetes.default.svc.{{ .Values.global.proxy.clusterDomain }}" - {{- if .Values.global.defaultConfigVisibilitySettings }} - exportTo: - - '*' - {{- end }} - trafficPolicy: - tls: - mode: DISABLE -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/security/templates/enable-mesh-permissive.yaml b/kubernetes/helm_charts/istio-system/istio/charts/security/templates/enable-mesh-permissive.yaml deleted file mode 100755 index a6931b3b9..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/security/templates/enable-mesh-permissive.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- define "security-permissive.yaml.tpl" }} -# Authentication policy to enable permissive mode for all services (that have sidecar) in the mesh. -apiVersion: "authentication.istio.io/v1alpha1" -kind: "MeshPolicy" -metadata: - name: "default" - labels: - app: {{ template "security.name" . }} - chart: {{ template "security.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - peers: - - mtls: - mode: PERMISSIVE -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/security/templates/meshexpansion.yaml b/kubernetes/helm_charts/istio-system/istio/charts/security/templates/meshexpansion.yaml deleted file mode 100755 index 581ce964a..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/security/templates/meshexpansion.yaml +++ /dev/null @@ -1,56 +0,0 @@ -{{- if .Values.global.meshExpansion.enabled }} -{{- if .Values.global.meshExpansion.useILB }} -apiVersion: networking.istio.io/v1alpha3 -kind: VirtualService -metadata: - name: meshexpansion-vs-citadel-ilb - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "security.name" . }} - chart: {{ template "security.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - istio: citadel -spec: - hosts: - - istio-citadel.{{ .Release.Namespace }}.svc.{{ .Values.global.proxy.clusterDomain }} - gateways: - - meshexpansion-ilb-gateway - tcp: - - match: - - port: 8060 - route: - - destination: - host: istio-citadel.{{ .Release.Namespace }}.svc.{{ .Values.global.proxy.clusterDomain }} - port: - number: 8060 ---- -{{- else }} - -apiVersion: networking.istio.io/v1alpha3 -kind: VirtualService -metadata: - name: meshexpansion-vs-citadel - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "security.name" . }} - chart: {{ template "security.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - istio: citadel -spec: - hosts: - - istio-citadel.{{ .Release.Namespace }}.svc.{{ .Values.global.proxy.clusterDomain }} - gateways: - - meshexpansion-gateway - tcp: - - match: - - port: 8060 - route: - - destination: - host: istio-citadel.{{ .Release.Namespace }}.svc.{{ .Values.global.proxy.clusterDomain }} - port: - number: 8060 ---- -{{- end }} -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/security/templates/service.yaml b/kubernetes/helm_charts/istio-system/istio/charts/security/templates/service.yaml deleted file mode 100755 index efea17544..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/security/templates/service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - # we use the normal name here (e.g. 'prometheus') - # as grafana is configured to use this as a data source - name: istio-citadel - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "security.name" . }} - chart: {{ template "security.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - istio: citadel -spec: - ports: - - name: grpc-citadel - port: 8060 - targetPort: 8060 - protocol: TCP - - name: http-monitoring - port: {{ .Values.global.monitoringPort }} - selector: - istio: citadel diff --git a/kubernetes/helm_charts/istio-system/istio/charts/security/templates/serviceaccount.yaml b/kubernetes/helm_charts/istio-system/istio/charts/security/templates/serviceaccount.yaml deleted file mode 100755 index d07d566fa..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/security/templates/serviceaccount.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -{{- if .Values.global.imagePullSecrets }} -imagePullSecrets: -{{- range .Values.global.imagePullSecrets }} - - name: {{ . }} -{{- end }} -{{- end }} -metadata: - name: istio-citadel-service-account - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "security.name" . }} - chart: {{ template "security.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/security/templates/tests/test-citadel-connection.yaml b/kubernetes/helm_charts/istio-system/istio/charts/security/templates/tests/test-citadel-connection.yaml deleted file mode 100755 index 6fc742a6e..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/security/templates/tests/test-citadel-connection.yaml +++ /dev/null @@ -1,36 +0,0 @@ -{{- if .Values.global.enableHelmTest }} -apiVersion: v1 -kind: Pod -metadata: - name: {{ template "security.fullname" . }}-test - namespace: {{ .Release.Namespace }} - labels: - app: istio-citadel-test - chart: {{ template "security.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - istio: citadel - annotations: - sidecar.istio.io/inject: "false" - helm.sh/hook: test-success -spec: -{{- if .Values.global.priorityClassName }} - priorityClassName: "{{ .Values.global.priorityClassName }}" -{{- end }} - containers: - - name: "{{ template "security.fullname" . }}-test" - image: pstauffer/curl:v1.0.3 - imagePullPolicy: "{{ .Values.global.imagePullPolicy }}" - command: ['sh', '-c', 'for i in 1 2 3; do curl http://istio-citadel:{{ .Values.global.monitoringPort }}/version && exit 0 || sleep 15; done; exit 1'] - restartPolicy: Never - affinity: - {{- include "nodeaffinity" . | indent 4 }} - {{- include "podAntiAffinity" . | indent 4 }} - {{- if .Values.tolerations }} - tolerations: -{{ toYaml .Values.tolerations | indent 2 }} - {{- else if .Values.global.defaultTolerations }} - tolerations: -{{ toYaml .Values.global.defaultTolerations | indent 2 }} - {{- end }} -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/security/values.yaml b/kubernetes/helm_charts/istio-system/istio/charts/security/values.yaml deleted file mode 100755 index 6bbb43401..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/security/values.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# -# security configuration -# -enabled: true -replicaCount: 1 -rollingMaxSurge: 100% -rollingMaxUnavailable: 25% -image: citadel -selfSigned: true # indicate if self-signed CA is used. -createMeshPolicy: true -nodeSelector: {} -tolerations: [] -# Enable health checking on the Citadel CSR signing API. -# https://istio.io/docs/tasks/security/health-check/ -citadelHealthCheck: false -# 90*24hour = 2160h -workloadCertTtl: 2160h - -# Determines Citadel default behavior if the ca.istio.io/env or ca.istio.io/override -# labels are not found on a given namespace. -# -# For example: consider a namespace called "target", which has neither the "ca.istio.io/env" -# nor the "ca.istio.io/override" namespace labels. To decide whether or not to generate secrets -# for service accounts created in this "target" namespace, Citadel will defer to this option. If the value -# of this option is "true" in this case, secrets will be generated for the "target" namespace. -# If the value of this option is "false" Citadel will not generate secrets upon service account creation. -enableNamespacesByDefault: true - -# Specify the pod anti-affinity that allows you to constrain which nodes -# your pod is eligible to be scheduled based on labels on pods that are -# already running on the node rather than based on labels on nodes. -# There are currently two types of anti-affinity: -# "requiredDuringSchedulingIgnoredDuringExecution" -# "preferredDuringSchedulingIgnoredDuringExecution" -# which denote "hard" vs. "soft" requirements, you can define your values -# in "podAntiAffinityLabelSelector" and "podAntiAffinityTermLabelSelector" -# correspondingly. -# For example: -# podAntiAffinityLabelSelector: -# - key: security -# operator: In -# values: S1,S2 -# topologyKey: "kubernetes.io/hostname" -# This pod anti-affinity rule says that the pod requires not to be scheduled -# onto a node if that node is already running a pod with label having key -# "security" and value "S1". -podAntiAffinityLabelSelector: [] -podAntiAffinityTermLabelSelector: [] diff --git a/kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/Chart.yaml b/kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/Chart.yaml deleted file mode 100755 index f8f9037df..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/Chart.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -appVersion: 1.3.3 -description: Helm chart for sidecar injector webhook deployment -engine: gotpl -icon: https://istio.io/favicons/android-192x192.png -keywords: -- istio -- sidecarInjectorWebhook -name: sidecarInjectorWebhook -sources: -- http://github.com/istio/istio -tillerVersion: '>=2.7.2' -version: 1.3.3 diff --git a/kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/templates/_helpers.tpl b/kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/templates/_helpers.tpl deleted file mode 100755 index f3b9fb15b..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/templates/_helpers.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "sidecar-injector.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "sidecar-injector.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "sidecar-injector.chart" -}} -{{- .Chart.Name | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/templates/clusterrole.yaml b/kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/templates/clusterrole.yaml deleted file mode 100755 index 27f9acb51..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/templates/clusterrole.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: istio-sidecar-injector-{{ .Release.Namespace }} - labels: - app: {{ template "sidecar-injector.name" . }} - chart: {{ template "sidecar-injector.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - istio: sidecar-injector -rules: -- apiGroups: [""] - resources: ["configmaps"] - verbs: ["get", "list", "watch"] -- apiGroups: ["admissionregistration.k8s.io"] - resources: ["mutatingwebhookconfigurations"] - verbs: ["get", "list", "watch", "patch"] diff --git a/kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/templates/clusterrolebinding.yaml b/kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/templates/clusterrolebinding.yaml deleted file mode 100755 index 748a93244..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/templates/clusterrolebinding.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: istio-sidecar-injector-admin-role-binding-{{ .Release.Namespace }} - labels: - app: {{ template "sidecar-injector.name" . }} - chart: {{ template "sidecar-injector.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - istio: sidecar-injector -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: istio-sidecar-injector-{{ .Release.Namespace }} -subjects: - - kind: ServiceAccount - name: istio-sidecar-injector-service-account - namespace: {{ .Release.Namespace }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/templates/deployment.yaml b/kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/templates/deployment.yaml deleted file mode 100755 index abbb93d39..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/templates/deployment.yaml +++ /dev/null @@ -1,110 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: istio-sidecar-injector - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "sidecar-injector.name" . }} - chart: {{ template "sidecar-injector.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - istio: sidecar-injector -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - istio: sidecar-injector - strategy: - rollingUpdate: - maxSurge: {{ .Values.rollingMaxSurge }} - maxUnavailable: {{ .Values.rollingMaxUnavailable }} - template: - metadata: - labels: - app: {{ template "sidecar-injector.name" . }} - chart: {{ template "sidecar-injector.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - istio: sidecar-injector - annotations: - sidecar.istio.io/inject: "false" - spec: - serviceAccountName: istio-sidecar-injector-service-account -{{- if .Values.global.priorityClassName }} - priorityClassName: "{{ .Values.global.priorityClassName }}" -{{- end }} - containers: - - name: sidecar-injector-webhook -{{- if contains "/" .Values.image }} - image: "{{ .Values.image }}" -{{- else }} - image: "{{ .Values.global.hub }}/{{ .Values.image }}:{{ .Values.global.tag }}" -{{- end }} - imagePullPolicy: {{ .Values.global.imagePullPolicy }} - args: - - --caCertFile=/etc/istio/certs/root-cert.pem - - --tlsCertFile=/etc/istio/certs/cert-chain.pem - - --tlsKeyFile=/etc/istio/certs/key.pem - - --injectConfig=/etc/istio/inject/config - - --meshConfig=/etc/istio/config/mesh - - --healthCheckInterval=2s - - --healthCheckFile=/health - volumeMounts: - - name: config-volume - mountPath: /etc/istio/config - readOnly: true - - name: certs - mountPath: /etc/istio/certs - readOnly: true - - name: inject-config - mountPath: /etc/istio/inject - readOnly: true - livenessProbe: - exec: - command: - - /usr/local/bin/sidecar-injector - - probe - - --probe-path=/health - - --interval=4s - initialDelaySeconds: 4 - periodSeconds: 4 - readinessProbe: - exec: - command: - - /usr/local/bin/sidecar-injector - - probe - - --probe-path=/health - - --interval=4s - initialDelaySeconds: 4 - periodSeconds: 4 - resources: -{{- if .Values.resources }} -{{ toYaml .Values.resources | indent 12 }} -{{- else }} -{{ toYaml .Values.global.defaultResources | indent 12 }} -{{- end }} - volumes: - - name: config-volume - configMap: - name: istio - - name: certs - secret: - secretName: istio.istio-sidecar-injector-service-account - - name: inject-config - configMap: - name: istio-sidecar-injector - items: - - key: config - path: config - - key: values - path: values - affinity: - {{- include "nodeaffinity" . | indent 6 }} - {{- include "podAntiAffinity" . | indent 6 }} - {{- if .Values.tolerations }} - tolerations: -{{ toYaml .Values.tolerations | indent 6 }} - {{- else if .Values.global.defaultTolerations }} - tolerations: -{{ toYaml .Values.global.defaultTolerations | indent 6 }} - {{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/templates/mutatingwebhook.yaml b/kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/templates/mutatingwebhook.yaml deleted file mode 100755 index a30dd38e5..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/templates/mutatingwebhook.yaml +++ /dev/null @@ -1,39 +0,0 @@ -apiVersion: admissionregistration.k8s.io/v1beta1 -kind: MutatingWebhookConfiguration -metadata: - name: istio-sidecar-injector - labels: - app: {{ template "sidecar-injector.name" . }} - chart: {{ template "sidecar-injector.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -webhooks: - - name: sidecar-injector.istio.io - clientConfig: - service: - name: istio-sidecar-injector - namespace: {{ .Release.Namespace }} - path: "/inject" - caBundle: "" - rules: - - operations: [ "CREATE" ] - apiGroups: [""] - apiVersions: ["v1"] - resources: ["pods"] - failurePolicy: Fail - namespaceSelector: -{{- if .Values.enableNamespacesByDefault }} - matchExpressions: - - key: name - operator: NotIn - values: - - {{ .Release.Namespace }} - - key: istio-injection - operator: NotIn - values: - - disabled -{{- else }} - matchLabels: - istio-injection: enabled -{{- end }} - diff --git a/kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/templates/poddisruptionbudget.yaml b/kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/templates/poddisruptionbudget.yaml deleted file mode 100755 index 51fb3fc3e..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/templates/poddisruptionbudget.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{- if .Values.global.defaultPodDisruptionBudget.enabled }} -apiVersion: policy/v1beta1 -kind: PodDisruptionBudget -metadata: - name: istio-sidecar-injector - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "sidecar-injector.name" . }} - release: {{ .Release.Name }} - istio: sidecar-injector -spec: -{{ include "podDisruptionBudget.spec" .Values.global.defaultPodDisruptionBudget }} - selector: - matchLabels: - app: {{ template "sidecar-injector.name" . }} - release: {{ .Release.Name }} - istio: sidecar-injector - {{- end }} \ No newline at end of file diff --git a/kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/templates/service.yaml b/kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/templates/service.yaml deleted file mode 100755 index 537e6f960..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/templates/service.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: istio-sidecar-injector - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "sidecar-injector.name" . }} - chart: {{ template "sidecar-injector.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - istio: sidecar-injector -spec: - ports: - - port: 443 - name: https-inject - - port: {{ .Values.global.monitoringPort }} - name: http-monitoring - selector: - istio: sidecar-injector diff --git a/kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/templates/serviceaccount.yaml b/kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/templates/serviceaccount.yaml deleted file mode 100755 index d4020b517..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/templates/serviceaccount.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -{{- if .Values.global.imagePullSecrets }} -imagePullSecrets: -{{- range .Values.global.imagePullSecrets }} - - name: {{ . }} -{{- end }} -{{- end }} -metadata: - name: istio-sidecar-injector-service-account - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "sidecar-injector.name" . }} - chart: {{ template "sidecar-injector.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - istio: sidecar-injector diff --git a/kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/values.yaml b/kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/values.yaml deleted file mode 100755 index 31980ac19..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/sidecarInjectorWebhook/values.yaml +++ /dev/null @@ -1,44 +0,0 @@ -# -# sidecar-injector webhook configuration -# -enabled: true -replicaCount: 1 -rollingMaxSurge: 100% -rollingMaxUnavailable: 25% -image: sidecar_injector -enableNamespacesByDefault: false -nodeSelector: {} -tolerations: [] - -# Specify the pod anti-affinity that allows you to constrain which nodes -# your pod is eligible to be scheduled based on labels on pods that are -# already running on the node rather than based on labels on nodes. -# There are currently two types of anti-affinity: -# "requiredDuringSchedulingIgnoredDuringExecution" -# "preferredDuringSchedulingIgnoredDuringExecution" -# which denote "hard" vs. "soft" requirements, you can define your values -# in "podAntiAffinityLabelSelector" and "podAntiAffinityTermLabelSelector" -# correspondingly. -# For example: -# podAntiAffinityLabelSelector: -# - key: security -# operator: In -# values: S1,S2 -# topologyKey: "kubernetes.io/hostname" -# This pod anti-affinity rule says that the pod requires not to be scheduled -# onto a node if that node is already running a pod with label having key -# "security" and value "S1". -podAntiAffinityLabelSelector: [] -podAntiAffinityTermLabelSelector: [] - -# If true, webhook or istioctl injector will rewrite PodSpec for liveness -# health check to redirect request to sidecar. This makes liveness check work -# even when mTLS is enabled. -rewriteAppHTTPProbe: false - -# You can use the field called alwaysInjectSelector and neverInjectSelector which will always inject the sidecar or -# always skip the injection on pods that match that label selector, regardless of the global policy. -# See https://istio.io/docs/setup/kubernetes/additional-setup/sidecar-injection/#more-control-adding-exceptions -neverInjectSelector: [] - -alwaysInjectSelector: [] \ No newline at end of file diff --git a/kubernetes/helm_charts/istio-system/istio/charts/tracing/Chart.yaml b/kubernetes/helm_charts/istio-system/istio/charts/tracing/Chart.yaml deleted file mode 100755 index 4f4cc100d..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/tracing/Chart.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: v1 -appVersion: 1.5.1 -description: A Helm chart for Kubernetes -name: tracing -tillerVersion: '>=2.7.2' -version: 1.3.3 diff --git a/kubernetes/helm_charts/istio-system/istio/charts/tracing/templates/_helpers.tpl b/kubernetes/helm_charts/istio-system/istio/charts/tracing/templates/_helpers.tpl deleted file mode 100755 index e246b59b1..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/tracing/templates/_helpers.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "tracing.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "tracing.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "tracing.chart" -}} -{{- .Chart.Name | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/tracing/templates/deployment-jaeger.yaml b/kubernetes/helm_charts/istio-system/istio/charts/tracing/templates/deployment-jaeger.yaml deleted file mode 100755 index cc7f8999e..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/tracing/templates/deployment-jaeger.yaml +++ /dev/null @@ -1,117 +0,0 @@ -{{ if eq .Values.provider "jaeger" }} - -apiVersion: apps/v1 -kind: Deployment -metadata: - name: istio-tracing - namespace: {{ .Release.Namespace }} - labels: - app: jaeger - chart: {{ template "tracing.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - selector: - matchLabels: - app: jaeger - template: - metadata: - labels: - app: jaeger - chart: {{ template "tracing.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - annotations: - sidecar.istio.io/inject: "false" - prometheus.io/scrape: "true" - prometheus.io/port: "16686" -{{- if .Values.contextPath }} - prometheus.io/path: "{{ .Values.contextPath }}/metrics" -{{- else }} - prometheus.io/path: "/{{ .Values.provider }}/metrics" -{{- end }} - spec: -{{- if .Values.global.priorityClassName }} - priorityClassName: "{{ .Values.global.priorityClassName }}" -{{- end }} -{{- if .Values.global.imagePullSecrets }} - imagePullSecrets: -{{- range .Values.global.imagePullSecrets }} - - name: {{ . }} -{{- end }} -{{- end }} - containers: - - name: jaeger - image: "{{ .Values.jaeger.hub }}/{{ .Values.jaeger.image }}:{{ .Values.jaeger.tag }}" - imagePullPolicy: {{ .Values.global.imagePullPolicy }} - ports: - - containerPort: 9411 - - containerPort: 16686 - - containerPort: 5775 - protocol: UDP - - containerPort: 6831 - protocol: UDP - - containerPort: 6832 - protocol: UDP - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - {{- if eq .Values.jaeger.spanStorageType "badger" }} - - name: BADGER_EPHEMERAL - value: "false" - - name: SPAN_STORAGE_TYPE - value: "badger" - - name: BADGER_DIRECTORY_VALUE - value: "/badger/data" - - name: BADGER_DIRECTORY_KEY - value: "/badger/key" - {{- end }} - - name: COLLECTOR_ZIPKIN_HTTP_PORT - value: "9411" - - name: MEMORY_MAX_TRACES - value: "{{ .Values.jaeger.memory.max_traces }}" - - name: QUERY_BASE_PATH - value: {{ if .Values.contextPath }} {{ .Values.contextPath }} {{ else }} /{{ .Values.provider }} {{ end }} - livenessProbe: - httpGet: - path: / - port: 16686 - readinessProbe: - httpGet: - path: / - port: 16686 -{{- if eq .Values.jaeger.spanStorageType "badger" }} - volumeMounts: - - name: data - mountPath: /badger -{{- end }} - resources: -{{- if .Values.jaeger.resources }} -{{ toYaml .Values.jaeger.resources | indent 12 }} -{{- else }} -{{ toYaml .Values.global.defaultResources | indent 12 }} -{{- end }} - affinity: - {{- include "nodeaffinity" . | indent 6 }} - {{- include "podAntiAffinity" . | indent 6 }} - {{- if .Values.tolerations }} - tolerations: -{{ toYaml .Values.tolerations | indent 6 }} - {{- else if .Values.global.defaultTolerations }} - tolerations: -{{ toYaml .Values.global.defaultTolerations | indent 6 }} - {{- end }} -{{- if eq .Values.jaeger.spanStorageType "badger" }} - volumes: - - name: data -{{- if .Values.jaeger.persist }} - persistentVolumeClaim: - claimName: istio-jaeger-pvc -{{- else }} - emptyDir: {} -{{- end }} -{{- end }} -{{ end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/tracing/templates/deployment-zipkin.yaml b/kubernetes/helm_charts/istio-system/istio/charts/tracing/templates/deployment-zipkin.yaml deleted file mode 100755 index 04dfbb033..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/tracing/templates/deployment-zipkin.yaml +++ /dev/null @@ -1,82 +0,0 @@ -{{ if eq .Values.provider "zipkin" }} - -apiVersion: apps/v1 -kind: Deployment -metadata: - name: istio-tracing - namespace: {{ .Release.Namespace }} - labels: - app: zipkin - chart: {{ template "tracing.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - selector: - matchLabels: - app: zipkin - template: - metadata: - labels: - app: zipkin - chart: {{ template "tracing.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - annotations: - sidecar.istio.io/inject: "false" - scheduler.alpha.kubernetes.io/critical-pod: "" - spec: -{{- if .Values.global.priorityClassName }} - priorityClassName: "{{ .Values.global.priorityClassName }}" -{{- end }} -{{- if .Values.global.imagePullSecrets }} - imagePullSecrets: -{{- range .Values.global.imagePullSecrets }} - - name: {{ . }} -{{- end }} -{{- end }} - containers: - - name: zipkin - image: "{{ .Values.zipkin.hub }}/{{ .Values.zipkin.image }}:{{ .Values.zipkin.tag }}" - imagePullPolicy: {{ .Values.global.imagePullPolicy }} - ports: - - containerPort: {{ .Values.zipkin.queryPort }} - livenessProbe: - initialDelaySeconds: {{ .Values.zipkin.probeStartupDelay }} - tcpSocket: - port: {{ .Values.zipkin.queryPort }} - readinessProbe: - initialDelaySeconds: {{ .Values.zipkin.probeStartupDelay }} - httpGet: - path: /health - port: {{ .Values.zipkin.queryPort }} - resources: -{{- if .Values.zipkin.resources }} -{{ toYaml .Values.zipkin.resources | indent 12 }} -{{- else }} -{{ toYaml .Values.global.defaultResources | indent 12 }} -{{- end }} - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - - name: QUERY_PORT - value: "{{ .Values.zipkin.queryPort }}" - - name: JAVA_OPTS - value: "-XX:ConcGCThreads={{ .Values.zipkin.node.cpus }} -XX:ParallelGCThreads={{ .Values.zipkin.node.cpus }} -Djava.util.concurrent.ForkJoinPool.common.parallelism={{ .Values.zipkin.node.cpus }} -Xms{{ .Values.zipkin.javaOptsHeap }}M -Xmx{{ .Values.zipkin.javaOptsHeap }}M -XX:+UseG1GC -server" - - name: STORAGE_METHOD - value: "mem" - - name: ZIPKIN_STORAGE_MEM_MAXSPANS - value: "{{ .Values.zipkin.maxSpans }}" - affinity: - {{- include "nodeaffinity" . | indent 6 }} - {{- include "podAntiAffinity" . | indent 6 }} - {{- if .Values.tolerations }} - tolerations: -{{ toYaml .Values.tolerations | indent 6 }} - {{- else if .Values.global.defaultTolerations }} - tolerations: -{{ toYaml .Values.global.defaultTolerations | indent 6 }} - {{- end }} -{{ end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/tracing/templates/ingress.yaml b/kubernetes/helm_charts/istio-system/istio/charts/tracing/templates/ingress.yaml deleted file mode 100755 index 72f362166..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/tracing/templates/ingress.yaml +++ /dev/null @@ -1,41 +0,0 @@ -{{- if .Values.ingress.enabled -}} -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: {{ template "tracing.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ .Values.provider }} - chart: {{ template "tracing.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - annotations: - {{- range $key, $value := .Values.ingress.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} -spec: - rules: -{{- if .Values.ingress.hosts }} - {{- range $host := .Values.ingress.hosts }} - - host: {{ $host }} - http: - paths: - - path: {{ if $.Values.contextPath }} {{ $.Values.contextPath }} {{ else }} /{{ $.Values.provider }} {{ end }} - backend: - serviceName: tracing - servicePort: 80 - - {{- end -}} -{{- else }} - - http: - paths: - - path: {{ if .Values.contextPath }} {{ .Values.contextPath }} {{ else }} /{{ .Values.provider }} {{ end }} - backend: - serviceName: tracing - servicePort: 80 -{{- end }} - {{- if .Values.ingress.tls }} - tls: -{{ toYaml .Values.ingress.tls | indent 4 }} - {{- end -}} -{{- end -}} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/tracing/templates/pvc.yaml b/kubernetes/helm_charts/istio-system/istio/charts/tracing/templates/pvc.yaml deleted file mode 100755 index 60140494c..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/tracing/templates/pvc.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- if eq .Values.provider "jaeger" }} -{{- if .Values.jaeger.persist }} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: istio-jaeger-pvc - namespace: {{ .Release.Namespace }} - labels: - app: jaeger - chart: {{ template "tracing.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - storageClassName: {{ .Values.jaeger.storageClassName }} - accessModes: - - {{ .Values.jaeger.accessMode }} - resources: - requests: - storage: 5Gi -{{- end }} -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/tracing/templates/service-jaeger.yaml b/kubernetes/helm_charts/istio-system/istio/charts/tracing/templates/service-jaeger.yaml deleted file mode 100755 index 23979baf8..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/tracing/templates/service-jaeger.yaml +++ /dev/null @@ -1,90 +0,0 @@ -{{ if eq .Values.provider "jaeger" }} - -apiVersion: v1 -kind: List -metadata: - name: jaeger-services - namespace: {{ .Release.Namespace }} - labels: - app: jaeger - chart: {{ template "tracing.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -items: -- apiVersion: v1 - kind: Service - metadata: - name: jaeger-query - namespace: {{ .Release.Namespace }} - annotations: - {{- range $key, $val := .Values.service.annotations }} - {{ $key }}: {{ $val | quote }} - {{- end }} - labels: - app: jaeger - jaeger-infra: jaeger-service - chart: {{ template "tracing.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - spec: - ports: - - name: query-http - port: 16686 - protocol: TCP - targetPort: 16686 - selector: - app: jaeger -- apiVersion: v1 - kind: Service - metadata: - name: jaeger-collector - namespace: {{ .Release.Namespace }} - labels: - app: jaeger - jaeger-infra: collector-service - chart: {{ template "tracing.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - spec: - ports: - - name: jaeger-collector-tchannel - port: 14267 - protocol: TCP - targetPort: 14267 - - name: jaeger-collector-http - port: 14268 - targetPort: 14268 - protocol: TCP - selector: - app: jaeger - type: ClusterIP -- apiVersion: v1 - kind: Service - metadata: - name: jaeger-agent - namespace: {{ .Release.Namespace }} - labels: - app: jaeger - jaeger-infra: agent-service - chart: {{ template "tracing.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - spec: - ports: - - name: agent-zipkin-thrift - port: 5775 - protocol: UDP - targetPort: 5775 - - name: agent-compact - port: 6831 - protocol: UDP - targetPort: 6831 - - name: agent-binary - port: 6832 - protocol: UDP - targetPort: 6832 - clusterIP: None - selector: - app: jaeger -{{ end }} - diff --git a/kubernetes/helm_charts/istio-system/istio/charts/tracing/templates/service.yaml b/kubernetes/helm_charts/istio-system/istio/charts/tracing/templates/service.yaml deleted file mode 100755 index fe94067b0..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/tracing/templates/service.yaml +++ /dev/null @@ -1,56 +0,0 @@ -apiVersion: v1 -kind: List -metadata: - name: tracing-services - namespace: {{ .Release.Namespace }} - labels: - app: {{ .Values.provider }} - chart: {{ template "tracing.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -items: -- apiVersion: v1 - kind: Service - metadata: - name: zipkin - namespace: {{ .Release.Namespace }} - labels: - app: {{ .Values.provider }} - chart: {{ template "tracing.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.externalPort }} - targetPort: 9411 - protocol: TCP - name: {{ .Values.service.name }} - selector: - app: {{ .Values.provider }} -- apiVersion: v1 - kind: Service - metadata: - name: tracing - namespace: {{ .Release.Namespace }} - annotations: - {{- range $key, $val := .Values.service.annotations }} - {{ $key }}: {{ $val | quote }} - {{- end }} - labels: - app: {{ .Values.provider }} - chart: {{ template "tracing.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - spec: - ports: - - name: http-query - port: 80 - protocol: TCP -{{ if eq .Values.provider "jaeger" }} - targetPort: 16686 -{{ else }} - targetPort: 9411 -{{ end}} - selector: - app: {{ .Values.provider }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/tracing/templates/tests/test-tracing-connection.yaml b/kubernetes/helm_charts/istio-system/istio/charts/tracing/templates/tests/test-tracing-connection.yaml deleted file mode 100755 index b87f487e0..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/tracing/templates/tests/test-tracing-connection.yaml +++ /dev/null @@ -1,40 +0,0 @@ -{{- if .Values.global.enableHelmTest }} -apiVersion: v1 -kind: Pod -metadata: - name: {{ .Release.Name }}-{{ .Values.provider }}-test - namespace: {{ .Release.Namespace }} - labels: - app: {{ .Values.provider }}-test - chart: {{ template "tracing.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - annotations: - sidecar.istio.io/inject: "false" - helm.sh/hook: test-success -spec: -{{- if .Values.global.priorityClassName }} - priorityClassName: "{{ .Values.global.priorityClassName }}" -{{- end }} - containers: - - name: "{{ .Values.provider }}-test" - image: pstauffer/curl:v1.0.3 - imagePullPolicy: "{{ .Values.global.imagePullPolicy }}" - command: ['curl'] - {{- if eq .Values.provider "jaeger" }} - args: ['http://tracing:80{{ .Values.jaeger.contextPath}}'] - {{- else }} - args: ['http://tracing:80'] - {{- end }} - restartPolicy: Never - affinity: - {{- include "nodeaffinity" . | indent 4 }} - {{- include "podAntiAffinity" . | indent 4 }} - {{- if .Values.tolerations }} - tolerations: -{{ toYaml .Values.tolerations | indent 2 }} - {{- else if .Values.global.defaultTolerations }} - tolerations: -{{ toYaml .Values.global.defaultTolerations | indent 2 }} - {{- end }} -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/charts/tracing/values.yaml b/kubernetes/helm_charts/istio-system/istio/charts/tracing/values.yaml deleted file mode 100755 index f0d386f6f..000000000 --- a/kubernetes/helm_charts/istio-system/istio/charts/tracing/values.yaml +++ /dev/null @@ -1,84 +0,0 @@ -# -# addon jaeger tracing configuration -# -enabled: false - -provider: jaeger -nodeSelector: {} -tolerations: [] - -# Specify the pod anti-affinity that allows you to constrain which nodes -# your pod is eligible to be scheduled based on labels on pods that are -# already running on the node rather than based on labels on nodes. -# There are currently two types of anti-affinity: -# "requiredDuringSchedulingIgnoredDuringExecution" -# "preferredDuringSchedulingIgnoredDuringExecution" -# which denote "hard" vs. "soft" requirements, you can define your values -# in "podAntiAffinityLabelSelector" and "podAntiAffinityTermLabelSelector" -# correspondingly. -# For example: -# podAntiAffinityLabelSelector: -# - key: security -# operator: In -# values: S1,S2 -# topologyKey: "kubernetes.io/hostname" -# This pod anti-affinity rule says that the pod requires not to be scheduled -# onto a node if that node is already running a pod with label having key -# "security" and value "S1". -podAntiAffinityLabelSelector: [] -podAntiAffinityTermLabelSelector: [] - -jaeger: - hub: docker.io/jaegertracing - image: all-in-one - tag: 1.12 - memory: - max_traces: 50000 - # spanStorageType value can be "memory" and "badger" for all-in-one image - spanStorageType: badger - persist: false - storageClassName: "" - accessMode: ReadWriteMany - -zipkin: - hub: docker.io/openzipkin - image: zipkin - tag: 2.14.2 - probeStartupDelay: 200 - queryPort: 9411 - resources: - limits: - cpu: 300m - memory: 900Mi - requests: - cpu: 150m - memory: 900Mi - javaOptsHeap: 700 - # From: https://github.com/openzipkin/zipkin/blob/master/zipkin-server/src/main/resources/zipkin-server-shared.yml#L51 - # Maximum number of spans to keep in memory. When exceeded, oldest traces (and their spans) will be purged. - # A safe estimate is 1K of memory per span (each span with 2 annotations + 1 binary annotation), plus - # 100 MB for a safety buffer. You'll need to verify in your own environment. - maxSpans: 500000 - node: - cpus: 2 - -service: - annotations: {} - name: http - type: ClusterIP - externalPort: 9411 - -ingress: - enabled: false - # Used to create an Ingress record. - hosts: - # - tracing.local - annotations: - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - tls: - # Secrets must be manually created in the namespace. - # - secretName: tracing-tls - # hosts: - # - tracing.local - diff --git a/kubernetes/helm_charts/istio-system/istio/example-values/README.md b/kubernetes/helm_charts/istio-system/istio/example-values/README.md deleted file mode 100755 index 74fedcb60..000000000 --- a/kubernetes/helm_charts/istio-system/istio/example-values/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Example Values - -These files provide various example values for different Istio setups. - -To use them, [read the docs](https://istio.io/docs/setup/kubernetes/helm-install/) and add the flag `--values example-file.yaml`. diff --git a/kubernetes/helm_charts/istio-system/istio/example-values/values-istio-example-sds-vault.yaml b/kubernetes/helm_charts/istio-system/istio/example-values/values-istio-example-sds-vault.yaml deleted file mode 100755 index 1016afc01..000000000 --- a/kubernetes/helm_charts/istio-system/istio/example-values/values-istio-example-sds-vault.yaml +++ /dev/null @@ -1,26 +0,0 @@ -global: - controlPlaneSecurityEnabled: false - - mtls: - # Default setting for service-to-service mtls. Can be set explicitly using - # destination rules or service annotations. - enabled: true - - sds: - enabled: true - udsPath: "unix:/var/run/sds/uds_path" - -nodeagent: - enabled: true - image: node-agent-k8s - env: - # The IP address and the port number of a publicly accessible example Vault server. - CA_ADDR: "https://34.83.129.211:8200" - CA_PROVIDER: "VaultCA" - VALID_TOKEN: true - # The IP address and the port number of a publicly accessible example Vault server. - VAULT_ADDR: "https://34.83.129.211:8200" - VAULT_AUTH_PATH: "auth/kubernetes/login" - VAULT_ROLE: "istio-cert" - VAULT_SIGN_CSR_PATH: "istio_ca/sign/istio-pki-role" - VAULT_TLS_ROOT_CERT: '-----BEGIN CERTIFICATE-----\nMIIC3jCCAcagAwIBAgIRAO1S7vuRQmo2He+RtBq3fv8wDQYJKoZIhvcNAQELBQAw\nEDEOMAwGA1UEChMFVmF1bHQwIBcNMTkwNDI3MTY1ODE1WhgPMjExOTA0MDMxNjU4\nMTVaMBAxDjAMBgNVBAoTBVZhdWx0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEA7/CTbnENEIvFZg9hmVtYnOx3OfMy/GNCuP7sqtAeVVTopAKKkcAAWQck\nrhpBooEGpCugNxXGNCuJh/2nu0AfGFRfdafwSJRoI6yHwQouDm0o4r3h9uL3tu5N\nD+x9j+eejbFsoZVn84CxGkEB6oyeXYHjc6eWh3PFGMtKuOQD4pezvDH0yNCx5waK\nhtPuYtl0ebfdbyh+WQuptO+Q9VSaQNqE3ipZ461y8PduwRRll241W0gQB2iasX03\nD36F2ZrMz3KEVRVKM1yCUDCy2RPJqkXPdnVMWmDGbe8Uw69zr25JltzuRZFT9HL3\nY1RnMTecmSc4ikTUHcMhFX3PYbfR5wIDAQABozEwLzAOBgNVHQ8BAf8EBAMCBaAw\nDAYDVR0TAQH/BAIwADAPBgNVHREECDAGhwQiU4HTMA0GCSqGSIb3DQEBCwUAA4IB\nAQCdLh6olDVQB71LD6srbfAE4EsxLEBbIRnv7Nf1S0KQwgW/QxK8DHBwJBxJkr1N\nzgEPx86f2Fo2UsY9m6rvgP3+iquyMsKi0ooUah3y3LSnONuZcdfSTl/HYd38S6Dp\nVkVOZ7781xxpFVUqQ5voQX1Y1Ipn5qw0FyIcNYWLkNX+iMf1b9kpEIWQNhRC/Yiv\nTS0VA/BzQemGyf2UB6QsuZLH+JFEZnzU859qURnNIITa1Wf4YUtka5Sp1kDnEll3\nwj4IlXKU+Wl1CzxJyn4SSQAXy/Lb08ZKrF/YSzcIISnRX5j+wa8ApOSwwA/B7iaT\nTWz1g+RlV9qHap70eIjPsQvb\n-----END CERTIFICATE-----' \ No newline at end of file diff --git a/kubernetes/helm_charts/istio-system/istio/example-values/values-istio-gateways.yaml b/kubernetes/helm_charts/istio-system/istio/example-values/values-istio-gateways.yaml deleted file mode 100755 index b9930d0a0..000000000 --- a/kubernetes/helm_charts/istio-system/istio/example-values/values-istio-gateways.yaml +++ /dev/null @@ -1,135 +0,0 @@ -# Common settings. -global: - # Omit the istio-sidecar-injector configmap when generate a - # standalone gateway. Gateways may be created in namespaces other - # than `istio-system` and we don't want to re-create the injector - # configmap in those. - omitSidecarInjectorConfigMap: true - - # Istio control plane namespace: This specifies where the Istio control - # plane was installed earlier. Modify this if you installed the control - # plane in a different namespace than istio-system. - istioNamespace: istio-system - - proxy: - # Sets the destination Statsd in envoy (the value of the "--statsdUdpAddress" proxy argument - # would be :). - # Disabled by default. - # The istio-statsd-prom-bridge is deprecated and should not be used moving forward. - envoyStatsd: - # If enabled is set to true, host and port must also be provided. Istio no longer provides a statsd collector. - enabled: false - host: # example: statsd-svc.istio-system - port: # example: 9125 - - -# -# Gateways Configuration -# By default (if enabled) a pair of Ingress and Egress Gateways will be created for the mesh. -# You can add more gateways in addition to the defaults but make sure those are uniquely named -# and that NodePorts are not conflicting. -# Disable specific gateway by setting the `enabled` to false. -# -gateways: - enabled: true - - custom-gateway: - enabled: true - labels: - app: custom-gateway - replicaCount: 1 - autoscaleMin: 1 - autoscaleMax: 5 - resources: {} - # limits: - # cpu: 100m - # memory: 128Mi - #requests: - # cpu: 1800m - # memory: 256Mi - cpu: - targetAverageUtilization: 80 - loadBalancerIP: "" - loadBalancerSourceRanges: {} - externalIPs: [] - serviceAnnotations: {} - podAnnotations: {} - type: LoadBalancer #change to NodePort, ClusterIP or LoadBalancer if need be - #externalTrafficPolicy: Local #change to Local to preserve source IP or Cluster for default behaviour or leave commented out - ports: - ## You can add custom gateway ports - - port: 80 - targetPort: 80 - name: http2 - # nodePort: 31380 - - port: 443 - name: https - # nodePort: 31390 - - port: 31400 - name: tcp - # nodePort: 31400 - # Pilot and Citadel MTLS ports are enabled in gateway - but will only redirect - # to pilot/citadel if global.meshExpansion settings are enabled. - - port: 15011 - targetPort: 15011 - name: tcp-pilot-grpc-tls - - port: 8060 - targetPort: 8060 - name: tcp-citadel-grpc-tls - # Addon ports for kiali are enabled in gateway - but will only redirect if - # the gateway configuration for the various components are enabled. - - port: 15029 - targetPort: 15029 - name: http2-kiali - # Telemetry-related ports are enabled in gateway - but will only redirect if - # the gateway configuration for the various components are enabled. - - port: 15030 - targetPort: 15030 - name: http2-prometheus - - port: 15031 - targetPort: 15031 - name: http2-grafana - - port: 15032 - targetPort: 15032 - name: http2-tracing - secretVolumes: - - name: customgateway-certs - secretName: istio-customgateway-certs - mountPath: /etc/istio/customgateway-certs - - name: customgateway-ca-certs - secretName: istio-customgateway-ca-certs - mountPath: /etc/istio/customgateway-ca-certs - -# all other components are disabled except the gateways -security: - enabled: false - -sidecarInjectorWebhook: - enabled: false - -galley: - enabled: false - -mixer: - policy: - enabled: false - telemetry: - enabled: false - -pilot: - enabled: false - -grafana: - enabled: false - -prometheus: - enabled: false - -tracing: - enabled: false - -kiali: - enabled: false - -certmanager: - enabled: false diff --git a/kubernetes/helm_charts/istio-system/istio/example-values/values-istio-googleca.yaml b/kubernetes/helm_charts/istio-system/istio/example-values/values-istio-googleca.yaml deleted file mode 100755 index 0e6d15342..000000000 --- a/kubernetes/helm_charts/istio-system/istio/example-values/values-istio-googleca.yaml +++ /dev/null @@ -1,28 +0,0 @@ -global: - controlPlaneSecurityEnabled: true - - mtls: - # Default setting for service-to-service mtls. Can be set explicitly using - # destination rules or service annotations. - enabled: true - - sds: - enabled: true - udsPath: "unix:/var/run/sds/uds_path" - # For GoogleCA, the aud field need to be set to the trustDomain, which is also set at the - # installation/configuration time, e.g. by running helm template. - token: - aud: "" - - trustDomain: "" - - useMCP: true - -nodeagent: - enabled: true - image: node-agent-k8s - env: - CA_PROVIDER: "GoogleCA" - CA_ADDR: "meshca.googleapis.com:443" - PLUGINS: "GoogleTokenExchange" - GKE_CLUSTER_URL: "" diff --git a/kubernetes/helm_charts/istio-system/istio/example-values/values-istio-meshexpansion-gateways.yaml b/kubernetes/helm_charts/istio-system/istio/example-values/values-istio-meshexpansion-gateways.yaml deleted file mode 100755 index 51a1ded16..000000000 --- a/kubernetes/helm_charts/istio-system/istio/example-values/values-istio-meshexpansion-gateways.yaml +++ /dev/null @@ -1,28 +0,0 @@ -global: - # Provides dns resolution for global services - podDNSSearchNamespaces: - - global - - multiCluster: - enabled: true - - controlPlaneSecurityEnabled: true - meshExpansion: - enabled: true - -# Multicluster with gateways requires a root CA -# Cluster local CAs are bootstrapped with the root CA. -security: - selfSigned: false - -# Provides dns resolution for service entries of form -# name.namespace.global -istiocoredns: - enabled: true - -gateways: - istio-egressgateway: - enabled: true - env: - # Needed to route traffic via egress gateway if desired. - ISTIO_META_REQUESTED_NETWORK_VIEW: "external" diff --git a/kubernetes/helm_charts/istio-system/istio/example-values/values-istio-multicluster-gateways.yaml b/kubernetes/helm_charts/istio-system/istio/example-values/values-istio-multicluster-gateways.yaml deleted file mode 100755 index 3524a3d47..000000000 --- a/kubernetes/helm_charts/istio-system/istio/example-values/values-istio-multicluster-gateways.yaml +++ /dev/null @@ -1,27 +0,0 @@ -global: - # Provides dns resolution for global services - podDNSSearchNamespaces: - - global - - "{{ valueOrDefault .DeploymentMeta.Namespace \"default\" }}.global" - - multiCluster: - enabled: true - - controlPlaneSecurityEnabled: true - -# Multicluster with gateways requires a root CA -# Cluster local CAs are bootstrapped with the root CA. -security: - selfSigned: false - -# Provides dns resolution for service entries of form -# name.namespace.global -istiocoredns: - enabled: true - -gateways: - istio-egressgateway: - enabled: true - env: - # Needed to route traffic via egress gateway if desired. - ISTIO_META_REQUESTED_NETWORK_VIEW: "external" diff --git a/kubernetes/helm_charts/istio-system/istio/files/injection-template.yaml b/kubernetes/helm_charts/istio-system/istio/files/injection-template.yaml deleted file mode 100755 index 49395a181..000000000 --- a/kubernetes/helm_charts/istio-system/istio/files/injection-template.yaml +++ /dev/null @@ -1,388 +0,0 @@ -rewriteAppHTTPProbe: {{ valueOrDefault .Values.sidecarInjectorWebhook.rewriteAppHTTPProbe false }} -{{- if or (not .Values.istio_cni.enabled) .Values.global.proxy.enableCoreDump }} -initContainers: -{{ if ne (annotation .ObjectMeta `sidecar.istio.io/interceptionMode` .ProxyConfig.InterceptionMode) `NONE` }} -{{- if not .Values.istio_cni.enabled }} -- name: istio-init -{{- if contains "/" .Values.global.proxy_init.image }} - image: "{{ .Values.global.proxy_init.image }}" -{{- else }} - image: "{{ .Values.global.hub }}/{{ .Values.global.proxy_init.image }}:{{ .Values.global.tag }}" -{{- end }} - args: - - "-p" - - "15001" - - "-z" - - "15006" - - "-u" - - 1337 - - "-m" - - "{{ annotation .ObjectMeta `sidecar.istio.io/interceptionMode` .ProxyConfig.InterceptionMode }}" - - "-i" - - "{{ annotation .ObjectMeta `traffic.sidecar.istio.io/includeOutboundIPRanges` .Values.global.proxy.includeIPRanges }}" - - "-x" - - "{{ annotation .ObjectMeta `traffic.sidecar.istio.io/excludeOutboundIPRanges` .Values.global.proxy.excludeIPRanges }}" - - "-b" - - "{{ annotation .ObjectMeta `traffic.sidecar.istio.io/includeInboundPorts` `*` }}" - - "-d" - - "{{ excludeInboundPort (annotation .ObjectMeta `status.sidecar.istio.io/port` .Values.global.proxy.statusPort) (annotation .ObjectMeta `traffic.sidecar.istio.io/excludeInboundPorts` .Values.global.proxy.excludeInboundPorts) }}" - {{ if or (isset .ObjectMeta.Annotations `traffic.sidecar.istio.io/excludeOutboundPorts`) (ne .Values.global.proxy.excludeOutboundPorts "") -}} - - "-o" - - "{{ annotation .ObjectMeta `traffic.sidecar.istio.io/excludeOutboundPorts` .Values.global.proxy.excludeOutboundPorts }}" - {{ end -}} - {{ if (isset .ObjectMeta.Annotations `traffic.sidecar.istio.io/kubevirtInterfaces`) -}} - - "-k" - - "{{ index .ObjectMeta.Annotations `traffic.sidecar.istio.io/kubevirtInterfaces` }}" - {{ end -}} - imagePullPolicy: "{{ .Values.global.imagePullPolicy }}" -{{- if .Values.global.proxy.init.resources }} - resources: - {{ toYaml .Values.global.proxy.init.resources | indent 4 }} -{{- else }} - resources: {} -{{- end }} - securityContext: - runAsUser: 0 - runAsNonRoot: false - capabilities: - add: - - NET_ADMIN - {{- if .Values.global.proxy.privileged }} - privileged: true - {{- end }} - restartPolicy: Always -{{- end }} -{{ end -}} -{{- if eq .Values.global.proxy.enableCoreDump true }} -- name: enable-core-dump - args: - - -c - - sysctl -w kernel.core_pattern=/var/lib/istio/core.proxy && ulimit -c unlimited - command: - - /bin/sh - image: {{ $.Values.global.proxy.enableCoreDumpImage }} - imagePullPolicy: IfNotPresent - resources: {} - securityContext: - runAsUser: 0 - runAsNonRoot: false - privileged: true -{{ end }} -{{- end }} -containers: -- name: istio-proxy -{{- if contains "/" (annotation .ObjectMeta `sidecar.istio.io/proxyImage` .Values.global.proxy.image) }} - image: "{{ annotation .ObjectMeta `sidecar.istio.io/proxyImage` .Values.global.proxy.image }}" -{{- else }} - image: "{{ annotation .ObjectMeta `sidecar.istio.io/proxyImage` .Values.global.hub }}/{{ .Values.global.proxy.image }}:{{ .Values.global.tag }}" -{{- end }} - ports: - - containerPort: 15090 - protocol: TCP - name: http-envoy-prom - args: - - proxy - - sidecar - - --domain - - $(POD_NAMESPACE).svc.{{ .Values.global.proxy.clusterDomain }} - - --configPath - - "{{ .ProxyConfig.ConfigPath }}" - - --binaryPath - - "{{ .ProxyConfig.BinaryPath }}" - - --serviceCluster - {{ if ne "" (index .ObjectMeta.Labels "app") -}} - - "{{ index .ObjectMeta.Labels `app` }}.$(POD_NAMESPACE)" - {{ else -}} - - "{{ valueOrDefault .DeploymentMeta.Name `istio-proxy` }}.{{ valueOrDefault .DeploymentMeta.Namespace `default` }}" - {{ end -}} - - --drainDuration - - "{{ formatDuration .ProxyConfig.DrainDuration }}" - - --parentShutdownDuration - - "{{ formatDuration .ProxyConfig.ParentShutdownDuration }}" - - --discoveryAddress - - "{{ annotation .ObjectMeta `sidecar.istio.io/discoveryAddress` .ProxyConfig.DiscoveryAddress }}" -{{- if eq .Values.global.proxy.tracer "lightstep" }} - - --lightstepAddress - - "{{ .ProxyConfig.GetTracing.GetLightstep.GetAddress }}" - - --lightstepAccessToken - - "{{ .ProxyConfig.GetTracing.GetLightstep.GetAccessToken }}" - - --lightstepSecure={{ .ProxyConfig.GetTracing.GetLightstep.GetSecure }} - - --lightstepCacertPath - - "{{ .ProxyConfig.GetTracing.GetLightstep.GetCacertPath }}" -{{- else if eq .Values.global.proxy.tracer "zipkin" }} - - --zipkinAddress - - "{{ .ProxyConfig.GetTracing.GetZipkin.GetAddress }}" -{{- else if eq .Values.global.proxy.tracer "datadog" }} - - --datadogAgentAddress - - "{{ .ProxyConfig.GetTracing.GetDatadog.GetAddress }}" -{{- end }} -{{- if .Values.global.proxy.logLevel }} - - --proxyLogLevel={{ .Values.global.proxy.logLevel }} -{{- end}} -{{- if .Values.global.proxy.componentLogLevel }} - - --proxyComponentLogLevel={{ .Values.global.proxy.componentLogLevel }} -{{- end}} - - --dnsRefreshRate - - {{ .Values.global.proxy.dnsRefreshRate }} - - --connectTimeout - - "{{ formatDuration .ProxyConfig.ConnectTimeout }}" -{{- if .Values.global.proxy.envoyStatsd.enabled }} - - --statsdUdpAddress - - "{{ .ProxyConfig.StatsdUdpAddress }}" -{{- end }} -{{- if .Values.global.proxy.envoyMetricsService.enabled }} - - --envoyMetricsServiceAddress - - "{{ .ProxyConfig.GetEnvoyMetricsService.GetAddress }}" -{{- end }} -{{- if .Values.global.proxy.envoyAccessLogService.enabled }} - - --envoyAccessLogService - - '{{ structToJSON .ProxyConfig.EnvoyAccessLogService }}' -{{- end }} - - --proxyAdminPort - - "{{ .ProxyConfig.ProxyAdminPort }}" - {{ if gt .ProxyConfig.Concurrency 0 -}} - - --concurrency - - "{{ .ProxyConfig.Concurrency }}" - {{ end -}} - - --controlPlaneAuthPolicy - - "{{ annotation .ObjectMeta `sidecar.istio.io/controlPlaneAuthPolicy` .ProxyConfig.ControlPlaneAuthPolicy }}" -{{- if (ne (annotation .ObjectMeta "status.sidecar.istio.io/port" .Values.global.proxy.statusPort) "0") }} - - --statusPort - - "{{ annotation .ObjectMeta `status.sidecar.istio.io/port` .Values.global.proxy.statusPort }}" - - --applicationPorts - - "{{ annotation .ObjectMeta `readiness.status.sidecar.istio.io/applicationPorts` (applicationPorts .Spec.Containers) }}" -{{- end }} -{{- if .Values.global.trustDomain }} - - --trust-domain={{ .Values.global.trustDomain }} -{{- end }} - env: - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: ISTIO_META_POD_PORTS - value: |- - [ - {{- range $index1, $c := .Spec.Containers }} - {{- range $index2, $p := $c.Ports }} - {{if or (ne $index1 0) (ne $index2 0)}},{{end}}{{ structToJSON $p }} - {{- end}} - {{- end}} - ] - - name: ISTIO_META_CLUSTER_ID - value: "{{ valueOrDefault .Values.global.multicluster.clusterName `Kubernetes` }}" - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: INSTANCE_IP - valueFrom: - fieldRef: - fieldPath: status.podIP - - name: SERVICE_ACCOUNT - valueFrom: - fieldRef: - fieldPath: spec.serviceAccountName -{{- if eq .Values.global.proxy.tracer "datadog" }} - - name: HOST_IP - valueFrom: - fieldRef: - fieldPath: status.hostIP -{{- if isset .ObjectMeta.Annotations `apm.datadoghq.com/env` }} -{{- range $key, $value := fromJSON (index .ObjectMeta.Annotations `apm.datadoghq.com/env`) }} - - name: {{ $key }} - value: "{{ $value }}" -{{- end }} -{{- end }} -{{- end }} - - name: ISTIO_META_POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: ISTIO_META_CONFIG_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: SDS_ENABLED - value: {{ $.Values.global.sds.enabled }} - - name: ISTIO_META_INTERCEPTION_MODE - value: "{{ or (index .ObjectMeta.Annotations `sidecar.istio.io/interceptionMode`) .ProxyConfig.InterceptionMode.String }}" - - name: ISTIO_META_INCLUDE_INBOUND_PORTS - value: "{{ annotation .ObjectMeta `traffic.sidecar.istio.io/includeInboundPorts` (applicationPorts .Spec.Containers) }}" - {{- if .Values.global.network }} - - name: ISTIO_META_NETWORK - value: "{{ .Values.global.network }}" - {{- end }} - {{ if .ObjectMeta.Annotations }} - - name: ISTIO_METAJSON_ANNOTATIONS - value: | - {{ toJSON .ObjectMeta.Annotations }} - {{ end }} - {{ if .ObjectMeta.Labels }} - - name: ISTIO_METAJSON_LABELS - value: | - {{ toJSON .ObjectMeta.Labels }} - {{ end }} - {{- if .DeploymentMeta.Name }} - - name: ISTIO_META_WORKLOAD_NAME - value: {{ .DeploymentMeta.Name }} - {{ end }} - {{- if and .TypeMeta.APIVersion .DeploymentMeta.Name }} - - name: ISTIO_META_OWNER - value: kubernetes://api/{{ .TypeMeta.APIVersion }}/namespaces/{{ valueOrDefault .DeploymentMeta.Namespace `default` }}/{{ toLower .TypeMeta.Kind}}s/{{ .DeploymentMeta.Name }} - {{- end}} - {{- if (isset .ObjectMeta.Annotations `sidecar.istio.io/bootstrapOverride`) }} - - name: ISTIO_BOOTSTRAP_OVERRIDE - value: "/etc/istio/custom-bootstrap/custom_bootstrap.json" - {{- end }} - {{- if .Values.global.sds.customTokenDirectory }} - - name: ISTIO_META_SDS_TOKEN_PATH - value: "{{ .Values.global.sds.customTokenDirectory -}}/sdstoken" - {{- end }} - {{- if .Values.global.meshID }} - - name: ISTIO_META_MESH_ID - value: "{{ .Values.global.meshID }}" - {{- else if .Values.global.trustDomain }} - - name: ISTIO_META_MESH_ID - value: "{{ .Values.global.trustDomain }}" - {{- end }} - imagePullPolicy: {{ .Values.global.imagePullPolicy }} - {{ if ne (annotation .ObjectMeta `status.sidecar.istio.io/port` .Values.global.proxy.statusPort) `0` }} - readinessProbe: - httpGet: - path: /healthz/ready - port: {{ annotation .ObjectMeta `status.sidecar.istio.io/port` .Values.global.proxy.statusPort }} - initialDelaySeconds: {{ annotation .ObjectMeta `readiness.status.sidecar.istio.io/initialDelaySeconds` .Values.global.proxy.readinessInitialDelaySeconds }} - periodSeconds: {{ annotation .ObjectMeta `readiness.status.sidecar.istio.io/periodSeconds` .Values.global.proxy.readinessPeriodSeconds }} - failureThreshold: {{ annotation .ObjectMeta `readiness.status.sidecar.istio.io/failureThreshold` .Values.global.proxy.readinessFailureThreshold }} - {{ end -}} - securityContext: - {{- if .Values.global.proxy.privileged }} - privileged: true - {{- end }} - {{- if ne .Values.global.proxy.enableCoreDump true }} - readOnlyRootFilesystem: true - {{- end }} - {{ if eq (annotation .ObjectMeta `sidecar.istio.io/interceptionMode` .ProxyConfig.InterceptionMode) `TPROXY` -}} - capabilities: - add: - - NET_ADMIN - runAsGroup: 1337 - {{ else -}} - {{ if .Values.global.sds.enabled }} - runAsGroup: 1337 - {{- end }} - runAsUser: 1337 - {{- end }} - resources: - {{ if or (isset .ObjectMeta.Annotations `sidecar.istio.io/proxyCPU`) (isset .ObjectMeta.Annotations `sidecar.istio.io/proxyMemory`) -}} - requests: - {{ if (isset .ObjectMeta.Annotations `sidecar.istio.io/proxyCPU`) -}} - cpu: "{{ index .ObjectMeta.Annotations `sidecar.istio.io/proxyCPU` }}" - {{ end}} - {{ if (isset .ObjectMeta.Annotations `sidecar.istio.io/proxyMemory`) -}} - memory: "{{ index .ObjectMeta.Annotations `sidecar.istio.io/proxyMemory` }}" - {{ end }} - {{ else -}} -{{- if .Values.global.proxy.resources }} - {{ toYaml .Values.global.proxy.resources | indent 4 }} -{{- end }} - {{ end -}} - volumeMounts: - {{ if (isset .ObjectMeta.Annotations `sidecar.istio.io/bootstrapOverride`) }} - - mountPath: /etc/istio/custom-bootstrap - name: custom-bootstrap-volume - {{- end }} - - mountPath: /etc/istio/proxy - name: istio-envoy - {{- if .Values.global.sds.enabled }} - - mountPath: /var/run/sds - name: sds-uds-path - readOnly: true - - mountPath: /var/run/secrets/tokens - name: istio-token - {{- if .Values.global.sds.customTokenDirectory }} - - mountPath: "{{ .Values.global.sds.customTokenDirectory -}}" - name: custom-sds-token - readOnly: true - {{- end }} - {{- else }} - - mountPath: /etc/certs/ - name: istio-certs - readOnly: true - {{- end }} - {{- if and (eq .Values.global.proxy.tracer "lightstep") .Values.global.tracer.lightstep.cacertPath }} - - mountPath: {{ directory .ProxyConfig.GetTracing.GetLightstep.GetCacertPath }} - name: lightstep-certs - readOnly: true - {{- end }} - {{- if isset .ObjectMeta.Annotations `sidecar.istio.io/userVolumeMount` }} - {{ range $index, $value := fromJSON (index .ObjectMeta.Annotations `sidecar.istio.io/userVolumeMount`) }} - - name: "{{ $index }}" - {{ toYaml $value | indent 4 }} - {{ end }} - {{- end }} -volumes: -{{- if (isset .ObjectMeta.Annotations `sidecar.istio.io/bootstrapOverride`) }} -- name: custom-bootstrap-volume - configMap: - name: {{ annotation .ObjectMeta `sidecar.istio.io/bootstrapOverride` "" }} -{{- end }} -- emptyDir: - medium: Memory - name: istio-envoy -{{- if .Values.global.sds.enabled }} -- name: sds-uds-path - hostPath: - path: /var/run/sds -- name: istio-token - projected: - sources: - - serviceAccountToken: - path: istio-token - expirationSeconds: 43200 - audience: {{ .Values.global.sds.token.aud }} -{{- if .Values.global.sds.customTokenDirectory }} -- name: custom-sds-token - secret: - secretName: sdstokensecret -{{- end }} -{{- else }} -- name: istio-certs - secret: - optional: true - {{ if eq .Spec.ServiceAccountName "" }} - secretName: istio.default - {{ else -}} - secretName: {{ printf "istio.%s" .Spec.ServiceAccountName }} - {{ end -}} - {{- if isset .ObjectMeta.Annotations `sidecar.istio.io/userVolume` }} - {{range $index, $value := fromJSON (index .ObjectMeta.Annotations `sidecar.istio.io/userVolume`) }} -- name: "{{ $index }}" - {{ toYaml $value | indent 2 }} - {{ end }} - {{ end }} -{{- end }} -{{- if and (eq .Values.global.proxy.tracer "lightstep") .Values.global.tracer.lightstep.cacertPath }} -- name: lightstep-certs - secret: - optional: true - secretName: lightstep.cacert -{{- end }} -{{- if .Values.global.podDNSSearchNamespaces }} -dnsConfig: - searches: - {{- range .Values.global.podDNSSearchNamespaces }} - - {{ render . }} - {{- end }} -{{- end }} -podRedirectAnnot: - sidecar.istio.io/interceptionMode: "{{ annotation .ObjectMeta `sidecar.istio.io/interceptionMode` .ProxyConfig.InterceptionMode }}" - traffic.sidecar.istio.io/includeOutboundIPRanges: "{{ annotation .ObjectMeta `traffic.sidecar.istio.io/includeOutboundIPRanges` .Values.global.proxy.includeIPRanges }}" - traffic.sidecar.istio.io/excludeOutboundIPRanges: "{{ annotation .ObjectMeta `traffic.sidecar.istio.io/excludeOutboundIPRanges` .Values.global.proxy.excludeIPRanges }}" - traffic.sidecar.istio.io/includeInboundPorts: "{{ annotation .ObjectMeta `traffic.sidecar.istio.io/includeInboundPorts` (includeInboundPorts .Spec.Containers) }}" - traffic.sidecar.istio.io/excludeInboundPorts: "{{ excludeInboundPort (annotation .ObjectMeta `status.sidecar.istio.io/port` .Values.global.proxy.statusPort) (annotation .ObjectMeta `traffic.sidecar.istio.io/excludeInboundPorts` .Values.global.proxy.excludeInboundPorts) }}" -{{ if or (isset .ObjectMeta.Annotations `traffic.sidecar.istio.io/excludeOutboundPorts`) (ne .Values.global.proxy.excludeOutboundPorts "") }} - traffic.sidecar.istio.io/excludeOutboundPorts: "{{ annotation .ObjectMeta `traffic.sidecar.istio.io/excludeOutboundPorts` .Values.global.proxy.excludeOutboundPorts }}" -{{- end }} - traffic.sidecar.istio.io/kubevirtInterfaces: "{{ index .ObjectMeta.Annotations `traffic.sidecar.istio.io/kubevirtInterfaces` }}" diff --git a/kubernetes/helm_charts/istio-system/istio/requirements.yaml b/kubernetes/helm_charts/istio-system/istio/requirements.yaml deleted file mode 100755 index 15d238103..000000000 --- a/kubernetes/helm_charts/istio-system/istio/requirements.yaml +++ /dev/null @@ -1,40 +0,0 @@ -dependencies: - - name: sidecarInjectorWebhook - version: 1.3.3 - condition: sidecarInjectorWebhook.enabled - - name: security - version: 1.3.3 - condition: security.enabled - - name: gateways - version: 1.3.3 - condition: gateways.enabled - - name: mixer - version: 1.3.3 - condition: or mixer.policy.enabled mixer.telemetry.enabled - - name: nodeagent - version: 1.3.3 - condition: nodeagent.enabled - - name: pilot - version: 1.3.3 - condition: pilot.enabled - - name: grafana - version: 1.3.3 - condition: grafana.enabled - - name: prometheus - version: 1.3.3 - condition: prometheus.enabled - - name: tracing - version: 1.3.3 - condition: tracing.enabled - - name: galley - version: 1.3.3 - condition: galley.enabled - - name: kiali - version: 1.3.3 - condition: kiali.enabled - - name: istiocoredns - version: 1.3.3 - condition: istiocoredns.enabled - - name: certmanager - version: 1.3.3 - condition: certmanager.enabled diff --git a/kubernetes/helm_charts/istio-system/istio/templates/NOTES.txt b/kubernetes/helm_charts/istio-system/istio/templates/NOTES.txt deleted file mode 100755 index 3b323594c..000000000 --- a/kubernetes/helm_charts/istio-system/istio/templates/NOTES.txt +++ /dev/null @@ -1,29 +0,0 @@ -Thank you for installing {{ .Chart.Name | title }}. - -Your release is named {{ .Release.Name | title }}. - -To get started running application with Istio, execute the following steps: - -{{- if index .Values "sidecarInjectorWebhook" "enabled" }} -1. Label namespace that application object will be deployed to by the following command (take default namespace as an example) - -$ kubectl label namespace default istio-injection=enabled -$ kubectl get namespace -L istio-injection - -2. Deploy your applications - -$ kubectl apply -f .yaml -{{- else }} -1. Download the latest release package to get sidecar injection tool - -$ curl -L https://git.io/getLatestIstio | sh - -$ mv istio-* istio-latest -$ export PATH="$PATH:$PWD/istio-latest/bin" - -2. Deploy your application by manually injecting envoy sidecar with `istioctl kube-inject` - -$ kubectl apply -f <(istioctl kube-inject -f .yaml) -{{- end }} - -For more information on running Istio, visit: -https://istio.io/ diff --git a/kubernetes/helm_charts/istio-system/istio/templates/_affinity.tpl b/kubernetes/helm_charts/istio-system/istio/templates/_affinity.tpl deleted file mode 100755 index 7639be434..000000000 --- a/kubernetes/helm_charts/istio-system/istio/templates/_affinity.tpl +++ /dev/null @@ -1,93 +0,0 @@ -{{/* affinity - https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ */}} - -{{- define "nodeaffinity" }} - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - {{- include "nodeAffinityRequiredDuringScheduling" . }} - preferredDuringSchedulingIgnoredDuringExecution: - {{- include "nodeAffinityPreferredDuringScheduling" . }} -{{- end }} - -{{- define "nodeAffinityRequiredDuringScheduling" }} - nodeSelectorTerms: - - matchExpressions: - - key: beta.kubernetes.io/arch - operator: In - values: - {{- range $key, $val := .Values.global.arch }} - {{- if gt ($val | int) 0 }} - - {{ $key | quote }} - {{- end }} - {{- end }} - {{- $nodeSelector := default .Values.global.defaultNodeSelector .Values.nodeSelector -}} - {{- range $key, $val := $nodeSelector }} - - key: {{ $key }} - operator: In - values: - - {{ $val | quote }} - {{- end }} -{{- end }} - -{{- define "nodeAffinityPreferredDuringScheduling" }} - {{- range $key, $val := .Values.global.arch }} - {{- if gt ($val | int) 0 }} - - weight: {{ $val | int }} - preference: - matchExpressions: - - key: beta.kubernetes.io/arch - operator: In - values: - - {{ $key | quote }} - {{- end }} - {{- end }} -{{- end }} - -{{- define "podAntiAffinity" }} -{{- if or .Values.podAntiAffinityLabelSelector .Values.podAntiAffinityTermLabelSelector}} - podAntiAffinity: - {{- if .Values.podAntiAffinityLabelSelector }} - requiredDuringSchedulingIgnoredDuringExecution: - {{- include "podAntiAffinityRequiredDuringScheduling" . }} - {{- end }} - {{- if or .Values.podAntiAffinityTermLabelSelector}} - preferredDuringSchedulingIgnoredDuringExecution: - {{- include "podAntiAffinityPreferredDuringScheduling" . }} - {{- end }} -{{- end }} -{{- end }} - -{{- define "podAntiAffinityRequiredDuringScheduling" }} - {{- range $index, $item := .Values.podAntiAffinityLabelSelector }} - - labelSelector: - matchExpressions: - - key: {{ $item.key }} - operator: {{ $item.operator }} - {{- if $item.values }} - values: - {{- $vals := split "," $item.values }} - {{- range $i, $v := $vals }} - - {{ $v | quote }} - {{- end }} - {{- end }} - topologyKey: {{ $item.topologyKey }} - {{- end }} -{{- end }} - -{{- define "podAntiAffinityPreferredDuringScheduling" }} - {{- range $index, $item := .Values.podAntiAffinityTermLabelSelector }} - - podAffinityTerm: - labelSelector: - matchExpressions: - - key: {{ $item.key }} - operator: {{ $item.operator }} - {{- if $item.values }} - values: - {{- $vals := split "," $item.values }} - {{- range $i, $v := $vals }} - - {{ $v | quote }} - {{- end }} - {{- end }} - topologyKey: {{ $item.topologyKey }} - weight: 100 - {{- end }} -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/templates/_helpers.tpl b/kubernetes/helm_charts/istio-system/istio/templates/_helpers.tpl deleted file mode 100755 index f79bea415..000000000 --- a/kubernetes/helm_charts/istio-system/istio/templates/_helpers.tpl +++ /dev/null @@ -1,46 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "istio.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "istio.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "istio.chart" -}} -{{- .Chart.Name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a fully qualified configmap name. -*/}} -{{- define "istio.configmap.fullname" -}} -{{- printf "%s-%s" .Release.Name "istio-mesh-config" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Configmap checksum. -*/}} -{{- define "istio.configmap.checksum" -}} -{{- print $.Template.BasePath "/configmap.yaml" | sha256sum -}} -{{- end -}} diff --git a/kubernetes/helm_charts/istio-system/istio/templates/_podDisruptionBudget.tpl b/kubernetes/helm_charts/istio-system/istio/templates/_podDisruptionBudget.tpl deleted file mode 100755 index ebb86068c..000000000 --- a/kubernetes/helm_charts/istio-system/istio/templates/_podDisruptionBudget.tpl +++ /dev/null @@ -1,3 +0,0 @@ -{{- define "podDisruptionBudget.spec" }} - minAvailable: 1 -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/templates/clusterrole.yaml b/kubernetes/helm_charts/istio-system/istio/templates/clusterrole.yaml deleted file mode 100755 index b92c9ef8b..000000000 --- a/kubernetes/helm_charts/istio-system/istio/templates/clusterrole.yaml +++ /dev/null @@ -1,11 +0,0 @@ -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: istio-reader -rules: - - apiGroups: [''] - resources: ['nodes', 'pods', 'services', 'endpoints', "replicationcontrollers"] - verbs: ['get', 'watch', 'list'] - - apiGroups: ["extensions", "apps"] - resources: ["replicasets"] - verbs: ["get", "list", "watch"] diff --git a/kubernetes/helm_charts/istio-system/istio/templates/clusterrolebinding.yaml b/kubernetes/helm_charts/istio-system/istio/templates/clusterrolebinding.yaml deleted file mode 100755 index 827601b3d..000000000 --- a/kubernetes/helm_charts/istio-system/istio/templates/clusterrolebinding.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: istio-multi - labels: - chart: {{ .Chart.Name }}-{{ .Chart.Version }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: istio-reader -subjects: -- kind: ServiceAccount - name: istio-multi - namespace: {{ .Release.Namespace }} diff --git a/kubernetes/helm_charts/istio-system/istio/templates/configmap.yaml b/kubernetes/helm_charts/istio-system/istio/templates/configmap.yaml deleted file mode 100755 index 063f2aa76..000000000 --- a/kubernetes/helm_charts/istio-system/istio/templates/configmap.yaml +++ /dev/null @@ -1,307 +0,0 @@ -{{- if or .Values.pilot.enabled .Values.global.istioRemote }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: istio - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "istio.name" . }} - chart: {{ template "istio.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -data: - mesh: |- - # Set the following variable to true to disable policy checks by the Mixer. - # Note that metrics will still be reported to the Mixer. - {{- if .Values.mixer.policy.enabled }} - disablePolicyChecks: {{ .Values.global.disablePolicyChecks }} - {{- else }} - disablePolicyChecks: true - {{- end }} - - {{- if .Values.mixer.telemetry.reportBatchMaxEntries }} - # reportBatchMaxEntries is the number of requests that are batched before telemetry data is sent to the mixer server - reportBatchMaxEntries: {{ .Values.mixer.telemetry.reportBatchMaxEntries }} - {{- end }} - - {{- if .Values.mixer.telemetry.reportBatchMaxTime }} - # reportBatchMaxTime is the max waiting time before the telemetry data of a request is sent to the mixer server - reportBatchMaxTime: {{ .Values.mixer.telemetry.reportBatchMaxTime }} - {{- end }} - - {{- if .Values.mixer.telemetry.sessionAffinityEnabled }} - # sidecarToTelemetrySessionAffinity will create a STRICT_DNS type cluster for istio-telemetry. - sidecarToTelemetrySessionAffinity: {{ .Values.mixer.telemetry.sessionAffinityEnabled }} - {{- end }} - - # Set enableTracing to false to disable request tracing. - enableTracing: {{ .Values.global.enableTracing }} - - # Set accessLogFile to empty string to disable access log. - accessLogFile: "{{ .Values.global.proxy.accessLogFile }}" - - # If accessLogEncoding is TEXT, value will be used directly as the log format - # example: "[%START_TIME%] %REQ(:METHOD)% %REQ(X-ENVOY-ORIGINAL-PATH?:PATH)% %PROTOCOL%\n" - # If AccessLogEncoding is JSON, value will be parsed as map[string]string - # example: '{"start_time": "%START_TIME%", "req_method": "%REQ(:METHOD)%"}' - # Leave empty to use default log format - accessLogFormat: {{ .Values.global.proxy.accessLogFormat | quote }} - - # Set accessLogEncoding to JSON or TEXT to configure sidecar access log - accessLogEncoding: '{{ .Values.global.proxy.accessLogEncoding }}' - - enableEnvoyAccessLogService: {{ .Values.global.proxy.envoyAccessLogService.enabled }} - - {{- if .Values.global.istioRemote }} - - {{- if .Values.global.remotePolicyAddress }} - {{- if .Values.global.createRemoteSvcEndpoints }} - mixerCheckServer: istio-policy.{{ .Release.Namespace }}:15004 - {{- else }} - mixerCheckServer: {{ .Values.global.remotePolicyAddress }}:15004 - {{- end }} - {{- end }} - {{- if .Values.global.remoteTelemetryAddress }} - {{- if .Values.global.createRemoteSvcEndpoints }} - mixerReportServer: istio-telemetry.{{ .Release.Namespace }}:15004 - {{- else }} - mixerReportServer: {{ .Values.global.remoteTelemetryAddress }}:15004 - {{- end }} - {{- end }} - - {{- else }} - - {{- if .Values.mixer.policy.enabled }} - {{- if .Values.global.controlPlaneSecurityEnabled }} - mixerCheckServer: istio-policy.{{ .Release.Namespace }}.svc.{{ .Values.global.proxy.clusterDomain }}:15004 - {{- else }} - mixerCheckServer: istio-policy.{{ .Release.Namespace }}.svc.{{ .Values.global.proxy.clusterDomain }}:9091 - {{- end }} - {{- end }} - {{- if .Values.mixer.telemetry.enabled }} - {{- if .Values.global.controlPlaneSecurityEnabled }} - mixerReportServer: istio-telemetry.{{ .Release.Namespace }}.svc.{{ .Values.global.proxy.clusterDomain }}:15004 - {{- else }} - mixerReportServer: istio-telemetry.{{ .Release.Namespace }}.svc.{{ .Values.global.proxy.clusterDomain }}:9091 - {{- end }} - {{- end }} - - {{- end }} - - {{- if or .Values.mixer.policy.enabled (and .Values.global.istioRemote .Values.global.remotePolicyAddress) }} - # policyCheckFailOpen allows traffic in cases when the mixer policy service cannot be reached. - # Default is false which means the traffic is denied when the client is unable to connect to Mixer. - policyCheckFailOpen: {{ .Values.global.policyCheckFailOpen }} - {{- end }} - - {{- if .Values.gateways.enabled }} - # Let Pilot give ingresses the public IP of the Istio ingressgateway - ingressService: istio-ingressgateway - {{- end }} - - # Default connect timeout for dynamic clusters generated by Pilot and returned via XDS - connectTimeout: 10s - - # Automatic protocol detection uses a set of heuristics to - # determine whether the connection is using TLS or not (on the - # server side), as well as the application protocol being used - # (e.g., http vs tcp). These heuristics rely on the client sending - # the first bits of data. For server first protocols like MySQL, - # MongoDB, etc., Envoy will timeout on the protocol detection after - # the specified period, defaulting to non mTLS plain TCP - # traffic. Set this field to tweak the period that Envoy will wait - # for the client to send the first bits of data. (MUST BE >=1ms) - protocolDetectionTimeout: {{ .Values.global.proxy.protocolDetectionTimeout }} - - # DNS refresh rate for Envoy clusters of type STRICT_DNS - dnsRefreshRate: {{ .Values.global.proxy.dnsRefreshRate }} - - # Unix Domain Socket through which envoy communicates with NodeAgent SDS to get - # key/cert for mTLS. Use secret-mount files instead of SDS if set to empty. - sdsUdsPath: {{ .Values.global.sds.udsPath | quote }} - - # The trust domain corresponds to the trust root of a system. - # Refer to https://github.com/spiffe/spiffe/blob/master/standards/SPIFFE-ID.md#21-trust-domain - trustDomain: {{ .Values.global.trustDomain | quote }} - - # Set the default behavior of the sidecar for handling outbound traffic from the application: - # ALLOW_ANY - outbound traffic to unknown destinations will be allowed, in case there are no - # services or ServiceEntries for the destination port - # REGISTRY_ONLY - restrict outbound traffic to services defined in the service registry as well - # as those defined through ServiceEntries - outboundTrafficPolicy: - mode: {{ .Values.global.outboundTrafficPolicy.mode }} - - {{- if .Values.global.localityLbSetting.enabled }} - localityLbSetting: -{{ toYaml .Values.global.localityLbSetting | trim | indent 6 }} - {{- end }} - # The namespace to treat as the administrative root namespace for istio - # configuration. -{{- if .Values.global.configRootNamespace }} - rootNamespace: {{ .Values.global.configRootNamespace }} -{{- else }} - rootNamespace: {{ .Release.Namespace }} -{{- end }} - - {{- if .Values.global.defaultConfigVisibilitySettings }} - defaultServiceExportTo: - {{- range .Values.global.defaultConfigVisibilitySettings }} - - {{ . | quote }} - {{- end }} - defaultVirtualServiceExportTo: - {{- range .Values.global.defaultConfigVisibilitySettings }} - - {{ . | quote }} - {{- end }} - defaultDestinationRuleExportTo: - {{- range .Values.global.defaultConfigVisibilitySettings }} - - {{ . | quote }} - {{- end }} - {{- end }} - - {{- if $.Values.global.useMCP }} - configSources: - - address: istio-galley.{{ $.Release.Namespace }}.svc:9901 - {{- if $.Values.global.controlPlaneSecurityEnabled}} - tlsSettings: - mode: ISTIO_MUTUAL - {{- end }} - {{- end }} - - defaultConfig: - # - # TCP connection timeout between Envoy & the application, and between Envoys. Used for static clusters - # defined in Envoy's configuration file - connectTimeout: 10s - # - ### ADVANCED SETTINGS ############# - # Where should envoy's configuration be stored in the istio-proxy container - configPath: "/etc/istio/proxy" - binaryPath: "/usr/local/bin/envoy" - # The pseudo service name used for Envoy. - serviceCluster: istio-proxy - # These settings that determine how long an old Envoy - # process should be kept alive after an occasional reload. - drainDuration: 45s - parentShutdownDuration: 1m0s - # - # The mode used to redirect inbound connections to Envoy. This setting - # has no effect on outbound traffic: iptables REDIRECT is always used for - # outbound connections. - # If "REDIRECT", use iptables REDIRECT to NAT and redirect to Envoy. - # The "REDIRECT" mode loses source addresses during redirection. - # If "TPROXY", use iptables TPROXY to redirect to Envoy. - # The "TPROXY" mode preserves both the source and destination IP - # addresses and ports, so that they can be used for advanced filtering - # and manipulation. - # The "TPROXY" mode also configures the sidecar to run with the - # CAP_NET_ADMIN capability, which is required to use TPROXY. - #interceptionMode: REDIRECT - # - # Port where Envoy listens (on local host) for admin commands - # You can exec into the istio-proxy container in a pod and - # curl the admin port (curl http://localhost:15000/) to obtain - # diagnostic information from Envoy. See - # https://lyft.github.io/envoy/docs/operations/admin.html - # for more details - proxyAdminPort: 15000 - # - # Set concurrency to a specific number to control the number of Proxy worker threads. - # If set to 0 (default), then start worker thread for each CPU thread/core. - concurrency: {{ .Values.global.proxy.concurrency }} - # - {{- if eq .Values.global.proxy.tracer "lightstep" }} - tracing: - lightstep: - # Address of the LightStep Satellite pool - address: {{ .Values.global.tracer.lightstep.address }} - # Access Token used to communicate with the Satellite pool - accessToken: {{ .Values.global.tracer.lightstep.accessToken }} - # Whether communication with the Satellite pool should be secure - secure: {{ .Values.global.tracer.lightstep.secure }} - # Path to the file containing the cacert to use when verifying TLS - cacertPath: {{ .Values.global.tracer.lightstep.cacertPath }} - {{- else if eq .Values.global.proxy.tracer "zipkin" }} - tracing: - zipkin: - # Address of the Zipkin collector - {{- if .Values.global.tracer.zipkin.address }} - address: {{ .Values.global.tracer.zipkin.address }} - {{- else if .Values.global.remoteZipkinAddress }} - address: {{ .Values.global.remoteZipkinAddress }}:9411 - {{- else }} - address: zipkin.{{ .Release.Namespace }}:9411 - {{- end }} - {{- else if eq .Values.global.proxy.tracer "datadog" }} - tracing: - datadog: - # Address of the Datadog Agent - address: {{ .Values.global.tracer.datadog.address }} - {{- else if eq .Values.global.proxy.tracer "stackdriver" }} - tracing: - stackdriver: {} - {{- end }} - - {{- if .Values.global.proxy.envoyStatsd.enabled }} - # - # Statsd metrics collector converts statsd metrics into Prometheus metrics. - statsdUdpAddress: {{ .Values.global.proxy.envoyStatsd.host }}:{{ .Values.global.proxy.envoyStatsd.port }} - {{- end }} - - {{- if .Values.global.proxy.envoyMetricsService.enabled }} - # - # Envoy's Metrics Service stats sink pushes Envoy metrics to a remote collector via the Metrics Service gRPC API. - envoyMetricsService: - address: {{ .Values.global.proxy.envoyMetricsService.host }}:{{ .Values.global.proxy.envoyMetricsService.port }} - {{- end}} - - {{- if .Values.global.proxy.envoyAccessLogService.enabled }} - # - # Envoy's AccessLog Service pushes access logs to a remote collector via the Access Log Service gRPC API. - envoyAccessLogService: - address: {{ .Values.global.proxy.envoyAccessLogService.host }}:{{ .Values.global.proxy.envoyAccessLogService.port }} - {{- if .Values.global.proxy.envoyAccessLogService.tlsSettings }} - tlsSettings: -{{ toYaml .Values.global.proxy.envoyAccessLogService.tlsSettings | indent 10 }} - {{- end}} - {{- if .Values.global.proxy.envoyAccessLogService.tcpKeepalive }} - tcpKeepalive: -{{ toYaml .Values.global.proxy.envoyAccessLogService.tcpKeepalive | indent 10 }} - {{- end}} - {{- end}} - - {{- $defPilotHostname := printf "istio-pilot.%s" .Release.Namespace }} - {{- $pilotAddress := .Values.global.remotePilotAddress | default $defPilotHostname }} - {{- if .Values.global.controlPlaneSecurityEnabled }} - # - # Mutual TLS authentication between sidecars and istio control plane. - controlPlaneAuthPolicy: MUTUAL_TLS - # - # Address where istio Pilot service is running - {{- if or .Values.global.remotePilotCreateSvcEndpoint .Values.global.createRemoteSvcEndpoints }} - discoveryAddress: {{ $defPilotHostname }}:15011 - {{- else }} - discoveryAddress: {{ $pilotAddress }}:15011 - {{- end }} - {{- else }} - # - # Mutual TLS authentication between sidecars and istio control plane. - controlPlaneAuthPolicy: NONE - # - # Address where istio Pilot service is running - {{- if or .Values.global.remotePilotCreateSvcEndpoint .Values.global.createRemoteSvcEndpoints }} - discoveryAddress: {{ $defPilotHostname }}:15010 - {{- else }} - discoveryAddress: {{ $pilotAddress }}:15010 - {{- end }} - {{- end }} - - # Configuration file for the mesh networks to be used by the Split Horizon EDS. - meshNetworks: |- - {{- if .Values.global.meshNetworks }} - networks: -{{ toYaml .Values.global.meshNetworks | indent 6 }} - {{- else }} - networks: {} - {{- end }} -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/templates/endpoints.yaml b/kubernetes/helm_charts/istio-system/istio/templates/endpoints.yaml deleted file mode 100755 index 81b821853..000000000 --- a/kubernetes/helm_charts/istio-system/istio/templates/endpoints.yaml +++ /dev/null @@ -1,63 +0,0 @@ -{{- if or .Values.global.remotePilotCreateSvcEndpoint .Values.global.createRemoteSvcEndpoints }} -apiVersion: v1 -kind: Endpoints -metadata: - name: istio-pilot - namespace: {{ .Release.Namespace }} -subsets: -- addresses: - - ip: {{ .Values.global.remotePilotAddress }} - ports: - - port: 15003 - name: http-old-discovery # mTLS or non-mTLS depending on auth setting - - port: 15005 - name: https-discovery # always mTLS - - port: 15007 - name: http-discovery # always plain-text - - port: 15010 - name: grpc-xds # direct - - port: 15011 - name: https-xds # mTLS or non-mTLS depending on auth setting - - port: 8080 - name: http-legacy-discovery # direct - - port: 15014 - name: http-monitoring -{{- end }} -{{- if and .Values.global.remotePolicyAddress .Values.global.createRemoteSvcEndpoints }} ---- -apiVersion: v1 -kind: Endpoints -metadata: - name: istio-policy - namespace: {{ .Release.Namespace }} -subsets: -- addresses: - - ip: {{ .Values.global.remotePolicyAddress }} - ports: - - name: grpc-mixer - port: 9091 - - name: grpc-mixer-mtls - port: 15004 - - name: http-monitoring - port: 15014 -{{- end }} -{{- if and .Values.global.remoteTelemetryAddress .Values.global.createRemoteSvcEndpoints }} ---- -apiVersion: v1 -kind: Endpoints -metadata: - name: istio-telemetry - namespace: {{ .Release.Namespace }} -subsets: -- addresses: - - ip: {{ .Values.global.remoteTelemetryAddress }} - ports: - - name: grpc-mixer - port: 9091 - - name: grpc-mixer-mtls - port: 15004 - - name: http-monitoring - port: 15014 - - name: prometheus - port: 42422 -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/templates/install-custom-resources.sh.tpl b/kubernetes/helm_charts/istio-system/istio/templates/install-custom-resources.sh.tpl deleted file mode 100755 index a5525a139..000000000 --- a/kubernetes/helm_charts/istio-system/istio/templates/install-custom-resources.sh.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{ define "install-custom-resources.sh.tpl" }} -#!/bin/sh - -set -x - -if [ "$#" -ne "1" ]; then - echo "first argument should be path to custom resource yaml" - exit 1 -fi - -pathToResourceYAML=${1} - -kubectl get validatingwebhookconfiguration istio-galley 2>/dev/null -if [ "$?" -eq 0 ]; then - echo "istio-galley validatingwebhookconfiguration found - waiting for istio-galley deployment to be ready" - while true; do - kubectl -n {{ .Release.Namespace }} get deployment istio-galley 2>/dev/null - if [ "$?" -eq 0 ]; then - break - fi - sleep 1 - done - kubectl -n {{ .Release.Namespace }} rollout status deployment istio-galley - if [ "$?" -ne 0 ]; then - echo "istio-galley deployment rollout status check failed" - exit 1 - fi - echo "istio-galley deployment ready for configuration validation" -fi -sleep 5 -kubectl apply -f ${pathToResourceYAML} -{{ end }} diff --git a/kubernetes/helm_charts/istio-system/istio/templates/service.yaml b/kubernetes/helm_charts/istio-system/istio/templates/service.yaml deleted file mode 100755 index 732cdefd2..000000000 --- a/kubernetes/helm_charts/istio-system/istio/templates/service.yaml +++ /dev/null @@ -1,60 +0,0 @@ -{{- if or .Values.global.remotePilotCreateSvcEndpoint .Values.global.createRemoteSvcEndpoints }} -apiVersion: v1 -kind: Service -metadata: - name: istio-pilot - namespace: {{ .Release.Namespace }} -spec: - ports: - - port: 15003 - name: http-old-discovery # mTLS or non-mTLS depending on auth setting - - port: 15005 - name: https-discovery # always mTLS - - port: 15007 - name: http-discovery # always plain-text - - port: 15010 - name: grpc-xds # direct - - port: 15011 - name: https-xds # mTLS or non-mTLS depending on auth setting - - port: 8080 - name: http-legacy-discovery # direct - - port: 15014 - name: http-monitoring - clusterIP: None -{{- end }} -{{- if and .Values.global.remotePolicyAddress .Values.global.createRemoteSvcEndpoints }} ---- -apiVersion: v1 -kind: Service -metadata: - name: istio-policy - namespace: {{ .Release.Namespace }} -spec: - ports: - - name: grpc-mixer - port: 9091 - - name: grpc-mixer-mtls - port: 15004 - - name: http-monitoring - port: 15014 - clusterIP: None -{{- end }} -{{- if and .Values.global.remoteTelemetryAddress .Values.global.createRemoteSvcEndpoints }} ---- -apiVersion: v1 -kind: Service -metadata: - name: istio-telemetry - namespace: {{ .Release.Namespace }} -spec: - ports: - - name: grpc-mixer - port: 9091 - - name: grpc-mixer-mtls - port: 15004 - - name: http-monitoring - port: 15014 - - name: prometheus - port: 42422 - clusterIP: None -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/templates/serviceaccount.yaml b/kubernetes/helm_charts/istio-system/istio/templates/serviceaccount.yaml deleted file mode 100755 index e52d9eb9c..000000000 --- a/kubernetes/helm_charts/istio-system/istio/templates/serviceaccount.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: istio-multi - namespace: {{ .Release.Namespace }} diff --git a/kubernetes/helm_charts/istio-system/istio/templates/sidecar-injector-configmap.yaml b/kubernetes/helm_charts/istio-system/istio/templates/sidecar-injector-configmap.yaml deleted file mode 100755 index 135b7fbad..000000000 --- a/kubernetes/helm_charts/istio-system/istio/templates/sidecar-injector-configmap.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{- if not .Values.global.omitSidecarInjectorConfigMap }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: istio-sidecar-injector - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "istio.name" . }} - chart: {{ template "istio.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - istio: sidecar-injector -data: - values: |- - {{ .Values | toJson }} - - config: |- - policy: {{ .Values.global.proxy.autoInject }} - alwaysInjectSelector: -{{ toYaml .Values.sidecarInjectorWebhook.alwaysInjectSelector | trim | indent 6 }} - neverInjectSelector: -{{ toYaml .Values.sidecarInjectorWebhook.neverInjectSelector | trim | indent 6 }} - template: |- -{{ .Files.Get "files/injection-template.yaml" | trim | indent 6 }} -{{- end }} diff --git a/kubernetes/helm_charts/istio-system/istio/values-istio-demo-auth.yaml b/kubernetes/helm_charts/istio-system/istio/values-istio-demo-auth.yaml deleted file mode 100755 index 76abed3a0..000000000 --- a/kubernetes/helm_charts/istio-system/istio/values-istio-demo-auth.yaml +++ /dev/null @@ -1,87 +0,0 @@ -# This is used to generate minimal demo mode. It is included from demo and demo-auth values. -# It is shipped with the release, used for bookinfo or quick installation of istio. -# Includes components used in the demo, defaults to alpha3 rules. -# Note: please only put common configuration for the demo profiles here. -global: - proxy: - accessLogFile: "/dev/stdout" - resources: - requests: - cpu: 10m - memory: 40Mi - - disablePolicyChecks: false - -sidecarInjectorWebhook: - enabled: true - # If true, webhook or istioctl injector will rewrite PodSpec for liveness - # health check to redirect request to sidecar. This makes liveness check work - # even when mTLS is enabled. - rewriteAppHTTPProbe: false - -pilot: - autoscaleEnabled: false - traceSampling: 100.0 - resources: - requests: - cpu: 10m - memory: 100Mi - -mixer: - policy: - enabled: true - autoscaleEnabled: false - resources: - requests: - cpu: 10m - memory: 100Mi - - telemetry: - enabled: true - autoscaleEnabled: false - resources: - requests: - cpu: 50m - memory: 100Mi - - adapters: - stdio: - enabled: true - -grafana: - enabled: true - -tracing: - enabled: true - -kiali: - enabled: true - createDemoSecret: true - -gateways: - istio-ingressgateway: - autoscaleEnabled: false - resources: - requests: - cpu: 10m - memory: 40Mi - - istio-egressgateway: - enabled: true - autoscaleEnabled: false - resources: - requests: - cpu: 10m - memory: 40Mi -# This is used to generate istio-auth.yaml for minimal, demo mode with MTLS enabled. -# It is shipped with the release, used for bookinfo or quick installation of istio. -# Includes components used in the demo, defaults to alpha3 rules. - -# @include -global: - controlPlaneSecurityEnabled: true - - mtls: - # Default setting for service-to-service mtls. Can be set explicitly using - # destination rules or service annotations. - enabled: true diff --git a/kubernetes/helm_charts/istio-system/istio/values-istio-demo.yaml b/kubernetes/helm_charts/istio-system/istio/values-istio-demo.yaml deleted file mode 100755 index 2a9bf89c6..000000000 --- a/kubernetes/helm_charts/istio-system/istio/values-istio-demo.yaml +++ /dev/null @@ -1,88 +0,0 @@ -# This is used to generate minimal demo mode. It is included from demo and demo-auth values. -# It is shipped with the release, used for bookinfo or quick installation of istio. -# Includes components used in the demo, defaults to alpha3 rules. -# Note: please only put common configuration for the demo profiles here. -global: - proxy: - accessLogFile: "/dev/stdout" - resources: - requests: - cpu: 10m - memory: 40Mi - - disablePolicyChecks: false - -sidecarInjectorWebhook: - enabled: true - # If true, webhook or istioctl injector will rewrite PodSpec for liveness - # health check to redirect request to sidecar. This makes liveness check work - # even when mTLS is enabled. - rewriteAppHTTPProbe: false - -pilot: - autoscaleEnabled: false - traceSampling: 100.0 - resources: - requests: - cpu: 10m - memory: 100Mi - -mixer: - policy: - enabled: true - autoscaleEnabled: false - resources: - requests: - cpu: 10m - memory: 100Mi - - telemetry: - enabled: true - autoscaleEnabled: false - resources: - requests: - cpu: 50m - memory: 100Mi - - adapters: - stdio: - enabled: true - -grafana: - enabled: true - -tracing: - enabled: true - -kiali: - enabled: true - createDemoSecret: true - -gateways: - istio-ingressgateway: - autoscaleEnabled: false - resources: - requests: - cpu: 10m - memory: 40Mi - - istio-egressgateway: - enabled: true - autoscaleEnabled: false - resources: - requests: - cpu: 10m - memory: 40Mi -# This is used to generate istio.yaml for minimal, demo mode. -# It is shipped with the release, used for bookinfo or quick installation of istio. -# Includes components used in the demo, defaults to alpha3 rules. - -# @include -# -global: - controlPlaneSecurityEnabled: false - - mtls: - # Default setting for service-to-service mtls. Can be set explicitly using - # destination rules or service annotations. - enabled: false diff --git a/kubernetes/helm_charts/istio-system/istio/values-istio-minimal.yaml b/kubernetes/helm_charts/istio-system/istio/values-istio-minimal.yaml deleted file mode 100755 index de45fa458..000000000 --- a/kubernetes/helm_charts/istio-system/istio/values-istio-minimal.yaml +++ /dev/null @@ -1,46 +0,0 @@ -# -# Minimal Istio Configuration: https://istio.io/docs/setup/kubernetes/additional-setup/config-profiles/ -# -pilot: - enabled: true - sidecar: false - -gateways: - enabled: false - -security: - enabled: false - -sidecarInjectorWebhook: - enabled: false - -galley: - enabled: false - -mixer: - policy: - enabled: false - telemetry: - enabled: false - -prometheus: - enabled: false - - -# Common settings. -global: - - proxy: - # Sets the destination Statsd in envoy (the value of the "--statsdUdpAddress" proxy argument - # would be :). - # Disabled by default. - # The istio-statsd-prom-bridge is deprecated and should not be used moving forward. - envoyStatsd: - # If enabled is set to true, host and port must also be provided. Istio no longer provides a statsd collector. - enabled: false - host: # example: statsd-svc.istio-system - port: # example: 9125 - - useMCP: false - - diff --git a/kubernetes/helm_charts/istio-system/istio/values-istio-remote.yaml b/kubernetes/helm_charts/istio-system/istio/values-istio-remote.yaml deleted file mode 100755 index 20fe2ac3d..000000000 --- a/kubernetes/helm_charts/istio-system/istio/values-istio-remote.yaml +++ /dev/null @@ -1,34 +0,0 @@ -gateways: - enabled: false - -galley: - enabled: false - -mixer: - policy: - enabled: false - telemetry: - enabled: false - -pilot: - enabled: false - -security: - enabled: true - createMeshPolicy: false - -prometheus: - enabled: false - -global: - istioRemote: true - - enableTracing: false - - # Sets an identifier for the remote network to be used for Split Horizon EDS. The network will be sent - # to the Pilot when connected by the sidecar and will affect the results returned in EDS requests. - # Based on the network identifier Pilot will return all local endpoints + endpoints of gateways to - # other networks. - # - # Must match the names in the meshNetworks section in the Istio local. - network: "" diff --git a/kubernetes/helm_charts/istio-system/istio/values-istio-sds-auth-control-plane-auth-disabled.yaml b/kubernetes/helm_charts/istio-system/istio/values-istio-sds-auth-control-plane-auth-disabled.yaml deleted file mode 100755 index 6144aff24..000000000 --- a/kubernetes/helm_charts/istio-system/istio/values-istio-sds-auth-control-plane-auth-disabled.yaml +++ /dev/null @@ -1,21 +0,0 @@ -global: - controlPlaneSecurityEnabled: false - - mtls: - # Default setting for service-to-service mtls. Can be set explicitly using - # destination rules or service annotations. - enabled: true - - sds: - enabled: true - udsPath: "unix:/var/run/sds/uds_path" - token: - aud: "istio-ca" - -nodeagent: - enabled: true - image: node-agent-k8s - env: - CA_PROVIDER: "Citadel" - CA_ADDR: "istio-citadel:8060" - VALID_TOKEN: true diff --git a/kubernetes/helm_charts/istio-system/istio/values-istio-sds-auth.yaml b/kubernetes/helm_charts/istio-system/istio/values-istio-sds-auth.yaml deleted file mode 100755 index d6b8c65d4..000000000 --- a/kubernetes/helm_charts/istio-system/istio/values-istio-sds-auth.yaml +++ /dev/null @@ -1,21 +0,0 @@ -global: - controlPlaneSecurityEnabled: true - - mtls: - # Default setting for service-to-service mtls. Can be set explicitly using - # destination rules or service annotations. - enabled: true - - sds: - enabled: true - udsPath: "unix:/var/run/sds/uds_path" - token: - aud: "istio-ca" - -nodeagent: - enabled: true - image: node-agent-k8s - env: - CA_PROVIDER: "Citadel" - CA_ADDR: "istio-citadel:8060" - VALID_TOKEN: true \ No newline at end of file diff --git a/kubernetes/helm_charts/istio-system/istio/values.yaml b/kubernetes/helm_charts/istio-system/istio/values.yaml deleted file mode 100755 index abbcc8186..000000000 --- a/kubernetes/helm_charts/istio-system/istio/values.yaml +++ /dev/null @@ -1,564 +0,0 @@ -# Top level istio values file has the following sections. -# -# global: This file is the authoritative and exhaustive source for the global section. -# -# chart sections: Every subdirectory inside the charts/ directory has a top level -# configuration key in this file. This file overrides the values specified -# by the charts/${chartname}/values.yaml. -# Check the chart level values file for exhaustive list of configuration options. - -# -# Gateways Configuration, refer to the charts/gateways/values.yaml -# for detailed configuration -# -gateways: - enabled: true - -# -# sidecar-injector webhook configuration, refer to the -# charts/sidecarInjectorWebhook/values.yaml for detailed configuration -# -sidecarInjectorWebhook: - enabled: true - -# -# galley configuration, refer to charts/galley/values.yaml -# for detailed configuration -# -galley: - enabled: true - -# -# mixer configuration -# -# @see charts/mixer/values.yaml, it takes precedence -mixer: - policy: - # if policy is enabled the global.disablePolicyChecks has affect. - enabled: true - - telemetry: - enabled: true -# -# pilot configuration -# -# @see charts/pilot/values.yaml -pilot: - enabled: true - -# -# security configuration -# -security: - enabled: true - -# -# nodeagent configuration -# -nodeagent: - enabled: false - -# -# addon grafana configuration -# -grafana: - enabled: false - -# -# addon prometheus configuration -# -prometheus: - enabled: true - -# -# addon jaeger tracing configuration -# -tracing: - enabled: false - -# -# addon kiali tracing configuration -# -kiali: - enabled: false - -# -# addon certmanager configuration -# -certmanager: - enabled: false - -# -# Istio CNI plugin enabled -# This must be enabled to use the CNI plugin in Istio. The CNI plugin is installed separately. -# If true, the privileged initContainer istio-init is not needed to perform the traffic redirect -# settings for the istio-proxy. -# -istio_cni: - enabled: false - -# addon Istio CoreDNS configuration -# -istiocoredns: - enabled: false - -# Common settings used among istio subcharts. -global: - # Default hub for Istio images. - # Releases are published to docker hub under 'istio' project. - # Daily builds from prow are on gcr.io - hub: docker.io/istio - - # Default tag for Istio images. - tag: 1.3.3 - - # Comma-separated minimum per-scope logging level of messages to output, in the form of :,: - # The control plane has different scopes depending on component, but can configure default log level across all components - # If empty, default scope and level will be used as configured in code - logging: - level: "default:info" - - # monitoring port used by mixer, pilot, galley and sidecar injector - monitoringPort: 15014 - - k8sIngress: - enabled: false - # Gateway used for k8s Ingress resources. By default it is - # using 'istio:ingressgateway' that will be installed by setting - # 'gateways.enabled' and 'gateways.istio-ingressgateway.enabled' - # flags to true. - gatewayName: ingressgateway - # enableHttps will add port 443 on the ingress. - # It REQUIRES that the certificates are installed in the - # expected secrets - enabling this option without certificates - # will result in LDS rejection and the ingress will not work. - enableHttps: false - - proxy: - # Configuration for the proxy init container - init: - resources: - limits: - cpu: 100m - memory: 50Mi - requests: - cpu: 10m - memory: 10Mi - image: proxyv2 - - # cluster domain. Default value is "cluster.local". - clusterDomain: "cluster.local" - - # Resources for the sidecar. - resources: - requests: - cpu: 100m - memory: 128Mi - limits: - cpu: 2000m - memory: 1024Mi - - # Controls number of Proxy worker threads. - # If set to 0, then start worker thread for each CPU thread/core. - concurrency: 2 - - # Configures the access log for each sidecar. - # Options: - # "" - disables access log - # "/dev/stdout" - enables access log - accessLogFile: "" - - # Configure how and what fields are displayed in sidecar access log. Setting to - # empty string will result in default log format - accessLogFormat: "" - - # Configure the access log for sidecar to JSON or TEXT. - accessLogEncoding: TEXT - - # Configure envoy gRPC access log service. - envoyAccessLogService: - enabled: false - host: # example: accesslog-service.istio-system - port: # example: 15000 - tlsSettings: - mode: DISABLE # DISABLE, SIMPLE, MUTUAL, ISTIO_MUTUAL - clientCertificate: # example: /etc/istio/als/cert-chain.pem - privateKey: # example: /etc/istio/als/key.pem - caCertificates: # example: /etc/istio/als/root-cert.pem - sni: # example: als.somedomain - subjectAltNames: [] - # - als.somedomain - tcpKeepalive: - probes: 3 - time: 10s - interval: 10s - - # Log level for proxy, applies to gateways and sidecars. If left empty, "warning" is used. - # Expected values are: trace|debug|info|warning|error|critical|off - logLevel: "" - - # Per Component log level for proxy, applies to gateways and sidecars. If a component level is - # not set, then the global "logLevel" will be used. If left empty, "misc:error" is used. - componentLogLevel: "" - - # Configure the DNS refresh rate for Envoy cluster of type STRICT_DNS - # This must be given it terms of seconds. For example, 300s is valid but 5m is invalid. - dnsRefreshRate: 300s - - # Automatic protocol detection uses a set of heuristics to - # determine whether the connection is using TLS or not (on the - # server side), as well as the application protocol being used - # (e.g., http vs tcp). These heuristics rely on the client sending - # the first bits of data. For server first protocols like MySQL, - # MongoDB, etc., Envoy will timeout on the protocol detection after - # the specified period, defaulting to non mTLS plain TCP - # traffic. Set this field to tweak the period that Envoy will wait - # for the client to send the first bits of data. (MUST BE >=1ms) - protocolDetectionTimeout: 100ms - - #If set to true, istio-proxy container will have privileged securityContext - privileged: false - - # If set, newly injected sidecars will have core dumps enabled. - enableCoreDump: false - - # Image used to enable core dumps. This is only used, when "enableCoreDump" is set to true. - enableCoreDumpImage: ubuntu:xenial - - # Default port for Pilot agent health checks. A value of 0 will disable health checking. - statusPort: 15020 - - # The initial delay for readiness probes in seconds. - readinessInitialDelaySeconds: 1 - - # The period between readiness probes. - readinessPeriodSeconds: 2 - - # The number of successive failed probes before indicating readiness failure. - readinessFailureThreshold: 30 - - # istio egress capture whitelist - # https://istio.io/docs/tasks/traffic-management/egress.html#calling-external-services-directly - # example: includeIPRanges: "172.30.0.0/16,172.20.0.0/16" - # would only capture egress traffic on those two IP Ranges, all other outbound traffic would - # be allowed by the sidecar - includeIPRanges: "*" - excludeIPRanges: "" - excludeOutboundPorts: "" - - # pod internal interfaces - kubevirtInterfaces: "" - - # istio ingress capture whitelist - # examples: - # Redirect no inbound traffic to Envoy: --includeInboundPorts="" - # Redirect all inbound traffic to Envoy: --includeInboundPorts="*" - # Redirect only selected ports: --includeInboundPorts="80,8080" - includeInboundPorts: "*" - excludeInboundPorts: "" - - # This controls the 'policy' in the sidecar injector. - autoInject: enabled - - # Sets the destination Statsd in envoy (the value of the "--statsdUdpAddress" proxy argument - # would be :). - # Disabled by default. - # The istio-statsd-prom-bridge is deprecated and should not be used moving forward. - envoyStatsd: - # If enabled is set to true, host and port must also be provided. Istio no longer provides a statsd collector. - enabled: false - host: # example: statsd-svc.istio-system - port: # example: 9125 - - # Sets the Envoy Metrics Service address, used to push Envoy metrics to an external collector - # via the Metrics Service gRPC API. This contains detailed stats information emitted directly - # by Envoy and should not be confused with the the Istio telemetry. The Envoy stats are also - # available to scrape via the Envoy admin port at either /stats or /stats/prometheus. - # - # See https://www.envoyproxy.io/docs/envoy/latest/api-v2/config/metrics/v2/metrics_service.proto - # for details about Envoy's Metrics Service API. - # - # Disabled by default. - envoyMetricsService: - enabled: false - host: # example: metrics-service.istio-system - port: # example: 15000 - - # Specify which tracer to use. One of: zipkin, lightstep, datadog, stackdriver. - # If using stackdriver tracer outside GCP, set env GOOGLE_APPLICATION_CREDENTIALS to the GCP credential file. - tracer: "zipkin" - - proxy_init: - # Base name for the proxy_init container, used to configure iptables. - image: proxy_init - - # imagePullPolicy is applied to istio control plane components. - # local tests require IfNotPresent, to avoid uploading to dockerhub. - # TODO: Switch to Always as default, and override in the local tests. - imagePullPolicy: IfNotPresent - - # controlPlaneSecurityEnabled enabled. Will result in delays starting the pods while secrets are - # propagated, not recommended for tests. - controlPlaneSecurityEnabled: false - - # disablePolicyChecks disables mixer policy checks. - # if mixer.policy.enabled==true then disablePolicyChecks has affect. - # Will set the value with same name in istio config map - pilot needs to be restarted to take effect. - disablePolicyChecks: true - - # policyCheckFailOpen allows traffic in cases when the mixer policy service cannot be reached. - # Default is false which means the traffic is denied when the client is unable to connect to Mixer. - policyCheckFailOpen: false - - # EnableTracing sets the value with same name in istio config map, requires pilot restart to take effect. - enableTracing: true - - # Configuration for each of the supported tracers - tracer: - # Configuration for envoy to send trace data to LightStep. - # Disabled by default. - # address: the : of the satellite pool - # accessToken: required for sending data to the pool - # secure: specifies whether data should be sent with TLS - # cacertPath: the path to the file containing the cacert to use when verifying TLS. If secure is true, this is - # required. If a value is specified then a secret called "lightstep.cacert" must be created in the destination - # namespace with the key matching the base of the provided cacertPath and the value being the cacert itself. - # - lightstep: - address: "" # example: lightstep-satellite:443 - accessToken: "" # example: abcdefg1234567 - secure: true # example: true|false - cacertPath: "" # example: /etc/lightstep/cacert.pem - zipkin: - # Host:Port for reporting trace data in zipkin format. If not specified, will default to - # zipkin service (port 9411) in the same namespace as the other istio components. - address: "" - datadog: - # Host:Port for submitting traces to the Datadog agent. - address: "$(HOST_IP):8126" - - # Default mtls policy. If true, mtls between services will be enabled by default. - mtls: - # Default setting for service-to-service mtls. Can be set explicitly using - # destination rules or service annotations. - enabled: false - - # Lists the secrets you need to use to pull Istio images from a private registry. - imagePullSecrets: [] - # - private-registry-key - - # Specify pod scheduling arch(amd64, ppc64le, s390x) and weight as follows: - # 0 - Never scheduled - # 1 - Least preferred - # 2 - No preference - # 3 - Most preferred - arch: - amd64: 2 - s390x: 2 - ppc64le: 2 - - # Whether to restrict the applications namespace the controller manages; - # If not set, controller watches all namespaces - oneNamespace: false - - # Default node selector to be applied to all deployments so that all pods can be - # constrained to run a particular nodes. Each component can overwrite these default - # values by adding its node selector block in the relevant section below and setting - # the desired values. - defaultNodeSelector: {} - - # Default node tolerations to be applied to all deployments so that all pods can be - # scheduled to a particular nodes with matching taints. Each component can overwrite - # these default values by adding its tolerations block in the relevant section below - # and setting the desired values. - # Configure this field in case that all pods of Istio control plane are expected to - # be scheduled to particular nodes with specified taints. - defaultTolerations: [] - - # Whether to perform server-side validation of configuration. - configValidation: true - - # Custom DNS config for the pod to resolve names of services in other - # clusters. Use this to add additional search domains, and other settings. - # see - # https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#dns-config - # This does not apply to gateway pods as they typically need a different - # set of DNS settings than the normal application pods (e.g., in - # multicluster scenarios). - # NOTE: If using templates, follow the pattern in the commented example below. - # podDNSSearchNamespaces: - # - global - # - "[[ valueOrDefault .DeploymentMeta.Namespace \"default\" ]].global" - - # If set to true, the pilot and citadel mtls will be exposed on the - # ingress gateway - meshExpansion: - enabled: false - # If set to true, the pilot and citadel mtls and the plaintext pilot ports - # will be exposed on an internal gateway - useILB: false - - multiCluster: - # Set to true to connect two kubernetes clusters via their respective - # ingressgateway services when pods in each cluster cannot directly - # talk to one another. All clusters should be using Istio mTLS and must - # have a shared root CA for this model to work. - enabled: false - - # Should be set to the name of the cluster this installation will run in. This is required for sidecar injection - # to properly label proxies - clusterName: "" - - # A minimal set of requested resources to applied to all deployments so that - # Horizontal Pod Autoscaler will be able to function (if set). - # Each component can overwrite these default values by adding its own resources - # block in the relevant section below and setting the desired resources values. - defaultResources: - requests: - cpu: 10m - # memory: 128Mi - # limits: - # cpu: 100m - # memory: 128Mi - - # enable pod distruption budget for the control plane, which is used to - # ensure Istio control plane components are gradually upgraded or recovered. - defaultPodDisruptionBudget: - enabled: true - # The values aren't mutable due to a current PodDisruptionBudget limitation - # minAvailable: 1 - - # Kubernetes >=v1.11.0 will create two PriorityClass, including system-cluster-critical and - # system-node-critical, it is better to configure this in order to make sure your Istio pods - # will not be killed because of low priority class. - # Refer to https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass - # for more detail. - priorityClassName: "" - - # Use the Mesh Control Protocol (MCP) for configuring Mixer and - # Pilot. Requires galley (`--set galley.enabled=true`). - useMCP: true - - # The trust domain corresponds to the trust root of a system - # Refer to https://github.com/spiffe/spiffe/blob/master/standards/SPIFFE-ID.md#21-trust-domain - # Indicate the domain used in SPIFFE identity URL - # The default depends on the environment. - # kubernetes: cluster.local - # else: default dns domain - trustDomain: "" - - # Mesh ID means Mesh Identifier. It should be unique within the scope where - # meshes will interact with each other, but it is not required to be - # globally/universally unique. For example, if any of the following are true, - # then two meshes must have different Mesh IDs: - # - Meshes will have their telemetry aggregated in one place - # - Meshes will be federated together - # - Policy will be written referencing one mesh from the other - # - # If an administrator expects that any of these conditions may become true in - # the future, they should ensure their meshes have different Mesh IDs - # assigned. - # - # Within a multicluster mesh, each cluster must be (manually or auto) - # configured to have the same Mesh ID value. If an existing cluster 'joins' a - # multicluster mesh, it will need to be migrated to the new mesh ID. Details - # of migration TBD, and it may be a disruptive operation to change the Mesh - # ID post-install. - # - # If the mesh admin does not specify a value, Istio will use the value of the - # mesh's Trust Domain. The best practice is to select a proper Trust Domain - # value. - meshID: "" - - # Set the default behavior of the sidecar for handling outbound traffic from the application: - # ALLOW_ANY - outbound traffic to unknown destinations will be allowed, in case there are no - # services or ServiceEntries for the destination port - # REGISTRY_ONLY - restrict outbound traffic to services defined in the service registry as well - # as those defined through ServiceEntries - # ALLOW_ANY is the default in 1.1. This means each pod will be able to make outbound requests - # to services outside of the mesh without any ServiceEntry. - # REGISTRY_ONLY was the default in 1.0. If this behavior is desired, set the value below to REGISTRY_ONLY. - outboundTrafficPolicy: - mode: ALLOW_ANY - - # The namespace where globally shared configurations should be present. - # DestinationRules that apply to the entire mesh (e.g., enabling mTLS), - # default Sidecar configs, etc. should be added to this namespace. - # configRootNamespace: istio-config - - # set the default set of namespaces to which services, service entries, virtual services, destination - # rules should be exported to. Currently only one value can be provided in this list. This value - # should be one of the following two options: - # * implies these objects are visible to all namespaces, enabling any sidecar to talk to any other sidecar. - # . implies these objects are visible to only to sidecars in the same namespace, or if imported as a Sidecar.egress.host - # defaultConfigVisibilitySettings: - #- '*' - - sds: - # SDS enabled. IF set to true, mTLS certificates for the sidecars will be - # distributed through the SecretDiscoveryService instead of using K8S secrets to mount the certificates. - enabled: false - udsPath: "" - # The JWT token for SDS and the aud field of such JWT. See RFC 7519, section 4.1.3. - # When a CSR is sent from Citadel Agent to the CA (e.g. Citadel), this aud is to make sure the - # JWT is intended for the CA. - token: - aud: istio-ca - - # Configure the mesh networks to be used by the Split Horizon EDS. - # - # The following example defines two networks with different endpoints association methods. - # For `network1` all endpoints that their IP belongs to the provided CIDR range will be - # mapped to network1. The gateway for this network example is specified by its public IP - # address and port. - # The second network, `network2`, in this example is defined differently with all endpoints - # retrieved through the specified Multi-Cluster registry being mapped to network2. The - # gateway is also defined differently with the name of the gateway service on the remote - # cluster. The public IP for the gateway will be determined from that remote service (only - # LoadBalancer gateway service type is currently supported, for a NodePort type gateway service, - # it still need to be configured manually). - # - # meshNetworks: - # network1: - # endpoints: - # - fromCidr: "192.168.0.1/24" - # gateways: - # - address: 1.1.1.1 - # port: 80 - # network2: - # endpoints: - # - fromRegistry: reg1 - # gateways: - # - registryServiceName: istio-ingressgateway.istio-system.svc.cluster.local - # port: 443 - # - meshNetworks: {} - - # Specifies the global locality load balancing settings. - # Locality-weighted load balancing allows administrators to control the distribution of traffic to - # endpoints based on the localities of where the traffic originates and where it will terminate. - # Either failover or distribute configuration can be set, but not both. If neither are provided - # failover mode will be used. - # - # localityLbSetting: - # enabled: true - # distribute: - # - from: "us-central1/*" - # to: - # "us-central1/*": 80 - # "us-central2/*": 20 - # - # localityLbSetting: - # enabled: true - # failover: - # - from: us-east - # to: eu-west - # - from: us-west - # to: us-east - localityLbSetting: - enabled: true - - # Specifies whether helm test is enabled or not. - # This field is set to false by default, so 'helm template ...' - # will ignore the helm test yaml files when generating the template - enableHelmTest: false diff --git a/kubernetes/helm_charts/kube-system/coredns-custom.yaml b/kubernetes/helm_charts/kube-system/coredns-custom.yaml deleted file mode 100644 index d3a0f068e..000000000 --- a/kubernetes/helm_charts/kube-system/coredns-custom.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# enabling istioctl serviceentries to create dns entries -# -# resolves *.sunbird to istiocoredns -# -# TODO: is there any way to change the ip to domain -# of istiodns ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - addonmanager.kubernetes.io/mode: EnsureExists - k8s-app: kube-dns - kubernetes.io/cluster-service: "true" - name: coredns-custom - namespace: kube-system -data: - Sunbird.server: |- - global:53 { - errors - cache 30 - forward . 172.16.242.123 - } diff --git a/kubernetes/helm_charts/logging/elasticsearch/.helmignore b/kubernetes/helm_charts/logging/elasticsearch/.helmignore deleted file mode 100755 index e12c0b4b9..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/.helmignore +++ /dev/null @@ -1,2 +0,0 @@ -tests/ -.pytest_cache/ diff --git a/kubernetes/helm_charts/logging/elasticsearch/Chart.yaml b/kubernetes/helm_charts/logging/elasticsearch/Chart.yaml deleted file mode 100755 index cfb40d891..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/Chart.yaml +++ /dev/null @@ -1,11 +0,0 @@ -description: Official Elastic helm chart for Elasticsearch -home: https://github.com/elastic/helm-charts -maintainers: -- email: helm-charts@elastic.co - name: Elastic -name: elasticsearch -version: 7.3.2 -appVersion: 7.3.2 -sources: - - https://github.com/elastic/elasticsearch -icon: https://helm.elastic.co/icons/elasticsearch.png diff --git a/kubernetes/helm_charts/logging/elasticsearch/Makefile b/kubernetes/helm_charts/logging/elasticsearch/Makefile deleted file mode 100755 index 22218a1f6..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../helpers/common.mk diff --git a/kubernetes/helm_charts/logging/elasticsearch/README.md b/kubernetes/helm_charts/logging/elasticsearch/README.md deleted file mode 100755 index ff90f09c0..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/README.md +++ /dev/null @@ -1,307 +0,0 @@ -# Elasticsearch Helm Chart - -This functionality is in beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features. - -This helm chart is a lightweight way to configure and run our official [Elasticsearch docker image](https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html) - -## Requirements - -* [Helm](https://helm.sh/) >= 2.8.0 -* Kubernetes >= 1.8 -* Minimum cluster requirements include the following to run this chart with default settings. All of these settings are configurable. - * Three Kubernetes nodes to respect the default "hard" affinity settings - * 1GB of RAM for the JVM heap - -## Usage notes and getting started - -* This repo includes a number of [example](./examples) configurations which can be used as a reference. They are also used in the automated testing of this chart -* Automated testing of this chart is currently only run against GKE (Google Kubernetes Engine). If you are using a different Kubernetes provider you will likely need to adjust the `storageClassName` in the `volumeClaimTemplate` -* The default storage class for GKE is `standard` which by default will give you `pd-ssd` type persistent volumes. This is network attached storage and will not perform as well as local storage. If you are using Kubernetes version 1.10 or greater you can use [Local PersistentVolumes](https://cloud.google.com/kubernetes-engine/docs/how-to/persistent-volumes/local-ssd) for increased performance -* The chart deploys a statefulset and by default will do an automated rolling update of your cluster. It does this by waiting for the cluster health to become green after each instance is updated. If you prefer to update manually you can set [`updateStrategy: OnDelete`](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#on-delete) -* It is important to verify that the JVM heap size in `esJavaOpts` and to set the CPU/Memory `resources` to something suitable for your cluster -* To simplify chart and maintenance each set of node groups is deployed as a separate helm release. Take a look at the [multi](./examples/multi) example to get an idea for how this works. Without doing this it isn't possible to resize persistent volumes in a statefulset. By setting it up this way it makes it possible to add more nodes with a new storage size then drain the old ones. It also solves the problem of allowing the user to determine which node groups to update first when doing upgrades or changes. -* We have designed this chart to be very un-opinionated about how to configure Elasticsearch. It exposes ways to set environment variables and mount secrets inside of the container. Doing this makes it much easier for this chart to support multiple versions with minimal changes. - -## Migration from helm/charts stable - -If you currently have a cluster deployed with the [helm/charts stable](https://github.com/helm/charts/tree/master/stable/elasticsearch) chart you can follow the [migration guide](/elasticsearch/examples/migration/README.md) - -## Installing - -* Add the elastic helm charts repo - ``` - helm repo add elastic https://helm.elastic.co - ``` -* Install it - ``` - helm install --name elasticsearch elastic/elasticsearch - ``` - -## Compatibility - -This chart is tested with the latest supported versions. The currently tested versions are: - -| 6.x | 7.x | -| ----- | ----- | -| 6.8.3 | 7.3.2 | - -Examples of installing older major versions can be found in the [examples](./examples) directory. - -While only the latest releases are tested, it is possible to easily install old or new releases by overriding the `imageTag`. To install version `7.3.2` of Elasticsearch it would look like this: - -``` -helm install --name elasticsearch elastic/elasticsearch --set imageTag=7.3.2 -``` - -## Configuration - -| Parameter | Description | Default | -| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | -| `clusterName` | This will be used as the Elasticsearch [cluster.name](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster.name.html) and should be unique per cluster in the namespace | `elasticsearch` | -| `nodeGroup` | This is the name that will be used for each group of nodes in the cluster. The name will be `clusterName-nodeGroup-X` | `master` | -| `masterService` | Optional. The service name used to connect to the masters. You only need to set this if your master `nodeGroup` is set to something other than `master`. See [Clustering and Node Discovery](#clustering-and-node-discovery) for more information. | `` | -| `roles` | A hash map with the [specific roles](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-node.html) for the node group | `master: true`
`data: true`
`ingest: true` | -| `replicas` | Kubernetes replica count for the statefulset (i.e. how many pods) | `3` | -| `minimumMasterNodes` | The value for [discovery.zen.minimum_master_nodes](https://www.elastic.co/guide/en/elasticsearch/reference/6.7/discovery-settings.html#minimum_master_nodes). Should be set to `(master_eligible_nodes / 2) + 1`. Ignored in Elasticsearch versions >= 7. | `2` | -| `esMajorVersion` | Used to set major version specific configuration. If you are using a custom image and not running the default Elasticsearch version you will need to set this to the version you are running (e.g. `esMajorVersion: 6`) | `""` | -| `esConfig` | Allows you to add any config files in `/usr/share/elasticsearch/config/` such as `elasticsearch.yml` and `log4j2.properties`. See [values.yaml](./values.yaml) for an example of the formatting. | `{}` | -| `extraEnvs` | Extra [environment variables](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config) which will be appended to the `env:` definition for the container | `[]` | -| `extraVolumes` | Templatable string of additional volumes to be passed to the `tpl` function | `""` | -| `extraVolumeMounts` | Templatable string of additional volumeMounts to be passed to the `tpl` function | `""` | -| `extraInitContainers` | Templatable string of additional init containers to be passed to the `tpl` function | `""` | -| `secretMounts` | Allows you easily mount a secret as a file inside the statefulset. Useful for mounting certificates and other secrets. See [values.yaml](./values.yaml) for an example | `[]` | -| `image` | The Elasticsearch docker image | `docker.elastic.co/elasticsearch/elasticsearch` | -| `imageTag` | The Elasticsearch docker image tag | `7.3.2` | -| `imagePullPolicy` | The Kubernetes [imagePullPolicy](https://kubernetes.io/docs/concepts/containers/images/#updating-images) value | `IfNotPresent` | -| `podAnnotations` | Configurable [annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) applied to all Elasticsearch pods | `{}` | -| `labels` | Configurable [label](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) applied to all Elasticsearch pods | `{}` | -| `esJavaOpts` | [Java options](https://www.elastic.co/guide/en/elasticsearch/reference/current/jvm-options.html) for Elasticsearch. This is where you should configure the [jvm heap size](https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html) | `-Xmx1g -Xms1g` | -| `resources` | Allows you to set the [resources](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/) for the statefulset | `requests.cpu: 100m`
`requests.memory: 2Gi`
`limits.cpu: 1000m`
`limits.memory: 2Gi` | -| `initResources` | Allows you to set the [resources](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/) for the initContainer in the statefulset | {} | -| `sidecarResources` | Allows you to set the [resources](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/) for the sidecar containers in the statefulset | {} | -| `networkHost` | Value for the [network.host Elasticsearch setting](https://www.elastic.co/guide/en/elasticsearch/reference/current/network.host.html) | `0.0.0.0` | -| `volumeClaimTemplate` | Configuration for the [volumeClaimTemplate for statefulsets](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#stable-storage). You will want to adjust the storage (default `30Gi`) and the `storageClassName` if you are using a different storage class | `accessModes: [ "ReadWriteOnce" ]`
`resources.requests.storage: 30Gi` | -| `persistence.annotations` | Additional persistence annotations for the `volumeClaimTemplate` | `{}` | -| `persistence.enabled` | Enables a persistent volume for Elasticsearch data. Can be disabled for nodes that only have [roles](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-node.html) which don't require persistent data. | `true` | -| `priorityClassName` | The [name of the PriorityClass](https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass). No default is supplied as the PriorityClass must be created first. | `""` | -| `antiAffinityTopologyKey` | The [anti-affinity topology key](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity). By default this will prevent multiple Elasticsearch nodes from running on the same Kubernetes node | `kubernetes.io/hostname` | -| `antiAffinity` | Setting this to hard enforces the [anti-affinity rules](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity). If it is set to soft it will be done "best effort". Other values will be ignored. | `hard` | -| `nodeAffinity` | Value for the [node affinity settings](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature) | `{}` | -| `podManagementPolicy` | By default Kubernetes [deploys statefulsets serially](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies). This deploys them in parallel so that they can discover eachother | `Parallel` | -| `protocol` | The protocol that will be used for the readinessProbe. Change this to `https` if you have `xpack.security.http.ssl.enabled` set | `http` | -| `httpPort` | The http port that Kubernetes will use for the healthchecks and the service. If you change this you will also need to set [http.port](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-http.html#_settings) in `extraEnvs` | `9200` | -| `transportPort` | The transport port that Kubernetes will use for the service. If you change this you will also need to set [transport port configuration](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-transport.html#_transport_settings) in `extraEnvs` | `9300` | -| `service.type` | Type of elasticsearch service. [Service Types](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) | `ClusterIP` | -| `service.nodePort` | Custom [nodePort](https://kubernetes.io/docs/concepts/services-networking/service/#nodeport) port that can be set if you are using `service.type: nodePort`. | `` | -| `service.annotations` | Annotations that Kubernetes will use for the service. This will configure load balancer if `service.type` is `LoadBalancer` [Annotations](https://kubernetes.io/docs/concepts/services-networking/service/#ssl-support-on-aws) | `{}` | -| `service.httpPortName` | The name of the http port within the service | `http` | -| `service.transportPortName` | The name of the transport port within the service | `transport` | -| `updateStrategy` | The [updateStrategy](https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#updating-statefulsets) for the statefulset. By default Kubernetes will wait for the cluster to be green after upgrading each pod. Setting this to `OnDelete` will allow you to manually delete each pod during upgrades | `RollingUpdate` | -| `maxUnavailable` | The [maxUnavailable](https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget) value for the pod disruption budget. By default this will prevent Kubernetes from having more than 1 unhealthy pod in the node group | `1` | -| `fsGroup (DEPRECATED)` | The Group ID (GID) for [securityContext.fsGroup](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) so that the Elasticsearch user can read from the persistent volume | `` | -| `podSecurityContext` | Allows you to set the [securityContext](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod) for the pod | `fsGroup: 1000`
`runAsUser: 1000` | -| `securityContext` | Allows you to set the [securityContext](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container) for the container | `capabilities.drop:[ALL]`
`runAsNonRoot: true`
`runAsUser: 1000` | -| `terminationGracePeriod` | The [terminationGracePeriod](https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods) in seconds used when trying to stop the pod | `120` | -| `sysctlInitContainer.enabled` | Allows you to disable the sysctlInitContainer if you are setting vm.max_map_count with another method | `true` | -| `sysctlVmMaxMapCount` | Sets the [sysctl vm.max_map_count](https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html#vm-max-map-count) needed for Elasticsearch | `262144` | -| `readinessProbe` | Configuration fields for the [readinessProbe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/) | `failureThreshold: 3`
`initialDelaySeconds: 10`
`periodSeconds: 10`
`successThreshold: 3`
`timeoutSeconds: 5` | -| `clusterHealthCheckParams` | The [Elasticsearch cluster health status params](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html#request-params) that will be used by readinessProbe command | `wait_for_status=green&timeout=1s` | -| `imagePullSecrets` | Configuration for [imagePullSecrets](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret) so that you can use a private registry for your image | `[]` | -| `nodeSelector` | Configurable [nodeSelector](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector) so that you can target specific nodes for your Elasticsearch cluster | `{}` | -| `tolerations` | Configurable [tolerations](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) | `[]` | -| `ingress` | Configurable [ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) to expose the Elasticsearch service. See [`values.yaml`](./values.yaml) for an example | `enabled: false` | -| `schedulerName` | Name of the [alternate scheduler](https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/#specify-schedulers-for-pods) | `nil` | -| `masterTerminationFix` | A workaround needed for Elasticsearch < 7.2 to prevent master status being lost during restarts [#63](https://github.com/elastic/helm-charts/issues/63) | `false` | -| `lifecycle` | Allows you to add lifecycle configuration. See [values.yaml](./values.yaml) for an example of the formatting. | `{}` | -| `keystore` | Allows you map Kubernetes secrets into the keystore. See the [config example](/elasticsearch/examples/config/values.yaml) and [how to use the keystore](#how-to-use-the-keystore) | `[]` | -| `rbac` | Configuration for creating a role, role binding and service account as part of this helm chart with `create: true`. Also can be used to reference an external service account with `serviceAccountName: "externalServiceAccountName"`. | `create: false`
`serviceAccountName: ""` | -| `podSecurityPolicy` | Configuration for create a pod security policy with minimal permissions to run this Helm chart with `create: true`. Also can be used to reference an external pod security policy with `name: "externalPodSecurityPolicy"` | `create: false`
`name: ""` | - -## Try it out - -In [examples/](./examples) you will find some example configurations. These examples are used for the automated testing of this helm chart - -### Default - -To deploy a cluster with all default values and run the integration tests - -``` -cd examples/default -make -``` - -### Multi - -A cluster with dedicated node types - -``` -cd examples/multi -make -``` - -### Security - -A cluster with node to node security and https enabled. This example uses autogenerated certificates and password, for a production deployment you want to generate SSL certificates following the [official docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/configuring-tls.html#node-certificates). - -* Generate the certificates and install Elasticsearch - ``` - cd examples/security - make - - # Run a curl command to interact with the cluster - kubectl exec -ti security-master-0 -- sh -c 'curl -u $ELASTIC_USERNAME:$ELASTIC_PASSWORD -k https://localhost:9200/_cluster/health?pretty' - ``` - -### FAQ - -#### How to install plugins? - -The [recommended](https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#_c_customized_image) way to install plugins into our docker images is to create a custom docker image. - -The Dockerfile would look something like: - -``` -ARG elasticsearch_version -FROM docker.elastic.co/elasticsearch/elasticsearch:${elasticsearch_version} - -RUN bin/elasticsearch-plugin install --batch repository-gcs -``` - -And then updating the `image` in values to point to your custom image. - -There are a couple reasons we recommend this. - -1. Tying the availability of Elasticsearch to the download service to install plugins is not a great idea or something that we recommend. Especially in Kubernetes where it is normal and expected for a container to be moved to another host at random times. -2. Mutating the state of a running docker image (by installing plugins) goes against best practices of containers and immutable infrastructure. - -#### How to use the keystore? - - -##### Basic example - -Create the secret, the key name needs to be the keystore key path. In this example we will create a secret from a file and from a literal string. - -``` -kubectl create secret generic encryption_key --from-file=xpack.watcher.encryption_key=./watcher_encryption_key -kubectl create secret generic slack_hook --from-literal=xpack.notification.slack.account.monitoring.secure_url='https://hooks.slack.com/services/asdasdasd/asdasdas/asdasd' -``` - -To add these secrets to the keystore: -``` -keystore: - - secretName: encryption_key - - secretName: slack_hook -``` - -##### Multiple keys - -All keys in the secret will be added to the keystore. To create the previous example in one secret you could also do: - -``` -kubectl create secret generic keystore_secrets --from-file=xpack.watcher.encryption_key=./watcher_encryption_key --from-literal=xpack.notification.slack.account.monitoring.secure_url='https://hooks.slack.com/services/asdasdasd/asdasdas/asdasd' -``` - -``` -keystore: - - secretName: keystore_secrets -``` - -##### Custom paths and keys - -If you are using these secrets for other applications (besides the Elasticsearch keystore) then it is also possible to specify the keystore path and which keys you want to add. Everything specified under each `keystore` item will be passed through to the `volumeMounts` section for [mounting the secret](https://kubernetes.io/docs/concepts/configuration/secret/#using-secrets). In this example we will only add the `slack_hook` key from a secret that also has other keys. Our secret looks like this: - -``` -kubectl create secret generic slack_secrets --from-literal=slack_channel='#general' --from-literal=slack_hook='https://hooks.slack.com/services/asdasdasd/asdasdas/asdasd' -``` - -We only want to add the `slack_hook` key to the keystore at path `xpack.notification.slack.account.monitoring.secure_url`. - -``` -keystore: - - secretName: slack_secrets - items: - - key: slack_hook - path: xpack.notification.slack.account.monitoring.secure_url -``` - -You can also take a look at the [config example](/elasticsearch/examples/config/) which is used as part of the automated testing pipeline. - -#### How to enable snapshotting? - -1. Install your [snapshot plugin](https://www.elastic.co/guide/en/elasticsearch/plugins/current/repository.html) into a custom docker image following the [how to install plugins guide](/elasticsearch/README.md#how-to-install-plugins) -2. Add any required secrets or credentials into an Elasticsearch keystore following the [how to use the keystore guide](/elasticsearch/README.md#how-to-use-the-keystore) -3. Configure the [snapshot repository](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html) as you normally would. -4. To automate snapshots you can use a tool like [curator](https://www.elastic.co/guide/en/elasticsearch/client/curator/current/snapshot.html). In the future there are plans to have Elasticsearch manage automated snapshots with [Snapshot Lifecycle Management](https://github.com/elastic/elasticsearch/issues/38461). - -### Local development environments - -This chart is designed to run on production scale Kubernetes clusters with multiple nodes, lots of memory and persistent storage. For that reason it can be a bit tricky to run them against local Kubernetes environments such as minikube. Below are some examples of how to get this working locally. - -#### Minikube - -This chart also works successfully on [minikube](https://kubernetes.io/docs/setup/minikube/) in addition to typical hosted Kubernetes environments. -An example `values.yaml` file for minikube is provided under `examples/`. - -In order to properly support the required persistent volume claims for the Elasticsearch `StatefulSet`, the `default-storageclass` and `storage-provisioner` minikube addons must be enabled. - -``` -minikube addons enable default-storageclass -minikube addons enable storage-provisioner -cd examples/minikube -make -``` - -Note that if `helm` or `kubectl` timeouts occur, you may consider creating a minikube VM with more CPU cores or memory allocated. - -#### Docker for Mac - Kubernetes - -It is also possible to run this chart with the built in Kubernetes cluster that comes with [docker-for-mac](https://docs.docker.com/docker-for-mac/kubernetes/). - -``` -cd examples/docker-for-mac -make -``` - -## Clustering and Node Discovery - -This chart facilitates Elasticsearch node discovery and services by creating two `Service` definitions in Kubernetes, one with the name `$clusterName-$nodeGroup` and another named `$clusterName-$nodeGroup-headless`. -Only `Ready` pods are a part of the `$clusterName-$nodeGroup` service, while all pods (`Ready` or not) are a part of `$clusterName-$nodeGroup-headless`. - -If your group of master nodes has the default `nodeGroup: master` then you can just add new groups of nodes with a different `nodeGroup` and they will automatically discover the correct master. If your master nodes have a different `nodeGroup` name then you will need to set `masterService` to `$clusterName-$masterNodeGroup`. - -The chart value for `masterService` is used to populate `discovery.zen.ping.unicast.hosts`, which Elasticsearch nodes will use to contact master nodes and form a cluster. -Therefore, to add a group of nodes to an existing cluster, setting `masterService` to the desired `Service` name of the related cluster is sufficient. - -For an example of deploying both a group master nodes and data nodes using multiple releases of this chart, see the accompanying values files in `examples/multi`. - -## Testing - -This chart uses [pytest](https://docs.pytest.org/en/latest/) to test the templating logic. The dependencies for testing can be installed from the [`requirements.txt`](../requirements.txt) in the parent directory. - -``` -pip install -r ../requirements.txt -make pytest -``` - -You can also use `helm template` to look at the YAML being generated - -``` -make template -``` - -It is possible to run all of the tests and linting inside of a docker container - -``` -make test -``` - -## Integration Testing - -Integration tests are run using [goss](https://github.com/aelsabbahy/goss/blob/master/docs/manual.md) which is a serverspec like tool written in golang. See [goss.yaml](examples/default/test/goss.yaml) for an example of what the tests look like. - -To run the goss tests against the default example: - -``` -cd examples/default -make goss -``` diff --git a/kubernetes/helm_charts/logging/elasticsearch/examples/6.x/Makefile b/kubernetes/helm_charts/logging/elasticsearch/examples/6.x/Makefile deleted file mode 100755 index 2020d4a04..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/examples/6.x/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -default: test -include ../../../helpers/examples.mk - -RELEASE := helm-es-six - -install: - helm upgrade --wait --timeout=600 --install $(RELEASE) --values ./values.yaml ../../ - -restart: - helm upgrade --set terminationGracePeriod=121 --wait --timeout=600 --install $(RELEASE) --values ./values.yaml ../../ - -test: install goss - -purge: - helm del --purge $(RELEASE) diff --git a/kubernetes/helm_charts/logging/elasticsearch/examples/6.x/test/goss.yaml b/kubernetes/helm_charts/logging/elasticsearch/examples/6.x/test/goss.yaml deleted file mode 100755 index b3e98b1c1..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/examples/6.x/test/goss.yaml +++ /dev/null @@ -1,17 +0,0 @@ -http: - http://localhost:9200/_cluster/health: - status: 200 - timeout: 2000 - body: - - 'green' - - '"number_of_nodes":3' - - '"number_of_data_nodes":3' - - http://localhost:9200: - status: 200 - timeout: 2000 - body: - - '"number" : "6.8.3"' - - '"cluster_name" : "six"' - - '"name" : "six-master-0"' - - 'You Know, for Search' diff --git a/kubernetes/helm_charts/logging/elasticsearch/examples/6.x/values.yaml b/kubernetes/helm_charts/logging/elasticsearch/examples/6.x/values.yaml deleted file mode 100755 index 858a5ec58..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/examples/6.x/values.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- - -clusterName: "six" -imageTag: "6.8.3" diff --git a/kubernetes/helm_charts/logging/elasticsearch/examples/config/Makefile b/kubernetes/helm_charts/logging/elasticsearch/examples/config/Makefile deleted file mode 100755 index a3f96174b..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/examples/config/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -default: test -include ../../../helpers/examples.mk - -RELEASE := helm-es-config - -install: - helm upgrade --wait --timeout=600 --install $(RELEASE) --values ./values.yaml ../../ - -secrets: - kubectl delete secret elastic-config-credentials elastic-config-secret elastic-config-slack elastic-config-custom-path || true - kubectl create secret generic elastic-config-credentials --from-literal=password=changeme --from-literal=username=elastic - kubectl create secret generic elastic-config-slack --from-literal=xpack.notification.slack.account.monitoring.secure_url='https://hooks.slack.com/services/asdasdasd/asdasdas/asdasd' - kubectl create secret generic elastic-config-secret --from-file=xpack.watcher.encryption_key=./watcher_encryption_key - kubectl create secret generic elastic-config-custom-path --from-literal=slack_url='https://hooks.slack.com/services/asdasdasd/asdasdas/asdasd' --from-literal=thing_i_don_tcare_about=test - -test: secrets install goss - -purge: - helm del --purge $(RELEASE) diff --git a/kubernetes/helm_charts/logging/elasticsearch/examples/config/README.md b/kubernetes/helm_charts/logging/elasticsearch/examples/config/README.md deleted file mode 100755 index d98d836bf..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/examples/config/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Config - -An example testing suite for testing some of the optional features of this chart. diff --git a/kubernetes/helm_charts/logging/elasticsearch/examples/config/test/goss.yaml b/kubernetes/helm_charts/logging/elasticsearch/examples/config/test/goss.yaml deleted file mode 100755 index 848701370..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/examples/config/test/goss.yaml +++ /dev/null @@ -1,26 +0,0 @@ -http: - http://localhost:9200/_cluster/health: - status: 200 - timeout: 2000 - body: - - 'green' - - '"number_of_nodes":1' - - '"number_of_data_nodes":1' - - http://localhost:9200: - status: 200 - timeout: 2000 - body: - - '"cluster_name" : "config"' - - '"name" : "config-master-0"' - - 'You Know, for Search' - -command: - "elasticsearch-keystore list": - exit-status: 0 - stdout: - - keystore.seed - - bootstrap.password - - xpack.notification.slack.account.monitoring.secure_url - - xpack.notification.slack.account.otheraccount.secure_url - - xpack.watcher.encryption_key diff --git a/kubernetes/helm_charts/logging/elasticsearch/examples/config/values.yaml b/kubernetes/helm_charts/logging/elasticsearch/examples/config/values.yaml deleted file mode 100755 index ebde4f4d9..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/examples/config/values.yaml +++ /dev/null @@ -1,31 +0,0 @@ ---- - -clusterName: "config" -replicas: 1 - -extraEnvs: - - name: ELASTIC_PASSWORD - valueFrom: - secretKeyRef: - name: elastic-credentials - key: password - - name: ELASTIC_USERNAME - valueFrom: - secretKeyRef: - name: elastic-credentials - key: username - -# This is just a dummy file to make sure that -# the keystore can be mounted at the same time -# as a custom elasticsearch.yml -esConfig: - elasticsearch.yml: | - path.data: /usr/share/elasticsearch/data - -keystore: - - secretName: elastic-config-secret - - secretName: elastic-config-slack - - secretName: elastic-config-custom-path - items: - - key: slack_url - path: xpack.notification.slack.account.otheraccount.secure_url diff --git a/kubernetes/helm_charts/logging/elasticsearch/examples/config/watcher_encryption_key b/kubernetes/helm_charts/logging/elasticsearch/examples/config/watcher_encryption_key deleted file mode 100755 index b5f907866..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/examples/config/watcher_encryption_key +++ /dev/null @@ -1 +0,0 @@ -supersecret diff --git a/kubernetes/helm_charts/logging/elasticsearch/examples/default/Makefile b/kubernetes/helm_charts/logging/elasticsearch/examples/default/Makefile deleted file mode 100755 index 5f5215c6b..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/examples/default/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -default: test - -include ../../../helpers/examples.mk - -RELEASE := helm-es-default - -install: - helm upgrade --wait --timeout=600 --install $(RELEASE) ../../ - -restart: - helm upgrade --set terminationGracePeriod=121 --wait --timeout=600 --install $(RELEASE) ../../ - -test: install goss - -purge: - helm del --purge $(RELEASE) diff --git a/kubernetes/helm_charts/logging/elasticsearch/examples/default/rolling_upgrade.sh b/kubernetes/helm_charts/logging/elasticsearch/examples/default/rolling_upgrade.sh deleted file mode 100755 index c5a2a887b..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/examples/default/rolling_upgrade.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash -x - -kubectl proxy || true & - -make & -PROC_ID=$! - -while kill -0 "$PROC_ID" >/dev/null 2>&1; do - echo "PROCESS IS RUNNING" - if curl --fail 'http://localhost:8001/api/v1/proxy/namespaces/default/services/elasticsearch-master:9200/_search' ; then - echo "cluster is healthy" - else - echo "cluster not healthy!" - exit 1 - fi - sleep 1 -done -echo "PROCESS TERMINATED" -exit 0 diff --git a/kubernetes/helm_charts/logging/elasticsearch/examples/default/test/goss.yaml b/kubernetes/helm_charts/logging/elasticsearch/examples/default/test/goss.yaml deleted file mode 100755 index 182981df0..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/examples/default/test/goss.yaml +++ /dev/null @@ -1,39 +0,0 @@ -kernel-param: - vm.max_map_count: - value: '262144' - -http: - http://elasticsearch-master:9200/_cluster/health: - status: 200 - timeout: 2000 - body: - - 'green' - - '"number_of_nodes":3' - - '"number_of_data_nodes":3' - - http://localhost:9200: - status: 200 - timeout: 2000 - body: - - '"number" : "7.3.2"' - - '"cluster_name" : "elasticsearch"' - - '"name" : "elasticsearch-master-0"' - - 'You Know, for Search' - -file: - /usr/share/elasticsearch/data: - exists: true - mode: "2775" - owner: root - group: elasticsearch - filetype: directory - -mount: - /usr/share/elasticsearch/data: - exists: true - -user: - elasticsearch: - exists: true - uid: 1000 - gid: 1000 diff --git a/kubernetes/helm_charts/logging/elasticsearch/examples/docker-for-mac/Makefile b/kubernetes/helm_charts/logging/elasticsearch/examples/docker-for-mac/Makefile deleted file mode 100755 index 398545e64..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/examples/docker-for-mac/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -default: test - -RELEASE := helm-es-docker-for-mac - -install: - helm upgrade --wait --timeout=900 --install --values values.yaml $(RELEASE) ../../ - -test: install - helm test $(RELEASE) - -purge: - helm del --purge $(RELEASE) diff --git a/kubernetes/helm_charts/logging/elasticsearch/examples/docker-for-mac/values.yaml b/kubernetes/helm_charts/logging/elasticsearch/examples/docker-for-mac/values.yaml deleted file mode 100755 index f7deba66b..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/examples/docker-for-mac/values.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Permit co-located instances for solitary minikube virtual machines. -antiAffinity: "soft" - -# Shrink default JVM heap. -esJavaOpts: "-Xmx128m -Xms128m" - -# Allocate smaller chunks of memory per pod. -resources: - requests: - cpu: "100m" - memory: "512M" - limits: - cpu: "1000m" - memory: "512M" - -# Request smaller persistent volumes. -volumeClaimTemplate: - accessModes: [ "ReadWriteOnce" ] - storageClassName: "hostpath" - resources: - requests: - storage: 100M diff --git a/kubernetes/helm_charts/logging/elasticsearch/examples/migration/Makefile b/kubernetes/helm_charts/logging/elasticsearch/examples/migration/Makefile deleted file mode 100755 index 3b1dac105..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/examples/migration/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -PREFIX := helm-es-migration - -data: - helm upgrade --wait --timeout=600 --install --values ./data.yml $(PREFIX)-data ../../ - -master: - helm upgrade --wait --timeout=600 --install --values ./master.yml $(PREFIX)-master ../../ - -client: - helm upgrade --wait --timeout=600 --install --values ./client.yml $(PREFIX)-client ../../ diff --git a/kubernetes/helm_charts/logging/elasticsearch/examples/migration/README.md b/kubernetes/helm_charts/logging/elasticsearch/examples/migration/README.md deleted file mode 100755 index e5f4b1a79..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/examples/migration/README.md +++ /dev/null @@ -1,86 +0,0 @@ -# Migration Guide from helm/charts - -There are two viable options for migrating from the community Elasticsearch helm chart from the [helm/charts](https://github.com/helm/charts/tree/master/stable/elasticsearch) repo. - -1. Restoring from Snapshot to a fresh cluster -2. Live migration by joining a new cluster to the existing cluster. - -## Restoring from Snapshot - -This is the recommended and preferred option. The downside is that it will involve a period of write downtime during the migration. If you have a way to temporarily stop writes to your cluster then this is the way to go. This is also a lot simpler as it just involves launching a fresh cluster and restoring a snapshot following the [restoring to a different cluster guide](https://www.elastic.co/guide/en/elasticsearch/reference/6.6/modules-snapshots.html#_restoring_to_a_different_cluster). - -## Live migration - -If restoring from a snapshot is not possible due to the write downtime then a live migration is also possible. It is very important to first test this in a testing environment to make sure you are comfortable with the process and fully understand what is happening. - -This process will involve joining a new set of master, data and client nodes to an existing cluster that has been deployed using the [helm/charts](https://github.com/helm/charts/tree/master/stable/elasticsearch) community chart. Nodes will then be replaced one by one in a controlled fashion to decommission the old cluster. - -This example will be using the default values for the existing helm/charts release and for the elastic helm-charts release. If you have changed any of the default values then you will need to first make sure that your values are configured in a compatible way before starting the migration. - -The process will involve a re-sync and a rolling restart of all of your data nodes. Therefore it is important to disable shard allocation and perform a synced flush like you normally would during any other rolling upgrade. See the [rolling upgrades guide](https://www.elastic.co/guide/en/elasticsearch/reference/6.6/rolling-upgrades.html) for more information. - -* The default image for this chart is `docker.elastic.co/elasticsearch/elasticsearch` which contains the default distribution of Elasticsearch with a [basic license](https://www.elastic.co/subscriptions). Make sure to update the `image` and `imageTag` values to the correct Docker image and Elasticsearch version that you currently have deployed. -* Convert your current helm/charts configuration into something that is compatible with this chart. -* Take a fresh snapshot of your cluster. If something goes wrong you want to be able to restore your data no matter what. -* Check that your clusters health is green. If not abort and make sure your cluster is healthy before continuing. - ``` - curl localhost:9200/_cluster/health - ``` -* Deploy new data nodes which will join the existing cluster. Take a look at the configuration in [data.yml](./data.yml) - ``` - make data - ``` -* Check that the new nodes have joined the cluster (run this and any other curl commands from within one of your pods). - ``` - curl localhost:9200/_cat/nodes - ``` -* Check that your cluster is still green. If so we can now start to scale down the existing data nodes. Assuming you have the default amount of data nodes (2) we now want to scale it down to 1. - ``` - kubectl scale statefulsets my-release-elasticsearch-data --replicas=1 - ``` -* Wait for your cluster to become green again - ``` - watch 'curl -s localhost:9200/_cluster/health' - ``` -* Once the cluster is green we can scale down again. - ``` - kubectl scale statefulsets my-release-elasticsearch-data --replicas=0 - ``` -* Wait for the cluster to be green again. -* OK. We now have all data nodes running in the new cluster. Time to replace the masters by firstly scaling down the masters from 3 to 2. Between each step make sure to wait for the cluster to become green again, and check with `curl localhost:9200/_cat/nodes` that you see the correct amount of master nodes. During this process we will always make sure to keep at least 2 master nodes as to not lose quorum. - ``` - kubectl scale statefulsets my-release-elasticsearch-master --replicas=2 - ``` -* Now deploy a single new master so that we have 3 masters again. See [master.yml](./master.yml) for the configuration. - ``` - make master - ``` -* Scale down old masters to 1 - ``` - kubectl scale statefulsets my-release-elasticsearch-master --replicas=1 - ``` -* Edit the masters in [masters.yml](./masters.yml) to 2 and redeploy - ``` - make master - ``` -* Scale down the old masters to 0 - ``` - kubectl scale statefulsets my-release-elasticsearch-master --replicas=0 - ``` -* Edit the [masters.yml](./masters.yml) to have 3 replicas and remove the `discovery.zen.ping.unicast.hosts` entry from `extraEnvs` then redeploy the masters. This will make sure all 3 masters are running in the new cluster and are pointing at each other for discovery. - ``` - make master - ``` -* Remove the `discovery.zen.ping.unicast.hosts` entry from `extraEnvs` then redeploy the data nodes to make sure they are pointing at the new masters. - ``` - make data - ``` -* Deploy the client nodes - ``` - make client - ``` -* Update any processes that are talking to the existing client nodes and point them to the new client nodes. Once this is done you can scale down the old client nodes - ``` - kubectl scale deployment my-release-elasticsearch-client --replicas=0 - ``` -* The migration should now be complete. After verifying that everything is working correctly you can cleanup leftover resources from your old cluster. diff --git a/kubernetes/helm_charts/logging/elasticsearch/examples/migration/client.yml b/kubernetes/helm_charts/logging/elasticsearch/examples/migration/client.yml deleted file mode 100755 index 30ee700e3..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/examples/migration/client.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- - -replicas: 2 - -clusterName: "elasticsearch" -nodeGroup: "client" - -esMajorVersion: 6 - -roles: - master: "false" - ingest: "false" - data: "false" - -volumeClaimTemplate: - accessModes: [ "ReadWriteOnce" ] - storageClassName: "standard" - resources: - requests: - storage: 1Gi # Currently needed till pvcs are made optional - -persistence: - enabled: false diff --git a/kubernetes/helm_charts/logging/elasticsearch/examples/migration/data.yml b/kubernetes/helm_charts/logging/elasticsearch/examples/migration/data.yml deleted file mode 100755 index eedcbb063..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/examples/migration/data.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- - -replicas: 2 - -esMajorVersion: 6 - -extraEnvs: - - name: discovery.zen.ping.unicast.hosts - value: "my-release-elasticsearch-discovery" - -clusterName: "elasticsearch" -nodeGroup: "data" - -roles: - master: "false" - ingest: "false" - data: "true" diff --git a/kubernetes/helm_charts/logging/elasticsearch/examples/migration/master.yml b/kubernetes/helm_charts/logging/elasticsearch/examples/migration/master.yml deleted file mode 100755 index 3e3a2f172..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/examples/migration/master.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- - -# Temporarily set to 3 so we can scale up/down the old a new cluster -# one at a time whilst always keeping 3 masters running -replicas: 1 - -esMajorVersion: 6 - -extraEnvs: - - name: discovery.zen.ping.unicast.hosts - value: "my-release-elasticsearch-discovery" - -clusterName: "elasticsearch" -nodeGroup: "master" - -roles: - master: "true" - ingest: "false" - data: "false" - -volumeClaimTemplate: - accessModes: [ "ReadWriteOnce" ] - storageClassName: "standard" - resources: - requests: - storage: 4Gi diff --git a/kubernetes/helm_charts/logging/elasticsearch/examples/minikube/Makefile b/kubernetes/helm_charts/logging/elasticsearch/examples/minikube/Makefile deleted file mode 100755 index 97109ce8c..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/examples/minikube/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -default: test - -RELEASE := helm-es-minikube - -install: - helm upgrade --wait --timeout=900 --install --values values.yaml $(RELEASE) ../../ - -test: install - helm test $(RELEASE) - -purge: - helm del --purge $(RELEASE) diff --git a/kubernetes/helm_charts/logging/elasticsearch/examples/minikube/values.yaml b/kubernetes/helm_charts/logging/elasticsearch/examples/minikube/values.yaml deleted file mode 100755 index ccceb3a25..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/examples/minikube/values.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Permit co-located instances for solitary minikube virtual machines. -antiAffinity: "soft" - -# Shrink default JVM heap. -esJavaOpts: "-Xmx128m -Xms128m" - -# Allocate smaller chunks of memory per pod. -resources: - requests: - cpu: "100m" - memory: "512M" - limits: - cpu: "1000m" - memory: "512M" - -# Request smaller persistent volumes. -volumeClaimTemplate: - accessModes: [ "ReadWriteOnce" ] - storageClassName: "standard" - resources: - requests: - storage: 100M diff --git a/kubernetes/helm_charts/logging/elasticsearch/examples/multi/Makefile b/kubernetes/helm_charts/logging/elasticsearch/examples/multi/Makefile deleted file mode 100755 index 836ec2e0f..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/examples/multi/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -default: test - -include ../../../helpers/examples.mk - -PREFIX := helm-es-multi -RELEASE := helm-es-multi-master - -install: - helm upgrade --wait --timeout=600 --install --values ./master.yml $(PREFIX)-master ../../ - helm upgrade --wait --timeout=600 --install --values ./data.yml $(PREFIX)-data ../../ - -test: install goss - -purge: - helm del --purge $(PREFIX)-master - helm del --purge $(PREFIX)-data diff --git a/kubernetes/helm_charts/logging/elasticsearch/examples/multi/data.yml b/kubernetes/helm_charts/logging/elasticsearch/examples/multi/data.yml deleted file mode 100755 index ecc689337..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/examples/multi/data.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- - -clusterName: "multi" -nodeGroup: "data" - -roles: - master: "false" - ingest: "true" - data: "true" diff --git a/kubernetes/helm_charts/logging/elasticsearch/examples/multi/master.yml b/kubernetes/helm_charts/logging/elasticsearch/examples/multi/master.yml deleted file mode 100755 index 2ca4cca8e..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/examples/multi/master.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- - -clusterName: "multi" -nodeGroup: "master" - -roles: - master: "true" - ingest: "false" - data: "false" diff --git a/kubernetes/helm_charts/logging/elasticsearch/examples/multi/test/goss.yaml b/kubernetes/helm_charts/logging/elasticsearch/examples/multi/test/goss.yaml deleted file mode 100755 index 18cb25063..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/examples/multi/test/goss.yaml +++ /dev/null @@ -1,9 +0,0 @@ -http: - http://localhost:9200/_cluster/health: - status: 200 - timeout: 2000 - body: - - 'green' - - '"cluster_name":"multi"' - - '"number_of_nodes":6' - - '"number_of_data_nodes":3' diff --git a/kubernetes/helm_charts/logging/elasticsearch/examples/openshift/Makefile b/kubernetes/helm_charts/logging/elasticsearch/examples/openshift/Makefile deleted file mode 100755 index 6e495916d..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/examples/openshift/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -default: test -include ../../../helpers/examples.mk - -RELEASE := elasticsearch - -template: - helm template --values ./values.yaml ../../ - -install: - helm upgrade --wait --timeout=600 --install $(RELEASE) --values ./values.yaml ../../ - -test: install goss - -purge: - helm del --purge $(RELEASE) diff --git a/kubernetes/helm_charts/logging/elasticsearch/examples/openshift/test/goss.yaml b/kubernetes/helm_charts/logging/elasticsearch/examples/openshift/test/goss.yaml deleted file mode 100755 index 275754bb3..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/examples/openshift/test/goss.yaml +++ /dev/null @@ -1,17 +0,0 @@ -http: - http://localhost:9200/_cluster/health: - status: 200 - timeout: 2000 - body: - - 'green' - - '"number_of_nodes":3' - - '"number_of_data_nodes":3' - - http://localhost:9200: - status: 200 - timeout: 2000 - body: - - '"number" : "7.3.0"' - - '"cluster_name" : "elasticsearch"' - - '"name" : "elasticsearch-master-0"' - - 'You Know, for Search' diff --git a/kubernetes/helm_charts/logging/elasticsearch/examples/openshift/values.yaml b/kubernetes/helm_charts/logging/elasticsearch/examples/openshift/values.yaml deleted file mode 100755 index 7f5cd8494..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/examples/openshift/values.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- - -securityContext: - runAsUser: null - -podSecurityContext: - fsGroup: null - -sysctlInitContainer: - enabled: false diff --git a/kubernetes/helm_charts/logging/elasticsearch/examples/oss/Makefile b/kubernetes/helm_charts/logging/elasticsearch/examples/oss/Makefile deleted file mode 100755 index e274659c6..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/examples/oss/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -default: test -include ../../../helpers/examples.mk - -RELEASE := helm-es-oss - -install: - helm upgrade --wait --timeout=600 --install $(RELEASE) --values ./values.yaml ../../ - -test: install goss - -purge: - helm del --purge $(RELEASE) diff --git a/kubernetes/helm_charts/logging/elasticsearch/examples/oss/test/goss.yaml b/kubernetes/helm_charts/logging/elasticsearch/examples/oss/test/goss.yaml deleted file mode 100755 index 21e268b0d..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/examples/oss/test/goss.yaml +++ /dev/null @@ -1,17 +0,0 @@ -http: - http://localhost:9200/_cluster/health: - status: 200 - timeout: 2000 - body: - - 'green' - - '"number_of_nodes":3' - - '"number_of_data_nodes":3' - - http://localhost:9200: - status: 200 - timeout: 2000 - body: - - '"number" : "7.3.2"' - - '"cluster_name" : "oss"' - - '"name" : "oss-master-0"' - - 'You Know, for Search' diff --git a/kubernetes/helm_charts/logging/elasticsearch/examples/oss/values.yaml b/kubernetes/helm_charts/logging/elasticsearch/examples/oss/values.yaml deleted file mode 100755 index adcb7df3e..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/examples/oss/values.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- - -clusterName: "oss" -image: "docker.elastic.co/elasticsearch/elasticsearch-oss" diff --git a/kubernetes/helm_charts/logging/elasticsearch/examples/security/Makefile b/kubernetes/helm_charts/logging/elasticsearch/examples/security/Makefile deleted file mode 100755 index 1c7e7c28d..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/examples/security/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -default: test - -include ../../../helpers/examples.mk - -RELEASE := helm-es-security - -install: - helm upgrade --wait --timeout=600 --install --values ./security.yml $(RELEASE) ../../ - -purge: - kubectl delete secrets elastic-credentials elastic-certificates elastic-certificate-pem || true - helm del --purge $(RELEASE) - -test: secrets install goss - -secrets: - docker rm -f elastic-helm-charts-certs || true - rm -f elastic-certificates.p12 elastic-certificate.pem elastic-stack-ca.p12 || true - password=$$([ ! -z "$$ELASTIC_PASSWORD" ] && echo $$ELASTIC_PASSWORD || echo $$(docker run --rm docker.elastic.co/elasticsearch/elasticsearch:$(STACK_VERSION) /bin/sh -c "< /dev/urandom tr -cd '[:alnum:]' | head -c20")) && \ - docker run --name elastic-helm-charts-certs -i -w /app \ - docker.elastic.co/elasticsearch/elasticsearch:$(STACK_VERSION) \ - /bin/sh -c " \ - elasticsearch-certutil ca --out /app/elastic-stack-ca.p12 --pass '' && \ - elasticsearch-certutil cert --name security-master --dns security-master --ca /app/elastic-stack-ca.p12 --pass '' --ca-pass '' --out /app/elastic-certificates.p12" && \ - docker cp elastic-helm-charts-certs:/app/elastic-certificates.p12 ./ && \ - docker rm -f elastic-helm-charts-certs && \ - openssl pkcs12 -nodes -passin pass:'' -in elastic-certificates.p12 -out elastic-certificate.pem && \ - kubectl create secret generic elastic-certificates --from-file=elastic-certificates.p12 && \ - kubectl create secret generic elastic-certificate-pem --from-file=elastic-certificate.pem && \ - kubectl create secret generic elastic-credentials --from-literal=password=$$password --from-literal=username=elastic && \ - rm -f elastic-certificates.p12 elastic-certificate.pem elastic-stack-ca.p12 diff --git a/kubernetes/helm_charts/logging/elasticsearch/examples/security/security.yml b/kubernetes/helm_charts/logging/elasticsearch/examples/security/security.yml deleted file mode 100755 index 04d932caa..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/examples/security/security.yml +++ /dev/null @@ -1,38 +0,0 @@ ---- -clusterName: "security" -nodeGroup: "master" - -roles: - master: "true" - ingest: "true" - data: "true" - -protocol: https - -esConfig: - elasticsearch.yml: | - xpack.security.enabled: true - xpack.security.transport.ssl.enabled: true - xpack.security.transport.ssl.verification_mode: certificate - xpack.security.transport.ssl.keystore.path: /usr/share/elasticsearch/config/certs/elastic-certificates.p12 - xpack.security.transport.ssl.truststore.path: /usr/share/elasticsearch/config/certs/elastic-certificates.p12 - xpack.security.http.ssl.enabled: true - xpack.security.http.ssl.truststore.path: /usr/share/elasticsearch/config/certs/elastic-certificates.p12 - xpack.security.http.ssl.keystore.path: /usr/share/elasticsearch/config/certs/elastic-certificates.p12 - -extraEnvs: - - name: ELASTIC_PASSWORD - valueFrom: - secretKeyRef: - name: elastic-credentials - key: password - - name: ELASTIC_USERNAME - valueFrom: - secretKeyRef: - name: elastic-credentials - key: username - -secretMounts: - - name: elastic-certificates - secretName: elastic-certificates - path: /usr/share/elasticsearch/config/certs diff --git a/kubernetes/helm_charts/logging/elasticsearch/examples/security/test/goss.yaml b/kubernetes/helm_charts/logging/elasticsearch/examples/security/test/goss.yaml deleted file mode 100755 index c6d4b987b..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/examples/security/test/goss.yaml +++ /dev/null @@ -1,45 +0,0 @@ -http: - https://security-master:9200/_cluster/health: - status: 200 - timeout: 2000 - allow-insecure: true - username: '{{ .Env.ELASTIC_USERNAME }}' - password: '{{ .Env.ELASTIC_PASSWORD }}' - body: - - 'green' - - '"number_of_nodes":3' - - '"number_of_data_nodes":3' - - https://localhost:9200/: - status: 200 - timeout: 2000 - allow-insecure: true - username: '{{ .Env.ELASTIC_USERNAME }}' - password: '{{ .Env.ELASTIC_PASSWORD }}' - body: - - '"cluster_name" : "security"' - - '"name" : "security-master-0"' - - 'You Know, for Search' - - https://localhost:9200/_xpack/license: - status: 200 - timeout: 2000 - allow-insecure: true - username: '{{ .Env.ELASTIC_USERNAME }}' - password: '{{ .Env.ELASTIC_PASSWORD }}' - body: - - 'active' - - 'basic' - -file: - /usr/share/elasticsearch/config/elasticsearch.yml: - exists: true - contains: - - 'xpack.security.enabled: true' - - 'xpack.security.transport.ssl.enabled: true' - - 'xpack.security.transport.ssl.verification_mode: certificate' - - 'xpack.security.transport.ssl.keystore.path: /usr/share/elasticsearch/config/certs/elastic-certificates.p12' - - 'xpack.security.transport.ssl.truststore.path: /usr/share/elasticsearch/config/certs/elastic-certificates.p12' - - 'xpack.security.http.ssl.enabled: true' - - 'xpack.security.http.ssl.truststore.path: /usr/share/elasticsearch/config/certs/elastic-certificates.p12' - - 'xpack.security.http.ssl.keystore.path: /usr/share/elasticsearch/config/certs/elastic-certificates.p12' diff --git a/kubernetes/helm_charts/logging/elasticsearch/examples/upgrade/Makefile b/kubernetes/helm_charts/logging/elasticsearch/examples/upgrade/Makefile deleted file mode 100755 index 9e1e6fd5e..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/examples/upgrade/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -default: test - -include ../../../helpers/examples.mk - -RELEASE := helm-es-upgrade - -# Right now the version is hardcoded because helm install will ignore -# anything with an alpha tag when trying to install the latest release -# This hardcoding can be removed once we drop the alpha tag -# The "--set terminationGracePeriod=121" always makes sure that a rolling -# upgrade is forced for this test -install: - helm repo add elastic https://helm.elastic.co && \ - helm upgrade --wait --timeout=600 --install $(RELEASE) elastic/elasticsearch --version 7.0.0-alpha1 --set clusterName=upgrade ; \ - kubectl rollout status sts/upgrade-master --timeout=600s - helm upgrade --wait --timeout=600 --set terminationGracePeriod=121 --install $(RELEASE) ../../ --set clusterName=upgrade ; \ - kubectl rollout status sts/upgrade-master --timeout=600s - -init: - helm init --client-only - -test: init install goss - -purge: - helm del --purge $(RELEASE) diff --git a/kubernetes/helm_charts/logging/elasticsearch/examples/upgrade/test/goss.yaml b/kubernetes/helm_charts/logging/elasticsearch/examples/upgrade/test/goss.yaml deleted file mode 100755 index 5e20f7fea..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/examples/upgrade/test/goss.yaml +++ /dev/null @@ -1,17 +0,0 @@ -http: - http://localhost:9200/_cluster/health: - status: 200 - timeout: 2000 - body: - - 'green' - - '"number_of_nodes":3' - - '"number_of_data_nodes":3' - - http://localhost:9200: - status: 200 - timeout: 2000 - body: - - '"number" : "7.3.2"' - - '"cluster_name" : "upgrade"' - - '"name" : "upgrade-master-0"' - - 'You Know, for Search' diff --git a/kubernetes/helm_charts/logging/elasticsearch/templates/NOTES.txt b/kubernetes/helm_charts/logging/elasticsearch/templates/NOTES.txt deleted file mode 100755 index 3600c6b55..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/templates/NOTES.txt +++ /dev/null @@ -1,4 +0,0 @@ -1. Watch all cluster members come up. - $ kubectl get pods --namespace={{ .Release.Namespace }} -l app={{ template "uname" . }} -w -2. Test cluster health using Helm test. - $ helm test {{ .Release.Name }} diff --git a/kubernetes/helm_charts/logging/elasticsearch/templates/_helpers.tpl b/kubernetes/helm_charts/logging/elasticsearch/templates/_helpers.tpl deleted file mode 100755 index ccfd8c338..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/templates/_helpers.tpl +++ /dev/null @@ -1,71 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "fullname" -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{- define "uname" -}} -{{ .Values.clusterName }}-{{ .Values.nodeGroup }} -{{- end -}} - -{{- define "masterService" -}} -{{- if empty .Values.masterService -}} -{{ .Values.clusterName }}-master -{{- else -}} -{{ .Values.masterService }} -{{- end -}} -{{- end -}} - -{{- define "endpoints" -}} -{{- $replicas := .Values.replicas | int }} -{{- $uname := printf "%s-%s" .Values.clusterName .Values.nodeGroup }} - {{- range $i, $e := untilStep 0 $replicas 1 -}} -{{ $uname }}-{{ $i }}, - {{- end -}} -{{- end -}} - -{{- define "esMajorVersion" -}} -{{- if .Values.esMajorVersion -}} -{{ .Values.esMajorVersion }} -{{- else -}} -{{- $version := int (index (.Values.imageTag | splitList ".") 0) -}} - {{- if and (contains "docker.elastic.co/elasticsearch/elasticsearch" .Values.image) (not (eq $version 0)) -}} -{{ $version }} - {{- else -}} -7 - {{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for statefulset. -*/}} -{{- define "elasticsearch.statefulset.apiVersion" -}} -{{- if semverCompare "<1.9-0" .Capabilities.KubeVersion.GitVersion -}} -{{- print "apps/v1beta2" -}} -{{- else -}} -{{- print "apps/v1" -}} -{{- end -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for ingress. -*/}} -{{- define "elasticsearch.ingress.apiVersion" -}} -{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}} -{{- print "extensions/v1beta1" -}} -{{- else -}} -{{- print "networking.k8s.io/v1beta1" -}} -{{- end -}} -{{- end -}} diff --git a/kubernetes/helm_charts/logging/elasticsearch/templates/configmap.yaml b/kubernetes/helm_charts/logging/elasticsearch/templates/configmap.yaml deleted file mode 100755 index 6d252ae7e..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/templates/configmap.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{- if .Values.esConfig }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "uname" . }}-config - namespace: {{ .Values.namespace }} - labels: - heritage: {{ .Release.Service | quote }} - release: {{ .Release.Name | quote }} - chart: "{{ .Chart.Name }}" - app: "{{ template "uname" . }}" -data: -{{- range $path, $config := .Values.esConfig }} - {{ $path }}: | -{{ $config | indent 4 -}} -{{- end -}} -{{- end -}} diff --git a/kubernetes/helm_charts/logging/elasticsearch/templates/ingress.yaml b/kubernetes/helm_charts/logging/elasticsearch/templates/ingress.yaml deleted file mode 100755 index 71891f9b6..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/templates/ingress.yaml +++ /dev/null @@ -1,39 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $fullName := include "uname" . -}} -{{- $servicePort := .Values.httpPort -}} -{{- $ingressPath := .Values.ingress.path -}} -apiVersion: {{ template "elasticsearch.ingress.apiVersion" . }} -kind: Ingress -metadata: - name: {{ $fullName }} - namespace: {{ .Values.namespace }} - labels: - app: {{ .Chart.Name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -{{- with .Values.ingress.annotations }} - annotations: -{{ toYaml . | indent 4 }} -{{- end }} -spec: -{{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} -{{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ . }} - http: - paths: - - path: {{ $ingressPath }} - backend: - serviceName: {{ $fullName }} - servicePort: {{ $servicePort }} - {{- end }} -{{- end }} diff --git a/kubernetes/helm_charts/logging/elasticsearch/templates/poddisruptionbudget.yaml b/kubernetes/helm_charts/logging/elasticsearch/templates/poddisruptionbudget.yaml deleted file mode 100755 index 21b63b345..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/templates/poddisruptionbudget.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -{{- if .Values.maxUnavailable }} -apiVersion: policy/v1beta1 -kind: PodDisruptionBudget -metadata: - name: "{{ template "uname" . }}-pdb" - namespace: {{ .Values.namespace }} -spec: - maxUnavailable: {{ .Values.maxUnavailable }} - selector: - matchLabels: - app: "{{ template "uname" . }}" -{{- end }} diff --git a/kubernetes/helm_charts/logging/elasticsearch/templates/podsecuritypolicy.yaml b/kubernetes/helm_charts/logging/elasticsearch/templates/podsecuritypolicy.yaml deleted file mode 100755 index aa8aa7090..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/templates/podsecuritypolicy.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if .Values.podSecurityPolicy.create -}} -{{- $fullName := include "uname" . -}} -apiVersion: policy/v1beta1 -kind: PodSecurityPolicy -metadata: - name: {{ default $fullName .Values.podSecurityPolicy.name | quote }} - namespace: {{ .Values.namespace }} - labels: - heritage: {{ .Release.Service | quote }} - release: {{ .Release.Name | quote }} - chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" - app: {{ $fullName | quote }} -spec: -{{ toYaml .Values.podSecurityPolicy.spec | indent 2 }} -{{- end -}} diff --git a/kubernetes/helm_charts/logging/elasticsearch/templates/role.yaml b/kubernetes/helm_charts/logging/elasticsearch/templates/role.yaml deleted file mode 100755 index 3259959f6..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/templates/role.yaml +++ /dev/null @@ -1,26 +0,0 @@ -{{- if .Values.rbac.create -}} -{{- $fullName := include "uname" . -}} -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: {{ $fullName | quote }} - namespace: {{ .Values.namespace }} - labels: - heritage: {{ .Release.Service | quote }} - release: {{ .Release.Name | quote }} - chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" - app: {{ $fullName | quote }} -rules: - - apiGroups: - - extensions - resources: - - podsecuritypolicies - resourceNames: - {{- if eq .Values.podSecurityPolicy.name "" }} - - {{ $fullName | quote }} - {{- else }} - - {{ .Values.podSecurityPolicy.name | quote }} - {{- end }} - verbs: - - use -{{- end -}} diff --git a/kubernetes/helm_charts/logging/elasticsearch/templates/rolebinding.yaml b/kubernetes/helm_charts/logging/elasticsearch/templates/rolebinding.yaml deleted file mode 100755 index 953c8cb3a..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/templates/rolebinding.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{- if .Values.rbac.create -}} -{{- $fullName := include "uname" . -}} -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: {{ $fullName | quote }} - namespace: {{ .Values.namespace }} - labels: - heritage: {{ .Release.Service | quote }} - release: {{ .Release.Name | quote }} - chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" - app: {{ $fullName | quote }} -subjects: - - kind: ServiceAccount - {{- if eq .Values.rbac.serviceAccountName "" }} - name: {{ $fullName | quote }} - {{- else }} - name: {{ .Values.rbac.serviceAccountName | quote }} - {{- end }} - namespace: {{ .Values.namespace }} -roleRef: - kind: Role - name: {{ $fullName | quote }} - apiGroup: rbac.authorization.k8s.io -{{- end -}} diff --git a/kubernetes/helm_charts/logging/elasticsearch/templates/service.yaml b/kubernetes/helm_charts/logging/elasticsearch/templates/service.yaml deleted file mode 100755 index 83bfc9a90..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/templates/service.yaml +++ /dev/null @@ -1,54 +0,0 @@ ---- -kind: Service -apiVersion: v1 -metadata: - name: {{ template "uname" . }} - namespace: {{ .Values.namespace }} - labels: - heritage: {{ .Release.Service | quote }} - release: {{ .Release.Name | quote }} - chart: "{{ .Chart.Name }}" - app: "{{ template "uname" . }}" - annotations: -{{ toYaml .Values.service.annotations | indent 4 }} -spec: - type: {{ .Values.service.type }} - selector: - heritage: {{ .Release.Service | quote }} - release: {{ .Release.Name | quote }} - chart: "{{ .Chart.Name }}" - app: "{{ template "uname" . }}" - ports: - - name: {{ .Values.service.httpPortName | default "http" }} - protocol: TCP - port: {{ .Values.httpPort }} -{{- if .Values.service.nodePort }} - nodePort: {{ .Values.service.nodePort }} -{{- end }} - - name: {{ .Values.service.transportPortName | default "transport" }} - protocol: TCP - port: {{ .Values.transportPort }} ---- -kind: Service -apiVersion: v1 -metadata: - name: {{ template "uname" . }}-headless - namespace: {{ .Values.namespace }} - labels: - heritage: {{ .Release.Service | quote }} - release: {{ .Release.Name | quote }} - chart: "{{ .Chart.Name }}" - app: "{{ template "uname" . }}" - annotations: - service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" -spec: - clusterIP: None # This is needed for statefulset hostnames like elasticsearch-0 to resolve - # Create endpoints also if the related pod isn't ready - publishNotReadyAddresses: true - selector: - app: "{{ template "uname" . }}" - ports: - - name: {{ .Values.service.httpPortName | default "http" }} - port: {{ .Values.httpPort }} - - name: {{ .Values.service.transportPortName | default "transport" }} - port: {{ .Values.transportPort }} diff --git a/kubernetes/helm_charts/logging/elasticsearch/templates/serviceaccount.yaml b/kubernetes/helm_charts/logging/elasticsearch/templates/serviceaccount.yaml deleted file mode 100755 index dc38334b9..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/templates/serviceaccount.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{- if .Values.rbac.create -}} -{{- $fullName := include "uname" . -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - {{- if eq .Values.rbac.serviceAccountName "" }} - name: {{ $fullName | quote }} - {{- else }} - name: {{ .Values.rbac.serviceAccountName | quote }} - {{- end }} - namespace: {{ .Values.namespace }} - labels: - heritage: {{ .Release.Service | quote }} - release: {{ .Release.Name | quote }} - chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" - app: {{ $fullName | quote }} -{{- end -}} diff --git a/kubernetes/helm_charts/logging/elasticsearch/templates/statefulset.yaml b/kubernetes/helm_charts/logging/elasticsearch/templates/statefulset.yaml deleted file mode 100755 index 59729e334..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/templates/statefulset.yaml +++ /dev/null @@ -1,345 +0,0 @@ ---- -apiVersion: {{ template "elasticsearch.statefulset.apiVersion" . }} -kind: StatefulSet -metadata: - name: {{ template "uname" . }} - namespace: {{ .Values.namespace }} - labels: - heritage: {{ .Release.Service | quote }} - release: {{ .Release.Name | quote }} - chart: "{{ .Chart.Name }}" - app: "{{ template "uname" . }}" - {{- range $key, $value := .Values.labels }} - {{ $key }}: {{ $value | quote }} - {{- end }} - annotations: - esMajorVersion: "{{ include "esMajorVersion" . }}" -spec: - serviceName: {{ template "uname" . }}-headless - selector: - matchLabels: - app: "{{ template "uname" . }}" - replicas: {{ default .Values.replicas }} - podManagementPolicy: {{ .Values.podManagementPolicy }} - updateStrategy: - type: {{ .Values.updateStrategy }} - {{- if .Values.persistence.enabled }} - volumeClaimTemplates: - - metadata: - name: {{ template "uname" . }} - {{- with .Values.persistence.annotations }} - annotations: -{{ toYaml . | indent 8 }} - {{- end }} - spec: -{{ toYaml .Values.volumeClaimTemplate | indent 6 }} - {{- end }} - template: - metadata: - name: "{{ template "uname" . }}" - labels: - heritage: {{ .Release.Service | quote }} - release: {{ .Release.Name | quote }} - chart: "{{ .Chart.Name }}" - app: "{{ template "uname" . }}" - annotations: - {{- range $key, $value := .Values.podAnnotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{/* This forces a restart if the configmap has changed */}} - {{- if .Values.esConfig }} - configchecksum: {{ include (print .Template.BasePath "/configmap.yaml") . | sha256sum | trunc 63 }} - {{- end }} - spec: - {{- if .Values.schedulerName }} - schedulerName: "{{ .Values.schedulerName }}" - {{- end }} - securityContext: -{{ toYaml .Values.podSecurityContext | indent 8 }} - {{- if .Values.fsGroup }} - fsGroup: {{ .Values.fsGroup }} # Deprecated value, please use .Values.podSecurityContext.fsGroup - {{- end }} - {{- if .Values.rbac.create }} - serviceAccountName: "{{ template "uname" . }}" - {{- else if not (eq .Values.rbac.serviceAccountName "") }} - serviceAccountName: {{ .Values.rbac.serviceAccountName | quote }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: -{{ toYaml . | indent 6 }} - {{- end }} - {{- with .Values.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if or (eq .Values.antiAffinity "hard") (eq .Values.antiAffinity "soft") .Values.nodeAffinity }} - {{- if .Values.priorityClassName }} - priorityClassName: {{ .Values.priorityClassName }} - {{- end }} - affinity: - {{- end }} - {{- if eq .Values.antiAffinity "hard" }} - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - "{{ template "uname" .}}" - topologyKey: {{ .Values.antiAffinityTopologyKey }} - {{- else if eq .Values.antiAffinity "soft" }} - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - topologyKey: {{ .Values.antiAffinityTopologyKey }} - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - "{{ template "uname" . }}" - {{- end }} - {{- with .Values.nodeAffinity }} - nodeAffinity: -{{ toYaml . | indent 10 }} - {{- end }} - terminationGracePeriodSeconds: {{ .Values.terminationGracePeriod }} - volumes: - {{- range .Values.secretMounts }} - - name: {{ .name }} - secret: - secretName: {{ .secretName }} - {{- end }} - {{- if .Values.esConfig }} - - name: esconfig - configMap: - name: {{ template "uname" . }}-config - {{- end }} -{{- if .Values.keystore }} - - name: keystore - emptyDir: {} - {{- range .Values.keystore }} - - name: keystore-{{ .secretName }} - secret: {{ toYaml . | nindent 12 }} - {{- end }} -{{ end }} - {{- if .Values.extraVolumes }} -{{ tpl .Values.extraVolumes . | indent 8 }} - {{- end }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: -{{ toYaml .Values.imagePullSecrets | indent 8 }} - {{- end }} - initContainers: - {{- if .Values.sysctlInitContainer.enabled }} - - name: configure-sysctl - securityContext: - runAsUser: 0 - privileged: true - image: "{{ .Values.image }}:{{ .Values.imageTag }}" - command: ["sysctl", "-w", "vm.max_map_count={{ .Values.sysctlVmMaxMapCount}}"] - resources: -{{ toYaml .Values.initResources | indent 10 }} - {{- end }} -{{ if .Values.keystore }} - - name: keystore - image: "{{ .Values.image }}:{{ .Values.imageTag }}" - command: - - sh - - -c - - | - #!/usr/bin/env bash - set -euo pipefail - - elasticsearch-keystore create - - for i in /tmp/keystoreSecrets/*/*; do - key=$(basename $i) - echo "Adding file $i to keystore key $key" - elasticsearch-keystore add-file "$key" "$i" - done - - # Add the bootstrap password since otherwise the Elasticsearch entrypoint tries to do this on startup - [ ! -z ${ELASTIC_PASSWORD+x} ] && echo "$ELASTIC_PASSWORD" | elasticsearch-keystore add -x bootstrap.password - - cp -a /usr/share/elasticsearch/config/elasticsearch.keystore /tmp/keystore/ - env: {{ toYaml .Values.extraEnvs | nindent 10 }} - resources: {{ toYaml .Values.initResources | nindent 10 }} - volumeMounts: - - name: keystore - mountPath: /tmp/keystore - {{- range .Values.keystore }} - - name: keystore-{{ .secretName }} - mountPath: /tmp/keystoreSecrets/{{ .secretName }} - {{- end }} -{{ end }} - {{- if .Values.extraInitContainers }} -{{ tpl .Values.extraInitContainers . | indent 6 }} - {{- end }} - containers: - - name: "{{ template "name" . }}" - securityContext: -{{ toYaml .Values.securityContext | indent 10 }} - image: "{{ .Values.image }}:{{ .Values.imageTag }}" - imagePullPolicy: "{{ .Values.imagePullPolicy }}" - readinessProbe: -{{ toYaml .Values.readinessProbe | indent 10 }} - exec: - command: - - sh - - -c - - | - #!/usr/bin/env bash -e - # If the node is starting up wait for the cluster to be ready (request params: '{{ .Values.clusterHealthCheckParams }}' ) - # Once it has started only check that the node itself is responding - START_FILE=/tmp/.es_start_file - - http () { - local path="${1}" - if [ -n "${ELASTIC_USERNAME}" ] && [ -n "${ELASTIC_PASSWORD}" ]; then - BASIC_AUTH="-u ${ELASTIC_USERNAME}:${ELASTIC_PASSWORD}" - else - BASIC_AUTH='' - fi - curl -XGET -s -k --fail ${BASIC_AUTH} {{ .Values.protocol }}://127.0.0.1:{{ .Values.httpPort }}${path} - } - - if [ -f "${START_FILE}" ]; then - echo 'Elasticsearch is already running, lets check the node is healthy' - http "/" - else - echo 'Waiting for elasticsearch cluster to become cluster to be ready (request params: "{{ .Values.clusterHealthCheckParams }}" )' - if http "/_cluster/health?{{ .Values.clusterHealthCheckParams }}" ; then - touch ${START_FILE} - exit 0 - else - echo 'Cluster is not yet ready (request params: "{{ .Values.clusterHealthCheckParams }}" )' - exit 1 - fi - fi - ports: - - name: http - containerPort: {{ .Values.httpPort }} - - name: transport - containerPort: {{ .Values.transportPort }} - resources: -{{ toYaml .Values.resources | indent 10 }} - env: - - name: node.name - valueFrom: - fieldRef: - fieldPath: metadata.name - {{- if eq .Values.roles.master "true" }} - {{- if ge (int (include "esMajorVersion" .)) 7 }} - - name: cluster.initial_master_nodes - value: "{{ template "endpoints" . }}" - {{- else }} - - name: discovery.zen.minimum_master_nodes - value: "{{ .Values.minimumMasterNodes }}" - {{- end }} - {{- end }} - {{- if lt (int (include "esMajorVersion" .)) 7 }} - - name: discovery.zen.ping.unicast.hosts - value: "{{ template "masterService" . }}-headless" - {{- else }} - - name: discovery.seed_hosts - value: "{{ template "masterService" . }}-headless" - {{- end }} - - name: cluster.name - value: "{{ .Values.clusterName }}" - - name: network.host - value: "{{ .Values.networkHost }}" - - name: ES_JAVA_OPTS - value: "{{ .Values.esJavaOpts }}" - {{- range $role, $enabled := .Values.roles }} - - name: node.{{ $role }} - value: "{{ $enabled }}" - {{- end }} -{{- if .Values.extraEnvs }} -{{ toYaml .Values.extraEnvs | indent 10 }} -{{- end }} - volumeMounts: - {{- if .Values.persistence.enabled }} - - name: "{{ template "uname" . }}" - mountPath: /usr/share/elasticsearch/data - {{- end }} -{{ if .Values.keystore }} - - name: keystore - mountPath: /usr/share/elasticsearch/config/elasticsearch.keystore - subPath: elasticsearch.keystore -{{ end }} - {{- range .Values.secretMounts }} - - name: {{ .name }} - mountPath: {{ .path }} - {{- if .subPath }} - subPath: {{ .subPath }} - {{- end }} - {{- end }} - {{- range $path, $config := .Values.esConfig }} - - name: esconfig - mountPath: /usr/share/elasticsearch/config/{{ $path }} - subPath: {{ $path }} - {{- end -}} - {{- if .Values.extraVolumeMounts }} -{{ tpl .Values.extraVolumeMounts . | indent 10 }} - {{- end }} - {{- if .Values.masterTerminationFix }} - {{- if eq .Values.roles.master "true" }} - # This sidecar will prevent slow master re-election - # https://github.com/elastic/helm-charts/issues/63 - - name: elasticsearch-master-graceful-termination-handler - image: "{{ .Values.image }}:{{ .Values.imageTag }}" - imagePullPolicy: "{{ .Values.imagePullPolicy }}" - command: - - "sh" - - -c - - | - #!/usr/bin/env bash - set -eo pipefail - - http () { - local path="${1}" - if [ -n "${ELASTIC_USERNAME}" ] && [ -n "${ELASTIC_PASSWORD}" ]; then - BASIC_AUTH="-u ${ELASTIC_USERNAME}:${ELASTIC_PASSWORD}" - else - BASIC_AUTH='' - fi - curl -XGET -s -k --fail ${BASIC_AUTH} {{ .Values.protocol }}://{{ template "masterService" . }}:{{ .Values.httpPort }}${path} - } - - cleanup () { - while true ; do - local master="$(http "/_cat/master?h=node" || echo "")" - if [[ $master == "{{ template "masterService" . }}"* && $master != "${NODE_NAME}" ]]; then - echo "This node is not master." - break - fi - echo "This node is still master, waiting gracefully for it to step down" - sleep 1 - done - - exit 0 - } - - trap cleanup SIGTERM - - sleep infinity & - wait $! - resources: -{{ toYaml .Values.sidecarResources | indent 10 }} - env: - - name: NODE_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - {{- if .Values.extraEnvs }} -{{ toYaml .Values.extraEnvs | indent 10 }} - {{- end }} - {{- end }} - {{- end }} -{{- if .Values.lifecycle }} - lifecycle: -{{ toYaml .Values.lifecycle | indent 10 }} -{{- end }} diff --git a/kubernetes/helm_charts/logging/elasticsearch/templates/test/test-elasticsearch-health.yaml b/kubernetes/helm_charts/logging/elasticsearch/templates/test/test-elasticsearch-health.yaml deleted file mode 100755 index 14541156a..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/templates/test/test-elasticsearch-health.yaml +++ /dev/null @@ -1,18 +0,0 @@ ---- -apiVersion: v1 -kind: Pod -metadata: - name: "{{ .Release.Name }}-{{ randAlpha 5 | lower }}-test" - annotations: - "helm.sh/hook": test-success -spec: - containers: - - name: "{{ .Release.Name }}-{{ randAlpha 5 | lower }}-test" - image: "{{ .Values.image }}:{{ .Values.imageTag }}" - command: - - "sh" - - "-c" - - | - #!/usr/bin/env bash -e - curl -XGET --fail '{{ template "uname" . }}:{{ .Values.httpPort }}/_cluster/health?{{ .Values.clusterHealthCheckParams }}' - restartPolicy: Never diff --git a/kubernetes/helm_charts/logging/elasticsearch/tests/elasticsearch_test.py b/kubernetes/helm_charts/logging/elasticsearch/tests/elasticsearch_test.py deleted file mode 100755 index 4517c9fc7..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/tests/elasticsearch_test.py +++ /dev/null @@ -1,971 +0,0 @@ -import os -import sys -sys.path.insert(1, os.path.join(sys.path[0], '../../helpers')) -from helpers import helm_template -import yaml - -clusterName = 'elasticsearch' -nodeGroup = 'master' -uname = clusterName + '-' + nodeGroup - - -def test_defaults(): - config = ''' - ''' - - r = helm_template(config) - - # Statefulset - assert r['statefulset'][uname]['spec']['replicas'] == 3 - assert r['statefulset'][uname]['spec']['updateStrategy'] == { - 'type': 'RollingUpdate'} - assert r['statefulset'][uname]['spec']['podManagementPolicy'] == 'Parallel' - assert r['statefulset'][uname]['spec']['serviceName'] == uname + '-headless' - assert r['statefulset'][uname]['spec']['template']['spec']['affinity']['podAntiAffinity']['requiredDuringSchedulingIgnoredDuringExecution'][0] == \ - { - "labelSelector": { - "matchExpressions": [ - { - "key": "app", - "operator": "In", - "values": [ - uname - ] - } - ] - }, - "topologyKey": "kubernetes.io/hostname" - } - - # Default environment variables - env_vars = [ - { - 'name': 'node.name', - 'valueFrom': { - 'fieldRef': { - 'fieldPath': 'metadata.name' - } - } - }, - { - 'name': 'cluster.initial_master_nodes', - 'value': uname + '-0,' + - uname + '-1,' + - uname + '-2,' - }, - { - 'name': 'discovery.seed_hosts', - 'value': uname + '-headless' - - }, - { - 'name': 'network.host', - 'value': '0.0.0.0' - }, - { - 'name': 'cluster.name', - 'value': clusterName - }, - { - 'name': 'ES_JAVA_OPTS', - 'value': '-Xmx1g -Xms1g' - }, - { - 'name': 'node.master', - 'value': 'true' - }, - { - 'name': 'node.data', - 'value': 'true' - }, - { - 'name': 'node.ingest', - 'value': 'true' - }, - ] - - c = r['statefulset'][uname]['spec']['template']['spec']['containers'][0] - for env in env_vars: - assert env in c['env'] - - # Image - assert c['image'].startswith( - 'docker.elastic.co/elasticsearch/elasticsearch:') - assert c['imagePullPolicy'] == 'IfNotPresent' - assert c['name'] == 'elasticsearch' - - # Ports - assert c['ports'][0] == {'name': 'http', 'containerPort': 9200} - assert c['ports'][1] == {'name': 'transport', 'containerPort': 9300} - - # Health checks - assert c['readinessProbe']['failureThreshold'] == 3 - assert c['readinessProbe']['initialDelaySeconds'] == 10 - assert c['readinessProbe']['periodSeconds'] == 10 - assert c['readinessProbe']['successThreshold'] == 3 - assert c['readinessProbe']['timeoutSeconds'] == 5 - - assert 'curl' in c['readinessProbe']['exec']['command'][-1] - assert 'http://127.0.0.1:9200' in c['readinessProbe']['exec']['command'][-1] - - # Resources - assert c['resources'] == { - 'requests': { - 'cpu': '100m', - 'memory': '2Gi' - }, - 'limits': { - 'cpu': '1000m', - 'memory': '2Gi' - } - } - - # Mounts - assert c['volumeMounts'][0]['mountPath'] == '/usr/share/elasticsearch/data' - assert c['volumeMounts'][0]['name'] == uname - - v = r['statefulset'][uname]['spec']['volumeClaimTemplates'][0] - assert v['metadata']['name'] == uname - assert v['spec']['accessModes'] == ['ReadWriteOnce'] - assert v['spec']['resources']['requests']['storage'] == '30Gi' - - # Init container - i = r['statefulset'][uname]['spec']['template']['spec']['initContainers'][0] - assert i['name'] == 'configure-sysctl' - assert i['command'] == ['sysctl', '-w', 'vm.max_map_count=262144'] - assert i['image'].startswith( - 'docker.elastic.co/elasticsearch/elasticsearch:') - assert i['securityContext'] == { - 'privileged': True, - 'runAsUser': 0 - } - - # Other - assert r['statefulset'][uname]['spec']['template']['spec']['securityContext'] == { - 'fsGroup': 1000, - 'runAsUser': 1000 - } - assert r['statefulset'][uname]['spec']['template']['spec']['terminationGracePeriodSeconds'] == 120 - - # Pod disruption budget - assert r['poddisruptionbudget'][uname + - '-pdb']['spec']['maxUnavailable'] == 1 - - # Service - s = r['service'][uname] - assert s['metadata']['name'] == uname - assert s['metadata']['annotations'] == {} - assert s['spec']['type'] == 'ClusterIP' - assert len(s['spec']['ports']) == 2 - assert s['spec']['ports'][0] == { - 'name': 'http', 'port': 9200, 'protocol': 'TCP'} - assert s['spec']['ports'][1] == { - 'name': 'transport', 'port': 9300, 'protocol': 'TCP'} - - # Headless Service - h = r['service'][uname + '-headless'] - assert h['spec']['clusterIP'] == 'None' - assert h['spec']['publishNotReadyAddresses'] == True - assert h['spec']['ports'][0]['name'] == 'http' - assert h['spec']['ports'][0]['port'] == 9200 - assert h['spec']['ports'][1]['name'] == 'transport' - assert h['spec']['ports'][1]['port'] == 9300 - - # Empty customizable defaults - assert 'imagePullSecrets' not in r['statefulset'][uname]['spec']['template']['spec'] - assert 'tolerations' not in r['statefulset'][uname]['spec']['template']['spec'] - assert 'nodeSelector' not in r['statefulset'][uname]['spec']['template']['spec'] - assert 'ingress' not in r - - -def test_increasing_the_replicas(): - config = ''' -replicas: 5 -''' - r = helm_template(config) - assert r['statefulset'][uname]['spec']['replicas'] == 5 - - -def test_disabling_pod_disruption_budget(): - config = ''' -maxUnavailable: false -''' - r = helm_template(config) - assert 'poddisruptionbudget' not in r - - -def test_overriding_the_image_and_tag(): - config = ''' -image: customImage -imageTag: 6.2.4 -''' - r = helm_template(config) - assert r['statefulset'][uname]['spec']['template']['spec']['containers'][0]['image'] == 'customImage:6.2.4' - - -def test_set_discovery_hosts_to_custom_master_service(): - config = ''' -esMajorVersion: 6 -masterService: "elasticsearch-custommaster" -''' - r = helm_template(config) - env = r['statefulset'][uname]['spec']['template']['spec']['containers'][0]['env'] - assert {'name': 'discovery.zen.ping.unicast.hosts', - 'value': 'elasticsearch-custommaster-headless'} in env - - -def test_set_master_service_to_default_nodegroup_name_if_not_set(): - config = ''' -esMajorVersion: 6 -nodeGroup: "data" -''' - r = helm_template(config) - env = r['statefulset']['elasticsearch-data']['spec']['template']['spec']['containers'][0]['env'] - assert {'name': 'discovery.zen.ping.unicast.hosts', - 'value': 'elasticsearch-master-headless'} in env - - -def test_set_master_service_to_default_nodegroup_name_with_custom_cluster_name(): - config = ''' -esMajorVersion: 6 -clusterName: "custom" -nodeGroup: "data" -''' - r = helm_template(config) - env = r['statefulset']['custom-data']['spec']['template']['spec']['containers'][0]['env'] - assert {'name': 'discovery.zen.ping.unicast.hosts', - 'value': 'custom-master-headless'} in env - - -def test_set_initial_master_nodes_when_using_v_7(): - config = ''' -esMajorVersion: 7 -roles: - master: "true" -''' - r = helm_template(config) - env = r['statefulset'][uname]['spec']['template']['spec']['containers'][0]['env'] - assert { - 'name': 'cluster.initial_master_nodes', - 'value': 'elasticsearch-master-0,' + - 'elasticsearch-master-1,' + - 'elasticsearch-master-2,' - } in env - - for e in env: - assert e['name'] != 'discovery.zen.minimum_master_nodes' - - -def test_dont_set_initial_master_nodes_if_not_master_when_using_es_version_7(): - config = ''' -esMajorVersion: 7 -roles: - master: "false" -''' - r = helm_template(config) - env = r['statefulset'][uname]['spec']['template']['spec']['containers'][0]['env'] - for e in env: - assert e['name'] != 'cluster.initial_master_nodes' - - -def test_set_discovery_seed_host_when_using_v_7(): - config = ''' -esMajorVersion: 7 -roles: - master: "true" -''' - r = helm_template(config) - env = r['statefulset'][uname]['spec']['template']['spec']['containers'][0]['env'] - assert { - 'name': 'discovery.seed_hosts', - 'value': 'elasticsearch-master-headless' - } in env - - for e in env: - assert e['name'] != 'discovery.zen.ping.unicast.hosts' - - -def test_enabling_machine_learning_role(): - config = ''' -roles: - ml: "true" -''' - r = helm_template(config) - env = r['statefulset'][uname]['spec']['template']['spec']['containers'][0]['env'] - - assert {'name': 'node.ml', - 'value': 'true'} in env - - -def test_adding_extra_env_vars(): - config = ''' -extraEnvs: - - name: hello - value: world -''' - r = helm_template(config) - env = r['statefulset'][uname]['spec']['template']['spec']['containers'][0]['env'] - assert {'name': 'hello', 'value': 'world'} in env - - -def test_adding_a_extra_volume_with_volume_mount(): - config = ''' -extraVolumes: | - - name: extras - emptyDir: {} -extraVolumeMounts: | - - name: extras - mountPath: /usr/share/extras - readOnly: true -''' - r = helm_template(config) - extraVolume = r['statefulset'][uname]['spec']['template']['spec']['volumes'] - assert {'name': 'extras', 'emptyDir': {}} in extraVolume - extraVolumeMounts = r['statefulset'][uname]['spec']['template']['spec']['containers'][0]['volumeMounts'] - assert {'name': 'extras', 'mountPath': '/usr/share/extras', 'readOnly': True} in extraVolumeMounts - - -def test_adding_a_extra_init_container(): - config = ''' -extraInitContainers: | - - name: do-something - image: busybox - command: ['do', 'something'] -''' - r = helm_template(config) - extraInitContainer = r['statefulset'][uname]['spec']['template']['spec']['initContainers'] - assert {'name': 'do-something', 'image': 'busybox', 'command': ['do', 'something'], } in extraInitContainer - -def test_sysctl_init_container_disabled(): - config = ''' -sysctlInitContainer: - enabled: false -''' - r = helm_template(config) - initContainers = r['statefulset'][uname]['spec']['template']['spec']['initContainers'] - assert initContainers is None - -def test_sysctl_init_container_enabled(): - config = ''' -sysctlInitContainer: - enabled: true -''' - r = helm_template(config) - initContainers = r['statefulset'][uname]['spec']['template']['spec']['initContainers'] - assert initContainers[0]['name'] == 'configure-sysctl' - -def test_adding_storageclass_annotation_to_volumeclaimtemplate(): - config = ''' -persistence: - annotations: - volume.beta.kubernetes.io/storage-class: id -''' - r = helm_template(config) - annotations = r['statefulset'][uname]['spec']['volumeClaimTemplates'][0]['metadata']['annotations'] - assert annotations['volume.beta.kubernetes.io/storage-class'] == 'id' - -def test_adding_multiple_persistence_annotations(): - config = ''' - persistence: - annotations: - hello: world - world: hello - ''' - r = helm_template(config) - annotations = r['statefulset'][uname]['spec']['volumeClaimTemplates'][0]['metadata']['annotations'] - - assert annotations['hello'] == 'world' - assert annotations['world'] == 'hello' - - -def test_adding_a_secret_mount(): - config = ''' -secretMounts: - - name: elastic-certificates - secretName: elastic-certs - path: /usr/share/elasticsearch/config/certs -''' - r = helm_template(config) - s = r['statefulset'][uname]['spec']['template']['spec'] - assert s['containers'][0]['volumeMounts'][-1] == { - 'mountPath': '/usr/share/elasticsearch/config/certs', - 'name': 'elastic-certificates' - } - assert s['volumes'] == [{ - 'name': 'elastic-certificates', - 'secret': { - 'secretName': 'elastic-certs' - } - }] - - -def test_adding_a_secret_mount_with_subpath(): - config = ''' -secretMounts: - - name: elastic-certificates - secretName: elastic-certs - path: /usr/share/elasticsearch/config/certs - subPath: cert.crt -''' - r = helm_template(config) - s = r['statefulset'][uname]['spec']['template']['spec'] - assert s['containers'][0]['volumeMounts'][-1] == { - 'mountPath': '/usr/share/elasticsearch/config/certs', - 'subPath': 'cert.crt', - 'name': 'elastic-certificates' - } - - -def test_adding_image_pull_secrets(): - config = ''' -imagePullSecrets: - - name: test-registry -''' - r = helm_template(config) - assert r['statefulset'][uname]['spec']['template']['spec']['imagePullSecrets'][0]['name'] == 'test-registry' - - -def test_adding_tolerations(): - config = ''' -tolerations: -- key: "key1" - operator: "Equal" - value: "value1" - effect: "NoExecute" - tolerationSeconds: 3600 -''' - r = helm_template(config) - assert r['statefulset'][uname]['spec']['template']['spec']['tolerations'][0]['key'] == 'key1' - -def test_adding_pod_annotations(): - config = ''' -podAnnotations: - iam.amazonaws.com/role: es-role -''' - r = helm_template(config) - assert r['statefulset'][uname]['spec']['template']['metadata']['annotations']['iam.amazonaws.com/role'] == 'es-role' - - -def test_adding_a_node_selector(): - config = ''' -nodeSelector: - disktype: ssd -''' - r = helm_template(config) - assert r['statefulset'][uname]['spec']['template']['spec']['nodeSelector']['disktype'] == 'ssd' - -def test_adding_resources_to_initcontainer(): - config = ''' -initResources: - limits: - cpu: "25m" - memory: "128Mi" - requests: - cpu: "25m" - memory: "128Mi" -''' - r = helm_template(config) - i = r['statefulset'][uname]['spec']['template']['spec']['initContainers'][0] - - assert i['resources'] == { - 'requests': { - 'cpu': '25m', - 'memory': '128Mi' - }, - 'limits': { - 'cpu': '25m', - 'memory': '128Mi' - } - } - -def test_adding_resources_to_sidecar_container(): - config = ''' -masterTerminationFix: true -sidecarResources: - limits: - cpu: "100m" - memory: "128Mi" - requests: - cpu: "100m" - memory: "128Mi" -''' - r = helm_template(config) - i = r['statefulset'][uname]['spec']['template']['spec']['containers'][1] - - assert i['resources'] == { - 'requests': { - 'cpu': '100m', - 'memory': '128Mi' - }, - 'limits': { - 'cpu': '100m', - 'memory': '128Mi' - } - } - -def test_adding_a_node_affinity(): - config = ''' -nodeAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 100 - preference: - matchExpressions: - - key: mylabel - operator: In - values: - - myvalue -''' - r = helm_template(config) - assert r['statefulset'][uname]['spec']['template']['spec']['affinity']['nodeAffinity'] == { - 'preferredDuringSchedulingIgnoredDuringExecution': [{ - 'weight': 100, - 'preference': { - 'matchExpressions': [{ - 'key': 'mylabel', - 'operator': 'In', - 'values': [ - 'myvalue' - ] - }] - } - }] - } - - -def test_adding_an_ingress_rule(): - config = ''' -ingress: - enabled: true - annotations: - kubernetes.io/ingress.class: nginx - path: / - hosts: - - elasticsearch.elastic.co - tls: - - secretName: elastic-co-wildcard - hosts: - - elasticsearch.elastic.co -''' - - r = helm_template(config) - assert uname in r['ingress'] - i = r['ingress'][uname]['spec'] - assert i['tls'][0]['hosts'][0] == 'elasticsearch.elastic.co' - assert i['tls'][0]['secretName'] == 'elastic-co-wildcard' - - assert i['rules'][0]['host'] == 'elasticsearch.elastic.co' - assert i['rules'][0]['http']['paths'][0]['path'] == '/' - assert i['rules'][0]['http']['paths'][0]['backend']['serviceName'] == uname - assert i['rules'][0]['http']['paths'][0]['backend']['servicePort'] == 9200 - - -def test_changing_the_protocol(): - config = ''' -protocol: https -''' - r = helm_template(config) - c = r['statefulset'][uname]['spec']['template']['spec']['containers'][0] - assert 'https://127.0.0.1:9200' in c['readinessProbe']['exec']['command'][-1] - -def test_changing_the_cluster_health_status(): - config = ''' -clusterHealthCheckParams: 'wait_for_no_initializing_shards=true&timeout=60s' -''' - r = helm_template(config) - c = r['statefulset'][uname]['spec']['template']['spec']['containers'][0] - assert '/_cluster/health?wait_for_no_initializing_shards=true&timeout=60s' in c['readinessProbe']['exec']['command'][-1] - -def test_adding_in_es_config(): - config = ''' -esConfig: - elasticsearch.yml: | - key: - nestedkey: value - dot.notation: test - - log4j2.properties: | - appender.rolling.name = rolling -''' - r = helm_template(config) - c = r['configmap'][uname + '-config']['data'] - - assert 'elasticsearch.yml' in c - assert 'log4j2.properties' in c - - assert 'nestedkey: value' in c['elasticsearch.yml'] - assert 'dot.notation: test' in c['elasticsearch.yml'] - - assert 'appender.rolling.name = rolling' in c['log4j2.properties'] - - s = r['statefulset'][uname]['spec']['template']['spec'] - - assert {'configMap': {'name': 'elasticsearch-master-config'}, 'name': 'esconfig'} in s['volumes'] - assert {'mountPath': '/usr/share/elasticsearch/config/elasticsearch.yml', 'name': 'esconfig', 'subPath': 'elasticsearch.yml'} in s['containers'][0]['volumeMounts'] - assert {'mountPath': '/usr/share/elasticsearch/config/log4j2.properties', 'name': 'esconfig', 'subPath': 'log4j2.properties'} in s['containers'][0]['volumeMounts'] - - assert 'configchecksum' in r['statefulset'][uname]['spec']['template']['metadata']['annotations'] - -def test_dont_add_data_volume_when_persistance_is_disabled(): - config = ''' -persistence: - enabled: false -''' - r = helm_template(config) - assert 'volumeClaimTemplates' not in r['statefulset'][uname]['spec'] - assert r['statefulset'][uname]['spec']['template']['spec']['containers'][0]['volumeMounts'] == None - - -def test_priority_class_name(): - config = ''' -priorityClassName: "" -''' - r = helm_template(config) - spec = r['statefulset'][uname]['spec']['template']['spec'] - assert 'priorityClassName' not in spec - - config = ''' -priorityClassName: "highest" -''' - r = helm_template(config) - priority_class_name = r['statefulset'][uname]['spec']['template']['spec']['priorityClassName'] - assert priority_class_name == "highest" - - -def test_scheduler_name(): - r = helm_template('') - spec = r['statefulset'][uname]['spec']['template']['spec'] - assert 'schedulerName' not in spec - - config = ''' -schedulerName: "stork" -''' - r = helm_template(config) - assert r['statefulset'][uname]['spec']['template']['spec']['schedulerName'] == "stork" - - -def test_adding_a_nodePort(): - config = '' - - r = helm_template(config) - - assert 'nodePort' not in r['service'][uname]['spec']['ports'][0] - - config = ''' - service: - nodePort: 30001 - ''' - - r = helm_template(config) - - assert r['service'][uname]['spec']['ports'][0]['nodePort'] == 30001 - -def test_master_termination_fixed_enabled(): - config = '' - - r = helm_template(config) - - assert len(r['statefulset'][uname]['spec']['template']['spec']['containers']) == 1 - - config = ''' - masterTerminationFix: true - ''' - - r = helm_template(config) - - c = r['statefulset'][uname]['spec']['template']['spec']['containers'][1] - assert c['name'] == 'elasticsearch-master-graceful-termination-handler' - -def test_lifecycle_hooks(): - config = '' - r = helm_template(config) - c = r['statefulset'][uname]['spec']['template']['spec']['containers'][0] - assert 'lifecycle' not in c - - config = ''' - lifecycle: - preStop: - exec: - command: ["/bin/bash","/preStop"] - ''' - r = helm_template(config) - c = r['statefulset'][uname]['spec']['template']['spec']['containers'][0] - - assert c['lifecycle']['preStop']['exec']['command'] == ["/bin/bash","/preStop"] - -def test_esMajorVersion_detect_default_version(): - config = '' - - r = helm_template(config) - assert r['statefulset'][uname]['metadata']['annotations']['esMajorVersion'] == '7' - -def test_esMajorVersion_default_to_7_if_not_elastic_image(): - config = ''' - image: notElastic - imageTag: 1.0.0 - ''' - - r = helm_template(config) - assert r['statefulset'][uname]['metadata']['annotations']['esMajorVersion'] == '7' - -def test_esMajorVersion_default_to_7_if_no_version_is_found(): - config = ''' - imageTag: not_a_number - ''' - - r = helm_template(config) - assert r['statefulset'][uname]['metadata']['annotations']['esMajorVersion'] == '7' - -def test_esMajorVersion_set_to_6_based_on_image_tag(): - config = ''' - imageTag: 6.8.1 - ''' - - r = helm_template(config) - assert r['statefulset'][uname]['metadata']['annotations']['esMajorVersion'] == '6' - -def test_esMajorVersion_always_wins(): - config = ''' - esMajorVersion: 7 - imageTag: 6.0.0 - ''' - - r = helm_template(config) - assert r['statefulset'][uname]['metadata']['annotations']['esMajorVersion'] == '7' - -def test_esMajorVersion_parse_image_tag_for_oss_image(): - config = ''' - image: docker.elastic.co/elasticsearch/elasticsearch-oss - imageTag: 6.3.2 - ''' - - r = helm_template(config) - assert r['statefulset'][uname]['metadata']['annotations']['esMajorVersion'] == '6' - -def test_set_pod_security_context(): - config = '' - r = helm_template(config) - assert r['statefulset'][uname]['spec']['template']['spec']['securityContext']['fsGroup'] == 1000 - assert r['statefulset'][uname]['spec']['template']['spec']['securityContext']['runAsUser'] == 1000 - - config = ''' - podSecurityContext: - fsGroup: 1001 - other: test - ''' - - r = helm_template(config) - - assert r['statefulset'][uname]['spec']['template']['spec']['securityContext']['fsGroup'] == 1001 - assert r['statefulset'][uname]['spec']['template']['spec']['securityContext']['other'] == 'test' - -def test_fsGroup_backwards_compatability(): - config = ''' - fsGroup: 1001 - ''' - - r = helm_template(config) - - assert r['statefulset'][uname]['spec']['template']['spec']['securityContext']['fsGroup'] == 1001 - -def test_set_container_security_context(): - config = '' - - r = helm_template(config) - c = r['statefulset'][uname]['spec']['template']['spec']['containers'][0] - assert c['securityContext']['capabilities']['drop'] == ['ALL'] - assert c['securityContext']['runAsNonRoot'] == True - assert c['securityContext']['runAsUser'] == 1000 - - config = ''' - securityContext: - runAsUser: 1001 - other: test - ''' - - r = helm_template(config) - c = r['statefulset'][uname]['spec']['template']['spec']['containers'][0] - assert c['securityContext']['capabilities']['drop'] == ['ALL'] - assert c['securityContext']['runAsNonRoot'] == True - assert c['securityContext']['runAsUser'] == 1001 - assert c['securityContext']['other'] == 'test' - -def test_adding_pod_labels(): - config = ''' -labels: - app.kubernetes.io/name: elasticsearch -''' - r = helm_template(config) - assert r['statefulset'][uname]['metadata']['labels']['app.kubernetes.io/name'] == 'elasticsearch' - -def test_keystore_enable(): - config = '' - - r = helm_template(config) - s = r['statefulset'][uname]['spec']['template']['spec'] - - assert s['volumes'] == None - - config = ''' -keystore: - - secretName: test - ''' - - r = helm_template(config) - s = r['statefulset'][uname]['spec']['template']['spec'] - - assert {'name': 'keystore', 'emptyDir': {}} in s['volumes'] - -def test_keystore_init_container(): - config = '' - - r = helm_template(config) - i = r['statefulset'][uname]['spec']['template']['spec']['initContainers'][-1] - - assert i['name'] != 'keystore' - - config = ''' -keystore: - - secretName: test - ''' - - r = helm_template(config) - i = r['statefulset'][uname]['spec']['template']['spec']['initContainers'][-1] - - assert i['name'] == 'keystore' - -def test_keystore_mount(): - config = ''' -keystore: - - secretName: test -''' - - r = helm_template(config) - s = r['statefulset'][uname]['spec']['template']['spec'] - assert s['containers'][0]['volumeMounts'][-1] == { - 'mountPath': '/usr/share/elasticsearch/config/elasticsearch.keystore', - 'subPath': 'elasticsearch.keystore', - 'name': 'keystore' - } - -def test_keystore_init_volume_mounts(): - config = ''' -keystore: - - secretName: test - - secretName: test-with-custom-path - items: - - key: slack_url - path: xpack.notification.slack.account.otheraccount.secure_url -''' - r = helm_template(config) - s = r['statefulset'][uname]['spec']['template']['spec'] - assert s['initContainers'][-1]['volumeMounts'] == [ - { - 'mountPath': '/tmp/keystore', - 'name': 'keystore' - }, - { - 'mountPath': '/tmp/keystoreSecrets/test', - 'name': 'keystore-test' - }, - { - 'mountPath': '/tmp/keystoreSecrets/test-with-custom-path', - 'name': 'keystore-test-with-custom-path' - } - ] - -def test_keystore_volumes(): - config = ''' -keystore: - - secretName: test - - secretName: test-with-custom-path - items: - - key: slack_url - path: xpack.notification.slack.account.otheraccount.secure_url -''' - r = helm_template(config) - s = r['statefulset'][uname]['spec']['template']['spec'] - - assert { - 'name': 'keystore-test', - 'secret': { - 'secretName': 'test' - } - } in s['volumes'] - - assert { - 'name': 'keystore-test-with-custom-path', - 'secret': { - 'secretName': 'test-with-custom-path', - 'items': [{ - 'key': 'slack_url', - 'path': 'xpack.notification.slack.account.otheraccount.secure_url' - }] - } - } in s['volumes'] -def test_pod_security_policy(): - ## Make sure the default config is not creating any resources - config = '' - resources = ('role', 'rolebinding', 'serviceaccount', 'podsecuritypolicy') - r = helm_template(config) - for resource in resources: - assert resource not in r - assert 'serviceAccountName' not in r['statefulset'][uname]['spec']['template']['spec'] - - ## Make sure all the resources are created with default values - config = ''' -rbac: - create: true - serviceAccountName: "" - -podSecurityPolicy: - create: true - name: "" -''' - r = helm_template(config) - for resource in resources: - assert resource in r - assert r['role'][uname]['rules'][0] == {"apiGroups": ["extensions"], "verbs": ["use"], "resources": ["podsecuritypolicies"], "resourceNames": [uname]} - assert r['rolebinding'][uname]['subjects'] == [{"kind": "ServiceAccount", "namespace": "default", "name": uname}] - assert r['rolebinding'][uname]['roleRef'] == {"apiGroup": "rbac.authorization.k8s.io", "kind": "Role", "name": uname} - assert r['statefulset'][uname]['spec']['template']['spec']['serviceAccountName'] == uname - psp_spec = r['podsecuritypolicy'][uname]['spec'] - assert psp_spec['privileged'] is True - - -def test_external_pod_security_policy(): - ## Make sure we can use an externally defined pod security policy - config = ''' -rbac: - create: true - serviceAccountName: "" - -podSecurityPolicy: - create: false - name: "customPodSecurityPolicy" -''' - resources = ('role', 'rolebinding') - r = helm_template(config) - for resource in resources: - assert resource in r - - assert r['role'][uname]['rules'][0] == {"apiGroups": ["extensions"], "verbs": ["use"], "resources": ["podsecuritypolicies"], "resourceNames": ["customPodSecurityPolicy"]} - - -def test_external_service_account(): - ## Make sure we can use an externally defined service account - config = ''' -rbac: - create: false - serviceAccountName: "customServiceAccountName" - -podSecurityPolicy: - create: false - name: "" -''' - resources = ('role', 'rolebinding', 'serviceaccount') - r = helm_template(config) - - assert r['statefulset'][uname]['spec']['template']['spec']['serviceAccountName'] == "customServiceAccountName" - # When referencing an external service account we do not want any resources to be created. - for resource in resources: - assert resource not in r diff --git a/kubernetes/helm_charts/logging/elasticsearch/values.j2 b/kubernetes/helm_charts/logging/elasticsearch/values.j2 deleted file mode 100755 index 39cc36f7d..000000000 --- a/kubernetes/helm_charts/logging/elasticsearch/values.j2 +++ /dev/null @@ -1,241 +0,0 @@ ---- -namespace: "{{env}}-logging" -clusterName: "elasticsearch" -nodeGroup: "master" - -# The service that non master groups will try to connect to when joining the cluster -# This should be set to clusterName + "-" + nodeGroup for your master group -masterService: "" - -# Elasticsearch roles that will be applied to this nodeGroup -# These will be set as environment variables. E.g. node.master=true -roles: - master: "true" - ingest: "true" - data: "true" - -replicas: 3 -minimumMasterNodes: 2 - -esMajorVersion: "" - -# Allows you to add any config files in /usr/share/elasticsearch/config/ -# such as elasticsearch.yml and log4j2.properties -esConfig: {} -# elasticsearch.yml: | -# key: -# nestedkey: value -# log4j2.properties: | -# key = value - -# Extra environment variables to append to this nodeGroup -# This will be appended to the current 'env:' key. You can use any of the kubernetes env -# syntax here -extraEnvs: [] -# - name: MY_ENVIRONMENT_VAR -# value: the_value_goes_here - -# A list of secrets and their paths to mount inside the pod -# This is useful for mounting certificates for security and for mounting -# the X-Pack license -secretMounts: [] -# - name: elastic-certificates -# secretName: elastic-certificates -# path: /usr/share/elasticsearch/config/certs - -image: "docker.io/keshavprasad/elasticsearch" -imageTag: "7.3.2" -imagePullPolicy: "IfNotPresent" - -podAnnotations: {} - # iam.amazonaws.com/role: es-cluster - -# additionals labels -labels: {} - -esJavaOpts: "-Xms3g -Xmx3g" - -resources: - requests: - cpu: "100m" - memory: "1Gi" - limits: - cpu: "1000m" - memory: "4Gi" - -initResources: {} - # limits: - # cpu: "25m" - # # memory: "128Mi" - # requests: - # cpu: "25m" - # memory: "128Mi" - -sidecarResources: {} - # limits: - # cpu: "25m" - # # memory: "128Mi" - # requests: - # cpu: "25m" - # memory: "128Mi" - -networkHost: "0.0.0.0" - -volumeClaimTemplate: - accessModes: [ "ReadWriteOnce" ] - storageClassName: "{{storage_class_name}}" - resources: - requests: - storage: 15Gi - -rbac: - create: true - serviceAccountName: "" - -podSecurityPolicy: - create: false - name: "" - spec: - privileged: true - fsGroup: - rule: RunAsAny - runAsUser: - rule: RunAsAny - seLinux: - rule: RunAsAny - supplementalGroups: - rule: RunAsAny - volumes: - - secret - - configMap - - persistentVolumeClaim - -persistence: - enabled: true - annotations: {} - -extraVolumes: "" - # - name: extras - # emptyDir: {} - -extraVolumeMounts: "" - # - name: extras - # mountPath: /usr/share/extras - # readOnly: true - -extraInitContainers: "" - # - name: do-something - # image: busybox - # command: ['do', 'something'] - -# This is the PriorityClass settings as defined in -# https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass -priorityClassName: "" - -# By default this will make sure two pods don't end up on the same node -# Changing this to a region would allow you to spread pods across regions -antiAffinityTopologyKey: "kubernetes.io/hostname" - -# Hard means that by default pods will only be scheduled if there are enough nodes for them -# and that they will never end up on the same node. Setting this to soft will do this "best effort" -antiAffinity: "soft" - -# This is the node affinity settings as defined in -# https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature -nodeAffinity: {} - -# The default is to deploy all pods serially. By setting this to parallel all pods are started at -# the same time when bootstrapping the cluster -podManagementPolicy: "Parallel" - -protocol: http -httpPort: 9200 -transportPort: 9300 - -service: - type: ClusterIP - nodePort: - annotations: {} - httpPortName: http - transportPortName: transport - -updateStrategy: RollingUpdate - -# This is the max unavailable setting for the pod disruption budget -# The default value of 1 will make sure that kubernetes won't allow more than 1 -# of your pods to be unavailable during maintenance -maxUnavailable: 1 - -podSecurityContext: - fsGroup: 1000 - runAsUser: 1000 - -# The following value is deprecated, -# please use the above podSecurityContext.fsGroup instead -fsGroup: "" - -securityContext: - capabilities: - drop: - - ALL - # readOnlyRootFilesystem: true - runAsNonRoot: true - runAsUser: 1000 - -# How long to wait for elasticsearch to stop gracefully -terminationGracePeriod: 120 - -sysctlVmMaxMapCount: 262144 - -readinessProbe: - failureThreshold: 3 - initialDelaySeconds: 10 - periodSeconds: 10 - successThreshold: 3 - timeoutSeconds: 5 - -# https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html#request-params wait_for_status -clusterHealthCheckParams: "wait_for_status=green&timeout=1s" - -## Use an alternate scheduler. -## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ -## -schedulerName: "" - -imagePullSecrets: [] -nodeSelector: {} -tolerations: [] - -# Enabling this will publically expose your Elasticsearch instance. -# Only enable this if you have security enabled on your cluster -ingress: - enabled: false - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - path: / - hosts: - - chart-example.local - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local - -nameOverride: "" -fullnameOverride: "" - -# https://github.com/elastic/helm-charts/issues/63 -masterTerminationFix: false - -lifecycle: {} - # preStop: - # exec: - # command: ["/bin/sh", "-c", "echo Hello from the postStart handler > /usr/share/message"] - # postStart: - # exec: - # command: ["/bin/sh", "-c", "echo Hello from the postStart handler > /usr/share/message"] - -sysctlInitContainer: - enabled: true - -keystore: [] diff --git a/kubernetes/helm_charts/logging/fluent-bit/Chart.yaml b/kubernetes/helm_charts/logging/fluent-bit/Chart.yaml deleted file mode 100755 index b17ae73a8..000000000 --- a/kubernetes/helm_charts/logging/fluent-bit/Chart.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: v1 -name: fluent-bit -version: 2.7.1 -appVersion: 1.2.2 -description: Fast and Lightweight Log/Data Forwarder for Linux, BSD and OSX -keywords: -- logging -- monitoring -- fluent -- fluentd -sources: -- https://fluentbit.io -icon: https://fluentbit.io/assets/img/logo1-default.png -home: https://fluentbit.io -maintainers: -- name: kfox1111 - email: Kevin.Fox@pnnl.gov -- name: edsiper - email: eduardo@treasure-data.com -- name: hectorj2f - email: hfernandez@mesosphere.com diff --git a/kubernetes/helm_charts/logging/fluent-bit/OWNERS b/kubernetes/helm_charts/logging/fluent-bit/OWNERS deleted file mode 100755 index fa1f0128d..000000000 --- a/kubernetes/helm_charts/logging/fluent-bit/OWNERS +++ /dev/null @@ -1,10 +0,0 @@ -approvers: -- kfox1111 -- edsiper -- hectorj2f -- Towmeykaw -reviewers: -- kfox1111 -- edsiper -- hectorj2f -- Towmeykaw diff --git a/kubernetes/helm_charts/logging/fluent-bit/README.md b/kubernetes/helm_charts/logging/fluent-bit/README.md deleted file mode 100755 index 245e6b1b7..000000000 --- a/kubernetes/helm_charts/logging/fluent-bit/README.md +++ /dev/null @@ -1,172 +0,0 @@ -# Fluent-Bit Chart - -[Fluent Bit](http://fluentbit.io/) is an open source and multi-platform Log Forwarder. - -## Chart Details - -This chart will do the following: - -* Install a configmap for Fluent Bit -* Install a daemonset that provisions Fluent Bit [per-host architecture] - -## Installing the Chart - -To install the chart with the release name `my-release`: - -```bash -$ helm install --name my-release stable/fluent-bit -``` - -When installing this chart on [Minikube](https://kubernetes.io/docs/getting-started-guides/minikube/), it's required to specify that so the DaemonSet will be able to mount the log files properly, make sure to append the _--set on\_minikube=true_ option at the end of the _helm_ command, e.g: - -```bash -$ helm install --name my-release stable/fluent-bit --set on_minikube=true -``` - -## Configuration - -The following table lists the configurable parameters of the Fluent-Bit chart and the default values. - -| Parameter | Description | Default | -| ----------------------- | ---------------------------------- | ----------------------- | -| **Backend Selection** | -| `backend.type` | Set the backend to which Fluent-Bit should flush the information it gathers | `forward` | -| **Forward Backend** | -| `backend.forward.host` | Target host where Fluent-Bit or Fluentd are listening for Forward messages | `fluentd` | -| `backend.forward.port` | TCP Port of the target service | `24284` | -| `backend.forward.shared_key` | A key string known by the remote Fluentd used for authorization. | `` | -| `backend.forward.tls` | Enable or disable TLS support | `off` | -| `backend.forward.tls_verify` | Force certificate validation | `on` | -| `backend.forward.tls_debug` | Set TLS debug verbosity level. It accept the following values: 0-4 | `1` | -| **ElasticSearch Backend** | -| `backend.es.host` | IP address or hostname of the target Elasticsearch instance | `elasticsearch` | -| `backend.es.port` | TCP port of the target Elasticsearch instance. | `9200` | -| `backend.es.index` | Elastic Index name | `kubernetes_cluster` | -| `backend.es.type` | Elastic Type name | `flb_type` | -| `backend.es.time_key` | Elastic Time Key | `@timestamp` | -| `backend.es.logstash_format` | Enable Logstash format compatibility. | `On` | -| `backend.es.logstash_prefix` | Index Prefix. If Logstash_Prefix is equals to 'mydata' your index will become 'mydata-YYYY.MM.DD'. | `kubernetes_cluster` | -| `backend.es.replace_dots` | Enable/Disable Replace_Dots option. | `On` | -| `backend.es.http_user` | Optional username credential for Elastic X-Pack access. | `` | -| `backend.es.http_passwd` | Password for user defined in HTTP_User. | `` | -| `backend.es.http_passwd_secret` | Secret name for password for user defined in HTTP_User. | `` | -| `backend.es.http_passwd_secret_key` | Secret key for password for user defined in HTTP_User. | `` | -| `backend.es.tls` | Enable or disable TLS support | `off` | -| `backend.es.tls_verify` | Force certificate validation | `on` | -| `backend.es.tls_secret` | Existing secret storing TLS CA certificate for the Elastic instance. Specify if tls: on. Overrides `backend.es.tls_ca` | `` | -| `backend.es.tls_secret_ca_key` | Existing secret key storing TLS CA certificate for the Elastic instance. Specify if tls: on. | `` | -| `backend.es.tls_ca` | TLS CA certificate for the Elastic instance (in PEM format). Specify if tls: on. | `` | -| `backend.es.tls_debug` | Set TLS debug verbosity level. It accept the following values: 0-4 | `1` | -| **HTTP Backend** | -| `backend.http.host` | IP address or hostname of the target HTTP Server | `127.0.0.1` | -| `backend.http.port` | TCP port of the target HTTP Server | `80` | -| `backend.http.uri` | Specify an optional HTTP URI for the target web server, e.g: /something | `"/"` -| `backend.http.http_user` | Optional username credential for Basic Authentication. | `` | -| `backend.http.http_passwd:` | Password for user defined in HTTP_User. | `` | -| `backend.http.format` | Specify the data format to be used in the HTTP request body, by default it uses msgpack, optionally it can be set to json. | `msgpack` | -| `backend.http.headers` | HTTP Headers | `[]` | -| `backend.http.tls` | Enable or disable TLS support | `off` | -| `backend.http.tls_verify` | Force certificate validation | `on` | -| `backend.http.tls_debug` | Set TLS debug verbosity level. It accept the following values: 0-4 | `1` | -| **Splunk Backend** | -| `backend.splunk.host` | IP address or hostname of the target Splunk Server | `127.0.0.1` | -| `backend.splunk.port` | TCP port of the target Splunk Server | `8088` | -| `backend.splunk.token` | Specify the Authentication Token for the HTTP Event Collector interface. | `` | -| `backend.splunk.send_raw` | If enabled, record keys and values are set in the main map. | `off` | -| `backend.splunk.tls` | Enable or disable TLS support | `on` | -| `backend.splunk.tls_verify` | Force TLS certificate validation | `off` | -| `backend.splunk.tls_debug` | Set TLS debug verbosity level. It accept the following values: 0-4 | `1` | -| `backend.splunk.message_key` | Tag applied to all incoming logs | `kubernetes` | -| **Parsers** | -| `parsers.enabled` | Enable custom parsers | `false` | -| `parsers.regex` | List of regex parsers | `NULL` | -| `parsers.json` | List of json parsers | `NULL` | -| `parsers.logfmt` | List of logfmt parsers | `NULL` | -| **General** | -| `annotations` | Optional deamonset set annotations | `NULL` | -| `podAnnotations` | Optional pod annotations | `NULL` | -| `podLabels` | Optional pod labels | `NULL` | -| `fullConfigMap` | User has provided entire config (parsers + system) | `false` | -| `existingConfigMap` | ConfigMap override | `` | -| `extraEntries.input` | Extra entries for existing [INPUT] section | `` | -| `extraEntries.filter` | Extra entries for existing [FILTER] section | `` | -| `extraEntries.output` | Extra entries for existing [OUPUT] section | `` | -| `extraPorts` | List of extra ports | | -| `extraVolumeMounts` | Mount an extra volume, required to mount ssl certificates when elasticsearch has tls enabled | | -| `extraVolume` | Extra volume | | -| `service.flush` | Interval to flush output (seconds) | `1` | -| `service.logLevel` | Diagnostic level (error/warning/info/debug/trace) | `info` | -| `filter.enableExclude` | Enable the use of monitoring for a pod annotation of `fluentbit.io/exclude: true`. If present, discard logs from that pod. | `true` | -| `filter.enableParser` | Enable the use of monitoring for a pod annotation of `fluentbit.io/parser: parser_name`. parser_name must be the name of a parser contained within parsers.conf | `true` | -| `filter.kubeURL` | Optional custom configmaps | `https://kubernetes.default.svc:443` | -| `filter.kubeCAFile` | Optional custom configmaps | `/var/run/secrets/kubernetes.io/serviceaccount/ca.crt` | -| `filter.kubeTokenFile` | Optional custom configmaps | `/var/run/secrets/kubernetes.io/serviceaccount/token` | -| `filter.kubeTag` | Optional top-level tag for matching in filter | `kube` | -| `filter.kubeTagPrefix` | Optional tag prefix used by Tail | `kube.var.log.containers.` | -| `filter.mergeJSONLog` | If the log field content is a JSON string map, append the map fields as part of the log structure | `true` | -| `filter.mergeLogKey` | If set, append the processed log keys under a new root key specified by this variable. | `nil` | -| `image.fluent_bit.repository` | Image | `fluent/fluent-bit` | -| `image.fluent_bit.tag` | Image tag | `1.2.2` | -| `image.pullPolicy` | Image pull policy | `Always` | -| `nameOverride` | Override name of app | `nil` | -| `fullnameOverride` | Override full name of app | `nil` | -| `image.pullSecrets` | Specify image pull secrets | `nil` | -| `input.tail.memBufLimit` | Specify Mem_Buf_Limit in tail input | `5MB` | -| `input.tail.parser` | Specify Parser in tail input. | `docker` | -| `input.tail.path` | Specify log file(s) through the use of common wildcards. | `/var/log/containers/*.log` | -| `input.tail.ignore_older` | Ignores files that have been last modified before this time in seconds. Supports m,h,d (minutes, hours,days) syntax. | `` | -| `input.systemd.enabled` | [Enable systemd input](https://docs.fluentbit.io/manual/input/systemd) | `false` | -| `input.systemd.filters.systemdUnit` | Please see https://docs.fluentbit.io/manual/input/systemd | `[docker.service, kubelet.service`, `node-problem-detector.service]` | -| `input.systemd.maxEntries` | Please see https://docs.fluentbit.io/manual/input/systemd | `1000` | -| `input.systemd.readFromTail` | Please see https://docs.fluentbit.io/manual/input/systemd | `true` | -| `input.systemd.tag` | Please see https://docs.fluentbit.io/manual/input/systemd | `host.*` | -| `rbac.create` | Specifies whether RBAC resources should be created. | `true` | -| `rbac.pspEnabled` | Specifies whether a PodSecurityPolicy should be created. | `false` | -| `serviceAccount.create` | Specifies whether a ServiceAccount should be created. | `true` | -| `serviceAccount.name` | The name of the ServiceAccount to use. | `NULL` | -| `rawConfig` | Raw contents of fluent-bit.conf | `@INCLUDE fluent-bit-service.conf`
`@INCLUDE fluent-bit-input.conf`
`@INCLUDE fluent-bit-filter.conf`
` @INCLUDE fluent-bit-output.conf` | -| `resources` | Pod resource requests & limits | `{}` | -| `securityContext` | [Security settings for a container](https://kubernetes.io/docs/concepts/policy/security-context) | `{}` | -| `podSecurityContext` | [Security settings for a pod](https://kubernetes.io/docs/concepts/policy/security-context) | `{}` | -| `hostNetwork` | Use host's network | `false` | -| `dnsPolicy` | Specifies the dnsPolicy to use | `ClusterFirst` | -| `priorityClassName` | Specifies the priorityClassName to use | `NULL` | -| `tolerations` | Optional daemonset tolerations | `NULL` | -| `nodeSelector` | Node labels for fluent-bit pod assignment | `NULL` | -| `affinity` | Expressions for affinity | `NULL` | -| `metrics.enabled` | Specifies whether a service for metrics should be exposed | `false` | -| `metrics.service.annotations` | Optional metrics service annotations | `NULL` | -| `metrics.service.labels` | Additional labels for the fluent-bit metrics service definition, specified as a map. | None | -| `metrics.service.port` | Port on where metrics should be exposed | `2020` | -| `metrics.service.type` | Service type for metrics | `ClusterIP` | -| `metrics.serviceMonitor.enabled` | Set this to `true` to create ServiceMonitor for Prometheus operator | `false` | -| `metrics.serviceMonitor.additionalLabels` | Additional labels that can be used so ServiceMonitor will be discovered by Prometheus | `{}` | -| `metrics.serviceMonitor.namespace` | Optional namespace in which to create ServiceMonitor | `nil` | -| `metrics.serviceMonitor.interval` | Scrape interval. If not set, the Prometheus default scrape interval is used | `nil` | -| `metrics.serviceMonitor.scrapeTimeout` | Scrape timeout. If not set, the Prometheus default scrape timeout is used | `nil` | -| `trackOffsets` | Specify whether to track the file offsets for tailing docker logs. This allows fluent-bit to pick up where it left after pod restarts but requires access to a `hostPath` | `false` | -| `testFramework.image` | `test-framework` image repository. | `dduportal/bats` | -| `testFramework.tag` | `test-framework` image tag. | `0.4.0` | - - -Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. - -Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, - -```bash -$ helm install --name my-release -f values.yaml stable/fluent-bit -``` - -> **Tip**: You can use the default [values.yaml](values.yaml) - -## Upgrading - -### From < 1.0.0 To >= 1.0.0 - -Values `extraInputs`, `extraFilters` and `extraOutputs` have been removed in version `1.0.0` of the fluent-bit chart. -To add additional entries to the existing sections, please use the `extraEntries.input`, `extraEntries.filter` and `extraEntries.output` values. -For entire sections, please use the `rawConfig` value, inserting blocks of text as desired. - -### From < 1.8.0 to >= 1.8.0 - -Version `1.8.0` introduces the use of release name as full name if it contains the chart name(fluent-bit in this case). E.g. with a release name of `fluent-bit`, this renames the DaemonSet from `fluent-bit-fluent-bit` to `fluent-bit`. The suggested approach is to delete the release and reinstall it. diff --git a/kubernetes/helm_charts/logging/fluent-bit/templates/NOTES.txt b/kubernetes/helm_charts/logging/fluent-bit/templates/NOTES.txt deleted file mode 100755 index bbfcc0bef..000000000 --- a/kubernetes/helm_charts/logging/fluent-bit/templates/NOTES.txt +++ /dev/null @@ -1,15 +0,0 @@ -fluent-bit is now running. - -{{- if eq .Values.backend.type "forward" }} - -It will forward all container logs to the svc named {{ .Values.backend.forward.host }} on port: {{ .Values.backend.forward.port }} -{{- else if eq .Values.backend.type "es" }} - -It will forward all container logs to the svc named {{ .Values.backend.es.host }} on port: {{ .Values.backend.es.port }} -{{- else if eq .Values.backend.type "http" }} - -It will forward all container logs to the svc named {{ .Values.backend.http.host }} on port: {{ .Values.backend.http.port }} -{{- else if eq .Values.backend.type "splunk" }} - -It will forward all container logs to the svc named {{ .Values.backend.splunk.host }} on port: {{ .Values.backend.splunk.port }} -{{- end }} diff --git a/kubernetes/helm_charts/logging/fluent-bit/templates/_helpers.tpl b/kubernetes/helm_charts/logging/fluent-bit/templates/_helpers.tpl deleted file mode 100755 index 59505cb5b..000000000 --- a/kubernetes/helm_charts/logging/fluent-bit/templates/_helpers.tpl +++ /dev/null @@ -1,67 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "fluent-bit.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "fluent-bit.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "fluent-bit.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for RBAC APIs. -*/}} -{{- define "rbac.apiVersion" -}} -{{- if .Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1" -}} -rbac.authorization.k8s.io/v1 -{{- else if .Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1beta1" -}} -rbac.authorization.k8s.io/v1beta1 -{{- else -}} -rbac.authorization.k8s.io/v1alpha1 -{{- end -}} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "fluent-bit.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "fluent-bit.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} - -{{/* -Return the appropriate apiGroup for PodSecurityPolicy. -*/}} -{{- define "rbac.pspApiGroup" -}} -{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}} -{{- print "extensions" -}} -{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -{{- print "policy" -}} -{{- end -}} -{{- end -}} diff --git a/kubernetes/helm_charts/logging/fluent-bit/templates/cluster-role.yaml b/kubernetes/helm_charts/logging/fluent-bit/templates/cluster-role.yaml deleted file mode 100755 index 04a260e66..000000000 --- a/kubernetes/helm_charts/logging/fluent-bit/templates/cluster-role.yaml +++ /dev/null @@ -1,29 +0,0 @@ -{{- if .Values.rbac.create -}} -apiVersion: {{ template "rbac.apiVersion" . }} -kind: ClusterRole -metadata: - labels: - app: {{ template "fluent-bit.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - name: {{ template "fluent-bit.fullname" . }} - namespace: {{ .Values.namespace }} -rules: - - apiGroups: - - "" - resources: - - pods - verbs: - - get -{{- if .Values.rbac.pspEnabled }} - - apiGroups: - - {{ template "rbac.pspApiGroup" . }} - resources: - - podsecuritypolicies - resourceNames: - - {{ template "fluent-bit.fullname" . }} - verbs: - - use -{{- end }} -{{- end -}} diff --git a/kubernetes/helm_charts/logging/fluent-bit/templates/cluster-rolebinding.yaml b/kubernetes/helm_charts/logging/fluent-bit/templates/cluster-rolebinding.yaml deleted file mode 100755 index 115387ee2..000000000 --- a/kubernetes/helm_charts/logging/fluent-bit/templates/cluster-rolebinding.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- if .Values.rbac.create -}} -apiVersion: {{ template "rbac.apiVersion" . }} -kind: ClusterRoleBinding -metadata: - labels: - app: {{ template "fluent-bit.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - name: {{ template "fluent-bit.fullname" . }} - namespace: {{ .Values.namespace }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ template "fluent-bit.fullname" . }} -subjects: - - kind: ServiceAccount - name: {{ template "fluent-bit.serviceAccountName" . }} - namespace: {{ .Values.namespace }} -{{- end -}} diff --git a/kubernetes/helm_charts/logging/fluent-bit/templates/config.yaml b/kubernetes/helm_charts/logging/fluent-bit/templates/config.yaml deleted file mode 100755 index 7b385c8cd..000000000 --- a/kubernetes/helm_charts/logging/fluent-bit/templates/config.yaml +++ /dev/null @@ -1,236 +0,0 @@ -{{- if (empty .Values.existingConfigMap) -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "fluent-bit.fullname" . }}-config - namespace: {{ .Values.namespace }} - labels: - app: {{ template "fluent-bit.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -data: - fluent-bit-service.conf: |- - [SERVICE] - Flush {{ .Values.service.flush }} - Daemon Off - Log_Level {{ .Values.service.logLevel }} - Parsers_File parsers.conf -{{- if .Values.parsers.enabled }} - Parsers_File parsers_custom.conf -{{- end }} -{{- if .Values.metrics.enabled }} - HTTP_Server On - HTTP_Listen 0.0.0.0 - HTTP_Port 2020 -{{- end }} - - fluent-bit-input.conf: |- - [INPUT] - Name tail - Path {{ .Values.input.tail.path }} - Parser {{ .Values.input.tail.parser }} - Tag {{ .Values.filter.kubeTag }}.* - Refresh_Interval 5 - Mem_Buf_Limit {{ .Values.input.tail.memBufLimit }} - Skip_Long_Lines On -{{- if .Values.input.tail.ignore_older }} - Ignore_Older {{ .Values.input.tail.ignore_older }} -{{- end }} -{{- if .Values.trackOffsets }} - DB /tail-db/tail-containers-state.db - DB.Sync Normal -{{- end }} -{{- if .Values.input.systemd.enabled }} - [INPUT] - Name systemd - Tag {{ .Values.input.systemd.tag }} -{{- range $value := .Values.input.systemd.filters.systemdUnit }} - Systemd_Filter _SYSTEMD_UNIT={{ $value }} -{{- end }} - Max_Entries {{ .Values.input.systemd.maxEntries }} - Read_From_Tail {{ .Values.input.systemd.readFromTail }} -{{- end }} -{{ .Values.extraEntries.input | indent 8 }} - - fluent-bit-filter.conf: |- - [FILTER] - Name kubernetes - Match {{ .Values.filter.kubeTag }}.* - Kube_Tag_Prefix {{ .Values.filter.kubeTagPrefix }} - Kube_URL {{ .Values.filter.kubeURL }} - Kube_CA_File {{ .Values.filter.kubeCAFile }} - Kube_Token_File {{ .Values.filter.kubeTokenFile }} -{{- if .Values.filter.mergeJSONLog }} - Merge_Log On -{{- end }} - -{{- if .Values.filter.mergeLogKey }} - Merge_Log_Key {{ .Values.filter.mergeLogKey }} -{{- end }} - -{{- if .Values.filter.enableParser }} - K8S-Logging.Parser On -{{- end }} -{{- if .Values.filter.enableExclude }} - K8S-Logging.Exclude On -{{- end }} -{{ .Values.extraEntries.filter | indent 8 }} - [FILTER] - Name envoyparser - Match kube.istio-proxy.* - Key_Name log - Parser envoy - Reserve_Data On - fluent-bit-output.conf: |- -{{ if eq .Values.backend.type "test" }} - [OUTPUT] - Name file - Match * - Path /tmp/fluent-bit.log -{{ else if eq .Values.backend.type "forward" }} - [OUTPUT] - Name forward - Match * - Host {{ .Values.backend.forward.host }} - Port {{ .Values.backend.forward.port }} - Retry_Limit False -{{- if .Values.backend.forward.shared_key }} - Shared_Key {{ .Values.backend.forward.shared_key }} -{{- end }} -{{ else if eq .Values.backend.type "es" }} - [OUTPUT] - Name es - Match * - Host {{ .Values.backend.es.host }} - Port {{ .Values.backend.es.port }} - Logstash_Format {{ default "On" .Values.backend.es.logstash_format }} - Retry_Limit False - Type {{ .Values.backend.es.type }} -{{- if .Values.backend.es.time_key }} - Time_Key {{ .Values.backend.es.time_key }} -{{- end }} -{{- if .Values.backend.es.replace_dots }} - Replace_Dots {{ .Values.backend.es.replace_dots }} -{{- end }} -{{- if .Values.backend.es.logstash_prefix }} - Logstash_Prefix {{ .Values.backend.es.logstash_prefix }} -{{ else if .Values.backend.es.index }} - Index {{ .Values.backend.es.index }} -{{- end }} -{{- if .Values.backend.es.http_user }} - HTTP_User {{ .Values.backend.es.http_user }} -{{- if .Values.backend.es.http_passwd }} - HTTP_Passwd {{ .Values.backend.es.http_passwd }} -{{- else }} - HTTP_Passwd ${HTTP_PASSWORD} -{{- end }} -{{- end }} -{{if eq .Values.backend.es.tls "on" }} - tls {{ .Values.backend.es.tls }} - tls.verify {{ .Values.backend.es.tls_verify }} - tls.debug {{ .Values.backend.es.tls_debug }} -{{- if .Values.backend.es.tls_ca }} - tls.ca_file /secure/es-tls-ca.crt -{{- end }} -{{- end }} -{{ else if eq .Values.backend.type "splunk" }} - [OUTPUT] - Name splunk - Match * - Host {{ .Values.backend.splunk.host }} - Port {{ .Values.backend.splunk.port }} - Splunk_Token {{ .Values.backend.splunk.token }} - Splunk_Send_Raw {{ .Values.backend.splunk.send_raw}} - TLS {{ .Values.backend.splunk.tls }} - TLS.Verify {{ .Values.backend.splunk.tls_verify }} - tls.debug {{ .Values.backend.splunk.tls_debug }} - Message_Key {{ .Values.backend.splunk.message_key }} -{{ else if eq .Values.backend.type "http" }} - [OUTPUT] - Name http - Match * - Host {{ .Values.backend.http.host }} - Port {{ .Values.backend.http.port }} - URI {{ .Values.backend.http.uri }} -{{- if .Values.backend.http.http_user }} - HTTP_User {{ .Values.backend.http.http_user }} - HTTP_Passwd {{ .Values.backend.http.http_passwd }} -{{- end }} - tls {{ .Values.backend.http.tls }} - tls.verify {{ .Values.backend.http.tls_verify }} - tls.debug {{ .Values.backend.http.tls_debug }} -{{- if .Values.backend.http.proxy }} - Proxy {{ .Values.backend.http.proxy }} -{{- end }} - Format {{ .Values.backend.http.format }} -{{- end }} -{{- range .Values.backend.http.headers }} - Header {{ . }} -{{- end }} -{{ .Values.extraEntries.output | indent 8 }} - - fluent-bit.conf: |- -{{ .Values.rawConfig | indent 4 }} - - parsers.conf: |- -{{- if .Values.parsers.regex }} -{{- range .Values.parsers.regex }} - [PARSER] - Name {{ .name }} - Format regex - Regex {{ .regex }} -{{- if .timeKey }} - Time_Key {{ .timeKey }} -{{- end }} -{{- if .timeFormat }} - Time_Format {{ .timeFormat }} -{{- end }} -{{ end }} -{{- end }} -{{- if .Values.parsers.json }} -{{- range .Values.parsers.json }} - [PARSER] - Name {{ .name }} - Format json -{{- if .timeKeep }} - Time_Keep {{ .timeKeep }} -{{- end }} -{{- if .timeKey }} - Time_Key {{ .timeKey }} -{{- end }} -{{- if .timeFormat }} - Time_Format {{ .timeFormat }} -{{- end }} -{{- if .decodeFieldAs }} - Decode_Field_As {{ .decodeFieldAs }} {{ .decodeField | default "log" }} -{{- end}} -{{- if .extraEntries }} -{{ .extraEntries | indent 8 }} -{{- end }} -{{ end }} -{{- end }} -{{- if .Values.parsers.logfmt }} -{{- range .Values.parsers.logfmt }} - [PARSER] - Name {{ .name }} - Format logfmt -{{- if .timeKey }} - Time_Key {{ .timeKey }} -{{- end }} -{{- if .timeFormat }} - Time_Format {{ .timeFormat }} -{{- end }} -{{- if .extraEntries }} -{{ .extraEntries | indent 8 }} -{{- end }} -{{ end }} -{{- end }} - -{{- end }} - [PARSER] - Name envoy - Format regex - Regex ^(?[^ ]*) - \[(?[^ ]*)\] - (?[^ ]*) \[(?
@@ -41,7 +42,8 @@ - + +
Passwords don't match.
@@ -53,7 +52,7 @@ <#if realm.resetPasswordAllowed> ${msg("doForgotPassword")} - +
-
Password must contain a minimum of 8 characters including numerals, lower and upper case alphabets and special characters.
+
Your password must contain a minimum of 8 characters. It must include numerals, lower and upper case alphabets and special characters, without any spaces.
diff --git a/ansible/artifacts/sunbird/login/resources/js/login.js b/ansible/artifacts/sunbird/login/resources/js/login.js index a9d5b873e..9cbe8cff1 100644 --- a/ansible/artifacts/sunbird/login/resources/js/login.js +++ b/ansible/artifacts/sunbird/login/resources/js/login.js @@ -105,11 +105,12 @@ var validatePassword = function () { var charRegex = new RegExp("^(?=.{8,})"); var lwcsRegex = new RegExp("^(?=.*[a-z])"); var upcsRegex = new RegExp("^(?=.*[A-Z])"); + const spaceRegex = new RegExp('^\\S*$'); var numRegex = new RegExp("^(?=.*[0-9])"); - var specRegex = new RegExp("^[^<>{}\'\"/|;:.\ ,~!?@#$%^=&*\\]\\\\()\\[¿§«»ω⊙¤°℃℉€¥£¢¡®©_+]*$"); + var specRegex = new RegExp('^[!"#$%&\'()*+,-./:;<=>?@[^_`{|}~\]]'); var error_msg = document.getElementById('passwd-error-msg'); var match_error_msg = document.getElementById('passwd-match-error-msg'); - if (charRegex.test(textInput) && lwcsRegex.test(textInput) && upcsRegex.test(textInput) && numRegex.test(textInput) && !specRegex.test(textInput)) { + if (charRegex.test(textInput) && spaceRegex.test(textInput) && lwcsRegex.test(textInput) && upcsRegex.test(textInput) && numRegex.test(textInput) && !specRegex.test(textInput)) { error_msg.className = error_msg.className.replace("passwderr","passwdchk"); if (textInput === text2Input) { match_error_msg.className = match_error_msg.className.replace("show","hide"); @@ -131,11 +132,12 @@ var matchPassword = function () { var charRegex = new RegExp("^(?=.{8,})"); var lwcsRegex = new RegExp("^(?=.*[a-z])"); var upcsRegex = new RegExp("^(?=.*[A-Z])"); + const spaceRegex = new RegExp('^\\S*$'); var numRegex = new RegExp("^(?=.*[0-9])"); - var specRegex = new RegExp("^[^<>{}\'\"/|;:.\ ,~!?@#$%^=&*\\]\\\\()\\[¿§«»ω⊙¤°℃℉€¥£¢¡®©_+]*$"); + var specRegex = new RegExp('^[!"#$%&\'()*+,-./:;<=>?@[^_`{|}~\]]'); var match_error_msg = document.getElementById('passwd-match-error-msg'); if (textInput === text2Input) { - if (charRegex.test(text2Input) && lwcsRegex.test(text2Input) && upcsRegex.test(text2Input) && numRegex.test(text2Input) && !specRegex.test(text2Input)) { + if (charRegex.test(text2Input) && spaceRegex.test(textInput) && lwcsRegex.test(text2Input) && upcsRegex.test(text2Input) && numRegex.test(text2Input) && !specRegex.test(text2Input)) { match_error_msg.className = match_error_msg.className.replace("show","hide"); document.getElementById("login").disabled = false; } From ab991362418f9f0c3e3230b2c4f9962408d4aca7 Mon Sep 17 00:00:00 2001 From: Rajesh Rathnam Date: Sun, 19 Apr 2020 14:54:35 +0530 Subject: [PATCH 2300/2894] SB-18248 Allow mobile client to download the cert (#1402) Adding downloadCert API to kong - this is rolled back from 2.9 branch. --- ansible/roles/kong-api/defaults/main.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/ansible/roles/kong-api/defaults/main.yml b/ansible/roles/kong-api/defaults/main.yml index 7b0e7ed2e..7eaccba93 100644 --- a/ansible/roles/kong-api/defaults/main.yml +++ b/ansible/roles/kong-api/defaults/main.yml @@ -3847,6 +3847,23 @@ kong_apis: config.limit_by: credential - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" + + - name: downloadCertificate + request_path: "{{ user_service_prefix }}/v1/certs/download" + upstream_url: "{{ learning_service_url }}/v1/user/certs/download" + strip_request_path: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: "{{ downloadCertificate_ACL | default(['publicUser','mobileApis']) }}" + - 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: validateRegCertificate request_path: "{{ cert_registry_service_prefix }}/v1/certs/validate" From 877dcb3bbaa7e8d86b0f30a4319609d5f4b3fbdd Mon Sep 17 00:00:00 2001 From: "S M Y ALTAMASH smy.altamash@gmail.com" Date: Mon, 20 Apr 2020 16:35:36 +0530 Subject: [PATCH 2301/2894] Reload Private nginx when docker service is deployed to get a new docker conatiner IP --- ansible/roles/stack-sunbird/tasks/main.yml | 4 +++- .../tasks/restart_private_proxy.yml | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 ansible/roles/stack-sunbird/tasks/restart_private_proxy.yml diff --git a/ansible/roles/stack-sunbird/tasks/main.yml b/ansible/roles/stack-sunbird/tasks/main.yml index 5fca0be1b..89d28bbea 100644 --- a/ansible/roles/stack-sunbird/tasks/main.yml +++ b/ansible/roles/stack-sunbird/tasks/main.yml @@ -50,4 +50,6 @@ when: deploy_druid_proxy_api is defined - include: print-service.yml - when: deploy_print is defined \ No newline at end of file + when: deploy_print is defined + + - include: restart_private_proxy.yml diff --git a/ansible/roles/stack-sunbird/tasks/restart_private_proxy.yml b/ansible/roles/stack-sunbird/tasks/restart_private_proxy.yml new file mode 100644 index 000000000..d2830b37e --- /dev/null +++ b/ansible/roles/stack-sunbird/tasks/restart_private_proxy.yml @@ -0,0 +1,18 @@ +--- +- hosts: localhost + tasks: + - name: check if private proxy is running + shell: docker service ps private_proxy + ignore_errors: yes + register: private_proxy_status + + - name: Getting the list of proxy services host details + shell: "getent ahostsv4 $(docker service ps private_proxy | grep Runn | awk '{print $4}') | cut -d \" \" -f1 | uniq" + register: proxy_details + when: private_proxy_status.failed != true + + - name: reload proxy containers configurations + shell: "docker ps | grep proxy_proxy | awk '{print $1}' | xargs -I % docker exec % nginx -s reload;" + delegate_to: "{{item}}" + with_items: "{{(proxy_details.stdout_lines)|list}}" + when: proxy_details.changed From 2f9f2b2444c1db47d7ff0fea042191886759135b Mon Sep 17 00:00:00 2001 From: G33tha Date: Mon, 20 Apr 2020 19:41:07 +0530 Subject: [PATCH 2302/2894] Update main.yml --- ansible/roles/kong-consumer/defaults/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ansible/roles/kong-consumer/defaults/main.yml b/ansible/roles/kong-consumer/defaults/main.yml index 1cfd846f7..ed162999f 100644 --- a/ansible/roles/kong-consumer/defaults/main.yml +++ b/ansible/roles/kong-consumer/defaults/main.yml @@ -100,6 +100,9 @@ kong_all_consumer_groups: - domainUpdate - domainUser - privateContentMgmt + - reportsAccess + - reportsUpdate + - reportsCreate kong_admin_groups: - kongConsumer From 969b0e8a31a9f4b5974422f37366887028aba988 Mon Sep 17 00:00:00 2001 From: G33tha Date: Mon, 20 Apr 2020 19:43:59 +0530 Subject: [PATCH 2303/2894] Update main.yml --- ansible/roles/kong-consumer/defaults/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/ansible/roles/kong-consumer/defaults/main.yml b/ansible/roles/kong-consumer/defaults/main.yml index ed162999f..e90c25f71 100644 --- a/ansible/roles/kong-consumer/defaults/main.yml +++ b/ansible/roles/kong-consumer/defaults/main.yml @@ -100,6 +100,7 @@ kong_all_consumer_groups: - domainUpdate - domainUser - privateContentMgmt + - reportsAdmin - reportsAccess - reportsUpdate - reportsCreate From a599d54fc189111b8a114aad48b63eb720456518 Mon Sep 17 00:00:00 2001 From: Keshav Prasad Date: Tue, 21 Apr 2020 14:22:41 +0530 Subject: [PATCH 2304/2894] fix: merging 2.8 to 2.9 (#1407) * Removing unwanted API from the sunbird stack * Removing unwanted API from kong * remove unwanted api's from the kong * keep existing code * reverting code * reverting deleted apis * Removing unused API from sunbird stack * Removing unused API from sunbird stack * Removing unused API of user-org service from sunbird stack * reverting deleted apis * removing user org service url * Removing unused API from sunbird stack * Removing unused API from sunbird stack * Removing unused API from sunbird stack * Removing unused API from sunbird stack * Removing unused API from sunbird stack * Removing unused API from sunbird stack * Removing unused API from sunbird stack * Removing unused API from sunbird stack * Removing unused API from sunbird stack * Removing unused API from sunbird stack * Removing unused API from sunbird stack * Removing unused API from sunbird stack * Removing unused API from sunbird stack * Removing unused API from sunbird stack * Removing unused API from sunbird stack * Removing unused API from sunbird stack * Removing unused API from sunbird stack * Removing unused API from sunbird stack * Removing unused API from sunbird stack * Removing unused API from sunbird stack * Removing unused API from sunbird stack * Removing unused API from sunbird stack * Removing unused API from sunbird stack * Removing unused API from sunbird stack * Removing unused API from sunbird stack * Removing unused API from sunbird stack * Removing unused API from sunbird stack * Removing unused API from sunbird stack * Removing unused API from sunbird stack * Removing unused API from sunbird stack * Removing unused API from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * Cleaning up APIs from sunbird stack * removing unused apis in sunbird stack to have a clean repository * Renaming updateSystemSettings to listSystemSettings to have a meaningful naming convention * finetune API's * fix: templating keycloak standalone-ha.xml * fix: adding sunbird auth repo checkout * fix: remove other git repositories * fix: remove other git repositories * fix: adding standalone-ha.xml for single node keycloak * fix: updating template path * fix: renaming tasks * fix: adding postgresql block * fix: clearn content plugins repo also as part of fxd * fix: custom name for fluent bit index * fix: adding echo api to acl * fix cpu alert rule (#1289) Fix Cpu alert rules * updated standalone.xml for single node * Update deploy.yml * updated readiness and liveness timout for content service * updated health check timeout from 3s to 10s for content service * Update main.yml * updated content-service health check retries to 5 * Update standalone-ha-single.xml * Update deploy.yml * Update keycloak_301_rollback.sql (#1276) Co-authored-by: G33tha * Update standalone-ha.xml * Hotfix for prod on desktop api's * Issue #SB-18503 fix:removed unknown character from keycloack * IGOT api onboarding and consumer onboarding for covid19 awareness (#1338) * Issue #0000: updated the content service helm chart (#1341) * Onboarding api's for internal use (#1345) * Release 2.8.0 (#1352) * Issue #SB-0000 Fix:update the env variable * Issue #00 fix: updated the learner and lms service helm chart (#1365) * Issue #00 fix: updated the lms service helm chart (#1362) * Issue #00 fix: updated the learer service helm chart * Issue #SB-18769 refactor: Dp-percentage chart changes (#1366) * Enabling nginx cache (#1367) Signed-off-by: Rajesh Rajendran * fix: nginx build nginx.conf * Adding nginx geoip2 module * Adding optional config for nginx can add custom nginx,server and http blocks * fix: adding docker login tag (#1373) * fix: adding quotes for env (#1380) * Issue #SB-18841 feat: onboarding sunbird_report_service api. * Update main.yml * Create report-service.yml * added env file for report service * 000 added env tasks for report service * 000 added variable for report service * Update sunbird_report-service.env * Update sunbird_report-service.env * 000 added variable for report service * Update sunbird_report-service.env * Update sunbird_report-service.env * Issue #SB-18841 feat: sunbird_report_service_url env variable added. * Merge pull request #1384 from yravinderkumar33/sunbird_report_service Issue #SB-18841 feat: sunbird_report_service_url env variable added. * fix: updated readiness and badger image (#1394) * fix: updated readiness and liveliness, updated badger container image * fix: typo on dockerfile * fix: install psycopg2 * fix: install psycopg2 * fix: install psycopg2 * fix: install psycopg2 * Update sunbird_player.env * added variable sunbird_report_service_url for player service * added report service task * added report serevice vars * Issue #SB-18873 fix:revise password policy * SB-18248 Allow mobile client to download the cert (#1402) Adding downloadCert API to kong - this is rolled back from 2.9 branch. * Reload Private nginx when docker service is deployed to get a new docker conatiner IP * Update main.yml * Update main.yml * fix: retaining 2.9 fluentbit chart Co-authored-by: S M Y ALTAMASH smy.altamash@gmail.com Co-authored-by: Raghupathi Co-authored-by: G33tha Co-authored-by: G33tha Co-authored-by: SMY ALTAMASH <30286162+SMYALTAMASH@users.noreply.github.com> Co-authored-by: Devesh Co-authored-by: kaliraja <34502260+Kaali09@users.noreply.github.com> Co-authored-by: Rajeev Sathish Co-authored-by: Harsha Co-authored-by: Sowmya N Dixit Co-authored-by: Rajesh Rajendran Co-authored-by: Rajesh Rajendran Co-authored-by: ravinder kumar Co-authored-by: Rajesh Rathnam --- .../sunbird/login/login-update-password.ftl | 2 +- .../sunbird/login/resources/js/login.js | 10 +- ansible/inventory/env/group_vars/all.yml | 1 + ansible/roles/kong-consumer/defaults/main.yml | 4 + ansible/roles/stack-sunbird/defaults/main.yml | 246 +++++++++++++----- ansible/roles/stack-sunbird/tasks/main.yml | 14 +- .../stack-sunbird/tasks/report-service.yml | 9 + .../tasks/restart_private_proxy.yml | 18 ++ .../templates/sunbird_player.env | 3 +- .../templates/sunbird_report-service.env | 9 + images/openbadger/Dockerfile | 3 +- .../roles/deploy-badger/defaults/main.yml | 13 +- .../roles/helm-deploy/defaults/main.yml | 13 +- .../templates/configmap.yaml | 109 ++++---- kubernetes/helm_charts/core/report/Chart.yaml | 5 + .../core/report/templates/_helpers.tpl | 45 ++++ .../core/report/templates/configmap.yaml | 10 + .../core/report/templates/deployment.yaml | 59 +++++ kubernetes/helm_charts/core/report/values.j2 | 26 ++ 19 files changed, 470 insertions(+), 129 deletions(-) create mode 100644 ansible/roles/stack-sunbird/tasks/report-service.yml create mode 100644 ansible/roles/stack-sunbird/tasks/restart_private_proxy.yml create mode 100644 ansible/roles/stack-sunbird/templates/sunbird_report-service.env create mode 100644 kubernetes/helm_charts/core/report/Chart.yaml create mode 100644 kubernetes/helm_charts/core/report/templates/_helpers.tpl create mode 100644 kubernetes/helm_charts/core/report/templates/configmap.yaml create mode 100644 kubernetes/helm_charts/core/report/templates/deployment.yaml create mode 100644 kubernetes/helm_charts/core/report/values.j2 diff --git a/ansible/artifacts/sunbird/login/login-update-password.ftl b/ansible/artifacts/sunbird/login/login-update-password.ftl index 3ed58704f..2035bbfbc 100644 --- a/ansible/artifacts/sunbird/login/login-update-password.ftl +++ b/ansible/artifacts/sunbird/login/login-update-password.ftl @@ -32,7 +32,7 @@
-
Password must contain a minimum of 8 characters including numerals, lower and upper case alphabets and special characters.
+
Your password must contain a minimum of 8 characters. It must include numerals, lower and upper case alphabets and special characters, without any spaces.
diff --git a/ansible/artifacts/sunbird/login/resources/js/login.js b/ansible/artifacts/sunbird/login/resources/js/login.js index a9d5b873e..9cbe8cff1 100644 --- a/ansible/artifacts/sunbird/login/resources/js/login.js +++ b/ansible/artifacts/sunbird/login/resources/js/login.js @@ -105,11 +105,12 @@ var validatePassword = function () { var charRegex = new RegExp("^(?=.{8,})"); var lwcsRegex = new RegExp("^(?=.*[a-z])"); var upcsRegex = new RegExp("^(?=.*[A-Z])"); + const spaceRegex = new RegExp('^\\S*$'); var numRegex = new RegExp("^(?=.*[0-9])"); - var specRegex = new RegExp("^[^<>{}\'\"/|;:.\ ,~!?@#$%^=&*\\]\\\\()\\[¿§«»ω⊙¤°℃℉€¥£¢¡®©_+]*$"); + var specRegex = new RegExp('^[!"#$%&\'()*+,-./:;<=>?@[^_`{|}~\]]'); var error_msg = document.getElementById('passwd-error-msg'); var match_error_msg = document.getElementById('passwd-match-error-msg'); - if (charRegex.test(textInput) && lwcsRegex.test(textInput) && upcsRegex.test(textInput) && numRegex.test(textInput) && !specRegex.test(textInput)) { + if (charRegex.test(textInput) && spaceRegex.test(textInput) && lwcsRegex.test(textInput) && upcsRegex.test(textInput) && numRegex.test(textInput) && !specRegex.test(textInput)) { error_msg.className = error_msg.className.replace("passwderr","passwdchk"); if (textInput === text2Input) { match_error_msg.className = match_error_msg.className.replace("show","hide"); @@ -131,11 +132,12 @@ var matchPassword = function () { var charRegex = new RegExp("^(?=.{8,})"); var lwcsRegex = new RegExp("^(?=.*[a-z])"); var upcsRegex = new RegExp("^(?=.*[A-Z])"); + const spaceRegex = new RegExp('^\\S*$'); var numRegex = new RegExp("^(?=.*[0-9])"); - var specRegex = new RegExp("^[^<>{}\'\"/|;:.\ ,~!?@#$%^=&*\\]\\\\()\\[¿§«»ω⊙¤°℃℉€¥£¢¡®©_+]*$"); + var specRegex = new RegExp('^[!"#$%&\'()*+,-./:;<=>?@[^_`{|}~\]]'); var match_error_msg = document.getElementById('passwd-match-error-msg'); if (textInput === text2Input) { - if (charRegex.test(text2Input) && lwcsRegex.test(text2Input) && upcsRegex.test(text2Input) && numRegex.test(text2Input) && !specRegex.test(text2Input)) { + if (charRegex.test(text2Input) && spaceRegex.test(textInput) && lwcsRegex.test(text2Input) && upcsRegex.test(text2Input) && numRegex.test(text2Input) && !specRegex.test(text2Input)) { match_error_msg.className = match_error_msg.className.replace("show","hide"); document.getElementById("login").disabled = false; } diff --git a/ansible/inventory/env/group_vars/all.yml b/ansible/inventory/env/group_vars/all.yml index cb74caf21..2b499566b 100644 --- a/ansible/inventory/env/group_vars/all.yml +++ b/ansible/inventory/env/group_vars/all.yml @@ -696,3 +696,4 @@ sunbird_portal_updateLoginTimeEnabled: false #sunbird_offline_azure_storage_account: "" #added this var for adopter usecase offline_installer_container_name: "" #added this var for adopter usecase cloud_storage_url: "{{ sunbird_public_storage_account_name }}.blob.core.windows.net" +sunbird_report_service_url: "{{proto}}://{{ proxy_server_name }}/api/data/v1/report-service" diff --git a/ansible/roles/kong-consumer/defaults/main.yml b/ansible/roles/kong-consumer/defaults/main.yml index 1cfd846f7..e90c25f71 100644 --- a/ansible/roles/kong-consumer/defaults/main.yml +++ b/ansible/roles/kong-consumer/defaults/main.yml @@ -100,6 +100,10 @@ kong_all_consumer_groups: - domainUpdate - domainUser - privateContentMgmt + - reportsAdmin + - reportsAccess + - reportsUpdate + - reportsCreate kong_admin_groups: - kongConsumer diff --git a/ansible/roles/stack-sunbird/defaults/main.yml b/ansible/roles/stack-sunbird/defaults/main.yml index aaaedfeeb..7cfea6349 100644 --- a/ansible/roles/stack-sunbird/defaults/main.yml +++ b/ansible/roles/stack-sunbird/defaults/main.yml @@ -34,6 +34,12 @@ notification_replicas: 1 notification_limit_memory: 500MB notification_limit_cpu: 1 +#Report service vars +report_replicas: 1 +report_reservation_memory: 300M +report_limit_memory: 500M +report_limit_cpu: 1 + # This variable is not to access learner service but to call the api # learner-service:9000/org/v1/search sunbird_learner_service_base_url: http://kong:8000/ @@ -239,7 +245,13 @@ 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: + - ../../../../ansible/roles/stack-sunbird/templates/search-service_application.conf + - ../../../../ansible/roles/stack-sunbird/templates/search-service_logback.xml + taxonomy: + - ../../../../ansible/roles/stack-sunbird/templates/taxonomy-service_application.conf + - ../../../../ansible/roles/stack-sunbird/templates/taxonomy-service_logback.xml + report: ../../../../ansible/roles/stack-sunbird/templates/sunbird_report-service.env sunbird_portal_player_cdn_enabled: false ########### stack-apimanager defaults vars ##### for kubernetes ######### @@ -258,16 +270,19 @@ lms_liveness_readiness: path: /service/health port: 9000 initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 + periodSeconds: 30 + timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 1 + successThreshold: 2 livenessProbe: httpGet: path: /service/health port: 9000 - initialDelaySeconds: 60 - periodSeconds: 10 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 apimanager_liveness_readiness: healthcheck: true @@ -276,16 +291,19 @@ apimanager_liveness_readiness: path: /status port: 8001 initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 + periodSeconds: 30 + timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 1 + successThreshold: 2 livenessProbe: httpGet: path: / port: 8001 - initialDelaySeconds: 60 - periodSeconds: 10 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 assessment_liveness_readiness: healthcheck: true @@ -294,16 +312,19 @@ assessment_liveness_readiness: path: /health port: 9000 initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 + periodSeconds: 30 + timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 1 + successThreshold: 2 livenessProbe: httpGet: path: /health port: 9000 - initialDelaySeconds: 60 - periodSeconds: 10 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 cert_liveness_readiness: healthcheck: true @@ -312,16 +333,19 @@ cert_liveness_readiness: path: /service/health port: 9000 initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 + periodSeconds: 30 + timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 1 + successThreshold: 2 livenessProbe: httpGet: path: /service/health port: 9000 - initialDelaySeconds: 60 - periodSeconds: 10 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 certregistry_liveness_readiness: healthcheck: true @@ -330,16 +354,19 @@ certregistry_liveness_readiness: path: /service/health port: 9000 initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 + periodSeconds: 30 + timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 1 + successThreshold: 2 livenessProbe: httpGet: path: /service/health port: 9000 - initialDelaySeconds: 60 - periodSeconds: 10 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 content_liveness_readiness: healthcheck: true @@ -348,35 +375,40 @@ content_liveness_readiness: path: /health port: 9000 initialDelaySeconds: 30 - periodSeconds: 10 + periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 + successThreshold: 2 livenessProbe: httpGet: path: /health port: 9000 - initialDelaySeconds: 60 - periodSeconds: 10 - timeoutSeconds: 5 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 failureThreshold: 5 + successThreshold: 2 enc_liveness_readiness: healthcheck: true readinessProbe: httpGet: - path: /health + path: /service/health port: 8013 initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 + periodSeconds: 30 + timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 1 + successThreshold: 2 livenessProbe: httpGet: - path: /health + path: /service/health port: 8013 - initialDelaySeconds: 60 - periodSeconds: 10 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 knowledgemw_liveness_readiness: healthcheck: true @@ -385,16 +417,19 @@ knowledgemw_liveness_readiness: path: /service/health port: 5000 initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 + periodSeconds: 30 + timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 1 + successThreshold: 2 livenessProbe: httpGet: path: /service/health port: 5000 - initialDelaySeconds: 60 - periodSeconds: 10 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 learner_liveness_readiness: healthcheck: true @@ -403,16 +438,19 @@ learner_liveness_readiness: path: /service/health port: 9000 initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 + periodSeconds: 30 + timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 1 + successThreshold: 2 livenessProbe: httpGet: path: /service/health port: 9000 - initialDelaySeconds: 60 - periodSeconds: 10 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 notification_liveness_readiness: healthcheck: true @@ -421,16 +459,19 @@ notification_liveness_readiness: path: /service/health port: 9000 initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 + periodSeconds: 30 + timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 1 + successThreshold: 2 livenessProbe: httpGet: path: /service/health port: 9000 - initialDelaySeconds: 60 - periodSeconds: 10 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 player_liveness_readiness: healthcheck: true @@ -439,16 +480,19 @@ player_liveness_readiness: path: /service/health port: 3000 initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 + periodSeconds: 30 + timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 1 + successThreshold: 2 livenessProbe: httpGet: path: /service/health port: 3000 - initialDelaySeconds: 60 - periodSeconds: 10 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 print_liveness_readiness: healthcheck: true @@ -457,16 +501,19 @@ print_liveness_readiness: path: /health port: 5000 initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 + periodSeconds: 30 + timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 1 + successThreshold: 2 livenessProbe: httpGet: path: /health port: 5000 - initialDelaySeconds: 60 - periodSeconds: 10 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 telemetry_liveness_readiness: healthcheck: true @@ -475,6 +522,47 @@ telemetry_liveness_readiness: path: /health port: 9001 initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 + livenessProbe: + httpGet: + path: /health + port: 9001 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 + +userorg_liveness_readiness: + readinessProbe: + httpGet: + path: /service/health + port: 9000 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 + livenessProbe: + httpGet: + path: /service/health + port: 9000 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 + +search_liveness_readiness: + healthcheck: true + readinessProbe: + httpGet: + path: /health + port: 9000 + initialDelaySeconds: 30 periodSeconds: 10 timeoutSeconds: 5 failureThreshold: 5 @@ -482,14 +570,18 @@ telemetry_liveness_readiness: livenessProbe: httpGet: path: /health - port: 9001 + port: 9000 initialDelaySeconds: 60 periodSeconds: 10 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 -userorg_liveness_readiness: +taxonomy_liveness_readiness: + healthcheck: true readinessProbe: httpGet: - path: /service/health + path: /health port: 9000 initialDelaySeconds: 30 periodSeconds: 10 @@ -498,7 +590,29 @@ userorg_liveness_readiness: successThreshold: 1 livenessProbe: httpGet: - path: /service/health + path: /health port: 9000 initialDelaySeconds: 60 periodSeconds: 10 + +report_liveness_readiness: + healthcheck: true + readinessProbe: + httpGet: + path: /health + port: 3030 + initialDelaySeconds: 30 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 5 + successThreshold: 1 + livenessProbe: + httpGet: + path: /health + port: 3030 + initialDelaySeconds: 60 + periodSeconds: 10 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 + diff --git a/ansible/roles/stack-sunbird/tasks/main.yml b/ansible/roles/stack-sunbird/tasks/main.yml index 5fca0be1b..548988f9d 100644 --- a/ansible/roles/stack-sunbird/tasks/main.yml +++ b/ansible/roles/stack-sunbird/tasks/main.yml @@ -50,4 +50,16 @@ when: deploy_druid_proxy_api is defined - include: print-service.yml - when: deploy_print is defined \ No newline at end of file + when: deploy_print is defined + + - include: search-service.yml + when: deploy_search is defined + + - include: taxonomy-service.yml + when: deploy_taxonomy is defined + + - include: report-service.yml + when: deploy_report is defined + + - include: restart_private_proxy.yml + diff --git a/ansible/roles/stack-sunbird/tasks/report-service.yml b/ansible/roles/stack-sunbird/tasks/report-service.yml new file mode 100644 index 000000000..7bf374aa3 --- /dev/null +++ b/ansible/roles/stack-sunbird/tasks/report-service.yml @@ -0,0 +1,9 @@ +--- +- name: Remove report service + shell: "docker service rm telemetry-service" + ignore_errors: yes + +- name: Deploy report service + shell: "docker service create --replicas {{ report_replicas }} -p 3030:3030 --name report-service --hostname report-service --reserve-memory {{ report_reservation_memory }} --limit-memory {{ report_limit_memory }} --limit-cpu {{ report_limit_cpu }} --network application_default --env-file /home/deployer/env/sunbird_report-service.env --with-registry-auth {{hub_org}}/{{image_name}}:{{image_tag}}" + args: + chdir: /home/deployer/stack diff --git a/ansible/roles/stack-sunbird/tasks/restart_private_proxy.yml b/ansible/roles/stack-sunbird/tasks/restart_private_proxy.yml new file mode 100644 index 000000000..d2830b37e --- /dev/null +++ b/ansible/roles/stack-sunbird/tasks/restart_private_proxy.yml @@ -0,0 +1,18 @@ +--- +- hosts: localhost + tasks: + - name: check if private proxy is running + shell: docker service ps private_proxy + ignore_errors: yes + register: private_proxy_status + + - name: Getting the list of proxy services host details + shell: "getent ahostsv4 $(docker service ps private_proxy | grep Runn | awk '{print $4}') | cut -d \" \" -f1 | uniq" + register: proxy_details + when: private_proxy_status.failed != true + + - name: reload proxy containers configurations + shell: "docker ps | grep proxy_proxy | awk '{print $1}' | xargs -I % docker exec % nginx -s reload;" + delegate_to: "{{item}}" + with_items: "{{(proxy_details.stdout_lines)|list}}" + when: proxy_details.changed diff --git a/ansible/roles/stack-sunbird/templates/sunbird_player.env b/ansible/roles/stack-sunbird/templates/sunbird_player.env index 21264f27d..98f213cbc 100644 --- a/ansible/roles/stack-sunbird/templates/sunbird_player.env +++ b/ansible/roles/stack-sunbird/templates/sunbird_player.env @@ -84,4 +84,5 @@ sunbird_portal_base_url={{sunbird_portal_base_url | d('')}} sunbird_portal_updateLoginTimeEnabled={{sunbird_portal_updateLoginTimeEnabled|lower}} #Release-2.8.6 -sunbird_portal_slugForProminentFilter={{sunbird_portal_slugForProminentFilter | default("")}} \ No newline at end of file +sunbird_portal_slugForProminentFilter={{sunbird_portal_slugForProminentFilter | default("")}} +sunbird_report_service_url={{sunbird_report_service_url}} diff --git a/ansible/roles/stack-sunbird/templates/sunbird_report-service.env b/ansible/roles/stack-sunbird/templates/sunbird_report-service.env new file mode 100644 index 000000000..8b881b2a2 --- /dev/null +++ b/ansible/roles/stack-sunbird/templates/sunbird_report-service.env @@ -0,0 +1,9 @@ +SUNBIRD_REPORTS_DB_HOST={{dp_postgres_host}} +SUNBIRD_REPORTS_DB_NAME={{dp_postgres_db}} +SUNBIRD_REPORTS_DB_PASSWORD={{dp_postgres_password}} +SUNBIRD_REPORTS_DB_PORT=5432 +SUNBIRD_REPORTS_DB_USER={{dp_postgres_username}} +SUNBIRD_SERVER_PORT=3030 +SUNBIRD_BASE_REPORT_URL=report +SUNBIRD_REPORTS_TABLE_NAME=report +SUNBIRD_ENV="https://{{domain_name}}" diff --git a/images/openbadger/Dockerfile b/images/openbadger/Dockerfile index 44a30c92c..40a2d4721 100755 --- a/images/openbadger/Dockerfile +++ b/images/openbadger/Dockerfile @@ -1,7 +1,8 @@ -FROM ubuntu:17.10 +FROM ubuntu:18.04 MAINTAINER Rajesh Rajendran # Installing and configuring packages +RUN apt update && apt install -y python-psycopg2 COPY ./images/openbadger/configure.sh /tmp RUN /tmp/configure.sh diff --git a/kubernetes/ansible/roles/deploy-badger/defaults/main.yml b/kubernetes/ansible/roles/deploy-badger/defaults/main.yml index 3d79b1acc..30627ca74 100644 --- a/kubernetes/ansible/roles/deploy-badger/defaults/main.yml +++ b/kubernetes/ansible/roles/deploy-badger/defaults/main.yml @@ -6,13 +6,16 @@ badger_liveness_readiness: path: /health port: 8004 initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 + periodSeconds: 30 + timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 1 + successThreshold: 2 livenessProbe: httpGet: path: /health port: 8004 - initialDelaySeconds: 60 - periodSeconds: 10 \ No newline at end of file + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 diff --git a/kubernetes/ansible/roles/helm-deploy/defaults/main.yml b/kubernetes/ansible/roles/helm-deploy/defaults/main.yml index cd350725d..e50ad4dac 100644 --- a/kubernetes/ansible/roles/helm-deploy/defaults/main.yml +++ b/kubernetes/ansible/roles/helm-deploy/defaults/main.yml @@ -43,13 +43,16 @@ adminutils_liveness_readiness: path: /health port: 4000 initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 + periodSeconds: 30 + timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 1 + successThreshold: 2 livenessProbe: httpGet: path: /health port: 4000 - initialDelaySeconds: 60 - periodSeconds: 10 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 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 1f2b47271..00a54f039 100644 --- a/kubernetes/helm_charts/core/nginx-private-ingress/templates/configmap.yaml +++ b/kubernetes/helm_charts/core/nginx-private-ingress/templates/configmap.yaml @@ -30,51 +30,70 @@ data: resolver {{ .Values.kube_dns_ip }}; - location /learner/ { - rewrite ^/learner/(.*) /$1 break; - proxy_pass http://learner-service:9000; - } - location /api/ { - rewrite ^/api/(.*) /$1 break; - proxy_pass http://kong:8000; - } - location /grafana/ { - rewrite ^/grafana/(.*) /$1 break; - proxy_pass http://prometheus-operator-grafana.monitoring.svc.cluster.local; - } - location /admin-api/ { - rewrite ^/admin-api/(.*) /$1 break; - proxy_pass http://kong:8001; - } - location /content/ { - rewrite ^/content/(.*) /$1 break; - proxy_pass http://content-service:9000; - } - location /badger/ { - rewrite ^/badger/(.*) /$1 break; - proxy_pass http://badger-service:8004; - } - location /cert/ { - rewrite ^/cert/(.*) /$1 break; - proxy_pass http://cert-service:9000; - } - location /certreg/ { - rewrite ^/certreg/(.*) /$1 break; - proxy_pass http://cert-registry-service:9000; - } - location /print/ { - rewrite ^/print/(.*) /$1 break; - proxy_pass http://print-service:5000; - } - location /assessment/ { - rewrite ^/assessment/(.*) /$1 break; - proxy_pass http://assessment-service:9000; - } - location /notification/ { - rewrite ^/notification/(.*) /$1 break; - proxy_pass http://notification-service:9000; - } - } + location /learner/ { + rewrite ^/learner/(.*) /$1 break; + proxy_pass http://learner-service:9000; + } + location /api/ { + rewrite ^/api/(.*) /$1 break; + proxy_pass http://kong:8000; + } + location /grafana/ { + rewrite ^/grafana/(.*) /$1 break; + proxy_pass http://prometheus-operator-grafana.monitoring.svc.cluster.local; + } + location /admin-api/ { + rewrite ^/admin-api/(.*) /$1 break; + proxy_pass http://kong:8001; + } + location /player/ { + rewrite ^/player/(.*) /$1 break; + proxy_pass http://player:3000; + } + location /knowledgemw/ { + rewrite ^/knowledgemw/(.*) /$1 break; + proxy_pass http://knowledge-mw-service:5000; + } + location /content/ { + rewrite ^/content/(.*) /$1 break; + proxy_pass http://content-service:9000; + } + location /badger/ { + rewrite ^/badger/(.*) /$1 break; + proxy_pass http://badger-service:8004; + } + location /cert/ { + rewrite ^/cert/(.*) /$1 break; + proxy_pass http://cert-service:9000; + } + location /certreg/ { + rewrite ^/certreg/(.*) /$1 break; + proxy_pass http://cert-registry-service:9000; + } + location /print/ { + rewrite ^/print/(.*) /$1 break; + proxy_pass http://print-service:5000; + } + location /assessment/ { + rewrite ^/assessment/(.*) /$1 break; + proxy_pass http://assessment-service:9000; + } + location /notification/ { + rewrite ^/notification/(.*) /$1 break; + proxy_pass http://notification-service:9000; + } + location /search/ { + rewrite ^/search/(.*) /$1 break; + proxy_pass http://search-service:9000; + } + location /taxonomy/ { + rewrite ^/taxonomy/(.*) /$1 break; + proxy_pass http://taxonomy-service:9000; + } + location /report/ { + rewrite ^/report/(.*) /$1 break; + proxy_pass http://report-service:3030; + } } kind: ConfigMap metadata: diff --git a/kubernetes/helm_charts/core/report/Chart.yaml b/kubernetes/helm_charts/core/report/Chart.yaml new file mode 100644 index 000000000..3ef91a05f --- /dev/null +++ b/kubernetes/helm_charts/core/report/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: report +version: 0.1.0 diff --git a/kubernetes/helm_charts/core/report/templates/_helpers.tpl b/kubernetes/helm_charts/core/report/templates/_helpers.tpl new file mode 100644 index 000000000..590205843 --- /dev/null +++ b/kubernetes/helm_charts/core/report/templates/_helpers.tpl @@ -0,0 +1,45 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "telemetry.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "telemetry.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "telemetry.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "telemetry.labels" -}} +app.kubernetes.io/name: {{ include "telemetry.name" . }} +helm.sh/chart: {{ include "telemetry.chart" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} diff --git a/kubernetes/helm_charts/core/report/templates/configmap.yaml b/kubernetes/helm_charts/core/report/templates/configmap.yaml new file mode 100644 index 000000000..00fdbaa0c --- /dev/null +++ b/kubernetes/helm_charts/core/report/templates/configmap.yaml @@ -0,0 +1,10 @@ +#apiVersion: v1 +#data: +# {{- range $key, $val := .Values.telemetryenv }} +# {{ $key }}: {{ $val }} +# {{- end }} +#kind: ConfigMap +#metadata: +# creationTimestamp: null +# name: {{ .Chart.Name }}-config +# namespace: {{ .Values.namespace }} diff --git a/kubernetes/helm_charts/core/report/templates/deployment.yaml b/kubernetes/helm_charts/core/report/templates/deployment.yaml new file mode 100644 index 000000000..13685096d --- /dev/null +++ b/kubernetes/helm_charts/core/report/templates/deployment.yaml @@ -0,0 +1,59 @@ +--- +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: {{ default (sub .Values.replicaCount 1) .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 + 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 }} + +--- +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 }} + selector: + app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/report/values.j2 b/kubernetes/helm_charts/core/report/values.j2 new file mode 100644 index 000000000..de0f0c86a --- /dev/null +++ b/kubernetes/helm_charts/core/report/values.j2 @@ -0,0 +1,26 @@ + +### variables for report service ### + +namespace: {{ namespace }} +imagepullsecrets: {{ imagepullsecrets }} +dockerhub: {{ dockerhub }} + +replicaCount: {{report_replicacount|default(1)}} +repository: {{report_repository|default('report-service')}} +image_tag: {{ image_tag }} +resources: + requests: + cpu: {{report_cpu_req|default('100m')}} + memory: {{report_mem_req|default('100Mi')}} + limits: + cpu: {{report_cpu_limit|default('1')}} + memory: {{report_mem_limit|default('1024Mi')}} +network: + port: 3030 + targetport: 3030 +strategy: + type: RollingUpdate + maxsurge: {{ report_maxsurge|default(1) }} + maxunavailable: {{ report_maxunavailable|default }} + +{{ report_liveness_readiness | to_nice_yaml }} From 274c38211a142aa3661486e7301b7c4e70909749 Mon Sep 17 00:00:00 2001 From: Keshav Prasad Date: Tue, 21 Apr 2020 18:14:18 +0530 Subject: [PATCH 2305/2894] merging 2.9 to 2.10 (#1410) * Issue #SC-1408 feat: Copy Content API refactoring - adding config property * Issue #SB-18217 feat: Presigned URL - Refactoring - middleware mapping change * Issue #SB-18218 feat: Channel API refactoring * Issue #0000 feat: updating configuration * SB-18218: Channel API refactoring - removing config * IGOT api onboarding and consumer onboarding for covid19 awareness (#1339) * Issue #0000: updated the content service helm chart (#1344) * Onboarding api's for internal use (#1346) * IGOT api onboarding and consumer onboarding for covid19 awareness * Onboarding api's for internal use * Issue #00 fix: updated the lms service helm chart (#1362) * Issue #00 fix: updated the learer service helm chart (#1364) * feat: adding caching for kong side car (#1370) * fix: adding go-dns caching and optional verbose level * fix: updating template for vars from values.yaml * fix: adding quote function for envs * fix: adding search domain query resolution * fix: updated dashboards, kibana chart, nginx ingress, helm deploy (#1361) * fix: updating process exporter dashboard * fix: adding nginx dashboard for k8 prom * fix: type in variable name * fix: updating kibana version * fix: making es host as a variable * fix: updating kibana chart * fix: updating proxy for kibana variable * fix: updating properties for 6.8.6 version * fix: increasing upper limit for resources * fix: updating readiness probe * fix: updating readiness probe fail threshold * fix: remove env and health path, add liveliness * fix: add liveness * fix: typo in liveness * fix: updating to rolling update * fix: adding variable for replicas * fix: adding variable for replicas and update res limits * fix: update res limits * fix: changing back to recreate * fix: changing back to recreate * Revert "fix: changing back to recreate" * Revert "fix: changing back to recreate" * fix: updating timeout, updating res limits, rolling update * fix: updating max surges * fix: updating max surges * fix: variable typo * fix: updating readiness * fix: update liveliness * fix: daemonsets fix * fix: updating nginx private ingress * fix: ansible syntax * fix: adding quotes * fix: updating match for deploy and deamonsets * fix: escaping semi colons * fix: fixing quotes * fix: fixing quotes * fix: updating nginx private and shell executable * fix: updating nginx conf path * fix: adding args for executable * fix: removed repeated directive * fix: adding statefulset and removed retry * fix: and in small case * fix: removed when condition * fix: adding skipped logic * Revert "fix: adding skipped logic" * fix: try workaround for image overwrite in skipped task * fix: logic 1 - using skips and conditional checks * fix: logic 2 - ignore conditions and run always, register image on success * fix: remove wait time for kong api * fix: updating nginx dashboard and adding apiman dashboard * fix: removed commented condtions * fix: adding docker login tag * fix: test new kibama chart * fix: quotes and variable * fix: updated kibana helm chart * fix: adding success thresh to 1 * fix: adding oauth2 proxy helm and template * fix: adding full name and template * fix: type in template * fix: use relase name and no defaults * fix: updating oauth2 service name * fix: updating port for oauth2 * fix: standaridizing fluent-bit chart * fix: updating port * fix: conflicts resolved from 2.8 to 2.9 merge (#1383) * Removing unwanted API from the sunbird stack * Removing unwanted API from kong * remove unwanted api's from the kong * keep existing code * reverting code * reverting deleted apis * Removing unused API from sunbird stack * Removing unused API from sunbird stack * Removing unused API of user-org service from sunbird stack * reverting deleted apis * removing user org service url * Removing unused API from sunbird stack * Cleaning up APIs from sunbird stack * removing unused apis in sunbird stack to have a clean repository * Renaming updateSystemSettings to listSystemSettings to have a meaningful naming convention * finetune API's * fix: templating keycloak standalone-ha.xml * fix: adding sunbird auth repo checkout * fix: remove other git repositories * fix: remove other git repositories * fix: adding standalone-ha.xml for single node keycloak * fix: updating template path * fix: renaming tasks * fix: adding postgresql block * fix: clearn content plugins repo also as part of fxd * fix: custom name for fluent bit index * fix: adding echo api to acl * fix cpu alert rule (#1289) Fix Cpu alert rules * updated standalone.xml for single node * Update deploy.yml * updated readiness and liveness timout for content service * updated health check timeout from 3s to 10s for content service * Update main.yml * updated content-service health check retries to 5 * Update standalone-ha-single.xml * Update deploy.yml * Update keycloak_301_rollback.sql (#1276) Co-authored-by: G33tha * Update standalone-ha.xml * Hotfix for prod on desktop api's * Issue #SB-18503 fix:removed unknown character from keycloack * IGOT api onboarding and consumer onboarding for covid19 awareness (#1338) * Issue #0000: updated the content service helm chart (#1341) * Onboarding api's for internal use (#1345) * Release 2.8.0 (#1352) * Issue #SB-0000 Fix:update the env variable * Issue #00 fix: updated the learner and lms service helm chart (#1365) * Issue #00 fix: updated the lms service helm chart (#1362) * Issue #00 fix: updated the learer service helm chart * Issue #SB-18769 refactor: Dp-percentage chart changes (#1366) * Enabling nginx cache (#1367) Signed-off-by: Rajesh Rajendran * fix: nginx build nginx.conf * Adding nginx geoip2 module * Adding optional config for nginx can add custom nginx,server and http blocks * fix: adding docker login tag (#1373) * fix: adding quotes for env (#1380) Co-authored-by: S M Y ALTAMASH smy.altamash@gmail.com Co-authored-by: Raghupathi Co-authored-by: G33tha Co-authored-by: G33tha Co-authored-by: SMY ALTAMASH <30286162+SMYALTAMASH@users.noreply.github.com> Co-authored-by: Devesh Co-authored-by: kaliraja <34502260+Kaali09@users.noreply.github.com> Co-authored-by: Rajeev Sathish Co-authored-by: Harsha Co-authored-by: Sowmya N Dixit Co-authored-by: Rajesh Rajendran Co-authored-by: Rajesh Rajendran * fix: updated node exporter labels (#1386) * fix: updating node-exporter value * fix: updated number format and new dashboard * fix: updating regex * fix: updated dashboards (#1400) * fix: merging 2.8 to 2.9 (#1407) * Removing unwanted API from the sunbird stack * Removing unwanted API from kong * remove unwanted api's from the kong * keep existing code * reverting code * reverting deleted apis * Removing unused API from sunbird stack * Removing unused API from sunbird stack * Removing unused API of user-org service from sunbird stack * reverting deleted apis * removing user org service url * removing unused apis in sunbird stack to have a clean repository * Renaming updateSystemSettings to listSystemSettings to have a meaningful naming convention * finetune API's * fix: templating keycloak standalone-ha.xml * fix: adding sunbird auth repo checkout * fix: remove other git repositories * fix: remove other git repositories * fix: adding standalone-ha.xml for single node keycloak * fix: updating template path * fix: renaming tasks * fix: adding postgresql block * fix: clearn content plugins repo also as part of fxd * fix: custom name for fluent bit index * fix: adding echo api to acl * fix cpu alert rule (#1289) Fix Cpu alert rules * updated standalone.xml for single node * Update deploy.yml * updated readiness and liveness timout for content service * updated health check timeout from 3s to 10s for content service * Update main.yml * updated content-service health check retries to 5 * Update standalone-ha-single.xml * Update deploy.yml * Update keycloak_301_rollback.sql (#1276) Co-authored-by: G33tha * Update standalone-ha.xml * Hotfix for prod on desktop api's * Issue #SB-18503 fix:removed unknown character from keycloack * IGOT api onboarding and consumer onboarding for covid19 awareness (#1338) * Issue #0000: updated the content service helm chart (#1341) * Onboarding api's for internal use (#1345) * Release 2.8.0 (#1352) * Issue #SB-0000 Fix:update the env variable * Issue #00 fix: updated the learner and lms service helm chart (#1365) * Issue #00 fix: updated the lms service helm chart (#1362) * Issue #00 fix: updated the learer service helm chart * Issue #SB-18769 refactor: Dp-percentage chart changes (#1366) * Enabling nginx cache (#1367) Signed-off-by: Rajesh Rajendran * fix: nginx build nginx.conf * Adding nginx geoip2 module * Adding optional config for nginx can add custom nginx,server and http blocks * fix: adding docker login tag (#1373) * fix: adding quotes for env (#1380) * Issue #SB-18841 feat: onboarding sunbird_report_service api. * Update main.yml * Create report-service.yml * added env file for report service * 000 added env tasks for report service * 000 added variable for report service * Update sunbird_report-service.env * Update sunbird_report-service.env * 000 added variable for report service * Update sunbird_report-service.env * Update sunbird_report-service.env * Issue #SB-18841 feat: sunbird_report_service_url env variable added. * Merge pull request #1384 from yravinderkumar33/sunbird_report_service Issue #SB-18841 feat: sunbird_report_service_url env variable added. * fix: updated readiness and badger image (#1394) * fix: updated readiness and liveliness, updated badger container image * fix: typo on dockerfile * fix: install psycopg2 * fix: install psycopg2 * fix: install psycopg2 * fix: install psycopg2 * Update sunbird_player.env * added variable sunbird_report_service_url for player service * added report service task * added report serevice vars * Issue #SB-18873 fix:revise password policy * SB-18248 Allow mobile client to download the cert (#1402) Adding downloadCert API to kong - this is rolled back from 2.9 branch. * Reload Private nginx when docker service is deployed to get a new docker conatiner IP * Update main.yml * Update main.yml * fix: retaining 2.9 fluentbit chart Co-authored-by: S M Y ALTAMASH smy.altamash@gmail.com Co-authored-by: Raghupathi Co-authored-by: G33tha Co-authored-by: G33tha Co-authored-by: SMY ALTAMASH <30286162+SMYALTAMASH@users.noreply.github.com> Co-authored-by: Devesh Co-authored-by: kaliraja <34502260+Kaali09@users.noreply.github.com> Co-authored-by: Rajeev Sathish Co-authored-by: Harsha Co-authored-by: Sowmya N Dixit Co-authored-by: Rajesh Rajendran Co-authored-by: Rajesh Rajendran Co-authored-by: ravinder kumar Co-authored-by: Rajesh Rathnam * Issue #SB-18218 feat: Channel API refactoring * fix: repeated lines due to merge * fix: repeated lines due to merge conflict Co-authored-by: amitpriyadarshi Co-authored-by: SMY ALTAMASH <30286162+SMYALTAMASH@users.noreply.github.com> Co-authored-by: kaliraja <34502260+Kaali09@users.noreply.github.com> Co-authored-by: Harsha Co-authored-by: S M Y ALTAMASH smy.altamash@gmail.com Co-authored-by: Raghupathi Co-authored-by: G33tha Co-authored-by: G33tha Co-authored-by: Devesh Co-authored-by: Rajeev Sathish Co-authored-by: Sowmya N Dixit Co-authored-by: Rajesh Rajendran Co-authored-by: Rajesh Rajendran Co-authored-by: ravinder kumar Co-authored-by: Rajesh Rathnam --- .../sunbird/login/login-update-password.ftl | 2 +- .../sunbird/login/resources/js/login.js | 6 +- ansible/inventory/env/group_vars/all.yml | 1 + ansible/roles/kong-consumer/defaults/main.yml | 20 + ansible/roles/stack-sunbird/defaults/main.yml | 242 +++-- ansible/roles/stack-sunbird/tasks/main.yml | 7 +- .../stack-sunbird/tasks/report-service.yml | 9 + .../tasks/restart_private_proxy.yml | 18 + .../content-service_application.conf | 1 + .../templates/sunbird_player.env | 3 +- .../templates/sunbird_report-service.env | 9 + images/openbadger/Dockerfile | 3 +- .../roles/deploy-badger/defaults/main.yml | 13 +- .../roles/helm-deploy/defaults/main.yml | 13 +- .../templates/configmap.yaml | 12 + kubernetes/helm_charts/core/report/Chart.yaml | 5 + .../core/report/templates/_helpers.tpl | 45 + .../core/report/templates/configmap.yaml | 10 + .../core/report/templates/deployment.yaml | 59 ++ kubernetes/helm_charts/core/report/values.j2 | 26 + .../dashboards/dashboards/host-details.json | 958 ++++++++++++++++-- .../dashboards/process-exporter.json | 29 +- 22 files changed, 1296 insertions(+), 195 deletions(-) create mode 100644 ansible/roles/stack-sunbird/tasks/report-service.yml create mode 100644 ansible/roles/stack-sunbird/tasks/restart_private_proxy.yml create mode 100644 ansible/roles/stack-sunbird/templates/sunbird_report-service.env create mode 100644 kubernetes/helm_charts/core/report/Chart.yaml create mode 100644 kubernetes/helm_charts/core/report/templates/_helpers.tpl create mode 100644 kubernetes/helm_charts/core/report/templates/configmap.yaml create mode 100644 kubernetes/helm_charts/core/report/templates/deployment.yaml create mode 100644 kubernetes/helm_charts/core/report/values.j2 diff --git a/ansible/artifacts/sunbird/login/login-update-password.ftl b/ansible/artifacts/sunbird/login/login-update-password.ftl index 3ed58704f..2035bbfbc 100644 --- a/ansible/artifacts/sunbird/login/login-update-password.ftl +++ b/ansible/artifacts/sunbird/login/login-update-password.ftl @@ -32,7 +32,7 @@
-
Password must contain a minimum of 8 characters including numerals, lower and upper case alphabets and special characters.
+
Your password must contain a minimum of 8 characters. It must include numerals, lower and upper case alphabets and special characters, without any spaces.
diff --git a/ansible/artifacts/sunbird/login/resources/js/login.js b/ansible/artifacts/sunbird/login/resources/js/login.js index 902acb3d0..60f3fe4e8 100644 --- a/ansible/artifacts/sunbird/login/resources/js/login.js +++ b/ansible/artifacts/sunbird/login/resources/js/login.js @@ -106,8 +106,9 @@ var validatePassword = function () { var lwcsRegex = new RegExp("^(?=.*[a-z])"); var spaceRegex = new RegExp('^\\S*$'); var upcsRegex = new RegExp("^(?=.*[A-Z])"); + const spaceRegex = new RegExp('^\\S*$'); var numRegex = new RegExp("^(?=.*[0-9])"); - var specRegex = new RegExp("^[^<>{}\'\"/|;:.,~!?@#$%^=&*\\]\\\\()\\[¿§«»ω⊙¤°℃℉€¥£¢¡®©_+]*$"); + var specRegex = new RegExp('^[!"#$%&\'()*+,-./:;<=>?@[^_`{|}~\]]'); var error_msg = document.getElementById('passwd-error-msg'); var match_error_msg = document.getElementById('passwd-match-error-msg'); if (charRegex.test(textInput) && spaceRegex.test(textInput) && lwcsRegex.test(textInput) && upcsRegex.test(textInput) && numRegex.test(textInput) && !specRegex.test(textInput)) { @@ -133,8 +134,9 @@ var matchPassword = function () { var spaceRegex = new RegExp('^\\S*$'); var lwcsRegex = new RegExp("^(?=.*[a-z])"); var upcsRegex = new RegExp("^(?=.*[A-Z])"); + const spaceRegex = new RegExp('^\\S*$'); var numRegex = new RegExp("^(?=.*[0-9])"); - var specRegex = new RegExp("^[^<>{}\'\"/|;:.,~!?@#$%^=&*\\]\\\\()\\[¿§«»ω⊙¤°℃℉€¥£¢¡®©_+]*$"); + var specRegex = new RegExp('^[!"#$%&\'()*+,-./:;<=>?@[^_`{|}~\]]'); var match_error_msg = document.getElementById('passwd-match-error-msg'); if (textInput === text2Input) { if (charRegex.test(text2Input) && spaceRegex.test(textInput) && lwcsRegex.test(text2Input) && upcsRegex.test(text2Input) && numRegex.test(text2Input) && !specRegex.test(text2Input)) { diff --git a/ansible/inventory/env/group_vars/all.yml b/ansible/inventory/env/group_vars/all.yml index 501127afc..0b0efbb4f 100644 --- a/ansible/inventory/env/group_vars/all.yml +++ b/ansible/inventory/env/group_vars/all.yml @@ -701,3 +701,4 @@ cloud_storage_url: "{{ sunbird_public_storage_account_name }}.blob.core.windows. # Search-service search_index_host: "{{ groups['composite-search-cluster']|join(':9200,')}}:9200" compositesearch_index_name: "compositesearch" +sunbird_report_service_url: "{{proto}}://{{ proxy_server_name }}/api/data/v1/report-service" diff --git a/ansible/roles/kong-consumer/defaults/main.yml b/ansible/roles/kong-consumer/defaults/main.yml index 694ac6529..f8edce8a1 100644 --- a/ansible/roles/kong-consumer/defaults/main.yml +++ b/ansible/roles/kong-consumer/defaults/main.yml @@ -88,6 +88,26 @@ kong_all_consumer_groups: - userAdmin - userCreate - userUpdate + - configUser + - dataAdmin + - dataUpdate + - dialcodeAdmin + - dialcodeUpdate + - dialcodeUser + - domainAdmin + - domainUpdate + - domainUser + - privateContentMgmt + - reportsAdmin + - reportsAccess + - reportsUpdate + - reportsCreate + +kong_admin_groups: + - kongConsumer + +private_groups: + - locationAdmin kong_consumers: - username: api-admin diff --git a/ansible/roles/stack-sunbird/defaults/main.yml b/ansible/roles/stack-sunbird/defaults/main.yml index 0a80824d1..5d588fbe1 100644 --- a/ansible/roles/stack-sunbird/defaults/main.yml +++ b/ansible/roles/stack-sunbird/defaults/main.yml @@ -34,6 +34,12 @@ notification_replicas: 1 notification_limit_memory: 500MB notification_limit_cpu: 1 +#Report service vars +report_replicas: 1 +report_reservation_memory: 300M +report_limit_memory: 500M +report_limit_cpu: 1 + # This variable is not to access learner service but to call the api # learner-service:9000/org/v1/search sunbird_learner_service_base_url: http://kong:8000/ @@ -236,6 +242,9 @@ proxy: # repository: 'proxy' # image_tag: 2.4.0 +sunbird_portal_player_cdn_enabled: false +sunbird_cert_qr_container_name: "certqr" + service_env: learner: ../../../../ansible/roles/stack-sunbird/templates/sunbird_learner-service.env lms: ../../../../ansible/roles/stack-sunbird/templates/sunbird_lms-service.env @@ -259,8 +268,7 @@ service_env: taxonomy: - ../../../../ansible/roles/stack-sunbird/templates/taxonomy-service_application.conf - ../../../../ansible/roles/stack-sunbird/templates/taxonomy-service_logback.xml - -sunbird_portal_player_cdn_enabled: false + report: ../../../../ansible/roles/stack-sunbird/templates/sunbird_report-service.env ########### stack-apimanager defaults vars ##### for kubernetes ######### kong_database: postgres @@ -278,16 +286,19 @@ lms_liveness_readiness: path: /service/health port: 9000 initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 + periodSeconds: 30 + timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 1 + successThreshold: 2 livenessProbe: httpGet: path: /service/health port: 9000 - initialDelaySeconds: 60 - periodSeconds: 10 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 apimanager_liveness_readiness: healthcheck: true @@ -296,16 +307,19 @@ apimanager_liveness_readiness: path: /status port: 8001 initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 + periodSeconds: 30 + timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 1 + successThreshold: 2 livenessProbe: httpGet: path: / port: 8001 - initialDelaySeconds: 60 - periodSeconds: 10 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 assessment_liveness_readiness: healthcheck: true @@ -314,16 +328,19 @@ assessment_liveness_readiness: path: /health port: 9000 initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 + periodSeconds: 30 + timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 1 + successThreshold: 2 livenessProbe: httpGet: path: /health port: 9000 - initialDelaySeconds: 60 - periodSeconds: 10 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 cert_liveness_readiness: healthcheck: true @@ -332,16 +349,19 @@ cert_liveness_readiness: path: /service/health port: 9000 initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 + periodSeconds: 30 + timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 1 + successThreshold: 2 livenessProbe: httpGet: path: /service/health port: 9000 - initialDelaySeconds: 60 - periodSeconds: 10 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 certregistry_liveness_readiness: healthcheck: true @@ -350,16 +370,19 @@ certregistry_liveness_readiness: path: /service/health port: 9000 initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 + periodSeconds: 30 + timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 1 + successThreshold: 2 livenessProbe: httpGet: path: /service/health port: 9000 - initialDelaySeconds: 60 - periodSeconds: 10 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 content_liveness_readiness: healthcheck: true @@ -368,35 +391,40 @@ content_liveness_readiness: path: /health port: 9000 initialDelaySeconds: 30 - periodSeconds: 10 + periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 + successThreshold: 2 livenessProbe: httpGet: path: /health port: 9000 - initialDelaySeconds: 60 - periodSeconds: 10 - timeoutSeconds: 5 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 failureThreshold: 5 + successThreshold: 2 enc_liveness_readiness: healthcheck: true readinessProbe: httpGet: - path: /health + path: /service/health port: 8013 initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 + periodSeconds: 30 + timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 1 + successThreshold: 2 livenessProbe: httpGet: - path: /health + path: /service/health port: 8013 - initialDelaySeconds: 60 - periodSeconds: 10 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 knowledgemw_liveness_readiness: healthcheck: true @@ -405,16 +433,19 @@ knowledgemw_liveness_readiness: path: /service/health port: 5000 initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 + periodSeconds: 30 + timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 1 + successThreshold: 2 livenessProbe: httpGet: path: /service/health port: 5000 - initialDelaySeconds: 60 - periodSeconds: 10 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 learner_liveness_readiness: healthcheck: true @@ -423,16 +454,19 @@ learner_liveness_readiness: path: /service/health port: 9000 initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 + periodSeconds: 30 + timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 1 + successThreshold: 2 livenessProbe: httpGet: path: /service/health port: 9000 - initialDelaySeconds: 60 - periodSeconds: 10 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 notification_liveness_readiness: healthcheck: true @@ -441,16 +475,19 @@ notification_liveness_readiness: path: /service/health port: 9000 initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 + periodSeconds: 30 + timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 1 + successThreshold: 2 livenessProbe: httpGet: path: /service/health port: 9000 - initialDelaySeconds: 60 - periodSeconds: 10 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 player_liveness_readiness: healthcheck: true @@ -459,16 +496,19 @@ player_liveness_readiness: path: /service/health port: 3000 initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 + periodSeconds: 30 + timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 1 + successThreshold: 2 livenessProbe: httpGet: path: /service/health port: 3000 - initialDelaySeconds: 60 - periodSeconds: 10 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 print_liveness_readiness: healthcheck: true @@ -477,16 +517,19 @@ print_liveness_readiness: path: /health port: 5000 initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 + periodSeconds: 30 + timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 1 + successThreshold: 2 livenessProbe: httpGet: path: /health port: 5000 - initialDelaySeconds: 60 - periodSeconds: 10 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 telemetry_liveness_readiness: healthcheck: true @@ -495,16 +538,19 @@ telemetry_liveness_readiness: path: /health port: 9001 initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 + periodSeconds: 30 + timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 1 + successThreshold: 2 livenessProbe: httpGet: path: /health port: 9001 - initialDelaySeconds: 60 - periodSeconds: 10 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 userorg_liveness_readiness: readinessProbe: @@ -512,16 +558,19 @@ userorg_liveness_readiness: path: /service/health port: 9000 initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 + periodSeconds: 30 + timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 1 + successThreshold: 2 livenessProbe: httpGet: path: /service/health port: 9000 - initialDelaySeconds: 60 - periodSeconds: 10 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 search_liveness_readiness: healthcheck: true @@ -530,16 +579,19 @@ search_liveness_readiness: path: /health port: 9000 initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 + periodSeconds: 30 + timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 1 + successThreshold: 2 livenessProbe: httpGet: path: /health port: 9000 - initialDelaySeconds: 60 - periodSeconds: 10 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 taxonomy_liveness_readiness: healthcheck: true @@ -548,15 +600,37 @@ taxonomy_liveness_readiness: path: /health port: 9000 initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 + periodSeconds: 30 + timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 1 + successThreshold: 2 livenessProbe: httpGet: path: /health port: 9000 - initialDelaySeconds: 60 - periodSeconds: 10 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 -sunbird_cert_qr_container_name: "certqr" +report_liveness_readiness: + healthcheck: true + readinessProbe: + httpGet: + path: /service/health + port: 3030 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 + livenessProbe: + httpGet: + path: /service/health + port: 3030 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 diff --git a/ansible/roles/stack-sunbird/tasks/main.yml b/ansible/roles/stack-sunbird/tasks/main.yml index c51272ed3..2389102f4 100644 --- a/ansible/roles/stack-sunbird/tasks/main.yml +++ b/ansible/roles/stack-sunbird/tasks/main.yml @@ -56,4 +56,9 @@ when: deploy_search is defined - include: taxonomy-service.yml - when: deploy_taxonomy is defined \ No newline at end of file + when: deploy_taxonomy is defined + + - include: report-service.yml + when: deploy_report is defined + + - include: restart_private_proxy.yml diff --git a/ansible/roles/stack-sunbird/tasks/report-service.yml b/ansible/roles/stack-sunbird/tasks/report-service.yml new file mode 100644 index 000000000..7bf374aa3 --- /dev/null +++ b/ansible/roles/stack-sunbird/tasks/report-service.yml @@ -0,0 +1,9 @@ +--- +- name: Remove report service + shell: "docker service rm telemetry-service" + ignore_errors: yes + +- name: Deploy report service + shell: "docker service create --replicas {{ report_replicas }} -p 3030:3030 --name report-service --hostname report-service --reserve-memory {{ report_reservation_memory }} --limit-memory {{ report_limit_memory }} --limit-cpu {{ report_limit_cpu }} --network application_default --env-file /home/deployer/env/sunbird_report-service.env --with-registry-auth {{hub_org}}/{{image_name}}:{{image_tag}}" + args: + chdir: /home/deployer/stack diff --git a/ansible/roles/stack-sunbird/tasks/restart_private_proxy.yml b/ansible/roles/stack-sunbird/tasks/restart_private_proxy.yml new file mode 100644 index 000000000..d2830b37e --- /dev/null +++ b/ansible/roles/stack-sunbird/tasks/restart_private_proxy.yml @@ -0,0 +1,18 @@ +--- +- hosts: localhost + tasks: + - name: check if private proxy is running + shell: docker service ps private_proxy + ignore_errors: yes + register: private_proxy_status + + - name: Getting the list of proxy services host details + shell: "getent ahostsv4 $(docker service ps private_proxy | grep Runn | awk '{print $4}') | cut -d \" \" -f1 | uniq" + register: proxy_details + when: private_proxy_status.failed != true + + - name: reload proxy containers configurations + shell: "docker ps | grep proxy_proxy | awk '{print $1}' | xargs -I % docker exec % nginx -s reload;" + delegate_to: "{{item}}" + with_items: "{{(proxy_details.stdout_lines)|list}}" + when: proxy_details.changed diff --git a/ansible/roles/stack-sunbird/templates/content-service_application.conf b/ansible/roles/stack-sunbird/templates/content-service_application.conf index 40afcb646..0bd872c83 100644 --- a/ansible/roles/stack-sunbird/templates/content-service_application.conf +++ b/ansible/roles/stack-sunbird/templates/content-service_application.conf @@ -427,6 +427,7 @@ installation.id: ekstep channel { default: "in.ekstep" + fetch.suggested_frameworks: true } languageCode { diff --git a/ansible/roles/stack-sunbird/templates/sunbird_player.env b/ansible/roles/stack-sunbird/templates/sunbird_player.env index a7b923833..9041137a7 100644 --- a/ansible/roles/stack-sunbird/templates/sunbird_player.env +++ b/ansible/roles/stack-sunbird/templates/sunbird_player.env @@ -84,4 +84,5 @@ sunbird_portal_base_url={{sunbird_portal_base_url | d('')}} sunbird_portal_updateLoginTimeEnabled={{sunbird_portal_updateLoginTimeEnabled|lower}} #Release-2.8.6 -sunbird_portal_slugForProminentFilter={{sunbird_portal_slugForProminentFilter | default("")}} \ No newline at end of file +sunbird_portal_slugForProminentFilter={{sunbird_portal_slugForProminentFilter | default("")}} +sunbird_report_service_url={{sunbird_report_service_url}} diff --git a/ansible/roles/stack-sunbird/templates/sunbird_report-service.env b/ansible/roles/stack-sunbird/templates/sunbird_report-service.env new file mode 100644 index 000000000..8b881b2a2 --- /dev/null +++ b/ansible/roles/stack-sunbird/templates/sunbird_report-service.env @@ -0,0 +1,9 @@ +SUNBIRD_REPORTS_DB_HOST={{dp_postgres_host}} +SUNBIRD_REPORTS_DB_NAME={{dp_postgres_db}} +SUNBIRD_REPORTS_DB_PASSWORD={{dp_postgres_password}} +SUNBIRD_REPORTS_DB_PORT=5432 +SUNBIRD_REPORTS_DB_USER={{dp_postgres_username}} +SUNBIRD_SERVER_PORT=3030 +SUNBIRD_BASE_REPORT_URL=report +SUNBIRD_REPORTS_TABLE_NAME=report +SUNBIRD_ENV="https://{{domain_name}}" diff --git a/images/openbadger/Dockerfile b/images/openbadger/Dockerfile index 44a30c92c..40a2d4721 100755 --- a/images/openbadger/Dockerfile +++ b/images/openbadger/Dockerfile @@ -1,7 +1,8 @@ -FROM ubuntu:17.10 +FROM ubuntu:18.04 MAINTAINER Rajesh Rajendran # Installing and configuring packages +RUN apt update && apt install -y python-psycopg2 COPY ./images/openbadger/configure.sh /tmp RUN /tmp/configure.sh diff --git a/kubernetes/ansible/roles/deploy-badger/defaults/main.yml b/kubernetes/ansible/roles/deploy-badger/defaults/main.yml index 3d79b1acc..30627ca74 100644 --- a/kubernetes/ansible/roles/deploy-badger/defaults/main.yml +++ b/kubernetes/ansible/roles/deploy-badger/defaults/main.yml @@ -6,13 +6,16 @@ badger_liveness_readiness: path: /health port: 8004 initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 + periodSeconds: 30 + timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 1 + successThreshold: 2 livenessProbe: httpGet: path: /health port: 8004 - initialDelaySeconds: 60 - periodSeconds: 10 \ No newline at end of file + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 diff --git a/kubernetes/ansible/roles/helm-deploy/defaults/main.yml b/kubernetes/ansible/roles/helm-deploy/defaults/main.yml index cd350725d..e50ad4dac 100644 --- a/kubernetes/ansible/roles/helm-deploy/defaults/main.yml +++ b/kubernetes/ansible/roles/helm-deploy/defaults/main.yml @@ -43,13 +43,16 @@ adminutils_liveness_readiness: path: /health port: 4000 initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 + periodSeconds: 30 + timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 1 + successThreshold: 2 livenessProbe: httpGet: path: /health port: 4000 - initialDelaySeconds: 60 - periodSeconds: 10 + initialDelaySeconds: 30 + periodSeconds: 30 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 2 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 8aff70082..889bd048f 100644 --- a/kubernetes/helm_charts/core/nginx-private-ingress/templates/configmap.yaml +++ b/kubernetes/helm_charts/core/nginx-private-ingress/templates/configmap.yaml @@ -36,6 +36,14 @@ data: rewrite ^/admin-api/(.*) /$1 break; proxy_pass http://kong:8001; } + location /player/ { + rewrite ^/player/(.*) /$1 break; + proxy_pass http://player:3000; + } + location /knowledgemw/ { + rewrite ^/knowledgemw/(.*) /$1 break; + proxy_pass http://knowledge-mw-service:5000; + } location /content/ { rewrite ^/content/(.*) /$1 break; proxy_pass http://content-service:9000; @@ -72,6 +80,10 @@ data: rewrite ^/taxonomy/(.*) /$1 break; proxy_pass http://taxonomy-service:9000; } + location /report/ { + rewrite ^/report/(.*) /$1 break; + proxy_pass http://report-service:3030; + } location /lms/ { rewrite ^/lms/(.*) /$1 break; proxy_pass http://lms-service:9000; diff --git a/kubernetes/helm_charts/core/report/Chart.yaml b/kubernetes/helm_charts/core/report/Chart.yaml new file mode 100644 index 000000000..3ef91a05f --- /dev/null +++ b/kubernetes/helm_charts/core/report/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: report +version: 0.1.0 diff --git a/kubernetes/helm_charts/core/report/templates/_helpers.tpl b/kubernetes/helm_charts/core/report/templates/_helpers.tpl new file mode 100644 index 000000000..590205843 --- /dev/null +++ b/kubernetes/helm_charts/core/report/templates/_helpers.tpl @@ -0,0 +1,45 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "telemetry.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "telemetry.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "telemetry.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "telemetry.labels" -}} +app.kubernetes.io/name: {{ include "telemetry.name" . }} +helm.sh/chart: {{ include "telemetry.chart" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} diff --git a/kubernetes/helm_charts/core/report/templates/configmap.yaml b/kubernetes/helm_charts/core/report/templates/configmap.yaml new file mode 100644 index 000000000..00fdbaa0c --- /dev/null +++ b/kubernetes/helm_charts/core/report/templates/configmap.yaml @@ -0,0 +1,10 @@ +#apiVersion: v1 +#data: +# {{- range $key, $val := .Values.telemetryenv }} +# {{ $key }}: {{ $val }} +# {{- end }} +#kind: ConfigMap +#metadata: +# creationTimestamp: null +# name: {{ .Chart.Name }}-config +# namespace: {{ .Values.namespace }} diff --git a/kubernetes/helm_charts/core/report/templates/deployment.yaml b/kubernetes/helm_charts/core/report/templates/deployment.yaml new file mode 100644 index 000000000..13685096d --- /dev/null +++ b/kubernetes/helm_charts/core/report/templates/deployment.yaml @@ -0,0 +1,59 @@ +--- +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: {{ default (sub .Values.replicaCount 1) .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 + 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 }} + +--- +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 }} + selector: + app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/report/values.j2 b/kubernetes/helm_charts/core/report/values.j2 new file mode 100644 index 000000000..de0f0c86a --- /dev/null +++ b/kubernetes/helm_charts/core/report/values.j2 @@ -0,0 +1,26 @@ + +### variables for report service ### + +namespace: {{ namespace }} +imagepullsecrets: {{ imagepullsecrets }} +dockerhub: {{ dockerhub }} + +replicaCount: {{report_replicacount|default(1)}} +repository: {{report_repository|default('report-service')}} +image_tag: {{ image_tag }} +resources: + requests: + cpu: {{report_cpu_req|default('100m')}} + memory: {{report_mem_req|default('100Mi')}} + limits: + cpu: {{report_cpu_limit|default('1')}} + memory: {{report_mem_limit|default('1024Mi')}} +network: + port: 3030 + targetport: 3030 +strategy: + type: RollingUpdate + maxsurge: {{ report_maxsurge|default(1) }} + maxunavailable: {{ report_maxunavailable|default }} + +{{ report_liveness_readiness | to_nice_yaml }} diff --git a/kubernetes/helm_charts/monitoring/dashboards/dashboards/host-details.json b/kubernetes/helm_charts/monitoring/dashboards/dashboards/host-details.json index 75ee9e50d..bfdfa3109 100644 --- a/kubernetes/helm_charts/monitoring/dashboards/dashboards/host-details.json +++ b/kubernetes/helm_charts/monitoring/dashboards/dashboards/host-details.json @@ -16,7 +16,8 @@ "editable": true, "gnetId": 2666, "graphTooltip": 0, - "iteration": 1580904642722, + "id": 111, + "iteration": 1587138485395, "links": [], "panels": [ { @@ -42,7 +43,7 @@ }, "gridPos": { "h": 3, - "w": 4, + "w": 3, "x": 0, "y": 0 }, @@ -84,7 +85,7 @@ "tableColumn": "nodename", "targets": [ { - "expr": "node_uname_info{instance=~\"$server\"}", + "expr": "node_uname_info{instance=~\"$server:9100\"}", "format": "table", "intervalFactor": 1, "refId": "A", @@ -126,8 +127,8 @@ }, "gridPos": { "h": 3, - "w": 4, - "x": 4, + "w": 6, + "x": 3, "y": 0 }, "id": 3, @@ -168,7 +169,7 @@ "tableColumn": "", "targets": [ { - "expr": "node_load1{instance='$server'} / count by (cluster, job, instance)(count by(cluster, job, instance, cpu)(node_cpu_seconds_total{instance='$server'}))", + "expr": "node_load1{instance='$server:9100'} / count by (cluster, job, instance)(count by(cluster, job, instance, cpu)(node_cpu_seconds_total{instance='$server:9100'}))", "format": "time_series", "intervalFactor": 1, "refId": "A" @@ -187,6 +188,94 @@ ], "valueName": "current" }, + { + "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": "Prometheus", + "editable": true, + "error": false, + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 9, + "y": 0 + }, + "hideTimeOverride": true, + "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, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(irate(node_cpu_seconds_total{mode=\"idle\", instance=~\"$server:9100\"}[5m])) * 100 / count(node_cpu_seconds_total{mode=\"user\", instance=~\"$server:9100\"})", + "format": "time_series", + "interval": "10s", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 20 + } + ], + "thresholds": "", + "timeFrom": "10s", + "title": "CPU Idle", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, { "cacheTimeout": null, "colorBackground": false, @@ -209,8 +298,8 @@ }, "gridPos": { "h": 3, - "w": 4, - "x": 8, + "w": 3, + "x": 12, "y": 0 }, "hideTimeOverride": true, @@ -252,7 +341,7 @@ "tableColumn": "", "targets": [ { - "expr": "node_memory_MemAvailable_bytes{instance=~\"$server\"}", + "expr": "node_memory_MemAvailable_bytes{instance=~\"$server:9100\"}", "format": "time_series", "interval": "30s", "intervalFactor": 2, @@ -263,6 +352,7 @@ ], "thresholds": "", "timeFrom": "10s", + "timeShift": null, "title": "Available Memory", "type": "singlestat", "valueFontSize": "80%", @@ -287,7 +377,7 @@ "datasource": "Prometheus", "editable": true, "error": false, - "format": "bytes", + "format": "none", "gauge": { "maxValue": 100, "minValue": 0, @@ -297,12 +387,12 @@ }, "gridPos": { "h": 3, - "w": 4, - "x": 12, + "w": 3, + "x": 15, "y": 0 }, "hideTimeOverride": true, - "id": 5, + "id": 21, "interval": null, "links": [], "mappingType": 1, @@ -320,6 +410,7 @@ "nullPointMode": "connected", "nullText": null, "options": {}, + "pluginVersion": "6.5.2", "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -340,18 +431,19 @@ "tableColumn": "", "targets": [ { - "expr": "sum(node_filesystem_free_bytes{fstype=~\"xfs|ext4\",instance=~\"$server\"})", + "expr": "count without(cpu, mode) (node_cpu_seconds_total{mode=\"idle\", instance=\"$server:9100\"})", "format": "time_series", "interval": "30s", - "intervalFactor": 1, + "intervalFactor": 2, "legendFormat": "", "refId": "A", - "step": 30 + "step": 60 } ], "thresholds": "", "timeFrom": "10s", - "title": "Free Storage", + "timeShift": null, + "title": "Total Cores", "type": "singlestat", "valueFontSize": "80%", "valueMaps": [ @@ -373,10 +465,9 @@ "rgba(50, 172, 45, 0.97)" ], "datasource": "Prometheus", - "decimals": 1, "editable": true, "error": false, - "format": "s", + "format": "bytes", "gauge": { "maxValue": 100, "minValue": 0, @@ -386,11 +477,12 @@ }, "gridPos": { "h": 3, - "w": 4, - "x": 16, + "w": 3, + "x": 18, "y": 0 }, - "id": 6, + "hideTimeOverride": true, + "id": 5, "interval": null, "links": [], "mappingType": 1, @@ -428,15 +520,18 @@ "tableColumn": "", "targets": [ { - "expr": "time() - node_boot_time_seconds{instance=~\"$server\"}", + "expr": "sum(node_filesystem_free_bytes{fstype=~\"xfs|ext4\",instance=~\"$server:9100\"})", "format": "time_series", + "interval": "30s", "intervalFactor": 1, + "legendFormat": "", "refId": "A", - "step": 20 + "step": 30 } ], "thresholds": "", - "title": "Uptime", + "timeFrom": "10s", + "title": "Free Storage", "type": "singlestat", "valueFontSize": "80%", "valueMaps": [ @@ -458,9 +553,10 @@ "rgba(50, 172, 45, 0.97)" ], "datasource": "Prometheus", + "decimals": 1, "editable": true, "error": false, - "format": "percent", + "format": "s", "gauge": { "maxValue": 100, "minValue": 0, @@ -470,12 +566,11 @@ }, "gridPos": { "h": 3, - "w": 4, - "x": 20, + "w": 3, + "x": 21, "y": 0 }, - "hideTimeOverride": true, - "id": 2, + "id": 6, "interval": null, "links": [], "mappingType": 1, @@ -513,18 +608,15 @@ "tableColumn": "", "targets": [ { - "expr": "sum(irate(node_cpu_seconds_total{mode=\"idle\", instance=~\"$server\"}[5m])) * 100 / count(node_cpu_seconds_total{mode=\"user\", instance=~\"$server\"})", + "expr": "time() - node_boot_time_seconds{instance=~\"$server:9100\"}", "format": "time_series", - "interval": "10s", - "intervalFactor": 2, - "legendFormat": "", + "intervalFactor": 1, "refId": "A", "step": 20 } ], "thresholds": "", - "timeFrom": "10s", - "title": "CPU Idle", + "title": "Uptime", "type": "singlestat", "valueFontSize": "80%", "valueMaps": [ @@ -585,7 +677,7 @@ "steppedLine": false, "targets": [ { - "expr": "avg without (cpu) (rate(node_cpu_seconds_total{instance=~\"$server\", mode!=\"idle\"}[5m]))", + "expr": "avg without (cpu) (rate(node_cpu_seconds_total{instance=~\"$server:9100\", mode!=\"idle\"}[5m]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{mode}}", @@ -684,7 +776,7 @@ "steppedLine": false, "targets": [ { - "expr": "rate(node_network_receive_bytes_total{device!=\"lo\",instance=~\"$server\"}[5m])", + "expr": "rate(node_network_receive_bytes_total{device!=\"lo\",instance=~\"$server:9100\"}[5m])", "format": "time_series", "hide": false, "intervalFactor": 1, @@ -694,7 +786,7 @@ "step": 2 }, { - "expr": "rate(node_network_transmit_bytes_total{device!='lo', instance=~\"$server\"}[5m])", + "expr": "rate(node_network_transmit_bytes_total{device!='lo', instance=~\"$server:9100\"}[5m])", "format": "time_series", "hide": false, "intervalFactor": 1, @@ -799,7 +891,7 @@ "steppedLine": false, "targets": [ { - "expr": "node_memory_MemTotal_bytes{instance=~\"$server\"} - node_memory_MemFree_bytes{instance=~\"$server\"} - node_memory_Cached_bytes{instance=~\"$server\"} - node_memory_Buffers_bytes{instance=~\"$server\"} - node_memory_Slab_bytes{instance=~\"$server\"}", + "expr": "node_memory_MemTotal_bytes{instance=~\"$server:9100\"} - node_memory_MemFree_bytes{instance=~\"$server:9100\"} - node_memory_Cached_bytes{instance=~\"$server:9100\"} - node_memory_Buffers_bytes{instance=~\"$server:9100\"} - node_memory_Slab_bytes{instance=~\"$server:9100\"}", "format": "time_series", "hide": false, "intervalFactor": 2, @@ -810,7 +902,7 @@ "target": "" }, { - "expr": "node_memory_Buffers_bytes{instance=~\"$server\"}", + "expr": "node_memory_Buffers_bytes{instance=~\"$server:9100\"}", "format": "time_series", "hide": false, "intervalFactor": 2, @@ -819,7 +911,7 @@ "step": 4 }, { - "expr": "node_memory_Cached_bytes{instance=~\"$server\"} + node_memory_Slab_bytes{instance=~\"$server\"}", + "expr": "node_memory_Cached_bytes{instance=~\"$server:9100\"} + node_memory_Slab_bytes{instance=~\"$server:9100\"}", "format": "time_series", "intervalFactor": 2, "legendFormat": "Cached", @@ -827,7 +919,7 @@ "step": 4 }, { - "expr": "node_memory_MemFree_bytes{instance=~\"$server\"}", + "expr": "node_memory_MemFree_bytes{instance=~\"$server:9100\"}", "format": "time_series", "hide": false, "intervalFactor": 2, @@ -942,7 +1034,7 @@ "tableColumn": "", "targets": [ { - "expr": "(node_memory_MemAvailable_bytes{instance=~\"$server\"} / node_memory_MemTotal_bytes{instance=~\"$server\"}) * 100", + "expr": "(node_memory_MemAvailable_bytes{instance=~\"$server:9100\"} / node_memory_MemTotal_bytes{instance=~\"$server:9100\"}) * 100", "format": "time_series", "intervalFactor": 2, "refId": "A", @@ -1022,7 +1114,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (instance) (irate(node_disk_reads_completed_total{instance=~\"$server\"}[5m]))", + "expr": "sum by (instance) (irate(node_disk_reads_completed_total{instance=~\"$server:9100\"}[5m]))", "format": "time_series", "hide": false, "intervalFactor": 4, @@ -1032,7 +1124,7 @@ "target": "" }, { - "expr": "sum by (instance) (irate(node_disk_writes_completed_total{instance=~\"$server\"}[5m]))", + "expr": "sum by (instance) (irate(node_disk_writes_completed_total{instance=~\"$server:9100\"}[5m]))", "format": "time_series", "intervalFactor": 4, "legendFormat": "writes per second", @@ -1040,7 +1132,7 @@ "step": 8 }, { - "expr": "sum by (instance) (irate(node_disk_io_time_seconds_total{instance=~\"$server\"}[5m]))", + "expr": "sum by (instance) (irate(node_disk_io_time_seconds_total{instance=~\"$server:9100\"}[5m]))", "format": "time_series", "intervalFactor": 4, "legendFormat": "io time", @@ -1048,7 +1140,7 @@ "step": 8 }, { - "expr": "sum by (instance) (irate(node_disk_reads_completed_total{instance=~\"$server\"}[5m])) + sum by (instance) (irate(node_disk_writes_completed_total{instance=~\"$server\"}[5m]))", + "expr": "sum by (instance) (irate(node_disk_reads_completed_total{instance=~\"$server:9100\"}[5m])) + sum by (instance) (irate(node_disk_writes_completed_total{instance=~\"$server:9100\"}[5m]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "IOPS", @@ -1159,7 +1251,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(irate(node_disk_read_bytes_total{instance=~\"$server\"}[5m]))", + "expr": "sum(irate(node_disk_read_bytes_total{instance=~\"$server:9100\"}[5m]))", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -1169,7 +1261,7 @@ "step": 2 }, { - "expr": "sum(irate(node_disk_written_bytes_total{instance=~\"$server\"}[5m]))", + "expr": "sum(irate(node_disk_written_bytes_total{instance=~\"$server:9100\"}[5m]))", "format": "time_series", "intervalFactor": 1, "legendFormat": "written", @@ -1178,7 +1270,7 @@ "step": 2 }, { - "expr": "sum(irate(node_disk_io_time_seconds_total{instance=~\"$server\"}[5m]))", + "expr": "sum(irate(node_disk_io_time_seconds_total{instance=~\"$server:9100\"}[5m]))", "format": "time_series", "intervalFactor": 1, "legendFormat": "io time", @@ -1271,7 +1363,7 @@ "steppedLine": false, "targets": [ { - "expr": "rate(node_filesystem_free_bytes{instance=~'$server', mountpoint='/'}[5m])", + "expr": "rate(node_filesystem_free_bytes{instance=~'$server:9100', mountpoint='/'}[5m])", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{device}} mounted to {{ mountpoint }}", @@ -1383,7 +1475,7 @@ "tableColumn": "", "targets": [ { - "expr": "min(node_filesystem_free_bytes{fstype=~\"xfs|ext4\",instance=~\"$server\"} / node_filesystem_size_bytes{fstype=~\"xfs|ext4\",instance=~\"$server\"})", + "expr": "min(node_filesystem_free_bytes{fstype=~\"xfs|ext4\",instance=~\"$server:9100\"} / node_filesystem_size_bytes{fstype=~\"xfs|ext4\",instance=~\"$server:9100\"})", "format": "time_series", "intervalFactor": 2, "legendFormat": "", @@ -1448,7 +1540,7 @@ "steppedLine": false, "targets": [ { - "expr": "node_load1{instance=~\"$server\"}", + "expr": "node_load1{instance=~\"$server:9100\"}", "format": "time_series", "interval": "", "intervalFactor": 2, @@ -1497,33 +1589,735 @@ "align": false, "alignLevel": null } - } - ], - "refresh": false, - "schemaVersion": 21, - "style": "dark", - "tags": [ - "prometheus" - ], - "templating": { - "list": [ - { - "allValue": null, - "current": { - "isNone": true, - "selected": false, - "text": "None", - "value": "" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "PrometheusProcessExporter", + "decimals": 2, + "description": "", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 29 + }, + "hiddenSeries": false, + "id": 22, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": null, + "sort": "max", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(namedprocess_namegroup_cpu_seconds_total{groupname=~\"$processes\", instance=\"$server:9256\"}[$interval])) by (groupname)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{groupname}}", + "refId": "A", + "step": 2 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Process CPU Usage", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 2, + "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true }, - "datasource": "Prometheus", - "definition": "label_values(node_boot_time_seconds,instance)", - "hide": 0, - "includeAll": false, - "label": "", - "multi": false, - "name": "server", - "options": [], - "query": "label_values(node_boot_time_seconds,instance)", + { + "decimals": null, + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "PrometheusProcessExporter", + "decimals": 2, + "description": "", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 35 + }, + "hiddenSeries": false, + "id": 23, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": 750, + "sort": "max", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "namedprocess_namegroup_memory_bytes{groupname=~\"$processes\", memtype=\"resident\", instance=\"$server:9256\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{groupname}}", + "refId": "A", + "step": 2 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Process Memory Usage", + "tooltip": { + "shared": true, + "sort": 0, + "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": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "PrometheusProcessExporter", + "decimals": 2, + "description": "", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 41 + }, + "hiddenSeries": false, + "id": 24, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": null, + "sort": "max", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "namedprocess_namegroup_memory_bytes{groupname=~\"$processes\", memtype=\"virtual\", instance=\"$server:9256\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{groupname}}", + "refId": "A", + "step": 2 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Process Page Memory Usage", + "tooltip": { + "shared": true, + "sort": 0, + "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": null, + "show": true + }, + { + "decimals": null, + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "PrometheusProcessExporter", + "decimals": 0, + "description": "", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 47 + }, + "hiddenSeries": false, + "id": 25, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": null, + "sort": "max", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(namedprocess_namegroup_num_procs{groupname=~\"$processes\", instance=\"$server:9256\"}) by (groupname)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{groupname}}", + "refId": "A", + "step": 2 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Number of Processes In Group", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": null, + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "decimals": null, + "format": "short", + "label": "", + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "PrometheusProcessExporter", + "decimals": null, + "description": "", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 53 + }, + "hiddenSeries": false, + "id": 26, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": null, + "sort": "max", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "rate(namedprocess_namegroup_read_bytes_total{groupname=~\"$processes\", instance=\"$server:9256\"}[$interval])", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{groupname}}", + "refId": "A", + "step": 2 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Process Read Bytes", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": null, + "format": "KBs", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "decimals": null, + "format": "short", + "label": "", + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "PrometheusProcessExporter", + "decimals": 0, + "description": "", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 59 + }, + "hiddenSeries": false, + "id": 27, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": 750, + "sort": "max", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "rate(namedprocess_namegroup_write_bytes_total{groupname=~\"$processes\", instance=\"$server:9256\"}[$interval])", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{groupname}}", + "refId": "A", + "step": 2 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Process Write Bytes", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": null, + "format": "KBs", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "decimals": null, + "format": "short", + "label": "", + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "refresh": "1m", + "schemaVersion": 21, + "style": "dark", + "tags": [ + "prometheus" + ], + "templating": { + "list": [ + { + "allValue": null, + "current": { + "tags": [], + "text": "28.0.2.13", + "value": "28.0.2.13" + }, + "datasource": "Prometheus", + "definition": "label_values(node_boot_time_seconds,instance)", + "hide": 0, + "includeAll": false, + "label": "", + "multi": false, + "name": "server", + "options": [], + "query": "label_values(node_boot_time_seconds,instance)", + "refresh": 1, + "regex": "/(.*):/", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "auto": false, + "auto_count": 30, + "auto_min": "10s", + "current": { + "selected": false, + "text": "1m", + "value": "1m" + }, + "hide": 0, + "label": null, + "name": "interval", + "options": [ + { + "selected": true, + "text": "1m", + "value": "1m" + }, + { + "selected": false, + "text": "5m", + "value": "5m" + }, + { + "selected": false, + "text": "10m", + "value": "10m" + }, + { + "selected": false, + "text": "30m", + "value": "30m" + }, + { + "selected": false, + "text": "1h", + "value": "1h" + }, + { + "selected": false, + "text": "6h", + "value": "6h" + }, + { + "selected": false, + "text": "12h", + "value": "12h" + }, + { + "selected": false, + "text": "1d", + "value": "1d" + }, + { + "selected": false, + "text": "7d", + "value": "7d" + }, + { + "selected": false, + "text": "14d", + "value": "14d" + }, + { + "selected": false, + "text": "30d", + "value": "30d" + } + ], + "query": "1m,5m,10m,30m,1h,6h,12h,1d,7d,14d,30d", + "refresh": 2, + "skipUrlSync": false, + "type": "interval" + }, + { + "allValue": null, + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": "PrometheusProcessExporter", + "definition": "label_values(namedprocess_namegroup_cpu_seconds_total{instance=\"$server:9256\"}, groupname)", + "hide": 0, + "includeAll": true, + "label": null, + "multi": true, + "name": "processes", + "options": [], + "query": "label_values(namedprocess_namegroup_cpu_seconds_total{instance=\"$server:9256\"}, groupname)", "refresh": 1, "regex": "", "skipUrlSync": false, @@ -1567,6 +2361,6 @@ }, "timezone": "browser", "title": "Host Details", - "uid": "000000004", - "version": 1 + "uid": "mrXQlqCZz", + "version": 40 } diff --git a/kubernetes/helm_charts/monitoring/dashboards/dashboards/process-exporter.json b/kubernetes/helm_charts/monitoring/dashboards/dashboards/process-exporter.json index 23ce9e504..e3b144d66 100644 --- a/kubernetes/helm_charts/monitoring/dashboards/dashboards/process-exporter.json +++ b/kubernetes/helm_charts/monitoring/dashboards/dashboards/process-exporter.json @@ -17,7 +17,7 @@ "gnetId": 249, "graphTooltip": 1, "id": 58, - "iteration": 1586431942090, + "iteration": 1587139046794, "links": [ { "asDropdown": true, @@ -38,6 +38,7 @@ "dashLength": 10, "dashes": false, "datasource": "PrometheusProcessExporter", + "decimals": 2, "editable": true, "error": false, "fill": 1, @@ -95,7 +96,7 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "cpu", + "title": "Process CPU Usage", "tooltip": { "msResolution": false, "shared": true, @@ -139,6 +140,7 @@ "dashLength": 10, "dashes": false, "datasource": "PrometheusProcessExporter", + "decimals": 2, "editable": true, "error": false, "fill": 1, @@ -158,7 +160,7 @@ "avg": true, "current": true, "max": true, - "min": true, + "min": false, "rightSide": true, "show": true, "total": false, @@ -193,7 +195,7 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "active memory", + "title": "Process Memory Usage", "tooltip": { "msResolution": false, "shared": true, @@ -237,6 +239,7 @@ "dashLength": 10, "dashes": false, "datasource": "PrometheusProcessExporter", + "decimals": 2, "editable": true, "error": false, "fill": 1, @@ -293,7 +296,7 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "virtual / page memory", + "title": "Process Page Memory Usage", "tooltip": { "msResolution": false, "shared": true, @@ -394,7 +397,7 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "num processes", + "title": "Number of Processes In Group", "tooltip": { "msResolution": false, "shared": true, @@ -492,7 +495,7 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "read bytes", + "title": "Process Read Bytes", "tooltip": { "msResolution": false, "shared": true, @@ -509,7 +512,7 @@ }, "yaxes": [ { - "format": "Bps", + "format": "KBs", "label": null, "logBase": 1, "max": null, @@ -555,7 +558,7 @@ "avg": true, "current": true, "max": true, - "min": true, + "min": false, "rightSide": true, "show": true, "total": false, @@ -590,7 +593,7 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "write bytes", + "title": "Process Write Bytes", "tooltip": { "msResolution": false, "shared": true, @@ -607,7 +610,7 @@ }, "yaxes": [ { - "format": "Bps", + "format": "KBs", "label": null, "logBase": 1, "max": null, @@ -629,7 +632,7 @@ } } ], - "refresh": false, + "refresh": "1m", "schemaVersion": 21, "style": "dark", "tags": [ @@ -799,5 +802,5 @@ "timezone": "browser", "title": "Process Exporter", "uid": "z7D_C1CWz", - "version": 4 + "version": 8 } From 67510efd05073804eec38a82d5ccf8442c3688fe Mon Sep 17 00:00:00 2001 From: Rajesh Rathnam Date: Tue, 21 Apr 2020 18:37:46 +0530 Subject: [PATCH 2306/2894] SB-18656 - Onboard certreg read and search --- ansible/roles/kong-api/defaults/main.yml | 34 ++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/ansible/roles/kong-api/defaults/main.yml b/ansible/roles/kong-api/defaults/main.yml index 7eaccba93..ed033c182 100644 --- a/ansible/roles/kong-api/defaults/main.yml +++ b/ansible/roles/kong-api/defaults/main.yml @@ -3932,6 +3932,40 @@ kong_apis: config.limit_by: credential - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" + + - name: searchRegCertificate + request_path: "{{ cert_registry_service_prefix }}/v1/certs/search" + upstream_url: "{{ cert_registry_service_url }}/certs/v1/registry/search" + strip_request_path: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: "{{ searchRegCertificate_ACL | default(['publicUser']) }}" + - 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: readRegCertificate + request_path: "{{ cert_registry_service_prefix }}/v1/certs/read" + upstream_url: "{{ cert_registry_service_url }}/certs/v1/registry/read" + strip_request_path: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: "{{ readRegCertificate_ACL | default(['publicUser']) }}" + - 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: updateDesktopApp request_path: "{{ desktop_app_prefix }}/v1/update" From 25d95d726b4787cd57ff2dc6ccc03c8bcae238c4 Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Tue, 21 Apr 2020 21:09:01 +0530 Subject: [PATCH 2307/2894] fix: remove success threshold for liveness --- ansible/roles/stack-sunbird/defaults/main.yml | 17 ----------------- .../roles/deploy-badger/defaults/main.yml | 1 - .../ansible/roles/helm-deploy/defaults/main.yml | 1 - 3 files changed, 19 deletions(-) diff --git a/ansible/roles/stack-sunbird/defaults/main.yml b/ansible/roles/stack-sunbird/defaults/main.yml index 0839cedd8..2d06816df 100644 --- a/ansible/roles/stack-sunbird/defaults/main.yml +++ b/ansible/roles/stack-sunbird/defaults/main.yml @@ -284,7 +284,6 @@ lms_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 apimanager_liveness_readiness: healthcheck: true @@ -305,7 +304,6 @@ apimanager_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 assessment_liveness_readiness: healthcheck: true @@ -326,7 +324,6 @@ assessment_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 cert_liveness_readiness: healthcheck: true @@ -347,7 +344,6 @@ cert_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 certregistry_liveness_readiness: healthcheck: true @@ -368,7 +364,6 @@ certregistry_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 content_liveness_readiness: healthcheck: true @@ -389,7 +384,6 @@ content_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 enc_liveness_readiness: healthcheck: true @@ -410,7 +404,6 @@ enc_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 knowledgemw_liveness_readiness: healthcheck: true @@ -431,7 +424,6 @@ knowledgemw_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 learner_liveness_readiness: healthcheck: true @@ -452,7 +444,6 @@ learner_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 notification_liveness_readiness: healthcheck: true @@ -473,7 +464,6 @@ notification_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 player_liveness_readiness: healthcheck: true @@ -494,7 +484,6 @@ player_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 print_liveness_readiness: healthcheck: true @@ -515,7 +504,6 @@ print_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 telemetry_liveness_readiness: healthcheck: true @@ -536,7 +524,6 @@ telemetry_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 userorg_liveness_readiness: readinessProbe: @@ -556,7 +543,6 @@ userorg_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 search_liveness_readiness: healthcheck: true @@ -577,7 +563,6 @@ search_liveness_readiness: periodSeconds: 10 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 taxonomy_liveness_readiness: healthcheck: true @@ -616,5 +601,3 @@ report_liveness_readiness: periodSeconds: 10 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 - diff --git a/kubernetes/ansible/roles/deploy-badger/defaults/main.yml b/kubernetes/ansible/roles/deploy-badger/defaults/main.yml index 30627ca74..8dc82874e 100644 --- a/kubernetes/ansible/roles/deploy-badger/defaults/main.yml +++ b/kubernetes/ansible/roles/deploy-badger/defaults/main.yml @@ -18,4 +18,3 @@ badger_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 diff --git a/kubernetes/ansible/roles/helm-deploy/defaults/main.yml b/kubernetes/ansible/roles/helm-deploy/defaults/main.yml index 9e41dbe41..97612cabf 100644 --- a/kubernetes/ansible/roles/helm-deploy/defaults/main.yml +++ b/kubernetes/ansible/roles/helm-deploy/defaults/main.yml @@ -55,4 +55,3 @@ adminutils_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 From fb8b9339e96b24a90cb43d8008b0890df029b9d3 Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Tue, 21 Apr 2020 21:09:01 +0530 Subject: [PATCH 2308/2894] fix: remove success threshold for liveness --- ansible/roles/stack-sunbird/defaults/main.yml | 17 ----------------- .../roles/deploy-badger/defaults/main.yml | 1 - .../ansible/roles/helm-deploy/defaults/main.yml | 1 - 3 files changed, 19 deletions(-) diff --git a/ansible/roles/stack-sunbird/defaults/main.yml b/ansible/roles/stack-sunbird/defaults/main.yml index 7cfea6349..1541c1558 100644 --- a/ansible/roles/stack-sunbird/defaults/main.yml +++ b/ansible/roles/stack-sunbird/defaults/main.yml @@ -282,7 +282,6 @@ lms_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 apimanager_liveness_readiness: healthcheck: true @@ -303,7 +302,6 @@ apimanager_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 assessment_liveness_readiness: healthcheck: true @@ -324,7 +322,6 @@ assessment_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 cert_liveness_readiness: healthcheck: true @@ -345,7 +342,6 @@ cert_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 certregistry_liveness_readiness: healthcheck: true @@ -366,7 +362,6 @@ certregistry_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 content_liveness_readiness: healthcheck: true @@ -387,7 +382,6 @@ content_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 enc_liveness_readiness: healthcheck: true @@ -408,7 +402,6 @@ enc_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 knowledgemw_liveness_readiness: healthcheck: true @@ -429,7 +422,6 @@ knowledgemw_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 learner_liveness_readiness: healthcheck: true @@ -450,7 +442,6 @@ learner_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 notification_liveness_readiness: healthcheck: true @@ -471,7 +462,6 @@ notification_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 player_liveness_readiness: healthcheck: true @@ -492,7 +482,6 @@ player_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 print_liveness_readiness: healthcheck: true @@ -513,7 +502,6 @@ print_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 telemetry_liveness_readiness: healthcheck: true @@ -534,7 +522,6 @@ telemetry_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 userorg_liveness_readiness: readinessProbe: @@ -554,7 +541,6 @@ userorg_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 search_liveness_readiness: healthcheck: true @@ -575,7 +561,6 @@ search_liveness_readiness: periodSeconds: 10 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 taxonomy_liveness_readiness: healthcheck: true @@ -614,5 +599,3 @@ report_liveness_readiness: periodSeconds: 10 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 - diff --git a/kubernetes/ansible/roles/deploy-badger/defaults/main.yml b/kubernetes/ansible/roles/deploy-badger/defaults/main.yml index 30627ca74..8dc82874e 100644 --- a/kubernetes/ansible/roles/deploy-badger/defaults/main.yml +++ b/kubernetes/ansible/roles/deploy-badger/defaults/main.yml @@ -18,4 +18,3 @@ badger_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 diff --git a/kubernetes/ansible/roles/helm-deploy/defaults/main.yml b/kubernetes/ansible/roles/helm-deploy/defaults/main.yml index e50ad4dac..2bdd08000 100644 --- a/kubernetes/ansible/roles/helm-deploy/defaults/main.yml +++ b/kubernetes/ansible/roles/helm-deploy/defaults/main.yml @@ -55,4 +55,3 @@ adminutils_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 From b7e7a1d3625d68ce07dbccbc4140f8e8f8d9026f Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Tue, 21 Apr 2020 21:09:01 +0530 Subject: [PATCH 2309/2894] fix: remove success threshold for liveness --- ansible/roles/stack-sunbird/defaults/main.yml | 16 ---------------- .../roles/deploy-badger/defaults/main.yml | 1 - .../ansible/roles/helm-deploy/defaults/main.yml | 1 - 3 files changed, 18 deletions(-) diff --git a/ansible/roles/stack-sunbird/defaults/main.yml b/ansible/roles/stack-sunbird/defaults/main.yml index 5d588fbe1..6d7dd297b 100644 --- a/ansible/roles/stack-sunbird/defaults/main.yml +++ b/ansible/roles/stack-sunbird/defaults/main.yml @@ -298,7 +298,6 @@ lms_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 apimanager_liveness_readiness: healthcheck: true @@ -319,7 +318,6 @@ apimanager_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 assessment_liveness_readiness: healthcheck: true @@ -340,7 +338,6 @@ assessment_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 cert_liveness_readiness: healthcheck: true @@ -361,7 +358,6 @@ cert_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 certregistry_liveness_readiness: healthcheck: true @@ -382,7 +378,6 @@ certregistry_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 content_liveness_readiness: healthcheck: true @@ -403,7 +398,6 @@ content_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 enc_liveness_readiness: healthcheck: true @@ -424,7 +418,6 @@ enc_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 knowledgemw_liveness_readiness: healthcheck: true @@ -445,7 +438,6 @@ knowledgemw_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 learner_liveness_readiness: healthcheck: true @@ -466,7 +458,6 @@ learner_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 notification_liveness_readiness: healthcheck: true @@ -487,7 +478,6 @@ notification_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 player_liveness_readiness: healthcheck: true @@ -508,7 +498,6 @@ player_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 print_liveness_readiness: healthcheck: true @@ -529,7 +518,6 @@ print_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 telemetry_liveness_readiness: healthcheck: true @@ -550,7 +538,6 @@ telemetry_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 userorg_liveness_readiness: readinessProbe: @@ -570,7 +557,6 @@ userorg_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 search_liveness_readiness: healthcheck: true @@ -591,7 +577,6 @@ search_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 taxonomy_liveness_readiness: healthcheck: true @@ -633,4 +618,3 @@ report_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 diff --git a/kubernetes/ansible/roles/deploy-badger/defaults/main.yml b/kubernetes/ansible/roles/deploy-badger/defaults/main.yml index 30627ca74..8dc82874e 100644 --- a/kubernetes/ansible/roles/deploy-badger/defaults/main.yml +++ b/kubernetes/ansible/roles/deploy-badger/defaults/main.yml @@ -18,4 +18,3 @@ badger_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 diff --git a/kubernetes/ansible/roles/helm-deploy/defaults/main.yml b/kubernetes/ansible/roles/helm-deploy/defaults/main.yml index e50ad4dac..2bdd08000 100644 --- a/kubernetes/ansible/roles/helm-deploy/defaults/main.yml +++ b/kubernetes/ansible/roles/helm-deploy/defaults/main.yml @@ -55,4 +55,3 @@ adminutils_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 From b9c3a494227e76293dd52728123137a9fb4cd116 Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Tue, 21 Apr 2020 23:53:03 +0530 Subject: [PATCH 2310/2894] fix: missing bracket --- .../core/nginx-private-ingress/templates/configmap.yaml | 1 + 1 file changed, 1 insertion(+) 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 00a54f039..91230f0a4 100644 --- a/kubernetes/helm_charts/core/nginx-private-ingress/templates/configmap.yaml +++ b/kubernetes/helm_charts/core/nginx-private-ingress/templates/configmap.yaml @@ -94,6 +94,7 @@ data: rewrite ^/report/(.*) /$1 break; proxy_pass http://report-service:3030; } + } } kind: ConfigMap metadata: From b897fb6e38dfc2037d4f064be0255cb75607ad61 Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Tue, 21 Apr 2020 23:53:03 +0530 Subject: [PATCH 2311/2894] fix: missing bracket --- .../core/nginx-private-ingress/templates/configmap.yaml | 1 + 1 file changed, 1 insertion(+) 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 ee298c3f6..be3ff2dd4 100644 --- a/kubernetes/helm_charts/core/nginx-private-ingress/templates/configmap.yaml +++ b/kubernetes/helm_charts/core/nginx-private-ingress/templates/configmap.yaml @@ -71,6 +71,7 @@ data: rewrite ^/report/(.*) /$1 break; proxy_pass http://report-service:3030; } + } } kind: ConfigMap metadata: From 4e131eee7950a2d242189054d207b57e0737f330 Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Wed, 22 Apr 2020 00:44:13 +0530 Subject: [PATCH 2312/2894] fix: remove services of missing chart --- .../core/nginx-private-ingress/templates/configmap.yaml | 8 -------- 1 file changed, 8 deletions(-) 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 be3ff2dd4..61f3dec03 100644 --- a/kubernetes/helm_charts/core/nginx-private-ingress/templates/configmap.yaml +++ b/kubernetes/helm_charts/core/nginx-private-ingress/templates/configmap.yaml @@ -59,14 +59,6 @@ data: rewrite ^/notification/(.*) /$1 break; proxy_pass http://notification-service:9000; } - location /search/ { - rewrite ^/search/(.*) /$1 break; - proxy_pass http://search-service:9000; - } - location /taxonomy/ { - rewrite ^/taxonomy/(.*) /$1 break; - proxy_pass http://taxonomy-service:9000; - } location /report/ { rewrite ^/report/(.*) /$1 break; proxy_pass http://report-service:3030; From 1892d5471593b34a32028ec68f2ba09617ce8ea3 Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Wed, 22 Apr 2020 00:44:13 +0530 Subject: [PATCH 2313/2894] fix: remove services of missing chart --- .../core/nginx-private-ingress/templates/configmap.yaml | 8 -------- 1 file changed, 8 deletions(-) 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 91230f0a4..d5754d7f5 100644 --- a/kubernetes/helm_charts/core/nginx-private-ingress/templates/configmap.yaml +++ b/kubernetes/helm_charts/core/nginx-private-ingress/templates/configmap.yaml @@ -82,14 +82,6 @@ data: rewrite ^/notification/(.*) /$1 break; proxy_pass http://notification-service:9000; } - location /search/ { - rewrite ^/search/(.*) /$1 break; - proxy_pass http://search-service:9000; - } - location /taxonomy/ { - rewrite ^/taxonomy/(.*) /$1 break; - proxy_pass http://taxonomy-service:9000; - } location /report/ { rewrite ^/report/(.*) /$1 break; proxy_pass http://report-service:3030; From da7c711fa6d5f0ff4cac657bfdac5b9f63f07441 Mon Sep 17 00:00:00 2001 From: GangaramD Date: Wed, 22 Apr 2020 05:22:36 +0530 Subject: [PATCH 2314/2894] private proxy role update (#1413) * Update restart_private_proxy.yml * Update restart_private_proxy.yml * Update main.yml * Update main.yml --- ansible/roles/stack-sunbird/tasks/main.yml | 3 +- .../tasks/restart_private_proxy.yml | 28 +++++++++---------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/ansible/roles/stack-sunbird/tasks/main.yml b/ansible/roles/stack-sunbird/tasks/main.yml index 548988f9d..bfb3590b5 100644 --- a/ansible/roles/stack-sunbird/tasks/main.yml +++ b/ansible/roles/stack-sunbird/tasks/main.yml @@ -60,6 +60,7 @@ - include: report-service.yml when: deploy_report is defined - + - include: restart_private_proxy.yml + diff --git a/ansible/roles/stack-sunbird/tasks/restart_private_proxy.yml b/ansible/roles/stack-sunbird/tasks/restart_private_proxy.yml index d2830b37e..8244b6e03 100644 --- a/ansible/roles/stack-sunbird/tasks/restart_private_proxy.yml +++ b/ansible/roles/stack-sunbird/tasks/restart_private_proxy.yml @@ -1,18 +1,16 @@ --- -- hosts: localhost - tasks: - - name: check if private proxy is running - shell: docker service ps private_proxy - ignore_errors: yes - register: private_proxy_status +- name: check if private proxy is running + shell: docker service ps private_proxy + ignore_errors: yes + register: private_proxy_status - - name: Getting the list of proxy services host details - shell: "getent ahostsv4 $(docker service ps private_proxy | grep Runn | awk '{print $4}') | cut -d \" \" -f1 | uniq" - register: proxy_details - when: private_proxy_status.failed != true +- name: Getting the list of proxy services host details + shell: "getent ahostsv4 $(docker service ps private_proxy | grep Runn | awk '{print $4}') | cut -d \" \" -f1 | uniq" + register: proxy_details + when: private_proxy_status.failed != true - - name: reload proxy containers configurations - shell: "docker ps | grep proxy_proxy | awk '{print $1}' | xargs -I % docker exec % nginx -s reload;" - delegate_to: "{{item}}" - with_items: "{{(proxy_details.stdout_lines)|list}}" - when: proxy_details.changed +- name: reload proxy containers configurations + shell: "docker ps | grep proxy_proxy | awk '{print $1}' | xargs -I % docker exec % nginx -s reload;" + delegate_to: "{{item}}" + with_items: "{{(proxy_details.stdout_lines)|list}}" + when: proxy_details.changed From 4b22029733bcff7f71404e51c4f6c0136654ab5a Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Wed, 22 Apr 2020 06:28:00 +0530 Subject: [PATCH 2315/2894] fix: adding report service and code fix --- ansible/roles/stack-sunbird/tasks/main.yml | 6 ---- .../stack-sunbird/tasks/report-service.yml | 2 +- pipelines/deploy/report/Jenkinsfile | 35 +++++++++++++++++++ 3 files changed, 36 insertions(+), 7 deletions(-) create mode 100644 pipelines/deploy/report/Jenkinsfile diff --git a/ansible/roles/stack-sunbird/tasks/main.yml b/ansible/roles/stack-sunbird/tasks/main.yml index bfb3590b5..6b21b88af 100644 --- a/ansible/roles/stack-sunbird/tasks/main.yml +++ b/ansible/roles/stack-sunbird/tasks/main.yml @@ -52,12 +52,6 @@ - include: print-service.yml when: deploy_print is defined - - include: search-service.yml - when: deploy_search is defined - - - include: taxonomy-service.yml - when: deploy_taxonomy is defined - - include: report-service.yml when: deploy_report is defined diff --git a/ansible/roles/stack-sunbird/tasks/report-service.yml b/ansible/roles/stack-sunbird/tasks/report-service.yml index 7bf374aa3..83762eb8b 100644 --- a/ansible/roles/stack-sunbird/tasks/report-service.yml +++ b/ansible/roles/stack-sunbird/tasks/report-service.yml @@ -1,6 +1,6 @@ --- - name: Remove report service - shell: "docker service rm telemetry-service" + shell: "docker service rm report-service" ignore_errors: yes - name: Deploy report service diff --git a/pipelines/deploy/report/Jenkinsfile b/pipelines/deploy/report/Jenkinsfile new file mode 100644 index 000000000..a6ad6179c --- /dev/null +++ b/pipelines/deploy/report/Jenkinsfile @@ -0,0 +1,35 @@ +@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=report-service deploy_report=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}" + } + } + catch (err) { + currentBuild.result = "FAILURE" + throw err + } + finally { + slack_notify(currentBuild.result) + email_notify() + } +} From 80a8e5ef5c458ecb22be346d1644cdd90c78bcc0 Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Wed, 22 Apr 2020 06:28:00 +0530 Subject: [PATCH 2316/2894] fix: adding report service and code fix --- ansible/roles/stack-sunbird/tasks/main.yml | 6 ---- .../stack-sunbird/tasks/report-service.yml | 2 +- pipelines/deploy/report/Jenkinsfile | 35 +++++++++++++++++++ 3 files changed, 36 insertions(+), 7 deletions(-) create mode 100644 pipelines/deploy/report/Jenkinsfile diff --git a/ansible/roles/stack-sunbird/tasks/main.yml b/ansible/roles/stack-sunbird/tasks/main.yml index 548988f9d..8bbc42530 100644 --- a/ansible/roles/stack-sunbird/tasks/main.yml +++ b/ansible/roles/stack-sunbird/tasks/main.yml @@ -52,12 +52,6 @@ - include: print-service.yml when: deploy_print is defined - - include: search-service.yml - when: deploy_search is defined - - - include: taxonomy-service.yml - when: deploy_taxonomy is defined - - include: report-service.yml when: deploy_report is defined diff --git a/ansible/roles/stack-sunbird/tasks/report-service.yml b/ansible/roles/stack-sunbird/tasks/report-service.yml index 7bf374aa3..83762eb8b 100644 --- a/ansible/roles/stack-sunbird/tasks/report-service.yml +++ b/ansible/roles/stack-sunbird/tasks/report-service.yml @@ -1,6 +1,6 @@ --- - name: Remove report service - shell: "docker service rm telemetry-service" + shell: "docker service rm report-service" ignore_errors: yes - name: Deploy report service diff --git a/pipelines/deploy/report/Jenkinsfile b/pipelines/deploy/report/Jenkinsfile new file mode 100644 index 000000000..a6ad6179c --- /dev/null +++ b/pipelines/deploy/report/Jenkinsfile @@ -0,0 +1,35 @@ +@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=report-service deploy_report=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}" + } + } + catch (err) { + currentBuild.result = "FAILURE" + throw err + } + finally { + slack_notify(currentBuild.result) + email_notify() + } +} From 08edcc57fed8566c93364da2127a2bcaf05cfaf2 Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Wed, 22 Apr 2020 06:39:04 +0530 Subject: [PATCH 2317/2894] fix: updating with 2.8 fix --- ansible/roles/stack-sunbird/tasks/main.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ansible/roles/stack-sunbird/tasks/main.yml b/ansible/roles/stack-sunbird/tasks/main.yml index 8bbc42530..6e5c02554 100644 --- a/ansible/roles/stack-sunbird/tasks/main.yml +++ b/ansible/roles/stack-sunbird/tasks/main.yml @@ -55,5 +55,10 @@ - include: report-service.yml when: deploy_report is defined - - include: restart_private_proxy.yml + - include: search-service.yml + when: deploy_search is defined + + - include: taxonomy-service.yml + when: deploy_taxonomy is defined + - include: restart_private_proxy.yml From eaa65fd21ffdd30a26a14e5ac5993cee82c7014c Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Wed, 22 Apr 2020 06:28:00 +0530 Subject: [PATCH 2318/2894] fix: adding report service and code fix --- ansible/roles/stack-sunbird/tasks/main.yml | 6 ---- .../stack-sunbird/tasks/report-service.yml | 2 +- pipelines/deploy/report/Jenkinsfile | 35 +++++++++++++++++++ 3 files changed, 36 insertions(+), 7 deletions(-) create mode 100644 pipelines/deploy/report/Jenkinsfile diff --git a/ansible/roles/stack-sunbird/tasks/main.yml b/ansible/roles/stack-sunbird/tasks/main.yml index 2389102f4..fbc99b6cb 100644 --- a/ansible/roles/stack-sunbird/tasks/main.yml +++ b/ansible/roles/stack-sunbird/tasks/main.yml @@ -52,12 +52,6 @@ - include: print-service.yml when: deploy_print is defined - - include: search-service.yml - when: deploy_search is defined - - - include: taxonomy-service.yml - when: deploy_taxonomy is defined - - include: report-service.yml when: deploy_report is defined diff --git a/ansible/roles/stack-sunbird/tasks/report-service.yml b/ansible/roles/stack-sunbird/tasks/report-service.yml index 7bf374aa3..83762eb8b 100644 --- a/ansible/roles/stack-sunbird/tasks/report-service.yml +++ b/ansible/roles/stack-sunbird/tasks/report-service.yml @@ -1,6 +1,6 @@ --- - name: Remove report service - shell: "docker service rm telemetry-service" + shell: "docker service rm report-service" ignore_errors: yes - name: Deploy report service diff --git a/pipelines/deploy/report/Jenkinsfile b/pipelines/deploy/report/Jenkinsfile new file mode 100644 index 000000000..a6ad6179c --- /dev/null +++ b/pipelines/deploy/report/Jenkinsfile @@ -0,0 +1,35 @@ +@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=report-service deploy_report=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}" + } + } + catch (err) { + currentBuild.result = "FAILURE" + throw err + } + finally { + slack_notify(currentBuild.result) + email_notify() + } +} From 69d6ec4c1e56658d6fc449f79ece0f999f3c30d3 Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Wed, 22 Apr 2020 06:39:04 +0530 Subject: [PATCH 2319/2894] fix: updating with 2.8 fix --- ansible/roles/stack-sunbird/tasks/main.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ansible/roles/stack-sunbird/tasks/main.yml b/ansible/roles/stack-sunbird/tasks/main.yml index fbc99b6cb..6e5c02554 100644 --- a/ansible/roles/stack-sunbird/tasks/main.yml +++ b/ansible/roles/stack-sunbird/tasks/main.yml @@ -55,4 +55,10 @@ - include: report-service.yml when: deploy_report is defined + - include: search-service.yml + when: deploy_search is defined + + - include: taxonomy-service.yml + when: deploy_taxonomy is defined + - include: restart_private_proxy.yml From 3bb0760974833de8a3809f371c4bfc20d66cfa5c Mon Sep 17 00:00:00 2001 From: Pradyumna Nagendra Date: Wed, 22 Apr 2020 12:10:04 +0530 Subject: [PATCH 2320/2894] Issue #000 fix: Content-service logback configuration fix --- .../templates/content-service_logback.xml | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/ansible/roles/stack-sunbird/templates/content-service_logback.xml b/ansible/roles/stack-sunbird/templates/content-service_logback.xml index 234594bc4..766710b6c 100644 --- a/ansible/roles/stack-sunbird/templates/content-service_logback.xml +++ b/ansible/roles/stack-sunbird/templates/content-service_logback.xml @@ -32,26 +32,26 @@ {{env_name}}.telemetry.raw - + - + 0 - - - - bootstrap.servers={{lp_kafka_url}} - - buffer.memory=8388608 - - - metadata.fetch.timeout.ms=99999999999 + + + bootstrap.servers={{lp_kafka_url}} + + acks=0 + + linger.ms=1000 + + max.block.ms=0 - client.id=${HOSTNAME}-${CONTEXT_NAME}-logback-restrictive - - + client.id=${HOSTNAME}-${CONTEXT_NAME}-logback-relaxed + + From c92856d268c7cd3a3af036f8311ecf0bb200d61e Mon Sep 17 00:00:00 2001 From: Pradyumna Nagendra Date: Wed, 22 Apr 2020 12:21:26 +0530 Subject: [PATCH 2321/2894] Issue #000 fix: Content-service logback configuration fix --- .../roles/stack-sunbird/templates/content-service_logback.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/stack-sunbird/templates/content-service_logback.xml b/ansible/roles/stack-sunbird/templates/content-service_logback.xml index 766710b6c..cf9649235 100644 --- a/ansible/roles/stack-sunbird/templates/content-service_logback.xml +++ b/ansible/roles/stack-sunbird/templates/content-service_logback.xml @@ -45,7 +45,7 @@ acks=0 - linger.ms=1000 + linger.ms=15000 max.block.ms=0 From 5f77e5d771ed5db685f5daf1785a4dd11fc2c501 Mon Sep 17 00:00:00 2001 From: Pradyumna Nagendra Date: Wed, 22 Apr 2020 12:48:51 +0530 Subject: [PATCH 2322/2894] Issue #000 fix: Content-service logback configuration fix --- .../roles/stack-sunbird/templates/content-service_logback.xml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ansible/roles/stack-sunbird/templates/content-service_logback.xml b/ansible/roles/stack-sunbird/templates/content-service_logback.xml index cf9649235..1d3fdd0c6 100644 --- a/ansible/roles/stack-sunbird/templates/content-service_logback.xml +++ b/ansible/roles/stack-sunbird/templates/content-service_logback.xml @@ -35,9 +35,7 @@ - - 0 - + From 5d68ebf35f7909c9d40377c29831a7117d166452 Mon Sep 17 00:00:00 2001 From: SMY ALTAMASH <30286162+SMYALTAMASH@users.noreply.github.com> Date: Wed, 22 Apr 2020 18:22:13 +0530 Subject: [PATCH 2323/2894] Missing APIs for release-2.9.0 (#1416) * Onboarding api's for internal use --- ansible/roles/kong-api/defaults/main.yml | 227 +++++++++++++++++++++++ 1 file changed, 227 insertions(+) diff --git a/ansible/roles/kong-api/defaults/main.yml b/ansible/roles/kong-api/defaults/main.yml index ccf66c3ce..d3850ab3f 100644 --- a/ansible/roles/kong-api/defaults/main.yml +++ b/ansible/roles/kong-api/defaults/main.yml @@ -259,6 +259,108 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" + - name: PrivateContentRetireAPI + request_path: "{{ private_content_prefix }}/v3/retire" + upstream_url: "{{ vm_learning_service_url }}/content/v3/retire" + strip_request_path: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: "{{ PrivateContent_ACL | default(['privateContentMgmt']) }}" + - 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: PrivateContentUploadAPI + request_path: "{{ private_content_prefix }}/v3/upload" + upstream_url: "{{ vm_learning_service_url }}/content/v3/upload" + strip_request_path: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: "{{ PrivateContent_ACL | default(['privateContentMgmt']) }}" + - 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: PrivateContentReviewAPI + request_path: "{{ private_content_prefix }}/v3/review" + upstream_url: "{{ vm_learning_service_url }}/content/v3/review" + strip_request_path: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: "{{ PrivateContentAPIs_ACL | default(['privateContentMgmt']) }}" + - 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: PrivateContentPublishAPI + request_path: "{{ private_content_prefix }}/v3/publish" + upstream_url: "{{ vm_learning_service_url }}/content/v3/publish" + strip_request_path: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: "{{ PrivateContentAPIs_ACL | default(['privateContentMgmt']) }}" + - 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: PrivateContentRejectAPI + request_path: "{{ private_content_prefix }}/v3/reject" + upstream_url: "{{ vm_learning_service_url }}/content/v3/reject" + strip_request_path: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: "{{ PrivateContentAPIs_ACL | default(['privateContentMgmt']) }}" + - 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: PrivateContentHierarchyAPI + request_path: "{{ private_content_prefix }}/v3/hierarchy" + upstream_url: "{{ vm_learning_service_url }}/content/v3/hierarchy" + strip_request_path: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: "{{ PrivateContentAPIs_ACL | default(['privateContentMgmt']) }}" + - 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: createContent request_path: "{{ content_prefix }}/v1/create" upstream_url: "{{ knowledge_mw_service_url }}/v1/content/create" @@ -4141,3 +4243,128 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" + - name: listReports + request_path: "{{ report_service_prefix }}/report/list" + upstream_url: "{{ report_service_url }}/report/list" + strip_request_path: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: + - 'reportsAdmin' + - 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: getReport + request_path: "{{ report_service_prefix }}/report/get" + upstream_url: "{{ report_service_url }}/report/get" + strip_request_path: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: + - 'reportsAccess' + - 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: updateReport + request_path: "{{ report_service_prefix }}/report/update" + upstream_url: "{{ report_service_url }}/report/update" + strip_request_path: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: + - 'reportsUpdate' + - 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: "{{ small_request_size_limit }}" + + - name: deleteReport + request_path: "{{ report_service_prefix }}/report/delete" + upstream_url: "{{ report_service_url }}/report/delete" + strip_request_path: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: + - 'reportsAdmin' + - 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: "{{ small_request_size_limit }}" + + - name: createReport + request_path: "{{ report_service_prefix }}/report/create" + upstream_url: "{{ report_service_url }}/report/create" + strip_request_path: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: + - 'reportsCreate' + - 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: searchRegCertificate + request_path: "{{ cert_registry_service_prefix }}/v1/certs/search" + upstream_url: "{{ cert_registry_service_url }}/certs/v1/registry/search" + strip_request_path: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: + - 'certificateAdmin' + - 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: readRegCertificate + request_path: "{{ cert_registry_service_prefix }}/v1/certs/read" + upstream_url: "{{ cert_registry_service_url }}/certs/v1/registry/read" + strip_request_path: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: + - 'certificateAccess' + - 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 }}" From c18f3cd25b5e2cb376b5316b3e92bdd1b41e8b6e Mon Sep 17 00:00:00 2001 From: SMY ALTAMASH <30286162+SMYALTAMASH@users.noreply.github.com> Date: Wed, 22 Apr 2020 18:30:00 +0530 Subject: [PATCH 2324/2894] Adding new routes to reports micro service. (#1419) * Onboarding api's for internal use --- ansible/roles/kong-api/defaults/main.yml | 104 +++++++++++++++++++++++ 1 file changed, 104 insertions(+) diff --git a/ansible/roles/kong-api/defaults/main.yml b/ansible/roles/kong-api/defaults/main.yml index d3850ab3f..3e9e69aff 100644 --- a/ansible/roles/kong-api/defaults/main.yml +++ b/ansible/roles/kong-api/defaults/main.yml @@ -59,6 +59,7 @@ cert_service_prefix: /cert cert_registry_service_prefix: /certreg desktop_app_prefix: /desktop license_api_prefix: /license +report_service_prefix: /data/v1/report-service # Service URLs knowledge_mw_service_url: "http://knowledge-mw-service:5000" @@ -73,6 +74,7 @@ lms_service_url: "http://lms-service:9000" cert_service_url: "http://cert-service:9000" cert_registry_service_url: "http://cert-registry-service:9000" content_service_url: "http://content-service:9000" +report_service_url: "http://report-service:3030" premium_consumer_rate_limits: - api: createContent @@ -361,6 +363,108 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" + - name: PrivateContentRetireAPI + request_path: "{{ private_content_prefix }}/v3/retire" + upstream_url: "{{ vm_learning_service_url }}/content/v3/retire" + strip_request_path: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: "{{ PrivateContent_ACL | default(['privateContentMgmt']) }}" + - 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: PrivateContentUploadAPI + request_path: "{{ private_content_prefix }}/v3/upload" + upstream_url: "{{ vm_learning_service_url }}/content/v3/upload" + strip_request_path: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: "{{ PrivateContent_ACL | default(['privateContentMgmt']) }}" + - 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: PrivateContentReviewAPI + request_path: "{{ private_content_prefix }}/v3/review" + upstream_url: "{{ vm_learning_service_url }}/content/v3/review" + strip_request_path: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: "{{ PrivateContentAPIs_ACL | default(['privateContentMgmt']) }}" + - 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: PrivateContentPublishAPI + request_path: "{{ private_content_prefix }}/v3/publish" + upstream_url: "{{ vm_learning_service_url }}/content/v3/publish" + strip_request_path: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: "{{ PrivateContentAPIs_ACL | default(['privateContentMgmt']) }}" + - 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: PrivateContentRejectAPI + request_path: "{{ private_content_prefix }}/v3/reject" + upstream_url: "{{ vm_learning_service_url }}/content/v3/reject" + strip_request_path: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: "{{ PrivateContentAPIs_ACL | default(['privateContentMgmt']) }}" + - 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: PrivateContentHierarchyAPI + request_path: "{{ private_content_prefix }}/v3/hierarchy" + upstream_url: "{{ vm_learning_service_url }}/content/v3/hierarchy" + strip_request_path: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: "{{ PrivateContentAPIs_ACL | default(['privateContentMgmt']) }}" + - 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: createContent request_path: "{{ content_prefix }}/v1/create" upstream_url: "{{ knowledge_mw_service_url }}/v1/content/create" From 6da9f0ce3db245ae7598dda60c070fa0382b5e7f Mon Sep 17 00:00:00 2001 From: SMY ALTAMASH <30286162+SMYALTAMASH@users.noreply.github.com> Date: Wed, 22 Apr 2020 18:31:09 +0530 Subject: [PATCH 2325/2894] api onboarding for search and read certificate (#1417) --- ansible/roles/kong-api/defaults/main.yml | 36 ++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/ansible/roles/kong-api/defaults/main.yml b/ansible/roles/kong-api/defaults/main.yml index c3f83710e..1ebd9bfd2 100644 --- a/ansible/roles/kong-api/defaults/main.yml +++ b/ansible/roles/kong-api/defaults/main.yml @@ -4443,3 +4443,39 @@ kong_apis: config.limit_by: credential - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" + + - name: searchRegCertificate + request_path: "{{ cert_registry_service_prefix }}/v1/certs/search" + upstream_url: "{{ cert_registry_service_url }}/certs/v1/registry/search" + strip_request_path: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: + - 'certificateAdmin' + - 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: readRegCertificate + request_path: "{{ cert_registry_service_prefix }}/v1/certs/read" + upstream_url: "{{ cert_registry_service_url }}/certs/v1/registry/read" + strip_request_path: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: + - 'certificateAccess' + - 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 }}" From 7c79b6109b2c1cafaddbe431c762ad171039fbff Mon Sep 17 00:00:00 2001 From: "S M Y ALTAMASH smy.altamash@gmail.com" Date: Thu, 23 Apr 2020 17:38:51 +0530 Subject: [PATCH 2326/2894] default kong acls for adopters --- ansible/roles/kong-consumer/defaults/main.yml | 75 +++++-------------- 1 file changed, 18 insertions(+), 57 deletions(-) diff --git a/ansible/roles/kong-consumer/defaults/main.yml b/ansible/roles/kong-consumer/defaults/main.yml index f8edce8a1..26fbc5270 100644 --- a/ansible/roles/kong-consumer/defaults/main.yml +++ b/ansible/roles/kong-consumer/defaults/main.yml @@ -24,90 +24,51 @@ mobile_device_groups: kong_all_consumer_groups: - announcementAccess + - orgCreate - appAccess - - appAdmin - - appCreate - appUpdate - badgeAccess - - badgeAdmin - - badgeCreate - - badgeUpdate - certificateAccess - - certificateCreate - - certificateUpdate - channelAccess - - channelAdmin - - channelCreate - - channelUpdate + - channelAccess - contentAccess - - contentAdmin - contentCreate - contentUpdate - courseAccess - - courseAdmin - courseCreate - courseUpdate - deviceCreate - dialcodeAccess - - dialcodeAdmin - - dialcodeCreate - - dialcodeUpdate - - experimentCreate - - expirementAccess - - formCreate - - formUpdate - - frameworkAccess - - frameworkAdmin - - frameworkCreate - - frameworkUpdate - - itemSetAdmin - locationAccess - - locationAdmin - - locationCreate - - locationUpdate - noteAccess - - noteAdmin - noteCreate - noteUpdate - objectAccess - - objectAdmin - - objectCreate - - objectUpdate - orgAccess - - orgAdmin - - orgCreate - - orgUpdate - pageAccess - - pageCreate - - pageUpdate - - pluginAccess - - ssoAdmin - ssoCreate - - telemetryCreate - userAccess - - userAdmin + - certificateCreate + - certificateUpdate + - certificateAdmin + - noteAdmin - userCreate + - userAdmin - userUpdate - - configUser - - dataAdmin - - dataUpdate + - appAdmin + - contentAdmin + - channelCreate + - channelUpdate + - courseAdmin - dialcodeAdmin + - dialcodeCreate - dialcodeUpdate - - dialcodeUser - - domainAdmin - - domainUpdate - - domainUser - - privateContentMgmt - - reportsAdmin - - reportsAccess - - reportsUpdate - - reportsCreate - -kong_admin_groups: - - kongConsumer + - badgeAdmin + - badgeCreate + - badgeUpdate + - pluginAccess + - userTempAdmin -private_groups: - - locationAdmin kong_consumers: - username: api-admin From 1cc8f750e56ffe397a60101fb51cef52df06bcd7 Mon Sep 17 00:00:00 2001 From: kaali09 Date: Thu, 23 Apr 2020 19:18:19 +0530 Subject: [PATCH 2327/2894] Issue #0000: added the telemetrydplogstash chart --- .../core/telemetrydplogstash/Chart.yaml | 5 ++ .../templates/deployment.yaml | 66 +++++++++++++++++++ .../core/telemetrydplogstash/values.j2 | 23 +++++++ 3 files changed, 94 insertions(+) create mode 100644 kubernetes/helm_charts/core/telemetrydplogstash/Chart.yaml create mode 100644 kubernetes/helm_charts/core/telemetrydplogstash/templates/deployment.yaml create mode 100644 kubernetes/helm_charts/core/telemetrydplogstash/values.j2 diff --git a/kubernetes/helm_charts/core/telemetrydplogstash/Chart.yaml b/kubernetes/helm_charts/core/telemetrydplogstash/Chart.yaml new file mode 100644 index 000000000..3760b5476 --- /dev/null +++ b/kubernetes/helm_charts/core/telemetrydplogstash/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: telemetry-logstash-dock +version: 0.1.0 diff --git a/kubernetes/helm_charts/core/telemetrydplogstash/templates/deployment.yaml b/kubernetes/helm_charts/core/telemetrydplogstash/templates/deployment.yaml new file mode 100644 index 000000000..cedc0aa4b --- /dev/null +++ b/kubernetes/helm_charts/core/telemetrydplogstash/templates/deployment.yaml @@ -0,0 +1,66 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Release.Name }} + namespace: {{ .Values.namespace }} + annotations: + reloader.stakater.com/auto: "true" +spec: + replicas: {{ .Values.replicaCount }} + strategy: + rollingUpdate: + maxSurge: {{ .Values.strategy.maxsurge }} + maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + selector: + matchLabels: + app: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ .Release.Name }} + spec: +{{- if .Values.imagepullsecrets }} + imagePullSecrets: + - name: {{ .Values.imagepullsecrets }} +{{- end }} + volumes: + - name: {{ .Release.Name }}-config + configMap: + name: {{ .Release.Name }}-config + containers: + - name: {{ .Release.Name }} + image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" + imagePullPolicy: Always + envFrom: + - configMapRef: + name: {{ .Release.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: {{ .Release.Name }}-config + mountPath: /etc/telemetry-logstash.conf + +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ .Release.Name }}-service + namespace: {{ .Values.namespace }} + labels: + app: {{ .Release.Name }} +spec: + ports: + - name: http-{{ .Release.Name }} + protocol: TCP + port: {{ .Values.network.targetport }} + selector: + app: {{ .Release.Name }} diff --git a/kubernetes/helm_charts/core/telemetrydplogstash/values.j2 b/kubernetes/helm_charts/core/telemetrydplogstash/values.j2 new file mode 100644 index 000000000..8287a3d65 --- /dev/null +++ b/kubernetes/helm_charts/core/telemetrydplogstash/values.j2 @@ -0,0 +1,23 @@ +### Default variable file for cert-service ### + +namespace: {{ namespace }} +imagepullsecrets: {{ imagepullsecrets }} +dockerhub: sunbird + +replicaCount: {{logstash_replicacount|default(1)}} +repository: 'logstash' +image_tag: 5.6-alpine +resources: + requests: + cpu: {{logstash_cpu_req|default('100m')}} + memory: {{logstash_mem_req|default('100Mi')}} + limits: + cpu: {{logstash_cpu_limit|default('1')}} + memory: {{logstash_mem_limit|default('1024Mi')}} +network: + port: 5044 + targetport: 5044 +strategy: + type: RollingUpdate + maxsurge: 1 + maxunavailable: 1 From 38be1d5a66d9b3f78ea011a1dbda47f37c6fb4d2 Mon Sep 17 00:00:00 2001 From: kaali09 Date: Thu, 23 Apr 2020 19:18:50 +0530 Subject: [PATCH 2328/2894] Issue #0000: added the telemetrylogstash var --- ansible/roles/stack-sunbird/defaults/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ansible/roles/stack-sunbird/defaults/main.yml b/ansible/roles/stack-sunbird/defaults/main.yml index 2d06816df..b9961e1b0 100644 --- a/ansible/roles/stack-sunbird/defaults/main.yml +++ b/ansible/roles/stack-sunbird/defaults/main.yml @@ -252,6 +252,8 @@ service_env: - ../../../../ansible/roles/stack-sunbird/templates/taxonomy-service_application.conf - ../../../../ansible/roles/stack-sunbird/templates/taxonomy-service_logback.xml report: ../../../../ansible/roles/stack-sunbird/templates/sunbird_report-service.env + telemetrydplogstash: ../../../../ansible/roles/stack-sunbird/templates/telemetry-logstash-datapipeline.conf + sunbird_portal_player_cdn_enabled: false ########### stack-apimanager defaults vars ##### for kubernetes ######### From 63072c707d4dec645045fd4751f95006b919a27f Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Thu, 23 Apr 2020 22:52:43 +0530 Subject: [PATCH 2329/2894] fix: option to run kibana in kubernetes --- ansible/roles/stack-proxy/defaults/main.yml | 1 + kubernetes/ansible/roles/helm-deploy/defaults/main.yml | 1 + kubernetes/helm_charts/core/nginx-public-ingress/values.j2 | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ansible/roles/stack-proxy/defaults/main.yml b/ansible/roles/stack-proxy/defaults/main.yml index 1eba36933..6d1b90f6e 100644 --- a/ansible/roles/stack-proxy/defaults/main.yml +++ b/ansible/roles/stack-proxy/defaults/main.yml @@ -35,6 +35,7 @@ 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" diff --git a/kubernetes/ansible/roles/helm-deploy/defaults/main.yml b/kubernetes/ansible/roles/helm-deploy/defaults/main.yml index 97612cabf..27ce13dfa 100644 --- a/kubernetes/ansible/roles/helm-deploy/defaults/main.yml +++ b/kubernetes/ansible/roles/helm-deploy/defaults/main.yml @@ -31,6 +31,7 @@ ekstep_s3_env: "{{sunbird_env}}" registry_url: "{{proto}}://{{proxy_server_name}}/registry" ep_es_host: proxy_custom_config: +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" diff --git a/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 b/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 index a0225fff5..ca1ab5390 100644 --- a/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 +++ b/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 @@ -215,7 +215,7 @@ proxyconfig: | error_page 401 = /oauth2/sign_in; # Setting target url - auth_request_set $target http://{{swarm_dashboard}}:5601; + auth_request_set $target http://{{ kibana_service }}; # pass information via X-User and X-Email headers to backend, # requires running with --set-xauthrequest flag auth_request_set $user $upstream_http_x_auth_request_user; From eddcda1878fd097595382aed486526b5460d286b Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Wed, 4 Mar 2020 15:43:02 +0530 Subject: [PATCH 2330/2894] Adding health check api --- exporters/Go/kafka-topic-exporter/main.go | 234 ++++++++++++++++++++++ 1 file changed, 234 insertions(+) create mode 100644 exporters/Go/kafka-topic-exporter/main.go diff --git a/exporters/Go/kafka-topic-exporter/main.go b/exporters/Go/kafka-topic-exporter/main.go new file mode 100644 index 000000000..3de8bb602 --- /dev/null +++ b/exporters/Go/kafka-topic-exporter/main.go @@ -0,0 +1,234 @@ +// Author : Kaliraja Ramasami +// Author : Rajesh Rajendran +package main + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "log" + "net" + "net/http" + "os" + "strings" + "sync" + "time" + + kafka "github.com/segmentio/kafka-go" +) + +var kafkaReader *kafka.Reader + +// Channel to keep metrics till prometheus scrape that +var promMetricsChannel = make(chan metric) + +// Metrics structure +type Metrics struct { + System string `json:"system"` + SubSystem string `json:"subsystem"` + MetricTS json.Number `json:"metricTs"` + Metrics []struct { + ID string `json:"id"` + Value float64 `json:"value"` + } `json:"metrics"` + // Labels to be added for the metric + Lables []struct { + ID string `json:"id"` + // Even nimbers will be read as string + Value json.Number `json:"value"` + } `json:"dimensions"` +} + +// This is to get the last message served to prom endpoint. +type lastReadMessage struct { + mu sync.RWMutex + // partition message + last map[int]kafka.Message +} + +// Adding message +// Only the latest +func (lrm *lastReadMessage) Store(message kafka.Message) error { + lrm.mu.Lock() + defer lrm.mu.Unlock() + // Initializing map if nil + if lrm.last == nil { + lrm.last = make(map[int]kafka.Message) + } + if _, ok := lrm.last[message.Partition]; ok { + // Updating only if the offset is greater + if lrm.last[message.Partition].Offset < message.Offset { + lrm.last[message.Partition] = message + } + return fmt.Errorf("lower offset(%d) than the latest(%d)", message.Offset, lrm.last[message.Partition].Offset) + } else { + lrm.last[message.Partition] = message + } + return nil +} + +// Return the last message read +func (lrm *lastReadMessage) Get() map[int]kafka.Message { + lrm.mu.RLock() + defer lrm.mu.RUnlock() + return lrm.last +} + +// Validating metrics name +// Input a list of string, and concatinate with _ after +// removing all - in the provided names +func metricsNameValidator(names ...string) string { + retName := "" + for _, name := range names { + retName += strings.ReplaceAll(name, "-", "_") + "_" + } + return strings.TrimRight(retName, "_") +} + +// Message format +type metric struct { + message string + id kafka.Message +} + +// This function will take the metrics input and create prometheus metrics +// output and send it to metrics channel +// So that http endpoint can serve the data +func (metrics *Metrics) pushMetrics(ctx context.Context, metricData *kafka.Message) (err error) { + label := fmt.Sprintf("system=%q,subsystem=%q,", metrics.System, metrics.SubSystem) + select { + case <-ctx.Done(): + return ctx.Err() + default: + // Creating dictionary of labels + for _, labels := range metrics.Lables { + // Lables can't have '-' in it + label += fmt.Sprintf("%v=%q,", metricsNameValidator(labels.ID), labels.Value) + } + // Generating metrics + for _, m := range metrics.Metrics { + metricStruct := metric{} + // Adding optional timestamp + switch metrics.MetricTS { + case "": + metricStruct.message = fmt.Sprintf("%s{%s} %.2f", metricsNameValidator(metrics.System, metrics.SubSystem, m.ID), strings.TrimRight(label, ","), m.Value) + default: + metricStruct.message = fmt.Sprintf("%s{%s} %.1f %s", metricsNameValidator(metrics.System, metrics.SubSystem, m.ID), strings.TrimRight(label, ","), m.Value, metrics.MetricTS) + } + // fmt.Printf("%s\n", metricStruct.message) + metricStruct.id = *metricData + promMetricsChannel <- metricStruct + } + return nil + } +} + +func metricsCreation(ctx context.Context, m kafka.Message) error { + metrics := Metrics{} + data := m.Value + // Creating metrics struct + select { + case <-ctx.Done(): + return ctx.Err() + default: + if err := json.Unmarshal(data, &metrics); err != nil { + fmt.Printf("Unmarshal error: %q\n", err) + return err + } + metrics.pushMetrics(ctx, &m) + return nil + } +} + +func commitMessage(messages *map[int]kafka.Message) error { + for k, message := range *messages { + if message.Offset > 0 { + fmt.Printf("Commiting message partition %d offset %d\n", k, message.Offset) + if err := kafkaReader.CommitMessages(context.Background(), message); err != nil { + return err + } + } + return errors.New("offset is not > 0") + } + return nil +} + +func health(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Content-Type", "application/json") + w.Write([]byte("{\"Healthy\": true}")) +} +func serve(w http.ResponseWriter, r *http.Request) { + fmt.Println("Serving Request") + ctx := r.Context() + lastReadMessage := lastReadMessage{} + // Reading topic + go func(ctx context.Context, r *kafka.Reader) { + for { + // Only fetching the message, not commiting them + // It'll be commited once the transmission closes + m, err := r.FetchMessage(ctx) + if err != nil { + fmt.Printf("err reading message: %v\n", err) + break + } + fmt.Printf("topic: %q partition: %v offset: %v lag: %d\n ", m.Topic, m.Partition, m.Offset, r.Lag()) + go func(ctx context.Context) { + if err := metricsCreation(ctx, m); err != nil { + fmt.Printf("errored out metrics creation; err: %s\n", err) + return + } + }(ctx) + } + }(ctx, kafkaReader) + for { + select { + case message := <-promMetricsChannel: + fmt.Fprintf(w, "%s\n", message.message) + lastReadMessage.Store(message.id) + case <-ctx.Done(): + messageLastRead := lastReadMessage.Get() + commitMessage(&messageLastRead) + return + case <-time.After(1 * time.Second): + messageLastRead := lastReadMessage.Get() + commitMessage(&messageLastRead) + return + } + } +} + +func main() { + // Getting kafka_ip and topic + kafkaHost := os.Getenv("kafka_host") + kafkaTopic := os.Getenv("kafka_topic") + if kafkaTopic == "" || kafkaHost == "" { + log.Fatalf(`"kafka_topic or kafka_host environment variables not set." +For example, + export kafka_host=10.0.0.9:9092 + kafka_topic=sunbird.metrics.topic`) + } + fmt.Printf("kafak_host: %s\nkafka_topic: %s\n", kafkaHost, kafkaTopic) + // Checking kafka port and ip are accessible + fmt.Println("Checking connection to kafka") + conn, err := net.DialTimeout("tcp", kafkaHost, 10*time.Second) + if err != nil { + log.Fatalf("Connection error: %s", err) + } + conn.Close() + fmt.Println("kafka is accessible") + // Initializing kafka + kafkaReader = kafka.NewReader(kafka.ReaderConfig{ + Brokers: []string{kafkaHost}, + GroupID: "metrics-reader-test", // Consumer group ID + Topic: kafkaTopic, + MinBytes: 1e3, // 1KB + MaxBytes: 10e6, // 10MB + MaxWait: 200 * time.Millisecond, + RebalanceTimeout: time.Second * 5, + }) + defer kafkaReader.Close() + http.HandleFunc("/metrics", serve) + http.HandleFunc("/health", health) + log.Fatal(http.ListenAndServe(":8000", nil)) +} From f8ab3303c95fa87278bcf7f59d61dfc114667d0b Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Wed, 4 Mar 2020 14:59:04 +0530 Subject: [PATCH 2331/2894] Adding kafka topic exporter serviceMonitor --- kubernetes/ansible/roles/sunbird-monitoring/tasks/main.yml | 3 +++ .../sunbird-monitoring/templates/kafka-topic-exporter.yaml | 0 2 files changed, 3 insertions(+) create mode 100644 kubernetes/ansible/roles/sunbird-monitoring/templates/kafka-topic-exporter.yaml diff --git a/kubernetes/ansible/roles/sunbird-monitoring/tasks/main.yml b/kubernetes/ansible/roles/sunbird-monitoring/tasks/main.yml index f5b7f41f0..6957ab31e 100644 --- a/kubernetes/ansible/roles/sunbird-monitoring/tasks/main.yml +++ b/kubernetes/ansible/roles/sunbird-monitoring/tasks/main.yml @@ -14,5 +14,8 @@ shell: "helm upgrade --install --cleanup-on-fail grafana-dashboards {{chart_path}}/dashboards --namespace monitoring" tags: - dashboards + - name: Install statsd-exporter shell: "helm upgrade --install --force --cleanup-on-fail statsd-exporter {{chart_path}}/statsd-exporter --namespace {{ namespace }} -f /tmp/statsd-exporter.yaml" + tags: + - statsd-exporter diff --git a/kubernetes/ansible/roles/sunbird-monitoring/templates/kafka-topic-exporter.yaml b/kubernetes/ansible/roles/sunbird-monitoring/templates/kafka-topic-exporter.yaml new file mode 100644 index 000000000..e69de29bb From 6b9ea361c7bab1e9b164e4a90a774178b7833151 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Wed, 4 Mar 2020 22:51:56 +0530 Subject: [PATCH 2332/2894] Adding kafka-topic-exporter jekins file and build script --- images/kafka-topic-exporter/Dockerfile | 10 +++++ images/kafka-topic-exporter/Jenkinsfile | 50 +++++++++++++++++++++++++ images/kafka-topic-exporter/build.sh | 6 +++ images/kafka-topic-exporter/metadata.sh | 3 ++ 4 files changed, 69 insertions(+) create mode 100644 images/kafka-topic-exporter/Dockerfile create mode 100644 images/kafka-topic-exporter/Jenkinsfile create mode 100755 images/kafka-topic-exporter/build.sh create mode 100755 images/kafka-topic-exporter/metadata.sh diff --git a/images/kafka-topic-exporter/Dockerfile b/images/kafka-topic-exporter/Dockerfile new file mode 100644 index 000000000..bc74152ff --- /dev/null +++ b/images/kafka-topic-exporter/Dockerfile @@ -0,0 +1,10 @@ +FROM golang:1.13 AS builder +COPY main.go /work +WORKDIR /work +RUN CGO_ENABLED=0 go build -o kafka-topic-exporter ../../exporters/Go/kafka-topic-exporter/main.go + +FROM scratch +LABEL maintainer="Rajesh Rajendran" +COPY --from=bulder /work/kafka-topic-exporter / +EXPOSE 8000 +CMD ["/kafka-topic-exporter"] diff --git a/images/kafka-topic-exporter/Jenkinsfile b/images/kafka-topic-exporter/Jenkinsfile new file mode 100644 index 000000000..7f23198a3 --- /dev/null +++ b/images/kafka-topic-exporter/Jenkinsfile @@ -0,0 +1,50 @@ +node('build-slave') { + 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" + + ansiColor('xterm') { + stage('Checkout') { + if (!env.hub_org) { + println(ANSI_BOLD + ANSI_RED + "Uh Oh! Please set a Jenkins environment variable named hub_org with value as registery/sunbidrded" + ANSI_NORMAL) + error 'Please resolve the errors and rerun..' + } else + println(ANSI_BOLD + ANSI_GREEN + "Found environment variable named hub_org with value as: " + hub_org + ANSI_NORMAL) + } + sh'[[ -d .git ]] && git clean -ffxd' + checkout scm + if (params.github_release_tag == "") { + checkout scm + commit_hash = sh(script: 'git rev-parse --short HEAD', returnStdout: true).trim() + branch_name = sh(script: 'git name-rev --name-only HEAD | rev | cut -d "/" -f1| rev', returnStdout: true).trim() + build_tag = branch_name + "_" + commit_hash + "_" + env.BUILD_NUMBER + println(ANSI_BOLD + ANSI_YELLOW + "Tag not specified, using the latest commit hash: " + commit_hash + ANSI_NORMAL) + } else { + def scmVars = checkout scm + checkout scm: [$class: 'GitSCM', branches: [[name: "refs/tags/$params.github_release_tag"]], userRemoteConfigs: [[url: scmVars.GIT_URL]]] + build_tag = params.github_release_tag + "_" + env.BUILD_NUMBER + println(ANSI_BOLD + ANSI_YELLOW + "Tag specified, building from tag: " + params.github_release_tag + ANSI_NORMAL) + } + echo "build_tag: " + build_tag + + stage('Build') { + env.NODE_ENV = "build" + print "Environment will be : ${env.NODE_ENV}" + sh("cd ./images/kafka-topic-exporter && ./build.sh ${build_tag} ${env.NODE_NAME} ${hub_org}") + } + stage('ArchiveArtifacts') { + archiveArtifacts "images/kafka-topic-exporter/metadata.json" + currentBuild.description = "${build_tag}" + } + } + + } + catch (err) { + currentBuild.result = "FAILURE" + throw err + } + +} diff --git a/images/kafka-topic-exporter/build.sh b/images/kafka-topic-exporter/build.sh new file mode 100755 index 000000000..685c06e0e --- /dev/null +++ b/images/kafka-topic-exporter/build.sh @@ -0,0 +1,6 @@ +# vim: set ts=4 sw=4 tw=0 et : +#!/bin/bash + +# Have to copy this file because In docker container we can't pass directories other than PWD +cp ../../exporters/Go/kafka-topic-exporter/main.go . +docker build -f Dockerfile -t sunbird/kafka-topic-exporter:v1 . diff --git a/images/kafka-topic-exporter/metadata.sh b/images/kafka-topic-exporter/metadata.sh new file mode 100755 index 000000000..f22c55764 --- /dev/null +++ b/images/kafka-topic-exporter/metadata.sh @@ -0,0 +1,3 @@ +#!/bin/sh +# return version +echo '{"name":"kafka-topic-exporter","version":"1.5.0","org":"sunbird","hubuser":"purplesunbird"}' From 7f56d7cebfcb2ef52bd6c93295098b2427b822e8 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Wed, 4 Mar 2020 22:59:29 +0530 Subject: [PATCH 2333/2894] Adding helm chart for kafka-topic-exporter --- .../sunbird-monitoring/defaults/main.yml | 1 + .../kafka-topic-exporter/.helmignore | 23 +++++++ .../kafka-topic-exporter/Chart.yaml | 21 +++++++ .../templates/_helpers.tpl | 63 +++++++++++++++++++ .../templates/deployment.yaml | 31 +++++++++ .../templates/service.yaml | 16 +++++ .../templates/serviceMonitor.yaml | 22 +++++++ .../kafka-topic-exporter/values.yaml | 32 ++++++++++ 8 files changed, 209 insertions(+) create mode 100644 kubernetes/helm_charts/monitoring/kafka-topic-exporter/.helmignore create mode 100644 kubernetes/helm_charts/monitoring/kafka-topic-exporter/Chart.yaml create mode 100644 kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/_helpers.tpl create mode 100644 kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/deployment.yaml create mode 100644 kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/service.yaml create mode 100644 kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/serviceMonitor.yaml create mode 100644 kubernetes/helm_charts/monitoring/kafka-topic-exporter/values.yaml diff --git a/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml b/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml index 92a9bf1ab..3e7f0afe4 100644 --- a/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml +++ b/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml @@ -10,6 +10,7 @@ monitoring_stack: - blackbox-exporter - additional-scrape-configs - alertrules + - kafka-topic-exporter namespace: monitoring diff --git a/kubernetes/helm_charts/monitoring/kafka-topic-exporter/.helmignore b/kubernetes/helm_charts/monitoring/kafka-topic-exporter/.helmignore new file mode 100644 index 000000000..0e8a0eb36 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/kafka-topic-exporter/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/kubernetes/helm_charts/monitoring/kafka-topic-exporter/Chart.yaml b/kubernetes/helm_charts/monitoring/kafka-topic-exporter/Chart.yaml new file mode 100644 index 000000000..2c8ce75b1 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/kafka-topic-exporter/Chart.yaml @@ -0,0 +1,21 @@ +apiVersion: v2 +name: kafka-topic-exporter +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. +appVersion: 1.16.0 diff --git a/kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/_helpers.tpl b/kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/_helpers.tpl new file mode 100644 index 000000000..17e92c4cd --- /dev/null +++ b/kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/_helpers.tpl @@ -0,0 +1,63 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "kafka-topic-exporter.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "kafka-topic-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 -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "kafka-topic-exporter.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "kafka-topic-exporter.labels" -}} +helm.sh/chart: {{ include "kafka-topic-exporter.chart" . }} +{{ include "kafka-topic-exporter.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} + +{{/* +Selector labels +*/}} +{{- define "kafka-topic-exporter.selectorLabels" -}} +app.kubernetes.io/name: {{ include "kafka-topic-exporter.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "kafka-topic-exporter.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "kafka-topic-exporter.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} diff --git a/kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/deployment.yaml b/kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/deployment.yaml new file mode 100644 index 000000000..df5869c8b --- /dev/null +++ b/kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/deployment.yaml @@ -0,0 +1,31 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "kafka-topic-exporter.fullname" . }} + namespace: {{ default .Values.namespace .Release.Namespace }} + labels: + {{- include "kafka-topic-exporter.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "kafka-topic-exporter.selectorLabels" . | nindent 6 }} + template: + metadata: + labels: + {{- include "kafka-topic-exporter.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}:{{ default .Values.image_tag .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - name: http + containerPort: 8000 + protocol: TCP + resources: + {{- toYaml .Values.resources | nindent 12 }} diff --git a/kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/service.yaml b/kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/service.yaml new file mode 100644 index 000000000..7477e9148 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "kafka-topic-exporter.fullname" . }} + namespace: {{ default .Values.namespace .Release.Namespace }} + labels: + {{- include "kafka-topic-exporter.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: metrics + selector: + {{- include "kafka-topic-exporter.selectorLabels" . | nindent 4 }} diff --git a/kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/serviceMonitor.yaml b/kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/serviceMonitor.yaml new file mode 100644 index 000000000..4c9a04cc9 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/serviceMonitor.yaml @@ -0,0 +1,22 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + {{- include "kafka-topic-exporter.labels" . | nindent 6 }} + {{ toYaml .Values.serviceMonitorLabels | nindent 6 }} + name: {{ include "kafka-topic-exporter.fullname" . }} + namespace: {{ default .Values.namespace .Release.Namespace }} +spec: + endpoints: + - honorLabels: true + port: metrics + relabelings: + - action: labeldrop + regex: ^pod$ + namespaceSelector: + matchNames: + - monitoring + selector: + matchLabels: + {{- include "kafka-topic-exporter.labels" . | nindent 6 }} + diff --git a/kubernetes/helm_charts/monitoring/kafka-topic-exporter/values.yaml b/kubernetes/helm_charts/monitoring/kafka-topic-exporter/values.yaml new file mode 100644 index 000000000..6262faeb1 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/kafka-topic-exporter/values.yaml @@ -0,0 +1,32 @@ +# Default values for kafka-topic-exporter. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: + repository: kafka-topic-exporter + pullPolicy: IfNotPresent + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +service: + type: ClusterIP + port: 8000 + + +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: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi +serviceMonitorLabels: + release: prometheus-operator From aad460fe8f813b4f69aa41778c726873b07bbe63 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Fri, 6 Mar 2020 02:27:29 +0530 Subject: [PATCH 2334/2894] Adding default image for kafka-topic-exporter --- .../monitoring/kafka-topic-exporter/templates/deployment.yaml | 2 +- .../helm_charts/monitoring/kafka-topic-exporter/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/deployment.yaml b/kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/deployment.yaml index df5869c8b..8250cd79a 100644 --- a/kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/deployment.yaml +++ b/kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/deployment.yaml @@ -21,7 +21,7 @@ spec: {{- end }} containers: - name: {{ .Chart.Name }} - image: "{{ .Values.image.repository }}:{{ default .Values.image_tag .Chart.AppVersion }}" + image: "{{ .Values.image.repository }}" imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - name: http diff --git a/kubernetes/helm_charts/monitoring/kafka-topic-exporter/values.yaml b/kubernetes/helm_charts/monitoring/kafka-topic-exporter/values.yaml index 6262faeb1..dc00a5090 100644 --- a/kubernetes/helm_charts/monitoring/kafka-topic-exporter/values.yaml +++ b/kubernetes/helm_charts/monitoring/kafka-topic-exporter/values.yaml @@ -5,7 +5,7 @@ replicaCount: 1 image: - repository: kafka-topic-exporter + repository: sunbird/kafka-topic-exporter:v1 pullPolicy: IfNotPresent imagePullSecrets: [] From e4d6ee160128cf677c932d81e5074154f9ccdae2 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Fri, 6 Mar 2020 02:56:43 +0530 Subject: [PATCH 2335/2894] Adding environment variables for kafka --- .../sunbird-monitoring/templates/kafka-topic-exporter.yaml | 4 ++++ .../kafka-topic-exporter/templates/deployment.yaml | 5 +++++ .../helm_charts/monitoring/kafka-topic-exporter/values.yaml | 5 +++++ 3 files changed, 14 insertions(+) diff --git a/kubernetes/ansible/roles/sunbird-monitoring/templates/kafka-topic-exporter.yaml b/kubernetes/ansible/roles/sunbird-monitoring/templates/kafka-topic-exporter.yaml index e69de29bb..b0e4cdc3a 100644 --- a/kubernetes/ansible/roles/sunbird-monitoring/templates/kafka-topic-exporter.yaml +++ b/kubernetes/ansible/roles/sunbird-monitoring/templates/kafka-topic-exporter.yaml @@ -0,0 +1,4 @@ +env: + kafka: + host: "{{ groups['kafka'][0] }}:9092" + topic: "{{env_name}}.prom.monitoring.metrics" diff --git a/kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/deployment.yaml b/kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/deployment.yaml index 8250cd79a..fbce377b2 100644 --- a/kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/deployment.yaml +++ b/kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/deployment.yaml @@ -23,6 +23,11 @@ spec: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}" imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + - name: kafka_host + value: "{{ .Values.env.kafka.host }}" + - name: kafka_topic + value: "{{ .Values.env.kafka.topic }}" ports: - name: http containerPort: 8000 diff --git a/kubernetes/helm_charts/monitoring/kafka-topic-exporter/values.yaml b/kubernetes/helm_charts/monitoring/kafka-topic-exporter/values.yaml index dc00a5090..9c6740261 100644 --- a/kubernetes/helm_charts/monitoring/kafka-topic-exporter/values.yaml +++ b/kubernetes/helm_charts/monitoring/kafka-topic-exporter/values.yaml @@ -16,6 +16,11 @@ service: type: ClusterIP port: 8000 +# This value should be overridden by user +# env: +# kafka: +# host: 10.0.0.92:9092 +# topic: sunbird.metrics.topic resources: {} # We usually recommend not to specify default resources and to leave this as a conscious From 4109c12808e085079e37d3c14d3b4a7475d2baeb Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Fri, 13 Mar 2020 12:21:17 +0530 Subject: [PATCH 2336/2894] Fix: docker build issue Signed-off-by: Rajesh Rajendran --- images/kafka-topic-exporter/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/kafka-topic-exporter/Dockerfile b/images/kafka-topic-exporter/Dockerfile index bc74152ff..c55230b4a 100644 --- a/images/kafka-topic-exporter/Dockerfile +++ b/images/kafka-topic-exporter/Dockerfile @@ -1,7 +1,7 @@ FROM golang:1.13 AS builder COPY main.go /work WORKDIR /work -RUN CGO_ENABLED=0 go build -o kafka-topic-exporter ../../exporters/Go/kafka-topic-exporter/main.go +RUN CGO_ENABLED=0 go build -o kafka-topic-exporter main.go FROM scratch LABEL maintainer="Rajesh Rajendran" From 52f35c0dceaafaaeb66e4ed68fe371cf827fa68d Mon Sep 17 00:00:00 2001 From: G33tha Date: Fri, 24 Apr 2020 13:54:03 +0530 Subject: [PATCH 2337/2894] Update Jenkinsfile --- pipelines/deploy/ContentFramework/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipelines/deploy/ContentFramework/Jenkinsfile b/pipelines/deploy/ContentFramework/Jenkinsfile index 95653b9a3..ca8839792 100644 --- a/pipelines/deploy/ContentFramework/Jenkinsfile +++ b/pipelines/deploy/ContentFramework/Jenkinsfile @@ -23,7 +23,7 @@ node() { stage('get artifact') { currentWs = sh(returnStdout: true, script: 'pwd').trim() artifact = values.artifact_name + ":" + values.artifact_version - commit_hash = values.artifact_version.split('-')[1] + commit_hash = values.artifact_version.split('_')[1] values.put('currentWs', currentWs) values.put('artifact', artifact) artifact_download(values) From 3b255b191dce099d375c30c17bdb42dba8fd3a5e Mon Sep 17 00:00:00 2001 From: "S M Y ALTAMASH smy.altamash@gmail.com" Date: Fri, 24 Apr 2020 16:46:32 +0530 Subject: [PATCH 2338/2894] updating ACL for desktop update API --- ansible/roles/kong-api/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/kong-api/defaults/main.yml b/ansible/roles/kong-api/defaults/main.yml index 1ebd9bfd2..561a986d1 100644 --- a/ansible/roles/kong-api/defaults/main.yml +++ b/ansible/roles/kong-api/defaults/main.yml @@ -3806,7 +3806,7 @@ kong_apis: - "{{ statsd_pulgin }}" - name: acl config.whitelist: - - 'appAcces' + - 'appAccess' - name: rate-limiting config.policy: local config.hour: "{{ large_rate_limit_per_hour }}" From 2978e895ff6f1deb36ea92183c47424edbd566ce Mon Sep 17 00:00:00 2001 From: Pradyumna Nagendra Date: Mon, 27 Apr 2020 11:37:52 +0530 Subject: [PATCH 2339/2894] Updated service health mapping for assessment and content service --- ansible/roles/stack-sunbird/defaults/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/stack-sunbird/defaults/main.yml b/ansible/roles/stack-sunbird/defaults/main.yml index b9961e1b0..ade9dee35 100644 --- a/ansible/roles/stack-sunbird/defaults/main.yml +++ b/ansible/roles/stack-sunbird/defaults/main.yml @@ -311,7 +311,7 @@ assessment_liveness_readiness: healthcheck: true readinessProbe: httpGet: - path: /health + path: /service/health port: 9000 initialDelaySeconds: 30 periodSeconds: 30 @@ -320,7 +320,7 @@ assessment_liveness_readiness: successThreshold: 2 livenessProbe: httpGet: - path: /health + path: /service/health port: 9000 initialDelaySeconds: 30 periodSeconds: 30 From 49e2913325aa6bd3564ee3aa573c87c046bb308a Mon Sep 17 00:00:00 2001 From: Pradyumna Nagendra Date: Mon, 27 Apr 2020 11:42:00 +0530 Subject: [PATCH 2340/2894] Updated service health mapping for assessment and content service --- ansible/roles/stack-sunbird/defaults/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/stack-sunbird/defaults/main.yml b/ansible/roles/stack-sunbird/defaults/main.yml index ade9dee35..82b8a5285 100644 --- a/ansible/roles/stack-sunbird/defaults/main.yml +++ b/ansible/roles/stack-sunbird/defaults/main.yml @@ -371,7 +371,7 @@ content_liveness_readiness: healthcheck: true readinessProbe: httpGet: - path: /health + path: /service/health port: 9000 initialDelaySeconds: 30 periodSeconds: 30 @@ -380,7 +380,7 @@ content_liveness_readiness: successThreshold: 2 livenessProbe: httpGet: - path: /health + path: /service/health port: 9000 initialDelaySeconds: 30 periodSeconds: 30 From 8bc57927bb884df473e7ec6a064ca15febe1c22e Mon Sep 17 00:00:00 2001 From: GangaramD Date: Mon, 27 Apr 2020 14:36:19 +0530 Subject: [PATCH 2341/2894] Dp consumer lag dashboard for prometheus metrics (#1431) * Dp lag dashboard Dp lag dashboard which scrapes metrics from the promethues --- .../DP-Jobs-Consumer-lag-prometheus.json | 1138 +++++++++++++++++ 1 file changed, 1138 insertions(+) create mode 100644 kubernetes/helm_charts/monitoring/dashboards/dashboards/DP-Jobs-Consumer-lag-prometheus.json diff --git a/kubernetes/helm_charts/monitoring/dashboards/dashboards/DP-Jobs-Consumer-lag-prometheus.json b/kubernetes/helm_charts/monitoring/dashboards/dashboards/DP-Jobs-Consumer-lag-prometheus.json new file mode 100644 index 000000000..0afe6d3d3 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/dashboards/dashboards/DP-Jobs-Consumer-lag-prometheus.json @@ -0,0 +1,1138 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": 53, + "links": [], + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 0 + }, + "id": 9, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"AssessmentAggregator\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Assessment Aggregator", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 6, + "y": 0 + }, + "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, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"DeDuplication\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Deduplication", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 12, + "y": 0 + }, + "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, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"DeNormalization\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Denormalization", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 18, + "y": 0 + }, + "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, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"DerivedDeDuplication\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Derived DeDuplication", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 6 + }, + "id": 15, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"DeviceProfileUpdater\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Device ProfileUpdater", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 6, + "y": 6 + }, + "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, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"DruidEventsValidator\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Druid Events Validator", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 12, + "y": 6 + }, + "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, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"EventsRouter\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Events Router", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 18, + "y": 6 + }, + "id": 17, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"TelemetryExtractor\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Telemetry Extractor", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 12 + }, + "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, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"TelemetryLocationUpdater\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Telemetry Location Updater", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 6, + "y": 12 + }, + "id": 11, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"TelemetryRedacter\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Telemetry Redacter", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 12, + "y": 12 + }, + "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, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"TelemetryRouter\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Telemetry Router", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 18, + "y": 12 + }, + "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, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"TelemetryValidator\"})", + "hide": false, + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Telemetry Validator", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 18 + }, + "id": 19, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"UserCacheUpdater\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "UserCache Updater", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + } + ], + "schemaVersion": 21, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "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": "DP-Jobs-Consumer-lag-prometheus", + "uid": "RiO67g6Zz", + "version": 1 +} From a743e6e31d78e12d4b6f4520d1eaa20f717b7a1d Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Mon, 27 Apr 2020 14:56:15 +0530 Subject: [PATCH 2342/2894] Adding alert rules for kafka topic exporter Signed-off-by: Rajesh Rajendran --- .../templates/alerRules.yaml | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/alerRules.yaml diff --git a/kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/alerRules.yaml b/kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/alerRules.yaml new file mode 100644 index 000000000..7d844d498 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/alerRules.yaml @@ -0,0 +1,22 @@ +--- +apiVersion: monitoring.coreos.com/v1 +kind: PrometheusRule +metadata: + labels: + role: alert-rules + app: {{ .Values.serviceMonitorLabels.release }} + release: {{ .Values.serviceMonitorLabels.release }} + name: {{ include "kafka-topic-exporter.fullname" . }}-alertrule + namespace: {{ default .Values.namespace .Release.Namespace }} +spec: + groups: + - name: alertrules.kafkalag + rules: + - alert: TelemetryValidator lag + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "TelemetryValidator"}) > {{ .Values.telemetry_validator_threshold }} + for: 5m + labels: + severity: critical + annotations: + message: `"TelemetryValidator lag is {{$value}}"` + summary: TelemetryValidator lag is Critical From 8d9c2117dc05e9b9243c1f0d9961970a46dff576 Mon Sep 17 00:00:00 2001 From: GangaramD Date: Mon, 27 Apr 2020 16:43:13 +0530 Subject: [PATCH 2343/2894] Dp consumer lag prometheus scrape dashboard (#1433) * Dp consumer lag prometheus scrape --- .../DP-Jobs-Consumer-lag-prometheus.json | 1138 +++++++++++++++++ 1 file changed, 1138 insertions(+) create mode 100644 kubernetes/helm_charts/monitoring/dashboards/dashboards/DP-Jobs-Consumer-lag-prometheus.json diff --git a/kubernetes/helm_charts/monitoring/dashboards/dashboards/DP-Jobs-Consumer-lag-prometheus.json b/kubernetes/helm_charts/monitoring/dashboards/dashboards/DP-Jobs-Consumer-lag-prometheus.json new file mode 100644 index 000000000..0afe6d3d3 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/dashboards/dashboards/DP-Jobs-Consumer-lag-prometheus.json @@ -0,0 +1,1138 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": 53, + "links": [], + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 0 + }, + "id": 9, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"AssessmentAggregator\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Assessment Aggregator", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 6, + "y": 0 + }, + "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, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"DeDuplication\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Deduplication", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 12, + "y": 0 + }, + "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, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"DeNormalization\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Denormalization", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 18, + "y": 0 + }, + "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, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"DerivedDeDuplication\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Derived DeDuplication", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 6 + }, + "id": 15, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"DeviceProfileUpdater\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Device ProfileUpdater", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 6, + "y": 6 + }, + "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, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"DruidEventsValidator\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Druid Events Validator", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 12, + "y": 6 + }, + "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, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"EventsRouter\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Events Router", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 18, + "y": 6 + }, + "id": 17, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"TelemetryExtractor\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Telemetry Extractor", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 12 + }, + "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, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"TelemetryLocationUpdater\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Telemetry Location Updater", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 6, + "y": 12 + }, + "id": 11, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"TelemetryRedacter\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Telemetry Redacter", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 12, + "y": 12 + }, + "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, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"TelemetryRouter\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Telemetry Router", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 18, + "y": 12 + }, + "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, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"TelemetryValidator\"})", + "hide": false, + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Telemetry Validator", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 18 + }, + "id": 19, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"UserCacheUpdater\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "UserCache Updater", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + } + ], + "schemaVersion": 21, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "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": "DP-Jobs-Consumer-lag-prometheus", + "uid": "RiO67g6Zz", + "version": 1 +} From 4b5a5e83e8d13d9a28252efc81041bec5e4f2f5c Mon Sep 17 00:00:00 2001 From: GangaramD Date: Mon, 27 Apr 2020 16:43:49 +0530 Subject: [PATCH 2344/2894] Dp consumer lag prometheus scrape dashboard (#1434) * Dp consumer lag prometheus scrape --- .../DP-Jobs-Consumer-lag-prometheus.json | 1138 +++++++++++++++++ 1 file changed, 1138 insertions(+) create mode 100644 kubernetes/helm_charts/monitoring/dashboards/dashboards/DP-Jobs-Consumer-lag-prometheus.json diff --git a/kubernetes/helm_charts/monitoring/dashboards/dashboards/DP-Jobs-Consumer-lag-prometheus.json b/kubernetes/helm_charts/monitoring/dashboards/dashboards/DP-Jobs-Consumer-lag-prometheus.json new file mode 100644 index 000000000..0afe6d3d3 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/dashboards/dashboards/DP-Jobs-Consumer-lag-prometheus.json @@ -0,0 +1,1138 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": 53, + "links": [], + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 0 + }, + "id": 9, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"AssessmentAggregator\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Assessment Aggregator", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 6, + "y": 0 + }, + "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, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"DeDuplication\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Deduplication", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 12, + "y": 0 + }, + "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, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"DeNormalization\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Denormalization", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 18, + "y": 0 + }, + "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, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"DerivedDeDuplication\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Derived DeDuplication", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 6 + }, + "id": 15, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"DeviceProfileUpdater\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Device ProfileUpdater", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 6, + "y": 6 + }, + "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, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"DruidEventsValidator\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Druid Events Validator", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 12, + "y": 6 + }, + "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, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"EventsRouter\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Events Router", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 18, + "y": 6 + }, + "id": 17, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"TelemetryExtractor\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Telemetry Extractor", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 12 + }, + "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, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"TelemetryLocationUpdater\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Telemetry Location Updater", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 6, + "y": 12 + }, + "id": 11, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"TelemetryRedacter\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Telemetry Redacter", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 12, + "y": 12 + }, + "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, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"TelemetryRouter\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Telemetry Router", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 18, + "y": 12 + }, + "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, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"TelemetryValidator\"})", + "hide": false, + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Telemetry Validator", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Prometheus", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 18 + }, + "id": 19, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"UserCacheUpdater\"})", + "instant": true, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "UserCache Updater", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + } + ], + "schemaVersion": 21, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "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": "DP-Jobs-Consumer-lag-prometheus", + "uid": "RiO67g6Zz", + "version": 1 +} From 9a6cfab02ee9045b1a39a3839fd65773e1029c1f Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Mon, 27 Apr 2020 20:29:35 +0530 Subject: [PATCH 2345/2894] Adding safe defaults for the alerting kafka topic exporter Signed-off-by: Rajesh Rajendran --- .../templates/kafka-topic-exporter.yaml | 14 ++++++++++++++ .../monitoring/kafka-topic-exporter/values.yaml | 15 +++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/kubernetes/ansible/roles/sunbird-monitoring/templates/kafka-topic-exporter.yaml b/kubernetes/ansible/roles/sunbird-monitoring/templates/kafka-topic-exporter.yaml index b0e4cdc3a..2b3951d6e 100644 --- a/kubernetes/ansible/roles/sunbird-monitoring/templates/kafka-topic-exporter.yaml +++ b/kubernetes/ansible/roles/sunbird-monitoring/templates/kafka-topic-exporter.yaml @@ -2,3 +2,17 @@ env: kafka: host: "{{ groups['kafka'][0] }}:9092" topic: "{{env_name}}.prom.monitoring.metrics" + +assessment_aggregator_threshold: "{{assessment_aggregator_threshold | d(100)}}" +deduplication_threshold: "{{deduplication_threshold | d(100)}}" +denormalization_threshold: "{{denormalization_threshold | d(100)}}" +derived_deduplication_threshold: "{{derived_deduplication_threshold | d(100)}}" +device_profileupdater_threshold: "{{device_profileupdater_threshold | d(100)}}" +druidevents_validator_threshold: "{{druidevents_validator_threshold | d(100)}}" +events_router_threshold: "{{events_router_threshold | d(100)}}" +telemetry_extractor_threshold: "{{telemetry_extractor_threshold | d(100)}}" +telemetry_location_updater_threshold: "{{telemetry_location_updater_threshold | d(100)}}" +telemetry_redacter_threshold: "{{telemetry_redacter_threshold | d(100)}}" +telemetry_router_threshold: "{{telemetry_router_threshold | d(100)}}" +telemetry_validator_threshold: "{{telemetry_validator_threshold | d(100)}}" +user_cacheupdater_threshold: "{{user_cacheupdater_threshold | d(100)}}" diff --git a/kubernetes/helm_charts/monitoring/kafka-topic-exporter/values.yaml b/kubernetes/helm_charts/monitoring/kafka-topic-exporter/values.yaml index 9c6740261..7f29aa9f5 100644 --- a/kubernetes/helm_charts/monitoring/kafka-topic-exporter/values.yaml +++ b/kubernetes/helm_charts/monitoring/kafka-topic-exporter/values.yaml @@ -35,3 +35,18 @@ resources: {} # memory: 128Mi serviceMonitorLabels: release: prometheus-operator + +## samza_topic_lag thresholds +assessment_aggregator_threshold: 100 +deduplication_threshold: 100 +denormalization_threshold: 100 +derived_deduplication_threshold: 100 +device_profileupdater_threshold: 100 +druidevents_validator_threshold: 100 +events_router_threshold: 100 +telemetry_extractor_threshold: 100 +telemetry_location_updater_threshold: 100 +telemetry_redacter_threshold: 100 +telemetry_router_threshold: 100 +telemetry_validator_threshold: 100 +user_cacheupdater_threshold: 100 From 6e63ff0288c0580b40e7fdddef68c703b47160a3 Mon Sep 17 00:00:00 2001 From: GangaramD Date: Mon, 27 Apr 2020 20:41:15 +0530 Subject: [PATCH 2346/2894] DP consumer lag alerts rules (#20) * DP consumer lag alerts update --- .../sunbird-monitoring/defaults/main.yml | 1 + .../templates/alerRules.yaml | 108 ++++++++++++++++++ 2 files changed, 109 insertions(+) diff --git a/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml b/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml index 3e7f0afe4..0bea811bf 100644 --- a/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml +++ b/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml @@ -145,3 +145,4 @@ service_blackbox_checks: probe_module: http_2xx targets: - "{{proto}}://{{proxy_server_name}}/auth/realms/sunbird/protocol/openid-connect/auth?client_id=portal&state=foo&redirect_uri=https%3A%2F%2F{{proxy_server_name}}%2Fprivate%2Findex%3Fauth_callback%3D1&scope=openid&response_type=code" + diff --git a/kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/alerRules.yaml b/kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/alerRules.yaml index 7d844d498..9b46f0fdd 100644 --- a/kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/alerRules.yaml +++ b/kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/alerRules.yaml @@ -12,6 +12,105 @@ spec: groups: - name: alertrules.kafkalag rules: + - alert: AssessmentAggregator lag + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "AssessmentAggregator"}) > {{ .Values.assessment_aggregator_threshold }} + for: 5m + labels: + severity: critical + annotations: + message: `"AssessmentAggregator lag is {{$value}}"` + summary: AssessmentAggregator lag is Critical + + - alert: DeDuplication lag + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "DeDuplication"}) > {{ .Values.deduplication_threshold }} + for: 5m + labels: + severity: critical + annotations: + message: `"DeDuplication lag is {{$value}}"` + summary: DeDuplication lag is Critical + + - alert: DeNormalization lag + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "DeNormalization"}) > {{ .Values.denormalization_threshold }} + for: 5m + labels: + severity: critical + annotations: + message: `"DeNormalization lag is {{$value}}"` + summary: DeNormalization lag is Critical + + - alert: DerivedDeDuplication lag + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "DerivedDeDuplication"}) > {{ .Values.derived_deduplication_threshold }} + for: 5m + labels: + severity: critical + annotations: + message: `"DerivedDeDuplication lag is {{$value}}"` + summary: DerivedDeDuplication lag is Critical + + - alert: DeviceProfileUpdater lag + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "DeviceProfileUpdater"}) > {{ .Values.device_profileupdater_threshold }} + for: 5m + labels: + severity: critical + annotations: + message: `"DeviceProfileUpdater lag is {{$value}}"` + summary: DeviceProfileUpdater lag is Critical + + - alert: DruidEventsValidator lag + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "DruidEventsValidator"}) > {{ .Values.druidevents_validator_threshold }} + for: 5m + labels: + severity: critical + annotations: + message: `"DruidEventsValidator lag is {{$value}}"` + summary: DruidEventsValidator lag is Critical + + - alert: EventsRouter lag + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "EventsRouter"}) > {{ .Values.events_router_threshold }} + for: 5m + labels: + severity: critical + annotations: + message: `"EventsRouter lag is {{$value}}"` + summary: EventsRouter lag is Critical + + - alert: TelemetryExtractor lag + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "TelemetryExtractor"}) > {{ .Values.telemetry_extractor_threshold }} + for: 5m + labels: + severity: critical + annotations: + message: `"TelemetryExtractor lag is {{$value}}"` + summary: TelemetryExtractor lag is Critical + + - alert: TelemetryLocationUpdater lag + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "TelemetryLocationUpdater"}) > {{ .Values.telemetry_location_updater_threshold }} + for: 5m + labels: + severity: critical + annotations: + message: `"TelemetryLocationUpdater lag is {{$value}}"` + summary: TelemetryLocationUpdater lag is Critical + + - alert: TelemetryRedacter lag + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "TelemetryRedacter"}) > {{ .Values.telemetry_redacter_threshold }} + for: 5m + labels: + severity: critical + annotations: + message: `"TelemetryRedacter lag is {{$value}}"` + summary: TelemetryRedacter lag is Critical + + - alert: TelemetryRouter lag + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "TelemetryRouter"}) > {{ .Values.telemetry_router_threshold }} + for: 5m + labels: + severity: critical + annotations: + message: `"TelemetryRouter lag is {{$value}}"` + summary: TelemetryRouter lag is Critical + - alert: TelemetryValidator lag expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "TelemetryValidator"}) > {{ .Values.telemetry_validator_threshold }} for: 5m @@ -20,3 +119,12 @@ spec: annotations: message: `"TelemetryValidator lag is {{$value}}"` summary: TelemetryValidator lag is Critical + + - alert: UserCacheUpdater lag + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "UserCacheUpdater"}) > {{ .Values.user_cacheupdater_threshold }} + for: 5m + labels: + severity: critical + annotations: + message: `"UserCacheUpdater lag is {{$value}}"` + summary: UserCacheUpdater lag is Critical From c9e6836b00c19ce361224eba7bc31c763cb2e0e0 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Mon, 27 Apr 2020 21:45:10 +0530 Subject: [PATCH 2347/2894] fix: helm template issue Signed-off-by: Rajesh Rajendran --- .../templates/kafka-topic-exporter.yaml | 28 +++++++++---------- .../templates/alerRules.yaml | 26 ++++++++--------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/kubernetes/ansible/roles/sunbird-monitoring/templates/kafka-topic-exporter.yaml b/kubernetes/ansible/roles/sunbird-monitoring/templates/kafka-topic-exporter.yaml index 2b3951d6e..c23663a46 100644 --- a/kubernetes/ansible/roles/sunbird-monitoring/templates/kafka-topic-exporter.yaml +++ b/kubernetes/ansible/roles/sunbird-monitoring/templates/kafka-topic-exporter.yaml @@ -1,18 +1,18 @@ env: kafka: host: "{{ groups['kafka'][0] }}:9092" - topic: "{{env_name}}.prom.monitoring.metrics" + topic: "{{ env_name }}.prom.monitoring.metrics" -assessment_aggregator_threshold: "{{assessment_aggregator_threshold | d(100)}}" -deduplication_threshold: "{{deduplication_threshold | d(100)}}" -denormalization_threshold: "{{denormalization_threshold | d(100)}}" -derived_deduplication_threshold: "{{derived_deduplication_threshold | d(100)}}" -device_profileupdater_threshold: "{{device_profileupdater_threshold | d(100)}}" -druidevents_validator_threshold: "{{druidevents_validator_threshold | d(100)}}" -events_router_threshold: "{{events_router_threshold | d(100)}}" -telemetry_extractor_threshold: "{{telemetry_extractor_threshold | d(100)}}" -telemetry_location_updater_threshold: "{{telemetry_location_updater_threshold | d(100)}}" -telemetry_redacter_threshold: "{{telemetry_redacter_threshold | d(100)}}" -telemetry_router_threshold: "{{telemetry_router_threshold | d(100)}}" -telemetry_validator_threshold: "{{telemetry_validator_threshold | d(100)}}" -user_cacheupdater_threshold: "{{user_cacheupdater_threshold | d(100)}}" +assessment_aggregator_threshold: "{{ assessment_aggregator_threshold | d(100) }}" +deduplication_threshold: "{{ deduplication_threshold | d(100) }}" +denormalization_threshold: "{{ denormalization_threshold | d(100) }}" +derived_deduplication_threshold: "{{ derived_deduplication_threshold | d(100) }}" +device_profileupdater_threshold: "{{ device_profileupdater_threshold | d(100) }}" +druidevents_validator_threshold: "{{ druidevents_validator_threshold | d(100) }}" +events_router_threshold: "{{ events_router_threshold | d(100) }}" +telemetry_extractor_threshold: "{{ telemetry_extractor_threshold | d(100) }}" +telemetry_location_updater_threshold: "{{ telemetry_location_updater_threshold | d(100) }}" +telemetry_redacter_threshold: "{{ telemetry_redacter_threshold | d(100) }}" +telemetry_router_threshold: "{{ telemetry_router_threshold | d(100) }}" +telemetry_validator_threshold: "{{ telemetry_validator_threshold | d(100) }}" +user_cacheupdater_threshold: "{{ user_cacheupdater_threshold | d(100) }}" diff --git a/kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/alerRules.yaml b/kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/alerRules.yaml index 9b46f0fdd..d417c84ed 100644 --- a/kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/alerRules.yaml +++ b/kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/alerRules.yaml @@ -18,7 +18,7 @@ spec: labels: severity: critical annotations: - message: `"AssessmentAggregator lag is {{$value}}"` + message: {{`"AssessmentAggregator lag is {{$value}}"`}} summary: AssessmentAggregator lag is Critical - alert: DeDuplication lag @@ -27,7 +27,7 @@ spec: labels: severity: critical annotations: - message: `"DeDuplication lag is {{$value}}"` + message: {{`"DeDuplication lag is {{$value}}"`}} summary: DeDuplication lag is Critical - alert: DeNormalization lag @@ -36,7 +36,7 @@ spec: labels: severity: critical annotations: - message: `"DeNormalization lag is {{$value}}"` + message: {{`"DeNormalization lag is {{$value}}"`}} summary: DeNormalization lag is Critical - alert: DerivedDeDuplication lag @@ -45,7 +45,7 @@ spec: labels: severity: critical annotations: - message: `"DerivedDeDuplication lag is {{$value}}"` + message: {{`"DerivedDeDuplication lag is {{$value}}"`}} summary: DerivedDeDuplication lag is Critical - alert: DeviceProfileUpdater lag @@ -54,7 +54,7 @@ spec: labels: severity: critical annotations: - message: `"DeviceProfileUpdater lag is {{$value}}"` + message: {{`"DeviceProfileUpdater lag is {{$value}}"`}} summary: DeviceProfileUpdater lag is Critical - alert: DruidEventsValidator lag @@ -63,7 +63,7 @@ spec: labels: severity: critical annotations: - message: `"DruidEventsValidator lag is {{$value}}"` + message: {{`"DruidEventsValidator lag is {{$value}}"`}} summary: DruidEventsValidator lag is Critical - alert: EventsRouter lag @@ -72,7 +72,7 @@ spec: labels: severity: critical annotations: - message: `"EventsRouter lag is {{$value}}"` + message: {{`"EventsRouter lag is {{$value}}"`}} summary: EventsRouter lag is Critical - alert: TelemetryExtractor lag @@ -81,7 +81,7 @@ spec: labels: severity: critical annotations: - message: `"TelemetryExtractor lag is {{$value}}"` + message: {{`"TelemetryExtractor lag is {{$value}}"`}} summary: TelemetryExtractor lag is Critical - alert: TelemetryLocationUpdater lag @@ -90,7 +90,7 @@ spec: labels: severity: critical annotations: - message: `"TelemetryLocationUpdater lag is {{$value}}"` + message: {{`"TelemetryLocationUpdater lag is {{$value}}"`}} summary: TelemetryLocationUpdater lag is Critical - alert: TelemetryRedacter lag @@ -99,7 +99,7 @@ spec: labels: severity: critical annotations: - message: `"TelemetryRedacter lag is {{$value}}"` + message: {{`"TelemetryRedacter lag is {{$value}}"`}} summary: TelemetryRedacter lag is Critical - alert: TelemetryRouter lag @@ -108,7 +108,7 @@ spec: labels: severity: critical annotations: - message: `"TelemetryRouter lag is {{$value}}"` + message: {{`"TelemetryRouter lag is {{$value}}"`}} summary: TelemetryRouter lag is Critical - alert: TelemetryValidator lag @@ -117,7 +117,7 @@ spec: labels: severity: critical annotations: - message: `"TelemetryValidator lag is {{$value}}"` + message: {{`"TelemetryValidator lag is {{$value}}"`}} summary: TelemetryValidator lag is Critical - alert: UserCacheUpdater lag @@ -126,5 +126,5 @@ spec: labels: severity: critical annotations: - message: `"UserCacheUpdater lag is {{$value}}"` + message: {{`"UserCacheUpdater lag is {{$value}}"`}} summary: UserCacheUpdater lag is Critical From 7693c71cb3a220a039b13ca90188b5036e04be46 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Tue, 28 Apr 2020 00:53:35 +0530 Subject: [PATCH 2348/2894] Making instant value false for prometheus sum query Signed-off-by: Rajesh Rajendran --- .../DP-Jobs-Consumer-lag-prometheus.json | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/kubernetes/helm_charts/monitoring/dashboards/dashboards/DP-Jobs-Consumer-lag-prometheus.json b/kubernetes/helm_charts/monitoring/dashboards/dashboards/DP-Jobs-Consumer-lag-prometheus.json index 0afe6d3d3..03b50f732 100644 --- a/kubernetes/helm_charts/monitoring/dashboards/dashboards/DP-Jobs-Consumer-lag-prometheus.json +++ b/kubernetes/helm_charts/monitoring/dashboards/dashboards/DP-Jobs-Consumer-lag-prometheus.json @@ -81,7 +81,7 @@ "targets": [ { "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"AssessmentAggregator\"})", - "instant": true, + "instant": false, "refId": "A" } ], @@ -163,7 +163,7 @@ "targets": [ { "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"DeDuplication\"})", - "instant": true, + "instant": false, "refId": "A" } ], @@ -245,7 +245,7 @@ "targets": [ { "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"DeNormalization\"})", - "instant": true, + "instant": false, "refId": "A" } ], @@ -329,7 +329,7 @@ "targets": [ { "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"DerivedDeDuplication\"})", - "instant": true, + "instant": false, "refId": "A" } ], @@ -413,7 +413,7 @@ "targets": [ { "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"DeviceProfileUpdater\"})", - "instant": true, + "instant": false, "refId": "A" } ], @@ -495,7 +495,7 @@ "targets": [ { "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"DruidEventsValidator\"})", - "instant": true, + "instant": false, "refId": "A" } ], @@ -577,7 +577,7 @@ "targets": [ { "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"EventsRouter\"})", - "instant": true, + "instant": false, "refId": "A" } ], @@ -661,7 +661,7 @@ "targets": [ { "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"TelemetryExtractor\"})", - "instant": true, + "instant": false, "refId": "A" } ], @@ -743,7 +743,7 @@ "targets": [ { "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"TelemetryLocationUpdater\"})", - "instant": true, + "instant": false, "refId": "A" } ], @@ -827,7 +827,7 @@ "targets": [ { "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"TelemetryRedacter\"})", - "instant": true, + "instant": false, "refId": "A" } ], @@ -909,7 +909,7 @@ "targets": [ { "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"TelemetryRouter\"})", - "instant": true, + "instant": false, "refId": "A" } ], @@ -992,7 +992,7 @@ { "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"TelemetryValidator\"})", "hide": false, - "instant": true, + "instant": false, "refId": "A" } ], @@ -1076,7 +1076,7 @@ "targets": [ { "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"UserCacheUpdater\"})", - "instant": true, + "instant": false, "refId": "A" } ], From 96915bdf913c2c7be46cdedad69de0ed8944673a Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Tue, 28 Apr 2020 09:14:36 +0530 Subject: [PATCH 2349/2894] Adding telemetry lag dashboard Signed-off-by: Rajesh Rajendran --- kubernetes/helm_charts/monitoring/dashboards/values.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kubernetes/helm_charts/monitoring/dashboards/values.yaml b/kubernetes/helm_charts/monitoring/dashboards/values.yaml index 810b75b91..685d55f92 100644 --- a/kubernetes/helm_charts/monitoring/dashboards/values.yaml +++ b/kubernetes/helm_charts/monitoring/dashboards/values.yaml @@ -387,6 +387,8 @@ dashboards: file: dashboards/secor-consumarlag-kafka.json dashboard20: file: dashboards/weekly-report.json + dashboard21: + file: dashboards/DP-Jobs-Consumer-lag-prometheus.json dashboards1: temporary: From 5c73a1f0a1c79a3a9ea9dabca21e6d520e0cf821 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Tue, 28 Apr 2020 09:31:25 +0530 Subject: [PATCH 2350/2894] Adding Heuristics graph to lag monitoring Signed-off-by: Rajesh Rajendran --- .../DP-Jobs-Consumer-lag-prometheus.json | 163 ++++++++++++++---- 1 file changed, 134 insertions(+), 29 deletions(-) diff --git a/kubernetes/helm_charts/monitoring/dashboards/dashboards/DP-Jobs-Consumer-lag-prometheus.json b/kubernetes/helm_charts/monitoring/dashboards/dashboards/DP-Jobs-Consumer-lag-prometheus.json index 03b50f732..1a23b1abc 100644 --- a/kubernetes/helm_charts/monitoring/dashboards/dashboards/DP-Jobs-Consumer-lag-prometheus.json +++ b/kubernetes/helm_charts/monitoring/dashboards/dashboards/DP-Jobs-Consumer-lag-prometheus.json @@ -15,9 +15,114 @@ "editable": true, "gnetId": null, "graphTooltip": 0, - "id": 53, + "id": 55, "links": [], "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 0 + }, + "hiddenSeries": false, + "id": 21, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(samza_pipeline_metrics_consumer_lag) by (job_name)", + "legendFormat": "{{job_name}}", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Lag Heuristics", + "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 + } + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 9 + }, + "id": 23, + "panels": [], + "title": "Current Lag For Jobs", + "type": "row" + }, { "cacheTimeout": null, "colorBackground": false, @@ -40,7 +145,7 @@ "h": 6, "w": 6, "x": 0, - "y": 0 + "y": 10 }, "id": 9, "interval": null, @@ -81,7 +186,7 @@ "targets": [ { "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"AssessmentAggregator\"})", - "instant": false, + "instant": true, "refId": "A" } ], @@ -122,7 +227,7 @@ "h": 6, "w": 6, "x": 6, - "y": 0 + "y": 10 }, "id": 3, "interval": null, @@ -163,7 +268,7 @@ "targets": [ { "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"DeDuplication\"})", - "instant": false, + "instant": true, "refId": "A" } ], @@ -204,7 +309,7 @@ "h": 6, "w": 6, "x": 12, - "y": 0 + "y": 10 }, "id": 6, "interval": null, @@ -245,7 +350,7 @@ "targets": [ { "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"DeNormalization\"})", - "instant": false, + "instant": true, "refId": "A" } ], @@ -286,7 +391,7 @@ "h": 6, "w": 6, "x": 18, - "y": 0 + "y": 10 }, "id": 13, "interval": null, @@ -329,7 +434,7 @@ "targets": [ { "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"DerivedDeDuplication\"})", - "instant": false, + "instant": true, "refId": "A" } ], @@ -370,7 +475,7 @@ "h": 6, "w": 6, "x": 0, - "y": 6 + "y": 16 }, "id": 15, "interval": null, @@ -413,7 +518,7 @@ "targets": [ { "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"DeviceProfileUpdater\"})", - "instant": false, + "instant": true, "refId": "A" } ], @@ -454,7 +559,7 @@ "h": 6, "w": 6, "x": 6, - "y": 6 + "y": 16 }, "id": 7, "interval": null, @@ -495,7 +600,7 @@ "targets": [ { "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"DruidEventsValidator\"})", - "instant": false, + "instant": true, "refId": "A" } ], @@ -536,7 +641,7 @@ "h": 6, "w": 6, "x": 12, - "y": 6 + "y": 16 }, "id": 8, "interval": null, @@ -577,7 +682,7 @@ "targets": [ { "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"EventsRouter\"})", - "instant": false, + "instant": true, "refId": "A" } ], @@ -618,7 +723,7 @@ "h": 6, "w": 6, "x": 18, - "y": 6 + "y": 16 }, "id": 17, "interval": null, @@ -661,7 +766,7 @@ "targets": [ { "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"TelemetryExtractor\"})", - "instant": false, + "instant": true, "refId": "A" } ], @@ -702,7 +807,7 @@ "h": 6, "w": 6, "x": 0, - "y": 12 + "y": 22 }, "id": 5, "interval": null, @@ -743,7 +848,7 @@ "targets": [ { "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"TelemetryLocationUpdater\"})", - "instant": false, + "instant": true, "refId": "A" } ], @@ -784,7 +889,7 @@ "h": 6, "w": 6, "x": 6, - "y": 12 + "y": 22 }, "id": 11, "interval": null, @@ -827,7 +932,7 @@ "targets": [ { "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"TelemetryRedacter\"})", - "instant": false, + "instant": true, "refId": "A" } ], @@ -868,7 +973,7 @@ "h": 6, "w": 6, "x": 12, - "y": 12 + "y": 22 }, "id": 4, "interval": null, @@ -909,7 +1014,7 @@ "targets": [ { "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"TelemetryRouter\"})", - "instant": false, + "instant": true, "refId": "A" } ], @@ -950,7 +1055,7 @@ "h": 6, "w": 6, "x": 18, - "y": 12 + "y": 22 }, "id": 2, "interval": null, @@ -992,7 +1097,7 @@ { "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"TelemetryValidator\"})", "hide": false, - "instant": false, + "instant": true, "refId": "A" } ], @@ -1033,7 +1138,7 @@ "h": 6, "w": 6, "x": 0, - "y": 18 + "y": 28 }, "id": 19, "interval": null, @@ -1076,7 +1181,7 @@ "targets": [ { "expr": "sum(samza_pipeline_metrics_consumer_lag{job_name= \"UserCacheUpdater\"})", - "instant": false, + "instant": true, "refId": "A" } ], @@ -1103,7 +1208,7 @@ "list": [] }, "time": { - "from": "now-1h", + "from": "now-6h", "to": "now" }, "timepicker": { @@ -1134,5 +1239,5 @@ "timezone": "", "title": "DP-Jobs-Consumer-lag-prometheus", "uid": "RiO67g6Zz", - "version": 1 + "version": 2 } From 2cc16d8c4348b20721194ac9dcef6eb531100ed5 Mon Sep 17 00:00:00 2001 From: GangaramD Date: Tue, 28 Apr 2020 13:55:30 +0530 Subject: [PATCH 2351/2894] update: samza lag threshold vars (#1437) * update: Kafka lag threshold variables * update: Samza jobs Threshold var update * update: Default threshold update --- .../templates/alerRules.yaml | 169 +++++++++++++++--- .../kafka-topic-exporter/values.yaml | 43 +++-- 2 files changed, 172 insertions(+), 40 deletions(-) diff --git a/kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/alerRules.yaml b/kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/alerRules.yaml index d417c84ed..c7ba51a37 100644 --- a/kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/alerRules.yaml +++ b/kubernetes/helm_charts/monitoring/kafka-topic-exporter/templates/alerRules.yaml @@ -12,8 +12,8 @@ spec: groups: - name: alertrules.kafkalag rules: - - alert: AssessmentAggregator lag - expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "AssessmentAggregator"}) > {{ .Values.assessment_aggregator_threshold }} + - alert: AssessmentAggregator lag Critical + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "AssessmentAggregator"}) > {{ .Values.assessment_aggregator_threshold_critical }} for: 5m labels: severity: critical @@ -21,8 +21,17 @@ spec: message: {{`"AssessmentAggregator lag is {{$value}}"`}} summary: AssessmentAggregator lag is Critical - - alert: DeDuplication lag - expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "DeDuplication"}) > {{ .Values.deduplication_threshold }} + - alert: AssessmentAggregator lag Fatal + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "AssessmentAggregator"}) > {{ .Values.assessment_aggregator_threshold_fatal }} + for: 5m + labels: + severity: fatal + annotations: + message: {{`"AssessmentAggregator lag is {{$value}}"`}} + summary: AssessmentAggregator lag is fatal + + - alert: DeDuplication lag Critical + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "DeDuplication"}) > {{ .Values.deduplication_threshold_critical }} for: 5m labels: severity: critical @@ -30,8 +39,17 @@ spec: message: {{`"DeDuplication lag is {{$value}}"`}} summary: DeDuplication lag is Critical - - alert: DeNormalization lag - expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "DeNormalization"}) > {{ .Values.denormalization_threshold }} + - alert: DeDuplication lag Fatal + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "DeDuplication"}) > {{ .Values.deduplication_threshold_fatal }} + for: 5m + labels: + severity: fatal + annotations: + message: {{`"DeDuplication lag is {{$value}}"`}} + summary: DeDuplication lag is Fatal + + - alert: DeNormalization lag Critical + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "DeNormalization"}) > {{ .Values.denormalization_threshold_critical }} for: 5m labels: severity: critical @@ -39,8 +57,17 @@ spec: message: {{`"DeNormalization lag is {{$value}}"`}} summary: DeNormalization lag is Critical - - alert: DerivedDeDuplication lag - expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "DerivedDeDuplication"}) > {{ .Values.derived_deduplication_threshold }} + - alert: DeNormalization lag Fatal + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "DeNormalization"}) > {{ .Values.denormalization_threshold_fatal }} + for: 5m + labels: + severity: fatal + annotations: + message: {{`"DeNormalization lag is {{$value}}"`}} + summary: DeNormalization lag is fatal + + - alert: DerivedDeDuplication lag Critical + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "DerivedDeDuplication"}) > {{ .Values.derived_deduplication_threshold_critical }} for: 5m labels: severity: critical @@ -48,8 +75,17 @@ spec: message: {{`"DerivedDeDuplication lag is {{$value}}"`}} summary: DerivedDeDuplication lag is Critical - - alert: DeviceProfileUpdater lag - expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "DeviceProfileUpdater"}) > {{ .Values.device_profileupdater_threshold }} + - alert: DerivedDeDuplication lag Fatal + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "DerivedDeDuplication"}) > {{ .Values.derived_deduplication_threshold_fatal }} + for: 5m + labels: + severity: fatal + annotations: + message: {{`"DerivedDeDuplication lag is {{$value}}"`}} + summary: DerivedDeDuplication lag is Fatal + + - alert: DeviceProfileUpdater lag Critical + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "DeviceProfileUpdater"}) > {{ .Values.device_profileupdater_threshold_critical }} for: 5m labels: severity: critical @@ -57,8 +93,17 @@ spec: message: {{`"DeviceProfileUpdater lag is {{$value}}"`}} summary: DeviceProfileUpdater lag is Critical - - alert: DruidEventsValidator lag - expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "DruidEventsValidator"}) > {{ .Values.druidevents_validator_threshold }} + - alert: DeviceProfileUpdater lag Fatal + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "DeviceProfileUpdater"}) > {{ .Values.device_profileupdater_threshold_fatal }} + for: 5m + labels: + severity: fatal + annotations: + message: {{`"DeviceProfileUpdater lag is {{$value}}"`}} + summary: DeviceProfileUpdater lag is Fatal + + - alert: DruidEventsValidator lag Critical + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "DruidEventsValidator"}) > {{ .Values.druidevents_validator_threshold_critical }} for: 5m labels: severity: critical @@ -66,8 +111,17 @@ spec: message: {{`"DruidEventsValidator lag is {{$value}}"`}} summary: DruidEventsValidator lag is Critical - - alert: EventsRouter lag - expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "EventsRouter"}) > {{ .Values.events_router_threshold }} + - alert: DruidEventsValidator lag Fatal + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "DruidEventsValidator"}) > {{ .Values.druidevents_validator_threshold_fatal }} + for: 5m + labels: + severity: fatal + annotations: + message: {{`"DruidEventsValidator lag is {{$value}}"`}} + summary: DruidEventsValidator lag is Fatal + + - alert: EventsRouter lag Critical + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "EventsRouter"}) > {{ .Values.events_router_threshold_critical }} for: 5m labels: severity: critical @@ -75,8 +129,17 @@ spec: message: {{`"EventsRouter lag is {{$value}}"`}} summary: EventsRouter lag is Critical - - alert: TelemetryExtractor lag - expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "TelemetryExtractor"}) > {{ .Values.telemetry_extractor_threshold }} + - alert: EventsRouter lag Fatal + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "EventsRouter"}) > {{ .Values.events_router_threshold_fatal }} + for: 5m + labels: + severity: fatal + annotations: + message: {{`"EventsRouter lag is {{$value}}"`}} + summary: EventsRouter lag is Fatal + + - alert: TelemetryExtractor lag Critical + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "TelemetryExtractor"}) > {{ .Values.telemetry_extractor_threshold_critical }} for: 5m labels: severity: critical @@ -84,8 +147,17 @@ spec: message: {{`"TelemetryExtractor lag is {{$value}}"`}} summary: TelemetryExtractor lag is Critical - - alert: TelemetryLocationUpdater lag - expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "TelemetryLocationUpdater"}) > {{ .Values.telemetry_location_updater_threshold }} + - alert: TelemetryExtractor lag Fatal + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "TelemetryExtractor"}) > {{ .Values.telemetry_extractor_threshold_fatal }} + for: 5m + labels: + severity: fatal + annotations: + message: {{`"TelemetryExtractor lag is {{$value}}"`}} + summary: TelemetryExtractor lag is Fatal + + - alert: TelemetryLocationUpdater lag Critical + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "TelemetryLocationUpdater"}) > {{ .Values.telemetry_location_updater_threshold_critical }} for: 5m labels: severity: critical @@ -93,8 +165,17 @@ spec: message: {{`"TelemetryLocationUpdater lag is {{$value}}"`}} summary: TelemetryLocationUpdater lag is Critical - - alert: TelemetryRedacter lag - expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "TelemetryRedacter"}) > {{ .Values.telemetry_redacter_threshold }} + - alert: TelemetryLocationUpdater lag Fatal + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "TelemetryLocationUpdater"}) > {{ .Values.telemetry_location_updater_threshold_fatal }} + for: 5m + labels: + severity: fatal + annotations: + message: {{`"TelemetryLocationUpdater lag is {{$value}}"`}} + summary: TelemetryLocationUpdater lag is Fatal + + - alert: TelemetryRedacter lag Critical + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "TelemetryRedacter"}) > {{ .Values.telemetry_redacter_threshold_critical }} for: 5m labels: severity: critical @@ -102,8 +183,17 @@ spec: message: {{`"TelemetryRedacter lag is {{$value}}"`}} summary: TelemetryRedacter lag is Critical - - alert: TelemetryRouter lag - expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "TelemetryRouter"}) > {{ .Values.telemetry_router_threshold }} + - alert: TelemetryRedacter lag Fatal + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "TelemetryRedacter"}) > {{ .Values.telemetry_redacter_threshold_fatal }} + for: 5m + labels: + severity: fatal + annotations: + message: {{`"TelemetryRedacter lag is {{$value}}"`}} + summary: TelemetryRedacter lag is Fatal + + - alert: TelemetryRouter lag Critical + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "TelemetryRouter"}) > {{ .Values.telemetry_router_threshold_critical }} for: 5m labels: severity: critical @@ -111,8 +201,17 @@ spec: message: {{`"TelemetryRouter lag is {{$value}}"`}} summary: TelemetryRouter lag is Critical - - alert: TelemetryValidator lag - expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "TelemetryValidator"}) > {{ .Values.telemetry_validator_threshold }} + - alert: TelemetryRouter lag Fatal + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "TelemetryRouter"}) > {{ .Values.telemetry_router_threshold_fatal }} + for: 5m + labels: + severity: fatal + annotations: + message: {{`"TelemetryRouter lag is {{$value}}"`}} + summary: TelemetryRouter lag is Fatal + + - alert: TelemetryValidator lag Critical + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "TelemetryValidator"}) > {{ .Values.telemetry_validator_threshold_critical }} for: 5m labels: severity: critical @@ -120,11 +219,29 @@ spec: message: {{`"TelemetryValidator lag is {{$value}}"`}} summary: TelemetryValidator lag is Critical - - alert: UserCacheUpdater lag - expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "UserCacheUpdater"}) > {{ .Values.user_cacheupdater_threshold }} + - alert: TelemetryValidator lag Fatal + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "TelemetryValidator"}) > {{ .Values.telemetry_validator_threshold_fatal }} + for: 5m + labels: + severity: fatal + annotations: + message: {{`"TelemetryValidator lag is {{$value}}"`}} + summary: TelemetryValidator lag is Fatal + + - alert: UserCacheUpdater lag Critical + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "UserCacheUpdater"}) > {{ .Values.user_cacheupdater_threshold_critical }} for: 5m labels: severity: critical annotations: message: {{`"UserCacheUpdater lag is {{$value}}"`}} summary: UserCacheUpdater lag is Critical + + - alert: UserCacheUpdater lag Fatal + expr: sum(samza_pipeline_metrics_consumer_lag{job_name= "UserCacheUpdater"}) > {{ .Values.user_cacheupdater_threshold_fatal }} + for: 5m + labels: + severity: fatal + annotations: + message: {{`"UserCacheUpdater lag is {{$value}}"`}} + summary: UserCacheUpdater lag is Fatal diff --git a/kubernetes/helm_charts/monitoring/kafka-topic-exporter/values.yaml b/kubernetes/helm_charts/monitoring/kafka-topic-exporter/values.yaml index 7f29aa9f5..730ee2359 100644 --- a/kubernetes/helm_charts/monitoring/kafka-topic-exporter/values.yaml +++ b/kubernetes/helm_charts/monitoring/kafka-topic-exporter/values.yaml @@ -36,17 +36,32 @@ resources: {} serviceMonitorLabels: release: prometheus-operator -## samza_topic_lag thresholds -assessment_aggregator_threshold: 100 -deduplication_threshold: 100 -denormalization_threshold: 100 -derived_deduplication_threshold: 100 -device_profileupdater_threshold: 100 -druidevents_validator_threshold: 100 -events_router_threshold: 100 -telemetry_extractor_threshold: 100 -telemetry_location_updater_threshold: 100 -telemetry_redacter_threshold: 100 -telemetry_router_threshold: 100 -telemetry_validator_threshold: 100 -user_cacheupdater_threshold: 100 +###samza_topic_lag warning/critical threshold +assessment_aggregator_threshold_critical: 5000 +deduplication_threshold_critical: 5000 +denormalization_threshold_critical: 5000 +derived_deduplication_threshold_critical: 5000 +device_profileupdater_threshold_critical: 5000 +druidevents_validator_threshold_critical: 5000 +events_router_threshold_critical: 5000 +telemetry_extractor_threshold_critical: 5000 +telemetry_location_updater_threshold_critical: 5000 +telemetry_redacter_threshold_critical: 5000 +telemetry_router_threshold_critical: 5000 +telemetry_validator_threshold_critical: 5000 +user_cacheupdater_threshold_critical: 5000 + +###samza_topic_lag fatal threshold +assessment_aggregator_threshold_fatal: 10000 +deduplication_threshold_fatal: 10000 +denormalization_threshold_fatal: 10000 +derived_deduplication_threshold_fatal: 10000 +device_profileupdater_threshold_fatal: 10000 +druidevents_validator_threshold_fatal: 10000 +events_router_threshold_fatal: 10000 +telemetry_extractor_threshold_fatal: 10000 +telemetry_location_updater_threshold_fatal: 10000 +telemetry_redacter_threshold_fatal: 10000 +telemetry_router_threshold_fatal: 10000 +telemetry_validator_threshold_fatal: 10000 +user_cacheupdater_threshold_fatal: 10000 From 33526e570109e6883b7bd3c729bad7a389cc9752 Mon Sep 17 00:00:00 2001 From: "S M Y ALTAMASH smy.altamash@gmail.com" Date: Tue, 28 Apr 2020 20:22:09 +0530 Subject: [PATCH 2352/2894] added new apis --- ansible/roles/kong-api/defaults/main.yml | 36 ------------------------ 1 file changed, 36 deletions(-) diff --git a/ansible/roles/kong-api/defaults/main.yml b/ansible/roles/kong-api/defaults/main.yml index 3e9e69aff..481eb1fcb 100644 --- a/ansible/roles/kong-api/defaults/main.yml +++ b/ansible/roles/kong-api/defaults/main.yml @@ -4436,39 +4436,3 @@ kong_apis: config.limit_by: credential - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" - - - name: searchRegCertificate - request_path: "{{ cert_registry_service_prefix }}/v1/certs/search" - upstream_url: "{{ cert_registry_service_url }}/certs/v1/registry/search" - strip_request_path: true - plugins: - - name: jwt - - name: cors - - "{{ statsd_pulgin }}" - - name: acl - config.whitelist: - - 'certificateAdmin' - - 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: readRegCertificate - request_path: "{{ cert_registry_service_prefix }}/v1/certs/read" - upstream_url: "{{ cert_registry_service_url }}/certs/v1/registry/read" - strip_request_path: true - plugins: - - name: jwt - - name: cors - - "{{ statsd_pulgin }}" - - name: acl - config.whitelist: - - 'certificateAccess' - - 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 }}" From e2a663e265278aeec05cfc565503283e43b884a0 Mon Sep 17 00:00:00 2001 From: "S M Y ALTAMASH smy.altamash@gmail.com" Date: Tue, 28 Apr 2020 20:24:32 +0530 Subject: [PATCH 2353/2894] removed few apis --- ansible/roles/kong-api/defaults/main.yml | 36 ------------------------ 1 file changed, 36 deletions(-) diff --git a/ansible/roles/kong-api/defaults/main.yml b/ansible/roles/kong-api/defaults/main.yml index 561a986d1..95f0495b4 100644 --- a/ansible/roles/kong-api/defaults/main.yml +++ b/ansible/roles/kong-api/defaults/main.yml @@ -2904,24 +2904,6 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" - - name: readRegCertificate - request_path: "{{ cert_registry_service_prefix }}/v1/certs/read" - upstream_url: "{{ cert_registry_service_url }}/certs/v1/registry/read" - strip_request_path: true - plugins: - - name: jwt - - name: cors - - "{{ statsd_pulgin }}" - - name: acl - config.whitelist: - - 'certificateAccess' - - 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: readRoleMapping request_path: "{{ data_service_prefix }}/v1/role/read" upstream_url: "{{ learning_service_url }}/v1/role/read" @@ -3472,24 +3454,6 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" - - name: searchRegCertificate - request_path: "{{ cert_registry_service_prefix }}/v1/certs/search" - upstream_url: "{{ cert_registry_service_url }}/certs/v1/registry/search" - strip_request_path: true - plugins: - - name: jwt - - name: cors - - "{{ statsd_pulgin }}" - - name: acl - config.whitelist: - - 'certificateAccess' - - 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: searchUser request_path: "{{ user_service_prefix }}/v1/search" upstream_url: "{{ learning_service_url }}/v1/user/search" From dccd8d835197320c4447a6d896d27568f921f0b2 Mon Sep 17 00:00:00 2001 From: kaliraja <34502260+Kaali09@users.noreply.github.com> Date: Tue, 28 Apr 2020 22:06:46 +0530 Subject: [PATCH 2354/2894] Issue #0000: added the new dashboards (#1442) --- .../Processing-kafka-cluster-overview.json | 854 ++ ... => data-pipeine-current-lag-metrics.json} | 764 +- .../dashboards/data-pipeline-metrics.json | 6944 +++++++++++++++++ 3 files changed, 8430 insertions(+), 132 deletions(-) create mode 100644 kubernetes/helm_charts/monitoring/dashboards/dashboards/Processing-kafka-cluster-overview.json rename kubernetes/helm_charts/monitoring/dashboards/dashboards/{dp-jobs-consumerLag.json => data-pipeine-current-lag-metrics.json} (63%) create mode 100644 kubernetes/helm_charts/monitoring/dashboards/dashboards/data-pipeline-metrics.json diff --git a/kubernetes/helm_charts/monitoring/dashboards/dashboards/Processing-kafka-cluster-overview.json b/kubernetes/helm_charts/monitoring/dashboards/dashboards/Processing-kafka-cluster-overview.json new file mode 100644 index 000000000..3b6b60c4a --- /dev/null +++ b/kubernetes/helm_charts/monitoring/dashboards/dashboards/Processing-kafka-cluster-overview.json @@ -0,0 +1,854 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "description": "Kafka resource usage and throughput", + "editable": true, + "gnetId": 7589, + "graphTooltip": 0, + "id": 69, + "iteration": 1588075793720, + "links": [], + "panels": [ + { + "aliasColors": {}, + "bars": false, + "cacheTimeout": null, + "dashLength": 10, + "dashes": false, + "datasource": "Prometheus", + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 0 + }, + "hiddenSeries": false, + "id": 20, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": 480, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "kafka_brokers", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{brokers}}", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Brokers Count", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Prometheus", + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 9 + }, + "hiddenSeries": false, + "id": 21, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": 480, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "kafka_topic_partition_in_sync_replica{topic!=\"__consumer_offsets\",topic!=\"__samza_*\"}", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{topic}}", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "ISR Details", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Prometheus", + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 18 + }, + "hiddenSeries": false, + "id": 12, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": 480, + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "kafka_consumergroupzookeeper_lag_zookeeper{consumergroup=~\"$env.*\"}", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{consumergroup}}::{{topic}}::{{partition}}", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Lag by Consumer Group", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "cacheTimeout": null, + "dashLength": 10, + "dashes": false, + "datasource": "Prometheus", + "decimals": null, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 27 + }, + "hiddenSeries": false, + "id": 22, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": 480, + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pluginVersion": "6.5.2", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum by(topic) (kafka_topic_partitions{topic=~\"$topic\"})", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{topic}}", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Partitions per Topic", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "cacheTimeout": null, + "dashLength": 10, + "dashes": false, + "datasource": "Prometheus", + "decimals": null, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 36 + }, + "hiddenSeries": false, + "id": 23, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": 480, + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pluginVersion": "6.5.2", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum by(topic) (kafka_topic_partition_replicas{topic=~\"$topic\"})", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{topic}}", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Replications per Topic", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "cacheTimeout": null, + "dashLength": 10, + "dashes": false, + "datasource": "Prometheus", + "decimals": null, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 45 + }, + "hiddenSeries": false, + "id": 24, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": 480, + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pluginVersion": "6.5.2", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "(kafka_topic_partition_current_offset{topic=~\"$topic\"})", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{topic}} ----- {{partition}}", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Current offset per Topic/Partition", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "cacheTimeout": null, + "dashLength": 10, + "dashes": false, + "datasource": "Prometheus", + "decimals": null, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 54 + }, + "hiddenSeries": false, + "id": 25, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": 480, + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pluginVersion": "6.5.2", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "(kafka_topic_partition_oldest_offset{topic=~\"$topic\"})", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{topic}} ----- {{partition}}", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Oldest offset per Topic/Partition", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "refresh": false, + "schemaVersion": 21, + "style": "dark", + "tags": [ + "Kafka" + ], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "ntpprod", + "value": "ntpprod" + }, + "hide": 2, + "label": null, + "name": "env", + "options": [ + { + "selected": true, + "text": "ntpprod", + "value": "ntpprod" + } + ], + "query": "ntpprod", + "skipUrlSync": false, + "type": "constant" + }, + { + "allValue": null, + "current": { + "text": "kafka-lag-exporter", + "value": [ + "kafka-lag-exporter" + ] + }, + "datasource": "Prometheus", + "definition": "label_values(kafka_consumergroup_current_offset, job)", + "hide": 0, + "includeAll": true, + "label": "Job", + "multi": true, + "name": "job", + "options": [], + "query": "label_values(kafka_consumergroup_current_offset, job)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "topic", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "text": "11.4.8.196:9308", + "value": [ + "11.4.8.196:9308" + ] + }, + "datasource": "Prometheus", + "definition": "label_values(kafka_consumergroup_current_offset{job=~\"$job\"}, instance)", + "hide": 0, + "includeAll": true, + "label": "Instance", + "multi": true, + "name": "instance", + "options": [], + "query": "label_values(kafka_consumergroup_current_offset{job=~\"$job\"}, instance)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "topic", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": "Prometheus", + "definition": "label_values(kafka_topic_partition_current_offset{topic!='__consumer_offsets',topic!='--kafka'}, topic)", + "hide": 0, + "includeAll": true, + "label": "Topic", + "multi": true, + "name": "topic", + "options": [], + "query": "label_values(kafka_topic_partition_current_offset{topic!='__consumer_offsets',topic!='--kafka'}, topic)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-3h", + "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": "Processing Kafka cluster Overview", + "uid": "jwPKIsniz", + "version": 32 +} \ No newline at end of file diff --git a/kubernetes/helm_charts/monitoring/dashboards/dashboards/dp-jobs-consumerLag.json b/kubernetes/helm_charts/monitoring/dashboards/dashboards/data-pipeine-current-lag-metrics.json similarity index 63% rename from kubernetes/helm_charts/monitoring/dashboards/dashboards/dp-jobs-consumerLag.json rename to kubernetes/helm_charts/monitoring/dashboards/dashboards/data-pipeine-current-lag-metrics.json index fb4823e92..d8d4944a2 100644 --- a/kubernetes/helm_charts/monitoring/dashboards/dashboards/dp-jobs-consumerLag.json +++ b/kubernetes/helm_charts/monitoring/dashboards/dashboards/data-pipeine-current-lag-metrics.json @@ -15,9 +15,23 @@ "editable": true, "gnetId": null, "graphTooltip": 0, - "id": 25, + "id": 64, "links": [], "panels": [ + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 13, + "panels": [], + "title": "Main Pipeline", + "type": "row" + }, { "cacheTimeout": null, "colorBackground": false, @@ -40,7 +54,7 @@ "h": 6, "w": 6, "x": 0, - "y": 0 + "y": 1 }, "id": 2, "interval": null, @@ -59,6 +73,128 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"consumer_lag\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryExtractor') AND $timeFilter", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "consumer_lag" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryExtractor" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Telemetry Extractor", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 6, + "y": 1 + }, + "id": 10, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -159,8 +295,8 @@ "gridPos": { "h": 6, "w": 6, - "x": 6, - "y": 0 + "x": 12, + "y": 1 }, "id": 3, "interval": null, @@ -179,6 +315,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -279,10 +416,10 @@ "gridPos": { "h": 6, "w": 6, - "x": 12, - "y": 0 + "x": 18, + "y": 1 }, - "id": 4, + "id": 11, "interval": null, "links": [], "mappingType": 1, @@ -299,6 +436,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -336,8 +474,8 @@ "measurement": "pipeline_metrics", "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"consumer_lag\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryRouter') AND $timeFilter", - "rawQuery": true, + "query": "SELECT sum(\"consumer_lag\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'DeDuplication') AND $timeFilter", + "rawQuery": false, "refId": "A", "resultFormat": "time_series", "select": [ @@ -399,8 +537,8 @@ "gridPos": { "h": 6, "w": 6, - "x": 18, - "y": 0 + "x": 0, + "y": 7 }, "id": 5, "interval": null, @@ -419,6 +557,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -519,8 +658,8 @@ "gridPos": { "h": 6, "w": 6, - "x": 0, - "y": 6 + "x": 6, + "y": 7 }, "id": 6, "interval": null, @@ -539,6 +678,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -639,8 +779,8 @@ "gridPos": { "h": 6, "w": 6, - "x": 6, - "y": 6 + "x": 12, + "y": 7 }, "id": 7, "interval": null, @@ -659,6 +799,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -759,8 +900,8 @@ "gridPos": { "h": 6, "w": 6, - "x": 12, - "y": 6 + "x": 18, + "y": 7 }, "id": 8, "interval": null, @@ -779,6 +920,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -858,6 +1000,20 @@ ], "valueName": "total" }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 13 + }, + "id": 15, + "panels": [], + "title": "Updaters", + "type": "row" + }, { "cacheTimeout": null, "colorBackground": false, @@ -879,10 +1035,10 @@ "gridPos": { "h": 6, "w": 6, - "x": 18, - "y": 6 + "x": 0, + "y": 14 }, - "id": 9, + "id": 16, "interval": null, "links": [], "mappingType": 1, @@ -899,6 +1055,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -936,7 +1093,7 @@ "measurement": "pipeline_metrics", "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"consumer_lag\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'EventsRouter') AND $timeFilter GROUP BY time($__interval) fill(null)", + "query": "SELECT sum(\"consumer_lag\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryExtractor') AND $timeFilter", "rawQuery": false, "refId": "A", "resultFormat": "time_series", @@ -958,7 +1115,7 @@ { "key": "job_name", "operator": "=", - "value": "redis-updater" + "value": "ContentCacheUpdater" } ] } @@ -966,7 +1123,7 @@ "thresholds": "", "timeFrom": null, "timeShift": null, - "title": "Redis Updater", + "title": "Content Cache Updater", "type": "singlestat", "valueFontSize": "80%", "valueMaps": [ @@ -979,40 +1136,65 @@ "valueName": "total" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], "datasource": "InfluxDB_Datapipeline", - "fill": 1, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 12 + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true }, - "id": 11, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false + "gridPos": { + "h": 6, + "w": 6, + "x": 6, + "y": 14 }, - "lines": true, - "linewidth": 1, + "id": 17, + "interval": null, "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", "targets": [ { "groupBy": [ @@ -1032,8 +1214,8 @@ "measurement": "pipeline_metrics", "orderByTime": "ASC", "policy": "default", - "query": "SELECT consumer_lag FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryValidator') AND $timeFilter", - "rawQuery": true, + "query": "SELECT sum(\"consumer_lag\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryExtractor') AND $timeFilter", + "rawQuery": false, "refId": "A", "resultFormat": "time_series", "select": [ @@ -1046,19 +1228,7 @@ }, { "params": [], - "type": "mean" - } - ], - [ - { - "params": [ - "consumer_lag" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" + "type": "sum" } ] ], @@ -1066,75 +1236,405 @@ { "key": "job_name", "operator": "=", - "value": "TelemetryValidator" + "value": "DeviceProfileUpdater" } ] } ], - "thresholds": [], + "thresholds": "", "timeFrom": null, - "timeRegions": [], "timeShift": null, - "title": "TelemetryValidator lag", - "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 - }, + "title": "Device Profile Updater", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "op": "=", + "text": "N/A", + "value": "null" } ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "schemaVersion": 18, - "style": "dark", - "tags": [], - "templating": { - "list": [] - }, - "time": { - "from": "now-6h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 12, + "y": 14 + }, + "id": 18, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"consumer_lag\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryExtractor') AND $timeFilter", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "consumer_lag" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "UserCacheUpdater" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "User Cache Updater", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 18, + "y": 14 + }, + "id": 19, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"consumer_lag\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryExtractor') AND $timeFilter", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "consumer_lag" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "SHARE_EVENTS_FLATTENER" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Share Event Flattener", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 20 + }, + "id": 20, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"consumer_lag\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryExtractor') AND $timeFilter", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "consumer_lag" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryRedacter" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Telemetry Redacter", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + } + ], + "refresh": "5m", + "schemaVersion": 21, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-5m", + "to": "now" + }, + "timepicker": { + "hidden": false, + "refresh_intervals": [ + "5m" ], "time_options": [ "5m", @@ -1149,7 +1649,7 @@ ] }, "timezone": "", - "title": "DP Jobs Consumer lag", - "uid": "m2w63y7Wk", - "version": 6 -} \ No newline at end of file + "title": "Data Pipeline Current Lag Metrics", + "uid": "A5dxWzeZj", + "version": 7 +} diff --git a/kubernetes/helm_charts/monitoring/dashboards/dashboards/data-pipeline-metrics.json b/kubernetes/helm_charts/monitoring/dashboards/dashboards/data-pipeline-metrics.json new file mode 100644 index 000000000..97b946283 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/dashboards/dashboards/data-pipeline-metrics.json @@ -0,0 +1,6944 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": 65, + "links": [], + "panels": [ + { + "collapsed": true, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 82, + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 1 + }, + "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, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"batch-success\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryExtractor') AND $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "success" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryExtractor" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Extractor success", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#C4162A" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 1 + }, + "id": 14, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"batch-error\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryExtractor') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "batch-error" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryExtractor" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Extractor failed", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "#FF9830", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 1 + }, + "id": 56, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "duplicate" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryExtractor" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Extractor Duplicates", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 1 + }, + "id": 59, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"batch-error\") / (sum(\"batch-success\") + sum(\"batch-error\") + sum(\"skipped\") + sum(\"duplicate\")) * 100 FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryExtractor') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "error" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryExtractor" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Extractor failed Percentage", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB_Datapipeline", + "fill": 10, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 5 + }, + "hiddenSeries": false, + "id": 98, + "interval": ">300s", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [ + { + "title": "", + "url": "" + } + ] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "success" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "success" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "failed" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "failed" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "duplicate" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "duplicate" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryExtractor" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Telemetry Extractor", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB_Datapipeline", + "fill": 1, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 5 + }, + "hiddenSeries": false, + "id": 99, + "interval": ">300s", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [ + { + "title": "", + "url": "" + } + ] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"consumer_lag\") AS \"lag\" FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryExtractor') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "consumer_lag" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "lag" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryExtractor" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Telemetry Extractor Lag", + "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 + } + } + ], + "title": "Extractor Job", + "type": "row" + }, + { + "collapsed": true, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 80, + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 2 + }, + "id": 16, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"success\") + sum(\"failed\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryValidator') AND $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "success" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryValidator" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Raw Events", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(145, 23, 23, 0.9)" + ], + "datasource": "InfluxDB_Datapipeline", + "editable": true, + "error": false, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 2 + }, + "id": 64, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"duplicate\") FROM \"pipeline_metrics\" WHERE \"job_name\" = 'DeDuplication' AND $timeFilter", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "success" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryValidator" + } + ] + } + ], + "thresholds": "", + "title": "Valid Events", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#C4162A", + "rgba(40, 237, 42, 0.89)", + "rgba(23, 226, 15, 0.97)" + ], + "datasource": "InfluxDB_Datapipeline", + "editable": true, + "error": false, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 2 + }, + "id": 1, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"failed\") FROM \"pipeline_metrics\" WHERE \"job_name\" = 'TelemetryValidator' AND $timeFilter", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "failed" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryValidator" + } + ] + } + ], + "thresholds": "", + "title": "Invalid Events", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#C4162A", + "rgba(40, 237, 42, 0.89)", + "rgba(23, 226, 15, 0.97)" + ], + "datasource": "InfluxDB_Datapipeline", + "error": true, + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 2 + }, + "id": 65, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"failed\") / (sum(\"success\") + sum(\"failed\")) * 100 FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryValidator') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "error" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryExtractor" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Invalid Events %", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB_Datapipeline", + "fill": 10, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 6 + }, + "hiddenSeries": false, + "id": 97, + "interval": ">300s", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [ + { + "title": "", + "url": "" + } + ] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "success" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "success" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "failed" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "failed" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryValidator" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Telemetry Validator", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB_Datapipeline", + "fill": 1, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 6 + }, + "hiddenSeries": false, + "id": 96, + "interval": ">300s", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [ + { + "title": "", + "url": "" + } + ] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "consumer_lag" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "lag" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryValidator" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Telemetry Validator Lag", + "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 + } + } + ], + "title": "Telemetry Validator Job", + "type": "row" + }, + { + "collapsed": true, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 2 + }, + "id": 78, + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "rgba(31, 195, 25, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(145, 23, 23, 0.9)" + ], + "datasource": "InfluxDB_Datapipeline", + "editable": true, + "error": false, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 3 + }, + "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, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(11, 127, 221, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"success\") FROM \"pipeline_metrics\" WHERE \"job_name\" = 'DeDuplication' AND $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "thresholds": "", + "title": "Unique Events", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#C4162A", + "rgba(40, 237, 42, 0.89)", + "rgba(23, 226, 15, 0.97)" + ], + "datasource": "InfluxDB_Datapipeline", + "editable": true, + "error": false, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 3 + }, + "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, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"duplicate\") FROM \"pipeline_metrics\" WHERE \"job_name\" = 'DeDuplication' AND $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "thresholds": "", + "title": "Duplicate Events", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#C4162A", + "rgba(40, 237, 42, 0.89)", + "rgba(23, 226, 15, 0.97)" + ], + "datasource": "InfluxDB_Datapipeline", + "error": true, + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 3 + }, + "id": 67, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"duplicate\") / (sum(\"success\") + sum(\"duplicate\")) * 100 FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'DeDuplication') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "error" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryExtractor" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Duplicate Events %", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB_Datapipeline", + "fill": 10, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 7 + }, + "hiddenSeries": false, + "id": 100, + "interval": ">300s", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [ + { + "title": "", + "url": "" + } + ] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"success\") AS \"success\", sum(\"duplicate\") AS \"duplicate\" FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'DeDuplication') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "success" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "success" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "duplicate" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "duplicate" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "DeDuplication" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "De Duplication", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB_Datapipeline", + "fill": 10, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 7 + }, + "hiddenSeries": false, + "id": 101, + "interval": ">300s", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [ + { + "title": "", + "url": "" + } + ] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "consumer_lag" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "lag" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "DeDuplication" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "De Duplication Lag", + "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 + } + } + ], + "title": "Deduplication Job", + "type": "row" + }, + { + "collapsed": true, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 3 + }, + "id": 76, + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 4 + }, + "id": 21, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "hide": false, + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"primary-route-success\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryRouter') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "skipped" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryRouter" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Primary Route Success", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 4 + }, + "id": 58, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"secondary-route-success\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryRouter') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Secondary Route Success", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB_Datapipeline", + "fill": 10, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 8 + }, + "hiddenSeries": false, + "id": 102, + "interval": ">300s", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [ + { + "title": "", + "url": "" + } + ] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "primary-route-success" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "primary" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "secondary-route-success" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "secondary" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryRouter" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Telemetry Router", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB_Datapipeline", + "fill": 1, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 8 + }, + "hiddenSeries": false, + "id": 103, + "interval": ">300s", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [ + { + "title": "", + "url": "" + } + ] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "consumer_lag" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "lag" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryRouter" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Telemetry Router Lag", + "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 + } + } + ], + "title": "Telemetry Router", + "type": "row" + }, + { + "collapsed": true, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 4 + }, + "id": 74, + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 5 + }, + "id": 25, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"success\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryLocationUpdater') AND $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "success" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryLocationUpdater" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Location Updater Total", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 5 + }, + "id": 61, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"processed\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryLocationUpdater') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "processed" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryLocationUpdater" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Location Updater Processed", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 5 + }, + "id": 68, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"unprocessed\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryLocationUpdater') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "unprocessed" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryLocationUpdater" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Location Updater Unprocessed", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#C4162A", + "rgba(40, 237, 42, 0.89)", + "rgba(23, 226, 15, 0.97)" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 5 + }, + "id": 63, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"unprocessed\") / (sum(\"success\")) * 100 FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryLocationUpdater') AND $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "error" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryExtractor" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Location Updater Unprocessed %", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 9 + }, + "id": 84, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"success\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryLocationUpdater') AND $timeFilter", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "cache_hit" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryLocationUpdater" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Location Updater Cache Hit", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 9 + }, + "id": 85, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"success\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryLocationUpdater') AND $timeFilter", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "cache_miss" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryLocationUpdater" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Cache Miss", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 9 + }, + "id": 86, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"success\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryLocationUpdater') AND $timeFilter", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "cache_empty_values" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryLocationUpdater" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Cache Empty Values", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#C4162A", + "rgba(40, 237, 42, 0.89)", + "rgba(23, 226, 15, 0.97)" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 9 + }, + "id": 87, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT (sum(\"cache_miss\") + sum(\"cache_empty_values\")) / sum(\"processed\") * 100 FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryLocationUpdater') AND $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "error" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryExtractor" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Cache Miss %", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 13 + }, + "id": 89, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"success\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryLocationUpdater') AND $timeFilter", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "user_cache_hit" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryLocationUpdater" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Cache Hit - User Profile", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 13 + }, + "id": 90, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"success\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryLocationUpdater') AND $timeFilter", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "user_declared_location_hit" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryLocationUpdater" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Cache Hit - Declared Location", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 13 + }, + "id": 88, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"ip_location_hit\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryLocationUpdater') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "ip_location_hit" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryLocationUpdater" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Cache Hit - IP Location", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#C4162A", + "rgba(40, 237, 42, 0.89)", + "rgba(23, 226, 15, 0.97)" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 13 + }, + "id": 91, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"ip_location_hit\") / (sum(\"ip_location_hit\") + sum(\"user_declared_location_hit\") + sum(\"user_cache_hit\"))* 100 FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryLocationUpdater') AND $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "error" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryExtractor" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Resolve Location by IP %", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB_Datapipeline", + "fill": 10, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 17 + }, + "hiddenSeries": false, + "id": 105, + "interval": ">300s", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [ + { + "title": "", + "url": "" + } + ] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "processed" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "processed" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "unprocessed" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "unprocessed" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryLocationUpdater" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Location Updater Processed/Unprocessed", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB_Datapipeline", + "fill": 10, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 8, + "x": 8, + "y": 17 + }, + "hiddenSeries": false, + "id": 106, + "interval": ">300s", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [ + { + "title": "", + "url": "" + } + ] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"user_cache_hit\") AS \"user_profile\", sum(\"user_declared_location_hit\") AS \"user_declared\", sum(\"ip_location_hit\") AS \"ip_location\", sum(\"cache_miss\") AS \"empty\" FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryLocationUpdater') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "user_cache_hit" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "user_profile" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "user_declared_location_hit" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "user_declared" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "ip_location_hit" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "ip_location" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "cache_miss" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "empty" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryLocationUpdater" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Location Updater Cache Hits", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB_Datapipeline", + "fill": 10, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 17 + }, + "hiddenSeries": false, + "id": 104, + "interval": ">300s", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [ + { + "title": "", + "url": "" + } + ] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"consumer_lag\") AS \"lag\" FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryLocationUpdater') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "consumer_lag" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "lag" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryLocationUpdater" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Location Updater Lag", + "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 + } + } + ], + "title": "Location Updater", + "type": "row" + }, + { + "collapsed": true, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 5 + }, + "id": 72, + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 6 + }, + "id": 30, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"success\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'DeNormalization') AND $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "success" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "DeNormalization" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Denorm Success", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 6 + }, + "id": 29, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"skipped\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'DeNormalization') AND $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "skipped" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "DeNormalization" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Denorm Skipped", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 6 + }, + "id": 28, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"expired_event\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'DeNormalization') AND $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "expired_event" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "DeNormalization" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Denorm Expired", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB_Datapipeline", + "fill": 10, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 10 + }, + "hiddenSeries": false, + "id": 107, + "interval": ">300s", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [ + { + "title": "", + "url": "" + } + ] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"success\") AS \"success\", sum(\"skipped\") AS \"skipped\", sum(\"expired_event\") AS \"expired\" FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'DeNormalization') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "success" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "success" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "skipped" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "skipped" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "expired_event" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "expired" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "DeNormalization" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "De Normalization", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB_Datapipeline", + "fill": 10, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 10 + }, + "hiddenSeries": false, + "id": 108, + "interval": ">300s", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [ + { + "title": "", + "url": "" + } + ] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"consumer_lag\") AS \"lag\" FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'DeNormalization') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "consumer_lag" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "lag" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "DeNormalization" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "De Normalization Lag", + "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 + } + } + ], + "title": "De-Normalization job", + "type": "row" + }, + { + "collapsed": true, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 6 + }, + "id": 70, + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 7 + }, + "id": 31, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"success\") + sum(\"failed\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'DruidEventsValidator') AND $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "success" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "DruidEventsValidator" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Druid Validator Total", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 7 + }, + "id": 92, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"success\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'DruidEventsValidator') AND $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "success" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "DruidEventsValidator" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Druid Validator Success", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 7 + }, + "id": 32, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"failed\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'DruidEventsValidator') AND $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "failed" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "DruidEventsValidator" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Druid Validator Failures", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#C4162A", + "rgba(40, 237, 42, 0.89)", + "rgba(23, 226, 15, 0.97)" + ], + "datasource": "InfluxDB_Datapipeline", + "error": true, + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 7 + }, + "id": 93, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"failed\") / (sum(\"success\") + sum(\"failed\")) * 100 FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'DruidEventsValidator') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "error" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryExtractor" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Invalid Events %", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 11 + }, + "id": 35, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"success\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'EventsRouter') AND $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "success" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "DruidEventsValidator" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Druid Router Success", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 11 + }, + "id": 36, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"duplicate\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'EventsRouter') AND $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "success" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "DruidEventsValidator" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Druid Router Duplicates", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#C4162A", + "rgba(40, 237, 42, 0.89)", + "rgba(23, 226, 15, 0.97)" + ], + "datasource": "InfluxDB_Datapipeline", + "error": true, + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 11 + }, + "id": 94, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"duplicate\") / (sum(\"success\") + sum(\"duplicate\")) * 100 FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'EventsRouter') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "error" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryExtractor" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Duplicate Events %", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB_Datapipeline", + "fill": 10, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 15 + }, + "hiddenSeries": false, + "id": 110, + "interval": ">300s", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [ + { + "title": "", + "url": "" + } + ] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"success\") AS \"success\", sum(\"failed\") AS \"failed\" FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'DruidEventsValidator') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "success" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "success" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "failed" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "failed" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "DruidEventsValidator" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Druid Validator", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB_Datapipeline", + "fill": 10, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 15 + }, + "hiddenSeries": false, + "id": 109, + "interval": ">300s", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [ + { + "title": "", + "url": "" + } + ] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"consumer_lag\") AS \"lag\" FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'DruidEventsValidator') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "consumer_lag" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "lag" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "DruidEventsValidator" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Druid Validator Lag", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB_Datapipeline", + "fill": 10, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 23 + }, + "hiddenSeries": false, + "id": 111, + "interval": ">300s", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [ + { + "title": "", + "url": "" + } + ] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"success\") AS \"success\", sum(\"duplicate\") AS \"duplicate\" FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'EventsRouter') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "success" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "success" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "duplicate" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "duplicate" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "EventsRouter" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Events Router", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB_Datapipeline", + "fill": 10, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 23 + }, + "hiddenSeries": false, + "id": 112, + "interval": ">300s", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [ + { + "title": "", + "url": "" + } + ] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"consumer_lag\") AS \"lag\" FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'EventsRouter') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "consumer_lag" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "lag" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "EventsRouter" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Event Router Lag", + "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 + } + } + ], + "title": "Druid Validator and Events Router Job", + "type": "row" + } + ], + "refresh": "5m", + "schemaVersion": 21, + "style": "dark", + "tags": [ + "pipeline", + "home" + ], + "templating": { + "list": [] + }, + "time": { + "from": "now/d", + "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": "Data Pipeline Metrics", + "uid": "9rSknz6Zk", + "version": 15 +} From 125a7e971020a7aea3167080af474b96e82921dd Mon Sep 17 00:00:00 2001 From: kaliraja <34502260+Kaali09@users.noreply.github.com> Date: Tue, 28 Apr 2020 22:07:50 +0530 Subject: [PATCH 2355/2894] Issue #0000: added the new dashboards (#1443) --- .../Processing-kafka-cluster-overview.json | 854 ++ ... => data-pipeine-current-lag-metrics.json} | 764 +- .../dashboards/data-pipeline-metrics.json | 6944 +++++++++++++++++ 3 files changed, 8430 insertions(+), 132 deletions(-) create mode 100644 kubernetes/helm_charts/monitoring/dashboards/dashboards/Processing-kafka-cluster-overview.json rename kubernetes/helm_charts/monitoring/dashboards/dashboards/{dp-jobs-consumerLag.json => data-pipeine-current-lag-metrics.json} (63%) create mode 100644 kubernetes/helm_charts/monitoring/dashboards/dashboards/data-pipeline-metrics.json diff --git a/kubernetes/helm_charts/monitoring/dashboards/dashboards/Processing-kafka-cluster-overview.json b/kubernetes/helm_charts/monitoring/dashboards/dashboards/Processing-kafka-cluster-overview.json new file mode 100644 index 000000000..3b6b60c4a --- /dev/null +++ b/kubernetes/helm_charts/monitoring/dashboards/dashboards/Processing-kafka-cluster-overview.json @@ -0,0 +1,854 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "description": "Kafka resource usage and throughput", + "editable": true, + "gnetId": 7589, + "graphTooltip": 0, + "id": 69, + "iteration": 1588075793720, + "links": [], + "panels": [ + { + "aliasColors": {}, + "bars": false, + "cacheTimeout": null, + "dashLength": 10, + "dashes": false, + "datasource": "Prometheus", + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 0 + }, + "hiddenSeries": false, + "id": 20, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": 480, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "kafka_brokers", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{brokers}}", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Brokers Count", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Prometheus", + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 9 + }, + "hiddenSeries": false, + "id": 21, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": 480, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "kafka_topic_partition_in_sync_replica{topic!=\"__consumer_offsets\",topic!=\"__samza_*\"}", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{topic}}", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "ISR Details", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Prometheus", + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 18 + }, + "hiddenSeries": false, + "id": 12, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": 480, + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "kafka_consumergroupzookeeper_lag_zookeeper{consumergroup=~\"$env.*\"}", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{consumergroup}}::{{topic}}::{{partition}}", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Lag by Consumer Group", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "cacheTimeout": null, + "dashLength": 10, + "dashes": false, + "datasource": "Prometheus", + "decimals": null, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 27 + }, + "hiddenSeries": false, + "id": 22, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": 480, + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pluginVersion": "6.5.2", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum by(topic) (kafka_topic_partitions{topic=~\"$topic\"})", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{topic}}", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Partitions per Topic", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "cacheTimeout": null, + "dashLength": 10, + "dashes": false, + "datasource": "Prometheus", + "decimals": null, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 36 + }, + "hiddenSeries": false, + "id": 23, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": 480, + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pluginVersion": "6.5.2", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum by(topic) (kafka_topic_partition_replicas{topic=~\"$topic\"})", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{topic}}", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Replications per Topic", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "cacheTimeout": null, + "dashLength": 10, + "dashes": false, + "datasource": "Prometheus", + "decimals": null, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 45 + }, + "hiddenSeries": false, + "id": 24, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": 480, + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pluginVersion": "6.5.2", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "(kafka_topic_partition_current_offset{topic=~\"$topic\"})", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{topic}} ----- {{partition}}", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Current offset per Topic/Partition", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "cacheTimeout": null, + "dashLength": 10, + "dashes": false, + "datasource": "Prometheus", + "decimals": null, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 54 + }, + "hiddenSeries": false, + "id": 25, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": 480, + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pluginVersion": "6.5.2", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "(kafka_topic_partition_oldest_offset{topic=~\"$topic\"})", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{topic}} ----- {{partition}}", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Oldest offset per Topic/Partition", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "refresh": false, + "schemaVersion": 21, + "style": "dark", + "tags": [ + "Kafka" + ], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "ntpprod", + "value": "ntpprod" + }, + "hide": 2, + "label": null, + "name": "env", + "options": [ + { + "selected": true, + "text": "ntpprod", + "value": "ntpprod" + } + ], + "query": "ntpprod", + "skipUrlSync": false, + "type": "constant" + }, + { + "allValue": null, + "current": { + "text": "kafka-lag-exporter", + "value": [ + "kafka-lag-exporter" + ] + }, + "datasource": "Prometheus", + "definition": "label_values(kafka_consumergroup_current_offset, job)", + "hide": 0, + "includeAll": true, + "label": "Job", + "multi": true, + "name": "job", + "options": [], + "query": "label_values(kafka_consumergroup_current_offset, job)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "topic", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "text": "11.4.8.196:9308", + "value": [ + "11.4.8.196:9308" + ] + }, + "datasource": "Prometheus", + "definition": "label_values(kafka_consumergroup_current_offset{job=~\"$job\"}, instance)", + "hide": 0, + "includeAll": true, + "label": "Instance", + "multi": true, + "name": "instance", + "options": [], + "query": "label_values(kafka_consumergroup_current_offset{job=~\"$job\"}, instance)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "topic", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": "Prometheus", + "definition": "label_values(kafka_topic_partition_current_offset{topic!='__consumer_offsets',topic!='--kafka'}, topic)", + "hide": 0, + "includeAll": true, + "label": "Topic", + "multi": true, + "name": "topic", + "options": [], + "query": "label_values(kafka_topic_partition_current_offset{topic!='__consumer_offsets',topic!='--kafka'}, topic)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-3h", + "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": "Processing Kafka cluster Overview", + "uid": "jwPKIsniz", + "version": 32 +} \ No newline at end of file diff --git a/kubernetes/helm_charts/monitoring/dashboards/dashboards/dp-jobs-consumerLag.json b/kubernetes/helm_charts/monitoring/dashboards/dashboards/data-pipeine-current-lag-metrics.json similarity index 63% rename from kubernetes/helm_charts/monitoring/dashboards/dashboards/dp-jobs-consumerLag.json rename to kubernetes/helm_charts/monitoring/dashboards/dashboards/data-pipeine-current-lag-metrics.json index fb4823e92..d8d4944a2 100644 --- a/kubernetes/helm_charts/monitoring/dashboards/dashboards/dp-jobs-consumerLag.json +++ b/kubernetes/helm_charts/monitoring/dashboards/dashboards/data-pipeine-current-lag-metrics.json @@ -15,9 +15,23 @@ "editable": true, "gnetId": null, "graphTooltip": 0, - "id": 25, + "id": 64, "links": [], "panels": [ + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 13, + "panels": [], + "title": "Main Pipeline", + "type": "row" + }, { "cacheTimeout": null, "colorBackground": false, @@ -40,7 +54,7 @@ "h": 6, "w": 6, "x": 0, - "y": 0 + "y": 1 }, "id": 2, "interval": null, @@ -59,6 +73,128 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"consumer_lag\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryExtractor') AND $timeFilter", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "consumer_lag" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryExtractor" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Telemetry Extractor", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 6, + "y": 1 + }, + "id": 10, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -159,8 +295,8 @@ "gridPos": { "h": 6, "w": 6, - "x": 6, - "y": 0 + "x": 12, + "y": 1 }, "id": 3, "interval": null, @@ -179,6 +315,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -279,10 +416,10 @@ "gridPos": { "h": 6, "w": 6, - "x": 12, - "y": 0 + "x": 18, + "y": 1 }, - "id": 4, + "id": 11, "interval": null, "links": [], "mappingType": 1, @@ -299,6 +436,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -336,8 +474,8 @@ "measurement": "pipeline_metrics", "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"consumer_lag\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryRouter') AND $timeFilter", - "rawQuery": true, + "query": "SELECT sum(\"consumer_lag\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'DeDuplication') AND $timeFilter", + "rawQuery": false, "refId": "A", "resultFormat": "time_series", "select": [ @@ -399,8 +537,8 @@ "gridPos": { "h": 6, "w": 6, - "x": 18, - "y": 0 + "x": 0, + "y": 7 }, "id": 5, "interval": null, @@ -419,6 +557,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -519,8 +658,8 @@ "gridPos": { "h": 6, "w": 6, - "x": 0, - "y": 6 + "x": 6, + "y": 7 }, "id": 6, "interval": null, @@ -539,6 +678,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -639,8 +779,8 @@ "gridPos": { "h": 6, "w": 6, - "x": 6, - "y": 6 + "x": 12, + "y": 7 }, "id": 7, "interval": null, @@ -659,6 +799,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -759,8 +900,8 @@ "gridPos": { "h": 6, "w": 6, - "x": 12, - "y": 6 + "x": 18, + "y": 7 }, "id": 8, "interval": null, @@ -779,6 +920,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -858,6 +1000,20 @@ ], "valueName": "total" }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 13 + }, + "id": 15, + "panels": [], + "title": "Updaters", + "type": "row" + }, { "cacheTimeout": null, "colorBackground": false, @@ -879,10 +1035,10 @@ "gridPos": { "h": 6, "w": 6, - "x": 18, - "y": 6 + "x": 0, + "y": 14 }, - "id": 9, + "id": 16, "interval": null, "links": [], "mappingType": 1, @@ -899,6 +1055,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -936,7 +1093,7 @@ "measurement": "pipeline_metrics", "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"consumer_lag\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'EventsRouter') AND $timeFilter GROUP BY time($__interval) fill(null)", + "query": "SELECT sum(\"consumer_lag\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryExtractor') AND $timeFilter", "rawQuery": false, "refId": "A", "resultFormat": "time_series", @@ -958,7 +1115,7 @@ { "key": "job_name", "operator": "=", - "value": "redis-updater" + "value": "ContentCacheUpdater" } ] } @@ -966,7 +1123,7 @@ "thresholds": "", "timeFrom": null, "timeShift": null, - "title": "Redis Updater", + "title": "Content Cache Updater", "type": "singlestat", "valueFontSize": "80%", "valueMaps": [ @@ -979,40 +1136,65 @@ "valueName": "total" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], "datasource": "InfluxDB_Datapipeline", - "fill": 1, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 12 + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true }, - "id": 11, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false + "gridPos": { + "h": 6, + "w": 6, + "x": 6, + "y": 14 }, - "lines": true, - "linewidth": 1, + "id": 17, + "interval": null, "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", "targets": [ { "groupBy": [ @@ -1032,8 +1214,8 @@ "measurement": "pipeline_metrics", "orderByTime": "ASC", "policy": "default", - "query": "SELECT consumer_lag FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryValidator') AND $timeFilter", - "rawQuery": true, + "query": "SELECT sum(\"consumer_lag\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryExtractor') AND $timeFilter", + "rawQuery": false, "refId": "A", "resultFormat": "time_series", "select": [ @@ -1046,19 +1228,7 @@ }, { "params": [], - "type": "mean" - } - ], - [ - { - "params": [ - "consumer_lag" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" + "type": "sum" } ] ], @@ -1066,75 +1236,405 @@ { "key": "job_name", "operator": "=", - "value": "TelemetryValidator" + "value": "DeviceProfileUpdater" } ] } ], - "thresholds": [], + "thresholds": "", "timeFrom": null, - "timeRegions": [], "timeShift": null, - "title": "TelemetryValidator lag", - "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 - }, + "title": "Device Profile Updater", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "op": "=", + "text": "N/A", + "value": "null" } ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "schemaVersion": 18, - "style": "dark", - "tags": [], - "templating": { - "list": [] - }, - "time": { - "from": "now-6h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 12, + "y": 14 + }, + "id": 18, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"consumer_lag\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryExtractor') AND $timeFilter", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "consumer_lag" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "UserCacheUpdater" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "User Cache Updater", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 18, + "y": 14 + }, + "id": 19, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"consumer_lag\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryExtractor') AND $timeFilter", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "consumer_lag" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "SHARE_EVENTS_FLATTENER" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Share Event Flattener", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 20 + }, + "id": 20, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"consumer_lag\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryExtractor') AND $timeFilter", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "consumer_lag" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryRedacter" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Telemetry Redacter", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + } + ], + "refresh": "5m", + "schemaVersion": 21, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-5m", + "to": "now" + }, + "timepicker": { + "hidden": false, + "refresh_intervals": [ + "5m" ], "time_options": [ "5m", @@ -1149,7 +1649,7 @@ ] }, "timezone": "", - "title": "DP Jobs Consumer lag", - "uid": "m2w63y7Wk", - "version": 6 -} \ No newline at end of file + "title": "Data Pipeline Current Lag Metrics", + "uid": "A5dxWzeZj", + "version": 7 +} diff --git a/kubernetes/helm_charts/monitoring/dashboards/dashboards/data-pipeline-metrics.json b/kubernetes/helm_charts/monitoring/dashboards/dashboards/data-pipeline-metrics.json new file mode 100644 index 000000000..97b946283 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/dashboards/dashboards/data-pipeline-metrics.json @@ -0,0 +1,6944 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": 65, + "links": [], + "panels": [ + { + "collapsed": true, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 82, + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 1 + }, + "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, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"batch-success\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryExtractor') AND $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "success" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryExtractor" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Extractor success", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#C4162A" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 1 + }, + "id": 14, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"batch-error\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryExtractor') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "batch-error" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryExtractor" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Extractor failed", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "#FF9830", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 1 + }, + "id": 56, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "duplicate" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryExtractor" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Extractor Duplicates", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 1 + }, + "id": 59, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"batch-error\") / (sum(\"batch-success\") + sum(\"batch-error\") + sum(\"skipped\") + sum(\"duplicate\")) * 100 FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryExtractor') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "error" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryExtractor" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Extractor failed Percentage", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB_Datapipeline", + "fill": 10, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 5 + }, + "hiddenSeries": false, + "id": 98, + "interval": ">300s", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [ + { + "title": "", + "url": "" + } + ] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "success" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "success" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "failed" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "failed" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "duplicate" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "duplicate" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryExtractor" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Telemetry Extractor", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB_Datapipeline", + "fill": 1, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 5 + }, + "hiddenSeries": false, + "id": 99, + "interval": ">300s", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [ + { + "title": "", + "url": "" + } + ] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"consumer_lag\") AS \"lag\" FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryExtractor') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "consumer_lag" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "lag" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryExtractor" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Telemetry Extractor Lag", + "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 + } + } + ], + "title": "Extractor Job", + "type": "row" + }, + { + "collapsed": true, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 80, + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 2 + }, + "id": 16, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"success\") + sum(\"failed\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryValidator') AND $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "success" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryValidator" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Raw Events", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(145, 23, 23, 0.9)" + ], + "datasource": "InfluxDB_Datapipeline", + "editable": true, + "error": false, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 2 + }, + "id": 64, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"duplicate\") FROM \"pipeline_metrics\" WHERE \"job_name\" = 'DeDuplication' AND $timeFilter", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "success" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryValidator" + } + ] + } + ], + "thresholds": "", + "title": "Valid Events", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#C4162A", + "rgba(40, 237, 42, 0.89)", + "rgba(23, 226, 15, 0.97)" + ], + "datasource": "InfluxDB_Datapipeline", + "editable": true, + "error": false, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 2 + }, + "id": 1, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"failed\") FROM \"pipeline_metrics\" WHERE \"job_name\" = 'TelemetryValidator' AND $timeFilter", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "failed" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryValidator" + } + ] + } + ], + "thresholds": "", + "title": "Invalid Events", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#C4162A", + "rgba(40, 237, 42, 0.89)", + "rgba(23, 226, 15, 0.97)" + ], + "datasource": "InfluxDB_Datapipeline", + "error": true, + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 2 + }, + "id": 65, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"failed\") / (sum(\"success\") + sum(\"failed\")) * 100 FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryValidator') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "error" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryExtractor" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Invalid Events %", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB_Datapipeline", + "fill": 10, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 6 + }, + "hiddenSeries": false, + "id": 97, + "interval": ">300s", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [ + { + "title": "", + "url": "" + } + ] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "success" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "success" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "failed" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "failed" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryValidator" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Telemetry Validator", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB_Datapipeline", + "fill": 1, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 6 + }, + "hiddenSeries": false, + "id": 96, + "interval": ">300s", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [ + { + "title": "", + "url": "" + } + ] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "consumer_lag" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "lag" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryValidator" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Telemetry Validator Lag", + "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 + } + } + ], + "title": "Telemetry Validator Job", + "type": "row" + }, + { + "collapsed": true, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 2 + }, + "id": 78, + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "rgba(31, 195, 25, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(145, 23, 23, 0.9)" + ], + "datasource": "InfluxDB_Datapipeline", + "editable": true, + "error": false, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 3 + }, + "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, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(11, 127, 221, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"success\") FROM \"pipeline_metrics\" WHERE \"job_name\" = 'DeDuplication' AND $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "thresholds": "", + "title": "Unique Events", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#C4162A", + "rgba(40, 237, 42, 0.89)", + "rgba(23, 226, 15, 0.97)" + ], + "datasource": "InfluxDB_Datapipeline", + "editable": true, + "error": false, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 3 + }, + "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, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"duplicate\") FROM \"pipeline_metrics\" WHERE \"job_name\" = 'DeDuplication' AND $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "thresholds": "", + "title": "Duplicate Events", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#C4162A", + "rgba(40, 237, 42, 0.89)", + "rgba(23, 226, 15, 0.97)" + ], + "datasource": "InfluxDB_Datapipeline", + "error": true, + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 3 + }, + "id": 67, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"duplicate\") / (sum(\"success\") + sum(\"duplicate\")) * 100 FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'DeDuplication') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "error" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryExtractor" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Duplicate Events %", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB_Datapipeline", + "fill": 10, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 7 + }, + "hiddenSeries": false, + "id": 100, + "interval": ">300s", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [ + { + "title": "", + "url": "" + } + ] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"success\") AS \"success\", sum(\"duplicate\") AS \"duplicate\" FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'DeDuplication') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "success" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "success" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "duplicate" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "duplicate" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "DeDuplication" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "De Duplication", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB_Datapipeline", + "fill": 10, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 7 + }, + "hiddenSeries": false, + "id": 101, + "interval": ">300s", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [ + { + "title": "", + "url": "" + } + ] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "consumer_lag" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "lag" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "DeDuplication" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "De Duplication Lag", + "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 + } + } + ], + "title": "Deduplication Job", + "type": "row" + }, + { + "collapsed": true, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 3 + }, + "id": 76, + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 4 + }, + "id": 21, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "hide": false, + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"primary-route-success\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryRouter') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "skipped" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryRouter" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Primary Route Success", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 4 + }, + "id": 58, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"secondary-route-success\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryRouter') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Secondary Route Success", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB_Datapipeline", + "fill": 10, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 8 + }, + "hiddenSeries": false, + "id": 102, + "interval": ">300s", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [ + { + "title": "", + "url": "" + } + ] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "primary-route-success" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "primary" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "secondary-route-success" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "secondary" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryRouter" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Telemetry Router", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB_Datapipeline", + "fill": 1, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 8 + }, + "hiddenSeries": false, + "id": 103, + "interval": ">300s", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [ + { + "title": "", + "url": "" + } + ] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "consumer_lag" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "lag" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryRouter" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Telemetry Router Lag", + "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 + } + } + ], + "title": "Telemetry Router", + "type": "row" + }, + { + "collapsed": true, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 4 + }, + "id": 74, + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 5 + }, + "id": 25, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"success\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryLocationUpdater') AND $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "success" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryLocationUpdater" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Location Updater Total", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 5 + }, + "id": 61, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"processed\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryLocationUpdater') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "processed" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryLocationUpdater" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Location Updater Processed", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 5 + }, + "id": 68, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"unprocessed\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryLocationUpdater') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "unprocessed" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryLocationUpdater" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Location Updater Unprocessed", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#C4162A", + "rgba(40, 237, 42, 0.89)", + "rgba(23, 226, 15, 0.97)" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 5 + }, + "id": 63, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"unprocessed\") / (sum(\"success\")) * 100 FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryLocationUpdater') AND $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "error" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryExtractor" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Location Updater Unprocessed %", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 9 + }, + "id": 84, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"success\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryLocationUpdater') AND $timeFilter", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "cache_hit" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryLocationUpdater" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Location Updater Cache Hit", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 9 + }, + "id": 85, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"success\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryLocationUpdater') AND $timeFilter", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "cache_miss" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryLocationUpdater" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Cache Miss", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 9 + }, + "id": 86, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"success\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryLocationUpdater') AND $timeFilter", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "cache_empty_values" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryLocationUpdater" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Cache Empty Values", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#C4162A", + "rgba(40, 237, 42, 0.89)", + "rgba(23, 226, 15, 0.97)" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 9 + }, + "id": 87, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT (sum(\"cache_miss\") + sum(\"cache_empty_values\")) / sum(\"processed\") * 100 FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryLocationUpdater') AND $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "error" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryExtractor" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Cache Miss %", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 13 + }, + "id": 89, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"success\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryLocationUpdater') AND $timeFilter", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "user_cache_hit" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryLocationUpdater" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Cache Hit - User Profile", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 13 + }, + "id": 90, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"success\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryLocationUpdater') AND $timeFilter", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "user_declared_location_hit" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryLocationUpdater" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Cache Hit - Declared Location", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 13 + }, + "id": 88, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"ip_location_hit\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryLocationUpdater') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "ip_location_hit" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryLocationUpdater" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Cache Hit - IP Location", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#C4162A", + "rgba(40, 237, 42, 0.89)", + "rgba(23, 226, 15, 0.97)" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 13 + }, + "id": 91, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"ip_location_hit\") / (sum(\"ip_location_hit\") + sum(\"user_declared_location_hit\") + sum(\"user_cache_hit\"))* 100 FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryLocationUpdater') AND $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "error" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryExtractor" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Resolve Location by IP %", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB_Datapipeline", + "fill": 10, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 17 + }, + "hiddenSeries": false, + "id": 105, + "interval": ">300s", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [ + { + "title": "", + "url": "" + } + ] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "processed" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "processed" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "unprocessed" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "unprocessed" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryLocationUpdater" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Location Updater Processed/Unprocessed", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB_Datapipeline", + "fill": 10, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 8, + "x": 8, + "y": 17 + }, + "hiddenSeries": false, + "id": 106, + "interval": ">300s", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [ + { + "title": "", + "url": "" + } + ] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"user_cache_hit\") AS \"user_profile\", sum(\"user_declared_location_hit\") AS \"user_declared\", sum(\"ip_location_hit\") AS \"ip_location\", sum(\"cache_miss\") AS \"empty\" FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryLocationUpdater') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "user_cache_hit" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "user_profile" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "user_declared_location_hit" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "user_declared" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "ip_location_hit" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "ip_location" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "cache_miss" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "empty" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryLocationUpdater" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Location Updater Cache Hits", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB_Datapipeline", + "fill": 10, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 17 + }, + "hiddenSeries": false, + "id": 104, + "interval": ">300s", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [ + { + "title": "", + "url": "" + } + ] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"consumer_lag\") AS \"lag\" FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'TelemetryLocationUpdater') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "consumer_lag" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "lag" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryLocationUpdater" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Location Updater Lag", + "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 + } + } + ], + "title": "Location Updater", + "type": "row" + }, + { + "collapsed": true, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 5 + }, + "id": 72, + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 6 + }, + "id": 30, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"success\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'DeNormalization') AND $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "success" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "DeNormalization" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Denorm Success", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 6 + }, + "id": 29, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"skipped\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'DeNormalization') AND $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "skipped" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "DeNormalization" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Denorm Skipped", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 6 + }, + "id": 28, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"expired_event\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'DeNormalization') AND $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "expired_event" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "DeNormalization" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Denorm Expired", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB_Datapipeline", + "fill": 10, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 10 + }, + "hiddenSeries": false, + "id": 107, + "interval": ">300s", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [ + { + "title": "", + "url": "" + } + ] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"success\") AS \"success\", sum(\"skipped\") AS \"skipped\", sum(\"expired_event\") AS \"expired\" FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'DeNormalization') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "success" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "success" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "skipped" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "skipped" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "expired_event" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "expired" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "DeNormalization" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "De Normalization", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB_Datapipeline", + "fill": 10, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 10 + }, + "hiddenSeries": false, + "id": 108, + "interval": ">300s", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [ + { + "title": "", + "url": "" + } + ] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"consumer_lag\") AS \"lag\" FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'DeNormalization') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "consumer_lag" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "lag" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "DeNormalization" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "De Normalization Lag", + "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 + } + } + ], + "title": "De-Normalization job", + "type": "row" + }, + { + "collapsed": true, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 6 + }, + "id": 70, + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 7 + }, + "id": 31, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"success\") + sum(\"failed\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'DruidEventsValidator') AND $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "success" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "DruidEventsValidator" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Druid Validator Total", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 7 + }, + "id": 92, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"success\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'DruidEventsValidator') AND $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "success" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "DruidEventsValidator" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Druid Validator Success", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 7 + }, + "id": 32, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"failed\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'DruidEventsValidator') AND $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "failed" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "DruidEventsValidator" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Druid Validator Failures", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#C4162A", + "rgba(40, 237, 42, 0.89)", + "rgba(23, 226, 15, 0.97)" + ], + "datasource": "InfluxDB_Datapipeline", + "error": true, + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 7 + }, + "id": 93, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"failed\") / (sum(\"success\") + sum(\"failed\")) * 100 FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'DruidEventsValidator') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "error" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryExtractor" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Invalid Events %", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 11 + }, + "id": 35, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"success\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'EventsRouter') AND $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "success" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "DruidEventsValidator" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Druid Router Success", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "InfluxDB_Datapipeline", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 11 + }, + "id": 36, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"duplicate\") FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'EventsRouter') AND $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "success" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "DruidEventsValidator" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Druid Router Duplicates", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#C4162A", + "rgba(40, 237, 42, 0.89)", + "rgba(23, 226, 15, 0.97)" + ], + "datasource": "InfluxDB_Datapipeline", + "error": true, + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 11 + }, + "id": 94, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"duplicate\") / (sum(\"success\") + sum(\"duplicate\")) * 100 FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'EventsRouter') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "error" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "TelemetryExtractor" + } + ] + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Duplicate Events %", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB_Datapipeline", + "fill": 10, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 15 + }, + "hiddenSeries": false, + "id": 110, + "interval": ">300s", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [ + { + "title": "", + "url": "" + } + ] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"success\") AS \"success\", sum(\"failed\") AS \"failed\" FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'DruidEventsValidator') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "success" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "success" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "failed" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "failed" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "DruidEventsValidator" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Druid Validator", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB_Datapipeline", + "fill": 10, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 15 + }, + "hiddenSeries": false, + "id": 109, + "interval": ">300s", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [ + { + "title": "", + "url": "" + } + ] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"consumer_lag\") AS \"lag\" FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'DruidEventsValidator') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "consumer_lag" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "lag" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "DruidEventsValidator" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Druid Validator Lag", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB_Datapipeline", + "fill": 10, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 23 + }, + "hiddenSeries": false, + "id": 111, + "interval": ">300s", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [ + { + "title": "", + "url": "" + } + ] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"success\") AS \"success\", sum(\"duplicate\") AS \"duplicate\" FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'EventsRouter') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "success" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "success" + ], + "type": "alias" + } + ], + [ + { + "params": [ + "duplicate" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "duplicate" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "EventsRouter" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Events Router", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB_Datapipeline", + "fill": 10, + "fillGradient": 10, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 23 + }, + "hiddenSeries": false, + "id": 112, + "interval": ">300s", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [ + { + "title": "", + "url": "" + } + ] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "pipeline_metrics", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"consumer_lag\") AS \"lag\" FROM \"pipeline_metrics\" WHERE (\"job_name\" = 'EventsRouter') AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "consumer_lag" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + }, + { + "params": [ + "lag" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "job_name", + "operator": "=", + "value": "EventsRouter" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Event Router Lag", + "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 + } + } + ], + "title": "Druid Validator and Events Router Job", + "type": "row" + } + ], + "refresh": "5m", + "schemaVersion": 21, + "style": "dark", + "tags": [ + "pipeline", + "home" + ], + "templating": { + "list": [] + }, + "time": { + "from": "now/d", + "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": "Data Pipeline Metrics", + "uid": "9rSknz6Zk", + "version": 15 +} From 5b780c27a9cdc9f98548b9642db8d73748215984 Mon Sep 17 00:00:00 2001 From: Keshav Prasad Date: Wed, 29 Apr 2020 01:29:11 +0530 Subject: [PATCH 2356/2894] fix: adding limits and updated charts (#1444) * fix: removed duplicate vars, added limts and reserves * fix: adding limits for nginx private and echo * fix: adding replica count * fix: typo in empty limits --- ansible/inventory/env/group_vars/all.yml | 68 ------------------ .../roles/stack-adminutil/defaults/main.yml | 2 + .../templates/stack-adminutil.yml | 2 + .../roles/stack-api-manager/defaults/main.yml | 4 ++ .../templates/stack-api-manager.yml | 5 +- ansible/roles/stack-badger/defaults/main.yml | 5 ++ .../roles/stack-badger/tasks/.user.yml.swp | Bin 12288 -> 0 bytes ansible/roles/stack-badger/tasks/main.yml | 2 +- ansible/roles/stack-logger/defaults/main.yml | 12 ++-- .../stack-logger/templates/stack-logger.yml | 10 ++- ansible/roles/stack-oauth/defaults/main.yml | 2 +- .../stack-proxy-private/defaults/main.yml | 8 ++- .../templates/stack-proxy.yml | 8 ++- ansible/roles/stack-proxy/defaults/main.yml | 6 +- .../stack-proxy/templates/stack-proxy.yml | 2 + ansible/roles/stack-sunbird/defaults/main.yml | 63 ++++++++-------- .../tasks/cert_registry_service.yml | 2 +- .../roles/stack-sunbird/tasks/enc_service.yml | 2 +- .../tasks/notification_service.yml | 2 +- .../stack-sunbird/tasks/telemetry_service.yml | 2 +- .../templates/stack_content_service.yml | 27 ------- .../stack-sunbird/templates/stack_player.yml | 9 +-- .../{apimanager_echo.yaml => deployment.yaml} | 14 ++-- .../helm_charts/core/apimanagerecho/values.j2 | 21 +++--- .../templates/deployment.yaml | 2 +- .../core/nginx-private-ingress/values.j2 | 8 +++ 26 files changed, 118 insertions(+), 170 deletions(-) delete mode 100644 ansible/roles/stack-badger/tasks/.user.yml.swp delete mode 100644 ansible/roles/stack-sunbird/templates/stack_content_service.yml rename kubernetes/helm_charts/core/apimanagerecho/templates/{apimanager_echo.yaml => deployment.yaml} (63%) diff --git a/ansible/inventory/env/group_vars/all.yml b/ansible/inventory/env/group_vars/all.yml index 463b83996..881cbb1df 100644 --- a/ansible/inventory/env/group_vars/all.yml +++ b/ansible/inventory/env/group_vars/all.yml @@ -501,74 +501,6 @@ sunbird_otp_expiration: 1800 sunbird_otp_length: 6 sunbird_help_link_visibility: FALSE - - -#Container Limits -proxy_replicas: 1 -proxy_reservation_memory: 64M -proxy_limit_memory: 128M -kong_replicas: 1 -kong_reservation_memory: 64M -kong_limit_memory: 256M -echo_service_replicas: 1 -echo_service_reservation_memory: 8M -echo_service_limit_memory: 16M -adminutil_replicas: 1 -adminutil_reservation_memory: 300M -adminutil_limit_memory: 300M -learner_limit_cpu: 1 -learner_replicas: 1 -learner_reservation_memory: 1000M -learner_limit_memory: 1000M -logger_logstash_heap_size: 512M -logger_logstash_replicas: 1 -logger_logstash_reservation_memory: 512M -logger_logstash_limit_memory: 750M -logger_kibana_reservation_memory: 750M -logger_kibana_limit_memory: 750M -logger_logspout_reservation_memory: 200M -logger_logspout_limit_memory: 200M -logger_oauth_reservation_memory: 32M -logger_oauth_limit_memory: 32M -prometheus_reservation_memory: 1G -prometheus_limit_memory: 1G -alertmanager_reservation_memory: 100M -alertmanager_limit_memory: 100M -node_exporter_reservation_memory: 16M -node_exporter_limit_memory: 32M -cadvisor_reservation_memory: 100M -cadvisor_limit_memory: 100M -elasticsearch_exporter_reservation_memory: 8M -elasticsearch_exporter_limit_memory: 24M -postgres_exporter_reservation_memory: 16M -postgres_exporter_limit_memory: 32M -statsd_exporter_reservation_memory: 8M -statsd_exporter_limit_memory: 16M -blackbox_exporter_reservation_memory: 16M -blackbox_exporter_limit_memory: 32M -jsonpath_exporter_reservation_memory: 32M -jsonpath_exporter_limit_memory: 64M -azure_blob_exporter_reservation_memory: 16M -azure_blob_exporter_limit_memory: 64M -grafana_reservation_memory: 100M -grafana_limit_memory: 100M -monitor_logstash_replicas: 1 -monitor_logstash_heap_size: 256m -monitor_logstash_reservation_memory: 256M -monitor_logstash_limit_memory: 350M -monitor_logspout_reservation_memory: 150M -monitor_logspout_limit_memory: 150M -player_replicas: 1 -player_reservation_memory: 256M -player_limit_memory: 512M -content_replicas: 1 -content_reservation_memory: 1000M -content_limit_memory: 1000M -badger_replicas: 1 -badger_reservation_memory: 500MB -badger_limit_memory: 500MB - - # not required sunbird_image_storage_url: "https://{{azure_account_name}}.blob.core.windows.net/dial/" vault_auth_key: "{{core_vault_auth_key}}" diff --git a/ansible/roles/stack-adminutil/defaults/main.yml b/ansible/roles/stack-adminutil/defaults/main.yml index a0f0d3126..6991c16cf 100644 --- a/ansible/roles/stack-adminutil/defaults/main.yml +++ b/ansible/roles/stack-adminutil/defaults/main.yml @@ -1,5 +1,7 @@ --- adminutil_replicas: 1 +adminutil_reserve_cpu: 0.2 +adminutil_limit_cpu: 0.5 adminutil_reservation_memory: 512M adminutil_limit_memory: 1024M diff --git a/ansible/roles/stack-adminutil/templates/stack-adminutil.yml b/ansible/roles/stack-adminutil/templates/stack-adminutil.yml index efc505215..8b38da7e7 100644 --- a/ansible/roles/stack-adminutil/templates/stack-adminutil.yml +++ b/ansible/roles/stack-adminutil/templates/stack-adminutil.yml @@ -21,8 +21,10 @@ services: replicas: {{ adminutil_replicas }} resources: reservations: + cpus: "{{ adminutil_reserve_cpu }}" memory: "{{ adminutil_reservation_memory }}" limits: + cpus: "{{ adminutil_limit_cpu }}" memory: "{{ adminutil_limit_memory }}" update_config: parallelism: 1 diff --git a/ansible/roles/stack-api-manager/defaults/main.yml b/ansible/roles/stack-api-manager/defaults/main.yml index 1cd336a2d..535c5f063 100644 --- a/ansible/roles/stack-api-manager/defaults/main.yml +++ b/ansible/roles/stack-api-manager/defaults/main.yml @@ -4,8 +4,12 @@ kong_ssl: true kong_replicas: 1 kong_reservation_memory: 64M kong_limit_memory: 256M +kong_reserve_cpu: 0.3 +kong_limit_cpu: 1 echo_service_replicas: 1 echo_service_reservation_memory: 8M echo_service_limit_memory: 16M +echo_service_reserve_cpu: 0.1 +echo_service_limit_cpu: 0.2 kong_version: "{{kong_version}}" diff --git a/ansible/roles/stack-api-manager/templates/stack-api-manager.yml b/ansible/roles/stack-api-manager/templates/stack-api-manager.yml index a3c8cea04..301c7f500 100644 --- a/ansible/roles/stack-api-manager/templates/stack-api-manager.yml +++ b/ansible/roles/stack-api-manager/templates/stack-api-manager.yml @@ -14,10 +14,11 @@ services: replicas: {{ kong_replicas }} resources: reservations: + cpus: "{{ kong_reserve_cpu }}" memory: "{{ kong_reservation_memory }}" limits: memory: "{{ kong_limit_memory }}" - cpus: "{{ kong_limit_cpu | default('1') }}" + cpus: "{{ kong_limit_cpu }}" update_config: parallelism: 1 delay: 30s @@ -33,8 +34,10 @@ services: resources: reservations: memory: "{{ echo_service_reservation_memory }}" + cpus: "{{ echo_service_reserve_cpu }}" limits: memory: "{{ echo_service_limit_memory }}" + cpus: "{{ echo_service_limit_cpu }}" update_config: parallelism: 1 delay: 5s diff --git a/ansible/roles/stack-badger/defaults/main.yml b/ansible/roles/stack-badger/defaults/main.yml index 1e5632417..5f31d0e32 100644 --- a/ansible/roles/stack-badger/defaults/main.yml +++ b/ansible/roles/stack-badger/defaults/main.yml @@ -1 +1,6 @@ badger_admin_user: admin +badger_replicas: 1 +badger_reservation_memory: 300MB +badger_limit_memory: 500MB +badger_reserve_cpu: 0.1 +badger_limit_cpu: 0.5 diff --git a/ansible/roles/stack-badger/tasks/.user.yml.swp b/ansible/roles/stack-badger/tasks/.user.yml.swp deleted file mode 100644 index a5900099174a499850ce5d17806a36032e0bdd3a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI2F>f426vrni0fQ9^C?A(7M}+qF9Bdq|WF&+TiUcBx2}yyl=60Wb%k9mKW@ZT| zbMO&>Z$O1a2@RA`@DXTG(o@hvMZtge&USLxAR!u}x4QrCy_wya|NHHm;&d|_zH|Le z+8%5w9P3KCwL9#P$43L^ zmD}^|Y{)}vMzyap*N&RHJPs@V03+twgnHC)?rp=kH|lbdjdXRuK94#~Lf!`UgW0q> zWin|J0zzPgz?ypT>PELTFZQ0Jr!U-E>6cIl2mv7=1cZPP5CTF#2nc~knLu>s)F(*r z{4&YQ%j>z7>oSy!5D)@FKnMr{As_^VfDjM@LO=)z0U_`|B%mv$?mec|XOF`?{{KJv z{r|^PO8p3Z3%vrp0Ifskq2HfW>Nn^I=sV~u=u5~#8oC9&4E3RBp=Y39)|C1g3Xq3x zL)W2SpHS*PbPxI-`UcvCZbIA8*YNcP^f{C~ehSGU1cZPP5CTF#2nYcoAOs#60z}5{ zHTIyO=v!7qo)78}*%wr{zClA6bJHv$%I?sOw|3vA{y0Wgkjg_EN`u-n;B{2zRZoc2@e2+HsG{C=F52 z>l|Zk4k%4R-6ZP7VP(q+d*Tndq)X2)BNyl+I>7EV9XpKC9C_**9l5~wQ(xCV*zi2Hk!h;Sac$Bn=%zxI zwvj_Y8wj1obj5K2+(4KT+qcNe8jZ(%N@&Ei-!{z*XH%wRb(6BIxY08VG{koli?7qL zS5wrQSf}M>P3#64_>y*ZXmR85QatL#11m*Uo8Y*Nlb!rvP}I6lsv^d diff --git a/ansible/roles/stack-badger/tasks/main.yml b/ansible/roles/stack-badger/tasks/main.yml index 805018736..6ded090df 100644 --- a/ansible/roles/stack-badger/tasks/main.yml +++ b/ansible/roles/stack-badger/tasks/main.yml @@ -28,7 +28,7 @@ - name: Deploy badger service become: yes - shell: "docker service create --with-registry-auth --replicas {{ badger_replicas }} -p 8004:8004 --name badger-service --hostname badger-service --reserve-memory {{ badger_reservation_memory }} --limit-memory {{ badger_limit_memory }} --network application_default --config source=settings_local.py,target=/badger/code/apps/mainsite/settings_local.py,mode=0644 {{hub_org}}/{{image_name}}:{{image_tag}}" + shell: "docker service create --with-registry-auth --replicas {{ badger_replicas }} -p 8004:8004 --name badger-service --hostname badger-service --reserve-cpu {{ badger_reserve_cpu }} --limit-cpu {{ badger_limit_cpu }} --reserve-memory {{ badger_reservation_memory }} --limit-memory {{ badger_limit_memory }} --network application_default --config source=settings_local.py,target=/badger/code/apps/mainsite/settings_local.py,mode=0644 {{hub_org}}/{{image_name}}:{{image_tag}}" args: chdir: /home/deployer/stack diff --git a/ansible/roles/stack-logger/defaults/main.yml b/ansible/roles/stack-logger/defaults/main.yml index f21a32040..d9bef3e8d 100644 --- a/ansible/roles/stack-logger/defaults/main.yml +++ b/ansible/roles/stack-logger/defaults/main.yml @@ -1,9 +1,11 @@ # Please change memory requirements if heap_size is changed logger_logstash_heap_size: 512M -logger_logstash_replicas: 2 logger_logstash_reservation_memory: 512M -logger_logstash_limit_memory: 750M +logger_logstash_limit_memory: 512M +logger_logstash_reservation_cpu: 0.2 +logger_logstash_limit_cpu: 0.5 + logger_logspout_reservation_memory: 75M -logger_logspout_limit_memory: 75M -logger_logstash_reservation_memory: 1024M -logger_logstash_limit_memory: 1024M +logger_logspout_limit_memory: 150M +logger_logspout_reservation_cpu: 0.1 +logger_logspout_limit_cpu: 0.2 diff --git a/ansible/roles/stack-logger/templates/stack-logger.yml b/ansible/roles/stack-logger/templates/stack-logger.yml index 29f1d77b8..1b3b51048 100644 --- a/ansible/roles/stack-logger/templates/stack-logger.yml +++ b/ansible/roles/stack-logger/templates/stack-logger.yml @@ -6,12 +6,14 @@ services: image: sunbird/logstash:6.2.3 command: /usr/share/logstash/bin/logstash -f /etc/logstash/conf.d/logstash.conf deploy: - replicas: {{ logger_logstash_replicas }} + mode: global resources: reservations: memory: "{{ logger_logstash_reservation_memory }}" + cpus: "{{ logger_logstash_reservation_cpu }}" limits: memory: "{{ logger_logstash_limit_memory }}" + cpus: "{{ logger_logstash_limit_cpu }}" environment: - LOGSPOUT=ignore - LS_HEAP_SIZE={{ logger_logstash_heap_size }} @@ -27,12 +29,14 @@ services: image: sunbird/logstash:2.4.1 command: logstash -f /conf/logstash.conf deploy: - replicas: {{ logger_logstash_replicas }} + mode: gloabl resources: reservations: memory: "{{ logger_logstash_reservation_memory }}" + cpus: "{{ logger_logspout_reservation_cpu }}" limits: memory: "{{ logger_logstash_limit_memory }}" + cpus: "{{ logger_logspout_limit_cpu }}" environment: - LOGSPOUT=ignore - LS_HEAP_SIZE={{ logger_logstash_heap_size }} @@ -54,8 +58,10 @@ services: resources: reservations: memory: "{{ logger_logspout_reservation_memory }}" + cpus: "{{ logger_logspout_reservation_cpu }}" limits: memory: "{{ logger_logspout_limit_memory }}" + cpus: "{{ logger_logspout_limit_cpu }}" environment: - SYSLOG_FORMAT=rfc3164 - INACTIVITY_TIMEOUT=1m diff --git a/ansible/roles/stack-oauth/defaults/main.yml b/ansible/roles/stack-oauth/defaults/main.yml index cccc522e0..f4a607436 100644 --- a/ansible/roles/stack-oauth/defaults/main.yml +++ b/ansible/roles/stack-oauth/defaults/main.yml @@ -7,4 +7,4 @@ logger_oauth_limit_memory: 32M kibana_oauth_authenticated_email_domains: [] kibana_oauth_authenticated_email_ids: [] -swarm_agent_for_proxy: "{{groups['swarm-worker'][0]}}" \ No newline at end of file +swarm_agent_for_proxy: "{{groups['swarm-worker'][0]}}" diff --git a/ansible/roles/stack-proxy-private/defaults/main.yml b/ansible/roles/stack-proxy-private/defaults/main.yml index f71f4ddcb..92107bf47 100644 --- a/ansible/roles/stack-proxy-private/defaults/main.yml +++ b/ansible/roles/stack-proxy-private/defaults/main.yml @@ -1,9 +1,11 @@ --- hub_org: sunbird nginx_per_ip_connection_limit: 400 -proxy_replicas: 1 -proxy_reservation_memory: 32M -proxy_limit_memory: 64M +private_proxy_replicas: 1 +private_proxy_reservation_memory: 64M +private_proxy_limit_memory: 128M +private_proxy_reserve_cpu: 0.1 +private_proxy_limit_cpu: 0.3 nginx_per_ip_connection_limit: 400 merge_proxy_server_name: proxy_prometheus: false diff --git a/ansible/roles/stack-proxy-private/templates/stack-proxy.yml b/ansible/roles/stack-proxy-private/templates/stack-proxy.yml index 722328713..15055e285 100644 --- a/ansible/roles/stack-proxy-private/templates/stack-proxy.yml +++ b/ansible/roles/stack-proxy-private/templates/stack-proxy.yml @@ -7,12 +7,14 @@ services: ports: - "31480:80" deploy: - replicas: 1 + replicas: "{{ private_proxy_replicas }}" resources: reservations: - memory: "{{ proxy_reservation_memory }}" + memory: "{{ private_proxy_reservation_memory }}" + cpus: "{{ private_proxy_reserve_cpu }}" limits: - memory: "{{ proxy_limit_memory }}" + memory: "{{ private_proxy_limit_memory }}" + cpus: "{{ private_proxy_reserve_cpu }}" update_config: parallelism: 1 delay: 30s diff --git a/ansible/roles/stack-proxy/defaults/main.yml b/ansible/roles/stack-proxy/defaults/main.yml index 6d1b90f6e..b45be5308 100644 --- a/ansible/roles/stack-proxy/defaults/main.yml +++ b/ansible/roles/stack-proxy/defaults/main.yml @@ -2,8 +2,10 @@ hub_org: sunbird nginx_per_ip_connection_limit: 400 proxy_replicas: 1 -proxy_reservation_memory: 32M -proxy_limit_memory: 64M +proxy_reservation_memory: 64M +proxy_limit_memory: 128M +proxy_reserve_cpu: 0.1 +proxy_limit_cpu: 0.3 nginx_per_ip_connection_limit: 400 merge_proxy_server_name: proxy_prometheus: false diff --git a/ansible/roles/stack-proxy/templates/stack-proxy.yml b/ansible/roles/stack-proxy/templates/stack-proxy.yml index d7c111d82..b13154fd0 100644 --- a/ansible/roles/stack-proxy/templates/stack-proxy.yml +++ b/ansible/roles/stack-proxy/templates/stack-proxy.yml @@ -18,8 +18,10 @@ services: resources: reservations: memory: "{{ proxy_reservation_memory }}" + cpus: "{{ proxy_reserve_cpu }}" limits: memory: "{{ proxy_limit_memory }}" + cpus: "{{ proxy_limit_cpu }}" update_config: parallelism: 1 delay: 30s diff --git a/ansible/roles/stack-sunbird/defaults/main.yml b/ansible/roles/stack-sunbird/defaults/main.yml index 82b8a5285..bf0cedf3e 100644 --- a/ansible/roles/stack-sunbird/defaults/main.yml +++ b/ansible/roles/stack-sunbird/defaults/main.yml @@ -17,9 +17,10 @@ actor_reservation_memory: 768M actor_limit_memory: 1024M learner_replicas: 1 -learner_reservation_memory: 256M -learner_limit_memory: 512M -learner_reservation_cpu: 0 +learner_reservation_memory: 512M +learner_limit_memory: 1024M +learner_reservation_cpu: 0.2 +learner_limit_cpu: 1 learner_java_mem_limit: '-Xmx600m' #Config Service Vars @@ -33,6 +34,8 @@ config_reservation_cpu: 0 notification_replicas: 1 notification_limit_memory: 500MB notification_limit_cpu: 1 +notification_reserve_memory: 300MB +notification_reserve_cpu: 0.1 #Report service vars report_replicas: 1 @@ -40,6 +43,12 @@ report_reservation_memory: 300M report_limit_memory: 500M report_limit_cpu: 1 +player_replicas: 1 +player_reservation_memory: 128M +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 sunbird_learner_service_base_url: http://kong:8000/ @@ -47,17 +56,12 @@ sunbird_learner_service_base_url: http://kong:8000/ telemetry_replicas: 1 telemetry_reservation_memory: 300M telemetry_limit_memory: 300M +telemetry_reservation_cpu: 0.1 telemetry_limit_cpu: 1 sunbird_telemetry_kafka_servers: "{{groups['kafka']|join(':9092,')}}:9092" sunbird_data_pipeline_kafka_servers: "{{groups['processing-cluster-kafka']|join(':9092,')}}:9092" -player_replicas: 1 -player_reservation_memory: 64M -player_limit_memory: 256M sunbird_build_number: -content_replicas: 1 -content_reservation_memory: 64M -content_limit_memory: 256M keycloak_auth_server_url: "{{proto}}://{{proxy_server_name}}/auth" keycloak_realm: sunbird sunbird_web_url: "{{proto}}://{{proxy_server_name}}" @@ -86,8 +90,6 @@ telemetry_logstash_reservation_memory: 1g telemetry_logstash_limit_memory: 2g sunbird_telemetry_api: sunbird_enable_signup: -content_limit_cpu: 1 -content_reservation_cpu: 0 user_org_replicas: 1 user_org_reservation_memory: 750MB @@ -99,23 +101,24 @@ cert_replicas: 1 cert_reservation_memory: 500MB cert_limit_memory: 550MB cert_limit_cpu: 1 -cert_reservation_cpu: 0 +cert_reservation_cpu: 0.1 cert_registry_replicas: 1 -cert_registry_limit_memory: 500MB -cert_registry_limit_cpu: 1 +cert_registry_limit_memory: 512MB +cert_registry_limit_cpu: 0.5 +cert_registry_reserve_cpu: 256MB +cert_registry_reserve_memory: 0.1 # Encryption service vars enc_replicas: 1 -enc_reservation_memory: 750MB -enc_limit_memory: 800MB -enc_limit_cpu: 1 -enc_reservation_cpu: 0 +enc_reservation_memory: 300MB +enc_limit_memory: 500MB +enc_limit_cpu: 0.5 +enc_reservation_cpu: 0.1 postgres_port: 5432 enc_dialect: postgres enc_entry_passwod: password - telemetry_service_threads: telemetry_local_storage_enabled: telemetry_local_storage_type: @@ -147,16 +150,16 @@ itext_license_enabled: false # Knowledge MW Service Config knowledge_mw_service_replicas: 1 -knowledge_mw_service_reservation_memory: 64M -knowledge_mw_service_limit_memory: 256M -knowledge_mw_service_reservation_cpu: 0 +knowledge_mw_service_reservation_memory: 200M +knowledge_mw_service_limit_memory: 1000M +knowledge_mw_service_reservation_cpu: 0.1 knowledge_mw_service_limit_cpu: 1 # Content Service Config content_service_replicas: 1 -content_service_reservation_memory: 1000M +content_service_reservation_memory: 600M content_service_limit_memory: 1000M -content_service_reservation_cpu: 0 +content_service_reservation_cpu: 0.1 content_service_limit_cpu: 1 content_java_mem_limit: '-Xmx600m' @@ -164,23 +167,23 @@ content_java_mem_limit: '-Xmx600m' assessment_service_replicas: 1 assessment_service_reservation_memory: 256M assessment_service_limit_memory: 512M -assessment_service_reservation_cpu: 0 +assessment_service_reservation_cpu: 0.1 assessment_service_limit_cpu: 1 # LMS Service Config lms_service_replicas: 1 lms_service_reservation_memory: 1000M lms_service_limit_memory: 1000M -lms_service_reservation_cpu: 0 +lms_service_reservation_cpu: 0.1 lms_service_limit_cpu: 1 lms_java_mem_limit: '-Xmx600m' # Print Service Config print_service_replicas: 1 -print_service_reservation_memory: 64M -print_service_limit_memory: 256M -print_service_reservation_cpu: 0 -print_service_limit_cpu: 1 +print_service_reservation_memory: 128M +print_service_limit_memory: 512M +print_service_reservation_cpu: 0.1 +print_service_limit_cpu: 0.5 ############################ kube vars ####################### hub_org: sunbird diff --git a/ansible/roles/stack-sunbird/tasks/cert_registry_service.yml b/ansible/roles/stack-sunbird/tasks/cert_registry_service.yml index d3b772133..950d1960a 100644 --- a/ansible/roles/stack-sunbird/tasks/cert_registry_service.yml +++ b/ansible/roles/stack-sunbird/tasks/cert_registry_service.yml @@ -4,4 +4,4 @@ ignore_errors: yes - name: Deploy cert registry service - shell: "docker service create --with-registry-auth --replicas {{ cert_registry_replicas }} -p 9013:9000 --name cert-registry-service --hostname cert-registry-service --limit-memory {{ cert_registry_limit_memory }} --limit-cpu {{ cert_registry_limit_cpu }} --health-cmd 'wget -qO- cert-registry-service:9000/service/health || exit 1' --health-timeout 3s --health-retries 3 --network application_default --env-file /home/deployer/env/sunbird_cert-registry-service.env {{hub_org}}/{{image_name}}:{{image_tag}}" + shell: "docker service create --with-registry-auth --replicas {{ cert_registry_replicas }} -p 9013:9000 --name cert-registry-service --hostname cert-registry-service --limit-memory {{ cert_registry_limit_memory }} --limit-cpu {{ cert_registry_limit_cpu }} --reserve-memory {{ cert_registry_reserve_memory }} --reserve-cpu {{ cert_registry_reserve_cpu }} --health-cmd 'wget -qO- cert-registry-service:9000/service/health || exit 1' --health-timeout 3s --health-retries 3 --network application_default --env-file /home/deployer/env/sunbird_cert-registry-service.env {{hub_org}}/{{image_name}}:{{image_tag}}" diff --git a/ansible/roles/stack-sunbird/tasks/enc_service.yml b/ansible/roles/stack-sunbird/tasks/enc_service.yml index 1ca814001..9012e9fb9 100644 --- a/ansible/roles/stack-sunbird/tasks/enc_service.yml +++ b/ansible/roles/stack-sunbird/tasks/enc_service.yml @@ -4,4 +4,4 @@ ignore_errors: yes - name: Deploy enc service - shell: "docker service create --with-registry-auth --replicas {{ enc_replicas }} -p 9010:8013 --name enc-service --hostname enc-service --limit-memory {{ enc_limit_memory }} --limit-cpu {{ enc_limit_cpu }} --health-cmd 'wget -qO- enc-service:8013/service/health || exit 1' --health-timeout 3s --health-retries 3 --network application_default --env-file /home/deployer/env/sunbird_enc-service.env {{hub_org}}/{{image_name}}:{{image_tag}}" + shell: "docker service create --with-registry-auth --replicas {{ enc_replicas }} -p 9010:8013 --name enc-service --hostname enc-service --limit-memory {{ enc_limit_memory }} --limit-cpu {{ enc_limit_cpu }} --reserve-cpu {{ enc_reservation_cpu }} --reserve-memory {{ enc_limit_cpu }} --health-cmd 'wget -qO- enc-service:8013/service/health || exit 1' --health-timeout 3s --health-retries 3 --network application_default --env-file /home/deployer/env/sunbird_enc-service.env {{hub_org}}/{{image_name}}:{{image_tag}}" diff --git a/ansible/roles/stack-sunbird/tasks/notification_service.yml b/ansible/roles/stack-sunbird/tasks/notification_service.yml index 22f3b42d5..fe69e6e41 100644 --- a/ansible/roles/stack-sunbird/tasks/notification_service.yml +++ b/ansible/roles/stack-sunbird/tasks/notification_service.yml @@ -4,4 +4,4 @@ ignore_errors: yes - name: Deploy notification service - shell: "docker service create --with-registry-auth --replicas {{ notification_replicas }} -p 9012:9000 --name notification-service --hostname notification-service --limit-memory {{ notification_limit_memory }} --limit-cpu {{ notification_limit_cpu }} --network application_default --env-file /home/deployer/env/sunbird_notification-service.env {{hub_org}}/{{image_name}}:{{image_tag}}" + shell: "docker service create --with-registry-auth --replicas {{ notification_replicas }} -p 9012:9000 --name notification-service --hostname notification-service --reserve-cpu {{ notification_reserve_cpu }} --reserve-memory {{ notification_reserve_memory }} --limit-memory {{ notification_limit_memory }} --limit-cpu {{ notification_limit_cpu }} --network application_default --env-file /home/deployer/env/sunbird_notification-service.env {{hub_org}}/{{image_name}}:{{image_tag}}" diff --git a/ansible/roles/stack-sunbird/tasks/telemetry_service.yml b/ansible/roles/stack-sunbird/tasks/telemetry_service.yml index 51c16d9d1..073b85f94 100644 --- a/ansible/roles/stack-sunbird/tasks/telemetry_service.yml +++ b/ansible/roles/stack-sunbird/tasks/telemetry_service.yml @@ -4,6 +4,6 @@ ignore_errors: yes - name: Deploy telemetry service - shell: "docker service create --replicas {{ telemetry_replicas }} -p 9001:9001 --name telemetry-service --hostname telemetry-service --reserve-memory {{ telemetry_reservation_memory }} --limit-memory {{ telemetry_limit_memory }} --limit-cpu {{ telemetry_limit_cpu }} --network application_default --env-file /home/deployer/env/sunbird_telemetry-service.env --with-registry-auth {{hub_org}}/{{image_name}}:{{image_tag}}" + shell: "docker service create --replicas {{ telemetry_replicas }} -p 9001:9001 --name telemetry-service --hostname telemetry-service --reserve-cpu {{ telemetry_reservation_cpu }} --reserve-memory {{ telemetry_reservation_memory }} --limit-memory {{ telemetry_limit_memory }} --limit-cpu {{ telemetry_limit_cpu }} --network application_default --env-file /home/deployer/env/sunbird_telemetry-service.env --with-registry-auth {{hub_org}}/{{image_name}}:{{image_tag}}" args: chdir: /home/deployer/stack diff --git a/ansible/roles/stack-sunbird/templates/stack_content_service.yml b/ansible/roles/stack-sunbird/templates/stack_content_service.yml deleted file mode 100644 index dff2a9c34..000000000 --- a/ansible/roles/stack-sunbird/templates/stack_content_service.yml +++ /dev/null @@ -1,27 +0,0 @@ -version: '3.1' - -services: - content_service: - image: "{{hub_org}}/{{image_name}}:{{image_tag}}" - deploy: - replicas: {{ content_replicas | default(1) }} - resources: - reservations: - memory: "{{ content_reservation_memory | default('64M') }}" - limits: - memory: "{{ content_limit_memory | default('256M') }}" - healthcheck: - test: curl -f http://localhost:5000/health || exit 1 - interval: 10s - timeout: 5s - retries: 5 - env_file: - /home/deployer/env/sunbird_content_service.env - ports: - - "5000:5000" - networks: - - application_default - -networks: - application_default: - external: true diff --git a/ansible/roles/stack-sunbird/templates/stack_player.yml b/ansible/roles/stack-sunbird/templates/stack_player.yml index 5a091234f..02722c0e4 100644 --- a/ansible/roles/stack-sunbird/templates/stack_player.yml +++ b/ansible/roles/stack-sunbird/templates/stack_player.yml @@ -4,13 +4,14 @@ services: player: image: "{{hub_org}}/{{image_name}}:{{image_tag}}" deploy: - replicas: {{ player_replicas | default(1) }} + replicas: {{ player_replicas }} resources: reservations: - memory: "{{ player_reservation_memory | default('64M') }}" + memory: "{{ player_reservation_memory }}" + cpus: "{{ player_reserve_cpu }}" limits: - memory: "{{ player_limit_memory | default('256M') }}" - cpus: "{{ player_limit_cpu | default('1') }}" + memory: "{{ player_limit_memory }}" + cpus: "{{ player_limit_cpu }}" volumes: - "{% if player_tenant_dir is defined and player_tenant_dir %}{{ player_tenant_dir }}:/home/sunbird/dist/tenant{% else %}/home/sunbird/dist/tenant{% endif %}" env_file: diff --git a/kubernetes/helm_charts/core/apimanagerecho/templates/apimanager_echo.yaml b/kubernetes/helm_charts/core/apimanagerecho/templates/deployment.yaml similarity index 63% rename from kubernetes/helm_charts/core/apimanagerecho/templates/apimanager_echo.yaml rename to kubernetes/helm_charts/core/apimanagerecho/templates/deployment.yaml index a25d987a5..e311d9a06 100644 --- a/kubernetes/helm_charts/core/apimanagerecho/templates/apimanager_echo.yaml +++ b/kubernetes/helm_charts/core/apimanagerecho/templates/deployment.yaml @@ -4,17 +4,17 @@ kind: Deployment metadata: name: {{ .Chart.Name }} namespace: {{ .Values.namespace }} + annotations: + reloader.stakater.com/auto: "true" spec: - replicas: {{ .Values.apimanagerecho.replicaCount }} + replicas: {{ .Values.replicaCount }} strategy: - type: {{ .Values.apimanagerecho.strategy.type }} + type: {{ .Values.strategy.type }} selector: matchLabels: app: {{ .Chart.Name }} template: metadata: - annotations: - readiness.status.sidecar.istio.io/applicationPorts: "" labels: app: {{ .Chart.Name }} spec: @@ -24,11 +24,11 @@ spec: {{- end }} containers: - name: {{ .Chart.Name }} - image: "{{ .Values.dockerhub }}/{{ .Values.apimanagerecho.repository }}:{{ .Values.apimanagerecho.image_tag }}" + image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" resources: {{ toYaml .Values.resources | indent 10 }} ports: - - containerPort: {{ .Values.apimanagerecho.network.port }} + - containerPort: {{ .Values.network.port }} --- apiVersion: v1 @@ -42,6 +42,6 @@ spec: ports: - name: http-{{ .Chart.Name }} protocol: TCP - port: {{ .Values.apimanagerecho.network.targetport }} + port: {{ .Values.network.targetport }} selector: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/apimanagerecho/values.j2 b/kubernetes/helm_charts/core/apimanagerecho/values.j2 index 8fa19a3dd..1bb0f30c5 100755 --- a/kubernetes/helm_charts/core/apimanagerecho/values.j2 +++ b/kubernetes/helm_charts/core/apimanagerecho/values.j2 @@ -4,19 +4,18 @@ namespace: {{ namespace }} imagepullsecrets: {{ imagepullsecrets }} dockerhub: {{ dockerhub }} -apimanagerecho: - replicaCount: {{apimanagerecho_replicacount|default(1)}} - repository: {{apimanagerecho_repository|default('echo-server')}} - image_tag: 1.5.0-gold - resources: +replicaCount: {{apimanagerecho_replicacount|default(1)}} +repository: {{apimanagerecho_repository|default('echo-server')}} +image_tag: 1.5.0-gold +resources: requests: cpu: {{api_managerecho_cpu_req|default('50m')}} memory: {{api_managerecho_mem_req|default('50Mi')}} limits: cpu: {{api_managerecho_cpu_limit|default('500m')}} - memory: {{api_managerecho_memory_limit|default('500Mi')}} - network: - port: 9595 - targetport: 9595 - strategy: - type: RollingUpdate + memory: {{api_managerecho_mem_limit|default('500Mi')}} +network: + port: 9595 + targetport: 9595 +strategy: + type: RollingUpdate diff --git a/kubernetes/helm_charts/core/nginx-private-ingress/templates/deployment.yaml b/kubernetes/helm_charts/core/nginx-private-ingress/templates/deployment.yaml index f94899cce..d8eca4e12 100644 --- a/kubernetes/helm_charts/core/nginx-private-ingress/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/nginx-private-ingress/templates/deployment.yaml @@ -4,7 +4,7 @@ metadata: name: nginx-private-ingress namespace: {{ .Values.namespace }} spec: - replicas: 1 + replicas: {{ .Values.replicaCount }} selector: matchLabels: app: nginx-private-ingress diff --git a/kubernetes/helm_charts/core/nginx-private-ingress/values.j2 b/kubernetes/helm_charts/core/nginx-private-ingress/values.j2 index 4edfe3039..3838f2e3d 100644 --- a/kubernetes/helm_charts/core/nginx-private-ingress/values.j2 +++ b/kubernetes/helm_charts/core/nginx-private-ingress/values.j2 @@ -1,4 +1,5 @@ namespace: {{ namespace }} +replicaCount: {{nginx_private_ingress_replicacount|default(1)}} nginx_private_ingress_type: {{ nginx_private_ingress_type | default('LoadBalancer') }} private_ingress_custom_annotations: {{ private_ingress_custom_annotations | d('false') | lower }} kube_dns_ip: {{kube_dns_ip}} @@ -7,3 +8,10 @@ private_ingress_annotation: {% if nginx_private_ingress_ip is defined %} nginx_private_ingress_ip: {{ nginx_private_ingress_ip }} {% endif %} +resources: + requests: + cpu: {{nginx_private_ingress_cpu_req | default('100m')}} + memory: {{nginx_private_ingress_mem_req | default('100Mi')}} + limits: + cpu: {{nginx_private_ingress_cpu_limit | default('500m')}} + memory: {{nginx_private_ingress_mem_limit | default('500Mi')}} From 2c556a5602c9f03cfeb038b5bf8e7e7733e5d19f Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Wed, 29 Apr 2020 01:32:02 +0530 Subject: [PATCH 2357/2894] fixing merge issue Signed-off-by: Rajesh Rajendran --- ansible/roles/stack-sunbird/defaults/main.yml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/ansible/roles/stack-sunbird/defaults/main.yml b/ansible/roles/stack-sunbird/defaults/main.yml index 305441860..398d7af95 100644 --- a/ansible/roles/stack-sunbird/defaults/main.yml +++ b/ansible/roles/stack-sunbird/defaults/main.yml @@ -269,12 +269,9 @@ service_env: - ../../../../ansible/roles/stack-sunbird/templates/taxonomy-service_application.conf - ../../../../ansible/roles/stack-sunbird/templates/taxonomy-service_logback.xml report: ../../../../ansible/roles/stack-sunbird/templates/sunbird_report-service.env -<<<<<<< HEAD -======= telemetrydplogstash: ../../../../ansible/roles/stack-sunbird/templates/telemetry-logstash-datapipeline.conf sunbird_portal_player_cdn_enabled: false ->>>>>>> origin/release-2.9.0 ########### stack-apimanager defaults vars ##### for kubernetes ######### kong_database: postgres @@ -534,8 +531,6 @@ telemetry_liveness_readiness: initialDelaySeconds: 30 periodSeconds: 30 timeoutSeconds: 10 -<<<<<<< HEAD -======= failureThreshold: 5 successThreshold: 2 livenessProbe: @@ -575,21 +570,14 @@ search_liveness_readiness: initialDelaySeconds: 30 periodSeconds: 10 timeoutSeconds: 5 ->>>>>>> origin/release-2.9.0 failureThreshold: 5 successThreshold: 2 livenessProbe: httpGet: path: /health -<<<<<<< HEAD - port: 9001 - initialDelaySeconds: 30 - periodSeconds: 30 -======= port: 9000 initialDelaySeconds: 60 periodSeconds: 10 ->>>>>>> origin/release-2.9.0 timeoutSeconds: 10 failureThreshold: 5 @@ -608,7 +596,6 @@ taxonomy_liveness_readiness: httpGet: path: /health port: 9000 -<<<<<<< HEAD initialDelaySeconds: 30 periodSeconds: 30 timeoutSeconds: 10 From b733b6b8168eca42e4bfe80b9df6915f5888a255 Mon Sep 17 00:00:00 2001 From: kaliraja <34502260+Kaali09@users.noreply.github.com> Date: Wed, 29 Apr 2020 07:35:10 +0530 Subject: [PATCH 2358/2894] Issue #0000: updated the logstash configuration (#1447) --- .../templates/telemetry-logstash-datapipeline.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ansible/roles/stack-sunbird/templates/telemetry-logstash-datapipeline.conf b/ansible/roles/stack-sunbird/templates/telemetry-logstash-datapipeline.conf index e2e035ad0..36ba5df9c 100644 --- a/ansible/roles/stack-sunbird/templates/telemetry-logstash-datapipeline.conf +++ b/ansible/roles/stack-sunbird/templates/telemetry-logstash-datapipeline.conf @@ -5,6 +5,8 @@ input { codec => "json" topics => ["{{sunbird_telemetry_kafka_topic}}"] retry_backoff_ms => 180000 + consumer_threads => 4 + max.poll.records => "100" max_partition_fetch_bytes => "5242880" } } From b59dd2ba71d4f3b588f2c81851629559dd2fad30 Mon Sep 17 00:00:00 2001 From: kaliraja <34502260+Kaali09@users.noreply.github.com> Date: Wed, 29 Apr 2020 09:05:37 +0530 Subject: [PATCH 2359/2894] Issue: #0000 updated the logstash chart (#1448) * Issue #0000: updated the logstash configuration --- ansible/roles/stack-sunbird/defaults/main.yml | 2 +- .../templates/telemetry-logstash-datapipeline.conf | 2 +- .../{telemetrydplogstash => telemetry-dp-logstash}/Chart.yaml | 0 .../templates/deployment.yaml | 0 .../{telemetrydplogstash => telemetry-dp-logstash}/values.j2 | 0 5 files changed, 2 insertions(+), 2 deletions(-) rename kubernetes/helm_charts/core/{telemetrydplogstash => telemetry-dp-logstash}/Chart.yaml (100%) rename kubernetes/helm_charts/core/{telemetrydplogstash => telemetry-dp-logstash}/templates/deployment.yaml (100%) rename kubernetes/helm_charts/core/{telemetrydplogstash => telemetry-dp-logstash}/values.j2 (100%) diff --git a/ansible/roles/stack-sunbird/defaults/main.yml b/ansible/roles/stack-sunbird/defaults/main.yml index cab2bd815..a0b8479c8 100644 --- a/ansible/roles/stack-sunbird/defaults/main.yml +++ b/ansible/roles/stack-sunbird/defaults/main.yml @@ -252,7 +252,7 @@ service_env: - ../../../../ansible/roles/stack-sunbird/templates/taxonomy-service_application.conf - ../../../../ansible/roles/stack-sunbird/templates/taxonomy-service_logback.xml report: ../../../../ansible/roles/stack-sunbird/templates/sunbird_report-service.env - telemetrydplogstash: ../../../../ansible/roles/stack-sunbird/templates/telemetry-logstash-datapipeline.conf + telemetry-dp-logstash: ../../../../ansible/roles/stack-sunbird/templates/telemetry-logstash-datapipeline.conf sunbird_portal_player_cdn_enabled: false diff --git a/ansible/roles/stack-sunbird/templates/telemetry-logstash-datapipeline.conf b/ansible/roles/stack-sunbird/templates/telemetry-logstash-datapipeline.conf index 36ba5df9c..3d9df7d5f 100644 --- a/ansible/roles/stack-sunbird/templates/telemetry-logstash-datapipeline.conf +++ b/ansible/roles/stack-sunbird/templates/telemetry-logstash-datapipeline.conf @@ -6,7 +6,7 @@ input { topics => ["{{sunbird_telemetry_kafka_topic}}"] retry_backoff_ms => 180000 consumer_threads => 4 - max.poll.records => "100" + max_poll_records => "100" max_partition_fetch_bytes => "5242880" } } diff --git a/kubernetes/helm_charts/core/telemetrydplogstash/Chart.yaml b/kubernetes/helm_charts/core/telemetry-dp-logstash/Chart.yaml similarity index 100% rename from kubernetes/helm_charts/core/telemetrydplogstash/Chart.yaml rename to kubernetes/helm_charts/core/telemetry-dp-logstash/Chart.yaml diff --git a/kubernetes/helm_charts/core/telemetrydplogstash/templates/deployment.yaml b/kubernetes/helm_charts/core/telemetry-dp-logstash/templates/deployment.yaml similarity index 100% rename from kubernetes/helm_charts/core/telemetrydplogstash/templates/deployment.yaml rename to kubernetes/helm_charts/core/telemetry-dp-logstash/templates/deployment.yaml diff --git a/kubernetes/helm_charts/core/telemetrydplogstash/values.j2 b/kubernetes/helm_charts/core/telemetry-dp-logstash/values.j2 similarity index 100% rename from kubernetes/helm_charts/core/telemetrydplogstash/values.j2 rename to kubernetes/helm_charts/core/telemetry-dp-logstash/values.j2 From a2443aafa1cd092653f49f676f7ac0fa5137f23a Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Wed, 29 Apr 2020 16:21:41 +0530 Subject: [PATCH 2360/2894] fix: adding reserve cpu for report service --- ansible/roles/stack-sunbird/defaults/main.yml | 1 + ansible/roles/stack-sunbird/tasks/report-service.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ansible/roles/stack-sunbird/defaults/main.yml b/ansible/roles/stack-sunbird/defaults/main.yml index bf0cedf3e..545ea09f8 100644 --- a/ansible/roles/stack-sunbird/defaults/main.yml +++ b/ansible/roles/stack-sunbird/defaults/main.yml @@ -40,6 +40,7 @@ notification_reserve_cpu: 0.1 #Report service vars report_replicas: 1 report_reservation_memory: 300M +report_reservation_cpu: 0.1 report_limit_memory: 500M report_limit_cpu: 1 diff --git a/ansible/roles/stack-sunbird/tasks/report-service.yml b/ansible/roles/stack-sunbird/tasks/report-service.yml index 83762eb8b..bd4397ae7 100644 --- a/ansible/roles/stack-sunbird/tasks/report-service.yml +++ b/ansible/roles/stack-sunbird/tasks/report-service.yml @@ -4,6 +4,6 @@ ignore_errors: yes - name: Deploy report service - shell: "docker service create --replicas {{ report_replicas }} -p 3030:3030 --name report-service --hostname report-service --reserve-memory {{ report_reservation_memory }} --limit-memory {{ report_limit_memory }} --limit-cpu {{ report_limit_cpu }} --network application_default --env-file /home/deployer/env/sunbird_report-service.env --with-registry-auth {{hub_org}}/{{image_name}}:{{image_tag}}" + shell: "docker service create --replicas {{ report_replicas }} -p 3030:3030 --name report-service --hostname report-service --reserve-memory {{ report_reservation_memory }} --reserve-cpu {{ report_reservation_cpu }} --limit-memory {{ report_limit_memory }} --limit-cpu {{ report_limit_cpu }} --network application_default --env-file /home/deployer/env/sunbird_report-service.env --with-registry-auth {{hub_org}}/{{image_name}}:{{image_tag}}" args: chdir: /home/deployer/stack From 6d998f1682b2141cfe397058eab4d1137f941e5e Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Wed, 29 Apr 2020 16:29:15 +0530 Subject: [PATCH 2361/2894] fix: updating variable name for tele logstash --- .../helm_charts/core/telemetrydplogstash/values.j2 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kubernetes/helm_charts/core/telemetrydplogstash/values.j2 b/kubernetes/helm_charts/core/telemetrydplogstash/values.j2 index 8287a3d65..6a611c5ef 100644 --- a/kubernetes/helm_charts/core/telemetrydplogstash/values.j2 +++ b/kubernetes/helm_charts/core/telemetrydplogstash/values.j2 @@ -4,16 +4,16 @@ namespace: {{ namespace }} imagepullsecrets: {{ imagepullsecrets }} dockerhub: sunbird -replicaCount: {{logstash_replicacount|default(1)}} -repository: 'logstash' +replicaCount: {{telemetry_logstash_replicacount|default(1)}} +repository: 'telemetry_logstash' image_tag: 5.6-alpine resources: requests: - cpu: {{logstash_cpu_req|default('100m')}} - memory: {{logstash_mem_req|default('100Mi')}} + cpu: {{telemetry_logstash_cpu_req|default('100m')}} + memory: {{telemetry_logstash_mem_req|default('100Mi')}} limits: - cpu: {{logstash_cpu_limit|default('1')}} - memory: {{logstash_mem_limit|default('1024Mi')}} + cpu: {{telemetry_logstash_cpu_limit|default('1')}} + memory: {{telemetry_logstash_mem_limit|default('1024Mi')}} network: port: 5044 targetport: 5044 From cd3532a19f29f763590f5c10b48aa49c2b4b6221 Mon Sep 17 00:00:00 2001 From: G33tha Date: Wed, 29 Apr 2020 18:06:56 +0530 Subject: [PATCH 2362/2894] chnaged sunbird_plugin_repo_api_base_url from search lb ip to kubernetes service --- ansible/inventory/env/group_vars/all.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/inventory/env/group_vars/all.yml b/ansible/inventory/env/group_vars/all.yml index 0b0efbb4f..902992c91 100644 --- a/ansible/inventory/env/group_vars/all.yml +++ b/ansible/inventory/env/group_vars/all.yml @@ -194,7 +194,7 @@ sunbird_content_repo_api_key: "{{ core_vault_sunbird_ekstep_api_key }}" sunbird_search_service_api_key: "{{ core_vault_sunbird_ekstep_api_key }}" sunbird_dial_repo_api_base_url: "{{sunbird_ekstep_api_base_url}}" sunbird_dial_repo_api_key: "{{ core_vault_sunbird_ekstep_api_key }}" -sunbird_plugin_repo_api_base_url: "http://{{searchservice_ip}}:9000" +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_ekstep_api_key }}" sunbird_content_service_api_base_url: "http://{{sunbird_swarm_manager_lb_ip}}:9002" From c6df371f17f64f87648fafb9e17ba55dd20373fa Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Wed, 29 Apr 2020 20:11:05 +0530 Subject: [PATCH 2363/2894] fix: updating helm chart with new variable --- .../helm_charts/core/telemetry-dp-logstash/values.j2 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kubernetes/helm_charts/core/telemetry-dp-logstash/values.j2 b/kubernetes/helm_charts/core/telemetry-dp-logstash/values.j2 index 8287a3d65..6a611c5ef 100644 --- a/kubernetes/helm_charts/core/telemetry-dp-logstash/values.j2 +++ b/kubernetes/helm_charts/core/telemetry-dp-logstash/values.j2 @@ -4,16 +4,16 @@ namespace: {{ namespace }} imagepullsecrets: {{ imagepullsecrets }} dockerhub: sunbird -replicaCount: {{logstash_replicacount|default(1)}} -repository: 'logstash' +replicaCount: {{telemetry_logstash_replicacount|default(1)}} +repository: 'telemetry_logstash' image_tag: 5.6-alpine resources: requests: - cpu: {{logstash_cpu_req|default('100m')}} - memory: {{logstash_mem_req|default('100Mi')}} + cpu: {{telemetry_logstash_cpu_req|default('100m')}} + memory: {{telemetry_logstash_mem_req|default('100Mi')}} limits: - cpu: {{logstash_cpu_limit|default('1')}} - memory: {{logstash_mem_limit|default('1024Mi')}} + cpu: {{telemetry_logstash_cpu_limit|default('1')}} + memory: {{telemetry_logstash_mem_limit|default('1024Mi')}} network: port: 5044 targetport: 5044 From 3bc30a3b84d29876a1af9fbf8fa703fce4505008 Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Wed, 29 Apr 2020 20:32:32 +0530 Subject: [PATCH 2364/2894] fix: braces typo --- .../core/nginx-private-ingress/templates/configmap.yaml | 1 - 1 file changed, 1 deletion(-) 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 61f3dec03..5e0f61e35 100644 --- a/kubernetes/helm_charts/core/nginx-private-ingress/templates/configmap.yaml +++ b/kubernetes/helm_charts/core/nginx-private-ingress/templates/configmap.yaml @@ -63,7 +63,6 @@ data: rewrite ^/report/(.*) /$1 break; proxy_pass http://report-service:3030; } - } } kind: ConfigMap metadata: From 0ec1bb7fc4eb35fed890e3254524a415c76decf7 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Wed, 29 Apr 2020 20:58:39 +0530 Subject: [PATCH 2365/2894] fix: statsd exporter installation (#1449) --- kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml b/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml index 0bea811bf..03552832c 100644 --- a/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml +++ b/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml @@ -9,6 +9,7 @@ monitoring_stack: - logger - blackbox-exporter - additional-scrape-configs + - statsd-exporter - alertrules - kafka-topic-exporter From 02ecc7bd8e460c5c56d5ec648004f75e4d870dfc Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Wed, 29 Apr 2020 21:55:59 +0530 Subject: [PATCH 2366/2894] fix: adding echo health --- ansible/roles/stack-sunbird/defaults/main.yml | 20 +++++++++++++++++++ .../apimanagerecho/templates/deployment.yaml | 6 ++++++ .../helm_charts/core/apimanagerecho/values.j2 | 2 ++ 3 files changed, 28 insertions(+) diff --git a/ansible/roles/stack-sunbird/defaults/main.yml b/ansible/roles/stack-sunbird/defaults/main.yml index 545ea09f8..d872bb35e 100644 --- a/ansible/roles/stack-sunbird/defaults/main.yml +++ b/ansible/roles/stack-sunbird/defaults/main.yml @@ -607,3 +607,23 @@ report_liveness_readiness: periodSeconds: 10 timeoutSeconds: 10 failureThreshold: 5 + +api_managerecho_liveness_readiness + healthcheck: true + readinessProbe: + httpGet: + path: /hello + port: 9595 + initialDelaySeconds: 30 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 5 + successThreshold: 1 + livenessProbe: + httpGet: + path: /hello + port: 9595 + initialDelaySeconds: 60 + periodSeconds: 10 + timeoutSeconds: 10 + failureThreshold: 5 diff --git a/kubernetes/helm_charts/core/apimanagerecho/templates/deployment.yaml b/kubernetes/helm_charts/core/apimanagerecho/templates/deployment.yaml index e311d9a06..b6bc5903c 100644 --- a/kubernetes/helm_charts/core/apimanagerecho/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/apimanagerecho/templates/deployment.yaml @@ -29,6 +29,12 @@ spec: {{ 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 }} --- apiVersion: v1 diff --git a/kubernetes/helm_charts/core/apimanagerecho/values.j2 b/kubernetes/helm_charts/core/apimanagerecho/values.j2 index 1bb0f30c5..7e1953927 100755 --- a/kubernetes/helm_charts/core/apimanagerecho/values.j2 +++ b/kubernetes/helm_charts/core/apimanagerecho/values.j2 @@ -19,3 +19,5 @@ network: targetport: 9595 strategy: type: RollingUpdate + +{{ api_managerecho_liveness_readiness | to_nice_yaml }} From 51022e42aae4f2881975bd768c8faf62e8a9044b Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Wed, 29 Apr 2020 22:00:52 +0530 Subject: [PATCH 2367/2894] fix: colon typo --- ansible/roles/stack-sunbird/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/stack-sunbird/defaults/main.yml b/ansible/roles/stack-sunbird/defaults/main.yml index d872bb35e..da26aa6f7 100644 --- a/ansible/roles/stack-sunbird/defaults/main.yml +++ b/ansible/roles/stack-sunbird/defaults/main.yml @@ -608,7 +608,7 @@ report_liveness_readiness: timeoutSeconds: 10 failureThreshold: 5 -api_managerecho_liveness_readiness +api_managerecho_liveness_readiness: healthcheck: true readinessProbe: httpGet: From fb86fa623582f1473018f0f8eaf8368d6eee7615 Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Wed, 29 Apr 2020 22:04:59 +0530 Subject: [PATCH 2368/2894] fix: moving readiness to helm deploy --- ansible/roles/stack-sunbird/defaults/main.yml | 20 ------------------- .../roles/helm-deploy/defaults/main.yml | 20 +++++++++++++++++++ 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/ansible/roles/stack-sunbird/defaults/main.yml b/ansible/roles/stack-sunbird/defaults/main.yml index da26aa6f7..545ea09f8 100644 --- a/ansible/roles/stack-sunbird/defaults/main.yml +++ b/ansible/roles/stack-sunbird/defaults/main.yml @@ -607,23 +607,3 @@ report_liveness_readiness: periodSeconds: 10 timeoutSeconds: 10 failureThreshold: 5 - -api_managerecho_liveness_readiness: - healthcheck: true - readinessProbe: - httpGet: - path: /hello - port: 9595 - initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 - failureThreshold: 5 - successThreshold: 1 - livenessProbe: - httpGet: - path: /hello - port: 9595 - initialDelaySeconds: 60 - periodSeconds: 10 - timeoutSeconds: 10 - failureThreshold: 5 diff --git a/kubernetes/ansible/roles/helm-deploy/defaults/main.yml b/kubernetes/ansible/roles/helm-deploy/defaults/main.yml index 27ce13dfa..8da3c47c5 100644 --- a/kubernetes/ansible/roles/helm-deploy/defaults/main.yml +++ b/kubernetes/ansible/roles/helm-deploy/defaults/main.yml @@ -56,3 +56,23 @@ adminutils_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 + +api_managerecho_liveness_readiness: + healthcheck: true + readinessProbe: + httpGet: + path: /hello + port: 9595 + initialDelaySeconds: 30 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 5 + successThreshold: 1 + livenessProbe: + httpGet: + path: /hello + port: 9595 + initialDelaySeconds: 60 + periodSeconds: 10 + timeoutSeconds: 10 + failureThreshold: 5 From e8360a7843546cfef68a7dccb511033ee79cea4b Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Wed, 29 Apr 2020 23:11:15 +0530 Subject: [PATCH 2369/2894] fix: statsd duplicate installation in monitoring ns --- kubernetes/ansible/roles/sunbird-monitoring/tasks/main.yml | 2 +- .../roles/sunbird-monitoring/templates/statsd-exporter.yaml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 kubernetes/ansible/roles/sunbird-monitoring/templates/statsd-exporter.yaml diff --git a/kubernetes/ansible/roles/sunbird-monitoring/tasks/main.yml b/kubernetes/ansible/roles/sunbird-monitoring/tasks/main.yml index 6957ab31e..83172fb90 100644 --- a/kubernetes/ansible/roles/sunbird-monitoring/tasks/main.yml +++ b/kubernetes/ansible/roles/sunbird-monitoring/tasks/main.yml @@ -16,6 +16,6 @@ - dashboards - name: Install statsd-exporter - shell: "helm upgrade --install --force --cleanup-on-fail statsd-exporter {{chart_path}}/statsd-exporter --namespace {{ namespace }} -f /tmp/statsd-exporter.yaml" + shell: "helm upgrade --install --force --cleanup-on-fail statsd-exporter {{chart_path}}/statsd-exporter --namespace {{ namespace }}" tags: - statsd-exporter diff --git a/kubernetes/ansible/roles/sunbird-monitoring/templates/statsd-exporter.yaml b/kubernetes/ansible/roles/sunbird-monitoring/templates/statsd-exporter.yaml deleted file mode 100644 index 5e8938716..000000000 --- a/kubernetes/ansible/roles/sunbird-monitoring/templates/statsd-exporter.yaml +++ /dev/null @@ -1 +0,0 @@ -namespace: {{ namespace }} From bd7a4b310fb2672ac403486d159c8a90828d646b Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Wed, 29 Apr 2020 23:11:15 +0530 Subject: [PATCH 2370/2894] fix: statsd duplicate installation in monitoring ns --- kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml b/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml index 03552832c..0bea811bf 100644 --- a/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml +++ b/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml @@ -9,7 +9,6 @@ monitoring_stack: - logger - blackbox-exporter - additional-scrape-configs - - statsd-exporter - alertrules - kafka-topic-exporter From 40d8b350d25adc90a366c957cf3f7b51ef16c99b Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Thu, 30 Apr 2020 00:57:28 +0530 Subject: [PATCH 2371/2894] fix: updating vars and health timeouts --- ansible/roles/stack-sunbird/tasks/assessment-service.yml | 2 +- ansible/roles/stack-sunbird/tasks/cert_registry_service.yml | 2 +- ansible/roles/stack-sunbird/tasks/cert_service.yml | 3 +-- ansible/roles/stack-sunbird/tasks/enc_service.yml | 2 +- ansible/roles/stack-sunbird/tasks/knowledge-mw-service.yml | 2 +- ansible/roles/stack-sunbird/tasks/learner_service.yml | 2 +- ansible/roles/stack-sunbird/tasks/lms_service.yml | 2 +- ansible/roles/stack-sunbird/tasks/print-service.yml | 2 +- ansible/roles/stack-sunbird/tasks/user_org_service.yml | 2 +- 9 files changed, 9 insertions(+), 10 deletions(-) diff --git a/ansible/roles/stack-sunbird/tasks/assessment-service.yml b/ansible/roles/stack-sunbird/tasks/assessment-service.yml index cff61bb13..26d1bd9a3 100644 --- a/ansible/roles/stack-sunbird/tasks/assessment-service.yml +++ b/ansible/roles/stack-sunbird/tasks/assessment-service.yml @@ -17,6 +17,6 @@ shell: "docker config create assessment-service.conf /home/deployer/config/assessment-service.conf" - name: Deploy assessment-service - shell: "docker service create --with-registry-auth --replicas {{ assessment_service_replicas }} -p 9003:9000 --name assessment-service --hostname assessment-service --reserve-memory {{ assessment_service_reservation_memory }} --limit-memory {{ assessment_service_limit_memory }} --limit-cpu {{ assessment_service_limit_cpu }} --reserve-cpu {{ assessment_service_reservation_cpu }} --health-cmd 'wget -qO- assessment-service:9000/health || exit 1' --health-timeout 3s --health-retries 3 --network application_default --config source=assessment-service.conf,target=/home/sunbird/assessment-service-1.0-SNAPSHOT/config/application.conf,mode=0644 {{hub_org}}/{{image_name}}:{{image_tag}}" + shell: "docker service create --with-registry-auth --replicas {{ assessment_service_replicas }} -p 9003:9000 --name assessment-service --hostname assessment-service --reserve-memory {{ assessment_service_reservation_memory }} --limit-memory {{ assessment_service_limit_memory }} --limit-cpu {{ assessment_service_limit_cpu }} --reserve-cpu {{ assessment_service_reservation_cpu }} --health-cmd 'wget -qO- assessment-service:9000/health || exit 1' --health-timeout 10s --health-retries 3 --network application_default --config source=assessment-service.conf,target=/home/sunbird/assessment-service-1.0-SNAPSHOT/config/application.conf,mode=0644 {{hub_org}}/{{image_name}}:{{image_tag}}" args: chdir: /home/deployer/stack diff --git a/ansible/roles/stack-sunbird/tasks/cert_registry_service.yml b/ansible/roles/stack-sunbird/tasks/cert_registry_service.yml index 950d1960a..90e466bca 100644 --- a/ansible/roles/stack-sunbird/tasks/cert_registry_service.yml +++ b/ansible/roles/stack-sunbird/tasks/cert_registry_service.yml @@ -4,4 +4,4 @@ ignore_errors: yes - name: Deploy cert registry service - shell: "docker service create --with-registry-auth --replicas {{ cert_registry_replicas }} -p 9013:9000 --name cert-registry-service --hostname cert-registry-service --limit-memory {{ cert_registry_limit_memory }} --limit-cpu {{ cert_registry_limit_cpu }} --reserve-memory {{ cert_registry_reserve_memory }} --reserve-cpu {{ cert_registry_reserve_cpu }} --health-cmd 'wget -qO- cert-registry-service:9000/service/health || exit 1' --health-timeout 3s --health-retries 3 --network application_default --env-file /home/deployer/env/sunbird_cert-registry-service.env {{hub_org}}/{{image_name}}:{{image_tag}}" + shell: "docker service create --with-registry-auth --replicas {{ cert_registry_replicas }} -p 9013:9000 --name cert-registry-service --hostname cert-registry-service --limit-memory {{ cert_registry_limit_memory }} --limit-cpu {{ cert_registry_limit_cpu }} --reserve-memory {{ cert_registry_reserve_memory }} --reserve-cpu {{ cert_registry_reserve_cpu }} --health-cmd 'wget -qO- cert-registry-service:9000/service/health || exit 1' --health-timeout 10s --health-retries 3 --network application_default --env-file /home/deployer/env/sunbird_cert-registry-service.env {{hub_org}}/{{image_name}}:{{image_tag}}" diff --git a/ansible/roles/stack-sunbird/tasks/cert_service.yml b/ansible/roles/stack-sunbird/tasks/cert_service.yml index f510b9ae6..b75d5abda 100644 --- a/ansible/roles/stack-sunbird/tasks/cert_service.yml +++ b/ansible/roles/stack-sunbird/tasks/cert_service.yml @@ -4,5 +4,4 @@ ignore_errors: yes - name: Deploy cert service - shell: "docker service create --with-registry-auth --replicas {{ cert_replicas }} -p 9011:9000 --name cert-service --hostname cert-service --limit-memory {{ cert_limit_memory }} --limit-cpu {{ cert_limit_cpu }} --health-cmd 'wget -qO- cert-service:9000/service/health || exit 1' --health-timeout 3s --health-retries 3 --network application_default --env-file /home/deployer/env/sunbird_cert-service.env {{hub_org}}/{{image_name}}:{{image_tag}}" - \ No newline at end of file + shell: "docker service create --with-registry-auth --replicas {{ cert_replicas }} -p 9011:9000 --name cert-service --hostname cert-service --limit-memory {{ cert_limit_memory }} --limit-cpu {{ cert_limit_cpu }} --reserve-memory {{ cert_reservation_memory }} --reserve-cpu {{ cert_reservation_cpu }} --health-cmd 'wget -qO- cert-service:9000/service/health || exit 1' --health-timeout 10s --health-retries 3 --network application_default --env-file /home/deployer/env/sunbird_cert-service.env {{hub_org}}/{{image_name}}:{{image_tag}}" diff --git a/ansible/roles/stack-sunbird/tasks/enc_service.yml b/ansible/roles/stack-sunbird/tasks/enc_service.yml index 9012e9fb9..dd34718c0 100644 --- a/ansible/roles/stack-sunbird/tasks/enc_service.yml +++ b/ansible/roles/stack-sunbird/tasks/enc_service.yml @@ -4,4 +4,4 @@ ignore_errors: yes - name: Deploy enc service - shell: "docker service create --with-registry-auth --replicas {{ enc_replicas }} -p 9010:8013 --name enc-service --hostname enc-service --limit-memory {{ enc_limit_memory }} --limit-cpu {{ enc_limit_cpu }} --reserve-cpu {{ enc_reservation_cpu }} --reserve-memory {{ enc_limit_cpu }} --health-cmd 'wget -qO- enc-service:8013/service/health || exit 1' --health-timeout 3s --health-retries 3 --network application_default --env-file /home/deployer/env/sunbird_enc-service.env {{hub_org}}/{{image_name}}:{{image_tag}}" + shell: "docker service create --with-registry-auth --replicas {{ enc_replicas }} -p 9010:8013 --name enc-service --hostname enc-service --limit-memory {{ enc_limit_memory }} --limit-cpu {{ enc_limit_cpu }} --reserve-cpu {{ enc_reservation_cpu }} --reserve-memory {{ enc_reservation_memory }} --health-cmd 'wget -qO- enc-service:8013/service/health || exit 1' --health-timeout 10s --health-retries 3 --network application_default --env-file /home/deployer/env/sunbird_enc-service.env {{hub_org}}/{{image_name}}:{{image_tag}}" diff --git a/ansible/roles/stack-sunbird/tasks/knowledge-mw-service.yml b/ansible/roles/stack-sunbird/tasks/knowledge-mw-service.yml index 9fd3e8aa3..26c0c8aa3 100644 --- a/ansible/roles/stack-sunbird/tasks/knowledge-mw-service.yml +++ b/ansible/roles/stack-sunbird/tasks/knowledge-mw-service.yml @@ -4,6 +4,6 @@ ignore_errors: yes - name: Deploy knowledge-mw service - shell: "docker service create --with-registry-auth --replicas {{ knowledge_mw_service_replicas }} -p 5000:5000 --name knowledge-mw-service --hostname knowledge-mw-service --reserve-memory {{ knowledge_mw_service_reservation_memory }} --limit-memory {{ knowledge_mw_service_limit_memory }} --limit-cpu {{ knowledge_mw_service_limit_cpu }} --reserve-cpu {{ knowledge_mw_service_reservation_cpu }} --health-cmd 'wget -qO- knowledge-mw-service:5000/service/health || exit 1' --health-timeout 3s --health-retries 3 --network application_default --env-file /home/deployer/env/sunbird_knowledge-mw-service.env {{hub_org}}/{{image_name}}:{{image_tag}}" + shell: "docker service create --with-registry-auth --replicas {{ knowledge_mw_service_replicas }} -p 5000:5000 --name knowledge-mw-service --hostname knowledge-mw-service --reserve-memory {{ knowledge_mw_service_reservation_memory }} --limit-memory {{ knowledge_mw_service_limit_memory }} --limit-cpu {{ knowledge_mw_service_limit_cpu }} --reserve-cpu {{ knowledge_mw_service_reservation_cpu }} --health-cmd 'wget -qO- knowledge-mw-service:5000/service/health || exit 1' --health-timeout 10s --health-retries 3 --network application_default --env-file /home/deployer/env/sunbird_knowledge-mw-service.env {{hub_org}}/{{image_name}}:{{image_tag}}" args: chdir: /home/deployer/stack diff --git a/ansible/roles/stack-sunbird/tasks/learner_service.yml b/ansible/roles/stack-sunbird/tasks/learner_service.yml index cd76cb5f9..cdb3ade7b 100644 --- a/ansible/roles/stack-sunbird/tasks/learner_service.yml +++ b/ansible/roles/stack-sunbird/tasks/learner_service.yml @@ -4,6 +4,6 @@ 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 3s --health-retries 3 --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}}" + 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 3 --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/lms_service.yml b/ansible/roles/stack-sunbird/tasks/lms_service.yml index 17cce16c0..cf52f39f6 100644 --- a/ansible/roles/stack-sunbird/tasks/lms_service.yml +++ b/ansible/roles/stack-sunbird/tasks/lms_service.yml @@ -4,6 +4,6 @@ ignore_errors: yes - name: Deploy lms service - shell: "docker service create --with-registry-auth --replicas {{ lms_service_replicas }} -p 9005:9000 --name lms-service --hostname lms-service --reserve-memory {{ lms_service_reservation_memory }} --limit-memory {{ lms_service_limit_memory }} --limit-cpu {{ lms_service_limit_cpu }} --reserve-cpu {{ lms_service_reservation_cpu }} --health-cmd 'wget -qO- lms-service:9000/service/health || exit 1' --health-timeout 3s --health-retries 3 --network application_default --env JAVA_OPTIONS={{ lms_java_mem_limit }} --env-file /home/deployer/env/sunbird_lms-service.env {{hub_org}}/{{image_name}}:{{image_tag}}" + shell: "docker service create --with-registry-auth --replicas {{ lms_service_replicas }} -p 9005:9000 --name lms-service --hostname lms-service --reserve-memory {{ lms_service_reservation_memory }} --limit-memory {{ lms_service_limit_memory }} --limit-cpu {{ lms_service_limit_cpu }} --reserve-cpu {{ lms_service_reservation_cpu }} --health-cmd 'wget -qO- lms-service:9000/service/health || exit 1' --health-timeout 10s --health-retries 3 --network application_default --env JAVA_OPTIONS={{ lms_java_mem_limit }} --env-file /home/deployer/env/sunbird_lms-service.env {{hub_org}}/{{image_name}}:{{image_tag}}" args: chdir: /home/deployer/stack diff --git a/ansible/roles/stack-sunbird/tasks/print-service.yml b/ansible/roles/stack-sunbird/tasks/print-service.yml index 55f0cedb6..781d85eb3 100644 --- a/ansible/roles/stack-sunbird/tasks/print-service.yml +++ b/ansible/roles/stack-sunbird/tasks/print-service.yml @@ -4,6 +4,6 @@ ignore_errors: yes - name: Deploy print service - shell: "docker service create --with-registry-auth --replicas {{ print_service_replicas }} -p 5001:5000 --name print-service --hostname print-service --reserve-memory {{ print_service_reservation_memory }} --limit-memory {{ print_service_limit_memory }} --limit-cpu {{ print_service_limit_cpu }} --reserve-cpu {{ print_service_reservation_cpu }} --health-cmd 'wget -qO- print-service:5000/health || exit 1' --health-timeout 3s --health-retries 3 --network application_default --env-file /home/deployer/env/sunbird_print-service.env {{hub_org}}/{{image_name}}:{{image_tag}}" + shell: "docker service create --with-registry-auth --replicas {{ print_service_replicas }} -p 5001:5000 --name print-service --hostname print-service --reserve-memory {{ print_service_reservation_memory }} --limit-memory {{ print_service_limit_memory }} --limit-cpu {{ print_service_limit_cpu }} --reserve-cpu {{ print_service_reservation_cpu }} --health-cmd 'wget -qO- print-service:5000/health || exit 1' --health-timeout 10s --health-retries 3 --network application_default --env-file /home/deployer/env/sunbird_print-service.env {{hub_org}}/{{image_name}}:{{image_tag}}" args: chdir: /home/deployer/stack diff --git a/ansible/roles/stack-sunbird/tasks/user_org_service.yml b/ansible/roles/stack-sunbird/tasks/user_org_service.yml index 24ab18ebe..3deddd7dc 100644 --- a/ansible/roles/stack-sunbird/tasks/user_org_service.yml +++ b/ansible/roles/stack-sunbird/tasks/user_org_service.yml @@ -4,4 +4,4 @@ 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 3s --health-retries 3 --network application_default --env-file /home/deployer/env/sunbird_user-org-service.env {{hub_org}}/{{image_name}}:{{image_tag}}" + 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 3 --network application_default --env-file /home/deployer/env/sunbird_user-org-service.env {{hub_org}}/{{image_name}}:{{image_tag}}" From f8e2ce1df65e7c493a10058970e975f5824d9cb6 Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Thu, 30 Apr 2020 00:58:34 +0530 Subject: [PATCH 2372/2894] fix: updating health retries --- ansible/roles/stack-proxy-private/templates/stack-proxy.yml | 2 +- ansible/roles/stack-sunbird/tasks/assessment-service.yml | 2 +- ansible/roles/stack-sunbird/tasks/cert_registry_service.yml | 2 +- ansible/roles/stack-sunbird/tasks/cert_service.yml | 2 +- ansible/roles/stack-sunbird/tasks/enc_service.yml | 2 +- ansible/roles/stack-sunbird/tasks/knowledge-mw-service.yml | 2 +- ansible/roles/stack-sunbird/tasks/learner_service.yml | 2 +- ansible/roles/stack-sunbird/tasks/lms_service.yml | 2 +- ansible/roles/stack-sunbird/tasks/print-service.yml | 2 +- ansible/roles/stack-sunbird/tasks/user_org_service.yml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ansible/roles/stack-proxy-private/templates/stack-proxy.yml b/ansible/roles/stack-proxy-private/templates/stack-proxy.yml index 15055e285..d95bc0226 100644 --- a/ansible/roles/stack-proxy-private/templates/stack-proxy.yml +++ b/ansible/roles/stack-proxy-private/templates/stack-proxy.yml @@ -14,7 +14,7 @@ services: cpus: "{{ private_proxy_reserve_cpu }}" limits: memory: "{{ private_proxy_limit_memory }}" - cpus: "{{ private_proxy_reserve_cpu }}" + cpus: "{{ private_proxy_limit_cpu }}" update_config: parallelism: 1 delay: 30s diff --git a/ansible/roles/stack-sunbird/tasks/assessment-service.yml b/ansible/roles/stack-sunbird/tasks/assessment-service.yml index 26d1bd9a3..f83528a52 100644 --- a/ansible/roles/stack-sunbird/tasks/assessment-service.yml +++ b/ansible/roles/stack-sunbird/tasks/assessment-service.yml @@ -17,6 +17,6 @@ shell: "docker config create assessment-service.conf /home/deployer/config/assessment-service.conf" - name: Deploy assessment-service - shell: "docker service create --with-registry-auth --replicas {{ assessment_service_replicas }} -p 9003:9000 --name assessment-service --hostname assessment-service --reserve-memory {{ assessment_service_reservation_memory }} --limit-memory {{ assessment_service_limit_memory }} --limit-cpu {{ assessment_service_limit_cpu }} --reserve-cpu {{ assessment_service_reservation_cpu }} --health-cmd 'wget -qO- assessment-service:9000/health || exit 1' --health-timeout 10s --health-retries 3 --network application_default --config source=assessment-service.conf,target=/home/sunbird/assessment-service-1.0-SNAPSHOT/config/application.conf,mode=0644 {{hub_org}}/{{image_name}}:{{image_tag}}" + shell: "docker service create --with-registry-auth --replicas {{ assessment_service_replicas }} -p 9003:9000 --name assessment-service --hostname assessment-service --reserve-memory {{ assessment_service_reservation_memory }} --limit-memory {{ assessment_service_limit_memory }} --limit-cpu {{ assessment_service_limit_cpu }} --reserve-cpu {{ assessment_service_reservation_cpu }} --health-cmd 'wget -qO- assessment-service:9000/health || exit 1' --health-timeout 10s --health-retries 5 --network application_default --config source=assessment-service.conf,target=/home/sunbird/assessment-service-1.0-SNAPSHOT/config/application.conf,mode=0644 {{hub_org}}/{{image_name}}:{{image_tag}}" args: chdir: /home/deployer/stack diff --git a/ansible/roles/stack-sunbird/tasks/cert_registry_service.yml b/ansible/roles/stack-sunbird/tasks/cert_registry_service.yml index 90e466bca..d23170bf2 100644 --- a/ansible/roles/stack-sunbird/tasks/cert_registry_service.yml +++ b/ansible/roles/stack-sunbird/tasks/cert_registry_service.yml @@ -4,4 +4,4 @@ ignore_errors: yes - name: Deploy cert registry service - shell: "docker service create --with-registry-auth --replicas {{ cert_registry_replicas }} -p 9013:9000 --name cert-registry-service --hostname cert-registry-service --limit-memory {{ cert_registry_limit_memory }} --limit-cpu {{ cert_registry_limit_cpu }} --reserve-memory {{ cert_registry_reserve_memory }} --reserve-cpu {{ cert_registry_reserve_cpu }} --health-cmd 'wget -qO- cert-registry-service:9000/service/health || exit 1' --health-timeout 10s --health-retries 3 --network application_default --env-file /home/deployer/env/sunbird_cert-registry-service.env {{hub_org}}/{{image_name}}:{{image_tag}}" + shell: "docker service create --with-registry-auth --replicas {{ cert_registry_replicas }} -p 9013:9000 --name cert-registry-service --hostname cert-registry-service --limit-memory {{ cert_registry_limit_memory }} --limit-cpu {{ cert_registry_limit_cpu }} --reserve-memory {{ cert_registry_reserve_memory }} --reserve-cpu {{ cert_registry_reserve_cpu }} --health-cmd 'wget -qO- cert-registry-service:9000/service/health || exit 1' --health-timeout 10s --health-retries 5 --network application_default --env-file /home/deployer/env/sunbird_cert-registry-service.env {{hub_org}}/{{image_name}}:{{image_tag}}" diff --git a/ansible/roles/stack-sunbird/tasks/cert_service.yml b/ansible/roles/stack-sunbird/tasks/cert_service.yml index b75d5abda..144440462 100644 --- a/ansible/roles/stack-sunbird/tasks/cert_service.yml +++ b/ansible/roles/stack-sunbird/tasks/cert_service.yml @@ -4,4 +4,4 @@ ignore_errors: yes - name: Deploy cert service - shell: "docker service create --with-registry-auth --replicas {{ cert_replicas }} -p 9011:9000 --name cert-service --hostname cert-service --limit-memory {{ cert_limit_memory }} --limit-cpu {{ cert_limit_cpu }} --reserve-memory {{ cert_reservation_memory }} --reserve-cpu {{ cert_reservation_cpu }} --health-cmd 'wget -qO- cert-service:9000/service/health || exit 1' --health-timeout 10s --health-retries 3 --network application_default --env-file /home/deployer/env/sunbird_cert-service.env {{hub_org}}/{{image_name}}:{{image_tag}}" + shell: "docker service create --with-registry-auth --replicas {{ cert_replicas }} -p 9011:9000 --name cert-service --hostname cert-service --limit-memory {{ cert_limit_memory }} --limit-cpu {{ cert_limit_cpu }} --reserve-memory {{ cert_reservation_memory }} --reserve-cpu {{ cert_reservation_cpu }} --health-cmd 'wget -qO- cert-service:9000/service/health || exit 1' --health-timeout 10s --health-retries 5 --network application_default --env-file /home/deployer/env/sunbird_cert-service.env {{hub_org}}/{{image_name}}:{{image_tag}}" diff --git a/ansible/roles/stack-sunbird/tasks/enc_service.yml b/ansible/roles/stack-sunbird/tasks/enc_service.yml index dd34718c0..31e2c1634 100644 --- a/ansible/roles/stack-sunbird/tasks/enc_service.yml +++ b/ansible/roles/stack-sunbird/tasks/enc_service.yml @@ -4,4 +4,4 @@ ignore_errors: yes - name: Deploy enc service - shell: "docker service create --with-registry-auth --replicas {{ enc_replicas }} -p 9010:8013 --name enc-service --hostname enc-service --limit-memory {{ enc_limit_memory }} --limit-cpu {{ enc_limit_cpu }} --reserve-cpu {{ enc_reservation_cpu }} --reserve-memory {{ enc_reservation_memory }} --health-cmd 'wget -qO- enc-service:8013/service/health || exit 1' --health-timeout 10s --health-retries 3 --network application_default --env-file /home/deployer/env/sunbird_enc-service.env {{hub_org}}/{{image_name}}:{{image_tag}}" + shell: "docker service create --with-registry-auth --replicas {{ enc_replicas }} -p 9010:8013 --name enc-service --hostname enc-service --limit-memory {{ enc_limit_memory }} --limit-cpu {{ enc_limit_cpu }} --reserve-cpu {{ enc_reservation_cpu }} --reserve-memory {{ enc_reservation_memory }} --health-cmd 'wget -qO- enc-service:8013/service/health || exit 1' --health-timeout 10s --health-retries 5 --network application_default --env-file /home/deployer/env/sunbird_enc-service.env {{hub_org}}/{{image_name}}:{{image_tag}}" diff --git a/ansible/roles/stack-sunbird/tasks/knowledge-mw-service.yml b/ansible/roles/stack-sunbird/tasks/knowledge-mw-service.yml index 26c0c8aa3..343de7b0f 100644 --- a/ansible/roles/stack-sunbird/tasks/knowledge-mw-service.yml +++ b/ansible/roles/stack-sunbird/tasks/knowledge-mw-service.yml @@ -4,6 +4,6 @@ ignore_errors: yes - name: Deploy knowledge-mw service - shell: "docker service create --with-registry-auth --replicas {{ knowledge_mw_service_replicas }} -p 5000:5000 --name knowledge-mw-service --hostname knowledge-mw-service --reserve-memory {{ knowledge_mw_service_reservation_memory }} --limit-memory {{ knowledge_mw_service_limit_memory }} --limit-cpu {{ knowledge_mw_service_limit_cpu }} --reserve-cpu {{ knowledge_mw_service_reservation_cpu }} --health-cmd 'wget -qO- knowledge-mw-service:5000/service/health || exit 1' --health-timeout 10s --health-retries 3 --network application_default --env-file /home/deployer/env/sunbird_knowledge-mw-service.env {{hub_org}}/{{image_name}}:{{image_tag}}" + shell: "docker service create --with-registry-auth --replicas {{ knowledge_mw_service_replicas }} -p 5000:5000 --name knowledge-mw-service --hostname knowledge-mw-service --reserve-memory {{ knowledge_mw_service_reservation_memory }} --limit-memory {{ knowledge_mw_service_limit_memory }} --limit-cpu {{ knowledge_mw_service_limit_cpu }} --reserve-cpu {{ knowledge_mw_service_reservation_cpu }} --health-cmd 'wget -qO- knowledge-mw-service:5000/service/health || exit 1' --health-timeout 10s --health-retries 5 --network application_default --env-file /home/deployer/env/sunbird_knowledge-mw-service.env {{hub_org}}/{{image_name}}:{{image_tag}}" args: chdir: /home/deployer/stack diff --git a/ansible/roles/stack-sunbird/tasks/learner_service.yml b/ansible/roles/stack-sunbird/tasks/learner_service.yml index cdb3ade7b..3320ee97d 100644 --- a/ansible/roles/stack-sunbird/tasks/learner_service.yml +++ b/ansible/roles/stack-sunbird/tasks/learner_service.yml @@ -4,6 +4,6 @@ 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 3 --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}}" + 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/lms_service.yml b/ansible/roles/stack-sunbird/tasks/lms_service.yml index cf52f39f6..1be9bba68 100644 --- a/ansible/roles/stack-sunbird/tasks/lms_service.yml +++ b/ansible/roles/stack-sunbird/tasks/lms_service.yml @@ -4,6 +4,6 @@ ignore_errors: yes - name: Deploy lms service - shell: "docker service create --with-registry-auth --replicas {{ lms_service_replicas }} -p 9005:9000 --name lms-service --hostname lms-service --reserve-memory {{ lms_service_reservation_memory }} --limit-memory {{ lms_service_limit_memory }} --limit-cpu {{ lms_service_limit_cpu }} --reserve-cpu {{ lms_service_reservation_cpu }} --health-cmd 'wget -qO- lms-service:9000/service/health || exit 1' --health-timeout 10s --health-retries 3 --network application_default --env JAVA_OPTIONS={{ lms_java_mem_limit }} --env-file /home/deployer/env/sunbird_lms-service.env {{hub_org}}/{{image_name}}:{{image_tag}}" + shell: "docker service create --with-registry-auth --replicas {{ lms_service_replicas }} -p 9005:9000 --name lms-service --hostname lms-service --reserve-memory {{ lms_service_reservation_memory }} --limit-memory {{ lms_service_limit_memory }} --limit-cpu {{ lms_service_limit_cpu }} --reserve-cpu {{ lms_service_reservation_cpu }} --health-cmd 'wget -qO- lms-service:9000/service/health || exit 1' --health-timeout 10s --health-retries 5 --network application_default --env JAVA_OPTIONS={{ lms_java_mem_limit }} --env-file /home/deployer/env/sunbird_lms-service.env {{hub_org}}/{{image_name}}:{{image_tag}}" args: chdir: /home/deployer/stack diff --git a/ansible/roles/stack-sunbird/tasks/print-service.yml b/ansible/roles/stack-sunbird/tasks/print-service.yml index 781d85eb3..2434863e5 100644 --- a/ansible/roles/stack-sunbird/tasks/print-service.yml +++ b/ansible/roles/stack-sunbird/tasks/print-service.yml @@ -4,6 +4,6 @@ ignore_errors: yes - name: Deploy print service - shell: "docker service create --with-registry-auth --replicas {{ print_service_replicas }} -p 5001:5000 --name print-service --hostname print-service --reserve-memory {{ print_service_reservation_memory }} --limit-memory {{ print_service_limit_memory }} --limit-cpu {{ print_service_limit_cpu }} --reserve-cpu {{ print_service_reservation_cpu }} --health-cmd 'wget -qO- print-service:5000/health || exit 1' --health-timeout 10s --health-retries 3 --network application_default --env-file /home/deployer/env/sunbird_print-service.env {{hub_org}}/{{image_name}}:{{image_tag}}" + shell: "docker service create --with-registry-auth --replicas {{ print_service_replicas }} -p 5001:5000 --name print-service --hostname print-service --reserve-memory {{ print_service_reservation_memory }} --limit-memory {{ print_service_limit_memory }} --limit-cpu {{ print_service_limit_cpu }} --reserve-cpu {{ print_service_reservation_cpu }} --health-cmd 'wget -qO- print-service:5000/health || exit 1' --health-timeout 10s --health-retries 5 --network application_default --env-file /home/deployer/env/sunbird_print-service.env {{hub_org}}/{{image_name}}:{{image_tag}}" args: chdir: /home/deployer/stack diff --git a/ansible/roles/stack-sunbird/tasks/user_org_service.yml b/ansible/roles/stack-sunbird/tasks/user_org_service.yml index 3deddd7dc..52accff45 100644 --- a/ansible/roles/stack-sunbird/tasks/user_org_service.yml +++ b/ansible/roles/stack-sunbird/tasks/user_org_service.yml @@ -4,4 +4,4 @@ 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 3 --network application_default --env-file /home/deployer/env/sunbird_user-org-service.env {{hub_org}}/{{image_name}}:{{image_tag}}" + 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}}" From 1f01018a7a14182dc665385b22c383a380dee34d Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Thu, 30 Apr 2020 01:02:53 +0530 Subject: [PATCH 2373/2894] fix: updating logging play --- ansible/logging.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ansible/logging.yml b/ansible/logging.yml index f3bbad7e1..fd3dc74c9 100644 --- a/ansible/logging.yml +++ b/ansible/logging.yml @@ -1,12 +1,12 @@ -- name: Spray cluster name to nodes - hosts: swarm-nodes +--- +- hosts: swarm-nodes become: yes tasks: - - copy: dest=/home/deployer/cluster_name content="{{ cluster_name }}" + - name: Spray cluster name to nodes + copy: dest=/home/deployer/cluster_name content="{{ cluster_name }}" when: cluster_name is defined tags: - stack-logger - run_once: true - hosts: swarm-bootstrap-manager become: yes From d7fd88304f54e90103815e947fd115b42582ca5b Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Thu, 30 Apr 2020 01:14:29 +0530 Subject: [PATCH 2374/2894] fix: replica to be an integer --- ansible/roles/stack-proxy-private/templates/stack-proxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/stack-proxy-private/templates/stack-proxy.yml b/ansible/roles/stack-proxy-private/templates/stack-proxy.yml index d95bc0226..15df509a8 100644 --- a/ansible/roles/stack-proxy-private/templates/stack-proxy.yml +++ b/ansible/roles/stack-proxy-private/templates/stack-proxy.yml @@ -7,7 +7,7 @@ services: ports: - "31480:80" deploy: - replicas: "{{ private_proxy_replicas }}" + replicas: {{ private_proxy_replicas }} resources: reservations: memory: "{{ private_proxy_reservation_memory }}" From da4e2a9d132498e889c813590e323b85dbde6d05 Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Thu, 30 Apr 2020 01:22:27 +0530 Subject: [PATCH 2375/2894] fix: remove stack before config --- ansible/roles/stack-proxy-private/tasks/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/roles/stack-proxy-private/tasks/main.yml b/ansible/roles/stack-proxy-private/tasks/main.yml index b29a861d5..21ea15ca1 100644 --- a/ansible/roles/stack-proxy-private/tasks/main.yml +++ b/ansible/roles/stack-proxy-private/tasks/main.yml @@ -16,13 +16,13 @@ - name: Save stack file template: src=stack-proxy.yml dest=/home/deployer/stack/proxy-private.yml mode=0644 -- name: Save proxy-default.conf - template: src=proxy-default.conf dest=/home/deployer/config/proxy-default-private.conf mode=0644 - - name: Remove stack shell: "docker stack rm proxy-private" ignore_errors: yes +- name: Save proxy-default.conf + template: src=proxy-default.conf dest=/home/deployer/config/proxy-default-private.conf mode=0644 + - name: Ensure network exists shell: "docker network create --driver overlay {{item.name}} --subnet {{item.subnet}}" with_items: From 372c806329c580b4d73fa5b51269cd770d1c83d2 Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Thu, 30 Apr 2020 01:25:06 +0530 Subject: [PATCH 2376/2894] fix: corrected stack name --- ansible/roles/stack-proxy-private/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/stack-proxy-private/tasks/main.yml b/ansible/roles/stack-proxy-private/tasks/main.yml index 21ea15ca1..37ac574a5 100644 --- a/ansible/roles/stack-proxy-private/tasks/main.yml +++ b/ansible/roles/stack-proxy-private/tasks/main.yml @@ -17,7 +17,7 @@ template: src=stack-proxy.yml dest=/home/deployer/stack/proxy-private.yml mode=0644 - name: Remove stack - shell: "docker stack rm proxy-private" + shell: "docker stack rm private" ignore_errors: yes - name: Save proxy-default.conf From b042f346ae8f79992d61dc433cb6857f0d61c965 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Thu, 30 Apr 2020 13:14:46 +0530 Subject: [PATCH 2377/2894] support kafka topic exporter multiple kafka hosts --- exporters/Go/kafka-topic-exporter/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exporters/Go/kafka-topic-exporter/main.go b/exporters/Go/kafka-topic-exporter/main.go index 3de8bb602..bee8ebaf0 100644 --- a/exporters/Go/kafka-topic-exporter/main.go +++ b/exporters/Go/kafka-topic-exporter/main.go @@ -219,7 +219,7 @@ For example, fmt.Println("kafka is accessible") // Initializing kafka kafkaReader = kafka.NewReader(kafka.ReaderConfig{ - Brokers: []string{kafkaHost}, + Brokers: strings.Split(kafkaHost, ","), GroupID: "metrics-reader-test", // Consumer group ID Topic: kafkaTopic, MinBytes: 1e3, // 1KB From 56c47c57b8d13ea2f4f8edf715a11d17d0263919 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Thu, 30 Apr 2020 13:14:46 +0530 Subject: [PATCH 2378/2894] support kafka topic exporter multiple kafka hosts --- exporters/Go/kafka-topic-exporter/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exporters/Go/kafka-topic-exporter/main.go b/exporters/Go/kafka-topic-exporter/main.go index 3de8bb602..bee8ebaf0 100644 --- a/exporters/Go/kafka-topic-exporter/main.go +++ b/exporters/Go/kafka-topic-exporter/main.go @@ -219,7 +219,7 @@ For example, fmt.Println("kafka is accessible") // Initializing kafka kafkaReader = kafka.NewReader(kafka.ReaderConfig{ - Brokers: []string{kafkaHost}, + Brokers: strings.Split(kafkaHost, ","), GroupID: "metrics-reader-test", // Consumer group ID Topic: kafkaTopic, MinBytes: 1e3, // 1KB From 96918331c9cbc0083fa9e5d2d775bd1aac324e5d Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Thu, 30 Apr 2020 13:14:46 +0530 Subject: [PATCH 2379/2894] support kafka topic exporter multiple kafka hosts --- exporters/Go/kafka-topic-exporter/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exporters/Go/kafka-topic-exporter/main.go b/exporters/Go/kafka-topic-exporter/main.go index 3de8bb602..bee8ebaf0 100644 --- a/exporters/Go/kafka-topic-exporter/main.go +++ b/exporters/Go/kafka-topic-exporter/main.go @@ -219,7 +219,7 @@ For example, fmt.Println("kafka is accessible") // Initializing kafka kafkaReader = kafka.NewReader(kafka.ReaderConfig{ - Brokers: []string{kafkaHost}, + Brokers: strings.Split(kafkaHost, ","), GroupID: "metrics-reader-test", // Consumer group ID Topic: kafkaTopic, MinBytes: 1e3, // 1KB From 2503b2ea0c92c9ff8ed33eb6cb8d817c0c60ecc9 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Thu, 30 Apr 2020 13:14:46 +0530 Subject: [PATCH 2380/2894] support kafka topic exporter multiple kafka hosts fix: topic exporter multiple hosts port check --- exporters/Go/kafka-topic-exporter/main.go | 28 ++++++++++++++--------- images/kafka-topic-exporter/Dockerfile | 7 +++--- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/exporters/Go/kafka-topic-exporter/main.go b/exporters/Go/kafka-topic-exporter/main.go index bee8ebaf0..a165a3f54 100644 --- a/exporters/Go/kafka-topic-exporter/main.go +++ b/exporters/Go/kafka-topic-exporter/main.go @@ -133,7 +133,7 @@ func metricsCreation(ctx context.Context, m kafka.Message) error { return ctx.Err() default: if err := json.Unmarshal(data, &metrics); err != nil { - fmt.Printf("Unmarshal error: %q\n", err) + fmt.Printf("Unmarshal error: %q data: %q\n", err, string(data)) return err } metrics.pushMetrics(ctx, &m) @@ -172,7 +172,7 @@ func serve(w http.ResponseWriter, r *http.Request) { fmt.Printf("err reading message: %v\n", err) break } - fmt.Printf("topic: %q partition: %v offset: %v lag: %d\n ", m.Topic, m.Partition, m.Offset, r.Lag()) + fmt.Printf("topic: %q partition: %v offset: %v\n", m.Topic, m.Partition, m.Offset) go func(ctx context.Context) { if err := metricsCreation(ctx, m); err != nil { fmt.Printf("errored out metrics creation; err: %s\n", err) @@ -200,27 +200,33 @@ func serve(w http.ResponseWriter, r *http.Request) { func main() { // Getting kafka_ip and topic - kafkaHost := os.Getenv("kafka_host") + kafkaHosts := strings.Split(os.Getenv("kafka_host"), ",") kafkaTopic := os.Getenv("kafka_topic") - if kafkaTopic == "" || kafkaHost == "" { + kafkaConsumerGroupName := os.Getenv("kafka_consumer_group_name") + if kafkaConsumerGroupName == "" { + kafkaConsumerGroupName = "prometheus-metrics-consumer" + } + if kafkaTopic == "" || kafkaHosts[0] == "" { log.Fatalf(`"kafka_topic or kafka_host environment variables not set." For example, - export kafka_host=10.0.0.9:9092 + export kafka_host=10.0.0.9:9092,10.0.0.10:9092 kafka_topic=sunbird.metrics.topic`) } - fmt.Printf("kafak_host: %s\nkafka_topic: %s\n", kafkaHost, kafkaTopic) + fmt.Printf("kafka_host: %s\nkafka_topic: %s\nkafka_consumer_group_name: %s\n", kafkaHosts, kafkaTopic, kafkaConsumerGroupName) // Checking kafka port and ip are accessible fmt.Println("Checking connection to kafka") - conn, err := net.DialTimeout("tcp", kafkaHost, 10*time.Second) - if err != nil { - log.Fatalf("Connection error: %s", err) + for _, host := range kafkaHosts { + conn, err := net.DialTimeout("tcp", host, 10*time.Second) + if err != nil { + log.Fatalf("Connection error: %s", err) + } + conn.Close() } - conn.Close() fmt.Println("kafka is accessible") // Initializing kafka kafkaReader = kafka.NewReader(kafka.ReaderConfig{ Brokers: strings.Split(kafkaHost, ","), - GroupID: "metrics-reader-test", // Consumer group ID + GroupID: kafkaConsumerGroupName, // Consumer group ID Topic: kafkaTopic, MinBytes: 1e3, // 1KB MaxBytes: 10e6, // 10MB diff --git a/images/kafka-topic-exporter/Dockerfile b/images/kafka-topic-exporter/Dockerfile index c55230b4a..56e56cfd9 100644 --- a/images/kafka-topic-exporter/Dockerfile +++ b/images/kafka-topic-exporter/Dockerfile @@ -1,10 +1,11 @@ -FROM golang:1.13 AS builder -COPY main.go /work +FROM golang:1.13.10 AS builder WORKDIR /work +COPY main.go /work +RUN go get github.com/segmentio/kafka-go RUN CGO_ENABLED=0 go build -o kafka-topic-exporter main.go FROM scratch LABEL maintainer="Rajesh Rajendran" -COPY --from=bulder /work/kafka-topic-exporter / +COPY --from=builder /work/kafka-topic-exporter / EXPOSE 8000 CMD ["/kafka-topic-exporter"] From 4186fc1421badd333b2da3d63ef0406ba2f79223 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Thu, 30 Apr 2020 13:14:46 +0530 Subject: [PATCH 2381/2894] support kafka topic exporter multiple kafka hosts fix: topic exporter multiple hosts port check --- exporters/Go/kafka-topic-exporter/main.go | 28 ++++++++++++++--------- images/kafka-topic-exporter/Dockerfile | 7 +++--- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/exporters/Go/kafka-topic-exporter/main.go b/exporters/Go/kafka-topic-exporter/main.go index bee8ebaf0..a165a3f54 100644 --- a/exporters/Go/kafka-topic-exporter/main.go +++ b/exporters/Go/kafka-topic-exporter/main.go @@ -133,7 +133,7 @@ func metricsCreation(ctx context.Context, m kafka.Message) error { return ctx.Err() default: if err := json.Unmarshal(data, &metrics); err != nil { - fmt.Printf("Unmarshal error: %q\n", err) + fmt.Printf("Unmarshal error: %q data: %q\n", err, string(data)) return err } metrics.pushMetrics(ctx, &m) @@ -172,7 +172,7 @@ func serve(w http.ResponseWriter, r *http.Request) { fmt.Printf("err reading message: %v\n", err) break } - fmt.Printf("topic: %q partition: %v offset: %v lag: %d\n ", m.Topic, m.Partition, m.Offset, r.Lag()) + fmt.Printf("topic: %q partition: %v offset: %v\n", m.Topic, m.Partition, m.Offset) go func(ctx context.Context) { if err := metricsCreation(ctx, m); err != nil { fmt.Printf("errored out metrics creation; err: %s\n", err) @@ -200,27 +200,33 @@ func serve(w http.ResponseWriter, r *http.Request) { func main() { // Getting kafka_ip and topic - kafkaHost := os.Getenv("kafka_host") + kafkaHosts := strings.Split(os.Getenv("kafka_host"), ",") kafkaTopic := os.Getenv("kafka_topic") - if kafkaTopic == "" || kafkaHost == "" { + kafkaConsumerGroupName := os.Getenv("kafka_consumer_group_name") + if kafkaConsumerGroupName == "" { + kafkaConsumerGroupName = "prometheus-metrics-consumer" + } + if kafkaTopic == "" || kafkaHosts[0] == "" { log.Fatalf(`"kafka_topic or kafka_host environment variables not set." For example, - export kafka_host=10.0.0.9:9092 + export kafka_host=10.0.0.9:9092,10.0.0.10:9092 kafka_topic=sunbird.metrics.topic`) } - fmt.Printf("kafak_host: %s\nkafka_topic: %s\n", kafkaHost, kafkaTopic) + fmt.Printf("kafka_host: %s\nkafka_topic: %s\nkafka_consumer_group_name: %s\n", kafkaHosts, kafkaTopic, kafkaConsumerGroupName) // Checking kafka port and ip are accessible fmt.Println("Checking connection to kafka") - conn, err := net.DialTimeout("tcp", kafkaHost, 10*time.Second) - if err != nil { - log.Fatalf("Connection error: %s", err) + for _, host := range kafkaHosts { + conn, err := net.DialTimeout("tcp", host, 10*time.Second) + if err != nil { + log.Fatalf("Connection error: %s", err) + } + conn.Close() } - conn.Close() fmt.Println("kafka is accessible") // Initializing kafka kafkaReader = kafka.NewReader(kafka.ReaderConfig{ Brokers: strings.Split(kafkaHost, ","), - GroupID: "metrics-reader-test", // Consumer group ID + GroupID: kafkaConsumerGroupName, // Consumer group ID Topic: kafkaTopic, MinBytes: 1e3, // 1KB MaxBytes: 10e6, // 10MB diff --git a/images/kafka-topic-exporter/Dockerfile b/images/kafka-topic-exporter/Dockerfile index c55230b4a..56e56cfd9 100644 --- a/images/kafka-topic-exporter/Dockerfile +++ b/images/kafka-topic-exporter/Dockerfile @@ -1,10 +1,11 @@ -FROM golang:1.13 AS builder -COPY main.go /work +FROM golang:1.13.10 AS builder WORKDIR /work +COPY main.go /work +RUN go get github.com/segmentio/kafka-go RUN CGO_ENABLED=0 go build -o kafka-topic-exporter main.go FROM scratch LABEL maintainer="Rajesh Rajendran" -COPY --from=bulder /work/kafka-topic-exporter / +COPY --from=builder /work/kafka-topic-exporter / EXPOSE 8000 CMD ["/kafka-topic-exporter"] From 1f90b9d7398b9ea35637216cbe00b18d01430cf0 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Thu, 30 Apr 2020 13:14:46 +0530 Subject: [PATCH 2382/2894] support kafka topic exporter multiple kafka hosts fix: topic exporter multiple hosts port check --- exporters/Go/kafka-topic-exporter/main.go | 28 ++++++++++++++--------- images/kafka-topic-exporter/Dockerfile | 7 +++--- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/exporters/Go/kafka-topic-exporter/main.go b/exporters/Go/kafka-topic-exporter/main.go index bee8ebaf0..a165a3f54 100644 --- a/exporters/Go/kafka-topic-exporter/main.go +++ b/exporters/Go/kafka-topic-exporter/main.go @@ -133,7 +133,7 @@ func metricsCreation(ctx context.Context, m kafka.Message) error { return ctx.Err() default: if err := json.Unmarshal(data, &metrics); err != nil { - fmt.Printf("Unmarshal error: %q\n", err) + fmt.Printf("Unmarshal error: %q data: %q\n", err, string(data)) return err } metrics.pushMetrics(ctx, &m) @@ -172,7 +172,7 @@ func serve(w http.ResponseWriter, r *http.Request) { fmt.Printf("err reading message: %v\n", err) break } - fmt.Printf("topic: %q partition: %v offset: %v lag: %d\n ", m.Topic, m.Partition, m.Offset, r.Lag()) + fmt.Printf("topic: %q partition: %v offset: %v\n", m.Topic, m.Partition, m.Offset) go func(ctx context.Context) { if err := metricsCreation(ctx, m); err != nil { fmt.Printf("errored out metrics creation; err: %s\n", err) @@ -200,27 +200,33 @@ func serve(w http.ResponseWriter, r *http.Request) { func main() { // Getting kafka_ip and topic - kafkaHost := os.Getenv("kafka_host") + kafkaHosts := strings.Split(os.Getenv("kafka_host"), ",") kafkaTopic := os.Getenv("kafka_topic") - if kafkaTopic == "" || kafkaHost == "" { + kafkaConsumerGroupName := os.Getenv("kafka_consumer_group_name") + if kafkaConsumerGroupName == "" { + kafkaConsumerGroupName = "prometheus-metrics-consumer" + } + if kafkaTopic == "" || kafkaHosts[0] == "" { log.Fatalf(`"kafka_topic or kafka_host environment variables not set." For example, - export kafka_host=10.0.0.9:9092 + export kafka_host=10.0.0.9:9092,10.0.0.10:9092 kafka_topic=sunbird.metrics.topic`) } - fmt.Printf("kafak_host: %s\nkafka_topic: %s\n", kafkaHost, kafkaTopic) + fmt.Printf("kafka_host: %s\nkafka_topic: %s\nkafka_consumer_group_name: %s\n", kafkaHosts, kafkaTopic, kafkaConsumerGroupName) // Checking kafka port and ip are accessible fmt.Println("Checking connection to kafka") - conn, err := net.DialTimeout("tcp", kafkaHost, 10*time.Second) - if err != nil { - log.Fatalf("Connection error: %s", err) + for _, host := range kafkaHosts { + conn, err := net.DialTimeout("tcp", host, 10*time.Second) + if err != nil { + log.Fatalf("Connection error: %s", err) + } + conn.Close() } - conn.Close() fmt.Println("kafka is accessible") // Initializing kafka kafkaReader = kafka.NewReader(kafka.ReaderConfig{ Brokers: strings.Split(kafkaHost, ","), - GroupID: "metrics-reader-test", // Consumer group ID + GroupID: kafkaConsumerGroupName, // Consumer group ID Topic: kafkaTopic, MinBytes: 1e3, // 1KB MaxBytes: 10e6, // 10MB diff --git a/images/kafka-topic-exporter/Dockerfile b/images/kafka-topic-exporter/Dockerfile index c55230b4a..56e56cfd9 100644 --- a/images/kafka-topic-exporter/Dockerfile +++ b/images/kafka-topic-exporter/Dockerfile @@ -1,10 +1,11 @@ -FROM golang:1.13 AS builder -COPY main.go /work +FROM golang:1.13.10 AS builder WORKDIR /work +COPY main.go /work +RUN go get github.com/segmentio/kafka-go RUN CGO_ENABLED=0 go build -o kafka-topic-exporter main.go FROM scratch LABEL maintainer="Rajesh Rajendran" -COPY --from=bulder /work/kafka-topic-exporter / +COPY --from=builder /work/kafka-topic-exporter / EXPOSE 8000 CMD ["/kafka-topic-exporter"] From f90aab6163fb3f9a2e91ae4db79582ab2693edba Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Thu, 30 Apr 2020 16:37:11 +0530 Subject: [PATCH 2383/2894] merging all kafka ips for topic-exporter Signed-off-by: Rajesh Rajendran --- .../sunbird-monitoring/templates/kafka-topic-exporter.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/ansible/roles/sunbird-monitoring/templates/kafka-topic-exporter.yaml b/kubernetes/ansible/roles/sunbird-monitoring/templates/kafka-topic-exporter.yaml index 3532c72ca..040b3c8b6 100644 --- a/kubernetes/ansible/roles/sunbird-monitoring/templates/kafka-topic-exporter.yaml +++ b/kubernetes/ansible/roles/sunbird-monitoring/templates/kafka-topic-exporter.yaml @@ -1,6 +1,6 @@ env: kafka: - host: "{{ groups['kafka'][0] }}:9092" + host: "{{ groups['kafka']|join(':9092,') }}:9092" topic: "{{ env_name }}.prom.monitoring.metrics" assessment_aggregator_threshold: "{{ assessment_aggregator_threshold | d(100) }}" deduplication_threshold: "{{ deduplication_threshold | d(100) }}" From 898538b0c8c6256dbc6008d2af3856f55fdd4869 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Thu, 30 Apr 2020 16:37:11 +0530 Subject: [PATCH 2384/2894] merging all kafka ips for topic-exporter Signed-off-by: Rajesh Rajendran --- .../sunbird-monitoring/templates/kafka-topic-exporter.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/ansible/roles/sunbird-monitoring/templates/kafka-topic-exporter.yaml b/kubernetes/ansible/roles/sunbird-monitoring/templates/kafka-topic-exporter.yaml index 3532c72ca..040b3c8b6 100644 --- a/kubernetes/ansible/roles/sunbird-monitoring/templates/kafka-topic-exporter.yaml +++ b/kubernetes/ansible/roles/sunbird-monitoring/templates/kafka-topic-exporter.yaml @@ -1,6 +1,6 @@ env: kafka: - host: "{{ groups['kafka'][0] }}:9092" + host: "{{ groups['kafka']|join(':9092,') }}:9092" topic: "{{ env_name }}.prom.monitoring.metrics" assessment_aggregator_threshold: "{{ assessment_aggregator_threshold | d(100) }}" deduplication_threshold: "{{ deduplication_threshold | d(100) }}" From aac972678ae442aa5f9991b0357b5e95e409c4e0 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Thu, 30 Apr 2020 16:37:11 +0530 Subject: [PATCH 2385/2894] merging all kafka ips for topic-exporter Signed-off-by: Rajesh Rajendran --- .../sunbird-monitoring/templates/kafka-topic-exporter.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/ansible/roles/sunbird-monitoring/templates/kafka-topic-exporter.yaml b/kubernetes/ansible/roles/sunbird-monitoring/templates/kafka-topic-exporter.yaml index c23663a46..8d839a6a3 100644 --- a/kubernetes/ansible/roles/sunbird-monitoring/templates/kafka-topic-exporter.yaml +++ b/kubernetes/ansible/roles/sunbird-monitoring/templates/kafka-topic-exporter.yaml @@ -1,6 +1,6 @@ env: kafka: - host: "{{ groups['kafka'][0] }}:9092" + host: "{{ groups['kafka']|join(':9092,') }}:9092" topic: "{{ env_name }}.prom.monitoring.metrics" assessment_aggregator_threshold: "{{ assessment_aggregator_threshold | d(100) }}" From 08485fb5c3b9900c8f5e9ba415dcc18a9eeefc17 Mon Sep 17 00:00:00 2001 From: deveshMantra <48819442+deveshMantra@users.noreply.github.com> Date: Thu, 30 Apr 2020 19:01:21 +0530 Subject: [PATCH 2386/2894] Issue #SB-19191 fix: recaptcha workflow revised (#1450) * Issue #SB-19191 fix: recaptcha workflow revised --- ansible/roles/stack-sunbird/templates/sunbird_player.env | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ansible/roles/stack-sunbird/templates/sunbird_player.env b/ansible/roles/stack-sunbird/templates/sunbird_player.env index 9041137a7..e08bea2ad 100644 --- a/ansible/roles/stack-sunbird/templates/sunbird_player.env +++ b/ansible/roles/stack-sunbird/templates/sunbird_player.env @@ -86,3 +86,6 @@ sunbird_portal_updateLoginTimeEnabled={{sunbird_portal_updateLoginTimeEnabled|lo #Release-2.8.6 sunbird_portal_slugForProminentFilter={{sunbird_portal_slugForProminentFilter | default("")}} sunbird_report_service_url={{sunbird_report_service_url}} + +#Release-2.10.0 +google_captcha_private_key={{google_captcha_private_key | default("")}} From 575874088ad501f087af29b43687e1af0018f1cc Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Thu, 30 Apr 2020 22:24:08 +0530 Subject: [PATCH 2387/2894] Fix: kafka topic hosts Signed-off-by: Rajesh Rajendran --- exporters/Go/kafka-topic-exporter/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exporters/Go/kafka-topic-exporter/main.go b/exporters/Go/kafka-topic-exporter/main.go index a165a3f54..e24c91c95 100644 --- a/exporters/Go/kafka-topic-exporter/main.go +++ b/exporters/Go/kafka-topic-exporter/main.go @@ -225,7 +225,7 @@ For example, fmt.Println("kafka is accessible") // Initializing kafka kafkaReader = kafka.NewReader(kafka.ReaderConfig{ - Brokers: strings.Split(kafkaHost, ","), + Brokers: kafkaHosts, GroupID: kafkaConsumerGroupName, // Consumer group ID Topic: kafkaTopic, MinBytes: 1e3, // 1KB From ab07bc24c961eadae5dd8be2f1dd48916491a635 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Thu, 30 Apr 2020 22:24:08 +0530 Subject: [PATCH 2388/2894] Fix: kafka topic hosts Signed-off-by: Rajesh Rajendran --- exporters/Go/kafka-topic-exporter/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exporters/Go/kafka-topic-exporter/main.go b/exporters/Go/kafka-topic-exporter/main.go index a165a3f54..e24c91c95 100644 --- a/exporters/Go/kafka-topic-exporter/main.go +++ b/exporters/Go/kafka-topic-exporter/main.go @@ -225,7 +225,7 @@ For example, fmt.Println("kafka is accessible") // Initializing kafka kafkaReader = kafka.NewReader(kafka.ReaderConfig{ - Brokers: strings.Split(kafkaHost, ","), + Brokers: kafkaHosts, GroupID: kafkaConsumerGroupName, // Consumer group ID Topic: kafkaTopic, MinBytes: 1e3, // 1KB From 421e0cdabf6a33764e0adbd6cc196df6072f2d53 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Thu, 30 Apr 2020 22:24:08 +0530 Subject: [PATCH 2389/2894] Fix: kafka topic hosts Signed-off-by: Rajesh Rajendran --- exporters/Go/kafka-topic-exporter/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exporters/Go/kafka-topic-exporter/main.go b/exporters/Go/kafka-topic-exporter/main.go index a165a3f54..e24c91c95 100644 --- a/exporters/Go/kafka-topic-exporter/main.go +++ b/exporters/Go/kafka-topic-exporter/main.go @@ -225,7 +225,7 @@ For example, fmt.Println("kafka is accessible") // Initializing kafka kafkaReader = kafka.NewReader(kafka.ReaderConfig{ - Brokers: strings.Split(kafkaHost, ","), + Brokers: kafkaHosts, GroupID: kafkaConsumerGroupName, // Consumer group ID Topic: kafkaTopic, MinBytes: 1e3, // 1KB From fa1c7bd80d27b53b6fe8f3730b7f5ae75787b8f7 Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Sat, 2 May 2020 13:23:55 +0530 Subject: [PATCH 2390/2894] fix: updating kong health to tcp check --- ansible/roles/stack-sunbird/defaults/main.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ansible/roles/stack-sunbird/defaults/main.yml b/ansible/roles/stack-sunbird/defaults/main.yml index 545ea09f8..e23566d66 100644 --- a/ansible/roles/stack-sunbird/defaults/main.yml +++ b/ansible/roles/stack-sunbird/defaults/main.yml @@ -294,18 +294,16 @@ lms_liveness_readiness: apimanager_liveness_readiness: healthcheck: true readinessProbe: - httpGet: - path: /status - port: 8001 + tcpSocket: + port: 8000 initialDelaySeconds: 30 periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 successThreshold: 2 livenessProbe: - httpGet: - path: / - port: 8001 + tcpSocket: + port: 8000 initialDelaySeconds: 30 periodSeconds: 30 timeoutSeconds: 10 From 736891884a5905d30d84148a704b6524d6b8f901 Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Sat, 2 May 2020 14:11:57 +0530 Subject: [PATCH 2391/2894] fix: set higher initial delay and check for kong --- ansible/roles/stack-sunbird/defaults/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/stack-sunbird/defaults/main.yml b/ansible/roles/stack-sunbird/defaults/main.yml index e23566d66..ba65ff16e 100644 --- a/ansible/roles/stack-sunbird/defaults/main.yml +++ b/ansible/roles/stack-sunbird/defaults/main.yml @@ -296,8 +296,8 @@ apimanager_liveness_readiness: readinessProbe: tcpSocket: port: 8000 - initialDelaySeconds: 30 - periodSeconds: 30 + initialDelaySeconds: 120 + periodSeconds: 90 timeoutSeconds: 10 failureThreshold: 5 successThreshold: 2 From f8aa48dfc30c1c04e175e11a6afaf975bc54618d Mon Sep 17 00:00:00 2001 From: G33tha Date: Wed, 6 May 2020 14:14:33 +0530 Subject: [PATCH 2392/2894] added proxy cache path framework_cache --- kubernetes/helm_charts/core/nginx-public-ingress/values.j2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 b/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 index d04c6f944..0ea5451c0 100644 --- a/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 +++ b/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 @@ -554,6 +554,9 @@ nginxconfig: | # local caching for images and files proxy_cache_path /tmp/proxy_cache levels=1:2 keys_zone=tmp_cache:5m max_size=10m inactive=60m use_temp_path=off; + + # cache framework + proxy_cache_path /tmp/framework_cache levels=1:2 keys_zone=framework_cache:5m max_size=500m inactive=60m use_temp_path=off; server { listen 9145; From 7bd0ffd38bbaf932dad133e4bebcdb44254c3a0d Mon Sep 17 00:00:00 2001 From: G33tha Date: Wed, 6 May 2020 14:34:17 +0530 Subject: [PATCH 2393/2894] Update values.j2 --- kubernetes/helm_charts/core/nginx-public-ingress/values.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 b/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 index 0ea5451c0..19e8a1bf7 100644 --- a/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 +++ b/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 @@ -556,7 +556,7 @@ nginxconfig: | proxy_cache_path /tmp/proxy_cache levels=1:2 keys_zone=tmp_cache:5m max_size=10m inactive=60m use_temp_path=off; # cache framework - proxy_cache_path /tmp/framework_cache levels=1:2 keys_zone=framework_cache:5m max_size=500m inactive=60m use_temp_path=off; + proxy_cache_path /tmp/framework_cache levels=1:2 keys_zone=framework_cache:5m max_size=100m inactive=60m use_temp_path=off; server { listen 9145; From e9efbf624b746459136d54533337a401a7fb6e2e Mon Sep 17 00:00:00 2001 From: G33tha Date: Wed, 6 May 2020 17:26:49 +0530 Subject: [PATCH 2394/2894] Update values.j2 --- kubernetes/helm_charts/core/nginx-public-ingress/values.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 b/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 index 19e8a1bf7..071d241a9 100644 --- a/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 +++ b/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 @@ -556,7 +556,7 @@ nginxconfig: | proxy_cache_path /tmp/proxy_cache levels=1:2 keys_zone=tmp_cache:5m max_size=10m inactive=60m use_temp_path=off; # cache framework - proxy_cache_path /tmp/framework_cache levels=1:2 keys_zone=framework_cache:5m max_size=100m inactive=60m use_temp_path=off; + proxy_cache_path /tmp/framework_cache levels=1:2 keys_zone=framework_cache:5m max_size=700m inactive=60m use_temp_path=off; server { listen 9145; From e12c634b733d123329de5a1c6683757b75aa7dae Mon Sep 17 00:00:00 2001 From: G33tha Date: Wed, 6 May 2020 18:44:10 +0530 Subject: [PATCH 2395/2894] added location block for framework api --- .../core/nginx-public-ingress/values.j2 | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 b/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 index 071d241a9..d333adf8f 100644 --- a/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 +++ b/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 @@ -156,6 +156,33 @@ proxyconfig: | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } + location /api/framework { + 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, Content-Encoding"; + add_header Content-Length 0; + add_header Content-Type text/plain; + return 200; + } + client_max_body_size 60M; + rewrite ^/api/(.*) /$1 break; + proxy_cache framework_cache; + proxy_cache_revalidate on; + proxy_cache_min_uses 1; + proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504; + proxy_cache_background_update on; + proxy_set_header Connection ""; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Scheme $scheme; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_connect_timeout 5; + proxy_send_timeout 60; + proxy_read_timeout 70; + proxy_http_version 1.1; + proxy_pass http://kong; + } location /api/ { if ($request_method = OPTIONS ) { add_header Access-Control-Allow-Origin "*" ; From 482d828ba95c8aa3edbf074871299155a4b3f05e Mon Sep 17 00:00:00 2001 From: G33tha Date: Wed, 6 May 2020 18:45:52 +0530 Subject: [PATCH 2396/2894] Update values.j2 --- .../core/nginx-public-ingress/values.j2 | 30 +------------------ 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 b/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 index d333adf8f..e958219a4 100644 --- a/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 +++ b/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 @@ -156,33 +156,7 @@ proxyconfig: | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } - location /api/framework { - 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, Content-Encoding"; - add_header Content-Length 0; - add_header Content-Type text/plain; - return 200; - } - client_max_body_size 60M; - rewrite ^/api/(.*) /$1 break; - proxy_cache framework_cache; - proxy_cache_revalidate on; - proxy_cache_min_uses 1; - proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504; - proxy_cache_background_update on; - proxy_set_header Connection ""; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Scheme $scheme; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_connect_timeout 5; - proxy_send_timeout 60; - proxy_read_timeout 70; - proxy_http_version 1.1; - proxy_pass http://kong; - } + location /api/ { if ($request_method = OPTIONS ) { add_header Access-Control-Allow-Origin "*" ; @@ -582,8 +556,6 @@ nginxconfig: | # local caching for images and files proxy_cache_path /tmp/proxy_cache levels=1:2 keys_zone=tmp_cache:5m max_size=10m inactive=60m use_temp_path=off; - # cache framework - proxy_cache_path /tmp/framework_cache levels=1:2 keys_zone=framework_cache:5m max_size=700m inactive=60m use_temp_path=off; server { listen 9145; From 17f7a3b448ec0d5362f28fe8e44e027a050622a0 Mon Sep 17 00:00:00 2001 From: ravinder kumar Date: Thu, 7 May 2020 09:44:36 +0530 Subject: [PATCH 2397/2894] Issue #HE-4 feat: onboard api for add summaries and insights for reports and charts. --- ansible/roles/kong-api/defaults/main.yml | 54 ++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/ansible/roles/kong-api/defaults/main.yml b/ansible/roles/kong-api/defaults/main.yml index 95f0495b4..29ff2f0e9 100644 --- a/ansible/roles/kong-api/defaults/main.yml +++ b/ansible/roles/kong-api/defaults/main.yml @@ -4408,6 +4408,60 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" + - name: createReportSummary + request_path: "{{ report_service_prefix }}/report/summary/create" + upstream_url: "{{ report_service_url }}/report/summary/create" + strip_request_path: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: + - 'reportsCreate' + - 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: getReportSummary + request_path: "{{ report_service_prefix }}/report/summary" + upstream_url: "{{ report_service_url }}/report/summary" + strip_request_path: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: + - 'reportsAccess' + - 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: listReportSummary + request_path: "{{ report_service_prefix }}/report/summary/list" + upstream_url: "{{ report_service_url }}/report/summary/list" + strip_request_path: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: + - 'reportsAdmin' + - 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: searchRegCertificate request_path: "{{ cert_registry_service_prefix }}/v1/certs/search" upstream_url: "{{ cert_registry_service_url }}/certs/v1/registry/search" From df778001f416f34bb884d36ded689fae5942fccb Mon Sep 17 00:00:00 2001 From: ravinder kumar Date: Thu, 7 May 2020 11:11:30 +0530 Subject: [PATCH 2398/2894] Issue #HE-4 feat: env variable for report summary table. --- ansible/roles/stack-sunbird/templates/sunbird_report-service.env | 1 + 1 file changed, 1 insertion(+) diff --git a/ansible/roles/stack-sunbird/templates/sunbird_report-service.env b/ansible/roles/stack-sunbird/templates/sunbird_report-service.env index 8b881b2a2..a65505da7 100644 --- a/ansible/roles/stack-sunbird/templates/sunbird_report-service.env +++ b/ansible/roles/stack-sunbird/templates/sunbird_report-service.env @@ -6,4 +6,5 @@ SUNBIRD_REPORTS_DB_USER={{dp_postgres_username}} SUNBIRD_SERVER_PORT=3030 SUNBIRD_BASE_REPORT_URL=report SUNBIRD_REPORTS_TABLE_NAME=report +SUNBIRD_REPORT_SUMMARY_TABLE_NAME=report_summary SUNBIRD_ENV="https://{{domain_name}}" From 45fc367fa05d8f594aa3ab74624a1733109a7789 Mon Sep 17 00:00:00 2001 From: G33tha Date: Thu, 7 May 2020 11:50:22 +0530 Subject: [PATCH 2399/2894] added report service acl --- ansible/roles/kong-consumer/defaults/main.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ansible/roles/kong-consumer/defaults/main.yml b/ansible/roles/kong-consumer/defaults/main.yml index 26fbc5270..6c1851f9d 100644 --- a/ansible/roles/kong-consumer/defaults/main.yml +++ b/ansible/roles/kong-consumer/defaults/main.yml @@ -68,6 +68,10 @@ kong_all_consumer_groups: - badgeUpdate - pluginAccess - userTempAdmin + - reportsAdmin + - reportsAccess + - reportsUpdate + - reportsCreate kong_consumers: From d504c70e825bf199d6df817edb8990d9992ad8e5 Mon Sep 17 00:00:00 2001 From: ravinder kumar Date: Thu, 7 May 2020 11:52:49 +0530 Subject: [PATCH 2400/2894] Issue #HE-4 feat: env var for report_summary table. --- ansible/roles/stack-sunbird/defaults/main.yml | 1 + .../roles/stack-sunbird/templates/sunbird_report-service.env | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ansible/roles/stack-sunbird/defaults/main.yml b/ansible/roles/stack-sunbird/defaults/main.yml index 398d7af95..dfa60c8a7 100644 --- a/ansible/roles/stack-sunbird/defaults/main.yml +++ b/ansible/roles/stack-sunbird/defaults/main.yml @@ -39,6 +39,7 @@ report_replicas: 1 report_reservation_memory: 300M report_limit_memory: 500M report_limit_cpu: 1 +sunbird_report_summary_table_name: report_summary # This variable is not to access learner service but to call the api # learner-service:9000/org/v1/search diff --git a/ansible/roles/stack-sunbird/templates/sunbird_report-service.env b/ansible/roles/stack-sunbird/templates/sunbird_report-service.env index a65505da7..5ca749a1b 100644 --- a/ansible/roles/stack-sunbird/templates/sunbird_report-service.env +++ b/ansible/roles/stack-sunbird/templates/sunbird_report-service.env @@ -6,5 +6,5 @@ SUNBIRD_REPORTS_DB_USER={{dp_postgres_username}} SUNBIRD_SERVER_PORT=3030 SUNBIRD_BASE_REPORT_URL=report SUNBIRD_REPORTS_TABLE_NAME=report -SUNBIRD_REPORT_SUMMARY_TABLE_NAME=report_summary +SUNBIRD_REPORT_SUMMARY_TABLE_NAME={{sunbird_report_summary_table_name}} SUNBIRD_ENV="https://{{domain_name}}" From a916ea4b96d4b1a6f0fc2e3af43238063f015c4b Mon Sep 17 00:00:00 2001 From: SMY ALTAMASH <30286162+SMYALTAMASH@users.noreply.github.com> Date: Thu, 7 May 2020 13:58:24 +0530 Subject: [PATCH 2401/2894] Dynamic cassandra heap size calculation with an option to use quarter of the HEAP size for adopters (#1378) * Having default variable for cassandra heap size to decide on heap calculation for adopters * providing description for variable * providing description for variable * Removing unwanted comments * Remove old logic of calculating heap size * Remove the old code to calculate the heap size * Adding new logic with proper documentation to upgrade cassandra heap size as per the best practice * Asniblizing resource_crunch variable * Changing the value to Hungarion notation for ansible bool character recognition * changing variable values to avoid ansible interpolation * change the documentation --- ansible/roles/cassandra/defaults/main.yml | 1 + .../cassandra/templates/cassandra-env.sh | 43 +++++++------------ 2 files changed, 17 insertions(+), 27 deletions(-) diff --git a/ansible/roles/cassandra/defaults/main.yml b/ansible/roles/cassandra/defaults/main.yml index 63145cb92..e0a1efbfa 100644 --- a/ansible/roles/cassandra/defaults/main.yml +++ b/ansible/roles/cassandra/defaults/main.yml @@ -1,3 +1,4 @@ user_home: /home/deployer cassandra_repo: 'deb http://www.apache.org/dist/cassandra/debian 311x main' cassandra_repo_key: 'https://www.apache.org/dist/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 diff --git a/ansible/roles/cassandra/templates/cassandra-env.sh b/ansible/roles/cassandra/templates/cassandra-env.sh index f94b1d4fe..77f85e560 100644 --- a/ansible/roles/cassandra/templates/cassandra-env.sh +++ b/ansible/roles/cassandra/templates/cassandra-env.sh @@ -1,3 +1,4 @@ +#!/bin/bash # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information @@ -49,41 +50,28 @@ calculate_heap_sizes() system_cpu_cores="1" fi - # set max heap size based on the following - # max(min(1/2 ram, 1024MB), min(1/4 ram, 8GB)) - # calculate 1/2 ram and cap to 1024MB - # calculate 1/4 ram and cap to 8192MB - # pick the max + # New Logic to pick the heap size + # If resource_crunch == yes then take quarter size of the Server + # else take half the size of the server and if half server Size exceeds 12GB then always take 12GB as the max heap size + half_system_memory_in_mb=`expr $system_memory_in_mb / 2` quarter_system_memory_in_mb=`expr $half_system_memory_in_mb / 2` - if [ "$half_system_memory_in_mb" -gt "1024" ] + + resource_crunch="{{resource_crunch}}" + if [ $resource_crunch = "yes" ]; then - half_system_memory_in_mb="1024" + MAX_HEAP_SIZE="${quarter_system_memory_in_mb}M" fi - if [ "$quarter_system_memory_in_mb" -gt "8192" ] + + if [ $resource_crunch != "yes" -a $half_system_memory_in_mb > 12288 ]; then - quarter_system_memory_in_mb="8192" - fi - if [ "$half_system_memory_in_mb" -gt "$quarter_system_memory_in_mb" ] + MAX_HEAP_SIZE="12288M" + elif [ "$resource_crunch" != "yes" ] then - max_heap_size_in_mb="$half_system_memory_in_mb" - else - max_heap_size_in_mb="$quarter_system_memory_in_mb" + MAX_HEAP_SIZE="${half_system_memory_in_mb}M" fi - MAX_HEAP_SIZE="${max_heap_size_in_mb}M" - - # Young gen: min(max_sensible_per_modern_cpu_core * num_cores, 1/4 * heap size) - max_sensible_yg_per_core_in_mb="100" - max_sensible_yg_in_mb=`expr $max_sensible_yg_per_core_in_mb "*" $system_cpu_cores` - - desired_yg_in_mb=`expr $max_heap_size_in_mb / 4` - if [ "$desired_yg_in_mb" -gt "$max_sensible_yg_in_mb" ] - then - HEAP_NEWSIZE="${max_sensible_yg_in_mb}M" - else - HEAP_NEWSIZE="${desired_yg_in_mb}M" - fi + HEAP_NEWSIZE=$MAX_HEAP_SIZE } # Determine the sort of JVM we'll be running on. @@ -294,3 +282,4 @@ JVM_OPTS="$JVM_OPTS -Djava.library.path=$CASSANDRA_HOME/lib/sigar-bin" JVM_OPTS="$JVM_OPTS $MX4J_ADDRESS" JVM_OPTS="$JVM_OPTS $MX4J_PORT" JVM_OPTS="$JVM_OPTS $JVM_EXTRA_OPTS" + From 7a0de1782b32cbc498eaad9026b9b8e8e1c94914 Mon Sep 17 00:00:00 2001 From: deveshMantra <48819442+deveshMantra@users.noreply.github.com> Date: Thu, 7 May 2020 16:24:08 +0530 Subject: [PATCH 2402/2894] Issue SH-42 fix:login page UX upgrade (#1454) --- ansible/artifacts/sunbird/login/login.ftl | 73 ++--- .../login/messages/messages_en.properties | 4 +- .../sunbird/login/resources/css/login.css | 255 ++++++++++++++++-- .../login/resources/img/arrow_back.png | Bin 0 -> 556 bytes .../sunbird/login/resources/img/google.svg | 21 ++ .../login/resources/img/onboard_bg.svg | 25 ++ 6 files changed, 316 insertions(+), 62 deletions(-) create mode 100644 ansible/artifacts/sunbird/login/resources/img/arrow_back.png create mode 100644 ansible/artifacts/sunbird/login/resources/img/google.svg create mode 100644 ansible/artifacts/sunbird/login/resources/img/onboard_bg.svg diff --git a/ansible/artifacts/sunbird/login/login.ftl b/ansible/artifacts/sunbird/login/login.ftl index 8ed74a7d6..ee9690e74 100644 --- a/ansible/artifacts/sunbird/login/login.ftl +++ b/ansible/artifacts/sunbird/login/login.ftl @@ -5,17 +5,16 @@ <#elseif section = "header"> <#elseif section = "form"> <#if realm.password> -
-
-
-
+
+
-
${msg("loginDiksha")}
+
${msg("loginDiksha")}
+

Login as

${msg("mergeAccountMessage")}

${msg("migrateAccountMessage")}

-
+
<#if message?has_content>
${message.summary} @@ -40,20 +39,17 @@ <#if usernameEditDisabled??> <#-- TODO: need to find alternative for prepopulating username --> - + <#else> - +
-
+
- <#if realm.resetPasswordAllowed> - ${msg("doForgotPassword")} - - + @@ -61,8 +57,27 @@ ${msg("inCorrectPasswordError")}
-
- +
+
+ + +
+
+ <#if realm.resetPasswordAllowed> + ${msg("doForgotPassword")} + + +
+
+ +
+ +
+ <#if realm.password && realm.registrationAllowed && !usernameEditDisabled??> ?> +
+
+ ${msg("noAccount")} ${msg("registerHere")} +
@@ -77,28 +92,22 @@ - - +
- <#if realm.password && realm.registrationAllowed && !usernameEditDisabled??> -
-
- ${msg("noAccount")} ${msg("registerHere")} -
-
-
- ${msg("goBack")} -
-
-
+ ${msg("goBack")} + +
- + \ No newline at end of file diff --git a/ansible/artifacts/sunbird/login/messages/messages_en.properties b/ansible/artifacts/sunbird/login/messages/messages_en.properties index 35f170ea0..c9672d19b 100644 --- a/ansible/artifacts/sunbird/login/messages/messages_en.properties +++ b/ansible/artifacts/sunbird/login/messages/messages_en.properties @@ -11,7 +11,7 @@ doNo=No doContinue=Continue doAccept=Accept doDecline=Decline -doForgotPassword=Forgot? +doForgotPassword=Forget password? doClickHere=Click here doImpersonate=Impersonate kerberosNotConfigured=Kerberos Not Configured @@ -269,5 +269,5 @@ user_not_found=This Email Address/Mobile Number doesn''t belong to a valid user p3pPolicy=CP="This is not a P3P policy!" usernamePlaceholder = Enter your Registered Email address/Mobile number passwordPlaceholder = Enter password -loginDiksha = Log into DIKSHA +loginDiksha = Welcome to DIKSHA! registerHere = Register here diff --git a/ansible/artifacts/sunbird/login/resources/css/login.css b/ansible/artifacts/sunbird/login/resources/css/login.css index f1b09bf1a..2a66a7984 100644 --- a/ansible/artifacts/sunbird/login/resources/css/login.css +++ b/ansible/artifacts/sunbird/login/resources/css/login.css @@ -4,12 +4,16 @@ body{ position: relative; letter-spacing: 0.2px; } -.ui.container.fullpage-background-image{ - max-width: 320px !important; +.fullpage-background-image{ + width: 100% !important; margin: 0 auto !important; box-shadow: none !important; border: 0 !important; border-radius: 0 !important; + background: #EDF4F9; + display: flex; + align-items: center; + min-height: 100vh; } .fs-14{ font-size: 14px !important; @@ -31,24 +35,7 @@ body{ margin-top: 10px; color: #ff6979 !important; } -@media screen and (min-width: 768px) { - body{ - background-size: cover; - background-repeat: no-repeat; - min-height: 100vh; - background: url(../img/bg.svg) no-repeat center center fixed; - background-size: cover; - } - .ui.container.fullpage-background-image{ - max-width: 944px !important; - padding: 20px 0 !important; - margin: 30px auto!important; - box-shadow: 0 2px 16px 0 rgba(0,0,0,0.2) !important; - border-radius: 4px !important; - border: 1px solid #d8dee2 !important; - } -} .ui.button:focus{ box-shadow: 0 2px 8px 0 rgba(0,0,0,.16) !important; } @@ -68,10 +55,10 @@ input:focus{ border: 1px solid #024f9d !important; } .signInWithGoogle{ - /* vertical-align: bottom; */ - height: 18px !important; - margin-right: 8px; - + position: absolute; + left: 0px; + top: 0px; + width: 34px; } .ui.basic.blue.button.googleButton{ color: #333 !important; @@ -101,11 +88,12 @@ input:focus{ background-repeat:no-repeat; font-weight: 700; font-size: 12px; + opacity: 50%; } .signUpMsg{ font-size: 12px; line-height: 17px; - text-align: center; + text-align: left; /*margin-top: auto !important;*/ margin-bottom: 10px !important; } @@ -114,11 +102,23 @@ input:focus{ line-height: 22px; } .signInHead{ - font-size: 14px; + color: #024F9D; + font-size: 24px; font-weight: bold; + letter-spacing: 0; + line-height: 32px; + text-align: center; +} +p.subtitle { + color: #333333; + font-size: 18px; + font-weight: bold; + letter-spacing: 0; + line-height: 26px; + text-align: center; } .ui.form .field>label { - font-size: 1.05em; + font-size: 14px; font-weight: 500; } .forgetPasswordLink{ @@ -143,6 +143,21 @@ input:focus{ .mb-0{ margin-bottom: 0px !important; } +.mb-4 { + margin-bottom: 4px !important; +} +.ml-4 { + margin-left: 4px !important; +} +.mb-8 { + margin-bottom: 8px !important; +} +.mt-4 { + margin-top: 4px !important; +} +.mt-8 { + margin-top: 8px !important; +} .mt-46{ margin-top: 46px; } @@ -155,6 +170,9 @@ input:focus{ .mt-16 { margin-top: 16px !important; } +.mt-24 { + margin-top: 24px !important; +} .mb-18 { margin-bottom: 18px !important; } @@ -199,7 +217,6 @@ input:focus{ max-width: 100% !important; width: auto !important; max-height: 56px !important; - margin-top: 20px!important; } .button{ color: #F9F9F9 !important; @@ -216,6 +233,9 @@ input:focus{ } .ui.text.error{ color:#9f3a38; + font-size: 14px; + display: block; + margin-top: 8px;margin-bottom: 8px; } .ui.text.info{ color:#276f86; @@ -326,7 +346,7 @@ h1, h2, h3, h4, h5, outline: 0; display: inline-block; border: 1px solid; - color: var(--white); + color: #fff; cursor: pointer; min-width: 64px; border-radius: 3px; @@ -402,4 +422,183 @@ h1, h2, h3, h4, h5, .flex-jc-center { justify-content: center !important; +} + + +/* new layout */ +#kc-form-wrapper { + display: flex; + align-items: flex-start; + /* justify-content: center; */ + height: 100%; + padding: 32px; + background: #edf4f9; +} +.container-wrapper { + max-width: 328px; + margin:0 auto; + min-height: 100vh; + display: flex; + flex-direction: column; + justify-content: center; +} +.remember-forgot-row { + display: flex; + flex-direction: row-reverse; + justify-content: space-between; + align-items: center; +} +.forgot-password { + font-size:11px; + color:#333; +} +.forgot-password:hover { + color:#024f9d; + text-decoration: underline; + cursor: pointer; +} +.sb-checkbox, .sb-radio-btn-checkbox { + position: relative; + display: block; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + outline: 0; + font-style: normal; + line-height: 1rem; + min-height: 1rem; + min-width: 1rem; +} +.sb-checkbox input[type="checkbox"] { + outline: 0; + opacity: 0; +} +.sb-checkbox input[type="radio"], .sb-checkbox input[type="checkbox"], .sb-radio-btn-checkbox input[type="radio"], .sb-radio-btn-checkbox input[type="checkbox"] { + cursor: pointer; + position: absolute; + top: 0; + left: 0; + opacity: 0; + z-index: 3; + width: 1rem; + height: 1rem; +} +[type=checkbox], [type=radio] { + box-sizing: border-box; + padding: 0; +} +.sb-checkbox label, .sb-radio-btn-checkbox label { + cursor: pointer; + position: relative; + display: block; + padding-left: 1.5rem; + outline: 0; + font-size: 0.8571rem; + font-weight: normal; + margin-right: 0.5rem; +} +.sb-checkbox.sb-checkbox-secondary input:checked ~ label:before { + background-color: #00c786; + border-color: #00c786; + border-radius: 50%; +} +.sb-checkbox input:checked ~ label:before { + background-color: #024f9d; + border-color: #024f9d; +} +.sb-checkbox label:before { + border-radius: 0.25rem; +} +.sb-checkbox label:before, .sb-radio-btn-checkbox label:before { + content: "\2713"; + position: absolute; + top: 0; + left: 0; + width: 1rem; + height: 1rem; + background: #fff; + transition: border 0.1s ease, opacity 0.1s ease, transform 0.1s ease, box-shadow 0.1s ease; + border: 0.0625rem solid #999; + border-radius: 50%; + color: #999; + padding-left:1px; +} +.sb-checkbox input:checked ~ .box:after, .sb-checkbox input:checked ~ label:after { + content: "\2713"; + border-radius: 0.25rem; + font-weight: normal; + color: #fff !important; +} + +.sb-checkbox input:checked ~ .box:after, .sb-checkbox input:checked ~ label:after { + opacity: 1; +} +.sb-checkbox label:after { + position: absolute; + font-size: 0.8571rem; + top: 0; + left: 0; + width: 1rem; + height: 1rem; + text-align: center; + opacity: 0; + color: #fff; + transition: border 0.1s ease, opacity 0.1s ease, transform 0.1s ease, box-shadow 0.1s ease; +} + +.sb-btn-outline-gray { + background-color: #fff; + color: #024f9d; + border-color:#999; +} +.back-btn { + position: absolute; + left: 8px; + top: 16px; + min-width: auto; + display: flex; + justify-content: center; + align-items: center; +} +.pull-left { + float:left; +} +.pull-right { + float:right; +} +.sb-btn-link { + background: none; + border: 0; +} +.sb-btn-link-primary { + background: none; + border: 0px; + color: #024f9d; +} + +@media screen and (min-width: 768px) { + body{ + background-size: cover; + background-repeat: no-repeat; + min-height: 100vh; + background: url(../img/onboard_bg.svg) no-repeat center center fixed; + background-size: cover; + + } + .fullpage-background-image{ + max-width: 1008px !important; + width:100%; + padding: 40px !important; + /* box-shadow: 0 2px 16px 0 rgba(0,0,0,0.2) !important; */ + border-radius: 8px !important; + min-height: 600px; + } + #kc-form-wrapper { + height: 100vh; + padding: 32px; + background: none; + align-items: center; + } + .container-wrapper { + min-height: auto; + } } \ No newline at end of file diff --git a/ansible/artifacts/sunbird/login/resources/img/arrow_back.png b/ansible/artifacts/sunbird/login/resources/img/arrow_back.png new file mode 100644 index 0000000000000000000000000000000000000000..87cca9e863cb2972ce5841c815055725f8f2f0f4 GIT binary patch literal 556 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpTC#^NA%Cx&(BWL^R}E~ycoX}-P; zT0k}j17mw80}DtA5K93u0|WB{Mh0de%?J`(zyy~ySip>6gB0F2&*1?oo95}_7?Qzy z^`>=Rvx5Lzg4w&8Mvnp>iw0Hm%;H5B+dbx5nR`5Dc6jXUFxkqN%cgnDq`-mcRYV>$}$Vcf@UD~Gc{=>iMesXVy z!?_PUolH;oQiW zZ;M$5c}&XC=J3SGRp;#WFYj)W|yC!wh%j8X0zUm>tPsdlP%1C4wbmR%d8~ z*by}c<|J_i*@r9>dJ5P)Tq_t=l=d)Q5^!Yj>_})3aS?G~Qj(e=&B$1xWcM=gPyhaA z2?K`qo7G*W$7(KQU(0tXh-T)x;S})W`?g&DZHBLS*mV?xTHWuqT(#PB>{;?xrUUHd X@-?+O0iM})pqTP>^>bP0l+XkK4mZYK literal 0 HcmV?d00001 diff --git a/ansible/artifacts/sunbird/login/resources/img/google.svg b/ansible/artifacts/sunbird/login/resources/img/google.svg new file mode 100644 index 000000000..cc0184eb0 --- /dev/null +++ b/ansible/artifacts/sunbird/login/resources/img/google.svg @@ -0,0 +1,21 @@ + + + + E9824911-08AE-4CF9-8FC4-7A3718DAA2D2 + Created with sketchtool. + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ansible/artifacts/sunbird/login/resources/img/onboard_bg.svg b/ansible/artifacts/sunbird/login/resources/img/onboard_bg.svg new file mode 100644 index 000000000..c726973a7 --- /dev/null +++ b/ansible/artifacts/sunbird/login/resources/img/onboard_bg.svg @@ -0,0 +1,25 @@ + + + + C92B0B70-3C7D-4A4B-9DB8-F758FF86CD1B@3x + Created with sketchtool. + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 078c0b64eae102b16ec9ab6316d316e5f6e24897 Mon Sep 17 00:00:00 2001 From: G33tha Date: Thu, 7 May 2020 18:05:01 +0530 Subject: [PATCH 2403/2894] added summary function to all deploy and provision jenkins file (#1428) * #000 added jenkins file for creating RC tag * #000 deleted jenkins file * #000 added summary function to all deploy and provision jenkins file Co-authored-by: G33tha --- .../pipelines/bootstrap_core/Jenkinsfile | 3 +- .../pipelines/bootstrap_minimal/Jenkinsfile | 3 +- kubernetes/pipelines/common/Jenkinsfile | 3 +- kubernetes/pipelines/deploy_core/Jenkinsfile | 3 +- .../pipelines/deploy_core/Jenkinsfile.player | 3 +- kubernetes/pipelines/logging/Jenkinsfile | 3 +- kubernetes/pipelines/monitoring/Jenkinsfile | 3 +- kubernetes/pipelines/onboard-api/Jenkinsfile | 3 +- .../pipelines/onboard-consumer/Jenkinsfile | 3 +- kubernetes/pipelines/proxy_config/Jenkinsfile | 3 +- pipelines/deploy/CEPlugins/Jenkinsfile | 3 +- pipelines/deploy/CollectionEditor/Jenkinsfile | 3 +- pipelines/deploy/ContentFramework/Jenkinsfile | 3 +- .../deploy/ContentRendererPreview/Jenkinsfile | 3 +- pipelines/deploy/GenericEditor/Jenkinsfile | 3 +- pipelines/deploy/adminutils/Jenkinsfile | 3 +- pipelines/deploy/am-onboard-apis/Jenkinsfile | 3 +- .../deploy/am-onboard-consumers/Jenkinsfile | 3 +- pipelines/deploy/api-manager/Jenkinsfile | 3 +- .../application-elasticsearch/Jenkinsfile | 3 +- pipelines/deploy/assessment/Jenkinsfile | 3 +- pipelines/deploy/badger/Jenkinsfile | 3 +- pipelines/deploy/cassandra-deploy/Jenkinsfile | 3 +- .../cassandra-deploy/Jenkinsfile.decrypt | 3 +- .../Jenkinsfile.stateValidated | 3 +- .../Jenkinsfile.stateValidated.sync | 3 +- .../cassandra-deploy/Jenkinsfile.trigger | 3 +- .../deploy/cert-registry-service/Jenkinsfile | 3 +- pipelines/deploy/cert/Jenkinsfile | 3 +- pipelines/deploy/config-service/Jenkinsfile | 3 +- pipelines/deploy/content/Jenkinsfile | 3 +- pipelines/deploy/desktop-faq/Jenkinsfile | 3 +- pipelines/deploy/druid-proxy/Jenkinsfile | 3 +- pipelines/deploy/enc/Jenkinsfile | 3 +- pipelines/deploy/kafka/Jenkinsfile | 3 +- .../deploy/keycloak-migration/Jenkinsfile | 3 +- pipelines/deploy/keycloak-realm/Jenkinsfile | 3 +- .../deploy/keycloak-realm/Jenkinsfile.user | 3 +- pipelines/deploy/keycloak/Jenkinsfile | 3 +- pipelines/deploy/keycloak/Jenkinsfile.user | 3 +- .../deploy/knowledge-mw-service/Jenkinsfile | 3 +- pipelines/deploy/learner/Jenkinsfile | 3 +- pipelines/deploy/lms/Jenkinsfile | 3 +- .../deploy/logger-elasticsearch/Jenkinsfile | 3 +- pipelines/deploy/logger/Jenkinsfile | 3 +- pipelines/deploy/logstash/Jenkinsfile | 3 +- pipelines/deploy/ml-workbench/Jenkinsfile | 3 +- pipelines/deploy/monitor/Core/Jenkinsfile | 3 +- .../deploy/monitor/DataPipeline/Jenkinsfile | 3 +- pipelines/deploy/monitor/Jenkinsfile | 3 +- .../monitor/KnowledgePlatform/Jenkinsfile | 3 +- pipelines/deploy/monitor/prom-fed/Jenkinsfile | 3 +- pipelines/deploy/notification/Jenkinsfile | 3 +- pipelines/deploy/oauth/Jenkinsfile | 3 +- .../org_sunbird_questionunit_quml/Jenkinsfile | 3 +- pipelines/deploy/player/Jenkinsfile | 3 +- pipelines/deploy/print-service/Jenkinsfile | 3 +- pipelines/deploy/proxy-private/Jenkinsfile | 3 +- pipelines/deploy/proxy/Jenkinsfile | 3 +- pipelines/deploy/report/Jenkinsfile | 3 +- pipelines/deploy/search/Jenkinsfile | 3 +- pipelines/deploy/taxonomy/Jenkinsfile | 3 +- .../Jenkinsfile | 3 +- .../deploy/telemetry-logstash/Jenkinsfile | 3 +- pipelines/deploy/telemetry/Jenkinsfile | 3 +- pipelines/deploy/userorg/Jenkinsfile | 3 +- pipelines/deploy/yarn/Jenkinsfile | 3 +- pipelines/esmapping/Jenkinsfile | 1 + pipelines/offlineinstaller/Jenkinsfile | 6 +- pipelines/provision/cassandra/Jenkinsfile | 3 +- pipelines/provision/jenkins-slave/Jenkinsfile | 3 +- pipelines/provision/kafka/Jenkinsfile | 3 +- pipelines/provision/keycloak/Jenkinsfile | 3 +- pipelines/provision/keycloak/Jenkinsfile.user | 3 +- .../provision/log-es-upgrade/Jenkinsfile | 3 +- .../log-es-upgrade/Jenkinsfile.latest | 3 +- pipelines/provision/log-es/Jenkinsfile | 3 +- pipelines/provision/logstash/Jenkinsfile | 3 +- pipelines/provision/ml-workbench/Jenkinsfile | 3 +- .../postgres-db-update-managed/Jenkinsfile | 3 +- .../provision/postgres-db-update/Jenkinsfile | 3 +- pipelines/provision/postgres/Jenkinsfile | 3 +- pipelines/provision/redis-cluster/Jenkinsfile | 3 +- pipelines/provision/registry/Jenkinsfile | 3 +- pipelines/provision/secor/Jenkinsfile | 3 +- pipelines/release/Jenkinsfile.hotfix.rc.tag | 135 ++++++++++++++++++ pipelines/release/Jenkinsfile.staging.rc.tag | 128 +++++++++++++++++ 87 files changed, 434 insertions(+), 85 deletions(-) create mode 100644 pipelines/release/Jenkinsfile.hotfix.rc.tag create mode 100644 pipelines/release/Jenkinsfile.staging.rc.tag diff --git a/kubernetes/pipelines/bootstrap_core/Jenkinsfile b/kubernetes/pipelines/bootstrap_core/Jenkinsfile index d2522d2d1..1811a6e1a 100644 --- a/kubernetes/pipelines/bootstrap_core/Jenkinsfile +++ b/kubernetes/pipelines/bootstrap_core/Jenkinsfile @@ -33,7 +33,8 @@ node() { ansible_playbook_run(values) currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } - } + summary() + } catch (err) { currentBuild.result = "FAILURE" throw err diff --git a/kubernetes/pipelines/bootstrap_minimal/Jenkinsfile b/kubernetes/pipelines/bootstrap_minimal/Jenkinsfile index aaa32d2d3..e70b782da 100644 --- a/kubernetes/pipelines/bootstrap_minimal/Jenkinsfile +++ b/kubernetes/pipelines/bootstrap_minimal/Jenkinsfile @@ -33,7 +33,8 @@ node() { ansible_playbook_run(values) currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } - } + summary() + } catch (err) { currentBuild.result = "FAILURE" throw err diff --git a/kubernetes/pipelines/common/Jenkinsfile b/kubernetes/pipelines/common/Jenkinsfile index 619f04501..de1e15502 100644 --- a/kubernetes/pipelines/common/Jenkinsfile +++ b/kubernetes/pipelines/common/Jenkinsfile @@ -35,7 +35,8 @@ node() { ansible_playbook_run(values) currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } - } + summary() + } catch (err) { currentBuild.result = "FAILURE" throw err diff --git a/kubernetes/pipelines/deploy_core/Jenkinsfile b/kubernetes/pipelines/deploy_core/Jenkinsfile index 23cee8791..240e1d91b 100644 --- a/kubernetes/pipelines/deploy_core/Jenkinsfile +++ b/kubernetes/pipelines/deploy_core/Jenkinsfile @@ -30,7 +30,8 @@ node() { 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 diff --git a/kubernetes/pipelines/deploy_core/Jenkinsfile.player b/kubernetes/pipelines/deploy_core/Jenkinsfile.player index 7f56f9251..8fb9ba237 100644 --- a/kubernetes/pipelines/deploy_core/Jenkinsfile.player +++ b/kubernetes/pipelines/deploy_core/Jenkinsfile.player @@ -34,7 +34,8 @@ node() { currentBuild.description = "Image: ${values.image_tag}, Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = "FAILURE" throw err diff --git a/kubernetes/pipelines/logging/Jenkinsfile b/kubernetes/pipelines/logging/Jenkinsfile index 5bc282155..a59306e4c 100644 --- a/kubernetes/pipelines/logging/Jenkinsfile +++ b/kubernetes/pipelines/logging/Jenkinsfile @@ -34,7 +34,8 @@ node() { ansible_playbook_run(values) currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } - } + summary() + } catch (err) { currentBuild.result = "FAILURE" throw err diff --git a/kubernetes/pipelines/monitoring/Jenkinsfile b/kubernetes/pipelines/monitoring/Jenkinsfile index 34eabe884..94f6a79ef 100644 --- a/kubernetes/pipelines/monitoring/Jenkinsfile +++ b/kubernetes/pipelines/monitoring/Jenkinsfile @@ -33,7 +33,8 @@ node() { ansible_playbook_run(values) currentBuild.description = "Image: ${values.image_tag}, Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } - } + summary() + } catch (err) { currentBuild.result = "FAILURE" throw err diff --git a/kubernetes/pipelines/onboard-api/Jenkinsfile b/kubernetes/pipelines/onboard-api/Jenkinsfile index 1907d8f9d..4f37e268f 100644 --- a/kubernetes/pipelines/onboard-api/Jenkinsfile +++ b/kubernetes/pipelines/onboard-api/Jenkinsfile @@ -38,7 +38,8 @@ node() { currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/kubernetes/pipelines/onboard-consumer/Jenkinsfile b/kubernetes/pipelines/onboard-consumer/Jenkinsfile index 8cd71449b..acbf77201 100644 --- a/kubernetes/pipelines/onboard-consumer/Jenkinsfile +++ b/kubernetes/pipelines/onboard-consumer/Jenkinsfile @@ -38,7 +38,8 @@ node() { currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/kubernetes/pipelines/proxy_config/Jenkinsfile b/kubernetes/pipelines/proxy_config/Jenkinsfile index 4e22335a8..fa9afd203 100644 --- a/kubernetes/pipelines/proxy_config/Jenkinsfile +++ b/kubernetes/pipelines/proxy_config/Jenkinsfile @@ -30,7 +30,8 @@ node() { 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 diff --git a/pipelines/deploy/CEPlugins/Jenkinsfile b/pipelines/deploy/CEPlugins/Jenkinsfile index 4bf343401..fea1e8081 100644 --- a/pipelines/deploy/CEPlugins/Jenkinsfile +++ b/pipelines/deploy/CEPlugins/Jenkinsfile @@ -46,7 +46,8 @@ node() { currentBuild.description = "Artifact: ${values.artifact_version}, Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/deploy/CollectionEditor/Jenkinsfile b/pipelines/deploy/CollectionEditor/Jenkinsfile index 5d5c88a5f..9fade4d66 100644 --- a/pipelines/deploy/CollectionEditor/Jenkinsfile +++ b/pipelines/deploy/CollectionEditor/Jenkinsfile @@ -68,7 +68,8 @@ node() { currentBuild.description = "Artifact: ${values.artifact_version}, Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/deploy/ContentFramework/Jenkinsfile b/pipelines/deploy/ContentFramework/Jenkinsfile index ca8839792..aefef6123 100644 --- a/pipelines/deploy/ContentFramework/Jenkinsfile +++ b/pipelines/deploy/ContentFramework/Jenkinsfile @@ -83,7 +83,8 @@ node() { currentBuild.description = "Artifact: ${values.artifact_version}, Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/deploy/ContentRendererPreview/Jenkinsfile b/pipelines/deploy/ContentRendererPreview/Jenkinsfile index cffc070ef..cb3d1dd4d 100644 --- a/pipelines/deploy/ContentRendererPreview/Jenkinsfile +++ b/pipelines/deploy/ContentRendererPreview/Jenkinsfile @@ -51,7 +51,8 @@ node() { currentBuild.description = "Artifact: ${values.artifact_version}, Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/deploy/GenericEditor/Jenkinsfile b/pipelines/deploy/GenericEditor/Jenkinsfile index 2251eda44..b94bbb33c 100644 --- a/pipelines/deploy/GenericEditor/Jenkinsfile +++ b/pipelines/deploy/GenericEditor/Jenkinsfile @@ -67,7 +67,8 @@ node() { currentBuild.description = "Artifact: ${values.artifact_version}, Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/deploy/adminutils/Jenkinsfile b/pipelines/deploy/adminutils/Jenkinsfile index eb480ebe3..e3455003b 100644 --- a/pipelines/deploy/adminutils/Jenkinsfile +++ b/pipelines/deploy/adminutils/Jenkinsfile @@ -22,7 +22,8 @@ node() { 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 diff --git a/pipelines/deploy/am-onboard-apis/Jenkinsfile b/pipelines/deploy/am-onboard-apis/Jenkinsfile index a035916a5..05172b826 100644 --- a/pipelines/deploy/am-onboard-apis/Jenkinsfile +++ b/pipelines/deploy/am-onboard-apis/Jenkinsfile @@ -38,7 +38,8 @@ node() { currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/deploy/am-onboard-consumers/Jenkinsfile b/pipelines/deploy/am-onboard-consumers/Jenkinsfile index 108cd9db7..a352e8e42 100644 --- a/pipelines/deploy/am-onboard-consumers/Jenkinsfile +++ b/pipelines/deploy/am-onboard-consumers/Jenkinsfile @@ -38,7 +38,8 @@ node() { currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/deploy/api-manager/Jenkinsfile b/pipelines/deploy/api-manager/Jenkinsfile index b7738577d..8100e2ef4 100644 --- a/pipelines/deploy/api-manager/Jenkinsfile +++ b/pipelines/deploy/api-manager/Jenkinsfile @@ -22,7 +22,8 @@ node() { 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 diff --git a/pipelines/deploy/application-elasticsearch/Jenkinsfile b/pipelines/deploy/application-elasticsearch/Jenkinsfile index 01ba134c5..ea806ff96 100644 --- a/pipelines/deploy/application-elasticsearch/Jenkinsfile +++ b/pipelines/deploy/application-elasticsearch/Jenkinsfile @@ -38,7 +38,8 @@ node() { currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/deploy/assessment/Jenkinsfile b/pipelines/deploy/assessment/Jenkinsfile index 981acd318..3cd4dadc9 100644 --- a/pipelines/deploy/assessment/Jenkinsfile +++ b/pipelines/deploy/assessment/Jenkinsfile @@ -23,7 +23,8 @@ node() { 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 diff --git a/pipelines/deploy/badger/Jenkinsfile b/pipelines/deploy/badger/Jenkinsfile index 96ea1b94d..796642638 100644 --- a/pipelines/deploy/badger/Jenkinsfile +++ b/pipelines/deploy/badger/Jenkinsfile @@ -23,7 +23,8 @@ node() { 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 diff --git a/pipelines/deploy/cassandra-deploy/Jenkinsfile b/pipelines/deploy/cassandra-deploy/Jenkinsfile index 49339b37b..903c1568b 100644 --- a/pipelines/deploy/cassandra-deploy/Jenkinsfile +++ b/pipelines/deploy/cassandra-deploy/Jenkinsfile @@ -41,7 +41,8 @@ node() { currentBuild.description = "Artifact: ${values.artifact_version}, Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = "FAILURE" throw err diff --git a/pipelines/deploy/cassandra-deploy/Jenkinsfile.decrypt b/pipelines/deploy/cassandra-deploy/Jenkinsfile.decrypt index 8dcbecf51..c695d7a97 100644 --- a/pipelines/deploy/cassandra-deploy/Jenkinsfile.decrypt +++ b/pipelines/deploy/cassandra-deploy/Jenkinsfile.decrypt @@ -41,7 +41,8 @@ node() { currentBuild.description = "Artifact: ${values.artifact_version}, Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = "FAILURE" throw err diff --git a/pipelines/deploy/cassandra-deploy/Jenkinsfile.stateValidated b/pipelines/deploy/cassandra-deploy/Jenkinsfile.stateValidated index 59ec4e184..31e0addf9 100644 --- a/pipelines/deploy/cassandra-deploy/Jenkinsfile.stateValidated +++ b/pipelines/deploy/cassandra-deploy/Jenkinsfile.stateValidated @@ -43,7 +43,8 @@ node() { currentBuild.description = "Artifact: ${values.artifact_version}, Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = "FAILURE" throw err diff --git a/pipelines/deploy/cassandra-deploy/Jenkinsfile.stateValidated.sync b/pipelines/deploy/cassandra-deploy/Jenkinsfile.stateValidated.sync index f44ebc52a..80118267a 100644 --- a/pipelines/deploy/cassandra-deploy/Jenkinsfile.stateValidated.sync +++ b/pipelines/deploy/cassandra-deploy/Jenkinsfile.stateValidated.sync @@ -43,7 +43,8 @@ node() { currentBuild.description = "Artifact: ${values.artifact_version}, Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = "FAILURE" throw err diff --git a/pipelines/deploy/cassandra-deploy/Jenkinsfile.trigger b/pipelines/deploy/cassandra-deploy/Jenkinsfile.trigger index d462f249f..63acbc12f 100644 --- a/pipelines/deploy/cassandra-deploy/Jenkinsfile.trigger +++ b/pipelines/deploy/cassandra-deploy/Jenkinsfile.trigger @@ -42,7 +42,8 @@ node() { currentBuild.description = "Artifact: ${values.artifact_version}, Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = "FAILURE" throw err diff --git a/pipelines/deploy/cert-registry-service/Jenkinsfile b/pipelines/deploy/cert-registry-service/Jenkinsfile index caee4a99c..dc77fdba3 100644 --- a/pipelines/deploy/cert-registry-service/Jenkinsfile +++ b/pipelines/deploy/cert-registry-service/Jenkinsfile @@ -23,7 +23,8 @@ node() { 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 diff --git a/pipelines/deploy/cert/Jenkinsfile b/pipelines/deploy/cert/Jenkinsfile index 928932a94..e8c15a621 100644 --- a/pipelines/deploy/cert/Jenkinsfile +++ b/pipelines/deploy/cert/Jenkinsfile @@ -23,7 +23,8 @@ node() { 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 diff --git a/pipelines/deploy/config-service/Jenkinsfile b/pipelines/deploy/config-service/Jenkinsfile index 35fbe7eea..0867cefdd 100644 --- a/pipelines/deploy/config-service/Jenkinsfile +++ b/pipelines/deploy/config-service/Jenkinsfile @@ -23,7 +23,8 @@ node() { 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 diff --git a/pipelines/deploy/content/Jenkinsfile b/pipelines/deploy/content/Jenkinsfile index d1f79e7ac..64bd7dd09 100644 --- a/pipelines/deploy/content/Jenkinsfile +++ b/pipelines/deploy/content/Jenkinsfile @@ -23,7 +23,8 @@ node() { 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 diff --git a/pipelines/deploy/desktop-faq/Jenkinsfile b/pipelines/deploy/desktop-faq/Jenkinsfile index 88052ae58..a71970014 100644 --- a/pipelines/deploy/desktop-faq/Jenkinsfile +++ b/pipelines/deploy/desktop-faq/Jenkinsfile @@ -36,7 +36,8 @@ node() { ansible_playbook_run(values) } } - } + summary() + } catch (err) { throw err } diff --git a/pipelines/deploy/druid-proxy/Jenkinsfile b/pipelines/deploy/druid-proxy/Jenkinsfile index 145f23e2d..584f7728e 100644 --- a/pipelines/deploy/druid-proxy/Jenkinsfile +++ b/pipelines/deploy/druid-proxy/Jenkinsfile @@ -23,7 +23,8 @@ node() { 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 diff --git a/pipelines/deploy/enc/Jenkinsfile b/pipelines/deploy/enc/Jenkinsfile index 8283734e1..b2e8d8a7a 100644 --- a/pipelines/deploy/enc/Jenkinsfile +++ b/pipelines/deploy/enc/Jenkinsfile @@ -23,7 +23,8 @@ node() { 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 diff --git a/pipelines/deploy/kafka/Jenkinsfile b/pipelines/deploy/kafka/Jenkinsfile index 98b9fdc41..820710804 100644 --- a/pipelines/deploy/kafka/Jenkinsfile +++ b/pipelines/deploy/kafka/Jenkinsfile @@ -36,7 +36,8 @@ node() { ansible_playbook_run(values) } } - } + summary() + } catch (err) { throw err } diff --git a/pipelines/deploy/keycloak-migration/Jenkinsfile b/pipelines/deploy/keycloak-migration/Jenkinsfile index 8ef8ef1fa..d76fde89d 100644 --- a/pipelines/deploy/keycloak-migration/Jenkinsfile +++ b/pipelines/deploy/keycloak-migration/Jenkinsfile @@ -38,7 +38,8 @@ node() { currentBuild.description = "Artifact: ${values.artifact_version}, Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = "FAILURE" throw err diff --git a/pipelines/deploy/keycloak-realm/Jenkinsfile b/pipelines/deploy/keycloak-realm/Jenkinsfile index b8bc4cb5d..9fdc2a6a5 100644 --- a/pipelines/deploy/keycloak-realm/Jenkinsfile +++ b/pipelines/deploy/keycloak-realm/Jenkinsfile @@ -38,7 +38,8 @@ node() { currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/deploy/keycloak-realm/Jenkinsfile.user b/pipelines/deploy/keycloak-realm/Jenkinsfile.user index 6b7c3fe85..7cfaf4fd6 100644 --- a/pipelines/deploy/keycloak-realm/Jenkinsfile.user +++ b/pipelines/deploy/keycloak-realm/Jenkinsfile.user @@ -38,7 +38,8 @@ node() { currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/deploy/keycloak/Jenkinsfile b/pipelines/deploy/keycloak/Jenkinsfile index a9caff152..9bab4737d 100644 --- a/pipelines/deploy/keycloak/Jenkinsfile +++ b/pipelines/deploy/keycloak/Jenkinsfile @@ -46,7 +46,8 @@ node() { currentBuild.description = "Artifact: ${values.artifact_version}, Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = "FAILURE" throw err diff --git a/pipelines/deploy/keycloak/Jenkinsfile.user b/pipelines/deploy/keycloak/Jenkinsfile.user index ce1279d17..1f9469ec1 100644 --- a/pipelines/deploy/keycloak/Jenkinsfile.user +++ b/pipelines/deploy/keycloak/Jenkinsfile.user @@ -45,7 +45,8 @@ node() { currentBuild.description = "Artifact: ${values.artifact_version}, Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = "FAILURE" throw err diff --git a/pipelines/deploy/knowledge-mw-service/Jenkinsfile b/pipelines/deploy/knowledge-mw-service/Jenkinsfile index 3012dae5d..2aac81439 100644 --- a/pipelines/deploy/knowledge-mw-service/Jenkinsfile +++ b/pipelines/deploy/knowledge-mw-service/Jenkinsfile @@ -23,7 +23,8 @@ node() { 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 diff --git a/pipelines/deploy/learner/Jenkinsfile b/pipelines/deploy/learner/Jenkinsfile index 709aadc0a..c01252251 100644 --- a/pipelines/deploy/learner/Jenkinsfile +++ b/pipelines/deploy/learner/Jenkinsfile @@ -23,7 +23,8 @@ node() { 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 diff --git a/pipelines/deploy/lms/Jenkinsfile b/pipelines/deploy/lms/Jenkinsfile index 8d7808d0f..5441fa7ab 100644 --- a/pipelines/deploy/lms/Jenkinsfile +++ b/pipelines/deploy/lms/Jenkinsfile @@ -23,7 +23,8 @@ node() { 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 diff --git a/pipelines/deploy/logger-elasticsearch/Jenkinsfile b/pipelines/deploy/logger-elasticsearch/Jenkinsfile index 869449061..037398167 100644 --- a/pipelines/deploy/logger-elasticsearch/Jenkinsfile +++ b/pipelines/deploy/logger-elasticsearch/Jenkinsfile @@ -39,7 +39,8 @@ node() { currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/deploy/logger/Jenkinsfile b/pipelines/deploy/logger/Jenkinsfile index 88d2ec788..8050acc85 100644 --- a/pipelines/deploy/logger/Jenkinsfile +++ b/pipelines/deploy/logger/Jenkinsfile @@ -38,7 +38,8 @@ node() { currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/deploy/logstash/Jenkinsfile b/pipelines/deploy/logstash/Jenkinsfile index c43f55868..47455c87a 100644 --- a/pipelines/deploy/logstash/Jenkinsfile +++ b/pipelines/deploy/logstash/Jenkinsfile @@ -38,7 +38,8 @@ node() { currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/deploy/ml-workbench/Jenkinsfile b/pipelines/deploy/ml-workbench/Jenkinsfile index 3cdb112d7..406c176ac 100644 --- a/pipelines/deploy/ml-workbench/Jenkinsfile +++ b/pipelines/deploy/ml-workbench/Jenkinsfile @@ -23,7 +23,8 @@ node() { 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 diff --git a/pipelines/deploy/monitor/Core/Jenkinsfile b/pipelines/deploy/monitor/Core/Jenkinsfile index 0b99e6148..361a5a731 100644 --- a/pipelines/deploy/monitor/Core/Jenkinsfile +++ b/pipelines/deploy/monitor/Core/Jenkinsfile @@ -38,7 +38,8 @@ node() { currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/deploy/monitor/DataPipeline/Jenkinsfile b/pipelines/deploy/monitor/DataPipeline/Jenkinsfile index 7664c3754..ac10ce1ca 100644 --- a/pipelines/deploy/monitor/DataPipeline/Jenkinsfile +++ b/pipelines/deploy/monitor/DataPipeline/Jenkinsfile @@ -38,7 +38,8 @@ node() { currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/deploy/monitor/Jenkinsfile b/pipelines/deploy/monitor/Jenkinsfile index a682236d7..c6213a99c 100644 --- a/pipelines/deploy/monitor/Jenkinsfile +++ b/pipelines/deploy/monitor/Jenkinsfile @@ -38,7 +38,8 @@ node() { currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/deploy/monitor/KnowledgePlatform/Jenkinsfile b/pipelines/deploy/monitor/KnowledgePlatform/Jenkinsfile index d49dfbe71..dff740368 100644 --- a/pipelines/deploy/monitor/KnowledgePlatform/Jenkinsfile +++ b/pipelines/deploy/monitor/KnowledgePlatform/Jenkinsfile @@ -38,7 +38,8 @@ node() { currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/deploy/monitor/prom-fed/Jenkinsfile b/pipelines/deploy/monitor/prom-fed/Jenkinsfile index 6f9548982..d129a2061 100644 --- a/pipelines/deploy/monitor/prom-fed/Jenkinsfile +++ b/pipelines/deploy/monitor/prom-fed/Jenkinsfile @@ -38,7 +38,8 @@ node() { currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/deploy/notification/Jenkinsfile b/pipelines/deploy/notification/Jenkinsfile index 072137716..70898b338 100644 --- a/pipelines/deploy/notification/Jenkinsfile +++ b/pipelines/deploy/notification/Jenkinsfile @@ -23,7 +23,8 @@ node() { 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 diff --git a/pipelines/deploy/oauth/Jenkinsfile b/pipelines/deploy/oauth/Jenkinsfile index 88d2ec788..8050acc85 100644 --- a/pipelines/deploy/oauth/Jenkinsfile +++ b/pipelines/deploy/oauth/Jenkinsfile @@ -38,7 +38,8 @@ node() { currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/deploy/org_sunbird_questionunit_quml/Jenkinsfile b/pipelines/deploy/org_sunbird_questionunit_quml/Jenkinsfile index 059abfa99..b8173de1a 100644 --- a/pipelines/deploy/org_sunbird_questionunit_quml/Jenkinsfile +++ b/pipelines/deploy/org_sunbird_questionunit_quml/Jenkinsfile @@ -46,7 +46,8 @@ node() { currentBuild.description = "Artifact: ${values.artifact_version}, Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/deploy/player/Jenkinsfile b/pipelines/deploy/player/Jenkinsfile index 7f9dceb23..eee92ff2e 100644 --- a/pipelines/deploy/player/Jenkinsfile +++ b/pipelines/deploy/player/Jenkinsfile @@ -38,7 +38,8 @@ node() { currentBuild.description = "Image: ${values.image_tag}, Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = "FAILURE" throw err diff --git a/pipelines/deploy/print-service/Jenkinsfile b/pipelines/deploy/print-service/Jenkinsfile index 3166e3edd..05e343d77 100644 --- a/pipelines/deploy/print-service/Jenkinsfile +++ b/pipelines/deploy/print-service/Jenkinsfile @@ -23,7 +23,8 @@ node() { 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 diff --git a/pipelines/deploy/proxy-private/Jenkinsfile b/pipelines/deploy/proxy-private/Jenkinsfile index 99936d8fa..e752803d0 100644 --- a/pipelines/deploy/proxy-private/Jenkinsfile +++ b/pipelines/deploy/proxy-private/Jenkinsfile @@ -22,7 +22,8 @@ node() { 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 diff --git a/pipelines/deploy/proxy/Jenkinsfile b/pipelines/deploy/proxy/Jenkinsfile index 3ddf322d2..2deab107d 100644 --- a/pipelines/deploy/proxy/Jenkinsfile +++ b/pipelines/deploy/proxy/Jenkinsfile @@ -23,7 +23,8 @@ node() { 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 diff --git a/pipelines/deploy/report/Jenkinsfile b/pipelines/deploy/report/Jenkinsfile index a6ad6179c..aaece18e0 100644 --- a/pipelines/deploy/report/Jenkinsfile +++ b/pipelines/deploy/report/Jenkinsfile @@ -23,7 +23,8 @@ node() { 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 diff --git a/pipelines/deploy/search/Jenkinsfile b/pipelines/deploy/search/Jenkinsfile index 8267fc9df..ee0f705df 100644 --- a/pipelines/deploy/search/Jenkinsfile +++ b/pipelines/deploy/search/Jenkinsfile @@ -23,7 +23,8 @@ node() { 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 diff --git a/pipelines/deploy/taxonomy/Jenkinsfile b/pipelines/deploy/taxonomy/Jenkinsfile index 7a9e0973e..095d3f97c 100644 --- a/pipelines/deploy/taxonomy/Jenkinsfile +++ b/pipelines/deploy/taxonomy/Jenkinsfile @@ -23,7 +23,8 @@ node() { 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 diff --git a/pipelines/deploy/telemetry-logstash-datapipeline/Jenkinsfile b/pipelines/deploy/telemetry-logstash-datapipeline/Jenkinsfile index 1ec4a4e25..e6fade64f 100644 --- a/pipelines/deploy/telemetry-logstash-datapipeline/Jenkinsfile +++ b/pipelines/deploy/telemetry-logstash-datapipeline/Jenkinsfile @@ -38,7 +38,8 @@ node() { currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/deploy/telemetry-logstash/Jenkinsfile b/pipelines/deploy/telemetry-logstash/Jenkinsfile index 124ac45b8..1c0d2f5e5 100644 --- a/pipelines/deploy/telemetry-logstash/Jenkinsfile +++ b/pipelines/deploy/telemetry-logstash/Jenkinsfile @@ -38,7 +38,8 @@ node() { currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/deploy/telemetry/Jenkinsfile b/pipelines/deploy/telemetry/Jenkinsfile index fd4fd58bb..ad7556cf3 100644 --- a/pipelines/deploy/telemetry/Jenkinsfile +++ b/pipelines/deploy/telemetry/Jenkinsfile @@ -23,7 +23,8 @@ node() { 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 diff --git a/pipelines/deploy/userorg/Jenkinsfile b/pipelines/deploy/userorg/Jenkinsfile index 3408f6fef..9f8b96da0 100644 --- a/pipelines/deploy/userorg/Jenkinsfile +++ b/pipelines/deploy/userorg/Jenkinsfile @@ -23,7 +23,8 @@ node() { 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 diff --git a/pipelines/deploy/yarn/Jenkinsfile b/pipelines/deploy/yarn/Jenkinsfile index 12429b899..a63c17aba 100644 --- a/pipelines/deploy/yarn/Jenkinsfile +++ b/pipelines/deploy/yarn/Jenkinsfile @@ -48,7 +48,8 @@ node() { currentBuild.description = "Artifact: ${values.artifact_version}, Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = "FAILURE" throw err diff --git a/pipelines/esmapping/Jenkinsfile b/pipelines/esmapping/Jenkinsfile index 3ff03e2b7..9cd49948f 100644 --- a/pipelines/esmapping/Jenkinsfile +++ b/pipelines/esmapping/Jenkinsfile @@ -41,6 +41,7 @@ node() { currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } + summary() } catch (err) { currentBuild.result = 'FAILURE' diff --git a/pipelines/offlineinstaller/Jenkinsfile b/pipelines/offlineinstaller/Jenkinsfile index 1f5bda807..30856efc0 100644 --- a/pipelines/offlineinstaller/Jenkinsfile +++ b/pipelines/offlineinstaller/Jenkinsfile @@ -68,8 +68,10 @@ node() { println values ansible_playbook_run(values) currentBuild.result = 'SUCCESS' - } - } + } + } + summary() + } catch (err) { currentBuild.result = "FAILURE" diff --git a/pipelines/provision/cassandra/Jenkinsfile b/pipelines/provision/cassandra/Jenkinsfile index 065ddb0be..a9b45dd29 100644 --- a/pipelines/provision/cassandra/Jenkinsfile +++ b/pipelines/provision/cassandra/Jenkinsfile @@ -38,7 +38,8 @@ node() { currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/provision/jenkins-slave/Jenkinsfile b/pipelines/provision/jenkins-slave/Jenkinsfile index d8db6de88..15a2779a6 100644 --- a/pipelines/provision/jenkins-slave/Jenkinsfile +++ b/pipelines/provision/jenkins-slave/Jenkinsfile @@ -39,7 +39,8 @@ node() { currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/provision/kafka/Jenkinsfile b/pipelines/provision/kafka/Jenkinsfile index 81d5eadbf..e2ab4ae5b 100644 --- a/pipelines/provision/kafka/Jenkinsfile +++ b/pipelines/provision/kafka/Jenkinsfile @@ -38,7 +38,8 @@ node() { currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/provision/keycloak/Jenkinsfile b/pipelines/provision/keycloak/Jenkinsfile index 4baa363af..c31cd6ffc 100644 --- a/pipelines/provision/keycloak/Jenkinsfile +++ b/pipelines/provision/keycloak/Jenkinsfile @@ -38,7 +38,8 @@ node() { currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/provision/keycloak/Jenkinsfile.user b/pipelines/provision/keycloak/Jenkinsfile.user index db2ae179c..9f94fc5de 100644 --- a/pipelines/provision/keycloak/Jenkinsfile.user +++ b/pipelines/provision/keycloak/Jenkinsfile.user @@ -38,7 +38,8 @@ node() { currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/provision/log-es-upgrade/Jenkinsfile b/pipelines/provision/log-es-upgrade/Jenkinsfile index ad0eaaae7..8a7743d6a 100644 --- a/pipelines/provision/log-es-upgrade/Jenkinsfile +++ b/pipelines/provision/log-es-upgrade/Jenkinsfile @@ -38,7 +38,8 @@ node() { currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/provision/log-es-upgrade/Jenkinsfile.latest b/pipelines/provision/log-es-upgrade/Jenkinsfile.latest index 2ad7b486b..38d0bf410 100644 --- a/pipelines/provision/log-es-upgrade/Jenkinsfile.latest +++ b/pipelines/provision/log-es-upgrade/Jenkinsfile.latest @@ -38,7 +38,8 @@ node() { currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/provision/log-es/Jenkinsfile b/pipelines/provision/log-es/Jenkinsfile index 01ba134c5..9b1125512 100644 --- a/pipelines/provision/log-es/Jenkinsfile +++ b/pipelines/provision/log-es/Jenkinsfile @@ -38,7 +38,8 @@ node() { currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/provision/logstash/Jenkinsfile b/pipelines/provision/logstash/Jenkinsfile index 1adeabafc..9b634d0d1 100644 --- a/pipelines/provision/logstash/Jenkinsfile +++ b/pipelines/provision/logstash/Jenkinsfile @@ -38,7 +38,8 @@ node() { currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/provision/ml-workbench/Jenkinsfile b/pipelines/provision/ml-workbench/Jenkinsfile index 5623e4920..11bdc91f0 100644 --- a/pipelines/provision/ml-workbench/Jenkinsfile +++ b/pipelines/provision/ml-workbench/Jenkinsfile @@ -38,7 +38,8 @@ node() { currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/provision/postgres-db-update-managed/Jenkinsfile b/pipelines/provision/postgres-db-update-managed/Jenkinsfile index a0567909d..67eb11850 100644 --- a/pipelines/provision/postgres-db-update-managed/Jenkinsfile +++ b/pipelines/provision/postgres-db-update-managed/Jenkinsfile @@ -38,7 +38,8 @@ node() { currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/provision/postgres-db-update/Jenkinsfile b/pipelines/provision/postgres-db-update/Jenkinsfile index 557fe9add..b9fa8ef29 100644 --- a/pipelines/provision/postgres-db-update/Jenkinsfile +++ b/pipelines/provision/postgres-db-update/Jenkinsfile @@ -38,7 +38,8 @@ node() { currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/provision/postgres/Jenkinsfile b/pipelines/provision/postgres/Jenkinsfile index b43352bbd..af312f630 100644 --- a/pipelines/provision/postgres/Jenkinsfile +++ b/pipelines/provision/postgres/Jenkinsfile @@ -38,7 +38,8 @@ node() { currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/provision/redis-cluster/Jenkinsfile b/pipelines/provision/redis-cluster/Jenkinsfile index 2adc44f4f..bb8b4eadc 100644 --- a/pipelines/provision/redis-cluster/Jenkinsfile +++ b/pipelines/provision/redis-cluster/Jenkinsfile @@ -38,7 +38,8 @@ node() { currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/provision/registry/Jenkinsfile b/pipelines/provision/registry/Jenkinsfile index 1fd04eaad..942a125f2 100644 --- a/pipelines/provision/registry/Jenkinsfile +++ b/pipelines/provision/registry/Jenkinsfile @@ -50,7 +50,8 @@ node() { currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/provision/secor/Jenkinsfile b/pipelines/provision/secor/Jenkinsfile index fdb77aa5e..6642bbe66 100644 --- a/pipelines/provision/secor/Jenkinsfile +++ b/pipelines/provision/secor/Jenkinsfile @@ -38,7 +38,8 @@ node() { currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } } - } + summary() + } catch (err) { currentBuild.result = 'FAILURE' throw err diff --git a/pipelines/release/Jenkinsfile.hotfix.rc.tag b/pipelines/release/Jenkinsfile.hotfix.rc.tag new file mode 100644 index 000000000..39fa535a2 --- /dev/null +++ b/pipelines/release/Jenkinsfile.hotfix.rc.tag @@ -0,0 +1,135 @@ +@Library('deploy-conf') _ +node { + try { + repositories = ['Sunbird-Ed/SunbirdEd-portal', + 'Sunbird-Ed/SunbirdEd-mobile', + 'Sunbird-Ed/SunbirdEd-portal', + 'Sunbird-Ed/SunbirdEd-mobile', + 'project-sunbird/sunbird-lms-jobs', + 'project-sunbird/sunbird-lms-service', + 'project-sunbird/sunbird-data-pipeline', + 'project-sunbird/sunbird-content-service' + ,'project-sunbird/sunbird-auth', + 'project-sunbird/sunbird-learning-platform', + 'project-sunbird/sunbird-content-plugins', + 'project-sunbird/sunbird-lms-mw', + 'project-sunbird/sunbird-ml-workbench', + 'project-sunbird/sunbird-utils', + 'project-sunbird/sunbird-analytics', + 'project-sunbird/sunbird-telemetry-service', + 'project-sunbird/secor', + 'project-sunbird/sunbird-content-player', + 'project-sunbird/sunbird-content-editor', + 'project-sunbird/sunbird-content-plugins', + 'project-sunbird/sunbird-collection-editor', + 'project-sunbird/sunbird-generic-editor', + 'project-sunbird/sunbird-devops'] + + ansiColor('xterm') { + String ANSI_GREEN = "\u001B[32m" + String ANSI_NORMAL = "\u001B[0m" + String ANSI_BOLD = "\u001B[1m" + String ANSI_RED = "\u001B[31m" + + branch_name = params.release_branch + if (branch_name.contains(env.public_repo_branch)) { + println(ANSI_BOLD + ANSI_RED + "Error.. " + branch_name + " is not a hot fix branch " + ANSI_NORMAL) + error "Oh ho! branch is not a hofix branch.. Skipping creation of tag" + } + else { + println (ANSI_BOLD + ANSI_GREEN + "All checks passed - Continuing build.." + ANSI_NORMAL) + } + + + if (params.size() == 0) { + repoList = "['" + repositories.join("','") + "']" + properties([[$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false], parameters([[$class: 'CascadeChoiceParameter', choiceType: 'PT_CHECKBOX', description: 'Choose the repo to create tag', name: '', filterLength: 1, filterable: false, name: 'repositories', randomName: 'choice-parameter-2927218175384999', referencedParameters: '', script: [$class: 'GroovyScript', fallbackScript: [classpath: [], sandbox: false, script: ''], script: [classpath: [], sandbox: false, script: """return $repoList """]]], [$class: 'DynamicReferenceParameter', choiceType: 'ET_FORMATTED_HTML', description: 'Choose the branch from which tag will be created', name: 'release_branch', omitValueField: true, randomName: 'choice-parameter-2927218195310673', referencedParameters: '', script: [$class: 'GroovyScript', fallbackScript: [classpath: [], sandbox: false, script: ''], script: [classpath: [], sandbox: false, script: 'return """"""']]]]), [$class: 'ThrottleJobProperty', categories: [], limitOneJobWithMatchingParams: false, maxConcurrentPerNode: 0, maxConcurrentTotal: 0, paramsToUseForLimit: '', throttleEnabled: false, throttleOption: 'project']]) + println(ANSI_BOLD + ANSI_GREEN + "First run of the job. Parameters created. Stopping the current build. Please trigger new build and provide parameters" + ANSI_NORMAL) + return + } + + if (!params.release_branch.contains('release-') || params.release_branch == '') { + println(ANSI_BOLD + ANSI_RED + "Uh oh! Release branch is not in valid format. Please provide value as release-" + ANSI_NORMAL) + error 'Error: Release branch name format error' + } + + if(params.repositories == '') + { + print(ANSI_BOLD + ANSI_RED + "Uh oh! No repositories are selected!" + ANSI_NORMAL) + error 'No repositories selected' + } + + stage('Create tag') { + sh """ + mkdir -p ${JENKINS_HOME}/tags + touch -a ${JENKINS_HOME}/tags/tags.txt + """ + cleanWs() + params.repositories.split(',').each { repo -> + dir("$WORKSPACE") { + repo_name = repo.split('/')[1] + sh "git clone --depth 1 --no-single-branch https://github.com/$repo $repo_name" + dir("$repo_name") { + returnCode = sh(returnStatus: true, script: "git ls-remote --exit-code --heads origin ${params.release_branch}") + + if (returnCode != 0) { + println(ANSI_BOLD + ANSI_RED + params.release_branch + " branch does not exists" + ANSI_NORMAL) + error 'Error: Release branch does not exists' + } + + withCredentials([usernamePassword(credentialsId: env.githubPassword, passwordVariable: 'gitpass', usernameVariable: 'gituser')]) { + origin = "https://${gituser}:${gitpass}@" + sh(script: 'git config --get remote.origin.url', returnStdout: true).trim().split('https://')[1] + echo "Git Hash: ${origin}" + tagRefBranch = sh(script: "git ls-remote --tags origin ${params.release_branch}* | grep -o ${params.release_branch}_RC.* | sort -V | tail -n1", returnStdout: true).trim() + + if (tagRefBranch == '') { + tagName = params.release_branch + '_RC1' + sh("git push ${origin} refs/remotes/origin/${params.release_branch}:refs/tags/${tagName}") + } + else { + returnCode = sh(script: "git diff --exit-code refs/remotes/origin/${params.release_branch} tags/$tagRefBranch > /dev/null", returnStatus: true) + if (returnCode == 0) { + println(ANSI_BOLD + ANSI_GREEN + "No commit changes found. Skipping creating tag" + ANSI_NORMAL) + tagName = tagRefBranch + } + else { + refCount = tagRefBranch.split('_RC')[-1].toInteger() + 1 + tagName = params.release_branch + '_RC' + refCount + + returnCode = sh(script: "git ls-remote --exit-code --tags ${origin} ${tagName}", returnStatus: true) + + if (returnCode == 0) { + println(ANSI_BOLD + ANSI_RED + "Uh Oh! Remote has same tag name. Please check! This might have been created while build was running!" + ANSI_NORMAL) + error 'Error: Stopping the build after finding same tag name. Please check' + } else { + sh("git push ${origin} refs/remotes/origin/${params.release_branch}:refs/tags/${tagName}") + } + } + } + sh """ + sed -i "s/${repo_name}.*//g" ${JENKINS_HOME}/tags/tags.txt + sed -i "/^\\\$/d" ${JENKINS_HOME}/tags/tags.txt + echo "$repo_name : $tagName" >> ${JENKINS_HOME}/tags/tags.txt + """ + } + } + } + } + } + stage('Archive artifacts') { + sh "cp ${JENKINS_HOME}/tags/tags.txt ." + sh "sort tags.txt -o tags.txt && cat tags.txt" + archiveArtifacts artifacts: 'tags.txt', fingerprint: true + } + } + } + + catch (err) { + currentBuild.result = 'FAILURE' + throw err + } + finally { + slack_notify(currentBuild.result) + email_notify() + } +} diff --git a/pipelines/release/Jenkinsfile.staging.rc.tag b/pipelines/release/Jenkinsfile.staging.rc.tag new file mode 100644 index 000000000..fb32b62cb --- /dev/null +++ b/pipelines/release/Jenkinsfile.staging.rc.tag @@ -0,0 +1,128 @@ +@Library('deploy-conf') _ +node { + try { + repositories = ['Sunbird-Ed/SunbirdEd-portal', + 'Sunbird-Ed/SunbirdEd-mobile', + 'Sunbird-Ed/SunbirdEd-portal', + 'Sunbird-Ed/SunbirdEd-mobile', + 'project-sunbird/sunbird-lms-jobs', + 'project-sunbird/sunbird-lms-service', + 'project-sunbird/sunbird-data-pipeline', + 'project-sunbird/sunbird-content-service' + ,'project-sunbird/sunbird-auth', + 'project-sunbird/sunbird-learning-platform', + 'project-sunbird/sunbird-content-plugins', + 'project-sunbird/sunbird-lms-mw', + 'project-sunbird/sunbird-ml-workbench', + 'project-sunbird/sunbird-utils', + 'project-sunbird/sunbird-analytics', + 'project-sunbird/sunbird-telemetry-service', + 'project-sunbird/secor', + 'project-sunbird/sunbird-content-player', + 'project-sunbird/sunbird-content-editor', + 'project-sunbird/sunbird-content-plugins', + 'project-sunbird/sunbird-collection-editor', + 'project-sunbird/sunbird-generic-editor', + 'project-sunbird/sunbird-devops'] + + ansiColor('xterm') { + String ANSI_GREEN = "\u001B[32m" + String ANSI_NORMAL = "\u001B[0m" + String ANSI_BOLD = "\u001B[1m" + String ANSI_RED = "\u001B[31m" + + stagingRC() + + + if (params.size() == 0) { + repoList = "['" + repositories.join("','") + "']" + properties([[$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false], parameters([[$class: 'CascadeChoiceParameter', choiceType: 'PT_CHECKBOX', description: 'Choose the repo to create tag', name: '', filterLength: 1, filterable: false, name: 'repositories', randomName: 'choice-parameter-2927218175384999', referencedParameters: '', script: [$class: 'GroovyScript', fallbackScript: [classpath: [], sandbox: false, script: ''], script: [classpath: [], sandbox: false, script: """return $repoList """]]], [$class: 'DynamicReferenceParameter', choiceType: 'ET_FORMATTED_HTML', description: 'Choose the branch from which tag will be created', name: 'release_branch', omitValueField: true, randomName: 'choice-parameter-2927218195310673', referencedParameters: '', script: [$class: 'GroovyScript', fallbackScript: [classpath: [], sandbox: false, script: ''], script: [classpath: [], sandbox: false, script: 'return """"""']]]]), [$class: 'ThrottleJobProperty', categories: [], limitOneJobWithMatchingParams: false, maxConcurrentPerNode: 0, maxConcurrentTotal: 0, paramsToUseForLimit: '', throttleEnabled: false, throttleOption: 'project']]) + println(ANSI_BOLD + ANSI_GREEN + "First run of the job. Parameters created. Stopping the current build. Please trigger new build and provide parameters" + ANSI_NORMAL) + return + } + + if (!params.release_branch.contains('release-') || params.release_branch == '') { + println(ANSI_BOLD + ANSI_RED + "Uh oh! Release branch is not in valid format. Please provide value as release-" + ANSI_NORMAL) + error 'Error: Release branch name format error' + } + + if(params.repositories == '') + { + print(ANSI_BOLD + ANSI_RED + "Uh oh! No repositories are selected!" + ANSI_NORMAL) + error 'No repositories selected' + } + + stage('Create tag') { + sh """ + mkdir -p ${JENKINS_HOME}/tags + touch -a ${JENKINS_HOME}/tags/tags.txt + """ + cleanWs() + params.repositories.split(',').each { repo -> + dir("$WORKSPACE") { + repo_name = repo.split('/')[1] + sh "git clone --depth 1 --no-single-branch https://github.com/$repo $repo_name" + dir("$repo_name") { + returnCode = sh(returnStatus: true, script: "git ls-remote --exit-code --heads origin ${params.release_branch}") + + if (returnCode != 0) { + println(ANSI_BOLD + ANSI_RED + params.release_branch + " branch does not exists" + ANSI_NORMAL) + error 'Error: Release branch does not exists' + } + + withCredentials([usernamePassword(credentialsId: env.githubPassword, passwordVariable: 'gitpass', usernameVariable: 'gituser')]) { + origin = "https://${gituser}:${gitpass}@" + sh(script: 'git config --get remote.origin.url', returnStdout: true).trim().split('https://')[1] + echo "Git Hash: ${origin}" + tagRefBranch = sh(script: "git ls-remote --tags origin ${params.release_branch}* | grep -o ${params.release_branch}_RC.* | sort -V | tail -n1", returnStdout: true).trim() + + if (tagRefBranch == '') { + tagName = params.release_branch + '_RC1' + sh("git push ${origin} refs/remotes/origin/${params.release_branch}:refs/tags/${tagName}") + } + else { + returnCode = sh(script: "git diff --exit-code refs/remotes/origin/${params.release_branch} tags/$tagRefBranch > /dev/null", returnStatus: true) + if (returnCode == 0) { + println(ANSI_BOLD + ANSI_GREEN + "No commit changes found. Skipping creating tag" + ANSI_NORMAL) + tagName = tagRefBranch + } + else { + refCount = tagRefBranch.split('_RC')[-1].toInteger() + 1 + tagName = params.release_branch + '_RC' + refCount + + returnCode = sh(script: "git ls-remote --exit-code --tags ${origin} ${tagName}", returnStatus: true) + + if (returnCode == 0) { + println(ANSI_BOLD + ANSI_RED + "Uh Oh! Remote has same tag name. Please check! This might have been created while build was running!" + ANSI_NORMAL) + error 'Error: Stopping the build after finding same tag name. Please check' + } else { + sh("git push ${origin} refs/remotes/origin/${params.release_branch}:refs/tags/${tagName}") + } + } + } + sh """ + sed -i "s/${repo_name}.*//g" ${JENKINS_HOME}/tags/tags.txt + sed -i "/^\\\$/d" ${JENKINS_HOME}/tags/tags.txt + echo "$repo_name : $tagName" >> ${JENKINS_HOME}/tags/tags.txt + """ + } + } + } + } + } + stage('Archive artifacts') { + sh "cp ${JENKINS_HOME}/tags/tags.txt ." + sh "sort tags.txt -o tags.txt && cat tags.txt" + archiveArtifacts artifacts: 'tags.txt', fingerprint: true + } + } + } + + catch (err) { + currentBuild.result = 'FAILURE' + throw err + } + finally { + slack_notify(currentBuild.result) + email_notify() + } +} From 5709e585cf74d928e58678e8f47d1ad7663b65ba Mon Sep 17 00:00:00 2001 From: deveshMantra <48819442+deveshMantra@users.noreply.github.com> Date: Fri, 8 May 2020 12:39:33 +0530 Subject: [PATCH 2404/2894] Issue #SH-42 fix:login ux upgrade (#1456) * Issue #SH-42 fix:login ux upgrade * Issue #SH-42 fix:login ux upgrade --- ansible/artifacts/sunbird/login/login.ftl | 6 +++--- .../artifacts/sunbird/login/messages/messages_en.properties | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ansible/artifacts/sunbird/login/login.ftl b/ansible/artifacts/sunbird/login/login.ftl index ee9690e74..5689a23ee 100644 --- a/ansible/artifacts/sunbird/login/login.ftl +++ b/ansible/artifacts/sunbird/login/login.ftl @@ -10,7 +10,7 @@
${msg("loginDiksha")}
-

Login as

+

Login

${msg("mergeAccountMessage")}

${msg("migrateAccountMessage")}

@@ -73,13 +73,13 @@
- <#if realm.password && realm.registrationAllowed && !usernameEditDisabled??> ?> + <#if realm.password && realm.registrationAllowed && !usernameEditDisabled??>
${msg("noAccount")} ${msg("registerHere")}
- +

OR

diff --git a/ansible/artifacts/sunbird/login/messages/messages_en.properties b/ansible/artifacts/sunbird/login/messages/messages_en.properties index c9672d19b..ac8d29c5d 100644 --- a/ansible/artifacts/sunbird/login/messages/messages_en.properties +++ b/ansible/artifacts/sunbird/login/messages/messages_en.properties @@ -52,7 +52,7 @@ consentDenied=Consent denied. noAccount=Don''t have an account? username=Username or Mobile number -goBack=< Date: Fri, 8 May 2020 13:30:23 +0530 Subject: [PATCH 2405/2894] Issue #SH-42 fix:login ux upgrade (#1457) --- ansible/artifacts/sunbird/login/resources/js/login.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/ansible/artifacts/sunbird/login/resources/js/login.js b/ansible/artifacts/sunbird/login/resources/js/login.js index 60f3fe4e8..70b188f05 100644 --- a/ansible/artifacts/sunbird/login/resources/js/login.js +++ b/ansible/artifacts/sunbird/login/resources/js/login.js @@ -106,7 +106,6 @@ var validatePassword = function () { var lwcsRegex = new RegExp("^(?=.*[a-z])"); var spaceRegex = new RegExp('^\\S*$'); var upcsRegex = new RegExp("^(?=.*[A-Z])"); - const spaceRegex = new RegExp('^\\S*$'); var numRegex = new RegExp("^(?=.*[0-9])"); var specRegex = new RegExp('^[!"#$%&\'()*+,-./:;<=>?@[^_`{|}~\]]'); var error_msg = document.getElementById('passwd-error-msg'); @@ -134,7 +133,6 @@ var matchPassword = function () { var spaceRegex = new RegExp('^\\S*$'); var lwcsRegex = new RegExp("^(?=.*[a-z])"); var upcsRegex = new RegExp("^(?=.*[A-Z])"); - const spaceRegex = new RegExp('^\\S*$'); var numRegex = new RegExp("^(?=.*[0-9])"); var specRegex = new RegExp('^[!"#$%&\'()*+,-./:;<=>?@[^_`{|}~\]]'); var match_error_msg = document.getElementById('passwd-match-error-msg'); From ed7c65306e80a70d40cae04f11549d7e6173caf7 Mon Sep 17 00:00:00 2001 From: deveshMantra <48819442+deveshMantra@users.noreply.github.com> Date: Fri, 8 May 2020 15:03:32 +0530 Subject: [PATCH 2406/2894] Issue #SH-42 fix:login ux upgrade (#1458) --- ansible/artifacts/sunbird/login/login.ftl | 4 ++-- .../sunbird/login/messages/messages_en.properties | 1 + .../sunbird/login/resources/css/login.css | 14 ++++++++++---- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ansible/artifacts/sunbird/login/login.ftl b/ansible/artifacts/sunbird/login/login.ftl index 5689a23ee..a59c89272 100644 --- a/ansible/artifacts/sunbird/login/login.ftl +++ b/ansible/artifacts/sunbird/login/login.ftl @@ -71,7 +71,7 @@
- +
<#if realm.password && realm.registrationAllowed && !usernameEditDisabled??>
@@ -92,7 +92,7 @@ - diff --git a/ansible/artifacts/sunbird/login/messages/messages_en.properties b/ansible/artifacts/sunbird/login/messages/messages_en.properties index ac8d29c5d..715a5c8aa 100644 --- a/ansible/artifacts/sunbird/login/messages/messages_en.properties +++ b/ansible/artifacts/sunbird/login/messages/messages_en.properties @@ -1,4 +1,5 @@ doLogIn=Login +login=LOGIN doRegister=Sign Up doSignIn=Sign In doSignWithGoogle=with Google diff --git a/ansible/artifacts/sunbird/login/resources/css/login.css b/ansible/artifacts/sunbird/login/resources/css/login.css index 2a66a7984..cff55637e 100644 --- a/ansible/artifacts/sunbird/login/resources/css/login.css +++ b/ansible/artifacts/sunbird/login/resources/css/login.css @@ -3,6 +3,7 @@ body{ font-family: "Noto Sans"; position: relative; letter-spacing: 0.2px; + background: #edf4f9; } .fullpage-background-image{ width: 100% !important; @@ -13,7 +14,7 @@ body{ background: #EDF4F9; display: flex; align-items: center; - min-height: 100vh; + min-height: auto; } .fs-14{ font-size: 14px !important; @@ -56,8 +57,8 @@ input:focus{ } .signInWithGoogle{ position: absolute; - left: 0px; - top: 0px; + left: 1px; + top: 1px; width: 34px; } .ui.basic.blue.button.googleButton{ @@ -437,7 +438,7 @@ h1, h2, h3, h4, h5, .container-wrapper { max-width: 328px; margin:0 auto; - min-height: 100vh; + min-height: auto; display: flex; flex-direction: column; justify-content: center; @@ -601,4 +602,9 @@ h1, h2, h3, h4, h5, .container-wrapper { min-height: auto; } +} + +.btn-signInWithGoogle { + background: #4285F4; + border: #4285F4; } \ No newline at end of file From b22ec1cb954b3ce6f57886507ec6916ac10f70a4 Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Sat, 2 May 2020 13:23:55 +0530 Subject: [PATCH 2407/2894] fix: updating kong health to tcp check --- ansible/roles/stack-sunbird/defaults/main.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ansible/roles/stack-sunbird/defaults/main.yml b/ansible/roles/stack-sunbird/defaults/main.yml index a0b8479c8..051c4f260 100644 --- a/ansible/roles/stack-sunbird/defaults/main.yml +++ b/ansible/roles/stack-sunbird/defaults/main.yml @@ -288,18 +288,16 @@ lms_liveness_readiness: apimanager_liveness_readiness: healthcheck: true readinessProbe: - httpGet: - path: /status - port: 8001 + tcpSocket: + port: 8000 initialDelaySeconds: 30 periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 successThreshold: 2 livenessProbe: - httpGet: - path: / - port: 8001 + tcpSocket: + port: 8000 initialDelaySeconds: 30 periodSeconds: 30 timeoutSeconds: 10 From 86e578f304c6f19af40a5aec1ad2b73db711933c Mon Sep 17 00:00:00 2001 From: Kumar Gauraw Date: Fri, 8 May 2020 19:07:13 +0530 Subject: [PATCH 2408/2894] Issue #SB-18948 feat: Added config for dial link api (#1455) --- .../templates/content-service_application.conf | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ansible/roles/stack-sunbird/templates/content-service_application.conf b/ansible/roles/stack-sunbird/templates/content-service_application.conf index 0bd872c83..98d0c87c8 100644 --- a/ansible/roles/stack-sunbird/templates/content-service_application.conf +++ b/ansible/roles/stack-sunbird/templates/content-service_application.conf @@ -457,3 +457,13 @@ kafka { topic.send.enable : true topics.instruction : "{{ env_name }}.learning.job.request" } + +# DIAL Link Config +dial_service { + api { + base_url : {{ sunbird_dial_repo_api_base_url }} + auth_key : {{ sunbird_dial_repo_api_key }} + } +} +content.link_dialcode.validation=true +content.link_dialcode.max_limit=10 From f3ddf785341d3c88e57cb278369798dfd606bf5f Mon Sep 17 00:00:00 2001 From: SMY ALTAMASH <30286162+SMYALTAMASH@users.noreply.github.com> Date: Sat, 9 May 2020 05:35:38 +0530 Subject: [PATCH 2409/2894] Update main.yml --- ansible/roles/kong-consumer/defaults/main.yml | 47 +++++++++---------- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/ansible/roles/kong-consumer/defaults/main.yml b/ansible/roles/kong-consumer/defaults/main.yml index 6c1851f9d..925b789c4 100644 --- a/ansible/roles/kong-consumer/defaults/main.yml +++ b/ansible/roles/kong-consumer/defaults/main.yml @@ -24,54 +24,53 @@ mobile_device_groups: kong_all_consumer_groups: - announcementAccess - - orgCreate - appAccess + - appAdmin - appUpdate - badgeAccess + - badgeAdmin + - badgeCreate + - badgeUpdate - certificateAccess + - certificateAdmin + - certificateCreate + - certificateUpdate - channelAccess - - channelAccess + - channelCreate + - channelUpdate - contentAccess + - contentAdmin - contentCreate - contentUpdate - courseAccess + - courseAdmin - courseCreate - courseUpdate - deviceCreate - dialcodeAccess + - dialcodeAdmin + - dialcodeCreate + - dialcodeUpdate - locationAccess - noteAccess + - noteAdmin - noteCreate - noteUpdate - objectAccess - orgAccess + - orgCreate - pageAccess + - pluginAccess + - reportsAccess + - reportsAdmin + - reportsCreate + - reportsUpdate - ssoCreate - userAccess - - certificateCreate - - certificateUpdate - - certificateAdmin - - noteAdmin - - userCreate - userAdmin - - userUpdate - - appAdmin - - contentAdmin - - channelCreate - - channelUpdate - - courseAdmin - - dialcodeAdmin - - dialcodeCreate - - dialcodeUpdate - - badgeAdmin - - badgeCreate - - badgeUpdate - - pluginAccess + - userCreate - userTempAdmin - - reportsAdmin - - reportsAccess - - reportsUpdate - - reportsCreate + - userUpdate kong_consumers: From 84f4b96fddc1f9fd9e2dac25d3f53d700d6c8050 Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Sat, 9 May 2020 12:27:22 +0530 Subject: [PATCH 2410/2894] fix: adding search service and updating spaces, braces --- .../templates/configmap.yaml | 123 +++++++++--------- 1 file changed, 64 insertions(+), 59 deletions(-) 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 0cab534b7..0c445b5df 100644 --- a/kubernetes/helm_charts/core/nginx-private-ingress/templates/configmap.yaml +++ b/kubernetes/helm_charts/core/nginx-private-ingress/templates/configmap.yaml @@ -24,67 +24,72 @@ data: include /etc/nginx/conf.d/*.conf; sendfile on; - server { - listen 80; - listen [::]:80; + server { + listen 80; + listen [::]:80; - resolver {{ .Values.kube_dns_ip }}; + resolver {{ .Values.kube_dns_ip }}; - location /learner/ { - rewrite ^/learner/(.*) /$1 break; - proxy_pass http://learner-service:9000; - } - location /api/ { - rewrite ^/api/(.*) /$1 break; - proxy_pass http://kong:8000; - } - location /grafana/ { - rewrite ^/grafana/(.*) /$1 break; - proxy_pass http://prometheus-operator-grafana.monitoring.svc.cluster.local; - } - location /admin-api/ { - rewrite ^/admin-api/(.*) /$1 break; - proxy_pass http://kong:8001; - } - location /player/ { - rewrite ^/player/(.*) /$1 break; - proxy_pass http://player:3000; - } - location /knowledgemw/ { - rewrite ^/knowledgemw/(.*) /$1 break; - proxy_pass http://knowledge-mw-service:5000; - } - location /content/ { - rewrite ^/content/(.*) /$1 break; - proxy_pass http://content-service:9000; - } - location /badger/ { - rewrite ^/badger/(.*) /$1 break; - proxy_pass http://badger-service:8004; - } - location /cert/ { - rewrite ^/cert/(.*) /$1 break; - proxy_pass http://cert-service:9000; - } - location /certreg/ { - rewrite ^/certreg/(.*) /$1 break; - proxy_pass http://cert-registry-service:9000; - } - location /print/ { - rewrite ^/print/(.*) /$1 break; - proxy_pass http://print-service:5000; - } - location /assessment/ { - rewrite ^/assessment/(.*) /$1 break; - proxy_pass http://assessment-service:9000; - } - location /notification/ { - rewrite ^/notification/(.*) /$1 break; - proxy_pass http://notification-service:9000; - } - location /report/ { - rewrite ^/report/(.*) /$1 break; - proxy_pass http://report-service:3030; + location /learner/ { + rewrite ^/learner/(.*) /$1 break; + proxy_pass http://learner-service:9000; + } + location /api/ { + rewrite ^/api/(.*) /$1 break; + proxy_pass http://kong:8000; + } + location /grafana/ { + rewrite ^/grafana/(.*) /$1 break; + proxy_pass http://prometheus-operator-grafana.monitoring.svc.cluster.local; + } + location /admin-api/ { + rewrite ^/admin-api/(.*) /$1 break; + proxy_pass http://kong:8001; + } + location /player/ { + rewrite ^/player/(.*) /$1 break; + proxy_pass http://player:3000; + } + location /knowledgemw/ { + rewrite ^/knowledgemw/(.*) /$1 break; + proxy_pass http://knowledge-mw-service:5000; + } + location /content/ { + rewrite ^/content/(.*) /$1 break; + proxy_pass http://content-service:9000; + } + location /badger/ { + rewrite ^/badger/(.*) /$1 break; + proxy_pass http://badger-service:8004; + } + location /cert/ { + rewrite ^/cert/(.*) /$1 break; + proxy_pass http://cert-service:9000; + } + location /certreg/ { + rewrite ^/certreg/(.*) /$1 break; + proxy_pass http://cert-registry-service:9000; + } + location /print/ { + rewrite ^/print/(.*) /$1 break; + proxy_pass http://print-service:5000; + } + location /assessment/ { + rewrite ^/assessment/(.*) /$1 break; + proxy_pass http://assessment-service:9000; + } + location /notification/ { + rewrite ^/notification/(.*) /$1 break; + proxy_pass http://notification-service:9000; + } + location /report/ { + rewrite ^/report/(.*) /$1 break; + proxy_pass http://report-service:3030; + } + location /search/ { + rewrite ^/search/(.*) /$1 break; + proxy_pass http://search-service:9000; + } } } kind: ConfigMap From f36688c1e8e015a4879c9e3d40b18b9137b430db Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Sat, 9 May 2020 12:27:22 +0530 Subject: [PATCH 2411/2894] fix: adding search service and updating spaces, braces --- .../templates/configmap.yaml | 123 +++++++++--------- 1 file changed, 64 insertions(+), 59 deletions(-) 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 0cab534b7..0c445b5df 100644 --- a/kubernetes/helm_charts/core/nginx-private-ingress/templates/configmap.yaml +++ b/kubernetes/helm_charts/core/nginx-private-ingress/templates/configmap.yaml @@ -24,67 +24,72 @@ data: include /etc/nginx/conf.d/*.conf; sendfile on; - server { - listen 80; - listen [::]:80; + server { + listen 80; + listen [::]:80; - resolver {{ .Values.kube_dns_ip }}; + resolver {{ .Values.kube_dns_ip }}; - location /learner/ { - rewrite ^/learner/(.*) /$1 break; - proxy_pass http://learner-service:9000; - } - location /api/ { - rewrite ^/api/(.*) /$1 break; - proxy_pass http://kong:8000; - } - location /grafana/ { - rewrite ^/grafana/(.*) /$1 break; - proxy_pass http://prometheus-operator-grafana.monitoring.svc.cluster.local; - } - location /admin-api/ { - rewrite ^/admin-api/(.*) /$1 break; - proxy_pass http://kong:8001; - } - location /player/ { - rewrite ^/player/(.*) /$1 break; - proxy_pass http://player:3000; - } - location /knowledgemw/ { - rewrite ^/knowledgemw/(.*) /$1 break; - proxy_pass http://knowledge-mw-service:5000; - } - location /content/ { - rewrite ^/content/(.*) /$1 break; - proxy_pass http://content-service:9000; - } - location /badger/ { - rewrite ^/badger/(.*) /$1 break; - proxy_pass http://badger-service:8004; - } - location /cert/ { - rewrite ^/cert/(.*) /$1 break; - proxy_pass http://cert-service:9000; - } - location /certreg/ { - rewrite ^/certreg/(.*) /$1 break; - proxy_pass http://cert-registry-service:9000; - } - location /print/ { - rewrite ^/print/(.*) /$1 break; - proxy_pass http://print-service:5000; - } - location /assessment/ { - rewrite ^/assessment/(.*) /$1 break; - proxy_pass http://assessment-service:9000; - } - location /notification/ { - rewrite ^/notification/(.*) /$1 break; - proxy_pass http://notification-service:9000; - } - location /report/ { - rewrite ^/report/(.*) /$1 break; - proxy_pass http://report-service:3030; + location /learner/ { + rewrite ^/learner/(.*) /$1 break; + proxy_pass http://learner-service:9000; + } + location /api/ { + rewrite ^/api/(.*) /$1 break; + proxy_pass http://kong:8000; + } + location /grafana/ { + rewrite ^/grafana/(.*) /$1 break; + proxy_pass http://prometheus-operator-grafana.monitoring.svc.cluster.local; + } + location /admin-api/ { + rewrite ^/admin-api/(.*) /$1 break; + proxy_pass http://kong:8001; + } + location /player/ { + rewrite ^/player/(.*) /$1 break; + proxy_pass http://player:3000; + } + location /knowledgemw/ { + rewrite ^/knowledgemw/(.*) /$1 break; + proxy_pass http://knowledge-mw-service:5000; + } + location /content/ { + rewrite ^/content/(.*) /$1 break; + proxy_pass http://content-service:9000; + } + location /badger/ { + rewrite ^/badger/(.*) /$1 break; + proxy_pass http://badger-service:8004; + } + location /cert/ { + rewrite ^/cert/(.*) /$1 break; + proxy_pass http://cert-service:9000; + } + location /certreg/ { + rewrite ^/certreg/(.*) /$1 break; + proxy_pass http://cert-registry-service:9000; + } + location /print/ { + rewrite ^/print/(.*) /$1 break; + proxy_pass http://print-service:5000; + } + location /assessment/ { + rewrite ^/assessment/(.*) /$1 break; + proxy_pass http://assessment-service:9000; + } + location /notification/ { + rewrite ^/notification/(.*) /$1 break; + proxy_pass http://notification-service:9000; + } + location /report/ { + rewrite ^/report/(.*) /$1 break; + proxy_pass http://report-service:3030; + } + location /search/ { + rewrite ^/search/(.*) /$1 break; + proxy_pass http://search-service:9000; + } } } kind: ConfigMap From c28abab5fc115bd324c9333d322f5b24244eb166 Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Sat, 9 May 2020 12:28:50 +0530 Subject: [PATCH 2412/2894] fix: adding taxonomy --- .../core/nginx-private-ingress/templates/configmap.yaml | 4 ++++ 1 file changed, 4 insertions(+) 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 0c445b5df..95ccaa38b 100644 --- a/kubernetes/helm_charts/core/nginx-private-ingress/templates/configmap.yaml +++ b/kubernetes/helm_charts/core/nginx-private-ingress/templates/configmap.yaml @@ -90,6 +90,10 @@ data: rewrite ^/search/(.*) /$1 break; proxy_pass http://search-service:9000; } + location /taxonomy/ { + rewrite ^/taxonomy/(.*) /$1 break; + proxy_pass http://taxonomy-service:9000; + } } } kind: ConfigMap From 4b051e1047da540af75ab3918cd6346a0375cc0e Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Mon, 11 May 2020 12:51:28 +0530 Subject: [PATCH 2413/2894] [Don't Merge] Kafka-enabling multi cluster consumption (#1452) * Kafka-enabling multi cluster consumption export kafka_host=cluster1ip1:9092,cluster1ip2:9092;cluster2ip1:9092,cluster2ip2:9092 export kafka_topic=cluster1topic;cluster2topic ',' seperated multiple kafka nodes in the cluster and ';' seperated multiple kafka clusters > you should be explicit about topics of cluster Signed-off-by: Rajesh Rajendran * Printing debug info Signed-off-by: Rajesh Rajendran * Adding env as external label for prometheus Signed-off-by: Rajesh Rajendran * Updating image version for topi-exporter Signed-off-by: Rajesh Rajendran --- exporters/Go/kafka-topic-exporter/main.go | 154 +++++++++++------- images/kafka-topic-exporter/build.sh | 2 +- .../templates/prometheus-operator.yaml | 1 + 3 files changed, 94 insertions(+), 63 deletions(-) diff --git a/exporters/Go/kafka-topic-exporter/main.go b/exporters/Go/kafka-topic-exporter/main.go index e24c91c95..87ad02838 100644 --- a/exporters/Go/kafka-topic-exporter/main.go +++ b/exporters/Go/kafka-topic-exporter/main.go @@ -18,7 +18,7 @@ import ( kafka "github.com/segmentio/kafka-go" ) -var kafkaReader *kafka.Reader +var kafkaReaders []*kafka.Reader // Channel to keep metrics till prometheus scrape that var promMetricsChannel = make(chan metric) @@ -43,13 +43,15 @@ type Metrics struct { // This is to get the last message served to prom endpoint. type lastReadMessage struct { mu sync.RWMutex - // partition message + // map[partition]message last map[int]kafka.Message + // slice pointer of kafkaReaders + clusterId int } // Adding message // Only the latest -func (lrm *lastReadMessage) Store(message kafka.Message) error { +func (lrm *lastReadMessage) Store(message kafka.Message, clusterId int) error { lrm.mu.Lock() defer lrm.mu.Unlock() // Initializing map if nil @@ -60,19 +62,21 @@ func (lrm *lastReadMessage) Store(message kafka.Message) error { // Updating only if the offset is greater if lrm.last[message.Partition].Offset < message.Offset { lrm.last[message.Partition] = message + lrm.clusterId = clusterId } return fmt.Errorf("lower offset(%d) than the latest(%d)", message.Offset, lrm.last[message.Partition].Offset) } else { lrm.last[message.Partition] = message + lrm.clusterId = clusterId } return nil } // Return the last message read -func (lrm *lastReadMessage) Get() map[int]kafka.Message { +func (lrm *lastReadMessage) Get() (map[int]kafka.Message, int) { lrm.mu.RLock() defer lrm.mu.RUnlock() - return lrm.last + return lrm.last, lrm.clusterId } // Validating metrics name @@ -88,14 +92,15 @@ func metricsNameValidator(names ...string) string { // Message format type metric struct { - message string - id kafka.Message + message string + id kafka.Message + clusterId int } // This function will take the metrics input and create prometheus metrics // output and send it to metrics channel // So that http endpoint can serve the data -func (metrics *Metrics) pushMetrics(ctx context.Context, metricData *kafka.Message) (err error) { +func (metrics *Metrics) pushMetrics(clusterId int, ctx context.Context, metricData *kafka.Message) (err error) { label := fmt.Sprintf("system=%q,subsystem=%q,", metrics.System, metrics.SubSystem) select { case <-ctx.Done(): @@ -112,19 +117,23 @@ func (metrics *Metrics) pushMetrics(ctx context.Context, metricData *kafka.Messa // Adding optional timestamp switch metrics.MetricTS { case "": - metricStruct.message = fmt.Sprintf("%s{%s} %.2f", metricsNameValidator(metrics.System, metrics.SubSystem, m.ID), strings.TrimRight(label, ","), m.Value) + metricStruct.message = fmt.Sprintf("%s{%s} %.2f", + metricsNameValidator(metrics.System, metrics.SubSystem, m.ID), + strings.TrimRight(label, ","), m.Value) default: - metricStruct.message = fmt.Sprintf("%s{%s} %.1f %s", metricsNameValidator(metrics.System, metrics.SubSystem, m.ID), strings.TrimRight(label, ","), m.Value, metrics.MetricTS) + metricStruct.message = fmt.Sprintf("%s{%s} %.1f %s", + metricsNameValidator(metrics.System, metrics.SubSystem, m.ID), + strings.TrimRight(label, ","), m.Value, metrics.MetricTS) } - // fmt.Printf("%s\n", metricStruct.message) metricStruct.id = *metricData + metricStruct.clusterId = clusterId promMetricsChannel <- metricStruct } return nil } } -func metricsCreation(ctx context.Context, m kafka.Message) error { +func metricsCreation(clusterId int, ctx context.Context, m kafka.Message) error { metrics := Metrics{} data := m.Value // Creating metrics struct @@ -136,20 +145,26 @@ func metricsCreation(ctx context.Context, m kafka.Message) error { fmt.Printf("Unmarshal error: %q data: %q\n", err, string(data)) return err } - metrics.pushMetrics(ctx, &m) + metrics.pushMetrics(clusterId, ctx, &m) return nil } } -func commitMessage(messages *map[int]kafka.Message) error { - for k, message := range *messages { - if message.Offset > 0 { - fmt.Printf("Commiting message partition %d offset %d\n", k, message.Offset) - if err := kafkaReader.CommitMessages(context.Background(), message); err != nil { +func commitMessage(lastReadMessages *[]*lastReadMessage) error { + fmt.Println("number of clusters: ", len(*lastReadMessages)) + for _, lrm := range *lastReadMessages { + messages, clusterId := lrm.Get() + fmt.Println("cluster: ", clusterId) + for k, message := range messages { + if message.Offset <= 0 { + fmt.Println("Not committing anything", clusterId) + return errors.New("offset is not > 0 for cluster " + string(clusterId)) + } + fmt.Printf("Commiting message partition %d offset %d cluster %d\n", k, message.Offset, clusterId) + if err := kafkaReaders[clusterId].CommitMessages(context.Background(), message); err != nil { return err } } - return errors.New("offset is not > 0") } return nil } @@ -161,38 +176,40 @@ func health(w http.ResponseWriter, r *http.Request) { func serve(w http.ResponseWriter, r *http.Request) { fmt.Println("Serving Request") ctx := r.Context() - lastReadMessage := lastReadMessage{} + var lastReadMessages []*lastReadMessage // Reading topic - go func(ctx context.Context, r *kafka.Reader) { - for { - // Only fetching the message, not commiting them - // It'll be commited once the transmission closes - m, err := r.FetchMessage(ctx) - if err != nil { - fmt.Printf("err reading message: %v\n", err) - break - } - fmt.Printf("topic: %q partition: %v offset: %v\n", m.Topic, m.Partition, m.Offset) - go func(ctx context.Context) { - if err := metricsCreation(ctx, m); err != nil { - fmt.Printf("errored out metrics creation; err: %s\n", err) - return + for k, v := range kafkaReaders { + lastReadMessage := lastReadMessage{} + lastReadMessages = append(lastReadMessages, &lastReadMessage) + go func(clusterId int, ctx context.Context, r *kafka.Reader) { + for { + // Only fetching the message, not commiting them + // It'll be commited once the transmission closes + m, err := r.FetchMessage(ctx) + if err != nil { + fmt.Printf("err reading message: %v\n", err) + break } - }(ctx) - } - }(ctx, kafkaReader) + fmt.Printf("topic: %q partition: %v offset: %v\n", m.Topic, m.Partition, m.Offset) + go func(clusterId int, ctx context.Context, m kafka.Message) { + if err := metricsCreation(clusterId, ctx, m); err != nil { + fmt.Printf("errored out metrics creation; err: %s\n", err) + return + } + }(clusterId, ctx, m) + } + }(k, ctx, v) + } for { select { case message := <-promMetricsChannel: fmt.Fprintf(w, "%s\n", message.message) - lastReadMessage.Store(message.id) + lastReadMessages[message.clusterId].Store(message.id, message.clusterId) case <-ctx.Done(): - messageLastRead := lastReadMessage.Get() - commitMessage(&messageLastRead) + commitMessage(&lastReadMessages) return case <-time.After(1 * time.Second): - messageLastRead := lastReadMessage.Get() - commitMessage(&messageLastRead) + commitMessage(&lastReadMessages) return } } @@ -200,40 +217,53 @@ func serve(w http.ResponseWriter, r *http.Request) { func main() { // Getting kafka_ip and topic - kafkaHosts := strings.Split(os.Getenv("kafka_host"), ",") - kafkaTopic := os.Getenv("kafka_topic") + kafkaHosts := strings.Split(os.Getenv("kafka_host"), ";") + kafkaTopic := strings.Split(os.Getenv("kafka_topic"), ";") kafkaConsumerGroupName := os.Getenv("kafka_consumer_group_name") if kafkaConsumerGroupName == "" { kafkaConsumerGroupName = "prometheus-metrics-consumer" } - if kafkaTopic == "" || kafkaHosts[0] == "" { + if kafkaTopic[0] == "" || kafkaHosts[0] == "" { log.Fatalf(`"kafka_topic or kafka_host environment variables not set." For example, - export kafka_host=10.0.0.9:9092,10.0.0.10:9092 - kafka_topic=sunbird.metrics.topic`) + # export kafka_host=cluster1ip1:9092,cluster1ip2:9092;cluster2ip1:9092,cluster2ip2:9092 + # export kafka_topic=cluster1topic;cluster2topic + # ',' seperated multiple kafka nodes in the cluster and + # ';' seperated multiple kafka clusters + export kafka_host=10.0.0.9:9092,10.0.0.10:9092;20.0.0.9:9092,20.0.0.10:9092 + export kafka_topic=sunbird.metrics.topic;myapp.metrics.topic`) } fmt.Printf("kafka_host: %s\nkafka_topic: %s\nkafka_consumer_group_name: %s\n", kafkaHosts, kafkaTopic, kafkaConsumerGroupName) + // Checking kafka topics are given for all kafka clusters + if len(kafkaHosts) != len(kafkaTopic) { + log.Fatal("You should give same number of kafka_topics as kafka_clusters") + } // Checking kafka port and ip are accessible fmt.Println("Checking connection to kafka") - for _, host := range kafkaHosts { - conn, err := net.DialTimeout("tcp", host, 10*time.Second) - if err != nil { - log.Fatalf("Connection error: %s", err) + for _, hosts := range kafkaHosts { + for _, host := range strings.Split(hosts, ",") { + conn, err := net.DialTimeout("tcp", host, 10*time.Second) + if err != nil { + log.Fatalf("Connection error: %s", err) + } + fmt.Println("connection succeeded", host) + conn.Close() } - conn.Close() } fmt.Println("kafka is accessible") // Initializing kafka - kafkaReader = kafka.NewReader(kafka.ReaderConfig{ - Brokers: kafkaHosts, - GroupID: kafkaConsumerGroupName, // Consumer group ID - Topic: kafkaTopic, - MinBytes: 1e3, // 1KB - MaxBytes: 10e6, // 10MB - MaxWait: 200 * time.Millisecond, - RebalanceTimeout: time.Second * 5, - }) - defer kafkaReader.Close() + for k, v := range kafkaHosts { + kafkaReaders = append(kafkaReaders, kafka.NewReader(kafka.ReaderConfig{ + Brokers: strings.Split(v, ","), + GroupID: kafkaConsumerGroupName, // Consumer group ID + Topic: kafkaTopic[k], + MinBytes: 1e3, // 1KB + MaxBytes: 10e6, // 10MB + MaxWait: 200 * time.Millisecond, + RebalanceTimeout: time.Second * 5, + })) + defer kafkaReaders[k].Close() + } http.HandleFunc("/metrics", serve) http.HandleFunc("/health", health) log.Fatal(http.ListenAndServe(":8000", nil)) diff --git a/images/kafka-topic-exporter/build.sh b/images/kafka-topic-exporter/build.sh index 685c06e0e..74e4f8fdd 100755 --- a/images/kafka-topic-exporter/build.sh +++ b/images/kafka-topic-exporter/build.sh @@ -3,4 +3,4 @@ # Have to copy this file because In docker container we can't pass directories other than PWD cp ../../exporters/Go/kafka-topic-exporter/main.go . -docker build -f Dockerfile -t sunbird/kafka-topic-exporter:v1 . +docker build -f Dockerfile -t sunbird/kafka-topic-exporter:v2 . diff --git a/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-operator.yaml b/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-operator.yaml index 722d2014c..c04c77bd8 100644 --- a/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-operator.yaml +++ b/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-operator.yaml @@ -15,6 +15,7 @@ prometheus: retention: "{{ prometheus_retention_time | d('90d') }}" externalLabels: cluster: "{{ kubernetes_cluster_name | default('kubernetes-1')}}" + env: "{{ env }}" {% if prometheus_storage_spec is defined and prometheus_storage_spec %} storageSpec: {{ prometheus_storage_spec|to_json }} {% endif %} From aabde116c638454cd521b3b3681ffe30122ef971 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Mon, 11 May 2020 12:59:15 +0530 Subject: [PATCH 2414/2894] Removing statsd-exporter from templating (#1464) Signed-off-by: Rajesh Rajendran --- kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml b/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml index 03552832c..0bea811bf 100644 --- a/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml +++ b/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml @@ -9,7 +9,6 @@ monitoring_stack: - logger - blackbox-exporter - additional-scrape-configs - - statsd-exporter - alertrules - kafka-topic-exporter From eefd2f5e4bf5843fe206cd7c2b38e74ca7b4ca1f Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Mon, 11 May 2020 13:40:24 +0530 Subject: [PATCH 2415/2894] fix: updating load metrics dashboard --- .../dashboards/dashboards/load-metrics.json | 112 ++++++++++-------- 1 file changed, 62 insertions(+), 50 deletions(-) diff --git a/kubernetes/helm_charts/monitoring/dashboards/dashboards/load-metrics.json b/kubernetes/helm_charts/monitoring/dashboards/dashboards/load-metrics.json index 6b153f5db..4a5e22f1a 100644 --- a/kubernetes/helm_charts/monitoring/dashboards/dashboards/load-metrics.json +++ b/kubernetes/helm_charts/monitoring/dashboards/dashboards/load-metrics.json @@ -15,8 +15,8 @@ "editable": true, "gnetId": null, "graphTooltip": 0, - "id": 41, - "iteration": 1580975581165, + "id": 60, + "iteration": 1589183133348, "links": [], "panels": [ { @@ -24,7 +24,8 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$datasource", + "datasource": "Prometheus", + "decimals": 2, "fill": 1, "fillGradient": 0, "gridPos": { @@ -37,12 +38,13 @@ "id": 7, "legend": { "alignAsTable": true, - "avg": false, + "avg": true, "current": true, "max": true, - "min": true, + "min": false, "rightSide": true, "show": true, + "sideWidth": null, "total": false, "values": true }, @@ -63,10 +65,10 @@ "steppedLine": false, "targets": [ { - "expr": "avg without (cpu) (rate(node_cpu_seconds_total{ mode!=\"idle\"}[5m]))", + "expr": "sum by (instance) (avg without (cpu) (rate(node_cpu_seconds_total{ mode!=\"idle\"}[5m]))) * on (instance) group_left(nodename) node_uname_info{job=~\".*node-exporter\", nodename=~\"$nodename\"}", "format": "time_series", "intervalFactor": 1, - "legendFormat": "{{instance}}", + "legendFormat": "{{nodename}}", "refId": "A" } ], @@ -116,7 +118,8 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$datasource", + "datasource": "Prometheus", + "decimals": 2, "fill": 1, "fillGradient": 0, "gridPos": { @@ -129,10 +132,10 @@ "id": 1, "legend": { "alignAsTable": true, - "avg": false, + "avg": true, "current": true, "max": true, - "min": true, + "min": false, "rightSide": true, "show": true, "sort": "current", @@ -157,18 +160,9 @@ "steppedLine": false, "targets": [ { - "expr": "(host) * on (instance) group_left(nodename) node_load1", + "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": "{{host}}", - "refId": "A", - "step": 2 - }, - { - "expr": "(node_load1) * on (instance) group_left(nodename) node_uname_info{job=~\".*node-exporter\"}", - "format": "time_series", "intervalFactor": 2, "legendFormat": "{{nodename}}", "refId": "B", @@ -221,7 +215,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$datasource", + "datasource": "Prometheus", "fill": 1, "fillGradient": 0, "gridPos": { @@ -262,7 +256,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum((node_filesystem_size_bytes{ mountpoint=\"/\", job=~\".*node-exporter\"} - node_filesystem_free_bytes{ mountpoint=\"/\"}) * 100 / node_filesystem_size_bytes{mountpoint=\"/\"} * on (instance) group_left(nodename) node_uname_info ) by (nodename)", + "expr": "sum((node_filesystem_size_bytes{ mountpoint=\"/\", job=~\".*node-exporter\"} - node_filesystem_free_bytes{ mountpoint=\"/\"}) * 100 / node_filesystem_size_bytes{mountpoint=\"/\"} * on (instance) group_left(nodename) node_uname_info{job=~\".*node-exporter\", nodename=~\"$nodename\"} ) by (nodename)", "format": "time_series", "hide": false, "intervalFactor": 2, @@ -317,7 +311,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$datasource", + "datasource": "Prometheus", "fill": 1, "fillGradient": 0, "gridPos": { @@ -356,7 +350,7 @@ "steppedLine": false, "targets": [ { - "expr": "((node_memory_MemTotal_bytes - node_memory_MemFree_bytes - node_memory_Cached_bytes - node_memory_Buffers_bytes - node_memory_Slab_bytes) * on (instance) group_left(nodename) node_uname_info{job=~\".*node-exporter\"})", + "expr": "((node_memory_MemTotal_bytes - node_memory_MemFree_bytes - node_memory_Cached_bytes - node_memory_Buffers_bytes - node_memory_Slab_bytes) * on (instance) group_left(nodename) node_uname_info{job=~\".*node-exporter\", nodename=~\"$nodename\"})", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{nodename}}", @@ -410,21 +404,23 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$datasource", + "datasource": "Prometheus", "fill": 1, + "fillGradient": 0, "gridPos": { "h": 7, "w": 24, "x": 0, "y": 31 }, + "hiddenSeries": false, "id": 4, "legend": { "alignAsTable": true, - "avg": false, + "avg": true, "current": true, "max": true, - "min": true, + "min": false, "rightSide": true, "show": true, "total": false, @@ -434,7 +430,9 @@ "linewidth": 1, "links": [], "nullPointMode": "null", - "options": {}, + "options": { + "dataLinks": [] + }, "percentage": false, "pointradius": 5, "points": false, @@ -445,7 +443,7 @@ "steppedLine": false, "targets": [ { - "expr": "irate(node_network_receive_bytes_total{device!=\"lo\"}[5m]) * on (instance) group_left(nodename) node_uname_info{job=~\".*node-exporter\"}", + "expr": "irate(node_network_receive_bytes_total{device!=\"lo\"}[5m]) * on (instance) group_left(nodename) node_uname_info{job=~\".*node-exporter\", nodename=~\"$nodename\"}", "format": "time_series", "intervalFactor": 2, "legendFormat": "In: {{nodename}}", @@ -473,7 +471,7 @@ }, "yaxes": [ { - "format": "short", + "format": "Bps", "label": null, "logBase": 1, "max": null, @@ -481,7 +479,7 @@ "show": true }, { - "format": "short", + "format": "Bps", "label": null, "logBase": 1, "max": null, @@ -499,21 +497,23 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$datasource", + "datasource": "Prometheus", "fill": 1, + "fillGradient": 0, "gridPos": { "h": 7, "w": 24, "x": 0, "y": 38 }, + "hiddenSeries": false, "id": 5, "legend": { "alignAsTable": true, - "avg": false, + "avg": true, "current": true, "max": true, - "min": true, + "min": false, "rightSide": true, "show": true, "total": false, @@ -523,7 +523,9 @@ "linewidth": 1, "links": [], "nullPointMode": "null", - "options": {}, + "options": { + "dataLinks": [] + }, "percentage": false, "pointradius": 5, "points": false, @@ -534,7 +536,7 @@ "steppedLine": false, "targets": [ { - "expr": "irate(node_network_transmit_bytes_total{device!=\"lo\"}[5m]) * on (instance) group_left(nodename) node_uname_info{job=~\".*node-exporter\"}", + "expr": "irate(node_network_transmit_bytes_total{device!=\"lo\"}[5m]) * on (instance) group_left(nodename) node_uname_info{job=~\".*node-exporter\", nodename=~\"$nodename\"}", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{nodename}}", @@ -562,7 +564,7 @@ }, "yaxes": [ { - "format": "short", + "format": "Bps", "label": null, "logBase": 1, "max": null, @@ -570,7 +572,7 @@ "show": true }, { - "format": "short", + "format": "Bps", "label": null, "logBase": 1, "max": null, @@ -585,27 +587,37 @@ } ], "refresh": false, - "schemaVersion": 21, + "schemaVersion": 22, "style": "dark", "tags": [], "templating": { "list": [ { + "allValue": null, "current": { - "text": "Prometheus_DS1", - "value": "Prometheus_DS1" + "text": "All", + "value": [ + "$__all" + ] }, + "datasource": "Prometheus", + "definition": "label_values(node_uname_info{job=~\".*node-exporter\"},nodename)", "hide": 0, - "includeAll": false, - "label": "Data Source", - "multi": false, - "name": "datasource", + "includeAll": true, + "label": null, + "multi": true, + "name": "nodename", "options": [], - "query": "prometheus", + "query": "label_values(node_uname_info{job=~\".*node-exporter\"},nodename)", "refresh": 1, - "regex": "/Prom.*/", + "regex": "", "skipUrlSync": false, - "type": "datasource" + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false } ] }, @@ -640,6 +652,6 @@ }, "timezone": "", "title": "Load metrics", - "uid": "000000007", - "version": 1 + "uid": "B-a5y6eZz", + "version": 11 } From a653ae6e923f885fc32ee5b5e5ad785771bb4aae Mon Sep 17 00:00:00 2001 From: SMY ALTAMASH <30286162+SMYALTAMASH@users.noreply.github.com> Date: Mon, 11 May 2020 16:31:00 +0530 Subject: [PATCH 2416/2894] Update main.yml --- ansible/roles/kong-consumer/defaults/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/ansible/roles/kong-consumer/defaults/main.yml b/ansible/roles/kong-consumer/defaults/main.yml index 925b789c4..a4239d2fd 100644 --- a/ansible/roles/kong-consumer/defaults/main.yml +++ b/ansible/roles/kong-consumer/defaults/main.yml @@ -21,6 +21,7 @@ mobile_device_groups: - userAccess - userTempAdmin - userUpdate + - contentTempAccess kong_all_consumer_groups: - announcementAccess From d0dfb475903c5ffc2cf4957f26ca7cefc0d295d1 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Wed, 13 May 2020 10:29:19 +0530 Subject: [PATCH 2417/2894] Nginx cache changes from loadtest to preprod (#1468) * added proxy cache path framework_cache * added location block for framework api * Update values.j2 * added location block for framework api * Clearing trailing whitespaces from proxy config Signed-off-by: Rajesh Rajendran * Updating cache rule Signed-off-by: Rajesh Rajendran * Picked all changes made to proxy-config Signed-off-by: Rajesh Rajendran Co-authored-by: G33tha --- .../core/nginx-public-ingress/values.j2 | 93 +++++++++++++++---- 1 file changed, 77 insertions(+), 16 deletions(-) diff --git a/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 b/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 index e958219a4..764a64fa9 100644 --- a/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 +++ b/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 @@ -156,7 +156,29 @@ proxyconfig: | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } - + + location /api/framework { + # Enabling caching + proxy_cache_key $proxy_host$request_uri; + proxy_cache framework_cache; + add_header X-Proxy-Cache $upstream_cache_status; + proxy_cache_lock on; + proxy_cache_valid any 3600s; + + rewrite ^/api/(.*) /$1 break; + client_max_body_size 60M; + proxy_set_header Connection ""; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Scheme $scheme; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_connect_timeout 5; + proxy_send_timeout 60; + proxy_read_timeout 70; + proxy_http_version 1.1; + proxy_pass http://kong; + } + location /api/ { if ($request_method = OPTIONS ) { add_header Access-Control-Allow-Origin "*" ; @@ -448,6 +470,43 @@ proxyconfig: | proxy_send_timeout 60; proxy_read_timeout 70; } + + location ~ /resourcebundles/v1/read|/learner/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; + proxy_cache_lock on; + proxy_cache_valid any 3600s; + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Scheme $scheme; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_pass http://player; + } + + location /api/channel/v1/read { + proxy_cache_key $proxy_host$request_uri; + proxy_cache framework_cache; + add_header X-Proxy-Cache $upstream_cache_status; + proxy_cache_lock on; + proxy_cache_valid any 3600s; + + rewrite ^/api/channel/v1/read/(.*) /channel/v1/read/$1 break; + client_max_body_size 60M; + proxy_set_header Connection ""; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Scheme $scheme; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_connect_timeout 5; + proxy_send_timeout 60; + proxy_read_timeout 70; + proxy_http_version 1.1; + proxy_pass http://kong; + } + location /oauth2callback { return 200 'OK'; add_header Content-Type text/plain; @@ -498,9 +557,9 @@ nginxconfig: | '"$request" $status $body_bytes_sent ' '$request_time $upstream_response_time $pipe' '"$http_referer" "$http_user_agent"'; - + access_log /var/log/nginx/access.log main; - + # Shared dictionary to store metrics lua_shared_dict prometheus_metrics 10M; lua_package_path "/etc/nginx/lua_modules/?.lua"; @@ -514,38 +573,38 @@ nginxconfig: | metric_connections = prometheus:gauge( "nginx_http_connections", "Number of HTTP connections", {"state"}) '; - + # Collecting metrics log_by_lua ' metric_requests:inc(1, {ngx.var.server_name, ngx.var.status, ngx.var.request_method}) metric_latency:observe(tonumber(ngx.var.request_time), {ngx.var.server_name}) '; - + header_filter_by_lua_block { ngx.header["server"] = nil } - + sendfile on; #tcp_nopush on; client_max_body_size 60M; - + keepalive_timeout 65s; keepalive_requests 200; - + # Nginx connection limit per ip limit_conn_zone $binary_remote_addr zone=limitbyaddr:10m; limit_conn_status 429; - + upstream kong { server kong:8000; keepalive 1000; } - + upstream encryption { server enc-service:8013; keepalive 1000; } - + upstream player { server player:3000; keepalive 1000; @@ -555,8 +614,10 @@ nginxconfig: | # local caching for images and files proxy_cache_path /tmp/proxy_cache levels=1:2 keys_zone=tmp_cache:5m max_size=10m inactive=60m use_temp_path=off; - - + + # cache framework + proxy_cache_path /tmp/framework_cache levels=1:2 keys_zone=framework_cache:5m max_size=700m inactive=60m use_temp_path=off; + server { listen 9145; location /metrics { @@ -620,7 +681,7 @@ keycloakconf: | proxy_set_header X-Forwarded-Proto $scheme; proxy_pass http://player; } - + location ~* ^/auth/admin/master/console/ { return 301 {{proto}}://{{ merge_proxy_server_name }}; } @@ -636,7 +697,7 @@ keycloakconf: | } location / { rewrite ^/(.*) /$1 break; - + proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Scheme $scheme; @@ -648,7 +709,7 @@ keycloakconf: | proxy_http_version 1.1; proxy_pass http://player; } - } + } serviceMonitor: enabled: true From 9fd477bf14f41e104053bd0e1039639bf088afc8 Mon Sep 17 00:00:00 2001 From: G33tha Date: Wed, 13 May 2020 17:27:05 +0530 Subject: [PATCH 2418/2894] Updated proxy config (#1471) * Update values.j2 * Update proxy-default.conf --- .../stack-proxy/templates/proxy-default.conf | 66 +++++++++++++++++++ .../core/nginx-public-ingress/values.j2 | 3 +- 2 files changed, 68 insertions(+), 1 deletion(-) diff --git a/ansible/roles/stack-proxy/templates/proxy-default.conf b/ansible/roles/stack-proxy/templates/proxy-default.conf index 231adc87f..9ca45d7d8 100644 --- a/ansible/roles/stack-proxy/templates/proxy-default.conf +++ b/ansible/roles/stack-proxy/templates/proxy-default.conf @@ -115,6 +115,29 @@ server { proxy_set_header X-Forwarded-Proto $scheme; # root /usr/share/nginx/www; } + + location /api/framework { + # Enabling caching + proxy_cache_key $proxy_host$request_uri; + proxy_cache framework_cache; + add_header X-Proxy-Cache $upstream_cache_status; + proxy_cache_lock on; + proxy_cache_valid any 3600s; + + rewrite ^/api/(.*) /$1 break; + client_max_body_size 60M; + proxy_set_header Connection ""; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Scheme $scheme; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_connect_timeout 5; + proxy_send_timeout 60; + proxy_read_timeout 70; + proxy_http_version 1.1; + proxy_pass http://kong; + } + location /api/ { if ($request_method = OPTIONS ) { add_header Access-Control-Allow-Origin "*" ; @@ -483,11 +506,54 @@ location ~* ^/desktop/(.*) { proxy_send_timeout 60; proxy_read_timeout 70; } + + location ~ /resourcebundles/v1/read|/learner/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; + proxy_cache_lock on; + proxy_cache_valid any 3600s; + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Scheme $scheme; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_pass http://player; + } + + location /api/channel/v1/read { + proxy_cache_key $proxy_host$request_uri; + proxy_cache framework_cache; + add_header X-Proxy-Cache $upstream_cache_status; + proxy_cache_lock on; + proxy_cache_valid any 3600s; + + rewrite ^/api/channel/v1/read/(.*) /channel/v1/read/$1 break; + client_max_body_size 60M; + proxy_set_header Connection ""; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Scheme $scheme; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_connect_timeout 5; + proxy_send_timeout 60; + proxy_read_timeout 70; + proxy_http_version 1.1; + proxy_pass http://kong; + } location /oauth2callback { return 200 'OK'; add_header Content-Type text/plain; } + + # local caching for images and files + proxy_cache_path /tmp/proxy_cache levels=1:2 keys_zone=tmp_cache:5m max_size=10m inactive=60m use_temp_path=off; + + proxy_cache_path /tmp/api_cache levels=1:2 keys_zone=proxy_cache:5m max_size=300m inactive=60m use_temp_path=off; + # cache framework + proxy_cache_path /tmp/framework_cache levels=1:2 keys_zone=framework_cache:5m max_size=700m inactive=60m use_temp_path=off; {# Including custom configuration #} {{ proxy_custom_config }} diff --git a/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 b/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 index 764a64fa9..f2b5683e9 100644 --- a/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 +++ b/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 @@ -614,7 +614,8 @@ nginxconfig: | # local caching for images and files proxy_cache_path /tmp/proxy_cache levels=1:2 keys_zone=tmp_cache:5m max_size=10m inactive=60m use_temp_path=off; - + + proxy_cache_path /tmp/api_cache levels=1:2 keys_zone=proxy_cache:5m max_size=300m inactive=60m use_temp_path=off; # cache framework proxy_cache_path /tmp/framework_cache levels=1:2 keys_zone=framework_cache:5m max_size=700m inactive=60m use_temp_path=off; From 7c4bda460d8d2a6181d6585766ae7facb0d9b64d Mon Sep 17 00:00:00 2001 From: Kumar Gauraw Date: Thu, 14 May 2020 10:10:30 +0530 Subject: [PATCH 2419/2894] Issue #SC-0000 feat: Added logback and relaxed kafka appender --- .../tasks/assessment-service.yml | 13 ++++ .../templates/assessment-service_logback.xml | 60 +++++++++++++++++++ .../templates/taxonomy-service_logback.xml | 32 +++++----- 3 files changed, 88 insertions(+), 17 deletions(-) create mode 100644 ansible/roles/stack-sunbird/templates/assessment-service_logback.xml diff --git a/ansible/roles/stack-sunbird/tasks/assessment-service.yml b/ansible/roles/stack-sunbird/tasks/assessment-service.yml index f83528a52..282eb3ab9 100644 --- a/ansible/roles/stack-sunbird/tasks/assessment-service.yml +++ b/ansible/roles/stack-sunbird/tasks/assessment-service.yml @@ -7,6 +7,10 @@ become: yes template: src=assessment-service_application.conf dest=/home/deployer/config/assessment-service.conf mode=0644 +- name: Save logback configuration into a env file + become: yes + template: src=assessment-service_logback.xml dest=/home/deployer/config/assessment-service_logback.xml mode=0644 + - name: Remove old assessment-service.conf docker config become: yes shell: "docker config rm assessment-service.conf" @@ -16,6 +20,15 @@ become: yes shell: "docker config create assessment-service.conf /home/deployer/config/assessment-service.conf" +- name: Remove old logback.xml docker config + become: yes + shell: "docker config rm assessment-service_logback.xml" + ignore_errors: yes + +- name: Copy new logback.xml + become: yes + shell: "docker config create assessment-service_logback.xml /home/deployer/config/assessment-service_logback.xml" + - name: Deploy assessment-service shell: "docker service create --with-registry-auth --replicas {{ assessment_service_replicas }} -p 9003:9000 --name assessment-service --hostname assessment-service --reserve-memory {{ assessment_service_reservation_memory }} --limit-memory {{ assessment_service_limit_memory }} --limit-cpu {{ assessment_service_limit_cpu }} --reserve-cpu {{ assessment_service_reservation_cpu }} --health-cmd 'wget -qO- assessment-service:9000/health || exit 1' --health-timeout 10s --health-retries 5 --network application_default --config source=assessment-service.conf,target=/home/sunbird/assessment-service-1.0-SNAPSHOT/config/application.conf,mode=0644 {{hub_org}}/{{image_name}}:{{image_tag}}" args: diff --git a/ansible/roles/stack-sunbird/templates/assessment-service_logback.xml b/ansible/roles/stack-sunbird/templates/assessment-service_logback.xml new file mode 100644 index 000000000..1d3fdd0c6 --- /dev/null +++ b/ansible/roles/stack-sunbird/templates/assessment-service_logback.xml @@ -0,0 +1,60 @@ + + + + + + + + + + %d %msg%n + + + + + + + + + + + + + + + + + + + + %msg + + + {{env_name}}.telemetry.raw + + + + + + + + + bootstrap.servers={{lp_kafka_url}} + + acks=0 + + linger.ms=15000 + + max.block.ms=0 + + client.id=${HOSTNAME}-${CONTEXT_NAME}-logback-relaxed + + + + + + + + + + \ No newline at end of file diff --git a/ansible/roles/stack-sunbird/templates/taxonomy-service_logback.xml b/ansible/roles/stack-sunbird/templates/taxonomy-service_logback.xml index 234594bc4..1d3fdd0c6 100644 --- a/ansible/roles/stack-sunbird/templates/taxonomy-service_logback.xml +++ b/ansible/roles/stack-sunbird/templates/taxonomy-service_logback.xml @@ -32,26 +32,24 @@ {{env_name}}.telemetry.raw - + - - - 0 - - + + - - - bootstrap.servers={{lp_kafka_url}} - - buffer.memory=8388608 - - - metadata.fetch.timeout.ms=99999999999 + + + bootstrap.servers={{lp_kafka_url}} + + acks=0 + + linger.ms=15000 + + max.block.ms=0 - client.id=${HOSTNAME}-${CONTEXT_NAME}-logback-restrictive - - + client.id=${HOSTNAME}-${CONTEXT_NAME}-logback-relaxed + + From d0c08ddf6a25f1a689b9ead84e86e8c693434feb Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Thu, 14 May 2020 11:31:41 +0530 Subject: [PATCH 2420/2894] Redis exporter for multi cluster (#1475) * Adding redis-expoter Signed-off-by: Rajesh Rajendran * Adding redis exporter dashboard * Adding example in public inventory Signed-off-by: Rajesh Rajendran * Adding redis-expoter chart Signed-off-by: Rajesh Rajendran --- .../sunbird-monitoring/defaults/main.yml | 1 + .../templates/additional-scrape-configs.yaml | 12 + .../templates/prometheus-redis-exporter.yaml | 1 + .../dashboards/dashboards/redis.json | 492 ++++++++++++++++-- .../prometheus-redis-exporter/.helmignore | 21 + .../prometheus-redis-exporter/Chart.yaml | 14 + .../prometheus-redis-exporter/OWNERS | 4 + .../prometheus-redis-exporter/README.md | 135 +++++ .../templates/NOTES.txt | 15 + .../templates/_helpers.tpl | 43 ++ .../templates/deployment.yaml | 98 ++++ .../templates/podsecuritypolicy.yaml | 39 ++ .../templates/prometheusrule.yaml | 23 + .../templates/role.yaml | 18 + .../templates/rolebinding.yaml | 18 + .../templates/service.yaml | 24 + .../templates/serviceaccount.yaml | 11 + .../templates/servicemonitor.yaml | 41 ++ .../prometheus-redis-exporter/values.yaml | 119 +++++ private_repo/ansible/inventory/dev/Core/hosts | 3 + 20 files changed, 1099 insertions(+), 33 deletions(-) create mode 100644 kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-redis-exporter.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-redis-exporter/.helmignore create mode 100755 kubernetes/helm_charts/monitoring/prometheus-redis-exporter/Chart.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-redis-exporter/OWNERS create mode 100755 kubernetes/helm_charts/monitoring/prometheus-redis-exporter/README.md create mode 100755 kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/NOTES.txt create mode 100755 kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/_helpers.tpl create mode 100755 kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/deployment.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/podsecuritypolicy.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/prometheusrule.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/role.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/rolebinding.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/service.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/serviceaccount.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/servicemonitor.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-redis-exporter/values.yaml diff --git a/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml b/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml index 0bea811bf..f45ecb7c3 100644 --- a/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml +++ b/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml @@ -11,6 +11,7 @@ monitoring_stack: - additional-scrape-configs - alertrules - kafka-topic-exporter + - prometheus-redis-exporter namespace: monitoring 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 465decaad..2c7a45991 100644 --- a/kubernetes/ansible/roles/sunbird-monitoring/templates/additional-scrape-configs.yaml +++ b/kubernetes/ansible/roles/sunbird-monitoring/templates/additional-scrape-configs.yaml @@ -160,6 +160,18 @@ scrapeconfig: replacement: $1 action: keep + - job_name: 'redis_exporter_targets' + static_configs: + - targets: ["{{ groups['redis-exporter-targets'] | difference(["localhost"]) | map('regex_replace', '^(.*)$', '\\1:6379') | list | join("\", \"") }}"] + metrics_path: /scrape + relabel_configs: + - source_labels: [__address__] + target_label: __param_target + - source_labels: [__param_target] + target_label: instance + - target_label: __address__ + replacement: redis-exporter:9121 + {% for item in service_blackbox_checks %} # This empty line ensures indentation is correct after ansible jinja2 template is materialized - job_name: 'availability_{{ item.service_name }}' diff --git a/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-redis-exporter.yaml b/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-redis-exporter.yaml new file mode 100644 index 000000000..f900e9484 --- /dev/null +++ b/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-redis-exporter.yaml @@ -0,0 +1 @@ +fullnameOverride: redis-exporter diff --git a/kubernetes/helm_charts/monitoring/dashboards/dashboards/redis.json b/kubernetes/helm_charts/monitoring/dashboards/dashboards/redis.json index 096d461fd..d32e49167 100644 --- a/kubernetes/helm_charts/monitoring/dashboards/dashboards/redis.json +++ b/kubernetes/helm_charts/monitoring/dashboards/dashboards/redis.json @@ -12,12 +12,12 @@ } ] }, - "description": "Redis Dashboard for Prometheus Redis Exporter", + "description": "Redis Dashboard for Prometheus Redis Exporter 1.x", "editable": true, "gnetId": 763, "graphTooltip": 0, - "id": 39, - "iteration": 1580881120127, + "id": 25, + "iteration": 1589262474857, "links": [], "panels": [ { @@ -29,7 +29,7 @@ "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], - "datasource": "Prometheus_Stateful", + "datasource": "Prometheus", "decimals": 0, "editable": true, "error": false, @@ -43,7 +43,7 @@ }, "gridPos": { "h": 7, - "w": 6, + "w": 2, "x": 0, "y": 0 }, @@ -65,6 +65,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -117,7 +118,7 @@ "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], - "datasource": "Prometheus_Stateful", + "datasource": "Prometheus", "decimals": 0, "editable": true, "error": false, @@ -131,8 +132,8 @@ }, "gridPos": { "h": 7, - "w": 6, - "x": 6, + "w": 2, + "x": 2, "y": 0 }, "hideTimeOverride": true, @@ -154,6 +155,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -186,7 +188,98 @@ "thresholds": "", "timeFrom": "1m", "timeShift": null, - "title": "Connected Clients", + "title": "Clients", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "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": "Prometheus", + "decimals": 0, + "editable": true, + "error": false, + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": true, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 4, + "y": 0 + }, + "hideTimeOverride": true, + "id": 11, + "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, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": true + }, + "tableColumn": "", + "targets": [ + { + "expr": "100 * (redis_memory_used_bytes{instance=~\"$instance\"} / redis_memory_max_bytes{instance=~\"$instance\"} )", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "metric": "", + "refId": "A", + "step": 2 + } + ], + "thresholds": "80,95", + "timeFrom": "1m", + "timeShift": null, + "title": "Memory Usage", "type": "singlestat", "valueFontSize": "80%", "valueMaps": [ @@ -203,18 +296,119 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Prometheus_Stateful", + "datasource": "Prometheus", + "editable": true, + "error": false, + "fill": 1, + "fillGradient": 0, + "grid": {}, + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 0 + }, + "hiddenSeries": false, + "id": 2, + "isNew": true, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "rate(redis_commands_processed_total{instance=~\"$instance\"}[1m])", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "metric": "A", + "refId": "A", + "step": 240, + "target": "" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Commands Executed / sec", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Prometheus", "decimals": 2, "editable": true, "error": false, "fill": 1, + "fillGradient": 0, "grid": {}, "gridPos": { "h": 7, - "w": 12, - "x": 12, + "w": 8, + "x": 16, "y": 0 }, + "hiddenSeries": false, "id": 1, "isNew": true, "legend": { @@ -230,6 +424,9 @@ "linewidth": 2, "links": [], "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, "percentage": true, "pointradius": 5, "points": false, @@ -313,10 +510,11 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Prometheus_Stateful", + "datasource": "Prometheus", "editable": true, "error": false, "fill": 1, + "fillGradient": 0, "grid": {}, "gridPos": { "h": 7, @@ -324,6 +522,7 @@ "x": 0, "y": 7 }, + "hiddenSeries": false, "id": 7, "isNew": true, "legend": { @@ -341,6 +540,9 @@ "linewidth": 2, "links": [], "nullPointMode": "null as zero", + "options": { + "dataLinks": [] + }, "percentage": false, "pointradius": 5, "points": false, @@ -417,10 +619,11 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Prometheus_Stateful", + "datasource": "Prometheus", "editable": true, "error": false, "fill": 1, + "fillGradient": 0, "grid": {}, "gridPos": { "h": 7, @@ -428,6 +631,7 @@ "x": 12, "y": 7 }, + "hiddenSeries": false, "id": 10, "isNew": true, "legend": { @@ -443,6 +647,9 @@ "linewidth": 2, "links": [], "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, "percentage": false, "pointradius": 5, "points": false, @@ -517,17 +724,19 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Prometheus_Stateful", + "datasource": "Prometheus", "editable": true, "error": false, "fill": 7, + "fillGradient": 0, "grid": {}, "gridPos": { "h": 7, - "w": 24, + "w": 12, "x": 0, "y": 14 }, + "hiddenSeries": false, "id": 5, "isNew": true, "legend": { @@ -545,6 +754,9 @@ "linewidth": 2, "links": [], "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, "percentage": false, "pointradius": 5, "points": false, @@ -607,6 +819,114 @@ "alignLevel": null } }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Prometheus", + "editable": true, + "error": false, + "fill": 7, + "fillGradient": 0, + "grid": {}, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 14 + }, + "hiddenSeries": false, + "id": 13, + "isNew": true, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum (redis_db_keys{instance=~\"$instance\"}) - sum (redis_db_keys_expiring{instance=~\"$instance\"}) ", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "not expiring", + "refId": "A", + "step": 240, + "target": "" + }, + { + "expr": "sum (redis_db_keys_expiring{instance=~\"$instance\"}) ", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "expiring", + "metric": "", + "refId": "B", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Expiring vs Not-Expiring Keys", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, { "aliasColors": { "evicts": "#890F02", @@ -616,17 +936,19 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Prometheus_Stateful", + "datasource": "Prometheus", "editable": true, "error": false, "fill": 1, + "fillGradient": 0, "grid": {}, "gridPos": { - "h": 5, - "w": 24, + "h": 7, + "w": 12, "x": 0, "y": 21 }, + "hiddenSeries": false, "id": 8, "isNew": true, "legend": { @@ -642,6 +964,9 @@ "linewidth": 2, "links": [], "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, "percentage": false, "pointradius": 5, "points": false, @@ -719,10 +1044,108 @@ "align": false, "alignLevel": null } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Prometheus", + "editable": true, + "error": false, + "fill": 8, + "fillGradient": 0, + "grid": {}, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 21 + }, + "hiddenSeries": false, + "id": 14, + "isNew": true, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "topk(5, irate(redis_commands_total{instance=~\"$instance\"} [1m]))", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{ cmd }}", + "metric": "redis_command_calls_total", + "refId": "A", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Command Calls / sec", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "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": "30s", - "schemaVersion": 18, + "schemaVersion": 21, "style": "dark", "tags": [ "prometheus", @@ -733,24 +1156,27 @@ { "allValue": null, "current": { - "text": "monitor_stateful_redis-exporter:9121", - "value": "monitor_stateful_redis-exporter:9121" + "text": "redis://redis-1-headless:6379", + "value": "redis://redis-1-headless:6379" }, + "datasource": "Prometheus", + "definition": "label_values(redis_up, instance)", "hide": 0, "includeAll": false, "label": null, "multi": false, "name": "instance", - "options": [ - { - "selected": true, - "text": "monitor_stateful_redis-exporter:9121", - "value": "monitor_stateful_redis-exporter:9121" - } - ], - "query": "monitor_stateful_redis-exporter:9121", + "options": [], + "query": "label_values(redis_up, instance)", + "refresh": 2, + "regex": "", "skipUrlSync": false, - "type": "custom" + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false } ] }, @@ -785,6 +1211,6 @@ }, "timezone": "browser", "title": "Redis Dashboard for Prometheus Redis Exporter", - "uid": "8QBoYnaWz", + "uid": "A4ZEhMRGk", "version": 2 -} \ No newline at end of file +} diff --git a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/.helmignore b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/.helmignore new file mode 100755 index 000000000..f0c131944 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/Chart.yaml b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/Chart.yaml new file mode 100755 index 000000000..a768b057f --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/Chart.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +appVersion: 1.3.4 +description: Prometheus exporter for Redis metrics +home: https://github.com/oliver006/redis_exporter +keywords: +- prometheus +- redis +maintainers: +- email: arcadie.condrat@gmail.com + name: acondrat +name: prometheus-redis-exporter +sources: +- https://github.com/oliver006/redis_exporter +version: 3.4.0 diff --git a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/OWNERS b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/OWNERS new file mode 100755 index 000000000..493906f56 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/OWNERS @@ -0,0 +1,4 @@ +approvers: +- acondrat +reviewers: +- acondrat diff --git a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/README.md b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/README.md new file mode 100755 index 000000000..4d299c8ec --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/README.md @@ -0,0 +1,135 @@ +# prometheus-redis-exporter + +[redis_exporter](https://github.com/oliver006/redis_exporter) is a Prometheus exporter for Redis metrics. + +## TL;DR; + +```bash +$ helm install stable/prometheus-redis-exporter +``` + +## Introduction + +This chart bootstraps a [redis_exporter](https://github.com/oliver006/redis_exporter) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. + +## Prerequisites + +- Kubernetes 1.10+ with Beta APIs enabled + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```bash +$ helm install --name my-release stable/prometheus-redis-exporter +``` + +The command deploys prometheus-redis-exporter on the Kubernetes cluster in the default configuration. + +## Uninstalling the Chart + +To uninstall/delete the `my-release` deployment: + +```bash +$ helm delete my-release +``` + +The command removes all the Kubernetes components associated with the chart and deletes the release. + +## Configuration + +The following table lists the configurable parameters and their default values. + +| Parameter | Description | Default | +| ---------------------- | --------------------------------------------------- | ------------------------- | +| `replicaCount` | desired number of prometheus-redis-exporter pods | `1` | +| `image.repository` | prometheus-redis-exporter image repository | `oliver006/redis_exporter`| +| `image.tag` | prometheus-redis-exporter image tag | `v1.3.4` | +| `image.pullPolicy` | image pull policy | `IfNotPresent` | +| `image.pullSecrets` | image pull secrets | {} | +| `extraArgs` | extra arguments for the binary; possible values [here](https://github.com/oliver006/redis_exporter#flags)| {} +| `env` | additional environment variables in YAML format. Can be used to pass credentials as env variables (via secret) as per the image readme [here](https://github.com/oliver006/redis_exporter#environment-variables) | {} | +| `resources` | cpu/memory resource requests/limits | {} | +| `tolerations` | toleration labels for pod assignment | {} | +| `affinity` | affinity settings for pod assignment | {} | +| `service.type` | desired service type | `ClusterIP` | +| `service.port` | service external port | `9121` | +| `service.annotations` | Custom annotations for service | `{}` | +| `service.labels` | Additional custom labels for the service | `{}` | +| `redisAddress` | Address of the Redis instance to scrape. Use `rediss://` for SSL. | `redis://myredis:6379` | +| `annotations` | pod annotations for easier discovery | {} | +| `rbac.create` | Specifies whether RBAC resources should be created.| `true` | +| `rbac.pspEnabled` | Specifies whether a PodSecurityPolicy should be created.| `true` | +| `serviceAccount.create` | Specifies whether a service account should be created.| `true` | +| `serviceAccount.name` | Name of the service account.| | +| `serviceMonitor.enabled` | Use servicemonitor from prometheus operator | `false` | +| `serviceMonitor.namespace` | Namespace this servicemonitor is installed in | | +| `serviceMonitor.interval` | How frequently Prometheus should scrape | | +| `serviceMonitor.telemetryPath` | Path to redis-exporter telemtery-path | | +| `serviceMonitor.labels` | Labels for the servicemonitor passed to Prometheus Operator | `{}` | +| `serviceMonitor.timeout` | Timeout after which the scrape is ended | | +| `serviceMonitor.targetLabels` | Set of labels to transfer on the Kubernetes Service onto the target. | | +| `prometheusRule.enabled` | Set this to true to create prometheusRules for Prometheus operator | `false` | +| `prometheusRule.additionalLabels` | Additional labels that can be used so prometheusRules will be discovered by Prometheus | `{}` | +| `prometheusRule.namespace` | namespace where prometheusRules resource should be created | | +| `prometheusRule.rules` | [rules](https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/) to be created, check values for an example. | `[]` | +| `script.configmap` | Let you run a custom lua script from a configmap. The corresponding environment variable `REDIS_EXPORTER_SCRIPT` will be set automatically || +| `script.keyname` | Name of the key inside configmap which contains your script || +| `auth.enabled` | Specifies whether redis uses authentication | `false` | +| `auth.secret.name` | Name of existing redis secret (ignores redisPassword) || +| `auth.secret.key` | Name of key containing password to be retrieved from the existing secret || +| `auth.redisPassword` | Redis password (when not stored in a secret) || + +For more information please refer to the [redis_exporter](https://github.com/oliver006/redis_exporter) documentation. + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, + +```bash +$ helm install --name my-release \ + --set "redisAddress=redis://myredis:6379" \ + stable/prometheus-redis-exporter +``` + +Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, + +```bash +$ helm install --name my-release -f values.yaml stable/prometheus-redis-exporter +``` +### Using a custom LUA-Script +First, you need to deploy the script with a configmap. This is an example script from mentioned in the [redis_exporter-image repository](https://github.com/oliver006/redis_exporter/blob/master/contrib/sample_collect_script.lua) +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: prometheus-redis-exporter-script +data: + script: |- + -- Example collect script for -script option + -- This returns a Lua table with alternating keys and values. + -- Both keys and values must be strings, similar to a HGETALL result. + -- More info about Redis Lua scripting: https://redis.io/commands/eval + + local result = {} + + -- Add all keys and values from some hash in db 5 + redis.call("SELECT", 5) + local r = redis.call("HGETALL", "some-hash-with-stats") + if r ~= nil then + for _,v in ipairs(r) do + table.insert(result, v) -- alternating keys and values + end + end + + -- Set foo to 42 + table.insert(result, "foo") + table.insert(result, "42") -- note the string, use tostring() if needed + + return result +``` +If you want to use this script for collecting metrics, you could do this by just set `script.configmap` to the name of the configmap (e.g. `prometheus-redis-exporter-script`) and `script.keyname` to the configmap-key holding the script (eg. `script`). The required variables inside the container will be set automatically. + +## Upgrading + +### To 3.0.1 + + The default tag for the exporter image is now `v1.x.x`. This major release includes changes to the names of various metrics and no longer directly supports the configuration (and scraping) of multiple redis instances; that is now the Prometheus server's responsibility. You'll want to use [this dashboard](https://github.com/oliver006/redis_exporter/blob/master/contrib/grafana_prometheus_redis_dashboard.json) now. Please see the [redis_exporter github page](https://github.com/oliver006/redis_exporter#upgrading-from-0x-to-1x) for more details. diff --git a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/NOTES.txt b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/NOTES.txt new file mode 100755 index 000000000..1798dc24a --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/NOTES.txt @@ -0,0 +1,15 @@ +1. Get the Redis Exporter URL by running these commands: +{{- if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "prometheus-redis-exporter.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get svc -w {{ template "prometheus-redis-exporter.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "prometheus-redis-exporter.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + echo http://$SERVICE_IP:{{ .Values.service.externalPort }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "prometheus-redis-exporter.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }} +{{- end }} diff --git a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/_helpers.tpl b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/_helpers.tpl new file mode 100755 index 000000000..4d2ad21e7 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/_helpers.tpl @@ -0,0 +1,43 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "prometheus-redis-exporter.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "prometheus-redis-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 -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "prometheus-redis-exporter.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "prometheus-redis-exporter.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "prometheus-redis-exporter.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} diff --git a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/deployment.yaml b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/deployment.yaml new file mode 100755 index 000000000..985cd48eb --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/deployment.yaml @@ -0,0 +1,98 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "prometheus-redis-exporter.fullname" . }} + labels: + app: {{ template "prometheus-redis-exporter.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ template "prometheus-redis-exporter.name" . }} + release: {{ .Release.Name }} + template: + metadata: + annotations: +{{ toYaml .Values.annotations | indent 8 }} + labels: + app: {{ template "prometheus-redis-exporter.name" . }} + release: {{ .Release.Name }} + spec: + serviceAccountName: {{ template "prometheus-redis-exporter.serviceAccountName" . }} + {{- if .Values.image.pullSecrets }} + imagePullSecrets: + {{- range .Values.image.pullSecrets }} + - name: {{ . }} + {{- end}} + {{- end }} + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + args: + {{- range $key, $value := .Values.extraArgs }} + - --{{ $key }}={{ $value }} + {{- end }} + ports: + - name: exporter-port + containerPort: 9121 + env: + - name: REDIS_ADDR + value: {{ .Values.redisAddress }} + {{- if .Values.auth.enabled }} + - name: REDIS_PASSWORD + {{- if .Values.auth.secret.name }} + valueFrom: + secretKeyRef: + name: {{ .Values.auth.secret.name }} + key: {{ .Values.auth.secret.key }} + {{- else }} + value: {{ .Values.auth.redisPassword }} + {{- end }} + {{- end }} +{{- if .Values.script }} + - name: REDIS_EXPORTER_SCRIPT + value: /script/script.lua +{{- end }} +{{- if .Values.env }} +{{ toYaml .Values.env | indent 12 }} +{{- end }} +{{- if .Values.script }} + volumeMounts: + - mountPath: /script + name: script-mount +{{- end }} + livenessProbe: + httpGet: + path: / + port: exporter-port + readinessProbe: + httpGet: + path: / + port: exporter-port + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- if .Values.script }} + volumes: + - name: script-mount + configMap: + name: {{ .Values.script.configmap }} + items: + - key: {{ .Values.script.keyname }} + path: script.lua + {{- end }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} diff --git a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/podsecuritypolicy.yaml b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/podsecuritypolicy.yaml new file mode 100755 index 000000000..0bacacd49 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/podsecuritypolicy.yaml @@ -0,0 +1,39 @@ +{{- if .Values.rbac.pspEnabled }} +apiVersion: policy/v1beta1 +kind: PodSecurityPolicy +metadata: + name: {{ template "prometheus-redis-exporter.fullname" . }} + labels: + app: {{ template "prometheus-redis-exporter.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} + annotations: + seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'docker/default' + apparmor.security.beta.kubernetes.io/allowedProfileNames: 'runtime/default' + seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default' + apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default' +spec: + privileged: false + allowPrivilegeEscalation: false + requiredDropCapabilities: + - ALL + volumes: + - 'configMap' + - 'emptyDir' + - 'projected' + - 'secret' + - 'downwardAPI' + hostNetwork: false + hostIPC: false + hostPID: false + runAsUser: + rule: 'RunAsAny' + seLinux: + rule: 'RunAsAny' + supplementalGroups: + rule: 'RunAsAny' + fsGroup: + rule: 'RunAsAny' + readOnlyRootFilesystem: false +{{- end }} diff --git a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/prometheusrule.yaml b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/prometheusrule.yaml new file mode 100755 index 000000000..afe50a558 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/prometheusrule.yaml @@ -0,0 +1,23 @@ +{{- if .Values.prometheusRule.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: PrometheusRule +metadata: + name: {{ template "prometheus-redis-exporter.fullname" . }} +{{- with .Values.prometheusRule.namespace }} + namespace: {{ . }} +{{- end }} + labels: + app: {{ template "prometheus-redis-exporter.name" . }} + chart: {{ template "prometheus-redis-exporter.chart" . }} + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +{{- with .Values.prometheusRule.additionalLabels }} +{{ toYaml . | indent 4 }} +{{- end }} +spec: +{{- with .Values.prometheusRule.rules }} + groups: + - name: {{ template "prometheus-redis-exporter.name" $ }} + rules: {{ tpl (toYaml .) $ | nindent 8 }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/role.yaml b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/role.yaml new file mode 100755 index 000000000..c1ef9fde1 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/role.yaml @@ -0,0 +1,18 @@ +{{- if .Values.rbac.create }} +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: Role +metadata: + name: {{ template "prometheus-redis-exporter.fullname" . }} + labels: + app: {{ template "prometheus-redis-exporter.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} +{{- if .Values.rbac.pspEnabled }} +rules: +- apiGroups: ['extensions'] + resources: ['podsecuritypolicies'] + verbs: ['use'] + resourceNames: [{{ template "prometheus-redis-exporter.fullname" . }}] +{{- end }} +{{- end }} diff --git a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/rolebinding.yaml b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/rolebinding.yaml new file mode 100755 index 000000000..6b960a603 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/rolebinding.yaml @@ -0,0 +1,18 @@ +{{- if .Values.rbac.create -}} +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: RoleBinding +metadata: + name: {{ template "prometheus-redis-exporter.fullname" . }} + labels: + app: {{ template "prometheus-redis-exporter.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ template "prometheus-redis-exporter.fullname" . }} +subjects: +- kind: ServiceAccount + name: {{ template "prometheus-redis-exporter.serviceAccountName" . }} +{{- end -}} diff --git a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/service.yaml b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/service.yaml new file mode 100755 index 000000000..f55b3bf69 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/service.yaml @@ -0,0 +1,24 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ template "prometheus-redis-exporter.fullname" . }} + labels: + app: {{ template "prometheus-redis-exporter.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +{{- if .Values.service.labels }} +{{ toYaml .Values.service.labels | indent 4 }} +{{- end }} + annotations: +{{ toYaml .Values.service.annotations | indent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - name: redis-exporter + port: {{ .Values.service.port }} + targetPort: exporter-port + protocol: TCP + selector: + app: {{ template "prometheus-redis-exporter.name" . }} + release: {{ .Release.Name }} diff --git a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/serviceaccount.yaml b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/serviceaccount.yaml new file mode 100755 index 000000000..f884edd98 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/serviceaccount.yaml @@ -0,0 +1,11 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template "prometheus-redis-exporter.serviceAccountName" . }} + labels: + app: {{ template "prometheus-redis-exporter.name" . }} + chart: {{ template "prometheus-redis-exporter.chart" . }} + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" +{{- end -}} diff --git a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/servicemonitor.yaml b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/servicemonitor.yaml new file mode 100755 index 000000000..b41fd6cb1 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/servicemonitor.yaml @@ -0,0 +1,41 @@ +{{- if $.Values.serviceMonitor }} +{{- if and ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) ( .Values.serviceMonitor.enabled ) }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: +{{- if .Values.serviceMonitor.labels }} + labels: +{{ toYaml .Values.serviceMonitor.labels | indent 4}} +{{- end }} + name: {{ template "prometheus-redis-exporter.fullname" . }} +{{- if .Values.serviceMonitor.namespace }} + namespace: {{ .Values.serviceMonitor.namespace }} +{{- end }} +spec: + endpoints: + - targetPort: {{ .Values.service.port }} +{{- if .Values.serviceMonitor.interval }} + interval: {{ .Values.serviceMonitor.interval }} +{{- end }} +{{- if .Values.serviceMonitor.telemetryPath }} + path: {{ .Values.serviceMonitor.telemetryPath }} +{{- end }} +{{- if .Values.serviceMonitor.timeout }} + scrapeTimeout: {{ .Values.serviceMonitor.timeout }} +{{- end }} + jobLabel: {{ template "prometheus-redis-exporter.fullname" . }} + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} + selector: + matchLabels: + app: {{ template "prometheus-redis-exporter.name" . }} + release: {{ .Release.Name }} +{{- if .Values.serviceMonitor.targetLabels }} +{{- range .Values.serviceMonitor.targetLabels }} + targetLabels: + - {{ . }} +{{- end }} +{{- end }} +{{- end }} +{{- end }} diff --git a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/values.yaml b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/values.yaml new file mode 100755 index 000000000..c19f7a4ad --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/values.yaml @@ -0,0 +1,119 @@ +rbac: + # Specifies whether RBAC resources should be created + create: true + # Specifies whether a PodSecurityPolicy should be created + pspEnabled: true +serviceAccount: + # Specifies whether a ServiceAccount should be created + create: true + # The name of the ServiceAccount to use. + # If not set and create is true, a name is generated using the fullname template + name: + +replicaCount: 1 +image: + repository: oliver006/redis_exporter + tag: v1.3.4 + pullPolicy: IfNotPresent +extraArgs: {} +# Additional Environment variables +env: {} +# - name: REDIS_PASSWORD +# valueFrom: +# secretKeyRef: +# key: redis-password +# name: redis-config-0.0.2 +service: + type: ClusterIP + port: 9121 + annotations: {} + labels: {} + # prometheus.io/path: /metrics + # prometheus.io/port: "9121" + # prometheus.io/scrape: "true" +resources: {} + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +redisAddress: redis://myredis:6379 +annotations: {} +# prometheus.io/path: /metrics +# prometheus.io/port: "9121" +# prometheus.io/scrape: "true" + +serviceMonitor: + # When set true then use a ServiceMonitor to configure scraping + enabled: false + # Set the namespace the ServiceMonitor should be deployed + # namespace: monitoring + # Set how frequently Prometheus should scrape + # interval: 30s + # Set path to redis-exporter telemtery-path + # telemetryPath: /metrics + # Set labels for the ServiceMonitor, use this to define your scrape label for Prometheus Operator + # labels: + # Set timeout for scrape + # timeout: 10s + # Set of labels to transfer on the Kubernetes Service onto the target. + # targetLabels: [] + +## Custom PrometheusRules to be defined +## The value is evaluated as a template, so, for example, the value can depend on .Release or .Chart +## ref: https://github.com/coreos/prometheus-operator#customresourcedefinitions +prometheusRule: + enabled: false + additionalLabels: {} + namespace: "" + rules: [] + ## These are just examples rules, please adapt them to your needs. + ## Make sure to constraint the rules to the current service. + # - alert: RedisDown + # expr: redis_up{service="{{ template "prometheus-redis-exporter.fullname" . }}"} == 0 + # for: 2m + # labels: + # severity: error + # annotations: + # summary: Redis instance {{ "{{ $labels.instance }}" }} down + # description: Redis instance {{ "{{ $labels.instance }}" }} is down. + # - alert: RedisMemoryHigh + # expr: > + # redis_memory_used_bytes{service="{{ template "prometheus-redis-exporter.fullname" . }}"} * 100 + # / + # redis_memory_max_bytes{service="{{ template "prometheus-redis-exporter.fullname" . }}"} + # > 90 <= 100 + # for: 2m + # labels: + # severity: error + # annotations: + # summary: Redis instance {{ "{{ $labels.instance }}" }} is using too much memory + # description: | + # Redis instance {{ "{{ $labels.instance }}" }} is using {{ "{{ $value }}" }}% of its available memory. + # - alert: RedisKeyEviction + # expr: | + # increase(redis_evicted_keys_total{service="{{ template "prometheus-redis-exporter.fullname" . }}"}[5m]) > 0 + # for: 1s + # labels: + # severity: error + # annotations: + # summary: Redis instance {{ "{{ $labels.instance }}" }} has evicted keys + # description: | + # Redis instance {{ "{{ $labels.instance }}" }} has evicted {{ "{{ $value }}" }} keys in the last 5 minutes. + +# Used to mount a LUA-Script via config map and use it for metrics-collection +# script: +# configmap: prometheus-redis-exporter-script +# keyname: script + +auth: + # Use password authentication + enabled: false + # Use existing secret (ignores redisPassword) + secret: + name: "" + key: "" + # Redis password (when not stored in a secret) + redisPassword: "" diff --git a/private_repo/ansible/inventory/dev/Core/hosts b/private_repo/ansible/inventory/dev/Core/hosts index 3abf93185..c97aa705f 100644 --- a/private_repo/ansible/inventory/dev/Core/hosts +++ b/private_repo/ansible/inventory/dev/Core/hosts @@ -121,6 +121,9 @@ lp-redis [redis-ps:children] lp-redis-ps +[redis-exporter-targets:children] +lp-redis + [learning-neo4j-node1] 15.0.2.9 # Neo4j ip of Knowledge platform From 64782c353d0c83610384d8546f101d603bf836cc Mon Sep 17 00:00:00 2001 From: Kumar Gauraw Date: Thu, 14 May 2020 11:55:02 +0530 Subject: [PATCH 2421/2894] Issue #SC-0000 feat: updated helm_charts for assessment and taxonomy service --- .../core/assessment/templates/deployment.yaml | 16 ++++++++++++++-- kubernetes/helm_charts/core/assessment/values.j2 | 3 ++- .../core/taxonomy/templates/deployment.yaml | 3 +++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/kubernetes/helm_charts/core/assessment/templates/deployment.yaml b/kubernetes/helm_charts/core/assessment/templates/deployment.yaml index fd4ed0098..05778f919 100644 --- a/kubernetes/helm_charts/core/assessment/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/assessment/templates/deployment.yaml @@ -28,10 +28,19 @@ spec: - name: {{ .Chart.Name }}-config configMap: name: {{ .Chart.Name }}-config + - name: {{ .Chart.Name }}-xml-config + configMap: + name: {{ .Chart.Name }}-xml-config containers: - name: {{ .Chart.Name }} image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" imagePullPolicy: Always + env: + - name: JAVA_OPTIONS + value: {{ .Values.env.javaoptions | quote }} + envFrom: + - configMapRef: + name: {{ .Chart.Name }}-config resources: {{ toYaml .Values.resources | indent 10 }} ports: @@ -46,7 +55,10 @@ spec: - name: {{ .Chart.Name }}-config mountPath: /home/sunbird/assessment-service-1.0-SNAPSHOT/config/application.conf subPath: assessment-service_application.conf - + - name: {{ .Chart.Name }}-xml-config + mountPath: /home/sunbird/assessment-service-1.0-SNAPSHOT/config/logback.xml + subPath: assessment-service_logback.xml + --- apiVersion: v1 kind: Service @@ -59,6 +71,6 @@ spec: ports: - name: http-{{ .Chart.Name }} protocol: TCP - port: {{ .Values.network.port }} + port: {{ .Values.network.targetport }} selector: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/assessment/values.j2 b/kubernetes/helm_charts/core/assessment/values.j2 index ecbeda4b7..547e457e8 100644 --- a/kubernetes/helm_charts/core/assessment/values.j2 +++ b/kubernetes/helm_charts/core/assessment/values.j2 @@ -17,7 +17,8 @@ resources: cpu: {{assessment_cpu_limit|default('1')}} memory: {{assessment_mem_limit|default('500Mi')}} network: - port: 9000 + port: 9003 + targetport: 9000 strategy: type: RollingUpdate maxsurge: {{ assessment_maxsurge|default(1) }} diff --git a/kubernetes/helm_charts/core/taxonomy/templates/deployment.yaml b/kubernetes/helm_charts/core/taxonomy/templates/deployment.yaml index 8b2900057..fdab81e57 100644 --- a/kubernetes/helm_charts/core/taxonomy/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/taxonomy/templates/deployment.yaml @@ -35,6 +35,9 @@ spec: - name: {{ .Chart.Name }} image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" imagePullPolicy: Always + env: + - name: JAVA_OPTIONS + value: {{ .Values.env.javaoptions | quote }} envFrom: - configMapRef: name: {{ .Chart.Name }}-config From 60674fc4e8076a3a31336ec29401c281ab112b9c Mon Sep 17 00:00:00 2001 From: Kumar Gauraw Date: Thu, 14 May 2020 12:12:43 +0530 Subject: [PATCH 2422/2894] Issue #SC-0000 fix: updated config for content-service --- .../stack-sunbird/templates/content-service_application.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/stack-sunbird/templates/content-service_application.conf b/ansible/roles/stack-sunbird/templates/content-service_application.conf index 98d0c87c8..3e1b92eea 100644 --- a/ansible/roles/stack-sunbird/templates/content-service_application.conf +++ b/ansible/roles/stack-sunbird/templates/content-service_application.conf @@ -461,8 +461,8 @@ kafka { # DIAL Link Config dial_service { api { - base_url : {{ sunbird_dial_repo_api_base_url }} - auth_key : {{ sunbird_dial_repo_api_key }} + base_url : "{{ sunbird_dial_repo_api_base_url }}" + auth_key : "{{ sunbird_dial_repo_api_key }}" } } content.link_dialcode.validation=true From 729e65efa9b762223ad3ac0311c8caa7fb16b4cb Mon Sep 17 00:00:00 2001 From: Kumar Gauraw Date: Fri, 15 May 2020 12:00:11 +0530 Subject: [PATCH 2423/2894] Issue #SC-0000 fix: updated actor config for content and assessment service (#1478) * Issue #SC-0000 fix: Increased no of instances for channel and collection actors * Issue #SC-0000 fix: updated actor config * Issue #SC-0000 fix: updated health actor config --- .../assessment-service_application.conf | 10 ++++++-- .../content-service_application.conf | 24 +++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/ansible/roles/stack-sunbird/templates/assessment-service_application.conf b/ansible/roles/stack-sunbird/templates/assessment-service_application.conf index 4b0c83cae..11320d755 100644 --- a/ansible/roles/stack-sunbird/templates/assessment-service_application.conf +++ b/ansible/roles/stack-sunbird/templates/assessment-service_application.conf @@ -65,10 +65,16 @@ akka { } actor { deployment { - /contentActor + /healthActor { router = smallest-mailbox-pool - nr-of-instances = 10 + nr-of-instances = 5 + dispatcher = actors-dispatcher + } + /itemSetActor + { + router = smallest-mailbox-pool + nr-of-instances = 2 dispatcher = actors-dispatcher } } diff --git a/ansible/roles/stack-sunbird/templates/content-service_application.conf b/ansible/roles/stack-sunbird/templates/content-service_application.conf index 0bd872c83..a38e9cee1 100644 --- a/ansible/roles/stack-sunbird/templates/content-service_application.conf +++ b/ansible/roles/stack-sunbird/templates/content-service_application.conf @@ -71,6 +71,30 @@ akka { nr-of-instances = 10 dispatcher = actors-dispatcher } + /channelActor + { + router = smallest-mailbox-pool + nr-of-instances = 10 + dispatcher = actors-dispatcher + } + /collectionActor + { + router = smallest-mailbox-pool + nr-of-instances = 10 + dispatcher = actors-dispatcher + } + /healthActor + { + router = smallest-mailbox-pool + nr-of-instances = 5 + dispatcher = actors-dispatcher + } + /licenseActor + { + router = smallest-mailbox-pool + nr-of-instances = 2 + dispatcher = actors-dispatcher + } } } } From e5de1cc344763fd2790a7f5db8d82947f3bede04 Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Fri, 15 May 2020 14:18:03 +0530 Subject: [PATCH 2424/2894] fix: updating oauth2 upstream variable --- kubernetes/ansible/roles/logging/defaults/main.yml | 1 + kubernetes/ansible/roles/logging/templates/oauth2-proxy.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 kubernetes/ansible/roles/logging/defaults/main.yml diff --git a/kubernetes/ansible/roles/logging/defaults/main.yml b/kubernetes/ansible/roles/logging/defaults/main.yml new file mode 100644 index 000000000..2f33cd7d3 --- /dev/null +++ b/kubernetes/ansible/roles/logging/defaults/main.yml @@ -0,0 +1 @@ +kibana_service: "{{swarm_dashboard}}:5601" diff --git a/kubernetes/ansible/roles/logging/templates/oauth2-proxy.yaml b/kubernetes/ansible/roles/logging/templates/oauth2-proxy.yaml index 855fea03e..dc066bbbf 100644 --- a/kubernetes/ansible/roles/logging/templates/oauth2-proxy.yaml +++ b/kubernetes/ansible/roles/logging/templates/oauth2-proxy.yaml @@ -4,7 +4,7 @@ config: cookieSecret: "{{cookie_secret}}" configFile: |- redirect_url = "{{kibana_oauth_redirect_url}}" - upstreams = "http://{{swarm_dashboard}}:5601" + upstreams = "http://{{ kibana_service }}" email_domains = {{kibana_oauth_authenticated_email_domains_kube}} authenticated_emails_file = "/etc/oauth2/auth-emails/authenticated_email.txt" cookie_expire = "24h" From 067fa30e06c817747d475b51f8b6d1b624f5dc8a Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Sat, 16 May 2020 09:33:11 +0530 Subject: [PATCH 2425/2894] removing proxy cache lock and caching only 200 response (#1481) Signed-off-by: Rajesh Rajendran --- .../helm_charts/core/nginx-public-ingress/values.j2 | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 b/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 index f2b5683e9..b76274bdd 100644 --- a/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 +++ b/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 @@ -162,8 +162,7 @@ proxyconfig: | proxy_cache_key $proxy_host$request_uri; proxy_cache framework_cache; add_header X-Proxy-Cache $upstream_cache_status; - proxy_cache_lock on; - proxy_cache_valid any 3600s; + proxy_cache_valid 200 3600s; rewrite ^/api/(.*) /$1 break; client_max_body_size 60M; @@ -475,8 +474,7 @@ proxyconfig: | proxy_cache_key $proxy_host$request_uri; proxy_cache proxy_cache; add_header X-Proxy-Cache $upstream_cache_status; - proxy_cache_lock on; - proxy_cache_valid any 3600s; + proxy_cache_valid 200 3600s; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; @@ -490,8 +488,7 @@ proxyconfig: | proxy_cache_key $proxy_host$request_uri; proxy_cache framework_cache; add_header X-Proxy-Cache $upstream_cache_status; - proxy_cache_lock on; - proxy_cache_valid any 3600s; + proxy_cache_valid 200 3600s; rewrite ^/api/channel/v1/read/(.*) /channel/v1/read/$1 break; client_max_body_size 60M; From 0f79f8827fedb95f28d77e19e3b7ec3765f263e8 Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Sat, 16 May 2020 11:48:10 +0530 Subject: [PATCH 2426/2894] fix: merge not updating the file --- .../tasks/restart_private_proxy.yml | 28 +++++++++---------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/ansible/roles/stack-sunbird/tasks/restart_private_proxy.yml b/ansible/roles/stack-sunbird/tasks/restart_private_proxy.yml index d2830b37e..8244b6e03 100644 --- a/ansible/roles/stack-sunbird/tasks/restart_private_proxy.yml +++ b/ansible/roles/stack-sunbird/tasks/restart_private_proxy.yml @@ -1,18 +1,16 @@ --- -- hosts: localhost - tasks: - - name: check if private proxy is running - shell: docker service ps private_proxy - ignore_errors: yes - register: private_proxy_status +- name: check if private proxy is running + shell: docker service ps private_proxy + ignore_errors: yes + register: private_proxy_status - - name: Getting the list of proxy services host details - shell: "getent ahostsv4 $(docker service ps private_proxy | grep Runn | awk '{print $4}') | cut -d \" \" -f1 | uniq" - register: proxy_details - when: private_proxy_status.failed != true +- name: Getting the list of proxy services host details + shell: "getent ahostsv4 $(docker service ps private_proxy | grep Runn | awk '{print $4}') | cut -d \" \" -f1 | uniq" + register: proxy_details + when: private_proxy_status.failed != true - - name: reload proxy containers configurations - shell: "docker ps | grep proxy_proxy | awk '{print $1}' | xargs -I % docker exec % nginx -s reload;" - delegate_to: "{{item}}" - with_items: "{{(proxy_details.stdout_lines)|list}}" - when: proxy_details.changed +- name: reload proxy containers configurations + shell: "docker ps | grep proxy_proxy | awk '{print $1}' | xargs -I % docker exec % nginx -s reload;" + delegate_to: "{{item}}" + with_items: "{{(proxy_details.stdout_lines)|list}}" + when: proxy_details.changed From 908764d875f2e256b0018f4145b0aefe81d3427f Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Sat, 16 May 2020 11:52:42 +0530 Subject: [PATCH 2427/2894] fix: merging to 3.0 from 2.10 --- ansible/roles/kong-consumer/defaults/main.yml | 48 +- .../stack-proxy/templates/proxy-default.conf | 66 +++ .../tasks/restart_private_proxy.yml | 28 +- .../assessment-service_application.conf | 10 +- .../content-service_application.conf | 24 + exporters/Go/kafka-topic-exporter/main.go | 154 +++--- images/kafka-topic-exporter/build.sh | 2 +- .../ansible/roles/logging/defaults/main.yml | 1 + .../roles/logging/templates/oauth2-proxy.yaml | 2 +- .../sunbird-monitoring/defaults/main.yml | 2 +- .../templates/additional-scrape-configs.yaml | 12 + .../templates/prometheus-operator.yaml | 1 + .../templates/prometheus-redis-exporter.yaml | 1 + .../core/nginx-public-ingress/values.j2 | 89 +++- .../dashboards/dashboards/load-metrics.json | 112 ++-- .../dashboards/dashboards/redis.json | 492 ++++++++++++++++-- .../prometheus-redis-exporter/.helmignore | 21 + .../prometheus-redis-exporter/Chart.yaml | 14 + .../prometheus-redis-exporter/OWNERS | 4 + .../prometheus-redis-exporter/README.md | 135 +++++ .../templates/NOTES.txt | 15 + .../templates/_helpers.tpl | 43 ++ .../templates/deployment.yaml | 98 ++++ .../templates/podsecuritypolicy.yaml | 39 ++ .../templates/prometheusrule.yaml | 23 + .../templates/role.yaml | 18 + .../templates/rolebinding.yaml | 18 + .../templates/service.yaml | 24 + .../templates/serviceaccount.yaml | 11 + .../templates/servicemonitor.yaml | 41 ++ .../prometheus-redis-exporter/values.yaml | 119 +++++ private_repo/ansible/inventory/dev/Core/hosts | 3 + 32 files changed, 1466 insertions(+), 204 deletions(-) create mode 100644 kubernetes/ansible/roles/logging/defaults/main.yml create mode 100644 kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-redis-exporter.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-redis-exporter/.helmignore create mode 100755 kubernetes/helm_charts/monitoring/prometheus-redis-exporter/Chart.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-redis-exporter/OWNERS create mode 100755 kubernetes/helm_charts/monitoring/prometheus-redis-exporter/README.md create mode 100755 kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/NOTES.txt create mode 100755 kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/_helpers.tpl create mode 100755 kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/deployment.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/podsecuritypolicy.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/prometheusrule.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/role.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/rolebinding.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/service.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/serviceaccount.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/servicemonitor.yaml create mode 100755 kubernetes/helm_charts/monitoring/prometheus-redis-exporter/values.yaml diff --git a/ansible/roles/kong-consumer/defaults/main.yml b/ansible/roles/kong-consumer/defaults/main.yml index 6c1851f9d..a4239d2fd 100644 --- a/ansible/roles/kong-consumer/defaults/main.yml +++ b/ansible/roles/kong-consumer/defaults/main.yml @@ -21,57 +21,57 @@ mobile_device_groups: - userAccess - userTempAdmin - userUpdate + - contentTempAccess kong_all_consumer_groups: - announcementAccess - - orgCreate - appAccess + - appAdmin - appUpdate - badgeAccess + - badgeAdmin + - badgeCreate + - badgeUpdate - certificateAccess + - certificateAdmin + - certificateCreate + - certificateUpdate - channelAccess - - channelAccess + - channelCreate + - channelUpdate - contentAccess + - contentAdmin - contentCreate - contentUpdate - courseAccess + - courseAdmin - courseCreate - courseUpdate - deviceCreate - dialcodeAccess + - dialcodeAdmin + - dialcodeCreate + - dialcodeUpdate - locationAccess - noteAccess + - noteAdmin - noteCreate - noteUpdate - objectAccess - orgAccess + - orgCreate - pageAccess + - pluginAccess + - reportsAccess + - reportsAdmin + - reportsCreate + - reportsUpdate - ssoCreate - userAccess - - certificateCreate - - certificateUpdate - - certificateAdmin - - noteAdmin - - userCreate - userAdmin - - userUpdate - - appAdmin - - contentAdmin - - channelCreate - - channelUpdate - - courseAdmin - - dialcodeAdmin - - dialcodeCreate - - dialcodeUpdate - - badgeAdmin - - badgeCreate - - badgeUpdate - - pluginAccess + - userCreate - userTempAdmin - - reportsAdmin - - reportsAccess - - reportsUpdate - - reportsCreate + - userUpdate kong_consumers: diff --git a/ansible/roles/stack-proxy/templates/proxy-default.conf b/ansible/roles/stack-proxy/templates/proxy-default.conf index 231adc87f..9ca45d7d8 100644 --- a/ansible/roles/stack-proxy/templates/proxy-default.conf +++ b/ansible/roles/stack-proxy/templates/proxy-default.conf @@ -115,6 +115,29 @@ server { proxy_set_header X-Forwarded-Proto $scheme; # root /usr/share/nginx/www; } + + location /api/framework { + # Enabling caching + proxy_cache_key $proxy_host$request_uri; + proxy_cache framework_cache; + add_header X-Proxy-Cache $upstream_cache_status; + proxy_cache_lock on; + proxy_cache_valid any 3600s; + + rewrite ^/api/(.*) /$1 break; + client_max_body_size 60M; + proxy_set_header Connection ""; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Scheme $scheme; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_connect_timeout 5; + proxy_send_timeout 60; + proxy_read_timeout 70; + proxy_http_version 1.1; + proxy_pass http://kong; + } + location /api/ { if ($request_method = OPTIONS ) { add_header Access-Control-Allow-Origin "*" ; @@ -483,11 +506,54 @@ location ~* ^/desktop/(.*) { proxy_send_timeout 60; proxy_read_timeout 70; } + + location ~ /resourcebundles/v1/read|/learner/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; + proxy_cache_lock on; + proxy_cache_valid any 3600s; + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Scheme $scheme; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_pass http://player; + } + + location /api/channel/v1/read { + proxy_cache_key $proxy_host$request_uri; + proxy_cache framework_cache; + add_header X-Proxy-Cache $upstream_cache_status; + proxy_cache_lock on; + proxy_cache_valid any 3600s; + + rewrite ^/api/channel/v1/read/(.*) /channel/v1/read/$1 break; + client_max_body_size 60M; + proxy_set_header Connection ""; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Scheme $scheme; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_connect_timeout 5; + proxy_send_timeout 60; + proxy_read_timeout 70; + proxy_http_version 1.1; + proxy_pass http://kong; + } location /oauth2callback { return 200 'OK'; add_header Content-Type text/plain; } + + # local caching for images and files + proxy_cache_path /tmp/proxy_cache levels=1:2 keys_zone=tmp_cache:5m max_size=10m inactive=60m use_temp_path=off; + + proxy_cache_path /tmp/api_cache levels=1:2 keys_zone=proxy_cache:5m max_size=300m inactive=60m use_temp_path=off; + # cache framework + proxy_cache_path /tmp/framework_cache levels=1:2 keys_zone=framework_cache:5m max_size=700m inactive=60m use_temp_path=off; {# Including custom configuration #} {{ proxy_custom_config }} diff --git a/ansible/roles/stack-sunbird/tasks/restart_private_proxy.yml b/ansible/roles/stack-sunbird/tasks/restart_private_proxy.yml index d2830b37e..8244b6e03 100644 --- a/ansible/roles/stack-sunbird/tasks/restart_private_proxy.yml +++ b/ansible/roles/stack-sunbird/tasks/restart_private_proxy.yml @@ -1,18 +1,16 @@ --- -- hosts: localhost - tasks: - - name: check if private proxy is running - shell: docker service ps private_proxy - ignore_errors: yes - register: private_proxy_status +- name: check if private proxy is running + shell: docker service ps private_proxy + ignore_errors: yes + register: private_proxy_status - - name: Getting the list of proxy services host details - shell: "getent ahostsv4 $(docker service ps private_proxy | grep Runn | awk '{print $4}') | cut -d \" \" -f1 | uniq" - register: proxy_details - when: private_proxy_status.failed != true +- name: Getting the list of proxy services host details + shell: "getent ahostsv4 $(docker service ps private_proxy | grep Runn | awk '{print $4}') | cut -d \" \" -f1 | uniq" + register: proxy_details + when: private_proxy_status.failed != true - - name: reload proxy containers configurations - shell: "docker ps | grep proxy_proxy | awk '{print $1}' | xargs -I % docker exec % nginx -s reload;" - delegate_to: "{{item}}" - with_items: "{{(proxy_details.stdout_lines)|list}}" - when: proxy_details.changed +- name: reload proxy containers configurations + shell: "docker ps | grep proxy_proxy | awk '{print $1}' | xargs -I % docker exec % nginx -s reload;" + delegate_to: "{{item}}" + with_items: "{{(proxy_details.stdout_lines)|list}}" + when: proxy_details.changed diff --git a/ansible/roles/stack-sunbird/templates/assessment-service_application.conf b/ansible/roles/stack-sunbird/templates/assessment-service_application.conf index 4b0c83cae..11320d755 100644 --- a/ansible/roles/stack-sunbird/templates/assessment-service_application.conf +++ b/ansible/roles/stack-sunbird/templates/assessment-service_application.conf @@ -65,10 +65,16 @@ akka { } actor { deployment { - /contentActor + /healthActor { router = smallest-mailbox-pool - nr-of-instances = 10 + nr-of-instances = 5 + dispatcher = actors-dispatcher + } + /itemSetActor + { + router = smallest-mailbox-pool + nr-of-instances = 2 dispatcher = actors-dispatcher } } diff --git a/ansible/roles/stack-sunbird/templates/content-service_application.conf b/ansible/roles/stack-sunbird/templates/content-service_application.conf index 3e1b92eea..264ad011d 100644 --- a/ansible/roles/stack-sunbird/templates/content-service_application.conf +++ b/ansible/roles/stack-sunbird/templates/content-service_application.conf @@ -71,6 +71,30 @@ akka { nr-of-instances = 10 dispatcher = actors-dispatcher } + /channelActor + { + router = smallest-mailbox-pool + nr-of-instances = 10 + dispatcher = actors-dispatcher + } + /collectionActor + { + router = smallest-mailbox-pool + nr-of-instances = 10 + dispatcher = actors-dispatcher + } + /healthActor + { + router = smallest-mailbox-pool + nr-of-instances = 5 + dispatcher = actors-dispatcher + } + /licenseActor + { + router = smallest-mailbox-pool + nr-of-instances = 2 + dispatcher = actors-dispatcher + } } } } diff --git a/exporters/Go/kafka-topic-exporter/main.go b/exporters/Go/kafka-topic-exporter/main.go index e24c91c95..87ad02838 100644 --- a/exporters/Go/kafka-topic-exporter/main.go +++ b/exporters/Go/kafka-topic-exporter/main.go @@ -18,7 +18,7 @@ import ( kafka "github.com/segmentio/kafka-go" ) -var kafkaReader *kafka.Reader +var kafkaReaders []*kafka.Reader // Channel to keep metrics till prometheus scrape that var promMetricsChannel = make(chan metric) @@ -43,13 +43,15 @@ type Metrics struct { // This is to get the last message served to prom endpoint. type lastReadMessage struct { mu sync.RWMutex - // partition message + // map[partition]message last map[int]kafka.Message + // slice pointer of kafkaReaders + clusterId int } // Adding message // Only the latest -func (lrm *lastReadMessage) Store(message kafka.Message) error { +func (lrm *lastReadMessage) Store(message kafka.Message, clusterId int) error { lrm.mu.Lock() defer lrm.mu.Unlock() // Initializing map if nil @@ -60,19 +62,21 @@ func (lrm *lastReadMessage) Store(message kafka.Message) error { // Updating only if the offset is greater if lrm.last[message.Partition].Offset < message.Offset { lrm.last[message.Partition] = message + lrm.clusterId = clusterId } return fmt.Errorf("lower offset(%d) than the latest(%d)", message.Offset, lrm.last[message.Partition].Offset) } else { lrm.last[message.Partition] = message + lrm.clusterId = clusterId } return nil } // Return the last message read -func (lrm *lastReadMessage) Get() map[int]kafka.Message { +func (lrm *lastReadMessage) Get() (map[int]kafka.Message, int) { lrm.mu.RLock() defer lrm.mu.RUnlock() - return lrm.last + return lrm.last, lrm.clusterId } // Validating metrics name @@ -88,14 +92,15 @@ func metricsNameValidator(names ...string) string { // Message format type metric struct { - message string - id kafka.Message + message string + id kafka.Message + clusterId int } // This function will take the metrics input and create prometheus metrics // output and send it to metrics channel // So that http endpoint can serve the data -func (metrics *Metrics) pushMetrics(ctx context.Context, metricData *kafka.Message) (err error) { +func (metrics *Metrics) pushMetrics(clusterId int, ctx context.Context, metricData *kafka.Message) (err error) { label := fmt.Sprintf("system=%q,subsystem=%q,", metrics.System, metrics.SubSystem) select { case <-ctx.Done(): @@ -112,19 +117,23 @@ func (metrics *Metrics) pushMetrics(ctx context.Context, metricData *kafka.Messa // Adding optional timestamp switch metrics.MetricTS { case "": - metricStruct.message = fmt.Sprintf("%s{%s} %.2f", metricsNameValidator(metrics.System, metrics.SubSystem, m.ID), strings.TrimRight(label, ","), m.Value) + metricStruct.message = fmt.Sprintf("%s{%s} %.2f", + metricsNameValidator(metrics.System, metrics.SubSystem, m.ID), + strings.TrimRight(label, ","), m.Value) default: - metricStruct.message = fmt.Sprintf("%s{%s} %.1f %s", metricsNameValidator(metrics.System, metrics.SubSystem, m.ID), strings.TrimRight(label, ","), m.Value, metrics.MetricTS) + metricStruct.message = fmt.Sprintf("%s{%s} %.1f %s", + metricsNameValidator(metrics.System, metrics.SubSystem, m.ID), + strings.TrimRight(label, ","), m.Value, metrics.MetricTS) } - // fmt.Printf("%s\n", metricStruct.message) metricStruct.id = *metricData + metricStruct.clusterId = clusterId promMetricsChannel <- metricStruct } return nil } } -func metricsCreation(ctx context.Context, m kafka.Message) error { +func metricsCreation(clusterId int, ctx context.Context, m kafka.Message) error { metrics := Metrics{} data := m.Value // Creating metrics struct @@ -136,20 +145,26 @@ func metricsCreation(ctx context.Context, m kafka.Message) error { fmt.Printf("Unmarshal error: %q data: %q\n", err, string(data)) return err } - metrics.pushMetrics(ctx, &m) + metrics.pushMetrics(clusterId, ctx, &m) return nil } } -func commitMessage(messages *map[int]kafka.Message) error { - for k, message := range *messages { - if message.Offset > 0 { - fmt.Printf("Commiting message partition %d offset %d\n", k, message.Offset) - if err := kafkaReader.CommitMessages(context.Background(), message); err != nil { +func commitMessage(lastReadMessages *[]*lastReadMessage) error { + fmt.Println("number of clusters: ", len(*lastReadMessages)) + for _, lrm := range *lastReadMessages { + messages, clusterId := lrm.Get() + fmt.Println("cluster: ", clusterId) + for k, message := range messages { + if message.Offset <= 0 { + fmt.Println("Not committing anything", clusterId) + return errors.New("offset is not > 0 for cluster " + string(clusterId)) + } + fmt.Printf("Commiting message partition %d offset %d cluster %d\n", k, message.Offset, clusterId) + if err := kafkaReaders[clusterId].CommitMessages(context.Background(), message); err != nil { return err } } - return errors.New("offset is not > 0") } return nil } @@ -161,38 +176,40 @@ func health(w http.ResponseWriter, r *http.Request) { func serve(w http.ResponseWriter, r *http.Request) { fmt.Println("Serving Request") ctx := r.Context() - lastReadMessage := lastReadMessage{} + var lastReadMessages []*lastReadMessage // Reading topic - go func(ctx context.Context, r *kafka.Reader) { - for { - // Only fetching the message, not commiting them - // It'll be commited once the transmission closes - m, err := r.FetchMessage(ctx) - if err != nil { - fmt.Printf("err reading message: %v\n", err) - break - } - fmt.Printf("topic: %q partition: %v offset: %v\n", m.Topic, m.Partition, m.Offset) - go func(ctx context.Context) { - if err := metricsCreation(ctx, m); err != nil { - fmt.Printf("errored out metrics creation; err: %s\n", err) - return + for k, v := range kafkaReaders { + lastReadMessage := lastReadMessage{} + lastReadMessages = append(lastReadMessages, &lastReadMessage) + go func(clusterId int, ctx context.Context, r *kafka.Reader) { + for { + // Only fetching the message, not commiting them + // It'll be commited once the transmission closes + m, err := r.FetchMessage(ctx) + if err != nil { + fmt.Printf("err reading message: %v\n", err) + break } - }(ctx) - } - }(ctx, kafkaReader) + fmt.Printf("topic: %q partition: %v offset: %v\n", m.Topic, m.Partition, m.Offset) + go func(clusterId int, ctx context.Context, m kafka.Message) { + if err := metricsCreation(clusterId, ctx, m); err != nil { + fmt.Printf("errored out metrics creation; err: %s\n", err) + return + } + }(clusterId, ctx, m) + } + }(k, ctx, v) + } for { select { case message := <-promMetricsChannel: fmt.Fprintf(w, "%s\n", message.message) - lastReadMessage.Store(message.id) + lastReadMessages[message.clusterId].Store(message.id, message.clusterId) case <-ctx.Done(): - messageLastRead := lastReadMessage.Get() - commitMessage(&messageLastRead) + commitMessage(&lastReadMessages) return case <-time.After(1 * time.Second): - messageLastRead := lastReadMessage.Get() - commitMessage(&messageLastRead) + commitMessage(&lastReadMessages) return } } @@ -200,40 +217,53 @@ func serve(w http.ResponseWriter, r *http.Request) { func main() { // Getting kafka_ip and topic - kafkaHosts := strings.Split(os.Getenv("kafka_host"), ",") - kafkaTopic := os.Getenv("kafka_topic") + kafkaHosts := strings.Split(os.Getenv("kafka_host"), ";") + kafkaTopic := strings.Split(os.Getenv("kafka_topic"), ";") kafkaConsumerGroupName := os.Getenv("kafka_consumer_group_name") if kafkaConsumerGroupName == "" { kafkaConsumerGroupName = "prometheus-metrics-consumer" } - if kafkaTopic == "" || kafkaHosts[0] == "" { + if kafkaTopic[0] == "" || kafkaHosts[0] == "" { log.Fatalf(`"kafka_topic or kafka_host environment variables not set." For example, - export kafka_host=10.0.0.9:9092,10.0.0.10:9092 - kafka_topic=sunbird.metrics.topic`) + # export kafka_host=cluster1ip1:9092,cluster1ip2:9092;cluster2ip1:9092,cluster2ip2:9092 + # export kafka_topic=cluster1topic;cluster2topic + # ',' seperated multiple kafka nodes in the cluster and + # ';' seperated multiple kafka clusters + export kafka_host=10.0.0.9:9092,10.0.0.10:9092;20.0.0.9:9092,20.0.0.10:9092 + export kafka_topic=sunbird.metrics.topic;myapp.metrics.topic`) } fmt.Printf("kafka_host: %s\nkafka_topic: %s\nkafka_consumer_group_name: %s\n", kafkaHosts, kafkaTopic, kafkaConsumerGroupName) + // Checking kafka topics are given for all kafka clusters + if len(kafkaHosts) != len(kafkaTopic) { + log.Fatal("You should give same number of kafka_topics as kafka_clusters") + } // Checking kafka port and ip are accessible fmt.Println("Checking connection to kafka") - for _, host := range kafkaHosts { - conn, err := net.DialTimeout("tcp", host, 10*time.Second) - if err != nil { - log.Fatalf("Connection error: %s", err) + for _, hosts := range kafkaHosts { + for _, host := range strings.Split(hosts, ",") { + conn, err := net.DialTimeout("tcp", host, 10*time.Second) + if err != nil { + log.Fatalf("Connection error: %s", err) + } + fmt.Println("connection succeeded", host) + conn.Close() } - conn.Close() } fmt.Println("kafka is accessible") // Initializing kafka - kafkaReader = kafka.NewReader(kafka.ReaderConfig{ - Brokers: kafkaHosts, - GroupID: kafkaConsumerGroupName, // Consumer group ID - Topic: kafkaTopic, - MinBytes: 1e3, // 1KB - MaxBytes: 10e6, // 10MB - MaxWait: 200 * time.Millisecond, - RebalanceTimeout: time.Second * 5, - }) - defer kafkaReader.Close() + for k, v := range kafkaHosts { + kafkaReaders = append(kafkaReaders, kafka.NewReader(kafka.ReaderConfig{ + Brokers: strings.Split(v, ","), + GroupID: kafkaConsumerGroupName, // Consumer group ID + Topic: kafkaTopic[k], + MinBytes: 1e3, // 1KB + MaxBytes: 10e6, // 10MB + MaxWait: 200 * time.Millisecond, + RebalanceTimeout: time.Second * 5, + })) + defer kafkaReaders[k].Close() + } http.HandleFunc("/metrics", serve) http.HandleFunc("/health", health) log.Fatal(http.ListenAndServe(":8000", nil)) diff --git a/images/kafka-topic-exporter/build.sh b/images/kafka-topic-exporter/build.sh index 685c06e0e..74e4f8fdd 100755 --- a/images/kafka-topic-exporter/build.sh +++ b/images/kafka-topic-exporter/build.sh @@ -3,4 +3,4 @@ # Have to copy this file because In docker container we can't pass directories other than PWD cp ../../exporters/Go/kafka-topic-exporter/main.go . -docker build -f Dockerfile -t sunbird/kafka-topic-exporter:v1 . +docker build -f Dockerfile -t sunbird/kafka-topic-exporter:v2 . diff --git a/kubernetes/ansible/roles/logging/defaults/main.yml b/kubernetes/ansible/roles/logging/defaults/main.yml new file mode 100644 index 000000000..2f33cd7d3 --- /dev/null +++ b/kubernetes/ansible/roles/logging/defaults/main.yml @@ -0,0 +1 @@ +kibana_service: "{{swarm_dashboard}}:5601" diff --git a/kubernetes/ansible/roles/logging/templates/oauth2-proxy.yaml b/kubernetes/ansible/roles/logging/templates/oauth2-proxy.yaml index 855fea03e..dc066bbbf 100644 --- a/kubernetes/ansible/roles/logging/templates/oauth2-proxy.yaml +++ b/kubernetes/ansible/roles/logging/templates/oauth2-proxy.yaml @@ -4,7 +4,7 @@ config: cookieSecret: "{{cookie_secret}}" configFile: |- redirect_url = "{{kibana_oauth_redirect_url}}" - upstreams = "http://{{swarm_dashboard}}:5601" + upstreams = "http://{{ kibana_service }}" email_domains = {{kibana_oauth_authenticated_email_domains_kube}} authenticated_emails_file = "/etc/oauth2/auth-emails/authenticated_email.txt" cookie_expire = "24h" diff --git a/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml b/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml index 03552832c..f45ecb7c3 100644 --- a/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml +++ b/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml @@ -9,9 +9,9 @@ monitoring_stack: - logger - blackbox-exporter - additional-scrape-configs - - statsd-exporter - alertrules - kafka-topic-exporter + - prometheus-redis-exporter namespace: monitoring 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 465decaad..2c7a45991 100644 --- a/kubernetes/ansible/roles/sunbird-monitoring/templates/additional-scrape-configs.yaml +++ b/kubernetes/ansible/roles/sunbird-monitoring/templates/additional-scrape-configs.yaml @@ -160,6 +160,18 @@ scrapeconfig: replacement: $1 action: keep + - job_name: 'redis_exporter_targets' + static_configs: + - targets: ["{{ groups['redis-exporter-targets'] | difference(["localhost"]) | map('regex_replace', '^(.*)$', '\\1:6379') | list | join("\", \"") }}"] + metrics_path: /scrape + relabel_configs: + - source_labels: [__address__] + target_label: __param_target + - source_labels: [__param_target] + target_label: instance + - target_label: __address__ + replacement: redis-exporter:9121 + {% for item in service_blackbox_checks %} # This empty line ensures indentation is correct after ansible jinja2 template is materialized - job_name: 'availability_{{ item.service_name }}' diff --git a/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-operator.yaml b/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-operator.yaml index 722d2014c..c04c77bd8 100644 --- a/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-operator.yaml +++ b/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-operator.yaml @@ -15,6 +15,7 @@ prometheus: retention: "{{ prometheus_retention_time | d('90d') }}" externalLabels: cluster: "{{ kubernetes_cluster_name | default('kubernetes-1')}}" + env: "{{ env }}" {% if prometheus_storage_spec is defined and prometheus_storage_spec %} storageSpec: {{ prometheus_storage_spec|to_json }} {% endif %} diff --git a/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-redis-exporter.yaml b/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-redis-exporter.yaml new file mode 100644 index 000000000..f900e9484 --- /dev/null +++ b/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-redis-exporter.yaml @@ -0,0 +1 @@ +fullnameOverride: redis-exporter diff --git a/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 b/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 index e958219a4..b76274bdd 100644 --- a/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 +++ b/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 @@ -156,7 +156,28 @@ proxyconfig: | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } - + + location /api/framework { + # Enabling caching + proxy_cache_key $proxy_host$request_uri; + proxy_cache framework_cache; + add_header X-Proxy-Cache $upstream_cache_status; + proxy_cache_valid 200 3600s; + + rewrite ^/api/(.*) /$1 break; + client_max_body_size 60M; + proxy_set_header Connection ""; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Scheme $scheme; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_connect_timeout 5; + proxy_send_timeout 60; + proxy_read_timeout 70; + proxy_http_version 1.1; + proxy_pass http://kong; + } + location /api/ { if ($request_method = OPTIONS ) { add_header Access-Control-Allow-Origin "*" ; @@ -448,6 +469,41 @@ proxyconfig: | proxy_send_timeout 60; proxy_read_timeout 70; } + + location ~ /resourcebundles/v1/read|/learner/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; + proxy_cache_valid 200 3600s; + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Scheme $scheme; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_pass http://player; + } + + location /api/channel/v1/read { + proxy_cache_key $proxy_host$request_uri; + proxy_cache framework_cache; + add_header X-Proxy-Cache $upstream_cache_status; + proxy_cache_valid 200 3600s; + + rewrite ^/api/channel/v1/read/(.*) /channel/v1/read/$1 break; + client_max_body_size 60M; + proxy_set_header Connection ""; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Scheme $scheme; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_connect_timeout 5; + proxy_send_timeout 60; + proxy_read_timeout 70; + proxy_http_version 1.1; + proxy_pass http://kong; + } + location /oauth2callback { return 200 'OK'; add_header Content-Type text/plain; @@ -498,9 +554,9 @@ nginxconfig: | '"$request" $status $body_bytes_sent ' '$request_time $upstream_response_time $pipe' '"$http_referer" "$http_user_agent"'; - + access_log /var/log/nginx/access.log main; - + # Shared dictionary to store metrics lua_shared_dict prometheus_metrics 10M; lua_package_path "/etc/nginx/lua_modules/?.lua"; @@ -514,38 +570,38 @@ nginxconfig: | metric_connections = prometheus:gauge( "nginx_http_connections", "Number of HTTP connections", {"state"}) '; - + # Collecting metrics log_by_lua ' metric_requests:inc(1, {ngx.var.server_name, ngx.var.status, ngx.var.request_method}) metric_latency:observe(tonumber(ngx.var.request_time), {ngx.var.server_name}) '; - + header_filter_by_lua_block { ngx.header["server"] = nil } - + sendfile on; #tcp_nopush on; client_max_body_size 60M; - + keepalive_timeout 65s; keepalive_requests 200; - + # Nginx connection limit per ip limit_conn_zone $binary_remote_addr zone=limitbyaddr:10m; limit_conn_status 429; - + upstream kong { server kong:8000; keepalive 1000; } - + upstream encryption { server enc-service:8013; keepalive 1000; } - + upstream player { server player:3000; keepalive 1000; @@ -556,7 +612,10 @@ nginxconfig: | # local caching for images and files proxy_cache_path /tmp/proxy_cache levels=1:2 keys_zone=tmp_cache:5m max_size=10m inactive=60m use_temp_path=off; - + proxy_cache_path /tmp/api_cache levels=1:2 keys_zone=proxy_cache:5m max_size=300m inactive=60m use_temp_path=off; + # cache framework + proxy_cache_path /tmp/framework_cache levels=1:2 keys_zone=framework_cache:5m max_size=700m inactive=60m use_temp_path=off; + server { listen 9145; location /metrics { @@ -620,7 +679,7 @@ keycloakconf: | proxy_set_header X-Forwarded-Proto $scheme; proxy_pass http://player; } - + location ~* ^/auth/admin/master/console/ { return 301 {{proto}}://{{ merge_proxy_server_name }}; } @@ -636,7 +695,7 @@ keycloakconf: | } location / { rewrite ^/(.*) /$1 break; - + proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Scheme $scheme; @@ -648,7 +707,7 @@ keycloakconf: | proxy_http_version 1.1; proxy_pass http://player; } - } + } serviceMonitor: enabled: true diff --git a/kubernetes/helm_charts/monitoring/dashboards/dashboards/load-metrics.json b/kubernetes/helm_charts/monitoring/dashboards/dashboards/load-metrics.json index 6b153f5db..4a5e22f1a 100644 --- a/kubernetes/helm_charts/monitoring/dashboards/dashboards/load-metrics.json +++ b/kubernetes/helm_charts/monitoring/dashboards/dashboards/load-metrics.json @@ -15,8 +15,8 @@ "editable": true, "gnetId": null, "graphTooltip": 0, - "id": 41, - "iteration": 1580975581165, + "id": 60, + "iteration": 1589183133348, "links": [], "panels": [ { @@ -24,7 +24,8 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$datasource", + "datasource": "Prometheus", + "decimals": 2, "fill": 1, "fillGradient": 0, "gridPos": { @@ -37,12 +38,13 @@ "id": 7, "legend": { "alignAsTable": true, - "avg": false, + "avg": true, "current": true, "max": true, - "min": true, + "min": false, "rightSide": true, "show": true, + "sideWidth": null, "total": false, "values": true }, @@ -63,10 +65,10 @@ "steppedLine": false, "targets": [ { - "expr": "avg without (cpu) (rate(node_cpu_seconds_total{ mode!=\"idle\"}[5m]))", + "expr": "sum by (instance) (avg without (cpu) (rate(node_cpu_seconds_total{ mode!=\"idle\"}[5m]))) * on (instance) group_left(nodename) node_uname_info{job=~\".*node-exporter\", nodename=~\"$nodename\"}", "format": "time_series", "intervalFactor": 1, - "legendFormat": "{{instance}}", + "legendFormat": "{{nodename}}", "refId": "A" } ], @@ -116,7 +118,8 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$datasource", + "datasource": "Prometheus", + "decimals": 2, "fill": 1, "fillGradient": 0, "gridPos": { @@ -129,10 +132,10 @@ "id": 1, "legend": { "alignAsTable": true, - "avg": false, + "avg": true, "current": true, "max": true, - "min": true, + "min": false, "rightSide": true, "show": true, "sort": "current", @@ -157,18 +160,9 @@ "steppedLine": false, "targets": [ { - "expr": "(host) * on (instance) group_left(nodename) node_load1", + "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": "{{host}}", - "refId": "A", - "step": 2 - }, - { - "expr": "(node_load1) * on (instance) group_left(nodename) node_uname_info{job=~\".*node-exporter\"}", - "format": "time_series", "intervalFactor": 2, "legendFormat": "{{nodename}}", "refId": "B", @@ -221,7 +215,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$datasource", + "datasource": "Prometheus", "fill": 1, "fillGradient": 0, "gridPos": { @@ -262,7 +256,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum((node_filesystem_size_bytes{ mountpoint=\"/\", job=~\".*node-exporter\"} - node_filesystem_free_bytes{ mountpoint=\"/\"}) * 100 / node_filesystem_size_bytes{mountpoint=\"/\"} * on (instance) group_left(nodename) node_uname_info ) by (nodename)", + "expr": "sum((node_filesystem_size_bytes{ mountpoint=\"/\", job=~\".*node-exporter\"} - node_filesystem_free_bytes{ mountpoint=\"/\"}) * 100 / node_filesystem_size_bytes{mountpoint=\"/\"} * on (instance) group_left(nodename) node_uname_info{job=~\".*node-exporter\", nodename=~\"$nodename\"} ) by (nodename)", "format": "time_series", "hide": false, "intervalFactor": 2, @@ -317,7 +311,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$datasource", + "datasource": "Prometheus", "fill": 1, "fillGradient": 0, "gridPos": { @@ -356,7 +350,7 @@ "steppedLine": false, "targets": [ { - "expr": "((node_memory_MemTotal_bytes - node_memory_MemFree_bytes - node_memory_Cached_bytes - node_memory_Buffers_bytes - node_memory_Slab_bytes) * on (instance) group_left(nodename) node_uname_info{job=~\".*node-exporter\"})", + "expr": "((node_memory_MemTotal_bytes - node_memory_MemFree_bytes - node_memory_Cached_bytes - node_memory_Buffers_bytes - node_memory_Slab_bytes) * on (instance) group_left(nodename) node_uname_info{job=~\".*node-exporter\", nodename=~\"$nodename\"})", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{nodename}}", @@ -410,21 +404,23 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$datasource", + "datasource": "Prometheus", "fill": 1, + "fillGradient": 0, "gridPos": { "h": 7, "w": 24, "x": 0, "y": 31 }, + "hiddenSeries": false, "id": 4, "legend": { "alignAsTable": true, - "avg": false, + "avg": true, "current": true, "max": true, - "min": true, + "min": false, "rightSide": true, "show": true, "total": false, @@ -434,7 +430,9 @@ "linewidth": 1, "links": [], "nullPointMode": "null", - "options": {}, + "options": { + "dataLinks": [] + }, "percentage": false, "pointradius": 5, "points": false, @@ -445,7 +443,7 @@ "steppedLine": false, "targets": [ { - "expr": "irate(node_network_receive_bytes_total{device!=\"lo\"}[5m]) * on (instance) group_left(nodename) node_uname_info{job=~\".*node-exporter\"}", + "expr": "irate(node_network_receive_bytes_total{device!=\"lo\"}[5m]) * on (instance) group_left(nodename) node_uname_info{job=~\".*node-exporter\", nodename=~\"$nodename\"}", "format": "time_series", "intervalFactor": 2, "legendFormat": "In: {{nodename}}", @@ -473,7 +471,7 @@ }, "yaxes": [ { - "format": "short", + "format": "Bps", "label": null, "logBase": 1, "max": null, @@ -481,7 +479,7 @@ "show": true }, { - "format": "short", + "format": "Bps", "label": null, "logBase": 1, "max": null, @@ -499,21 +497,23 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "$datasource", + "datasource": "Prometheus", "fill": 1, + "fillGradient": 0, "gridPos": { "h": 7, "w": 24, "x": 0, "y": 38 }, + "hiddenSeries": false, "id": 5, "legend": { "alignAsTable": true, - "avg": false, + "avg": true, "current": true, "max": true, - "min": true, + "min": false, "rightSide": true, "show": true, "total": false, @@ -523,7 +523,9 @@ "linewidth": 1, "links": [], "nullPointMode": "null", - "options": {}, + "options": { + "dataLinks": [] + }, "percentage": false, "pointradius": 5, "points": false, @@ -534,7 +536,7 @@ "steppedLine": false, "targets": [ { - "expr": "irate(node_network_transmit_bytes_total{device!=\"lo\"}[5m]) * on (instance) group_left(nodename) node_uname_info{job=~\".*node-exporter\"}", + "expr": "irate(node_network_transmit_bytes_total{device!=\"lo\"}[5m]) * on (instance) group_left(nodename) node_uname_info{job=~\".*node-exporter\", nodename=~\"$nodename\"}", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{nodename}}", @@ -562,7 +564,7 @@ }, "yaxes": [ { - "format": "short", + "format": "Bps", "label": null, "logBase": 1, "max": null, @@ -570,7 +572,7 @@ "show": true }, { - "format": "short", + "format": "Bps", "label": null, "logBase": 1, "max": null, @@ -585,27 +587,37 @@ } ], "refresh": false, - "schemaVersion": 21, + "schemaVersion": 22, "style": "dark", "tags": [], "templating": { "list": [ { + "allValue": null, "current": { - "text": "Prometheus_DS1", - "value": "Prometheus_DS1" + "text": "All", + "value": [ + "$__all" + ] }, + "datasource": "Prometheus", + "definition": "label_values(node_uname_info{job=~\".*node-exporter\"},nodename)", "hide": 0, - "includeAll": false, - "label": "Data Source", - "multi": false, - "name": "datasource", + "includeAll": true, + "label": null, + "multi": true, + "name": "nodename", "options": [], - "query": "prometheus", + "query": "label_values(node_uname_info{job=~\".*node-exporter\"},nodename)", "refresh": 1, - "regex": "/Prom.*/", + "regex": "", "skipUrlSync": false, - "type": "datasource" + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false } ] }, @@ -640,6 +652,6 @@ }, "timezone": "", "title": "Load metrics", - "uid": "000000007", - "version": 1 + "uid": "B-a5y6eZz", + "version": 11 } diff --git a/kubernetes/helm_charts/monitoring/dashboards/dashboards/redis.json b/kubernetes/helm_charts/monitoring/dashboards/dashboards/redis.json index 096d461fd..d32e49167 100644 --- a/kubernetes/helm_charts/monitoring/dashboards/dashboards/redis.json +++ b/kubernetes/helm_charts/monitoring/dashboards/dashboards/redis.json @@ -12,12 +12,12 @@ } ] }, - "description": "Redis Dashboard for Prometheus Redis Exporter", + "description": "Redis Dashboard for Prometheus Redis Exporter 1.x", "editable": true, "gnetId": 763, "graphTooltip": 0, - "id": 39, - "iteration": 1580881120127, + "id": 25, + "iteration": 1589262474857, "links": [], "panels": [ { @@ -29,7 +29,7 @@ "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], - "datasource": "Prometheus_Stateful", + "datasource": "Prometheus", "decimals": 0, "editable": true, "error": false, @@ -43,7 +43,7 @@ }, "gridPos": { "h": 7, - "w": 6, + "w": 2, "x": 0, "y": 0 }, @@ -65,6 +65,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -117,7 +118,7 @@ "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], - "datasource": "Prometheus_Stateful", + "datasource": "Prometheus", "decimals": 0, "editable": true, "error": false, @@ -131,8 +132,8 @@ }, "gridPos": { "h": 7, - "w": 6, - "x": 6, + "w": 2, + "x": 2, "y": 0 }, "hideTimeOverride": true, @@ -154,6 +155,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -186,7 +188,98 @@ "thresholds": "", "timeFrom": "1m", "timeShift": null, - "title": "Connected Clients", + "title": "Clients", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "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": "Prometheus", + "decimals": 0, + "editable": true, + "error": false, + "format": "percent", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": true, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 4, + "y": 0 + }, + "hideTimeOverride": true, + "id": 11, + "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, + "options": {}, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": true + }, + "tableColumn": "", + "targets": [ + { + "expr": "100 * (redis_memory_used_bytes{instance=~\"$instance\"} / redis_memory_max_bytes{instance=~\"$instance\"} )", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "metric": "", + "refId": "A", + "step": 2 + } + ], + "thresholds": "80,95", + "timeFrom": "1m", + "timeShift": null, + "title": "Memory Usage", "type": "singlestat", "valueFontSize": "80%", "valueMaps": [ @@ -203,18 +296,119 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Prometheus_Stateful", + "datasource": "Prometheus", + "editable": true, + "error": false, + "fill": 1, + "fillGradient": 0, + "grid": {}, + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 0 + }, + "hiddenSeries": false, + "id": 2, + "isNew": true, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "rate(redis_commands_processed_total{instance=~\"$instance\"}[1m])", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "metric": "A", + "refId": "A", + "step": 240, + "target": "" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Commands Executed / sec", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Prometheus", "decimals": 2, "editable": true, "error": false, "fill": 1, + "fillGradient": 0, "grid": {}, "gridPos": { "h": 7, - "w": 12, - "x": 12, + "w": 8, + "x": 16, "y": 0 }, + "hiddenSeries": false, "id": 1, "isNew": true, "legend": { @@ -230,6 +424,9 @@ "linewidth": 2, "links": [], "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, "percentage": true, "pointradius": 5, "points": false, @@ -313,10 +510,11 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Prometheus_Stateful", + "datasource": "Prometheus", "editable": true, "error": false, "fill": 1, + "fillGradient": 0, "grid": {}, "gridPos": { "h": 7, @@ -324,6 +522,7 @@ "x": 0, "y": 7 }, + "hiddenSeries": false, "id": 7, "isNew": true, "legend": { @@ -341,6 +540,9 @@ "linewidth": 2, "links": [], "nullPointMode": "null as zero", + "options": { + "dataLinks": [] + }, "percentage": false, "pointradius": 5, "points": false, @@ -417,10 +619,11 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Prometheus_Stateful", + "datasource": "Prometheus", "editable": true, "error": false, "fill": 1, + "fillGradient": 0, "grid": {}, "gridPos": { "h": 7, @@ -428,6 +631,7 @@ "x": 12, "y": 7 }, + "hiddenSeries": false, "id": 10, "isNew": true, "legend": { @@ -443,6 +647,9 @@ "linewidth": 2, "links": [], "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, "percentage": false, "pointradius": 5, "points": false, @@ -517,17 +724,19 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Prometheus_Stateful", + "datasource": "Prometheus", "editable": true, "error": false, "fill": 7, + "fillGradient": 0, "grid": {}, "gridPos": { "h": 7, - "w": 24, + "w": 12, "x": 0, "y": 14 }, + "hiddenSeries": false, "id": 5, "isNew": true, "legend": { @@ -545,6 +754,9 @@ "linewidth": 2, "links": [], "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, "percentage": false, "pointradius": 5, "points": false, @@ -607,6 +819,114 @@ "alignLevel": null } }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Prometheus", + "editable": true, + "error": false, + "fill": 7, + "fillGradient": 0, + "grid": {}, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 14 + }, + "hiddenSeries": false, + "id": 13, + "isNew": true, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "sum (redis_db_keys{instance=~\"$instance\"}) - sum (redis_db_keys_expiring{instance=~\"$instance\"}) ", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "not expiring", + "refId": "A", + "step": 240, + "target": "" + }, + { + "expr": "sum (redis_db_keys_expiring{instance=~\"$instance\"}) ", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "expiring", + "metric": "", + "refId": "B", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Expiring vs Not-Expiring Keys", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, { "aliasColors": { "evicts": "#890F02", @@ -616,17 +936,19 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Prometheus_Stateful", + "datasource": "Prometheus", "editable": true, "error": false, "fill": 1, + "fillGradient": 0, "grid": {}, "gridPos": { - "h": 5, - "w": 24, + "h": 7, + "w": 12, "x": 0, "y": 21 }, + "hiddenSeries": false, "id": 8, "isNew": true, "legend": { @@ -642,6 +964,9 @@ "linewidth": 2, "links": [], "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, "percentage": false, "pointradius": 5, "points": false, @@ -719,10 +1044,108 @@ "align": false, "alignLevel": null } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Prometheus", + "editable": true, + "error": false, + "fill": 8, + "fillGradient": 0, + "grid": {}, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 21 + }, + "hiddenSeries": false, + "id": 14, + "isNew": true, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "expr": "topk(5, irate(redis_commands_total{instance=~\"$instance\"} [1m]))", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{ cmd }}", + "metric": "redis_command_calls_total", + "refId": "A", + "step": 240 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Command Calls / sec", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "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": "30s", - "schemaVersion": 18, + "schemaVersion": 21, "style": "dark", "tags": [ "prometheus", @@ -733,24 +1156,27 @@ { "allValue": null, "current": { - "text": "monitor_stateful_redis-exporter:9121", - "value": "monitor_stateful_redis-exporter:9121" + "text": "redis://redis-1-headless:6379", + "value": "redis://redis-1-headless:6379" }, + "datasource": "Prometheus", + "definition": "label_values(redis_up, instance)", "hide": 0, "includeAll": false, "label": null, "multi": false, "name": "instance", - "options": [ - { - "selected": true, - "text": "monitor_stateful_redis-exporter:9121", - "value": "monitor_stateful_redis-exporter:9121" - } - ], - "query": "monitor_stateful_redis-exporter:9121", + "options": [], + "query": "label_values(redis_up, instance)", + "refresh": 2, + "regex": "", "skipUrlSync": false, - "type": "custom" + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false } ] }, @@ -785,6 +1211,6 @@ }, "timezone": "browser", "title": "Redis Dashboard for Prometheus Redis Exporter", - "uid": "8QBoYnaWz", + "uid": "A4ZEhMRGk", "version": 2 -} \ No newline at end of file +} diff --git a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/.helmignore b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/.helmignore new file mode 100755 index 000000000..f0c131944 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/Chart.yaml b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/Chart.yaml new file mode 100755 index 000000000..a768b057f --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/Chart.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +appVersion: 1.3.4 +description: Prometheus exporter for Redis metrics +home: https://github.com/oliver006/redis_exporter +keywords: +- prometheus +- redis +maintainers: +- email: arcadie.condrat@gmail.com + name: acondrat +name: prometheus-redis-exporter +sources: +- https://github.com/oliver006/redis_exporter +version: 3.4.0 diff --git a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/OWNERS b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/OWNERS new file mode 100755 index 000000000..493906f56 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/OWNERS @@ -0,0 +1,4 @@ +approvers: +- acondrat +reviewers: +- acondrat diff --git a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/README.md b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/README.md new file mode 100755 index 000000000..4d299c8ec --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/README.md @@ -0,0 +1,135 @@ +# prometheus-redis-exporter + +[redis_exporter](https://github.com/oliver006/redis_exporter) is a Prometheus exporter for Redis metrics. + +## TL;DR; + +```bash +$ helm install stable/prometheus-redis-exporter +``` + +## Introduction + +This chart bootstraps a [redis_exporter](https://github.com/oliver006/redis_exporter) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. + +## Prerequisites + +- Kubernetes 1.10+ with Beta APIs enabled + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```bash +$ helm install --name my-release stable/prometheus-redis-exporter +``` + +The command deploys prometheus-redis-exporter on the Kubernetes cluster in the default configuration. + +## Uninstalling the Chart + +To uninstall/delete the `my-release` deployment: + +```bash +$ helm delete my-release +``` + +The command removes all the Kubernetes components associated with the chart and deletes the release. + +## Configuration + +The following table lists the configurable parameters and their default values. + +| Parameter | Description | Default | +| ---------------------- | --------------------------------------------------- | ------------------------- | +| `replicaCount` | desired number of prometheus-redis-exporter pods | `1` | +| `image.repository` | prometheus-redis-exporter image repository | `oliver006/redis_exporter`| +| `image.tag` | prometheus-redis-exporter image tag | `v1.3.4` | +| `image.pullPolicy` | image pull policy | `IfNotPresent` | +| `image.pullSecrets` | image pull secrets | {} | +| `extraArgs` | extra arguments for the binary; possible values [here](https://github.com/oliver006/redis_exporter#flags)| {} +| `env` | additional environment variables in YAML format. Can be used to pass credentials as env variables (via secret) as per the image readme [here](https://github.com/oliver006/redis_exporter#environment-variables) | {} | +| `resources` | cpu/memory resource requests/limits | {} | +| `tolerations` | toleration labels for pod assignment | {} | +| `affinity` | affinity settings for pod assignment | {} | +| `service.type` | desired service type | `ClusterIP` | +| `service.port` | service external port | `9121` | +| `service.annotations` | Custom annotations for service | `{}` | +| `service.labels` | Additional custom labels for the service | `{}` | +| `redisAddress` | Address of the Redis instance to scrape. Use `rediss://` for SSL. | `redis://myredis:6379` | +| `annotations` | pod annotations for easier discovery | {} | +| `rbac.create` | Specifies whether RBAC resources should be created.| `true` | +| `rbac.pspEnabled` | Specifies whether a PodSecurityPolicy should be created.| `true` | +| `serviceAccount.create` | Specifies whether a service account should be created.| `true` | +| `serviceAccount.name` | Name of the service account.| | +| `serviceMonitor.enabled` | Use servicemonitor from prometheus operator | `false` | +| `serviceMonitor.namespace` | Namespace this servicemonitor is installed in | | +| `serviceMonitor.interval` | How frequently Prometheus should scrape | | +| `serviceMonitor.telemetryPath` | Path to redis-exporter telemtery-path | | +| `serviceMonitor.labels` | Labels for the servicemonitor passed to Prometheus Operator | `{}` | +| `serviceMonitor.timeout` | Timeout after which the scrape is ended | | +| `serviceMonitor.targetLabels` | Set of labels to transfer on the Kubernetes Service onto the target. | | +| `prometheusRule.enabled` | Set this to true to create prometheusRules for Prometheus operator | `false` | +| `prometheusRule.additionalLabels` | Additional labels that can be used so prometheusRules will be discovered by Prometheus | `{}` | +| `prometheusRule.namespace` | namespace where prometheusRules resource should be created | | +| `prometheusRule.rules` | [rules](https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/) to be created, check values for an example. | `[]` | +| `script.configmap` | Let you run a custom lua script from a configmap. The corresponding environment variable `REDIS_EXPORTER_SCRIPT` will be set automatically || +| `script.keyname` | Name of the key inside configmap which contains your script || +| `auth.enabled` | Specifies whether redis uses authentication | `false` | +| `auth.secret.name` | Name of existing redis secret (ignores redisPassword) || +| `auth.secret.key` | Name of key containing password to be retrieved from the existing secret || +| `auth.redisPassword` | Redis password (when not stored in a secret) || + +For more information please refer to the [redis_exporter](https://github.com/oliver006/redis_exporter) documentation. + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, + +```bash +$ helm install --name my-release \ + --set "redisAddress=redis://myredis:6379" \ + stable/prometheus-redis-exporter +``` + +Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, + +```bash +$ helm install --name my-release -f values.yaml stable/prometheus-redis-exporter +``` +### Using a custom LUA-Script +First, you need to deploy the script with a configmap. This is an example script from mentioned in the [redis_exporter-image repository](https://github.com/oliver006/redis_exporter/blob/master/contrib/sample_collect_script.lua) +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: prometheus-redis-exporter-script +data: + script: |- + -- Example collect script for -script option + -- This returns a Lua table with alternating keys and values. + -- Both keys and values must be strings, similar to a HGETALL result. + -- More info about Redis Lua scripting: https://redis.io/commands/eval + + local result = {} + + -- Add all keys and values from some hash in db 5 + redis.call("SELECT", 5) + local r = redis.call("HGETALL", "some-hash-with-stats") + if r ~= nil then + for _,v in ipairs(r) do + table.insert(result, v) -- alternating keys and values + end + end + + -- Set foo to 42 + table.insert(result, "foo") + table.insert(result, "42") -- note the string, use tostring() if needed + + return result +``` +If you want to use this script for collecting metrics, you could do this by just set `script.configmap` to the name of the configmap (e.g. `prometheus-redis-exporter-script`) and `script.keyname` to the configmap-key holding the script (eg. `script`). The required variables inside the container will be set automatically. + +## Upgrading + +### To 3.0.1 + + The default tag for the exporter image is now `v1.x.x`. This major release includes changes to the names of various metrics and no longer directly supports the configuration (and scraping) of multiple redis instances; that is now the Prometheus server's responsibility. You'll want to use [this dashboard](https://github.com/oliver006/redis_exporter/blob/master/contrib/grafana_prometheus_redis_dashboard.json) now. Please see the [redis_exporter github page](https://github.com/oliver006/redis_exporter#upgrading-from-0x-to-1x) for more details. diff --git a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/NOTES.txt b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/NOTES.txt new file mode 100755 index 000000000..1798dc24a --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/NOTES.txt @@ -0,0 +1,15 @@ +1. Get the Redis Exporter URL by running these commands: +{{- if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "prometheus-redis-exporter.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get svc -w {{ template "prometheus-redis-exporter.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "prometheus-redis-exporter.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + echo http://$SERVICE_IP:{{ .Values.service.externalPort }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "prometheus-redis-exporter.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }} +{{- end }} diff --git a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/_helpers.tpl b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/_helpers.tpl new file mode 100755 index 000000000..4d2ad21e7 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/_helpers.tpl @@ -0,0 +1,43 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "prometheus-redis-exporter.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "prometheus-redis-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 -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "prometheus-redis-exporter.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "prometheus-redis-exporter.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "prometheus-redis-exporter.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} diff --git a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/deployment.yaml b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/deployment.yaml new file mode 100755 index 000000000..985cd48eb --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/deployment.yaml @@ -0,0 +1,98 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "prometheus-redis-exporter.fullname" . }} + labels: + app: {{ template "prometheus-redis-exporter.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ template "prometheus-redis-exporter.name" . }} + release: {{ .Release.Name }} + template: + metadata: + annotations: +{{ toYaml .Values.annotations | indent 8 }} + labels: + app: {{ template "prometheus-redis-exporter.name" . }} + release: {{ .Release.Name }} + spec: + serviceAccountName: {{ template "prometheus-redis-exporter.serviceAccountName" . }} + {{- if .Values.image.pullSecrets }} + imagePullSecrets: + {{- range .Values.image.pullSecrets }} + - name: {{ . }} + {{- end}} + {{- end }} + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + args: + {{- range $key, $value := .Values.extraArgs }} + - --{{ $key }}={{ $value }} + {{- end }} + ports: + - name: exporter-port + containerPort: 9121 + env: + - name: REDIS_ADDR + value: {{ .Values.redisAddress }} + {{- if .Values.auth.enabled }} + - name: REDIS_PASSWORD + {{- if .Values.auth.secret.name }} + valueFrom: + secretKeyRef: + name: {{ .Values.auth.secret.name }} + key: {{ .Values.auth.secret.key }} + {{- else }} + value: {{ .Values.auth.redisPassword }} + {{- end }} + {{- end }} +{{- if .Values.script }} + - name: REDIS_EXPORTER_SCRIPT + value: /script/script.lua +{{- end }} +{{- if .Values.env }} +{{ toYaml .Values.env | indent 12 }} +{{- end }} +{{- if .Values.script }} + volumeMounts: + - mountPath: /script + name: script-mount +{{- end }} + livenessProbe: + httpGet: + path: / + port: exporter-port + readinessProbe: + httpGet: + path: / + port: exporter-port + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- if .Values.script }} + volumes: + - name: script-mount + configMap: + name: {{ .Values.script.configmap }} + items: + - key: {{ .Values.script.keyname }} + path: script.lua + {{- end }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} diff --git a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/podsecuritypolicy.yaml b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/podsecuritypolicy.yaml new file mode 100755 index 000000000..0bacacd49 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/podsecuritypolicy.yaml @@ -0,0 +1,39 @@ +{{- if .Values.rbac.pspEnabled }} +apiVersion: policy/v1beta1 +kind: PodSecurityPolicy +metadata: + name: {{ template "prometheus-redis-exporter.fullname" . }} + labels: + app: {{ template "prometheus-redis-exporter.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} + annotations: + seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'docker/default' + apparmor.security.beta.kubernetes.io/allowedProfileNames: 'runtime/default' + seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default' + apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default' +spec: + privileged: false + allowPrivilegeEscalation: false + requiredDropCapabilities: + - ALL + volumes: + - 'configMap' + - 'emptyDir' + - 'projected' + - 'secret' + - 'downwardAPI' + hostNetwork: false + hostIPC: false + hostPID: false + runAsUser: + rule: 'RunAsAny' + seLinux: + rule: 'RunAsAny' + supplementalGroups: + rule: 'RunAsAny' + fsGroup: + rule: 'RunAsAny' + readOnlyRootFilesystem: false +{{- end }} diff --git a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/prometheusrule.yaml b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/prometheusrule.yaml new file mode 100755 index 000000000..afe50a558 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/prometheusrule.yaml @@ -0,0 +1,23 @@ +{{- if .Values.prometheusRule.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: PrometheusRule +metadata: + name: {{ template "prometheus-redis-exporter.fullname" . }} +{{- with .Values.prometheusRule.namespace }} + namespace: {{ . }} +{{- end }} + labels: + app: {{ template "prometheus-redis-exporter.name" . }} + chart: {{ template "prometheus-redis-exporter.chart" . }} + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +{{- with .Values.prometheusRule.additionalLabels }} +{{ toYaml . | indent 4 }} +{{- end }} +spec: +{{- with .Values.prometheusRule.rules }} + groups: + - name: {{ template "prometheus-redis-exporter.name" $ }} + rules: {{ tpl (toYaml .) $ | nindent 8 }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/role.yaml b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/role.yaml new file mode 100755 index 000000000..c1ef9fde1 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/role.yaml @@ -0,0 +1,18 @@ +{{- if .Values.rbac.create }} +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: Role +metadata: + name: {{ template "prometheus-redis-exporter.fullname" . }} + labels: + app: {{ template "prometheus-redis-exporter.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} +{{- if .Values.rbac.pspEnabled }} +rules: +- apiGroups: ['extensions'] + resources: ['podsecuritypolicies'] + verbs: ['use'] + resourceNames: [{{ template "prometheus-redis-exporter.fullname" . }}] +{{- end }} +{{- end }} diff --git a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/rolebinding.yaml b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/rolebinding.yaml new file mode 100755 index 000000000..6b960a603 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/rolebinding.yaml @@ -0,0 +1,18 @@ +{{- if .Values.rbac.create -}} +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: RoleBinding +metadata: + name: {{ template "prometheus-redis-exporter.fullname" . }} + labels: + app: {{ template "prometheus-redis-exporter.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ template "prometheus-redis-exporter.fullname" . }} +subjects: +- kind: ServiceAccount + name: {{ template "prometheus-redis-exporter.serviceAccountName" . }} +{{- end -}} diff --git a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/service.yaml b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/service.yaml new file mode 100755 index 000000000..f55b3bf69 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/service.yaml @@ -0,0 +1,24 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ template "prometheus-redis-exporter.fullname" . }} + labels: + app: {{ template "prometheus-redis-exporter.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +{{- if .Values.service.labels }} +{{ toYaml .Values.service.labels | indent 4 }} +{{- end }} + annotations: +{{ toYaml .Values.service.annotations | indent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - name: redis-exporter + port: {{ .Values.service.port }} + targetPort: exporter-port + protocol: TCP + selector: + app: {{ template "prometheus-redis-exporter.name" . }} + release: {{ .Release.Name }} diff --git a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/serviceaccount.yaml b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/serviceaccount.yaml new file mode 100755 index 000000000..f884edd98 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/serviceaccount.yaml @@ -0,0 +1,11 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template "prometheus-redis-exporter.serviceAccountName" . }} + labels: + app: {{ template "prometheus-redis-exporter.name" . }} + chart: {{ template "prometheus-redis-exporter.chart" . }} + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" +{{- end -}} diff --git a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/servicemonitor.yaml b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/servicemonitor.yaml new file mode 100755 index 000000000..b41fd6cb1 --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/templates/servicemonitor.yaml @@ -0,0 +1,41 @@ +{{- if $.Values.serviceMonitor }} +{{- if and ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) ( .Values.serviceMonitor.enabled ) }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: +{{- if .Values.serviceMonitor.labels }} + labels: +{{ toYaml .Values.serviceMonitor.labels | indent 4}} +{{- end }} + name: {{ template "prometheus-redis-exporter.fullname" . }} +{{- if .Values.serviceMonitor.namespace }} + namespace: {{ .Values.serviceMonitor.namespace }} +{{- end }} +spec: + endpoints: + - targetPort: {{ .Values.service.port }} +{{- if .Values.serviceMonitor.interval }} + interval: {{ .Values.serviceMonitor.interval }} +{{- end }} +{{- if .Values.serviceMonitor.telemetryPath }} + path: {{ .Values.serviceMonitor.telemetryPath }} +{{- end }} +{{- if .Values.serviceMonitor.timeout }} + scrapeTimeout: {{ .Values.serviceMonitor.timeout }} +{{- end }} + jobLabel: {{ template "prometheus-redis-exporter.fullname" . }} + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} + selector: + matchLabels: + app: {{ template "prometheus-redis-exporter.name" . }} + release: {{ .Release.Name }} +{{- if .Values.serviceMonitor.targetLabels }} +{{- range .Values.serviceMonitor.targetLabels }} + targetLabels: + - {{ . }} +{{- end }} +{{- end }} +{{- end }} +{{- end }} diff --git a/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/values.yaml b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/values.yaml new file mode 100755 index 000000000..c19f7a4ad --- /dev/null +++ b/kubernetes/helm_charts/monitoring/prometheus-redis-exporter/values.yaml @@ -0,0 +1,119 @@ +rbac: + # Specifies whether RBAC resources should be created + create: true + # Specifies whether a PodSecurityPolicy should be created + pspEnabled: true +serviceAccount: + # Specifies whether a ServiceAccount should be created + create: true + # The name of the ServiceAccount to use. + # If not set and create is true, a name is generated using the fullname template + name: + +replicaCount: 1 +image: + repository: oliver006/redis_exporter + tag: v1.3.4 + pullPolicy: IfNotPresent +extraArgs: {} +# Additional Environment variables +env: {} +# - name: REDIS_PASSWORD +# valueFrom: +# secretKeyRef: +# key: redis-password +# name: redis-config-0.0.2 +service: + type: ClusterIP + port: 9121 + annotations: {} + labels: {} + # prometheus.io/path: /metrics + # prometheus.io/port: "9121" + # prometheus.io/scrape: "true" +resources: {} + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +redisAddress: redis://myredis:6379 +annotations: {} +# prometheus.io/path: /metrics +# prometheus.io/port: "9121" +# prometheus.io/scrape: "true" + +serviceMonitor: + # When set true then use a ServiceMonitor to configure scraping + enabled: false + # Set the namespace the ServiceMonitor should be deployed + # namespace: monitoring + # Set how frequently Prometheus should scrape + # interval: 30s + # Set path to redis-exporter telemtery-path + # telemetryPath: /metrics + # Set labels for the ServiceMonitor, use this to define your scrape label for Prometheus Operator + # labels: + # Set timeout for scrape + # timeout: 10s + # Set of labels to transfer on the Kubernetes Service onto the target. + # targetLabels: [] + +## Custom PrometheusRules to be defined +## The value is evaluated as a template, so, for example, the value can depend on .Release or .Chart +## ref: https://github.com/coreos/prometheus-operator#customresourcedefinitions +prometheusRule: + enabled: false + additionalLabels: {} + namespace: "" + rules: [] + ## These are just examples rules, please adapt them to your needs. + ## Make sure to constraint the rules to the current service. + # - alert: RedisDown + # expr: redis_up{service="{{ template "prometheus-redis-exporter.fullname" . }}"} == 0 + # for: 2m + # labels: + # severity: error + # annotations: + # summary: Redis instance {{ "{{ $labels.instance }}" }} down + # description: Redis instance {{ "{{ $labels.instance }}" }} is down. + # - alert: RedisMemoryHigh + # expr: > + # redis_memory_used_bytes{service="{{ template "prometheus-redis-exporter.fullname" . }}"} * 100 + # / + # redis_memory_max_bytes{service="{{ template "prometheus-redis-exporter.fullname" . }}"} + # > 90 <= 100 + # for: 2m + # labels: + # severity: error + # annotations: + # summary: Redis instance {{ "{{ $labels.instance }}" }} is using too much memory + # description: | + # Redis instance {{ "{{ $labels.instance }}" }} is using {{ "{{ $value }}" }}% of its available memory. + # - alert: RedisKeyEviction + # expr: | + # increase(redis_evicted_keys_total{service="{{ template "prometheus-redis-exporter.fullname" . }}"}[5m]) > 0 + # for: 1s + # labels: + # severity: error + # annotations: + # summary: Redis instance {{ "{{ $labels.instance }}" }} has evicted keys + # description: | + # Redis instance {{ "{{ $labels.instance }}" }} has evicted {{ "{{ $value }}" }} keys in the last 5 minutes. + +# Used to mount a LUA-Script via config map and use it for metrics-collection +# script: +# configmap: prometheus-redis-exporter-script +# keyname: script + +auth: + # Use password authentication + enabled: false + # Use existing secret (ignores redisPassword) + secret: + name: "" + key: "" + # Redis password (when not stored in a secret) + redisPassword: "" diff --git a/private_repo/ansible/inventory/dev/Core/hosts b/private_repo/ansible/inventory/dev/Core/hosts index 3abf93185..c97aa705f 100644 --- a/private_repo/ansible/inventory/dev/Core/hosts +++ b/private_repo/ansible/inventory/dev/Core/hosts @@ -121,6 +121,9 @@ lp-redis [redis-ps:children] lp-redis-ps +[redis-exporter-targets:children] +lp-redis + [learning-neo4j-node1] 15.0.2.9 # Neo4j ip of Knowledge platform From 8908170a69ba3532dfb4212013aabbe3e90b2f6b Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Sat, 16 May 2020 22:41:33 +0530 Subject: [PATCH 2428/2894] Make additional scrape config optional (#1483) * Make additional scrape config optional Signed-off-by: Rajesh Rajendran * Adding nginx caching changes to swarm --- ansible/roles/stack-proxy/templates/proxy-default.conf | 9 +++------ .../templates/prometheus-operator.yaml | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/ansible/roles/stack-proxy/templates/proxy-default.conf b/ansible/roles/stack-proxy/templates/proxy-default.conf index 9ca45d7d8..542fc9bb7 100644 --- a/ansible/roles/stack-proxy/templates/proxy-default.conf +++ b/ansible/roles/stack-proxy/templates/proxy-default.conf @@ -121,8 +121,7 @@ server { proxy_cache_key $proxy_host$request_uri; proxy_cache framework_cache; add_header X-Proxy-Cache $upstream_cache_status; - proxy_cache_lock on; - proxy_cache_valid any 3600s; + proxy_cache_valid 200 3600s; rewrite ^/api/(.*) /$1 break; client_max_body_size 60M; @@ -511,8 +510,7 @@ location ~* ^/desktop/(.*) { proxy_cache_key $proxy_host$request_uri; proxy_cache proxy_cache; add_header X-Proxy-Cache $upstream_cache_status; - proxy_cache_lock on; - proxy_cache_valid any 3600s; + proxy_cache_valid 200 3600s; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; @@ -526,8 +524,7 @@ location ~* ^/desktop/(.*) { proxy_cache_key $proxy_host$request_uri; proxy_cache framework_cache; add_header X-Proxy-Cache $upstream_cache_status; - proxy_cache_lock on; - proxy_cache_valid any 3600s; + proxy_cache_valid 200 3600s; rewrite ^/api/channel/v1/read/(.*) /channel/v1/read/$1 break; client_max_body_size 60M; diff --git a/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-operator.yaml b/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-operator.yaml index c04c77bd8..bf7cda9f1 100644 --- a/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-operator.yaml +++ b/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-operator.yaml @@ -11,7 +11,7 @@ fullnameOverride: sunbird-monitoring # Enabling external prometheus scrape config prometheus: prometheusSpec: - additionalScrapeConfigsExternal: true + additionalScrapeConfigsExternal: '{{ additional_scrape_configs_enabled | d(true) }}' retention: "{{ prometheus_retention_time | d('90d') }}" externalLabels: cluster: "{{ kubernetes_cluster_name | default('kubernetes-1')}}" From 0ffbec64e7edd1cedd6621ecf5391d52ce0c2662 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Sat, 16 May 2020 22:41:33 +0530 Subject: [PATCH 2429/2894] Make additional scrape config optional (#1483) * Make additional scrape config optional Signed-off-by: Rajesh Rajendran * Adding nginx caching changes to swarm --- ansible/roles/stack-proxy/templates/proxy-default.conf | 9 +++------ .../templates/prometheus-operator.yaml | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/ansible/roles/stack-proxy/templates/proxy-default.conf b/ansible/roles/stack-proxy/templates/proxy-default.conf index 9ca45d7d8..542fc9bb7 100644 --- a/ansible/roles/stack-proxy/templates/proxy-default.conf +++ b/ansible/roles/stack-proxy/templates/proxy-default.conf @@ -121,8 +121,7 @@ server { proxy_cache_key $proxy_host$request_uri; proxy_cache framework_cache; add_header X-Proxy-Cache $upstream_cache_status; - proxy_cache_lock on; - proxy_cache_valid any 3600s; + proxy_cache_valid 200 3600s; rewrite ^/api/(.*) /$1 break; client_max_body_size 60M; @@ -511,8 +510,7 @@ location ~* ^/desktop/(.*) { proxy_cache_key $proxy_host$request_uri; proxy_cache proxy_cache; add_header X-Proxy-Cache $upstream_cache_status; - proxy_cache_lock on; - proxy_cache_valid any 3600s; + proxy_cache_valid 200 3600s; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; @@ -526,8 +524,7 @@ location ~* ^/desktop/(.*) { proxy_cache_key $proxy_host$request_uri; proxy_cache framework_cache; add_header X-Proxy-Cache $upstream_cache_status; - proxy_cache_lock on; - proxy_cache_valid any 3600s; + proxy_cache_valid 200 3600s; rewrite ^/api/channel/v1/read/(.*) /channel/v1/read/$1 break; client_max_body_size 60M; diff --git a/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-operator.yaml b/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-operator.yaml index c04c77bd8..bf7cda9f1 100644 --- a/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-operator.yaml +++ b/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-operator.yaml @@ -11,7 +11,7 @@ fullnameOverride: sunbird-monitoring # Enabling external prometheus scrape config prometheus: prometheusSpec: - additionalScrapeConfigsExternal: true + additionalScrapeConfigsExternal: '{{ additional_scrape_configs_enabled | d(true) }}' retention: "{{ prometheus_retention_time | d('90d') }}" externalLabels: cluster: "{{ kubernetes_cluster_name | default('kubernetes-1')}}" From 5c411bd0ce4b954c22d66f26feae373165a1cd23 Mon Sep 17 00:00:00 2001 From: Amit Priyadarshi Date: Mon, 18 May 2020 11:37:32 +0530 Subject: [PATCH 2430/2894] SB-19284: adding search service actor config changes (#1486) * Issue #SB-19284 feat: adding search service actor config changes * Issue #SB-19284 feat: adding search service actor config changes --- .../templates/search-service_application.conf | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/ansible/roles/stack-sunbird/templates/search-service_application.conf b/ansible/roles/stack-sunbird/templates/search-service_application.conf index fb04d0882..cb89337a0 100644 --- a/ansible/roles/stack-sunbird/templates/search-service_application.conf +++ b/ansible/roles/stack-sunbird/templates/search-service_application.conf @@ -33,6 +33,49 @@ akka { # And then uncomment this line to debug the configuration. # #log-config-on-start = true + default-dispatcher { + # This will be used if you have set "executor = "fork-join-executor"" + fork-join-executor { + # Min number of threads to cap factor-based parallelism number to + parallelism-min = 8 + # The parallelism factor is used to determine thread pool size using the + # following formula: ceil(available processors * factor). Resulting size + # is then bounded by the parallelism-min and parallelism-max values. + parallelism-factor = 32.0 + # Max number of threads to cap factor-based parallelism number to + parallelism-max = 64 + # Setting to "FIFO" to use queue like peeking mode which "poll" or "LIFO" to use stack + # like peeking mode which "pop". + task-peeking-mode = "FIFO" + } + } + actors-dispatcher { + type = "Dispatcher" + executor = "fork-join-executor" + fork-join-executor { + parallelism-min = 8 + parallelism-factor = 32.0 + parallelism-max = 64 + } + # Throughput for default Dispatcher, set to 1 for as fair as possible + throughput = 1 + } + actor { + deployment { + /searchActor + { + router = smallest-mailbox-pool + nr-of-instances = 10 + dispatcher = actors-dispatcher + } + /healthActor + { + router = smallest-mailbox-pool + nr-of-instances = 10 + dispatcher = actors-dispatcher + } + } + } } ## Secret key From d73674f44d1e5a6f2c8315bc4007afb01ac98c60 Mon Sep 17 00:00:00 2001 From: harshavardhanc Date: Mon, 18 May 2020 13:32:39 +0530 Subject: [PATCH 2431/2894] Issue #00 fix: varibalizing image tag for echo service --- kubernetes/helm_charts/core/apimanagerecho/values.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/helm_charts/core/apimanagerecho/values.j2 b/kubernetes/helm_charts/core/apimanagerecho/values.j2 index 7e1953927..ff53d1679 100755 --- a/kubernetes/helm_charts/core/apimanagerecho/values.j2 +++ b/kubernetes/helm_charts/core/apimanagerecho/values.j2 @@ -6,7 +6,7 @@ dockerhub: {{ dockerhub }} replicaCount: {{apimanagerecho_replicacount|default(1)}} repository: {{apimanagerecho_repository|default('echo-server')}} -image_tag: 1.5.0-gold +image_tag: {{ image_tag }} resources: requests: cpu: {{api_managerecho_cpu_req|default('50m')}} From 79705aca6b6a976d933fbf4758552adc7c76113c Mon Sep 17 00:00:00 2001 From: ravinder kumar Date: Mon, 18 May 2020 16:04:43 +0530 Subject: [PATCH 2432/2894] Issue #SB-0000 feat: changing report service url --- ansible/inventory/env/group_vars/all.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/inventory/env/group_vars/all.yml b/ansible/inventory/env/group_vars/all.yml index a01073c8d..5511c2b8f 100644 --- a/ansible/inventory/env/group_vars/all.yml +++ b/ansible/inventory/env/group_vars/all.yml @@ -633,4 +633,4 @@ cloud_storage_url: "{{ sunbird_public_storage_account_name }}.blob.core.windows. # Search-service search_index_host: "{{ groups['composite-search-cluster']|join(':9200,')}}:9200" compositesearch_index_name: "compositesearch" -sunbird_report_service_url: "{{proto}}://{{ proxy_server_name }}/api/data/v1/report-service" +sunbird_report_service_url: "{{proto}}://kong:8000/data/v1/report-service" From d75d0d2dfe88ddc1c2a0fd94610bca0ad0ab7b77 Mon Sep 17 00:00:00 2001 From: Amit Priyadarshi Date: Mon, 18 May 2020 18:04:49 +0530 Subject: [PATCH 2433/2894] SB-19284: adding search service memory configuration (#1491) * Issue #SB-19284 feat: adding search service actor config changes * Issue #SB-19284 feat: adding search service actor config changes * Issue #SB-19284 feat: adding search service memory configuration --- kubernetes/helm_charts/core/search/templates/deployment.yaml | 3 +++ kubernetes/helm_charts/core/search/values.j2 | 3 +++ 2 files changed, 6 insertions(+) diff --git a/kubernetes/helm_charts/core/search/templates/deployment.yaml b/kubernetes/helm_charts/core/search/templates/deployment.yaml index 0a9840907..8675321f3 100644 --- a/kubernetes/helm_charts/core/search/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/search/templates/deployment.yaml @@ -35,6 +35,9 @@ spec: - name: {{ .Chart.Name }} image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" imagePullPolicy: Always + env: + - name: JAVA_OPTIONS + value: {{ .Values.env.javaoptions | quote }} envFrom: - configMapRef: name: {{ .Chart.Name }}-config diff --git a/kubernetes/helm_charts/core/search/values.j2 b/kubernetes/helm_charts/core/search/values.j2 index 619ec470c..17270ebb6 100644 --- a/kubernetes/helm_charts/core/search/values.j2 +++ b/kubernetes/helm_charts/core/search/values.j2 @@ -4,6 +4,9 @@ namespace: {{ namespace }} imagepullsecrets: {{ imagepullsecrets }} dockerhub: {{ dockerhub }} +env: + javaoptions: {{search_java_mem_limit|default('-Xmx600m')}} + replicaCount: {{search_replicacount|default(1)}} repository: {{search_repository|default('search-service')}} image_tag: {{ image_tag }} From cd5c3b89d62f76c84d2ede2d5c3fdc936d3de436 Mon Sep 17 00:00:00 2001 From: ravinder kumar Date: Tue, 19 May 2020 13:54:40 +0530 Subject: [PATCH 2434/2894] Issue #SB-0000 fix : changing proto to http --- ansible/inventory/env/group_vars/all.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ansible/inventory/env/group_vars/all.yml b/ansible/inventory/env/group_vars/all.yml index 5511c2b8f..1bcb88f51 100644 --- a/ansible/inventory/env/group_vars/all.yml +++ b/ansible/inventory/env/group_vars/all.yml @@ -633,4 +633,5 @@ cloud_storage_url: "{{ sunbird_public_storage_account_name }}.blob.core.windows. # Search-service search_index_host: "{{ groups['composite-search-cluster']|join(':9200,')}}:9200" compositesearch_index_name: "compositesearch" -sunbird_report_service_url: "{{proto}}://kong:8000/data/v1/report-service" +sunbird_report_service_url: "http://kong:8000/data/v1/report-service" + From 67ce972d7e866d734695f1da210d3b5d0bdfb7f0 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Wed, 20 May 2020 18:45:16 +0530 Subject: [PATCH 2435/2894] Adding nginx_client_public_ip_header for overriding client ip header Signed-off-by: Rajesh Rajendran --- .../core/nginx-public-ingress/values.j2 | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 b/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 index b76274bdd..a7fca526a 100644 --- a/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 +++ b/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 @@ -111,7 +111,7 @@ proxyconfig: | # Limitting open connection per ip limit_conn limitbyaddr {{ nginx_per_ip_connection_limit }}; proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Real-IP {{ nginx_client_public_ip_header | d('$remote_addr') }}; proxy_set_header X-Forwarded-SSL on; proxy_set_header X-Forwarded-Proto $scheme; ignore_invalid_headers off; #pass through headers from Jenkins which are considered invalid by Nginx server. @@ -140,7 +140,7 @@ proxyconfig: | location ~* ^/auth/v1/refresh/token { rewrite ^/auth/(.*) /auth/$1 break; proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Real-IP {{ nginx_client_public_ip_header | d('$remote_addr') }}; proxy_set_header X-Scheme $scheme; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; @@ -151,7 +151,7 @@ proxyconfig: | rewrite ^/auth/(.*) /auth/$1 break; proxy_pass $target; proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Real-IP {{ nginx_client_public_ip_header | d('$remote_addr') }}; proxy_set_header X-Scheme $scheme; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; @@ -168,9 +168,9 @@ proxyconfig: | client_max_body_size 60M; proxy_set_header Connection ""; proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Real-IP {{ nginx_client_public_ip_header | d('$remote_addr') }}; proxy_set_header X-Scheme $scheme; - proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header X-Forwarded-For {{ nginx_client_public_ip_header | d('$remote_addr') }}; proxy_connect_timeout 5; proxy_send_timeout 60; proxy_read_timeout 70; @@ -198,9 +198,9 @@ proxyconfig: | rewrite ^/api/(.*) /$1 break; proxy_set_header Connection ""; proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Real-IP {{ nginx_client_public_ip_header | d('$remote_addr') }}; proxy_set_header X-Scheme $scheme; - proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header X-Forwarded-For {{ nginx_client_public_ip_header | d('$remote_addr') }}; proxy_connect_timeout 5; proxy_send_timeout 60; proxy_read_timeout 70; @@ -214,14 +214,14 @@ proxyconfig: | # Oauth2 config location /oauth2/ { proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Real-IP {{ nginx_client_public_ip_header | d('$remote_addr') }}; proxy_set_header X-Scheme $scheme; proxy_set_header X-Auth-Request-Redirect $request_uri; proxy_pass http://oauth2-proxy.logging.svc.cluster.local; } location = /oauth2/auth { proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Real-IP {{ nginx_client_public_ip_header | d('$remote_addr') }}; proxy_set_header X-Scheme $scheme; # nginx auth_request includes headers but not body proxy_set_header Content-Length ""; @@ -251,7 +251,7 @@ proxyconfig: | location /encryption/ { rewrite ^/encryption/(.*) /$1 break; proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Real-IP {{ nginx_client_public_ip_header | d('$remote_addr') }}; proxy_set_header X-Scheme $scheme; proxy_connect_timeout 1; proxy_send_timeout 30; @@ -262,7 +262,7 @@ proxyconfig: | location /badging/ { rewrite ^/badging/(.*) /$1 break; proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Real-IP {{ nginx_client_public_ip_header | d('$remote_addr') }}; proxy_set_header X-Scheme $scheme; proxy_connect_timeout 1; proxy_send_timeout 30; @@ -386,7 +386,7 @@ proxyconfig: | gzip_types application/javascript application/x-javascript text/css text/javascript; rewrite ^/(.*) /$1 break; proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Real-IP {{ nginx_client_public_ip_header | d('$remote_addr') }}; proxy_set_header X-Scheme $scheme; proxy_connect_timeout 5; proxy_send_timeout 60; @@ -435,7 +435,7 @@ proxyconfig: | location / { rewrite ^/(.*) /$1 break; proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Real-IP {{ nginx_client_public_ip_header | d('$remote_addr') }}; proxy_set_header X-Scheme $scheme; proxy_connect_timeout 5; proxy_send_timeout 60; @@ -450,7 +450,7 @@ proxyconfig: | proxy_set_header Connection ""; rewrite ^/v3/device/register/(.*) /v3/device/register/$1 break; proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Real-IP {{ nginx_client_public_ip_header | d('$remote_addr') }}; proxy_set_header X-Scheme $scheme; proxy_connect_timeout 5; proxy_send_timeout 60; @@ -463,7 +463,7 @@ proxyconfig: | rewrite ^/action/data/v3/metrics/(.*) /data/v3/metrics/$1 break; proxy_http_version 1.1; proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Real-IP {{ nginx_client_public_ip_header | d('$remote_addr') }}; proxy_set_header X-Scheme $scheme; proxy_connect_timeout 5; proxy_send_timeout 60; @@ -477,7 +477,7 @@ proxyconfig: | proxy_cache_valid 200 3600s; proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Real-IP {{ nginx_client_public_ip_header | d('$remote_addr') }}; proxy_set_header X-Scheme $scheme; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; @@ -494,9 +494,9 @@ proxyconfig: | client_max_body_size 60M; proxy_set_header Connection ""; proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Real-IP {{ nginx_client_public_ip_header | d('$remote_addr') }}; proxy_set_header X-Scheme $scheme; - proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header X-Forwarded-For {{ nginx_client_public_ip_header | d('$remote_addr') }}; proxy_connect_timeout 5; proxy_send_timeout 60; proxy_read_timeout 70; @@ -550,7 +550,7 @@ nginxconfig: | {{ nginx_http_config | indent( width=7, indentfirst=True) }} {% endif %} lua_load_resty_core off; - log_format main '$remote_addr - $remote_user [$time_local] ' + log_format main '{{ nginx_client_public_ip_header | d('$remote_addr') }} - $remote_user [$time_local] ' '"$request" $status $body_bytes_sent ' '$request_time $upstream_response_time $pipe' '"$http_referer" "$http_user_agent"'; @@ -646,7 +646,7 @@ keycloakconf: | # Limitting open connection per ip limit_conn limitbyaddr {{ nginx_per_ip_connection_limit }}; proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Real-IP {{ nginx_client_public_ip_header | d('$remote_addr') }}; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-SSL on; proxy_set_header X-Forwarded-Proto $scheme; @@ -673,7 +673,7 @@ keycloakconf: | location ~* ^/auth/v1/refresh/token { rewrite ^/auth/(.*) /auth/$1 break; proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Real-IP {{ nginx_client_public_ip_header | d('$remote_addr') }}; proxy_set_header X-Scheme $scheme; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; @@ -688,7 +688,7 @@ keycloakconf: | rewrite ^/auth/(.*) /auth/$1 break; proxy_pass $target; proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Real-IP {{ nginx_client_public_ip_header | d('$remote_addr') }}; proxy_set_header X-Scheme $scheme; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; @@ -697,7 +697,7 @@ keycloakconf: | rewrite ^/(.*) /$1 break; proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Real-IP {{ nginx_client_public_ip_header | d('$remote_addr') }}; proxy_set_header X-Scheme $scheme; proxy_connect_timeout 5; proxy_send_timeout 60; From 12255813e7598b489bd1e420a266bf6a20cd91f5 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Wed, 20 May 2020 22:02:45 +0530 Subject: [PATCH 2436/2894] Adding liveness probe for kong helm Signed-off-by: Rajesh Rajendran --- ansible/roles/stack-sunbird/defaults/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/ansible/roles/stack-sunbird/defaults/main.yml b/ansible/roles/stack-sunbird/defaults/main.yml index ce7e754cc..d172ffef9 100644 --- a/ansible/roles/stack-sunbird/defaults/main.yml +++ b/ansible/roles/stack-sunbird/defaults/main.yml @@ -323,6 +323,7 @@ apimanager_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 + successThreshold: 1 assessment_liveness_readiness: healthcheck: true From 78f2dbcb9050626ee4044cafa855330cebda0022 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Thu, 21 May 2020 08:15:54 +0530 Subject: [PATCH 2437/2894] fix: ansible helm variable template Signed-off-by: Rajesh Rajendran --- .../roles/sunbird-monitoring/templates/prometheus-operator.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-operator.yaml b/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-operator.yaml index bf7cda9f1..25fa1fc16 100644 --- a/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-operator.yaml +++ b/kubernetes/ansible/roles/sunbird-monitoring/templates/prometheus-operator.yaml @@ -11,7 +11,7 @@ fullnameOverride: sunbird-monitoring # Enabling external prometheus scrape config prometheus: prometheusSpec: - additionalScrapeConfigsExternal: '{{ additional_scrape_configs_enabled | d(true) }}' + additionalScrapeConfigsExternal: {{ additional_scrape_configs_enabled | d(true) }} retention: "{{ prometheus_retention_time | d('90d') }}" externalLabels: cluster: "{{ kubernetes_cluster_name | default('kubernetes-1')}}" From 99dc53cb7926eeddb8518122650c3288cbbd86b8 Mon Sep 17 00:00:00 2001 From: Hari-stackroute <40484996+Hari-stackroute@users.noreply.github.com> Date: Thu, 21 May 2020 10:57:03 +0530 Subject: [PATCH 2438/2894] Issue #SH-112 added managedBy to the user-mapping --- .../files/mappings/user-mapping.json | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/ansible/roles/es-mapping/files/mappings/user-mapping.json b/ansible/roles/es-mapping/files/mappings/user-mapping.json index 56c961e55..99622c94e 100644 --- a/ansible/roles/es-mapping/files/mappings/user-mapping.json +++ b/ansible/roles/es-mapping/files/mappings/user-mapping.json @@ -1,6 +1,22 @@ { "dynamic": false, "properties": { + "managedBy": { + "type": "text", + "fields": { + "raw": { + "type": "text", + "analyzer": "keylower", + "fielddata": true + } + }, + "copy_to": [ + "all_fields" + ], + "analyzer": "cs_index_analyzer", + "search_analyzer": "cs_search_analyzer", + "fielddata": true + }, "activeStatus": { "type": "text", "fields": { @@ -3537,4 +3553,4 @@ } } } -} \ No newline at end of file +} From 4ae550507cc78f0092ab4e1bf17dbdd723200856 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Thu, 21 May 2020 11:02:21 +0530 Subject: [PATCH 2439/2894] Enabling background cache for nginx Signed-off-by: Rajesh Rajendran --- .../helm_charts/core/nginx-public-ingress/values.j2 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 b/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 index a7fca526a..30f0deb4f 100644 --- a/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 +++ b/kubernetes/helm_charts/core/nginx-public-ingress/values.j2 @@ -162,6 +162,9 @@ proxyconfig: | proxy_cache_key $proxy_host$request_uri; proxy_cache framework_cache; add_header X-Proxy-Cache $upstream_cache_status; + proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504; + proxy_cache_background_update on; + proxy_cache_lock on; proxy_cache_valid 200 3600s; rewrite ^/api/(.*) /$1 break; @@ -474,6 +477,9 @@ proxyconfig: | proxy_cache_key $proxy_host$request_uri; proxy_cache proxy_cache; add_header X-Proxy-Cache $upstream_cache_status; + proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504; + proxy_cache_background_update on; + proxy_cache_lock on; proxy_cache_valid 200 3600s; proxy_set_header Host $host; @@ -488,6 +494,9 @@ proxyconfig: | proxy_cache_key $proxy_host$request_uri; proxy_cache framework_cache; add_header X-Proxy-Cache $upstream_cache_status; + proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504; + proxy_cache_background_update on; + proxy_cache_lock on; proxy_cache_valid 200 3600s; rewrite ^/api/channel/v1/read/(.*) /channel/v1/read/$1 break; From d8ea457509b3ba913e20bc0d73c19ab765676ef2 Mon Sep 17 00:00:00 2001 From: SMY ALTAMASH <30286162+SMYALTAMASH@users.noreply.github.com> Date: Thu, 21 May 2020 15:06:31 +0530 Subject: [PATCH 2440/2894] Onboard Private API for password reset (#1501) --- ansible/roles/kong-api/defaults/main.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/ansible/roles/kong-api/defaults/main.yml b/ansible/roles/kong-api/defaults/main.yml index 29ff2f0e9..7e2e4ac39 100644 --- a/ansible/roles/kong-api/defaults/main.yml +++ b/ansible/roles/kong-api/defaults/main.yml @@ -39,6 +39,7 @@ large_request_size_limit: 100 freshDesk_url: "http://dummy.freshDesk.url" # Default service prefixes +learner_private_route_prefix: /private private_content_prefix: /private/content device_prefix: /v3/device content_prefix: /content @@ -4497,3 +4498,21 @@ kong_apis: config.limit_by: credential - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" + + - name: forgotPassword + request_path: "{{ learner_private_route_prefix }}/user/v1/password/reset" + upstream_url: "{{ learning_service_url }}/private/user/v1/password/reset" + strip_request_path: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: + - 'userAccess' + - 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: "{{ small_request_size_limit }}" From 7ad0c645dec96b93d373b42c119ef0a66fedebb3 Mon Sep 17 00:00:00 2001 From: G33tha Date: Fri, 22 May 2020 14:10:29 +0530 Subject: [PATCH 2441/2894] updated sunbird_echo_api_url for player (#1504) * updated sunbird_echo_api_url for player --- ansible/inventory/env/group_vars/all.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/inventory/env/group_vars/all.yml b/ansible/inventory/env/group_vars/all.yml index 1bcb88f51..5da2e6a85 100644 --- a/ansible/inventory/env/group_vars/all.yml +++ b/ansible/inventory/env/group_vars/all.yml @@ -3,7 +3,7 @@ # ENVIRONMENT CONFIGURATION proxy_server_name: "{{domain_name}}" keycloak_auth_server_url: "{{proto}}://{{ proxy_server_name }}/auth" -sunbird_echo_api_url: "{{proto}}://{{ proxy_server_name }}/api/echo/" +sunbird_echo_api_url: "http://kong:8000/echo/" sunbird_web_url: "{{proto}}://{{ proxy_server_name }}" sunbird_dataservice_url: "{{proto}}://{{ proxy_server_name }}/api/" api_proxy_name: "api.{{proxy_server_name}}" # Domain name on which device register and other api's will be accessed From df1a18f4c51382d72d892757a910408c51eb702b Mon Sep 17 00:00:00 2001 From: Harsha Date: Fri, 22 May 2020 17:47:13 +0530 Subject: [PATCH 2442/2894] Issue #00 fix: updating maxsurge and maxunavailable (#1505) --- .../helm_charts/core/adminutils/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/adminutils/values.j2 | 4 ++-- .../helm_charts/core/apimanager/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/apimanager/values.j2 | 4 ++-- .../helm_charts/core/assessment/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/assessment/values.j2 | 4 ++-- .../helm_charts/core/badger/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/badger/values.j2 | 6 +++--- kubernetes/helm_charts/core/cert/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/cert/values.j2 | 4 ++-- .../helm_charts/core/certregistry/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/certregistry/values.j2 | 4 ++-- .../helm_charts/core/content/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/content/values.j2 | 4 ++-- kubernetes/helm_charts/core/enc/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/enc/values.j2 | 4 ++-- .../helm_charts/core/knowledgemw/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/knowledgemw/values.j2 | 4 ++-- .../helm_charts/core/learner/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/learner/values.j2 | 4 ++-- kubernetes/helm_charts/core/lms/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/lms/values.j2 | 4 ++-- .../helm_charts/core/notification/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/notification/values.j2 | 4 ++-- .../helm_charts/core/player/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/player/values.j2 | 4 ++-- kubernetes/helm_charts/core/print/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/print/values.j2 | 6 +++--- .../helm_charts/core/report/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/report/values.j2 | 4 ++-- .../helm_charts/core/search/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/search/values.j2 | 4 ++-- .../helm_charts/core/taxonomy/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/taxonomy/values.j2 | 4 ++-- .../core/telemetry-dp-logstash/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/telemetry-dp-logstash/values.j2 | 4 ++-- .../helm_charts/core/telemetry/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/telemetrydplogstash/values.j2 | 4 ++-- .../helm_charts/core/userorg/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/userorg/values.j2 | 4 ++-- 40 files changed, 62 insertions(+), 62 deletions(-) diff --git a/kubernetes/helm_charts/core/adminutils/templates/deployment.yaml b/kubernetes/helm_charts/core/adminutils/templates/deployment.yaml index 93acb03d0..4c825a32e 100644 --- a/kubernetes/helm_charts/core/adminutils/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/adminutils/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/adminutils/values.j2 b/kubernetes/helm_charts/core/adminutils/values.j2 index 5470c1284..06524cece 100644 --- a/kubernetes/helm_charts/core/adminutils/values.j2 +++ b/kubernetes/helm_charts/core/adminutils/values.j2 @@ -19,8 +19,8 @@ network: targetport: 4000 strategy: type: RollingUpdate - maxsurge: {{ adminutil_maxsurge|default(1) }} - maxunavailable: {{ adminutil_maxunavailable|default }} + maxsurge: {{ adminutil_maxsurge|default('10%') }} + maxunavailable: {{ adminutil_maxunavailable|default('10%') }} {{ adminutils_liveness_readiness | to_nice_yaml }} diff --git a/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml b/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml index 96ed1a0bc..d8eb29c57 100755 --- a/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/apimanager/values.j2 b/kubernetes/helm_charts/core/apimanager/values.j2 index 4b191e1ef..db5bc5eee 100755 --- a/kubernetes/helm_charts/core/apimanager/values.j2 +++ b/kubernetes/helm_charts/core/apimanager/values.j2 @@ -22,8 +22,8 @@ service: targetport: 8001 strategy: type: RollingUpdate - maxsurge: {{ apimanager_maxsurge|default(1) }} - maxunavailable: {{ apimanager_maxunavailable|default }} + maxsurge: {{ apimanager_maxsurge|default('10%') }} + maxunavailable: {{ apimanager_maxunavailable|default('10%') }} {{ apimanager_liveness_readiness | to_nice_yaml }} diff --git a/kubernetes/helm_charts/core/assessment/templates/deployment.yaml b/kubernetes/helm_charts/core/assessment/templates/deployment.yaml index fd4ed0098..0a2df5d27 100644 --- a/kubernetes/helm_charts/core/assessment/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/assessment/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/assessment/values.j2 b/kubernetes/helm_charts/core/assessment/values.j2 index ecbeda4b7..57e5ad4e6 100644 --- a/kubernetes/helm_charts/core/assessment/values.j2 +++ b/kubernetes/helm_charts/core/assessment/values.j2 @@ -20,7 +20,7 @@ network: port: 9000 strategy: type: RollingUpdate - maxsurge: {{ assessment_maxsurge|default(1) }} - maxunavailable: {{ assessment_maxunavailable|default }} + maxsurge: {{ assessment_maxsurge|default('10%') }} + maxunavailable: {{ assessment_maxunavailable|default('10%') }} {{ assessment_liveness_readiness | to_nice_yaml }} diff --git a/kubernetes/helm_charts/core/badger/templates/deployment.yaml b/kubernetes/helm_charts/core/badger/templates/deployment.yaml index 50ff30e9c..b3fbc36ca 100755 --- a/kubernetes/helm_charts/core/badger/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/badger/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/badger/values.j2 b/kubernetes/helm_charts/core/badger/values.j2 index cf01e75a1..bcdfa9946 100755 --- a/kubernetes/helm_charts/core/badger/values.j2 +++ b/kubernetes/helm_charts/core/badger/values.j2 @@ -19,7 +19,7 @@ network: targetport: 8004 strategy: type: RollingUpdate - maxsurge: {{ badger_maxsurge|default(1) }} - maxunavailable: {{ badger_maxunavailable|default }} + maxsurge: {{ badger_maxsurge|default('10%') }} + maxunavailable: {{ badger_maxunavailable|default('10%') }} -{{ badger_liveness_readiness | to_nice_yaml }} \ No newline at end of file +{{ badger_liveness_readiness | to_nice_yaml }} diff --git a/kubernetes/helm_charts/core/cert/templates/deployment.yaml b/kubernetes/helm_charts/core/cert/templates/deployment.yaml index 13c47c4b8..522e7f3fd 100644 --- a/kubernetes/helm_charts/core/cert/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/cert/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/cert/values.j2 b/kubernetes/helm_charts/core/cert/values.j2 index d96257857..7bf966e8d 100644 --- a/kubernetes/helm_charts/core/cert/values.j2 +++ b/kubernetes/helm_charts/core/cert/values.j2 @@ -19,7 +19,7 @@ network: targetport: 9000 strategy: type: RollingUpdate - maxsurge: {{ cert_maxsurge|default(1) }} - maxunavailable: {{ cert_maxunavailable|default }} + maxsurge: {{ cert_maxsurge|default('10%') }} + maxunavailable: {{ cert_maxunavailable|default('10%') }} {{ cert_liveness_readiness | to_nice_yaml }} diff --git a/kubernetes/helm_charts/core/certregistry/templates/deployment.yaml b/kubernetes/helm_charts/core/certregistry/templates/deployment.yaml index 6c39784c4..ce025b525 100644 --- a/kubernetes/helm_charts/core/certregistry/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/certregistry/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/certregistry/values.j2 b/kubernetes/helm_charts/core/certregistry/values.j2 index ceac100da..beed210b6 100644 --- a/kubernetes/helm_charts/core/certregistry/values.j2 +++ b/kubernetes/helm_charts/core/certregistry/values.j2 @@ -19,7 +19,7 @@ network: targetport: 9000 strategy: type: RollingUpdate - maxsurge: {{ certregistry_maxsurge|default(1) }} - maxunavailable: {{ certregistry_maxunavailable|default }} + maxsurge: {{ certregistry_maxsurge|default('10%') }} + maxunavailable: {{ certregistry_maxunavailable|default('10%') }} {{ cert_liveness_readiness | to_nice_yaml }} diff --git a/kubernetes/helm_charts/core/content/templates/deployment.yaml b/kubernetes/helm_charts/core/content/templates/deployment.yaml index 693a9c6f0..714521a20 100644 --- a/kubernetes/helm_charts/core/content/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/content/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/content/values.j2 b/kubernetes/helm_charts/core/content/values.j2 index 6b529ffc0..911ddcbfa 100644 --- a/kubernetes/helm_charts/core/content/values.j2 +++ b/kubernetes/helm_charts/core/content/values.j2 @@ -22,7 +22,7 @@ network: targetport: 9000 strategy: type: RollingUpdate - maxsurge: {{ content_maxsurge|default(1) }} - maxunavailable: {{ content_maxunavailable|default }} + maxsurge: {{ content_maxsurge|default('10%') }} + maxunavailable: {{ content_maxunavailable|default('10%') }} {{ content_liveness_readiness | to_nice_yaml }} diff --git a/kubernetes/helm_charts/core/enc/templates/deployment.yaml b/kubernetes/helm_charts/core/enc/templates/deployment.yaml index b090a0bf0..731699890 100644 --- a/kubernetes/helm_charts/core/enc/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/enc/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/enc/values.j2 b/kubernetes/helm_charts/core/enc/values.j2 index 96ea37e32..bf44d48b3 100644 --- a/kubernetes/helm_charts/core/enc/values.j2 +++ b/kubernetes/helm_charts/core/enc/values.j2 @@ -19,7 +19,7 @@ network: targetport: 8013 strategy: type: RollingUpdate - maxsurge: {{ enc_maxsurge|default(1) }} - maxunavailable: {{ enc_maxunavailable|default }} + maxsurge: {{ enc_maxsurge|default('10%') }} + maxunavailable: {{ enc_maxunavailable|default('10%') }} {{ enc_liveness_readiness | to_nice_yaml }} diff --git a/kubernetes/helm_charts/core/knowledgemw/templates/deployment.yaml b/kubernetes/helm_charts/core/knowledgemw/templates/deployment.yaml index 9b54cd71c..78442e62a 100644 --- a/kubernetes/helm_charts/core/knowledgemw/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/knowledgemw/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/knowledgemw/values.j2 b/kubernetes/helm_charts/core/knowledgemw/values.j2 index 884fe8305..76d2d8408 100644 --- a/kubernetes/helm_charts/core/knowledgemw/values.j2 +++ b/kubernetes/helm_charts/core/knowledgemw/values.j2 @@ -19,7 +19,7 @@ network: targetport: 5000 strategy: type: RollingUpdate - maxsurge: {{ knowledge_mw_maxsurge|default(1) }} - maxunavailable: {{ knowledge_mw_maxunavailable|default }} + maxsurge: {{ knowledge_mw_maxsurge|default('10%') }} + maxunavailable: {{ knowledge_mw_maxunavailable|default('10%') }} {{ knowledgemw_liveness_readiness | to_nice_yaml }} diff --git a/kubernetes/helm_charts/core/learner/templates/deployment.yaml b/kubernetes/helm_charts/core/learner/templates/deployment.yaml index 72c620612..d4badb8f3 100644 --- a/kubernetes/helm_charts/core/learner/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/learner/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/learner/values.j2 b/kubernetes/helm_charts/core/learner/values.j2 index 4d1a3dfef..f5574aefb 100644 --- a/kubernetes/helm_charts/core/learner/values.j2 +++ b/kubernetes/helm_charts/core/learner/values.j2 @@ -23,7 +23,7 @@ network: targetport: 9000 strategy: type: RollingUpdate - maxsurge: {{ learner_maxsurge|default(1) }} - maxunavailable: {{ learner_maxunavailable|default }} + maxsurge: {{ learner_maxsurge|default('10%') }} + maxunavailable: {{ learner_maxunavailable|default('10%') }} {{ learner_liveness_readiness | to_nice_yaml }} diff --git a/kubernetes/helm_charts/core/lms/templates/deployment.yaml b/kubernetes/helm_charts/core/lms/templates/deployment.yaml index 72c620612..d4badb8f3 100644 --- a/kubernetes/helm_charts/core/lms/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/lms/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/lms/values.j2 b/kubernetes/helm_charts/core/lms/values.j2 index 5245883f1..02125e1f3 100644 --- a/kubernetes/helm_charts/core/lms/values.j2 +++ b/kubernetes/helm_charts/core/lms/values.j2 @@ -23,7 +23,7 @@ network: targetport: 9000 strategy: type: RollingUpdate - maxsurge: {{ lms_maxsurge|default(1) }} - maxunavailable: {{ lms_maxunavailable|default }} + maxsurge: {{ lms_maxsurge|default('10%') }} + maxunavailable: {{ lms_maxunavailable|default('10%') }} {{ lms_liveness_readiness | to_nice_yaml }} diff --git a/kubernetes/helm_charts/core/notification/templates/deployment.yaml b/kubernetes/helm_charts/core/notification/templates/deployment.yaml index 13685096d..a82590540 100644 --- a/kubernetes/helm_charts/core/notification/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/notification/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/notification/values.j2 b/kubernetes/helm_charts/core/notification/values.j2 index 91bf800a4..3ec22ccf5 100644 --- a/kubernetes/helm_charts/core/notification/values.j2 +++ b/kubernetes/helm_charts/core/notification/values.j2 @@ -19,8 +19,8 @@ network: targetport: 9000 strategy: type: RollingUpdate - maxsurge: {{ notification_maxsurge|default(1) }} - maxunavailable: {{ notification_maxunavailable|default }} + maxsurge: {{ notification_maxsurge|default('10%') }} + maxunavailable: {{ notification_maxunavailable|default('10%') }} notification: readinessprobe: diff --git a/kubernetes/helm_charts/core/player/templates/deployment.yaml b/kubernetes/helm_charts/core/player/templates/deployment.yaml index 8925debbe..e83cd8204 100644 --- a/kubernetes/helm_charts/core/player/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/player/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/player/values.j2 b/kubernetes/helm_charts/core/player/values.j2 index 871b08a36..1622e5d15 100644 --- a/kubernetes/helm_charts/core/player/values.j2 +++ b/kubernetes/helm_charts/core/player/values.j2 @@ -19,8 +19,8 @@ network: targetport: 3000 strategy: type: RollingUpdate - maxsurge: {{ player_maxsurge|default(1) }} - maxunavailable: {{ player_maxunavailable|default }} + maxsurge: {{ player_maxsurge|default('10%') }} + maxunavailable: {{ player_maxunavailable|default('10%') }} sunbird_portal_player_cdn_enabled: {{sunbird_portal_player_cdn_enabled|lower}} diff --git a/kubernetes/helm_charts/core/print/templates/deployment.yaml b/kubernetes/helm_charts/core/print/templates/deployment.yaml index 55cee3cc9..11be85131 100644 --- a/kubernetes/helm_charts/core/print/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/print/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/print/values.j2 b/kubernetes/helm_charts/core/print/values.j2 index 1585f49f0..71ce888c4 100644 --- a/kubernetes/helm_charts/core/print/values.j2 +++ b/kubernetes/helm_charts/core/print/values.j2 @@ -20,7 +20,7 @@ network: port: 5000 strategy: type: RollingUpdate - maxsurge: {{ print_maxsurge|default(1) }} - maxunavailable: {{ print_maxunavailable|default }} + maxsurge: {{ print_maxsurge|default('10%') }} + maxunavailable: {{ print_maxunavailable|default('10%') }} -{{ print_liveness_readiness | to_nice_yaml }} \ No newline at end of file +{{ print_liveness_readiness | to_nice_yaml }} diff --git a/kubernetes/helm_charts/core/report/templates/deployment.yaml b/kubernetes/helm_charts/core/report/templates/deployment.yaml index 13685096d..a82590540 100644 --- a/kubernetes/helm_charts/core/report/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/report/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/report/values.j2 b/kubernetes/helm_charts/core/report/values.j2 index de0f0c86a..2c4e1b795 100644 --- a/kubernetes/helm_charts/core/report/values.j2 +++ b/kubernetes/helm_charts/core/report/values.j2 @@ -20,7 +20,7 @@ network: targetport: 3030 strategy: type: RollingUpdate - maxsurge: {{ report_maxsurge|default(1) }} - maxunavailable: {{ report_maxunavailable|default }} + maxsurge: {{ report_maxsurge|default('10%') }} + maxunavailable: {{ report_maxunavailable|default('10%') }} {{ report_liveness_readiness | to_nice_yaml }} diff --git a/kubernetes/helm_charts/core/search/templates/deployment.yaml b/kubernetes/helm_charts/core/search/templates/deployment.yaml index 0a9840907..ed25a20ff 100644 --- a/kubernetes/helm_charts/core/search/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/search/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/search/values.j2 b/kubernetes/helm_charts/core/search/values.j2 index 619ec470c..90787a0e5 100644 --- a/kubernetes/helm_charts/core/search/values.j2 +++ b/kubernetes/helm_charts/core/search/values.j2 @@ -19,7 +19,7 @@ network: targetport: 9000 strategy: type: RollingUpdate - maxsurge: {{ search_maxsurge|default(1) }} - maxunavailable: {{ search_maxunavailable|default }} + maxsurge: {{ search_maxsurge|default('10%') }} + maxunavailable: {{ search_maxunavailable|default('10%') }} {{ search_liveness_readiness | to_nice_yaml }} diff --git a/kubernetes/helm_charts/core/taxonomy/templates/deployment.yaml b/kubernetes/helm_charts/core/taxonomy/templates/deployment.yaml index 8b2900057..67b8a8af1 100644 --- a/kubernetes/helm_charts/core/taxonomy/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/taxonomy/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/taxonomy/values.j2 b/kubernetes/helm_charts/core/taxonomy/values.j2 index 1c473b61f..2a9df4cb3 100644 --- a/kubernetes/helm_charts/core/taxonomy/values.j2 +++ b/kubernetes/helm_charts/core/taxonomy/values.j2 @@ -19,7 +19,7 @@ network: targetport: 9000 strategy: type: RollingUpdate - maxsurge: {{ taxonomy_maxsurge|default(1) }} - maxunavailable: {{ taxonomy_maxunavailable|default }} + maxsurge: {{ taxonomy_maxsurge|default('10%') }} + maxunavailable: {{ taxonomy_maxunavailable|default('10%') }} {{ taxonomy_liveness_readiness | to_nice_yaml }} diff --git a/kubernetes/helm_charts/core/telemetry-dp-logstash/templates/deployment.yaml b/kubernetes/helm_charts/core/telemetry-dp-logstash/templates/deployment.yaml index cedc0aa4b..6f584f7d2 100644 --- a/kubernetes/helm_charts/core/telemetry-dp-logstash/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/telemetry-dp-logstash/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Release.Name }} diff --git a/kubernetes/helm_charts/core/telemetry-dp-logstash/values.j2 b/kubernetes/helm_charts/core/telemetry-dp-logstash/values.j2 index 6a611c5ef..d16cb524a 100644 --- a/kubernetes/helm_charts/core/telemetry-dp-logstash/values.j2 +++ b/kubernetes/helm_charts/core/telemetry-dp-logstash/values.j2 @@ -19,5 +19,5 @@ network: targetport: 5044 strategy: type: RollingUpdate - maxsurge: 1 - maxunavailable: 1 + maxsurge: {{ telemetry_logstash_maxsurge|default('10%') }} + maxunavailable: {{ telemetry_logstash_maxunavailable|default('10%') }} diff --git a/kubernetes/helm_charts/core/telemetry/templates/deployment.yaml b/kubernetes/helm_charts/core/telemetry/templates/deployment.yaml index 13685096d..a82590540 100644 --- a/kubernetes/helm_charts/core/telemetry/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/telemetry/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/telemetrydplogstash/values.j2 b/kubernetes/helm_charts/core/telemetrydplogstash/values.j2 index 6a611c5ef..d16cb524a 100644 --- a/kubernetes/helm_charts/core/telemetrydplogstash/values.j2 +++ b/kubernetes/helm_charts/core/telemetrydplogstash/values.j2 @@ -19,5 +19,5 @@ network: targetport: 5044 strategy: type: RollingUpdate - maxsurge: 1 - maxunavailable: 1 + maxsurge: {{ telemetry_logstash_maxsurge|default('10%') }} + maxunavailable: {{ telemetry_logstash_maxunavailable|default('10%') }} diff --git a/kubernetes/helm_charts/core/userorg/templates/deployment.yaml b/kubernetes/helm_charts/core/userorg/templates/deployment.yaml index 6823feff6..d3f83edaf 100644 --- a/kubernetes/helm_charts/core/userorg/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/userorg/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/userorg/values.j2 b/kubernetes/helm_charts/core/userorg/values.j2 index 3c06decd6..c0b9216c0 100644 --- a/kubernetes/helm_charts/core/userorg/values.j2 +++ b/kubernetes/helm_charts/core/userorg/values.j2 @@ -19,7 +19,7 @@ network: targetport: 9000 strategy: type: RollingUpdate - maxsurge: {{ userorg_maxsurge|default(1) }} - maxunavailable: {{ userorg_maxunavailable|default }} + maxsurge: {{ userorg_maxsurge|default('10%') }} + maxunavailable: {{ userorg_maxunavailable|default('10%') }} {{ userorg_liveness_readiness | to_nice_yaml }} From 2fef0c6fe27afee4a44fb9e596ff84d979d22e0a Mon Sep 17 00:00:00 2001 From: SMY ALTAMASH <30286162+SMYALTAMASH@users.noreply.github.com> Date: Fri, 22 May 2020 18:15:03 +0530 Subject: [PATCH 2443/2894] Onboard Private API for internal use (#1506) --- ansible/roles/kong-api/defaults/main.yml | 108 +++++++++++++++++++++++ 1 file changed, 108 insertions(+) diff --git a/ansible/roles/kong-api/defaults/main.yml b/ansible/roles/kong-api/defaults/main.yml index 7e2e4ac39..fa6485989 100644 --- a/ansible/roles/kong-api/defaults/main.yml +++ b/ansible/roles/kong-api/defaults/main.yml @@ -2453,6 +2453,114 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" + - name: PrivateContentRetireAPI + request_path: "{{ private_content_prefix }}/v3/retire" + upstream_url: "{{ vm_learning_service_url }}/content/v3/retire" + strip_request_path: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: + - 'contentSuperAdmin' + - 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: PrivateContentUploadAPI + request_path: "{{ private_content_prefix }}/v3/upload" + upstream_url: "{{ vm_learning_service_url }}/content/v3/upload" + strip_request_path: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: + - 'contentSuperAdmin' + - 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: PrivateContentReviewAPI + request_path: "{{ private_content_prefix }}/v3/review" + upstream_url: "{{ vm_learning_service_url }}/content/v3/review" + strip_request_path: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: + - 'contentSuperAdmin' + - 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: PrivateContentPublishAPI + request_path: "{{ private_content_prefix }}/v3/publish" + upstream_url: "{{ vm_learning_service_url }}/content/v3/publish" + strip_request_path: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: + - 'contentSuperAdmin' + - 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: PrivateContentRejectAPI + request_path: "{{ private_content_prefix }}/v3/reject" + upstream_url: "{{ vm_learning_service_url }}/content/v3/reject" + strip_request_path: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: + - 'contentSuperAdmin' + - 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: PrivateContentHierarchyAPI + request_path: "{{ private_content_prefix }}/v3/hierarchy" + upstream_url: "{{ vm_learning_service_url }}/content/v3/hierarchy" + strip_request_path: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: + - 'contentSuperAdmin' + - 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: privateUserAssignRole request_path: "{{ user_service_prefix }}/private/v1/assign/role" upstream_url: "{{ learning_service_url }}/private/user/v1/assign/role" From 18b4e0b652f00dafdc8dc6283bcf0256a684f275 Mon Sep 17 00:00:00 2001 From: Harsha Date: Fri, 22 May 2020 19:18:01 +0530 Subject: [PATCH 2444/2894] Issue #00 fix: updating maxsurge and maxunavailable (#1505) (#1507) --- .../helm_charts/core/adminutils/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/adminutils/values.j2 | 4 ++-- .../helm_charts/core/apimanager/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/apimanager/values.j2 | 4 ++-- .../helm_charts/core/assessment/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/assessment/values.j2 | 4 ++-- .../helm_charts/core/badger/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/badger/values.j2 | 6 +++--- kubernetes/helm_charts/core/cert/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/cert/values.j2 | 4 ++-- .../helm_charts/core/certregistry/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/certregistry/values.j2 | 4 ++-- .../helm_charts/core/content/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/content/values.j2 | 4 ++-- kubernetes/helm_charts/core/enc/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/enc/values.j2 | 4 ++-- .../helm_charts/core/knowledgemw/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/knowledgemw/values.j2 | 4 ++-- .../helm_charts/core/learner/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/learner/values.j2 | 4 ++-- kubernetes/helm_charts/core/lms/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/lms/values.j2 | 4 ++-- .../helm_charts/core/notification/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/notification/values.j2 | 4 ++-- .../helm_charts/core/player/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/player/values.j2 | 4 ++-- kubernetes/helm_charts/core/print/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/print/values.j2 | 6 +++--- .../helm_charts/core/report/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/report/values.j2 | 4 ++-- .../helm_charts/core/search/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/search/values.j2 | 4 ++-- .../helm_charts/core/taxonomy/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/taxonomy/values.j2 | 4 ++-- .../core/telemetry-dp-logstash/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/telemetry-dp-logstash/values.j2 | 4 ++-- .../helm_charts/core/telemetry/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/telemetrydplogstash/values.j2 | 4 ++-- .../helm_charts/core/userorg/templates/deployment.yaml | 2 +- kubernetes/helm_charts/core/userorg/values.j2 | 4 ++-- 40 files changed, 62 insertions(+), 62 deletions(-) diff --git a/kubernetes/helm_charts/core/adminutils/templates/deployment.yaml b/kubernetes/helm_charts/core/adminutils/templates/deployment.yaml index 93acb03d0..4c825a32e 100644 --- a/kubernetes/helm_charts/core/adminutils/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/adminutils/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/adminutils/values.j2 b/kubernetes/helm_charts/core/adminutils/values.j2 index 5470c1284..06524cece 100644 --- a/kubernetes/helm_charts/core/adminutils/values.j2 +++ b/kubernetes/helm_charts/core/adminutils/values.j2 @@ -19,8 +19,8 @@ network: targetport: 4000 strategy: type: RollingUpdate - maxsurge: {{ adminutil_maxsurge|default(1) }} - maxunavailable: {{ adminutil_maxunavailable|default }} + maxsurge: {{ adminutil_maxsurge|default('10%') }} + maxunavailable: {{ adminutil_maxunavailable|default('10%') }} {{ adminutils_liveness_readiness | to_nice_yaml }} diff --git a/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml b/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml index 96ed1a0bc..d8eb29c57 100755 --- a/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/apimanager/values.j2 b/kubernetes/helm_charts/core/apimanager/values.j2 index 4b191e1ef..db5bc5eee 100755 --- a/kubernetes/helm_charts/core/apimanager/values.j2 +++ b/kubernetes/helm_charts/core/apimanager/values.j2 @@ -22,8 +22,8 @@ service: targetport: 8001 strategy: type: RollingUpdate - maxsurge: {{ apimanager_maxsurge|default(1) }} - maxunavailable: {{ apimanager_maxunavailable|default }} + maxsurge: {{ apimanager_maxsurge|default('10%') }} + maxunavailable: {{ apimanager_maxunavailable|default('10%') }} {{ apimanager_liveness_readiness | to_nice_yaml }} diff --git a/kubernetes/helm_charts/core/assessment/templates/deployment.yaml b/kubernetes/helm_charts/core/assessment/templates/deployment.yaml index fd4ed0098..0a2df5d27 100644 --- a/kubernetes/helm_charts/core/assessment/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/assessment/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/assessment/values.j2 b/kubernetes/helm_charts/core/assessment/values.j2 index ecbeda4b7..57e5ad4e6 100644 --- a/kubernetes/helm_charts/core/assessment/values.j2 +++ b/kubernetes/helm_charts/core/assessment/values.j2 @@ -20,7 +20,7 @@ network: port: 9000 strategy: type: RollingUpdate - maxsurge: {{ assessment_maxsurge|default(1) }} - maxunavailable: {{ assessment_maxunavailable|default }} + maxsurge: {{ assessment_maxsurge|default('10%') }} + maxunavailable: {{ assessment_maxunavailable|default('10%') }} {{ assessment_liveness_readiness | to_nice_yaml }} diff --git a/kubernetes/helm_charts/core/badger/templates/deployment.yaml b/kubernetes/helm_charts/core/badger/templates/deployment.yaml index 50ff30e9c..b3fbc36ca 100755 --- a/kubernetes/helm_charts/core/badger/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/badger/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/badger/values.j2 b/kubernetes/helm_charts/core/badger/values.j2 index cf01e75a1..bcdfa9946 100755 --- a/kubernetes/helm_charts/core/badger/values.j2 +++ b/kubernetes/helm_charts/core/badger/values.j2 @@ -19,7 +19,7 @@ network: targetport: 8004 strategy: type: RollingUpdate - maxsurge: {{ badger_maxsurge|default(1) }} - maxunavailable: {{ badger_maxunavailable|default }} + maxsurge: {{ badger_maxsurge|default('10%') }} + maxunavailable: {{ badger_maxunavailable|default('10%') }} -{{ badger_liveness_readiness | to_nice_yaml }} \ No newline at end of file +{{ badger_liveness_readiness | to_nice_yaml }} diff --git a/kubernetes/helm_charts/core/cert/templates/deployment.yaml b/kubernetes/helm_charts/core/cert/templates/deployment.yaml index 13c47c4b8..522e7f3fd 100644 --- a/kubernetes/helm_charts/core/cert/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/cert/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/cert/values.j2 b/kubernetes/helm_charts/core/cert/values.j2 index d96257857..7bf966e8d 100644 --- a/kubernetes/helm_charts/core/cert/values.j2 +++ b/kubernetes/helm_charts/core/cert/values.j2 @@ -19,7 +19,7 @@ network: targetport: 9000 strategy: type: RollingUpdate - maxsurge: {{ cert_maxsurge|default(1) }} - maxunavailable: {{ cert_maxunavailable|default }} + maxsurge: {{ cert_maxsurge|default('10%') }} + maxunavailable: {{ cert_maxunavailable|default('10%') }} {{ cert_liveness_readiness | to_nice_yaml }} diff --git a/kubernetes/helm_charts/core/certregistry/templates/deployment.yaml b/kubernetes/helm_charts/core/certregistry/templates/deployment.yaml index 6c39784c4..ce025b525 100644 --- a/kubernetes/helm_charts/core/certregistry/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/certregistry/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/certregistry/values.j2 b/kubernetes/helm_charts/core/certregistry/values.j2 index ceac100da..beed210b6 100644 --- a/kubernetes/helm_charts/core/certregistry/values.j2 +++ b/kubernetes/helm_charts/core/certregistry/values.j2 @@ -19,7 +19,7 @@ network: targetport: 9000 strategy: type: RollingUpdate - maxsurge: {{ certregistry_maxsurge|default(1) }} - maxunavailable: {{ certregistry_maxunavailable|default }} + maxsurge: {{ certregistry_maxsurge|default('10%') }} + maxunavailable: {{ certregistry_maxunavailable|default('10%') }} {{ cert_liveness_readiness | to_nice_yaml }} diff --git a/kubernetes/helm_charts/core/content/templates/deployment.yaml b/kubernetes/helm_charts/core/content/templates/deployment.yaml index 693a9c6f0..714521a20 100644 --- a/kubernetes/helm_charts/core/content/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/content/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/content/values.j2 b/kubernetes/helm_charts/core/content/values.j2 index 6b529ffc0..911ddcbfa 100644 --- a/kubernetes/helm_charts/core/content/values.j2 +++ b/kubernetes/helm_charts/core/content/values.j2 @@ -22,7 +22,7 @@ network: targetport: 9000 strategy: type: RollingUpdate - maxsurge: {{ content_maxsurge|default(1) }} - maxunavailable: {{ content_maxunavailable|default }} + maxsurge: {{ content_maxsurge|default('10%') }} + maxunavailable: {{ content_maxunavailable|default('10%') }} {{ content_liveness_readiness | to_nice_yaml }} diff --git a/kubernetes/helm_charts/core/enc/templates/deployment.yaml b/kubernetes/helm_charts/core/enc/templates/deployment.yaml index b090a0bf0..731699890 100644 --- a/kubernetes/helm_charts/core/enc/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/enc/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/enc/values.j2 b/kubernetes/helm_charts/core/enc/values.j2 index 96ea37e32..bf44d48b3 100644 --- a/kubernetes/helm_charts/core/enc/values.j2 +++ b/kubernetes/helm_charts/core/enc/values.j2 @@ -19,7 +19,7 @@ network: targetport: 8013 strategy: type: RollingUpdate - maxsurge: {{ enc_maxsurge|default(1) }} - maxunavailable: {{ enc_maxunavailable|default }} + maxsurge: {{ enc_maxsurge|default('10%') }} + maxunavailable: {{ enc_maxunavailable|default('10%') }} {{ enc_liveness_readiness | to_nice_yaml }} diff --git a/kubernetes/helm_charts/core/knowledgemw/templates/deployment.yaml b/kubernetes/helm_charts/core/knowledgemw/templates/deployment.yaml index 9b54cd71c..78442e62a 100644 --- a/kubernetes/helm_charts/core/knowledgemw/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/knowledgemw/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/knowledgemw/values.j2 b/kubernetes/helm_charts/core/knowledgemw/values.j2 index 884fe8305..76d2d8408 100644 --- a/kubernetes/helm_charts/core/knowledgemw/values.j2 +++ b/kubernetes/helm_charts/core/knowledgemw/values.j2 @@ -19,7 +19,7 @@ network: targetport: 5000 strategy: type: RollingUpdate - maxsurge: {{ knowledge_mw_maxsurge|default(1) }} - maxunavailable: {{ knowledge_mw_maxunavailable|default }} + maxsurge: {{ knowledge_mw_maxsurge|default('10%') }} + maxunavailable: {{ knowledge_mw_maxunavailable|default('10%') }} {{ knowledgemw_liveness_readiness | to_nice_yaml }} diff --git a/kubernetes/helm_charts/core/learner/templates/deployment.yaml b/kubernetes/helm_charts/core/learner/templates/deployment.yaml index 72c620612..d4badb8f3 100644 --- a/kubernetes/helm_charts/core/learner/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/learner/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/learner/values.j2 b/kubernetes/helm_charts/core/learner/values.j2 index 4d1a3dfef..f5574aefb 100644 --- a/kubernetes/helm_charts/core/learner/values.j2 +++ b/kubernetes/helm_charts/core/learner/values.j2 @@ -23,7 +23,7 @@ network: targetport: 9000 strategy: type: RollingUpdate - maxsurge: {{ learner_maxsurge|default(1) }} - maxunavailable: {{ learner_maxunavailable|default }} + maxsurge: {{ learner_maxsurge|default('10%') }} + maxunavailable: {{ learner_maxunavailable|default('10%') }} {{ learner_liveness_readiness | to_nice_yaml }} diff --git a/kubernetes/helm_charts/core/lms/templates/deployment.yaml b/kubernetes/helm_charts/core/lms/templates/deployment.yaml index 72c620612..d4badb8f3 100644 --- a/kubernetes/helm_charts/core/lms/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/lms/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/lms/values.j2 b/kubernetes/helm_charts/core/lms/values.j2 index 5245883f1..02125e1f3 100644 --- a/kubernetes/helm_charts/core/lms/values.j2 +++ b/kubernetes/helm_charts/core/lms/values.j2 @@ -23,7 +23,7 @@ network: targetport: 9000 strategy: type: RollingUpdate - maxsurge: {{ lms_maxsurge|default(1) }} - maxunavailable: {{ lms_maxunavailable|default }} + maxsurge: {{ lms_maxsurge|default('10%') }} + maxunavailable: {{ lms_maxunavailable|default('10%') }} {{ lms_liveness_readiness | to_nice_yaml }} diff --git a/kubernetes/helm_charts/core/notification/templates/deployment.yaml b/kubernetes/helm_charts/core/notification/templates/deployment.yaml index 13685096d..a82590540 100644 --- a/kubernetes/helm_charts/core/notification/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/notification/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/notification/values.j2 b/kubernetes/helm_charts/core/notification/values.j2 index 91bf800a4..3ec22ccf5 100644 --- a/kubernetes/helm_charts/core/notification/values.j2 +++ b/kubernetes/helm_charts/core/notification/values.j2 @@ -19,8 +19,8 @@ network: targetport: 9000 strategy: type: RollingUpdate - maxsurge: {{ notification_maxsurge|default(1) }} - maxunavailable: {{ notification_maxunavailable|default }} + maxsurge: {{ notification_maxsurge|default('10%') }} + maxunavailable: {{ notification_maxunavailable|default('10%') }} notification: readinessprobe: diff --git a/kubernetes/helm_charts/core/player/templates/deployment.yaml b/kubernetes/helm_charts/core/player/templates/deployment.yaml index 8925debbe..e83cd8204 100644 --- a/kubernetes/helm_charts/core/player/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/player/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/player/values.j2 b/kubernetes/helm_charts/core/player/values.j2 index 871b08a36..1622e5d15 100644 --- a/kubernetes/helm_charts/core/player/values.j2 +++ b/kubernetes/helm_charts/core/player/values.j2 @@ -19,8 +19,8 @@ network: targetport: 3000 strategy: type: RollingUpdate - maxsurge: {{ player_maxsurge|default(1) }} - maxunavailable: {{ player_maxunavailable|default }} + maxsurge: {{ player_maxsurge|default('10%') }} + maxunavailable: {{ player_maxunavailable|default('10%') }} sunbird_portal_player_cdn_enabled: {{sunbird_portal_player_cdn_enabled|lower}} diff --git a/kubernetes/helm_charts/core/print/templates/deployment.yaml b/kubernetes/helm_charts/core/print/templates/deployment.yaml index 55cee3cc9..11be85131 100644 --- a/kubernetes/helm_charts/core/print/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/print/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/print/values.j2 b/kubernetes/helm_charts/core/print/values.j2 index 1585f49f0..71ce888c4 100644 --- a/kubernetes/helm_charts/core/print/values.j2 +++ b/kubernetes/helm_charts/core/print/values.j2 @@ -20,7 +20,7 @@ network: port: 5000 strategy: type: RollingUpdate - maxsurge: {{ print_maxsurge|default(1) }} - maxunavailable: {{ print_maxunavailable|default }} + maxsurge: {{ print_maxsurge|default('10%') }} + maxunavailable: {{ print_maxunavailable|default('10%') }} -{{ print_liveness_readiness | to_nice_yaml }} \ No newline at end of file +{{ print_liveness_readiness | to_nice_yaml }} diff --git a/kubernetes/helm_charts/core/report/templates/deployment.yaml b/kubernetes/helm_charts/core/report/templates/deployment.yaml index 13685096d..a82590540 100644 --- a/kubernetes/helm_charts/core/report/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/report/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/report/values.j2 b/kubernetes/helm_charts/core/report/values.j2 index de0f0c86a..2c4e1b795 100644 --- a/kubernetes/helm_charts/core/report/values.j2 +++ b/kubernetes/helm_charts/core/report/values.j2 @@ -20,7 +20,7 @@ network: targetport: 3030 strategy: type: RollingUpdate - maxsurge: {{ report_maxsurge|default(1) }} - maxunavailable: {{ report_maxunavailable|default }} + maxsurge: {{ report_maxsurge|default('10%') }} + maxunavailable: {{ report_maxunavailable|default('10%') }} {{ report_liveness_readiness | to_nice_yaml }} diff --git a/kubernetes/helm_charts/core/search/templates/deployment.yaml b/kubernetes/helm_charts/core/search/templates/deployment.yaml index 8675321f3..34293c1af 100644 --- a/kubernetes/helm_charts/core/search/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/search/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/search/values.j2 b/kubernetes/helm_charts/core/search/values.j2 index 17270ebb6..61e80acdd 100644 --- a/kubernetes/helm_charts/core/search/values.j2 +++ b/kubernetes/helm_charts/core/search/values.j2 @@ -22,7 +22,7 @@ network: targetport: 9000 strategy: type: RollingUpdate - maxsurge: {{ search_maxsurge|default(1) }} - maxunavailable: {{ search_maxunavailable|default }} + maxsurge: {{ search_maxsurge|default('10%') }} + maxunavailable: {{ search_maxunavailable|default('10%') }} {{ search_liveness_readiness | to_nice_yaml }} diff --git a/kubernetes/helm_charts/core/taxonomy/templates/deployment.yaml b/kubernetes/helm_charts/core/taxonomy/templates/deployment.yaml index 8b2900057..67b8a8af1 100644 --- a/kubernetes/helm_charts/core/taxonomy/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/taxonomy/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/taxonomy/values.j2 b/kubernetes/helm_charts/core/taxonomy/values.j2 index 1c473b61f..2a9df4cb3 100644 --- a/kubernetes/helm_charts/core/taxonomy/values.j2 +++ b/kubernetes/helm_charts/core/taxonomy/values.j2 @@ -19,7 +19,7 @@ network: targetport: 9000 strategy: type: RollingUpdate - maxsurge: {{ taxonomy_maxsurge|default(1) }} - maxunavailable: {{ taxonomy_maxunavailable|default }} + maxsurge: {{ taxonomy_maxsurge|default('10%') }} + maxunavailable: {{ taxonomy_maxunavailable|default('10%') }} {{ taxonomy_liveness_readiness | to_nice_yaml }} diff --git a/kubernetes/helm_charts/core/telemetry-dp-logstash/templates/deployment.yaml b/kubernetes/helm_charts/core/telemetry-dp-logstash/templates/deployment.yaml index cedc0aa4b..6f584f7d2 100644 --- a/kubernetes/helm_charts/core/telemetry-dp-logstash/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/telemetry-dp-logstash/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Release.Name }} diff --git a/kubernetes/helm_charts/core/telemetry-dp-logstash/values.j2 b/kubernetes/helm_charts/core/telemetry-dp-logstash/values.j2 index 6a611c5ef..d16cb524a 100644 --- a/kubernetes/helm_charts/core/telemetry-dp-logstash/values.j2 +++ b/kubernetes/helm_charts/core/telemetry-dp-logstash/values.j2 @@ -19,5 +19,5 @@ network: targetport: 5044 strategy: type: RollingUpdate - maxsurge: 1 - maxunavailable: 1 + maxsurge: {{ telemetry_logstash_maxsurge|default('10%') }} + maxunavailable: {{ telemetry_logstash_maxunavailable|default('10%') }} diff --git a/kubernetes/helm_charts/core/telemetry/templates/deployment.yaml b/kubernetes/helm_charts/core/telemetry/templates/deployment.yaml index 13685096d..a82590540 100644 --- a/kubernetes/helm_charts/core/telemetry/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/telemetry/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/telemetrydplogstash/values.j2 b/kubernetes/helm_charts/core/telemetrydplogstash/values.j2 index 6a611c5ef..d16cb524a 100644 --- a/kubernetes/helm_charts/core/telemetrydplogstash/values.j2 +++ b/kubernetes/helm_charts/core/telemetrydplogstash/values.j2 @@ -19,5 +19,5 @@ network: targetport: 5044 strategy: type: RollingUpdate - maxsurge: 1 - maxunavailable: 1 + maxsurge: {{ telemetry_logstash_maxsurge|default('10%') }} + maxunavailable: {{ telemetry_logstash_maxunavailable|default('10%') }} diff --git a/kubernetes/helm_charts/core/userorg/templates/deployment.yaml b/kubernetes/helm_charts/core/userorg/templates/deployment.yaml index 6823feff6..d3f83edaf 100644 --- a/kubernetes/helm_charts/core/userorg/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/userorg/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: strategy: rollingUpdate: maxSurge: {{ .Values.strategy.maxsurge }} - maxUnavailable: {{ default (sub .Values.replicaCount 1) .Values.strategy.maxunavailable }} + maxUnavailable: {{ .Values.strategy.maxunavailable }} selector: matchLabels: app: {{ .Chart.Name }} diff --git a/kubernetes/helm_charts/core/userorg/values.j2 b/kubernetes/helm_charts/core/userorg/values.j2 index 3c06decd6..c0b9216c0 100644 --- a/kubernetes/helm_charts/core/userorg/values.j2 +++ b/kubernetes/helm_charts/core/userorg/values.j2 @@ -19,7 +19,7 @@ network: targetport: 9000 strategy: type: RollingUpdate - maxsurge: {{ userorg_maxsurge|default(1) }} - maxunavailable: {{ userorg_maxunavailable|default }} + maxsurge: {{ userorg_maxsurge|default('10%') }} + maxunavailable: {{ userorg_maxunavailable|default('10%') }} {{ userorg_liveness_readiness | to_nice_yaml }} From 5072eef3236addaf48d18caf818b4d25d849e412 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Sat, 23 May 2020 09:46:02 +0530 Subject: [PATCH 2445/2894] pointing nginx dashboard to Prometheus (#1508) --- .../dashboards/dashboards/api-manager.json | 21 ++++++++++--------- .../dashboards/dashboards/nginx.json | 12 +++++------ 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/kubernetes/helm_charts/monitoring/dashboards/dashboards/api-manager.json b/kubernetes/helm_charts/monitoring/dashboards/dashboards/api-manager.json index a1d92e1f5..16f5e577a 100644 --- a/kubernetes/helm_charts/monitoring/dashboards/dashboards/api-manager.json +++ b/kubernetes/helm_charts/monitoring/dashboards/dashboards/api-manager.json @@ -15,7 +15,8 @@ "editable": true, "gnetId": null, "graphTooltip": 0, - "iteration": 1580964114474, + "id": 16, + "iteration": 1590206027276, "links": [], "panels": [ { @@ -38,7 +39,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "prom-fed", + "datasource": "Prometheus", "fill": 1, "fillGradient": 0, "gridPos": { @@ -151,7 +152,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "prom-fed", + "datasource": "Prometheus", "fill": 1, "fillGradient": 0, "gridPos": { @@ -247,7 +248,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "prom-fed", + "datasource": "Prometheus", "fill": 1, "fillGradient": 0, "gridPos": { @@ -358,7 +359,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "prom-fed", + "datasource": "Prometheus", "fill": 1, "fillGradient": 0, "gridPos": { @@ -454,7 +455,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "prom-fed", + "datasource": "Prometheus", "fill": 1, "fillGradient": 0, "gridPos": { @@ -550,7 +551,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "prom-fed", + "datasource": "Prometheus", "fill": 1, "fillGradient": 0, "gridPos": { @@ -646,7 +647,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "prom-fed", + "datasource": "Prometheus", "fill": 1, "fillGradient": 0, "gridPos": { @@ -766,7 +767,7 @@ "text": "All", "value": "$__all" }, - "datasource": "prom-fed", + "datasource": "Prometheus", "definition": "label_values(kong_request_count, cluster)", "hide": 0, "includeAll": true, @@ -793,7 +794,7 @@ "$__all" ] }, - "datasource": "prom-fed", + "datasource": "Prometheus", "definition": "label_values(kong_request_count,api)", "hide": 0, "includeAll": true, diff --git a/kubernetes/helm_charts/monitoring/dashboards/dashboards/nginx.json b/kubernetes/helm_charts/monitoring/dashboards/dashboards/nginx.json index 96d214b86..38f9fa37e 100644 --- a/kubernetes/helm_charts/monitoring/dashboards/dashboards/nginx.json +++ b/kubernetes/helm_charts/monitoring/dashboards/dashboards/nginx.json @@ -18,7 +18,7 @@ "gnetId": null, "graphTooltip": 0, "id": 34, - "iteration": 1587017663915, + "iteration": 1590207136361, "links": [], "panels": [ { @@ -26,7 +26,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "prom-fed", + "datasource": "Prometheus", "decimals": null, "fill": 1, "fillGradient": 0, @@ -121,7 +121,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "prom-fed", + "datasource": "Prometheus", "fill": 1, "fillGradient": 0, "gridPos": { @@ -219,7 +219,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "prom-fed", + "datasource": "Prometheus", "fill": 1, "fillGradient": 0, "gridPos": { @@ -324,7 +324,7 @@ "text": "All", "value": "$__all" }, - "datasource": "prom-fed", + "datasource": "Prometheus", "definition": "label_values(nginx_http_requests_total, cluster)", "hide": 0, "includeAll": true, @@ -377,5 +377,5 @@ "timezone": "", "title": "NGINX", "uid": "0000000025", - "version": 1 + "version": 2 } From 1dd8ab37ace100fadd88c6b91eda94afca054505 Mon Sep 17 00:00:00 2001 From: Harikumar Palemkota Date: Mon, 25 May 2020 11:55:16 +0530 Subject: [PATCH 2446/2894] Issue #SH-162 added create v4 for managedBy users purpose --- ansible/roles/kong-api/defaults/main.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ansible/roles/kong-api/defaults/main.yml b/ansible/roles/kong-api/defaults/main.yml index 29ff2f0e9..86e886247 100644 --- a/ansible/roles/kong-api/defaults/main.yml +++ b/ansible/roles/kong-api/defaults/main.yml @@ -1018,6 +1018,24 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" + - name: createUserVersion3 + request_path: "{{ user_service_prefix }}/v4/create" + upstream_url: "{{ learning_service_url }}/v4/user/create" + strip_request_path: 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: deleteBadgeClass request_path: "{{ badge_service_prefix }}/v1/issuer/badge/delete" upstream_url: "{{ learning_service_url }}/v1/issuer/badge/delete" From 189ff2c371f72b1e813339df2e9b525d348e82f5 Mon Sep 17 00:00:00 2001 From: Harikumar Palemkota Date: Mon, 25 May 2020 11:57:58 +0530 Subject: [PATCH 2447/2894] Issue #SH-162 added create v4 for managedBy users purpose --- ansible/roles/kong-api/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/kong-api/defaults/main.yml b/ansible/roles/kong-api/defaults/main.yml index 86e886247..8eb0faffb 100644 --- a/ansible/roles/kong-api/defaults/main.yml +++ b/ansible/roles/kong-api/defaults/main.yml @@ -1018,7 +1018,7 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" - - name: createUserVersion3 + - name: createUserVersion4 request_path: "{{ user_service_prefix }}/v4/create" upstream_url: "{{ learning_service_url }}/v4/user/create" strip_request_path: true From 31524c9ff2d9e183e9103efdb5aedcc0746bd47c Mon Sep 17 00:00:00 2001 From: Hari-stackroute <40484996+Hari-stackroute@users.noreply.github.com> Date: Mon, 25 May 2020 12:11:37 +0530 Subject: [PATCH 2448/2894] Update main.yml removed white space --- ansible/roles/kong-api/defaults/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/kong-api/defaults/main.yml b/ansible/roles/kong-api/defaults/main.yml index 8eb0faffb..ce83dff20 100644 --- a/ansible/roles/kong-api/defaults/main.yml +++ b/ansible/roles/kong-api/defaults/main.yml @@ -1017,8 +1017,8 @@ kong_apis: config.limit_by: credential - name: request-size-limiting config.allowed_payload_size: "{{ small_request_size_limit }}" - - - name: createUserVersion4 + + - name: createUserVersion4 request_path: "{{ user_service_prefix }}/v4/create" upstream_url: "{{ learning_service_url }}/v4/user/create" strip_request_path: true From 1eff81dd3dce4b3e20e330e12eb45b53a75439bc Mon Sep 17 00:00:00 2001 From: Hari-stackroute <40484996+Hari-stackroute@users.noreply.github.com> Date: Mon, 25 May 2020 16:41:52 +0530 Subject: [PATCH 2449/2894] Update main.yml updated the config.whitelist with userAccess --- ansible/roles/kong-api/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/kong-api/defaults/main.yml b/ansible/roles/kong-api/defaults/main.yml index ce83dff20..26f08e899 100644 --- a/ansible/roles/kong-api/defaults/main.yml +++ b/ansible/roles/kong-api/defaults/main.yml @@ -1028,7 +1028,7 @@ kong_apis: - "{{ statsd_pulgin }}" - name: acl config.whitelist: - - 'userCreate' + - 'userAccess' - name: rate-limiting config.policy: local config.hour: "{{ medium_rate_limit_per_hour }}" From 7ed07440710bf985a152f12cdf79ae58e6509901 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Tue, 26 May 2020 13:00:49 +0530 Subject: [PATCH 2450/2894] Removing force installation of helm charts for monitoring This was the reason for redis-exporter was complaining clusterIP is immutable Signed-off-by: Rajesh Rajendran --- kubernetes/ansible/roles/sunbird-monitoring/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kubernetes/ansible/roles/sunbird-monitoring/tasks/main.yml b/kubernetes/ansible/roles/sunbird-monitoring/tasks/main.yml index 83172fb90..4f1ddad62 100644 --- a/kubernetes/ansible/roles/sunbird-monitoring/tasks/main.yml +++ b/kubernetes/ansible/roles/sunbird-monitoring/tasks/main.yml @@ -7,7 +7,7 @@ with_items: "{{ monitoring_stack }}" - name: Creating sunbird monitoring stack - shell: "helm upgrade --install --force --cleanup-on-fail {{ item }} {{chart_path}}/{{ item }} --namespace monitoring -f /tmp/{{ item }}.yaml" + shell: "helm upgrade --install --cleanup-on-fail {{ item }} {{chart_path}}/{{ item }} --namespace monitoring -f /tmp/{{ item }}.yaml" with_items: "{{ monitoring_stack }}" - name: Creating sunbird monitoring grafana dashboards @@ -16,6 +16,6 @@ - dashboards - name: Install statsd-exporter - shell: "helm upgrade --install --force --cleanup-on-fail statsd-exporter {{chart_path}}/statsd-exporter --namespace {{ namespace }}" + shell: "helm upgrade --install --cleanup-on-fail statsd-exporter {{chart_path}}/statsd-exporter --namespace {{ namespace }}" tags: - statsd-exporter From ee12291716156bb9cc1c298e969a68e1e53d88f9 Mon Sep 17 00:00:00 2001 From: Amit Priyadarshi Date: Tue, 26 May 2020 14:51:16 +0530 Subject: [PATCH 2451/2894] SH-9: Enable autogeneration of Course from textbook - Mapping change from middleware to lms (#1477) * Issue #SH-9 feat: Enable autogeneration of Course from textbook * Issue #SH-9 feat: Enable autogeneration of Course from textbook --- ansible/roles/kong-api/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/kong-api/defaults/main.yml b/ansible/roles/kong-api/defaults/main.yml index 26f08e899..e7d09d18c 100644 --- a/ansible/roles/kong-api/defaults/main.yml +++ b/ansible/roles/kong-api/defaults/main.yml @@ -660,7 +660,7 @@ kong_apis: - name: createCourse request_path: "{{ course_service_prefix }}/v1/create" - upstream_url: "{{ knowledge_mw_service_url }}/v1/course/create" + upstream_url: "{{ lms_service_url }}/v1/course/create" strip_request_path: true plugins: - name: jwt From 3ab63769137e9c5ac4d37f3b0aa35613e0fc60c6 Mon Sep 17 00:00:00 2001 From: Harsha Date: Tue, 26 May 2020 15:27:31 +0530 Subject: [PATCH 2452/2894] Issue #00 fix: increase atomic timeout value for helm install (#1512) --- kubernetes/ansible/roles/deploy-badger/tasks/main.yml | 2 +- kubernetes/ansible/roles/deploy-player/tasks/main.yml | 2 +- kubernetes/ansible/roles/helm-daemonset/tasks/main.yml | 2 +- kubernetes/ansible/roles/helm-deploy/tasks/main.yml | 2 +- kubernetes/ansible/roles/proxy/tasks/main.yml | 2 +- kubernetes/ansible/roles/sunbird-deploy/tasks/main.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/kubernetes/ansible/roles/deploy-badger/tasks/main.yml b/kubernetes/ansible/roles/deploy-badger/tasks/main.yml index 65fa69a6f..0329cca7f 100644 --- a/kubernetes/ansible/roles/deploy-badger/tasks/main.yml +++ b/kubernetes/ansible/roles/deploy-badger/tasks/main.yml @@ -10,7 +10,7 @@ dest: "{{ chart_path }}/templates/configmap.yaml" - name: helm install - shell: helm upgrade --install --atomic {{ release_name }} {{ chart_path }} -n {{ namespace }} + shell: helm upgrade --install --atomic timeout 10m {{ release_name }} {{ chart_path }} -n {{ namespace }} - name: Copying user creation template template: diff --git a/kubernetes/ansible/roles/deploy-player/tasks/main.yml b/kubernetes/ansible/roles/deploy-player/tasks/main.yml index b39ec0c99..314c6f07c 100644 --- a/kubernetes/ansible/roles/deploy-player/tasks/main.yml +++ b/kubernetes/ansible/roles/deploy-player/tasks/main.yml @@ -33,7 +33,7 @@ shell: "kubectl create configmap player-config --from-env-file={{role_path}}/templates/{{ release_name }}.env -n {{namespace}} --dry-run -o=yaml | kubectl apply -f -" - name: helm install and upgrade - shell: helm upgrade --install --atomic {{ release_name }} {{ chart_path }} -n {{namespace}} + shell: helm upgrade --install --atomic timeoout 10m {{ release_name }} {{ chart_path }} -n {{namespace}} - name: Get the deployment rollout status shell: "kubectl get deployments -A | grep -i {{ release_name }} | awk -F' ' '{print $3}' | awk -F/ '{if ($1 ~ $2){exit 0} else {exit 1}}'" diff --git a/kubernetes/ansible/roles/helm-daemonset/tasks/main.yml b/kubernetes/ansible/roles/helm-daemonset/tasks/main.yml index 4017f7354..17ffcf088 100644 --- a/kubernetes/ansible/roles/helm-daemonset/tasks/main.yml +++ b/kubernetes/ansible/roles/helm-daemonset/tasks/main.yml @@ -15,7 +15,7 @@ dest: "{{ chart_path }}/values.yaml" - name: helm install - shell: helm upgrade --install --atomic {{ release_name }} {{ chart_path }} -n {{namespace}} + shell: helm upgrade --install --atomic timeout 10m {{ release_name }} {{ chart_path }} -n {{namespace}} - name: Get the deployment rollout status shell: "kubectl get daemonsets -A | grep -i {{ release_name }} | awk -F' ' '{if ($3 ~ $6){exit 0} else {exit 1}}'" diff --git a/kubernetes/ansible/roles/helm-deploy/tasks/main.yml b/kubernetes/ansible/roles/helm-deploy/tasks/main.yml index cc6446a4d..18e0bc2a4 100644 --- a/kubernetes/ansible/roles/helm-deploy/tasks/main.yml +++ b/kubernetes/ansible/roles/helm-deploy/tasks/main.yml @@ -15,7 +15,7 @@ dest: "{{ chart_path }}/values.yaml" - name: helm install - shell: helm upgrade --install --atomic {{ release_name }} {{ chart_path }} -n {{namespace}} + shell: helm upgrade --install --atomic timeout 10m {{ release_name }} {{ chart_path }} -n {{namespace}} - name: Get the deployment rollout status shell: "kubectl get deployments -A | grep -i {{ release_name }} | if [[ $(wc -l) > 0 ]]; then awk '{print $3}' | awk -F/ '{if ($1 ~ $2){exit 0} else {exit 1}}'; else exit 1; fi" diff --git a/kubernetes/ansible/roles/proxy/tasks/main.yml b/kubernetes/ansible/roles/proxy/tasks/main.yml index b57407e94..1fa1d729c 100644 --- a/kubernetes/ansible/roles/proxy/tasks/main.yml +++ b/kubernetes/ansible/roles/proxy/tasks/main.yml @@ -45,5 +45,5 @@ dest: "{{ chart_path }}/values.yaml" - name: helm install - shell: helm upgrade --install --atomic --force {{ release_name }} {{ chart_path }} -n {{namespace}} + shell: helm upgrade --install --atomic timeout 10m --force {{ release_name }} {{ chart_path }} -n {{namespace}} diff --git a/kubernetes/ansible/roles/sunbird-deploy/tasks/main.yml b/kubernetes/ansible/roles/sunbird-deploy/tasks/main.yml index f5099852b..c6c9fad95 100644 --- a/kubernetes/ansible/roles/sunbird-deploy/tasks/main.yml +++ b/kubernetes/ansible/roles/sunbird-deploy/tasks/main.yml @@ -19,7 +19,7 @@ shell: find "{{role_path}}/templates/" -iname "*.xml" -exec /bin/bash -c "ls {}; kubectl create configmap {{ release_name }}-xml-config --from-file={} -n {{namespace}} --dry-run -o=yaml | kubectl apply -f - " \; - name: helm upgrade - shell: helm upgrade --install --atomic {{ release_name }} {{ chart_path }} -n {{namespace}} + shell: helm upgrade --install --atomic timeout 10m {{ release_name }} {{ chart_path }} -n {{namespace}} - name: Get the deployment rollout status shell: "kubectl get deployments -A | grep -i {{ release_name }} | awk -F' ' '{print $3}' | awk -F/ '{if ($1 ~ $2){exit 0} else {exit 1}}'" From 09000b5c597d8a0ebebbc4ada972635c809483f7 Mon Sep 17 00:00:00 2001 From: harshavardhanc Date: Tue, 26 May 2020 15:13:11 +0530 Subject: [PATCH 2453/2894] Issue #00 fix: increase atomic timeout value for helm install --- kubernetes/ansible/roles/deploy-badger/tasks/main.yml | 2 +- kubernetes/ansible/roles/deploy-player/tasks/main.yml | 2 +- kubernetes/ansible/roles/helm-daemonset/tasks/main.yml | 2 +- kubernetes/ansible/roles/helm-deploy/tasks/main.yml | 2 +- kubernetes/ansible/roles/proxy/tasks/main.yml | 2 +- kubernetes/ansible/roles/sunbird-deploy/tasks/main.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/kubernetes/ansible/roles/deploy-badger/tasks/main.yml b/kubernetes/ansible/roles/deploy-badger/tasks/main.yml index 65fa69a6f..0329cca7f 100644 --- a/kubernetes/ansible/roles/deploy-badger/tasks/main.yml +++ b/kubernetes/ansible/roles/deploy-badger/tasks/main.yml @@ -10,7 +10,7 @@ dest: "{{ chart_path }}/templates/configmap.yaml" - name: helm install - shell: helm upgrade --install --atomic {{ release_name }} {{ chart_path }} -n {{ namespace }} + shell: helm upgrade --install --atomic timeout 10m {{ release_name }} {{ chart_path }} -n {{ namespace }} - name: Copying user creation template template: diff --git a/kubernetes/ansible/roles/deploy-player/tasks/main.yml b/kubernetes/ansible/roles/deploy-player/tasks/main.yml index b39ec0c99..314c6f07c 100644 --- a/kubernetes/ansible/roles/deploy-player/tasks/main.yml +++ b/kubernetes/ansible/roles/deploy-player/tasks/main.yml @@ -33,7 +33,7 @@ shell: "kubectl create configmap player-config --from-env-file={{role_path}}/templates/{{ release_name }}.env -n {{namespace}} --dry-run -o=yaml | kubectl apply -f -" - name: helm install and upgrade - shell: helm upgrade --install --atomic {{ release_name }} {{ chart_path }} -n {{namespace}} + shell: helm upgrade --install --atomic timeoout 10m {{ release_name }} {{ chart_path }} -n {{namespace}} - name: Get the deployment rollout status shell: "kubectl get deployments -A | grep -i {{ release_name }} | awk -F' ' '{print $3}' | awk -F/ '{if ($1 ~ $2){exit 0} else {exit 1}}'" diff --git a/kubernetes/ansible/roles/helm-daemonset/tasks/main.yml b/kubernetes/ansible/roles/helm-daemonset/tasks/main.yml index 4017f7354..17ffcf088 100644 --- a/kubernetes/ansible/roles/helm-daemonset/tasks/main.yml +++ b/kubernetes/ansible/roles/helm-daemonset/tasks/main.yml @@ -15,7 +15,7 @@ dest: "{{ chart_path }}/values.yaml" - name: helm install - shell: helm upgrade --install --atomic {{ release_name }} {{ chart_path }} -n {{namespace}} + shell: helm upgrade --install --atomic timeout 10m {{ release_name }} {{ chart_path }} -n {{namespace}} - name: Get the deployment rollout status shell: "kubectl get daemonsets -A | grep -i {{ release_name }} | awk -F' ' '{if ($3 ~ $6){exit 0} else {exit 1}}'" diff --git a/kubernetes/ansible/roles/helm-deploy/tasks/main.yml b/kubernetes/ansible/roles/helm-deploy/tasks/main.yml index cc6446a4d..18e0bc2a4 100644 --- a/kubernetes/ansible/roles/helm-deploy/tasks/main.yml +++ b/kubernetes/ansible/roles/helm-deploy/tasks/main.yml @@ -15,7 +15,7 @@ dest: "{{ chart_path }}/values.yaml" - name: helm install - shell: helm upgrade --install --atomic {{ release_name }} {{ chart_path }} -n {{namespace}} + shell: helm upgrade --install --atomic timeout 10m {{ release_name }} {{ chart_path }} -n {{namespace}} - name: Get the deployment rollout status shell: "kubectl get deployments -A | grep -i {{ release_name }} | if [[ $(wc -l) > 0 ]]; then awk '{print $3}' | awk -F/ '{if ($1 ~ $2){exit 0} else {exit 1}}'; else exit 1; fi" diff --git a/kubernetes/ansible/roles/proxy/tasks/main.yml b/kubernetes/ansible/roles/proxy/tasks/main.yml index b57407e94..1fa1d729c 100644 --- a/kubernetes/ansible/roles/proxy/tasks/main.yml +++ b/kubernetes/ansible/roles/proxy/tasks/main.yml @@ -45,5 +45,5 @@ dest: "{{ chart_path }}/values.yaml" - name: helm install - shell: helm upgrade --install --atomic --force {{ release_name }} {{ chart_path }} -n {{namespace}} + shell: helm upgrade --install --atomic timeout 10m --force {{ release_name }} {{ chart_path }} -n {{namespace}} diff --git a/kubernetes/ansible/roles/sunbird-deploy/tasks/main.yml b/kubernetes/ansible/roles/sunbird-deploy/tasks/main.yml index f5099852b..c6c9fad95 100644 --- a/kubernetes/ansible/roles/sunbird-deploy/tasks/main.yml +++ b/kubernetes/ansible/roles/sunbird-deploy/tasks/main.yml @@ -19,7 +19,7 @@ shell: find "{{role_path}}/templates/" -iname "*.xml" -exec /bin/bash -c "ls {}; kubectl create configmap {{ release_name }}-xml-config --from-file={} -n {{namespace}} --dry-run -o=yaml | kubectl apply -f - " \; - name: helm upgrade - shell: helm upgrade --install --atomic {{ release_name }} {{ chart_path }} -n {{namespace}} + shell: helm upgrade --install --atomic timeout 10m {{ release_name }} {{ chart_path }} -n {{namespace}} - name: Get the deployment rollout status shell: "kubectl get deployments -A | grep -i {{ release_name }} | awk -F' ' '{print $3}' | awk -F/ '{if ($1 ~ $2){exit 0} else {exit 1}}'" From 6f13c27cda8bac5011e1a36f486af1374e6b2878 Mon Sep 17 00:00:00 2001 From: harshavardhanc Date: Tue, 26 May 2020 15:56:36 +0530 Subject: [PATCH 2454/2894] Issue #00 fix: increase atomic value missing - in timeout --- kubernetes/ansible/roles/deploy-badger/tasks/main.yml | 2 +- kubernetes/ansible/roles/deploy-player/tasks/main.yml | 2 +- kubernetes/ansible/roles/helm-daemonset/tasks/main.yml | 2 +- kubernetes/ansible/roles/helm-deploy/tasks/main.yml | 2 +- kubernetes/ansible/roles/proxy/tasks/main.yml | 2 +- kubernetes/ansible/roles/sunbird-deploy/tasks/main.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/kubernetes/ansible/roles/deploy-badger/tasks/main.yml b/kubernetes/ansible/roles/deploy-badger/tasks/main.yml index 0329cca7f..e83fc87ee 100644 --- a/kubernetes/ansible/roles/deploy-badger/tasks/main.yml +++ b/kubernetes/ansible/roles/deploy-badger/tasks/main.yml @@ -10,7 +10,7 @@ dest: "{{ chart_path }}/templates/configmap.yaml" - name: helm install - shell: helm upgrade --install --atomic timeout 10m {{ release_name }} {{ chart_path }} -n {{ namespace }} + shell: helm upgrade --install --atomic --timeout 10m {{ release_name }} {{ chart_path }} -n {{ namespace }} - name: Copying user creation template template: diff --git a/kubernetes/ansible/roles/deploy-player/tasks/main.yml b/kubernetes/ansible/roles/deploy-player/tasks/main.yml index 314c6f07c..f2301e919 100644 --- a/kubernetes/ansible/roles/deploy-player/tasks/main.yml +++ b/kubernetes/ansible/roles/deploy-player/tasks/main.yml @@ -33,7 +33,7 @@ shell: "kubectl create configmap player-config --from-env-file={{role_path}}/templates/{{ release_name }}.env -n {{namespace}} --dry-run -o=yaml | kubectl apply -f -" - name: helm install and upgrade - shell: helm upgrade --install --atomic timeoout 10m {{ release_name }} {{ chart_path }} -n {{namespace}} + shell: helm upgrade --install --atomic --timeoout 10m {{ release_name }} {{ chart_path }} -n {{namespace}} - name: Get the deployment rollout status shell: "kubectl get deployments -A | grep -i {{ release_name }} | awk -F' ' '{print $3}' | awk -F/ '{if ($1 ~ $2){exit 0} else {exit 1}}'" diff --git a/kubernetes/ansible/roles/helm-daemonset/tasks/main.yml b/kubernetes/ansible/roles/helm-daemonset/tasks/main.yml index 17ffcf088..cfa188ddb 100644 --- a/kubernetes/ansible/roles/helm-daemonset/tasks/main.yml +++ b/kubernetes/ansible/roles/helm-daemonset/tasks/main.yml @@ -15,7 +15,7 @@ dest: "{{ chart_path }}/values.yaml" - name: helm install - shell: helm upgrade --install --atomic timeout 10m {{ release_name }} {{ chart_path }} -n {{namespace}} + shell: helm upgrade --install --atomic --timeout 10m {{ release_name }} {{ chart_path }} -n {{namespace}} - name: Get the deployment rollout status shell: "kubectl get daemonsets -A | grep -i {{ release_name }} | awk -F' ' '{if ($3 ~ $6){exit 0} else {exit 1}}'" diff --git a/kubernetes/ansible/roles/helm-deploy/tasks/main.yml b/kubernetes/ansible/roles/helm-deploy/tasks/main.yml index 18e0bc2a4..360ee6112 100644 --- a/kubernetes/ansible/roles/helm-deploy/tasks/main.yml +++ b/kubernetes/ansible/roles/helm-deploy/tasks/main.yml @@ -15,7 +15,7 @@ dest: "{{ chart_path }}/values.yaml" - name: helm install - shell: helm upgrade --install --atomic timeout 10m {{ release_name }} {{ chart_path }} -n {{namespace}} + shell: helm upgrade --install --atomic --timeout 10m {{ release_name }} {{ chart_path }} -n {{namespace}} - name: Get the deployment rollout status shell: "kubectl get deployments -A | grep -i {{ release_name }} | if [[ $(wc -l) > 0 ]]; then awk '{print $3}' | awk -F/ '{if ($1 ~ $2){exit 0} else {exit 1}}'; else exit 1; fi" diff --git a/kubernetes/ansible/roles/proxy/tasks/main.yml b/kubernetes/ansible/roles/proxy/tasks/main.yml index 1fa1d729c..224f29a78 100644 --- a/kubernetes/ansible/roles/proxy/tasks/main.yml +++ b/kubernetes/ansible/roles/proxy/tasks/main.yml @@ -45,5 +45,5 @@ dest: "{{ chart_path }}/values.yaml" - name: helm install - shell: helm upgrade --install --atomic timeout 10m --force {{ release_name }} {{ chart_path }} -n {{namespace}} + shell: helm upgrade --install --atomic --timeout 10m --force {{ release_name }} {{ chart_path }} -n {{namespace}} diff --git a/kubernetes/ansible/roles/sunbird-deploy/tasks/main.yml b/kubernetes/ansible/roles/sunbird-deploy/tasks/main.yml index c6c9fad95..9ec884aa3 100644 --- a/kubernetes/ansible/roles/sunbird-deploy/tasks/main.yml +++ b/kubernetes/ansible/roles/sunbird-deploy/tasks/main.yml @@ -19,7 +19,7 @@ shell: find "{{role_path}}/templates/" -iname "*.xml" -exec /bin/bash -c "ls {}; kubectl create configmap {{ release_name }}-xml-config --from-file={} -n {{namespace}} --dry-run -o=yaml | kubectl apply -f - " \; - name: helm upgrade - shell: helm upgrade --install --atomic timeout 10m {{ release_name }} {{ chart_path }} -n {{namespace}} + shell: helm upgrade --install --atomic --timeout 10m {{ release_name }} {{ chart_path }} -n {{namespace}} - name: Get the deployment rollout status shell: "kubectl get deployments -A | grep -i {{ release_name }} | awk -F' ' '{print $3}' | awk -F/ '{if ($1 ~ $2){exit 0} else {exit 1}}'" From a847c0dc7fa0670b7671c85c13b59b62182c06ec Mon Sep 17 00:00:00 2001 From: harshavardhanc Date: Tue, 26 May 2020 15:56:36 +0530 Subject: [PATCH 2455/2894] Issue #00 fix: increase atomic value missing - in timeout --- kubernetes/ansible/roles/deploy-badger/tasks/main.yml | 2 +- kubernetes/ansible/roles/deploy-player/tasks/main.yml | 2 +- kubernetes/ansible/roles/helm-daemonset/tasks/main.yml | 2 +- kubernetes/ansible/roles/helm-deploy/tasks/main.yml | 2 +- kubernetes/ansible/roles/proxy/tasks/main.yml | 2 +- kubernetes/ansible/roles/sunbird-deploy/tasks/main.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/kubernetes/ansible/roles/deploy-badger/tasks/main.yml b/kubernetes/ansible/roles/deploy-badger/tasks/main.yml index 0329cca7f..e83fc87ee 100644 --- a/kubernetes/ansible/roles/deploy-badger/tasks/main.yml +++ b/kubernetes/ansible/roles/deploy-badger/tasks/main.yml @@ -10,7 +10,7 @@ dest: "{{ chart_path }}/templates/configmap.yaml" - name: helm install - shell: helm upgrade --install --atomic timeout 10m {{ release_name }} {{ chart_path }} -n {{ namespace }} + shell: helm upgrade --install --atomic --timeout 10m {{ release_name }} {{ chart_path }} -n {{ namespace }} - name: Copying user creation template template: diff --git a/kubernetes/ansible/roles/deploy-player/tasks/main.yml b/kubernetes/ansible/roles/deploy-player/tasks/main.yml index 314c6f07c..f2301e919 100644 --- a/kubernetes/ansible/roles/deploy-player/tasks/main.yml +++ b/kubernetes/ansible/roles/deploy-player/tasks/main.yml @@ -33,7 +33,7 @@ shell: "kubectl create configmap player-config --from-env-file={{role_path}}/templates/{{ release_name }}.env -n {{namespace}} --dry-run -o=yaml | kubectl apply -f -" - name: helm install and upgrade - shell: helm upgrade --install --atomic timeoout 10m {{ release_name }} {{ chart_path }} -n {{namespace}} + shell: helm upgrade --install --atomic --timeoout 10m {{ release_name }} {{ chart_path }} -n {{namespace}} - name: Get the deployment rollout status shell: "kubectl get deployments -A | grep -i {{ release_name }} | awk -F' ' '{print $3}' | awk -F/ '{if ($1 ~ $2){exit 0} else {exit 1}}'" diff --git a/kubernetes/ansible/roles/helm-daemonset/tasks/main.yml b/kubernetes/ansible/roles/helm-daemonset/tasks/main.yml index 17ffcf088..cfa188ddb 100644 --- a/kubernetes/ansible/roles/helm-daemonset/tasks/main.yml +++ b/kubernetes/ansible/roles/helm-daemonset/tasks/main.yml @@ -15,7 +15,7 @@ dest: "{{ chart_path }}/values.yaml" - name: helm install - shell: helm upgrade --install --atomic timeout 10m {{ release_name }} {{ chart_path }} -n {{namespace}} + shell: helm upgrade --install --atomic --timeout 10m {{ release_name }} {{ chart_path }} -n {{namespace}} - name: Get the deployment rollout status shell: "kubectl get daemonsets -A | grep -i {{ release_name }} | awk -F' ' '{if ($3 ~ $6){exit 0} else {exit 1}}'" diff --git a/kubernetes/ansible/roles/helm-deploy/tasks/main.yml b/kubernetes/ansible/roles/helm-deploy/tasks/main.yml index 18e0bc2a4..360ee6112 100644 --- a/kubernetes/ansible/roles/helm-deploy/tasks/main.yml +++ b/kubernetes/ansible/roles/helm-deploy/tasks/main.yml @@ -15,7 +15,7 @@ dest: "{{ chart_path }}/values.yaml" - name: helm install - shell: helm upgrade --install --atomic timeout 10m {{ release_name }} {{ chart_path }} -n {{namespace}} + shell: helm upgrade --install --atomic --timeout 10m {{ release_name }} {{ chart_path }} -n {{namespace}} - name: Get the deployment rollout status shell: "kubectl get deployments -A | grep -i {{ release_name }} | if [[ $(wc -l) > 0 ]]; then awk '{print $3}' | awk -F/ '{if ($1 ~ $2){exit 0} else {exit 1}}'; else exit 1; fi" diff --git a/kubernetes/ansible/roles/proxy/tasks/main.yml b/kubernetes/ansible/roles/proxy/tasks/main.yml index 1fa1d729c..224f29a78 100644 --- a/kubernetes/ansible/roles/proxy/tasks/main.yml +++ b/kubernetes/ansible/roles/proxy/tasks/main.yml @@ -45,5 +45,5 @@ dest: "{{ chart_path }}/values.yaml" - name: helm install - shell: helm upgrade --install --atomic timeout 10m --force {{ release_name }} {{ chart_path }} -n {{namespace}} + shell: helm upgrade --install --atomic --timeout 10m --force {{ release_name }} {{ chart_path }} -n {{namespace}} diff --git a/kubernetes/ansible/roles/sunbird-deploy/tasks/main.yml b/kubernetes/ansible/roles/sunbird-deploy/tasks/main.yml index c6c9fad95..9ec884aa3 100644 --- a/kubernetes/ansible/roles/sunbird-deploy/tasks/main.yml +++ b/kubernetes/ansible/roles/sunbird-deploy/tasks/main.yml @@ -19,7 +19,7 @@ shell: find "{{role_path}}/templates/" -iname "*.xml" -exec /bin/bash -c "ls {}; kubectl create configmap {{ release_name }}-xml-config --from-file={} -n {{namespace}} --dry-run -o=yaml | kubectl apply -f - " \; - name: helm upgrade - shell: helm upgrade --install --atomic timeout 10m {{ release_name }} {{ chart_path }} -n {{namespace}} + shell: helm upgrade --install --atomic --timeout 10m {{ release_name }} {{ chart_path }} -n {{namespace}} - name: Get the deployment rollout status shell: "kubectl get deployments -A | grep -i {{ release_name }} | awk -F' ' '{print $3}' | awk -F/ '{if ($1 ~ $2){exit 0} else {exit 1}}'" From 7ee68f820372349741ef81e2a539fb12fdce8eb7 Mon Sep 17 00:00:00 2001 From: Harsha Date: Tue, 26 May 2020 20:58:53 +0530 Subject: [PATCH 2456/2894] Issue #00 fix: log-es clustering and helm chart for fluentd (#1516) * Issue #00 fix: log-es clustering and helm chart for fluentd * Issue #00 fix: adding server host value * Issue #00 fix: updating fluentd yaml file name --- ansible/esupgradelatest.yml | 8 +- .../roles/es6/templates/elasticsearch.yml.j2 | 2 +- .../log-es6/templates/elasticsearch.yml.j2 | 2 +- .../templates/fluentd-elasticsearch.yaml | 2 + .../roles/logging/templates/kibana.yaml | 8 +- .../logging/fluentd-elasticsearch/Chart.yaml | 24 + .../logging/fluentd-elasticsearch/OWNERS | 6 + .../logging/fluentd-elasticsearch/README.md | 306 ++++++++++ .../fluentd-elasticsearch/templates/NOTES.txt | 27 + .../templates/_helpers.tpl | 55 ++ .../templates/clusterrole.yaml | 22 + .../templates/clusterrolebinding.yaml | 20 + .../templates/configmaps.yaml | 543 ++++++++++++++++++ .../templates/daemonset.yaml | 218 +++++++ .../templates/metrics-service.yaml | 22 + .../templates/pod-security-policy.yaml | 55 ++ .../templates/prometheusrule.yaml | 70 +++ .../fluentd-elasticsearch/templates/role.yaml | 22 + .../templates/rolebinding.yaml | 21 + .../templates/service-account.yaml | 19 + .../templates/service.yaml | 31 + .../templates/servicemonitor.yaml | 37 ++ .../logging/fluentd-elasticsearch/values.yaml | 257 +++++++++ .../logging/kibana/templates/deployment.yaml | 2 +- .../helm_charts/logging/kibana/values.yaml | 2 +- 25 files changed, 1767 insertions(+), 14 deletions(-) create mode 100644 kubernetes/ansible/roles/logging/templates/fluentd-elasticsearch.yaml create mode 100644 kubernetes/helm_charts/logging/fluentd-elasticsearch/Chart.yaml create mode 100644 kubernetes/helm_charts/logging/fluentd-elasticsearch/OWNERS create mode 100644 kubernetes/helm_charts/logging/fluentd-elasticsearch/README.md create mode 100644 kubernetes/helm_charts/logging/fluentd-elasticsearch/templates/NOTES.txt create mode 100644 kubernetes/helm_charts/logging/fluentd-elasticsearch/templates/_helpers.tpl create mode 100644 kubernetes/helm_charts/logging/fluentd-elasticsearch/templates/clusterrole.yaml create mode 100644 kubernetes/helm_charts/logging/fluentd-elasticsearch/templates/clusterrolebinding.yaml create mode 100755 kubernetes/helm_charts/logging/fluentd-elasticsearch/templates/configmaps.yaml create mode 100644 kubernetes/helm_charts/logging/fluentd-elasticsearch/templates/daemonset.yaml create mode 100644 kubernetes/helm_charts/logging/fluentd-elasticsearch/templates/metrics-service.yaml create mode 100644 kubernetes/helm_charts/logging/fluentd-elasticsearch/templates/pod-security-policy.yaml create mode 100644 kubernetes/helm_charts/logging/fluentd-elasticsearch/templates/prometheusrule.yaml create mode 100644 kubernetes/helm_charts/logging/fluentd-elasticsearch/templates/role.yaml create mode 100644 kubernetes/helm_charts/logging/fluentd-elasticsearch/templates/rolebinding.yaml create mode 100644 kubernetes/helm_charts/logging/fluentd-elasticsearch/templates/service-account.yaml create mode 100644 kubernetes/helm_charts/logging/fluentd-elasticsearch/templates/service.yaml create mode 100644 kubernetes/helm_charts/logging/fluentd-elasticsearch/templates/servicemonitor.yaml create mode 100644 kubernetes/helm_charts/logging/fluentd-elasticsearch/values.yaml diff --git a/ansible/esupgradelatest.yml b/ansible/esupgradelatest.yml index ab354efcb..b3d14a440 100644 --- a/ansible/esupgradelatest.yml +++ b/ansible/esupgradelatest.yml @@ -1,4 +1,4 @@ -- hosts: log-es-2 +- hosts: log-es become: yes vars_files: - ['{{inventory_dir}}/secrets.yml'] @@ -10,14 +10,14 @@ - openjdk - { role: log-es6, es_config: { - cluster.name: "{{ node_name }}", - discovery.zen.ping.unicast.hosts: "{{ groups['log-es-2'] }}", + cluster.name: "{{ log_es_etc_cluster_name }}", + discovery.zen.ping.unicast.hosts: "{{ groups['log-es'] }}", http.port: 9200, transport.tcp.port: 9300, node.data: "{{ es_etc_node_data | default('true') }}", node.master: "{{ es_etc_node_master | default('true') }}", bootstrap.memory_lock: true, }, - es_etc_discovery_zen_ping_unicast_hosts: "{{ groups['log-es-2'] }}", + es_etc_discovery_zen_ping_unicast_hosts: "{{ groups['log-es'] }}", es_etc_cluster_name: "{{ node_name }}" } diff --git a/ansible/roles/es6/templates/elasticsearch.yml.j2 b/ansible/roles/es6/templates/elasticsearch.yml.j2 index a3744b081..030cc6e1a 100644 --- a/ansible/roles/es6/templates/elasticsearch.yml.j2 +++ b/ansible/roles/es6/templates/elasticsearch.yml.j2 @@ -10,7 +10,7 @@ cluster.name: elasticsearch {% if (groups['es']|length) <= 2 %} discovery.zen.minimum_master_nodes: 1 {% else %} -discovery.zen.minimum_master_nodes: "{{ ((groups['es']|length) / 2 +1) | round(0, 'ceil') | int}}" +discovery.zen.minimum_master_nodes: "{{ ((groups['es']|length) / 2 +1) | round(0, 'floor') | int}}" {% endif %} {% if es_config['node.name'] is not defined %} diff --git a/ansible/roles/log-es6/templates/elasticsearch.yml.j2 b/ansible/roles/log-es6/templates/elasticsearch.yml.j2 index e83c6741a..ced4c41a1 100644 --- a/ansible/roles/log-es6/templates/elasticsearch.yml.j2 +++ b/ansible/roles/log-es6/templates/elasticsearch.yml.j2 @@ -10,7 +10,7 @@ cluster.name: elasticsearch {% if (groups['log-es']|length) <= 2 %} discovery.zen.minimum_master_nodes: 1 {% else %} -discovery.zen.minimum_master_nodes: "{{ ((groups['log-es']|length) / 2 +1) | round(0, 'ceil') | int}}" +discovery.zen.minimum_master_nodes: "{{ ((groups['log-es']|length) / 2 +1) | round(0, 'floor') | int}}" {% endif %} {% if es_config['node.name'] is not defined %} diff --git a/kubernetes/ansible/roles/logging/templates/fluentd-elasticsearch.yaml b/kubernetes/ansible/roles/logging/templates/fluentd-elasticsearch.yaml new file mode 100644 index 000000000..5c233d18a --- /dev/null +++ b/kubernetes/ansible/roles/logging/templates/fluentd-elasticsearch.yaml @@ -0,0 +1,2 @@ +elasticsearch: + hosts: {{groups['log-es']|join(':9200,')}}:9200 diff --git a/kubernetes/ansible/roles/logging/templates/kibana.yaml b/kubernetes/ansible/roles/logging/templates/kibana.yaml index 96109b957..31063dedc 100644 --- a/kubernetes/ansible/roles/logging/templates/kibana.yaml +++ b/kubernetes/ansible/roles/logging/templates/kibana.yaml @@ -1,5 +1,3 @@ -elasticsearchHosts: "http://{{logger_es6_host}}:{{logger_es_port}}" - replicas: {{ kibana_replicas | default(1) }} image: "docker.elastic.co/kibana/kibana" imageTag: "6.8.6" @@ -18,15 +16,13 @@ healthCheckPath: "/dashboard" kibanaConfig: kibana.yml: | server.basePath: "/dashboard" + server.host: "0.0.0.0" server.rewriteBasePath: true elasticsearch.shardTimeout: 0 + elasticsearch.hosts: ["http://{{groups['log-es'] | join(':9200","http://')}}:9200"] elasticsearch.requestTimeout: 300000 elasticsearch.preserveHost: true elasticsearch.ssl.verificationMode: full - kibana.index: ".kibana" - kibana.defaultAppId: "discover" - xpack.ilm.enabled: false - xpack.security.enabled: false updateStrategy: type: "RollingUpdate" diff --git a/kubernetes/helm_charts/logging/fluentd-elasticsearch/Chart.yaml b/kubernetes/helm_charts/logging/fluentd-elasticsearch/Chart.yaml new file mode 100644 index 000000000..5d0e10154 --- /dev/null +++ b/kubernetes/helm_charts/logging/fluentd-elasticsearch/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v1 +name: fluentd-elasticsearch +version: 9.0.0 +appVersion: 3.0.1 +home: https://www.fluentd.org/ +description: A Fluentd Helm chart for Kubernetes with Elasticsearch output +icon: https://raw.githubusercontent.com/fluent/fluentd-docs/master/public/logo/Fluentd_square.png +keywords: +- fluentd +- elasticsearch +- multiline +- detect-exceptions +- logging +sources: +- https://github.com/kiwigrid/helm-charts/tree/master/charts/fluentd-elasticsearch +- https://github.com/fluent/fluentd-kubernetes-daemonset +- https://github.com/GoogleCloudPlatform/fluent-plugin-detect-exceptions +- https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/fluentd-elasticsearch/fluentd-es-image +maintainers: +- name: monotek + email: andre.bauer@kiwigrid.com +- name: axdotl + email: axel.koehler@kiwigrid.com +engine: gotpl diff --git a/kubernetes/helm_charts/logging/fluentd-elasticsearch/OWNERS b/kubernetes/helm_charts/logging/fluentd-elasticsearch/OWNERS new file mode 100644 index 000000000..d2be9eee1 --- /dev/null +++ b/kubernetes/helm_charts/logging/fluentd-elasticsearch/OWNERS @@ -0,0 +1,6 @@ +approvers: +- axdotl +- monotek +reviewers: +- axdotl +- monotek diff --git a/kubernetes/helm_charts/logging/fluentd-elasticsearch/README.md b/kubernetes/helm_charts/logging/fluentd-elasticsearch/README.md new file mode 100644 index 000000000..36e176dca --- /dev/null +++ b/kubernetes/helm_charts/logging/fluentd-elasticsearch/README.md @@ -0,0 +1,306 @@ +# Fluentd Elasticsearch + +- Installs [Fluentd](https://www.fluentd.org/) log forwarder. + +## TL;DR + +```console +helm install kiwigrid/fluentd-elasticsearch +``` + +## Introduction + +This chart bootstraps a [Fluentd](https://www.fluentd.org/) daemonset on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. +It's meant to be a drop in replacement for fluentd-gcp on GKE which sends logs to Google's Stackdriver service, but can also be used in other places where logging to ElasticSearch is required. +The used Docker image also contains Google's detect exceptions (for Java multiline stacktraces), Prometheus exporter, Kubernetes metadata filter & Systemd plugins. + +## Prerequisites + +- Kubernetes 1.8+ with Beta APIs enabled + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```console +helm install --name my-release kiwigrid/fluentd-elasticsearch +``` + +The command deploys fluentd-elasticsearch on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. + +## Uninstalling the Chart + +To uninstall/delete the `my-release` deployment: + +```console +helm delete my-release +``` + +The command removes all the Kubernetes components associated with the chart and deletes the release. + +## Configuration + +The following table lists the configurable parameters of the Fluentd elasticsearch chart and their default values. + +| Parameter | Description | Default | +| ---------------------------------------------------- | ------------------------------------------------------------------------------ | -------------------------------------------------- | +| `affinity` | Optional daemonset affinity | `{}` | +| `annotations` | Optional daemonset annotations | `NULL` | +| `podAnnotations` | Optional daemonset's pods annotations | `NULL` | +| `configMaps.useDefaults.systemConf` | Use default system.conf | true | +| `configMaps.useDefaults.containersInputConf` | Use default containers.input.conf | true | +| `configMaps.useDefaults.systemInputConf` | Use default system.input.conf | true | +| `configMaps.useDefaults.forwardInputConf` | Use default forward.input.conf | true | +| `configMaps.useDefaults.monitoringConf` | Use default monitoring.conf | true | +| `configMaps.useDefaults.outputConf` | Use default output.conf | true | +| `extraConfigMaps` | Add additional Configmap or overwrite disabled default | `{}` | +| `awsSigningSidecar.enabled` | Enable AWS request signing sidecar | `false` | +| `awsSigningSidecar.resources` | AWS Sidecar resources | `{}` | +| `awsSigningSidecar.network.port` | AWS Sidecar exposure port | `8080` | +| `awsSigningSidecar.network.address` | AWS Sidecar listen address | `localhost` | +| `awsSigningSidecar.network.remoteReadTimeoutSeconds` | AWS Sidecar socket read timeout when talking to ElasticSearch | `15` | +| `awsSigningSidecar.image.repository` | AWS signing sidecar repository image | `abutaha/aws-es-proxy` | +| `awsSigningSidecar.image.tag` | AWS signing sidecar repository tag | `v1.0` | +| `elasticsearch.auth.enabled` | Elasticsearch Auth enabled | `false` | +| `elasticsearch.auth.user` | Elasticsearch Auth User | `""` | +| `elasticsearch.auth.password` | Elasticsearch Auth Password | `""` | +| `elasticsearch.hosts` | Elasticsearch Hosts List (host and port) | `["elasticsearch-client:9200"]` | +| `elasticsearch.includeTagKey` | Elasticsearch Including of Tag key | `true` | +| `elasticsearch.logstash.enabled` | Elasticsearch Logstash enabled | `true` | +| `elasticsearch.logstash.prefix` | Elasticsearch Logstash prefix | `logstash` | +| `elasticsearch.path` | Elasticsearch Path | `""` | +| `elasticsearch.scheme` | Elasticsearch scheme setting | `http` | +| `elasticsearch.sslVerify` | Elasticsearch Auth SSL verify | `true` | +| `elasticsearch.sslVersion` | Elasticsearch tls version setting | `TLSv1_2` | +| `elasticsearch.outputType` | Elasticsearch output type | `elasticsearch` | +| `elasticsearch.typeName` | Elasticsearch type name | `_doc` | +| `elasticsearch.logLevel` | Elasticsearch global log level | `info` | +| `elasticsearch.reconnectOnError` | Elasticsearch Reconnect on error | `true` | +| `elasticsearch.reloadOnFailure` | Elasticsearch Reload on failure | `false` | +| `elasticsearch.reloadConnections` | Elasticsearch reload connections | `false` | +| `elasticsearch.buffer.enabled` | Elasticsearch Buffer enabled | `true` | +| `elasticsearch.buffer.type` | Elasticsearch Buffer type | `file` | +| `elasticsearch.buffer.path` | Elasticsearch Buffer path | `/var/log/fluentd-buffers/kubernetes.system.buffer`| +| `elasticsearch.buffer.flushMode` | Elasticsearch Buffer flush mode | `interval` | +| `elasticsearch.buffer.retryType` | Elasticsearch Buffer retry type | `exponential_backoff` | +| `elasticsearch.buffer.flushThreadCount` | Elasticsearch Buffer flush thread count | `2` | +| `elasticsearch.buffer.flushInterval` | Elasticsearch Buffer flush interval | `5s` | +| `elasticsearch.buffer.retryForever` | Elasticsearch Buffer retry forever | `true` | +| `elasticsearch.buffer.retryMaxInterval` | Elasticsearch Buffer retry max interval | `30` | +| `elasticsearch.buffer.chunkLimitSize` | Elasticsearch Buffer chunk limit size | `2M` | +| `elasticsearch.buffer.queueLimitLength` | Elasticsearch Buffer queue limit size | `8` | +| `elasticsearch.buffer.overflowAction` | Elasticsearch Buffer over flow action | `block` | +| `env` | List of env vars that are added to the fluentd pods | `{}` | +| `fluentdArgs` | Fluentd args | `--no-supervisor -q` | +| `secret` | List of env vars that are set from secrets and added to the fluentd pods | `[]` | +| `extraVolumeMounts` | Mount extra volume, required to mount ssl certificates when ES has tls enabled | `[]` | +| `extraVolume` | Extra volume | `[]` | +| `hostLogDir.varLog` | Specify where fluentd can find var log | `/var/log` | +| `hostLogDir.dockerContainers` | Specify where fluentd can find logs for docker container | `/var/lib/docker/containers` | +| `hostLogDir.libSystemdDir` | Specify where fluentd can find logs for lib Systemd | `/usr/lib64` | +| `image.repository` | Image | `quay.io/fluentd_elasticsearch/fluentd` | +| `image.tag` | Image tag | `v3.0.1` | +| `image.pullPolicy` | Image pull policy | `IfNotPresent` | +| `image.pullSecrets` | Image pull secrets | `` | +| `livenessProbe.enabled` | Whether to enable livenessProbe | `true` | +| `livenessProbe.initialDelaySeconds` | livenessProbe initial delay seconds | `600` | +| `livenessProbe.periodSeconds` | livenessProbe period seconds | `60` | +| `livenessProbe.kind` | livenessProbe kind | `Set to a Linux compatible command` | +| `nodeSelector` | Optional daemonset nodeSelector | `{}` | +| `podSecurityPolicy.annotations` | Specify pod annotations in the pod security policy | `{}` | +| `podSecurityPolicy.enabled` | Specify if a pod security policy must be created | `false` | +| `priorityClassName` | Optional PriorityClass for pods | `""` | +| `prometheusRule.enabled` | Whether to enable Prometheus prometheusRule | `false` | +| `prometheusRule.prometheusNamespace` | Namespace for prometheusRule | `monitoring` | +| `prometheusRule.labels` | Optional labels for prometheusRule | `{}` | +| `rbac.create` | RBAC | `true` | +| `resources.limits.cpu` | CPU limit | `100m` | +| `resources.limits.memory` | Memory limit | `500Mi` | +| `resources.requests.cpu` | CPU request | `100m` | +| `resources.requests.memory` | Memory request | `200Mi` | +| `service` | Service definition | `{}` | +| `service.ports` | List of service ports dict [{name:...}...] | Not Set | +| `service.ports[].type` | Service type (ClusterIP/NodePort) | `ClusterIP` | +| `service.ports[].name` | One of service ports name | Not Set | +| `service.ports[].port` | Service port | Not Set | +| `service.ports[].nodePort` | NodePort port (when service.type is NodePort) | Not Set | +| `service.ports[].protocol` | Service protocol(optional, can be TCP/UDP) | Not Set | +| `serviceAccount.create` | Specifies whether a service account should be created. | `true` | +| `serviceAccount.name` | Name of the service account. | `""` | +| `serviceAccount.annotations` | Specify annotations in the pod service account | `{}` | +| `serviceMetric.enabled` | Generate the metric service regardless of whether serviceMonitor is enabled. | `false` | +| `serviceMonitor.enabled` | Whether to enable Prometheus serviceMonitor | `false` | +| `serviceMonitor.port` | Define on which port the ServiceMonitor should scrape | `24231` | +| `serviceMonitor.interval` | Interval at which metrics should be scraped | `10s` | +| `serviceMonitor.path` | Path for Metrics | `/metrics` | +| `serviceMonitor.labels` | Optional labels for serviceMonitor | `{}` | +| `serviceMonitor.metricRelabelings` | Optional metric relabel configs to apply to samples before ingestion | `[]` | +| `serviceMonitor.relabelings` | Optional relabel configs to apply to samples before scraping | `[]` | +| `serviceMonitor.jobLabel` | Label whose value will define the job name | `app.kubernetes.io/instance` | +| `serviceMonitor.type` | Optional the type of the metrics service | `ClusterIP` | +| `tolerations` | Optional daemonset tolerations | `[]` | +| `updateStrategy` | Optional daemonset update strategy | `type: RollingUpdate` | + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, + +```console +helm install --name my-release kiwigrid/fluentd-elasticsearch +``` + +Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example, + +```console +helm install --name my-release -f values.yaml kiwigrid/fluentd-elasticsearch +``` + +## Installation + +### IBM IKS + +For IBM IKS path `/var/log/pods` must be mounted, otherwise only kubelet logs would be available + +```yaml +extraVolumeMounts: | + - name: pods + mountPath: /var/log/pods + readOnly: true + +extraVolumes: | + - name: pods + hostPath: + path: "/var/log/pods" + type: Directory +``` + +### AWS Elasticsearch Domains + +AWS Elasticsearch requires requests to upload data to be signed using [AWS Signature V4](https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). In order to support this, you can add `awsSigningSidecar: {enabled: true}` to your configuration. This results in a sidecar container being deployed that proxies all requests to your Elasticsearch domain and signs them appropriately. + +## Upgrading + +### From a version < 2.0.0 + +When you upgrade this chart you have to add the "--force" parameter to your helm upgrade command as there have been changes to the lables which makes a normal upgrade impossible. + +### From a version ≥ 4.9.3 to version ≥ 5.0.0 + +When upgrading this chart you need to rename `livenessProbe.command` parameter to `livenessProbe.kind.exec.command` (only applicable if `livenessProbe.command` parameter was used). + +### From a version < 6.0.0 to version ≥ 6.0.0 + +When upgrading this chart you have to perform updates for any system that +uses fluentd output from systemd logs, because now: + +- field names have removed leading underscores (`_pid` becomes `pid`) +- field names from systemd are now lowercase (`PROCESS` becomes `process`) + +This means any system that uses fluend output needs to be updated, +especially: + +- in Kibana go to `Management > Index Patterns`, for each index click on + `Refresh field list` icon +- fix renamed fields in other places - such as Kibana or Grafana, in items + such as dashboards queries/vars/annotations + +It is strongly suggested to set up temporarily new fluentd instance with output +to another elasticsearch index prefix to see the differences and then apply changes. The amount of fields altered can be noticeable and hard to list them all in this document. + +Some dashboards can be easily fixed with sed: + +```bash +cat dashboard.json | sed -e 's/_PID/pid/g' +``` + +Below list of most commonly used systemd fields: + +```text +__MONOTONIC_TIMESTAMP +__REALTIME_TIMESTAMP +_BOOT_ID +_CAP_EFFECTIVE +_CMDLINE +_COMM +_EXE +_GID +_HOSTNAME +_MACHINE_ID +_PID +_SOURCE_REALTIME_TIMESTAMP +_SYSTEMD_CGROUP +_SYSTEMD_SLICE +_SYSTEMD_UNIT +_TRANSPORT +_UID +CODE_FILE +CODE_FUNC +CODE_FUNCTION +CODE_LINE +MESSAGE +MESSAGE_ID +NM_LOG_DOMAINS +NM_LOG_LEVEL +PRIORITY +SYSLOG_FACILITY +SYSLOG_IDENTIFIER +SYSLOG_PID +TIMESTAMP_BOOTTIME +TIMESTAMP_MONOTONIC +UNIT +``` + +### From a version <= 6.3.0 to version => 7.0.0 + +The additional plugins option has been removed as the used container image does not longer contains the build tools needed to build the plugins. Please use an own container image containing the plugins you want to use. + +### From a version < 8.0.0 to version => 8.0.0 + +> Both `elasticsearch.host` and `elasticsearch.port` are removed in favor of `elasticsearch.hosts` + +You can now [configure multiple elasticsearch hosts](https://docs.fluentd.org/output/elasticsearch#hosts-optional) as target for fluentd. + +The following parameters are deprecated and will be replaced by `elasticsearch.hosts` with a default value of `["elasticsearch-client:9200"]` +```yaml +elasticsearch: + host: elasticsearch-client + port: 9200 +``` + +You can use any yaml array syntax: +```yaml +elasticsearch: + hosts: ["elasticsearch-node-1:9200", "elasticsearch-node-2:9200"] +``` +```yaml +elasticsearch: + hosts: + - "elasticsearch-node-1:9200" + - "elasticsearch-node-2:9200" +``` + +Note: +> If you are using the AWS Sidecar, only the first host in the array is used. [Aws-es-proxy](https://github.com/abutaha/aws-es-proxy) is limited to one endpoint. + +### From a version < 8.0.0 to version => 9.0.0 +In this version elasticsearch template in `output.conf` configmap was expanded to be fully configured from `values.yaml` + - decide if to add a `logstash` - toggle `logstash.enabled` + - decide if to add a `buffer` - toggle `buffer.enabled` +#### The following fields were removed from the elasticsearch block in vlaues.yaml + - `bufferChunkLimit` in favor of `buffer.chunkLimitSize` + - `bufferQueueLimit` in favor of `buffer.queueLimitLength` + - `logstashPrefix` in favor of `logstash.enabled` and `logstash.prefix` +#### The following fields were added + - `reconnectOnError` + - `reloadOnFailure` + - `reloadConnections` + - `buffer.enabled` + - `buffer.type` + - `buffer.path` + - `buffer.flushMode` + - `buffer.retryType` + - `buffer.flushThreadCount` + - `buffer.flushInterval` + - `buffer.retryForever` + - `buffer.retryMaxInterval` + - `buffer.chunkLimitSize` + - `buffer.queueLimitLength` + - `buffer.overflowAction` \ No newline at end of file diff --git a/kubernetes/helm_charts/logging/fluentd-elasticsearch/templates/NOTES.txt b/kubernetes/helm_charts/logging/fluentd-elasticsearch/templates/NOTES.txt new file mode 100644 index 000000000..806d7d5b8 --- /dev/null +++ b/kubernetes/helm_charts/logging/fluentd-elasticsearch/templates/NOTES.txt @@ -0,0 +1,27 @@ +1. To verify that Fluentd has started, run: + + kubectl --namespace={{ .Release.Namespace }} get pods -l "app.kubernetes.io/name={{ include "fluentd-elasticsearch.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" + +THIS APPLICATION CAPTURES ALL CONSOLE OUTPUT AND FORWARDS IT TO elasticsearch . Anything that might be identifying, +including things like IP addresses, container images, and object names will NOT be anonymized. + +{{- if .Values.service }} +2. Get the application URL by running these commands: +{{- range $port := .Values.service.ports }} +{{- $service_type := $port.type | default "ClusterIP" -}} +{{- if contains "NodePort" $service_type }} + export NODE_PORT=$(kubectl get --namespace {{ $.Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "fluentd-elasticsearch.fullname" $ }}) + export NODE_IP=$(kubectl get nodes --namespace {{ $.Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" $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 -w {{ include "fluentd-elasticsearch.fullname" $ }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ $.Release.Namespace }} {{ include "fluentd-elasticsearch.fullname" $ }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + echo http://$SERVICE_IP:{{ $port.port }} +{{- else if contains "ClusterIP" $service_type }} + export POD_NAME=$(kubectl get pods --namespace {{ $.Release.Namespace }} -l "app.kubernetes.io/name={{ include "fluentd-elasticsearch.name" $ }},app.kubernetes.io/instance={{ $.Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl port-forward $POD_NAME 8080:80 +{{- end }} +{{- end }} +{{- end }} diff --git a/kubernetes/helm_charts/logging/fluentd-elasticsearch/templates/_helpers.tpl b/kubernetes/helm_charts/logging/fluentd-elasticsearch/templates/_helpers.tpl new file mode 100644 index 000000000..c46074df7 --- /dev/null +++ b/kubernetes/helm_charts/logging/fluentd-elasticsearch/templates/_helpers.tpl @@ -0,0 +1,55 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "fluentd-elasticsearch.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "fluentd-elasticsearch.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "fluentd-elasticsearch.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "fluentd-elasticsearch.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "fluentd-elasticsearch.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "fluentd-elasticsearch.labels" -}} +app.kubernetes.io/name: {{ include "fluentd-elasticsearch.name" . }} +helm.sh/chart: {{ include "fluentd-elasticsearch.chart" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} diff --git a/kubernetes/helm_charts/logging/fluentd-elasticsearch/templates/clusterrole.yaml b/kubernetes/helm_charts/logging/fluentd-elasticsearch/templates/clusterrole.yaml new file mode 100644 index 000000000..1a107ab06 --- /dev/null +++ b/kubernetes/helm_charts/logging/fluentd-elasticsearch/templates/clusterrole.yaml @@ -0,0 +1,22 @@ +{{- if .Values.rbac.create -}} +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ include "fluentd-elasticsearch.fullname" . }} + labels: +{{ include "fluentd-elasticsearch.labels" . | indent 4 }} + {{- if semverCompare "> 1.6" .Capabilities.KubeVersion.GitVersion }} + kubernetes.io/cluster-service: "true" + {{- end }} + addonmanager.kubernetes.io/mode: Reconcile +rules: +- apiGroups: + - "" + resources: + - "namespaces" + - "pods" + verbs: + - "get" + - "watch" + - "list" +{{- end -}} diff --git a/kubernetes/helm_charts/logging/fluentd-elasticsearch/templates/clusterrolebinding.yaml b/kubernetes/helm_charts/logging/fluentd-elasticsearch/templates/clusterrolebinding.yaml new file mode 100644 index 000000000..708e4ee4e --- /dev/null +++ b/kubernetes/helm_charts/logging/fluentd-elasticsearch/templates/clusterrolebinding.yaml @@ -0,0 +1,20 @@ +{{- if .Values.rbac.create -}} +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ include "fluentd-elasticsearch.fullname" . }} + labels: +{{ include "fluentd-elasticsearch.labels" . | indent 4 }} + {{- if semverCompare "> 1.6" .Capabilities.KubeVersion.GitVersion }} + kubernetes.io/cluster-service: "true" + {{- end }} + addonmanager.kubernetes.io/mode: Reconcile +subjects: +- kind: ServiceAccount + name: {{ if .Values.serviceAccount.name }}{{ .Values.serviceAccount.name }}{{ else }}{{ include "fluentd-elasticsearch.fullname" . }}{{ end }} + namespace: {{ .Release.Namespace }} +roleRef: + kind: ClusterRole + name: {{ include "fluentd-elasticsearch.fullname" . }} + apiGroup: rbac.authorization.k8s.io +{{- end -}} diff --git a/kubernetes/helm_charts/logging/fluentd-elasticsearch/templates/configmaps.yaml b/kubernetes/helm_charts/logging/fluentd-elasticsearch/templates/configmaps.yaml new file mode 100755 index 000000000..171c1c4cb --- /dev/null +++ b/kubernetes/helm_charts/logging/fluentd-elasticsearch/templates/configmaps.yaml @@ -0,0 +1,543 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "fluentd-elasticsearch.fullname" . }} + labels: +{{ include "fluentd-elasticsearch.labels" . | indent 4 }} + {{- if semverCompare "> 1.6" .Capabilities.KubeVersion.GitVersion }} + kubernetes.io/cluster-service: "true" + {{- end }} + addonmanager.kubernetes.io/mode: Reconcile +data: +{{- if .Values.configMaps.useDefaults.systemConf }} + system.conf: |- + + root_dir /tmp/fluentd-buffers/ + +{{- end }} + +{{- if .Values.configMaps.useDefaults.containersInputConf }} + containers.input.conf: |- + # This configuration file for Fluentd / td-agent is used + # to watch changes to Docker log files. The kubelet creates symlinks that + # capture the pod name, namespace, container name & Docker container ID + # to the docker logs for pods in the /var/log/containers directory on the host. + # If running this fluentd configuration in a Docker container, the /var/log + # directory should be mounted in the container. + # + # These logs are then submitted to Elasticsearch which assumes the + # installation of the fluent-plugin-elasticsearch & the + # fluent-plugin-kubernetes_metadata_filter plugins. + # See https://github.com/uken/fluent-plugin-elasticsearch & + # https://github.com/fabric8io/fluent-plugin-kubernetes_metadata_filter for + # more information about the plugins. + # + # Example + # ======= + # A line in the Docker log file might look like this JSON: + # + # {"log":"2014/09/25 21:15:03 Got request with path wombat\n", + # "stream":"stderr", + # "time":"2014-09-25T21:15:03.499185026Z"} + # + # The time_format specification below makes sure we properly + # parse the time format produced by Docker. This will be + # submitted to Elasticsearch and should appear like: + # $ curl 'http://elasticsearch-logging:9200/_search?pretty' + # ... + # { + # "_index" : "logstash-2014.09.25", + # "_type" : "fluentd", + # "_id" : "VBrbor2QTuGpsQyTCdfzqA", + # "_score" : 1.0, + # "_source":{"log":"2014/09/25 22:45:50 Got request with path wombat\n", + # "stream":"stderr","tag":"docker.container.all", + # "@timestamp":"2014-09-25T22:45:50+00:00"} + # }, + # ... + # + # The Kubernetes fluentd plugin is used to write the Kubernetes metadata to the log + # record & add labels to the log record if properly configured. This enables users + # to filter & search logs on any metadata. + # For example a Docker container's logs might be in the directory: + # + # /var/lib/docker/containers/997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b + # + # and in the file: + # + # 997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b-json.log + # + # where 997599971ee6... is the Docker ID of the running container. + # The Kubernetes kubelet makes a symbolic link to this file on the host machine + # in the /var/log/containers directory which includes the pod name and the Kubernetes + # container name: + # + # synthetic-logger-0.25lps-pod_default_synth-lgr-997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b.log + # -> + # /var/lib/docker/containers/997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b/997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b-json.log + # + # The /var/log directory on the host is mapped to the /var/log directory in the container + # running this instance of Fluentd and we end up collecting the file: + # + # /var/log/containers/synthetic-logger-0.25lps-pod_default_synth-lgr-997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b.log + # + # This results in the tag: + # + # var.log.containers.synthetic-logger-0.25lps-pod_default_synth-lgr-997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b.log + # + # The Kubernetes fluentd plugin is used to extract the namespace, pod name & container name + # which are added to the log message as a kubernetes field object & the Docker container ID + # is also added under the docker field object. + # The final tag is: + # + # kubernetes.var.log.containers.synthetic-logger-0.25lps-pod_default_synth-lgr-997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b.log + # + # And the final log record look like: + # + # { + # "log":"2014/09/25 21:15:03 Got request with path wombat\n", + # "stream":"stderr", + # "time":"2014-09-25T21:15:03.499185026Z", + # "kubernetes": { + # "namespace": "default", + # "pod_name": "synthetic-logger-0.25lps-pod", + # "container_name": "synth-lgr" + # }, + # "docker": { + # "container_id": "997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b" + # } + # } + # + # This makes it easier for users to search for logs by pod name or by + # the name of the Kubernetes container regardless of how many times the + # Kubernetes pod has been restarted (resulting in a several Docker container IDs). + # Json Log Example: + # {"log":"[info:2016-02-16T16:04:05.930-08:00] Some log text here\n","stream":"stdout","time":"2016-02-17T00:04:05.931087621Z"} + # CRI Log Example: + # 2016-02-17T00:04:05.931087621Z stdout F [info:2016-02-16T16:04:05.930-08:00] Some log text here + + @id fluentd-containers.log + @type tail + path /var/log/containers/*.log + pos_file /var/log/containers.log.pos + tag raw.kubernetes.* + read_from_head true + + @type multi_format + + format json + time_key time + time_format %Y-%m-%dT%H:%M:%S.%NZ + + + format /^(? + + + + # Detect exceptions in the log output and forward them as one log entry. + + @id raw.kubernetes + @type detect_exceptions + remove_tag_prefix raw + message log + stream stream + multiline_flush_interval 5 + max_bytes 500000 + max_lines 1000 + + + # Concatenate multi-line logs + + @id filter_concat + @type concat + key message + multiline_end_regexp /\n$/ + separator "" + timeout_label @NORMAL + flush_interval 5 + + + # Enriches records with Kubernetes metadata + + @id filter_kubernetes_metadata + @type kubernetes_metadata + + + # Fixes json fields in Elasticsearch + + @id filter_parser + @type parser + key_name log + reserve_time true + reserve_data true + remove_key_name_field true + + @type multi_format + + format json + + + format none + + + +{{- end }} + +{{- if .Values.configMaps.useDefaults.systemInputConf }} + system.input.conf: |- + # Example: + # 2015-12-21 23:17:22,066 [salt.state ][INFO ] Completed state [net.ipv4.ip_forward] at time 23:17:22.066081 + + @id minion + @type tail + format /^(?
diff --git a/ansible/artifacts/sunbird/login/resources/js/login.js b/ansible/artifacts/sunbird/login/resources/js/login.js index 70b188f05..06cfb9011 100644 --- a/ansible/artifacts/sunbird/login/resources/js/login.js +++ b/ansible/artifacts/sunbird/login/resources/js/login.js @@ -395,6 +395,14 @@ var forgetPassword = (redirectUrlPath) => { } } +var backToApplication = () => { + var redirect_uri = getValueFromSession('redirect_uri'); + if (redirect_uri) { + var updatedQuery = redirect_uri.split('?')[0]; + window.location.href = updatedQuery; + } +} + var redirect = (redirectUrlPath) => { console.log('redirect', redirectUrlPath) const curUrlObj = window.location; From 46dfc3ea6d6d0cad12b6b58e49cb0df8f92ebf99 Mon Sep 17 00:00:00 2001 From: Pradyumna Nagendra Date: Thu, 18 Jun 2020 16:56:46 +0530 Subject: [PATCH 2517/2894] Issue #TG-234 feat: Added logback configuration for lms-service --- .../helm_charts/core/lms/templates/deployment.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/kubernetes/helm_charts/core/lms/templates/deployment.yaml b/kubernetes/helm_charts/core/lms/templates/deployment.yaml index e252ccbb1..dd396bb30 100644 --- a/kubernetes/helm_charts/core/lms/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/lms/templates/deployment.yaml @@ -48,19 +48,20 @@ spec: readinessProbe: {{ toYaml .Values.readinessProbe | indent 10 }} {{- end }} + volumeMounts: + - name: {{ .Chart.Name }}-xml-config + mountPath: /home/sunbird/lms/lms-service-1.0-SNAPSHOT/config/logback.xml + subPath: lms-service_logback.xml {{- $keys := .Files.Glob "keys/*" }} {{- if $keys }} volumeMounts: - mountPath: {{ .Values.lms_device_basepath }} name: access-keys - - name: {{ .Chart.Name }}-xml-config - mountPath: /home/sunbird/lms/lms-service-1.0-SNAPSHOT/config/logback.xml - subPath: lms-service_logback.xml volumes: - name: access-keys secret: secretName: lms-access-keys -{{ end }} +{{- end }} --- apiVersion: v1 From 4bddf2b3de6ff183362efb0e23bc02d4dba22da3 Mon Sep 17 00:00:00 2001 From: G33tha Date: Thu, 18 Jun 2020 17:06:54 +0530 Subject: [PATCH 2518/2894] Cassandra db update ansible role (#1593) * Create cassandra-db-update.yml * Create Jenkinsfile --- ansible/cassandra-db-update.yml | 7 +++ .../roles/cassandra-db-update/tasks/main.yml | 31 +++++++++++ .../templates/alter_externalId_table.cql | 40 +++++++++++++++ pipelines/cassandra_db_update/Jenkinsfile | 51 +++++++++++++++++++ 4 files changed, 129 insertions(+) create mode 100644 ansible/cassandra-db-update.yml create mode 100644 ansible/roles/cassandra-db-update/tasks/main.yml create mode 100644 ansible/roles/cassandra-db-update/templates/alter_externalId_table.cql create mode 100644 pipelines/cassandra_db_update/Jenkinsfile diff --git a/ansible/cassandra-db-update.yml b/ansible/cassandra-db-update.yml new file mode 100644 index 000000000..008123619 --- /dev/null +++ b/ansible/cassandra-db-update.yml @@ -0,0 +1,7 @@ +- hosts: cassandra + become: yes + vars_files: + - "{{inventory_dir}}/secrets.yml" + roles: + - cassandra-db-update + run_once: true diff --git a/ansible/roles/cassandra-db-update/tasks/main.yml b/ansible/roles/cassandra-db-update/tasks/main.yml new file mode 100644 index 000000000..52a9d4fb8 --- /dev/null +++ b/ansible/roles/cassandra-db-update/tasks/main.yml @@ -0,0 +1,31 @@ +- name: Make sure cassandra is up and listening + wait_for: + port: 9042 + timeout: 180 + sleep: 10 + +- name: Copy cql script + become: yes + template: + src: "{{cql_file}}" + dest: "/tmp/{{cql_file}}" + mode: 0755 + +- name: run cql + become: yes + shell: 'cqlsh -f /tmp/{{cql_file}}' + async: 3600 + poll: 10 + ignore_errors: true + +- name: remove cql file + become: yes + file: + path: "/tmp/{{cql_file}}" + state: absent + +- name: rename backup file + become: yes + command: mv /home/deployer/usr_external_identity.csv /home/deployer/usr_external_identity_backup.csv + + diff --git a/ansible/roles/cassandra-db-update/templates/alter_externalId_table.cql b/ansible/roles/cassandra-db-update/templates/alter_externalId_table.cql new file mode 100644 index 000000000..2deb083d0 --- /dev/null +++ b/ansible/roles/cassandra-db-update/templates/alter_externalId_table.cql @@ -0,0 +1,40 @@ +copy sunbird.usr_external_identity(provider, +idtype, +externalid, +createdby, +createdon, +lastupdatedby, +lastupdatedon, +originalexternalid, +originalidtype, +originalprovider, +userid) to 'usr_external_identity.csv' with header=true and numprocesses=8 and maxattempts=10; + +DROP TABLE IF EXISTS sunbird.usr_external_identity; + +CREATE TABLE sunbird.usr_external_identity( +externalId text, +provider text, +idType text, +userId text, +createdOn timestamp, +lastUpdatedOn timestamp, +createdBy text, +lastUpdatedBy text, +originalExternalId text, +originalIdType text, +originalProvider text, +PRIMARY KEY(userId, idType, provider)); + + +copy sunbird.usr_external_identity(provider, +idtype, +externalid, +createdby, +createdon, +lastupdatedby, +lastupdatedon, +originalexternalid, +originalidtype, +originalprovider, +userid) from 'usr_external_identity.csv' with header=true and chunksize=2000 and numprocesses=8; diff --git a/pipelines/cassandra_db_update/Jenkinsfile b/pipelines/cassandra_db_update/Jenkinsfile new file mode 100644 index 000000000..e523cacbb --- /dev/null +++ b/pipelines/cassandra_db_update/Jenkinsfile @@ -0,0 +1,51 @@ +@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') { + stage('deploy'){ + 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/cassandra-db-update.yml" + ansibleExtraArgs = "--extra-vars \"cql_file=${params.cql_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 = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" + } + } + summary() + } + catch (err) { + currentBuild.result = "FAILURE" + throw err + } + finally { + slack_notify(currentBuild.result) + email_notify() + } +} From fad2cec6fb508d475b5b66f0a494b26a374fcc8f Mon Sep 17 00:00:00 2001 From: Keshav Prasad Date: Thu, 18 Jun 2020 18:31:46 +0530 Subject: [PATCH 2519/2894] fix: updating dashboard for kong 0.12 (#1594) --- .../dashboards/dashboards/api-manager.json | 198 ++++++++++++++++-- 1 file changed, 185 insertions(+), 13 deletions(-) diff --git a/kubernetes/helm_charts/monitoring/dashboards/dashboards/api-manager.json b/kubernetes/helm_charts/monitoring/dashboards/dashboards/api-manager.json index 16f5e577a..c743171b9 100644 --- a/kubernetes/helm_charts/monitoring/dashboards/dashboards/api-manager.json +++ b/kubernetes/helm_charts/monitoring/dashboards/dashboards/api-manager.json @@ -15,8 +15,8 @@ "editable": true, "gnetId": null, "graphTooltip": 0, - "id": 16, - "iteration": 1590206027276, + "id": 63, + "iteration": 1592480632299, "links": [], "panels": [ { @@ -44,7 +44,7 @@ "fillGradient": 0, "gridPos": { "h": 7, - "w": 24, + "w": 12, "x": 0, "y": 1 }, @@ -60,7 +60,7 @@ "show": true, "sort": "avg", "sortDesc": true, - "total": true, + "total": false, "values": true }, "lines": true, @@ -132,6 +132,104 @@ "alignLevel": null } }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Prometheus", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 1 + }, + "hiddenSeries": false, + "id": 12, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(increase(kong_request_count{cluster=~\"$cluster\", api =~ \"$api\"}[$interval])) by (api)", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{api}}", + "metric": "", + "refId": "A", + "step": 2 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Total Requests", + "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 + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, { "collapsed": false, "datasource": null, @@ -373,8 +471,8 @@ "legend": { "alignAsTable": true, "avg": true, - "current": false, - "max": false, + "current": true, + "max": true, "min": false, "rightSide": true, "show": true, @@ -400,7 +498,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(sum(increase(kong_request_status_count{cluster=~\"$cluster\", api=~\"${api}\",status_code=~\"2..|3..\"}[5m])) by (api, status_code) / ignoring(api, status_code) group_left sum(increase(kong_request_status_count{cluster=~\"$cluster\", api=~\"${api}\"}[5m]))) by (api,status_code)", + "expr": "sum(sum(increase(kong_request_status_count{cluster=~\"$cluster\", api=~\"${api}\",status_code=~\"2..|3..|total\"}[5m])) by (api, status_code) / ignoring(api, status_code) group_left sum(increase(kong_request_status_count{cluster=~\"$cluster\", api=~\"${api}\", status_code !~ \"total\"}[5m]))) by (api,status_code)", "format": "time_series", "interval": "", "intervalFactor": 2, @@ -469,8 +567,8 @@ "legend": { "alignAsTable": true, "avg": true, - "current": false, - "max": false, + "current": true, + "max": true, "min": false, "rightSide": true, "show": true, @@ -496,7 +594,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(sum(increase(kong_request_status_count{cluster=~\"$cluster\", api=~\"${api}\",status_code!~\"2..|3..\"}[5m])) by (api, status_code) / ignoring(api, status_code) group_left sum(increase(kong_request_status_count{cluster=~\"$cluster\", api=~\"${api}\"}[5m]))) by(api,status_code)", + "expr": "sum(sum(increase(kong_request_status_count{cluster=~\"$cluster\", api=~\"${api}\",status_code!~\"2..|3..|total\"}[5m])) by (api, status_code) / ignoring(api, status_code) group_left sum(increase(kong_request_status_count{cluster=~\"$cluster\", api=~\"${api}\", status_code!~\"total\"}[5m]))) by(api,status_code)", "format": "time_series", "interval": "", "intervalFactor": 2, @@ -754,7 +852,7 @@ "type": "row" } ], - "refresh": false, + "refresh": "", "schemaVersion": 21, "style": "dark", "tags": [], @@ -812,6 +910,80 @@ "tagsQuery": "", "type": "query", "useTags": false + }, + { + "auto": true, + "auto_count": 1, + "auto_min": "1m", + "current": { + "selected": false, + "text": "auto", + "value": "$__auto_interval_interval" + }, + "hide": 0, + "label": null, + "name": "interval", + "options": [ + { + "selected": true, + "text": "auto", + "value": "$__auto_interval_interval" + }, + { + "selected": false, + "text": "1m", + "value": "1m" + }, + { + "selected": false, + "text": "10m", + "value": "10m" + }, + { + "selected": false, + "text": "30m", + "value": "30m" + }, + { + "selected": false, + "text": "1h", + "value": "1h" + }, + { + "selected": false, + "text": "6h", + "value": "6h" + }, + { + "selected": false, + "text": "12h", + "value": "12h" + }, + { + "selected": false, + "text": "1d", + "value": "1d" + }, + { + "selected": false, + "text": "7d", + "value": "7d" + }, + { + "selected": false, + "text": "14d", + "value": "14d" + }, + { + "selected": false, + "text": "30d", + "value": "30d" + } + ], + "query": "1m,10m,30m,1h,6h,12h,1d,7d,14d,30d", + "refresh": 2, + "skipUrlSync": false, + "type": "interval" } ] }, @@ -846,6 +1018,6 @@ }, "timezone": "", "title": "API Manager", - "uid": "QGkkJpUZz", - "version": 1 + "uid": "CNtX7XqWz", + "version": 19 } From b72f0e978a8434b68ab02b4dc353ab4a5e4524a6 Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Thu, 18 Jun 2020 18:33:03 +0530 Subject: [PATCH 2520/2894] feat: Update the private content create limit to medium limit (#1595) --- ansible/roles/kong-api/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/kong-api/defaults/main.yml b/ansible/roles/kong-api/defaults/main.yml index fa6485989..c27270cd2 100644 --- a/ansible/roles/kong-api/defaults/main.yml +++ b/ansible/roles/kong-api/defaults/main.yml @@ -2415,7 +2415,7 @@ kong_apis: 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: PrivateContentReadAPIs request_path: "{{ private_content_prefix }}/v3/read" From 1ddf3e43a684e52dadefe6ee2014ceeecf874cf5 Mon Sep 17 00:00:00 2001 From: Pradyumna Nagendra Date: Fri, 19 Jun 2020 17:04:02 +0530 Subject: [PATCH 2521/2894] Issue #TG-234 feat: Added logback configuration for lms-service --- ansible/roles/stack-sunbird/defaults/main.yml | 4 +- .../templates/lms-service_logback.xml | 60 +++++++++++++++++++ .../core/lms/templates/deployment.yaml | 11 ++++ 3 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 ansible/roles/stack-sunbird/templates/lms-service_logback.xml diff --git a/ansible/roles/stack-sunbird/defaults/main.yml b/ansible/roles/stack-sunbird/defaults/main.yml index 3ef9b60d5..37f4b5669 100644 --- a/ansible/roles/stack-sunbird/defaults/main.yml +++ b/ansible/roles/stack-sunbird/defaults/main.yml @@ -255,7 +255,9 @@ sunbird_cert_qr_container_name: "certqr" service_env: learner: ../../../../ansible/roles/stack-sunbird/templates/sunbird_learner-service.env - lms: ../../../../ansible/roles/stack-sunbird/templates/sunbird_lms-service.env + lms: + - ../../../../ansible/roles/stack-sunbird/templates/sunbird_lms-service.env + - ../../../../ansible/roles/stack-sunbird/templates/lms-service_logback.xml knowledgemw: ../../../../ansible/roles/stack-sunbird/templates/sunbird_knowledge-mw-service.env apimanager: ../../../../ansible/roles/stack-api-manager/templates/api-manager.env cert: ../../../../ansible/roles/stack-sunbird/templates/sunbird_cert-service.env diff --git a/ansible/roles/stack-sunbird/templates/lms-service_logback.xml b/ansible/roles/stack-sunbird/templates/lms-service_logback.xml new file mode 100644 index 000000000..95da934f0 --- /dev/null +++ b/ansible/roles/stack-sunbird/templates/lms-service_logback.xml @@ -0,0 +1,60 @@ + + + + + + + + + + %d %msg%n + + + + + + + + + + + + + + + + + + + + %msg + + + ${sunbird_environment}.telemetry.raw + + + + + + + + + bootstrap.servers=${kafka_urls} + + acks=0 + + linger.ms=15000 + + max.block.ms=0 + + client.id=${HOSTNAME}-${CONTEXT_NAME}-logback-relaxed + + + + + + + + + + \ No newline at end of file diff --git a/kubernetes/helm_charts/core/lms/templates/deployment.yaml b/kubernetes/helm_charts/core/lms/templates/deployment.yaml index e953a1d0d..e28a9d341 100644 --- a/kubernetes/helm_charts/core/lms/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/lms/templates/deployment.yaml @@ -24,6 +24,10 @@ spec: imagePullSecrets: - name: {{ .Values.imagepullsecrets }} {{- end }} + volumes: + - name: {{ .Chart.Name }}-xml-config + configMap: + name: {{ .Chart.Name }}-xml-config containers: - name: {{ .Chart.Name }} image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" @@ -44,11 +48,18 @@ spec: readinessProbe: {{ toYaml .Values.readinessProbe | indent 10 }} {{- end }} + volumeMounts: + - name: {{ .Chart.Name }}-xml-config + mountPath: /home/sunbird/lms/lms-service-1.0-SNAPSHOT/config/logback.xml + subPath: lms-service_logback.xml {{- $keys := .Files.Glob "keys/*" }} {{- if $keys }} volumeMounts: - mountPath: {{ .Values.lms_device_basepath }} name: access-keys + - name: {{ .Chart.Name }}-xml-config + mountPath: /home/sunbird/lms/lms-service-1.0-SNAPSHOT/config/logback.xml + subPath: lms-service_logback.xml volumes: - name: access-keys secret: From 50c1bd2857827704ef4db41902a7e8daf83d5092 Mon Sep 17 00:00:00 2001 From: Pradyumna Nagendra Date: Fri, 19 Jun 2020 17:20:18 +0530 Subject: [PATCH 2522/2894] Issue #TG-234 feat: Added logback configuration for lms-service --- kubernetes/helm_charts/core/lms/templates/deployment.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kubernetes/helm_charts/core/lms/templates/deployment.yaml b/kubernetes/helm_charts/core/lms/templates/deployment.yaml index dd396bb30..41b4498a8 100644 --- a/kubernetes/helm_charts/core/lms/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/lms/templates/deployment.yaml @@ -48,10 +48,6 @@ spec: readinessProbe: {{ toYaml .Values.readinessProbe | indent 10 }} {{- end }} - volumeMounts: - - name: {{ .Chart.Name }}-xml-config - mountPath: /home/sunbird/lms/lms-service-1.0-SNAPSHOT/config/logback.xml - subPath: lms-service_logback.xml {{- $keys := .Files.Glob "keys/*" }} {{- if $keys }} volumeMounts: @@ -62,6 +58,10 @@ spec: secret: secretName: lms-access-keys {{- end }} +volumeMounts: + - name: {{ .Chart.Name }}-xml-config + mountPath: /home/sunbird/lms/lms-service-1.0-SNAPSHOT/config/logback.xml + subPath: lms-service_logback.xml --- apiVersion: v1 From 6e26cbcf15b697fa2381449e702fcf03233ab6a5 Mon Sep 17 00:00:00 2001 From: Pradyumna Nagendra Date: Fri, 19 Jun 2020 17:30:08 +0530 Subject: [PATCH 2523/2894] Issue #TG-234 feat: Added logback configuration for lms-service --- .../core/lms/templates/deployment.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/kubernetes/helm_charts/core/lms/templates/deployment.yaml b/kubernetes/helm_charts/core/lms/templates/deployment.yaml index 41b4498a8..17f14d901 100644 --- a/kubernetes/helm_charts/core/lms/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/lms/templates/deployment.yaml @@ -24,10 +24,6 @@ spec: imagePullSecrets: - name: {{ .Values.imagepullsecrets }} {{- end }} - volumes: - - name: {{ .Chart.Name }}-xml-config - configMap: - name: {{ .Chart.Name }}-xml-config containers: - name: {{ .Chart.Name }} image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" @@ -48,6 +44,10 @@ spec: readinessProbe: {{ toYaml .Values.readinessProbe | indent 10 }} {{- end }} + volumeMounts: + - name: {{ .Chart.Name }}-xml-config + mountPath: /home/sunbird/lms/lms-service-1.0-SNAPSHOT/config/logback.xml + subPath: lms-service_logback.xml {{- $keys := .Files.Glob "keys/*" }} {{- if $keys }} volumeMounts: @@ -58,10 +58,10 @@ spec: secret: secretName: lms-access-keys {{- end }} -volumeMounts: - - name: {{ .Chart.Name }}-xml-config - mountPath: /home/sunbird/lms/lms-service-1.0-SNAPSHOT/config/logback.xml - subPath: lms-service_logback.xml + volumes: + - name: {{ .Chart.Name }}-xml-config + configMap: + name: {{ .Chart.Name }}-xml-config --- apiVersion: v1 From 765cf9dd046cb663c30091c5f904e66e8618a015 Mon Sep 17 00:00:00 2001 From: Pradyumna Nagendra Date: Fri, 19 Jun 2020 17:47:54 +0530 Subject: [PATCH 2524/2894] Issue #TG-234 feat: Added logback configuration for lms-service --- kubernetes/helm_charts/core/lms/templates/deployment.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kubernetes/helm_charts/core/lms/templates/deployment.yaml b/kubernetes/helm_charts/core/lms/templates/deployment.yaml index 17f14d901..8ecc577e1 100644 --- a/kubernetes/helm_charts/core/lms/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/lms/templates/deployment.yaml @@ -44,10 +44,6 @@ spec: readinessProbe: {{ toYaml .Values.readinessProbe | indent 10 }} {{- end }} - volumeMounts: - - name: {{ .Chart.Name }}-xml-config - mountPath: /home/sunbird/lms/lms-service-1.0-SNAPSHOT/config/logback.xml - subPath: lms-service_logback.xml {{- $keys := .Files.Glob "keys/*" }} {{- if $keys }} volumeMounts: @@ -62,6 +58,10 @@ spec: - name: {{ .Chart.Name }}-xml-config configMap: name: {{ .Chart.Name }}-xml-config + volumeMounts: + - name: {{ .Chart.Name }}-xml-config + mountPath: /home/sunbird/lms/lms-service-1.0-SNAPSHOT/config/logback.xml + subPath: lms-service_logback.xml --- apiVersion: v1 From abb5cd2fcbc96c767da649f7d64ca58718463792 Mon Sep 17 00:00:00 2001 From: Pradyumna Nagendra Date: Fri, 19 Jun 2020 18:06:14 +0530 Subject: [PATCH 2525/2894] Issue #TG-234 feat: Added logback configuration for lms-service --- .../core/lms/templates/deployment.yaml | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/kubernetes/helm_charts/core/lms/templates/deployment.yaml b/kubernetes/helm_charts/core/lms/templates/deployment.yaml index 8ecc577e1..733531490 100644 --- a/kubernetes/helm_charts/core/lms/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/lms/templates/deployment.yaml @@ -44,25 +44,25 @@ spec: readinessProbe: {{ toYaml .Values.readinessProbe | indent 10 }} {{- end }} + volumeMounts: + - name: {{ .Chart.Name }}-xml-config + mountPath: /home/sunbird/lms/lms-service-1.0-SNAPSHOT/config/logback.xml + subPath: lms-service_logback.xml {{- $keys := .Files.Glob "keys/*" }} {{- if $keys }} - volumeMounts: - mountPath: {{ .Values.lms_device_basepath }} name: access-keys - volumes: - - name: access-keys - secret: - secretName: lms-access-keys {{- end }} volumes: - name: {{ .Chart.Name }}-xml-config configMap: name: {{ .Chart.Name }}-xml-config - volumeMounts: - - name: {{ .Chart.Name }}-xml-config - mountPath: /home/sunbird/lms/lms-service-1.0-SNAPSHOT/config/logback.xml - subPath: lms-service_logback.xml - +{{- $keys := .Files.Glob "keys/*" }} +{{- if $keys }} + - name: access-keys + secret: + secretName: lms-access-keys +{{- end }} --- apiVersion: v1 kind: Service From 086942046f9bc586d3db630c2c11dce4aa33f18d Mon Sep 17 00:00:00 2001 From: Pradyumna Nagendra Date: Fri, 19 Jun 2020 18:16:12 +0530 Subject: [PATCH 2526/2894] Issue #TG-234 feat: Added logback configuration for lms-service --- .../core/lms/templates/deployment.yaml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/kubernetes/helm_charts/core/lms/templates/deployment.yaml b/kubernetes/helm_charts/core/lms/templates/deployment.yaml index e28a9d341..1c797c37e 100644 --- a/kubernetes/helm_charts/core/lms/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/lms/templates/deployment.yaml @@ -49,22 +49,24 @@ spec: {{ toYaml .Values.readinessProbe | indent 10 }} {{- end }} volumeMounts: - - name: {{ .Chart.Name }}-xml-config - mountPath: /home/sunbird/lms/lms-service-1.0-SNAPSHOT/config/logback.xml - subPath: lms-service_logback.xml + - name: {{ .Chart.Name }}-xml-config + mountPath: /home/sunbird/lms/lms-service-1.0-SNAPSHOT/config/logback.xml + subPath: lms-service_logback.xml {{- $keys := .Files.Glob "keys/*" }} {{- if $keys }} - volumeMounts: - mountPath: {{ .Values.lms_device_basepath }} name: access-keys - - name: {{ .Chart.Name }}-xml-config - mountPath: /home/sunbird/lms/lms-service-1.0-SNAPSHOT/config/logback.xml - subPath: lms-service_logback.xml +{{- end }} volumes: + - name: {{ .Chart.Name }}-xml-config + configMap: + name: {{ .Chart.Name }}-xml-config +{{- $keys := .Files.Glob "keys/*" }} +{{- if $keys }} - name: access-keys secret: secretName: lms-access-keys -{{ end }} +{{- end }} --- apiVersion: v1 From de83bb48c59b3c902dd451f7638328a59e18dbfb Mon Sep 17 00:00:00 2001 From: Keshav Prasad Date: Tue, 23 Jun 2020 07:00:47 +0530 Subject: [PATCH 2527/2894] fix: success query to not include total (#1609) --- .../monitoring/dashboards/dashboards/api-manager.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kubernetes/helm_charts/monitoring/dashboards/dashboards/api-manager.json b/kubernetes/helm_charts/monitoring/dashboards/dashboards/api-manager.json index c743171b9..348bb29af 100644 --- a/kubernetes/helm_charts/monitoring/dashboards/dashboards/api-manager.json +++ b/kubernetes/helm_charts/monitoring/dashboards/dashboards/api-manager.json @@ -16,7 +16,7 @@ "gnetId": null, "graphTooltip": 0, "id": 63, - "iteration": 1592480632299, + "iteration": 1592854780910, "links": [], "panels": [ { @@ -498,7 +498,7 @@ "steppedLine": false, "targets": [ { - "expr": "sum(sum(increase(kong_request_status_count{cluster=~\"$cluster\", api=~\"${api}\",status_code=~\"2..|3..|total\"}[5m])) by (api, status_code) / ignoring(api, status_code) group_left sum(increase(kong_request_status_count{cluster=~\"$cluster\", api=~\"${api}\", status_code !~ \"total\"}[5m]))) by (api,status_code)", + "expr": "sum(sum(increase(kong_request_status_count{cluster=~\"$cluster\", api=~\"${api}\",status_code !~ \"total\",status_code=~\"2..|3..\"}[5m])) by (api, status_code) / ignoring(api, status_code) group_left sum(increase(kong_request_status_count{cluster=~\"$cluster\", api=~\"${api}\",status_code !~ \"total\"}[5m]))) by (api,status_code)", "format": "time_series", "interval": "", "intervalFactor": 2, @@ -852,7 +852,7 @@ "type": "row" } ], - "refresh": "", + "refresh": "30s", "schemaVersion": 21, "style": "dark", "tags": [], @@ -1019,5 +1019,5 @@ "timezone": "", "title": "API Manager", "uid": "CNtX7XqWz", - "version": 19 + "version": 23 } From 13b56ee759a2c3c5a0905b93a2e6a537fb252d04 Mon Sep 17 00:00:00 2001 From: "S M Y ALTAMASH smy.altamash@gmail.com" Date: Tue, 23 Jun 2020 15:27:25 +0530 Subject: [PATCH 2528/2894] Remove liveliness success threshold --- ansible/roles/stack-sunbird/defaults/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/ansible/roles/stack-sunbird/defaults/main.yml b/ansible/roles/stack-sunbird/defaults/main.yml index 3ef9b60d5..e7f8d4994 100644 --- a/ansible/roles/stack-sunbird/defaults/main.yml +++ b/ansible/roles/stack-sunbird/defaults/main.yml @@ -649,7 +649,6 @@ taxonomy_liveness_readiness: periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 5 - successThreshold: 2 report_liveness_readiness: healthcheck: true From e8d9919fded3f4bf9d4d7fced33432ce56f4871e Mon Sep 17 00:00:00 2001 From: Keshav Prasad Date: Tue, 23 Jun 2020 19:25:51 +0530 Subject: [PATCH 2529/2894] fix: write admin access log to stdout (#1611) * fix: write admin access log to stdout * fix: kong tag does not change based on commit --- images/kong/Dockerfile | 3 ++- .../helm_charts/core/apimanager/templates/deployment.yaml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/images/kong/Dockerfile b/images/kong/Dockerfile index ca9d0bff0..7d4a05f4d 100644 --- a/images/kong/Dockerfile +++ b/images/kong/Dockerfile @@ -13,7 +13,8 @@ ENTRYPOINT ["/docker-entrypoint.sh"] RUN mkdir -p /usr/local/kong/logs \ && ln -sf /tmp/logpipe /usr/local/kong/logs/access.log \ && ln -sf /tmp/logpipe /usr/local/kong/logs/serf.log \ - && ln -sf /tmp/logpipe /usr/local/kong/logs/error.log + && ln -sf /tmp/logpipe /usr/local/kong/logs/error.log \ + && ln -sf /tmp/logpipe /usr/local/kong/logs/admin_access.log EXPOSE 8000 8443 8001 7946 CMD ["kong", "start"] diff --git a/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml b/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml index 11b6f1b2a..ad1977b9b 100755 --- a/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml +++ b/kubernetes/helm_charts/core/apimanager/templates/deployment.yaml @@ -27,6 +27,7 @@ spec: containers: - name: {{ .Chart.Name }} image: "{{ .Values.dockerhub }}/{{ .Values.repository }}:{{ .Values.image_tag }}" + imagePullPolicy: Always envFrom: - configMapRef: name: {{ .Chart.Name }}-config From ce6c81f5dfc5a0a2f908977c3f58865a7fc033f1 Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Tue, 23 Jun 2020 23:52:47 +0530 Subject: [PATCH 2530/2894] fix: adding nginx worker options --- ansible/roles/stack-api-manager/templates/api-manager.env | 1 + 1 file changed, 1 insertion(+) diff --git a/ansible/roles/stack-api-manager/templates/api-manager.env b/ansible/roles/stack-api-manager/templates/api-manager.env index b1c87013b..8cc27d557 100644 --- a/ansible/roles/stack-api-manager/templates/api-manager.env +++ b/ansible/roles/stack-api-manager/templates/api-manager.env @@ -9,3 +9,4 @@ KONG_ADMIN_LISTEN=0.0.0.0:8001 KONG_MEM_CACHE_SIZE={{ kong_mem_cache_size | default('256m') }} KONG_TRUSTED_IPS=0.0.0.0/0,::/0 KONG_UPSTREAM_KEEPALIVE={{ kong_upstream_keepalive | default('200') }} +KONG_NGINX_WORKER_PROCESSES: {{ kong_nginx_worker_processes | default('auto')}} From 9860d6eebeec1fdf9430b8ba1b0de0b1b516aad5 Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Wed, 24 Jun 2020 00:01:28 +0530 Subject: [PATCH 2531/2894] fix: syntax issue --- ansible/roles/stack-api-manager/templates/api-manager.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/stack-api-manager/templates/api-manager.env b/ansible/roles/stack-api-manager/templates/api-manager.env index 8cc27d557..e4210de8e 100644 --- a/ansible/roles/stack-api-manager/templates/api-manager.env +++ b/ansible/roles/stack-api-manager/templates/api-manager.env @@ -9,4 +9,4 @@ KONG_ADMIN_LISTEN=0.0.0.0:8001 KONG_MEM_CACHE_SIZE={{ kong_mem_cache_size | default('256m') }} KONG_TRUSTED_IPS=0.0.0.0/0,::/0 KONG_UPSTREAM_KEEPALIVE={{ kong_upstream_keepalive | default('200') }} -KONG_NGINX_WORKER_PROCESSES: {{ kong_nginx_worker_processes | default('auto')}} +KONG_NGINX_WORKER_PROCESSES={{ kong_nginx_worker_processes | default('auto')}} From d4539e4210e153c780e6cc9c6e3bb248069beeb8 Mon Sep 17 00:00:00 2001 From: Rhea Fernandes <32357913+rheafernandes@users.noreply.github.com> Date: Wed, 24 Jun 2020 15:49:48 +0530 Subject: [PATCH 2532/2894] Updated configuration for disabling backward compatibility for content tagging properties (#1614) * Updated configuration for disabling backward compatibility for content tagging properties --- .../stack-sunbird/templates/search-service_application.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/stack-sunbird/templates/search-service_application.conf b/ansible/roles/stack-sunbird/templates/search-service_application.conf index 39bfc6d7d..09974786f 100644 --- a/ansible/roles/stack-sunbird/templates/search-service_application.conf +++ b/ansible/roles/stack-sunbird/templates/search-service_application.conf @@ -344,6 +344,6 @@ language.map={"Hindi":"hi", "English":"en", "Telugu":"te", "Kannada":"ka", "Tami channel.default="in.ekstep" compositesearch.index.name="{{ compositesearch_index_name }}" -content.tagging.backward_enable=true +content.tagging.backward_enable=false content.tagging.property=["subject","medium"] search.payload.log_enable=true From 18047a0fd0262d82e610624d74def1361ccf3f51 Mon Sep 17 00:00:00 2001 From: Kumar Gauraw Date: Wed, 24 Jun 2020 19:15:29 +0530 Subject: [PATCH 2533/2894] Issue #SC-0000 fix: updated endpoint for private content api --- ansible/roles/kong-api/defaults/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/kong-api/defaults/main.yml b/ansible/roles/kong-api/defaults/main.yml index f20fe8605..de186c8e9 100644 --- a/ansible/roles/kong-api/defaults/main.yml +++ b/ansible/roles/kong-api/defaults/main.yml @@ -2490,7 +2490,7 @@ kong_apis: - name: PrivateContentUploadAPI uris: "{{ private_content_prefix }}/v3/upload" - upstream_url: "{{ vm_learning_service_url }}/content/v3/upload" + upstream_url: "{{ content_service_url }}/content/v3/upload" strip_uri: true plugins: - name: jwt @@ -2562,7 +2562,7 @@ kong_apis: - name: PrivateContentHierarchyAPI uris: "{{ private_content_prefix }}/v3/hierarchy" - upstream_url: "{{ vm_learning_service_url }}/content/v3/hierarchy" + upstream_url: "{{ content_service_url }}/content/v3/hierarchy" strip_uri: true plugins: - name: jwt From c73854bffb7ffcc19bfb8873318748c8be3ddff3 Mon Sep 17 00:00:00 2001 From: Mahesh Kumar Gangula Date: Thu, 25 Jun 2020 12:05:06 +0530 Subject: [PATCH 2534/2894] Content State - Invalid data topic (#1618) * Issue #000 feat: added topic with key kafka_topics_contentstate_invalid --- ansible/inventory/env/group_vars/all.yml | 1 + ansible/roles/stack-sunbird/templates/sunbird_lms-service.env | 1 + 2 files changed, 2 insertions(+) diff --git a/ansible/inventory/env/group_vars/all.yml b/ansible/inventory/env/group_vars/all.yml index 5da2e6a85..49dc1dcfc 100644 --- a/ansible/inventory/env/group_vars/all.yml +++ b/ansible/inventory/env/group_vars/all.yml @@ -570,6 +570,7 @@ enc_n_reserved_keys: 15 # Number of keys which app reserves for usage kafka_topics_instruction: "{{env_name}}.coursebatch.job.request" kafka_urls: "{{groups['processing-cluster-kafka']|join(':9092,')}}:9092" kafka_topics_certificate_instruction: "{{env_name}}.coursebatch.certificate.request" +kafka_topics_contentstate_invalid: "{{env_name}}.contentstate.invalid" cert_service_container_name: "{{env}}-e-credentials" cert_service_cloud_storage_type: "{{cert_service_cloud_storage_type}}" diff --git a/ansible/roles/stack-sunbird/templates/sunbird_lms-service.env b/ansible/roles/stack-sunbird/templates/sunbird_lms-service.env index 67dad4d5e..7466383b9 100644 --- a/ansible/roles/stack-sunbird/templates/sunbird_lms-service.env +++ b/ansible/roles/stack-sunbird/templates/sunbird_lms-service.env @@ -105,6 +105,7 @@ kafka_topics_instruction={{kafka_topics_instruction}} kafka_urls={{kafka_urls}} kafka_topics_certificate_instruction={{kafka_topics_certificate_instruction}} kafka_assessment_topic={{kafka_assessment_topic}} +kafka_topics_contentstate_invalid={{kafka_topics_contentstate_invalid}} # Required by lms service to call cert service sunbird_cert_service_base_url=http://cert-service:9000 From a909f803f14cf8475d2b3959336e4f7d08a6c4ab Mon Sep 17 00:00:00 2001 From: deveshMantra <48819442+deveshMantra@users.noreply.github.com> Date: Mon, 29 Jun 2020 13:21:43 +0530 Subject: [PATCH 2535/2894] Issue #SH-539 fix:login text should be correct for google (#1620) * Issue #SH-539 fix:login text should be correct for google --- ansible/artifacts/sunbird/login/login.ftl | 2 +- .../artifacts/sunbird/login/messages/messages_en.properties | 3 ++- ansible/artifacts/sunbird/login/resources/css/login.css | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ansible/artifacts/sunbird/login/login.ftl b/ansible/artifacts/sunbird/login/login.ftl index a59c89272..bc64f414c 100644 --- a/ansible/artifacts/sunbird/login/login.ftl +++ b/ansible/artifacts/sunbird/login/login.ftl @@ -94,7 +94,7 @@
- -
<#elseif section = "info" > diff --git a/ansible/artifacts/sunbird/login/login-update-password.ftl b/ansible/artifacts/sunbird/login/login-update-password.ftl index 2035bbfbc..59985d8f5 100644 --- a/ansible/artifacts/sunbird/login/login-update-password.ftl +++ b/ansible/artifacts/sunbird/login/login-update-password.ftl @@ -3,15 +3,13 @@ <#if section = "title"> ${msg("updatePasswordTitle")} <#elseif section = "form"> -
-
-
-
-
+
+
+
${msg("newPasswordTitle")}
-
+
<#if message?has_content>
${message.summary} @@ -46,7 +44,7 @@
Passwords don't match.
-
@@ -58,8 +56,6 @@ -
-
diff --git a/ansible/artifacts/sunbird/login/login.ftl b/ansible/artifacts/sunbird/login/login.ftl index bc64f414c..6bbdc2350 100644 --- a/ansible/artifacts/sunbird/login/login.ftl +++ b/ansible/artifacts/sunbird/login/login.ftl @@ -7,14 +7,14 @@ <#if realm.password>
-
+
-
${msg("loginDiksha")}
+
${msg("loginDiksha")}

Login

${msg("mergeAccountMessage")}

${msg("migrateAccountMessage")}

-
+
<#if message?has_content>
${message.summary} @@ -23,7 +23,7 @@
suceess
error
-
+