From fb3b0a7c62f1e44fcdc7438817cfc2db2783d55d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20Gr=C3=A9au?= Date: Thu, 9 Apr 2020 16:55:23 -0400 Subject: [PATCH 01/44] [release] Initiate 7.7 branch (#541) We are starting using a git branching model like the Elastic Stack projects. This commit makes sure this `7.7` branch is using the 7.7.x-SNAPSHOT Docker images and this branch will be used for the development and release processes for the Helm Charts 7.7.x --- .ci/{jobs => jobs.t}/defaults.yml | 8 +- ...+helm-charts+{branch}+cluster-cleanup.yml} | 6 +- ...helm-charts+{branch}+cluster-creation.yml} | 6 +- ...harts+{branch}+integration-apm-server.yml} | 6 +- ...ts+{branch}+integration-elasticsearch.yml} | 6 +- ...-charts+{branch}+integration-filebeat.yml} | 6 +- ...lm-charts+{branch}+integration-kibana.yml} | 6 +- ...-charts+{branch}+integration-logstash.yml} | 6 +- ...harts+{branch}+integration-metricbeat.yml} | 6 +- ...arts+{branch}+staging+cluster-cleanup.yml} | 2 +- ...rts+{branch}+staging+cluster-creation.yml} | 2 +- ...ranch}+staging+integration-apm-server.yml} | 2 +- ...ch}+staging+integration-elasticsearch.yml} | 2 +- ...{branch}+staging+integration-filebeat.yml} | 2 +- ...s+{branch}+staging+integration-kibana.yml} | 2 +- ...{branch}+staging+integration-logstash.yml} | 2 +- ...ranch}+staging+integration-metricbeat.yml} | 2 +- .../elastic+helm-charts+{branch}+staging.yml} | 2 +- ...-charts+{branch}+template-lint-python.yml} | 6 +- ...helm-charts+{branch}+template-testing.yml} | 6 +- .../elastic+helm-charts+{branch}.yml} | 26 +- ...lm-charts+pull-request+cluster-cleanup.yml | 35 -- ...m-charts+pull-request+cluster-creation.yml | 35 -- ...ts+pull-request+integration-apm-server.yml | 39 -- ...pull-request+integration-elasticsearch.yml | 39 -- ...arts+pull-request+integration-filebeat.yml | 39 -- ...charts+pull-request+integration-kibana.yml | 39 -- ...arts+pull-request+integration-logstash.yml | 39 -- ...ts+pull-request+integration-metricbeat.yml | 39 -- ...c+helm-charts+pull-request+lint-python.yml | 22 - ...m-charts+pull-request+template-testing.yml | 25 - .ci/jobs/elastic+helm-charts+pull-request.yml | 68 --- .ci/make-branch-config.sh | 11 + CHANGELOG.md | 525 ------------------ apm-server/Chart.yaml | 4 +- apm-server/README.md | 48 +- apm-server/examples/6.x/Makefile | 15 - apm-server/examples/6.x/test/goss.yaml | 6 - apm-server/examples/6.x/values.yaml | 1 - apm-server/examples/default/test/goss.yaml | 2 +- apm-server/examples/oss/test/goss.yaml | 2 +- apm-server/examples/security/test/goss.yaml | 2 +- apm-server/values.yaml | 2 +- elasticsearch/Chart.yaml | 4 +- elasticsearch/README.md | 43 +- elasticsearch/examples/6.x/Makefile | 15 - elasticsearch/examples/6.x/test/goss.yaml | 17 - elasticsearch/examples/6.x/values.yaml | 4 - elasticsearch/examples/default/test/goss.yaml | 2 +- .../examples/openshift/test/goss.yaml | 2 +- elasticsearch/examples/oss/test/goss.yaml | 2 +- elasticsearch/examples/upgrade/test/goss.yaml | 2 +- elasticsearch/templates/NOTES.txt | 2 +- elasticsearch/values.yaml | 2 +- filebeat/Chart.yaml | 4 +- filebeat/README.md | 44 +- filebeat/examples/6.x/Makefile | 13 - filebeat/examples/6.x/test/goss.yaml | 21 - filebeat/examples/6.x/values.yaml | 5 - filebeat/examples/default/test/goss.yaml | 4 +- filebeat/examples/oss/test/goss.yaml | 2 +- filebeat/examples/security/test/goss.yaml | 2 +- filebeat/values.yaml | 2 +- helpers/bumper.py | 3 +- helpers/examples.mk | 2 +- helpers/matrix.yml | 6 - kibana/Chart.yaml | 4 +- kibana/README.md | 43 +- kibana/examples/6.x/Makefile | 12 - kibana/examples/6.x/test/goss.yaml | 10 - kibana/examples/6.x/values.yml | 4 - kibana/examples/default/test/goss.yaml | 2 +- kibana/values.yaml | 2 +- logstash/Chart.yaml | 4 +- logstash/README.md | 42 +- logstash/examples/6.x/Makefile | 16 - logstash/examples/6.x/test/goss.yaml | 38 -- logstash/examples/6.x/values.yaml | 3 - logstash/examples/default/test/goss.yaml | 2 +- .../examples/elasticsearch/test/goss.yaml | 2 +- logstash/examples/oss/test/goss.yaml | 2 +- logstash/values.yaml | 2 +- metricbeat/Chart.yaml | 4 +- metricbeat/README.md | 44 +- metricbeat/examples/6.x/Makefile | 17 - .../examples/6.x/test/goss-metrics.yaml | 43 -- metricbeat/examples/6.x/test/goss.yaml | 51 -- metricbeat/examples/6.x/values.yaml | 5 - .../examples/default/test/goss-metrics.yaml | 6 +- metricbeat/examples/default/test/goss.yaml | 6 +- .../examples/oss/test/goss-metrics.yaml | 6 +- metricbeat/examples/oss/test/goss.yaml | 6 +- .../examples/security/test/goss-metrics.yaml | 6 +- metricbeat/examples/security/test/goss.yaml | 6 +- metricbeat/examples/security/values.yaml | 8 +- metricbeat/values.yaml | 11 +- 96 files changed, 243 insertions(+), 1516 deletions(-) rename .ci/{jobs => jobs.t}/defaults.yml (78%) rename .ci/{jobs/elastic+helm-charts+master+cluster-cleanup.yml => jobs.t/elastic+helm-charts+{branch}+cluster-cleanup.yml} (84%) rename .ci/{jobs/elastic+helm-charts+master+cluster-creation.yml => jobs.t/elastic+helm-charts+{branch}+cluster-creation.yml} (83%) rename .ci/{jobs/elastic+helm-charts+master+integration-apm-server.yml => jobs.t/elastic+helm-charts+{branch}+integration-apm-server.yml} (84%) rename .ci/{jobs/elastic+helm-charts+master+integration-elasticsearch.yml => jobs.t/elastic+helm-charts+{branch}+integration-elasticsearch.yml} (83%) rename .ci/{jobs/elastic+helm-charts+master+integration-filebeat.yml => jobs.t/elastic+helm-charts+{branch}+integration-filebeat.yml} (84%) rename .ci/{jobs/elastic+helm-charts+master+integration-kibana.yml => jobs.t/elastic+helm-charts+{branch}+integration-kibana.yml} (85%) rename .ci/{jobs/elastic+helm-charts+master+integration-logstash.yml => jobs.t/elastic+helm-charts+{branch}+integration-logstash.yml} (84%) rename .ci/{jobs/elastic+helm-charts+master+integration-metricbeat.yml => jobs.t/elastic+helm-charts+{branch}+integration-metricbeat.yml} (84%) rename .ci/{jobs/elastic+helm-charts+staging+cluster-cleanup.yml => jobs.t/elastic+helm-charts+{branch}+staging+cluster-cleanup.yml} (94%) rename .ci/{jobs/elastic+helm-charts+staging+cluster-creation.yml => jobs.t/elastic+helm-charts+{branch}+staging+cluster-creation.yml} (94%) rename .ci/{jobs/elastic+helm-charts+staging+integration-apm-server.yml => jobs.t/elastic+helm-charts+{branch}+staging+integration-apm-server.yml} (95%) rename .ci/{jobs/elastic+helm-charts+staging+integration-elasticsearch.yml => jobs.t/elastic+helm-charts+{branch}+staging+integration-elasticsearch.yml} (95%) rename .ci/{jobs/elastic+helm-charts+staging+integration-filebeat.yml => jobs.t/elastic+helm-charts+{branch}+staging+integration-filebeat.yml} (95%) rename .ci/{jobs/elastic+helm-charts+staging+integration-kibana.yml => jobs.t/elastic+helm-charts+{branch}+staging+integration-kibana.yml} (95%) rename .ci/{jobs/elastic+helm-charts+staging+integration-logstash.yml => jobs.t/elastic+helm-charts+{branch}+staging+integration-logstash.yml} (95%) rename .ci/{jobs/elastic+helm-charts+staging+integration-metricbeat.yml => jobs.t/elastic+helm-charts+{branch}+staging+integration-metricbeat.yml} (95%) rename .ci/{jobs/elastic+helm-charts+staging.yml => jobs.t/elastic+helm-charts+{branch}+staging.yml} (97%) rename .ci/{jobs/elastic+helm-charts+master+template-lint-python.yml => jobs.t/elastic+helm-charts+{branch}+template-lint-python.yml} (72%) rename .ci/{jobs/elastic+helm-charts+master+template-testing.yml => jobs.t/elastic+helm-charts+{branch}+template-testing.yml} (69%) rename .ci/{jobs/elastic+helm-charts+master.yml => jobs.t/elastic+helm-charts+{branch}.yml} (54%) delete mode 100644 .ci/jobs/elastic+helm-charts+pull-request+cluster-cleanup.yml delete mode 100644 .ci/jobs/elastic+helm-charts+pull-request+cluster-creation.yml delete mode 100644 .ci/jobs/elastic+helm-charts+pull-request+integration-apm-server.yml delete mode 100644 .ci/jobs/elastic+helm-charts+pull-request+integration-elasticsearch.yml delete mode 100644 .ci/jobs/elastic+helm-charts+pull-request+integration-filebeat.yml delete mode 100644 .ci/jobs/elastic+helm-charts+pull-request+integration-kibana.yml delete mode 100644 .ci/jobs/elastic+helm-charts+pull-request+integration-logstash.yml delete mode 100644 .ci/jobs/elastic+helm-charts+pull-request+integration-metricbeat.yml delete mode 100644 .ci/jobs/elastic+helm-charts+pull-request+lint-python.yml delete mode 100644 .ci/jobs/elastic+helm-charts+pull-request+template-testing.yml delete mode 100644 .ci/jobs/elastic+helm-charts+pull-request.yml create mode 100755 .ci/make-branch-config.sh delete mode 100644 CHANGELOG.md delete mode 100644 apm-server/examples/6.x/Makefile delete mode 100644 apm-server/examples/6.x/test/goss.yaml delete mode 100644 apm-server/examples/6.x/values.yaml delete mode 100644 elasticsearch/examples/6.x/Makefile delete mode 100644 elasticsearch/examples/6.x/test/goss.yaml delete mode 100644 elasticsearch/examples/6.x/values.yaml delete mode 100644 filebeat/examples/6.x/Makefile delete mode 100644 filebeat/examples/6.x/test/goss.yaml delete mode 100644 filebeat/examples/6.x/values.yaml delete mode 100644 kibana/examples/6.x/Makefile delete mode 100644 kibana/examples/6.x/test/goss.yaml delete mode 100644 kibana/examples/6.x/values.yml delete mode 100644 logstash/examples/6.x/Makefile delete mode 100644 logstash/examples/6.x/test/goss.yaml delete mode 100644 logstash/examples/6.x/values.yaml delete mode 100644 metricbeat/examples/6.x/Makefile delete mode 100644 metricbeat/examples/6.x/test/goss-metrics.yaml delete mode 100644 metricbeat/examples/6.x/test/goss.yaml delete mode 100644 metricbeat/examples/6.x/values.yaml diff --git a/.ci/jobs/defaults.yml b/.ci/jobs.t/defaults.yml similarity index 78% rename from .ci/jobs/defaults.yml rename to .ci/jobs.t/defaults.yml index c7973dd8c..bd44228dd 100644 --- a/.ci/jobs/defaults.yml +++ b/.ci/jobs.t/defaults.yml @@ -12,12 +12,6 @@ logrotate: daysToKeep: 30 numToKeep: 100 - parameters: - - string: - name: branch_specifier - default: master - description: the Git branch specifier to build (<branchName>, <tagName>, - <commitId>, etc.) properties: - github: url: https://github.com/elastic/helm-charts/ @@ -30,7 +24,7 @@ credentials-id: f6c7695a-671e-4f4f-a331-acdce44ff9ba reference-repo: /var/lib/jenkins/.git-references/helm-charts.git branches: - - ${branch_specifier} + - "%BRANCH%" url: git@github.com:elastic/helm-charts.git basedir: '' wipe-workspace: 'True' diff --git a/.ci/jobs/elastic+helm-charts+master+cluster-cleanup.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+cluster-cleanup.yml similarity index 84% rename from .ci/jobs/elastic+helm-charts+master+cluster-cleanup.yml rename to .ci/jobs.t/elastic+helm-charts+{branch}+cluster-cleanup.yml index 37862f81a..389ef8db2 100644 --- a/.ci/jobs/elastic+helm-charts+master+cluster-cleanup.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+cluster-cleanup.yml @@ -1,8 +1,8 @@ --- - job: - name: elastic+helm-charts+master+cluster-cleanup - display-name: elastic / helm-charts - master - cluster cleanup - description: Master - cluster cleanup + name: elastic+helm-charts+%BRANCH%+cluster-cleanup + display-name: elastic / helm-charts - %BRANCH% - cluster cleanup + description: cluster cleanup scm: - git: wipe-workspace: 'True' diff --git a/.ci/jobs/elastic+helm-charts+master+cluster-creation.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+cluster-creation.yml similarity index 83% rename from .ci/jobs/elastic+helm-charts+master+cluster-creation.yml rename to .ci/jobs.t/elastic+helm-charts+{branch}+cluster-creation.yml index c1698c76d..c38168fc2 100644 --- a/.ci/jobs/elastic+helm-charts+master+cluster-creation.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+cluster-creation.yml @@ -1,8 +1,8 @@ --- - job: - name: elastic+helm-charts+master+cluster-creation - display-name: elastic / helm-charts - master - cluster creation - description: Master - cluster creation + name: elastic+helm-charts+%BRANCH%+cluster-creation + display-name: elastic / helm-charts - %BRANCH% - cluster creation + description: cluster creation scm: - git: wipe-workspace: 'True' diff --git a/.ci/jobs/elastic+helm-charts+master+integration-apm-server.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-apm-server.yml similarity index 84% rename from .ci/jobs/elastic+helm-charts+master+integration-apm-server.yml rename to .ci/jobs.t/elastic+helm-charts+{branch}+integration-apm-server.yml index 8a6d1b75b..db65f2e2d 100644 --- a/.ci/jobs/elastic+helm-charts+master+integration-apm-server.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-apm-server.yml @@ -1,8 +1,8 @@ --- - job: - name: elastic+helm-charts+master+integration-apm-server - display-name: elastic / helm-charts - master - integration apm-server - description: Master - integration apm-server + name: elastic+helm-charts+%BRANCH%+integration-apm-server + display-name: elastic / helm-charts - %BRANCH% - integration apm-server + description: integration apm-server scm: - git: wipe-workspace: 'True' diff --git a/.ci/jobs/elastic+helm-charts+master+integration-elasticsearch.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-elasticsearch.yml similarity index 83% rename from .ci/jobs/elastic+helm-charts+master+integration-elasticsearch.yml rename to .ci/jobs.t/elastic+helm-charts+{branch}+integration-elasticsearch.yml index 7bb9ea7f6..8ba86cf7f 100644 --- a/.ci/jobs/elastic+helm-charts+master+integration-elasticsearch.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-elasticsearch.yml @@ -1,8 +1,8 @@ --- - job: - name: elastic+helm-charts+master+integration-elasticsearch - display-name: elastic / helm-charts - master - integration elasticsearch - description: Master - integration elasticsearch + name: elastic+helm-charts+%BRANCH%+integration-elasticsearch + display-name: elastic / helm-charts - %BRANCH% - integration elasticsearch + description: integration elasticsearch scm: - git: wipe-workspace: 'True' diff --git a/.ci/jobs/elastic+helm-charts+master+integration-filebeat.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-filebeat.yml similarity index 84% rename from .ci/jobs/elastic+helm-charts+master+integration-filebeat.yml rename to .ci/jobs.t/elastic+helm-charts+{branch}+integration-filebeat.yml index 661d5e993..4cb374036 100644 --- a/.ci/jobs/elastic+helm-charts+master+integration-filebeat.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-filebeat.yml @@ -1,8 +1,8 @@ --- - job: - name: elastic+helm-charts+master+integration-filebeat - display-name: elastic / helm-charts - master - integration filebeat - description: Master - integration filebeat + name: elastic+helm-charts+%BRANCH%+integration-filebeat + display-name: elastic / helm-charts - %BRANCH% - integration filebeat + description: integration filebeat scm: - git: wipe-workspace: 'True' diff --git a/.ci/jobs/elastic+helm-charts+master+integration-kibana.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-kibana.yml similarity index 85% rename from .ci/jobs/elastic+helm-charts+master+integration-kibana.yml rename to .ci/jobs.t/elastic+helm-charts+{branch}+integration-kibana.yml index d689e9143..65b4e47b8 100644 --- a/.ci/jobs/elastic+helm-charts+master+integration-kibana.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-kibana.yml @@ -1,8 +1,8 @@ --- - job: - name: elastic+helm-charts+master+integration-kibana - display-name: elastic / helm-charts - master - integration kibana - description: Master - integration kibana + name: elastic+helm-charts+%BRANCH%+integration-kibana + display-name: elastic / helm-charts - %BRANCH% - integration kibana + description: integration kibana scm: - git: wipe-workspace: 'True' diff --git a/.ci/jobs/elastic+helm-charts+master+integration-logstash.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-logstash.yml similarity index 84% rename from .ci/jobs/elastic+helm-charts+master+integration-logstash.yml rename to .ci/jobs.t/elastic+helm-charts+{branch}+integration-logstash.yml index b3f75f4c5..a88c04954 100644 --- a/.ci/jobs/elastic+helm-charts+master+integration-logstash.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-logstash.yml @@ -1,8 +1,8 @@ --- - job: - name: elastic+helm-charts+master+integration-logstash - display-name: elastic / helm-charts - master - integration logstash - description: Master - integration logstash + name: elastic+helm-charts+%BRANCH%+integration-logstash + display-name: elastic / helm-charts - %BRANCH% - integration logstash + description: integration logstash scm: - git: wipe-workspace: 'True' diff --git a/.ci/jobs/elastic+helm-charts+master+integration-metricbeat.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-metricbeat.yml similarity index 84% rename from .ci/jobs/elastic+helm-charts+master+integration-metricbeat.yml rename to .ci/jobs.t/elastic+helm-charts+{branch}+integration-metricbeat.yml index 480b700e2..c34a03a2d 100644 --- a/.ci/jobs/elastic+helm-charts+master+integration-metricbeat.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-metricbeat.yml @@ -1,8 +1,8 @@ --- - job: - name: elastic+helm-charts+master+integration-metricbeat - display-name: elastic / helm-charts - master - integration metricbeat - description: Master - integration metricbeat + name: elastic+helm-charts+%BRANCH%+integration-metricbeat + display-name: elastic / helm-charts - %BRANCH% - integration metricbeat + description: integration metricbeat scm: - git: wipe-workspace: 'True' diff --git a/.ci/jobs/elastic+helm-charts+staging+cluster-cleanup.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+staging+cluster-cleanup.yml similarity index 94% rename from .ci/jobs/elastic+helm-charts+staging+cluster-cleanup.yml rename to .ci/jobs.t/elastic+helm-charts+{branch}+staging+cluster-cleanup.yml index df2daf77d..7c6bc2dc9 100644 --- a/.ci/jobs/elastic+helm-charts+staging+cluster-cleanup.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+staging+cluster-cleanup.yml @@ -1,6 +1,6 @@ --- - job: - name: elastic+helm-charts+staging+cluster-cleanup + name: elastic+helm-charts+%BRANCH%+staging+cluster-cleanup display-name: elastic / helm-charts - staging - cluster cleanup description: staging - cluster cleanup parameters: diff --git a/.ci/jobs/elastic+helm-charts+staging+cluster-creation.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+staging+cluster-creation.yml similarity index 94% rename from .ci/jobs/elastic+helm-charts+staging+cluster-creation.yml rename to .ci/jobs.t/elastic+helm-charts+{branch}+staging+cluster-creation.yml index 8770a257a..0279a6cfb 100644 --- a/.ci/jobs/elastic+helm-charts+staging+cluster-creation.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+staging+cluster-creation.yml @@ -1,6 +1,6 @@ --- - job: - name: elastic+helm-charts+staging+cluster-creation + name: elastic+helm-charts+%BRANCH%+staging+cluster-creation display-name: elastic / helm-charts - staging - cluster creation description: staging - cluster creation parameters: diff --git a/.ci/jobs/elastic+helm-charts+staging+integration-apm-server.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+staging+integration-apm-server.yml similarity index 95% rename from .ci/jobs/elastic+helm-charts+staging+integration-apm-server.yml rename to .ci/jobs.t/elastic+helm-charts+{branch}+staging+integration-apm-server.yml index cba2c4a69..0496ad456 100644 --- a/.ci/jobs/elastic+helm-charts+staging+integration-apm-server.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+staging+integration-apm-server.yml @@ -1,6 +1,6 @@ --- - job: - name: elastic+helm-charts+staging+integration-apm-server + name: elastic+helm-charts+%BRANCH%+staging+integration-apm-server display-name: elastic / helm-charts - staging - integration apm-server description: staging - integration apm-server parameters: diff --git a/.ci/jobs/elastic+helm-charts+staging+integration-elasticsearch.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+staging+integration-elasticsearch.yml similarity index 95% rename from .ci/jobs/elastic+helm-charts+staging+integration-elasticsearch.yml rename to .ci/jobs.t/elastic+helm-charts+{branch}+staging+integration-elasticsearch.yml index ef499b214..e441f2141 100644 --- a/.ci/jobs/elastic+helm-charts+staging+integration-elasticsearch.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+staging+integration-elasticsearch.yml @@ -1,6 +1,6 @@ --- - job: - name: elastic+helm-charts+staging+integration-elasticsearch + name: elastic+helm-charts+%BRANCH%+staging+integration-elasticsearch display-name: elastic / helm-charts - staging - integration elasticsearch description: staging - integration elasticsearch parameters: diff --git a/.ci/jobs/elastic+helm-charts+staging+integration-filebeat.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+staging+integration-filebeat.yml similarity index 95% rename from .ci/jobs/elastic+helm-charts+staging+integration-filebeat.yml rename to .ci/jobs.t/elastic+helm-charts+{branch}+staging+integration-filebeat.yml index f0d227cd3..da18266be 100644 --- a/.ci/jobs/elastic+helm-charts+staging+integration-filebeat.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+staging+integration-filebeat.yml @@ -1,6 +1,6 @@ --- - job: - name: elastic+helm-charts+staging+integration-filebeat + name: elastic+helm-charts+%BRANCH%+staging+integration-filebeat display-name: elastic / helm-charts - staging - integration filebeat description: staging - integration filebeat parameters: diff --git a/.ci/jobs/elastic+helm-charts+staging+integration-kibana.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+staging+integration-kibana.yml similarity index 95% rename from .ci/jobs/elastic+helm-charts+staging+integration-kibana.yml rename to .ci/jobs.t/elastic+helm-charts+{branch}+staging+integration-kibana.yml index f4a8e402b..8944098a1 100644 --- a/.ci/jobs/elastic+helm-charts+staging+integration-kibana.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+staging+integration-kibana.yml @@ -1,6 +1,6 @@ --- - job: - name: elastic+helm-charts+staging+integration-kibana + name: elastic+helm-charts+%BRANCH%+staging+integration-kibana display-name: elastic / helm-charts - staging - integration kibana description: staging - integration kibana parameters: diff --git a/.ci/jobs/elastic+helm-charts+staging+integration-logstash.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+staging+integration-logstash.yml similarity index 95% rename from .ci/jobs/elastic+helm-charts+staging+integration-logstash.yml rename to .ci/jobs.t/elastic+helm-charts+{branch}+staging+integration-logstash.yml index 01fcefe23..7db73f065 100644 --- a/.ci/jobs/elastic+helm-charts+staging+integration-logstash.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+staging+integration-logstash.yml @@ -1,6 +1,6 @@ --- - job: - name: elastic+helm-charts+staging+integration-logstash + name: elastic+helm-charts+%BRANCH%+staging+integration-logstash display-name: elastic / helm-charts - staging - integration logstash description: staging - integration logstash parameters: diff --git a/.ci/jobs/elastic+helm-charts+staging+integration-metricbeat.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+staging+integration-metricbeat.yml similarity index 95% rename from .ci/jobs/elastic+helm-charts+staging+integration-metricbeat.yml rename to .ci/jobs.t/elastic+helm-charts+{branch}+staging+integration-metricbeat.yml index 940a06e3d..1046c0a83 100644 --- a/.ci/jobs/elastic+helm-charts+staging+integration-metricbeat.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+staging+integration-metricbeat.yml @@ -1,6 +1,6 @@ --- - job: - name: elastic+helm-charts+staging+integration-metricbeat + name: elastic+helm-charts+%BRANCH%+staging+integration-metricbeat display-name: elastic / helm-charts - staging - integration metricbeat description: staging - integration metricbeat parameters: diff --git a/.ci/jobs/elastic+helm-charts+staging.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+staging.yml similarity index 97% rename from .ci/jobs/elastic+helm-charts+staging.yml rename to .ci/jobs.t/elastic+helm-charts+{branch}+staging.yml index 0c0b8efcf..5e6a135fc 100644 --- a/.ci/jobs/elastic+helm-charts+staging.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+staging.yml @@ -1,6 +1,6 @@ --- - job: - name: elastic+helm-charts+staging + name: elastic+helm-charts+%BRANCH%+staging display-name: elastic / helm-charts - staging description: Staging image testing concurrent: true diff --git a/.ci/jobs/elastic+helm-charts+master+template-lint-python.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+template-lint-python.yml similarity index 72% rename from .ci/jobs/elastic+helm-charts+master+template-lint-python.yml rename to .ci/jobs.t/elastic+helm-charts+{branch}+template-lint-python.yml index 25048d9e4..84ff14247 100644 --- a/.ci/jobs/elastic+helm-charts+master+template-lint-python.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+template-lint-python.yml @@ -1,8 +1,8 @@ --- - job: - name: elastic+helm-charts+master+lint-python - display-name: elastic / helm-charts - master - lint python - description: Master - lint python + name: elastic+helm-charts+%BRANCH%+lint-python + display-name: elastic / helm-charts - %BRANCH% - lint python + description: lint python scm: - git: wipe-workspace: 'True' diff --git a/.ci/jobs/elastic+helm-charts+master+template-testing.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+template-testing.yml similarity index 69% rename from .ci/jobs/elastic+helm-charts+master+template-testing.yml rename to .ci/jobs.t/elastic+helm-charts+{branch}+template-testing.yml index 5af16c9e9..1f09fea4a 100644 --- a/.ci/jobs/elastic+helm-charts+master+template-testing.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+template-testing.yml @@ -1,8 +1,8 @@ --- - job: - name: elastic+helm-charts+master+template-testing - display-name: elastic / helm-charts - master - template testing - description: Master - template testing + name: elastic+helm-charts+%BRANCH%+template-testing + display-name: elastic / helm-charts - %BRANCH% - template testing + description: template testing scm: - git: wipe-workspace: 'True' diff --git a/.ci/jobs/elastic+helm-charts+master.yml b/.ci/jobs.t/elastic+helm-charts+{branch}.yml similarity index 54% rename from .ci/jobs/elastic+helm-charts+master.yml rename to .ci/jobs.t/elastic+helm-charts+{branch}.yml index 03f35cc6b..44698a183 100644 --- a/.ci/jobs/elastic+helm-charts+master.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}.yml @@ -1,8 +1,8 @@ --- - job: - name: elastic+helm-charts+master - display-name: elastic / helm-charts - master - description: Master branch testing + name: elastic+helm-charts+%BRANCH% + display-name: elastic / helm-charts - %BRANCH% + description: branch testing project-type: multijob scm: - git: @@ -15,34 +15,34 @@ name: template testing and kubernetes cluster creation condition: SUCCESSFUL projects: - - name: elastic+helm-charts+master+template-testing + - name: elastic+helm-charts+%BRANCH%+template-testing current-parameters: true - - name: elastic+helm-charts+master+lint-python + - name: elastic+helm-charts+%BRANCH%+lint-python current-parameters: true - - name: elastic+helm-charts+master+cluster-creation + - name: elastic+helm-charts+%BRANCH%+cluster-creation current-parameters: true - multijob: name: elasticsearch integration testing condition: ALWAYS projects: - - name: elastic+helm-charts+master+integration-elasticsearch + - name: elastic+helm-charts+%BRANCH%+integration-elasticsearch current-parameters: true - multijob: name: integration testing condition: ALWAYS projects: - - name: elastic+helm-charts+master+integration-kibana + - name: elastic+helm-charts+%BRANCH%+integration-kibana current-parameters: true - - name: elastic+helm-charts+master+integration-filebeat + - name: elastic+helm-charts+%BRANCH%+integration-filebeat current-parameters: true - - name: elastic+helm-charts+master+integration-metricbeat + - name: elastic+helm-charts+%BRANCH%+integration-metricbeat current-parameters: true - - name: elastic+helm-charts+master+integration-logstash + - name: elastic+helm-charts+%BRANCH%+integration-logstash current-parameters: true - - name: elastic+helm-charts+master+integration-apm-server + - name: elastic+helm-charts+%BRANCH%+integration-apm-server current-parameters: true publishers: - trigger-parameterized-builds: - - project: elastic+helm-charts+master+cluster-cleanup + - project: elastic+helm-charts+%BRANCH%+cluster-cleanup current-parameters: true trigger-with-no-params: false diff --git a/.ci/jobs/elastic+helm-charts+pull-request+cluster-cleanup.yml b/.ci/jobs/elastic+helm-charts+pull-request+cluster-cleanup.yml deleted file mode 100644 index cbd0d55eb..000000000 --- a/.ci/jobs/elastic+helm-charts+pull-request+cluster-cleanup.yml +++ /dev/null @@ -1,35 +0,0 @@ ---- -- job: - name: elastic+helm-charts+pull-request+cluster-cleanup - display-name: elastic / helm-charts - pull-request - cluster cleanup - description: Pull request - cluster cleanup - scm: - - git: - refspec: +refs/pull/*:refs/remotes/origin/pr/* - axes: - - axis: - type: slave - name: label - values: - - docker&&virtual - - axis: - type: yaml - name: KUBERNETES_VERSION - filename: helpers/matrix.yml - builders: - - shell: |- - #!/usr/local/bin/runbld - set -euo pipefail - - source /usr/local/bin/bash_standard_lib.sh - - set +x - VAULT_TOKEN=$(retry 5 vault write -field=token auth/approle/login role_id="$VAULT_ROLE_ID" secret_id="$VAULT_SECRET_ID") - export VAULT_TOKEN - unset VAULT_ROLE_ID VAULT_SECRET_ID - set -x - - cluster_name="helm-${KUBERNETES_VERSION//./}-${branch_specifier:0:10}" - - cd helpers/terraform/ - ./in-docker make destroy KUBERNETES_VERSION=${KUBERNETES_VERSION} CLUSTER_NAME=${cluster_name} diff --git a/.ci/jobs/elastic+helm-charts+pull-request+cluster-creation.yml b/.ci/jobs/elastic+helm-charts+pull-request+cluster-creation.yml deleted file mode 100644 index d1b491080..000000000 --- a/.ci/jobs/elastic+helm-charts+pull-request+cluster-creation.yml +++ /dev/null @@ -1,35 +0,0 @@ ---- -- job: - name: elastic+helm-charts+pull-request+cluster-creation - display-name: elastic / helm-charts - pull-request - cluster creation - description: Pull request - cluster creation - scm: - - git: - refspec: +refs/pull/*:refs/remotes/origin/pr/* - axes: - - axis: - type: slave - name: label - values: - - docker&&virtual - - axis: - type: yaml - name: KUBERNETES_VERSION - filename: helpers/matrix.yml - builders: - - shell: |- - #!/usr/local/bin/runbld - set -euo pipefail - - source /usr/local/bin/bash_standard_lib.sh - - set +x - VAULT_TOKEN=$(retry 5 vault write -field=token auth/approle/login role_id="$VAULT_ROLE_ID" secret_id="$VAULT_SECRET_ID") - export VAULT_TOKEN - unset VAULT_ROLE_ID VAULT_SECRET_ID - set -x - - cluster_name="helm-${KUBERNETES_VERSION//./}-${branch_specifier:0:10}" - - cd helpers/terraform/ - ./in-docker make up KUBERNETES_VERSION=${KUBERNETES_VERSION} CLUSTER_NAME=${cluster_name} diff --git a/.ci/jobs/elastic+helm-charts+pull-request+integration-apm-server.yml b/.ci/jobs/elastic+helm-charts+pull-request+integration-apm-server.yml deleted file mode 100644 index 55b331e9d..000000000 --- a/.ci/jobs/elastic+helm-charts+pull-request+integration-apm-server.yml +++ /dev/null @@ -1,39 +0,0 @@ ---- -- job: - name: elastic+helm-charts+pull-request+integration-apm-server - display-name: elastic / helm-charts - pull-request - integration apm-server - description: Pull request - integration apm-server - scm: - - git: - refspec: +refs/pull/*:refs/remotes/origin/pr/* - axes: - - axis: - type: slave - name: label - values: - - docker&&virtual - - axis: - type: yaml - name: APM_SERVER_SUITE - filename: helpers/matrix.yml - - axis: - type: yaml - name: KUBERNETES_VERSION - filename: helpers/matrix.yml - builders: - - shell: |- - #!/usr/local/bin/runbld - set -euo pipefail - - source /usr/local/bin/bash_standard_lib.sh - - set +x - VAULT_TOKEN=$(retry 5 vault write -field=token auth/approle/login role_id="$VAULT_ROLE_ID" secret_id="$VAULT_SECRET_ID") - export VAULT_TOKEN - unset VAULT_ROLE_ID VAULT_SECRET_ID - set -x - - cluster_name="helm-${KUBERNETES_VERSION//./}-${branch_specifier:0:10}" - - cd helpers/terraform/ - ./in-docker make integration KUBERNETES_VERSION=${KUBERNETES_VERSION} CLUSTER_NAME=${cluster_name} SUITE=${APM_SERVER_SUITE} CHART=apm-server diff --git a/.ci/jobs/elastic+helm-charts+pull-request+integration-elasticsearch.yml b/.ci/jobs/elastic+helm-charts+pull-request+integration-elasticsearch.yml deleted file mode 100644 index a476a1d85..000000000 --- a/.ci/jobs/elastic+helm-charts+pull-request+integration-elasticsearch.yml +++ /dev/null @@ -1,39 +0,0 @@ ---- -- job: - name: elastic+helm-charts+pull-request+integration-elasticsearch - display-name: elastic / helm-charts - pull-request - integration elasticsearch - description: Pull request - integration elasticsearch - scm: - - git: - refspec: +refs/pull/*:refs/remotes/origin/pr/* - axes: - - axis: - type: slave - name: label - values: - - docker&&virtual - - axis: - type: yaml - name: ES_SUITE - filename: helpers/matrix.yml - - axis: - type: yaml - name: KUBERNETES_VERSION - filename: helpers/matrix.yml - builders: - - shell: |- - #!/usr/local/bin/runbld - set -euo pipefail - - source /usr/local/bin/bash_standard_lib.sh - - set +x - VAULT_TOKEN=$(retry 5 vault write -field=token auth/approle/login role_id="$VAULT_ROLE_ID" secret_id="$VAULT_SECRET_ID") - export VAULT_TOKEN - unset VAULT_ROLE_ID VAULT_SECRET_ID - set -x - - cluster_name="helm-${KUBERNETES_VERSION//./}-${branch_specifier:0:10}" - - cd helpers/terraform/ - ./in-docker make integration KUBERNETES_VERSION=${KUBERNETES_VERSION} CLUSTER_NAME=${cluster_name} SUITE=${ES_SUITE} CHART=elasticsearch diff --git a/.ci/jobs/elastic+helm-charts+pull-request+integration-filebeat.yml b/.ci/jobs/elastic+helm-charts+pull-request+integration-filebeat.yml deleted file mode 100644 index 3a1621fbb..000000000 --- a/.ci/jobs/elastic+helm-charts+pull-request+integration-filebeat.yml +++ /dev/null @@ -1,39 +0,0 @@ ---- -- job: - name: elastic+helm-charts+pull-request+integration-filebeat - display-name: elastic / helm-charts - pull-request - integration filebeat - description: Pull request - integration filebeat - scm: - - git: - refspec: +refs/pull/*:refs/remotes/origin/pr/* - axes: - - axis: - type: slave - name: label - values: - - docker&&virtual - - axis: - type: yaml - name: FILEBEAT_SUITE - filename: helpers/matrix.yml - - axis: - type: yaml - name: KUBERNETES_VERSION - filename: helpers/matrix.yml - builders: - - shell: |- - #!/usr/local/bin/runbld - set -euo pipefail - - source /usr/local/bin/bash_standard_lib.sh - - set +x - VAULT_TOKEN=$(retry 5 vault write -field=token auth/approle/login role_id="$VAULT_ROLE_ID" secret_id="$VAULT_SECRET_ID") - export VAULT_TOKEN - unset VAULT_ROLE_ID VAULT_SECRET_ID - set -x - - cluster_name="helm-${KUBERNETES_VERSION//./}-${branch_specifier:0:10}" - - cd helpers/terraform/ - ./in-docker make integration KUBERNETES_VERSION=${KUBERNETES_VERSION} CLUSTER_NAME=${cluster_name} SUITE=${FILEBEAT_SUITE} CHART=filebeat diff --git a/.ci/jobs/elastic+helm-charts+pull-request+integration-kibana.yml b/.ci/jobs/elastic+helm-charts+pull-request+integration-kibana.yml deleted file mode 100644 index ed2e6ec4a..000000000 --- a/.ci/jobs/elastic+helm-charts+pull-request+integration-kibana.yml +++ /dev/null @@ -1,39 +0,0 @@ ---- -- job: - name: elastic+helm-charts+pull-request+integration-kibana - display-name: elastic / helm-charts - pull-request - integration kibana - description: Pull request - integration kibana - scm: - - git: - refspec: +refs/pull/*:refs/remotes/origin/pr/* - axes: - - axis: - type: slave - name: label - values: - - docker&&virtual - - axis: - type: yaml - name: KIBANA_SUITE - filename: helpers/matrix.yml - - axis: - type: yaml - name: KUBERNETES_VERSION - filename: helpers/matrix.yml - builders: - - shell: |- - #!/usr/local/bin/runbld - set -euo pipefail - - source /usr/local/bin/bash_standard_lib.sh - - set +x - VAULT_TOKEN=$(retry 5 vault write -field=token auth/approle/login role_id="$VAULT_ROLE_ID" secret_id="$VAULT_SECRET_ID") - export VAULT_TOKEN - unset VAULT_ROLE_ID VAULT_SECRET_ID - set -x - - cluster_name="helm-${KUBERNETES_VERSION//./}-${branch_specifier:0:10}" - - cd helpers/terraform/ - ./in-docker make integration KUBERNETES_VERSION=${KUBERNETES_VERSION} CLUSTER_NAME=${cluster_name} SUITE=${KIBANA_SUITE} CHART=kibana diff --git a/.ci/jobs/elastic+helm-charts+pull-request+integration-logstash.yml b/.ci/jobs/elastic+helm-charts+pull-request+integration-logstash.yml deleted file mode 100644 index bf7066426..000000000 --- a/.ci/jobs/elastic+helm-charts+pull-request+integration-logstash.yml +++ /dev/null @@ -1,39 +0,0 @@ ---- -- job: - name: elastic+helm-charts+pull-request+integration-logstash - display-name: elastic / helm-charts - pull-request - integration logstash - description: Pull request - integration logstash - scm: - - git: - refspec: +refs/pull/*:refs/remotes/origin/pr/* - axes: - - axis: - type: slave - name: label - values: - - docker&&virtual - - axis: - type: yaml - name: LOGSTASH_SUITE - filename: helpers/matrix.yml - - axis: - type: yaml - name: KUBERNETES_VERSION - filename: helpers/matrix.yml - builders: - - shell: |- - #!/usr/local/bin/runbld - set -euo pipefail - - source /usr/local/bin/bash_standard_lib.sh - - set +x - VAULT_TOKEN=$(retry 5 vault write -field=token auth/approle/login role_id="$VAULT_ROLE_ID" secret_id="$VAULT_SECRET_ID") - export VAULT_TOKEN - unset VAULT_ROLE_ID VAULT_SECRET_ID - set -x - - cluster_name="helm-${KUBERNETES_VERSION//./}-${branch_specifier:0:10}" - - cd helpers/terraform/ - ./in-docker make integration KUBERNETES_VERSION=${KUBERNETES_VERSION} CLUSTER_NAME=${cluster_name} SUITE=${LOGSTASH_SUITE} CHART=logstash diff --git a/.ci/jobs/elastic+helm-charts+pull-request+integration-metricbeat.yml b/.ci/jobs/elastic+helm-charts+pull-request+integration-metricbeat.yml deleted file mode 100644 index 34c6ac2fb..000000000 --- a/.ci/jobs/elastic+helm-charts+pull-request+integration-metricbeat.yml +++ /dev/null @@ -1,39 +0,0 @@ ---- -- job: - name: elastic+helm-charts+pull-request+integration-metricbeat - display-name: elastic / helm-charts - pull-request - integration metricbeat - description: Pull request - integration metricbeat - scm: - - git: - refspec: +refs/pull/*:refs/remotes/origin/pr/* - axes: - - axis: - type: slave - name: label - values: - - docker&&virtual - - axis: - type: yaml - name: METRICBEAT_SUITE - filename: helpers/matrix.yml - - axis: - type: yaml - name: KUBERNETES_VERSION - filename: helpers/matrix.yml - builders: - - shell: |- - #!/usr/local/bin/runbld - set -euo pipefail - - source /usr/local/bin/bash_standard_lib.sh - - set +x - VAULT_TOKEN=$(retry 5 vault write -field=token auth/approle/login role_id="$VAULT_ROLE_ID" secret_id="$VAULT_SECRET_ID") - export VAULT_TOKEN - unset VAULT_ROLE_ID VAULT_SECRET_ID - set -x - - cluster_name="helm-${KUBERNETES_VERSION//./}-${branch_specifier:0:10}" - - cd helpers/terraform/ - ./in-docker make integration KUBERNETES_VERSION=${KUBERNETES_VERSION} CLUSTER_NAME=${cluster_name} SUITE=${METRICBEAT_SUITE} CHART=metricbeat diff --git a/.ci/jobs/elastic+helm-charts+pull-request+lint-python.yml b/.ci/jobs/elastic+helm-charts+pull-request+lint-python.yml deleted file mode 100644 index 5ec00f723..000000000 --- a/.ci/jobs/elastic+helm-charts+pull-request+lint-python.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -- job: - name: elastic+helm-charts+pull-request+lint-python - display-name: elastic / helm-charts - pull-request - lint python - description: Pull request - lint python - scm: - - git: - refspec: +refs/pull/*:refs/remotes/origin/pr/* - axes: - - axis: - type: slave - name: label - values: - - docker&&virtual&&ubuntu-18.04 - builders: - - shell: |- - #!/usr/local/bin/runbld - set -euo pipefail - - virtualenv -p python3 venv && source venv/bin/activate - pip install -r requirements.txt - make lint-python diff --git a/.ci/jobs/elastic+helm-charts+pull-request+template-testing.yml b/.ci/jobs/elastic+helm-charts+pull-request+template-testing.yml deleted file mode 100644 index 4f0a3ae93..000000000 --- a/.ci/jobs/elastic+helm-charts+pull-request+template-testing.yml +++ /dev/null @@ -1,25 +0,0 @@ ---- -- job: - name: elastic+helm-charts+pull-request+template-testing - display-name: elastic / helm-charts - pull-request - template testing - description: Pull request - template testing - scm: - - git: - refspec: +refs/pull/*:refs/remotes/origin/pr/* - axes: - - axis: - type: slave - name: label - values: - - docker&&virtual - - axis: - type: yaml - name: CHART - filename: helpers/matrix.yml - builders: - - shell: |- - #!/usr/local/bin/runbld - set -euo pipefail - - cd ${CHART} - make test diff --git a/.ci/jobs/elastic+helm-charts+pull-request.yml b/.ci/jobs/elastic+helm-charts+pull-request.yml deleted file mode 100644 index 382adf275..000000000 --- a/.ci/jobs/elastic+helm-charts+pull-request.yml +++ /dev/null @@ -1,68 +0,0 @@ ---- -- job: - name: elastic+helm-charts+pull-request - display-name: elastic / helm-charts - pull-request - description: Pull request testing - project-type: multijob - concurrent: true - scm: - - git: - branches: - - $ghprbActualCommit - refspec: +refs/pull/*:refs/remotes/origin/pr/* - basedir: elasticsearch - wipe-workspace: 'False' - triggers: - - github-pull-request: - github-hooks: true - org-list: - - elastic - allow-whitelist-orgs-as-admins: true - cancel-builds-on-update: true - status-context: devops-ci - builders: - - multijob: - name: template testing and kubernetes cluster creation - condition: SUCCESSFUL - projects: - - name: elastic+helm-charts+pull-request+template-testing - current-parameters: true - predefined-parameters: branch_specifier=${ghprbActualCommit} - - name: elastic+helm-charts+pull-request+lint-python - current-parameters: true - predefined-parameters: branch_specifier=${ghprbActualCommit} - - name: elastic+helm-charts+pull-request+cluster-creation - current-parameters: true - predefined-parameters: branch_specifier=${ghprbActualCommit} - - multijob: - name: elasticsearch integration testing - condition: ALWAYS - projects: - - name: elastic+helm-charts+pull-request+integration-elasticsearch - current-parameters: true - predefined-parameters: branch_specifier=${ghprbActualCommit} - - multijob: - name: integration testing - condition: ALWAYS - projects: - - name: elastic+helm-charts+pull-request+integration-kibana - current-parameters: true - predefined-parameters: branch_specifier=${ghprbActualCommit} - - name: elastic+helm-charts+pull-request+integration-filebeat - current-parameters: true - predefined-parameters: branch_specifier=${ghprbActualCommit} - - name: elastic+helm-charts+pull-request+integration-metricbeat - current-parameters: true - predefined-parameters: branch_specifier=${ghprbActualCommit} - - name: elastic+helm-charts+pull-request+integration-logstash - current-parameters: true - predefined-parameters: branch_specifier=${ghprbActualCommit} - - name: elastic+helm-charts+pull-request+integration-apm-server - current-parameters: true - predefined-parameters: branch_specifier=${ghprbActualCommit} - publishers: - - trigger-parameterized-builds: - - project: elastic+helm-charts+pull-request+cluster-cleanup - current-parameters: true - trigger-with-no-params: false - predefined-parameters: branch_specifier=${ghprbActualCommit} diff --git a/.ci/make-branch-config.sh b/.ci/make-branch-config.sh new file mode 100755 index 000000000..ca9554787 --- /dev/null +++ b/.ci/make-branch-config.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +if [ -z "$BRANCH" ] ; then + echo "BRANCH is unset" + exit 1 +fi + +rm -Rf .ci/jobs +cp -r .ci/jobs.t .ci/jobs + +sed -i "s/%BRANCH%/${BRANCH}/g" .ci/jobs/*.yml \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 39382aa59..000000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,525 +0,0 @@ -# Changelog - -## 7.6.2 - 2020/03/31 - -* 7.6.2 as the default stack version -* 6.8.8 as 6.x tested version -* Helm 2.16.5 support in [#537](https://github.com/elastic/helm-charts/pull/537) [@jmlrt](https://github.com/jmlrt) -* Drop GKE 1.13 tests in [#533](https://github.com/elastic/helm-charts/pull/533) [@jmlrt](https://github.com/jmlrt) -* Few dev environment tweaks in [#521](https://github.com/elastic/helm-charts/pull/521) [@Conky5](https://github.com/Conky5) -* Version bumping script enhancements in [#524](https://github.com/elastic/helm-charts/pull/524) [@Conky5](https://github.com/Conky5) -* Staging image testing in [#532](https://github.com/elastic/helm-charts/pull/532), [#544](https://github.com/elastic/helm-charts/pull/544) & [#545](https://github.com/elastic/helm-charts/pull/545) [@Conky5](https://github.com/Conky5) - -### APM Server - -| PR | Author | Title | -| ------------------------------------------------------ | -------------------------------------- | ------------------------------ | -|[#508](https://github.com/elastic/helm-charts/pull/508) | [@kawat55](https://github.com/kawat55) | Fix `fullnameOverride` setting | -|[#509](https://github.com/elastic/helm-charts/pull/509) | [@qqshfox](https://github.com/qqshfox) | Fix `apiVersion` of HPA | - -### Elasticsearch - -| PR | Author | Title | -| ------------------------------------------------------ | ---------------------------------------------------- | ------------------------------------------------------------- | -|[#485](https://github.com/elastic/helm-charts/pull/485) | [@mschmidt291](https://github.com/mschmidt291) | Add possibility to define custom `readinessProbe` | -|[#517](https://github.com/elastic/helm-charts/pull/517) | [@maksim-m](https://github.com/maksim-m) | Add namespace parameter to the test function to `NOTES.txt` | -|[#539](https://github.com/elastic/helm-charts/pull/539) | [@adulescentulus](https://github.com/adulescentulus) | Add `loadBalancerIP` option to service | - -### Filebeat - -| PR | Author | Title | -| ------------------------------------------------------ | ---------------------------------------- | ----------------------------------------------------------- | -|[#530](https://github.com/elastic/helm-charts/pull/530) | [@flaper87](https://github.com/flaper87) | Accept a string as `extraInitContainers` value for Filebeat | - -### Kibana - -**Warning** -[#540](https://github.com/elastic/helm-charts/pull/540) increase default CPU and memory requests/limits. This may impact the resources (nodes) required in your Kubernetes cluster to deploy Kibana chart. - -If you wish to come back to former values, you need to override CPU and Memory requests/limits as well as `NODE_OPTIONS` `extraEnvs` variable when deploying your Helm Chart. - - -| PR | Author | Title | -| ------------------------------------------------------ | ---------------------------------------- | -------------------------------------------------------------------------------------- | -|[#493](https://github.com/elastic/helm-charts/pull/493) | [@jamoflaw](https://github.com/jamoflaw) | Fix Mismatch Between Service Selector and Pod Labels when using Helm Aliases in Kibana | -|[#540](https://github.com/elastic/helm-charts/pull/540) | [@jmlrt](https://github.com/jmlrt) | Optimize Kibana memory usage | - -### Logstash - -| PR | Author | Title | -| ------------------------------------------------------ | ---------------------------------------------------- | ---------------------------------------------- | -|[#500](https://github.com/elastic/helm-charts/pull/500) | [@zeph](https://github.com/zeph) | Add warn to override Logstash default pipeline | -|[#505](https://github.com/elastic/helm-charts/pull/505) | [@ChiefAlexander](https://github.com/ChiefAlexander) | Update Logstash chart to support custom ports | - -## 7.6.1 - 2020/03/04 - -* 7.6.1 as the default stack version - -### APM Server - -| PR | Author | Title | -| ------------------------------------------------------ | ---------------------------------------- | ----------------- | -|[#479](https://github.com/elastic/helm-charts/pull/479) | [@vhatsura](https://github.com/vhatsura) | Fix template name | - -### Elasticsearch - -| PR | Author | Title | -| ------------------------------------------------------ | -------------------------------------- | --------------------------------------- | -|[#483](https://github.com/elastic/helm-charts/pull/483) | [@ta-ando](https://github.com/ta-ando) | Ad support for loadBalancerSourceRanges | - - -## 7.6.0 - 2020/02/11 - -* 7.6.0 as the default stack version -* Freeze pip dependencies [#463](https://github.com/elastic/helm-charts/pull/463) [@morganchristiansson](https://github.com/morganchristiansson) -* Format python scripts with [Black](https://black.readthedocs.io/en/stable/) [#475](https://github.com/elastic/helm-charts/pull/475) & [#477](https://github.com/elastic/helm-charts/pull/477) [@jmlrt](https://github.com/jmlrt) - -### APM Server - -| PR | Author | Title | -| ------------------------------------------------------ | ---------------------------------------- | ------------------------------------------- | -|[#324](https://github.com/elastic/helm-charts/pull/324) | [@pbecotte](https://github.com/pbecotte) | Add apm-server helm chart | -|[#459](https://github.com/elastic/helm-charts/pull/459) | [@jmlrt](https://github.com/jmlrt) | Add ci tests for apm-server chart | -|[#473](https://github.com/elastic/helm-charts/pull/473) | [@jmlrt](https://github.com/jmlrt) | Add extraContainers and extraInitContainers | - -### Elasticsearch - -| PR | Author | Title | -| ------------------------------------------------------ | -------------------------------------------- | --------------------------- | -|[#455](https://github.com/elastic/helm-charts/pull/455) | [@sachinmsft](https://github.com/sachinmsft) | Fixing typo | -|[#458](https://github.com/elastic/helm-charts/pull/458) | [@jmlrt](https://github.com/jmlrt) | Set cpu request = cpu limit | -|[#473](https://github.com/elastic/helm-charts/pull/473) | [@jmlrt](https://github.com/jmlrt) | Add extraContainers | - -### Filebeat - -| PR | Author | Title | -| ------------------------------------------------------ | ------------------------------------ | ----------------------- | -|[#466](https://github.com/elastic/helm-charts/pull/466) | [@vasrem](https://github.com/vasrem) | Add extraInitContainers | -|[#473](https://github.com/elastic/helm-charts/pull/473) | [@jmlrt](https://github.com/jmlrt) | Add extraContainers | - -### Kibana - -| PR | Author | Title | -| ------------------------------------------------------ | ---------------------------------- | ------------------------------------------- | -|[#473](https://github.com/elastic/helm-charts/pull/473) | [@jmlrt](https://github.com/jmlrt) | Add extraContainers and extraInitContainers | - -### Logstash - -| PR | Author | Title | -| ------------------------------------------------------ | -------------------------------------------------------------- | ------------------------------- | -|[#457](https://github.com/elastic/helm-charts/pull/457) | [@morganchristiansson](https://github.com/morganchristiansson) | Add fullnameOverride setting | -|[#473](https://github.com/elastic/helm-charts/pull/473) | [@jmlrt](https://github.com/jmlrt) | Remove duplicate line in README | - -### Metricbeat - -| PR | Author | Title | -| ------------------------------------------------------ | ---------------------------------- | ------------------------------------------- | -|[#473](https://github.com/elastic/helm-charts/pull/473) | [@jmlrt](https://github.com/jmlrt) | Add extraContainers and extraInitContainers | - - -## 7.5.2 - 2020/01/21 - -* 7.5.2 as the default stack version -* Testing of GKE for 1.12 dropped and 1.15 added [#435](https://github.com/elastic/helm-charts/pull/435) [@jmlrt](https://github.com/jmlrt) -* Add [Probot](https://probot.github.io) config to manage stale issues / PR [#421](https://github.com/elastic/helm-charts/pull/421) [@jmlrt](https://github.com/jmlrt) -* Fix README docs links on [Helm Hub](https://hub.helm.sh) [#438](https://github.com/elastic/helm-charts/pull/438) [@jmlrt](https://github.com/jmlrt) - -### Elasticsearch - -| PR | Author | Title | -| ------------------------------------------------------ | ------------------------------------------------ | --------------------------------------------------------------- | -|[#382](https://github.com/elastic/helm-charts/pull/382) | [@jaumann](https://github.com/jaumann) | Allow for name overrides of resources | -|[#433](https://github.com/elastic/helm-charts/pull/433) | [@jmlrt](https://github.com/jmlrt) | Add example for [Microk8s](https://microk8s.io/) | -|[#428](https://github.com/elastic/helm-charts/pull/428) | [@mmisztal1980](https://github.com/mmisztal1980) | Remove duplicate label | -|[#434](https://github.com/elastic/helm-charts/pull/434) | [@jmlrt](https://github.com/jmlrt) | Add workaround to fix [kind])https://kind.sigs.k8s.io/) example | -|[#444](https://github.com/elastic/helm-charts/pull/444) | [@naseemkullah](https://github.com/naseemkullah) | Add commented out example of a useful post start hook | - -### Filebeat - -| PR | Author | Title | -| ------------------------------------------------------ | ---------------------------------------------- | --------------------------------------------------------------------- | -|[#415](https://github.com/elastic/helm-charts/pull/415) | [@jmlrt](https://github.com/jmlrt) | Add custom labels to pods | -|[#369](https://github.com/elastic/helm-charts/pull/369) | [@jmymy](https://github.com/jmymy) | Add support for `envfrom` | -|[#420](https://github.com/elastic/helm-charts/pull/420) | [@jmlrt](https://github.com/jmlrt) | Override probes commands | -|[#430](https://github.com/elastic/helm-charts/pull/430) | [@krichter722](https://github.com/krichter722) | Fix default value of `extraVolumeMounts` and `extraVolumes` in README | - -### Kibana - -| PR | Author | Title | -| ------------------------------------------------------ | ------------------------------------------------ | ----------------------------------------------- | -|[#415](https://github.com/elastic/helm-charts/pull/415) | [@jmlrt](https://github.com/jmlrt) | Add custom labels to pods | -|[#422](https://github.com/elastic/helm-charts/pull/422) | [@victorsalaun](https://github.com/victorsalaun) | Remove useless `maxUnavailable` in Kibana chart | -|[#408](https://github.com/elastic/helm-charts/pull/408) | [@ichylinux](https://github.com/ichylinux) | Add support for `loadBalancerSourceRanges` | -|[#419](https://github.com/elastic/helm-charts/pull/419) | [@jmlrt](https://github.com/jmlrt) | Add doc for plugin install | - -### Logstash - -| PR | Author | Title | -| ------------------------------------------------------ | ---------------------------------- | ------------------------- | -|[#415](https://github.com/elastic/helm-charts/pull/415) | [@jmlrt](https://github.com/jmlrt) | Add custom labels to pods | - -### Metricbeat - -| PR | Author | Title | -| ------------------------------------------------------ | ---------------------------------------- | ------------------------------------------------------------- | -|[#415](https://github.com/elastic/helm-charts/pull/415) | [@jmlrt](https://github.com/jmlrt) | Add custom labels to pods | -|[#369](https://github.com/elastic/helm-charts/pull/369) | [@jmymy](https://github.com/jmymy) | Add support for `envfrom` | -|[#420](https://github.com/elastic/helm-charts/pull/420) | [@jmlrt](https://github.com/jmlrt) | Override probes commands | -|[#425](https://github.com/elastic/helm-charts/pull/425) | [@pbecotte](https://github.com/pbecotte) | Update `hostfs` to be a CLI option instead of a config option | -|[#436](https://github.com/elastic/helm-charts/pull/436) | [@gadiener](https://github.com/gadiener) | Add `priorityClassName` config | - - -## 7.5.1 - 2019/12/18 - -* 7.5.1 as the default stack version -* 6.8.6 as 6.x tested version -* Add a notice that Helm v3 is not supported in [#400](https://github.com/elastic/helm-charts/pull/400) [@jmlrt](https://github.com/jmlrt) -* Prefixed helper functions with chart name in [#407](https://github.com/elastic/helm-charts/pull/407) [bpdunni](https://github.com/bpdunni) -* Use details tag around code backticks for 'helm get' output in issue template in [#413](https://github.com/elastic/helm-charts/pull/413) [krichter722](https://github.com/krichter722) - -### Filebeat - -| PR | Author | Title | -| ------------------------------------------------------ | ---------------------------------------- | ----------------------------------------------------- | -|[#403](https://github.com/elastic/helm-charts/pull/403) | [@ChrsMark](https://github.com/ChrsMark) | Remove in_cluster config from add_kubernetes_metadata | - -### Kibana - -| PR | Author | Title | -| ------------------------------------------------------ | ---------------------------------------------------- | ------------------------------------ | -|[#411](https://github.com/elastic/helm-charts/pull/411) | [@usamaahmadkhan](https://github.com/usamaahmadkhan) | Enable labels to be added to service | - -### Metricbeat - -| PR | Author | Title | -| ------------------------------------------------------ | ---------------------------------- | ----------------------------------------------------- | -|[#397](https://github.com/elastic/helm-charts/pull/397) | [@jmlrt](https://github.com/jmlrt) | Add a notice about kube-state-metrics breaking change | - - -## 7.5.0 - 2019/12/02 - -* 7.5.0 as the default stack version -* 6.8.5 as 6.x tested version in [#386](https://github.com/elastic/helm-charts/pull/386) [@jmlrt](https://github.com/jmlrt) -* Helm 2.16.1 support in [#366](https://github.com/elastic/helm-charts/pull/366) [@jmlrt](https://github.com/jmlrt) -* Add Beats icons to Helm repository in [#345](https://github.com/elastic/helm-charts/pull/345) [@jmlrt](https://github.com/jmlrt) -* Make helm-tester docker image build less verbose in [#346](https://github.com/elastic/helm-charts/pull/346) [@jmlrt](https://github.com/jmlrt) -* Update install doc in [#364](https://github.com/elastic/helm-charts/pull/364) [@jmlrt](https://github.com/jmlrt) -* Add security notice to github issue template in [#368](https://github.com/elastic/helm-charts/pull/368) [@jmlrt](https://github.com/jmlrt) - -### Elasticsearch - -| PR | Author | Title | -| ------------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------------------------------- | -|[#344](https://github.com/elastic/helm-charts/pull/344) | [@usamaahmadkhan](https://github.com/usamaahmadkhan) | Add support for labels on services | -|[#350](https://github.com/elastic/helm-charts/pull/350) | [@crgstar](https://github.com/crgstar) | Use same imagePullPolicy in initContainer | -|[#380](https://github.com/elastic/helm-charts/pull/380) | [@fatmcgav](https://github.com/fatmcgav) | Tweak the 'readinessProbe' command to verify that master nodes are available | -|[#383](https://github.com/elastic/helm-charts/pull/383) | [@tanakapayam](https://github.com/tanakapayam) | Apply labels to all pods | - -### Filebeat - -| PR | Author | Title | -| ------------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------------------------------- | -|[#330](https://github.com/elastic/helm-charts/pull/330) | [@tusciucalecs](https://github.com/tusciucalecs) | Support fullnameOverride | -|[#321](https://github.com/elastic/helm-charts/pull/321) | [@pbecotte](https://github.com/pbecotte) | Use host networking so that the stats have the correct node informations | -|[#322](https://github.com/elastic/helm-charts/pull/322) | [@pbecotte](https://github.com/pbecotte) | Use a list for extra volume mounts to match the comments and other values | - -### Kibana - -| PR | Author | Title | -| ------------------------------------------------------ | -------------------------------------------------| ------------------------ | -|[#330](https://github.com/elastic/helm-charts/pull/330) | [@tusciucalecs](https://github.com/tusciucalecs) | Support fullnameOverride | - -### Logstash - -| PR | Author | Title | -| ------------------------------------------------------ | ---------------------------------- | -------------------------------------------- | -|[#333](https://github.com/elastic/helm-charts/pull/333) | [@jmlrt](https://github.com/jmlrt) | First version of logstash helm chart | -|[#347](https://github.com/elastic/helm-charts/pull/347) | [@jmlrt](https://github.com/jmlrt) | Remove goss port test | -|[#367](https://github.com/elastic/helm-charts/pull/367) | [@jmlrt](https://github.com/jmlrt) | Update default values for memory requirements| - -### Metricbeat - -**Warning** -[#352](https://github.com/elastic/helm-charts/pull/352) is introducing a breaking change, please refer to [Metricbeat Breaking Changes](./metricbeat/README.md#breaking-changes) section for users upgrading from a chart version < 7.5.0. - -| PR | Author | Title | -| ------------------------------------------------------ | ------------------------------------------------ | ----------------------------------------------------------------------------------------- | -|[#352](https://github.com/elastic/helm-charts/pull/352) | [@masterkain](https://github.com/masterkain) | Bump kube-state-metrics to latest chart and app version | -|[#330](https://github.com/elastic/helm-charts/pull/330) | [@tusciucalecs](https://github.com/tusciucalecs) | Support fullnameOverride | -|[#314](https://github.com/elastic/helm-charts/pull/314) | [@pbecotte](https://github.com/pbecotte) | Add a couple extra mounts to pick up all the metrics from the host nodes on Digital Ocean | - - -## 7.4.1 - 2019/10/23 - -* 7.4.1 as the default stack version -* 6.8.4 as 6.x tested version -* Helm 2.15.1 support in [#338](https://github.com/elastic/helm-charts/pull/338) [@jmlrt](https://github.com/jmlrt) - -### Elasticsearch - -| PR | Author | Title | -| ------------------------------------------------------- | ----------------------------------------- | -------------------------------------------- | -|[#313](https://github.com/elastic/helm-charts/pull/313) | [@Crazybus](https://github.com/Crazybus) | Add logging when adding password to keystore | -|[#301](https://github.com/elastic/helm-charts/pull/301) | [@ravishivt](https://github.com/ravishivt) | Fix bug in keystore initContainer | -|[#274](https://github.com/elastic/helm-charts/pull/274) | [@salaboy](https://github.com/salaboy) | Add Example for Kubernetes KIND | -|[#335](https://github.com/elastic/helm-charts/pull/335) | [@jmlrt](https://github.com/jmlrt) | Fix deprecated note | -|[#337](https://github.com/elastic/helm-charts/pull/337) | [@jmlrt](https://github.com/jmlrt) | Remove unused default value | - -### Kibana - -| PR | Author | Title | -| ------------------------------------------------------ | ---------------------------------- | ------------------------------- | -|[#326](https://github.com/elastic/helm-charts/pull/326) | [@jmlrt](https://github.com/jmlrt) | Remove unused antiAffinity keys | - -### Metricbeat - -| PR | Author | Title | -| ------------------------------------------------------ | ---------------------------------- | ------------------------------------------------------ | -|[#339](https://github.com/elastic/helm-charts/pull/339) | [@jmlrt](https://github.com/jmlrt) | Allow adding additional labels to Metricbeat Daemonset | - - -## 7.4.0 - 2019/10/01 - -* 7.4.0 as the default stack version -* Helm-tester Docker image migrated to Python 3 in [#297](https://github.com/elastic/helm-charts/pull/297) [@jmlrt](https://github.com/jmlrt) -* Helm-tester Python dependencies freeze in [#309](https://github.com/elastic/helm-charts/pull/309) [@jmlrt](https://github.com/jmlrt) - -### Elasticsearch - -| PR | Author | Title | -| ------------------------------------------------------- | -------------------------------------------------- | ----------------------------------------------------------------------------------- | -|[#296](https://github.com/elastic/helm-charts/pull/296) | [@jmlrt](https://github.com/jmlrt) | Fix "; \" when there is no additional command in the Makefiles | -|[#298](https://github.com/elastic/helm-charts/pull/298) | [@floretan](https://github.com/floretan) | Make it possible to override the endpoint template. | -|[#263](https://github.com/elastic/helm-charts/pull/263) | [@Crazybus](https://github.com/Crazybus) | Add working examples for running Elasticsearch and Kibana on OpenShift | -|[#301](https://github.com/elastic/helm-charts/pull/301) | [@ravishivt](https://github.com/ravishivt) | Fix bug in keystore initContainer | - -### Kibana - -| PR | Author | Title | -| ------------------------------------------------------- | -------------------------------------------------- | ----------------------------------------------------------------------------------- | -|[#295](https://github.com/elastic/helm-charts/pull/295) | [@karlbohlmark](https://github.com/karlbohlmark) | Allow configuring lifecycle events | -|[#263](https://github.com/elastic/helm-charts/pull/263) | [@Crazybus](https://github.com/Crazybus) | Add working examples for running Elasticsearch and Kibana on OpenShift | -|[#303](https://github.com/elastic/helm-charts/pull/303) | [@code-chris](https://github.com/code-chris) | Add compatibility for k8s 1.16 and change min k8s version due to ingress apiVersion | - - -### Filebeat - -| PR | Author | Title | -| ------------------------------------------------------- | -------------------------------------------------- | ----------------------------------------------------------------------------------- | -|[#304](https://github.com/elastic/helm-charts/pull/304) | [@code-chris](https://github.com/code-chris) | Change min k8s version due to daemonset apiVersion | - -### Metricbeat - -| PR | Author | Title | -| ------------------------------------------------------- | -------------------------------------------------- | ----------------------------------------------------------------------------------- | -| [#310](https://github.com/elastic/helm-charts/pull/310) | [@Crazybus](https://github.com/Crazybus) | Make cluster role rules configurable | -|[#305](https://github.com/elastic/helm-charts/pull/305) | [@code-chris](https://github.com/code-chris) | Change min k8s version due to used apiVersions | - - -## 7.3.2 - 2019/09/19 - -* 7.3.2 as the default stack version -* Testing of GKE for 1.11 dropped and 1.14 added [#287](https://github.com/elastic/helm-charts/pull/287) -* Make helper scripts python3 compatible [#255](https://github.com/elastic/helm-charts/pull/255) [@cclauss](https://github.com/cclauss) - -### Elasticsearch - -| PR | Author | Title | -| ------------------------------------------------------- | -------------------------------------------------- | --------------------------------------------------------------------------- | -| [#238](https://github.com/elastic/helm-charts/pull/238) | [@Crazybus](https://github.com/Crazybus) | Update documentation and defaults for tmpl values | -| [#245](https://github.com/elastic/helm-charts/pull/245) | [@skitle](https://github.com/skitle) | Fixed indent on elasticsearch extraVolumes tpl. Was causing parsing errors. | -| [#250](https://github.com/elastic/helm-charts/pull/250) | [@tanordheim](https://github.com/tanordheim) | Update priorityClassName default values in READMEs | -| [#261](https://github.com/elastic/helm-charts/pull/261) | [@Crazybus](https://github.com/Crazybus) | Bump google terraform provider to the latest | -| [#154](https://github.com/elastic/helm-charts/pull/154) | [@Crazybus](https://github.com/Crazybus) | Keystore integration | -| [#290](https://github.com/elastic/helm-charts/pull/290) | [@Crazybus](https://github.com/Crazybus) | Drop version from chart label in service | -| [#270](https://github.com/elastic/helm-charts/pull/270) | [@GreenKnight15](https://github.com/GreenKnight15) | ES Variable Port Name | -| [#259](https://github.com/elastic/helm-charts/pull/259) | [@Crazybus](https://github.com/Crazybus) | Set default runAsUser for pod security context | -| [#265](https://github.com/elastic/helm-charts/pull/265) | [@maximelenair](https://github.com/maximelenair) | Hardening of the pod permissions. | - -### Kibana - -| PR | Author | Title | -| ------------------------------------------------------- | -------------------------------------------- | -------------------------------------------------- | -| [#250](https://github.com/elastic/helm-charts/pull/250) | [@tanordheim](https://github.com/tanordheim) | Update priorityClassName default values in READMEs | -| [#268](https://github.com/elastic/helm-charts/pull/268) | [@accek](https://github.com/accek) | fixed bogus request of 500 millibytes mem | -| [#272](https://github.com/elastic/helm-charts/pull/272) | [@rccrdpccl](https://github.com/rccrdpccl) | use same env variable as application | -| [#291](https://github.com/elastic/helm-charts/pull/291) | [@Crazybus](https://github.com/Crazybus) | Explicitly test for a 200 for readinessProbe | - -### Filebeat - -| PR | Author | Title | -| ------------------------------------------------------- | -------------------------------------------- | -------------------------------------------------- | -| [#243](https://github.com/elastic/helm-charts/pull/243) | [@Crazybus](https://github.com/Crazybus) | Add configurable nodeSelector and affinity spec | -| [#248](https://github.com/elastic/helm-charts/pull/248) | [@tanordheim](https://github.com/tanordheim) | Add priorityClassName to filebeat chart | -| [#250](https://github.com/elastic/helm-charts/pull/250) | [@tanordheim](https://github.com/tanordheim) | Update priorityClassName default values in READMEs | - -### Metricbeat - -| PR | Author | Title | -| ------------------------------------------------------- | ---------------------------------------- | ---------------------------------------------------- | -| [#243](https://github.com/elastic/helm-charts/pull/243) | [@Crazybus](https://github.com/Crazybus) | Add configurable nodeSelector and affinity spec | -| [#251](https://github.com/elastic/helm-charts/pull/251) | [@Crazybus](https://github.com/Crazybus) | Fix default configuration for kubernetes module | -| [#289](https://github.com/elastic/helm-charts/pull/289) | [@Crazybus](https://github.com/Crazybus) | Remove default kube static metrics host to avoid co… | -| [#254](https://github.com/elastic/helm-charts/pull/254) | [@Azuka](https://github.com/Azuka) | Enable events access to cluster role | - - -## 7.3.0 - 2019/07/31 - -* 7.3.0 as the default stack version - -### Elasticsearch -| PR | Author | Title | -| ------------------------------------------------------- | ---------------------------------------------------------- | ------------------------------------------------------------------------- | -| [#226](https://github.com/elastic/helm-charts/pull/226) | [@MichaelMarieJulie](https://github.com/MichaelMarieJulie) | Add configurable pods labels | -| [#237](https://github.com/elastic/helm-charts/pull/237) | [@MichaelSp](https://github.com/MichaelSp) | Add back `service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"` | - -### Kibana -| PR | Author | Title | -| ------------------------------------------------------- | ------------------------------------------ | ----------------------------------- | -| [#225](https://github.com/elastic/helm-charts/pull/225) | [@plumcraft](https://github.com/plumcraft) | Add configurable pod labels | -| [#230](https://github.com/elastic/helm-charts/pull/230) | [@Crazybus](https://github.com/Crazybus) | Add subPath support to secretMounts | - - -## 7.2.1-0 - 2019/07/18 - -* [#195](https://github.com/elastic/helm-charts/pull/195) - @cclauss - Initial steps started to move all python2 code to python3 -* [#205](https://github.com/elastic/helm-charts/pull/205) - @Crazybus - Fixup and improve security example documentation - - -### Elasticsearch - -* [#171](https://github.com/elastic/helm-charts/pull/171) - @naseemkullah - Run Elasticsearch as a non-root user -* [#197](https://github.com/elastic/helm-charts/pull/197) - @tetianakravchenko - Add option to provide custom start/stop hooks -* [#206](https://github.com/elastic/helm-charts/pull/206) - @Crazybus - Automatically detect esMajorVersion for default images -* [#203](https://github.com/elastic/helm-charts/pull/203) - @Crazybus - Add testing for security context -* [#220](https://github.com/elastic/helm-charts/pull/220) - @JorisAndrade - Add option to disable sysctlInitContainer - -### Kibana - -* [#204](https://github.com/elastic/helm-charts/pull/204) - @Crazybus - Make imagePullPolicy actually do something -* [#210](https://github.com/elastic/helm-charts/pull/210) - @cliedeman - Add Kibana pod annotations -* [#217](https://github.com/elastic/helm-charts/pull/217) - @Crazybus - Update healthCheckPath to mention basePath usage - -### Filebeat - -* [#214](https://github.com/elastic/helm-charts/pull/214) - @dugouchet - Add additional labels - -### Metricbeat - -* [#127](https://github.com/elastic/helm-charts/pull/127) - @Crazybus - Add metricbeat chart -* [#128](https://github.com/elastic/helm-charts/pull/128) - @Crazybus - Add ci jobs for metricbeat - - -## 7.2.0 - 2019/07/01 - -* 7.2.0 as the default stack version -* Updated the beta status messaging and added proper descriptions to each chart [#158](https://github.com/elastic/helm-charts/pull/158) -* Add GKE 1.13 to automated testing suite [#169](https://github.com/elastic/helm-charts/pull/169) and [#181](https://github.com/elastic/helm-charts/pull/181) - -### Elasticsearch - -* [#123](https://github.com/elastic/helm-charts/pull/123) - @kimxogus - Make the service configurable -* [#141](https://github.com/elastic/helm-charts/pull/141) - @satchpx - Add capability to specify alternate scheduler -* [#161](https://github.com/elastic/helm-charts/pull/161) - @Crazybus - Add configurable nodePort to the service spec -* [#170](https://github.com/elastic/helm-charts/pull/170) - @Crazybus - Update security example docs to match reality -* [#182](https://github.com/elastic/helm-charts/pull/182) - @hxquangnhat - Fix secretName field for secretMounts -* [#186](https://github.com/elastic/helm-charts/pull/186) - @Crazybus - Fix pvc annotations with multiple fields -* [#189](https://github.com/elastic/helm-charts/pull/189) - @gnatpat - Add resources to sidecar container - -### Kibana - -* [#160](https://github.com/elastic/helm-charts/pull/160) - @Crazybus - Add configurable nodePort to the service spec -* [#168](https://github.com/elastic/helm-charts/pull/168) - @Crazybus - Always set server.host to the docker default -* [#172](https://github.com/elastic/helm-charts/pull/172) - @naseemkullah - Run Kibana as the non-root kibana user (1000) -* [#182](https://github.com/elastic/helm-charts/pull/182) - @hxquangnhat - Fix secretName field for secretMounts -* [#184](https://github.com/elastic/helm-charts/pull/184) - @diegofernandes - Fix wildcard support for ingress - -### Filebeat - -* [#182](https://github.com/elastic/helm-charts/pull/182) - @hxquangnhat - Fix secretName field for secretMounts -* [#188](https://github.com/elastic/helm-charts/pull/188) - @cclauss - Fix octal literal to work in both Python 2 and Python 3 - - -## 7.1.1 - 2019/06/07 - -* 7.1.1 as the default stack version -* Helm 2.14.0 as the tested version. Helm 2.14.0 has some extra validation built in which caused an issue with an [invalid field in the filebeat chart](https://github.com/elastic/helm-charts/issues/136). - -### Elasticsearch - -* [#146](https://github.com/elastic/helm-charts/pull/146) - @Crazybus - Add instructions for how to enable snapshots - -### Kibana - -* [#151](https://github.com/elastic/helm-charts/pull/151) - @natebwangsut - Added an option to add annotations(s) to service resource - -### Filebeat - -* [#140](https://github.com/elastic/helm-charts/pull/140) - @Crazybus - Remove fsGroup from container level security context - - -## 7.1.0 - 2019/05/21 - -* 7.1.0 as the default stack version -* Promotion from alpha to beta status -* Filebeat chart added - -### Elasticsearch - -* [#119](https://github.com/elastic/helm-charts/pull/119) - @kimxogus - Wait for new master election before stopping the pod to prevent master status being temporarily lost during rolling upgrades #63 -* [#109](https://github.com/elastic/helm-charts/pull/109) - @lancespeelmon - Add support for k8s priorityclass - -### Kibana - -* [#109](https://github.com/elastic/helm-charts/pull/109) - @lancespeelmon - Add support for k8s priorityclass -* [#134](https://github.com/elastic/helm-charts/pull/134) - @Crazybus - Explicitly set the targetPort to the defined http port - -### Filebeat - -* [#117](https://github.com/elastic/helm-charts/pull/117) - @tylerjl - Add initial filebeat chart -* [#122](https://github.com/elastic/helm-charts/pull/122) - @Crazybus - Add ci jobs for filebeat -* [#121](https://github.com/elastic/helm-charts/pull/121) - @Crazybus - Add integration tests and other tweaks -* [#129](https://github.com/elastic/helm-charts/pull/129) - @tylerjl - Add usage notes for filebeat - - -## 7.0.1-alpha1 - 2019/05/01 - -* 7.0.1 as the default stack version -* [Contributing guide](https://github.com/elastic/helm-charts/blob/master/CONTRIBUTING.md), [release process](https://github.com/elastic/helm-charts/blob/master/helpers/release.md), [changelog](https://github.com/elastic/helm-charts/blob/master/CHANGELOG.md) and [issue templates](https://github.com/elastic/helm-charts/tree/master/.github/ISSUE_TEMPLATE) added in [#111](https://github.com/elastic/helm-charts/pull/111) -* Automated testing for Kubernetes 1.10 dropped because it is no longer available in GKE -* Helm client version bumped to 2.13.1 - -### Elasticsearch - -* [#100](https://github.com/elastic/helm-charts/pull/100) - @kuisathaverat - Remove deprecated zen ping unicast hosts setting -* [#114](https://github.com/elastic/helm-charts/pull/114) - @Crazybus - Make persistent volumes optional -* [#115](https://github.com/elastic/helm-charts/pull/115) - @Crazybus - Added an integration test for upgrading from the previous release and testing rolling upgrades - -### Kibana - -* [#107](https://github.com/elastic/helm-charts/pull/107) - @Crazybus - Make the health check path configurable to support webroots and other customizations. - - -## 7.0.0-alpha1 - 2019/04/17 - -* [#96](https://github.com/elastic/helm-charts/pull/96) - @Crazybus - 7.0.0 as the default stack version - -### Elasticsearch - -* [#94](https://github.com/elastic/helm-charts/pull/94) - @kimxogus - Remove hardcoded storageClassName - -### Notes - -If you were using the default Elasticsearch version from the previous release (6.6.2-alpha1) you will first need to upgrade to Elasticsearch 6.7.1 before being able to upgrade to 7.0.0. You can do this by adding this to your values file: - -``` -esMajorVersion: 6 -imageTag: 6.7.1 -``` - -If you are upgrading an existing cluster that did not override the default `storageClassName` you will now need to specify the `storageClassName`. This only affects existing clusters and was changed in https://github.com/elastic/helm-charts/pull/94. The advantage of this is that now the helm chart will just use the default storageClassName rather than needing to override it for any providers where it is not called `standard`. - -``` -volumeClaimTemplate: - storageClassName: "standard" -``` diff --git a/apm-server/Chart.yaml b/apm-server/Chart.yaml index ec49a79da..0454d9152 100755 --- a/apm-server/Chart.yaml +++ b/apm-server/Chart.yaml @@ -5,8 +5,8 @@ maintainers: - email: helm-charts@elastic.co name: Elastic name: apm-server -version: 7.6.2 -appVersion: 7.6.2 +version: 7.7.0-SNAPSHOT +appVersion: 7.7.0-SNAPSHOT sources: - https://github.com/elastic/apm icon: https://helm.elastic.co/icons/apm.png diff --git a/apm-server/README.md b/apm-server/README.md index 8e2e9381f..768e09aa3 100644 --- a/apm-server/README.md +++ b/apm-server/README.md @@ -14,6 +14,7 @@ This helm chart is a lightweight way to configure and run our official * [Helm](https://helm.sh/) >= 2.8.0 ## Usage notes and getting started + * The default APM Server configuration file for this chart is configured to use an Elasticsearch endpoint as configured by the rest of these helm charts. This can easily be overridden in the config value `apmConfig.apm-server.yml`. @@ -21,44 +22,35 @@ easily be overridden in the config value `apmConfig.apm-server.yml`. ## Installing +This chart is tested with the latest 7.7.x versions. + * Add the elastic helm charts repo - ``` + + ```bash helm repo add elastic https://helm.elastic.co ``` -* Install it - ``` - helm install --name apm-server elastic/apm-server - ``` -### Using master branch +* Install the latest 7.7 release -* Clone the git repo - ``` - git clone git@github.com:elastic/helm-charts.git - ``` -* Install it + ```bash + helm install --name apm-server elastic/apm-server --version=7.7.0 ``` - helm install --name apm-server ./helm-charts/apm-server - ``` - -## Compatibility -This chart is tested with the latest supported versions. The currently tested versions are: +### Using the 7.7 branch -| 6.x | 7.x | -| ----- | ----- | -| 6.8.8 | 7.6.2 | +* Clone the git repo and checkout the right branch -Examples of installing older major versions can be found in the -[examples](https://github.com/elastic/helm-charts/tree/master/apm-server/examples) directory. + ```bash + git clone git@github.com:elastic/helm-charts.git + cd helm-charts + git checkout -b 7.7 origin/7.7 + ``` -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.6.2` of APM -Server it would look like this: +* Install the latest 7.7.x-SNAPSHOT -``` -helm install --name apm-server elastic/apm-server --set imageTag=7.6.2 -``` + ```bash + helm install --name apm-server ./helm-charts/apm-server + ``` ## Configuration @@ -72,7 +64,7 @@ helm install --name apm-server elastic/apm-server --set imageTag=7.6.2 | `extraVolumeMounts` | List of additional volumeMounts | `[]` | | `extraVolumes` | List of additional volumes | `[]` | | `image` | The APM Server docker image | `docker.elastic.co/apm/apm-server` | -| `imageTag` | The APM Server docker image tag | `7.6.2` | +| `imageTag` | The APM Server docker image tag | `7.7.0-SNAPSHOT` | | `imagePullPolicy` | The Kubernetes [imagePullPolicy](https://kubernetes.io/docs/concepts/containers/images/#updating-images) value | `IfNotPresent` | | `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 | `[]` | | `managedServiceAccount` | Whether the `serviceAccount` should be managed by this helm chart. Set this to `false` in order to manage your own service account and related roles. | `true` | diff --git a/apm-server/examples/6.x/Makefile b/apm-server/examples/6.x/Makefile deleted file mode 100644 index 539cc2548..000000000 --- a/apm-server/examples/6.x/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -default: test -include ../../../helpers/examples.mk - -RELEASE := helm-es-apm-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/apm-server/examples/6.x/test/goss.yaml b/apm-server/examples/6.x/test/goss.yaml deleted file mode 100644 index 27a58f3b2..000000000 --- a/apm-server/examples/6.x/test/goss.yaml +++ /dev/null @@ -1,6 +0,0 @@ -http: - http://localhost:8200?pretty: - status: 200 - timeout: 2000 - body: - - '6.8.8' diff --git a/apm-server/examples/6.x/values.yaml b/apm-server/examples/6.x/values.yaml deleted file mode 100644 index 172a29f65..000000000 --- a/apm-server/examples/6.x/values.yaml +++ /dev/null @@ -1 +0,0 @@ -imageTag: "6.8.8" diff --git a/apm-server/examples/default/test/goss.yaml b/apm-server/examples/default/test/goss.yaml index 6fa5b0792..2dc9067df 100644 --- a/apm-server/examples/default/test/goss.yaml +++ b/apm-server/examples/default/test/goss.yaml @@ -3,4 +3,4 @@ http: status: 200 timeout: 2000 body: - - '7.6.2' + - '7.7.0' diff --git a/apm-server/examples/oss/test/goss.yaml b/apm-server/examples/oss/test/goss.yaml index 6fa5b0792..2dc9067df 100644 --- a/apm-server/examples/oss/test/goss.yaml +++ b/apm-server/examples/oss/test/goss.yaml @@ -3,4 +3,4 @@ http: status: 200 timeout: 2000 body: - - '7.6.2' + - '7.7.0' diff --git a/apm-server/examples/security/test/goss.yaml b/apm-server/examples/security/test/goss.yaml index 6fa5b0792..2dc9067df 100644 --- a/apm-server/examples/security/test/goss.yaml +++ b/apm-server/examples/security/test/goss.yaml @@ -3,4 +3,4 @@ http: status: 200 timeout: 2000 body: - - '7.6.2' + - '7.7.0' diff --git a/apm-server/values.yaml b/apm-server/values.yaml index f1af513ee..497a9e6bf 100755 --- a/apm-server/values.yaml +++ b/apm-server/values.yaml @@ -55,7 +55,7 @@ extraVolumes: [] # emptyDir: {} image: "docker.elastic.co/apm/apm-server" -imageTag: "7.6.2" +imageTag: "7.7.0-SNAPSHOT" imagePullPolicy: "IfNotPresent" imagePullSecrets: [] diff --git a/elasticsearch/Chart.yaml b/elasticsearch/Chart.yaml index ba269ffc9..38a824234 100755 --- a/elasticsearch/Chart.yaml +++ b/elasticsearch/Chart.yaml @@ -5,8 +5,8 @@ maintainers: - email: helm-charts@elastic.co name: Elastic name: elasticsearch -version: 7.6.2 -appVersion: 7.6.2 +version: 7.7.0-SNAPSHOT +appVersion: 7.7.0-SNAPSHOT sources: - https://github.com/elastic/elasticsearch icon: https://helm.elastic.co/icons/elasticsearch.png diff --git a/elasticsearch/README.md b/elasticsearch/README.md index 6b380b57f..9482aa93f 100644 --- a/elasticsearch/README.md +++ b/elasticsearch/README.md @@ -48,43 +48,36 @@ If you currently have a cluster deployed with the [helm/charts stable](https://g ## Installing -### Using Helm repository +This chart is tested with the latest 7.7.x versions. * Add the elastic helm charts repo - ``` + + ```bash helm repo add elastic https://helm.elastic.co ``` -* Install it - ``` - helm install --name elasticsearch elastic/elasticsearch - ``` -### Using master branch +* Install the latest 7.7 release -* Clone the git repo - ``` - git clone git@github.com:elastic/helm-charts.git - ``` -* Install it - ``` - helm install --name elasticsearch ./helm-charts/elasticsearch + ```bash + helm install --name elasticsearch elastic/elasticsearch --version=7.7.0 ``` -## Compatibility +### Using the 7.7 branch -This chart is tested with the latest supported versions. The currently tested versions are: +* Clone the git repo and checkout the right branch -| 6.x | 7.x | -| ----- | ----- | -| 6.8.8 | 7.6.2 | + ```bash + git clone git@github.com:elastic/helm-charts.git + cd helm-charts + git checkout -b 7.7 origin/7.7 + ``` -Examples of installing older major versions can be found in the [examples](https://github.com/elastic/helm-charts/tree/master/elasticsearch/examples) directory. +* Install the latest 7.7.x-SNAPSHOT -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.6.2` of Elasticsearch it would look like this: + ```bash + helm install --name elasticsearch ./helm-charts/elasticsearch + ``` -``` -helm install --name elasticsearch elastic/elasticsearch --set imageTag=7.6.2 -``` ## Configuration @@ -105,7 +98,7 @@ helm install --name elasticsearch elastic/elasticsearch --set imageTag=7.6.2 | `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](https://github.com/elastic/helm-charts/tree/master/elasticsearch/values.yaml) for an example | `[]` | | `image` | The Elasticsearch docker image | `docker.elastic.co/elasticsearch/elasticsearch` | -| `imageTag` | The Elasticsearch docker image tag | `7.6.2` | +| `imageTag` | The Elasticsearch docker image tag | `7.7.0-SNAPSHOT` | | `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 | `{}` | diff --git a/elasticsearch/examples/6.x/Makefile b/elasticsearch/examples/6.x/Makefile deleted file mode 100644 index 2020d4a04..000000000 --- a/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/elasticsearch/examples/6.x/test/goss.yaml b/elasticsearch/examples/6.x/test/goss.yaml deleted file mode 100644 index 7f313f6c0..000000000 --- a/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.8"' - - '"cluster_name" : "six"' - - '"name" : "six-master-0"' - - 'You Know, for Search' diff --git a/elasticsearch/examples/6.x/values.yaml b/elasticsearch/examples/6.x/values.yaml deleted file mode 100644 index 4f41dfb9f..000000000 --- a/elasticsearch/examples/6.x/values.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- - -clusterName: "six" -imageTag: "6.8.8" diff --git a/elasticsearch/examples/default/test/goss.yaml b/elasticsearch/examples/default/test/goss.yaml index f5342e77a..272064e29 100644 --- a/elasticsearch/examples/default/test/goss.yaml +++ b/elasticsearch/examples/default/test/goss.yaml @@ -15,7 +15,7 @@ http: status: 200 timeout: 2000 body: - - '"number" : "7.6.2"' + - '"number" : "7.7.0-SNAPSHOT"' - '"cluster_name" : "elasticsearch"' - '"name" : "elasticsearch-master-0"' - 'You Know, for Search' diff --git a/elasticsearch/examples/openshift/test/goss.yaml b/elasticsearch/examples/openshift/test/goss.yaml index 6cb0d4ec4..b6141d4b9 100644 --- a/elasticsearch/examples/openshift/test/goss.yaml +++ b/elasticsearch/examples/openshift/test/goss.yaml @@ -11,7 +11,7 @@ http: status: 200 timeout: 2000 body: - - '"number" : "7.6.2"' + - '"number" : "7.7.0"' - '"cluster_name" : "elasticsearch"' - '"name" : "elasticsearch-master-0"' - 'You Know, for Search' diff --git a/elasticsearch/examples/oss/test/goss.yaml b/elasticsearch/examples/oss/test/goss.yaml index 2bdb34ad1..8240c8c84 100644 --- a/elasticsearch/examples/oss/test/goss.yaml +++ b/elasticsearch/examples/oss/test/goss.yaml @@ -11,7 +11,7 @@ http: status: 200 timeout: 2000 body: - - '"number" : "7.6.2"' + - '"number" : "7.7.0-SNAPSHOT"' - '"cluster_name" : "oss"' - '"name" : "oss-master-0"' - 'You Know, for Search' diff --git a/elasticsearch/examples/upgrade/test/goss.yaml b/elasticsearch/examples/upgrade/test/goss.yaml index b6eb31e16..4f062c242 100644 --- a/elasticsearch/examples/upgrade/test/goss.yaml +++ b/elasticsearch/examples/upgrade/test/goss.yaml @@ -11,7 +11,7 @@ http: status: 200 timeout: 2000 body: - - '"number" : "7.6.2"' + - '"number" : "7.7.0-SNAPSHOT"' - '"cluster_name" : "upgrade"' - '"name" : "upgrade-master-0"' - 'You Know, for Search' diff --git a/elasticsearch/templates/NOTES.txt b/elasticsearch/templates/NOTES.txt index 825696886..3841adafc 100755 --- a/elasticsearch/templates/NOTES.txt +++ b/elasticsearch/templates/NOTES.txt @@ -1,4 +1,4 @@ 1. Watch all cluster members come up. $ kubectl get pods --namespace={{ .Release.Namespace }} -l app={{ template "elasticsearch.uname" . }} -w 2. Test cluster health using Helm test. - $ helm test {{ .Release.Name }} --namespace={{ .Release.Namespace }} + $ helm test {{ .Release.Name }} --cleanup diff --git a/elasticsearch/values.yaml b/elasticsearch/values.yaml index 4486d53c2..f8e633188 100755 --- a/elasticsearch/values.yaml +++ b/elasticsearch/values.yaml @@ -43,7 +43,7 @@ secretMounts: [] # path: /usr/share/elasticsearch/config/certs image: "docker.elastic.co/elasticsearch/elasticsearch" -imageTag: "7.6.2" +imageTag: "7.7.0-SNAPSHOT" imagePullPolicy: "IfNotPresent" podAnnotations: {} diff --git a/filebeat/Chart.yaml b/filebeat/Chart.yaml index 1e810b5a5..e5891a665 100755 --- a/filebeat/Chart.yaml +++ b/filebeat/Chart.yaml @@ -5,8 +5,8 @@ maintainers: - email: helm-charts@elastic.co name: Elastic name: filebeat -version: 7.6.2 -appVersion: 7.6.2 +version: 7.7.0-SNAPSHOT +appVersion: 7.7.0-SNAPSHOT sources: - https://github.com/elastic/beats icon: https://helm.elastic.co/icons/beats.png diff --git a/filebeat/README.md b/filebeat/README.md index 388c09b68..f3525f42e 100644 --- a/filebeat/README.md +++ b/filebeat/README.md @@ -16,43 +16,35 @@ This helm chart is a lightweight way to configure and run our official [Filebeat ## Installing -### Using Helm repository +This chart is tested with the latest 7.7.x versions. * Add the elastic helm charts repo - ``` + + ```bash helm repo add elastic https://helm.elastic.co ``` -* Install it - ``` - helm install --name filebeat elastic/filebeat - ``` -### Using master branch +* Install the latest 7.7 release -* Clone the git repo - ``` - git clone git@github.com:elastic/helm-charts.git - ``` -* Install it - ``` - helm install --name filebeat ./helm-charts/filebeat + ```bash + helm install --name filebeat elastic/filebeat --version=7.7.0 ``` -## Compatibility - -This chart is tested with the latest supported versions. The currently tested versions are: +### Using the 7.7 branch -| 6.x | 7.x | -| ----- | ----- | -| 6.8.8 | 7.6.2 | +* Clone the git repo and checkout the right branch -Examples of installing older major versions can be found in the [examples](https://github.com/elastic/helm-charts/tree/master/filebeat/examples) directory. + ```bash + git clone git@github.com:elastic/helm-charts.git + cd helm-charts + git checkout -b 7.7 origin/7.7 + ``` -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.6.2` of Filebeat it would look like this: +* Install the latest 7.7.x-SNAPSHOT -``` -helm install --name filebeat elastic/filebeat --set imageTag=7.6.2 -``` + ```bash + helm install --name filebeat ./helm-charts/filebeat + ``` ## Configuration @@ -68,7 +60,7 @@ helm install --name filebeat elastic/filebeat --set imageTag=7.6.2 | `hostPathRoot` | Fully-qualified [hostPath](https://kubernetes.io/docs/concepts/storage/volumes/#hostpath) that will be used to persist Filebeat registry data | `/var/lib` | | `hostNetworking` | Use host networking in the daemonset so that hostname is reported correctly | `false` | | `image` | The Filebeat docker image | `docker.elastic.co/beats/filebeat` | -| `imageTag` | The Filebeat docker image tag | `7.6.2` | +| `imageTag` | The Filebeat docker image tag | `7.7.0-SNAPSHOT` | | `imagePullPolicy` | The Kubernetes [imagePullPolicy](https://kubernetes.io/docs/concepts/containers/images/#updating-images) value | `IfNotPresent` | | `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 | `[]` | | `managedServiceAccount` | Whether the `serviceAccount` should be managed by this helm chart. Set this to `false` in order to manage your own service account and related roles. | `true` | diff --git a/filebeat/examples/6.x/Makefile b/filebeat/examples/6.x/Makefile deleted file mode 100644 index 34bc979b4..000000000 --- a/filebeat/examples/6.x/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -default: test - -include ../../../helpers/examples.mk - -RELEASE := helm-filebeat-six - -install: - helm upgrade --wait --timeout=600 --install $(RELEASE) --values values.yaml ../../ - -test: install goss - -purge: - helm del --purge $(RELEASE) diff --git a/filebeat/examples/6.x/test/goss.yaml b/filebeat/examples/6.x/test/goss.yaml deleted file mode 100644 index 1d43bc0d4..000000000 --- a/filebeat/examples/6.x/test/goss.yaml +++ /dev/null @@ -1,21 +0,0 @@ -port: - tcp:5066: - listening: true - ip: - - '127.0.0.1' - -mount: - /usr/share/filebeat/data: - exists: true -user: - filebeat: - exists: true - uid: 1000 - gid: 1000 - -http: - http://six-master:9200/_cat/indices: - status: 200 - timeout: 2000 - body: - - 'filebeat-6.8.8' diff --git a/filebeat/examples/6.x/values.yaml b/filebeat/examples/6.x/values.yaml deleted file mode 100644 index 96987de4d..000000000 --- a/filebeat/examples/6.x/values.yaml +++ /dev/null @@ -1,5 +0,0 @@ -imageTag: 6.8.8 - -extraEnvs: - - name: ELASTICSEARCH_HOSTS - value: six-master:9200 diff --git a/filebeat/examples/default/test/goss.yaml b/filebeat/examples/default/test/goss.yaml index cdcd95c55..f0c2458e4 100644 --- a/filebeat/examples/default/test/goss.yaml +++ b/filebeat/examples/default/test/goss.yaml @@ -29,7 +29,7 @@ http: status: 200 timeout: 2000 body: - - 'filebeat-7.6.2' + - 'filebeat-7.7.0' file: /usr/share/filebeat/filebeat.yml: @@ -44,4 +44,4 @@ command: exit-status: 0 stdout: - 'elasticsearch: http://elasticsearch-master:9200' - - 'version: 7.6.2' + - 'version: 7.7.0' diff --git a/filebeat/examples/oss/test/goss.yaml b/filebeat/examples/oss/test/goss.yaml index eb677e9f4..7f6925e5b 100644 --- a/filebeat/examples/oss/test/goss.yaml +++ b/filebeat/examples/oss/test/goss.yaml @@ -19,4 +19,4 @@ http: status: 200 timeout: 2000 body: - - 'filebeat-7.6.2' + - 'filebeat-7.7.0' diff --git a/filebeat/examples/security/test/goss.yaml b/filebeat/examples/security/test/goss.yaml index 8aa202587..4f44f46b5 100644 --- a/filebeat/examples/security/test/goss.yaml +++ b/filebeat/examples/security/test/goss.yaml @@ -3,7 +3,7 @@ http: status: 200 timeout: 2000 body: - - 'filebeat-7.6.2' + - 'filebeat-7.7.0' allow-insecure: true username: '{{ .Env.ELASTICSEARCH_USERNAME }}' password: '{{ .Env.ELASTICSEARCH_PASSWORD }}' diff --git a/filebeat/values.yaml b/filebeat/values.yaml index 6405b2c9c..93eb75332 100755 --- a/filebeat/values.yaml +++ b/filebeat/values.yaml @@ -48,7 +48,7 @@ envFrom: [] hostPathRoot: /var/lib hostNetworking: false image: "docker.elastic.co/beats/filebeat" -imageTag: "7.6.2" +imageTag: "7.7.0-SNAPSHOT" imagePullPolicy: "IfNotPresent" imagePullSecrets: [] diff --git a/helpers/bumper.py b/helpers/bumper.py index bd30fc613..0ca195b0c 100755 --- a/helpers/bumper.py +++ b/helpers/bumper.py @@ -20,8 +20,7 @@ os.chdir(os.path.join(os.path.dirname(__file__), "..")) versions = { - 6: os.environ.get("BUMPER_VERSION_6", "6.8.8"), - 7: os.environ.get("BUMPER_VERSION_7", "7.6.2"), + 7: os.environ.get("BUMPER_VERSION_7", "7.7.0-SNAPSHOT"), } chart_version = versions[7] diff --git a/helpers/examples.mk b/helpers/examples.mk index ce46f31ab..26bb0b2a7 100644 --- a/helpers/examples.mk +++ b/helpers/examples.mk @@ -1,7 +1,7 @@ GOSS_VERSION := v0.3.6 GOSS_FILE ?= goss.yaml GOSS_SELECTOR ?= release=$(RELEASE) -STACK_VERSION := 7.6.2 +STACK_VERSION := 7.7.0-SNAPSHOT .PHONY: help help: ## Display this help diff --git a/helpers/matrix.yml b/helpers/matrix.yml index 9adef0ddc..3a5871aad 100644 --- a/helpers/matrix.yml +++ b/helpers/matrix.yml @@ -11,32 +11,26 @@ ES_SUITE: - oss - security - upgrade - - 6.x KIBANA_SUITE: - default - oss - security - - 6.x FILEBEAT_SUITE: - default - oss - security - - 6.x METRICBEAT_SUITE: - default - oss - security - - 6.x LOGSTASH_SUITE: - default - oss - elasticsearch - - 6.x APM_SERVER_SUITE: - default - oss - security - - 6.x KUBERNETES_VERSION: - '1.14' - '1.15' diff --git a/kibana/Chart.yaml b/kibana/Chart.yaml index 9d2f3a611..ee49723c3 100755 --- a/kibana/Chart.yaml +++ b/kibana/Chart.yaml @@ -5,8 +5,8 @@ maintainers: - email: helm-charts@elastic.co name: Elastic name: kibana -version: 7.6.2 -appVersion: 7.6.2 +version: 7.7.0-SNAPSHOT +appVersion: 7.7.0-SNAPSHOT sources: - https://github.com/elastic/kibana icon: https://helm.elastic.co/icons/kibana.png diff --git a/kibana/README.md b/kibana/README.md index 0fd5aac95..409849bce 100644 --- a/kibana/README.md +++ b/kibana/README.md @@ -11,43 +11,36 @@ This helm chart is a lightweight way to configure and run our official [Kibana d ## Installing -### Using Helm repository +This chart is tested with the latest 7.7.x versions. * Add the elastic helm charts repo - ``` + + ```bash helm repo add elastic https://helm.elastic.co ``` -* Install it - ``` - helm install --name kibana elastic/kibana - ``` -### Using master branch +* Install the latest 7.7 release -* Clone the git repo - ``` - git clone git@github.com:elastic/helm-charts.git - ``` -* Install it - ``` - helm install --name kibana ./helm-charts/kibana + ```bash + helm install --name kibana elastic/kibana --version=7.7.0 ``` -## Compatibility +### Using the 7.7 branch -This chart is tested with the latest supported versions. The currently tested versions are: +* Clone the git repo and checkout the right branch -| 6.x | 7.x | -| ----- | ----- | -| 6.8.8 | 7.6.2 | + ```bash + git clone git@github.com:elastic/helm-charts.git + cd helm-charts + git checkout -b 7.7 origin/7.7 + ``` -Examples of installing older major versions can be found in the [examples](https://github.com/elastic/helm-charts/tree/master/kibana/examples) directory. +* Install the latest 7.7.x-SNAPSHOT -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.6.2` of Kibana it would look like this: + ```bash + helm install --name kibana ./helm-charts/kibana + ``` -``` -helm install --name kibana elastic/kibana --set imageTag=7.6.2 -``` ## Configuration @@ -59,7 +52,7 @@ helm install --name kibana elastic/kibana --set imageTag=7.6.2 | `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 | `name: NODE_OPTIONS`
`value: "--max-old-space-size=1800"` | | `secretMounts` | Allows you easily mount a secret as a file inside the deployment. Useful for mounting certificates and other secrets. See [values.yaml](https://github.com/elastic/helm-charts/tree/master/kibana/values.yaml) for an example | `[]` | | `image` | The Kibana docker image | `docker.elastic.co/kibana/kibana` | -| `imageTag` | The Kibana docker image tag | `7.6.2` | +| `imageTag` | The Kibana docker image tag | `7.7.0-SNAPSHOT` | | `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 Kibana pods | `{}` | | `resources` | Allows you to set the [resources](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/) for the statefulset | `requests.cpu: 1000m`
`requests.memory: 2Gi`
`limits.cpu: 1000m`
`limits.memory: 2Gi` | diff --git a/kibana/examples/6.x/Makefile b/kibana/examples/6.x/Makefile deleted file mode 100644 index 468e2b84a..000000000 --- a/kibana/examples/6.x/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -default: test -include ../../../helpers/examples.mk - -RELEASE := helm-kibana-six - -install: - helm upgrade --wait --timeout=600 --install --values ./values.yml $(RELEASE) ../../ - -purge: - helm del --purge $(RELEASE) - -test: install goss diff --git a/kibana/examples/6.x/test/goss.yaml b/kibana/examples/6.x/test/goss.yaml deleted file mode 100644 index aea90054d..000000000 --- a/kibana/examples/6.x/test/goss.yaml +++ /dev/null @@ -1,10 +0,0 @@ -http: - http://localhost:5601/api/status: - status: 200 - timeout: 2000 - body: - - '"number":"6.8.8"' - - http://localhost:5601/app/kibana: - status: 200 - timeout: 2000 diff --git a/kibana/examples/6.x/values.yml b/kibana/examples/6.x/values.yml deleted file mode 100644 index 474e0eb39..000000000 --- a/kibana/examples/6.x/values.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- - -imageTag: 6.8.8 -elasticsearchHosts: "http://six-master:9200" diff --git a/kibana/examples/default/test/goss.yaml b/kibana/examples/default/test/goss.yaml index a4ffec234..0fe62169f 100644 --- a/kibana/examples/default/test/goss.yaml +++ b/kibana/examples/default/test/goss.yaml @@ -3,7 +3,7 @@ http: status: 200 timeout: 2000 body: - - '"number":"7.6.2"' + - '"number":"7.7.0"' http://localhost:5601/app/kibana: status: 200 diff --git a/kibana/values.yaml b/kibana/values.yaml index 468a98533..5c30832de 100755 --- a/kibana/values.yaml +++ b/kibana/values.yaml @@ -24,7 +24,7 @@ secretMounts: [] # subPath: kibana.keystore # optional image: "docker.elastic.co/kibana/kibana" -imageTag: "7.6.2" +imageTag: "7.7.0-SNAPSHOT" imagePullPolicy: "IfNotPresent" # additionals labels diff --git a/logstash/Chart.yaml b/logstash/Chart.yaml index 3512dde75..a2466fd6f 100755 --- a/logstash/Chart.yaml +++ b/logstash/Chart.yaml @@ -5,8 +5,8 @@ maintainers: - email: helm-charts@elastic.co name: Elastic name: logstash -version: 7.6.2 -appVersion: 7.6.2 +version: 7.7.0-SNAPSHOT +appVersion: 7.7.0-SNAPSHOT sources: - https://github.com/elastic/logstash icon: https://helm.elastic.co/icons/logstash.png diff --git a/logstash/README.md b/logstash/README.md index c2db20a32..1c8e622ea 100644 --- a/logstash/README.md +++ b/logstash/README.md @@ -20,42 +20,36 @@ This helm chart is a lightweight way to configure and run our official [Logstash ## Installing -### Using Helm repository +This chart is tested with the latest 7.7.x versions. * Add the elastic helm charts repo - ``` + + ```bash helm repo add elastic https://helm.elastic.co ``` -* Install it - ``` - helm install --name logstash elastic/logstash -### Using master branch +* Install the latest 7.7 release -* Clone the git repo - ``` - git clone git@github.com:elastic/helm-charts.git - ``` -* Install it - ``` - helm install --name logstash ./helm-charts/logstash + ```bash + helm install --name logstash elastic/logstash --version=7.7.0 ``` -## Compatibility +### Using the 7.7 branch -This chart is tested with the latest supported versions. The currently tested versions are: +* Clone the git repo and checkout the right branch -| 6.x | 7.x | -| ----- | ----- | -| 6.8.8 | 7.6.2 | + ```bash + git clone git@github.com:elastic/helm-charts.git + cd helm-charts + git checkout -b 7.7 origin/7.7 + ``` -Examples of installing older major versions can be found in the [examples](https://github.com/elastic/helm-charts/tree/master/logstash/examples) directory. +* Install the latest 7.7.x-SNAPSHOT -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.6.2` of Logstash it would look like this: + ```bash + helm install --name logstash ./helm-charts/logstash + ``` -``` -helm install --name logstash elastic/logstash --set imageTag=7.6.2 -``` ## Configuration @@ -71,7 +65,7 @@ helm install --name logstash elastic/logstash --set imageTag=7.6.2 | `image` | The Logstash docker image | `docker.elastic.co/logstash/logstash` | | `imagePullPolicy` | The Kubernetes [imagePullPolicy](https://kubernetes.io/docs/concepts/containers/images/#updating-images) value | `IfNotPresent` | | `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 | `[]` | -| `imageTag` | The Logstash docker image tag | `7.6.2` | +| `imageTag` | The Logstash docker image tag | `7.7.0-SNAPSHOT` | | `httpPort` | The http port that Kubernetes will use for the healthchecks and the service. | `9600` | | `extraPorts` | An array of extra ports to open on the pod | `[]` | | `labels` | Configurable [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) applied to all Logstash pods | `{}` | diff --git a/logstash/examples/6.x/Makefile b/logstash/examples/6.x/Makefile deleted file mode 100644 index b44d6b24d..000000000 --- a/logstash/examples/6.x/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -default: test - -include ../../../helpers/examples.mk - -RELEASE := helm-logstash-six - -install: - helm upgrade --wait --timeout=900 --install $(RELEASE) --values ./values.yaml ../../ - -restart: - helm upgrade --set terminationGracePeriod=121 --wait --timeout=900 --install $(RELEASE) --values ./values.yaml ../../ - -test: install goss - -purge: - helm del --purge $(RELEASE) diff --git a/logstash/examples/6.x/test/goss.yaml b/logstash/examples/6.x/test/goss.yaml deleted file mode 100644 index 3bbfa1f59..000000000 --- a/logstash/examples/6.x/test/goss.yaml +++ /dev/null @@ -1,38 +0,0 @@ -user: - logstash: - exists: true - uid: 1000 - gid: 1000 - -http: - http://localhost:9600?pretty: - status: 200 - timeout: 2000 - body: - - '"host" : "helm-logstash-six-logstash-0"' - - '"version" : "6.8.8"' - - '"http_address" : "0.0.0.0:9600"' - - '"name" : "helm-logstash-six-logstash-0"' - -file: - /usr/share/logstash/config/logstash.yml: - exists: true - mode: "0644" - owner: logstash - group: root - filetype: file - contains: - - 'http.host: "0.0.0.0"' - /usr/share/logstash/pipeline/logstash.conf: - exists: true - mode: "0644" - owner: logstash - group: root - filetype: file - contains: - - 'input {' - - 'beats {' - - 'port => 5044' - - 'output {' - - 'stdout {' - - 'codec => rubydebug' diff --git a/logstash/examples/6.x/values.yaml b/logstash/examples/6.x/values.yaml deleted file mode 100644 index e5484ced7..000000000 --- a/logstash/examples/6.x/values.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- - -imageTag: "6.8.8" diff --git a/logstash/examples/default/test/goss.yaml b/logstash/examples/default/test/goss.yaml index cca0e6378..4a883cf36 100644 --- a/logstash/examples/default/test/goss.yaml +++ b/logstash/examples/default/test/goss.yaml @@ -10,7 +10,7 @@ http: timeout: 2000 body: - '"host" : "helm-logstash-default-logstash-0"' - - '"version" : "7.6.2"' + - '"version" : "7.7.0"' - '"http_address" : "0.0.0.0:9600"' - '"name" : "helm-logstash-default-logstash-0"' - '"status" : "green"' diff --git a/logstash/examples/elasticsearch/test/goss.yaml b/logstash/examples/elasticsearch/test/goss.yaml index 22954f6b0..4e850758c 100644 --- a/logstash/examples/elasticsearch/test/goss.yaml +++ b/logstash/examples/elasticsearch/test/goss.yaml @@ -22,7 +22,7 @@ http: timeout: 2000 body: - '"host" : "helm-logstash-elasticsearch-logstash-0"' - - '"version" : "7.6.2"' + - '"version" : "7.7.0"' - '"http_address" : "0.0.0.0:9600"' - '"name" : "helm-logstash-elasticsearch-logstash-0"' - '"status" : "green"' diff --git a/logstash/examples/oss/test/goss.yaml b/logstash/examples/oss/test/goss.yaml index e3c26c2a7..e1d11d999 100644 --- a/logstash/examples/oss/test/goss.yaml +++ b/logstash/examples/oss/test/goss.yaml @@ -10,7 +10,7 @@ http: timeout: 2000 body: - '"host" : "helm-logstash-oss-logstash-0"' - - '"version" : "7.6.2"' + - '"version" : "7.7.0"' - '"http_address" : "0.0.0.0:9600"' - '"name" : "helm-logstash-oss-logstash-0"' - '"status" : "green"' diff --git a/logstash/values.yaml b/logstash/values.yaml index 412252510..7537f84d9 100755 --- a/logstash/values.yaml +++ b/logstash/values.yaml @@ -33,7 +33,7 @@ extraEnvs: [] secretMounts: [] image: "docker.elastic.co/logstash/logstash" -imageTag: "7.6.2" +imageTag: "7.7.0-SNAPSHOT" imagePullPolicy: "IfNotPresent" imagePullSecrets: [] diff --git a/metricbeat/Chart.yaml b/metricbeat/Chart.yaml index b564a48c1..457bd5f64 100755 --- a/metricbeat/Chart.yaml +++ b/metricbeat/Chart.yaml @@ -5,8 +5,8 @@ maintainers: - email: helm-charts@elastic.co name: Elastic name: metricbeat -version: 7.6.2 -appVersion: 7.6.2 +version: 7.7.0-SNAPSHOT +appVersion: 7.7.0-SNAPSHOT sources: - https://github.com/elastic/beats icon: https://helm.elastic.co/icons/beats.png diff --git a/metricbeat/README.md b/metricbeat/README.md index bf804138f..f95c8bdbb 100644 --- a/metricbeat/README.md +++ b/metricbeat/README.md @@ -25,43 +25,35 @@ The workaround is to use `--force` argument for `helm upgrade` command which wil ## Installing -### Using Helm repository +This chart is tested with the latest 7.7.x versions. * Add the elastic helm charts repo - ``` + + ```bash helm repo add elastic https://helm.elastic.co ``` -* Install it - ``` - helm install --name metricbeat elastic/metricbeat - ``` -### Using master branch +* Install the latest 7.7 release -* Clone the git repo - ``` - git clone git@github.com:elastic/helm-charts.git - ``` -* Install it - ``` - helm install --name metricbeat ./helm-charts/metricbeat + ```bash + helm install --name metricbeat elastic/metricbeat --version=7.7.0 ``` -## Compatibility - -This chart is tested with the latest supported versions. The currently tested versions are: +### Using the 7.7 branch -| 6.x | 7.x | -| ----- | ----- | -| 6.8.8 | 7.6.2 | +* Clone the git repo and checkout the right branch -Examples of installing older major versions can be found in the [examples](https://github.com/elastic/helm-charts/tree/master/metricbeat/examples) directory. + ```bash + git clone git@github.com:elastic/helm-charts.git + cd helm-charts + git checkout -b 7.7 origin/7.7 + ``` -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.6.2` of metricbeat it would look like this: +* Install the latest 7.7.x-SNAPSHOT -``` -helm install --name metricbeat elastic/metricbeat --set imageTag=7.6.2 -``` + ```bash + helm install --name metricbeat ./helm-charts/metricbeat + ``` ## Configuration @@ -76,7 +68,7 @@ helm install --name metricbeat elastic/metricbeat --set imageTag=7.6.2 | `envFrom` | Templatable string of envFrom to be passed to the [environment from variables](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables) which will be appended to the `envFrom:` definition for the container | `[]` | | `hostPathRoot` | Fully-qualified [hostPath](https://kubernetes.io/docs/concepts/storage/volumes/#hostpath) that will be used to persist Metricbeat registry data | `/var/lib` | | `image` | The Metricbeat docker image | `docker.elastic.co/beats/metricbeat` | -| `imageTag` | The Metricbeat docker image tag | `7.6.2` | +| `imageTag` | The Metricbeat docker image tag | `7.7.0-SNAPSHOT` | | `imagePullPolicy` | The Kubernetes [imagePullPolicy](https://kubernetes.io/docs/concepts/containers/images/#updating-images) value | `IfNotPresent` | | `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 | `[]` | | `labels` | Configurable [label](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) applied to all Metricbeat pods | `{}` | diff --git a/metricbeat/examples/6.x/Makefile b/metricbeat/examples/6.x/Makefile deleted file mode 100644 index 05a66d2bc..000000000 --- a/metricbeat/examples/6.x/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -default: test - -include ../../../helpers/examples.mk - -RELEASE := helm-metricbeat-six -GOSS_SELECTOR = release=$(RELEASE),app=helm-metricbeat-six-metricbeat - -install: - helm upgrade --wait --timeout=600 --install $(RELEASE) --values values.yaml ../../ - -purge: - helm del --purge $(RELEASE) - -test-metrics: - GOSS_FILE=goss-metrics.yaml make goss GOSS_SELECTOR=release=$(RELEASE),app=helm-metricbeat-six-metricbeat-metrics - -test: install goss test-metrics diff --git a/metricbeat/examples/6.x/test/goss-metrics.yaml b/metricbeat/examples/6.x/test/goss-metrics.yaml deleted file mode 100644 index 8f60496c0..000000000 --- a/metricbeat/examples/6.x/test/goss-metrics.yaml +++ /dev/null @@ -1,43 +0,0 @@ -port: - tcp:5066: - listening: true - ip: - - '127.0.0.1' - -mount: - /usr/share/metricbeat/kube-state-metrics-metricbeat.yml: - exists: true - opts: - - ro - -user: - metricbeat: - exists: true - uid: 1000 - gid: 1000 - -http: - http://six-master:9200/_cat/indices: - status: 200 - timeout: 2000 - body: - - 'metricbeat-6.8.8' - http://six-master:9200/_search?q=metricset.name:state_deployment: - status: 200 - timeout: 2000 - body: - - 'metricbeat-6.8.8' - -file: - /usr/share/metricbeat/metricbeat.yml: - exists: true - contains: - - 'add_kubernetes_metadata' - - 'output.elasticsearch' - -command: - cd /usr/share/metricbeat && metricbeat test output: - exit-status: 0 - stdout: - - 'elasticsearch: http://six-master:9200' - - 'version: 6.8.8' diff --git a/metricbeat/examples/6.x/test/goss.yaml b/metricbeat/examples/6.x/test/goss.yaml deleted file mode 100644 index 262bc5843..000000000 --- a/metricbeat/examples/6.x/test/goss.yaml +++ /dev/null @@ -1,51 +0,0 @@ -port: - tcp:5066: - listening: true - ip: - - '127.0.0.1' - -mount: - /usr/share/metricbeat/data: - exists: true - /run/docker.sock: - exists: true - /var/lib/docker/containers: - exists: true - opts: - - ro - /usr/share/metricbeat/metricbeat.yml: - exists: true - opts: - - ro - -user: - metricbeat: - exists: true - uid: 1000 - gid: 1000 - -http: - http://six-master:9200/_cat/indices: - status: 200 - timeout: 2000 - body: - - 'metricbeat-6.8.8' - http://six-master:9200/_search?q=metricset.name:container: - status: 200 - timeout: 2000 - body: - - 'metricbeat-6.8.8' - -file: - /usr/share/metricbeat/metricbeat.yml: - exists: true - contains: - - 'add_kubernetes_metadata' - - 'output.elasticsearch' - -command: - cd /usr/share/metricbeat && metricbeat test output: - exit-status: 0 - stdout: - - 'elasticsearch: http://six-master:9200' - - 'version: 6.8.8' diff --git a/metricbeat/examples/6.x/values.yaml b/metricbeat/examples/6.x/values.yaml deleted file mode 100644 index 96987de4d..000000000 --- a/metricbeat/examples/6.x/values.yaml +++ /dev/null @@ -1,5 +0,0 @@ -imageTag: 6.8.8 - -extraEnvs: - - name: ELASTICSEARCH_HOSTS - value: six-master:9200 diff --git a/metricbeat/examples/default/test/goss-metrics.yaml b/metricbeat/examples/default/test/goss-metrics.yaml index e079450d6..f2bca1512 100644 --- a/metricbeat/examples/default/test/goss-metrics.yaml +++ b/metricbeat/examples/default/test/goss-metrics.yaml @@ -21,13 +21,13 @@ http: status: 200 timeout: 2000 body: - - 'metricbeat-7.6.2' + - 'metricbeat-7.7.0' 'http://elasticsearch-master:9200/_search?q=metricset.name:state_container%20AND%20kubernetes.container.name:metricbeat': status: 200 timeout: 2000 body: - - 'metricbeat-7.6.2' + - 'metricbeat-7.7.0' file: /usr/share/metricbeat/metricbeat.yml: @@ -42,4 +42,4 @@ command: exit-status: 0 stdout: - 'elasticsearch: http://elasticsearch-master:9200' - - 'version: 7.6.2' + - 'version: 7.7.0' diff --git a/metricbeat/examples/default/test/goss.yaml b/metricbeat/examples/default/test/goss.yaml index 267b9f7be..1f127101e 100644 --- a/metricbeat/examples/default/test/goss.yaml +++ b/metricbeat/examples/default/test/goss.yaml @@ -29,12 +29,12 @@ http: status: 200 timeout: 2000 body: - - 'metricbeat-7.6.2' + - 'metricbeat-7.7.0' 'http://elasticsearch-master:9200/_search?q=metricset.name:container%20AND%20kubernetes.container.name:metricbeat': status: 200 timeout: 2000 body: - - 'metricbeat-7.6.2' + - 'metricbeat-7.7.0' file: /usr/share/metricbeat/metricbeat.yml: @@ -49,4 +49,4 @@ command: exit-status: 0 stdout: - 'elasticsearch: http://elasticsearch-master:9200' - - 'version: 7.6.2' + - 'version: 7.7.0' diff --git a/metricbeat/examples/oss/test/goss-metrics.yaml b/metricbeat/examples/oss/test/goss-metrics.yaml index 251165a9a..0632f92c5 100644 --- a/metricbeat/examples/oss/test/goss-metrics.yaml +++ b/metricbeat/examples/oss/test/goss-metrics.yaml @@ -21,12 +21,12 @@ http: status: 200 timeout: 2000 body: - - 'metricbeat-7.6.2' + - 'metricbeat-7.7.0' http://oss-master:9200/_search?q=metricset.name:state_deployment: status: 200 timeout: 2000 body: - - 'metricbeat-7.6.2' + - 'metricbeat-7.7.0' file: /usr/share/metricbeat/metricbeat.yml: @@ -40,4 +40,4 @@ command: exit-status: 0 stdout: - 'elasticsearch: http://oss-master:9200' - - 'version: 7.6.2' + - 'version: 7.7.0' diff --git a/metricbeat/examples/oss/test/goss.yaml b/metricbeat/examples/oss/test/goss.yaml index 392daeee2..fe2f045a3 100644 --- a/metricbeat/examples/oss/test/goss.yaml +++ b/metricbeat/examples/oss/test/goss.yaml @@ -29,12 +29,12 @@ http: status: 200 timeout: 2000 body: - - 'metricbeat-7.6.2' + - 'metricbeat-7.7.0' http://oss-master:9200/_search?q=metricset.name:container: status: 200 timeout: 2000 body: - - 'metricbeat-7.6.2' + - 'metricbeat-7.7.0' file: /usr/share/metricbeat/metricbeat.yml: @@ -48,4 +48,4 @@ command: exit-status: 0 stdout: - 'elasticsearch: http://oss-master:9200' - - 'version: 7.6.2' + - 'version: 7.7.0' diff --git a/metricbeat/examples/security/test/goss-metrics.yaml b/metricbeat/examples/security/test/goss-metrics.yaml index 1b8e35c69..52a2a8ab9 100644 --- a/metricbeat/examples/security/test/goss-metrics.yaml +++ b/metricbeat/examples/security/test/goss-metrics.yaml @@ -21,7 +21,7 @@ http: status: 200 timeout: 2000 body: - - 'metricbeat-7.6.2' + - 'metricbeat-7.7.0' allow-insecure: true username: '{{ .Env.ELASTICSEARCH_USERNAME }}' password: '{{ .Env.ELASTICSEARCH_PASSWORD }}' @@ -29,7 +29,7 @@ http: status: 200 timeout: 2000 body: - - 'metricbeat-7.6.2' + - 'metricbeat-7.7.0' allow-insecure: true username: '{{ .Env.ELASTICSEARCH_USERNAME }}' password: '{{ .Env.ELASTICSEARCH_PASSWORD }}' @@ -46,4 +46,4 @@ command: exit-status: 0 stdout: - 'elasticsearch: https://security-master:9200' - - 'version: 7.6.2' + - 'version: 7.7.0' diff --git a/metricbeat/examples/security/test/goss.yaml b/metricbeat/examples/security/test/goss.yaml index b693e5969..23181251d 100644 --- a/metricbeat/examples/security/test/goss.yaml +++ b/metricbeat/examples/security/test/goss.yaml @@ -29,7 +29,7 @@ http: status: 200 timeout: 2000 body: - - 'metricbeat-7.6.2' + - 'metricbeat-7.7.0' allow-insecure: true username: '{{ .Env.ELASTICSEARCH_USERNAME }}' password: '{{ .Env.ELASTICSEARCH_PASSWORD }}' @@ -37,7 +37,7 @@ http: status: 200 timeout: 2000 body: - - 'metricbeat-7.6.2' + - 'metricbeat-7.7.0' allow-insecure: true username: '{{ .Env.ELASTICSEARCH_USERNAME }}' password: '{{ .Env.ELASTICSEARCH_PASSWORD }}' @@ -54,4 +54,4 @@ command: exit-status: 0 stdout: - 'elasticsearch: https://security-master:9200' - - 'version: 7.6.2' + - 'version: 7.7.0' diff --git a/metricbeat/examples/security/values.yaml b/metricbeat/examples/security/values.yaml index 95dbb687f..cd2a942f5 100644 --- a/metricbeat/examples/security/values.yaml +++ b/metricbeat/examples/security/values.yaml @@ -10,7 +10,13 @@ metricbeatConfig: - volume period: 10s host: "${NODE_NAME}" - hosts: ["${NODE_NAME}:10255"] + hosts: ["https://${NODE_NAME}:10250"] + bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token + ssl.verification_mode: "none" + # If using Red Hat OpenShift remove ssl.verification_mode entry and + # uncomment these settings: + #ssl.certificate_authorities: + #- /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt processors: - add_kubernetes_metadata: in_cluster: true diff --git a/metricbeat/values.yaml b/metricbeat/values.yaml index 141b02c33..2e88e5fa8 100755 --- a/metricbeat/values.yaml +++ b/metricbeat/values.yaml @@ -13,7 +13,13 @@ metricbeatConfig: - volume period: 10s host: "${NODE_NAME}" - hosts: ["${NODE_NAME}:10255"] + hosts: ["https://${NODE_NAME}:10250"] + bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token + ssl.verification_mode: "none" + # If using Red Hat OpenShift remove ssl.verification_mode entry and + # uncomment these settings: + #ssl.certificate_authorities: + #- /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt processors: - add_kubernetes_metadata: in_cluster: true @@ -98,7 +104,7 @@ envFrom: [] hostPathRoot: /var/lib image: "docker.elastic.co/beats/metricbeat" -imageTag: "7.6.2" +imageTag: "7.7.0-SNAPSHOT" imagePullPolicy: "IfNotPresent" imagePullSecrets: [] @@ -145,6 +151,7 @@ clusterRoleRules: - events - deployments - nodes + - nodes/stats - replicasets verbs: - get From 29d33c3542aaefc15454022c8b0adc1cd7eccc54 Mon Sep 17 00:00:00 2001 From: Julien Mailleret Date: Fri, 10 Apr 2020 09:09:11 +0200 Subject: [PATCH 02/44] [meta] fix ci jobs --- .ci/jobs.t/elastic+helm-charts+{branch}+cluster-cleanup.yml | 2 +- .ci/jobs.t/elastic+helm-charts+{branch}+cluster-creation.yml | 2 +- .../elastic+helm-charts+{branch}+integration-apm-server.yml | 2 +- .../elastic+helm-charts+{branch}+integration-elasticsearch.yml | 2 +- .../elastic+helm-charts+{branch}+integration-filebeat.yml | 2 +- .ci/jobs.t/elastic+helm-charts+{branch}+integration-kibana.yml | 2 +- .../elastic+helm-charts+{branch}+integration-logstash.yml | 2 +- .../elastic+helm-charts+{branch}+integration-metricbeat.yml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.ci/jobs.t/elastic+helm-charts+{branch}+cluster-cleanup.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+cluster-cleanup.yml index 389ef8db2..375741b59 100644 --- a/.ci/jobs.t/elastic+helm-charts+{branch}+cluster-cleanup.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+cluster-cleanup.yml @@ -29,7 +29,7 @@ unset VAULT_ROLE_ID VAULT_SECRET_ID set -x - cluster_name="helm-${KUBERNETES_VERSION//./}-${branch_specifier:0:10}" + cluster_name="helm-${KUBERNETES_VERSION//./}-%BRANCH%" cd helpers/terraform/ ./in-docker make destroy KUBERNETES_VERSION=${KUBERNETES_VERSION} CLUSTER_NAME=${cluster_name} diff --git a/.ci/jobs.t/elastic+helm-charts+{branch}+cluster-creation.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+cluster-creation.yml index c38168fc2..1a51c8209 100644 --- a/.ci/jobs.t/elastic+helm-charts+{branch}+cluster-creation.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+cluster-creation.yml @@ -29,7 +29,7 @@ unset VAULT_ROLE_ID VAULT_SECRET_ID set -x - cluster_name="helm-${KUBERNETES_VERSION//./}-${branch_specifier:0:10}" + cluster_name="helm-${KUBERNETES_VERSION//./}-%BRANCH%" cd helpers/terraform/ ./in-docker make up KUBERNETES_VERSION=${KUBERNETES_VERSION} CLUSTER_NAME=${cluster_name} diff --git a/.ci/jobs.t/elastic+helm-charts+{branch}+integration-apm-server.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-apm-server.yml index db65f2e2d..c7c3f37f4 100644 --- a/.ci/jobs.t/elastic+helm-charts+{branch}+integration-apm-server.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-apm-server.yml @@ -33,7 +33,7 @@ unset VAULT_ROLE_ID VAULT_SECRET_ID set -x - cluster_name="helm-${KUBERNETES_VERSION//./}-${branch_specifier:0:10}" + cluster_name="helm-${KUBERNETES_VERSION//./}-%BRANCH%" cd helpers/terraform/ ./in-docker make integration KUBERNETES_VERSION=${KUBERNETES_VERSION} CLUSTER_NAME=${cluster_name} SUITE=${APM_SERVER_SUITE} CHART=apm-server diff --git a/.ci/jobs.t/elastic+helm-charts+{branch}+integration-elasticsearch.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-elasticsearch.yml index 8ba86cf7f..8f4ddf7dc 100644 --- a/.ci/jobs.t/elastic+helm-charts+{branch}+integration-elasticsearch.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-elasticsearch.yml @@ -33,7 +33,7 @@ unset VAULT_ROLE_ID VAULT_SECRET_ID set -x - cluster_name="helm-${KUBERNETES_VERSION//./}-${branch_specifier:0:10}" + cluster_name="helm-${KUBERNETES_VERSION//./}-%BRANCH%" cd helpers/terraform/ ./in-docker make integration KUBERNETES_VERSION=${KUBERNETES_VERSION} CLUSTER_NAME=${cluster_name} SUITE=${ES_SUITE} CHART=elasticsearch diff --git a/.ci/jobs.t/elastic+helm-charts+{branch}+integration-filebeat.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-filebeat.yml index 4cb374036..631cf0413 100644 --- a/.ci/jobs.t/elastic+helm-charts+{branch}+integration-filebeat.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-filebeat.yml @@ -33,7 +33,7 @@ unset VAULT_ROLE_ID VAULT_SECRET_ID set -x - cluster_name="helm-${KUBERNETES_VERSION//./}-${branch_specifier:0:10}" + cluster_name="helm-${KUBERNETES_VERSION//./}-%BRANCH%" cd helpers/terraform/ ./in-docker make integration KUBERNETES_VERSION=${KUBERNETES_VERSION} CLUSTER_NAME=${cluster_name} SUITE=${FILEBEAT_SUITE} CHART=filebeat diff --git a/.ci/jobs.t/elastic+helm-charts+{branch}+integration-kibana.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-kibana.yml index 65b4e47b8..d0a5b5933 100644 --- a/.ci/jobs.t/elastic+helm-charts+{branch}+integration-kibana.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-kibana.yml @@ -33,7 +33,7 @@ unset VAULT_ROLE_ID VAULT_SECRET_ID set -x - cluster_name="helm-${KUBERNETES_VERSION//./}-${branch_specifier:0:10}" + cluster_name="helm-${KUBERNETES_VERSION//./}-%BRANCH%" cd helpers/terraform/ ./in-docker make integration KUBERNETES_VERSION=${KUBERNETES_VERSION} CLUSTER_NAME=${cluster_name} SUITE=${KIBANA_SUITE} CHART=kibana diff --git a/.ci/jobs.t/elastic+helm-charts+{branch}+integration-logstash.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-logstash.yml index a88c04954..0224e363f 100644 --- a/.ci/jobs.t/elastic+helm-charts+{branch}+integration-logstash.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-logstash.yml @@ -33,7 +33,7 @@ unset VAULT_ROLE_ID VAULT_SECRET_ID set -x - cluster_name="helm-${KUBERNETES_VERSION//./}-${branch_specifier:0:10}" + cluster_name="helm-${KUBERNETES_VERSION//./}-%BRANCH%" cd helpers/terraform/ ./in-docker make integration KUBERNETES_VERSION=${KUBERNETES_VERSION} CLUSTER_NAME=${cluster_name} SUITE=${LOGSTASH_SUITE} CHART=logstash diff --git a/.ci/jobs.t/elastic+helm-charts+{branch}+integration-metricbeat.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-metricbeat.yml index c34a03a2d..05690b390 100644 --- a/.ci/jobs.t/elastic+helm-charts+{branch}+integration-metricbeat.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-metricbeat.yml @@ -33,7 +33,7 @@ unset VAULT_ROLE_ID VAULT_SECRET_ID set -x - cluster_name="helm-${KUBERNETES_VERSION//./}-${branch_specifier:0:10}" + cluster_name="helm-${KUBERNETES_VERSION//./}-%BRANCH%" cd helpers/terraform/ ./in-docker make integration KUBERNETES_VERSION=${KUBERNETES_VERSION} CLUSTER_NAME=${cluster_name} SUITE=${METRICBEAT_SUITE} CHART=metricbeat From a55cea1bf35a502c83304d86d38cc8ff63ecace2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20Gr=C3=A9au?= Date: Fri, 10 Apr 2020 10:26:00 -0400 Subject: [PATCH 03/44] [jenkins] Fix Google cluster name (#571) The cluster names created for running tests can't contain the `.` character which is part of the branch name. --- .ci/jobs.t/elastic+helm-charts+{branch}+cluster-cleanup.yml | 3 ++- .ci/jobs.t/elastic+helm-charts+{branch}+cluster-creation.yml | 3 ++- .../elastic+helm-charts+{branch}+integration-apm-server.yml | 3 ++- .../elastic+helm-charts+{branch}+integration-elasticsearch.yml | 3 ++- .../elastic+helm-charts+{branch}+integration-filebeat.yml | 3 ++- .ci/jobs.t/elastic+helm-charts+{branch}+integration-kibana.yml | 3 ++- .../elastic+helm-charts+{branch}+integration-logstash.yml | 3 ++- .../elastic+helm-charts+{branch}+integration-metricbeat.yml | 3 ++- 8 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.ci/jobs.t/elastic+helm-charts+{branch}+cluster-cleanup.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+cluster-cleanup.yml index 375741b59..ada3ee74d 100644 --- a/.ci/jobs.t/elastic+helm-charts+{branch}+cluster-cleanup.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+cluster-cleanup.yml @@ -29,7 +29,8 @@ unset VAULT_ROLE_ID VAULT_SECRET_ID set -x - cluster_name="helm-${KUBERNETES_VERSION//./}-%BRANCH%" + BRANCH_NAME="%BRANCH%" + cluster_name="helm-${KUBERNETES_VERSION//./}-${BRANCH_NAME//./}" cd helpers/terraform/ ./in-docker make destroy KUBERNETES_VERSION=${KUBERNETES_VERSION} CLUSTER_NAME=${cluster_name} diff --git a/.ci/jobs.t/elastic+helm-charts+{branch}+cluster-creation.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+cluster-creation.yml index 1a51c8209..667e5aa40 100644 --- a/.ci/jobs.t/elastic+helm-charts+{branch}+cluster-creation.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+cluster-creation.yml @@ -29,7 +29,8 @@ unset VAULT_ROLE_ID VAULT_SECRET_ID set -x - cluster_name="helm-${KUBERNETES_VERSION//./}-%BRANCH%" + BRANCH_NAME="%BRANCH%" + cluster_name="helm-${KUBERNETES_VERSION//./}-${BRANCH_NAME//./}" cd helpers/terraform/ ./in-docker make up KUBERNETES_VERSION=${KUBERNETES_VERSION} CLUSTER_NAME=${cluster_name} diff --git a/.ci/jobs.t/elastic+helm-charts+{branch}+integration-apm-server.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-apm-server.yml index c7c3f37f4..2bd7cb493 100644 --- a/.ci/jobs.t/elastic+helm-charts+{branch}+integration-apm-server.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-apm-server.yml @@ -33,7 +33,8 @@ unset VAULT_ROLE_ID VAULT_SECRET_ID set -x - cluster_name="helm-${KUBERNETES_VERSION//./}-%BRANCH%" + BRANCH_NAME="%BRANCH%" + cluster_name="helm-${KUBERNETES_VERSION//./}-${BRANCH_NAME//./}" cd helpers/terraform/ ./in-docker make integration KUBERNETES_VERSION=${KUBERNETES_VERSION} CLUSTER_NAME=${cluster_name} SUITE=${APM_SERVER_SUITE} CHART=apm-server diff --git a/.ci/jobs.t/elastic+helm-charts+{branch}+integration-elasticsearch.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-elasticsearch.yml index 8f4ddf7dc..4bfa19e1c 100644 --- a/.ci/jobs.t/elastic+helm-charts+{branch}+integration-elasticsearch.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-elasticsearch.yml @@ -33,7 +33,8 @@ unset VAULT_ROLE_ID VAULT_SECRET_ID set -x - cluster_name="helm-${KUBERNETES_VERSION//./}-%BRANCH%" + BRANCH_NAME="%BRANCH%" + cluster_name="helm-${KUBERNETES_VERSION//./}-${BRANCH_NAME//./}" cd helpers/terraform/ ./in-docker make integration KUBERNETES_VERSION=${KUBERNETES_VERSION} CLUSTER_NAME=${cluster_name} SUITE=${ES_SUITE} CHART=elasticsearch diff --git a/.ci/jobs.t/elastic+helm-charts+{branch}+integration-filebeat.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-filebeat.yml index 631cf0413..0744ae0fc 100644 --- a/.ci/jobs.t/elastic+helm-charts+{branch}+integration-filebeat.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-filebeat.yml @@ -33,7 +33,8 @@ unset VAULT_ROLE_ID VAULT_SECRET_ID set -x - cluster_name="helm-${KUBERNETES_VERSION//./}-%BRANCH%" + BRANCH_NAME="%BRANCH%" + cluster_name="helm-${KUBERNETES_VERSION//./}-${BRANCH_NAME//./}" cd helpers/terraform/ ./in-docker make integration KUBERNETES_VERSION=${KUBERNETES_VERSION} CLUSTER_NAME=${cluster_name} SUITE=${FILEBEAT_SUITE} CHART=filebeat diff --git a/.ci/jobs.t/elastic+helm-charts+{branch}+integration-kibana.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-kibana.yml index d0a5b5933..cea631b36 100644 --- a/.ci/jobs.t/elastic+helm-charts+{branch}+integration-kibana.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-kibana.yml @@ -33,7 +33,8 @@ unset VAULT_ROLE_ID VAULT_SECRET_ID set -x - cluster_name="helm-${KUBERNETES_VERSION//./}-%BRANCH%" + BRANCH_NAME="%BRANCH%" + cluster_name="helm-${KUBERNETES_VERSION//./}-${BRANCH_NAME//./}" cd helpers/terraform/ ./in-docker make integration KUBERNETES_VERSION=${KUBERNETES_VERSION} CLUSTER_NAME=${cluster_name} SUITE=${KIBANA_SUITE} CHART=kibana diff --git a/.ci/jobs.t/elastic+helm-charts+{branch}+integration-logstash.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-logstash.yml index 0224e363f..51e3b2ced 100644 --- a/.ci/jobs.t/elastic+helm-charts+{branch}+integration-logstash.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-logstash.yml @@ -33,7 +33,8 @@ unset VAULT_ROLE_ID VAULT_SECRET_ID set -x - cluster_name="helm-${KUBERNETES_VERSION//./}-%BRANCH%" + BRANCH_NAME="%BRANCH%" + cluster_name="helm-${KUBERNETES_VERSION//./}-${BRANCH_NAME//./}" cd helpers/terraform/ ./in-docker make integration KUBERNETES_VERSION=${KUBERNETES_VERSION} CLUSTER_NAME=${cluster_name} SUITE=${LOGSTASH_SUITE} CHART=logstash diff --git a/.ci/jobs.t/elastic+helm-charts+{branch}+integration-metricbeat.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-metricbeat.yml index 05690b390..8a1fb46f3 100644 --- a/.ci/jobs.t/elastic+helm-charts+{branch}+integration-metricbeat.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+integration-metricbeat.yml @@ -33,7 +33,8 @@ unset VAULT_ROLE_ID VAULT_SECRET_ID set -x - cluster_name="helm-${KUBERNETES_VERSION//./}-%BRANCH%" + BRANCH_NAME="%BRANCH%" + cluster_name="helm-${KUBERNETES_VERSION//./}-${BRANCH_NAME//./}" cd helpers/terraform/ ./in-docker make integration KUBERNETES_VERSION=${KUBERNETES_VERSION} CLUSTER_NAME=${cluster_name} SUITE=${METRICBEAT_SUITE} CHART=metricbeat From b9e724ed59e588ea6ae132076e50d5c44d7d3c80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20Gr=C3=A9au?= Date: Tue, 14 Apr 2020 12:21:43 -0400 Subject: [PATCH 04/44] [ci] Fix triggering upstream cleanup job (#578) For doing the integration tests some GKE clusters are created. There is a dedicated job to cleanup these clusters at the end of the tests. This commit fixes the Jenkins configuration to make sure this upstream job (which does not need parameter) is triggered. --- .ci/jobs.t/elastic+helm-charts+{branch}.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.ci/jobs.t/elastic+helm-charts+{branch}.yml b/.ci/jobs.t/elastic+helm-charts+{branch}.yml index 44698a183..f526b0db9 100644 --- a/.ci/jobs.t/elastic+helm-charts+{branch}.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}.yml @@ -44,5 +44,5 @@ publishers: - trigger-parameterized-builds: - project: elastic+helm-charts+%BRANCH%+cluster-cleanup - current-parameters: true - trigger-with-no-params: false + current-parameters: false + trigger-with-no-params: true From 32ed278af6e6287aae99796e50a1dfb58360c130 Mon Sep 17 00:00:00 2001 From: Julien Mailleret Date: Fri, 10 Apr 2020 14:44:02 +0200 Subject: [PATCH 05/44] Merge pull request #567 from jmlrt/metricbeat-improvements Metricbeat improvements --- .gitignore | 1 + metricbeat/examples/default/test/goss.yaml | 4 --- metricbeat/examples/oss/test/goss.yaml | 4 --- metricbeat/examples/security/test/goss.yaml | 4 --- metricbeat/examples/security/values.yaml | 3 +- metricbeat/templates/daemonset.yaml | 6 ---- metricbeat/tests/metricbeat_test.py | 4 +-- metricbeat/values.yaml | 40 +++++++++++---------- 8 files changed, 26 insertions(+), 40 deletions(-) diff --git a/.gitignore b/.gitignore index a917d1fa5..15f440687 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ index.yaml *.tgz .idea/ /venv +.vscode/ diff --git a/metricbeat/examples/default/test/goss.yaml b/metricbeat/examples/default/test/goss.yaml index 1f127101e..d353cba76 100644 --- a/metricbeat/examples/default/test/goss.yaml +++ b/metricbeat/examples/default/test/goss.yaml @@ -9,10 +9,6 @@ mount: exists: true /run/docker.sock: exists: true - /var/lib/docker/containers: - exists: true - opts: - - ro /usr/share/metricbeat/metricbeat.yml: exists: true opts: diff --git a/metricbeat/examples/oss/test/goss.yaml b/metricbeat/examples/oss/test/goss.yaml index fe2f045a3..af2f0826b 100644 --- a/metricbeat/examples/oss/test/goss.yaml +++ b/metricbeat/examples/oss/test/goss.yaml @@ -9,10 +9,6 @@ mount: exists: true /run/docker.sock: exists: true - /var/lib/docker/containers: - exists: true - opts: - - ro /usr/share/metricbeat/metricbeat.yml: exists: true opts: diff --git a/metricbeat/examples/security/test/goss.yaml b/metricbeat/examples/security/test/goss.yaml index 23181251d..8ee1ea5b9 100644 --- a/metricbeat/examples/security/test/goss.yaml +++ b/metricbeat/examples/security/test/goss.yaml @@ -9,10 +9,6 @@ mount: exists: true /run/docker.sock: exists: true - /var/lib/docker/containers: - exists: true - opts: - - ro /usr/share/metricbeat/metricbeat.yml: exists: true opts: diff --git a/metricbeat/examples/security/values.yaml b/metricbeat/examples/security/values.yaml index cd2a942f5..8b48e814e 100644 --- a/metricbeat/examples/security/values.yaml +++ b/metricbeat/examples/security/values.yaml @@ -18,8 +18,7 @@ metricbeatConfig: #ssl.certificate_authorities: #- /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt processors: - - add_kubernetes_metadata: - in_cluster: true + - add_kubernetes_metadata: ~ - module: kubernetes enabled: true metricsets: diff --git a/metricbeat/templates/daemonset.yaml b/metricbeat/templates/daemonset.yaml index 392b7cf84..4ef74e6b9 100644 --- a/metricbeat/templates/daemonset.yaml +++ b/metricbeat/templates/daemonset.yaml @@ -68,9 +68,6 @@ spec: hostPath: path: {{ .Values.hostPathRoot }}/{{ template "metricbeat.fullname" . }}-{{ .Release.Namespace }}-data type: DirectoryOrCreate - - name: varlibdockercontainers - hostPath: - path: /var/lib/docker/containers - name: varrundockersock hostPath: path: /var/run/docker.sock @@ -142,9 +139,6 @@ spec: {{- end }} - name: data mountPath: /usr/share/metricbeat/data - - name: varlibdockercontainers - mountPath: /var/lib/docker/containers - readOnly: true # Necessary when using autodiscovery; avoid mounting it otherwise # See: https://www.elastic.co/guide/en/beats/metricbeat/master/configuration-autodiscover.html - name: varrundockersock diff --git a/metricbeat/tests/metricbeat_test.py b/metricbeat/tests/metricbeat_test.py index c20fe252c..447f5cf3f 100644 --- a/metricbeat/tests/metricbeat_test.py +++ b/metricbeat/tests/metricbeat_test.py @@ -334,9 +334,9 @@ def test_cluster_role_rules(): config = "" r = helm_template(config) rules = r["clusterrole"]["release-name-metricbeat-cluster-role"]["rules"][0] - assert rules["apiGroups"][0] == "extensions" + assert rules["apiGroups"][0] == "" assert rules["verbs"][0] == "get" - assert rules["resources"][0] == "namespaces" + assert rules["resources"][0] == "nodes" config = """ clusterRoleRules: diff --git a/metricbeat/values.yaml b/metricbeat/values.yaml index 2e88e5fa8..20c98ce29 100755 --- a/metricbeat/values.yaml +++ b/metricbeat/values.yaml @@ -21,8 +21,7 @@ metricbeatConfig: #ssl.certificate_authorities: #- /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt processors: - - add_kubernetes_metadata: - in_cluster: true + - add_kubernetes_metadata: ~ - module: kubernetes enabled: true metricsets: @@ -141,22 +140,27 @@ labels: {} managedServiceAccount: true clusterRoleRules: - - apiGroups: - - "extensions" - - "apps" - - "" - resources: - - namespaces - - pods - - events - - deployments - - nodes - - nodes/stats - - replicasets - verbs: - - get - - list - - watch +- apiGroups: [""] + resources: + - nodes + - namespaces + - events + - pods + verbs: ["get", "list", "watch"] +- apiGroups: ["extensions"] + resources: + - replicasets + verbs: ["get", "list", "watch"] +- apiGroups: ["apps"] + resources: + - statefulsets + - deployments + - replicasets + verbs: ["get", "list", "watch"] +- apiGroups: [""] + resources: + - nodes/stats + verbs: ["get"] podAnnotations: {} # iam.amazonaws.com/role: es-cluster From 724f306e945c870d8f4099c12f031024f8a3f8b8 Mon Sep 17 00:00:00 2001 From: Julien Mailleret Date: Fri, 10 Apr 2020 15:12:06 +0200 Subject: [PATCH 06/44] Merge pull request #568 from jmlrt/filebeat-improvements Filebeat improvements --- filebeat/examples/security/values.yaml | 13 ++++++++----- filebeat/templates/daemonset.yaml | 6 ++++++ filebeat/values.yaml | 12 ++++++++---- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/filebeat/examples/security/values.yaml b/filebeat/examples/security/values.yaml index bedb79643..606961fa8 100644 --- a/filebeat/examples/security/values.yaml +++ b/filebeat/examples/security/values.yaml @@ -1,12 +1,15 @@ filebeatConfig: filebeat.yml: | filebeat.inputs: - - type: docker - containers.ids: - - '*' + - type: container + paths: + - /var/log/containers/*.log processors: - - add_kubernetes_metadata: - in_cluster: true + - add_kubernetes_metadata: + host: ${NODE_NAME} + matchers: + - logs_path: + logs_path: "/var/log/containers/" output.elasticsearch: username: '${ELASTICSEARCH_USERNAME}' diff --git a/filebeat/templates/daemonset.yaml b/filebeat/templates/daemonset.yaml index 5c0063f67..dbd446748 100644 --- a/filebeat/templates/daemonset.yaml +++ b/filebeat/templates/daemonset.yaml @@ -75,6 +75,9 @@ spec: - name: varlibdockercontainers hostPath: path: /var/lib/docker/containers + - name: varlog + hostPath: + path: /var/log - name: varrundockersock hostPath: path: /var/run/docker.sock @@ -152,6 +155,9 @@ spec: - name: varlibdockercontainers mountPath: /var/lib/docker/containers readOnly: true + - name: varlog + mountPath: /var/log + readOnly: true # Necessary when using autodiscovery; avoid mounting it otherwise # See: https://www.elastic.co/guide/en/beats/filebeat/master/configuration-autodiscover.html - name: varrundockersock diff --git a/filebeat/values.yaml b/filebeat/values.yaml index 93eb75332..ceb1f7526 100755 --- a/filebeat/values.yaml +++ b/filebeat/values.yaml @@ -4,11 +4,15 @@ filebeatConfig: filebeat.yml: | filebeat.inputs: - - type: docker - containers.ids: - - '*' + - type: container + paths: + - /var/log/containers/*.log processors: - - add_kubernetes_metadata: ~ + - add_kubernetes_metadata: + host: ${NODE_NAME} + matchers: + - logs_path: + logs_path: "/var/log/containers/" output.elasticsearch: host: '${NODE_NAME}' From 7ccb9e5d00c6dd5a737df1224811b10c625cd449 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20Gr=C3=A9au?= Date: Tue, 14 Apr 2020 16:57:56 -0400 Subject: [PATCH 07/44] [doc] Update links to 7.7 branch (#579) This commit updates the remaining links to GitHub and Jenkins which had `master` as the branch name to 7.7 --- README.md | 4 ++-- apm-server/README.md | 16 +++++++-------- elasticsearch/README.md | 32 ++++++++++++++--------------- filebeat/README.md | 16 +++++++-------- filebeat/templates/daemonset.yaml | 2 +- kibana/README.md | 20 +++++++++--------- logstash/README.md | 16 +++++++-------- metricbeat/README.md | 16 +++++++-------- metricbeat/templates/daemonset.yaml | 2 +- 9 files changed, 62 insertions(+), 62 deletions(-) diff --git a/README.md b/README.md index 225f342a2..e30f7d420 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Elastic Stack Kubernetes Helm Charts -[![Build Status](https://img.shields.io/jenkins/s/https/devops-ci.elastic.co/job/elastic+helm-charts+master.svg)](https://devops-ci.elastic.co/job/elastic+helm-charts+master/) +[![Build Status](https://img.shields.io/jenkins/s/https/devops-ci.elastic.co/job/elastic+helm-charts+7.7.svg)](https://devops-ci.elastic.co/job/elastic+helm-charts+7.7/) 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. @@ -19,7 +19,7 @@ Please look in the chart directories for the documentation for each chart. These ## Kubernetes Versions -The charts are [currently tested](https://devops-ci.elastic.co/job/elastic+helm-charts+master/) against all GKE versions available. The exact versions are defined under `KUBERNETES_VERSIONS` in [helpers/matrix.yml](/helpers/matrix.yml) +The charts are [currently tested](https://devops-ci.elastic.co/job/elastic+helm-charts+7.7/) against all GKE versions available. The exact versions are defined under `KUBERNETES_VERSIONS` in [helpers/matrix.yml](/helpers/matrix.yml) ## Helm versions diff --git a/apm-server/README.md b/apm-server/README.md index 768e09aa3..dc3ca85d9 100644 --- a/apm-server/README.md +++ b/apm-server/README.md @@ -56,7 +56,7 @@ This chart is tested with the latest 7.7.x versions. ## Configuration | Parameter | Description | Default | | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | -| `apmConfig` | Allows you to add any config files in `/usr/share/apm-server/config` such as `apm-server.yml`. See [values.yaml](https://github.com/elastic/helm-charts/tree/master/apm-server/values.yaml) for an example of the formatting with the default configuration. | see [values.yaml](https://github.com/elastic/helm-charts/tree/master/apm-server/values.yaml) | +| `apmConfig` | Allows you to add any config files in `/usr/share/apm-server/config` such as `apm-server.yml`. See [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/apm-server/values.yaml) for an example of the formatting with the default configuration. | see [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/apm-server/values.yaml) | | `replicas` | Number of APM servers to run | `1` | | `extraContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | | `extraInitContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | @@ -75,7 +75,7 @@ This chart is tested with the latest 7.7.x versions. | `readinessProbe` | Parameters to pass to [readiness probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/) checks for values such as timeouts and thresholds. | `failureThreshold: 3`
`initialDelaySeconds: 10`
`periodSeconds: 10`
`successThreshold: 3`
`timeoutSeconds: 5` | | `resources` | Allows you to set the [resources](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/) for the `Deployment` | `requests.cpu: 100m`
`requests.memory: 100Mi`
`limits.cpu: 1000m`
`limits.memory: 200Mi` | | `serviceAccount` | Custom [serviceAccount](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/) that APM Server will use during execution. By default will use the service account created by this chart. | `""` | -| `secretMounts` | Allows you easily mount a secret as a file inside the `Deployment`. Useful for mounting certificates and other secrets. See [values.yaml](https://github.com/elastic/helm-charts/tree/master/apm-server/values.yaml) for an example | `[]` | +| `secretMounts` | Allows you easily mount a secret as a file inside the `Deployment`. Useful for mounting certificates and other secrets. See [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/apm-server/values.yaml) for an example | `[]` | | `terminationGracePeriod` | Termination period (in seconds) to wait before killing APM Server pod process on pod shutdown | `30` | | `tolerations` | Configurable [tolerations](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) | `[]` | | `nodeSelector` | Configurable [nodeSelector](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector) | `{}` | @@ -83,20 +83,20 @@ This chart is tested with the latest 7.7.x versions. | `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. | `""` | | `updateStrategy` | Allows you to change the default update [strategy](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#updating-a-deployment) for the deployment. | `RollingUpdate` | | `autoscaling.enabled` | Enable the pod [horizonatal auto scaler](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) | `false` | -| `ingress` | Configurable [ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) to expose the APM Server service. See [`values.yaml`](https://github.com/elastic/helm-charts/tree/master/apm-server/values.yaml) for an example | `enabled: false` | -| `service` | Configurable [service](https://kubernetes.io/docs/concepts/services-networking/service/) to expose the APM Server service. See [`values.yaml`](https://github.com/elastic/helm-charts/tree/master/apm-server/values.yaml) for an example | `type: ClusterIP`
`port: 8200`
`nodePort:`
`annotations: {}` | +| `ingress` | Configurable [ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) to expose the APM Server service. See [`values.yaml`](https://github.com/elastic/helm-charts/tree/7.7/apm-server/values.yaml) for an example | `enabled: false` | +| `service` | Configurable [service](https://kubernetes.io/docs/concepts/services-networking/service/) to expose the APM Server service. See [`values.yaml`](https://github.com/elastic/helm-charts/tree/7.7/apm-server/values.yaml) for an example | `type: ClusterIP`
`port: 8200`
`nodePort:`
`annotations: {}` | | `lifecycle` | Configurable [livecycle hooks](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/) | `false` | | `nameOverride` | Overrides the chart name for resources. If not set the name will default to `.Chart.Name` | `""` | | `fullnameOverride` | Overrides the full name of the resources. If not set the name will default to `.Release.Name`-`.Values.nameOverride` or `.Chart.Name` | `""` | ## Examples -In [examples/](ahttps://github.com/elastic/helm-charts/tree/master/apm-server/examples) you will find some example configurations. These examples +In [examples/](ahttps://github.com/elastic/helm-charts/tree/7.7/apm-server/examples) you will find some example configurations. These examples are used for the automated testing of this helm chart. ### Default -* Deploy the [default Elasticsearch helm chart](https://github.com/elastic/helm-charts/tree/master/elasticsearch/README.md#default) +* Deploy the [default Elasticsearch helm chart](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/README.md#default) * Deploy APM Server with the default values ``` cd examples/default @@ -112,7 +112,7 @@ are used for the automated testing of this helm chart. 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`](https://github.com/elastic/helm-charts/tree/master/requirements.txt) in the parent directory. +[`requirements.txt`](https://github.com/elastic/helm-charts/tree/7.7/requirements.txt) in the parent directory. ``` pip install -r ../requirements.txt @@ -135,7 +135,7 @@ make test 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](https://github.com/elastic/helm-charts/tree/master/apm-server/examples/default/test/goss.yaml) +serverspec like tool written in golang. See [goss.yaml](https://github.com/elastic/helm-charts/tree/7.7/apm-server/examples/default/test/goss.yaml) for an example of what the tests look like. To run the goss tests against the default example: diff --git a/elasticsearch/README.md b/elasticsearch/README.md index 9482aa93f..18d768785 100644 --- a/elasticsearch/README.md +++ b/elasticsearch/README.md @@ -27,7 +27,7 @@ resources: ## Requirements -* [Helm](https://helm.sh/) >=2.8.0 and <3.0.0 (see parent [README](https://github.com/elastic/helm-charts/tree/master/README.md) for more details) +* [Helm](https://helm.sh/) >=2.8.0 and <3.0.0 (see parent [README](https://github.com/elastic/helm-charts/tree/7.7/README.md) for more details) * 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 @@ -35,16 +35,16 @@ resources: ## Usage notes and getting started -* This repo includes a number of [example](https://github.com/elastic/helm-charts/tree/master/elasticsearch/examples) configurations which can be used as a reference. They are also used in the automated testing of this chart +* This repo includes a number of [example](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/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). * 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](https://github.com/elastic/helm-charts/tree/master/elasticsearch/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. +* To simplify chart and maintenance each set of node groups is deployed as a separate helm release. Take a look at the [multi](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/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](https://github.com/elastic/helm-charts/tree/master/elasticsearch/examples/migration/README.md) +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](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/migration/README.md) ## Installing @@ -85,18 +85,18 @@ This chart is tested with the latest 7.7.x versions. | ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | | `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`, `nameOverride-nodeGroup-X` if a nameOverride is specified, and `fullnameOverride-X` if a fullnameOverride is specified | `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](https://github.com/elastic/helm-charts/tree/master/elasticsearch/README.md#clustering-and-node-discovery) for more information | `` | +| `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](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/README.md#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](https://github.com/elastic/helm-charts/tree/master/elasticsearch/values.yaml) for an example of the formatting. | `{}` | +| `esConfig` | Allows you to add any config files in `/usr/share/elasticsearch/config/` such as `elasticsearch.yml` and `log4j2.properties`. See [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/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 | `""` | | `extraContainers` | Templatable string of additional containers 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](https://github.com/elastic/helm-charts/tree/master/elasticsearch/values.yaml) for an example | `[]` | +| `secretMounts` | Allows you easily mount a secret as a file inside the statefulset. Useful for mounting certificates and other secrets. See [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/values.yaml) for an example | `[]` | | `image` | The Elasticsearch docker image | `docker.elastic.co/elasticsearch/elasticsearch` | | `imageTag` | The Elasticsearch docker image tag | `7.7.0-SNAPSHOT` | | `imagePullPolicy` | The Kubernetes [imagePullPolicy](https://kubernetes.io/docs/concepts/containers/images/#updating-images) value | `IfNotPresent` | @@ -140,11 +140,11 @@ This chart is tested with the latest 7.7.x versions. | `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`](https://github.com/elastic/helm-charts/tree/master/elasticsearch/values.yaml) for an example | `enabled: false` | +| `ingress` | Configurable [ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) to expose the Elasticsearch service. See [`values.yaml`](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/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](https://github.com/elastic/helm-charts/tree/master/elasticsearch/values.yaml) for an example of the formatting. | `{}` | -| `keystore` | Allows you map Kubernetes secrets into the keystore. See the [config example](https://github.com/elastic/helm-charts/tree/master/elasticsearch/examples/config/values.yaml) and [how to use the keystore](https://github.com/elastic/helm-charts/tree/master/elasticsearch/README.md#how-to-use-the-keystore) | `[]` | +| `lifecycle` | Allows you to add lifecycle configuration. See [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/values.yaml) for an example of the formatting. | `{}` | +| `keystore` | Allows you map Kubernetes secrets into the keystore. See the [config example](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/config/values.yaml) and [how to use the keystore](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/README.md#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: ""` | | `nameOverride` | Overrides the clusterName when used in the naming of resources | `""` | @@ -152,7 +152,7 @@ This chart is tested with the latest 7.7.x versions. ## Try it out -In [examples/](https://github.com/elastic/helm-charts/tree/master/elasticsearch/examples) you will find some example configurations. These examples are used for the automated testing of this helm chart +In [examples/](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples) you will find some example configurations. These examples are used for the automated testing of this helm chart ### Default @@ -257,12 +257,12 @@ keystore: path: xpack.notification.slack.account.monitoring.secure_url ``` -You can also take a look at the [config example](https://github.com/elastic/helm-charts/tree/master/elasticsearch/examples/config/) which is used as part of the automated testing pipeline. +You can also take a look at the [config example](https://github.com/elastic/helm-charts/tree/7.7/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](https://github.com/elastic/helm-charts/tree/master/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](https://github.com/elastic/helm-charts/tree/master/elasticsearch/README.md#how-to-use-the-keystore) +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](https://github.com/elastic/helm-charts/tree/7.7/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](https://github.com/elastic/helm-charts/tree/7.7/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). @@ -330,7 +330,7 @@ For an example of deploying both a group master nodes and data nodes using 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`](https://github.com/elastic/helm-charts/tree/master/requirements.txt) in the parent directory. +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`](https://github.com/elastic/helm-charts/tree/7.7/requirements.txt) in the parent directory. ``` pip install -r ../requirements.txt @@ -351,7 +351,7 @@ 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](https://github.com/elastic/helm-charts/tree/master/elasticsearch/examples/default/test/goss.yaml) for an example of what the tests look like. +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](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/default/test/goss.yaml) for an example of what the tests look like. To run the goss tests against the default example: diff --git a/filebeat/README.md b/filebeat/README.md index f3525f42e..860f56e02 100644 --- a/filebeat/README.md +++ b/filebeat/README.md @@ -6,13 +6,13 @@ This helm chart is a lightweight way to configure and run our official [Filebeat ## Requirements -* [Helm](https://helm.sh/) >=2.8.0 and <3.0.0 (see parent [README](https://github.com/elastic/helm-charts/tree/master/README.md) for more details) +* [Helm](https://helm.sh/) >=2.8.0 and <3.0.0 (see parent [README](https://github.com/elastic/helm-charts/tree/7.7/README.md) for more details) * Kubernetes >=1.9 ## Usage notes and getting started * The default Filebeat configuration file for this chart is configured to use an Elasticsearch endpoint. Without any additional changes, Filebeat will send documents to the service URL that the Elasticsearch helm chart sets up by default. You may either set the `ELASTICSEARCH_HOSTS` environment variable in `extraEnvs` to override this endpoint or modify the default `filebeatConfig` to change this behavior. * The default Filebeat configuration file is also configured to capture container logs and enrich them with Kubernetes metadata by default. This will capture all container logs in the cluster. -* This chart disables the [HostNetwork](https://kubernetes.io/docs/concepts/policy/pod-security-policy/#host-namespaces) setting by default for compatibility reasons with the majority of kubernetes providers and scenarios. Some kubernetes providers may not allow enabling `hostNetwork` and deploying multiple Filebeat pods on the same node isn't possible with `hostNetwork`. However Filebeat does recommend activating it. If your kubernetes provider is compatible with `hostNetwork` and you don't need to run multiple Filebeat daemonsets, you can activate it by setting `hostNetworking: true` in [values.yaml](https://github.com/elastic/helm-charts/tree/master/filebeat/values.yaml). +* This chart disables the [HostNetwork](https://kubernetes.io/docs/concepts/policy/pod-security-policy/#host-namespaces) setting by default for compatibility reasons with the majority of kubernetes providers and scenarios. Some kubernetes providers may not allow enabling `hostNetwork` and deploying multiple Filebeat pods on the same node isn't possible with `hostNetwork`. However Filebeat does recommend activating it. If your kubernetes provider is compatible with `hostNetwork` and you don't need to run multiple Filebeat daemonsets, you can activate it by setting `hostNetworking: true` in [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/filebeat/values.yaml). ## Installing @@ -50,7 +50,7 @@ This chart is tested with the latest 7.7.x versions. ## Configuration | Parameter | Description | Default | | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------- | -| `filebeatConfig` | Allows you to add any config files in `/usr/share/filebeat` such as `filebeat.yml`. See [values.yaml](https://github.com/elastic/helm-charts/tree/master/filebeat/values.yaml) for an example of the formatting with the default configuration. | see [values.yaml](https://github.com/elastic/helm-charts/tree/master/filebeat/values.yaml) | +| `filebeatConfig` | Allows you to add any config files in `/usr/share/filebeat` such as `filebeat.yml`. See [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/filebeat/values.yaml) for an example of the formatting with the default configuration. | see [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/filebeat/values.yaml) | | `extraContainers` | List of additional init containers to be added at the Daemonset | `""` | | `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 | `[]` | | `extraInitContainers` | List of additional init containers to be added at the Daemonset. It also accepts a templatable string of additional containers to be passed to the `tpl` function | `[]` | @@ -71,7 +71,7 @@ This chart is tested with the latest 7.7.x versions. | `readinessProbe` | Parameters to pass to [readiness probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/) checks for values such as timeouts and thresholds. | `failureThreshold: 3`
`initialDelaySeconds: 10`
`periodSeconds: 10`
`successThreshold: 3`
`timeoutSeconds: 5` | | `resources` | Allows you to set the [resources](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/) for the `DaemonSet` | `requests.cpu: 100m`
`requests.memory: 100Mi`
`limits.cpu: 1000m`
`limits.memory: 200Mi` | | `serviceAccount` | Custom [serviceAccount](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/) that Filebeat will use during execution. By default will use the service account created by this chart. | `""` | -| `secretMounts` | Allows you easily mount a secret as a file inside the `DaemonSet`. Useful for mounting certificates and other secrets. See [values.yaml](https://github.com/elastic/helm-charts/tree/master/filebeat/values.yaml) for an example | `[]` | +| `secretMounts` | Allows you easily mount a secret as a file inside the `DaemonSet`. Useful for mounting certificates and other secrets. See [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/filebeat/values.yaml) for an example | `[]` | | `terminationGracePeriod` | Termination period (in seconds) to wait before killing Filebeat pod process on pod shutdown | `30` | | `tolerations` | Configurable [tolerations](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) | `[]` | | `nodeSelector` | Configurable [nodeSelector](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector) | `{}` | @@ -82,11 +82,11 @@ This chart is tested with the latest 7.7.x versions. ## Examples -In [examples/](https://github.com/elastic/helm-charts/tree/master/filebeat/examples) you will find some example configurations. These examples are used for the automated testing of this helm chart. +In [examples/](https://github.com/elastic/helm-charts/tree/7.7/filebeat/examples) you will find some example configurations. These examples are used for the automated testing of this helm chart. ### Default -* Deploy the [default Elasticsearch helm chart](https://github.com/elastic/helm-charts/tree/master/elasticsearch/README.md#default) +* Deploy the [default Elasticsearch helm chart](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/README.md#default) * Deploy Filebeat with the default values ``` cd examples/default @@ -100,7 +100,7 @@ In [examples/](https://github.com/elastic/helm-charts/tree/master/filebeat/examp ## 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`](https://github.com/elastic/helm-charts/tree/master/requirements.txt) in the parent directory. +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`](https://github.com/elastic/helm-charts/tree/7.7/requirements.txt) in the parent directory. ``` pip install -r ../requirements.txt @@ -121,7 +121,7 @@ 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](https://github.com/elastic/helm-charts/tree/master/filebeat/examples/default/test/goss.yaml) for an example of what the tests look like. +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](https://github.com/elastic/helm-charts/tree/7.7/filebeat/examples/default/test/goss.yaml) for an example of what the tests look like. To run the goss tests against the default example: ``` diff --git a/filebeat/templates/daemonset.yaml b/filebeat/templates/daemonset.yaml index dbd446748..eace44437 100644 --- a/filebeat/templates/daemonset.yaml +++ b/filebeat/templates/daemonset.yaml @@ -159,7 +159,7 @@ spec: mountPath: /var/log readOnly: true # Necessary when using autodiscovery; avoid mounting it otherwise - # See: https://www.elastic.co/guide/en/beats/filebeat/master/configuration-autodiscover.html + # See: https://www.elastic.co/guide/en/beats/filebeat/7.7/configuration-autodiscover.html - name: varrundockersock mountPath: /var/run/docker.sock readOnly: true diff --git a/kibana/README.md b/kibana/README.md index 409849bce..ca05a9f83 100644 --- a/kibana/README.md +++ b/kibana/README.md @@ -6,7 +6,7 @@ This helm chart is a lightweight way to configure and run our official [Kibana d ## Requirements -* [Helm](https://helm.sh/) >=2.8.0 and <3.0.0 (see parent [README](https://github.com/elastic/helm-charts/tree/master/README.md) for more details) +* [Helm](https://helm.sh/) >=2.8.0 and <3.0.0 (see parent [README](https://github.com/elastic/helm-charts/tree/7.7/README.md) for more details) * Kubernetes >=1.9 ## Installing @@ -50,7 +50,7 @@ This chart is tested with the latest 7.7.x versions. | `elasticsearchURL` | The URL used to connect to Elasticsearch. Deprecated, needs to be used for Kibana versions < 6.6 | | | `replicas` | Kubernetes replica count for the deployment (i.e. how many pods) | `1` | | `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 | `name: NODE_OPTIONS`
`value: "--max-old-space-size=1800"` | -| `secretMounts` | Allows you easily mount a secret as a file inside the deployment. Useful for mounting certificates and other secrets. See [values.yaml](https://github.com/elastic/helm-charts/tree/master/kibana/values.yaml) for an example | `[]` | +| `secretMounts` | Allows you easily mount a secret as a file inside the deployment. Useful for mounting certificates and other secrets. See [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/kibana/values.yaml) for an example | `[]` | | `image` | The Kibana docker image | `docker.elastic.co/kibana/kibana` | | `imageTag` | The Kibana docker image tag | `7.7.0-SNAPSHOT` | | `imagePullPolicy` | The Kubernetes [imagePullPolicy](https://kubernetes.io/docs/concepts/containers/images/#updating-images) value | `IfNotPresent` | @@ -59,7 +59,7 @@ This chart is tested with the latest 7.7.x versions. | `protocol` | The protocol that will be used for the readinessProbe. Change this to `https` if you have `server.ssl.enabled: true` set | `http` | | `serverHost` | The [`server.host`](https://www.elastic.co/guide/en/kibana/current/settings.html) Kibana setting. This is set explicitly so that the default always matches what comes with the docker image. | `0.0.0.0` | | `healthCheckPath` | The path used for the readinessProbe to check that Kibana is ready. If you are setting `server.basePath` you will also need to update this to `/${basePath}/app/kibana` | `/app/kibana` | -| `kibanaConfig` | Allows you to add any config files in `/usr/share/kibana/config/` such as `kibana.yml`. See [values.yaml](https://github.com/elastic/helm-charts/tree/master/kibana/values.yaml) for an example of the formatting. | `{}` | +| `kibanaConfig` | Allows you to add any config files in `/usr/share/kibana/config/` such as `kibana.yml`. See [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/kibana/values.yaml) for an example of the formatting. | `{}` | | `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` | | `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` | | `serviceAccount` | Allows you to overwrite the "default" [serviceAccount](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/) for the pod | `[]` | @@ -70,21 +70,21 @@ This chart is tested with the latest 7.7.x versions. | `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 Kibana instances | `{}` | | `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 Kibana service. See [`values.yaml`](https://github.com/elastic/helm-charts/tree/master/kibana/values.yaml) for an example | `enabled: false` | -| `service` | Configurable [service](https://kubernetes.io/docs/concepts/services-networking/service/) to expose the Kibana service. See [`values.yaml`](https://github.com/elastic/helm-charts/tree/master/kibana/values.yaml) for an example | `type: ClusterIP`
`port: 5601`
`nodePort:`
`annotations: {}`
`loadBalancerSourceRanges: {}` | +| `ingress` | Configurable [ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) to expose the Kibana service. See [`values.yaml`](https://github.com/elastic/helm-charts/tree/7.7/kibana/values.yaml) for an example | `enabled: false` | +| `service` | Configurable [service](https://kubernetes.io/docs/concepts/services-networking/service/) to expose the Kibana service. See [`values.yaml`](https://github.com/elastic/helm-charts/tree/7.7/kibana/values.yaml) for an example | `type: ClusterIP`
`port: 5601`
`nodePort:`
`annotations: {}`
`loadBalancerSourceRanges: {}` | | `labels` | Configurable [label](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) applied to all Kibana pods | `{}` | -| `lifecycle` | Allows you to add lifecycle configuration. See [values.yaml](https://github.com/elastic/helm-charts/tree/master/kibana/values.yaml) for an example of the formatting. | `{}` | +| `lifecycle` | Allows you to add lifecycle configuration. See [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/kibana/values.yaml) for an example of the formatting. | `{}` | | `fullnameOverride` | Overrides the full name of the resources. If not set the name will default to "`.Release.Name`-`.Values.nameOverride or .Chart.Name`" | `""` | | `extraContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | | `extraInitContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | ## Examples -In [examples/](https://github.com/elastic/helm-charts/tree/master/kibana/examples) you will find some example configurations. These examples are used for the automated testing of this helm chart +In [examples/](https://github.com/elastic/helm-charts/tree/7.7/kibana/examples) you will find some example configurations. These examples are used for the automated testing of this helm chart ### Default -* Deploy the [default Elasticsearch helm chart](https://github.com/elastic/helm-charts/tree/master/elasticsearch/README.md#default) +* Deploy the [default Elasticsearch helm chart](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/README.md#default) * Deploy Kibana with the default values ``` cd examples/default @@ -97,7 +97,7 @@ In [examples/](https://github.com/elastic/helm-charts/tree/master/kibana/example ### Security -* Deploy a [security enabled Elasticsearch cluster](https://github.com/elastic/helm-charts/tree/master/elasticsearch/README.md#security) +* Deploy a [security enabled Elasticsearch cluster](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/README.md#security) * Deploy Kibana with the security example ``` cd examples/security @@ -142,7 +142,7 @@ There are a couple reasons we recommend this. ## 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`](https://github.com/elastic/helm-charts/tree/master/requirements.txt) in the parent directory. +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`](https://github.com/elastic/helm-charts/tree/7.7/requirements.txt) in the parent directory. ``` pip install -r ../requirements.txt diff --git a/logstash/README.md b/logstash/README.md index 1c8e622ea..7d1d5bcbb 100644 --- a/logstash/README.md +++ b/logstash/README.md @@ -6,12 +6,12 @@ This helm chart is a lightweight way to configure and run our official [Logstash ## Requirements -* [Helm](https://helm.sh/) >=2.8.0 and <3.0.0 (see parent [README](https://github.com/elastic/helm-charts/tree/master/README.md) for more details) +* [Helm](https://helm.sh/) >=2.8.0 and <3.0.0 (see parent [README](https://github.com/elastic/helm-charts/tree/7.7/README.md) for more details) * Kubernetes >=1.8 ## Usage notes and getting started -* This repo includes a number of [example](https://github.com/elastic/helm-charts/tree/master/logstash/examples) configurations which can be used as a reference. They are also used in the automated testing of this chart +* This repo includes a number of [example](https://github.com/elastic/helm-charts/tree/7.7/logstash/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). * 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 `logstashJavaOpts` and to set the CPU/Memory `resources` to something suitable for your cluster @@ -69,9 +69,9 @@ This chart is tested with the latest 7.7.x versions. | `httpPort` | The http port that Kubernetes will use for the healthchecks and the service. | `9600` | | `extraPorts` | An array of extra ports to open on the pod | `[]` | | `labels` | Configurable [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) applied to all Logstash pods | `{}` | -| `lifecycle` | Allows you to add lifecycle configuration. See [values.yaml](https://github.com/elastic/helm-charts/tree/master/logstash/values.yaml) for an example of the formatting. | `{}` | +| `lifecycle` | Allows you to add lifecycle configuration. See [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/logstash/values.yaml) for an example of the formatting. | `{}` | | `livenessProbe` | Configuration fields for the [livenessProbe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/) | `failureThreshold: 3`
`initialDelaySeconds: 300`
`periodSeconds: 10`
`successThreshold: 3`
`timeoutSeconds: 5` | -| `logstashConfig` | Allows you to add any config files in `/usr/share/logstash/config/` such as `logstash.yml` and `log4j2.properties`. See [values.yaml](https://github.com/elastic/helm-charts/tree/master/logstash/values.yaml) for an example of the formatting. | `{}` | +| `logstashConfig` | Allows you to add any config files in `/usr/share/logstash/config/` such as `logstash.yml` and `log4j2.properties`. See [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/logstash/values.yaml) for an example of the formatting. | `{}` | | `logstashJavaOpts` | Java options for Logstash. This is where you should configure the jvm heap size | `-Xmx1g -Xms1g` | | `logstashPipeline` | Allows you to add any pipeline files in `/usr/share/logstash/pipeline/`. | `{}` | | `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` | @@ -88,7 +88,7 @@ This chart is tested with the latest 7.7.x versions. | `replicas` | Kubernetes replica count for the statefulset (i.e. how many pods) | `1` | | `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: 1536Mi`
`limits.cpu: 1000m`
`limits.memory: 1536Mi` | | `schedulerName` | Name of the [alternate scheduler](https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/#specify-schedulers-for-pods) | `""` | -| `secretMounts` | Allows you easily mount a secret as a file inside the statefulset. Useful for mounting certificates and other secrets. See [values.yaml](https://github.com/elastic/helm-charts/tree/master/logstash/values.yaml) for an example | `[]` | +| `secretMounts` | Allows you easily mount a secret as a file inside the statefulset. Useful for mounting certificates and other secrets. See [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/logstash/values.yaml) for an example | `[]` | | `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` | | `tolerations` | Configurable [tolerations](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) | `[]` | @@ -99,7 +99,7 @@ This chart is tested with the latest 7.7.x versions. ## Try it out -In [examples/](https://github.com/elastic/helm-charts/tree/master/logstash/examples) you will find some example configurations. These examples are used for the automated testing of this helm chart +In [examples/](https://github.com/elastic/helm-charts/tree/7.7/logstash/examples) you will find some example configurations. These examples are used for the automated testing of this helm chart ### Default @@ -134,7 +134,7 @@ There are a couple reasons we recommend this. ## 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`](https://github.com/elastic/helm-charts/tree/master/requirements.txt) in the parent directory. +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`](https://github.com/elastic/helm-charts/tree/7.7/requirements.txt) in the parent directory. ``` pip install -r ../requirements.txt @@ -155,7 +155,7 @@ 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](https://github.com/elastic/helm-charts/tree/master/logstash/examples/default/test/goss.yaml) for an example of what the tests look like. +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](https://github.com/elastic/helm-charts/tree/7.7/logstash/examples/default/test/goss.yaml) for an example of what the tests look like. To run the goss tests against the default example: diff --git a/metricbeat/README.md b/metricbeat/README.md index f95c8bdbb..e6a40f18a 100644 --- a/metricbeat/README.md +++ b/metricbeat/README.md @@ -20,7 +20,7 @@ The workaround is to use `--force` argument for `helm upgrade` command which wil ## Requirements -* [Helm](https://helm.sh/) >=2.8.0 and <3.0.0 (see parent [README](https://github.com/elastic/helm-charts/tree/master/README.md) for more details) +* [Helm](https://helm.sh/) >=2.8.0 and <3.0.0 (see parent [README](https://github.com/elastic/helm-charts/tree/7.7/README.md) for more details) * Kubernetes >=1.9 ## Installing @@ -59,7 +59,7 @@ This chart is tested with the latest 7.7.x versions. ## Configuration | Parameter | Description | Default | | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------- | -| `metricbeatConfig` | Allows you to add any config files in `/usr/share/metricbeat` such as `metricbeat.yml`. See [values.yaml](https://github.com/elastic/helm-charts/tree/master/metricbeat/values.yaml) for an example of the formatting with the default configuration. | see [values.yaml](https://github.com/elastic/helm-charts/tree/master/metricbeat/values.yaml) | +| `metricbeatConfig` | Allows you to add any config files in `/usr/share/metricbeat` such as `metricbeat.yml`. See [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/metricbeat/values.yaml) for an example of the formatting with the default configuration. | see [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/metricbeat/values.yaml) | | `extraContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | | `extraInitContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | | `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 | `[]` | @@ -73,14 +73,14 @@ This chart is tested with the latest 7.7.x versions. | `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 | `[]` | | `labels` | Configurable [label](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) applied to all Metricbeat pods | `{}` | | `managedServiceAccount` | Whether the `serviceAccount` should be managed by this helm chart. Set this to `false` in order to manage your own service account and related roles. | `true` | -| `clusterRoleRules` | Configurable [cluster role rules](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#role-and-clusterrole) that Metricbeat uses to access Kubernetes resources. | see [values.yaml](https://github.com/elastic/helm-charts/tree/master/metricbeat/values.yaml) | +| `clusterRoleRules` | Configurable [cluster role rules](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#role-and-clusterrole) that Metricbeat uses to access Kubernetes resources. | see [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/metricbeat/values.yaml) | | `podAnnotations` | Configurable [annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) applied to all Metricbeat pods | `{}` | | `podSecurityContext` | Configurable [podSecurityContext](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) for Metricbeat pod execution environment | `runAsUser: 0`
`privileged: false` | | `livenessProbe` | Parameters to pass to [liveness probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/) checks for values such as timeouts and thresholds. | `failureThreshold: 3`
`initialDelaySeconds: 10`
`periodSeconds: 10`
`successThreshold: 3`
`timeoutSeconds: 5` | | `readinessProbe` | Parameters to pass to [readiness probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/) checks for values such as timeouts and thresholds. | `failureThreshold: 3`
`initialDelaySeconds: 10`
`periodSeconds: 10`
`successThreshold: 3`
`timeoutSeconds: 5` | | `resources` | Allows you to set the [resources](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/) for the `DaemonSet` | `requests.cpu: 100m`
`requests.memory: 100Mi`
`limits.cpu: 1000m`
`limits.memory: 200Mi` | | `serviceAccount` | Custom [serviceAccount](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/) that Metricbeat will use during execution. By default will use the service account created by this chart. | `""` | -| `secretMounts` | Allows you easily mount a secret as a file inside the `DaemonSet`. Useful for mounting certificates and other secrets. See [values.yaml](https://github.com/elastic/helm-charts/tree/master/metricbeat/values.yaml) for an example | `[]` | +| `secretMounts` | Allows you easily mount a secret as a file inside the `DaemonSet`. Useful for mounting certificates and other secrets. See [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/metricbeat/values.yaml) for an example | `[]` | | `terminationGracePeriod` | Termination period (in seconds) to wait before killing Metricbeat pod process on pod shutdown | `30` | | `tolerations` | Configurable [tolerations](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) | `[]` | | `nodeSelector` | Configurable [nodeSelector](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector) | `{}` | @@ -92,11 +92,11 @@ This chart is tested with the latest 7.7.x versions. ## Examples -In [examples/](https://github.com/elastic/helm-charts/tree/master/metricbeat/examples) you will find some example configurations. These examples are used for the automated testing of this helm chart. +In [examples/](https://github.com/elastic/helm-charts/tree/7.7/metricbeat/examples) you will find some example configurations. These examples are used for the automated testing of this helm chart. ### Default -* Deploy the [default Elasticsearch helm chart](https://github.com/elastic/helm-charts/tree/master/elasticsearch/README.md#default) +* Deploy the [default Elasticsearch helm chart](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/README.md#default) * Deploy Metricbeat with the default values ``` cd examples/default @@ -110,7 +110,7 @@ In [examples/](https://github.com/elastic/helm-charts/tree/master/metricbeat/exa ## 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`](https://github.com/elastic/helm-charts/tree/master/requirements.txt) in the parent directory. +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`](https://github.com/elastic/helm-charts/tree/7.7/requirements.txt) in the parent directory. ``` pip install -r ../requirements.txt @@ -131,7 +131,7 @@ 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](https://github.com/elastic/helm-charts/tree/master/metricbeat/examples/default/test/goss.yaml) for an example of what the tests look like. +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](https://github.com/elastic/helm-charts/tree/7.7/metricbeat/examples/default/test/goss.yaml) for an example of what the tests look like. To run the goss tests against the default example: ``` diff --git a/metricbeat/templates/daemonset.yaml b/metricbeat/templates/daemonset.yaml index 4ef74e6b9..e681b4380 100644 --- a/metricbeat/templates/daemonset.yaml +++ b/metricbeat/templates/daemonset.yaml @@ -140,7 +140,7 @@ spec: - name: data mountPath: /usr/share/metricbeat/data # Necessary when using autodiscovery; avoid mounting it otherwise - # See: https://www.elastic.co/guide/en/beats/metricbeat/master/configuration-autodiscover.html + # See: https://www.elastic.co/guide/en/beats/metricbeat/7.7/configuration-autodiscover.html - name: varrundockersock mountPath: /var/run/docker.sock readOnly: true From 26bd1ca36efbc6405da2324d01a043d5372e0206 Mon Sep 17 00:00:00 2001 From: Julien Mailleret Date: Wed, 15 Apr 2020 16:45:57 +0200 Subject: [PATCH 08/44] Merge pull request #580 from jmlrt/helm-2-16-6 [helm] bump helm version to 2.16.6 --- README.md | 2 +- helpers/helm-tester/Dockerfile | 2 +- helpers/terraform/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e30f7d420..9ec22bf27 100644 --- a/README.md +++ b/README.md @@ -23,5 +23,5 @@ The charts are [currently tested](https://devops-ci.elastic.co/job/elastic+helm- ## Helm versions -While we are checking backward compatibility, the charts are only tested with Helm version mentioned in [helm-tester Dockerfile](helpers/helm-tester/Dockerfile) (currently 2.16.5). +While we are checking backward compatibility, the charts are only tested with Helm version mentioned in [helm-tester Dockerfile](helpers/helm-tester/Dockerfile) (currently 2.16.6). Note that we don't support [Helm 3](https://v3.helm.sh/) version. diff --git a/helpers/helm-tester/Dockerfile b/helpers/helm-tester/Dockerfile index d2e1b8e63..66d7dab91 100644 --- a/helpers/helm-tester/Dockerfile +++ b/helpers/helm-tester/Dockerfile @@ -1,6 +1,6 @@ FROM python:3.7 -ENV HELM_VERSION=2.16.5 +ENV HELM_VERSION=2.16.6 RUN wget --no-verbose https://storage.googleapis.com/kubernetes-helm/helm-v${HELM_VERSION}-linux-amd64.tar.gz && \ tar xfv helm-v${HELM_VERSION}-linux-amd64.tar.gz && \ diff --git a/helpers/terraform/Dockerfile b/helpers/terraform/Dockerfile index c415c5edc..621f9f40e 100644 --- a/helpers/terraform/Dockerfile +++ b/helpers/terraform/Dockerfile @@ -3,7 +3,7 @@ FROM centos:7 ENV VAULT_VERSION 0.9.3 ENV TERRAFORM_VERSION=0.11.7 ENV KUBECTL_VERSION=1.15.4 -ENV HELM_VERSION=2.16.5 +ENV HELM_VERSION=2.16.6 ENV DOCKER_VERSION=18.09.7 RUN yum -y install \ From 68a54af49bfe4f8baa17f52dbedd336beee9a018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20Gr=C3=A9au?= Date: Wed, 15 Apr 2020 12:16:22 -0400 Subject: [PATCH 09/44] [script] Update bumper script to handle SNAPSHOT versions (#581) * [script] Update bumper script to handle SNAPSHOT versions This commit updates the `bumper.py` script to handle the workflows for updating the versions to test staging artifacts and before a release, for example: - update 7.7.0-SNAPSHOT to 7.7.0 before tagging a release, by running `env BUMPER_VERSION_7="7.7.0" ./helpers/bumper.py` - update 7.7.0-SNAPHSHOT to 7.7.0-abcdefgh for testing staging artifacts by running: `env BUMPER_VERSION_7="7.7.0-abcdefgh" BUMPER_USE_STAGING_IMAGES="true" ./helpers/bumper.py` For now this script do not handle the bump from 7.7.0 to 7.7.1-SNAPSHOT for the next developement iteration after a release. In the meantime this update should be done manually. --- apm-server/README.md | 4 ++-- elasticsearch/README.md | 4 ++-- filebeat/README.md | 4 ++-- helpers/bumper.py | 2 +- kibana/README.md | 4 ++-- logstash/README.md | 4 ++-- metricbeat/README.md | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/apm-server/README.md b/apm-server/README.md index dc3ca85d9..6eee66677 100644 --- a/apm-server/README.md +++ b/apm-server/README.md @@ -22,7 +22,7 @@ easily be overridden in the config value `apmConfig.apm-server.yml`. ## Installing -This chart is tested with the latest 7.7.x versions. +This chart is tested with the latest 7.7.0-SNAPSHOT versions. * Add the elastic helm charts repo @@ -46,7 +46,7 @@ This chart is tested with the latest 7.7.x versions. git checkout -b 7.7 origin/7.7 ``` -* Install the latest 7.7.x-SNAPSHOT +* Install the latest 7.7.0-SNAPSHOT ```bash helm install --name apm-server ./helm-charts/apm-server diff --git a/elasticsearch/README.md b/elasticsearch/README.md index 18d768785..261c15d17 100644 --- a/elasticsearch/README.md +++ b/elasticsearch/README.md @@ -48,7 +48,7 @@ If you currently have a cluster deployed with the [helm/charts stable](https://g ## Installing -This chart is tested with the latest 7.7.x versions. +This chart is tested with the latest 7.7.0-SNAPSHOT versions. * Add the elastic helm charts repo @@ -72,7 +72,7 @@ This chart is tested with the latest 7.7.x versions. git checkout -b 7.7 origin/7.7 ``` -* Install the latest 7.7.x-SNAPSHOT +* Install the latest 7.7.0-SNAPSHOT ```bash helm install --name elasticsearch ./helm-charts/elasticsearch diff --git a/filebeat/README.md b/filebeat/README.md index 860f56e02..6395e6c5f 100644 --- a/filebeat/README.md +++ b/filebeat/README.md @@ -16,7 +16,7 @@ This helm chart is a lightweight way to configure and run our official [Filebeat ## Installing -This chart is tested with the latest 7.7.x versions. +This chart is tested with the latest 7.7.0-SNAPSHOT versions. * Add the elastic helm charts repo @@ -40,7 +40,7 @@ This chart is tested with the latest 7.7.x versions. git checkout -b 7.7 origin/7.7 ``` -* Install the latest 7.7.x-SNAPSHOT +* Install the latest 7.7.0-SNAPSHOT ```bash helm install --name filebeat ./helm-charts/filebeat diff --git a/helpers/bumper.py b/helpers/bumper.py index 0ca195b0c..f9baaa85b 100755 --- a/helpers/bumper.py +++ b/helpers/bumper.py @@ -43,7 +43,7 @@ print("Updating versions...") for major, version in versions.iteritems(): - r = re.compile(r"{0}\.[0-9]*\.[0-9]*-?[0-9]?".format(major)) + r = re.compile(r"{0}\.[0-9]*\.[0-9]*-?(SNAPSHOT)?".format(major)) for pattern in file_patterns: for f in glob.glob(pattern): print(f) diff --git a/kibana/README.md b/kibana/README.md index ca05a9f83..de93c09e4 100644 --- a/kibana/README.md +++ b/kibana/README.md @@ -11,7 +11,7 @@ This helm chart is a lightweight way to configure and run our official [Kibana d ## Installing -This chart is tested with the latest 7.7.x versions. +This chart is tested with the latest 7.7.0-SNAPSHOT versions. * Add the elastic helm charts repo @@ -35,7 +35,7 @@ This chart is tested with the latest 7.7.x versions. git checkout -b 7.7 origin/7.7 ``` -* Install the latest 7.7.x-SNAPSHOT +* Install the latest 7.7.0-SNAPSHOT ```bash helm install --name kibana ./helm-charts/kibana diff --git a/logstash/README.md b/logstash/README.md index 7d1d5bcbb..89aedf28d 100644 --- a/logstash/README.md +++ b/logstash/README.md @@ -20,7 +20,7 @@ This helm chart is a lightweight way to configure and run our official [Logstash ## Installing -This chart is tested with the latest 7.7.x versions. +This chart is tested with the latest 7.7.0-SNAPSHOT versions. * Add the elastic helm charts repo @@ -44,7 +44,7 @@ This chart is tested with the latest 7.7.x versions. git checkout -b 7.7 origin/7.7 ``` -* Install the latest 7.7.x-SNAPSHOT +* Install the latest 7.7.0-SNAPSHOT ```bash helm install --name logstash ./helm-charts/logstash diff --git a/metricbeat/README.md b/metricbeat/README.md index e6a40f18a..511c346ba 100644 --- a/metricbeat/README.md +++ b/metricbeat/README.md @@ -25,7 +25,7 @@ The workaround is to use `--force` argument for `helm upgrade` command which wil ## Installing -This chart is tested with the latest 7.7.x versions. +This chart is tested with the latest 7.7.0-SNAPSHOT versions. * Add the elastic helm charts repo @@ -49,7 +49,7 @@ This chart is tested with the latest 7.7.x versions. git checkout -b 7.7 origin/7.7 ``` -* Install the latest 7.7.x-SNAPSHOT +* Install the latest 7.7.0-SNAPSHOT ```bash helm install --name metricbeat ./helm-charts/metricbeat From 42eef5df697ae3e5f1a7fca3c036843e0b7cf2ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20Gr=C3=A9au?= Date: Wed, 15 Apr 2020 12:59:56 -0400 Subject: [PATCH 10/44] [ci] Fix multijob configuration for testing staging artifacts (#582) The multijob configuration for testing staging 7.7 artifacts was referencing jobs from another branch. This commit makes sure the configured jobs are all from the same git branch. --- .../elastic+helm-charts+{branch}+staging.yml | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.ci/jobs.t/elastic+helm-charts+{branch}+staging.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+staging.yml index 5e6a135fc..223a830a9 100644 --- a/.ci/jobs.t/elastic+helm-charts+{branch}+staging.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+staging.yml @@ -1,13 +1,13 @@ --- - job: name: elastic+helm-charts+%BRANCH%+staging - display-name: elastic / helm-charts - staging + display-name: elastic / helm-charts +%BRANCH%+ - staging tests description: Staging image testing concurrent: true parameters: - string: name: BUILD_ID - description: "The buildId for the staging images. (Example: 7.6.1-abcdabcd)" + description: "The buildId for the staging images. (Example: 7.7.0-abcdabcd)" project-type: multijob scm: - git: @@ -17,30 +17,30 @@ name: template testing and kubernetes cluster creation condition: SUCCESSFUL projects: - - name: elastic+helm-charts+staging+cluster-creation + - name: elastic+helm-charts+%BRANCH%+staging+cluster-creation current-parameters: true - multijob: name: elasticsearch integration testing condition: ALWAYS projects: - - name: elastic+helm-charts+staging+integration-elasticsearch + - name: elastic+helm-charts+%BRANCH%+staging+integration-elasticsearch current-parameters: true - multijob: name: integration testing condition: ALWAYS projects: - - name: elastic+helm-charts+staging+integration-kibana + - name: elastic+helm-charts+%BRANCH%+staging+integration-kibana current-parameters: true - - name: elastic+helm-charts+staging+integration-filebeat + - name: elastic+helm-charts+%BRANCH%+staging+integration-filebeat current-parameters: true - - name: elastic+helm-charts+staging+integration-metricbeat + - name: elastic+helm-charts+%BRANCH%+staging+integration-metricbeat current-parameters: true - - name: elastic+helm-charts+staging+integration-logstash + - name: elastic+helm-charts+%BRANCH%+staging+integration-logstash current-parameters: true - - name: elastic+helm-charts+staging+integration-apm-server + - name: elastic+helm-charts+%BRANCH%+staging+integration-apm-server current-parameters: true publishers: - trigger-parameterized-builds: - - project: elastic+helm-charts+staging+cluster-cleanup + - project: elastic+helm-charts+%BRANCH%+staging+cluster-cleanup current-parameters: true trigger-with-no-params: false From 1785431077eb21353e6c3c7c3b3dc14a653a06ae Mon Sep 17 00:00:00 2001 From: Chris Koehnke Date: Wed, 15 Apr 2020 17:41:21 -0400 Subject: [PATCH 11/44] Merge pull request #583 from Conky5/use-different-image-for-random-key Use busybox for key generation in testing --- elasticsearch/examples/security/Makefile | 2 +- kibana/examples/security/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/elasticsearch/examples/security/Makefile b/elasticsearch/examples/security/Makefile index 3d10b0b81..d8c6f11c7 100644 --- a/elasticsearch/examples/security/Makefile +++ b/elasticsearch/examples/security/Makefile @@ -20,7 +20,7 @@ pull-elasticsearch-image: 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 $(ELASTICSEARCH_IMAGE) /bin/sh -c "< /dev/urandom tr -cd '[:alnum:]' | head -c20")) && \ + password=$$([ ! -z "$$ELASTIC_PASSWORD" ] && echo $$ELASTIC_PASSWORD || echo $$(docker run --rm busybox:1.31.1 /bin/sh -c "< /dev/urandom tr -cd '[:alnum:]' | head -c20")) && \ docker run --name elastic-helm-charts-certs -i -w /app \ $(ELASTICSEARCH_IMAGE) \ /bin/sh -c " \ diff --git a/kibana/examples/security/Makefile b/kibana/examples/security/Makefile index a54769d95..d3a365fd7 100644 --- a/kibana/examples/security/Makefile +++ b/kibana/examples/security/Makefile @@ -13,5 +13,5 @@ purge: helm del --purge $(RELEASE) secrets: - encryptionkey=$$(echo $$(docker run --rm docker.elastic.co/elasticsearch/elasticsearch:$(STACK_VERSION) /bin/sh -c "< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c50")) && \ + encryptionkey=$$(docker run --rm busybox:1.31.1 /bin/sh -c "< /dev/urandom tr -dc _A-Za-z0-9 | head -c50") && \ kubectl create secret generic kibana --from-literal=encryptionkey=$$encryptionkey From f74d721d68372162cb12281c95e599cc192315f5 Mon Sep 17 00:00:00 2001 From: Julien Mailleret Date: Fri, 17 Apr 2020 17:31:24 +0200 Subject: [PATCH 12/44] Merge pull request #572 from jmlrt/split-metricbeat-values [metricbeat] split values for daemonset and deployment --- metricbeat/README.md | 110 ++- .../examples/default/test/goss-metrics.yaml | 3 +- .../examples/oss/test/goss-metrics.yaml | 3 +- metricbeat/examples/oss/values.yaml | 12 +- .../examples/security/test/goss-metrics.yaml | 3 +- metricbeat/examples/security/values.yaml | 193 ++--- metricbeat/templates/configmap.yaml | 36 + metricbeat/templates/daemonset.yaml | 53 +- metricbeat/templates/deployment.yaml | 50 +- metricbeat/tests/metricbeat_test.py | 702 +++++++++++++++++- metricbeat/values.yaml | 272 ++++--- 11 files changed, 1117 insertions(+), 320 deletions(-) diff --git a/metricbeat/README.md b/metricbeat/README.md index 511c346ba..8f42d280d 100644 --- a/metricbeat/README.md +++ b/metricbeat/README.md @@ -57,38 +57,64 @@ This chart is tested with the latest 7.7.0-SNAPSHOT versions. ## Configuration -| Parameter | Description | Default | -| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------- | -| `metricbeatConfig` | Allows you to add any config files in `/usr/share/metricbeat` such as `metricbeat.yml`. See [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/metricbeat/values.yaml) for an example of the formatting with the default configuration. | see [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/metricbeat/values.yaml) | -| `extraContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | -| `extraInitContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | -| `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 | `[]` | -| `extraVolumeMounts` | Templatable string of additional volumeMounts to be passed to the `tpl` function | `""` | -| `extraVolumes` | Templatable string of additional volumes to be passed to the `tpl` function | `""` | -| `envFrom` | Templatable string of envFrom to be passed to the [environment from variables](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables) which will be appended to the `envFrom:` definition for the container | `[]` | -| `hostPathRoot` | Fully-qualified [hostPath](https://kubernetes.io/docs/concepts/storage/volumes/#hostpath) that will be used to persist Metricbeat registry data | `/var/lib` | -| `image` | The Metricbeat docker image | `docker.elastic.co/beats/metricbeat` | -| `imageTag` | The Metricbeat docker image tag | `7.7.0-SNAPSHOT` | -| `imagePullPolicy` | The Kubernetes [imagePullPolicy](https://kubernetes.io/docs/concepts/containers/images/#updating-images) value | `IfNotPresent` | -| `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 | `[]` | -| `labels` | Configurable [label](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) applied to all Metricbeat pods | `{}` | -| `managedServiceAccount` | Whether the `serviceAccount` should be managed by this helm chart. Set this to `false` in order to manage your own service account and related roles. | `true` | -| `clusterRoleRules` | Configurable [cluster role rules](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#role-and-clusterrole) that Metricbeat uses to access Kubernetes resources. | see [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/metricbeat/values.yaml) | -| `podAnnotations` | Configurable [annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) applied to all Metricbeat pods | `{}` | -| `podSecurityContext` | Configurable [podSecurityContext](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) for Metricbeat pod execution environment | `runAsUser: 0`
`privileged: false` | -| `livenessProbe` | Parameters to pass to [liveness probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/) checks for values such as timeouts and thresholds. | `failureThreshold: 3`
`initialDelaySeconds: 10`
`periodSeconds: 10`
`successThreshold: 3`
`timeoutSeconds: 5` | -| `readinessProbe` | Parameters to pass to [readiness probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/) checks for values such as timeouts and thresholds. | `failureThreshold: 3`
`initialDelaySeconds: 10`
`periodSeconds: 10`
`successThreshold: 3`
`timeoutSeconds: 5` | -| `resources` | Allows you to set the [resources](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/) for the `DaemonSet` | `requests.cpu: 100m`
`requests.memory: 100Mi`
`limits.cpu: 1000m`
`limits.memory: 200Mi` | -| `serviceAccount` | Custom [serviceAccount](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/) that Metricbeat will use during execution. By default will use the service account created by this chart. | `""` | -| `secretMounts` | Allows you easily mount a secret as a file inside the `DaemonSet`. Useful for mounting certificates and other secrets. See [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/metricbeat/values.yaml) for an example | `[]` | -| `terminationGracePeriod` | Termination period (in seconds) to wait before killing Metricbeat pod process on pod shutdown | `30` | -| `tolerations` | Configurable [tolerations](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) | `[]` | -| `nodeSelector` | Configurable [nodeSelector](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector) | `{}` | -| `affinity` | Configurable [affinity](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity) | `{}` | -| `updateStrategy` | The [updateStrategy](https://kubernetes.io/docs/tasks/manage-daemon/update-daemon-set/#daemonset-update-strategy) for the `DaemonSet`. By default Kubernetes will kill and recreate pods on updates. Setting this to `OnDelete` will require that pods be deleted manually. | `RollingUpdate` | -| `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. | `""` | -| `replicas` | The replica count for the metricbeat deployment talking to kube-state-metrics | `1` | -| `fullnameOverride` | Overrides the full name of the resources. If not set the name will default to "`.Release.Name`-`.Values.nameOverride or .Chart.Name`" | `""` | +| Parameter | Description | Default | +| --- | --- | --- | +| `daemonset.affinity` | Configurable [affinity][] for Metricbeat `DaemonSet`. | `{}` | +| `daemonset.envFrom` | Templatable string of `envFrom` to be passed to the [environment from variables][] which will be appended to Metricbeat container for `DaemonSet`. | `[]` | +| `daemonset.extraEnvs` | Extra [environment variables][] which will be appended to Metricbeat container for `DaemonSet`. | `[]` | +| `daemonset.extraVolumes` | Templatable string of additional volumes to be passed to the `tpl` function or `DaemonSet`. | `[]` | +| `daemonset.extraVolumeMounts` | Templatable string of additional volumeMounts to be passed to the `tpl` function or `DaemonSet`. | `[]` | +| `daemonset.metricbeatConfig` | Allows you to add any config files in `/usr/share/metricbeat` such as `metricbeat.yml` for Metricbeat `DaemonSet`. | see [values.yaml][] | +| `daemonset.nodeSelector` | Configurable [nodeSelector][] for Metricbeat `DaemonSet`. | `{}` | +| `daemonset.secretMounts` | Allows you easily mount a secret as a file inside the `DaemonSet`. Useful for mounting certificates and other secrets. See [values.yaml][] for an example | `[]` | +| `daemonset.securityContext` | Configurable [securityContext][] for Metricbeat `DaemonSet` pod execution environment. | `runAsUser: 0`
`privileged: false` | +| `daemonset.resources` | Allows you to set the [resources][] for Metricbeat `DaemonSet`. | `requests.cpu: 100m`
`requests.memory: 100Mi`
`limits.cpu: 1000m`
`limits.memory: 200Mi` | +| `daemonset.tolerations` | Configurable [tolerations][] for Metricbeat `DaemonSet`. | `[]` | +| `deployment.affinity` | Configurable [affinity][] for Metricbeat `Deployment`. | `{}` | +| `deployment.envFrom` | Templatable string of `envFrom` to be passed to the [environment from variables][] which will be appended to Metricbeat container for `Deployment`. | `[]` | +| `deployment.extraEnvs` | Extra [environment variables][] which will be appended to Metricbeat container for `Deployment`. | `[]` | +| `deployment.extraVolumes` | Templatable string of additional volumes to be passed to the `tpl` function or `Deployment`. | `[]` | +| `deployment.extraVolumeMounts` | Templatable string of additional volumeMounts to be passed to the `tpl` function or `DaemonSet`. | `[]` | +| `deployment.metricbeatConfig` | Allows you to add any config files in `/usr/share/metricbeat` such as `metricbeat.yml` for Metricbeat `Deployment`. | see [values.yaml][] | +| `deployment.nodeSelector` | Configurable [nodeSelector][] for Metricbeat `Deployment`. | `{}` | +| `deployment.secretMounts` | Allows you easily mount a secret as a file inside the `Deployment`. Useful for mounting certificates and other secrets. See [values.yaml][] for an example | `[]` | +| `deployment.securityContext` | Configurable [securityContext][] for Metricbeat `Deployment` pod execution environment. | `runAsUser: 0`
`privileged: false` | +| `deployment.resources` | Allows you to set the [resources][] for Metricbeat `Deployment`. | `requests.cpu: 100m`
`requests.memory: 100Mi`
`limits.cpu: 1000m`
`limits.memory: 200Mi` | +| `deployment.tolerations` | Configurable [tolerations][] for Metricbeat `Deployment`. | `[]` | +| `extraContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | +| `extraInitContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | +| `hostPathRoot` | Fully-qualified [hostPath][] that will be used to persist Metricbeat registry data | `/var/lib` | +| `image` | The Metricbeat docker image | `docker.elastic.co/beats/metricbeat` | +| `imageTag` | The Metricbeat docker image tag | `7.7.0-SNAPSHOT` | +| `imagePullPolicy` | The Kubernetes [imagePullPolicy][] value | `IfNotPresent` | +| `imagePullSecrets` | Configuration for [imagePullSecrets][] so that you can use a private registry for your image | `[]` | +| `labels` | Configurable [label][] applied to all Metricbeat pods | `{}` | +| `managedServiceAccount` | Whether the `serviceAccount` should be managed by this helm chart. Set this to `false` in order to manage your own service account and related roles. | `true` | +| `clusterRoleRules` | Configurable [cluster role rules][] that Metricbeat uses to access Kubernetes resources. | see [values.yaml][] | +| `podAnnotations` | Configurable [annotations][] applied to all Metricbeat pods | `{}` | +| `livenessProbe` | Parameters to pass to [liveness probe][] checks for values such as timeouts and thresholds. | `failureThreshold: 3`
`initialDelaySeconds: 10`
`periodSeconds: 10`
`successThreshold: 3`
`timeoutSeconds: 5` | +| `readinessProbe` | Parameters to pass to [readiness probe][] checks for values such as timeouts and thresholds. | `failureThreshold: 3`
`initialDelaySeconds: 10`
`periodSeconds: 10`
`successThreshold: 3`
`timeoutSeconds: 5` | +| `serviceAccount` | Custom [serviceAccount][] that Metricbeat will use during execution. By default will use the service account created by this chart. | `""` | +| `terminationGracePeriod` | Termination period (in seconds) to wait before killing Metricbeat pod process on pod shutdown | `30` | +| `updateStrategy` | The [updateStrategy][] for the `DaemonSet`. By default Kubernetes will kill and recreate pods on updates. Setting this to `OnDelete` will require that pods be deleted manually. | `RollingUpdate` | +| `priorityClassName` | The [name of the PriorityClass][]. No default is supplied as the PriorityClass must be created first. | `""` | +| `replicas` | The replica count for the metricbeat deployment talking to kube-state-metrics | `1` | +| `fullnameOverride` | Overrides the full name of the resources. If not set the name will default to "`.Release.Name`-`.Values.nameOverride or .Chart.Name`" | `""` | + +### Deprecated +| Parameter | Description | Default | +| --- | --- | --- | +| `affinity` | Configurable [affinity][] for Metricbeat `DaemonSet`. | `{}` | +| `extraEnvs` | Extra [environment variables][] which will be appended to Metricbeat container for both `DaemonSet` and `Deployment`. | `[]` | +| `extraVolumes` | Templatable string of additional volumes to be passed to the `tpl` function for both `DaemonSet` and `Deployment`. | `[]` | +| `extraVolumeMounts` | Templatable string of additional volumeMounts to be passed to the `tpl` function for both `DaemonSet` and `Deployment`. | `[]` | +| `deployment.envFrom` | Templatable string to be passed to the [environment from variables][] which will be appended to Metricbeat container for both `DaemonSet` and `Deployment`. | `[]` | +| `metricbeatConfig` | Allows you to add any config files in `/usr/share/metricbeat` such as `metricbeat.yml` for both Metricbeat `DaemonSet` and `Deployment`. | `{}` | +| `nodeSelector` | Configurable [nodeSelector][] for Metricbeat `DaemonSet`. | `{}` | +| `podSecurityContext` | Configurable [securityContext][] for Metricbeat `DaemonSet` and `Deployment` pod execution environment. | `{}` | +| `resources` | Allows you to set the [resources][] for both Metricbeat `DaemonSet` and `Deployment`. | `{}` | +| `secretMounts` | Allows you easily mount a secret as a file inside `DaemonSet` and `Deployment`. Useful for mounting certificates and other secrets. | `[]` | +| `tolerations` | Configurable [tolerations][] for both Metricbeat `DaemonSet` and `Deployment`. | `[]` | ## Examples @@ -138,3 +164,23 @@ To run the goss tests against the default example: cd examples/default make goss ``` + +[affinity]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity +[annotations]: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +[cluster role rules]: https://kubernetes.io/docs/reference/access-authn-authz/rbac/#role-and-clusterrole +[environment variables]: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config +[environment from variables]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables +[hostPath]: https://kubernetes.io/docs/concepts/storage/volumes/#hostpath +[imagePullPolicy]: https://kubernetes.io/docs/concepts/containers/images/#updating-images +[imagePullSecrets]: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret +[label]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +[liveness probe]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/ +[name of the PriorityClass]: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass +[nodeSelector]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector +[securityContext]: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +[readiness probe]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/ +[resources]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ +[serviceAccount]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ +[tolerations]: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ +[updateStrategy]: https://kubernetes.io/docs/tasks/manage-daemon/update-daemon-set/#daemonset-update-strategy +[values.yaml]: https://github.com/elastic/helm-charts/tree/master/metricbeat/values.yaml diff --git a/metricbeat/examples/default/test/goss-metrics.yaml b/metricbeat/examples/default/test/goss-metrics.yaml index f2bca1512..7fca303f9 100644 --- a/metricbeat/examples/default/test/goss-metrics.yaml +++ b/metricbeat/examples/default/test/goss-metrics.yaml @@ -5,7 +5,7 @@ port: - '127.0.0.1' mount: - /usr/share/metricbeat/kube-state-metrics-metricbeat.yml: + /usr/share/metricbeat/metricbeat.yml: exists: true opts: - ro @@ -33,7 +33,6 @@ file: /usr/share/metricbeat/metricbeat.yml: exists: true contains: - - 'add_kubernetes_metadata' - 'output.elasticsearch' - 'elasticsearch-master:9200' diff --git a/metricbeat/examples/oss/test/goss-metrics.yaml b/metricbeat/examples/oss/test/goss-metrics.yaml index 0632f92c5..c78aa2faa 100644 --- a/metricbeat/examples/oss/test/goss-metrics.yaml +++ b/metricbeat/examples/oss/test/goss-metrics.yaml @@ -5,7 +5,7 @@ port: - '127.0.0.1' mount: - /usr/share/metricbeat/kube-state-metrics-metricbeat.yml: + /usr/share/metricbeat/metricbeat.yml: exists: true opts: - ro @@ -32,7 +32,6 @@ file: /usr/share/metricbeat/metricbeat.yml: exists: true contains: - - 'add_kubernetes_metadata' - 'output.elasticsearch' command: diff --git a/metricbeat/examples/oss/values.yaml b/metricbeat/examples/oss/values.yaml index 89f2d453c..29791cc2c 100644 --- a/metricbeat/examples/oss/values.yaml +++ b/metricbeat/examples/oss/values.yaml @@ -1,5 +1,11 @@ image: docker.elastic.co/beats/metricbeat-oss -extraEnvs: - - name: ELASTICSEARCH_HOSTS - value: oss-master:9200 +daemonset: + extraEnvs: + - name: ELASTICSEARCH_HOSTS + value: oss-master:9200 + +deployment: + extraEnvs: + - name: ELASTICSEARCH_HOSTS + value: oss-master:9200 diff --git a/metricbeat/examples/security/test/goss-metrics.yaml b/metricbeat/examples/security/test/goss-metrics.yaml index 52a2a8ab9..22ed216ca 100644 --- a/metricbeat/examples/security/test/goss-metrics.yaml +++ b/metricbeat/examples/security/test/goss-metrics.yaml @@ -5,7 +5,7 @@ port: - '127.0.0.1' mount: - /usr/share/metricbeat/kube-state-metrics-metricbeat.yml: + /usr/share/metricbeat/metricbeat.yml: exists: true opts: - ro @@ -38,7 +38,6 @@ file: /usr/share/metricbeat/metricbeat.yml: exists: true contains: - - 'add_kubernetes_metadata' - 'output.elasticsearch' command: diff --git a/metricbeat/examples/security/values.yaml b/metricbeat/examples/security/values.yaml index 8b48e814e..2939d1c20 100644 --- a/metricbeat/examples/security/values.yaml +++ b/metricbeat/examples/security/values.yaml @@ -1,91 +1,110 @@ -metricbeatConfig: - metricbeat.yml: | - metricbeat.modules: - - module: kubernetes - metricsets: - - container - - node - - pod - - system - - volume - period: 10s - host: "${NODE_NAME}" - hosts: ["https://${NODE_NAME}:10250"] - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - ssl.verification_mode: "none" - # If using Red Hat OpenShift remove ssl.verification_mode entry and - # uncomment these settings: - #ssl.certificate_authorities: - #- /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt - processors: - - add_kubernetes_metadata: ~ - - module: kubernetes - enabled: true - metricsets: - - event - - module: system - period: 10s - metricsets: - - cpu - - load - - memory - - network - - process - - process_summary - processes: ['.*'] - process.include_top_n: - by_cpu: 5 - by_memory: 5 - - module: system - period: 1m - metricsets: - - filesystem - - fsstat - processors: - - drop_event.when.regexp: - system.filesystem.mount_point: '^/(sys|cgroup|proc|dev|etc|host|lib)($|/)' - - output.elasticsearch: - username: '${ELASTICSEARCH_USERNAME}' - password: '${ELASTICSEARCH_PASSWORD}' - protocol: https - hosts: ["security-master:9200"] - ssl.certificate_authorities: - - /usr/share/metricbeat/config/certs/elastic-certificate.pem - - kube-state-metrics-metricbeat.yml: | - metricbeat.modules: - - module: kubernetes - enabled: true - metricsets: - - state_node - - state_deployment - - state_replicaset - - state_pod - - state_container - period: 10s - hosts: ["${KUBE_STATE_METRICS_HOSTS}"] - output.elasticsearch: - username: '${ELASTICSEARCH_USERNAME}' - password: '${ELASTICSEARCH_PASSWORD}' - protocol: https - hosts: ["security-master:9200"] - ssl.certificate_authorities: - - /usr/share/metricbeat/config/certs/elastic-certificate.pem - -secretMounts: +daemonset: + extraEnvs: + - name: 'ELASTICSEARCH_USERNAME' + valueFrom: + secretKeyRef: + name: elastic-credentials + key: username + - name: 'ELASTICSEARCH_PASSWORD' + valueFrom: + secretKeyRef: + name: elastic-credentials + key: password + # Allows you to add any config files in /usr/share/metricbeat + # such as metricbeat.yml for daemonset + metricbeatConfig: + metricbeat.yml: | + metricbeat.modules: + - module: kubernetes + metricsets: + - container + - node + - pod + - system + - volume + period: 10s + host: "${NODE_NAME}" + hosts: ["https://${NODE_NAME}:10250"] + bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token + ssl.verification_mode: "none" + # If using Red Hat OpenShift remove ssl.verification_mode entry and + # uncomment these settings: + #ssl.certificate_authorities: + #- /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt + processors: + - add_kubernetes_metadata: ~ + - module: kubernetes + enabled: true + metricsets: + - event + - module: system + period: 10s + metricsets: + - cpu + - load + - memory + - network + - process + - process_summary + processes: ['.*'] + process.include_top_n: + by_cpu: 5 + by_memory: 5 + - module: system + period: 1m + metricsets: + - filesystem + - fsstat + processors: + - drop_event.when.regexp: + system.filesystem.mount_point: '^/(sys|cgroup|proc|dev|etc|host|lib)($|/)' + output.elasticsearch: + username: '${ELASTICSEARCH_USERNAME}' + password: '${ELASTICSEARCH_PASSWORD}' + protocol: https + hosts: ["security-master:9200"] + ssl.certificate_authorities: + - /usr/share/metricbeat/config/certs/elastic-certificate.pem + secretMounts: - name: elastic-certificate-pem secretName: elastic-certificate-pem path: /usr/share/metricbeat/config/certs -extraEnvs: - - name: 'ELASTICSEARCH_USERNAME' - valueFrom: - secretKeyRef: - name: elastic-credentials - key: username - - name: 'ELASTICSEARCH_PASSWORD' - valueFrom: - secretKeyRef: - name: elastic-credentials - key: password +deployment: + extraEnvs: + - name: 'ELASTICSEARCH_USERNAME' + valueFrom: + secretKeyRef: + name: elastic-credentials + key: username + - name: 'ELASTICSEARCH_PASSWORD' + valueFrom: + secretKeyRef: + name: elastic-credentials + key: password + # Allows you to add any config files in /usr/share/metricbeat + # such as metricbeat.yml for deployment + metricbeatConfig: + metricbeat.yml: | + metricbeat.modules: + - module: kubernetes + enabled: true + metricsets: + - state_node + - state_deployment + - state_replicaset + - state_pod + - state_container + period: 10s + hosts: ["${KUBE_STATE_METRICS_HOSTS}"] + output.elasticsearch: + username: '${ELASTICSEARCH_USERNAME}' + password: '${ELASTICSEARCH_PASSWORD}' + protocol: https + hosts: ["security-master:9200"] + ssl.certificate_authorities: + - /usr/share/metricbeat/config/certs/elastic-certificate.pem + secretMounts: + - name: elastic-certificate-pem + secretName: elastic-certificate-pem + path: /usr/share/metricbeat/config/certs diff --git a/metricbeat/templates/configmap.yaml b/metricbeat/templates/configmap.yaml index 09e381ce7..54183db1b 100644 --- a/metricbeat/templates/configmap.yaml +++ b/metricbeat/templates/configmap.yaml @@ -15,3 +15,39 @@ data: {{ $config | indent 4 -}} {{- end -}} {{- end -}} + +{{- if .Values.daemonset.metricbeatConfig }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "metricbeat.fullname" . }}-daemonset-config + labels: + app: "{{ template "metricbeat.fullname" . }}" + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + heritage: {{ .Release.Service | quote }} + release: {{ .Release.Name | quote }} +data: +{{- range $path, $config := .Values.daemonset.metricbeatConfig }} + {{ $path }}: | +{{ $config | indent 4 -}} +{{- end -}} +{{- end -}} + +{{- if .Values.deployment.metricbeatConfig }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "metricbeat.fullname" . }}-deployment-config + labels: + app: "{{ template "metricbeat.fullname" . }}" + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + heritage: {{ .Release.Service | quote }} + release: {{ .Release.Name | quote }} +data: +{{- range $path, $config := .Values.deployment.metricbeatConfig }} + {{ $path }}: | +{{ $config | indent 4 -}} +{{- end -}} +{{- end -}} diff --git a/metricbeat/templates/daemonset.yaml b/metricbeat/templates/daemonset.yaml index e681b4380..ea1e888bf 100644 --- a/metricbeat/templates/daemonset.yaml +++ b/metricbeat/templates/daemonset.yaml @@ -38,22 +38,16 @@ spec: {{ $key }}: {{ $value | quote }} {{- end }} spec: - {{- with .Values.tolerations }} - tolerations: {{ toYaml . | nindent 6 }} - {{- end }} - {{- with .Values.nodeSelector }} - nodeSelector: {{ toYaml . | nindent 8 }} - {{- end }} + affinity: {{ toYaml ( .Values.affinity | default .Values.daemonset.affinity ) | nindent 8 }} + nodeSelector: {{ toYaml ( .Values.nodeSelector | default .Values.daemonset.nodeSelector ) | nindent 8 }} + tolerations: {{ toYaml ( .Values.tolerations | default .Values.daemonset.tolerations ) | nindent 8 }} {{- if .Values.priorityClassName }} priorityClassName: {{ .Values.priorityClassName }} {{- end }} - {{- with .Values.affinity }} - affinity: {{ toYaml . | nindent 8 -}} - {{- end }} serviceAccountName: {{ template "metricbeat.serviceAccount" . }} terminationGracePeriodSeconds: {{ .Values.terminationGracePeriod }} volumes: - {{- range .Values.secretMounts }} + {{- range .Values.secretMounts | default .Values.daemonset.secretMounts }} - name: {{ .name }} secret: secretName: {{ .secretName }} @@ -63,6 +57,11 @@ spec: configMap: defaultMode: 0600 name: {{ template "metricbeat.fullname" . }}-config + {{- else if .Values.daemonset.metricbeatConfig }} + - name: metricbeat-config + configMap: + defaultMode: 0600 + name: {{ template "metricbeat.fullname" . }}-daemonset-config {{- end }} - name: data hostPath: @@ -77,8 +76,8 @@ spec: - name: cgroup hostPath: path: /sys/fs/cgroup - {{- if .Values.extraVolumes }} -{{ toYaml .Values.extraVolumes | indent 6 }} + {{- if .Values.extraVolumes | default .Values.daemonset.extraVolumes }} +{{ toYaml ( .Values.extraVolumes | default .Values.daemonset.extraVolumes ) | indent 6 }} {{- end }} {{- if .Values.imagePullSecrets }} imagePullSecrets: @@ -101,8 +100,7 @@ spec: {{ toYaml .Values.livenessProbe | indent 10 }} readinessProbe: {{ toYaml .Values.readinessProbe | indent 10 }} - resources: -{{ toYaml .Values.resources | indent 10 }} + resources: {{ toYaml ( .Values.resources | default .Values.daemonset.resources ) | nindent 10 }} env: - name: POD_NAMESPACE valueFrom: @@ -112,19 +110,13 @@ spec: valueFrom: fieldRef: fieldPath: spec.nodeName -{{- if .Values.extraEnvs }} -{{ toYaml .Values.extraEnvs | indent 8 }} -{{- end }} -{{- if .Values.envFrom }} - envFrom: -{{ toYaml .Values.envFrom | indent 10 }} -{{- end }} -{{- if .Values.podSecurityContext }} - securityContext: -{{ toYaml .Values.podSecurityContext | indent 10 }} +{{- if .Values.extraEnvs | default .Values.daemonset.extraEnvs }} +{{ toYaml ( .Values.extraEnvs | default .Values.daemonset.extraEnvs ) | indent 8 }} {{- end }} + envFrom: {{ toYaml ( .Values.envFrom | default .Values.daemonset.envFrom ) | nindent 10 }} + securityContext: {{ toYaml ( .Values.podSecurityContext | default .Values.daemonset.securityContext ) | nindent 10 }} volumeMounts: - {{- range .Values.secretMounts }} + {{- range .Values.secretMounts | default .Values.daemonset.secretMounts }} - name: {{ .name }} mountPath: {{ .path }} {{- if .subPath }} @@ -136,6 +128,13 @@ spec: mountPath: /usr/share/metricbeat/{{ $path }} readOnly: true subPath: {{ $path }} + {{ else }} + {{- range $path, $config := .Values.daemonset.metricbeatConfig }} + - name: metricbeat-config + mountPath: /usr/share/metricbeat/{{ $path }} + readOnly: true + subPath: {{ $path }} + {{- end }} {{- end }} - name: data mountPath: /usr/share/metricbeat/data @@ -150,8 +149,8 @@ spec: - name: cgroup mountPath: /hostfs/sys/fs/cgroup readOnly: true - {{- if .Values.extraVolumeMounts }} -{{ toYaml .Values.extraVolumeMounts | indent 8 }} + {{- if .Values.extraVolumeMounts | default .Values.daemonset.extraVolumeMounts }} +{{ toYaml ( .Values.extraVolumeMounts | default .Values.daemonset.extraVolumeMounts ) | indent 8 }} {{- end }} {{- if .Values.extraContainers }} {{ tpl .Values.extraContainers . | indent 6 }} diff --git a/metricbeat/templates/deployment.yaml b/metricbeat/templates/deployment.yaml index 225160b47..ca056d42b 100644 --- a/metricbeat/templates/deployment.yaml +++ b/metricbeat/templates/deployment.yaml @@ -32,17 +32,16 @@ spec: heritage: '{{ .Release.Service }}' release: '{{ .Release.Name }}' spec: - {{- with .Values.tolerations }} - tolerations: -{{ toYaml . | indent 6 }} - {{- end }} + affinity: {{ toYaml .Values.deployment.affinity | nindent 8 }} + nodeSelector: {{ toYaml .Values.deployment.nodeSelector | nindent 8 }} + tolerations: {{ toYaml ( .Values.tolerations | default .Values.deployment.tolerations ) | nindent 8 }} {{- if .Values.priorityClassName }} priorityClassName: {{ .Values.priorityClassName }} {{- end }} serviceAccountName: {{ template "metricbeat.serviceAccount" . }} terminationGracePeriodSeconds: {{ .Values.terminationGracePeriod }} volumes: - {{- range .Values.secretMounts }} + {{- range .Values.secretMounts | default .Values.deployment.secretMounts }} - name: {{ .name }} secret: secretName: {{ .secretName }} @@ -52,9 +51,14 @@ spec: configMap: defaultMode: 0600 name: {{ template "metricbeat.fullname" . }}-config + {{- else if .Values.deployment.metricbeatConfig }} + - name: metricbeat-config + configMap: + defaultMode: 0600 + name: {{ template "metricbeat.fullname" . }}-deployment-config {{- end }} - {{- if .Values.extraVolumes }} -{{ toYaml .Values.extraVolumes | indent 6 }} + {{- if .Values.extraVolumes | default .Values.deployment.extraVolumes }} +{{ toYaml ( .Values.extraVolumes | default .Values.deployment.extraVolumes ) | indent 6 }} {{- end }} {{- if .Values.imagePullSecrets }} imagePullSecrets: @@ -69,8 +73,6 @@ spec: image: "{{ .Values.image }}:{{ .Values.imageTag }}" imagePullPolicy: "{{ .Values.imagePullPolicy }}" args: - - "-c" - - "/usr/share/metricbeat/kube-state-metrics-metricbeat.yml" - "-e" - "-E" - "http.enabled=true" @@ -78,8 +80,7 @@ spec: {{ toYaml .Values.livenessProbe | indent 10 }} readinessProbe: {{ toYaml .Values.readinessProbe | indent 10 }} - resources: -{{ toYaml .Values.resources | indent 10 }} + resources: {{ toYaml ( .Values.resources | default .Values.deployment.resources ) | nindent 10 }} env: - name: POD_NAMESPACE valueFrom: @@ -87,19 +88,13 @@ spec: fieldPath: metadata.namespace - name: KUBE_STATE_METRICS_HOSTS value: "$({{ .Release.Name | replace "-" "_" | upper }}_KUBE_STATE_METRICS_SERVICE_HOST):$({{ .Release.Name | replace "-" "_" | upper }}_KUBE_STATE_METRICS_SERVICE_PORT_HTTP)" -{{- if .Values.extraEnvs }} -{{ toYaml .Values.extraEnvs | indent 8 }} -{{- end }} -{{- if .Values.envFrom }} - envFrom: -{{ toYaml .Values.envFrom | indent 10 }} -{{- end }} -{{- if .Values.podSecurityContext }} - securityContext: -{{ toYaml .Values.podSecurityContext | indent 10 }} +{{- if .Values.extraEnvs | default .Values.deployment.extraEnvs }} +{{ toYaml ( .Values.extraEnvs | default .Values.deployment.extraEnvs ) | indent 8 }} {{- end }} + envFrom: {{ toYaml ( .Values.envFrom | default .Values.deployment.envFrom ) | nindent 10 }} + securityContext: {{ toYaml ( .Values.podSecurityContext | default .Values.deployment.securityContext ) | nindent 10 }} volumeMounts: - {{- range .Values.secretMounts }} + {{- range .Values.secretMounts | default .Values.deployment.secretMounts }} - name: {{ .name }} mountPath: {{ .path }} {{- if .subPath }} @@ -111,9 +106,16 @@ spec: mountPath: /usr/share/metricbeat/{{ $path }} readOnly: true subPath: {{ $path }} + {{ else }} + {{- range $path, $config := .Values.deployment.metricbeatConfig }} + - name: metricbeat-config + mountPath: /usr/share/metricbeat/{{ $path }} + readOnly: true + subPath: {{ $path }} + {{- end }} {{- end }} - {{- if .Values.extraVolumeMounts }} -{{ toYaml .Values.extraVolumeMounts | indent 8 }} + {{- if .Values.extraVolumeMounts | default .Values.deployment.extraVolumeMounts }} +{{ toYaml ( .Values.extraVolumeMounts | default .Values.deployment.extraVolumeMounts ) | indent 8 }} {{- end }} {{- if .Values.extraContainers }} {{ tpl .Values.extraContainers . | indent 6 }} diff --git a/metricbeat/tests/metricbeat_test.py b/metricbeat/tests/metricbeat_test.py index 447f5cf3f..91c1bfeed 100644 --- a/metricbeat/tests/metricbeat_test.py +++ b/metricbeat/tests/metricbeat_test.py @@ -27,9 +27,39 @@ def test_defaults(): assert "metricbeat test output" in c["readinessProbe"]["exec"]["command"][-1] + assert r["daemonset"][name]["spec"]["template"]["spec"]["tolerations"] == [] + assert ( + r["deployment"][name + "-metrics"]["spec"]["template"]["spec"]["tolerations"] + == [] + ) + + assert ( + r["daemonset"][name]["spec"]["template"]["spec"]["containers"][0][ + "securityContext" + ]["runAsUser"] + == 0 + ) + assert ( + r["daemonset"][name]["spec"]["template"]["spec"]["containers"][0][ + "securityContext" + ]["privileged"] + == False + ) + assert ( + r["deployment"][name + "-metrics"]["spec"]["template"]["spec"]["containers"][0][ + "securityContext" + ]["runAsUser"] + == 0 + ) + assert ( + r["deployment"][name + "-metrics"]["spec"]["template"]["spec"]["containers"][0][ + "securityContext" + ]["privileged"] + == False + ) + # Empty customizable defaults assert "imagePullSecrets" not in r["daemonset"][name]["spec"]["template"]["spec"] - assert "tolerations" not in r["daemonset"][name]["spec"]["template"]["spec"] assert r["daemonset"][name]["spec"]["updateStrategy"]["type"] == "RollingUpdate" @@ -37,14 +67,75 @@ def test_defaults(): r["daemonset"][name]["spec"]["template"]["spec"]["serviceAccountName"] == name ) - volumes = r["daemonset"][name]["spec"]["template"]["spec"]["volumes"] + cfg = r["configmap"] + + assert name + "-config" not in cfg + assert name + "-daemonset-config" in cfg + assert name + "-deployment-config" in cfg + + assert "metricbeat.yml" in cfg[name + "-daemonset-config"]["data"] + assert "metricbeat.yml" in cfg[name + "-deployment-config"]["data"] + + assert "module: system" in cfg[name + "-daemonset-config"]["data"]["metricbeat.yml"] + assert ( + "module: system" + not in cfg[name + "-deployment-config"]["data"]["metricbeat.yml"] + ) + assert "state_pod" not in cfg[name + "-daemonset-config"]["data"]["metricbeat.yml"] + assert "state_pod" in cfg[name + "-deployment-config"]["data"]["metricbeat.yml"] + + daemonset = r["daemonset"][name]["spec"]["template"]["spec"] + + assert { + "configMap": {"name": name + "-config", "defaultMode": 0o600}, + "name": project + "-config", + } not in daemonset["volumes"] + assert { + "configMap": {"name": name + "-daemonset-config", "defaultMode": 0o600}, + "name": project + "-config", + } in daemonset["volumes"] + assert { "name": "data", "hostPath": { "path": "/var/lib/" + name + "-default-data", "type": "DirectoryOrCreate", }, - } in volumes + } in daemonset["volumes"] + + assert { + "mountPath": "/usr/share/metricbeat/metricbeat.yml", + "name": project + "-config", + "subPath": "metricbeat.yml", + "readOnly": True, + } in daemonset["containers"][0]["volumeMounts"] + + deployment = r["deployment"][name + "-metrics"]["spec"]["template"]["spec"] + + assert { + "configMap": {"name": name + "-config", "defaultMode": 0o600}, + "name": project + "-config", + } not in deployment["volumes"] + assert { + "configMap": {"name": name + "-deployment-config", "defaultMode": 0o600}, + "name": project + "-config", + } in deployment["volumes"] + + assert { + "mountPath": "/usr/share/metricbeat/metricbeat.yml", + "name": project + "-config", + "subPath": "metricbeat.yml", + "readOnly": True, + } in deployment["containers"][0]["volumeMounts"] + + assert daemonset["containers"][0]["resources"] == { + "requests": {"cpu": "100m", "memory": "100Mi"}, + "limits": {"cpu": "1000m", "memory": "200Mi"}, + } + assert deployment["containers"][0]["resources"] == { + "requests": {"cpu": "100m", "memory": "100Mi"}, + "limits": {"cpu": "1000m", "memory": "200Mi"}, + } def test_adding_a_extra_container(): @@ -103,13 +194,47 @@ def test_adding_a_extra_init_container(): def test_adding_envs(): config = """ +daemonset: + extraEnvs: + - name: LOG_LEVEL + value: DEBUG +""" + r = helm_template(config) + assert {"name": "LOG_LEVEL", "value": "DEBUG"} in r["daemonset"][name]["spec"][ + "template" + ]["spec"]["containers"][0]["env"] + assert {"name": "LOG_LEVEL", "value": "DEBUG"} not in r["deployment"][ + name + "-metrics" + ]["spec"]["template"]["spec"]["containers"][0]["env"] + + config = """ +deployment: + extraEnvs: + - name: LOG_LEVEL + value: DEBUG +""" + r = helm_template(config) + assert {"name": "LOG_LEVEL", "value": "DEBUG"} in r["deployment"][ + name + "-metrics" + ]["spec"]["template"]["spec"]["containers"][0]["env"] + assert {"name": "LOG_LEVEL", "value": "DEBUG"} not in r["daemonset"][name]["spec"][ + "template" + ]["spec"]["containers"][0]["env"] + + +def test_adding_deprecated_envs(): + config = """ extraEnvs: - name: LOG_LEVEL value: DEBUG """ r = helm_template(config) - envs = r["daemonset"][name]["spec"]["template"]["spec"]["containers"][0]["env"] - assert {"name": "LOG_LEVEL", "value": "DEBUG"} in envs + assert {"name": "LOG_LEVEL", "value": "DEBUG"} in r["daemonset"][name]["spec"][ + "template" + ]["spec"]["containers"][0]["env"] + assert {"name": "LOG_LEVEL", "value": "DEBUG"} in r["deployment"][ + name + "-metrics" + ]["spec"]["template"]["spec"]["containers"][0]["env"] def test_adding_image_pull_secrets(): @@ -126,6 +251,45 @@ def test_adding_image_pull_secrets(): def test_adding_tolerations(): config = """ +daemonset: + tolerations: + - key: "key1" + operator: "Equal" + value: "value1" + effect: "NoExecute" + tolerationSeconds: 3600 +""" + r = helm_template(config) + assert ( + r["daemonset"][name]["spec"]["template"]["spec"]["tolerations"][0]["key"] + == "key1" + ) + assert ( + r["deployment"][name + "-metrics"]["spec"]["template"]["spec"]["tolerations"] + == [] + ) + + config = """ +deployment: + tolerations: + - key: "key1" + operator: "Equal" + value: "value1" + effect: "NoExecute" + tolerationSeconds: 3600 +""" + r = helm_template(config) + assert ( + r["deployment"][name + "-metrics"]["spec"]["template"]["spec"]["tolerations"][ + 0 + ]["key"] + == "key1" + ) + assert r["daemonset"][name]["spec"]["template"]["spec"]["tolerations"] == [] + + +def test_adding_deprecated_tolerations(): + config = """ tolerations: - key: "key1" operator: "Equal" @@ -138,6 +302,12 @@ def test_adding_tolerations(): r["daemonset"][name]["spec"]["template"]["spec"]["tolerations"][0]["key"] == "key1" ) + assert ( + r["deployment"][name + "-metrics"]["spec"]["template"]["spec"]["tolerations"][ + 0 + ]["key"] + == "key1" + ) def test_override_the_default_update_strategy(): @@ -172,18 +342,162 @@ def test_self_managing_rbac_resources(): def test_setting_pod_security_context(): config = """ +daemonset: + securityContext: + runAsUser: 1001 + privileged: false +""" + r = helm_template(config) + assert ( + r["daemonset"][name]["spec"]["template"]["spec"]["containers"][0][ + "securityContext" + ]["runAsUser"] + == 1001 + ) + assert ( + r["daemonset"][name]["spec"]["template"]["spec"]["containers"][0][ + "securityContext" + ]["privileged"] + == False + ) + assert ( + r["deployment"][name + "-metrics"]["spec"]["template"]["spec"]["containers"][0][ + "securityContext" + ]["runAsUser"] + == 0 + ) + assert ( + r["deployment"][name + "-metrics"]["spec"]["template"]["spec"]["containers"][0][ + "securityContext" + ]["privileged"] + == False + ) + + config = """ +deployment: + securityContext: + runAsUser: 1001 + privileged: false +""" + r = helm_template(config) + assert ( + r["deployment"][name + "-metrics"]["spec"]["template"]["spec"]["containers"][0][ + "securityContext" + ]["runAsUser"] + == 1001 + ) + assert ( + r["deployment"][name + "-metrics"]["spec"]["template"]["spec"]["containers"][0][ + "securityContext" + ]["privileged"] + == False + ) + assert ( + r["daemonset"][name]["spec"]["template"]["spec"]["containers"][0][ + "securityContext" + ]["runAsUser"] + == False + ) + assert ( + r["daemonset"][name]["spec"]["template"]["spec"]["containers"][0][ + "securityContext" + ]["privileged"] + == False + ) + + +def test_setting_deprecated_pod_security_context(): + config = """ podSecurityContext: runAsUser: 1001 privileged: false """ r = helm_template(config) - c = r["daemonset"][name]["spec"]["template"]["spec"]["containers"][0] - assert c["securityContext"]["runAsUser"] == 1001 - assert c["securityContext"]["privileged"] == False + assert ( + r["daemonset"][name]["spec"]["template"]["spec"]["containers"][0][ + "securityContext" + ]["runAsUser"] + == 1001 + ) + assert ( + r["daemonset"][name]["spec"]["template"]["spec"]["containers"][0][ + "securityContext" + ]["privileged"] + == False + ) + assert ( + r["deployment"][name + "-metrics"]["spec"]["template"]["spec"]["containers"][0][ + "securityContext" + ]["runAsUser"] + == 1001 + ) + assert ( + r["deployment"][name + "-metrics"]["spec"]["template"]["spec"]["containers"][0][ + "securityContext" + ]["privileged"] + == False + ) def test_adding_in_metricbeat_config(): config = """ +daemonset: + metricbeatConfig: + metricbeat.yml: | + key: daemonset + daemonset-config.yml: | + hello = daemonset + +deployment: + metricbeatConfig: + metricbeat.yml: | + key: deployment + deployment-config.yml: | + hello = deployment +""" + r = helm_template(config) + cfg = r["configmap"] + + assert "metricbeat.yml" in cfg[name + "-daemonset-config"]["data"] + assert "daemonset-config.yml" in cfg[name + "-daemonset-config"]["data"] + assert "deployment-config.yml" not in cfg[name + "-daemonset-config"]["data"] + assert "metricbeat.yml" in cfg[name + "-deployment-config"]["data"] + assert "deployment-config.yml" in cfg[name + "-deployment-config"]["data"] + assert "daemonset-config.yml" not in cfg[name + "-deployment-config"]["data"] + + assert "key: daemonset" in cfg[name + "-daemonset-config"]["data"]["metricbeat.yml"] + assert ( + "key: deployment" in cfg[name + "-deployment-config"]["data"]["metricbeat.yml"] + ) + + assert ( + "hello = daemonset" + in cfg[name + "-daemonset-config"]["data"]["daemonset-config.yml"] + ) + assert ( + "hello = deployment" + in cfg[name + "-deployment-config"]["data"]["deployment-config.yml"] + ) + + daemonset = r["daemonset"][name]["spec"]["template"]["spec"] + assert { + "mountPath": "/usr/share/metricbeat/daemonset-config.yml", + "name": project + "-config", + "subPath": "daemonset-config.yml", + "readOnly": True, + } in daemonset["containers"][0]["volumeMounts"] + + deployment = r["deployment"][name + "-metrics"]["spec"]["template"]["spec"] + assert { + "mountPath": "/usr/share/metricbeat/deployment-config.yml", + "name": project + "-config", + "subPath": "deployment-config.yml", + "readOnly": True, + } in deployment["containers"][0]["volumeMounts"] + + +def test_adding_in_deprecated_metricbeat_config(): + config = """ metricbeatConfig: metricbeat.yml: | key: @@ -231,18 +545,109 @@ def test_adding_in_metricbeat_config(): def test_adding_a_secret_mount(): config = """ +daemonset: + secretMounts: + - name: elastic-certificates + secretName: elastic-certificates-name + path: /usr/share/metricbeat/config/certs +""" + r = helm_template(config) + assert ( + { + "mountPath": "/usr/share/metricbeat/config/certs", + "name": "elastic-certificates", + } + in r["daemonset"][name]["spec"]["template"]["spec"]["containers"][0][ + "volumeMounts" + ] + ) + assert { + "name": "elastic-certificates", + "secret": {"secretName": "elastic-certificates-name"}, + } in r["daemonset"][name]["spec"]["template"]["spec"]["volumes"] + + assert ( + { + "mountPath": "/usr/share/metricbeat/config/certs", + "name": "elastic-certificates", + } + not in r["deployment"][name + "-metrics"]["spec"]["template"]["spec"][ + "containers" + ][0]["volumeMounts"] + ) + assert { + "name": "elastic-certificates", + "secret": {"secretName": "elastic-certificates-name"}, + } not in r["deployment"][name + "-metrics"]["spec"]["template"]["spec"]["volumes"] + + config = """ +deployment: + secretMounts: + - name: elastic-certificates + secretName: elastic-certificates-name + path: /usr/share/metricbeat/config/certs +""" + r = helm_template(config) + assert ( + { + "mountPath": "/usr/share/metricbeat/config/certs", + "name": "elastic-certificates", + } + in r["deployment"][name + "-metrics"]["spec"]["template"]["spec"]["containers"][ + 0 + ]["volumeMounts"] + ) + assert { + "name": "elastic-certificates", + "secret": {"secretName": "elastic-certificates-name"}, + } in r["deployment"][name + "-metrics"]["spec"]["template"]["spec"]["volumes"] + + assert ( + { + "mountPath": "/usr/share/metricbeat/config/certs", + "name": "elastic-certificates", + } + not in r["daemonset"][name]["spec"]["template"]["spec"]["containers"][0][ + "volumeMounts" + ] + ) + assert { + "name": "elastic-certificates", + "secret": {"secretName": "elastic-certificates-name"}, + } not in r["daemonset"][name]["spec"]["template"]["spec"]["volumes"] + + +def test_adding_a_deprecated_secret_mount(): + config = """ secretMounts: - name: elastic-certificates secretName: elastic-certificates-name path: /usr/share/metricbeat/config/certs """ r = helm_template(config) - s = r["daemonset"][name]["spec"]["template"]["spec"] - assert s["containers"][0]["volumeMounts"][0] == { + assert ( + { + "mountPath": "/usr/share/metricbeat/config/certs", + "name": "elastic-certificates", + } + in r["daemonset"][name]["spec"]["template"]["spec"]["containers"][0][ + "volumeMounts" + ] + ) + assert { + "name": "elastic-certificates", + "secret": {"secretName": "elastic-certificates-name"}, + } in r["daemonset"][name]["spec"]["template"]["spec"]["volumes"] + + assert r["deployment"][name + "-metrics"]["spec"]["template"]["spec"]["containers"][ + 0 + ]["volumeMounts"][0] == { "mountPath": "/usr/share/metricbeat/config/certs", "name": "elastic-certificates", } - assert s["volumes"][0] == { + assert r["deployment"][name + "-metrics"]["spec"]["template"]["spec"]["volumes"][ + 0 + ] == { "name": "elastic-certificates", "secret": {"secretName": "elastic-certificates-name"}, } @@ -250,6 +655,62 @@ def test_adding_a_secret_mount(): def test_adding_a_extra_volume_with_volume_mount(): config = """ +daemonset: + extraVolumes: + - name: extras + emptyDir: {} + extraVolumeMounts: + - name: extras + mountPath: /usr/share/extras + readOnly: true +""" + r = helm_template(config) + assert {"name": "extras", "emptyDir": {}} in r["daemonset"][name]["spec"][ + "template" + ]["spec"]["volumes"] + assert {"name": "extras", "mountPath": "/usr/share/extras", "readOnly": True,} in r[ + "daemonset" + ][name]["spec"]["template"]["spec"]["containers"][0]["volumeMounts"] + assert {"name": "extras", "emptyDir": {}} not in r["deployment"][name + "-metrics"][ + "spec" + ]["template"]["spec"]["volumes"] + assert ( + {"name": "extras", "mountPath": "/usr/share/extras", "readOnly": True,} + not in r["deployment"][name + "-metrics"]["spec"]["template"]["spec"][ + "containers" + ][0]["volumeMounts"] + ) + + config = """ +deployment: + extraVolumes: + - name: extras + emptyDir: {} + extraVolumeMounts: + - name: extras + mountPath: /usr/share/extras + readOnly: true +""" + r = helm_template(config) + assert {"name": "extras", "emptyDir": {}} in r["deployment"][name + "-metrics"][ + "spec" + ]["template"]["spec"]["volumes"] + assert {"name": "extras", "mountPath": "/usr/share/extras", "readOnly": True,} in r[ + "deployment" + ][name + "-metrics"]["spec"]["template"]["spec"]["containers"][0]["volumeMounts"] + assert {"name": "extras", "emptyDir": {}} not in r["daemonset"][name]["spec"][ + "template" + ]["spec"]["volumes"] + assert ( + {"name": "extras", "mountPath": "/usr/share/extras", "readOnly": True,} + not in r["daemonset"][name]["spec"]["template"]["spec"]["containers"][0][ + "volumeMounts" + ] + ) + + +def test_adding_a_deprecated_extra_volume_with_volume_mount(): + config = """ extraVolumes: - name: extras emptyDir: {} @@ -259,20 +720,53 @@ def test_adding_a_extra_volume_with_volume_mount(): readOnly: true """ r = helm_template(config) - extraVolume = r["daemonset"][name]["spec"]["template"]["spec"]["volumes"] - assert {"name": "extras", "emptyDir": {}} in extraVolume - extraVolumeMounts = r["daemonset"][name]["spec"]["template"]["spec"]["containers"][ - 0 - ]["volumeMounts"] - assert { - "name": "extras", - "mountPath": "/usr/share/extras", - "readOnly": True, - } in extraVolumeMounts + assert {"name": "extras", "emptyDir": {}} in r["daemonset"][name]["spec"][ + "template" + ]["spec"]["volumes"] + assert {"name": "extras", "mountPath": "/usr/share/extras", "readOnly": True,} in r[ + "daemonset" + ][name]["spec"]["template"]["spec"]["containers"][0]["volumeMounts"] + assert {"name": "extras", "emptyDir": {}} in r["deployment"][name + "-metrics"][ + "spec" + ]["template"]["spec"]["volumes"] + assert {"name": "extras", "mountPath": "/usr/share/extras", "readOnly": True,} in r[ + "deployment" + ][name + "-metrics"]["spec"]["template"]["spec"]["containers"][0]["volumeMounts"] def test_adding_a_node_selector(): config = """ +daemonset: + nodeSelector: + disktype: ssd +""" + r = helm_template(config) + assert ( + r["daemonset"][name]["spec"]["template"]["spec"]["nodeSelector"]["disktype"] + == "ssd" + ) + assert ( + r["deployment"][name + "-metrics"]["spec"]["template"]["spec"]["nodeSelector"] + == {} + ) + + config = """ +deployment: + nodeSelector: + disktype: ssd +""" + r = helm_template(config) + assert ( + r["deployment"][name + "-metrics"]["spec"]["template"]["spec"]["nodeSelector"][ + "disktype" + ] + == "ssd" + ) + assert r["daemonset"][name]["spec"]["template"]["spec"]["nodeSelector"] == {} + + +def test_adding_deprecated_node_selector(): + config = """ nodeSelector: disktype: ssd """ @@ -304,6 +798,53 @@ def test_adding_an_affinity_rule(): ][0]["topologyKey"] == "kubernetes.io/hostname" ) + assert ( + r["deployment"][name + "-metrics"]["spec"]["template"]["spec"]["affinity"] == {} + ) + + config = """ +daemonset: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - metricbeat + topologyKey: kubernetes.io/hostname +""" + + r = helm_template(config) + assert ( + r["daemonset"][name]["spec"]["template"]["spec"]["affinity"]["podAntiAffinity"][ + "requiredDuringSchedulingIgnoredDuringExecution" + ][0]["topologyKey"] + == "kubernetes.io/hostname" + ) + + config = """ +deployment: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - metricbeat + topologyKey: kubernetes.io/hostname +""" + + r = helm_template(config) + assert ( + r["deployment"][name + "-metrics"]["spec"]["template"]["spec"]["affinity"][ + "podAntiAffinity" + ]["requiredDuringSchedulingIgnoredDuringExecution"][0]["topologyKey"] + == "kubernetes.io/hostname" + ) def test_priority_class_name(): @@ -374,15 +915,126 @@ def test_adding_pod_labels(): def test_adding_env_from(): config = """ +daemonset: + envFrom: + - configMapRef: + name: configmap-name +""" + r = helm_template(config) + assert r["daemonset"][name]["spec"]["template"]["spec"]["containers"][0]["envFrom"][ + 0 + ]["configMapRef"] == {"name": "configmap-name"} + assert ( + r["deployment"][name + "-metrics"]["spec"]["template"]["spec"]["containers"][0][ + "envFrom" + ] + == [] + ) + + config = """ +deployment: + envFrom: + - configMapRef: + name: configmap-name +""" + r = helm_template(config) + assert r["deployment"][name + "-metrics"]["spec"]["template"]["spec"]["containers"][ + 0 + ]["envFrom"][0]["configMapRef"] == {"name": "configmap-name"} + assert ( + r["daemonset"][name]["spec"]["template"]["spec"]["containers"][0]["envFrom"] + == [] + ) + + +def test_adding_deprecated_env_from(): + config = """ envFrom: - configMapRef: name: configmap-name """ r = helm_template(config) - configMapRef = r["daemonset"][name]["spec"]["template"]["spec"]["containers"][0][ - "envFrom" - ][0]["configMapRef"] - assert configMapRef == {"name": "configmap-name"} + assert r["daemonset"][name]["spec"]["template"]["spec"]["containers"][0]["envFrom"][ + 0 + ]["configMapRef"] == {"name": "configmap-name"} + assert r["deployment"][name + "-metrics"]["spec"]["template"]["spec"]["containers"][ + 0 + ]["envFrom"][0]["configMapRef"] == {"name": "configmap-name"} + + +def test_overriding_resources(): + config = """ +daemonset: + resources: + limits: + cpu: "25m" + memory: "128Mi" + requests: + cpu: "25m" + memory: "128Mi" +""" + r = helm_template(config) + assert r["daemonset"][name]["spec"]["template"]["spec"]["containers"][0][ + "resources" + ] == { + "requests": {"cpu": "25m", "memory": "128Mi"}, + "limits": {"cpu": "25m", "memory": "128Mi"}, + } + assert r["deployment"][name + "-metrics"]["spec"]["template"]["spec"]["containers"][ + 0 + ]["resources"] == { + "requests": {"cpu": "100m", "memory": "100Mi"}, + "limits": {"cpu": "1000m", "memory": "200Mi"}, + } + + config = """ +deployment: + resources: + limits: + cpu: "25m" + memory: "128Mi" + requests: + cpu: "25m" + memory: "128Mi" +""" + r = helm_template(config) + assert r["daemonset"][name]["spec"]["template"]["spec"]["containers"][0][ + "resources" + ] == { + "requests": {"cpu": "100m", "memory": "100Mi"}, + "limits": {"cpu": "1000m", "memory": "200Mi"}, + } + assert r["deployment"][name + "-metrics"]["spec"]["template"]["spec"]["containers"][ + 0 + ]["resources"] == { + "requests": {"cpu": "25m", "memory": "128Mi"}, + "limits": {"cpu": "25m", "memory": "128Mi"}, + } + + +def test_adding_deprecated_resources(): + config = """ +resources: + limits: + cpu: "25m" + memory: "128Mi" + requests: + cpu: "25m" + memory: "128Mi" +""" + r = helm_template(config) + assert r["daemonset"][name]["spec"]["template"]["spec"]["containers"][0][ + "resources" + ] == { + "requests": {"cpu": "25m", "memory": "128Mi"}, + "limits": {"cpu": "25m", "memory": "128Mi"}, + } + assert r["deployment"][name + "-metrics"]["spec"]["template"]["spec"]["containers"][ + 0 + ]["resources"] == { + "requests": {"cpu": "25m", "memory": "128Mi"}, + "limits": {"cpu": "25m", "memory": "128Mi"}, + } def test_setting_fullnameOverride(): diff --git a/metricbeat/values.yaml b/metricbeat/values.yaml index 20c98ce29..cb96e14e1 100755 --- a/metricbeat/values.yaml +++ b/metricbeat/values.yaml @@ -1,72 +1,147 @@ --- -# Allows you to add any config files in /usr/share/metricbeat -# such as metricbeat.yml -metricbeatConfig: - metricbeat.yml: | - metricbeat.modules: - - module: kubernetes - metricsets: - - container - - node - - pod - - system - - volume - period: 10s - host: "${NODE_NAME}" - hosts: ["https://${NODE_NAME}:10250"] - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - ssl.verification_mode: "none" - # If using Red Hat OpenShift remove ssl.verification_mode entry and - # uncomment these settings: - #ssl.certificate_authorities: - #- /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt - processors: - - add_kubernetes_metadata: ~ - - module: kubernetes - enabled: true - metricsets: - - event - - module: system - period: 10s - metricsets: - - cpu - - load - - memory - - network - - process - - process_summary - processes: ['.*'] - process.include_top_n: - by_cpu: 5 - by_memory: 5 - - module: system - period: 1m - metricsets: - - filesystem - - fsstat - processors: - - drop_event.when.regexp: - system.filesystem.mount_point: '^/(sys|cgroup|proc|dev|etc|host|lib)($|/)' - output.elasticsearch: - hosts: '${ELASTICSEARCH_HOSTS:elasticsearch-master:9200}' - - kube-state-metrics-metricbeat.yml: | - metricbeat.modules: - - module: kubernetes - enabled: true - metricsets: - - state_node - - state_deployment - - state_replicaset - - state_pod - - state_container - period: 10s - hosts: ["${KUBE_STATE_METRICS_HOSTS}"] - output.elasticsearch: - hosts: '${ELASTICSEARCH_HOSTS:elasticsearch-master:9200}' -# Replicas being used for the kube-state-metrics metricbeat deployment +daemonset: + affinity: {} + # Extra environment variables for Metricbeat container. + envFrom: [] + # - configMapRef: + # name: config-secret + extraEnvs: [] + # - name: MY_ENVIRONMENT_VAR + # value: the_value_goes_here + extraVolumes: [] + # - name: extras + # emptyDir: {} + extraVolumeMounts: [] + # - name: extras + # mountPath: /usr/share/extras + # readOnly: true + # Allows you to add any config files in /usr/share/metricbeat + # such as metricbeat.yml for daemonset + metricbeatConfig: + metricbeat.yml: | + metricbeat.modules: + - module: kubernetes + metricsets: + - container + - node + - pod + - system + - volume + period: 10s + host: "${NODE_NAME}" + hosts: ["https://${NODE_NAME}:10250"] + bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token + ssl.verification_mode: "none" + # If using Red Hat OpenShift remove ssl.verification_mode entry and + # uncomment these settings: + #ssl.certificate_authorities: + #- /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt + processors: + - add_kubernetes_metadata: ~ + - module: kubernetes + enabled: true + metricsets: + - event + - module: system + period: 10s + metricsets: + - cpu + - load + - memory + - network + - process + - process_summary + processes: ['.*'] + process.include_top_n: + by_cpu: 5 + by_memory: 5 + - module: system + period: 1m + metricsets: + - filesystem + - fsstat + processors: + - drop_event.when.regexp: + system.filesystem.mount_point: '^/(sys|cgroup|proc|dev|etc|host|lib)($|/)' + output.elasticsearch: + hosts: '${ELASTICSEARCH_HOSTS:elasticsearch-master:9200}' + nodeSelector: {} + # A list of secrets and their paths to mount inside the pod + # This is useful for mounting certificates for security other sensitive values + secretMounts: [] + # - name: metricbeat-certificates + # secretName: metricbeat-certificates + # path: /usr/share/metricbeat/certs + # Various pod security context settings. Bear in mind that many of these have an impact on metricbeat functioning properly. + # - Filesystem group for the metricbeat user. The official elastic docker images always have an id of 1000. + # - User that the container will execute as. Typically necessary to run as root (0) in order to properly collect host container logs. + # - Whether to execute the metricbeat containers as privileged containers. Typically not necessarily unless running within environments such as OpenShift. + securityContext: + runAsUser: 0 + privileged: false + resources: + requests: + cpu: "100m" + memory: "100Mi" + limits: + cpu: "1000m" + memory: "200Mi" + tolerations: [] + +deployment: + affinity: {} + # Extra environment variables for Metricbeat container. + envFrom: [] + # - configMapRef: + # name: config-secret + extraEnvs: [] + # - name: MY_ENVIRONMENT_VAR + # value: the_value_goes_here + # Allows you to add any config files in /usr/share/metricbeat + extraVolumes: [] + # - name: extras + # emptyDir: {} + extraVolumeMounts: [] + # - name: extras + # mountPath: /usr/share/extras + # readOnly: true + # such as metricbeat.yml for deployment + metricbeatConfig: + metricbeat.yml: | + metricbeat.modules: + - module: kubernetes + enabled: true + metricsets: + - state_node + - state_deployment + - state_replicaset + - state_pod + - state_container + period: 10s + hosts: ["${KUBE_STATE_METRICS_HOSTS}"] + output.elasticsearch: + hosts: '${ELASTICSEARCH_HOSTS:elasticsearch-master:9200}' + nodeSelector: {} + # A list of secrets and their paths to mount inside the pod + # This is useful for mounting certificates for security other sensitive values + secretMounts: [] + # - name: metricbeat-certificates + # secretName: metricbeat-certificates + # path: /usr/share/metricbeat/certs + securityContext: + runAsUser: 0 + privileged: false + resources: + requests: + cpu: "100m" + memory: "100Mi" + limits: + cpu: "1000m" + memory: "200Mi" + tolerations: [] +# Replicas being used for the kube-state-metrics metricbeat deployment replicas: 1 extraContainers: "" @@ -79,26 +154,6 @@ extraInitContainers: "" # image: busybox # command: ['echo', 'hey'] -# Extra environment variables to append to the DaemonSet pod spec. -# 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 - -extraVolumeMounts: [] - # - name: extras - # mountPath: /usr/share/extras - # readOnly: true - -extraVolumes: [] - # - name: extras - # emptyDir: {} - -envFrom: [] - # - configMapRef: - # name: config-secret - # Root directory where metricbeat will write data to in order to persist registry data across pod restarts (file position and other metadata). hostPathRoot: /var/lib @@ -165,42 +220,12 @@ clusterRoleRules: podAnnotations: {} # iam.amazonaws.com/role: es-cluster -# Various pod security context settings. Bear in mind that many of these have an impact on metricbeat functioning properly. -# -# - Filesystem group for the metricbeat user. The official elastic docker images always have an id of 1000. -# - User that the container will execute as. Typically necessary to run as root (0) in order to properly collect host container logs. -# - Whether to execute the metricbeat containers as privileged containers. Typically not necessarily unless running within environments such as OpenShift. -podSecurityContext: - runAsUser: 0 - privileged: false - -resources: - requests: - cpu: "100m" - memory: "100Mi" - limits: - cpu: "1000m" - memory: "200Mi" - # Custom service account override that the pod will use serviceAccount: "" -# A list of secrets and their paths to mount inside the pod -# This is useful for mounting certificates for security other sensitive values -secretMounts: [] -# - name: metricbeat-certificates -# secretName: metricbeat-certificates -# path: /usr/share/metricbeat/certs - # How long to wait for metricbeat pods to stop gracefully terminationGracePeriod: 30 -tolerations: [] - -nodeSelector: {} - -affinity: {} - # This is the PriorityClass settings as defined in # https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass priorityClassName: "" @@ -211,3 +236,18 @@ updateStrategy: RollingUpdate # Only edit these if you know what you're doing nameOverride: "" fullnameOverride: "" + +# DEPRECATED +affinity: {} +envFrom: [] +extraEnvs: [] +extraVolumes: [] +extraVolumeMounts: [] +# Allows you to add any config files in /usr/share/metricbeat +# such as metricbeat.yml for both daemonset and deployment +metricbeatConfig: {} +nodeSelector: {} +podSecurityContext: {} +resources: {} +secretMounts: [] +tolerations: [] From f59b2c86a751d3b511c379f2509e70317b627456 Mon Sep 17 00:00:00 2001 From: Julien Mailleret Date: Fri, 17 Apr 2020 19:10:45 +0200 Subject: [PATCH 13/44] Merge pull request #585 from jmlrt/metricbeat-hostnetwork [metricbeat] add host networking option --- metricbeat/README.md | 1 + metricbeat/templates/daemonset.yaml | 4 ++++ metricbeat/tests/metricbeat_test.py | 33 +++++++++++++++++++++++++++++ metricbeat/values.yaml | 1 + 4 files changed, 39 insertions(+) diff --git a/metricbeat/README.md b/metricbeat/README.md index 8f42d280d..ecfae28a7 100644 --- a/metricbeat/README.md +++ b/metricbeat/README.md @@ -64,6 +64,7 @@ This chart is tested with the latest 7.7.0-SNAPSHOT versions. | `daemonset.extraEnvs` | Extra [environment variables][] which will be appended to Metricbeat container for `DaemonSet`. | `[]` | | `daemonset.extraVolumes` | Templatable string of additional volumes to be passed to the `tpl` function or `DaemonSet`. | `[]` | | `daemonset.extraVolumeMounts` | Templatable string of additional volumeMounts to be passed to the `tpl` function or `DaemonSet`. | `[]` | +| `daemonset.hostNetworking` | Enable Metricbeat `DaemonSet` to use host network | `false` | | `daemonset.metricbeatConfig` | Allows you to add any config files in `/usr/share/metricbeat` such as `metricbeat.yml` for Metricbeat `DaemonSet`. | see [values.yaml][] | | `daemonset.nodeSelector` | Configurable [nodeSelector][] for Metricbeat `DaemonSet`. | `{}` | | `daemonset.secretMounts` | Allows you easily mount a secret as a file inside the `DaemonSet`. Useful for mounting certificates and other secrets. See [values.yaml][] for an example | `[]` | diff --git a/metricbeat/templates/daemonset.yaml b/metricbeat/templates/daemonset.yaml index ea1e888bf..cbaca7558 100644 --- a/metricbeat/templates/daemonset.yaml +++ b/metricbeat/templates/daemonset.yaml @@ -41,6 +41,10 @@ spec: affinity: {{ toYaml ( .Values.affinity | default .Values.daemonset.affinity ) | nindent 8 }} nodeSelector: {{ toYaml ( .Values.nodeSelector | default .Values.daemonset.nodeSelector ) | nindent 8 }} tolerations: {{ toYaml ( .Values.tolerations | default .Values.daemonset.tolerations ) | nindent 8 }} + {{- if .Values.daemonset.hostNetworking }} + hostNetwork: true + dnsPolicy: ClusterFirstWithHostNet + {{- end }} {{- if .Values.priorityClassName }} priorityClassName: {{ .Values.priorityClassName }} {{- end }} diff --git a/metricbeat/tests/metricbeat_test.py b/metricbeat/tests/metricbeat_test.py index 91c1bfeed..83265498d 100644 --- a/metricbeat/tests/metricbeat_test.py +++ b/metricbeat/tests/metricbeat_test.py @@ -28,6 +28,18 @@ def test_defaults(): assert "metricbeat test output" in c["readinessProbe"]["exec"]["command"][-1] assert r["daemonset"][name]["spec"]["template"]["spec"]["tolerations"] == [] + + assert "hostNetwork" not in r["daemonset"][name]["spec"]["template"]["spec"] + assert "dnsPolicy" not in r["daemonset"][name]["spec"]["template"]["spec"] + assert ( + "hostNetwork" + not in r["deployment"][name + "-metrics"]["spec"]["template"]["spec"] + ) + assert ( + "dnsPolicy" + not in r["deployment"][name + "-metrics"]["spec"]["template"]["spec"] + ) + assert ( r["deployment"][name + "-metrics"]["spec"]["template"]["spec"]["tolerations"] == [] @@ -249,6 +261,27 @@ def test_adding_image_pull_secrets(): ) +def test_adding_host_networking(): + config = """ +daemonset: + hostNetworking: true +""" + r = helm_template(config) + assert r["daemonset"][name]["spec"]["template"]["spec"]["hostNetwork"] is True + assert ( + r["daemonset"][name]["spec"]["template"]["spec"]["dnsPolicy"] + == "ClusterFirstWithHostNet" + ) + assert ( + "hostNetwork" + not in r["deployment"][name + "-metrics"]["spec"]["template"]["spec"] + ) + assert ( + "dnsPolicy" + not in r["deployment"][name + "-metrics"]["spec"]["template"]["spec"] + ) + + def test_adding_tolerations(): config = """ daemonset: diff --git a/metricbeat/values.yaml b/metricbeat/values.yaml index cb96e14e1..7ef153adb 100755 --- a/metricbeat/values.yaml +++ b/metricbeat/values.yaml @@ -16,6 +16,7 @@ daemonset: # - name: extras # mountPath: /usr/share/extras # readOnly: true + hostNetworking: false # Allows you to add any config files in /usr/share/metricbeat # such as metricbeat.yml for daemonset metricbeatConfig: From fd72d67f72a798a3354d8f4dd0aae6354b17d7ff Mon Sep 17 00:00:00 2001 From: Julien Mailleret Date: Mon, 20 Apr 2020 16:41:26 +0200 Subject: [PATCH 14/44] Merge pull request #590 from marcostvz/patch-1 [elasticsearch] Adds imagePullSecrets for test Pod --- elasticsearch/templates/test/test-elasticsearch-health.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/elasticsearch/templates/test/test-elasticsearch-health.yaml b/elasticsearch/templates/test/test-elasticsearch-health.yaml index 8570eb1d9..9d3d0a98e 100644 --- a/elasticsearch/templates/test/test-elasticsearch-health.yaml +++ b/elasticsearch/templates/test/test-elasticsearch-health.yaml @@ -15,4 +15,8 @@ spec: - | #!/usr/bin/env bash -e curl -XGET --fail '{{ template "elasticsearch.uname" . }}:{{ .Values.httpPort }}/_cluster/health?{{ .Values.clusterHealthCheckParams }}' + {{- if .Values.imagePullSecrets }} + imagePullSecrets: +{{ toYaml .Values.imagePullSecrets | indent 4 }} + {{- end }} restartPolicy: Never From 65eebf934f70ad40a4a3837b9093bc4f34876f09 Mon Sep 17 00:00:00 2001 From: Julien Mailleret Date: Mon, 20 Apr 2020 17:39:09 +0200 Subject: [PATCH 15/44] Merge pull request #584 from michelesr/master [elasticsearch] Set securityContext for test pod --- elasticsearch/templates/test/test-elasticsearch-health.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/elasticsearch/templates/test/test-elasticsearch-health.yaml b/elasticsearch/templates/test/test-elasticsearch-health.yaml index 9d3d0a98e..0aac728a8 100644 --- a/elasticsearch/templates/test/test-elasticsearch-health.yaml +++ b/elasticsearch/templates/test/test-elasticsearch-health.yaml @@ -6,6 +6,8 @@ metadata: annotations: "helm.sh/hook": test-success spec: + securityContext: +{{ toYaml .Values.podSecurityContext | indent 4 }} containers: - name: "{{ .Release.Name }}-{{ randAlpha 5 | lower }}-test" image: "{{ .Values.image }}:{{ .Values.imageTag }}" From bcaaaad20099b3ac687df8af18c733b2f8f8056b Mon Sep 17 00:00:00 2001 From: Julien Mailleret Date: Tue, 21 Apr 2020 13:29:42 +0200 Subject: [PATCH 16/44] Merge pull request #522 from domgoodwin/helm-default-patch Update defaults for extra values to support lists --- elasticsearch/README.md | 8 ++-- elasticsearch/templates/statefulset.yaml | 28 +++++++++++ elasticsearch/tests/elasticsearch_test.py | 57 +++++++++++++++++++++++ elasticsearch/values.yaml | 8 ++-- 4 files changed, 93 insertions(+), 8 deletions(-) diff --git a/elasticsearch/README.md b/elasticsearch/README.md index 261c15d17..cd9f602d7 100644 --- a/elasticsearch/README.md +++ b/elasticsearch/README.md @@ -92,10 +92,10 @@ This chart is tested with the latest 7.7.0-SNAPSHOT versions. | `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](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/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 | `""` | -| `extraContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | -| `extraInitContainers` | Templatable string of additional init containers to be passed to the `tpl` function | `""` | +| `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 | `[]` | +| `extraContainers` | Templatable string of additional containers 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](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/values.yaml) for an example | `[]` | | `image` | The Elasticsearch docker image | `docker.elastic.co/elasticsearch/elasticsearch` | | `imageTag` | The Elasticsearch docker image tag | `7.7.0-SNAPSHOT` | diff --git a/elasticsearch/templates/statefulset.yaml b/elasticsearch/templates/statefulset.yaml index 31a6cec02..0f6524c5d 100644 --- a/elasticsearch/templates/statefulset.yaml +++ b/elasticsearch/templates/statefulset.yaml @@ -128,7 +128,14 @@ spec: {{- end }} {{ end }} {{- if .Values.extraVolumes }} + # Currently some extra blocks accept strings + # to continue with backwards compatibility this is being kept + # whilst also allowing for yaml to be specified too. + {{- if eq "string" (printf "%T" .Values.extraVolumes) }} {{ tpl .Values.extraVolumes . | indent 8 }} + {{- else }} +{{ toYaml .Values.extraVolumes | indent 8 }} + {{- end }} {{- end }} {{- if .Values.imagePullSecrets }} imagePullSecrets: @@ -183,7 +190,14 @@ spec: {{- end }} {{ end }} {{- if .Values.extraInitContainers }} + # Currently some extra blocks accept strings + # to continue with backwards compatibility this is being kept + # whilst also allowing for yaml to be specified too. + {{- if eq "string" (printf "%T" .Values.extraInitContainers) }} {{ tpl .Values.extraInitContainers . | indent 6 }} + {{- else }} +{{ toYaml .Values.extraInitContainers | indent 6 }} + {{- end }} {{- end }} containers: - name: "{{ template "elasticsearch.name" . }}" @@ -290,7 +304,14 @@ spec: subPath: {{ $path }} {{- end -}} {{- if .Values.extraVolumeMounts }} + # Currently some extra blocks accept strings + # to continue with backwards compatibility this is being kept + # whilst also allowing for yaml to be specified too. + {{- if eq "string" (printf "%T" .Values.extraVolumeMounts) }} {{ tpl .Values.extraVolumeMounts . | indent 10 }} + {{- else }} +{{ toYaml .Values.extraVolumeMounts | indent 10 }} + {{- end }} {{- end }} {{- if .Values.masterTerminationFix }} {{- if eq .Values.roles.master "true" }} @@ -351,5 +372,12 @@ spec: {{ toYaml .Values.lifecycle | indent 10 }} {{- end }} {{- if .Values.extraContainers }} + # Currently some extra blocks accept strings + # to continue with backwards compatibility this is being kept + # whilst also allowing for yaml to be specified too. + {{- if eq "string" (printf "%T" .Values.extraContainers) }} {{ tpl .Values.extraContainers . | indent 6 }} + {{- else }} +{{ toYaml .Values.extraContainers | indent 6 }} + {{- end }} {{- end }} diff --git a/elasticsearch/tests/elasticsearch_test.py b/elasticsearch/tests/elasticsearch_test.py index 16d05c79f..02ad5da00 100755 --- a/elasticsearch/tests/elasticsearch_test.py +++ b/elasticsearch/tests/elasticsearch_test.py @@ -307,6 +307,29 @@ def test_adding_a_extra_volume_with_volume_mount(): } in extraVolumeMounts +def test_adding_a_extra_volume_with_volume_mount_as_yaml(): + 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_container(): config = """ extraContainers: | @@ -323,6 +346,22 @@ def test_adding_a_extra_container(): } in extraContainer +def test_adding_a_extra_container_as_yaml(): + config = """ +extraContainers: + - name: do-something + image: busybox + command: ['do', 'something'] +""" + r = helm_template(config) + extraContainer = r["statefulset"][uname]["spec"]["template"]["spec"]["containers"] + assert { + "name": "do-something", + "image": "busybox", + "command": ["do", "something"], + } in extraContainer + + def test_adding_a_extra_init_container(): config = """ extraInitContainers: | @@ -341,6 +380,24 @@ def test_adding_a_extra_init_container(): } in extraInitContainer +def test_adding_a_extra_init_container_as_yaml(): + 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: diff --git a/elasticsearch/values.yaml b/elasticsearch/values.yaml index f8e633188..f04faf1be 100755 --- a/elasticsearch/values.yaml +++ b/elasticsearch/values.yaml @@ -112,21 +112,21 @@ persistence: enabled: true annotations: {} -extraVolumes: "" +extraVolumes: [] # - name: extras # emptyDir: {} -extraVolumeMounts: "" +extraVolumeMounts: [] # - name: extras # mountPath: /usr/share/extras # readOnly: true -extraContainers: "" +extraContainers: [] # - name: do-something # image: busybox # command: ['do', 'something'] -extraInitContainers: "" +extraInitContainers: [] # - name: do-something # image: busybox # command: ['do', 'something'] From ac520df183804633074092bd8f868d79380df283 Mon Sep 17 00:00:00 2001 From: Julien Mailleret Date: Tue, 21 Apr 2020 13:51:31 +0200 Subject: [PATCH 17/44] Merge pull request #586 from jmlrt/readiness-to-503 [elasticsearch] update readiness probe endpoint --- elasticsearch/templates/statefulset.yaml | 49 ++++++++++++++--------- elasticsearch/tests/elasticsearch_test.py | 1 - 2 files changed, 30 insertions(+), 20 deletions(-) diff --git a/elasticsearch/templates/statefulset.yaml b/elasticsearch/templates/statefulset.yaml index 0f6524c5d..5f9b0901a 100644 --- a/elasticsearch/templates/statefulset.yaml +++ b/elasticsearch/templates/statefulset.yaml @@ -216,28 +216,39 @@ spec: # 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 [ -n "${ELASTIC_USERNAME}" ] && [ -n "${ELASTIC_PASSWORD}" ]; then + BASIC_AUTH="-u ${ELASTIC_USERNAME}:${ELASTIC_PASSWORD}" + else + BASIC_AUTH='' + fi if [ -f "${START_FILE}" ]; then - echo 'Elasticsearch is already running, lets check the node is healthy and there are master nodes available' - http "/_cluster/health?timeout=0s" + echo 'Elasticsearch is already running, lets check the node is healthy' + HTTP_CODE=$(curl -XGET -s -k ${BASIC_AUTH} -o /dev/null -w '%{http_code}' {{ .Values.protocol }}://127.0.0.1:{{ .Values.httpPort }}/) + RC=$? + if [[ ${RC} -ne 0 ]]; then + echo "curl -XGET -s -k \${BASIC_AUTH} -o /dev/null -w '%{http_code}' {{ .Values.protocol }}://127.0.0.1:{{ .Values.httpPort }}/ failed with RC ${RC}" + exit ${RC} + fi + # ready if HTTP code 200, 503 is tolerable if ES version is 6.x + if [[ ${HTTP_CODE} == "200" ]]; then + exit 0 + elif [[ ${HTTP_CODE} == "503" && "{{ include "elasticsearch.esMajorVersion" . }}" == "6" ]]; then + exit 0 + else + echo "curl -XGET -s -k \${BASIC_AUTH} -o /dev/null -w '%{http_code}' {{ .Values.protocol }}://127.0.0.1:{{ .Values.httpPort }}/ failed with HTTP code ${HTTP_CODE}" + exit 1 + fi + else - echo 'Waiting for elasticsearch cluster to become 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 + echo 'Waiting for elasticsearch cluster to become ready (request params: "{{ .Values.clusterHealthCheckParams }}" )' + if curl -XGET -s -k --fail ${BASIC_AUTH} {{ .Values.protocol }}://127.0.0.1:{{ .Values.httpPort }}/_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 {{ toYaml .Values.readinessProbe | indent 10 }} ports: diff --git a/elasticsearch/tests/elasticsearch_test.py b/elasticsearch/tests/elasticsearch_test.py index 02ad5da00..164c6e9ba 100755 --- a/elasticsearch/tests/elasticsearch_test.py +++ b/elasticsearch/tests/elasticsearch_test.py @@ -73,7 +73,6 @@ def test_defaults(): assert "curl" in c["readinessProbe"]["exec"]["command"][-1] assert "http://127.0.0.1:9200" in c["readinessProbe"]["exec"]["command"][-1] - assert "/_cluster/health?timeout=0s" in c["readinessProbe"]["exec"]["command"][-1] # Resources assert c["resources"] == { From e2d4b9c56fcbacc72a46cb1ceae61ca46e807101 Mon Sep 17 00:00:00 2001 From: Julien Mailleret Date: Thu, 23 Apr 2020 07:43:30 +0200 Subject: [PATCH 18/44] Merge pull request #569 from cartonalexandre/master Added support for envFrom in apm-server, logstash, kibana and elasticsearch --- apm-server/README.md | 1 + apm-server/templates/deployment.yaml | 4 ++ apm-server/tests/apmserver_test.py | 13 +++++ apm-server/values.yaml | 7 +++ elasticsearch/README.md | 1 + elasticsearch/templates/statefulset.yaml | 9 +++ elasticsearch/tests/elasticsearch_test.py | 13 +++++ elasticsearch/values.yaml | 7 +++ kibana/README.md | 67 ++++++++++++----------- kibana/templates/deployment.yaml | 4 ++ kibana/tests/kibana_test.py | 13 +++++ kibana/values.yaml | 7 +++ logstash/README.md | 1 + logstash/templates/statefulset.yaml | 4 ++ logstash/tests/logstash_test.py | 13 +++++ logstash/values.yaml | 7 +++ 16 files changed, 138 insertions(+), 33 deletions(-) diff --git a/apm-server/README.md b/apm-server/README.md index 6eee66677..7c766a063 100644 --- a/apm-server/README.md +++ b/apm-server/README.md @@ -61,6 +61,7 @@ This chart is tested with the latest 7.7.0-SNAPSHOT versions. | `extraContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | | `extraInitContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | | `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 | `[]` | +| `envFrom` | Templatable string of envFrom to be passed to the [environment from variables](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables) which will be appended to the `envFrom:` definition for the container | `[]` | | `extraVolumeMounts` | List of additional volumeMounts | `[]` | | `extraVolumes` | List of additional volumes | `[]` | | `image` | The APM Server docker image | `docker.elastic.co/apm/apm-server` | diff --git a/apm-server/templates/deployment.yaml b/apm-server/templates/deployment.yaml index fa740b32c..87a1bc085 100644 --- a/apm-server/templates/deployment.yaml +++ b/apm-server/templates/deployment.yaml @@ -79,6 +79,10 @@ spec: env: {{ toYaml . | nindent 10 }} {{- end }} + {{- if .Values.envFrom }} + envFrom: +{{ toYaml .Values.envFrom | indent 10 }} + {{- end }} {{- if .Values.podSecurityContext }} securityContext: {{ toYaml .Values.podSecurityContext | indent 10 }} diff --git a/apm-server/tests/apmserver_test.py b/apm-server/tests/apmserver_test.py index 2ed716433..cb89d880e 100644 --- a/apm-server/tests/apmserver_test.py +++ b/apm-server/tests/apmserver_test.py @@ -72,6 +72,19 @@ def test_adding_envs(): assert {"name": "LOG_LEVEL", "value": "DEBUG"} in envs +def test_adding_env_from(): + config = """ +envFrom: +- secretRef: + name: secret-name +""" + r = helm_template(config) + secretRef = r["deployment"][name]["spec"]["template"]["spec"]["containers"][0][ + "envFrom" + ][0]["secretRef"] + assert secretRef == {"name": "secret-name"} + + def test_adding_image_pull_secrets(): config = """ imagePullSecrets: diff --git a/apm-server/values.yaml b/apm-server/values.yaml index 497a9e6bf..f96ac03f7 100755 --- a/apm-server/values.yaml +++ b/apm-server/values.yaml @@ -45,6 +45,13 @@ extraEnvs: [] # name: elastic-credentials # key: password +# Allows you to load environment variables from kubernetes secret or config map +envFrom: [] +# - secretRef: +# name: env-secret +# - configMapRef: +# name: config-map + extraVolumeMounts: [] # - name: extras # mountPath: /usr/share/extras diff --git a/elasticsearch/README.md b/elasticsearch/README.md index cd9f602d7..995593f14 100644 --- a/elasticsearch/README.md +++ b/elasticsearch/README.md @@ -92,6 +92,7 @@ This chart is tested with the latest 7.7.0-SNAPSHOT versions. | `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](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/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 | `[]` | +| `envFrom` | Templatable string of envFrom to be passed to the [environment from variables](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables) which will be appended to the `envFrom:` 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 | `[]` | | `extraContainers` | Templatable string of additional containers to be passed to the `tpl` function | `[]` | diff --git a/elasticsearch/templates/statefulset.yaml b/elasticsearch/templates/statefulset.yaml index 5f9b0901a..5297aac25 100644 --- a/elasticsearch/templates/statefulset.yaml +++ b/elasticsearch/templates/statefulset.yaml @@ -180,6 +180,7 @@ spec: cp -a /usr/share/elasticsearch/config/elasticsearch.keystore /tmp/keystore/ env: {{ toYaml .Values.extraEnvs | nindent 10 }} + envFrom: {{ toYaml .Values.envFrom | nindent 10 }} resources: {{ toYaml .Values.initResources | nindent 10 }} volumeMounts: - name: keystore @@ -291,6 +292,10 @@ spec: {{- end }} {{- if .Values.extraEnvs }} {{ toYaml .Values.extraEnvs | indent 10 }} +{{- end }} +{{- if .Values.envFrom }} + envFrom: +{{ toYaml .Values.envFrom | indent 10 }} {{- end }} volumeMounts: {{- if .Values.persistence.enabled }} @@ -376,6 +381,10 @@ spec: {{- if .Values.extraEnvs }} {{ toYaml .Values.extraEnvs | indent 10 }} {{- end }} + {{- if .Values.envFrom }} + envFrom: +{{ toYaml .Values.envFrom | indent 10 }} + {{- end }} {{- end }} {{- end }} {{- if .Values.lifecycle }} diff --git a/elasticsearch/tests/elasticsearch_test.py b/elasticsearch/tests/elasticsearch_test.py index 164c6e9ba..82e5d279b 100755 --- a/elasticsearch/tests/elasticsearch_test.py +++ b/elasticsearch/tests/elasticsearch_test.py @@ -283,6 +283,19 @@ def test_adding_extra_env_vars(): assert {"name": "hello", "value": "world"} in env +def test_adding_env_from(): + config = """ +envFrom: +- secretRef: + name: secret-name +""" + r = helm_template(config) + secretRef = r["statefulset"][uname]["spec"]["template"]["spec"]["containers"][0][ + "envFrom" + ][0]["secretRef"] + assert secretRef == {"name": "secret-name"} + + def test_adding_a_extra_volume_with_volume_mount(): config = """ extraVolumes: | diff --git a/elasticsearch/values.yaml b/elasticsearch/values.yaml index f04faf1be..40acd6fd4 100755 --- a/elasticsearch/values.yaml +++ b/elasticsearch/values.yaml @@ -34,6 +34,13 @@ extraEnvs: [] # - name: MY_ENVIRONMENT_VAR # value: the_value_goes_here +# Allows you to load environment variables from kubernetes secret or config map +envFrom: [] +# - secretRef: +# name: env-secret +# - configMapRef: +# name: config-map + # 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 diff --git a/kibana/README.md b/kibana/README.md index de93c09e4..fc2000255 100644 --- a/kibana/README.md +++ b/kibana/README.md @@ -44,39 +44,40 @@ This chart is tested with the latest 7.7.0-SNAPSHOT versions. ## Configuration -| Parameter | Description | Default | -| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | -| `elasticsearchHosts` | The URLs used to connect to Elasticsearch. | `http://elasticsearch-master:9200` | -| `elasticsearchURL` | The URL used to connect to Elasticsearch. Deprecated, needs to be used for Kibana versions < 6.6 | | -| `replicas` | Kubernetes replica count for the deployment (i.e. how many pods) | `1` | -| `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 | `name: NODE_OPTIONS`
`value: "--max-old-space-size=1800"` | -| `secretMounts` | Allows you easily mount a secret as a file inside the deployment. Useful for mounting certificates and other secrets. See [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/kibana/values.yaml) for an example | `[]` | -| `image` | The Kibana docker image | `docker.elastic.co/kibana/kibana` | -| `imageTag` | The Kibana docker image tag | `7.7.0-SNAPSHOT` | -| `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 Kibana pods | `{}` | -| `resources` | Allows you to set the [resources](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/) for the statefulset | `requests.cpu: 1000m`
`requests.memory: 2Gi`
`limits.cpu: 1000m`
`limits.memory: 2Gi` | -| `protocol` | The protocol that will be used for the readinessProbe. Change this to `https` if you have `server.ssl.enabled: true` set | `http` | -| `serverHost` | The [`server.host`](https://www.elastic.co/guide/en/kibana/current/settings.html) Kibana setting. This is set explicitly so that the default always matches what comes with the docker image. | `0.0.0.0` | -| `healthCheckPath` | The path used for the readinessProbe to check that Kibana is ready. If you are setting `server.basePath` you will also need to update this to `/${basePath}/app/kibana` | `/app/kibana` | -| `kibanaConfig` | Allows you to add any config files in `/usr/share/kibana/config/` such as `kibana.yml`. See [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/kibana/values.yaml) for an example of the formatting. | `{}` | -| `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` | -| `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` | -| `serviceAccount` | Allows you to overwrite the "default" [serviceAccount](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/) for the pod | `[]` | -| `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. | `""` | -| `httpPort` | The http port that Kubernetes will use for the healthchecks and the service. | `5601` | -| `updateStrategy` | Allows you to change the default update [strategy](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#updating-a-deployment) for the deployment. A [standard upgrade](https://www.elastic.co/guide/en/kibana/current/upgrade-standard.html) of Kibana requires a full stop and start which is why the default strategy is set to `Recreate` | `Recreate` | -| `readinessProbe` | Configuration 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` | -| `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 Kibana instances | `{}` | -| `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 Kibana service. See [`values.yaml`](https://github.com/elastic/helm-charts/tree/7.7/kibana/values.yaml) for an example | `enabled: false` | -| `service` | Configurable [service](https://kubernetes.io/docs/concepts/services-networking/service/) to expose the Kibana service. See [`values.yaml`](https://github.com/elastic/helm-charts/tree/7.7/kibana/values.yaml) for an example | `type: ClusterIP`
`port: 5601`
`nodePort:`
`annotations: {}`
`loadBalancerSourceRanges: {}` | -| `labels` | Configurable [label](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) applied to all Kibana pods | `{}` | -| `lifecycle` | Allows you to add lifecycle configuration. See [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/kibana/values.yaml) for an example of the formatting. | `{}` | -| `fullnameOverride` | Overrides the full name of the resources. If not set the name will default to "`.Release.Name`-`.Values.nameOverride or .Chart.Name`" | `""` | -| `extraContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | -| `extraInitContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | +| Parameter | Description | Default | +|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------| +| `elasticsearchHosts` | The URLs used to connect to Elasticsearch. | `http://elasticsearch-master:9200` | +| `elasticsearchURL` | The URL used to connect to Elasticsearch. Deprecated, needs to be used for Kibana versions < 6.6 | | +| `replicas` | Kubernetes replica count for the deployment (i.e. how many pods) | `1` | +| `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 | `name: NODE_OPTIONS`
`value: "--max-old-space-size=1800"` | +| `envFrom` | Templatable string of envFrom to be passed to the [environment from variables](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables) which will be appended to the `envFrom:` definition for the container | `[]` | +| `secretMounts` | Allows you easily mount a secret as a file inside the deployment. Useful for mounting certificates and other secrets. See [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/kibana/values.yaml) for an example | `[]` | +| `image` | The Kibana docker image | `docker.elastic.co/kibana/kibana` | +| `imageTag` | The Kibana docker image tag | `7.7.0-SNAPSHOT` | +| `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 Kibana pods | `{}` | +| `resources` | Allows you to set the [resources](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/) for the statefulset | `requests.cpu: 1000m`
`requests.memory: 2Gi`
`limits.cpu: 1000m`
`limits.memory: 2Gi` | +| `protocol` | The protocol that will be used for the readinessProbe. Change this to `https` if you have `server.ssl.enabled: true` set | `http` | +| `serverHost` | The [`server.host`](https://www.elastic.co/guide/en/kibana/current/settings.html) Kibana setting. This is set explicitly so that the default always matches what comes with the docker image. | `0.0.0.0` | +| `healthCheckPath` | The path used for the readinessProbe to check that Kibana is ready. If you are setting `server.basePath` you will also need to update this to `/${basePath}/app/kibana` | `/app/kibana` | +| `kibanaConfig` | Allows you to add any config files in `/usr/share/kibana/config/` such as `kibana.yml`. See [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/kibana/values.yaml) for an example of the formatting. | `{}` | +| `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` | +| `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` | +| `serviceAccount` | Allows you to overwrite the "default" [serviceAccount](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/) for the pod | `[]` | +| `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. | `""` | +| `httpPort` | The http port that Kubernetes will use for the healthchecks and the service. | `5601` | +| `updateStrategy` | Allows you to change the default update [strategy](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#updating-a-deployment) for the deployment. A [standard upgrade](https://www.elastic.co/guide/en/kibana/current/upgrade-standard.html) of Kibana requires a full stop and start which is why the default strategy is set to `Recreate` | `Recreate` | +| `readinessProbe` | Configuration 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` | +| `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 Kibana instances | `{}` | +| `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 Kibana service. See [`values.yaml`](https://github.com/elastic/helm-charts/tree/7.7/kibana/values.yaml) for an example | `enabled: false` | +| `service` | Configurable [service](https://kubernetes.io/docs/concepts/services-networking/service/) to expose the Kibana service. See [`values.yaml`](https://github.com/elastic/helm-charts/tree/7.7/kibana/values.yaml) for an example | `type: ClusterIP`
`port: 5601`
`nodePort:`
`annotations: {}`
`loadBalancerSourceRanges: {}` | +| `labels` | Configurable [label](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) applied to all Kibana pods | `{}` | +| `lifecycle` | Allows you to add lifecycle configuration. See [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/kibana/values.yaml) for an example of the formatting. | `{}` | +| `fullnameOverride` | Overrides the full name of the resources. If not set the name will default to "`.Release.Name`-`.Values.nameOverride or .Chart.Name`" | `""` | +| `extraContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | +| `extraInitContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | ## Examples diff --git a/kibana/templates/deployment.yaml b/kibana/templates/deployment.yaml index b7a97758e..aca2ee153 100644 --- a/kibana/templates/deployment.yaml +++ b/kibana/templates/deployment.yaml @@ -90,6 +90,10 @@ spec: value: "{{ .Values.serverHost }}" {{- if .Values.extraEnvs }} {{ toYaml .Values.extraEnvs | indent 10 }} +{{- end }} +{{- if .Values.envFrom }} + envFrom: +{{ toYaml .Values.envFrom | indent 10 }} {{- end }} readinessProbe: {{ toYaml .Values.readinessProbe | indent 10 }} diff --git a/kibana/tests/kibana_test.py b/kibana/tests/kibana_test.py index 4b864f2f0..1341c6146 100644 --- a/kibana/tests/kibana_test.py +++ b/kibana/tests/kibana_test.py @@ -89,6 +89,19 @@ def test_overriding_the_port(): assert r["service"][name]["spec"]["ports"][0]["targetPort"] == 5602 +def test_adding_env_from(): + config = """ +envFrom: +- secretRef: + name: secret-name +""" + r = helm_template(config) + secretRef = r["deployment"][name]["spec"]["template"]["spec"]["containers"][0][ + "envFrom" + ][0]["secretRef"] + assert secretRef == {"name": "secret-name"} + + def test_adding_image_pull_secrets(): config = """ imagePullSecrets: diff --git a/kibana/values.yaml b/kibana/values.yaml index 5c30832de..cc8e2cb8b 100755 --- a/kibana/values.yaml +++ b/kibana/values.yaml @@ -14,6 +14,13 @@ extraEnvs: # - name: MY_ENVIRONMENT_VAR # value: the_value_goes_here +# Allows you to load environment variables from kubernetes secret or config map +envFrom: [] +# - secretRef: +# name: env-secret +# - configMapRef: +# name: config-map + # 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 diff --git a/logstash/README.md b/logstash/README.md index 89aedf28d..a4ad5eb61 100644 --- a/logstash/README.md +++ b/logstash/README.md @@ -59,6 +59,7 @@ This chart is tested with the latest 7.7.0-SNAPSHOT versions. | `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 Logstash nodes from running on the same Kubernetes node | `kubernetes.io/hostname` | | `extraContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | | `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 | `[]` | +| `envFrom` | Templatable string of envFrom to be passed to the [environment from variables](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables) which will be appended to the `envFrom:` definition for the container | `[]` | | `extraInitContainers` | Templatable string of additional init containers to be passed to the `tpl` function | `""` | | `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 | `""` | diff --git a/logstash/templates/statefulset.yaml b/logstash/templates/statefulset.yaml index 6c9838d3a..30dbb062f 100644 --- a/logstash/templates/statefulset.yaml +++ b/logstash/templates/statefulset.yaml @@ -160,6 +160,10 @@ spec: value: "{{ .Values.logstashJavaOpts }}" {{- if .Values.extraEnvs }} {{ toYaml .Values.extraEnvs | indent 10 }} +{{- end }} +{{- if .Values.envFrom }} + envFrom: +{{ toYaml .Values.envFrom | indent 10 }} {{- end }} volumeMounts: {{- if .Values.persistence.enabled }} diff --git a/logstash/tests/logstash_test.py b/logstash/tests/logstash_test.py index ed798a496..55d838c1b 100755 --- a/logstash/tests/logstash_test.py +++ b/logstash/tests/logstash_test.py @@ -141,6 +141,19 @@ def test_adding_extra_env_vars(): assert {"name": "hello", "value": "world"} in env +def test_adding_env_from(): + config = """ +envFrom: +- secretRef: + name: secret-name +""" + r = helm_template(config) + secretRef = r["statefulset"][name]["spec"]["template"]["spec"]["containers"][0][ + "envFrom" + ][0]["secretRef"] + assert secretRef == {"name": "secret-name"} + + def test_adding_a_extra_volume_with_volume_mount(): config = """ extraVolumes: | diff --git a/logstash/values.yaml b/logstash/values.yaml index 7537f84d9..322f6be31 100755 --- a/logstash/values.yaml +++ b/logstash/values.yaml @@ -29,6 +29,13 @@ extraEnvs: [] # - name: MY_ENVIRONMENT_VAR # value: the_value_goes_here +# Allows you to load environment variables from kubernetes secret or config map +envFrom: [] +# - secretRef: +# name: env-secret +# - configMapRef: +# name: config-map + # A list of secrets and their paths to mount inside the pod secretMounts: [] From ab26d11dbc28314d75b76e733884e9c16db81932 Mon Sep 17 00:00:00 2001 From: Julien Mailleret Date: Mon, 27 Apr 2020 10:11:15 +0200 Subject: [PATCH 19/44] Merge pull request #591 from jmlrt/logstash-http-host-var [logstash] update doc and values.yaml for http.host issues --- logstash/README.md | 1 + logstash/values.yaml | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/logstash/README.md b/logstash/README.md index a4ad5eb61..5c0a2257b 100644 --- a/logstash/README.md +++ b/logstash/README.md @@ -17,6 +17,7 @@ This helm chart is a lightweight way to configure and run our official [Logstash * It is important to verify that the JVM heap size in `logstashJavaOpts` and to set the CPU/Memory `resources` to something suitable for your cluster * We have designed this chart to be very un-opinionated about how to configure Logstash. 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. * `logstash.yml` configuration files can be set either by a ConfigMap using `logstashConfig` in `values.yml` or by environment variables using `extraEnvs` in `values.yml`, however Logstash Docker image can't mix both methods as defining settings with environment variables causes `logstash.yml` to be modified in place while using ConfigMap bind-mount the same file (more details in this [Note](https://www.elastic.co/guide/en/logstash/6.7/docker-config.html#docker-env-config)). +* When overriding `logstash.yml`, `http.host: 0.0.0.0` should always be included to make default probes work. If restricting HTTP API to 127.0.0.1 is required by using `http.host: 127.0.0.1`, default probes should be disabled or overrided (see [values.yaml](https://github.com/elastic/helm-charts/tree/master/logstash/values.yaml) for the good syntax). ## Installing diff --git a/logstash/values.yaml b/logstash/values.yaml index 322f6be31..ba65eaf13 100755 --- a/logstash/values.yaml +++ b/logstash/values.yaml @@ -3,6 +3,9 @@ replicas: 1 # Allows you to add any config files in /usr/share/logstash/config/ # such as logstash.yml and log4j2.properties +# +# Note that when overriding logstash.yml, `http.host: 0.0.0.0` should always be included +# to make default probes work. logstashConfig: {} # logstash.yml: | # key: @@ -159,6 +162,21 @@ securityContext: # How long to wait for logstash to stop gracefully terminationGracePeriod: 120 +# Probes +# Default probes are using `httpGet` which requires that `http.host: 0.0.0.0` is part of +# `logstash.yml`. If needed probes can be disabled or overrided using the following syntaxes: +# +# disable livenessProbe +# livenessProbe: null +# +# replace httpGet default readinessProbe by some exec probe +# readinessProbe: +# httpGet: null +# exec: +# command: +# - curl +# - localhost:9600 + livenessProbe: httpGet: path: / From 6a66c2ecf53e59a45dc23249379fa5783603a5ea Mon Sep 17 00:00:00 2001 From: Julien Mailleret Date: Tue, 28 Apr 2020 16:19:14 +0200 Subject: [PATCH 20/44] Merge pull request #593 from jmlrt/doc-improvements (#599) Doc improvements - Reformat all `README.md` files - Fix typos and missing syntaxes) - Use Markdown implicit link names - Sort values in configuration tables - Limit lines to 80 characters (except for code blocks and tables) - Add table of content - Fix default values descriptions - Move testing instructions to `CONTRIBUTING.md` doc - Move breaking changes notices to `BREAKING_CHANGES.md` doc --- CONTRIBUTING.md | 257 ++++++++- README.md | 30 +- apm-server/README.md | 225 ++++---- elasticsearch/README.md | 544 +++++++++++------- .../examples/kubernetes-kind/README.md | 11 +- elasticsearch/examples/migration/README.md | 131 ++++- elasticsearch/values.yaml | 8 +- filebeat/README.md | 225 +++++--- kibana/README.md | 237 +++++--- kibana/values.yaml | 5 +- logstash/README.md | 290 ++++++---- metricbeat/README.md | 249 ++++---- metricbeat/examples/default/README.md | 27 + 13 files changed, 1463 insertions(+), 776 deletions(-) create mode 100644 metricbeat/examples/default/README.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8dd908c8f..477c275db 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,21 +1,256 @@ -# Contributing to the Elastic helm charts +# Contributing to the Elastic Helm charts + + + + +- [Adding new features](#adding-new-features) +- [Requirements for submiting a pull request](#requirements-for-submiting-a-pull-request) +- [CLA (Contributor License Agreement)](#cla-contributor-license-agreement) +- [How We Use Git and GitHub](#how-we-use-git-and-github) + - [Forking](#forking) + - [Branching](#branching) + - [Commits and Merging](#commits-and-merging) + - [Rebasing and fixing merge conflicts](#rebasing-and-fixing-merge-conflicts) + - [What Goes Into a Pull Request](#what-goes-into-a-pull-request) +- [Releases](#releases) +- [Testing](#testing) + - [Templating tests](#templating-tests) + - [Integration tests](#integration-tests) + + + + + + +## Adding new features + +If you aren't 100% sure that this is a feature that makes sense for everyone. +Please open an issue first to discuss with the maintainers before investing a +lot of time into it. + + +## Requirements for submiting a pull request + +Before submitting a pull request make sure you validated the following +requirements: + +* CLA should be signed (see [CLA section][] for more details). + +* Charts version shouldn't be bumped (see [Releases section][] for more +details). + +* Charts `README.md` should be updated if required (especially updating default +values if they have been changed). + +* Templating tests should be added/updated (see [Templating tests section][] for +more details). + +* Integration tests should be added/updated (see [Integration tests section][] +for more details). + ## CLA (Contributor License Agreement) -If you haven't already you will need to sign the [CLA](https://www.elastic.co/contributor-agreement) before your pull request can be reviewed and merged. +Please make sure you have signed our [Contributor License Agreement][]. We are +not asking you to assign copyright to us, but to give us the right to distribute +your code without restriction. We ask this of all contributors in order to +assure our users of the origin and continuing existence of the code. +You only need to sign the CLA once. -## Version bumps -Just like with the rest of the stack, all versions in this helm chart repo are bumped and released at the same time. There is no need to bump the version in your pull request. +## How We Use Git and GitHub -## Testing and documentation +### Forking -When making any changes be sure to also update the following: +We follow the [GitHub forking model][] for collaborating on Helm charts code. +This model assumes that you have a remote called `upstream` which points to the +official Kibana repo, which we'll refer to in later code snippets. -* Charts README.md -* The templating tests which can be found in `${CHART}/tests/*.py`. [Example](/elasticsearch/tests/elasticsearch_test.py) -* The integration tests which can be found in `${CHART}/examples/*/test/goss.yaml`. [Example](/elasticsearch/examples/default/test/goss.yaml) +### Branching + +* All work on the next major release (`8.0.0`) goes into master. +* Past major release branches are named `{majorVersion}.x`. They contain work +that will go into the next minor release. For example, if the next minor release +is `7.8.0`, work for it should go into the `7.x` branch. +* Past minor release branches are named `{majorVersion}.{minorVersion}`. They +contain work that will go into the next patch release. For example, if the next +patch release is `7.7.1`, work for it should go into the `7.7` branch. +* All work is done on feature branches and merged into one of these branches. +* Where appropriate, we'll backport changes into older release branches. + +### Commits and Merging + +* Feel free to make as many commits as you want, while working on a branch. +* Please use your commit messages to include helpful information on your +changes and an explanation of *why* you made the changes that you did. +* Resolve merge conflicts by rebasing the target branch over your feature +branch, and force-pushing (see below for instructions). +* When merging, we'll squash your commits into a single commit. + +#### Rebasing and fixing merge conflicts + +Rebasing can be tricky, and fixing merge conflicts can be even trickier because +it involves force pushing. This is all compounded by the fact that attempting to +push a rebased branch remotely will be rejected by git, and you'll be prompted +to do a `pull`, which is not at all what you should do (this will really mess up +your branch's history). + +Here's how you should rebase master onto your branch, and how to fix merge +conflicts when they arise. + +First, make sure master is up-to-date. + +```shell +git checkout master +git fetch upstream +git rebase upstream/master +``` + +Then, check out your branch and rebase master on top of it, which will apply all +of the new commits on master to your branch, and then apply all of your branch's +new commits after that. + +```shell +git checkout name-of-your-branch +git rebase master +``` + +You want to make sure there are no merge conflicts. If there are merge +conflicts, git will pause the rebase and allow you to fix the conflicts before +continuing. + +You can use `git status` to see which files contain conflicts. They'll be the +ones that aren't staged for commit. Open those files, and look for where git has +marked the conflicts. Resolve the conflicts so that the changes you want to make +to the code have been incorporated in a way that doesn't destroy work that's +been done in master. Refer to master's commit history on GitHub if you need to +gain a better understanding of how code is conflicting and how best to resolve +it. + +Once you've resolved all of the merge conflicts, use `git add -A` to stage them +to be committed, and then use `git rebase --continue` to tell git to continue +the rebase. + +When the rebase has completed, you will need to force push your branch because +the history is now completely different than what's on the remote. **This is +potentially dangerous** because it will completely overwrite what you have on +the remote, so you need to be sure that you haven't lost any work when resolving +merge conflicts. (If there weren't any merge conflicts, then you can force push +without having to worry about this.) + +``` +git push origin name-of-your-branch --force +``` + +This will overwrite the remote branch with what you have locally. You're done! + +**Note that you should not run `git pull`**, for example in response to a push +rejection like this: + +``` +! [rejected] name-of-your-branch -> name-of-your-branch (non-fast-forward) +error: failed to push some refs to 'https://github.com/YourGitHubHandle/kibana.git' +hint: Updates were rejected because the tip of your current branch is behind +hint: its remote counterpart. Integrate the remote changes (e.g. +hint: 'git pull ...') before pushing again. +hint: See the 'Note about fast-forwards' in 'git push --help' for details. +``` + +Assuming you've successfully rebased and you're happy with the code, you should +force push instead. + +### What Goes Into a Pull Request + +* Please include an explanation of your changes in your PR description. +* Links to relevant issues, external resources, or related PRs are very +important and useful. +* Please update any tests that pertain to your code, and add new tests where +appropriate. +* See [Submitting a Pull Request](#submitting-a-pull-request) for more info. + + +## Releases + +Just like with the rest of the stack, all versions in this helm chart repo are +bumped and released at the same time. There is no need to bump the version in +your pull request. + +Charts are released from version branchs (example `7.7` branch). + +[Elastic Helm repository][] is updated only during releases. + +The current release process is documented in [release.md][]. + + +## Testing + +### Templating tests + +Templating tests which can be found in `${CHART}/tests/*.py` +([Example][templating test example]). + +These charts use [pytest][] to test the templating logic. The dependencies for +testing can be installed from the [requirements.txt][] in the parent directory: + +``` +pip install -r ./requirements.txt +``` + +Tests can then be run from each chart directory using `make pytest` + +You can also use `make template` (equivalent to `helm template` ) to look at the +YAML being generated: + +It is possible to run all of the tests and linting inside of a Docker container +using `make test` + +Note that templating tests are formated using [Black][], you should run +`make lint-python` (equivalent to `black --diff --check .` ) to validate them or +`black .` to apply formatting before submitting a pull request which will modify +them. + +### Integration tests + +Integration tests which can be found in `${CHART}/examples/*/test/goss.yaml` +([Example][integration test example]). + +Integration tests are run using [goss][] which is a [Serverspec][] like tool +written in golang. See [integration test example][] for an example of what the +tests look like. + +The different integration tests are present in each chart's `examples` +directory. + +Each charts contains an `examples/default` integration test which validate the +chart deployment with default values. + +`examples` directory contains also integration tests for other use cases (for +example: using `oss` Docker images, using `6.x` version or using `security` ). + +Every directory which contains some `test` subdirectory is an integration test +(`examples` directory contains also some configuration examples for some +specific scenarios without tests like configuration for specific k8s providers). + +To run the goss tests against the default example: + +``` +cd examples/default +make goss +``` -## Adding new features -If you aren't 100% sure that this is a feature that makes sense for everyone. Please open an issue first to discuss with the maintainers before investing a lot of time into it. +[black]: https://black.readthedocs.io/en/stable/ +[cla section]: #cla-contributor-license-agreement +[contributor license agreement]: https://www.elastic.co/contributor-agreement +[elastic helm repository]: https://helm.elastic.co +[github forking model]: https://help.github.com/articles/fork-a-repo/ +[goss]: https://github.com/aelsabbahy/goss/blob/master/docs/manual.md +[integration test example]: https://github.com/elastic/helm-charts/blob/7.7/elasticsearch/examples/default/test/goss.yaml +[integration tests section]: #integration-tests +[pytest]: https://docs.pytest.org/en/latest/ +[serverspec]: https://serverspec.org +[templating test example]: https://github.com/elastic/helm-charts/blob/7.7/elasticsearch/tests/elasticsearch_test.py +[templating tests section]: #templating-tests +[release.md]: https://github.com/elastic/helm-charts/blob/master/helpers/release.md +[releases section]: #releases +[requirements.txt]: https://github.com/elastic/helm-charts/blob/7.7/requirements.txt diff --git a/README.md b/README.md index 9ec22bf27..8bab50ce9 100644 --- a/README.md +++ b/README.md @@ -2,26 +2,40 @@ [![Build Status](https://img.shields.io/jenkins/s/https/devops-ci.elastic.co/job/elastic+helm-charts+7.7.svg)](https://devops-ci.elastic.co/job/elastic+helm-charts+7.7/) -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 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. ## Charts -Please look in the chart directories for the documentation for each chart. These helm charts are designed to be a lightweight way to configure our official docker images. Links to the relevant docker image documentation has also been added below. +Please look in the chart directories for the documentation for each chart. These +Helm charts are designed to be a lightweight way to configure our official +Docker images. Links to the relevant Docker image documentation has also been +added below. | Chart | Docker documentation | -| ------------------------------------------ | ------------------------------------------------------------------------------- | +|--------------------------------------------|---------------------------------------------------------------------------------| +| [APM-Server](./apm-server/README.md) | https://www.elastic.co/guide/en/apm/server/current/running-on-docker.html | | [Elasticsearch](./elasticsearch/README.md) | https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html | +| [Filebeat](./filebeat/README.md) | https://www.elastic.co/guide/en/beats/filebeat/current/running-on-docker.html | | [Kibana](./kibana/README.md) | https://www.elastic.co/guide/en/kibana/current/docker.html | | [Logstash](./logstash/README.md) | https://www.elastic.co/guide/en/logstash/current/docker.html | -| [Filebeat](./filebeat/README.md) | https://www.elastic.co/guide/en/beats/filebeat/current/running-on-docker.html | | [Metricbeat](./metricbeat/README.md) | https://www.elastic.co/guide/en/beats/metricbeat/current/running-on-docker.html | -| [APM-Server](./apm-server/README.md) | https://www.elastic.co/guide/en/apm/server/current/running-on-docker.html | ## Kubernetes Versions -The charts are [currently tested](https://devops-ci.elastic.co/job/elastic+helm-charts+7.7/) against all GKE versions available. The exact versions are defined under `KUBERNETES_VERSIONS` in [helpers/matrix.yml](/helpers/matrix.yml) +The charts are [currently tested][] against all GKE versions available. The +exact versions are defined under `KUBERNETES_VERSIONS` in +[helpers/matrix.yml][]. ## Helm versions -While we are checking backward compatibility, the charts are only tested with Helm version mentioned in [helm-tester Dockerfile](helpers/helm-tester/Dockerfile) (currently 2.16.6). -Note that we don't support [Helm 3](https://v3.helm.sh/) version. +While we are checking backward compatibility, the charts are only tested with +Helm version mentioned in [helm-tester Dockerfile][] (currently 2.16.6). +Note that we don't support [Helm 3][] version. + +[currently tested]: https://devops-ci.elastic.co/job/elastic+helm-charts+7.7/ +[helm 3]: https://v3.helm.sh +[helm-tester Dockerfile]: https://github.com/elastic/helm-charts/blob/7.7/helpers/helm-tester/Dockerfile +[helpers/matrix.yml]: https://github.com/elastic/helm-charts/blob/7.7/helpers/matrix.yml diff --git a/apm-server/README.md b/apm-server/README.md index 7c766a063..af9e7616a 100644 --- a/apm-server/README.md +++ b/apm-server/README.md @@ -1,146 +1,173 @@ # APM Server Helm Chart + + + + +- [Requirements](#requirements) +- [Installing](#installing) + - [Using Helm repository](#using-helm-repository) + - [Using the 7.7 branch](#using-the-77-branch) +- [Upgrading](#upgrading) +- [Usage notes](#usage-notes) +- [Configuration](#configuration) +- [Examples](#examples) + - [Default](#default) +- [Contributing](#contributing) + + + + + This functionality is in alpha 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. Alpha 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 -[APM Server docker image](https://www.elastic.co/guide/en/apm/server/current/running-on-docker.html). +This Helm chart is a lightweight way to configure and run our official +[APM Server Docker image][]. + ## Requirements * Kubernetes >= 1.9 -* [Helm](https://helm.sh/) >= 2.8.0 - -## Usage notes and getting started +* [Helm][] >= 2.8.0 -* The default APM Server configuration file for this chart is configured to use an -Elasticsearch endpoint as configured by the rest of these helm charts. This can -easily be overridden in the config value `apmConfig.apm-server.yml`. -* Automated testing of this chart is currently only run against GKE (Google Kubernetes Engine). ## Installing This chart is tested with the latest 7.7.0-SNAPSHOT versions. -* Add the elastic helm charts repo - - ```bash - helm repo add elastic https://helm.elastic.co - ``` +### Using Helm repository -* Install the latest 7.7 release +* Add the Elastic Helm charts repo: +`helm repo add elastic https://helm.elastic.co` - ```bash - helm install --name apm-server elastic/apm-server --version=7.7.0 - ``` +* Install the latest 7.7 release: +`helm install --name apm-server elastic/apm-server --version=7.7.0` ### Using the 7.7 branch -* Clone the git repo and checkout the right branch +* Clone the git repo and checkout the right branch: - ```bash + ```shell git clone git@github.com:elastic/helm-charts.git cd helm-charts git checkout -b 7.7 origin/7.7 - ``` + ```` -* Install the latest 7.7.0-SNAPSHOT +* Install the latest 7.7.0-SNAPSHOT: +`helm install --name apm-server ./helm-charts/apm-server` - ```bash - helm install --name apm-server ./helm-charts/apm-server - ``` + +## Upgrading + +Please always check [CHANGELOG.md][] and [BREAKING_CHANGES.md][] before +upgrading to a new chart version. + + +## Usage notes + +* The default APM Server configuration file for this chart is configured to use +an Elasticsearch endpoint as configured by the rest of these Helm charts. This +can easily be overridden in the config value `apmConfig.apm-server.yml`. + +* Automated testing of this chart is currently only run against GKE (Google +Kubernetes Engine). ## Configuration -| Parameter | Description | Default | -| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | -| `apmConfig` | Allows you to add any config files in `/usr/share/apm-server/config` such as `apm-server.yml`. See [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/apm-server/values.yaml) for an example of the formatting with the default configuration. | see [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/apm-server/values.yaml) | -| `replicas` | Number of APM servers to run | `1` | -| `extraContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | -| `extraInitContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | -| `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 | `[]` | -| `envFrom` | Templatable string of envFrom to be passed to the [environment from variables](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables) which will be appended to the `envFrom:` definition for the container | `[]` | -| `extraVolumeMounts` | List of additional volumeMounts | `[]` | -| `extraVolumes` | List of additional volumes | `[]` | -| `image` | The APM Server docker image | `docker.elastic.co/apm/apm-server` | -| `imageTag` | The APM Server docker image tag | `7.7.0-SNAPSHOT` | -| `imagePullPolicy` | The Kubernetes [imagePullPolicy](https://kubernetes.io/docs/concepts/containers/images/#updating-images) value | `IfNotPresent` | -| `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 | `[]` | -| `managedServiceAccount` | Whether the `serviceAccount` should be managed by this helm chart. Set this to `false` in order to manage your own service account and related roles. | `true` | -| `podAnnotations` | Configurable [annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) applied to all APM Server pods | `{}` | -| `labels` | Configurable [label](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) applied to all APM server pods | `{}` | -| `podSecurityContext` | Configurable [podSecurityContext](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) for APM Server pod execution environment | `runAsUser: 0`
`privileged: false` | -| `livenessProbe` | Parameters to pass to [liveness probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/) checks for values such as timeouts and thresholds. | `failureThreshold: 3`
`initialDelaySeconds: 10`
`periodSeconds: 10`
`successThreshold: 3`
`timeoutSeconds: 5` | -| `readinessProbe` | Parameters to pass to [readiness probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/) checks for values such as timeouts and thresholds. | `failureThreshold: 3`
`initialDelaySeconds: 10`
`periodSeconds: 10`
`successThreshold: 3`
`timeoutSeconds: 5` | -| `resources` | Allows you to set the [resources](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/) for the `Deployment` | `requests.cpu: 100m`
`requests.memory: 100Mi`
`limits.cpu: 1000m`
`limits.memory: 200Mi` | -| `serviceAccount` | Custom [serviceAccount](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/) that APM Server will use during execution. By default will use the service account created by this chart. | `""` | -| `secretMounts` | Allows you easily mount a secret as a file inside the `Deployment`. Useful for mounting certificates and other secrets. See [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/apm-server/values.yaml) for an example | `[]` | -| `terminationGracePeriod` | Termination period (in seconds) to wait before killing APM Server pod process on pod shutdown | `30` | -| `tolerations` | Configurable [tolerations](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) | `[]` | -| `nodeSelector` | Configurable [nodeSelector](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector) | `{}` | -| `affinity` | Configurable [affinity](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity) | `{}` | -| `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. | `""` | -| `updateStrategy` | Allows you to change the default update [strategy](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#updating-a-deployment) for the deployment. | `RollingUpdate` | -| `autoscaling.enabled` | Enable the pod [horizonatal auto scaler](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) | `false` | -| `ingress` | Configurable [ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) to expose the APM Server service. See [`values.yaml`](https://github.com/elastic/helm-charts/tree/7.7/apm-server/values.yaml) for an example | `enabled: false` | -| `service` | Configurable [service](https://kubernetes.io/docs/concepts/services-networking/service/) to expose the APM Server service. See [`values.yaml`](https://github.com/elastic/helm-charts/tree/7.7/apm-server/values.yaml) for an example | `type: ClusterIP`
`port: 8200`
`nodePort:`
`annotations: {}` | -| `lifecycle` | Configurable [livecycle hooks](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/) | `false` | -| `nameOverride` | Overrides the chart name for resources. If not set the name will default to `.Chart.Name` | `""` | -| `fullnameOverride` | Overrides the full name of the resources. If not set the name will default to `.Release.Name`-`.Values.nameOverride` or `.Chart.Name` | `""` | + +| Parameter | Description | Default | +|--------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------| +| `affinity` | Configurable [affinity][] | `{}` | +| `apmConfig` | Allows you to add any config files in `/usr/share/apm-server/config` such as `apm-server.yml` | see [values.yaml][] | +| `autoscaling` | Enable the [horizontal pod autoscaler][] | `enabled: false` | +| `envFrom` | Templatable string to be passed to the [environment from variables][] which will be appended to the `envFrom:` definition for the container | `[]` | +| `extraContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | +| `extraEnvs` | Extra [environment variables][] which will be appended to the `env:` definition for the container | `[]` | +| `extraInitContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | +| `extraVolumeMounts` | List of additional `volumeMounts` | `[]` | +| `extraVolumes` | List of additional `volumes` | `[]` | +| `fullnameOverride` | Overrides the full name of the resources. If not set the name will default to `.Release.Name` - `.Values.nameOverride` or `.Chart.Name` | `""` | +| `imagePullPolicy` | The Kubernetes [imagePullPolicy][] value | `IfNotPresent` | +| `imagePullSecrets` | Configuration for [imagePullSecrets][] so that you can use a private registry for your image | `[]` | +| `imageTag` | The APM Server Docker image tag | `7.7.0-SNAPSHOT` | +| `image` | The APM Server Docker image | `docker.elastic.co/apm/apm-server` | +| `ingress` | Configurable [ingress][] to expose the APM Server service | see [values.yaml][] | +| `labels` | Configurable [labels][] applied to all APM server pods | `{}` | +| `lifecycle` | Configurable [lifecycle hooks][] | `false` | +| `livenessProbe` | Parameters to pass to liveness [probe][] checks for values such as timeouts and thresholds | see [values.yaml][] | +| `managedServiceAccount` | Whether the `serviceAccount` should be managed by this Helm chart. Set this to `false` in order to manage your own service account and related roles | `true` | +| `nameOverride` | Overrides the chart name for resources. If not set the name will default to `.Chart.Name` | `""` | +| `nodeSelector` | Configurable [nodeSelector][] | `{}` | +| `podAnnotations` | Configurable [annotations][] applied to all APM Server pods | `{}` | +| `podSecurityContext` | Configurable [podSecurityContext][] for APM Server pod execution environment | see [values.yaml][] | +| `priorityClassName` | The name of the [PriorityClass][]. No default is supplied as the `PriorityClass` must be created first | `""` | +| `readinessProbe` | Parameters to pass to readiness [probe][] checks for values such as timeouts and thresholds | see [values.yaml][] | +| `replicas` | Number of APM servers to run | `1` | +| `resources` | Allows you to set the [resources][] for the `Deployment` | see [values.yaml][] | +| `secretMounts` | Allows you easily mount a secret as a file inside the `Deployment`. Useful for mounting certificates and other secrets. See [values.yaml][] for an example | `[]` | +| `serviceAccount` | Custom [serviceAccount][] that APM Server will use during execution. By default will use the `serviceAccount` created by this chart | `""` | +| `service` | Configurable [service][] to expose the APM Server service. See [values.yaml][] for an example | see [values.yaml][] | +| `terminationGracePeriod` | Termination period (in seconds) to wait before killing APM Server pod process on pod shutdown | `30` | +| `tolerations` | Configurable [tolerations][] | `[]` | +| `updateStrategy` | Allows you to change the default [updateStrategy][] for the deployment | see [values.yaml][] | + ## Examples -In [examples/](ahttps://github.com/elastic/helm-charts/tree/7.7/apm-server/examples) you will find some example configurations. These examples -are used for the automated testing of this helm chart. +In [examples][] you will find some example configurations. These examples are +used for the automated testing of this Helm chart. ### Default -* Deploy the [default Elasticsearch helm chart](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/README.md#default) -* Deploy APM Server with the default values +* Deploy the [default Elasticsearch Helm chart][]. + +* Deploy APM Server with the default values: + ``` cd examples/default make ``` -* You can now setup a port forward for Elasticsearch to observe APM indices + +* You can now setup a port forward for Elasticsearch to observe APM indices: + ``` kubectl port-forward svc/elasticsearch-master 9200 curl localhost:9200/_cat/indices ``` -## 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`](https://github.com/elastic/helm-charts/tree/7.7/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](https://github.com/elastic/helm-charts/tree/7.7/apm-server/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 -``` +## Contributing + +Please check [CONTRIBUTING.md][] before any contribution or for any questions +about our development and testing process. + + +[BREAKING_CHANGES.md]: https://github.com/elastic/helm-charts/blob/master/BREAKING_CHANGES.md +[CHANGELOG.md]: https://github.com/elastic/helm-charts/blob/master/CHANGELOG.md +[CONTRIBUTING.md]: https://github.com/elastic/helm-charts/blob/master/CONTRIBUTING.md +[affinity]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity +[annotations]: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +[apm server docker image]: https://www.elastic.co/guide/en/apm/server/current/running-on-docker.html +[default elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/README.md#default +[environment variables]: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config +[examples]: https://github.com/elastic/helm-charts/tree/7.7/apm-server/examples +[helm]: https://helm.sh +[horizontal pod autoscaler]: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/ +[imagePullPolicy]: https://kubernetes.io/docs/concepts/containers/images/#updating-images +[imagePullSecrets]: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret +[ingress]: https://kubernetes.io/docs/concepts/services-networking/ingress/ +[labels]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +[lifecycle hooks]: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/ +[nodeSelector]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector +[podSecurityContext]: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +[priorityClass]: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass +[probe]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/ +[resources]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ +[service]: https://kubernetes.io/docs/concepts/services-networking/service/ +[serviceAccount]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ +[tolerations]: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ +[updateStrategy]: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#updating-a-deployment +[values.yaml]: https://github.com/elastic/helm-charts/tree/7.7/apm-server/values.yaml diff --git a/elasticsearch/README.md b/elasticsearch/README.md index 995593f14..aaecfdb79 100644 --- a/elasticsearch/README.md +++ b/elasticsearch/README.md @@ -1,163 +1,208 @@ # Elasticsearch Helm Chart + + + + +- [Requirements](#requirements) +- [Installing](#installing) + - [Using Helm repository](#using-helm-repository) + - [Using the 7.7 branch](#using-the-77-branch) +- [Upgrading](#upgrading) +- [Usage notes](#usage-notes) +- [Migration from helm/charts stable](#migration-from-helmcharts-stable) +- [Configuration](#configuration) + - [Deprecated](#deprecated) +- [Try it out](#try-it-out) + - [Default](#default) + - [Multi](#multi) + - [Security](#security) +- [FAQ](#faq) + - [How to install plugins?](#how-to-install-plugins) + - [How to use the keystore?](#how-to-use-the-keystore) + - [Basic example](#basic-example) + - [Multiple keys](#multiple-keys) + - [Custom paths and keys](#custom-paths-and-keys) + - [How to enable snapshotting?](#how-to-enable-snapshotting) +- [Local development environments](#local-development-environments) + - [Minikube](#minikube) + - [Docker for Mac - Kubernetes](#docker-for-mac---kubernetes) + - [KIND - Kubernetes](#kind---kubernetes) + - [MicroK8S](#microk8s) +- [Clustering and Node Discovery](#clustering-and-node-discovery) +- [Contributing](#contributing) + + + + + + +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][]. -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) - -## Notice - -[7.6.1](https://github.com/elastic/helm-charts/releases/tag/7.6.1) release is introducing a change for Elasticsearch users upgrading from a previous chart version. -Following our recommandations, the change tracked in [#458](https://github.com/elastic/helm-charts/pull/458) is setting CPU request to the same value as CPU limit. - -For users which don't overwrite default values for CPU requests, Elasticsearch pod will now request `1000m` CPU instead of `100m` CPU. This may impact the resources (nodes) required in your Kubernetes cluster to deploy Elasticsearch chart. - -If you wish to come back to former values, you just need to override CPU requests when deploying your Helm Chart. - -- Overriding CPU requests in commandline argument: -``` -helm install --name elasticsearch --set resources.requests.cpu=100m elastic/elasticsearch -``` - -- Overriding CPU requests in your custom `values.yaml` file: -``` -resources: - requests: - cpu: "100m" -``` ## Requirements -* [Helm](https://helm.sh/) >=2.8.0 and <3.0.0 (see parent [README](https://github.com/elastic/helm-charts/tree/7.7/README.md) for more details) +* [Helm][] >=2.8.0 and <3.0.0 (see [parent README][] for more details) * Kubernetes >=1.8 -* Minimum cluster requirements include the following to run this chart with default settings. All of these settings are configurable. +* 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](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/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). -* 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](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/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](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/migration/README.md) ## Installing This chart is tested with the latest 7.7.0-SNAPSHOT versions. -* Add the elastic helm charts repo +### Using Helm repository - ```bash - helm repo add elastic https://helm.elastic.co - ``` +* Add the Elastic Helm charts repo: +`helm repo add elastic https://helm.elastic.co` -* Install the latest 7.7 release - - ```bash - helm install --name elasticsearch elastic/elasticsearch --version=7.7.0 - ``` +* Install the latest 7.7 release: +`helm install --name elasticsearch elastic/elasticsearch --version=7.7.0` ### Using the 7.7 branch -* Clone the git repo and checkout the right branch +* Clone the git repo and checkout the right branch: - ```bash + ```shell git clone git@github.com:elastic/helm-charts.git cd helm-charts git checkout -b 7.7 origin/7.7 - ``` + ```` + +* Install the latest 7.7.0-SNAPSHOT: +`helm install --name elasticsearch ./helm-charts/elasticsearch` + + +## Upgrading + +Please always check [CHANGELOG.md][] and [BREAKING_CHANGES.md][] before +upgrading to a new chart version. + + +## Usage notes -* Install the latest 7.7.0-SNAPSHOT +* This repo includes a number of [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). +* 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 `OnDelete` [updateStrategy][]. +* 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][] 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. - ```bash - helm install --name elasticsearch ./helm-charts/elasticsearch - ``` + +## Migration from helm/charts stable + +If you currently have a cluster deployed with the [helm/charts stable][] chart +you can follow the [migration guide][]. ## 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`, `nameOverride-nodeGroup-X` if a nameOverride is specified, and `fullnameOverride-X` if a fullnameOverride is specified | `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](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/README.md#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](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/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 | `[]` | -| `envFrom` | Templatable string of envFrom to be passed to the [environment from variables](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables) which will be appended to the `envFrom:` 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 | `[]` | -| `extraContainers` | Templatable string of additional containers 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](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/values.yaml) for an example | `[]` | -| `image` | The Elasticsearch docker image | `docker.elastic.co/elasticsearch/elasticsearch` | -| `imageTag` | The Elasticsearch docker image tag | `7.7.0-SNAPSHOT` | -| `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: 1000m`
`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.labels` | Labels to be added to non-headless service | `{}` | -| `service.labelsHeadless` | Labels to be added to headless service | `{}` | -| `service.loadBalancerIP` | Some cloud providers allow you to specify the loadBalancerIP. If the loadBalancerIP field is not specified, the IP is dynamically assigned. If you specify a loadBalancerIP but your cloud provider does not support the feature, the loadbalancerIP field is ignored. [LoadBalancer options](https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer) | `""` | -| `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` | -| `service.loadBalancerSourceRanges` | The IP ranges that are allowed to access | `[]` | -| `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`](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/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](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/values.yaml) for an example of the formatting. | `{}` | -| `keystore` | Allows you map Kubernetes secrets into the keystore. See the [config example](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/config/values.yaml) and [how to use the keystore](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/README.md#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: ""` | -| `nameOverride` | Overrides the clusterName when used in the naming of resources | `""` | -| `fullnameOverride` | Overrides the clusterName and nodeGroup when used in the naming of resources. This should only be used when using a single nodeGroup, otherwise you will have name conflicts | `""` | +| Parameter | Description | Default | +|------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------| +| `antiAffinityTopologyKey` | The [anti-affinity][] topology key. 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. If it is set to soft it will be done "best effort". Other values will be ignored | `hard` | +| `clusterHealthCheckParams` | The [Elasticsearch cluster health status params][] that will be used by readiness [probe][] command | `wait_for_status=green&timeout=1s` | +| `clusterName` | This will be used as the Elasticsearch [cluster.name][] and should be unique per cluster in the namespace | `elasticsearch` | +| `envFrom` | Templatable string to be passed to the [environment from variables][] which will be appended to the `envFrom:` definition for the container | `[]` | +| `esConfig` | Allows you to add any config files in `/usr/share/elasticsearch/config/` such as `elasticsearch.yml` and `log4j2.properties`. See [values.yaml][] for an example of the formatting | `{}` | +| `esJavaOpts` | [Java options][] for Elasticsearch. This is where you should configure the [jvm heap size][] | `-Xmx1g -Xms1g` | +| `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`) | `""` | +| `extraContainers` | Templatable string of additional `containers` to be passed to the `tpl` function | `""` | +| `extraEnvs` | Extra [environment variables][] which will be appended to the `env:` definition for the container | `[]` | +| `extraInitContainers` | Templatable string of additional `initContainers` to be passed to the `tpl` function | `""` | +| `extraVolumeMounts` | Templatable string of additional `volumeMounts` to be passed to the `tpl` function | `""` | +| `extraVolumes` | Templatable string of additional `volumes` to be passed to the `tpl` function | `""` | +| `fullnameOverride` | Overrides the `clusterName` and `nodeGroup` when used in the naming of resources. This should only be used when using a single `nodeGroup`, otherwise you will have name conflicts | `""` | +| `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][] in `extraEnvs` | `9200` | +| `imagePullPolicy` | The Kubernetes [imagePullPolicy][] value | `IfNotPresent` | +| `imagePullSecrets` | Configuration for [imagePullSecrets][] so that you can use a private registry for your image | `[]` | +| `imageTag` | The Elasticsearch Docker image tag | `7.7.0-SNAPSHOT` | +| `image` | The Elasticsearch Docker image | `docker.elastic.co/elasticsearch/elasticsearch` | +| `ingress` | Configurable [ingress][] to expose the Elasticsearch service. See [values.yaml][] for an example | see [values.yaml][] | +| `initResources` | Allows you to set the [resources][] for the `initContainer` in the StatefulSet | `{}` | +| `keystore` | Allows you map Kubernetes secrets into the keystore. See the [config example][] and [how to use the keystore][] | `[]` | +| `labels` | Configurable [labels][] applied to all Elasticsearch pods | `{}` | +| `lifecycle` | Allows you to add lifecycle configuration. See [values.yaml][] for an example of the formatting | `{}` | +| `masterService` | 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][] for more information | `""` | +| `masterTerminationFix` | A workaround needed for Elasticsearch < 7.2 to prevent master status being lost during restarts [#63][] | `false` | +| `maxUnavailable` | The [maxUnavailable][] value for the pod disruption budget. By default this will prevent Kubernetes from having more than 1 unhealthy pod in the node group | `1` | +| `minimumMasterNodes` | The value for [discovery.zen.minimum_master_nodes][]. Should be set to `(master_eligible_nodes / 2) + 1`. Ignored in Elasticsearch versions >= 7 | `2` | +| `nameOverride` | Overrides the `clusterName` when used in the naming of resources | `""` | +| `networkHost` | Value for the [network.host Elasticsearch setting][] | `0.0.0.0` | +| `nodeAffinity` | Value for the [node affinity settings][] | `{}` | +| `nodeGroup` | This is the name that will be used for each group of nodes in the cluster. The name will be `clusterName-nodeGroup-X` , `nameOverride-nodeGroup-X` if a `nameOverride` is specified, and `fullnameOverride-X` if a `fullnameOverride` is specified | `master` | +| `nodeSelector` | Configurable [nodeSelector][] so that you can target specific nodes for your Elasticsearch cluster | `{}` | +| `persistence` | Enables a persistent volume for Elasticsearch data. Can be disabled for nodes that only have [roles][] which don't require persistent data | see [values.yaml][] | +| `podAnnotations` | Configurable [annotations][] applied to all Elasticsearch pods | `{}` | +| `podManagementPolicy` | By default Kubernetes [deploys StatefulSets serially][]. This deploys them in parallel so that they can discover each other | `Parallel` | +| `podSecurityContext` | Allows you to set the [securityContext][] for the pod | see [values.yaml][] | +| `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"` | see [values.yaml][] | +| `priorityClassName` | The name of the [PriorityClass][]. No default is supplied as the PriorityClass must be created first | `""` | +| `protocol` | The protocol that will be used for the readiness [probe][]. Change this to `https` if you have `xpack.security.http.ssl.enabled` set | `http` | +| `rbac` | Configuration for creating a role, role binding and ServiceAccount as part of this Helm chart with `create: true`. Also can be used to reference an external ServiceAccount with `serviceAccountName: "externalServiceAccountName"` | see [values.yaml][] | +| `readinessProbe` | Configuration fields for the readiness [probe][] | see [values.yaml][] | +| `replicas` | Kubernetes replica count for the StatefulSet (i.e. how many pods) | `3` | +| `resources` | Allows you to set the [resources][] for the StatefulSet | see [values.yaml][] | +| `roles` | A hash map with the specific [roles][] for the `nodeGroup` | see [values.yaml][] | +| `schedulerName` | Name of the [alternate scheduler][] | `""` | +| `secretMounts` | Allows you easily mount a secret as a file inside the StatefulSet. Useful for mounting certificates and other secrets. See [values.yaml][] for an example | `[]` | +| `securityContext` | Allows you to set the [securityContext][] for the container | see [values.yaml][] | +| `service.annotations` | [LoadBalancer annotations][] that Kubernetes will use for the service. This will configure load balancer if `service.type` is `LoadBalancer` | `{}` | +| `service.httpPortName` | The name of the http port within the service | `http` | +| `service.labelsHeadless` | Labels to be added to headless service | `{}` | +| `service.labels` | Labels to be added to non-headless service | `{}` | +| `service.loadBalancerIP` | Some cloud providers allow you to specify the [loadBalancer][] IP. If the `loadBalancerIP` field is not specified, the IP is dynamically assigned. If you specify a `loadBalancerIP` but your cloud provider does not support the feature, it is ignored. | `""` | +| `service.loadBalancerSourceRanges` | The IP ranges that are allowed to access | `[]` | +| `service.nodePort` | Custom [nodePort][] port that can be set if you are using `service.type: nodePort` | `""` | +| `service.transportPortName` | The name of the transport port within the service | `transport` | +| `service.type` | Elasticsearch [Service Types][] | `ClusterIP` | +| `sidecarResources` | Allows you to set the [resources][] for the sidecar containers in the StatefulSet | {} | +| `sysctlInitContainer` | Allows you to disable the `sysctlInitContainer` if you are setting [sysctl vm.max_map_count][] with another method | `enabled: true` | +| `sysctlVmMaxMapCount` | Sets the [sysctl vm.max_map_count][] needed for Elasticsearch | `262144` | +| `terminationGracePeriod` | The [terminationGracePeriod][] in seconds used when trying to stop the pod | `120` | +| `tolerations` | Configurable [tolerations][] | `[]` | +| `transportPort` | The transport port that Kubernetes will use for the service. If you change this you will also need to set [transport port configuration][] in `extraEnvs` | `9300` | +| `updateStrategy` | The [updateStrategy][] 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` | +| `volumeClaimTemplate` | Configuration for the [volumeClaimTemplate for StatefulSets][]. You will want to adjust the storage (default `30Gi` ) and the `storageClassName` if you are using a different storage class | see [values.yaml][] | + +### Deprecated + +| Parameter | Description | Default | +|-----------|---------------------------------------------------------------------------------------------------------------|---------| +| `fsGroup` | The Group ID (GID) for [securityContext][] so that the Elasticsearch user can read from the persistent volume | `""` | + ## Try it out -In [examples/](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples) you will find some example configurations. These examples are used for the automated testing of this helm chart +In [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 +To deploy a cluster with all default values and run the integration tests: ``` cd examples/default @@ -166,7 +211,7 @@ make ### Multi -A cluster with dedicated node types +A cluster with dedicated node types: ``` cd examples/multi @@ -175,22 +220,27 @@ 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). +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][node-certificates]. + +Generate the certificates and install Elasticsearch: + +``` +cd examples/security +make -* 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' +``` - # 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 +## FAQ -#### How to install plugins? +### 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 recommended way to install plugins into our Docker images is to create a +[custom Docker image][]. The Dockerfile would look something like: @@ -205,15 +255,19 @@ 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. +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? +### How to use the keystore? +#### Basic example -##### 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. +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 @@ -221,15 +275,17 @@ kubectl create secret generic slack_hook --from-literal=xpack.notification.slack ``` To add these secrets to the keystore: + ``` keystore: - secretName: encryption_key - secretName: slack_hook ``` -##### Multiple keys +#### 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: +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' @@ -240,15 +296,21 @@ keystore: - secretName: keystore_secrets ``` -##### Custom paths and keys +#### 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: +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][]. 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`. +We only want to add the `slack_hook` key to the keystore at path +`xpack.notification.slack.account.monitoring.secure_url`: ``` keystore: @@ -258,25 +320,37 @@ keystore: path: xpack.notification.slack.account.monitoring.secure_url ``` -You can also take a look at the [config example](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/config/) which is used as part of the automated testing pipeline. +You can also take a look at the [config example][] which is used as part of the +automated testing pipeline. -#### How to enable snapshotting? +### 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](https://github.com/elastic/helm-charts/tree/7.7/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](https://github.com/elastic/helm-charts/tree/7.7/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). +1. Install your [snapshot plugin][] into a custom Docker image following the +[how to install plugins guide][]. +2. Add any required secrets or credentials into an Elasticsearch keystore +following the [how to use the keystore][] guide. +3. Configure the [snapshot repository][] as you normally would. +4. To automate snapshots you can use a tool like [curator][]. In the future +there are plans to have Elasticsearch manage automated snapshots with +[Snapshot Lifecycle Management][]. -### 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. +## Local development environments -#### Minikube +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. -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/`. +### Minikube -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. +This chart also works successfully on [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 @@ -285,29 +359,32 @@ 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. +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 +### 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/). +It is also possible to run this chart with the built in Kubernetes cluster that +comes with [docker-for-mac][]: ``` cd examples/docker-for-mac make ``` -#### KIND - Kubernetes +### KIND - Kubernetes -It is also possible to run this chart using a Kubernetes [KIND (Kubernetes in Docker)](https://github.com/kubernetes-sigs/kind) cluster: +It is also possible to run this chart using a Kubernetes [KIND][] (Kubernetes in +Docker) cluster: ``` cd examples/kubernetes-kind make ``` -#### MicroK8S +### MicroK8S -It is also possible to run this chart using [MicroK8S](https://microk8s.io): +It is also possible to run this chart using [MicroK8S][]: ``` microk8s.enable dns @@ -317,46 +394,97 @@ cd examples/microk8s 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`](https://github.com/elastic/helm-charts/tree/7.7/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](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/default/test/goss.yaml) for an example of what the tests look like. - -To run the goss tests against the default example: +## Clustering and Node Discovery -``` -cd examples/default -make goss -``` +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`. + + +## Contributing + +Please check [CONTRIBUTING.md][] before any contribution or for any questions +about our development and testing process. + + +[BREAKING_CHANGES.md]: https://github.com/elastic/helm-charts/blob/master/BREAKING_CHANGES.md +[CHANGELOG.md]: https://github.com/elastic/helm-charts/blob/master/CHANGELOG.md +[CONTRIBUTING.md]: https://github.com/elastic/helm-charts/blob/master/CONTRIBUTING.md +[#63]: https://github.com/elastic/helm-charts/issues/63 +[alternate scheduler]: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/#specify-schedulers-for-pods +[annotations]: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +[anti-affinity]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity +[cluster.name]: https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster.name.html +[clustering and node discovery]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/README.md#clustering-and-node-discovery +[config example]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/config/values.yaml +[curator]: https://www.elastic.co/guide/en/elasticsearch/client/curator/current/snapshot.html +[custom docker image]: https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#_c_customized_image +[deploys statefulsets serially]: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies +[discovery.zen.minimum_master_nodes]: https://www.elastic.co/guide/en/elasticsearch/reference/current/discovery-settings.html#minimum_master_nodes +[docker-for-mac]: https://docs.docker.com/docker-for-mac/kubernetes/ +[elasticsearch cluster health status params]: https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html#request-params +[elasticsearch docker image]: https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html +[environment variables]: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config +[examples]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/ +[helm]: https://helm.sh +[helm/charts stable]: https://github.com/helm/charts/tree/master/stable/elasticsearch/ +[how to install plugins guide]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/README.md#how-to-install-plugins +[how to use the keystore]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/README.md#how-to-use-the-keystore +[http.port]: https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-http.html#_settings +[imagePullPolicy]: https://kubernetes.io/docs/concepts/containers/images/#updating-images +[imagePullSecrets]: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret +[ingress]: https://kubernetes.io/docs/concepts/services-networking/ingress/ +[java options]: https://www.elastic.co/guide/en/elasticsearch/reference/current/jvm-options.html +[jvm heap size]: https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html +[kind]: https://github.com/kubernetes-sigs/kind +[labels]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +[loadBalancer annotations]: https://kubernetes.io/docs/concepts/services-networking/service/#ssl-support-on-aws +[loadBalancer]: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer +[maxUnavailable]: https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget +[migration guide]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/migration/README.md +[minikube]: https://kubernetes.io/docs/setup/minikube/ +[microk8s]: https://microk8s.io +[multi]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/multi/ +[network.host elasticsearch setting]: https://www.elastic.co/guide/en/elasticsearch/reference/current/network.host.html +[node affinity settings]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature +[node-certificates]: https://www.elastic.co/guide/en/elasticsearch/reference/current/configuring-tls.html#node-certificates +[nodePort]: https://kubernetes.io/docs/concepts/services-networking/service/#nodeport +[nodeSelector]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector +[parent readme]: https://github.com/elastic/helm-charts/tree/7.7/README.md +[priorityClass]: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass +[probe]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/ +[resources]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ +[roles]: https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-node.html +[secret]: https://kubernetes.io/docs/concepts/configuration/secret/#using-secrets +[securityContext]: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +[service types]: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types +[snapshot lifecycle management]: https://github.com/elastic/elasticsearch/issues/38461 +[snapshot plugin]: https://www.elastic.co/guide/en/elasticsearch/plugins/current/repository.html +[snapshot repository]: https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html +[sysctl vm.max_map_count]: https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html#vm-max-map-count +[terminationGracePeriod]: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods +[tolerations]: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ +[transport port configuration]: https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-transport.html#_transport_settings +[updateStrategy]: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/ +[values.yaml]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/values.yaml +[volumeClaimTemplate for statefulsets]: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#stable-storage diff --git a/elasticsearch/examples/kubernetes-kind/README.md b/elasticsearch/examples/kubernetes-kind/README.md index 0f5fced5d..3dfbe2f75 100644 --- a/elasticsearch/examples/kubernetes-kind/README.md +++ b/elasticsearch/examples/kubernetes-kind/README.md @@ -9,13 +9,16 @@ for production. ## Current issue -There is currently an [kind issue][] with mount points created from PVCs not writeable by non-root users. -[kubernetes-sigs/kind#1157][] should fix it in a future release. +There is currently an [kind issue][] with mount points created from PVCs not +writable by non-root users. [kubernetes-sigs/kind#1157][] should fix it in a +future release. -Meanwhile, the workaround is to install manually [Rancher Local Path Provisioner][] and use `local-path` storage class for Elasticsearch volumes (see [Makefile][] instructions). +Meanwhile, the workaround is to install manually +[Rancher Local Path Provisioner][] and use `local-path` storage class for +Elasticsearch volumes (see [Makefile][] instructions). [Kind]: https://kind.sigs.k8s.io/ [Kind issue]: https://github.com/kubernetes-sigs/kind/issues/830 [Kubernetes-sigs/kind#1157]: https://github.com/kubernetes-sigs/kind/pull/1157 [Rancher Local Path Provisioner]: https://github.com/rancher/local-path-provisioner -[Makefile]: ./Makefile#L5 \ No newline at end of file +[Makefile]: https://github.com/elastic/helm-charts/blob/7.7/elasticsearch/examples/kubernetes-kind/Makefile#L5 diff --git a/elasticsearch/examples/migration/README.md b/elasticsearch/examples/migration/README.md index e5f4b1a79..b492d515d 100644 --- a/elasticsearch/examples/migration/README.md +++ b/elasticsearch/examples/migration/README.md @@ -1,86 +1,167 @@ # 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. +There are two viable options for migrating from the community Elasticsearch Helm +chart from the [helm/charts][] 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). +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][]. ## 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. +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 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][] 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. +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 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][] 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][]. 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: -* 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) + +* Deploy new data nodes which will join the existing cluster. Take a look at the +configuration in [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). + +* 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. + +* 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 + +* 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. + +* 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. +* 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. + +* Now deploy a single new master so that we have 3 masters again. See +[master.yml][] for the configuration: + ``` make master ``` -* Scale down old masters to 1 + +* 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 + +* Edit the masters in [masters.yml][] to 2 and redeploy: + ``` make master ``` -* Scale down the old masters to 0 + +* 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. + +* Edit the [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. + +* 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 + +* 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 + +* 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. + +* The migration should now be complete. After verifying that everything is +working correctly you can cleanup leftover resources from your old cluster. + +[basic license]: https://www.elastic.co/subscriptions +[data.yml]: https://github.com/elastic/helm-charts/blob/7.7/elasticsearch/examples/migration/data.yml +[helm/charts]: https://github.com/helm/charts/tree/master/stable/elasticsearch +[master.yml]: https://github.com/elastic/helm-charts/blob/7.7/elasticsearch/examples/migration/master.yml +[restoring to a different cluster guide]: https://www.elastic.co/guide/en/elasticsearch/reference/6.6/modules-snapshots.html#_restoring_to_a_different_cluster +[rolling upgrades guide]: https://www.elastic.co/guide/en/elasticsearch/reference/6.6/rolling-upgrades.html diff --git a/elasticsearch/values.yaml b/elasticsearch/values.yaml index 40acd6fd4..a4de388a8 100755 --- a/elasticsearch/values.yaml +++ b/elasticsearch/values.yaml @@ -184,10 +184,6 @@ podSecurityContext: fsGroup: 1000 runAsUser: 1000 -# The following value is deprecated, -# please use the above podSecurityContext.fsGroup instead -fsGroup: "" - securityContext: capabilities: drop: @@ -265,3 +261,7 @@ sysctlInitContainer: enabled: true keystore: [] + +# Deprecated +# please use the above podSecurityContext.fsGroup instead +fsGroup: "" diff --git a/filebeat/README.md b/filebeat/README.md index 6395e6c5f..98e2047eb 100644 --- a/filebeat/README.md +++ b/filebeat/README.md @@ -1,130 +1,179 @@ # Filebeat 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 [Filebeat docker image](https://www.elastic.co/guide/en/beats/filebeat/current/running-on-docker.html). +- [Requirements](#requirements) +- [Installing](#installing) + - [Using Helm repository](#using-helm-repository) + - [Using the 7.7 branch](#using-the-77-branch) +- [Upgrading](#upgrading) +- [Usage notes](#usage-notes) +- [Configuration](#configuration) +- [Examples](#examples) + - [Default](#default) +- [Contributing](#contributing) + + + + + + +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 +[Filebeat Docker image][]. + ## Requirements -* [Helm](https://helm.sh/) >=2.8.0 and <3.0.0 (see parent [README](https://github.com/elastic/helm-charts/tree/7.7/README.md) for more details) +* [Helm][] >=2.8.0 and <3.0.0 (see [parent README][] for more details) * Kubernetes >=1.9 -## Usage notes and getting started -* The default Filebeat configuration file for this chart is configured to use an Elasticsearch endpoint. Without any additional changes, Filebeat will send documents to the service URL that the Elasticsearch helm chart sets up by default. You may either set the `ELASTICSEARCH_HOSTS` environment variable in `extraEnvs` to override this endpoint or modify the default `filebeatConfig` to change this behavior. -* The default Filebeat configuration file is also configured to capture container logs and enrich them with Kubernetes metadata by default. This will capture all container logs in the cluster. -* This chart disables the [HostNetwork](https://kubernetes.io/docs/concepts/policy/pod-security-policy/#host-namespaces) setting by default for compatibility reasons with the majority of kubernetes providers and scenarios. Some kubernetes providers may not allow enabling `hostNetwork` and deploying multiple Filebeat pods on the same node isn't possible with `hostNetwork`. However Filebeat does recommend activating it. If your kubernetes provider is compatible with `hostNetwork` and you don't need to run multiple Filebeat daemonsets, you can activate it by setting `hostNetworking: true` in [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/filebeat/values.yaml). ## Installing This chart is tested with the latest 7.7.0-SNAPSHOT versions. -* Add the elastic helm charts repo - - ```bash - helm repo add elastic https://helm.elastic.co - ``` +### Using Helm repository -* Install the latest 7.7 release +* Add the Elastic Helm charts repo: +`helm repo add elastic https://helm.elastic.co` - ```bash - helm install --name filebeat elastic/filebeat --version=7.7.0 - ``` +* Install the latest 7.7 release: +`helm install --name filebeat elastic/filebeat --version=7.7.0` ### Using the 7.7 branch -* Clone the git repo and checkout the right branch +* Clone the git repo and checkout the right branch: - ```bash + ```shell git clone git@github.com:elastic/helm-charts.git cd helm-charts git checkout -b 7.7 origin/7.7 - ``` + ```` -* Install the latest 7.7.0-SNAPSHOT +* Install the latest 7.7.0-SNAPSHOT: +`helm install --name filebeat ./helm-charts/filebeat` - ```bash - helm install --name filebeat ./helm-charts/filebeat - ``` + +## Upgrading + +Please always check [CHANGELOG.md][] and [BREAKING_CHANGES.md][] before +upgrading to a new chart version. + + +## Usage notes + +* The default Filebeat configuration file for this chart is configured to use an +Filebeat endpoint. Without any additional changes, Filebeat will send +documents to the service URL that the Filebeat Helm chart sets up by +default. You may either set the `FILEBEAT_HOSTS` environment variable in +`extraEnvs` to override this endpoint or modify the default `filebeatConfig` to +change this behavior. +* The default Filebeat configuration file is also configured to capture +container logs and enrich them with Kubernetes metadata by default. This will +capture all container logs in the cluster. +* This chart disables the [HostNetwork][] setting by default for compatibility +reasons with the majority of kubernetes providers and scenarios. Some kubernetes +providers may not allow enabling `hostNetwork` and deploying multiple Filebeat +pods on the same node isn't possible with `hostNetwork` However Filebeat does +recommend activating it. If your kubernetes provider is compatible with +`hostNetwork` and you don't need to run multiple Filebeat DaemonSets, you can +activate it by setting `hostNetworking: true` in [values.yaml][]. ## Configuration -| Parameter | Description | Default | -| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------- | -| `filebeatConfig` | Allows you to add any config files in `/usr/share/filebeat` such as `filebeat.yml`. See [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/filebeat/values.yaml) for an example of the formatting with the default configuration. | see [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/filebeat/values.yaml) | -| `extraContainers` | List of additional init containers to be added at the Daemonset | `""` | -| `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 | `[]` | -| `extraInitContainers` | List of additional init containers to be added at the Daemonset. It also accepts a templatable string of additional containers to be passed to the `tpl` function | `[]` | -| `extraVolumeMounts` | List of additional volumeMounts to be mounted on the Daemonset | `[]` | -| `extraVolumes` | List of additional volumes to be mounted on the Daemonset | `[]` | -| `envFrom` | Templatable string of envFrom to be passed to the [environment from variables](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables) which will be appended to the `envFrom:` definition for the container | `[]` | -| `hostPathRoot` | Fully-qualified [hostPath](https://kubernetes.io/docs/concepts/storage/volumes/#hostpath) that will be used to persist Filebeat registry data | `/var/lib` | -| `hostNetworking` | Use host networking in the daemonset so that hostname is reported correctly | `false` | -| `image` | The Filebeat docker image | `docker.elastic.co/beats/filebeat` | -| `imageTag` | The Filebeat docker image tag | `7.7.0-SNAPSHOT` | -| `imagePullPolicy` | The Kubernetes [imagePullPolicy](https://kubernetes.io/docs/concepts/containers/images/#updating-images) value | `IfNotPresent` | -| `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 | `[]` | -| `managedServiceAccount` | Whether the `serviceAccount` should be managed by this helm chart. Set this to `false` in order to manage your own service account and related roles. | `true` | -| `podAnnotations` | Configurable [annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) applied to all Filebeat pods | `{}` | -| `labels` | Configurable [label](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) applied to all Filebeat pods | `{}` | -| `podSecurityContext` | Configurable [podSecurityContext](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) for Filebeat pod execution environment | `runAsUser: 0`
`privileged: false` | -| `livenessProbe` | Parameters to pass to [liveness probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/) checks for values such as timeouts and thresholds. | `failureThreshold: 3`
`initialDelaySeconds: 10`
`periodSeconds: 10`
`successThreshold: 3`
`timeoutSeconds: 5` | -| `readinessProbe` | Parameters to pass to [readiness probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/) checks for values such as timeouts and thresholds. | `failureThreshold: 3`
`initialDelaySeconds: 10`
`periodSeconds: 10`
`successThreshold: 3`
`timeoutSeconds: 5` | -| `resources` | Allows you to set the [resources](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/) for the `DaemonSet` | `requests.cpu: 100m`
`requests.memory: 100Mi`
`limits.cpu: 1000m`
`limits.memory: 200Mi` | -| `serviceAccount` | Custom [serviceAccount](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/) that Filebeat will use during execution. By default will use the service account created by this chart. | `""` | -| `secretMounts` | Allows you easily mount a secret as a file inside the `DaemonSet`. Useful for mounting certificates and other secrets. See [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/filebeat/values.yaml) for an example | `[]` | -| `terminationGracePeriod` | Termination period (in seconds) to wait before killing Filebeat pod process on pod shutdown | `30` | -| `tolerations` | Configurable [tolerations](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) | `[]` | -| `nodeSelector` | Configurable [nodeSelector](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector) | `{}` | -| `affinity` | Configurable [affinity](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity) | `{}` | -| `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. | `""` | -| `updateStrategy` | The [updateStrategy](https://kubernetes.io/docs/tasks/manage-daemon/update-daemon-set/#daemonset-update-strategy) for the `DaemonSet`. By default Kubernetes will kill and recreate pods on updates. Setting this to `OnDelete` will require that pods be deleted manually. | `RollingUpdate` | -| `fullnameOverride` | Overrides the full name of the resources. If not set the name will default to "`.Release.Name`-`.Values.nameOverride or .Chart.Name`" | `""` | + +| Parameter | Description | Default | +|--------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------| +| `affinity` | Configurable [affinity][] | `{}` | +| `envFrom` | Templatable string of envFrom to be passed to the [environment from variables][] which will be appended to the `envFrom:` definition for the container | `[]` | +| `extraContainers` | List of additional init containers to be added at the DaemonSet | `""` | +| `extraEnvs` | Extra [environment variables][] which will be appended to the `env:` definition for the container | `[]` | +| `extraInitContainers` | List of additional init containers to be added at the DaemonSet. It also accepts a templatable string of additional containers to be passed to the `tpl` function | `[]` | +| `extraVolumeMounts` | List of additional volumeMounts to be mounted on the DaemonSet | `[]` | +| `extraVolumes` | List of additional volumes to be mounted on the DaemonSet | `[]` | +| `filebeatConfig` | Allows you to add any config files in `/usr/share/filebeat` such as `filebeat.yml` | see [values.yaml][] | +| `fullnameOverride` | Overrides the full name of the resources. If not set the name will default to " `.Release.Name` - `.Values.nameOverride or .Chart.Name` " | `""` | +| `hostNetworking` | Use host networking in the DaemonSet so that hostname is reported correctly | `false` | +| `hostPathRoot` | Fully-qualified [hostPath][] that will be used to persist Filebeat registry data | `/var/lib` | +| `imagePullPolicy` | The Kubernetes [imagePullPolicy][] value | `IfNotPresent` | +| `imagePullSecrets` | Configuration for [imagePullSecrets][] so that you can use a private registry for your image | `[]` | +| `imageTag` | The Filebeat Docker image tag | `7.7.0-SNAPSHOT` | +| `image` | The Filebeat Docker image | `docker.elastic.co/beats/filebeat` | +| `labels` | Configurable [labels][] applied to all Filebeat pods | `{}` | +| `livenessProbe` | Parameters to pass to liveness [probe][] checks for values such as timeouts and thresholds | see [values.yaml][] | +| `managedServiceAccount` | Whether the `serviceAccount` should be managed by this Helm chart. Set this to `false` in order to manage your own service account and related roles | `true` | +| `nameOverride` | Overrides the chart name for resources. If not set the name will default to `.Chart.Name` | `""` | +| `nodeSelector` | Configurable [nodeSelector][] | `{}` | +| `podAnnotations` | Configurable [annotations][] applied to all Filebeat pods | `{}` | +| `podSecurityContext` | Configurable [podSecurityContext][] for Filebeat pod execution environment | see [values.yaml][] | +| `priorityClassName` | The name of the [PriorityClass][]. No default is supplied as the PriorityClass must be created first | `""` | +| `readinessProbe` | Parameters to pass to readiness [probe][] checks for values such as timeouts and thresholds | see [values.yaml][] | +| `resources` | Allows you to set the [resources][] for the `DaemonSet` | see [values.yaml][] | +| `secretMounts` | Allows you easily mount a secret as a file inside the `DaemonSet`. Useful for mounting certificates and other secrets. See [values.yaml][] for an example | `[]` | +| `serviceAccount` | Custom [serviceAccount][] that Filebeat will use during execution. By default will use the service account created by this chart | `""` | +| `terminationGracePeriod` | Termination period (in seconds) to wait before killing Filebeat pod process on pod shutdown | `30` | +| `tolerations` | Configurable [tolerations][] | `[]` | +| `updateStrategy` | The [updateStrategy][] for the `DaemonSet`. By default Kubernetes will kill and recreate pods on updates. Setting this to `OnDelete` will require that pods be deleted manually | `RollingUpdate` | + ## Examples -In [examples/](https://github.com/elastic/helm-charts/tree/7.7/filebeat/examples) you will find some example configurations. These examples are used for the automated testing of this helm chart. +In [examples][] you will find some example configurations. These examples are +used for the automated testing of this Helm chart. ### Default -* Deploy the [default Elasticsearch helm chart](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/README.md#default) -* Deploy Filebeat with the default values +* Deploy the [default Filebeat Helm chart][]. +* Deploy Filebeat with the default values: + ``` cd examples/default make ``` -* You can now setup a port forward for Elasticsearch to observe Filebeat indices + +* You can now setup a port forward for Filebeat to observe Filebeat +indices: + ``` - kubectl port-forward svc/elasticsearch-master 9200 + kubectl port-forward svc/filebeat-master 9200 curl localhost:9200/_cat/indices ``` -## 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`](https://github.com/elastic/helm-charts/tree/7.7/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](https://github.com/elastic/helm-charts/tree/7.7/filebeat/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 -``` +## Contributing + +Please check [CONTRIBUTING.md][] before any contribution or for any questions +about our development and testing process. + + +[BREAKING_CHANGES.md]: https://github.com/elastic/helm-charts/blob/master/BREAKING_CHANGES.md +[CHANGELOG.md]: https://github.com/elastic/helm-charts/blob/master/CHANGELOG.md +[CONTRIBUTING.md]: https://github.com/elastic/helm-charts/blob/master/CONTRIBUTING.md +[affinity]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity +[annotations]: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +[default Filebeat Helm chart]: https://github.com/elastic/helm-charts/tree/7.7/filebeat/README.md#default +[environment variables]: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config +[examples]: https://github.com/elastic/helm-charts/tree/7.7/filebeat/examples +[filebeat docker image]: https://www.elastic.co/guide/en/beats/filebeat/current/running-on-docker.html +[helm]: https://helm.sh +[hostNetwork]: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#host-namespaces +[hostPath]: https://kubernetes.io/docs/concepts/storage/volumes/#hostpath +[imagePullPolicy]: https://kubernetes.io/docs/concepts/containers/images/#updating-images +[imagePullSecrets]: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret +[labels]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +[parent readme]: https://github.com/elastic/helm-charts/tree/7.7/README.md +[nodeSelector]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector +[podSecurityContext]: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +[priorityClass]: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass +[probe]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/ +[resources]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ +[serviceAccount]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ +[tolerations]: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ +[updateStrategy]: https://kubernetes.io/docs/tasks/manage-daemon/update-daemon-set/#daemonset-update-strategy +[values.yaml]: https://github.com/elastic/helm-charts/tree/7.7/filebeat/values.yaml diff --git a/kibana/README.md b/kibana/README.md index fc2000255..ebb79db5d 100644 --- a/kibana/README.md +++ b/kibana/README.md @@ -1,110 +1,152 @@ # Kibana 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 [Kibana docker image](https://www.elastic.co/guide/en/kibana/current/docker.html) +- [Requirements](#requirements) +- [Installing](#installing) + - [Using Helm repository](#using-helm-repository) + - [Using the 7.7 branch](#using-the-77-branch) +- [Upgrading](#upgrading) +- [Configuration](#configuration) + - [Deprecated](#deprecated) +- [Examples](#examples) + - [Default](#default) + - [Security](#security) +- [FAQ](#faq) + - [How to install plugins?](#how-to-install-plugins) +- [Contributing](#contributing) + + + + + + +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 +[Kibana Docker image][]. + ## Requirements -* [Helm](https://helm.sh/) >=2.8.0 and <3.0.0 (see parent [README](https://github.com/elastic/helm-charts/tree/7.7/README.md) for more details) +* [Helm][] >=2.8.0 and <3.0.0 (see [parent README][] for more details) * Kubernetes >=1.9 + ## Installing This chart is tested with the latest 7.7.0-SNAPSHOT versions. -* Add the elastic helm charts repo - - ```bash - helm repo add elastic https://helm.elastic.co - ``` +### Using Helm repository -* Install the latest 7.7 release +* Add the Elastic Helm charts repo: +`helm repo add elastic https://helm.elastic.co` - ```bash - helm install --name kibana elastic/kibana --version=7.7.0 - ``` +* Install the latest 7.7 release: +`helm install --name kibana elastic/kibana --version=7.7.0` ### Using the 7.7 branch -* Clone the git repo and checkout the right branch +* Clone the git repo and checkout the right branch: - ```bash + ```shell git clone git@github.com:elastic/helm-charts.git cd helm-charts git checkout -b 7.7 origin/7.7 - ``` + ```` -* Install the latest 7.7.0-SNAPSHOT +* Install the latest 7.7.0-SNAPSHOT: +`helm install --name kibana ./helm-charts/kibana` - ```bash - helm install --name kibana ./helm-charts/kibana - ``` + +## Upgrading + +Please always check [CHANGELOG.md][] and [BREAKING_CHANGES.md][] before +upgrading to a new chart version. ## Configuration -| Parameter | Description | Default | -|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------| -| `elasticsearchHosts` | The URLs used to connect to Elasticsearch. | `http://elasticsearch-master:9200` | -| `elasticsearchURL` | The URL used to connect to Elasticsearch. Deprecated, needs to be used for Kibana versions < 6.6 | | -| `replicas` | Kubernetes replica count for the deployment (i.e. how many pods) | `1` | -| `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 | `name: NODE_OPTIONS`
`value: "--max-old-space-size=1800"` | -| `envFrom` | Templatable string of envFrom to be passed to the [environment from variables](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables) which will be appended to the `envFrom:` definition for the container | `[]` | -| `secretMounts` | Allows you easily mount a secret as a file inside the deployment. Useful for mounting certificates and other secrets. See [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/kibana/values.yaml) for an example | `[]` | -| `image` | The Kibana docker image | `docker.elastic.co/kibana/kibana` | -| `imageTag` | The Kibana docker image tag | `7.7.0-SNAPSHOT` | -| `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 Kibana pods | `{}` | -| `resources` | Allows you to set the [resources](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/) for the statefulset | `requests.cpu: 1000m`
`requests.memory: 2Gi`
`limits.cpu: 1000m`
`limits.memory: 2Gi` | -| `protocol` | The protocol that will be used for the readinessProbe. Change this to `https` if you have `server.ssl.enabled: true` set | `http` | -| `serverHost` | The [`server.host`](https://www.elastic.co/guide/en/kibana/current/settings.html) Kibana setting. This is set explicitly so that the default always matches what comes with the docker image. | `0.0.0.0` | -| `healthCheckPath` | The path used for the readinessProbe to check that Kibana is ready. If you are setting `server.basePath` you will also need to update this to `/${basePath}/app/kibana` | `/app/kibana` | -| `kibanaConfig` | Allows you to add any config files in `/usr/share/kibana/config/` such as `kibana.yml`. See [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/kibana/values.yaml) for an example of the formatting. | `{}` | -| `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` | -| `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` | -| `serviceAccount` | Allows you to overwrite the "default" [serviceAccount](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/) for the pod | `[]` | -| `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. | `""` | -| `httpPort` | The http port that Kubernetes will use for the healthchecks and the service. | `5601` | -| `updateStrategy` | Allows you to change the default update [strategy](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#updating-a-deployment) for the deployment. A [standard upgrade](https://www.elastic.co/guide/en/kibana/current/upgrade-standard.html) of Kibana requires a full stop and start which is why the default strategy is set to `Recreate` | `Recreate` | -| `readinessProbe` | Configuration 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` | -| `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 Kibana instances | `{}` | -| `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 Kibana service. See [`values.yaml`](https://github.com/elastic/helm-charts/tree/7.7/kibana/values.yaml) for an example | `enabled: false` | -| `service` | Configurable [service](https://kubernetes.io/docs/concepts/services-networking/service/) to expose the Kibana service. See [`values.yaml`](https://github.com/elastic/helm-charts/tree/7.7/kibana/values.yaml) for an example | `type: ClusterIP`
`port: 5601`
`nodePort:`
`annotations: {}`
`loadBalancerSourceRanges: {}` | -| `labels` | Configurable [label](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) applied to all Kibana pods | `{}` | -| `lifecycle` | Allows you to add lifecycle configuration. See [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/kibana/values.yaml) for an example of the formatting. | `{}` | -| `fullnameOverride` | Overrides the full name of the resources. If not set the name will default to "`.Release.Name`-`.Values.nameOverride or .Chart.Name`" | `""` | -| `extraContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | -| `extraInitContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | +| Parameter | Description | Default | +|-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------| +| `affinity` | Configurable [affinity][] | `{}` | +| `elasticsearchHosts` | The URLs used to connect to Elasticsearch | `http://elasticsearch-master:9200` | +| `envFrom` | Templatable string to be passed to the [environment from variables][] which will be appended to the `envFrom:` definition for the container | `[]` | +| `extraContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | +| `extraEnvs` | Extra [environment variables][] which will be appended to the `env:` definition for the container | see [values.yaml][] | +| `extraInitContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | +| `fullnameOverride` | Overrides the full name of the resources. If not set the name will default to " `.Release.Name` - `.Values.nameOverride orChart.Name` " | `""` | +| `healthCheckPath` | The path used for the readinessProbe to check that Kibana is ready. If you are setting `server.basePath` you will also need to update this to `/${basePath}/app/kibana` | `/app/kibana` | +| `httpPort` | The http port that Kubernetes will use for the healthchecks and the service | `5601` | +| `imagePullPolicy` | The Kubernetes [imagePullPolicy][]value | `IfNotPresent` | +| `imagePullSecrets` | Configuration for [imagePullSecrets][] so that you can use a private registry for your image | `[]` | +| `imageTag` | The Kibana Docker image tag | `7.7.0-SNAPSHOT` | +| `image` | The Kibana Docker image | `docker.elastic.co/kibana/kibana` | +| `ingress` | Configurable [ingress][] to expose the Kibana service. | see [values.yaml][] | +| `kibanaConfig` | Allows you to add any config files in `/usr/share/kibana/config/` such as `kibana.yml` See [values.yaml][] for an example of the formatting | `{}` | +| `labels` | Configurable [labels][] applied to all Kibana pods | `{}` | +| `lifecycle` | Allows you to add lifecycle configuration. See [values.yaml][] for an example of the formatting | `{}` | +| `nameOverride` | Overrides the chart name for resources. If not set the name will default to `.Chart.Name` | `""` | +| `nodeSelector` | Configurable [nodeSelector][] so that you can target specific nodes for your Kibana instances | `{}` | +| `podAnnotations` | Configurable [annotations][] applied to all Kibana pods | `{}` | +| `podSecurityContext` | Allows you to set the [securityContext][] for the pod | see [values.yaml][] | +| `priorityClassName` | The name of the [PriorityClass][]. No default is supplied as the PriorityClass must be created first | `""` | +| `protocol` | The protocol that will be used for the readinessProbe. Change this to `https` if you have `server.ssl.enabled: true` set | `http` | +| `readinessProbe` | Configuration for the readiness [probe][] | see [values.yaml][] | +| `replicas` | Kubernetes replica count for the Deployment (i.e. how many pods) | `1` | +| `resources` | Allows you to set the [resources][] for the Deployment | see [values.yaml][] | +| `secretMounts` | Allows you easily mount a secret as a file inside the Deployment. Useful for mounting certificates and other secrets. See [values.yaml][] for an example | `[]` | +| `securityContext` | Allows you to set the [securityContext][] for the container | see [values.yaml][] | +| `serverHost` | The [server.host][] Kibana setting. This is set explicitly so that the default always matches what comes with the Docker image | `0.0.0.0` | +| `serviceAccount` | Allows you to overwrite the "default" [serviceAccount][] for the pod | `[]` | +| `service` | Configurable [service][] to expose the Kibana service. | see [values.yaml][] | +| `tolerations` | Configurable [tolerations][]) | `[]` | +| `updateStrategy` | Allows you to change the default [updateStrategy][] for the Deployment. A [standard upgrade][] of Kibana requires a full stop and start which is why the default strategy is set to `Recreate` | `type: Recreate` | + +### Deprecated + +| Parameter | Description | Default | +|--------------------|--------------------------------------------------------------------------------------|---------| +| `elasticsearchURL` | The URL used to connect to Elasticsearch. needs to be used for Kibana versions < 6.6 | `""` | + ## Examples -In [examples/](https://github.com/elastic/helm-charts/tree/7.7/kibana/examples) you will find some example configurations. These examples are used for the automated testing of this helm chart +In [examples][] you will find some example configurations. These examples are +used for the automated testing of this Helm chart. ### Default -* Deploy the [default Elasticsearch helm chart](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/README.md#default) -* Deploy Kibana with the default values +* Deploy the [default Elasticsearch Helm chart][]. +* Deploy Kibana with the default values: + ``` cd examples/default make ``` -* You can now setup a port forward and access Kibana at http://localhost:5601 + +* You can now setup a port forward and access Kibana at http://localhost:5601: + ``` kubectl port-forward deployment/helm-kibana-default-kibana 5601 ``` ### Security -* Deploy a [security enabled Elasticsearch cluster](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/README.md#security) -* Deploy Kibana with the security example +* Deploy a [security enabled Elasticsearch cluster][]. +* Deploy Kibana with the security example: + ``` cd examples/security make ``` -* Setup a port forward and access Kibana at https://localhost:5601 + +* Setup a port forward and access Kibana at https://localhost:5601: + ``` # Setup the port forward kubectl port-forward deployment/helm-kibana-security-kibana 5601 @@ -112,18 +154,20 @@ In [examples/](https://github.com/elastic/helm-charts/tree/7.7/kibana/examples) # Run this in a seperate terminal # Get the auto generated password password=$(kubectl get secret elastic-credentials -o jsonpath='{.data.password}' | base64 --decode) - echo $password + echo password # Test Kibana is working with curl or access it with your browser at https://localhost:5601 # The example certificate is self signed so you may see a warning about the certificate curl -I -k -u elastic:$password https://localhost:5601/app/kibana ``` + ## FAQ ### How to install plugins? -The recommended way to install plugins into our docker images is to create a custom docker image. +The recommended way to install plugins into our Docker images is to create a +custom Docker image. The Dockerfile would look something like: @@ -136,29 +180,46 @@ RUN bin/kibana-plugin install 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 Kibana 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. - -## 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`](https://github.com/elastic/helm-charts/tree/7.7/requirements.txt) in the parent directory. - -``` -pip install -r ../requirements.txt -make test -``` - - -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 -``` +There are a couple reasons we recommend this: + +1. Tying the availability of Kibana 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. + + +## Contributing + +Please check [CONTRIBUTING.md][] before any contribution or for any questions +about our development and testing process. + + +[BREAKING_CHANGES.md]: https://github.com/elastic/helm-charts/blob/master/BREAKING_CHANGES.md +[CHANGELOG.md]: https://github.com/elastic/helm-charts/blob/master/CHANGELOG.md +[CONTRIBUTING.md]: https://github.com/elastic/helm-charts/blob/master/CONTRIBUTING.md +[annotations]: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +[default elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/README.md#default +[environment variables]: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config +[kibana docker image]: https://www.elastic.co/guide/en/kibana/current/docker.html +[examples]: https://github.com/elastic/helm-charts/tree/7.7/kibana/examples +[helm]: https://helm.sh +[imagePullPolicy]: https://kubernetes.io/docs/concepts/containers/images/#updating-images +[imagePullSecrets]: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret +[ingress]: https://kubernetes.io/docs/concepts/services-networking/ingress/ +[labels]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +[nodeSelector]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector +[parent readme]: https://github.com/elastic/helm-charts/tree/7.7/README.md +[priorityClass]: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass +[probe]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/ +[resources]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ +[security enabled elasticsearch cluster]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/README.md#security +[securityContext]: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod +[server.host]: https://www.elastic.co/guide/en/kibana/current/settings.html +[service]: https://kubernetes.io/docs/concepts/services-networking/service/ +[serviceAccount]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ +[standard upgrade]: https://www.elastic.co/guide/en/kibana/current/upgrade-standard.html +[tolerations]: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ +[updateStrategy]: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#updating-a-deployment +[values.yaml]: https://github.com/elastic/helm-charts/tree/7.7/kibana/values.yaml diff --git a/kibana/values.yaml b/kibana/values.yaml index cc8e2cb8b..8af17fbc7 100755 --- a/kibana/values.yaml +++ b/kibana/values.yaml @@ -1,6 +1,4 @@ --- - -elasticsearchURL: "" # "http://elasticsearch-master:9200" elasticsearchHosts: "http://elasticsearch-master:9200" replicas: 1 @@ -144,3 +142,6 @@ lifecycle: {} # postStart: # exec: # command: ["/bin/sh", "-c", "echo Hello from the postStart handler > /usr/share/message"] + +# Deprecated - use only with versions < 6.6 +elasticsearchURL: "" # "http://elasticsearch-master:9200" diff --git a/logstash/README.md b/logstash/README.md index 5c0a2257b..4000b5668 100644 --- a/logstash/README.md +++ b/logstash/README.md @@ -1,167 +1,225 @@ # Logstash 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 [Logstash docker image](https://www.elastic.co/guide/en/logstash/current/docker.html) +- [Requirements](#requirements) +- [Installing](#installing) + - [Using Helm repository](#using-helm-repository) + - [Using the 7.7 branch](#using-the-77-branch) +- [Upgrading](#upgrading) +- [Usage notes](#usage-notes) +- [Configuration](#configuration) +- [Try it out](#try-it-out) + - [Default](#default) +- [FAQ](#faq) + - [How to install plugins?](#how-to-install-plugins) +- [Contributing](#contributing) + + + + + + +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 +[Logstash Docker image][]. + ## Requirements -* [Helm](https://helm.sh/) >=2.8.0 and <3.0.0 (see parent [README](https://github.com/elastic/helm-charts/tree/7.7/README.md) for more details) +* [Helm][] >=2.8.0 and <3.0.0 (see [parent README][] for more details) * Kubernetes >=1.8 -## Usage notes and getting started - -* This repo includes a number of [example](https://github.com/elastic/helm-charts/tree/7.7/logstash/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). -* 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 `logstashJavaOpts` and to set the CPU/Memory `resources` to something suitable for your cluster -* We have designed this chart to be very un-opinionated about how to configure Logstash. 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. -* `logstash.yml` configuration files can be set either by a ConfigMap using `logstashConfig` in `values.yml` or by environment variables using `extraEnvs` in `values.yml`, however Logstash Docker image can't mix both methods as defining settings with environment variables causes `logstash.yml` to be modified in place while using ConfigMap bind-mount the same file (more details in this [Note](https://www.elastic.co/guide/en/logstash/6.7/docker-config.html#docker-env-config)). -* When overriding `logstash.yml`, `http.host: 0.0.0.0` should always be included to make default probes work. If restricting HTTP API to 127.0.0.1 is required by using `http.host: 127.0.0.1`, default probes should be disabled or overrided (see [values.yaml](https://github.com/elastic/helm-charts/tree/master/logstash/values.yaml) for the good syntax). ## Installing This chart is tested with the latest 7.7.0-SNAPSHOT versions. -* Add the elastic helm charts repo - - ```bash - helm repo add elastic https://helm.elastic.co - ``` +### Using Helm repository -* Install the latest 7.7 release +* Add the Elastic Helm charts repo: +`helm repo add elastic https://helm.elastic.co` - ```bash - helm install --name logstash elastic/logstash --version=7.7.0 - ``` +* Install the latest 7.7 release: +`helm install --name logstash elastic/logstash --version=7.7.0` ### Using the 7.7 branch -* Clone the git repo and checkout the right branch +* Clone the git repo and checkout the right branch: - ```bash + ```shell git clone git@github.com:elastic/helm-charts.git cd helm-charts git checkout -b 7.7 origin/7.7 - ``` - -* Install the latest 7.7.0-SNAPSHOT - - ```bash - helm install --name logstash ./helm-charts/logstash - ``` + ```` + +* Install the latest 7.7.0-SNAPSHOT: +`helm install --name logstash ./helm-charts/logstash` + + +## Upgrading + +Please always check [CHANGELOG.md][] and [BREAKING_CHANGES.md][] before +upgrading to a new chart version. + + +## Usage notes + +* This repo includes a number of [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). +* 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 `OnDelete` [updateStrategy][]. +* It is important to verify that the JVM heap size in `logstashJavaOpts` and to +set the CPU/Memory `resources` to something suitable for your cluster. +* We have designed this chart to be very un-opinionated about how to configure +Logstash. 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. +* `logstash.yml` configuration files can be set either by a ConfigMap using +`logstashConfig` in `values.yml` or by environment variables using `extraEnvs` +in `values.yml` , however Logstash Docker image can't mix both methods as +defining settings with environment variables causes `logstash.yml` to be +modified in place while using ConfigMap bind-mount the same file (more details +in this [note][]). +* When overriding `logstash.yml`, `http.host: 0.0.0.0` should always be included +to make default probes work. If restricting HTTP API to 127.0.0.1 is required by +using `http.host: 127.0.0.1`, default probes should be disabled or overrided +(see [values.yaml][] for the good syntax). ## Configuration -| Parameter | Description | Default | -| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -| `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` | -| `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 Logstash nodes from running on the same Kubernetes node | `kubernetes.io/hostname` | -| `extraContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | -| `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 | `[]` | -| `envFrom` | Templatable string of envFrom to be passed to the [environment from variables](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables) which will be appended to the `envFrom:` definition for the container | `[]` | -| `extraInitContainers` | Templatable string of additional init containers to be passed to the `tpl` function | `""` | -| `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 | `""` | -| `image` | The Logstash docker image | `docker.elastic.co/logstash/logstash` | -| `imagePullPolicy` | The Kubernetes [imagePullPolicy](https://kubernetes.io/docs/concepts/containers/images/#updating-images) value | `IfNotPresent` | -| `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 | `[]` | -| `imageTag` | The Logstash docker image tag | `7.7.0-SNAPSHOT` | -| `httpPort` | The http port that Kubernetes will use for the healthchecks and the service. | `9600` | -| `extraPorts` | An array of extra ports to open on the pod | `[]` | -| `labels` | Configurable [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) applied to all Logstash pods | `{}` | -| `lifecycle` | Allows you to add lifecycle configuration. See [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/logstash/values.yaml) for an example of the formatting. | `{}` | -| `livenessProbe` | Configuration fields for the [livenessProbe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/) | `failureThreshold: 3`
`initialDelaySeconds: 300`
`periodSeconds: 10`
`successThreshold: 3`
`timeoutSeconds: 5` | -| `logstashConfig` | Allows you to add any config files in `/usr/share/logstash/config/` such as `logstash.yml` and `log4j2.properties`. See [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/logstash/values.yaml) for an example of the formatting. | `{}` | -| `logstashJavaOpts` | Java options for Logstash. This is where you should configure the jvm heap size | `-Xmx1g -Xms1g` | -| `logstashPipeline` | Allows you to add any pipeline files in `/usr/share/logstash/pipeline/`. | `{}` | -| `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` | -| `nodeAffinity` | Value for the [node affinity settings](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature) | `{}` | -| `nodeSelector` | Configurable [nodeSelector](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector) so that you can target specific nodes for your Logstash cluster | `{}` | -| `persistence.annotations` | Additional persistence annotations for the `volumeClaimTemplate` | `{}` | -| `persistence.enabled` | Enables a persistent volume for Logstash data | `false` | -| `podAnnotations` | Configurable [annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) applied to all Logstash pods | `{}` | -| `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 each other | `Parallel` | -| `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` | -| `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: ""` | -| `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. | `""` | -| `readinessProbe` | Configuration fields for the [readinessProbe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/) | `failureThreshold: 3`
`initialDelaySeconds: 60`
`periodSeconds: 10`
`successThreshold: 3`
`timeoutSeconds: 5` | -| `replicas` | Kubernetes replica count for the statefulset (i.e. how many pods) | `1` | -| `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: 1536Mi`
`limits.cpu: 1000m`
`limits.memory: 1536Mi` | -| `schedulerName` | Name of the [alternate scheduler](https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/#specify-schedulers-for-pods) | `""` | -| `secretMounts` | Allows you easily mount a secret as a file inside the statefulset. Useful for mounting certificates and other secrets. See [values.yaml](https://github.com/elastic/helm-charts/tree/7.7/logstash/values.yaml) for an example | `[]` | -| `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` | -| `tolerations` | Configurable [tolerations](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) | `[]` | -| `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` | -| `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: 1Gi` | -| `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: ""` | -| `fullnameOverride` | Overrides the full name of the resources. If not set the name will default to "`.Release.Name`-`.Values.nameOverride or .Chart.Name`" | `""` | +| Parameter | Description | Default | +|---------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------| +| `antiAffinityTopologyKey` | The [anti-affinity][] topology key]. By default this will prevent multiple Logstash nodes from running on the same Kubernetes node | `kubernetes.io/hostname` | +| `antiAffinity` | Setting this to hard enforces the [anti-affinity][] rules. If it is set to soft it will be done "best effort". Other values will be ignored | `hard` | +| `envFrom` | Templatable string to be passed to the [environment from variables][] which will be appended to the `envFrom:` definition for the container | `[]` | +| `extraContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | +| `extraEnvs` | Extra [environment variables][] which will be appended to the `env:` definition for the container | `[]` | +| `extraInitContainers` | Templatable string of additional `initContainers` to be passed to the `tpl` function | `""` | +| `extraPorts` | An array of extra ports to open on the pod | `[]` | +| `extraVolumeMounts` | Templatable string of additional `volumeMounts` to be passed to the `tpl` function | `""` | +| `extraVolumes` | Templatable string of additional `volumes` to be passed to the `tpl` function | `""` | +| `fullnameOverride` | Overrides the full name of the resources. If not set the name will default to " `.Release.Name` - `.Values.nameOverride or .Chart.Name` " | `""` | +| `httpPort` | The http port that Kubernetes will use for the healthchecks and the service | `9600` | +| `imagePullPolicy` | The Kubernetes [imagePullPolicy][] value | `IfNotPresent` | +| `imagePullSecrets` | Configuration for [imagePullSecrets][] so that you can use a private registry for your image | `[]` | +| `imageTag` | The Logstash Docker image tag | `7.7.0-SNAPSHOT` | +| `image` | The Logstash Docker image | `docker.elastic.co/logstash/logstash` | +| `labels` | Configurable [labels][] applied to all Logstash pods | `{}` | +| `lifecycle` | Allows you to add lifecycle configuration. See [values.yaml][] for an example of the formatting | `{}` | +| `livenessProbe` | Configuration fields for the liveness [probe][] | see [values.yaml][] | +| `logstashConfig` | Allows you to add any config files in `/usr/share/logstash/config/` such as `logstash.yml` and `log4j2.properties` See [values.yaml][] for an example of the formatting | `{}` | +| `logstashJavaOpts` | Java options for Logstash. This is where you should configure the JVM heap size | `-Xmx1g -Xms1g` | +| `logstashPipeline` | Allows you to add any pipeline files in `/usr/share/logstash/pipeline/` | `{}` | +| `maxUnavailable` | The [maxUnavailable][] value for the pod disruption budget. By default this will prevent Kubernetes from having more than 1 unhealthy pod in the node group | `1` | +| `nameOverride` | Overrides the chart name for resources. If not set the name will default to `.Chart.Name` | `""` | +| `nodeAffinity` | Value for the [node affinity settings][] | `{}` | +| `nodeSelector` | Configurable [nodeSelector][] so that you can target specific nodes for your Logstash cluster | `{}` | +| `persistence` | Enables a persistent volume for Logstash data | see [values.yaml][] | +| `podAnnotations` | Configurable [annotations][] applied to all Logstash pods | `{}` | +| `podManagementPolicy` | By default Kubernetes [deploys StatefulSets serially][]. This deploys them in parallel so that they can discover each other | `Parallel` | +| `podSecurityContext` | Allows you to set the [securityContext][] for the pod | see [values.yaml][] | +| `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"` | see [values.yaml][] | +| `priorityClassName` | The name of the [PriorityClass][]. No default is supplied as the PriorityClass must be created first | `""` | +| `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"` | see [values.yaml][] | +| `readinessProbe` | Configuration fields for the readiness [probe][] | see [values.yaml][] | +| `replicas` | Kubernetes replica count for the StatefulSet (i.e. how many pods) | `1` | +| `resources` | Allows you to set the [resources][] for the StatefulSet | see [values.yaml][] | +| `schedulerName` | Name of the [alternate scheduler][] | `""` | +| `secretMounts` | Allows you easily mount a secret as a file inside the StatefulSet. Useful for mounting certificates and other secrets. See [values.yaml][] for an example | `[]` | +| `securityContext` | Allows you to set the [securityContext][] for the container | see [values.yaml][] | +| `service` | Configurable [service][] to expose the Logstash service. | see [values.yaml][] | +| `terminationGracePeriod` | The [terminationGracePeriod][] in seconds used when trying to stop the pod | `120` | +| `tolerations` | Configurable [tolerations][] | `[]` | +| `updateStrategy` | The [updateStrategy][] 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` | +| `volumeClaimTemplate` | Configuration for the [volumeClaimTemplate for StatefulSets][]. You will want to adjust the storage (default `30Gi` ) and the `storageClassName` if you are using a different storage class | see [values.yaml][] | + ## Try it out -In [examples/](https://github.com/elastic/helm-charts/tree/7.7/logstash/examples) you will find some example configurations. These examples are used for the automated testing of this helm chart +In [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 +To deploy a cluster with all default values and run the integration tests: ``` cd examples/default make ``` -### FAQ -#### How to install plugins? +## FAQ + +### How to install plugins? -The [recommended](https://www.elastic.co/guide/en/logstash/current/docker-config.html#_custom_images) way to install plugins into our docker images is to create a custom docker image. +The recommended way to install plugins into our Docker images is to create a +[custom Docker image][]. The Dockerfile would look something like: ``` ARG logstash_version FROM docker.elastic.co/logstash/logstash:${logstash_version} - RUN bin/logstash-plugin install logstash-output-kafka ``` 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 Logstash 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. - -## 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`](https://github.com/elastic/helm-charts/tree/7.7/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](https://github.com/elastic/helm-charts/tree/7.7/logstash/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 -``` +There are a couple reasons we recommend this: + +1. Tying the availability of Logstash 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. + + +## Contributing + +Please check [CONTRIBUTING.md][] before any contribution or for any questions +about our development and testing process. + + +[BREAKING_CHANGES.md]: https://github.com/elastic/helm-charts/blob/master/BREAKING_CHANGES.md +[CHANGELOG.md]: https://github.com/elastic/helm-charts/blob/master/CHANGELOG.md +[CONTRIBUTING.md]: https://github.com/elastic/helm-charts/blob/master/CONTRIBUTING.md +[alternate scheduler]: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/#specify-schedulers-for-pods +[annotations]: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +[anti-affinity]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity +[deploys statefulsets serially]: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies +[custom docker image]: https://www.elastic.co/guide/en/logstash/current/docker-config.html#_custom_images +[environment variables]: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config +[examples]: https://github.com/elastic/helm-charts/tree/7.7/logstash/examples +[helm]: https://helm.sh +[imagePullPolicy]: https://kubernetes.io/docs/concepts/containers/images/#updating-images +[imagePullSecrets]: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret +[labels]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +[logstash docker image]: https://www.elastic.co/guide/en/logstash/current/docker.html +[maxUnavailable]: https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget +[node affinity settings]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature +[nodeSelector]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector +[note]: https://www.elastic.co/guide/en/logstash/current/docker-config.html#docker-env-config +[parent readme]: https://github.com/elastic/helm-charts/tree/7.7/README.md +[priorityClass]: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass +[probe]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/ +[resources]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ +[updateStrategy]: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/ +[securityContext]: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod +[terminationGracePeriod]: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods +[tolerations]: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ +[values.yaml]: https://github.com/elastic/helm-charts/tree/7.7/logstash/values.yaml +[updateStrategy]: https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#updating-statefulsets +[volumeClaimTemplate for statefulsets]: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#stable-storage diff --git a/metricbeat/README.md b/metricbeat/README.md index ecfae28a7..1febca509 100644 --- a/metricbeat/README.md +++ b/metricbeat/README.md @@ -1,187 +1,190 @@ # Metricbeat 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 [Metricbeat docker image](https://www.elastic.co/guide/en/beats/metricbeat/current/running-on-docker.html). +- [Requirements](#requirements) +- [Installing](#installing) + - [Using Helm repository](#using-helm-repository) + - [Using the 7.7 branch](#using-the-77-branch) +- [Upgrading](#upgrading) +- [Configuration](#configuration) + - [Deprecated](#deprecated) +- [Examples](#examples) + - [Default](#default) +- [Contributing](#contributing) -## Breaking Changes + + + -[7.5.1](https://github.com/elastic/helm-charts/releases/tag/7.5.1) release is introducing a breaking change for Metricbeat users upgrading from a previous chart version. -The breaking change tracked in [#395](https://github.com/elastic/helm-charts/issues/395) is failing `helm upgrade` command with the following error: -``` -UPGRADE FAILED -Error: Deployment.apps "metricbeat-kube-state-metrics" is 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 && Deployment.apps "metricbeat-metricbeat-metrics" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"app":"metricbeat-metricbeat-metrics", "chart":"metricbeat-7.5.1", "heritage":"Tiller", "release":"metricbeat"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable -Error: UPGRADE FAILED: Deployment.apps "metricbeat-kube-state-metrics" is 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 && Deployment.apps "metricbeat-metricbeat-metrics" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"app":"metricbeat-metricbeat-metrics", "chart":"metricbeat-7.5.1", "heritage":"Tiller", "release":"metricbeat"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable -``` -This is caused by the update of [kube-state-metrics](https://github.com/helm/charts/tree/master/stable/kube-state-metrics) chart dependency which is renaming some labels in [helm/charts#15261](https://github.com/helm/charts/pull/15261). +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 +[Metricbeat Docker image][]. -The workaround is to use `--force` argument for `helm upgrade` command which will force Metricbeat resources update through delete/recreate. ## Requirements -* [Helm](https://helm.sh/) >=2.8.0 and <3.0.0 (see parent [README](https://github.com/elastic/helm-charts/tree/7.7/README.md) for more details) +* [Helm][] >=2.8.0 and <3.0.0 (see [parent README][] for more details) * Kubernetes >=1.9 + ## Installing This chart is tested with the latest 7.7.0-SNAPSHOT versions. -* Add the elastic helm charts repo - - ```bash - helm repo add elastic https://helm.elastic.co - ``` +### Using Helm repository -* Install the latest 7.7 release +* Add the Elastic Helm charts repo: +`helm repo add elastic https://helm.elastic.co` - ```bash - helm install --name metricbeat elastic/metricbeat --version=7.7.0 - ``` +* Install the latest 7.7 release: +`helm install --name metricbeat elastic/metricbeat --version=7.7.0` ### Using the 7.7 branch -* Clone the git repo and checkout the right branch +* Clone the git repo and checkout the right branch: - ```bash + ```shell git clone git@github.com:elastic/helm-charts.git cd helm-charts git checkout -b 7.7 origin/7.7 - ``` + ```` -* Install the latest 7.7.0-SNAPSHOT +* Install the latest 7.7.0-SNAPSHOT: +`helm install --name metricbeat ./helm-charts/metricbeat` - ```bash - helm install --name metricbeat ./helm-charts/metricbeat - ``` + +## Upgrading + +Please always check [CHANGELOG.md][] and [BREAKING_CHANGES.md][] before +upgrading to a new chart version. ## Configuration -| Parameter | Description | Default | -| --- | --- | --- | -| `daemonset.affinity` | Configurable [affinity][] for Metricbeat `DaemonSet`. | `{}` | -| `daemonset.envFrom` | Templatable string of `envFrom` to be passed to the [environment from variables][] which will be appended to Metricbeat container for `DaemonSet`. | `[]` | -| `daemonset.extraEnvs` | Extra [environment variables][] which will be appended to Metricbeat container for `DaemonSet`. | `[]` | -| `daemonset.extraVolumes` | Templatable string of additional volumes to be passed to the `tpl` function or `DaemonSet`. | `[]` | -| `daemonset.extraVolumeMounts` | Templatable string of additional volumeMounts to be passed to the `tpl` function or `DaemonSet`. | `[]` | -| `daemonset.hostNetworking` | Enable Metricbeat `DaemonSet` to use host network | `false` | -| `daemonset.metricbeatConfig` | Allows you to add any config files in `/usr/share/metricbeat` such as `metricbeat.yml` for Metricbeat `DaemonSet`. | see [values.yaml][] | -| `daemonset.nodeSelector` | Configurable [nodeSelector][] for Metricbeat `DaemonSet`. | `{}` | -| `daemonset.secretMounts` | Allows you easily mount a secret as a file inside the `DaemonSet`. Useful for mounting certificates and other secrets. See [values.yaml][] for an example | `[]` | -| `daemonset.securityContext` | Configurable [securityContext][] for Metricbeat `DaemonSet` pod execution environment. | `runAsUser: 0`
`privileged: false` | -| `daemonset.resources` | Allows you to set the [resources][] for Metricbeat `DaemonSet`. | `requests.cpu: 100m`
`requests.memory: 100Mi`
`limits.cpu: 1000m`
`limits.memory: 200Mi` | -| `daemonset.tolerations` | Configurable [tolerations][] for Metricbeat `DaemonSet`. | `[]` | -| `deployment.affinity` | Configurable [affinity][] for Metricbeat `Deployment`. | `{}` | -| `deployment.envFrom` | Templatable string of `envFrom` to be passed to the [environment from variables][] which will be appended to Metricbeat container for `Deployment`. | `[]` | -| `deployment.extraEnvs` | Extra [environment variables][] which will be appended to Metricbeat container for `Deployment`. | `[]` | -| `deployment.extraVolumes` | Templatable string of additional volumes to be passed to the `tpl` function or `Deployment`. | `[]` | -| `deployment.extraVolumeMounts` | Templatable string of additional volumeMounts to be passed to the `tpl` function or `DaemonSet`. | `[]` | -| `deployment.metricbeatConfig` | Allows you to add any config files in `/usr/share/metricbeat` such as `metricbeat.yml` for Metricbeat `Deployment`. | see [values.yaml][] | -| `deployment.nodeSelector` | Configurable [nodeSelector][] for Metricbeat `Deployment`. | `{}` | -| `deployment.secretMounts` | Allows you easily mount a secret as a file inside the `Deployment`. Useful for mounting certificates and other secrets. See [values.yaml][] for an example | `[]` | -| `deployment.securityContext` | Configurable [securityContext][] for Metricbeat `Deployment` pod execution environment. | `runAsUser: 0`
`privileged: false` | -| `deployment.resources` | Allows you to set the [resources][] for Metricbeat `Deployment`. | `requests.cpu: 100m`
`requests.memory: 100Mi`
`limits.cpu: 1000m`
`limits.memory: 200Mi` | -| `deployment.tolerations` | Configurable [tolerations][] for Metricbeat `Deployment`. | `[]` | -| `extraContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | -| `extraInitContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | -| `hostPathRoot` | Fully-qualified [hostPath][] that will be used to persist Metricbeat registry data | `/var/lib` | -| `image` | The Metricbeat docker image | `docker.elastic.co/beats/metricbeat` | -| `imageTag` | The Metricbeat docker image tag | `7.7.0-SNAPSHOT` | -| `imagePullPolicy` | The Kubernetes [imagePullPolicy][] value | `IfNotPresent` | -| `imagePullSecrets` | Configuration for [imagePullSecrets][] so that you can use a private registry for your image | `[]` | -| `labels` | Configurable [label][] applied to all Metricbeat pods | `{}` | -| `managedServiceAccount` | Whether the `serviceAccount` should be managed by this helm chart. Set this to `false` in order to manage your own service account and related roles. | `true` | -| `clusterRoleRules` | Configurable [cluster role rules][] that Metricbeat uses to access Kubernetes resources. | see [values.yaml][] | -| `podAnnotations` | Configurable [annotations][] applied to all Metricbeat pods | `{}` | -| `livenessProbe` | Parameters to pass to [liveness probe][] checks for values such as timeouts and thresholds. | `failureThreshold: 3`
`initialDelaySeconds: 10`
`periodSeconds: 10`
`successThreshold: 3`
`timeoutSeconds: 5` | -| `readinessProbe` | Parameters to pass to [readiness probe][] checks for values such as timeouts and thresholds. | `failureThreshold: 3`
`initialDelaySeconds: 10`
`periodSeconds: 10`
`successThreshold: 3`
`timeoutSeconds: 5` | -| `serviceAccount` | Custom [serviceAccount][] that Metricbeat will use during execution. By default will use the service account created by this chart. | `""` | -| `terminationGracePeriod` | Termination period (in seconds) to wait before killing Metricbeat pod process on pod shutdown | `30` | -| `updateStrategy` | The [updateStrategy][] for the `DaemonSet`. By default Kubernetes will kill and recreate pods on updates. Setting this to `OnDelete` will require that pods be deleted manually. | `RollingUpdate` | -| `priorityClassName` | The [name of the PriorityClass][]. No default is supplied as the PriorityClass must be created first. | `""` | -| `replicas` | The replica count for the metricbeat deployment talking to kube-state-metrics | `1` | -| `fullnameOverride` | Overrides the full name of the resources. If not set the name will default to "`.Release.Name`-`.Values.nameOverride or .Chart.Name`" | `""` | + +| Parameter | Description | Default | +|--------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------| +| `clusterRoleRules` | Configurable [cluster role rules][] that Metricbeat uses to access Kubernetes resources | see [values.yaml][] | +| `daemonset.affinity` | Configurable [affinity][] for Metricbeat daemonset | `{}` | +| `daemonset.envFrom` | Templatable string of `envFrom` to be passed to the [environment from variables][] which will be appended to Metricbeat container for DaemonSet | `[]` | +| `daemonset.extraEnvs` | Extra [environment variables][] which will be appended to Metricbeat container for DaemonSet | `[]` | +| `daemonset.extraVolumeMounts` | Templatable string of additional `volumeMounts` to be passed to the `tpl` function or DaemonSet | `[]` | +| `daemonset.extraVolumes` | Templatable string of additional `volumes` to be passed to the `tpl` function or DaemonSet | `[]` | +| `daemonset.hostNetworking` | Enable Metricbeat DaemonSet to use `hostNetwork` | `false` | +| `daemonset.metricbeatConfig` | Allows you to add any config files in `/usr/share/metricbeat` such as `metricbeat.yml` for Metricbeat DaemonSet | see [values.yaml][] | +| `daemonset.nodeSelector` | Configurable [nodeSelector][] for Metricbeat DaemonSet | `{}` | +| `daemonset.resources` | Allows you to set the [resources][] for Metricbeat DaemonSet | see [values.yaml][] | +| `daemonset.secretMounts` | Allows you easily mount a secret as a file inside the DaemonSet. Useful for mounting certificates and other secrets. See [values.yaml][] for an example | `[]` | +| `daemonset.securityContext` | Configurable [securityContext][] for Metricbeat DaemonSet pod execution environment | see [values.yaml][] | +| `daemonset.tolerations` | Configurable [tolerations][] for Metricbeat DaemonSet | `[]` | +| `deployment.affinity` | Configurable [affinity][] for Metricbeat Deployment | `{}` | +| `deployment.envFrom` | Templatable string of `envFrom` to be passed to the [environment from variables][] which will be appended to Metricbeat container for Deployment | `[]` | +| `deployment.extraEnvs` | Extra [environment variables][] which will be appended to Metricbeat container for Deployment | `[]` | +| `deployment.extraVolumeMounts` | Templatable string of additional `volumeMounts` to be passed to the `tpl` function or DaemonSet | `[]` | +| `deployment.extraVolumes` | Templatable string of additional `volumes` to be passed to the `tpl` function or Deployment | `[]` | +| `deployment.metricbeatConfig` | Allows you to add any config files in `/usr/share/metricbeat` such as `metricbeat.yml` for Metricbeat Deployment | see [values.yaml][] | +| `deployment.nodeSelector` | Configurable [nodeSelector][] for Metricbeat Deployment | `{}` | +| `deployment.resources` | Allows you to set the [resources][] for Metricbeat Deployment | see [values.yaml][] | +| `deployment.secretMounts` | Allows you easily mount a secret as a file inside the Deployment Useful for mounting certificates and other secrets. See [values.yaml][] for an example | `[]` | +| `deployment.securityContext` | Configurable [securityContext][] for Metricbeat Deployment pod execution environment | see [values.yaml][] | +| `deployment.tolerations` | Configurable [tolerations][] for Metricbeat Deployment | `[]` | +| `extraContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | +| `extraInitContainers` | Templatable string of additional containers to be passed to the `tpl` function | `""` | +| `fullnameOverride` | Overrides the full name of the resources. If not set the name will default to " `.Release.Name` - `.Values.nameOverride or .Chart.Name` " | `""` | +| `hostPathRoot` | Fully-qualified [hostPath][] that will be used to persist Metricbeat registry data | `/var/lib` | +| `imagePullPolicy` | The Kubernetes [imagePullPolicy][] value | `IfNotPresent` | +| `imagePullSecrets` | Configuration for [imagePullSecrets][] so that you can use a private registry for your image | `[]` | +| `imageTag` | The Metricbeat Docker image tag | `7.7.0-SNAPSHOT` | +| `image` | The Metricbeat Docker image | `docker.elastic.co/beats/metricbeat` | +| `labels` | Configurable [labels][] applied to all Metricbeat pods | `{}` | +| `livenessProbe` | Parameters to pass to liveness [probe][] checks for values such as timeouts and thresholds | see [values.yaml][] | +| `managedServiceAccount` | Whether the `serviceAccount` should be managed by this helm chart. Set this to `false` in order to manage your own service account and related roles | `true` | +| `nameOverride` | Overrides the chart name for resources. If not set the name will default to `.Chart.Name` | `""` | +| `podAnnotations` | Configurable [annotations][] applied to all Metricbeat pods | `{}` | +| `priorityClassName` | The name of the [PriorityClass][]. No default is supplied as the PriorityClass must be created first | `""` | +| `readinessProbe` | Parameters to pass to readiness [probe][] checks for values such as timeouts and thresholds | see [values.yaml][] | +| `replicas` | The replica count for the Metricbeat deployment talking to kube-state-metrics | `1` | +| `serviceAccount` | Custom [serviceAccount][] that Metricbeat will use during execution. By default will use the service account created by this chart | `""` | +| `terminationGracePeriod` | Termination period (in seconds) to wait before killing Metricbeat pod process on pod shutdown | `30` | +| `updateStrategy` | The [updateStrategy][] for the DaemonSet By default Kubernetes will kill and recreate pods on updates. Setting this to `OnDelete` will require that pods be deleted manually | `RollingUpdate` | ### Deprecated -| Parameter | Description | Default | -| --- | --- | --- | -| `affinity` | Configurable [affinity][] for Metricbeat `DaemonSet`. | `{}` | -| `extraEnvs` | Extra [environment variables][] which will be appended to Metricbeat container for both `DaemonSet` and `Deployment`. | `[]` | -| `extraVolumes` | Templatable string of additional volumes to be passed to the `tpl` function for both `DaemonSet` and `Deployment`. | `[]` | -| `extraVolumeMounts` | Templatable string of additional volumeMounts to be passed to the `tpl` function for both `DaemonSet` and `Deployment`. | `[]` | -| `deployment.envFrom` | Templatable string to be passed to the [environment from variables][] which will be appended to Metricbeat container for both `DaemonSet` and `Deployment`. | `[]` | -| `metricbeatConfig` | Allows you to add any config files in `/usr/share/metricbeat` such as `metricbeat.yml` for both Metricbeat `DaemonSet` and `Deployment`. | `{}` | -| `nodeSelector` | Configurable [nodeSelector][] for Metricbeat `DaemonSet`. | `{}` | -| `podSecurityContext` | Configurable [securityContext][] for Metricbeat `DaemonSet` and `Deployment` pod execution environment. | `{}` | -| `resources` | Allows you to set the [resources][] for both Metricbeat `DaemonSet` and `Deployment`. | `{}` | -| `secretMounts` | Allows you easily mount a secret as a file inside `DaemonSet` and `Deployment`. Useful for mounting certificates and other secrets. | `[]` | -| `tolerations` | Configurable [tolerations][] for both Metricbeat `DaemonSet` and `Deployment`. | `[]` | + +| Parameter | Description | Default | +|----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|---------| +| `affinity` | Configurable [affinity][] for Metricbeat DaemonSet | `{}` | +| `envFrom` | Templatable string to be passed to the [environment from variables][] which will be appended to Metricbeat container for both DaemonSet and Deployment | `[]` | +| `extraEnvs` | Extra [environment variables][] which will be appended to Metricbeat container for both DaemonSet and Deployment | `[]` | +| `extraVolumeMounts` | Templatable string of additional `volumeMounts` to be passed to the `tpl` function for both DaemonSet and Deployment | `[]` | +| `extraVolumes` | Templatable string of additional `volumes` to be passed to the `tpl` function for both DaemonSet and Deployment | `[]` | +| `metricbeatConfig` | Allows you to add any config files in `/usr/share/metricbeat` such as `metricbeat.yml` for both Metricbeat DaemonSet and Deployment | `{}` | +| `nodeSelector` | Configurable [nodeSelector][] for Metricbeat DaemonSet | `{}` | +| `podSecurityContext` | Configurable [securityContext][] for Metricbeat DaemonSet and Deployment pod execution environment | `{}` | +| `resources` | Allows you to set the [resources][] for both Metricbeat DaemonSet and Deployment | `{}` | +| `secretMounts` | Allows you easily mount a secret as a file inside DaemonSet and Deployment Useful for mounting certificates and other secrets | `[]` | +| `tolerations` | Configurable [tolerations][] for both Metricbeat DaemonSet and Deployment | `[]` | + ## Examples -In [examples/](https://github.com/elastic/helm-charts/tree/7.7/metricbeat/examples) you will find some example configurations. These examples are used for the automated testing of this helm chart. +In [examples][] you will find some example configurations. These examples are +used for the automated testing of this Helm chart. ### Default -* Deploy the [default Elasticsearch helm chart](https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/README.md#default) -* Deploy Metricbeat with the default values +* Deploy the [default Elasticsearch Helm chart][]. +* Deploy Metricbeat with the default values: + ``` cd examples/default make ``` -* You can now setup a port forward for Elasticsearch to observe Metricbeat indices + +* You can now setup a port forward for Elasticsearch to observe Metricbeat +indices: + ``` kubectl port-forward svc/elasticsearch-master 9200 curl localhost:9200/_cat/indices ``` -## 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`](https://github.com/elastic/helm-charts/tree/7.7/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 -``` +## Contributing -It is possible to run all of the tests and linting inside of a docker container +Please check [CONTRIBUTING.md][] before any contribution or for any questions +about our development and testing process. -``` -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](https://github.com/elastic/helm-charts/tree/7.7/metricbeat/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 -``` +[BREAKING_CHANGES.md]: https://github.com/elastic/helm-charts/blob/master/BREAKING_CHANGES.md +[CHANGELOG.md]: https://github.com/elastic/helm-charts/blob/master/CHANGELOG.md +[CONTRIBUTING.md]: https://github.com/elastic/helm-charts/blob/master/CONTRIBUTING.md [affinity]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity [annotations]: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +[default elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/README.md#default [cluster role rules]: https://kubernetes.io/docs/reference/access-authn-authz/rbac/#role-and-clusterrole [environment variables]: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config [environment from variables]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables +[examples]: https://github.com/elastic/helm-charts/tree/7.7/metricbeat/examples +[helm]: https://helm.sh [hostPath]: https://kubernetes.io/docs/concepts/storage/volumes/#hostpath [imagePullPolicy]: https://kubernetes.io/docs/concepts/containers/images/#updating-images [imagePullSecrets]: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret -[label]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ -[liveness probe]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/ -[name of the PriorityClass]: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass +[kube-state-metrics]: https://github.com/helm/charts/tree/7.7/stable/kube-state-metrics +[labels]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +[metricbeat docker image]: https://www.elastic.co/guide/en/beats/metricbeat/current/running-on-docker.html +[priorityClass]: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass [nodeSelector]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector -[securityContext]: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ -[readiness probe]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/ +[parent readme]: https://github.com/elastic/helm-charts/tree/7.7/README.md +[probe]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes [resources]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ +[securityContext]: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ [serviceAccount]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ [tolerations]: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ [updateStrategy]: https://kubernetes.io/docs/tasks/manage-daemon/update-daemon-set/#daemonset-update-strategy -[values.yaml]: https://github.com/elastic/helm-charts/tree/master/metricbeat/values.yaml +[values.yaml]: https://github.com/elastic/helm-charts/tree/7.7/metricbeat/values.yaml diff --git a/metricbeat/examples/default/README.md b/metricbeat/examples/default/README.md new file mode 100644 index 000000000..b6913179b --- /dev/null +++ b/metricbeat/examples/default/README.md @@ -0,0 +1,27 @@ +# Default + +This example deploy Metricbeat 7.7.0-SNAPSHOT using [default values][]. + + +## Usage + +* Deploy [Elasticsearch Helm chart][]. + +* Deploy Metricbeat chart with the default values: `make install` + +* You can now setup a port forward to query Metricbeat indices: + + ``` + kubectl port-forward svc/elasticsearch-master 9200 + curl localhost:9200/_cat/indices + ``` + + +## Testing + +You can also run [goss integration tests][] using `make test` + + +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/default/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/metricbeat/examples/default/test/goss.yaml +[default values]: https://github.com/elastic/helm-charts/tree/7.7/metricbeat/values.yaml From f3f4e2781fe9aa14ccc8608eece0de17518d71c1 Mon Sep 17 00:00:00 2001 From: Julien Mailleret Date: Tue, 28 Apr 2020 19:47:45 +0200 Subject: [PATCH 21/44] FAQ and examples improvements (#598) (#600) FAQ and examples improvements (#598) - Add missing section in contributing guide - Add note about ECK - Add more FAQ topics - Document all examples - NIT: fixes typos... --- CONTRIBUTING.md | 16 ++ README.md | 22 +- apm-server/README.md | 42 +-- apm-server/examples/default/README.md | 27 ++ apm-server/examples/oss/README.md | 27 ++ apm-server/examples/security/README.md | 28 ++ elasticsearch/README.md | 271 ++++++++---------- elasticsearch/examples/config/README.md | 26 +- elasticsearch/examples/default/README.md | 25 ++ .../examples/docker-for-mac/README.md | 23 ++ .../examples/kubernetes-kind/README.md | 30 +- elasticsearch/examples/microk8s/README.md | 20 +- elasticsearch/examples/minikube/README.md | 38 +++ elasticsearch/examples/multi/README.md | 27 ++ elasticsearch/examples/openshift/README.md | 24 ++ elasticsearch/examples/oss/README.md | 23 ++ elasticsearch/examples/security/README.md | 29 ++ elasticsearch/examples/upgrade/README.md | 19 ++ elasticsearch/values.yaml | 2 +- filebeat/README.md | 55 ++-- filebeat/examples/default/README.md | 27 ++ filebeat/examples/oss/README.md | 27 ++ filebeat/examples/security/README.md | 28 ++ kibana/README.md | 111 ++++--- kibana/examples/default/README.md | 27 ++ kibana/examples/openshift/README.md | 26 ++ kibana/examples/oss/README.md | 27 ++ kibana/examples/security/README.md | 28 ++ logstash/README.md | 34 +-- logstash/examples/default/README.md | 17 ++ logstash/examples/elasticsearch/README.md | 28 ++ logstash/examples/oss/README.md | 17 ++ metricbeat/README.md | 85 ++++-- metricbeat/examples/oss/README.md | 27 ++ metricbeat/examples/security/README.md | 28 ++ 35 files changed, 1022 insertions(+), 289 deletions(-) create mode 100644 apm-server/examples/default/README.md create mode 100644 apm-server/examples/oss/README.md create mode 100644 apm-server/examples/security/README.md create mode 100644 elasticsearch/examples/default/README.md create mode 100644 elasticsearch/examples/docker-for-mac/README.md create mode 100644 elasticsearch/examples/minikube/README.md create mode 100644 elasticsearch/examples/multi/README.md create mode 100644 elasticsearch/examples/openshift/README.md create mode 100644 elasticsearch/examples/oss/README.md create mode 100644 elasticsearch/examples/security/README.md create mode 100644 elasticsearch/examples/upgrade/README.md create mode 100644 filebeat/examples/default/README.md create mode 100644 filebeat/examples/oss/README.md create mode 100644 filebeat/examples/security/README.md create mode 100644 kibana/examples/default/README.md create mode 100644 kibana/examples/openshift/README.md create mode 100644 kibana/examples/oss/README.md create mode 100644 kibana/examples/security/README.md create mode 100644 logstash/examples/default/README.md create mode 100644 logstash/examples/elasticsearch/README.md create mode 100644 logstash/examples/oss/README.md create mode 100644 metricbeat/examples/oss/README.md create mode 100644 metricbeat/examples/security/README.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 477c275db..89f4722a8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,6 +12,7 @@ - [Commits and Merging](#commits-and-merging) - [Rebasing and fixing merge conflicts](#rebasing-and-fixing-merge-conflicts) - [What Goes Into a Pull Request](#what-goes-into-a-pull-request) +- [Submitting a Pull Request](#submitting-a-pull-request) - [Releases](#releases) - [Testing](#testing) - [Templating tests](#templating-tests) @@ -169,6 +170,21 @@ appropriate. * See [Submitting a Pull Request](#submitting-a-pull-request) for more info. +## Submitting a Pull Request + +Push your local changes to your forked copy of the repository and submit a Pull +Request. In the Pull Request, describe what your changes do and mention the +number of the issue where discussion has taken place, e.g., “Closes #123″. + +Always submit your pull against `master` unless the bug is only present in an +older version. If the bug affects both master and another branch say so in your +pull. + +Then sit back and wait. There will probably be discussion about the Pull Request +and, if any changes are needed, we'll work with you to get your Pull Request +merged into Kibana. + + ## Releases Just like with the rest of the stack, all versions in this helm chart repo are diff --git a/README.md b/README.md index 8bab50ce9..ada0377f1 100644 --- a/README.md +++ b/README.md @@ -16,12 +16,12 @@ added below. | Chart | Docker documentation | |--------------------------------------------|---------------------------------------------------------------------------------| -| [APM-Server](./apm-server/README.md) | https://www.elastic.co/guide/en/apm/server/current/running-on-docker.html | -| [Elasticsearch](./elasticsearch/README.md) | https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html | -| [Filebeat](./filebeat/README.md) | https://www.elastic.co/guide/en/beats/filebeat/current/running-on-docker.html | -| [Kibana](./kibana/README.md) | https://www.elastic.co/guide/en/kibana/current/docker.html | -| [Logstash](./logstash/README.md) | https://www.elastic.co/guide/en/logstash/current/docker.html | -| [Metricbeat](./metricbeat/README.md) | https://www.elastic.co/guide/en/beats/metricbeat/current/running-on-docker.html | +| [APM-Server](./apm-server/README.md) | https://www.elastic.co/guide/en/apm/server/7.7/running-on-docker.html | +| [Elasticsearch](./elasticsearch/README.md) | https://www.elastic.co/guide/en/elasticsearch/reference/7.7/docker.html | +| [Filebeat](./filebeat/README.md) | https://www.elastic.co/guide/en/beats/filebeat/7.7/running-on-docker.html | +| [Kibana](./kibana/README.md) | https://www.elastic.co/guide/en/kibana/7.7/docker.html | +| [Logstash](./logstash/README.md) | https://www.elastic.co/guide/en/logstash/7.7/docker.html | +| [Metricbeat](./metricbeat/README.md) | https://www.elastic.co/guide/en/beats/metricbeat/7.7/running-on-docker.html | ## Kubernetes Versions @@ -35,7 +35,17 @@ While we are checking backward compatibility, the charts are only tested with Helm version mentioned in [helm-tester Dockerfile][] (currently 2.16.6). Note that we don't support [Helm 3][] version. +## ECK + +In addition of these Helm charts, Elastic also provides +[Elastic Cloud on Kubernetes][] which is based on [Operator pattern][] and is +Elastic recommended way to deploy Elasticsearch, Kibana and APM Server on +Kubernetes. + + [currently tested]: https://devops-ci.elastic.co/job/elastic+helm-charts+7.7/ +[elastic cloud on kubernetes]: https://github.com/elastic/cloud-on-k8s [helm 3]: https://v3.helm.sh [helm-tester Dockerfile]: https://github.com/elastic/helm-charts/blob/7.7/helpers/helm-tester/Dockerfile [helpers/matrix.yml]: https://github.com/elastic/helm-charts/blob/7.7/helpers/matrix.yml +[operator pattern]: https://kubernetes.io/docs/concepts/extend-kubernetes/operator/ diff --git a/apm-server/README.md b/apm-server/README.md index af9e7616a..3aa695991 100644 --- a/apm-server/README.md +++ b/apm-server/README.md @@ -10,8 +10,9 @@ - [Upgrading](#upgrading) - [Usage notes](#usage-notes) - [Configuration](#configuration) -- [Examples](#examples) - - [Default](#default) +- [FAQ](#faq) + - [How to use APM Server with Elasticsearch with security (authentication and TLS) enabled?](#how-to-use-apm-server-with-elasticsearch-with-security-authentication-and-tls-enabled) + - [How to install OSS version of APM Server?](#how-to-install-oss-version-of-apm-server) - [Contributing](#contributing) @@ -75,6 +76,9 @@ can easily be overridden in the config value `apmConfig.apm-server.yml`. * Automated testing of this chart is currently only run against GKE (Google Kubernetes Engine). +* This repo includes a number of [examples][] configurations which can be used +as a reference. They are also used in the automated testing of this chart. + ## Configuration @@ -115,28 +119,23 @@ Kubernetes Engine). | `updateStrategy` | Allows you to change the default [updateStrategy][] for the deployment | see [values.yaml][] | -## Examples - -In [examples][] you will find some example configurations. These examples are -used for the automated testing of this Helm chart. +## FAQ -### Default +### How to use APM Server with Elasticsearch with security (authentication and TLS) enabled? -* Deploy the [default Elasticsearch Helm chart][]. +This Helm chart can use existing [Kubernetes secrets][] to setup +credentials or certificates for examples. These secrets should be created +outside of this chart and accessed using [environment variables][] and volumes. -* Deploy APM Server with the default values: +An example can be found in [examples/security][]. - ``` - cd examples/default - make - ``` +### How to install OSS version of APM Server? -* You can now setup a port forward for Elasticsearch to observe APM indices: +Deploying OSS version of Elasticsearch can be done by setting `image` value to +[APM Server OSS Docker image][] - ``` - kubectl port-forward svc/elasticsearch-master 9200 - curl localhost:9200/_cat/indices - ``` +An example of APM Server deployment using OSS version can be found in +[examples/oss][]. ## Contributing @@ -150,15 +149,20 @@ about our development and testing process. [CONTRIBUTING.md]: https://github.com/elastic/helm-charts/blob/master/CONTRIBUTING.md [affinity]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity [annotations]: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ -[apm server docker image]: https://www.elastic.co/guide/en/apm/server/current/running-on-docker.html +[apm server docker image]: https://www.elastic.co/guide/en/apm/server/7.7/running-on-docker.html +[apm server oss docker image]: https://www.docker.elastic.co/#apm-server-7-7-0-oss [default elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/README.md#default [environment variables]: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config +[environment from variables]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables [examples]: https://github.com/elastic/helm-charts/tree/7.7/apm-server/examples +[examples/oss]: https://github.com/elastic/helm-charts/tree/7.7/apm-server/examples/oss +[examples/security]: https://github.com/elastic/helm-charts/tree/7.7/apm-server/examples/security [helm]: https://helm.sh [horizontal pod autoscaler]: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/ [imagePullPolicy]: https://kubernetes.io/docs/concepts/containers/images/#updating-images [imagePullSecrets]: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret [ingress]: https://kubernetes.io/docs/concepts/services-networking/ingress/ +[kubernetes secrets]: https://kubernetes.io/docs/concepts/configuration/secret/ [labels]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ [lifecycle hooks]: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/ [nodeSelector]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector diff --git a/apm-server/examples/default/README.md b/apm-server/examples/default/README.md new file mode 100644 index 000000000..8af8a5038 --- /dev/null +++ b/apm-server/examples/default/README.md @@ -0,0 +1,27 @@ +# Default + +This example deploy APM Server 7.7.0-SNAPSHOT using [default values][]. + + +## Usage + +* Deploy [Elasticsearch Helm chart][]. + +* Deploy APM Server chart with the default values: `make install` + +* You can now setup a port forward to query APM indices: + + ``` + kubectl port-forward svc/elasticsearch-master 9200 + curl localhost:9200/_cat/indices + ``` + + +## Testing + +You can also run [goss integration tests][] using `make test` + + +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/default/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/apm-server/examples/default/test/goss.yaml +[default values]: https://github.com/elastic/helm-charts/tree/7.7/apm-server/values.yaml diff --git a/apm-server/examples/oss/README.md b/apm-server/examples/oss/README.md new file mode 100644 index 000000000..e32234f8a --- /dev/null +++ b/apm-server/examples/oss/README.md @@ -0,0 +1,27 @@ +# OSS + +This example deploy APM Server 7.7.0-SNAPSHOT using [APM Server OSS][] version. + + +## Usage + +* Deploy [Elasticsearch Helm chart][]. + +* Deploy APM Server chart with the default values: `make install` + +* You can now setup a port forward to query APM indices: + + ``` + kubectl port-forward svc/oss-master 9200 + curl localhost:9200/_cat/indices + ``` + + +## Testing + +You can also run [goss integration tests][] using `make test` + + +[apm server oss]: https://www.elastic.co/downloads/apm-oss +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/oss/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/apm-server/examples/oss/test/goss.yaml diff --git a/apm-server/examples/security/README.md b/apm-server/examples/security/README.md new file mode 100644 index 000000000..517e53f86 --- /dev/null +++ b/apm-server/examples/security/README.md @@ -0,0 +1,28 @@ +# Security + +This example deploy APM Server 7.7.0-SNAPSHOT using authentication and TLS to connect to +Elasticsearch (see [values][]). + + +## Usage + +* Deploy [Elasticsearch Helm chart][]. + +* Deploy APM Server chart with security: `make install` + +* You can now setup a port forward to query APM indices: + + ``` + kubectl port-forward svc/security-master 9200 + curl -u elastic:changeme https://localhost:9200/_cat/indices + ``` + + +## Testing + +You can also run [goss integration tests][] using `make test` + + +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/security/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/apm-server/examples/security/test/goss.yaml +[values]: https://github.com/elastic/helm-charts/tree/7.7/apm-server/examples/security/values.yaml diff --git a/elasticsearch/README.md b/elasticsearch/README.md index aaecfdb79..ee568fa06 100644 --- a/elasticsearch/README.md +++ b/elasticsearch/README.md @@ -9,26 +9,22 @@ - [Using the 7.7 branch](#using-the-77-branch) - [Upgrading](#upgrading) - [Usage notes](#usage-notes) -- [Migration from helm/charts stable](#migration-from-helmcharts-stable) - [Configuration](#configuration) - [Deprecated](#deprecated) -- [Try it out](#try-it-out) - - [Default](#default) - - [Multi](#multi) - - [Security](#security) - [FAQ](#faq) + - [How to deploy this chart on a specific K8S distribution?](#how-to-deploy-this-chart-on-a-specific-k8s-distribution) + - [How to deploy dedicated nodes types?](#how-to-deploy-dedicated-nodes-types) + - [Clustering and Node Discovery](#clustering-and-node-discovery) + - [How to deploy clusters with security (authentication and TLS) enabled?](#how-to-deploy-clusters-with-security-authentication-and-tls-enabled) + - [How to migrate from helm/charts stable chart?](#how-to-migrate-from-helmcharts-stable-chart) + - [How to install OSS version of Elasticsearch?](#how-to-install-oss-version-of-elasticsearch) - [How to install plugins?](#how-to-install-plugins) - [How to use the keystore?](#how-to-use-the-keystore) - [Basic example](#basic-example) - [Multiple keys](#multiple-keys) - [Custom paths and keys](#custom-paths-and-keys) - [How to enable snapshotting?](#how-to-enable-snapshotting) -- [Local development environments](#local-development-environments) - - [Minikube](#minikube) - - [Docker for Mac - Kubernetes](#docker-for-mac---kubernetes) - - [KIND - Kubernetes](#kind---kubernetes) - - [MicroK8S](#microk8s) -- [Clustering and Node Discovery](#clustering-and-node-discovery) + - [How to configure templates post-deployment?](#how-to-configure-templates-post-deployment) - [Contributing](#contributing) @@ -112,12 +108,6 @@ 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][] chart -you can follow the [migration guide][]. - - ## Configuration | Parameter | Description | Default | @@ -145,7 +135,7 @@ you can follow the [migration guide][]. | `initResources` | Allows you to set the [resources][] for the `initContainer` in the StatefulSet | `{}` | | `keystore` | Allows you map Kubernetes secrets into the keystore. See the [config example][] and [how to use the keystore][] | `[]` | | `labels` | Configurable [labels][] applied to all Elasticsearch pods | `{}` | -| `lifecycle` | Allows you to add lifecycle configuration. See [values.yaml][] for an example of the formatting | `{}` | +| `lifecycle` | Allows you to add [lifecycle hooks][]. See [values.yaml][] for an example of the formatting | `{}` | | `masterService` | 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][] for more information | `""` | | `masterTerminationFix` | A workaround needed for Elasticsearch < 7.2 to prevent master status being lost during restarts [#63][] | `false` | | `maxUnavailable` | The [maxUnavailable][] value for the pod disruption budget. By default this will prevent Kubernetes from having more than 1 unhealthy pod in the node group | `1` | @@ -195,47 +185,80 @@ you can follow the [migration guide][]. | `fsGroup` | The Group ID (GID) for [securityContext][] so that the Elasticsearch user can read from the persistent volume | `""` | -## Try it out +## FAQ -In [examples][] you will find some example configurations. These examples are -used for the automated testing of this Helm chart. +### How to deploy this chart on a specific K8S distribution? -### Default +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][]. -To deploy a cluster with all default values and run the integration tests: +This chart is highly tested with [GKE][], but some K8S distribution also +requires specific configurations. -``` -cd examples/default -make -``` +We provide examples of configuration for the following K8S providers: -### Multi +- [Docker for Mac][] +- [KIND][] +- [Minikube][] +- [MicroK8S][] +- [OpenShift][] -A cluster with dedicated node types: +### How to deploy dedicated nodes types? -``` -cd examples/multi -make -``` +All the Elasticsearch pods deployed share the same configuration. If you need to +deploy dedicated [nodes types][] (for example dedicated master and data nodes), +you can deploy multiple releases of this chart with different configurations +while they share the same `clusterName` value. -### Security +For each Helm release, the nodes types can then be defined using `roles` value. -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][node-certificates]. +An example of Elasticsearch cluster using 2 different Helm releases for master +and data nodes can be found in [examples/multi][]. -Generate the certificates and install Elasticsearch: +#### Clustering and Node Discovery -``` -cd examples/security -make +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`. -# 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' -``` +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. -## FAQ +### How to deploy clusters with security (authentication and TLS) enabled? + +This Helm chart can use existing [Kubernetes secrets][] to setup +credentials or certificates for examples. These secrets should be created +outside of this chart and accessed using [environment variables][] and volumes. + +An example of Elasticsearch cluster using security can be found in +[examples/security][]. + +### How to migrate from helm/charts stable chart? + +If you currently have a cluster deployed with the [helm/charts stable][] chart +you can follow the [migration guide][]. + +### How to install OSS version of Elasticsearch? + +Deploying OSS version of Elasticsearch can be done by setting `image` value to +[Elasticsearch OSS Docker image][] + +An example of Elasticsearch cluster using OSS version can be found in +[examples/oss][]. ### How to install plugins? @@ -334,92 +357,32 @@ following the [how to use the keystore][] guide. there are plans to have Elasticsearch manage automated snapshots with [Snapshot Lifecycle Management][]. - -## 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][] 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][]: - -``` -cd examples/docker-for-mac -make +### How to configure templates post-deployment? + +You can use `postStart` [lifecycle hooks][] to run code triggered after a +container is created. + +Here is an example of `postStart` hook to configure templates: + +```yaml +lifecycle: + postStart: + exec: + command: + - bash + - -c + - | + #!/bin/bash + # Add a template to adjust number of shards/replicas + TEMPLATE_NAME=my_template + INDEX_PATTERN="logstash-*" + SHARD_COUNT=8 + REPLICA_COUNT=1 + ES_URL=http://localhost:9200 + while [[ "$(curl -s -o /dev/null -w '%{http_code}\n' $ES_URL)" != "200" ]]; do sleep 1; done + curl -XPUT "$ES_URL/_template/$TEMPLATE_NAME" -H 'Content-Type: application/json' -d'{"index_patterns":['\""$INDEX_PATTERN"\"'],"settings":{"number_of_shards":'$SHARD_COUNT',"number_of_replicas":'$REPLICA_COUNT'}}' ``` -### KIND - Kubernetes - -It is also possible to run this chart using a Kubernetes [KIND][] (Kubernetes in -Docker) cluster: - -``` -cd examples/kubernetes-kind -make -``` - -### MicroK8S - -It is also possible to run this chart using [MicroK8S][]: - -``` -microk8s.enable dns -microk8s.enable helm -microk8s.enable storage -cd examples/microk8s -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`. - ## Contributing @@ -434,57 +397,67 @@ about our development and testing process. [alternate scheduler]: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/#specify-schedulers-for-pods [annotations]: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ [anti-affinity]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity -[cluster.name]: https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster.name.html +[cluster.name]: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/cluster.name.html [clustering and node discovery]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/README.md#clustering-and-node-discovery [config example]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/config/values.yaml -[curator]: https://www.elastic.co/guide/en/elasticsearch/client/curator/current/snapshot.html -[custom docker image]: https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#_c_customized_image +[curator]: https://www.elastic.co/guide/en/elasticsearch/client/curator/7.7/snapshot.html +[custom docker image]: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/docker.html#_c_customized_image [deploys statefulsets serially]: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies -[discovery.zen.minimum_master_nodes]: https://www.elastic.co/guide/en/elasticsearch/reference/current/discovery-settings.html#minimum_master_nodes -[docker-for-mac]: https://docs.docker.com/docker-for-mac/kubernetes/ -[elasticsearch cluster health status params]: https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html#request-params -[elasticsearch docker image]: https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html +[discovery.zen.minimum_master_nodes]: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/discovery-settings.html#minimum_master_nodes +[docker for mac]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/docker-for-mac +[elasticsearch cluster health status params]: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/cluster-health.html#request-params +[elasticsearch docker image]: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/docker.html +[elasticsearch oss docker image]: https://www.docker.elastic.co/#elasticsearch-7-7-0-oss [environment variables]: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config +[environment from variables]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables [examples]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/ +[examples/multi]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/multi +[examples/oss]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/oss +[examples/security]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/security +[gke]: https://cloud.google.com/kubernetes-engine [helm]: https://helm.sh [helm/charts stable]: https://github.com/helm/charts/tree/master/stable/elasticsearch/ [how to install plugins guide]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/README.md#how-to-install-plugins [how to use the keystore]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/README.md#how-to-use-the-keystore -[http.port]: https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-http.html#_settings +[http.port]: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/modules-http.html#_settings [imagePullPolicy]: https://kubernetes.io/docs/concepts/containers/images/#updating-images [imagePullSecrets]: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret [ingress]: https://kubernetes.io/docs/concepts/services-networking/ingress/ -[java options]: https://www.elastic.co/guide/en/elasticsearch/reference/current/jvm-options.html -[jvm heap size]: https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html -[kind]: https://github.com/kubernetes-sigs/kind +[java options]: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/jvm-options.html +[jvm heap size]: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/heap-size.html +[kind]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/kubernetes-kind +[kubernetes secrets]: https://kubernetes.io/docs/concepts/configuration/secret/ [labels]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +[lifecycle hooks]: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/ [loadBalancer annotations]: https://kubernetes.io/docs/concepts/services-networking/service/#ssl-support-on-aws [loadBalancer]: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer [maxUnavailable]: https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget [migration guide]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/migration/README.md -[minikube]: https://kubernetes.io/docs/setup/minikube/ -[microk8s]: https://microk8s.io +[minikube]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/minikube +[microk8s]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/microk8s [multi]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/multi/ -[network.host elasticsearch setting]: https://www.elastic.co/guide/en/elasticsearch/reference/current/network.host.html +[network.host elasticsearch setting]: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/network.host.html [node affinity settings]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature -[node-certificates]: https://www.elastic.co/guide/en/elasticsearch/reference/current/configuring-tls.html#node-certificates +[node-certificates]: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/configuring-tls.html#node-certificates [nodePort]: https://kubernetes.io/docs/concepts/services-networking/service/#nodeport +[nodes types]: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/modules-node.html [nodeSelector]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector +[openshift]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/openshift [parent readme]: https://github.com/elastic/helm-charts/tree/7.7/README.md [priorityClass]: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass [probe]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/ [resources]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ -[roles]: https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-node.html +[roles]: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/modules-node.html [secret]: https://kubernetes.io/docs/concepts/configuration/secret/#using-secrets [securityContext]: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ [service types]: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types [snapshot lifecycle management]: https://github.com/elastic/elasticsearch/issues/38461 -[snapshot plugin]: https://www.elastic.co/guide/en/elasticsearch/plugins/current/repository.html -[snapshot repository]: https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html -[sysctl vm.max_map_count]: https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html#vm-max-map-count +[snapshot plugin]: https://www.elastic.co/guide/en/elasticsearch/plugins/7.7/repository.html +[snapshot repository]: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/modules-snapshots.html +[sysctl vm.max_map_count]: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/vm-max-map-count.html#vm-max-map-count [terminationGracePeriod]: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods [tolerations]: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ -[transport port configuration]: https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-transport.html#_transport_settings +[transport port configuration]: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/modules-transport.html#_transport_settings [updateStrategy]: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/ [values.yaml]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/values.yaml [volumeClaimTemplate for statefulsets]: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#stable-storage diff --git a/elasticsearch/examples/config/README.md b/elasticsearch/examples/config/README.md index d98d836bf..98d1360f5 100644 --- a/elasticsearch/examples/config/README.md +++ b/elasticsearch/examples/config/README.md @@ -1,3 +1,27 @@ # Config -An example testing suite for testing some of the optional features of this chart. +This example deploy a single node Elasticsearch 7.7.0-SNAPSHOT with authentication and +custom [values][]. + + +## Usage + +* Create the required secrets: `make secrets` + +* Deploy Elasticsearch chart with the default values: `make install` + +* You can now setup a port forward to query Elasticsearch API: + + ``` + kubectl port-forward svc/config-master 9200 + curl -u elastic:changeme http://localhost:9200/_cat/indices + ``` + + +## Testing + +You can also run [goss integration tests][] using `make test` + + +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/config/test/goss.yaml +[values]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/config/values.yaml diff --git a/elasticsearch/examples/default/README.md b/elasticsearch/examples/default/README.md new file mode 100644 index 000000000..495e2a1ac --- /dev/null +++ b/elasticsearch/examples/default/README.md @@ -0,0 +1,25 @@ +# Default + +This example deploy a 3 nodes Elasticsearch 7.7.0-SNAPSHOT cluster using +[default values][]. + + +## Usage + +* Deploy Elasticsearch chart with the default values: `make install` + +* You can now setup a port forward to query Elasticsearch API: + + ``` + kubectl port-forward svc/elasticsearch-master 9200 + curl localhost:9200/_cat/indices + ``` + + +## Testing + +You can also run [goss integration tests][] using `make test` + + +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/default/test/goss.yaml +[default values]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/values.yaml diff --git a/elasticsearch/examples/docker-for-mac/README.md b/elasticsearch/examples/docker-for-mac/README.md new file mode 100644 index 000000000..569bd416d --- /dev/null +++ b/elasticsearch/examples/docker-for-mac/README.md @@ -0,0 +1,23 @@ +# Docker for Mac + +This example deploy a 3 nodes Elasticsearch 7.7.0-SNAPSHOT cluster on [Docker for Mac][] +using [custom values][]. + +Note that this configuration should be used for test only and isn't recommended +for production. + + +## Usage + +* Deploy Elasticsearch chart with the default values: `make install` + +* You can now setup a port forward to query Elasticsearch API: + + ``` + kubectl port-forward svc/elasticsearch-master 9200 + curl localhost:9200/_cat/indices + ``` + + +[custom values]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/docker-for-mac/values.yaml +[docker for mac]: https://docs.docker.com/docker-for-mac/kubernetes/ diff --git a/elasticsearch/examples/kubernetes-kind/README.md b/elasticsearch/examples/kubernetes-kind/README.md index 3dfbe2f75..76ce26646 100644 --- a/elasticsearch/examples/kubernetes-kind/README.md +++ b/elasticsearch/examples/kubernetes-kind/README.md @@ -1,13 +1,13 @@ # KIND -An example of configuration for deploying Elasticsearch chart on [Kind][]. - -You can use `make install` to deploy it. +This example deploy a 3 nodes Elasticsearch 7.7.0-SNAPSHOT cluster on [Kind][] +using [custom values][]. Note that this configuration should be used for test only and isn't recommended for production. -## Current issue + +## Requirements There is currently an [kind issue][] with mount points created from PVCs not writable by non-root users. [kubernetes-sigs/kind#1157][] should fix it in a @@ -17,8 +17,22 @@ Meanwhile, the workaround is to install manually [Rancher Local Path Provisioner][] and use `local-path` storage class for Elasticsearch volumes (see [Makefile][] instructions). -[Kind]: https://kind.sigs.k8s.io/ -[Kind issue]: https://github.com/kubernetes-sigs/kind/issues/830 -[Kubernetes-sigs/kind#1157]: https://github.com/kubernetes-sigs/kind/pull/1157 -[Rancher Local Path Provisioner]: https://github.com/rancher/local-path-provisioner + +## Usage + +* Deploy Elasticsearch chart with the default values: `make install` + +* You can now setup a port forward to query Elasticsearch API: + + ``` + kubectl port-forward svc/elasticsearch-master 9200 + curl localhost:9200/_cat/indices + ``` + + +[custom values]: https://github.com/elastic/helm-charts/blob/7.7/elasticsearch/examples/kubernetes-kind/values.yaml +[kind]: https://kind.sigs.k8s.io/ +[kind issue]: https://github.com/kubernetes-sigs/kind/issues/830 +[kubernetes-sigs/kind#1157]: https://github.com/kubernetes-sigs/kind/pull/1157 +[rancher local path provisioner]: https://github.com/rancher/local-path-provisioner [Makefile]: https://github.com/elastic/helm-charts/blob/7.7/elasticsearch/examples/kubernetes-kind/Makefile#L5 diff --git a/elasticsearch/examples/microk8s/README.md b/elasticsearch/examples/microk8s/README.md index 161279cb3..487899d85 100644 --- a/elasticsearch/examples/microk8s/README.md +++ b/elasticsearch/examples/microk8s/README.md @@ -1,10 +1,12 @@ # MicroK8S -An example of configuration for deploying Elasticsearch chart on [MicroK8S][]. +This example deploy a 3 nodes Elasticsearch 7.7.0-SNAPSHOT cluster on [MicroK8S][] +using [custom values][]. Note that this configuration should be used for test only and isn't recommended for production. + ## Requirements The following MicroK8S [addons][] need to be enabled: @@ -12,5 +14,19 @@ The following MicroK8S [addons][] need to be enabled: - `helm` - `storage` + +## Usage + +* Deploy Elasticsearch chart with the default values: `make install` + +* You can now setup a port forward to query Elasticsearch API: + + ``` + kubectl port-forward svc/elasticsearch-master 9200 + curl localhost:9200/_cat/indices + ``` + + +[addons]: https://microk8s.io/docs/addons +[custom values]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/microk8s/values.yaml [MicroK8S]: https://microk8s.io -[Addons]: https://microk8s.io/docs/addons \ No newline at end of file diff --git a/elasticsearch/examples/minikube/README.md b/elasticsearch/examples/minikube/README.md new file mode 100644 index 000000000..08f4f4fc4 --- /dev/null +++ b/elasticsearch/examples/minikube/README.md @@ -0,0 +1,38 @@ +# Minikube + +This example deploy a 3 nodes Elasticsearch 7.7.0-SNAPSHOT cluster on [Minikube][] +using [custom values][]. + +If helm or kubectl timeouts occur, you may consider creating a minikube VM with +more CPU cores or memory allocated. + +Note that this configuration should be used for test only and isn't recommended +for production. + + +## Requirements + +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 +``` + + +## Usage + +* Deploy Elasticsearch chart with the default values: `make install` + +* You can now setup a port forward to query Elasticsearch API: + + ``` + kubectl port-forward svc/elasticsearch-master 9200 + curl localhost:9200/_cat/indices + ``` + + +[custom values]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/minikube/values.yaml +[minikube]: https://minikube.sigs.k8s.io/docs/ diff --git a/elasticsearch/examples/multi/README.md b/elasticsearch/examples/multi/README.md new file mode 100644 index 000000000..410391dbd --- /dev/null +++ b/elasticsearch/examples/multi/README.md @@ -0,0 +1,27 @@ +# Multi + +This example deploy an Elasticsearch 7.7.0-SNAPSHOT cluster composed of 2 different Helm +releases: + +- `helm-es-multi-master` for the 3 master nodes using [master values][] +- `helm-es-multi-data` for the 3 data nodes using [data values][] + +## Usage + +* Deploy the 2 Elasticsearch releases: `make install` + +* You can now setup a port forward to query Elasticsearch API: + + ``` + kubectl port-forward svc/multi-master 9200 + curl -u elastic:changeme http://localhost:9200/_cat/indices + ``` + +## Testing + +You can also run [goss integration tests][] using `make test` + + +[data values]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/multi/data.yaml +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/multi/test/goss.yaml +[master values]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/multi/master.yaml diff --git a/elasticsearch/examples/openshift/README.md b/elasticsearch/examples/openshift/README.md new file mode 100644 index 000000000..53a924a25 --- /dev/null +++ b/elasticsearch/examples/openshift/README.md @@ -0,0 +1,24 @@ +# OpenShift + +This example deploy a 3 nodes Elasticsearch 7.7.0-SNAPSHOT cluster on [OpenShift][] +using [custom values][]. + +## Usage + +* Deploy Elasticsearch chart with the default values: `make install` + +* You can now setup a port forward to query Elasticsearch API: + + ``` + kubectl port-forward svc/elasticsearch-master 9200 + curl localhost:9200/_cat/indices + ``` + +## Testing + +You can also run [goss integration tests][] using `make test` + + +[custom values]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/openshift/values.yaml +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/openshift/test/goss.yaml +[openshift]: https://www.openshift.com/ diff --git a/elasticsearch/examples/oss/README.md b/elasticsearch/examples/oss/README.md new file mode 100644 index 000000000..67a36b114 --- /dev/null +++ b/elasticsearch/examples/oss/README.md @@ -0,0 +1,23 @@ +# OSS + +This example deploy a 3 nodes Elasticsearch 7.7.0-SNAPSHOT cluster using +[Elasticsearch OSS][] version. + +## Usage + +* Deploy Elasticsearch chart with the default values: `make install` + +* You can now setup a port forward to query Elasticsearch API: + + ``` + kubectl port-forward svc/oss-master 9200 + curl localhost:9200/_cat/indices + ``` + +## Testing + +You can also run [goss integration tests][] using `make test` + + +[elasticsearch oss]: https://www.elastic.co/downloads/elasticsearch-oss +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/oss/test/goss.yaml diff --git a/elasticsearch/examples/security/README.md b/elasticsearch/examples/security/README.md new file mode 100644 index 000000000..1fdcf0d94 --- /dev/null +++ b/elasticsearch/examples/security/README.md @@ -0,0 +1,29 @@ +# Security + +This example deploy a 3 nodes Elasticsearch 7.7.0-SNAPSHOT with authentication and +autogenerated certificates for TLS (see [values][]). + +Note that this configuration should be used for test only. For a production +deployment you should generate SSL certificates following the [official docs][]. + +## Usage + +* Create the required secrets: `make secrets` + +* Deploy Elasticsearch chart with the default values: `make install` + +* You can now setup a port forward to query Elasticsearch API: + + ``` + kubectl port-forward svc/security-master 9200 + curl -u elastic:changeme https://localhost:9200/_cat/indices + ``` + +## Testing + +You can also run [goss integration tests][] using `make test` + + +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/security/test/goss.yaml +[official docs]: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/configuring-tls.html#node-certificates +[values]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/security/security.yaml diff --git a/elasticsearch/examples/upgrade/README.md b/elasticsearch/examples/upgrade/README.md new file mode 100644 index 000000000..28cdb46e9 --- /dev/null +++ b/elasticsearch/examples/upgrade/README.md @@ -0,0 +1,19 @@ +# Upgrade + +This example deploy a 3 nodes Elasticsearch cluster using [7.0.0-alpha1][] chart +version, then upgrade it to 7.7.0-SNAPSHOT version. + + +## Usage + +Running `make install` command will do both 7.0.0-alpha1 install and 7.7.0-SNAPSHOT +upgrade + + +## Testing + +You can also run [goss integration tests][] using `make test` + + +[7.0.0-alpha1]: https://github.com/elastic/helm-charts/releases/tag/7.0.0-alpha1 +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/upgrade/test/goss.yaml diff --git a/elasticsearch/values.yaml b/elasticsearch/values.yaml index a4de388a8..1f7b0bab3 100755 --- a/elasticsearch/values.yaml +++ b/elasticsearch/values.yaml @@ -204,7 +204,7 @@ readinessProbe: successThreshold: 3 timeoutSeconds: 5 -# https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html#request-params wait_for_status +# https://www.elastic.co/guide/en/elasticsearch/reference/7.7/cluster-health.html#request-params wait_for_status clusterHealthCheckParams: "wait_for_status=green&timeout=1s" ## Use an alternate scheduler. diff --git a/filebeat/README.md b/filebeat/README.md index 98e2047eb..11ae6a9cd 100644 --- a/filebeat/README.md +++ b/filebeat/README.md @@ -10,8 +10,10 @@ - [Upgrading](#upgrading) - [Usage notes](#usage-notes) - [Configuration](#configuration) -- [Examples](#examples) - - [Default](#default) +- [FAQ](#faq) + - [How to use Filebeat with Elasticsearch with security (authentication and TLS) enabled?](#how-to-use-filebeat-with-elasticsearch-with-security-authentication-and-tls-enabled) + - [How to install OSS version of Filebeat?](#how-to-install-oss-version-of-filebeat) + - [Why is Filebeat host.name field set to Kubernetes pod name?](#why-is-filebeat-hostname-field-set-to-kubernetes-pod-name) - [Contributing](#contributing) @@ -84,6 +86,8 @@ pods on the same node isn't possible with `hostNetwork` However Filebeat does recommend activating it. If your kubernetes provider is compatible with `hostNetwork` and you don't need to run multiple Filebeat DaemonSets, you can activate it by setting `hostNetworking: true` in [values.yaml][]. +* This repo includes a number of [examples][] configurations which can be used +as a reference. They are also used in the automated testing of this chart. ## Configuration @@ -122,28 +126,36 @@ activate it by setting `hostNetworking: true` in [values.yaml][]. | `updateStrategy` | The [updateStrategy][] for the `DaemonSet`. By default Kubernetes will kill and recreate pods on updates. Setting this to `OnDelete` will require that pods be deleted manually | `RollingUpdate` | -## Examples +## FAQ -In [examples][] you will find some example configurations. These examples are -used for the automated testing of this Helm chart. +### How to use Filebeat with Elasticsearch with security (authentication and TLS) enabled? -### Default +This Helm chart can use existing [Kubernetes secrets][] to setup +credentials or certificates for examples. These secrets should be created +outside of this chart and accessed using [environment variables][] and volumes. -* Deploy the [default Filebeat Helm chart][]. -* Deploy Filebeat with the default values: +An example can be found in [examples/security][]. - ``` - cd examples/default - make - ``` +### How to install OSS version of Filebeat? -* You can now setup a port forward for Filebeat to observe Filebeat -indices: +Deploying OSS version of Elasticsearch can be done by setting `image` value to +[Filebeat OSS Docker image][] - ``` - kubectl port-forward svc/filebeat-master 9200 - curl localhost:9200/_cat/indices - ``` +An example of Filebeat deployment using OSS version can be found in +[examples/oss][]. + +### Why is Filebeat host.name field set to Kubernetes pod name? + +The default Filebeat configuration is using Filebeat pod name for +`agent.hostname` and `host.name` fields. The `hostname` of the Kubernetes nodes +can be find in `kubernetes.node.name` field. If you would like to have +`agent.hostname` and `host.name` fields set to the hostname of the nodes, you'll +need to set `daemonset.hostNetworking` value to true. + +Note that enabling [hostNetwork][] make Filebeat pod use the host network +namespace which gives it access to the host loopback device, services listening +on localhost, could be used to snoop on network activity of other pods on the +same node. ## Contributing @@ -159,13 +171,18 @@ about our development and testing process. [annotations]: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ [default Filebeat Helm chart]: https://github.com/elastic/helm-charts/tree/7.7/filebeat/README.md#default [environment variables]: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config +[environment from variables]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables [examples]: https://github.com/elastic/helm-charts/tree/7.7/filebeat/examples -[filebeat docker image]: https://www.elastic.co/guide/en/beats/filebeat/current/running-on-docker.html +[examples/oss]: https://github.com/elastic/helm-charts/tree/7.7/filebeat/examples/oss +[examples/security]: https://github.com/elastic/helm-charts/tree/7.7/filebeat/examples/security +[filebeat docker image]: https://www.elastic.co/guide/en/beats/filebeat/7.7/running-on-docker.html +[filebeat oss docker image]: https://www.docker.elastic.co/#filebeat-7-7-0-oss [helm]: https://helm.sh [hostNetwork]: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#host-namespaces [hostPath]: https://kubernetes.io/docs/concepts/storage/volumes/#hostpath [imagePullPolicy]: https://kubernetes.io/docs/concepts/containers/images/#updating-images [imagePullSecrets]: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret +[kubernetes secrets]: https://kubernetes.io/docs/concepts/configuration/secret/ [labels]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ [parent readme]: https://github.com/elastic/helm-charts/tree/7.7/README.md [nodeSelector]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector diff --git a/filebeat/examples/default/README.md b/filebeat/examples/default/README.md new file mode 100644 index 000000000..aee7abde5 --- /dev/null +++ b/filebeat/examples/default/README.md @@ -0,0 +1,27 @@ +# Default + +This example deploy Filebeat 7.7.0-SNAPSHOT using [default values][]. + + +## Usage + +* Deploy [Elasticsearch Helm chart][]. + +* Deploy Filebeat chart with the default values: `make install` + +* You can now setup a port forward to query Filebeat indices: + + ``` + kubectl port-forward svc/elasticsearch-master 9200 + curl localhost:9200/_cat/indices + ``` + + +## Testing + +You can also run [goss integration tests][] using `make test` + + +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/default/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/filebeat/examples/default/test/goss.yaml +[default values]: https://github.com/elastic/helm-charts/tree/7.7/filebeat/values.yaml diff --git a/filebeat/examples/oss/README.md b/filebeat/examples/oss/README.md new file mode 100644 index 000000000..b964ab23a --- /dev/null +++ b/filebeat/examples/oss/README.md @@ -0,0 +1,27 @@ +# OSS + +This example deploy Filebeat 7.7.0-SNAPSHOT using [Filebeat OSS][] version. + + +## Usage + +* Deploy [Elasticsearch Helm chart][]. + +* Deploy Filebeat chart with the default values: `make install` + +* You can now setup a port forward to query Filebeat indices: + + ``` + kubectl port-forward svc/oss-master 9200 + curl localhost:9200/_cat/indices + ``` + + +## Testing + +You can also run [goss integration tests][] using `make test` + + +[filebeat oss]: https://www.elastic.co/downloads/beats/filebeat-oss +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/oss/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/filebeat/examples/oss/test/goss.yaml diff --git a/filebeat/examples/security/README.md b/filebeat/examples/security/README.md new file mode 100644 index 000000000..c88e277ca --- /dev/null +++ b/filebeat/examples/security/README.md @@ -0,0 +1,28 @@ +# Security + +This example deploy Filebeat 7.7.0-SNAPSHOT using authentication and TLS to connect to +Elasticsearch (see [values][]). + + +## Usage + +* Deploy [Elasticsearch Helm chart][]. + +* Deploy Filebeat chart with security: `make install` + +* You can now setup a port forward to query Filebeat indices: + + ``` + kubectl port-forward svc/security-master 9200 + curl -u elastic:changeme https://localhost:9200/_cat/indices + ``` + + +## Testing + +You can also run [goss integration tests][] using `make test` + + +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/security/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/filebeat/examples/security/test/goss.yaml +[values]: https://github.com/elastic/helm-charts/tree/7.7/filebeat/examples/security/values.yaml diff --git a/kibana/README.md b/kibana/README.md index ebb79db5d..8eaca9a39 100644 --- a/kibana/README.md +++ b/kibana/README.md @@ -8,13 +8,15 @@ - [Using Helm repository](#using-helm-repository) - [Using the 7.7 branch](#using-the-77-branch) - [Upgrading](#upgrading) +- [Usage notes](#usage-notes) - [Configuration](#configuration) - [Deprecated](#deprecated) -- [Examples](#examples) - - [Default](#default) - - [Security](#security) - [FAQ](#faq) + - [How to deploy this chart on a specific K8S distribution?](#how-to-deploy-this-chart-on-a-specific-k8s-distribution) + - [How to use Kibana with security (authentication and TLS) enabled?](#how-to-use-kibana-with-security-authentication-and-tls-enabled) + - [How to install OSS version of Kibana?](#how-to-install-oss-version-of-kibana) - [How to install plugins?](#how-to-install-plugins) + - [How to import objects post-deployment?](#how-to-import-objects-post-deployment) - [Contributing](#contributing) @@ -69,6 +71,15 @@ Please always check [CHANGELOG.md][] and [BREAKING_CHANGES.md][] before upgrading to a new chart version. +## Usage notes + +* Automated testing of this chart is currently only run against GKE (Google +Kubernetes Engine). + +* This repo includes a number of [examples][] configurations which can be used +as a reference. They are also used in the automated testing of this chart. + + ## Configuration | Parameter | Description | Default | @@ -89,7 +100,7 @@ upgrading to a new chart version. | `ingress` | Configurable [ingress][] to expose the Kibana service. | see [values.yaml][] | | `kibanaConfig` | Allows you to add any config files in `/usr/share/kibana/config/` such as `kibana.yml` See [values.yaml][] for an example of the formatting | `{}` | | `labels` | Configurable [labels][] applied to all Kibana pods | `{}` | -| `lifecycle` | Allows you to add lifecycle configuration. See [values.yaml][] for an example of the formatting | `{}` | +| `lifecycle` | Allows you to add [lifecycle hooks][]. See [values.yaml][] for an example of the formatting | `{}` | | `nameOverride` | Overrides the chart name for resources. If not set the name will default to `.Chart.Name` | `""` | | `nodeSelector` | Configurable [nodeSelector][] so that you can target specific nodes for your Kibana instances | `{}` | | `podAnnotations` | Configurable [annotations][] applied to all Kibana pods | `{}` | @@ -114,55 +125,32 @@ upgrading to a new chart version. | `elasticsearchURL` | The URL used to connect to Elasticsearch. needs to be used for Kibana versions < 6.6 | `""` | -## Examples - -In [examples][] you will find some example configurations. These examples are -used for the automated testing of this Helm chart. - -### Default - -* Deploy the [default Elasticsearch Helm chart][]. -* Deploy Kibana with the default values: - - ``` - cd examples/default - make - ``` - -* You can now setup a port forward and access Kibana at http://localhost:5601: +## FAQ - ``` - kubectl port-forward deployment/helm-kibana-default-kibana 5601 - ``` +### How to deploy this chart on a specific K8S distribution? -### Security +This chart is highly tested with [GKE][], but some K8S distribution also +requires specific configurations. -* Deploy a [security enabled Elasticsearch cluster][]. -* Deploy Kibana with the security example: +We provide examples of configuration for the following K8S providers: - ``` - cd examples/security - make - ``` +- [OpenShift][] -* Setup a port forward and access Kibana at https://localhost:5601: +### How to use Kibana with security (authentication and TLS) enabled? - ``` - # Setup the port forward - kubectl port-forward deployment/helm-kibana-security-kibana 5601 +This Helm chart can use existing [Kubernetes secrets][] to setup +credentials or certificates for examples. These secrets should be created +outside of this chart and accessed using [environment variables][] and volumes. - # Run this in a seperate terminal - # Get the auto generated password - password=$(kubectl get secret elastic-credentials -o jsonpath='{.data.password}' | base64 --decode) - echo password +An example can be found in [examples/security][]. - # Test Kibana is working with curl or access it with your browser at https://localhost:5601 - # The example certificate is self signed so you may see a warning about the certificate - curl -I -k -u elastic:$password https://localhost:5601/app/kibana - ``` +### How to install OSS version of Kibana? +Deploying OSS version of Elasticsearch can be done by setting `image` value to +[kibana OSS Docker image][] -## FAQ +An example of APM Server deployment using OSS version can be found in +[examples/oss][]. ### How to install plugins? @@ -189,6 +177,29 @@ 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 import objects post-deployment? + +You can use `postStart` [lifecycle hooks][] to run code triggered after a +container is created. + +Here is an example of `postStart` hook to import an index-pattern and a +dashboard: + +```yaml +lifecycle: + postStart: + exec: + command: + - bash + - -c + - | + #!/bin/bash + # Import a dashboard + KB_URL=http://localhost:5601 + while [[ "$(curl -s -o /dev/null -w '%{http_code}\n' -L $KB_URL)" != "200" ]]; do sleep 1; done + curl -XPOST "$KB_URL/api/kibana/dashboards/import" -H "Content-Type: application/json" -H 'kbn-xsrf: true' -d'"objects":[{"type":"index-pattern","id":"my-pattern","attributes":{"title":"my-pattern-*"}},{"type":"dashboard","id":"my-dashboard","attributes":{"title":"Look at my dashboard"}}]}' +``` + ## Contributing @@ -199,27 +210,35 @@ about our development and testing process. [BREAKING_CHANGES.md]: https://github.com/elastic/helm-charts/blob/master/BREAKING_CHANGES.md [CHANGELOG.md]: https://github.com/elastic/helm-charts/blob/master/CHANGELOG.md [CONTRIBUTING.md]: https://github.com/elastic/helm-charts/blob/master/CONTRIBUTING.md +[affinity]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity [annotations]: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ [default elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/README.md#default [environment variables]: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config -[kibana docker image]: https://www.elastic.co/guide/en/kibana/current/docker.html +[environment from variables]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables [examples]: https://github.com/elastic/helm-charts/tree/7.7/kibana/examples +[examples/oss]: https://github.com/elastic/helm-charts/tree/7.7/kibana/examples/oss +[examples/security]: https://github.com/elastic/helm-charts/tree/7.7/kibana/examples/security [helm]: https://helm.sh [imagePullPolicy]: https://kubernetes.io/docs/concepts/containers/images/#updating-images [imagePullSecrets]: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret [ingress]: https://kubernetes.io/docs/concepts/services-networking/ingress/ +[kibana docker image]: https://www.elastic.co/guide/en/kibana/7.7/docker.html +[kibana oss docker image]: https://www.docker.elastic.co/#kibana-7-7-0-oss +[kubernetes secrets]: https://kubernetes.io/docs/concepts/configuration/secret/ [labels]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +[lifecycle hooks]: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/ [nodeSelector]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector +[openshift]: https://github.com/elastic/helm-charts/tree/7.7/kibana/examples/openshift [parent readme]: https://github.com/elastic/helm-charts/tree/7.7/README.md [priorityClass]: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass [probe]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/ [resources]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ [security enabled elasticsearch cluster]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/README.md#security [securityContext]: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod -[server.host]: https://www.elastic.co/guide/en/kibana/current/settings.html +[server.host]: https://www.elastic.co/guide/en/kibana/7.7/settings.html [service]: https://kubernetes.io/docs/concepts/services-networking/service/ [serviceAccount]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ -[standard upgrade]: https://www.elastic.co/guide/en/kibana/current/upgrade-standard.html +[standard upgrade]: https://www.elastic.co/guide/en/kibana/7.7/upgrade-standard.html [tolerations]: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ [updateStrategy]: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#updating-a-deployment [values.yaml]: https://github.com/elastic/helm-charts/tree/7.7/kibana/values.yaml diff --git a/kibana/examples/default/README.md b/kibana/examples/default/README.md new file mode 100644 index 000000000..b06e0188e --- /dev/null +++ b/kibana/examples/default/README.md @@ -0,0 +1,27 @@ +# Default + +This example deploy Kibana 7.7.0-SNAPSHOT using [default values][]. + + +## Usage + +* Deploy [Elasticsearch Helm chart][]. + +* Deploy Kibana chart with the default values: `make install` + +* You can now setup a port forward to query Kibana indices: + + ``` + kubectl port-forward svc/elasticsearch-master 9200 + curl localhost:9200/_cat/indices + ``` + + +## Testing + +You can also run [goss integration tests][] using `make test` + + +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/default/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/kibana/examples/default/test/goss.yaml +[default values]: https://github.com/elastic/helm-charts/tree/7.7/kibana/values.yaml diff --git a/kibana/examples/openshift/README.md b/kibana/examples/openshift/README.md new file mode 100644 index 000000000..d8eefbb54 --- /dev/null +++ b/kibana/examples/openshift/README.md @@ -0,0 +1,26 @@ +# OpenShift + +This example deploy Kibana 7.7.0-SNAPSHOT on [OpenShift][] using [custom values][]. + +## Usage + +* Deploy [Elasticsearch Helm chart][]. + +* Deploy Kibana chart with the default values: `make install` + +* You can now setup a port forward to query Elasticsearch API: + + ``` + kubectl port-forward svc/elasticsearch-master 9200 + curl localhost:9200/_cat/indices + ``` + +## Testing + +You can also run [goss integration tests][] using `make test` + + +[custom values]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/openshift/values.yaml +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/openshift/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/openshift/test/goss.yaml +[openshift]: https://www.openshift.com/ diff --git a/kibana/examples/oss/README.md b/kibana/examples/oss/README.md new file mode 100644 index 000000000..a4d5896ff --- /dev/null +++ b/kibana/examples/oss/README.md @@ -0,0 +1,27 @@ +# OSS + +This example deploy Kibana 7.7.0-SNAPSHOT using [Kibana OSS][] version. + + +## Usage + +* Deploy [Elasticsearch Helm chart][]. + +* Deploy Kibana chart with the default values: `make install` + +* You can now setup a port forward to query Kibana indices: + + ``` + kubectl port-forward svc/oss-master 9200 + curl localhost:9200/_cat/indices + ``` + + +## Testing + +You can also run [goss integration tests][] using `make test` + + +[kibana oss]: https://www.elastic.co/downloads/kibana-oss +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/oss/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/kibana/examples/oss/test/goss.yaml diff --git a/kibana/examples/security/README.md b/kibana/examples/security/README.md new file mode 100644 index 000000000..e54c091e6 --- /dev/null +++ b/kibana/examples/security/README.md @@ -0,0 +1,28 @@ +# Security + +This example deploy Kibana 7.7.0-SNAPSHOT using authentication and TLS to connect to +Elasticsearch (see [values][]). + + +## Usage + +* Deploy [Elasticsearch Helm chart][]. + +* Deploy Kibana chart with security: `make install` + +* You can now setup a port forward to query Kibana indices: + + ``` + kubectl port-forward svc/security-master 9200 + curl -u elastic:changeme https://localhost:9200/_cat/indices + ``` + + +## Testing + +You can also run [goss integration tests][] using `make test` + + +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/security/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/kibana/examples/security/test/goss.yaml +[values]: https://github.com/elastic/helm-charts/tree/7.7/kibana/examples/security/security.yaml diff --git a/logstash/README.md b/logstash/README.md index 4000b5668..d2f6686fb 100644 --- a/logstash/README.md +++ b/logstash/README.md @@ -10,9 +10,8 @@ - [Upgrading](#upgrading) - [Usage notes](#usage-notes) - [Configuration](#configuration) -- [Try it out](#try-it-out) - - [Default](#default) - [FAQ](#faq) + - [How to install OSS version of Logstash?](#how-to-install-oss-version-of-logstash) - [How to install plugins?](#how-to-install-plugins) - [Contributing](#contributing) @@ -145,22 +144,15 @@ using `http.host: 127.0.0.1`, default probes should be disabled or overrided | `volumeClaimTemplate` | Configuration for the [volumeClaimTemplate for StatefulSets][]. You will want to adjust the storage (default `30Gi` ) and the `storageClassName` if you are using a different storage class | see [values.yaml][] | -## Try it out - -In [examples][] you will find some example configurations. These examples are -used for the automated testing of this Helm chart. +## FAQ -### Default +### How to install OSS version of Logstash? -To deploy a cluster with all default values and run the integration tests: +Deploying OSS version of Elasticsearch can be done by setting `image` value to +[Logstash OSS Docker image][] -``` -cd examples/default -make -``` - - -## FAQ +An example of APM Server deployment using OSS version can be found in +[examples/oss][]. ### How to install plugins? @@ -200,26 +192,30 @@ about our development and testing process. [annotations]: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ [anti-affinity]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity [deploys statefulsets serially]: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies -[custom docker image]: https://www.elastic.co/guide/en/logstash/current/docker-config.html#_custom_images +[custom docker image]: https://www.elastic.co/guide/en/logstash/7.7/docker-config.html#_custom_images [environment variables]: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config +[environment from variables]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables [examples]: https://github.com/elastic/helm-charts/tree/7.7/logstash/examples +[examples/oss]: https://github.com/elastic/helm-charts/tree/7.7/logstash/examples/oss [helm]: https://helm.sh [imagePullPolicy]: https://kubernetes.io/docs/concepts/containers/images/#updating-images [imagePullSecrets]: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret +[kubernetes secrets]: https://kubernetes.io/docs/concepts/configuration/secret/ [labels]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ -[logstash docker image]: https://www.elastic.co/guide/en/logstash/current/docker.html +[logstash docker image]: https://www.elastic.co/guide/en/logstash/7.7/docker.html +[logstash oss docker image]: https://www.docker.elastic.co/#logstash-7-7-0-oss [maxUnavailable]: https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget [node affinity settings]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature [nodeSelector]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector -[note]: https://www.elastic.co/guide/en/logstash/current/docker-config.html#docker-env-config +[note]: https://www.elastic.co/guide/en/logstash/7.7/docker-config.html#docker-env-config [parent readme]: https://github.com/elastic/helm-charts/tree/7.7/README.md [priorityClass]: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass [probe]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/ [resources]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ [updateStrategy]: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/ [securityContext]: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod +[service]: https://kubernetes.io/docs/concepts/services-networking/service/ [terminationGracePeriod]: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods [tolerations]: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ [values.yaml]: https://github.com/elastic/helm-charts/tree/7.7/logstash/values.yaml -[updateStrategy]: https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#updating-statefulsets [volumeClaimTemplate for statefulsets]: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#stable-storage diff --git a/logstash/examples/default/README.md b/logstash/examples/default/README.md new file mode 100644 index 000000000..ba2fa62cf --- /dev/null +++ b/logstash/examples/default/README.md @@ -0,0 +1,17 @@ +# Default + +This example deploy Logstash 7.7.0-SNAPSHOT using [default values][]. + + +## Usage + +* Deploy Logstash chart with the default values: `make install` + + +## Testing + +You can also run [goss integration tests][] using `make test` + + +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/logstash/examples/default/test/goss.yaml +[default values]: https://github.com/elastic/helm-charts/tree/7.7/logstash/values.yaml diff --git a/logstash/examples/elasticsearch/README.md b/logstash/examples/elasticsearch/README.md new file mode 100644 index 000000000..58d9850e9 --- /dev/null +++ b/logstash/examples/elasticsearch/README.md @@ -0,0 +1,28 @@ +# Elasticsearch + +This example deploy Logstash 7.7.0-SNAPSHOT which connects to Elasticsearch (see +[values][]). + + +## Usage + +* Deploy [Elasticsearch Helm chart][]. + +* Deploy Logstash chart: `make install` + +* You can now setup a port forward to query Logstash indices: + + ``` + kubectl port-forward svc/elasticsearch-master 9200 + curl localhost:9200/_cat/indices + ``` + + +## Testing + +You can also run [goss integration tests][] using `make test` + + +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/default/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/logstash/examples/elasticsearch/test/goss.yaml +[values]: https://github.com/elastic/helm-charts/tree/7.7/logstash/examples/elasticsearch/values.yaml diff --git a/logstash/examples/oss/README.md b/logstash/examples/oss/README.md new file mode 100644 index 000000000..8350847e6 --- /dev/null +++ b/logstash/examples/oss/README.md @@ -0,0 +1,17 @@ +# OSS + +This example deploy Logstash 7.7.0-SNAPSHOT using [Logstash OSS][] version. + + +## Usage + +* Deploy Logstash chart with the default values: `make install` + + +## Testing + +You can also run [goss integration tests][] using `make test` + + +[logstash oss]: https://www.elastic.co/downloads/logstash-oss +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/logstash/examples/oss/test/goss.yaml diff --git a/metricbeat/README.md b/metricbeat/README.md index 1febca509..bc305a4e1 100644 --- a/metricbeat/README.md +++ b/metricbeat/README.md @@ -8,10 +8,14 @@ - [Using Helm repository](#using-helm-repository) - [Using the 7.7 branch](#using-the-77-branch) - [Upgrading](#upgrading) +- [Usage notes](#usage-notes) - [Configuration](#configuration) - [Deprecated](#deprecated) -- [Examples](#examples) - - [Default](#default) +- [FAQ](#faq) + - [How to use Metricbeat with Elasticsearch with security (authentication and TLS) enabled?](#how-to-use-metricbeat-with-elasticsearch-with-security-authentication-and-tls-enabled) + - [How to install OSS version of Metricbeat?](#how-to-install-oss-version-of-metricbeat) + - [How to use Kubelet read-only port instead of secure port?](#how-to-use-kubelet-read-only-port-instead-of-secure-port) + - [Why is Metricbeat host.name field set to Kubernetes pod name?](#why-is-metricbeat-hostname-field-set-to-kubernetes-pod-name) - [Contributing](#contributing) @@ -66,6 +70,25 @@ Please always check [CHANGELOG.md][] and [BREAKING_CHANGES.md][] before upgrading to a new chart version. +## Usage notes + +* The default Metricbeat configuration file for this chart is configured to use +an Elasticsearch endpoint. Without any additional changes, Metricbeat will send +documents to the service URL that the Elasticsearch Helm chart sets up by +default. You may either set the `ELASTICSEARCH_HOSTS` environment variable in +`extraEnvs` to override this endpoint or modify the default `metricbeatConfig` +to change this behavior. +* This chart disables the [HostNetwork][] setting by default for compatibility +reasons with the majority of kubernetes providers and scenarios. Some kubernetes +providers may not allow enabling `hostNetwork` and deploying multiple Metricbeat +pods on the same node isn't possible with `hostNetwork` However Metricbeat does +recommend activating it. If your kubernetes provider is compatible with +`hostNetwork` and you don't need to run multiple Metricbeat DaemonSets, you can +activate it by setting `hostNetworking: true` in [values.yaml][]. +* This repo includes a number of [examples][] configurations which can be used +as a reference. They are also used in the automated testing of this chart. + + ## Configuration | Parameter | Description | Default | @@ -131,28 +154,48 @@ upgrading to a new chart version. | `tolerations` | Configurable [tolerations][] for both Metricbeat DaemonSet and Deployment | `[]` | -## Examples +## FAQ + +### How to use Metricbeat with Elasticsearch with security (authentication and TLS) enabled? + +This Helm chart can use existing [Kubernetes secrets][] to setup +credentials or certificates for examples. These secrets should be created +outside of this chart and accessed using [environment variables][] and volumes. + +An example can be found in [examples/security][]. + +### How to install OSS version of Metricbeat? + +Deploying OSS version of Elasticsearch can be done by setting `image` value to +[Metricbeat OSS Docker image][] + +An example of Metricbeat deployment using OSS version can be found in +[examples/oss][]. -In [examples][] you will find some example configurations. These examples are -used for the automated testing of this Helm chart. +### How to use Kubelet read-only port instead of secure port? -### Default +Default Metricbeat configuration has been switched to Kubelet secure port +(10250/TCP) instead of read-only port (10255/TCP) in [#471][] because read-only +port usage is now discouraged and not enabled by default in most Kubernetes +configurations. -* Deploy the [default Elasticsearch Helm chart][]. -* Deploy Metricbeat with the default values: +However, if you need to use read-only port, you can replace +`hosts: ["https://${NODE_NAME}:10250"]` by `hosts: ["${NODE_NAME}:10255"]` and +comment `bearer_token_file` and `ssl.verification_mode` in +`daemonset.metricbeatConfig` in [values.yaml][]. - ``` - cd examples/default - make - ``` +### Why is Metricbeat host.name field set to Kubernetes pod name? -* You can now setup a port forward for Elasticsearch to observe Metricbeat -indices: +The default Metricbeat configuration is using Metricbeat pod name for +`agent.hostname` and `host.name` fields. The `hostname` of the Kubernetes nodes +can be find in `kubernetes.node.name` field. If you would like to have +`agent.hostname` and `host.name` fields set to the hostname of the nodes, you'll +need to set `daemonset.hostNetworking` value to true. - ``` - kubectl port-forward svc/elasticsearch-master 9200 - curl localhost:9200/_cat/indices - ``` +Note that enabling [hostNetwork][] make Metricbeat pod use the host network +namespace which gives it access to the host loopback device, services listening +on localhost, could be used to snoop on network activity of other pods on the +same node. ## Contributing @@ -171,13 +214,17 @@ about our development and testing process. [environment variables]: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config [environment from variables]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables [examples]: https://github.com/elastic/helm-charts/tree/7.7/metricbeat/examples +[examples/oss]: https://github.com/elastic/helm-charts/tree/7.7/metricbeat/examples/oss +[examples/security]: https://github.com/elastic/helm-charts/tree/7.7/metricbeat/examples/security [helm]: https://helm.sh [hostPath]: https://kubernetes.io/docs/concepts/storage/volumes/#hostpath +[hostNetwork]: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#host-namespaces [imagePullPolicy]: https://kubernetes.io/docs/concepts/containers/images/#updating-images [imagePullSecrets]: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret [kube-state-metrics]: https://github.com/helm/charts/tree/7.7/stable/kube-state-metrics +[kubernetes secrets]: https://kubernetes.io/docs/concepts/configuration/secret/ [labels]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ -[metricbeat docker image]: https://www.elastic.co/guide/en/beats/metricbeat/current/running-on-docker.html +[metricbeat docker image]: https://www.elastic.co/guide/en/beats/metricbeat/7.7/running-on-docker.html [priorityClass]: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass [nodeSelector]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector [parent readme]: https://github.com/elastic/helm-charts/tree/7.7/README.md diff --git a/metricbeat/examples/oss/README.md b/metricbeat/examples/oss/README.md new file mode 100644 index 000000000..c8b8ee916 --- /dev/null +++ b/metricbeat/examples/oss/README.md @@ -0,0 +1,27 @@ +# OSS + +This example deploy Metricbeat 7.7.0-SNAPSHOT using [Metricbeat OSS][] version. + + +## Usage + +* Deploy [Elasticsearch Helm chart][]. + +* Deploy Metricbeat chart with the default values: `make install` + +* You can now setup a port forward to query Metricbeat indices: + + ``` + kubectl port-forward svc/oss-master 9200 + curl localhost:9200/_cat/indices + ``` + + +## Testing + +You can also run [goss integration tests][] using `make test` + + +[metricbeat oss]: https://www.elastic.co/downloads/beats/metricbeat-oss +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/oss/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/metricbeat/examples/oss/test/goss.yaml diff --git a/metricbeat/examples/security/README.md b/metricbeat/examples/security/README.md new file mode 100644 index 000000000..8268e1e1f --- /dev/null +++ b/metricbeat/examples/security/README.md @@ -0,0 +1,28 @@ +# Security + +This example deploy Metricbeat 7.7.0-SNAPSHOT using authentication and TLS to connect to +Elasticsearch (see [values][]). + + +## Usage + +* Deploy [Elasticsearch Helm chart][]. + +* Deploy Metricbeat chart with security: `make install` + +* You can now setup a port forward to query Metricbeat indices: + + ``` + kubectl port-forward svc/security-master 9200 + curl -u elastic:changeme https://localhost:9200/_cat/indices + ``` + + +## Testing + +You can also run [goss integration tests][] using `make test` + + +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/security/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/metricbeat/examples/security/test/goss.yaml +[values]: https://github.com/elastic/helm-charts/tree/7.7/metricbeat/examples/security/values.yaml From 1c63c355752626d01a5ace0b0b52165cf185216f Mon Sep 17 00:00:00 2001 From: Julien Mailleret Date: Wed, 29 Apr 2020 07:35:21 +0200 Subject: [PATCH 22/44] [meta] bump version on examples readme (#601) --- helpers/bumper.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/helpers/bumper.py b/helpers/bumper.py index f9baaa85b..03dee561a 100755 --- a/helpers/bumper.py +++ b/helpers/bumper.py @@ -27,6 +27,7 @@ file_patterns = [ "*/examples/*/*.y*ml", + "*/examples/*/README.md", "helpers/examples.mk", "*/README.md", "*/values.y*ml", @@ -38,7 +39,9 @@ # Anything matching this regex won't have version bumps changed # This was happening because strings like 127.0.0.1 match for 7.0.0 -blacklist = re.compile(r".*127.0.0.1.*") +# "7.0.0-alpha1" is also used in elasticsearch upgrade test and so shouldn't +# been bump +blacklist = re.compile(r".*127.0.0.1.*|.*7.0.0-alpha1.*") print("Updating versions...") From 847b5259901b36105ac40e5f911083abbec9dc26 Mon Sep 17 00:00:00 2001 From: Julien Mailleret Date: Tue, 5 May 2020 17:48:28 +0200 Subject: [PATCH 23/44] initiate 7.x branch (#605) This commit initiates the 6.8 branch which will be dedicated to the 7.x.x releases for the Helm Charts. It will allow to: - test this branch with the daily Stack Docker images 7.8.0-SNAPSHOT via dedicated Jenkins jobs - test the staging 7.8.x Docker images before a release This branch is based on https://github.com/elastic/helm-charts/tree/7.7/ which was initiated in #541. Also related to #602. --- .../elastic+helm-charts+{branch}+staging.yml | 2 +- CONTRIBUTING.md | 8 +- README.md | 20 ++--- apm-server/Chart.yaml | 4 +- apm-server/README.md | 30 +++---- apm-server/examples/default/README.md | 8 +- apm-server/examples/default/test/goss.yaml | 2 +- apm-server/examples/oss/README.md | 6 +- apm-server/examples/oss/test/goss.yaml | 2 +- apm-server/examples/security/README.md | 8 +- apm-server/examples/security/test/goss.yaml | 2 +- apm-server/values.yaml | 2 +- elasticsearch/Chart.yaml | 4 +- elasticsearch/README.md | 86 +++++++++---------- elasticsearch/examples/config/README.md | 6 +- elasticsearch/examples/default/README.md | 6 +- elasticsearch/examples/default/test/goss.yaml | 2 +- .../examples/docker-for-mac/README.md | 4 +- .../examples/kubernetes-kind/README.md | 6 +- elasticsearch/examples/microk8s/README.md | 4 +- elasticsearch/examples/migration/README.md | 4 +- elasticsearch/examples/minikube/README.md | 4 +- elasticsearch/examples/multi/README.md | 8 +- elasticsearch/examples/openshift/README.md | 6 +- .../examples/openshift/test/goss.yaml | 2 +- elasticsearch/examples/oss/README.md | 4 +- elasticsearch/examples/oss/test/goss.yaml | 2 +- elasticsearch/examples/security/README.md | 8 +- elasticsearch/examples/upgrade/README.md | 6 +- elasticsearch/examples/upgrade/test/goss.yaml | 2 +- elasticsearch/values.yaml | 4 +- filebeat/Chart.yaml | 4 +- filebeat/README.md | 32 +++---- filebeat/examples/default/README.md | 8 +- filebeat/examples/default/test/goss.yaml | 4 +- filebeat/examples/oss/README.md | 6 +- filebeat/examples/oss/test/goss.yaml | 2 +- filebeat/examples/security/README.md | 8 +- filebeat/examples/security/test/goss.yaml | 2 +- filebeat/templates/daemonset.yaml | 2 +- filebeat/values.yaml | 4 +- helpers/bumper.py | 2 +- helpers/examples.mk | 3 +- kibana/Chart.yaml | 4 +- kibana/README.md | 40 ++++----- kibana/examples/default/README.md | 8 +- kibana/examples/default/test/goss.yaml | 2 +- kibana/examples/openshift/README.md | 8 +- kibana/examples/oss/README.md | 6 +- kibana/examples/security/README.md | 8 +- kibana/values.yaml | 2 +- logstash/Chart.yaml | 4 +- logstash/README.md | 32 +++---- logstash/examples/default/README.md | 6 +- logstash/examples/default/test/goss.yaml | 2 +- logstash/examples/elasticsearch/README.md | 8 +- .../examples/elasticsearch/test/goss.yaml | 2 +- logstash/examples/oss/README.md | 4 +- logstash/examples/oss/test/goss.yaml | 2 +- logstash/values.yaml | 8 +- metricbeat/Chart.yaml | 4 +- metricbeat/README.md | 32 +++---- metricbeat/examples/default/README.md | 8 +- .../examples/default/test/goss-metrics.yaml | 6 +- metricbeat/examples/default/test/goss.yaml | 6 +- metricbeat/examples/oss/README.md | 6 +- .../examples/oss/test/goss-metrics.yaml | 6 +- metricbeat/examples/oss/test/goss.yaml | 6 +- metricbeat/examples/security/README.md | 8 +- .../examples/security/test/goss-metrics.yaml | 6 +- metricbeat/examples/security/test/goss.yaml | 6 +- metricbeat/templates/daemonset.yaml | 4 +- metricbeat/values.yaml | 2 +- 73 files changed, 292 insertions(+), 293 deletions(-) diff --git a/.ci/jobs.t/elastic+helm-charts+{branch}+staging.yml b/.ci/jobs.t/elastic+helm-charts+{branch}+staging.yml index 223a830a9..2cef76997 100644 --- a/.ci/jobs.t/elastic+helm-charts+{branch}+staging.yml +++ b/.ci/jobs.t/elastic+helm-charts+{branch}+staging.yml @@ -7,7 +7,7 @@ parameters: - string: name: BUILD_ID - description: "The buildId for the staging images. (Example: 7.7.0-abcdabcd)" + description: "The buildId for the staging images. (Example: 7.8.0-abcdabcd)" project-type: multijob scm: - git: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 89f4722a8..3e44b6801 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -75,7 +75,7 @@ that will go into the next minor release. For example, if the next minor release is `7.8.0`, work for it should go into the `7.x` branch. * Past minor release branches are named `{majorVersion}.{minorVersion}`. They contain work that will go into the next patch release. For example, if the next -patch release is `7.7.1`, work for it should go into the `7.7` branch. +patch release is `7.8.1`, work for it should go into the `7.8` branch. * All work is done on feature branches and merged into one of these branches. * Where appropriate, we'll backport changes into older release branches. @@ -261,12 +261,12 @@ make goss [elastic helm repository]: https://helm.elastic.co [github forking model]: https://help.github.com/articles/fork-a-repo/ [goss]: https://github.com/aelsabbahy/goss/blob/master/docs/manual.md -[integration test example]: https://github.com/elastic/helm-charts/blob/7.7/elasticsearch/examples/default/test/goss.yaml +[integration test example]: https://github.com/elastic/helm-charts/blob/7.x/elasticsearch/examples/default/test/goss.yaml [integration tests section]: #integration-tests [pytest]: https://docs.pytest.org/en/latest/ [serverspec]: https://serverspec.org -[templating test example]: https://github.com/elastic/helm-charts/blob/7.7/elasticsearch/tests/elasticsearch_test.py +[templating test example]: https://github.com/elastic/helm-charts/blob/7.x/elasticsearch/tests/elasticsearch_test.py [templating tests section]: #templating-tests [release.md]: https://github.com/elastic/helm-charts/blob/master/helpers/release.md [releases section]: #releases -[requirements.txt]: https://github.com/elastic/helm-charts/blob/7.7/requirements.txt +[requirements.txt]: https://github.com/elastic/helm-charts/blob/7.x/requirements.txt diff --git a/README.md b/README.md index ada0377f1..42f64b2b3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Elastic Stack Kubernetes Helm Charts -[![Build Status](https://img.shields.io/jenkins/s/https/devops-ci.elastic.co/job/elastic+helm-charts+7.7.svg)](https://devops-ci.elastic.co/job/elastic+helm-charts+7.7/) +[![Build Status](https://img.shields.io/jenkins/s/https/devops-ci.elastic.co/job/elastic+helm-charts+7.x.svg)](https://devops-ci.elastic.co/job/elastic+helm-charts+7.x/) 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 @@ -16,12 +16,12 @@ added below. | Chart | Docker documentation | |--------------------------------------------|---------------------------------------------------------------------------------| -| [APM-Server](./apm-server/README.md) | https://www.elastic.co/guide/en/apm/server/7.7/running-on-docker.html | -| [Elasticsearch](./elasticsearch/README.md) | https://www.elastic.co/guide/en/elasticsearch/reference/7.7/docker.html | -| [Filebeat](./filebeat/README.md) | https://www.elastic.co/guide/en/beats/filebeat/7.7/running-on-docker.html | -| [Kibana](./kibana/README.md) | https://www.elastic.co/guide/en/kibana/7.7/docker.html | -| [Logstash](./logstash/README.md) | https://www.elastic.co/guide/en/logstash/7.7/docker.html | -| [Metricbeat](./metricbeat/README.md) | https://www.elastic.co/guide/en/beats/metricbeat/7.7/running-on-docker.html | +| [APM-Server](./apm-server/README.md) | https://www.elastic.co/guide/en/apm/server/7.8/running-on-docker.html | +| [Elasticsearch](./elasticsearch/README.md) | https://www.elastic.co/guide/en/elasticsearch/reference/7.8/docker.html | +| [Filebeat](./filebeat/README.md) | https://www.elastic.co/guide/en/beats/filebeat/7.8/running-on-docker.html | +| [Kibana](./kibana/README.md) | https://www.elastic.co/guide/en/kibana/7.8/docker.html | +| [Logstash](./logstash/README.md) | https://www.elastic.co/guide/en/logstash/7.8/docker.html | +| [Metricbeat](./metricbeat/README.md) | https://www.elastic.co/guide/en/beats/metricbeat/7.8/running-on-docker.html | ## Kubernetes Versions @@ -43,9 +43,9 @@ Elastic recommended way to deploy Elasticsearch, Kibana and APM Server on Kubernetes. -[currently tested]: https://devops-ci.elastic.co/job/elastic+helm-charts+7.7/ +[currently tested]: https://devops-ci.elastic.co/job/elastic+helm-charts+7.x/ [elastic cloud on kubernetes]: https://github.com/elastic/cloud-on-k8s [helm 3]: https://v3.helm.sh -[helm-tester Dockerfile]: https://github.com/elastic/helm-charts/blob/7.7/helpers/helm-tester/Dockerfile -[helpers/matrix.yml]: https://github.com/elastic/helm-charts/blob/7.7/helpers/matrix.yml +[helm-tester Dockerfile]: https://github.com/elastic/helm-charts/blob/7.x/helpers/helm-tester/Dockerfile +[helpers/matrix.yml]: https://github.com/elastic/helm-charts/blob/7.x/helpers/matrix.yml [operator pattern]: https://kubernetes.io/docs/concepts/extend-kubernetes/operator/ diff --git a/apm-server/Chart.yaml b/apm-server/Chart.yaml index 0454d9152..6a023e4ba 100755 --- a/apm-server/Chart.yaml +++ b/apm-server/Chart.yaml @@ -5,8 +5,8 @@ maintainers: - email: helm-charts@elastic.co name: Elastic name: apm-server -version: 7.7.0-SNAPSHOT -appVersion: 7.7.0-SNAPSHOT +version: 7.8.0-SNAPSHOT +appVersion: 7.8.0-SNAPSHOT sources: - https://github.com/elastic/apm icon: https://helm.elastic.co/icons/apm.png diff --git a/apm-server/README.md b/apm-server/README.md index 3aa695991..d8d83142a 100644 --- a/apm-server/README.md +++ b/apm-server/README.md @@ -6,7 +6,7 @@ - [Requirements](#requirements) - [Installing](#installing) - [Using Helm repository](#using-helm-repository) - - [Using the 7.7 branch](#using-the-77-branch) + - [Using the 7.x branch](#using-the-7x-branch) - [Upgrading](#upgrading) - [Usage notes](#usage-notes) - [Configuration](#configuration) @@ -37,27 +37,27 @@ This Helm chart is a lightweight way to configure and run our official ## Installing -This chart is tested with the latest 7.7.0-SNAPSHOT versions. +This chart is tested with the latest 7.8.0-SNAPSHOT versions. ### Using Helm repository * Add the Elastic Helm charts repo: `helm repo add elastic https://helm.elastic.co` -* Install the latest 7.7 release: -`helm install --name apm-server elastic/apm-server --version=7.7.0` +* Install the latest 7.8 release: +`helm install --name apm-server elastic/apm-server --version=7.8.0` -### Using the 7.7 branch +### Using the 7.x branch * Clone the git repo and checkout the right branch: ```shell git clone git@github.com:elastic/helm-charts.git cd helm-charts - git checkout -b 7.7 origin/7.7 + git checkout -b 7.x origin/7.x ```` -* Install the latest 7.7.0-SNAPSHOT: +* Install the latest 7.8.0-SNAPSHOT: `helm install --name apm-server ./helm-charts/apm-server` @@ -96,7 +96,7 @@ as a reference. They are also used in the automated testing of this chart. | `fullnameOverride` | Overrides the full name of the resources. If not set the name will default to `.Release.Name` - `.Values.nameOverride` or `.Chart.Name` | `""` | | `imagePullPolicy` | The Kubernetes [imagePullPolicy][] value | `IfNotPresent` | | `imagePullSecrets` | Configuration for [imagePullSecrets][] so that you can use a private registry for your image | `[]` | -| `imageTag` | The APM Server Docker image tag | `7.7.0-SNAPSHOT` | +| `imageTag` | The APM Server Docker image tag | `7.8.0-SNAPSHOT` | | `image` | The APM Server Docker image | `docker.elastic.co/apm/apm-server` | | `ingress` | Configurable [ingress][] to expose the APM Server service | see [values.yaml][] | | `labels` | Configurable [labels][] applied to all APM server pods | `{}` | @@ -149,14 +149,14 @@ about our development and testing process. [CONTRIBUTING.md]: https://github.com/elastic/helm-charts/blob/master/CONTRIBUTING.md [affinity]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity [annotations]: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ -[apm server docker image]: https://www.elastic.co/guide/en/apm/server/7.7/running-on-docker.html -[apm server oss docker image]: https://www.docker.elastic.co/#apm-server-7-7-0-oss -[default elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/README.md#default +[apm server docker image]: https://www.elastic.co/guide/en/apm/server/7.8/running-on-docker.html +[apm server oss docker image]: https://www.docker.elastic.co/#apm-server-7-8-0-oss +[default elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/README.md#default [environment variables]: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config [environment from variables]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables -[examples]: https://github.com/elastic/helm-charts/tree/7.7/apm-server/examples -[examples/oss]: https://github.com/elastic/helm-charts/tree/7.7/apm-server/examples/oss -[examples/security]: https://github.com/elastic/helm-charts/tree/7.7/apm-server/examples/security +[examples]: https://github.com/elastic/helm-charts/tree/7.x/apm-server/examples +[examples/oss]: https://github.com/elastic/helm-charts/tree/7.x/apm-server/examples/oss +[examples/security]: https://github.com/elastic/helm-charts/tree/7.x/apm-server/examples/security [helm]: https://helm.sh [horizontal pod autoscaler]: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/ [imagePullPolicy]: https://kubernetes.io/docs/concepts/containers/images/#updating-images @@ -174,4 +174,4 @@ about our development and testing process. [serviceAccount]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ [tolerations]: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ [updateStrategy]: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#updating-a-deployment -[values.yaml]: https://github.com/elastic/helm-charts/tree/7.7/apm-server/values.yaml +[values.yaml]: https://github.com/elastic/helm-charts/tree/7.x/apm-server/values.yaml diff --git a/apm-server/examples/default/README.md b/apm-server/examples/default/README.md index 8af8a5038..1533f4561 100644 --- a/apm-server/examples/default/README.md +++ b/apm-server/examples/default/README.md @@ -1,6 +1,6 @@ # Default -This example deploy APM Server 7.7.0-SNAPSHOT using [default values][]. +This example deploy APM Server 7.8.0-SNAPSHOT using [default values][]. ## Usage @@ -22,6 +22,6 @@ This example deploy APM Server 7.7.0-SNAPSHOT using [default values][]. You can also run [goss integration tests][] using `make test` -[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/default/ -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/apm-server/examples/default/test/goss.yaml -[default values]: https://github.com/elastic/helm-charts/tree/7.7/apm-server/values.yaml +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/default/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/apm-server/examples/default/test/goss.yaml +[default values]: https://github.com/elastic/helm-charts/tree/7.x/apm-server/values.yaml diff --git a/apm-server/examples/default/test/goss.yaml b/apm-server/examples/default/test/goss.yaml index 2dc9067df..a2e5df9fa 100644 --- a/apm-server/examples/default/test/goss.yaml +++ b/apm-server/examples/default/test/goss.yaml @@ -3,4 +3,4 @@ http: status: 200 timeout: 2000 body: - - '7.7.0' + - '7.8.0' diff --git a/apm-server/examples/oss/README.md b/apm-server/examples/oss/README.md index e32234f8a..01320a2fa 100644 --- a/apm-server/examples/oss/README.md +++ b/apm-server/examples/oss/README.md @@ -1,6 +1,6 @@ # OSS -This example deploy APM Server 7.7.0-SNAPSHOT using [APM Server OSS][] version. +This example deploy APM Server 7.8.0-SNAPSHOT using [APM Server OSS][] version. ## Usage @@ -23,5 +23,5 @@ You can also run [goss integration tests][] using `make test` [apm server oss]: https://www.elastic.co/downloads/apm-oss -[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/oss/ -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/apm-server/examples/oss/test/goss.yaml +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/oss/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/apm-server/examples/oss/test/goss.yaml diff --git a/apm-server/examples/oss/test/goss.yaml b/apm-server/examples/oss/test/goss.yaml index 2dc9067df..a2e5df9fa 100644 --- a/apm-server/examples/oss/test/goss.yaml +++ b/apm-server/examples/oss/test/goss.yaml @@ -3,4 +3,4 @@ http: status: 200 timeout: 2000 body: - - '7.7.0' + - '7.8.0' diff --git a/apm-server/examples/security/README.md b/apm-server/examples/security/README.md index 517e53f86..0282838be 100644 --- a/apm-server/examples/security/README.md +++ b/apm-server/examples/security/README.md @@ -1,6 +1,6 @@ # Security -This example deploy APM Server 7.7.0-SNAPSHOT using authentication and TLS to connect to +This example deploy APM Server 7.8.0-SNAPSHOT using authentication and TLS to connect to Elasticsearch (see [values][]). @@ -23,6 +23,6 @@ Elasticsearch (see [values][]). You can also run [goss integration tests][] using `make test` -[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/security/ -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/apm-server/examples/security/test/goss.yaml -[values]: https://github.com/elastic/helm-charts/tree/7.7/apm-server/examples/security/values.yaml +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/security/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/apm-server/examples/security/test/goss.yaml +[values]: https://github.com/elastic/helm-charts/tree/7.x/apm-server/examples/security/values.yaml diff --git a/apm-server/examples/security/test/goss.yaml b/apm-server/examples/security/test/goss.yaml index 2dc9067df..a2e5df9fa 100644 --- a/apm-server/examples/security/test/goss.yaml +++ b/apm-server/examples/security/test/goss.yaml @@ -3,4 +3,4 @@ http: status: 200 timeout: 2000 body: - - '7.7.0' + - '7.8.0' diff --git a/apm-server/values.yaml b/apm-server/values.yaml index f96ac03f7..ee2564043 100755 --- a/apm-server/values.yaml +++ b/apm-server/values.yaml @@ -62,7 +62,7 @@ extraVolumes: [] # emptyDir: {} image: "docker.elastic.co/apm/apm-server" -imageTag: "7.7.0-SNAPSHOT" +imageTag: "7.8.0-SNAPSHOT" imagePullPolicy: "IfNotPresent" imagePullSecrets: [] diff --git a/elasticsearch/Chart.yaml b/elasticsearch/Chart.yaml index 38a824234..5945eae05 100755 --- a/elasticsearch/Chart.yaml +++ b/elasticsearch/Chart.yaml @@ -5,8 +5,8 @@ maintainers: - email: helm-charts@elastic.co name: Elastic name: elasticsearch -version: 7.7.0-SNAPSHOT -appVersion: 7.7.0-SNAPSHOT +version: 7.8.0-SNAPSHOT +appVersion: 7.8.0-SNAPSHOT sources: - https://github.com/elastic/elasticsearch icon: https://helm.elastic.co/icons/elasticsearch.png diff --git a/elasticsearch/README.md b/elasticsearch/README.md index ee568fa06..db5470df2 100644 --- a/elasticsearch/README.md +++ b/elasticsearch/README.md @@ -6,7 +6,7 @@ - [Requirements](#requirements) - [Installing](#installing) - [Using Helm repository](#using-helm-repository) - - [Using the 7.7 branch](#using-the-77-branch) + - [Using the 7.x branch](#using-the-7x-branch) - [Upgrading](#upgrading) - [Usage notes](#usage-notes) - [Configuration](#configuration) @@ -53,27 +53,27 @@ default settings. All of these settings are configurable. ## Installing -This chart is tested with the latest 7.7.0-SNAPSHOT versions. +This chart is tested with the latest 7.8.0-SNAPSHOT versions. ### Using Helm repository * Add the Elastic Helm charts repo: `helm repo add elastic https://helm.elastic.co` -* Install the latest 7.7 release: -`helm install --name elasticsearch elastic/elasticsearch --version=7.7.0` +* Install the latest 7.8 release: +`helm install --name elasticsearch elastic/elasticsearch --version=7.8.0` -### Using the 7.7 branch +### Using the 7.x branch * Clone the git repo and checkout the right branch: ```shell git clone git@github.com:elastic/helm-charts.git cd helm-charts - git checkout -b 7.7 origin/7.7 + git checkout -b 7.x origin/7.x ```` -* Install the latest 7.7.0-SNAPSHOT: +* Install the latest 7.8.0-SNAPSHOT: `helm install --name elasticsearch ./helm-charts/elasticsearch` @@ -129,7 +129,7 @@ support multiple versions with minimal changes. | `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][] in `extraEnvs` | `9200` | | `imagePullPolicy` | The Kubernetes [imagePullPolicy][] value | `IfNotPresent` | | `imagePullSecrets` | Configuration for [imagePullSecrets][] so that you can use a private registry for your image | `[]` | -| `imageTag` | The Elasticsearch Docker image tag | `7.7.0-SNAPSHOT` | +| `imageTag` | The Elasticsearch Docker image tag | `7.8.0-SNAPSHOT` | | `image` | The Elasticsearch Docker image | `docker.elastic.co/elasticsearch/elasticsearch` | | `ingress` | Configurable [ingress][] to expose the Elasticsearch service. See [values.yaml][] for an example | see [values.yaml][] | | `initResources` | Allows you to set the [resources][] for the `initContainer` in the StatefulSet | `{}` | @@ -397,67 +397,67 @@ about our development and testing process. [alternate scheduler]: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/#specify-schedulers-for-pods [annotations]: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ [anti-affinity]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity -[cluster.name]: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/cluster.name.html -[clustering and node discovery]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/README.md#clustering-and-node-discovery -[config example]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/config/values.yaml -[curator]: https://www.elastic.co/guide/en/elasticsearch/client/curator/7.7/snapshot.html -[custom docker image]: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/docker.html#_c_customized_image +[cluster.name]: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/cluster.name.html +[clustering and node discovery]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/README.md#clustering-and-node-discovery +[config example]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/config/values.yaml +[curator]: https://www.elastic.co/guide/en/elasticsearch/client/curator/7.8/snapshot.html +[custom docker image]: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/docker.html#_c_customized_image [deploys statefulsets serially]: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies -[discovery.zen.minimum_master_nodes]: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/discovery-settings.html#minimum_master_nodes -[docker for mac]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/docker-for-mac -[elasticsearch cluster health status params]: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/cluster-health.html#request-params -[elasticsearch docker image]: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/docker.html -[elasticsearch oss docker image]: https://www.docker.elastic.co/#elasticsearch-7-7-0-oss +[discovery.zen.minimum_master_nodes]: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/discovery-settings.html#minimum_master_nodes +[docker for mac]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/docker-for-mac +[elasticsearch cluster health status params]: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/cluster-health.html#request-params +[elasticsearch docker image]: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/docker.html +[elasticsearch oss docker image]: https://www.docker.elastic.co/#elasticsearch-7-8-0-oss [environment variables]: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config [environment from variables]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables -[examples]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/ -[examples/multi]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/multi -[examples/oss]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/oss -[examples/security]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/security +[examples]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/ +[examples/multi]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/multi +[examples/oss]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/oss +[examples/security]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/security [gke]: https://cloud.google.com/kubernetes-engine [helm]: https://helm.sh [helm/charts stable]: https://github.com/helm/charts/tree/master/stable/elasticsearch/ -[how to install plugins guide]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/README.md#how-to-install-plugins -[how to use the keystore]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/README.md#how-to-use-the-keystore -[http.port]: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/modules-http.html#_settings +[how to install plugins guide]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/README.md#how-to-install-plugins +[how to use the keystore]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/README.md#how-to-use-the-keystore +[http.port]: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/modules-http.html#_settings [imagePullPolicy]: https://kubernetes.io/docs/concepts/containers/images/#updating-images [imagePullSecrets]: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret [ingress]: https://kubernetes.io/docs/concepts/services-networking/ingress/ -[java options]: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/jvm-options.html -[jvm heap size]: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/heap-size.html -[kind]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/kubernetes-kind +[java options]: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/jvm-options.html +[jvm heap size]: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/heap-size.html +[kind]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/kubernetes-kind [kubernetes secrets]: https://kubernetes.io/docs/concepts/configuration/secret/ [labels]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ [lifecycle hooks]: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/ [loadBalancer annotations]: https://kubernetes.io/docs/concepts/services-networking/service/#ssl-support-on-aws [loadBalancer]: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer [maxUnavailable]: https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget -[migration guide]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/migration/README.md -[minikube]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/minikube -[microk8s]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/microk8s -[multi]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/multi/ -[network.host elasticsearch setting]: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/network.host.html +[migration guide]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/migration/README.md +[minikube]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/minikube +[microk8s]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/microk8s +[multi]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/multi/ +[network.host elasticsearch setting]: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/network.host.html [node affinity settings]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature -[node-certificates]: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/configuring-tls.html#node-certificates +[node-certificates]: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/configuring-tls.html#node-certificates [nodePort]: https://kubernetes.io/docs/concepts/services-networking/service/#nodeport -[nodes types]: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/modules-node.html +[nodes types]: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/modules-node.html [nodeSelector]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector -[openshift]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/openshift -[parent readme]: https://github.com/elastic/helm-charts/tree/7.7/README.md +[openshift]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/openshift +[parent readme]: https://github.com/elastic/helm-charts/tree/7.x/README.md [priorityClass]: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass [probe]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/ [resources]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ -[roles]: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/modules-node.html +[roles]: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/modules-node.html [secret]: https://kubernetes.io/docs/concepts/configuration/secret/#using-secrets [securityContext]: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ [service types]: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types [snapshot lifecycle management]: https://github.com/elastic/elasticsearch/issues/38461 -[snapshot plugin]: https://www.elastic.co/guide/en/elasticsearch/plugins/7.7/repository.html -[snapshot repository]: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/modules-snapshots.html -[sysctl vm.max_map_count]: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/vm-max-map-count.html#vm-max-map-count +[snapshot plugin]: https://www.elastic.co/guide/en/elasticsearch/plugins/7.8/repository.html +[snapshot repository]: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/modules-snapshots.html +[sysctl vm.max_map_count]: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/vm-max-map-count.html#vm-max-map-count [terminationGracePeriod]: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods [tolerations]: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ -[transport port configuration]: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/modules-transport.html#_transport_settings +[transport port configuration]: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/modules-transport.html#_transport_settings [updateStrategy]: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/ -[values.yaml]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/values.yaml +[values.yaml]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/values.yaml [volumeClaimTemplate for statefulsets]: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#stable-storage diff --git a/elasticsearch/examples/config/README.md b/elasticsearch/examples/config/README.md index 98d1360f5..0c479605b 100644 --- a/elasticsearch/examples/config/README.md +++ b/elasticsearch/examples/config/README.md @@ -1,6 +1,6 @@ # Config -This example deploy a single node Elasticsearch 7.7.0-SNAPSHOT with authentication and +This example deploy a single node Elasticsearch 7.8.0-SNAPSHOT with authentication and custom [values][]. @@ -23,5 +23,5 @@ custom [values][]. You can also run [goss integration tests][] using `make test` -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/config/test/goss.yaml -[values]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/config/values.yaml +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/config/test/goss.yaml +[values]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/config/values.yaml diff --git a/elasticsearch/examples/default/README.md b/elasticsearch/examples/default/README.md index 495e2a1ac..81dc68211 100644 --- a/elasticsearch/examples/default/README.md +++ b/elasticsearch/examples/default/README.md @@ -1,6 +1,6 @@ # Default -This example deploy a 3 nodes Elasticsearch 7.7.0-SNAPSHOT cluster using +This example deploy a 3 nodes Elasticsearch 7.8.0-SNAPSHOT cluster using [default values][]. @@ -21,5 +21,5 @@ This example deploy a 3 nodes Elasticsearch 7.7.0-SNAPSHOT cluster using You can also run [goss integration tests][] using `make test` -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/default/test/goss.yaml -[default values]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/values.yaml +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/default/test/goss.yaml +[default values]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/values.yaml diff --git a/elasticsearch/examples/default/test/goss.yaml b/elasticsearch/examples/default/test/goss.yaml index 272064e29..c8b2c0c25 100644 --- a/elasticsearch/examples/default/test/goss.yaml +++ b/elasticsearch/examples/default/test/goss.yaml @@ -15,7 +15,7 @@ http: status: 200 timeout: 2000 body: - - '"number" : "7.7.0-SNAPSHOT"' + - '"number" : "7.8.0-SNAPSHOT"' - '"cluster_name" : "elasticsearch"' - '"name" : "elasticsearch-master-0"' - 'You Know, for Search' diff --git a/elasticsearch/examples/docker-for-mac/README.md b/elasticsearch/examples/docker-for-mac/README.md index 569bd416d..3ce68ea30 100644 --- a/elasticsearch/examples/docker-for-mac/README.md +++ b/elasticsearch/examples/docker-for-mac/README.md @@ -1,6 +1,6 @@ # Docker for Mac -This example deploy a 3 nodes Elasticsearch 7.7.0-SNAPSHOT cluster on [Docker for Mac][] +This example deploy a 3 nodes Elasticsearch 7.8.0-SNAPSHOT cluster on [Docker for Mac][] using [custom values][]. Note that this configuration should be used for test only and isn't recommended @@ -19,5 +19,5 @@ for production. ``` -[custom values]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/docker-for-mac/values.yaml +[custom values]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/docker-for-mac/values.yaml [docker for mac]: https://docs.docker.com/docker-for-mac/kubernetes/ diff --git a/elasticsearch/examples/kubernetes-kind/README.md b/elasticsearch/examples/kubernetes-kind/README.md index 76ce26646..7373d75b6 100644 --- a/elasticsearch/examples/kubernetes-kind/README.md +++ b/elasticsearch/examples/kubernetes-kind/README.md @@ -1,6 +1,6 @@ # KIND -This example deploy a 3 nodes Elasticsearch 7.7.0-SNAPSHOT cluster on [Kind][] +This example deploy a 3 nodes Elasticsearch 7.8.0-SNAPSHOT cluster on [Kind][] using [custom values][]. Note that this configuration should be used for test only and isn't recommended @@ -30,9 +30,9 @@ Elasticsearch volumes (see [Makefile][] instructions). ``` -[custom values]: https://github.com/elastic/helm-charts/blob/7.7/elasticsearch/examples/kubernetes-kind/values.yaml +[custom values]: https://github.com/elastic/helm-charts/blob/7.x/elasticsearch/examples/kubernetes-kind/values.yaml [kind]: https://kind.sigs.k8s.io/ [kind issue]: https://github.com/kubernetes-sigs/kind/issues/830 [kubernetes-sigs/kind#1157]: https://github.com/kubernetes-sigs/kind/pull/1157 [rancher local path provisioner]: https://github.com/rancher/local-path-provisioner -[Makefile]: https://github.com/elastic/helm-charts/blob/7.7/elasticsearch/examples/kubernetes-kind/Makefile#L5 +[Makefile]: https://github.com/elastic/helm-charts/blob/7.x/elasticsearch/examples/kubernetes-kind/Makefile#L5 diff --git a/elasticsearch/examples/microk8s/README.md b/elasticsearch/examples/microk8s/README.md index 487899d85..8cc3dcfa5 100644 --- a/elasticsearch/examples/microk8s/README.md +++ b/elasticsearch/examples/microk8s/README.md @@ -1,6 +1,6 @@ # MicroK8S -This example deploy a 3 nodes Elasticsearch 7.7.0-SNAPSHOT cluster on [MicroK8S][] +This example deploy a 3 nodes Elasticsearch 7.8.0-SNAPSHOT cluster on [MicroK8S][] using [custom values][]. Note that this configuration should be used for test only and isn't recommended @@ -28,5 +28,5 @@ The following MicroK8S [addons][] need to be enabled: [addons]: https://microk8s.io/docs/addons -[custom values]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/microk8s/values.yaml +[custom values]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/microk8s/values.yaml [MicroK8S]: https://microk8s.io diff --git a/elasticsearch/examples/migration/README.md b/elasticsearch/examples/migration/README.md index b492d515d..59e07e21d 100644 --- a/elasticsearch/examples/migration/README.md +++ b/elasticsearch/examples/migration/README.md @@ -160,8 +160,8 @@ client nodes: working correctly you can cleanup leftover resources from your old cluster. [basic license]: https://www.elastic.co/subscriptions -[data.yml]: https://github.com/elastic/helm-charts/blob/7.7/elasticsearch/examples/migration/data.yml +[data.yml]: https://github.com/elastic/helm-charts/blob/7.x/elasticsearch/examples/migration/data.yml [helm/charts]: https://github.com/helm/charts/tree/master/stable/elasticsearch -[master.yml]: https://github.com/elastic/helm-charts/blob/7.7/elasticsearch/examples/migration/master.yml +[master.yml]: https://github.com/elastic/helm-charts/blob/7.x/elasticsearch/examples/migration/master.yml [restoring to a different cluster guide]: https://www.elastic.co/guide/en/elasticsearch/reference/6.6/modules-snapshots.html#_restoring_to_a_different_cluster [rolling upgrades guide]: https://www.elastic.co/guide/en/elasticsearch/reference/6.6/rolling-upgrades.html diff --git a/elasticsearch/examples/minikube/README.md b/elasticsearch/examples/minikube/README.md index 08f4f4fc4..d01e0ba9f 100644 --- a/elasticsearch/examples/minikube/README.md +++ b/elasticsearch/examples/minikube/README.md @@ -1,6 +1,6 @@ # Minikube -This example deploy a 3 nodes Elasticsearch 7.7.0-SNAPSHOT cluster on [Minikube][] +This example deploy a 3 nodes Elasticsearch 7.8.0-SNAPSHOT cluster on [Minikube][] using [custom values][]. If helm or kubectl timeouts occur, you may consider creating a minikube VM with @@ -34,5 +34,5 @@ minikube addons enable storage-provisioner ``` -[custom values]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/minikube/values.yaml +[custom values]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/minikube/values.yaml [minikube]: https://minikube.sigs.k8s.io/docs/ diff --git a/elasticsearch/examples/multi/README.md b/elasticsearch/examples/multi/README.md index 410391dbd..08859022d 100644 --- a/elasticsearch/examples/multi/README.md +++ b/elasticsearch/examples/multi/README.md @@ -1,6 +1,6 @@ # Multi -This example deploy an Elasticsearch 7.7.0-SNAPSHOT cluster composed of 2 different Helm +This example deploy an Elasticsearch 7.8.0-SNAPSHOT cluster composed of 2 different Helm releases: - `helm-es-multi-master` for the 3 master nodes using [master values][] @@ -22,6 +22,6 @@ releases: You can also run [goss integration tests][] using `make test` -[data values]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/multi/data.yaml -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/multi/test/goss.yaml -[master values]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/multi/master.yaml +[data values]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/multi/data.yaml +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/multi/test/goss.yaml +[master values]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/multi/master.yaml diff --git a/elasticsearch/examples/openshift/README.md b/elasticsearch/examples/openshift/README.md index 53a924a25..4799efb7e 100644 --- a/elasticsearch/examples/openshift/README.md +++ b/elasticsearch/examples/openshift/README.md @@ -1,6 +1,6 @@ # OpenShift -This example deploy a 3 nodes Elasticsearch 7.7.0-SNAPSHOT cluster on [OpenShift][] +This example deploy a 3 nodes Elasticsearch 7.8.0-SNAPSHOT cluster on [OpenShift][] using [custom values][]. ## Usage @@ -19,6 +19,6 @@ using [custom values][]. You can also run [goss integration tests][] using `make test` -[custom values]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/openshift/values.yaml -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/openshift/test/goss.yaml +[custom values]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/openshift/values.yaml +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/openshift/test/goss.yaml [openshift]: https://www.openshift.com/ diff --git a/elasticsearch/examples/openshift/test/goss.yaml b/elasticsearch/examples/openshift/test/goss.yaml index b6141d4b9..878dd0cb5 100644 --- a/elasticsearch/examples/openshift/test/goss.yaml +++ b/elasticsearch/examples/openshift/test/goss.yaml @@ -11,7 +11,7 @@ http: status: 200 timeout: 2000 body: - - '"number" : "7.7.0"' + - '"number" : "7.8.0"' - '"cluster_name" : "elasticsearch"' - '"name" : "elasticsearch-master-0"' - 'You Know, for Search' diff --git a/elasticsearch/examples/oss/README.md b/elasticsearch/examples/oss/README.md index 67a36b114..78cd5ffa0 100644 --- a/elasticsearch/examples/oss/README.md +++ b/elasticsearch/examples/oss/README.md @@ -1,6 +1,6 @@ # OSS -This example deploy a 3 nodes Elasticsearch 7.7.0-SNAPSHOT cluster using +This example deploy a 3 nodes Elasticsearch 7.8.0-SNAPSHOT cluster using [Elasticsearch OSS][] version. ## Usage @@ -20,4 +20,4 @@ You can also run [goss integration tests][] using `make test` [elasticsearch oss]: https://www.elastic.co/downloads/elasticsearch-oss -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/oss/test/goss.yaml +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/oss/test/goss.yaml diff --git a/elasticsearch/examples/oss/test/goss.yaml b/elasticsearch/examples/oss/test/goss.yaml index 8240c8c84..30c179d51 100644 --- a/elasticsearch/examples/oss/test/goss.yaml +++ b/elasticsearch/examples/oss/test/goss.yaml @@ -11,7 +11,7 @@ http: status: 200 timeout: 2000 body: - - '"number" : "7.7.0-SNAPSHOT"' + - '"number" : "7.8.0-SNAPSHOT"' - '"cluster_name" : "oss"' - '"name" : "oss-master-0"' - 'You Know, for Search' diff --git a/elasticsearch/examples/security/README.md b/elasticsearch/examples/security/README.md index 1fdcf0d94..7e69fb284 100644 --- a/elasticsearch/examples/security/README.md +++ b/elasticsearch/examples/security/README.md @@ -1,6 +1,6 @@ # Security -This example deploy a 3 nodes Elasticsearch 7.7.0-SNAPSHOT with authentication and +This example deploy a 3 nodes Elasticsearch 7.8.0-SNAPSHOT with authentication and autogenerated certificates for TLS (see [values][]). Note that this configuration should be used for test only. For a production @@ -24,6 +24,6 @@ deployment you should generate SSL certificates following the [official docs][]. You can also run [goss integration tests][] using `make test` -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/security/test/goss.yaml -[official docs]: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/configuring-tls.html#node-certificates -[values]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/security/security.yaml +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/security/test/goss.yaml +[official docs]: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/configuring-tls.html#node-certificates +[values]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/security/security.yaml diff --git a/elasticsearch/examples/upgrade/README.md b/elasticsearch/examples/upgrade/README.md index 28cdb46e9..adc82ebb1 100644 --- a/elasticsearch/examples/upgrade/README.md +++ b/elasticsearch/examples/upgrade/README.md @@ -1,12 +1,12 @@ # Upgrade This example deploy a 3 nodes Elasticsearch cluster using [7.0.0-alpha1][] chart -version, then upgrade it to 7.7.0-SNAPSHOT version. +version, then upgrade it to 7.8.0-SNAPSHOT version. ## Usage -Running `make install` command will do both 7.0.0-alpha1 install and 7.7.0-SNAPSHOT +Running `make install` command will do both 7.0.0-alpha1 install and 7.8.0-SNAPSHOT upgrade @@ -16,4 +16,4 @@ You can also run [goss integration tests][] using `make test` [7.0.0-alpha1]: https://github.com/elastic/helm-charts/releases/tag/7.0.0-alpha1 -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/upgrade/test/goss.yaml +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/upgrade/test/goss.yaml diff --git a/elasticsearch/examples/upgrade/test/goss.yaml b/elasticsearch/examples/upgrade/test/goss.yaml index 4f062c242..b99d4e4f8 100644 --- a/elasticsearch/examples/upgrade/test/goss.yaml +++ b/elasticsearch/examples/upgrade/test/goss.yaml @@ -11,7 +11,7 @@ http: status: 200 timeout: 2000 body: - - '"number" : "7.7.0-SNAPSHOT"' + - '"number" : "7.8.0-SNAPSHOT"' - '"cluster_name" : "upgrade"' - '"name" : "upgrade-master-0"' - 'You Know, for Search' diff --git a/elasticsearch/values.yaml b/elasticsearch/values.yaml index 1f7b0bab3..a96a2fd24 100755 --- a/elasticsearch/values.yaml +++ b/elasticsearch/values.yaml @@ -50,7 +50,7 @@ secretMounts: [] # path: /usr/share/elasticsearch/config/certs image: "docker.elastic.co/elasticsearch/elasticsearch" -imageTag: "7.7.0-SNAPSHOT" +imageTag: "7.8.0-SNAPSHOT" imagePullPolicy: "IfNotPresent" podAnnotations: {} @@ -204,7 +204,7 @@ readinessProbe: successThreshold: 3 timeoutSeconds: 5 -# https://www.elastic.co/guide/en/elasticsearch/reference/7.7/cluster-health.html#request-params wait_for_status +# https://www.elastic.co/guide/en/elasticsearch/reference/7.8/cluster-health.html#request-params wait_for_status clusterHealthCheckParams: "wait_for_status=green&timeout=1s" ## Use an alternate scheduler. diff --git a/filebeat/Chart.yaml b/filebeat/Chart.yaml index e5891a665..843f7f70c 100755 --- a/filebeat/Chart.yaml +++ b/filebeat/Chart.yaml @@ -5,8 +5,8 @@ maintainers: - email: helm-charts@elastic.co name: Elastic name: filebeat -version: 7.7.0-SNAPSHOT -appVersion: 7.7.0-SNAPSHOT +version: 7.8.0-SNAPSHOT +appVersion: 7.8.0-SNAPSHOT sources: - https://github.com/elastic/beats icon: https://helm.elastic.co/icons/beats.png diff --git a/filebeat/README.md b/filebeat/README.md index 11ae6a9cd..ae9d87383 100644 --- a/filebeat/README.md +++ b/filebeat/README.md @@ -6,7 +6,7 @@ - [Requirements](#requirements) - [Installing](#installing) - [Using Helm repository](#using-helm-repository) - - [Using the 7.7 branch](#using-the-77-branch) + - [Using the 7.x branch](#using-the-7x-branch) - [Upgrading](#upgrading) - [Usage notes](#usage-notes) - [Configuration](#configuration) @@ -38,27 +38,27 @@ This Helm chart is a lightweight way to configure and run our official ## Installing -This chart is tested with the latest 7.7.0-SNAPSHOT versions. +This chart is tested with the latest 7.8.0-SNAPSHOT versions. ### Using Helm repository * Add the Elastic Helm charts repo: `helm repo add elastic https://helm.elastic.co` -* Install the latest 7.7 release: -`helm install --name filebeat elastic/filebeat --version=7.7.0` +* Install the latest 7.8 release: +`helm install --name filebeat elastic/filebeat --version=7.8.0` -### Using the 7.7 branch +### Using the 7.x branch * Clone the git repo and checkout the right branch: ```shell git clone git@github.com:elastic/helm-charts.git cd helm-charts - git checkout -b 7.7 origin/7.7 + git checkout -b 7.x origin/7.x ```` -* Install the latest 7.7.0-SNAPSHOT: +* Install the latest 7.8.0-SNAPSHOT: `helm install --name filebeat ./helm-charts/filebeat` @@ -107,7 +107,7 @@ as a reference. They are also used in the automated testing of this chart. | `hostPathRoot` | Fully-qualified [hostPath][] that will be used to persist Filebeat registry data | `/var/lib` | | `imagePullPolicy` | The Kubernetes [imagePullPolicy][] value | `IfNotPresent` | | `imagePullSecrets` | Configuration for [imagePullSecrets][] so that you can use a private registry for your image | `[]` | -| `imageTag` | The Filebeat Docker image tag | `7.7.0-SNAPSHOT` | +| `imageTag` | The Filebeat Docker image tag | `7.8.0-SNAPSHOT` | | `image` | The Filebeat Docker image | `docker.elastic.co/beats/filebeat` | | `labels` | Configurable [labels][] applied to all Filebeat pods | `{}` | | `livenessProbe` | Parameters to pass to liveness [probe][] checks for values such as timeouts and thresholds | see [values.yaml][] | @@ -169,14 +169,14 @@ about our development and testing process. [CONTRIBUTING.md]: https://github.com/elastic/helm-charts/blob/master/CONTRIBUTING.md [affinity]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity [annotations]: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ -[default Filebeat Helm chart]: https://github.com/elastic/helm-charts/tree/7.7/filebeat/README.md#default +[default Filebeat Helm chart]: https://github.com/elastic/helm-charts/tree/7.x/filebeat/README.md#default [environment variables]: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config [environment from variables]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables -[examples]: https://github.com/elastic/helm-charts/tree/7.7/filebeat/examples -[examples/oss]: https://github.com/elastic/helm-charts/tree/7.7/filebeat/examples/oss -[examples/security]: https://github.com/elastic/helm-charts/tree/7.7/filebeat/examples/security -[filebeat docker image]: https://www.elastic.co/guide/en/beats/filebeat/7.7/running-on-docker.html -[filebeat oss docker image]: https://www.docker.elastic.co/#filebeat-7-7-0-oss +[examples]: https://github.com/elastic/helm-charts/tree/7.x/filebeat/examples +[examples/oss]: https://github.com/elastic/helm-charts/tree/7.x/filebeat/examples/oss +[examples/security]: https://github.com/elastic/helm-charts/tree/7.x/filebeat/examples/security +[filebeat docker image]: https://www.elastic.co/guide/en/beats/filebeat/7.8/running-on-docker.html +[filebeat oss docker image]: https://www.docker.elastic.co/#filebeat-7-8-0-oss [helm]: https://helm.sh [hostNetwork]: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#host-namespaces [hostPath]: https://kubernetes.io/docs/concepts/storage/volumes/#hostpath @@ -184,7 +184,7 @@ about our development and testing process. [imagePullSecrets]: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret [kubernetes secrets]: https://kubernetes.io/docs/concepts/configuration/secret/ [labels]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ -[parent readme]: https://github.com/elastic/helm-charts/tree/7.7/README.md +[parent readme]: https://github.com/elastic/helm-charts/tree/7.x/README.md [nodeSelector]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector [podSecurityContext]: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ [priorityClass]: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass @@ -193,4 +193,4 @@ about our development and testing process. [serviceAccount]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ [tolerations]: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ [updateStrategy]: https://kubernetes.io/docs/tasks/manage-daemon/update-daemon-set/#daemonset-update-strategy -[values.yaml]: https://github.com/elastic/helm-charts/tree/7.7/filebeat/values.yaml +[values.yaml]: https://github.com/elastic/helm-charts/tree/7.x/filebeat/values.yaml diff --git a/filebeat/examples/default/README.md b/filebeat/examples/default/README.md index aee7abde5..ef694b8f5 100644 --- a/filebeat/examples/default/README.md +++ b/filebeat/examples/default/README.md @@ -1,6 +1,6 @@ # Default -This example deploy Filebeat 7.7.0-SNAPSHOT using [default values][]. +This example deploy Filebeat 7.8.0-SNAPSHOT using [default values][]. ## Usage @@ -22,6 +22,6 @@ This example deploy Filebeat 7.7.0-SNAPSHOT using [default values][]. You can also run [goss integration tests][] using `make test` -[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/default/ -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/filebeat/examples/default/test/goss.yaml -[default values]: https://github.com/elastic/helm-charts/tree/7.7/filebeat/values.yaml +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/default/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/filebeat/examples/default/test/goss.yaml +[default values]: https://github.com/elastic/helm-charts/tree/7.x/filebeat/values.yaml diff --git a/filebeat/examples/default/test/goss.yaml b/filebeat/examples/default/test/goss.yaml index f0c2458e4..71c870739 100644 --- a/filebeat/examples/default/test/goss.yaml +++ b/filebeat/examples/default/test/goss.yaml @@ -29,7 +29,7 @@ http: status: 200 timeout: 2000 body: - - 'filebeat-7.7.0' + - 'filebeat-7.8.0' file: /usr/share/filebeat/filebeat.yml: @@ -44,4 +44,4 @@ command: exit-status: 0 stdout: - 'elasticsearch: http://elasticsearch-master:9200' - - 'version: 7.7.0' + - 'version: 7.8.0' diff --git a/filebeat/examples/oss/README.md b/filebeat/examples/oss/README.md index b964ab23a..c64a94a5f 100644 --- a/filebeat/examples/oss/README.md +++ b/filebeat/examples/oss/README.md @@ -1,6 +1,6 @@ # OSS -This example deploy Filebeat 7.7.0-SNAPSHOT using [Filebeat OSS][] version. +This example deploy Filebeat 7.8.0-SNAPSHOT using [Filebeat OSS][] version. ## Usage @@ -23,5 +23,5 @@ You can also run [goss integration tests][] using `make test` [filebeat oss]: https://www.elastic.co/downloads/beats/filebeat-oss -[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/oss/ -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/filebeat/examples/oss/test/goss.yaml +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/oss/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/filebeat/examples/oss/test/goss.yaml diff --git a/filebeat/examples/oss/test/goss.yaml b/filebeat/examples/oss/test/goss.yaml index 7f6925e5b..da2d94e32 100644 --- a/filebeat/examples/oss/test/goss.yaml +++ b/filebeat/examples/oss/test/goss.yaml @@ -19,4 +19,4 @@ http: status: 200 timeout: 2000 body: - - 'filebeat-7.7.0' + - 'filebeat-7.8.0' diff --git a/filebeat/examples/security/README.md b/filebeat/examples/security/README.md index c88e277ca..566974823 100644 --- a/filebeat/examples/security/README.md +++ b/filebeat/examples/security/README.md @@ -1,6 +1,6 @@ # Security -This example deploy Filebeat 7.7.0-SNAPSHOT using authentication and TLS to connect to +This example deploy Filebeat 7.8.0-SNAPSHOT using authentication and TLS to connect to Elasticsearch (see [values][]). @@ -23,6 +23,6 @@ Elasticsearch (see [values][]). You can also run [goss integration tests][] using `make test` -[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/security/ -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/filebeat/examples/security/test/goss.yaml -[values]: https://github.com/elastic/helm-charts/tree/7.7/filebeat/examples/security/values.yaml +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/security/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/filebeat/examples/security/test/goss.yaml +[values]: https://github.com/elastic/helm-charts/tree/7.x/filebeat/examples/security/values.yaml diff --git a/filebeat/examples/security/test/goss.yaml b/filebeat/examples/security/test/goss.yaml index 4f44f46b5..8871dde92 100644 --- a/filebeat/examples/security/test/goss.yaml +++ b/filebeat/examples/security/test/goss.yaml @@ -3,7 +3,7 @@ http: status: 200 timeout: 2000 body: - - 'filebeat-7.7.0' + - 'filebeat-7.8.0' allow-insecure: true username: '{{ .Env.ELASTICSEARCH_USERNAME }}' password: '{{ .Env.ELASTICSEARCH_PASSWORD }}' diff --git a/filebeat/templates/daemonset.yaml b/filebeat/templates/daemonset.yaml index eace44437..011f585f2 100644 --- a/filebeat/templates/daemonset.yaml +++ b/filebeat/templates/daemonset.yaml @@ -159,7 +159,7 @@ spec: mountPath: /var/log readOnly: true # Necessary when using autodiscovery; avoid mounting it otherwise - # See: https://www.elastic.co/guide/en/beats/filebeat/7.7/configuration-autodiscover.html + # See: https://www.elastic.co/guide/en/beats/filebeat/7.8/configuration-autodiscover.html - name: varrundockersock mountPath: /var/run/docker.sock readOnly: true diff --git a/filebeat/values.yaml b/filebeat/values.yaml index ceb1f7526..a723aed13 100755 --- a/filebeat/values.yaml +++ b/filebeat/values.yaml @@ -8,7 +8,7 @@ filebeatConfig: paths: - /var/log/containers/*.log processors: - - add_kubernetes_metadata: + - add_kubernetes_metadata: host: ${NODE_NAME} matchers: - logs_path: @@ -52,7 +52,7 @@ envFrom: [] hostPathRoot: /var/lib hostNetworking: false image: "docker.elastic.co/beats/filebeat" -imageTag: "7.7.0-SNAPSHOT" +imageTag: "7.8.0-SNAPSHOT" imagePullPolicy: "IfNotPresent" imagePullSecrets: [] diff --git a/helpers/bumper.py b/helpers/bumper.py index 03dee561a..b5333a515 100755 --- a/helpers/bumper.py +++ b/helpers/bumper.py @@ -20,7 +20,7 @@ os.chdir(os.path.join(os.path.dirname(__file__), "..")) versions = { - 7: os.environ.get("BUMPER_VERSION_7", "7.7.0-SNAPSHOT"), + 7: os.environ.get("BUMPER_VERSION_7", "7.8.0-SNAPSHOT"), } chart_version = versions[7] diff --git a/helpers/examples.mk b/helpers/examples.mk index 26bb0b2a7..4b8da463c 100644 --- a/helpers/examples.mk +++ b/helpers/examples.mk @@ -1,7 +1,7 @@ GOSS_VERSION := v0.3.6 GOSS_FILE ?= goss.yaml GOSS_SELECTOR ?= release=$(RELEASE) -STACK_VERSION := 7.7.0-SNAPSHOT +STACK_VERSION := 7.8.0-SNAPSHOT .PHONY: help help: ## Display this help @@ -13,4 +13,3 @@ goss: ## Run goss tests echo Testing with pod: $$GOSS_CONTAINER && \ kubectl cp test/$(GOSS_FILE) $$GOSS_CONTAINER:/tmp/$(GOSS_FILE) && \ kubectl exec $$GOSS_CONTAINER -- sh -c "cd /tmp/ && curl -s -L https://github.com/aelsabbahy/goss/releases/download/$(GOSS_VERSION)/goss-linux-amd64 -o goss && chmod +rx ./goss && ./goss --gossfile $(GOSS_FILE) validate --retry-timeout 300s --sleep 5s --color --format documentation" - diff --git a/kibana/Chart.yaml b/kibana/Chart.yaml index ee49723c3..722b9688f 100755 --- a/kibana/Chart.yaml +++ b/kibana/Chart.yaml @@ -5,8 +5,8 @@ maintainers: - email: helm-charts@elastic.co name: Elastic name: kibana -version: 7.7.0-SNAPSHOT -appVersion: 7.7.0-SNAPSHOT +version: 7.8.0-SNAPSHOT +appVersion: 7.8.0-SNAPSHOT sources: - https://github.com/elastic/kibana icon: https://helm.elastic.co/icons/kibana.png diff --git a/kibana/README.md b/kibana/README.md index 8eaca9a39..03df5fea0 100644 --- a/kibana/README.md +++ b/kibana/README.md @@ -6,7 +6,7 @@ - [Requirements](#requirements) - [Installing](#installing) - [Using Helm repository](#using-helm-repository) - - [Using the 7.7 branch](#using-the-77-branch) + - [Using the 7.x branch](#using-the-7x-branch) - [Upgrading](#upgrading) - [Usage notes](#usage-notes) - [Configuration](#configuration) @@ -41,27 +41,27 @@ This Helm chart is a lightweight way to configure and run our official ## Installing -This chart is tested with the latest 7.7.0-SNAPSHOT versions. +This chart is tested with the latest 7.8.0-SNAPSHOT versions. ### Using Helm repository * Add the Elastic Helm charts repo: `helm repo add elastic https://helm.elastic.co` -* Install the latest 7.7 release: -`helm install --name kibana elastic/kibana --version=7.7.0` +* Install the latest 7.8 release: +`helm install --name kibana elastic/kibana --version=7.8.0` -### Using the 7.7 branch +### Using the 7.x branch * Clone the git repo and checkout the right branch: ```shell git clone git@github.com:elastic/helm-charts.git cd helm-charts - git checkout -b 7.7 origin/7.7 + git checkout -b 7.x origin/7.x ```` -* Install the latest 7.7.0-SNAPSHOT: +* Install the latest 7.8.0-SNAPSHOT: `helm install --name kibana ./helm-charts/kibana` @@ -95,7 +95,7 @@ as a reference. They are also used in the automated testing of this chart. | `httpPort` | The http port that Kubernetes will use for the healthchecks and the service | `5601` | | `imagePullPolicy` | The Kubernetes [imagePullPolicy][]value | `IfNotPresent` | | `imagePullSecrets` | Configuration for [imagePullSecrets][] so that you can use a private registry for your image | `[]` | -| `imageTag` | The Kibana Docker image tag | `7.7.0-SNAPSHOT` | +| `imageTag` | The Kibana Docker image tag | `7.8.0-SNAPSHOT` | | `image` | The Kibana Docker image | `docker.elastic.co/kibana/kibana` | | `ingress` | Configurable [ingress][] to expose the Kibana service. | see [values.yaml][] | | `kibanaConfig` | Allows you to add any config files in `/usr/share/kibana/config/` such as `kibana.yml` See [values.yaml][] for an example of the formatting | `{}` | @@ -212,33 +212,33 @@ about our development and testing process. [CONTRIBUTING.md]: https://github.com/elastic/helm-charts/blob/master/CONTRIBUTING.md [affinity]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity [annotations]: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ -[default elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/README.md#default +[default elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/README.md#default [environment variables]: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config [environment from variables]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables -[examples]: https://github.com/elastic/helm-charts/tree/7.7/kibana/examples -[examples/oss]: https://github.com/elastic/helm-charts/tree/7.7/kibana/examples/oss -[examples/security]: https://github.com/elastic/helm-charts/tree/7.7/kibana/examples/security +[examples]: https://github.com/elastic/helm-charts/tree/7.x/kibana/examples +[examples/oss]: https://github.com/elastic/helm-charts/tree/7.x/kibana/examples/oss +[examples/security]: https://github.com/elastic/helm-charts/tree/7.x/kibana/examples/security [helm]: https://helm.sh [imagePullPolicy]: https://kubernetes.io/docs/concepts/containers/images/#updating-images [imagePullSecrets]: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret [ingress]: https://kubernetes.io/docs/concepts/services-networking/ingress/ -[kibana docker image]: https://www.elastic.co/guide/en/kibana/7.7/docker.html -[kibana oss docker image]: https://www.docker.elastic.co/#kibana-7-7-0-oss +[kibana docker image]: https://www.elastic.co/guide/en/kibana/7.8/docker.html +[kibana oss docker image]: https://www.docker.elastic.co/#kibana-7-8-0-oss [kubernetes secrets]: https://kubernetes.io/docs/concepts/configuration/secret/ [labels]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ [lifecycle hooks]: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/ [nodeSelector]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector -[openshift]: https://github.com/elastic/helm-charts/tree/7.7/kibana/examples/openshift -[parent readme]: https://github.com/elastic/helm-charts/tree/7.7/README.md +[openshift]: https://github.com/elastic/helm-charts/tree/7.x/kibana/examples/openshift +[parent readme]: https://github.com/elastic/helm-charts/tree/7.x/README.md [priorityClass]: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass [probe]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/ [resources]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ -[security enabled elasticsearch cluster]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/README.md#security +[security enabled elasticsearch cluster]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/README.md#security [securityContext]: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod -[server.host]: https://www.elastic.co/guide/en/kibana/7.7/settings.html +[server.host]: https://www.elastic.co/guide/en/kibana/7.8/settings.html [service]: https://kubernetes.io/docs/concepts/services-networking/service/ [serviceAccount]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ -[standard upgrade]: https://www.elastic.co/guide/en/kibana/7.7/upgrade-standard.html +[standard upgrade]: https://www.elastic.co/guide/en/kibana/7.8/upgrade-standard.html [tolerations]: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ [updateStrategy]: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#updating-a-deployment -[values.yaml]: https://github.com/elastic/helm-charts/tree/7.7/kibana/values.yaml +[values.yaml]: https://github.com/elastic/helm-charts/tree/7.x/kibana/values.yaml diff --git a/kibana/examples/default/README.md b/kibana/examples/default/README.md index b06e0188e..ec6bea41c 100644 --- a/kibana/examples/default/README.md +++ b/kibana/examples/default/README.md @@ -1,6 +1,6 @@ # Default -This example deploy Kibana 7.7.0-SNAPSHOT using [default values][]. +This example deploy Kibana 7.8.0-SNAPSHOT using [default values][]. ## Usage @@ -22,6 +22,6 @@ This example deploy Kibana 7.7.0-SNAPSHOT using [default values][]. You can also run [goss integration tests][] using `make test` -[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/default/ -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/kibana/examples/default/test/goss.yaml -[default values]: https://github.com/elastic/helm-charts/tree/7.7/kibana/values.yaml +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/default/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/kibana/examples/default/test/goss.yaml +[default values]: https://github.com/elastic/helm-charts/tree/7.x/kibana/values.yaml diff --git a/kibana/examples/default/test/goss.yaml b/kibana/examples/default/test/goss.yaml index 0fe62169f..101aa5552 100644 --- a/kibana/examples/default/test/goss.yaml +++ b/kibana/examples/default/test/goss.yaml @@ -3,7 +3,7 @@ http: status: 200 timeout: 2000 body: - - '"number":"7.7.0"' + - '"number":"7.8.0"' http://localhost:5601/app/kibana: status: 200 diff --git a/kibana/examples/openshift/README.md b/kibana/examples/openshift/README.md index d8eefbb54..56c553086 100644 --- a/kibana/examples/openshift/README.md +++ b/kibana/examples/openshift/README.md @@ -1,6 +1,6 @@ # OpenShift -This example deploy Kibana 7.7.0-SNAPSHOT on [OpenShift][] using [custom values][]. +This example deploy Kibana 7.8.0-SNAPSHOT on [OpenShift][] using [custom values][]. ## Usage @@ -20,7 +20,7 @@ This example deploy Kibana 7.7.0-SNAPSHOT on [OpenShift][] using [custom values] You can also run [goss integration tests][] using `make test` -[custom values]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/openshift/values.yaml -[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/openshift/ -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/openshift/test/goss.yaml +[custom values]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/openshift/values.yaml +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/openshift/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/openshift/test/goss.yaml [openshift]: https://www.openshift.com/ diff --git a/kibana/examples/oss/README.md b/kibana/examples/oss/README.md index a4d5896ff..4cb2b9351 100644 --- a/kibana/examples/oss/README.md +++ b/kibana/examples/oss/README.md @@ -1,6 +1,6 @@ # OSS -This example deploy Kibana 7.7.0-SNAPSHOT using [Kibana OSS][] version. +This example deploy Kibana 7.8.0-SNAPSHOT using [Kibana OSS][] version. ## Usage @@ -23,5 +23,5 @@ You can also run [goss integration tests][] using `make test` [kibana oss]: https://www.elastic.co/downloads/kibana-oss -[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/oss/ -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/kibana/examples/oss/test/goss.yaml +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/oss/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/kibana/examples/oss/test/goss.yaml diff --git a/kibana/examples/security/README.md b/kibana/examples/security/README.md index e54c091e6..c84451934 100644 --- a/kibana/examples/security/README.md +++ b/kibana/examples/security/README.md @@ -1,6 +1,6 @@ # Security -This example deploy Kibana 7.7.0-SNAPSHOT using authentication and TLS to connect to +This example deploy Kibana 7.8.0-SNAPSHOT using authentication and TLS to connect to Elasticsearch (see [values][]). @@ -23,6 +23,6 @@ Elasticsearch (see [values][]). You can also run [goss integration tests][] using `make test` -[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/security/ -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/kibana/examples/security/test/goss.yaml -[values]: https://github.com/elastic/helm-charts/tree/7.7/kibana/examples/security/security.yaml +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/security/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/kibana/examples/security/test/goss.yaml +[values]: https://github.com/elastic/helm-charts/tree/7.x/kibana/examples/security/security.yaml diff --git a/kibana/values.yaml b/kibana/values.yaml index 8af17fbc7..e357f4fc8 100755 --- a/kibana/values.yaml +++ b/kibana/values.yaml @@ -29,7 +29,7 @@ secretMounts: [] # subPath: kibana.keystore # optional image: "docker.elastic.co/kibana/kibana" -imageTag: "7.7.0-SNAPSHOT" +imageTag: "7.8.0-SNAPSHOT" imagePullPolicy: "IfNotPresent" # additionals labels diff --git a/logstash/Chart.yaml b/logstash/Chart.yaml index a2466fd6f..05e2de6ea 100755 --- a/logstash/Chart.yaml +++ b/logstash/Chart.yaml @@ -5,8 +5,8 @@ maintainers: - email: helm-charts@elastic.co name: Elastic name: logstash -version: 7.7.0-SNAPSHOT -appVersion: 7.7.0-SNAPSHOT +version: 7.8.0-SNAPSHOT +appVersion: 7.8.0-SNAPSHOT sources: - https://github.com/elastic/logstash icon: https://helm.elastic.co/icons/logstash.png diff --git a/logstash/README.md b/logstash/README.md index d2f6686fb..26319e538 100644 --- a/logstash/README.md +++ b/logstash/README.md @@ -6,7 +6,7 @@ - [Requirements](#requirements) - [Installing](#installing) - [Using Helm repository](#using-helm-repository) - - [Using the 7.7 branch](#using-the-77-branch) + - [Using the 7.x branch](#using-the-7x-branch) - [Upgrading](#upgrading) - [Usage notes](#usage-notes) - [Configuration](#configuration) @@ -37,27 +37,27 @@ This Helm chart is a lightweight way to configure and run our official ## Installing -This chart is tested with the latest 7.7.0-SNAPSHOT versions. +This chart is tested with the latest 7.8.0-SNAPSHOT versions. ### Using Helm repository * Add the Elastic Helm charts repo: `helm repo add elastic https://helm.elastic.co` -* Install the latest 7.7 release: -`helm install --name logstash elastic/logstash --version=7.7.0` +* Install the latest 7.8 release: +`helm install --name logstash elastic/logstash --version=7.8.0` -### Using the 7.7 branch +### Using the 7.x branch * Clone the git repo and checkout the right branch: ```shell git clone git@github.com:elastic/helm-charts.git cd helm-charts - git checkout -b 7.7 origin/7.7 + git checkout -b 7.x origin/7.x ```` -* Install the latest 7.7.0-SNAPSHOT: +* Install the latest 7.8.0-SNAPSHOT: `helm install --name logstash ./helm-charts/logstash` @@ -112,7 +112,7 @@ using `http.host: 127.0.0.1`, default probes should be disabled or overrided | `httpPort` | The http port that Kubernetes will use for the healthchecks and the service | `9600` | | `imagePullPolicy` | The Kubernetes [imagePullPolicy][] value | `IfNotPresent` | | `imagePullSecrets` | Configuration for [imagePullSecrets][] so that you can use a private registry for your image | `[]` | -| `imageTag` | The Logstash Docker image tag | `7.7.0-SNAPSHOT` | +| `imageTag` | The Logstash Docker image tag | `7.8.0-SNAPSHOT` | | `image` | The Logstash Docker image | `docker.elastic.co/logstash/logstash` | | `labels` | Configurable [labels][] applied to all Logstash pods | `{}` | | `lifecycle` | Allows you to add lifecycle configuration. See [values.yaml][] for an example of the formatting | `{}` | @@ -192,23 +192,23 @@ about our development and testing process. [annotations]: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ [anti-affinity]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity [deploys statefulsets serially]: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies -[custom docker image]: https://www.elastic.co/guide/en/logstash/7.7/docker-config.html#_custom_images +[custom docker image]: https://www.elastic.co/guide/en/logstash/7.8/docker-config.html#_custom_images [environment variables]: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config [environment from variables]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables -[examples]: https://github.com/elastic/helm-charts/tree/7.7/logstash/examples -[examples/oss]: https://github.com/elastic/helm-charts/tree/7.7/logstash/examples/oss +[examples]: https://github.com/elastic/helm-charts/tree/7.x/logstash/examples +[examples/oss]: https://github.com/elastic/helm-charts/tree/7.x/logstash/examples/oss [helm]: https://helm.sh [imagePullPolicy]: https://kubernetes.io/docs/concepts/containers/images/#updating-images [imagePullSecrets]: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret [kubernetes secrets]: https://kubernetes.io/docs/concepts/configuration/secret/ [labels]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ -[logstash docker image]: https://www.elastic.co/guide/en/logstash/7.7/docker.html -[logstash oss docker image]: https://www.docker.elastic.co/#logstash-7-7-0-oss +[logstash docker image]: https://www.elastic.co/guide/en/logstash/7.8/docker.html +[logstash oss docker image]: https://www.docker.elastic.co/#logstash-7-8-0-oss [maxUnavailable]: https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget [node affinity settings]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature [nodeSelector]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector -[note]: https://www.elastic.co/guide/en/logstash/7.7/docker-config.html#docker-env-config -[parent readme]: https://github.com/elastic/helm-charts/tree/7.7/README.md +[note]: https://www.elastic.co/guide/en/logstash/7.8/docker-config.html#docker-env-config +[parent readme]: https://github.com/elastic/helm-charts/tree/7.x/README.md [priorityClass]: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass [probe]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/ [resources]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ @@ -217,5 +217,5 @@ about our development and testing process. [service]: https://kubernetes.io/docs/concepts/services-networking/service/ [terminationGracePeriod]: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods [tolerations]: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ -[values.yaml]: https://github.com/elastic/helm-charts/tree/7.7/logstash/values.yaml +[values.yaml]: https://github.com/elastic/helm-charts/tree/7.x/logstash/values.yaml [volumeClaimTemplate for statefulsets]: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#stable-storage diff --git a/logstash/examples/default/README.md b/logstash/examples/default/README.md index ba2fa62cf..27acaab55 100644 --- a/logstash/examples/default/README.md +++ b/logstash/examples/default/README.md @@ -1,6 +1,6 @@ # Default -This example deploy Logstash 7.7.0-SNAPSHOT using [default values][]. +This example deploy Logstash 7.8.0-SNAPSHOT using [default values][]. ## Usage @@ -13,5 +13,5 @@ This example deploy Logstash 7.7.0-SNAPSHOT using [default values][]. You can also run [goss integration tests][] using `make test` -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/logstash/examples/default/test/goss.yaml -[default values]: https://github.com/elastic/helm-charts/tree/7.7/logstash/values.yaml +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/logstash/examples/default/test/goss.yaml +[default values]: https://github.com/elastic/helm-charts/tree/7.x/logstash/values.yaml diff --git a/logstash/examples/default/test/goss.yaml b/logstash/examples/default/test/goss.yaml index 4a883cf36..9e6912433 100644 --- a/logstash/examples/default/test/goss.yaml +++ b/logstash/examples/default/test/goss.yaml @@ -10,7 +10,7 @@ http: timeout: 2000 body: - '"host" : "helm-logstash-default-logstash-0"' - - '"version" : "7.7.0"' + - '"version" : "7.8.0"' - '"http_address" : "0.0.0.0:9600"' - '"name" : "helm-logstash-default-logstash-0"' - '"status" : "green"' diff --git a/logstash/examples/elasticsearch/README.md b/logstash/examples/elasticsearch/README.md index 58d9850e9..965cbf750 100644 --- a/logstash/examples/elasticsearch/README.md +++ b/logstash/examples/elasticsearch/README.md @@ -1,6 +1,6 @@ # Elasticsearch -This example deploy Logstash 7.7.0-SNAPSHOT which connects to Elasticsearch (see +This example deploy Logstash 7.8.0-SNAPSHOT which connects to Elasticsearch (see [values][]). @@ -23,6 +23,6 @@ This example deploy Logstash 7.7.0-SNAPSHOT which connects to Elasticsearch (see You can also run [goss integration tests][] using `make test` -[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/default/ -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/logstash/examples/elasticsearch/test/goss.yaml -[values]: https://github.com/elastic/helm-charts/tree/7.7/logstash/examples/elasticsearch/values.yaml +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/default/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/logstash/examples/elasticsearch/test/goss.yaml +[values]: https://github.com/elastic/helm-charts/tree/7.x/logstash/examples/elasticsearch/values.yaml diff --git a/logstash/examples/elasticsearch/test/goss.yaml b/logstash/examples/elasticsearch/test/goss.yaml index 4e850758c..4194138c0 100644 --- a/logstash/examples/elasticsearch/test/goss.yaml +++ b/logstash/examples/elasticsearch/test/goss.yaml @@ -22,7 +22,7 @@ http: timeout: 2000 body: - '"host" : "helm-logstash-elasticsearch-logstash-0"' - - '"version" : "7.7.0"' + - '"version" : "7.8.0"' - '"http_address" : "0.0.0.0:9600"' - '"name" : "helm-logstash-elasticsearch-logstash-0"' - '"status" : "green"' diff --git a/logstash/examples/oss/README.md b/logstash/examples/oss/README.md index 8350847e6..54069f2f2 100644 --- a/logstash/examples/oss/README.md +++ b/logstash/examples/oss/README.md @@ -1,6 +1,6 @@ # OSS -This example deploy Logstash 7.7.0-SNAPSHOT using [Logstash OSS][] version. +This example deploy Logstash 7.8.0-SNAPSHOT using [Logstash OSS][] version. ## Usage @@ -14,4 +14,4 @@ You can also run [goss integration tests][] using `make test` [logstash oss]: https://www.elastic.co/downloads/logstash-oss -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/logstash/examples/oss/test/goss.yaml +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/logstash/examples/oss/test/goss.yaml diff --git a/logstash/examples/oss/test/goss.yaml b/logstash/examples/oss/test/goss.yaml index e1d11d999..7d9bfefbe 100644 --- a/logstash/examples/oss/test/goss.yaml +++ b/logstash/examples/oss/test/goss.yaml @@ -10,7 +10,7 @@ http: timeout: 2000 body: - '"host" : "helm-logstash-oss-logstash-0"' - - '"version" : "7.7.0"' + - '"version" : "7.8.0"' - '"http_address" : "0.0.0.0:9600"' - '"name" : "helm-logstash-oss-logstash-0"' - '"status" : "green"' diff --git a/logstash/values.yaml b/logstash/values.yaml index ba65eaf13..8fd6a4789 100755 --- a/logstash/values.yaml +++ b/logstash/values.yaml @@ -3,7 +3,7 @@ replicas: 1 # Allows you to add any config files in /usr/share/logstash/config/ # such as logstash.yml and log4j2.properties -# +# # Note that when overriding logstash.yml, `http.host: 0.0.0.0` should always be included # to make default probes work. logstashConfig: {} @@ -43,7 +43,7 @@ envFrom: [] secretMounts: [] image: "docker.elastic.co/logstash/logstash" -imageTag: "7.7.0-SNAPSHOT" +imageTag: "7.8.0-SNAPSHOT" imagePullPolicy: "IfNotPresent" imagePullSecrets: [] @@ -163,9 +163,9 @@ securityContext: terminationGracePeriod: 120 # Probes -# Default probes are using `httpGet` which requires that `http.host: 0.0.0.0` is part of +# Default probes are using `httpGet` which requires that `http.host: 0.0.0.0` is part of # `logstash.yml`. If needed probes can be disabled or overrided using the following syntaxes: -# +# # disable livenessProbe # livenessProbe: null # diff --git a/metricbeat/Chart.yaml b/metricbeat/Chart.yaml index 457bd5f64..1d42f81d0 100755 --- a/metricbeat/Chart.yaml +++ b/metricbeat/Chart.yaml @@ -5,8 +5,8 @@ maintainers: - email: helm-charts@elastic.co name: Elastic name: metricbeat -version: 7.7.0-SNAPSHOT -appVersion: 7.7.0-SNAPSHOT +version: 7.8.0-SNAPSHOT +appVersion: 7.8.0-SNAPSHOT sources: - https://github.com/elastic/beats icon: https://helm.elastic.co/icons/beats.png diff --git a/metricbeat/README.md b/metricbeat/README.md index bc305a4e1..4bffdbc08 100644 --- a/metricbeat/README.md +++ b/metricbeat/README.md @@ -6,7 +6,7 @@ - [Requirements](#requirements) - [Installing](#installing) - [Using Helm repository](#using-helm-repository) - - [Using the 7.7 branch](#using-the-77-branch) + - [Using the 7.x branch](#using-the-7x-branch) - [Upgrading](#upgrading) - [Usage notes](#usage-notes) - [Configuration](#configuration) @@ -40,27 +40,27 @@ This Helm chart is a lightweight way to configure and run our official ## Installing -This chart is tested with the latest 7.7.0-SNAPSHOT versions. +This chart is tested with the latest 7.8.0-SNAPSHOT versions. ### Using Helm repository * Add the Elastic Helm charts repo: `helm repo add elastic https://helm.elastic.co` -* Install the latest 7.7 release: -`helm install --name metricbeat elastic/metricbeat --version=7.7.0` +* Install the latest 7.8 release: +`helm install --name metricbeat elastic/metricbeat --version=7.8.0` -### Using the 7.7 branch +### Using the 7.x branch * Clone the git repo and checkout the right branch: ```shell git clone git@github.com:elastic/helm-charts.git cd helm-charts - git checkout -b 7.7 origin/7.7 + git checkout -b 7.x origin/7.x ```` -* Install the latest 7.7.0-SNAPSHOT: +* Install the latest 7.8.0-SNAPSHOT: `helm install --name metricbeat ./helm-charts/metricbeat` @@ -123,7 +123,7 @@ as a reference. They are also used in the automated testing of this chart. | `hostPathRoot` | Fully-qualified [hostPath][] that will be used to persist Metricbeat registry data | `/var/lib` | | `imagePullPolicy` | The Kubernetes [imagePullPolicy][] value | `IfNotPresent` | | `imagePullSecrets` | Configuration for [imagePullSecrets][] so that you can use a private registry for your image | `[]` | -| `imageTag` | The Metricbeat Docker image tag | `7.7.0-SNAPSHOT` | +| `imageTag` | The Metricbeat Docker image tag | `7.8.0-SNAPSHOT` | | `image` | The Metricbeat Docker image | `docker.elastic.co/beats/metricbeat` | | `labels` | Configurable [labels][] applied to all Metricbeat pods | `{}` | | `livenessProbe` | Parameters to pass to liveness [probe][] checks for values such as timeouts and thresholds | see [values.yaml][] | @@ -209,29 +209,29 @@ about our development and testing process. [CONTRIBUTING.md]: https://github.com/elastic/helm-charts/blob/master/CONTRIBUTING.md [affinity]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity [annotations]: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ -[default elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/README.md#default +[default elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/README.md#default [cluster role rules]: https://kubernetes.io/docs/reference/access-authn-authz/rbac/#role-and-clusterrole [environment variables]: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config [environment from variables]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables -[examples]: https://github.com/elastic/helm-charts/tree/7.7/metricbeat/examples -[examples/oss]: https://github.com/elastic/helm-charts/tree/7.7/metricbeat/examples/oss -[examples/security]: https://github.com/elastic/helm-charts/tree/7.7/metricbeat/examples/security +[examples]: https://github.com/elastic/helm-charts/tree/7.x/metricbeat/examples +[examples/oss]: https://github.com/elastic/helm-charts/tree/7.x/metricbeat/examples/oss +[examples/security]: https://github.com/elastic/helm-charts/tree/7.x/metricbeat/examples/security [helm]: https://helm.sh [hostPath]: https://kubernetes.io/docs/concepts/storage/volumes/#hostpath [hostNetwork]: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#host-namespaces [imagePullPolicy]: https://kubernetes.io/docs/concepts/containers/images/#updating-images [imagePullSecrets]: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret -[kube-state-metrics]: https://github.com/helm/charts/tree/7.7/stable/kube-state-metrics +[kube-state-metrics]: https://github.com/helm/charts/tree/7.x/stable/kube-state-metrics [kubernetes secrets]: https://kubernetes.io/docs/concepts/configuration/secret/ [labels]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ -[metricbeat docker image]: https://www.elastic.co/guide/en/beats/metricbeat/7.7/running-on-docker.html +[metricbeat docker image]: https://www.elastic.co/guide/en/beats/metricbeat/7.8/running-on-docker.html [priorityClass]: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass [nodeSelector]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector -[parent readme]: https://github.com/elastic/helm-charts/tree/7.7/README.md +[parent readme]: https://github.com/elastic/helm-charts/tree/7.x/README.md [probe]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes [resources]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ [securityContext]: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ [serviceAccount]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ [tolerations]: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ [updateStrategy]: https://kubernetes.io/docs/tasks/manage-daemon/update-daemon-set/#daemonset-update-strategy -[values.yaml]: https://github.com/elastic/helm-charts/tree/7.7/metricbeat/values.yaml +[values.yaml]: https://github.com/elastic/helm-charts/tree/7.x/metricbeat/values.yaml diff --git a/metricbeat/examples/default/README.md b/metricbeat/examples/default/README.md index b6913179b..ad2538354 100644 --- a/metricbeat/examples/default/README.md +++ b/metricbeat/examples/default/README.md @@ -1,6 +1,6 @@ # Default -This example deploy Metricbeat 7.7.0-SNAPSHOT using [default values][]. +This example deploy Metricbeat 7.8.0-SNAPSHOT using [default values][]. ## Usage @@ -22,6 +22,6 @@ This example deploy Metricbeat 7.7.0-SNAPSHOT using [default values][]. You can also run [goss integration tests][] using `make test` -[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/default/ -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/metricbeat/examples/default/test/goss.yaml -[default values]: https://github.com/elastic/helm-charts/tree/7.7/metricbeat/values.yaml +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/default/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/metricbeat/examples/default/test/goss.yaml +[default values]: https://github.com/elastic/helm-charts/tree/7.x/metricbeat/values.yaml diff --git a/metricbeat/examples/default/test/goss-metrics.yaml b/metricbeat/examples/default/test/goss-metrics.yaml index 7fca303f9..d053187a5 100644 --- a/metricbeat/examples/default/test/goss-metrics.yaml +++ b/metricbeat/examples/default/test/goss-metrics.yaml @@ -21,13 +21,13 @@ http: status: 200 timeout: 2000 body: - - 'metricbeat-7.7.0' + - 'metricbeat-7.8.0' 'http://elasticsearch-master:9200/_search?q=metricset.name:state_container%20AND%20kubernetes.container.name:metricbeat': status: 200 timeout: 2000 body: - - 'metricbeat-7.7.0' + - 'metricbeat-7.8.0' file: /usr/share/metricbeat/metricbeat.yml: @@ -41,4 +41,4 @@ command: exit-status: 0 stdout: - 'elasticsearch: http://elasticsearch-master:9200' - - 'version: 7.7.0' + - 'version: 7.8.0' diff --git a/metricbeat/examples/default/test/goss.yaml b/metricbeat/examples/default/test/goss.yaml index d353cba76..57729b462 100644 --- a/metricbeat/examples/default/test/goss.yaml +++ b/metricbeat/examples/default/test/goss.yaml @@ -25,12 +25,12 @@ http: status: 200 timeout: 2000 body: - - 'metricbeat-7.7.0' + - 'metricbeat-7.8.0' 'http://elasticsearch-master:9200/_search?q=metricset.name:container%20AND%20kubernetes.container.name:metricbeat': status: 200 timeout: 2000 body: - - 'metricbeat-7.7.0' + - 'metricbeat-7.8.0' file: /usr/share/metricbeat/metricbeat.yml: @@ -45,4 +45,4 @@ command: exit-status: 0 stdout: - 'elasticsearch: http://elasticsearch-master:9200' - - 'version: 7.7.0' + - 'version: 7.8.0' diff --git a/metricbeat/examples/oss/README.md b/metricbeat/examples/oss/README.md index c8b8ee916..66d300eb7 100644 --- a/metricbeat/examples/oss/README.md +++ b/metricbeat/examples/oss/README.md @@ -1,6 +1,6 @@ # OSS -This example deploy Metricbeat 7.7.0-SNAPSHOT using [Metricbeat OSS][] version. +This example deploy Metricbeat 7.8.0-SNAPSHOT using [Metricbeat OSS][] version. ## Usage @@ -23,5 +23,5 @@ You can also run [goss integration tests][] using `make test` [metricbeat oss]: https://www.elastic.co/downloads/beats/metricbeat-oss -[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/oss/ -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/metricbeat/examples/oss/test/goss.yaml +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/oss/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/metricbeat/examples/oss/test/goss.yaml diff --git a/metricbeat/examples/oss/test/goss-metrics.yaml b/metricbeat/examples/oss/test/goss-metrics.yaml index c78aa2faa..a8af07519 100644 --- a/metricbeat/examples/oss/test/goss-metrics.yaml +++ b/metricbeat/examples/oss/test/goss-metrics.yaml @@ -21,12 +21,12 @@ http: status: 200 timeout: 2000 body: - - 'metricbeat-7.7.0' + - 'metricbeat-7.8.0' http://oss-master:9200/_search?q=metricset.name:state_deployment: status: 200 timeout: 2000 body: - - 'metricbeat-7.7.0' + - 'metricbeat-7.8.0' file: /usr/share/metricbeat/metricbeat.yml: @@ -39,4 +39,4 @@ command: exit-status: 0 stdout: - 'elasticsearch: http://oss-master:9200' - - 'version: 7.7.0' + - 'version: 7.8.0' diff --git a/metricbeat/examples/oss/test/goss.yaml b/metricbeat/examples/oss/test/goss.yaml index af2f0826b..8a1bf3baa 100644 --- a/metricbeat/examples/oss/test/goss.yaml +++ b/metricbeat/examples/oss/test/goss.yaml @@ -25,12 +25,12 @@ http: status: 200 timeout: 2000 body: - - 'metricbeat-7.7.0' + - 'metricbeat-7.8.0' http://oss-master:9200/_search?q=metricset.name:container: status: 200 timeout: 2000 body: - - 'metricbeat-7.7.0' + - 'metricbeat-7.8.0' file: /usr/share/metricbeat/metricbeat.yml: @@ -44,4 +44,4 @@ command: exit-status: 0 stdout: - 'elasticsearch: http://oss-master:9200' - - 'version: 7.7.0' + - 'version: 7.8.0' diff --git a/metricbeat/examples/security/README.md b/metricbeat/examples/security/README.md index 8268e1e1f..85d8ee505 100644 --- a/metricbeat/examples/security/README.md +++ b/metricbeat/examples/security/README.md @@ -1,6 +1,6 @@ # Security -This example deploy Metricbeat 7.7.0-SNAPSHOT using authentication and TLS to connect to +This example deploy Metricbeat 7.8.0-SNAPSHOT using authentication and TLS to connect to Elasticsearch (see [values][]). @@ -23,6 +23,6 @@ Elasticsearch (see [values][]). You can also run [goss integration tests][] using `make test` -[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.7/elasticsearch/examples/security/ -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.7/metricbeat/examples/security/test/goss.yaml -[values]: https://github.com/elastic/helm-charts/tree/7.7/metricbeat/examples/security/values.yaml +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/security/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/metricbeat/examples/security/test/goss.yaml +[values]: https://github.com/elastic/helm-charts/tree/7.x/metricbeat/examples/security/values.yaml diff --git a/metricbeat/examples/security/test/goss-metrics.yaml b/metricbeat/examples/security/test/goss-metrics.yaml index 22ed216ca..cf215bd65 100644 --- a/metricbeat/examples/security/test/goss-metrics.yaml +++ b/metricbeat/examples/security/test/goss-metrics.yaml @@ -21,7 +21,7 @@ http: status: 200 timeout: 2000 body: - - 'metricbeat-7.7.0' + - 'metricbeat-7.8.0' allow-insecure: true username: '{{ .Env.ELASTICSEARCH_USERNAME }}' password: '{{ .Env.ELASTICSEARCH_PASSWORD }}' @@ -29,7 +29,7 @@ http: status: 200 timeout: 2000 body: - - 'metricbeat-7.7.0' + - 'metricbeat-7.8.0' allow-insecure: true username: '{{ .Env.ELASTICSEARCH_USERNAME }}' password: '{{ .Env.ELASTICSEARCH_PASSWORD }}' @@ -45,4 +45,4 @@ command: exit-status: 0 stdout: - 'elasticsearch: https://security-master:9200' - - 'version: 7.7.0' + - 'version: 7.8.0' diff --git a/metricbeat/examples/security/test/goss.yaml b/metricbeat/examples/security/test/goss.yaml index 8ee1ea5b9..58213e2e0 100644 --- a/metricbeat/examples/security/test/goss.yaml +++ b/metricbeat/examples/security/test/goss.yaml @@ -25,7 +25,7 @@ http: status: 200 timeout: 2000 body: - - 'metricbeat-7.7.0' + - 'metricbeat-7.8.0' allow-insecure: true username: '{{ .Env.ELASTICSEARCH_USERNAME }}' password: '{{ .Env.ELASTICSEARCH_PASSWORD }}' @@ -33,7 +33,7 @@ http: status: 200 timeout: 2000 body: - - 'metricbeat-7.7.0' + - 'metricbeat-7.8.0' allow-insecure: true username: '{{ .Env.ELASTICSEARCH_USERNAME }}' password: '{{ .Env.ELASTICSEARCH_PASSWORD }}' @@ -50,4 +50,4 @@ command: exit-status: 0 stdout: - 'elasticsearch: https://security-master:9200' - - 'version: 7.7.0' + - 'version: 7.8.0' diff --git a/metricbeat/templates/daemonset.yaml b/metricbeat/templates/daemonset.yaml index cbaca7558..7de40313d 100644 --- a/metricbeat/templates/daemonset.yaml +++ b/metricbeat/templates/daemonset.yaml @@ -143,7 +143,7 @@ spec: - name: data mountPath: /usr/share/metricbeat/data # Necessary when using autodiscovery; avoid mounting it otherwise - # See: https://www.elastic.co/guide/en/beats/metricbeat/7.7/configuration-autodiscover.html + # See: https://www.elastic.co/guide/en/beats/metricbeat/7.8/configuration-autodiscover.html - name: varrundockersock mountPath: /var/run/docker.sock readOnly: true @@ -158,4 +158,4 @@ spec: {{- end }} {{- if .Values.extraContainers }} {{ tpl .Values.extraContainers . | indent 6 }} - {{- end }} \ No newline at end of file + {{- end }} diff --git a/metricbeat/values.yaml b/metricbeat/values.yaml index 7ef153adb..783a09bb8 100755 --- a/metricbeat/values.yaml +++ b/metricbeat/values.yaml @@ -159,7 +159,7 @@ extraInitContainers: "" hostPathRoot: /var/lib image: "docker.elastic.co/beats/metricbeat" -imageTag: "7.7.0-SNAPSHOT" +imageTag: "7.8.0-SNAPSHOT" imagePullPolicy: "IfNotPresent" imagePullSecrets: [] From ff38c8deb11f7b4262f7ed443919d99378155df4 Mon Sep 17 00:00:00 2001 From: Julien Mailleret Date: Wed, 6 May 2020 18:16:04 +0200 Subject: [PATCH 24/44] [helm] bump helm version to 2.16.7 (#607) --- README.md | 2 +- helpers/helm-tester/Dockerfile | 2 +- helpers/terraform/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 42f64b2b3..51e6abfed 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ exact versions are defined under `KUBERNETES_VERSIONS` in ## Helm versions While we are checking backward compatibility, the charts are only tested with -Helm version mentioned in [helm-tester Dockerfile][] (currently 2.16.6). +Helm version mentioned in [helm-tester Dockerfile][] (currently 2.16.7). Note that we don't support [Helm 3][] version. ## ECK diff --git a/helpers/helm-tester/Dockerfile b/helpers/helm-tester/Dockerfile index 66d7dab91..01dbde85b 100644 --- a/helpers/helm-tester/Dockerfile +++ b/helpers/helm-tester/Dockerfile @@ -1,6 +1,6 @@ FROM python:3.7 -ENV HELM_VERSION=2.16.6 +ENV HELM_VERSION=2.16.7 RUN wget --no-verbose https://storage.googleapis.com/kubernetes-helm/helm-v${HELM_VERSION}-linux-amd64.tar.gz && \ tar xfv helm-v${HELM_VERSION}-linux-amd64.tar.gz && \ diff --git a/helpers/terraform/Dockerfile b/helpers/terraform/Dockerfile index 621f9f40e..3c0294060 100644 --- a/helpers/terraform/Dockerfile +++ b/helpers/terraform/Dockerfile @@ -3,7 +3,7 @@ FROM centos:7 ENV VAULT_VERSION 0.9.3 ENV TERRAFORM_VERSION=0.11.7 ENV KUBECTL_VERSION=1.15.4 -ENV HELM_VERSION=2.16.6 +ENV HELM_VERSION=2.16.7 ENV DOCKER_VERSION=18.09.7 RUN yum -y install \ From 675f62e618b975ea3c0922fb3a09c9d2b7e1f5d2 Mon Sep 17 00:00:00 2001 From: Julien Mailleret Date: Mon, 18 May 2020 10:58:57 +0200 Subject: [PATCH 25/44] [metricbeat] fix deployment upgrade by removing chart label from .spec.selector.matchLabels (#622) This fix metricbeat chart upgrades when .Chart.Version change. UPGRADE FAILED Error: Deployment.apps "metricbeat-metricbeat-metrics" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"app":"metricbeat-metricbeat-metrics", "chart":"metricbeat-7.7.0", "heritage":"Tiller", "release":"metricbeat"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable Error: UPGRADE FAILED: Deployment.apps "metricbeat-metricbeat-metrics" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"app":"metricbeat-metricbeat-metrics", "chart":"metricbeat-7.7.0", "heritage":"Tiller", "release":"metricbeat"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable See https://github.com/helm/charts/issues/7680 for more details --- metricbeat/templates/deployment.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/metricbeat/templates/deployment.yaml b/metricbeat/templates/deployment.yaml index ca056d42b..67eefabf8 100644 --- a/metricbeat/templates/deployment.yaml +++ b/metricbeat/templates/deployment.yaml @@ -13,7 +13,6 @@ spec: selector: matchLabels: app: '{{ template "metricbeat.fullname" . }}-metrics' - chart: '{{ .Chart.Name }}-{{ .Chart.Version }}' heritage: '{{ .Release.Service }}' release: '{{ .Release.Name }}' template: @@ -119,4 +118,4 @@ spec: {{- end }} {{- if .Values.extraContainers }} {{ tpl .Values.extraContainers . | indent 6 }} - {{- end }} \ No newline at end of file + {{- end }} From 8c904bba2b4826982a3660bb2488be404b2aeeaa Mon Sep 17 00:00:00 2001 From: Maximilian Rink Date: Wed, 27 May 2020 23:03:45 +0200 Subject: [PATCH 26/44] Fix configchecksum not being set (#634) --- metricbeat/templates/daemonset.yaml | 2 +- metricbeat/templates/deployment.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/metricbeat/templates/daemonset.yaml b/metricbeat/templates/daemonset.yaml index 7de40313d..5bf720702 100644 --- a/metricbeat/templates/daemonset.yaml +++ b/metricbeat/templates/daemonset.yaml @@ -25,7 +25,7 @@ spec: {{ $key }}: {{ $value | quote }} {{- end }} {{/* This forces a restart if the configmap has changed */}} - {{- if .Values.metricbeatConfig }} + {{- if or .Values.metricbeatConfig .Values.daemonset.metricbeatConfig }} configChecksum: {{ include (print .Template.BasePath "/configmap.yaml") . | sha256sum | trunc 63 }} {{- end }} name: "{{ template "metricbeat.fullname" . }}" diff --git a/metricbeat/templates/deployment.yaml b/metricbeat/templates/deployment.yaml index 67eefabf8..d612311c2 100644 --- a/metricbeat/templates/deployment.yaml +++ b/metricbeat/templates/deployment.yaml @@ -22,7 +22,7 @@ spec: {{ $key }}: {{ $value | quote }} {{- end }} {{/* This forces a restart if the configmap has changed */}} - {{- if .Values.metricbeatConfig }} + {{- if or .Values.metricbeatConfig .Values.deployment.metricbeatConfig }} configChecksum: {{ include (print .Template.BasePath "/configmap.yaml") . | sha256sum | trunc 63 }} {{- end }} labels: From df0e7d835d919c48773b9682106034d2d8b9ae05 Mon Sep 17 00:00:00 2001 From: Stefan Keranov Date: Wed, 27 May 2020 23:05:58 +0100 Subject: [PATCH 27/44] Fix values links in examples/multi/README.md (#639) --- elasticsearch/examples/multi/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elasticsearch/examples/multi/README.md b/elasticsearch/examples/multi/README.md index 08859022d..e8f569ab1 100644 --- a/elasticsearch/examples/multi/README.md +++ b/elasticsearch/examples/multi/README.md @@ -22,6 +22,6 @@ releases: You can also run [goss integration tests][] using `make test` -[data values]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/multi/data.yaml +[data values]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/multi/data.yml [goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/multi/test/goss.yaml -[master values]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/multi/master.yaml +[master values]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/multi/master.yml From ba03954261131798c4f123590b75cfa7f08837fa Mon Sep 17 00:00:00 2001 From: Max Kochubey Date: Thu, 28 May 2020 05:13:47 +0700 Subject: [PATCH 28/44] [kibana] String/YAML conditions for `.Values.{extraContainers,extraInitContainers}` (#637) --- kibana/templates/deployment.yaml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/kibana/templates/deployment.yaml b/kibana/templates/deployment.yaml index aca2ee153..9d7109265 100644 --- a/kibana/templates/deployment.yaml +++ b/kibana/templates/deployment.yaml @@ -69,8 +69,15 @@ spec: {{ toYaml .Values.imagePullSecrets | indent 8 }} {{- end }} {{- if .Values.extraInitContainers }} + # Currently some extra blocks accept strings + # to continue with backwards compatibility this is being kept + # whilst also allowing for yaml to be specified too. initContainers: + {{- if eq "string" (printf "%T" .Values.extraInitContainers) }} {{ tpl .Values.extraInitContainers . | indent 6 }} + {{- else }} +{{ toYaml .Values.extraInitContainers | indent 6 }} + {{- end }} {{- end }} containers: - name: kibana @@ -143,5 +150,12 @@ spec: subPath: {{ $path }} {{- end -}} {{- if .Values.extraContainers }} + # Currently some extra blocks accept strings + # to continue with backwards compatibility this is being kept + # whilst also allowing for yaml to be specified too. + {{- if eq "string" (printf "%T" .Values.extraContainers) }} {{ tpl .Values.extraContainers . | indent 6 }} - {{- end }} \ No newline at end of file + {{- else }} +{{ toYaml .Values.extraContainers | indent 6 }} + {{- end }} + {{- end }} From 207674e23e7ccf1c47253b52e31ca91a18914abc Mon Sep 17 00:00:00 2001 From: Gavin Williams Date: Thu, 28 May 2020 13:23:09 +0100 Subject: [PATCH 29/44] [elasticsearch] Fix issue with `readinessProbe` causing outages (#638) --- BREAKING_CHANGES.md | 179 +++++++++++++++++++++++ elasticsearch/templates/statefulset.yaml | 30 ++-- 2 files changed, 199 insertions(+), 10 deletions(-) create mode 100644 BREAKING_CHANGES.md diff --git a/BREAKING_CHANGES.md b/BREAKING_CHANGES.md new file mode 100644 index 000000000..35c7ec90e --- /dev/null +++ b/BREAKING_CHANGES.md @@ -0,0 +1,179 @@ +# Breaking changes + + + + +- [7.7.0 - 2020/05/13](#770---20200513) + - [Known Issues](#known-issues) + - [GA support](#ga-support) + - [New branching model](#new-branching-model) + - [Filebeat container inputs](#filebeat-container-inputs) + - [Metricbeat upgrade issue](#metricbeat-upgrade-issue) + - [Metricbeat split values for daemonset and deployment](#metricbeat-split-values-for-daemonset-and-deployment) +- [6.8.9 - 2020/05/13](#689---20200513) +- [7.6.2 - 2020/03/31](#762---20200331) + - [Kibana default resources](#kibana-default-resources) +- [7.6.0 - 2020/02/11](#760---20200211) + - [Elasticsearch default resources](#elasticsearch-default-resources) +- [7.5.0 - 2019/12/02](#750---20191202) + - [Metricbeat kube-state-metrics upgrade](#metricbeat-kube-state-metrics-upgrade) +- [7.0.0-alpha1 - 2019/04/17](#700-alpha1---20190417) + - [Elasticsearch upgrade from 6.x](#elasticsearch-upgrade-from-6x) + + + + + + +## 7.7.0 - 2020/05/13 + +### Known Issues + +Elasticsearch nodes could be restarted too quickly during an upgrade or rolling restart, potentially resulting in service disruption. +This is due to a bug introduced by the changes to the Elasticsearch `readinessProbe` in [#586][]. + +### GA support + +Elasticsearch, Kibana, Filebeat and Metricbeat are moving from beta to GA and +are supported by Elastic following these limitations: +- only released charts coming from [Elastic Helm repo][] or +[GitHub releases][] are supported. +- released charts are only supported when using the same chart version and +application version (ie: using 7.7.0 chart with 6.8.8 or 7.6.2 application is +not supported). + +### New branching model + +Elastic Helm charts repository is now following a [new branching model][]: +- `master` branch is now a development branch for next major release. +- new `7.x` branch is a development branch for next minor release using SNAPSHOT +Docker images. +- new `7.7` branch is a development branch for next patch release using SNAPSHOT +Docker images + +### Filebeat container inputs + +Filebeat chart default config is now using [container input][] instead of +[docker input][] in [#568][]. + +### Metricbeat upgrade issue + +Metricbeat upgrade are failing with +`spec.selector: Invalid value: ... field is immutable` error. This is related to +Metricbeat deployment selector including chart version which is not immutable. +You should use `helm upgrade --force` to upgrade Metricbeat. See [#621][] for +more details. + +### Metricbeat split values for daemonset and deployment + +Metricbeat is now using dedicated values for daemonset and deployment config. +The old values are still working but are now deprecated. See [#572][] for more +details. + +## 6.8.9 - 2020/05/13 + +See [7.7.0 Breaking changes](#770---20200513) + + +## 7.6.2 - 2020/03/31 + +### Kibana default resources + +Kibana default resources (cpu/memory requests and limits) are increased in +[#540][]. + +This change may impact cpu/memory available resources capacity in your +Kubernetes cluster. + +To come back to former default values, use the following values: + +```yaml +extraEnvs: +- name: "NODE_OPTIONS" + value: "" +resources: + requests: + cpu: "100m" + memory: "500Mi" + limits: + cpu: "1000m" + memory: "1Gi" +``` + + +## 7.6.0 - 2020/02/11 + +### Elasticsearch default resources + +Elasticsearch default cpu requests is increased in [#458][] following our +recommendation that resources requests and limits should have the same values. + +This change may impact available cpu capacity in your Kubernetes cluster. + +To come back to former default values, use the following values: + +```yaml +resources: + requests: + cpu: "100m" +``` + + +## 7.5.0 - 2019/12/02 + +### Metricbeat kube-state-metrics upgrade + +[kube-state-metrics][] chart dependency is upgraded from 1.6.0 to 2.4.1 in +[#352][]. This is causing Metricbeat chart upgrade from versions < 7.5.0 failing +with the following error: + +``` +UPGRADE FAILED +Error: Deployment.apps "metricbeat-kube-state-metrics" is 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 && Deployment.apps "metricbeat-metricbeat-metrics" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"app":"metricbeat-metricbeat-metrics", "chart":"metricbeat-7.5.0", "heritage":"Tiller", "release":"metricbeat"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable +Error: UPGRADE FAILED: Deployment.apps "metricbeat-kube-state-metrics" is 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 && Deployment.apps "metricbeat-metricbeat-metrics" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"app":"metricbeat-metricbeat-metrics", "chart":"metricbeat-7.5.0", "heritage":"Tiller", "release":"metricbeat"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable +``` + +The workaround is to use `--force` argument for `helm upgrade` command which +will force Metricbeat resources update through delete/recreate. + + +## 7.0.0-alpha1 - 2019/04/17 + +### Elasticsearch upgrade from 6.x + +If you were using the default Elasticsearch version from the previous release +(6.6.2-alpha1) you will first need to upgrade to Elasticsearch 6.7.1 before +being able to upgrade to 7.0.0. You can do this by adding this to your values +file: + +```yaml +esMajorVersion: 6 +imageTag: 6.7.1 +``` + +If you are upgrading an existing cluster that did not override the default +`storageClassName` you will now need to specify the `storageClassName`. This +only affects existing clusters and was changed in [#94][]. The advantage of this +is that now the Helm chart will just use the default `storageClassName` rather +than needing to override it for any providers where it is not called `standard`. + +``` +volumeClaimTemplate: + storageClassName: "standard" +``` + + +[#94]: https://github.com/elastic/helm-charts/pull/94 +[#352]: https://github.com/elastic/helm-charts/pull/352 +[#458]: https://github.com/elastic/helm-charts/pull/458 +[#540]: https://github.com/elastic/helm-charts/pull/540 +[#568]: https://github.com/elastic/helm-charts/pull/568 +[#572]: https://github.com/elastic/helm-charts/pull/572 +[#586]: https://github.com/elastic/helm-charts/pull/586 +[#621]: https://github.com/elastic/helm-charts/pull/621 +[container input]: https://www.elastic.co/guide/en/beats/filebeat/7.7/filebeat-input-container.html +[docker input]: https://www.elastic.co/guide/en/beats/filebeat/7.7/filebeat-input-docker.html +[elastic helm repo]: https://helm.elastic.co +[github releases]: https://github.com/elastic/helm-charts/releases +[new branching model]: https://github.com/elastic/helm-charts/blob/master/CONTRIBUTING.md#branching +[kube-state-metrics]: https://github.com/helm/charts/tree/master/stable/kube-state-metrics diff --git a/elasticsearch/templates/statefulset.yaml b/elasticsearch/templates/statefulset.yaml index 5297aac25..afc260710 100644 --- a/elasticsearch/templates/statefulset.yaml +++ b/elasticsearch/templates/statefulset.yaml @@ -213,22 +213,32 @@ spec: - -c - | #!/usr/bin/env bash -e - # If the node is starting up wait for the cluster to be ready (request params: '{{ .Values.clusterHealthCheckParams }}' ) + # 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 - if [ -n "${ELASTIC_USERNAME}" ] && [ -n "${ELASTIC_PASSWORD}" ]; then - BASIC_AUTH="-u ${ELASTIC_USERNAME}:${ELASTIC_PASSWORD}" - else - BASIC_AUTH='' - fi + http () { + local path="${1}" + local args="${2}" + set -- -XGET -s + + if [ "$args" != "" ]; then + set -- "$@" $args + fi + + if [ -n "${ELASTIC_USERNAME}" ] && [ -n "${ELASTIC_PASSWORD}" ]; then + set -- "$@" -u "${ELASTIC_USERNAME}:${ELASTIC_PASSWORD}" + fi + + curl --output /dev/null -k "$@" "{{ .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_CODE=$(curl -XGET -s -k ${BASIC_AUTH} -o /dev/null -w '%{http_code}' {{ .Values.protocol }}://127.0.0.1:{{ .Values.httpPort }}/) + HTTP_CODE=$(http "/" "-w %{http_code}") RC=$? if [[ ${RC} -ne 0 ]]; then - echo "curl -XGET -s -k \${BASIC_AUTH} -o /dev/null -w '%{http_code}' {{ .Values.protocol }}://127.0.0.1:{{ .Values.httpPort }}/ failed with RC ${RC}" + echo "curl --output /dev/null -k -XGET -s -w '%{http_code}' \${BASIC_AUTH} {{ .Values.protocol }}://127.0.0.1:{{ .Values.httpPort }}/ failed with RC ${RC}" exit ${RC} fi # ready if HTTP code 200, 503 is tolerable if ES version is 6.x @@ -237,13 +247,13 @@ spec: elif [[ ${HTTP_CODE} == "503" && "{{ include "elasticsearch.esMajorVersion" . }}" == "6" ]]; then exit 0 else - echo "curl -XGET -s -k \${BASIC_AUTH} -o /dev/null -w '%{http_code}' {{ .Values.protocol }}://127.0.0.1:{{ .Values.httpPort }}/ failed with HTTP code ${HTTP_CODE}" + echo "curl --output /dev/null -k -XGET -s -w '%{http_code}' \${BASIC_AUTH} {{ .Values.protocol }}://127.0.0.1:{{ .Values.httpPort }}/ failed with HTTP code ${HTTP_CODE}" exit 1 fi else echo 'Waiting for elasticsearch cluster to become ready (request params: "{{ .Values.clusterHealthCheckParams }}" )' - if curl -XGET -s -k --fail ${BASIC_AUTH} {{ .Values.protocol }}://127.0.0.1:{{ .Values.httpPort }}/_cluster/health?{{ .Values.clusterHealthCheckParams }} ; then + if http "/_cluster/health?{{ .Values.clusterHealthCheckParams }}" "--fail" ; then touch ${START_FILE} exit 0 else From 934e652937d87dda8b05e9accd17c1d9e5df74b7 Mon Sep 17 00:00:00 2001 From: Julien Mailleret <8582351+jmlrt@users.noreply.github.com> Date: Thu, 28 May 2020 17:36:59 +0200 Subject: [PATCH 30/44] [metricbeat] use deprecated kube-state-metrics config when existing (#624) This commit fix a bug introduced in https://github.com/elastic/helm-charts/pull/572 where Metricbeat deployment doesn't start after an upgrade from a previous version when using a custom metricbeatConfig. --- BREAKING_CHANGES.md | 9 +++++ metricbeat/templates/deployment.yaml | 4 +++ metricbeat/tests/metricbeat_test.py | 51 ++++++++++++++++++++++------ 3 files changed, 53 insertions(+), 11 deletions(-) diff --git a/BREAKING_CHANGES.md b/BREAKING_CHANGES.md index 35c7ec90e..890d5ea90 100644 --- a/BREAKING_CHANGES.md +++ b/BREAKING_CHANGES.md @@ -70,6 +70,14 @@ Metricbeat is now using dedicated values for daemonset and deployment config. The old values are still working but are now deprecated. See [#572][] for more details. +Warning: When upgrading Metricbeat while using custom `metricbeatConfig` value +for `kube-state-metrics-metricbeat.yml`, Metricbeat deployment fails with +`missing field accessing 'metricbeat.modules.0.hosts.0' (source:'metricbeat.yml')`. + +In this case `metricbeatConfig.kube-state-metrics-metricbeat.yml` value should +be migrated to `deployment.metricbeatConfig.metricbeat.yml`. See [#623][] for +more details. + ## 6.8.9 - 2020/05/13 See [7.7.0 Breaking changes](#770---20200513) @@ -171,6 +179,7 @@ volumeClaimTemplate: [#572]: https://github.com/elastic/helm-charts/pull/572 [#586]: https://github.com/elastic/helm-charts/pull/586 [#621]: https://github.com/elastic/helm-charts/pull/621 +[#623]: https://github.com/elastic/helm-charts/pull/623 [container input]: https://www.elastic.co/guide/en/beats/filebeat/7.7/filebeat-input-container.html [docker input]: https://www.elastic.co/guide/en/beats/filebeat/7.7/filebeat-input-docker.html [elastic helm repo]: https://helm.elastic.co diff --git a/metricbeat/templates/deployment.yaml b/metricbeat/templates/deployment.yaml index d612311c2..830438835 100644 --- a/metricbeat/templates/deployment.yaml +++ b/metricbeat/templates/deployment.yaml @@ -72,6 +72,10 @@ spec: image: "{{ .Values.image }}:{{ .Values.imageTag }}" imagePullPolicy: "{{ .Values.imagePullPolicy }}" args: + {{- if index .Values "metricbeatConfig" "kube-state-metrics-metricbeat.yml" }} + - "-c" + - "/usr/share/metricbeat/kube-state-metrics-metricbeat.yml" + {{- end }} - "-e" - "-E" - "http.enabled=true" diff --git a/metricbeat/tests/metricbeat_test.py b/metricbeat/tests/metricbeat_test.py index 83265498d..1e0e407d2 100644 --- a/metricbeat/tests/metricbeat_test.py +++ b/metricbeat/tests/metricbeat_test.py @@ -537,48 +537,77 @@ def test_adding_in_deprecated_metricbeat_config(): nestedkey: value dot.notation: test - other-config.yml: | + kube-state-metrics-metricbeat.yml: | hello = world """ r = helm_template(config) c = r["configmap"][name + "-config"]["data"] assert "metricbeat.yml" in c - assert "other-config.yml" in c + assert "kube-state-metrics-metricbeat.yml" in c assert "nestedkey: value" in c["metricbeat.yml"] assert "dot.notation: test" in c["metricbeat.yml"] - assert "hello = world" in c["other-config.yml"] + assert "hello = world" in c["kube-state-metrics-metricbeat.yml"] - d = r["daemonset"][name]["spec"]["template"]["spec"] + daemonset = r["daemonset"][name]["spec"]["template"]["spec"] assert { "configMap": {"name": name + "-config", "defaultMode": 0o600}, "name": project + "-config", - } in d["volumes"] + } in daemonset["volumes"] assert { "mountPath": "/usr/share/metricbeat/metricbeat.yml", "name": project + "-config", "subPath": "metricbeat.yml", "readOnly": True, - } in d["containers"][0]["volumeMounts"] + } in daemonset["containers"][0]["volumeMounts"] assert { - "mountPath": "/usr/share/metricbeat/other-config.yml", + "mountPath": "/usr/share/metricbeat/kube-state-metrics-metricbeat.yml", "name": project + "-config", - "subPath": "other-config.yml", + "subPath": "kube-state-metrics-metricbeat.yml", "readOnly": True, - } in d["containers"][0]["volumeMounts"] + } in daemonset["containers"][0]["volumeMounts"] assert ( "configChecksum" in r["daemonset"][name]["spec"]["template"]["metadata"]["annotations"] ) + deployment = r["deployment"][name + "-metrics"]["spec"]["template"]["spec"] + + assert { + "configMap": {"name": name + "-config", "defaultMode": 0o600}, + "name": project + "-config", + } in deployment["volumes"] + assert { + "mountPath": "/usr/share/metricbeat/metricbeat.yml", + "name": project + "-config", + "subPath": "metricbeat.yml", + "readOnly": True, + } in deployment["containers"][0]["volumeMounts"] + assert { + "mountPath": "/usr/share/metricbeat/kube-state-metrics-metricbeat.yml", + "name": project + "-config", + "subPath": "kube-state-metrics-metricbeat.yml", + "readOnly": True, + } in deployment["containers"][0]["volumeMounts"] + assert ("/usr/share/metricbeat/kube-state-metrics-metricbeat.yml") in deployment[ + "containers" + ][0]["args"] + + assert ( + "configChecksum" + in r["deployment"][name + "-metrics"]["spec"]["template"]["metadata"][ + "annotations" + ] + ) + def test_adding_a_secret_mount(): config = """ -daemonset: +daemonset: secretMounts: - name: elastic-certificates secretName: elastic-certificates-name @@ -614,7 +643,7 @@ def test_adding_a_secret_mount(): } not in r["deployment"][name + "-metrics"]["spec"]["template"]["spec"]["volumes"] config = """ -deployment: +deployment: secretMounts: - name: elastic-certificates secretName: elastic-certificates-name From a32bcae02b6a22d04f290697f6edbfb96e0f6f09 Mon Sep 17 00:00:00 2001 From: Dom Goodwin Date: Thu, 28 May 2020 21:09:28 +0100 Subject: [PATCH 31/44] Elasticsearch secret mountmode (#596) * Add ability to set the file permissions when mounting a secret * Added test for defaultMode on secret mount --- elasticsearch/templates/statefulset.yaml | 3 +++ elasticsearch/tests/elasticsearch_test.py | 18 ++++++++++++++++++ elasticsearch/values.yaml | 1 + 3 files changed, 22 insertions(+) diff --git a/elasticsearch/templates/statefulset.yaml b/elasticsearch/templates/statefulset.yaml index afc260710..acb1afbc8 100644 --- a/elasticsearch/templates/statefulset.yaml +++ b/elasticsearch/templates/statefulset.yaml @@ -113,6 +113,9 @@ spec: - name: {{ .name }} secret: secretName: {{ .secretName }} + {{- if .defaultMode }} + defaultMode: {{ .defaultMode }} + {{- end }} {{- end }} {{- if .Values.esConfig }} - name: esconfig diff --git a/elasticsearch/tests/elasticsearch_test.py b/elasticsearch/tests/elasticsearch_test.py index 82e5d279b..87b598e0d 100755 --- a/elasticsearch/tests/elasticsearch_test.py +++ b/elasticsearch/tests/elasticsearch_test.py @@ -514,6 +514,24 @@ def test_adding_a_secret_mount_with_subpath(): } +def test_adding_a_secret_mount_with_default_mode(): + config = """ +secretMounts: + - name: elastic-certificates + secretName: elastic-certs + path: /usr/share/elasticsearch/config/certs + subPath: cert.crt + defaultMode: 0755 +""" + 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: diff --git a/elasticsearch/values.yaml b/elasticsearch/values.yaml index a96a2fd24..4c1526e62 100755 --- a/elasticsearch/values.yaml +++ b/elasticsearch/values.yaml @@ -48,6 +48,7 @@ secretMounts: [] # - name: elastic-certificates # secretName: elastic-certificates # path: /usr/share/elasticsearch/config/certs +# defaultMode: 0755 image: "docker.elastic.co/elasticsearch/elasticsearch" imageTag: "7.8.0-SNAPSHOT" From d5f327bfd7b08e4c9e47a0a5ceed237b4368ee45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolfo=20Mart=C3=ADnez=20Vega?= Date: Fri, 29 May 2020 13:05:26 -0500 Subject: [PATCH 32/44] [kibana] Add extensible label support (#555) Common labels were moved to helpers template to have only one source of truth of common/added labels shared between all Kibana resources. Also, this extends the capability to add a custom label and this will be common between all the resources. --- kibana/templates/_helpers.tpl | 12 ++++++++++++ kibana/templates/configmap.yaml | 4 +--- kibana/templates/deployment.yaml | 7 +------ kibana/templates/ingress.yaml | 5 +---- kibana/templates/service.yaml | 5 +---- 5 files changed, 16 insertions(+), 17 deletions(-) diff --git a/kibana/templates/_helpers.tpl b/kibana/templates/_helpers.tpl index 2fe259ebd..d2ab927b6 100755 --- a/kibana/templates/_helpers.tpl +++ b/kibana/templates/_helpers.tpl @@ -29,3 +29,15 @@ Return the appropriate apiVersion for ingress. {{- print "networking.k8s.io/v1beta1" -}} {{- end -}} {{- end -}} + +{{/* +Common labels +*/}} +{{- define "kibana.labels" -}} +app: {{ .Chart.Name }} +release: {{ .Release.Name | quote }} +heritage: {{ .Release.Service }} +{{- if .Values.labels }} +{{ toYaml .Values.labels }} +{{- end }} +{{- end -}} diff --git a/kibana/templates/configmap.yaml b/kibana/templates/configmap.yaml index 88927597a..2c9dc0fba 100644 --- a/kibana/templates/configmap.yaml +++ b/kibana/templates/configmap.yaml @@ -4,9 +4,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: {{ template "kibana.fullname" . }}-config - labels: - app: {{ .Chart.Name }} - release: {{ .Release.Name | quote }} + labels: {{ include "kibana.labels" . | nindent 4 }} data: {{- range $path, $config := .Values.kibanaConfig }} {{ $path }}: | diff --git a/kibana/templates/deployment.yaml b/kibana/templates/deployment.yaml index 9d7109265..5555d2ad0 100644 --- a/kibana/templates/deployment.yaml +++ b/kibana/templates/deployment.yaml @@ -2,12 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "kibana.fullname" . }} - labels: - app: {{ .Chart.Name }} - release: {{ .Release.Name | quote }} - {{- range $key, $value := .Values.labels }} - {{ $key }}: {{ $value | quote }} - {{- end }} + labels: {{ include "kibana.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicas }} strategy: diff --git a/kibana/templates/ingress.yaml b/kibana/templates/ingress.yaml index e9aafcb65..e62977495 100644 --- a/kibana/templates/ingress.yaml +++ b/kibana/templates/ingress.yaml @@ -6,10 +6,7 @@ apiVersion: {{ template "kibana.ingress.apiVersion" . }} kind: Ingress metadata: name: {{ $fullName }} - labels: - app: {{ .Chart.Name }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} + labels: {{ include "kibana.labels" . | nindent 4 }} {{- with .Values.ingress.annotations }} annotations: {{ toYaml . | indent 4 }} diff --git a/kibana/templates/service.yaml b/kibana/templates/service.yaml index 5734580bf..71400a88d 100644 --- a/kibana/templates/service.yaml +++ b/kibana/templates/service.yaml @@ -3,10 +3,7 @@ apiVersion: v1 kind: Service metadata: name: {{ template "kibana.fullname" . }} - labels: - app: {{ .Chart.Name }} - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service }} + labels: {{ include "kibana.labels" . | nindent 4 }} {{- if .Values.service.labels }} {{ toYaml .Values.service.labels | indent 4}} {{- end }} From c96be3d6995160bb8238fc4ca24c7c648662cc6a Mon Sep 17 00:00:00 2001 From: Julien Mailleret <8582351+jmlrt@users.noreply.github.com> Date: Sat, 30 May 2020 00:05:14 +0200 Subject: [PATCH 33/44] [meta] add support for k8s 1.16 (#635) * add CI tests for GKE 1.16 * test Elasticsearch upgrade from 7.4.0 on K8S 1.16 due to previous version of Elasticsearch chart not compatible with K8S 1.16 (see https://github.com/elastic/helm-charts/pull/635#issuecomment-635472582) * move Elasticsearch upgrade test logic to dedicated shell script to improve error handling * add jq to Docker image --- elasticsearch/examples/upgrade/Makefile | 11 +-- elasticsearch/examples/upgrade/README.md | 18 +++-- .../examples/upgrade/scripts/upgrade.sh | 76 +++++++++++++++++++ helpers/matrix.yml | 1 + helpers/terraform/Dockerfile | 8 +- 5 files changed, 98 insertions(+), 16 deletions(-) create mode 100755 elasticsearch/examples/upgrade/scripts/upgrade.sh diff --git a/elasticsearch/examples/upgrade/Makefile b/elasticsearch/examples/upgrade/Makefile index 9e1e6fd5e..f890d502c 100644 --- a/elasticsearch/examples/upgrade/Makefile +++ b/elasticsearch/examples/upgrade/Makefile @@ -4,17 +4,8 @@ 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 + ./scripts/upgrade.sh --release $(RELEASE) init: helm init --client-only diff --git a/elasticsearch/examples/upgrade/README.md b/elasticsearch/examples/upgrade/README.md index adc82ebb1..402979b55 100644 --- a/elasticsearch/examples/upgrade/README.md +++ b/elasticsearch/examples/upgrade/README.md @@ -1,19 +1,27 @@ # Upgrade -This example deploy a 3 nodes Elasticsearch cluster using [7.0.0-alpha1][] chart -version, then upgrade it to 7.8.0-SNAPSHOT version. +This example will deploy a 3 node Elasticsearch cluster using an old chart version, +then upgrade it to version 7.8.0-SNAPSHOT. + +The following upgrades are tested: +- Upgrade from [7.0.0-alpha1][] version on K8S <1.16 +- Upgrade from [7.4.0][] version on K8S >=1.16 (Elasticsearch chart < 7.4.0 are +not compatible with K8S >= 1.16) ## Usage -Running `make install` command will do both 7.0.0-alpha1 install and 7.8.0-SNAPSHOT -upgrade +Running `make install` command will do first install and 7.8.0-SNAPSHOT upgrade. + +Note: [jq][] is a requirement for this make target. ## Testing -You can also run [goss integration tests][] using `make test` +You can also run [goss integration tests][] using `make test`. [7.0.0-alpha1]: https://github.com/elastic/helm-charts/releases/tag/7.0.0-alpha1 +[7.4.0]: https://github.com/elastic/helm-charts/releases/tag/7.4.0 [goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/upgrade/test/goss.yaml +[jq]: https://stedolan.github.io/jq/ diff --git a/elasticsearch/examples/upgrade/scripts/upgrade.sh b/elasticsearch/examples/upgrade/scripts/upgrade.sh new file mode 100755 index 000000000..6d0aa9ffc --- /dev/null +++ b/elasticsearch/examples/upgrade/scripts/upgrade.sh @@ -0,0 +1,76 @@ +#!/usr/bin/env bash + +set -euo pipefail + +usage() { + cat <<-EOF + USAGE: + $0 [--release ] [--from ] + $0 --help + + OPTIONS: + --release + Name of the Helm release to install + --from + Elasticsearch version to use for first install + EOF + exit 1 +} + +RELEASE="helm-es-upgrade" +FROM="" + +while [[ $# -gt 0 ]] +do + key="$1" + + case $key in + --help) + usage + ;; + --release) + RELEASE="$2" + shift 2 + ;; + --from) + FROM="$2" + shift 2 + ;; + *) + log "Unrecognized argument: '$key'" + usage + ;; + esac +done + +if ! command -v jq > /dev/null +then + echo 'jq is required to use this script' + echo 'please check https://stedolan.github.io/jq/download/ to install it' + exit 1 +fi + +# Elasticsearch chart < 7.4.0 are not compatible with K8S >= 1.16) +if [[ -z $FROM ]] +then + KUBE_MINOR_VERSION=$(kubectl version -o json | jq --raw-output --exit-status '.serverVersion.minor' | sed 's/[^0-9]*//g') + + if [ "$KUBE_MINOR_VERSION" -lt 16 ] + then + FROM="7.0.0-alpha1" + else + FROM="7.4.0" + fi +fi + +helm repo add elastic https://helm.elastic.co + +# Initial install +printf "Installing Elasticsearch chart %s\n" "$FROM" +helm upgrade --wait --timeout=600 --install "$RELEASE" elastic/elasticsearch --version "$FROM" --set clusterName=upgrade +kubectl rollout status sts/upgrade-master --timeout=600s + +# Upgrade +printf "Upgrading Elasticsearch chart\n" +helm upgrade --wait --timeout=600 --set terminationGracePeriod=121 --install "$RELEASE" ../../ --set clusterName=upgrade +kubectl rollout status sts/upgrade-master --timeout=600s diff --git a/helpers/matrix.yml b/helpers/matrix.yml index 3a5871aad..aaba651f9 100644 --- a/helpers/matrix.yml +++ b/helpers/matrix.yml @@ -34,3 +34,4 @@ APM_SERVER_SUITE: KUBERNETES_VERSION: - '1.14' - '1.15' + - '1.16' diff --git a/helpers/terraform/Dockerfile b/helpers/terraform/Dockerfile index 3c0294060..09057aca0 100644 --- a/helpers/terraform/Dockerfile +++ b/helpers/terraform/Dockerfile @@ -2,9 +2,10 @@ FROM centos:7 ENV VAULT_VERSION 0.9.3 ENV TERRAFORM_VERSION=0.11.7 -ENV KUBECTL_VERSION=1.15.4 +ENV KUBECTL_VERSION=1.16.10 ENV HELM_VERSION=2.16.7 ENV DOCKER_VERSION=18.09.7 +ENV JQ_VERSION=1.6 RUN yum -y install \ make \ @@ -44,3 +45,8 @@ RUN curl -O https://download.docker.com/linux/static/stable/x86_64/docker-${DOCK mv docker/docker /usr/local/bin && \ rm -rf docker/ && \ docker + +RUN curl -O -L https://github.com/stedolan/jq/releases/download/jq-${JQ_VERSION}/jq-linux64 && \ + mv jq-linux64 /usr/local/bin/jq && \ + chmod a+x /usr/local/bin/jq && \ + jq --version From 344bc389db555ada05c6ee9ed7b8a4352fb66872 Mon Sep 17 00:00:00 2001 From: Julien Mailleret <8582351+jmlrt@users.noreply.github.com> Date: Thu, 11 Jun 2020 16:36:44 +0200 Subject: [PATCH 34/44] [helm] bump helm version to 2.16.8 (#657) --- README.md | 2 +- helpers/helm-tester/Dockerfile | 2 +- helpers/terraform/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 51e6abfed..18bb592bc 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ exact versions are defined under `KUBERNETES_VERSIONS` in ## Helm versions While we are checking backward compatibility, the charts are only tested with -Helm version mentioned in [helm-tester Dockerfile][] (currently 2.16.7). +Helm version mentioned in [helm-tester Dockerfile][] (currently 2.16.8). Note that we don't support [Helm 3][] version. ## ECK diff --git a/helpers/helm-tester/Dockerfile b/helpers/helm-tester/Dockerfile index 01dbde85b..9640c9d69 100644 --- a/helpers/helm-tester/Dockerfile +++ b/helpers/helm-tester/Dockerfile @@ -1,6 +1,6 @@ FROM python:3.7 -ENV HELM_VERSION=2.16.7 +ENV HELM_VERSION=2.16.8 RUN wget --no-verbose https://storage.googleapis.com/kubernetes-helm/helm-v${HELM_VERSION}-linux-amd64.tar.gz && \ tar xfv helm-v${HELM_VERSION}-linux-amd64.tar.gz && \ diff --git a/helpers/terraform/Dockerfile b/helpers/terraform/Dockerfile index 09057aca0..b921c97de 100644 --- a/helpers/terraform/Dockerfile +++ b/helpers/terraform/Dockerfile @@ -3,7 +3,7 @@ FROM centos:7 ENV VAULT_VERSION 0.9.3 ENV TERRAFORM_VERSION=0.11.7 ENV KUBECTL_VERSION=1.16.10 -ENV HELM_VERSION=2.16.7 +ENV HELM_VERSION=2.16.8 ENV DOCKER_VERSION=18.09.7 ENV JQ_VERSION=1.6 From 285914a1a44036f7b9130dd92d356b5e6a353444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20de=20Saint=20Martin?= Date: Thu, 11 Jun 2020 15:21:14 +0200 Subject: [PATCH 35/44] Elasticsearch: do not include heritage selector (#437) According to https://github.com/helm/charts/blob/master/REVIEW_GUIDELINES.md, service selector should not contain heritage. It would break (future) migration from helm 2 to helm 3 (during the rolling update only, there could be a downtime when only old nodes are ready but new services is there). --- elasticsearch/templates/service.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/elasticsearch/templates/service.yaml b/elasticsearch/templates/service.yaml index 4572af078..2c8f852f8 100644 --- a/elasticsearch/templates/service.yaml +++ b/elasticsearch/templates/service.yaml @@ -20,7 +20,6 @@ metadata: spec: type: {{ .Values.service.type }} selector: - heritage: {{ .Release.Service | quote }} release: {{ .Release.Name | quote }} chart: "{{ .Chart.Name }}" app: "{{ template "elasticsearch.uname" . }}" From 9b264893a18f80253531ed5daa9426becbe3941d Mon Sep 17 00:00:00 2001 From: Julien Mailleret <8582351+jmlrt@users.noreply.github.com> Date: Fri, 12 Jun 2020 13:23:01 +0200 Subject: [PATCH 36/44] initiate 7.8 branch (#660) This commit initiates the 7.8 branch which will be dedicated to the 7.8.x releases for the Helm Charts. It will allow to: - test this branch with the daily Stack Docker images 7.8.0-SNAPSHOT via dedicated Jenkins jobs - test the staging 7.8.x Docker images before a release This branch is based on [7.x](https://github.com/elastic/helm-charts/tree/7.x/) --- BREAKING_CHANGES.md | 188 ------------------ README.md | 52 ++++- apm-server/README.md | 59 +++--- apm-server/examples/default/README.md | 6 +- apm-server/examples/oss/README.md | 4 +- apm-server/examples/security/README.md | 6 +- elasticsearch/README.md | 80 ++++---- elasticsearch/examples/config/README.md | 4 +- elasticsearch/examples/default/README.md | 4 +- .../examples/docker-for-mac/README.md | 2 +- .../examples/kubernetes-kind/README.md | 4 +- elasticsearch/examples/microk8s/README.md | 2 +- elasticsearch/examples/migration/README.md | 4 +- elasticsearch/examples/minikube/README.md | 2 +- elasticsearch/examples/multi/README.md | 6 +- elasticsearch/examples/openshift/README.md | 4 +- elasticsearch/examples/oss/README.md | 2 +- elasticsearch/examples/security/README.md | 4 +- elasticsearch/examples/upgrade/README.md | 2 +- filebeat/README.md | 57 +++--- filebeat/examples/default/README.md | 6 +- filebeat/examples/oss/README.md | 4 +- filebeat/examples/security/README.md | 6 +- helpers/bumper.py | 2 +- kibana/README.md | 60 +++--- kibana/examples/default/README.md | 6 +- kibana/examples/openshift/README.md | 6 +- kibana/examples/oss/README.md | 4 +- kibana/examples/security/README.md | 6 +- logstash/README.md | 58 +++--- logstash/examples/default/README.md | 4 +- logstash/examples/elasticsearch/README.md | 6 +- logstash/examples/oss/README.md | 2 +- metricbeat/README.md | 59 +++--- metricbeat/examples/default/README.md | 6 +- metricbeat/examples/oss/README.md | 4 +- metricbeat/examples/security/README.md | 6 +- 37 files changed, 280 insertions(+), 457 deletions(-) delete mode 100644 BREAKING_CHANGES.md diff --git a/BREAKING_CHANGES.md b/BREAKING_CHANGES.md deleted file mode 100644 index 890d5ea90..000000000 --- a/BREAKING_CHANGES.md +++ /dev/null @@ -1,188 +0,0 @@ -# Breaking changes - - - - -- [7.7.0 - 2020/05/13](#770---20200513) - - [Known Issues](#known-issues) - - [GA support](#ga-support) - - [New branching model](#new-branching-model) - - [Filebeat container inputs](#filebeat-container-inputs) - - [Metricbeat upgrade issue](#metricbeat-upgrade-issue) - - [Metricbeat split values for daemonset and deployment](#metricbeat-split-values-for-daemonset-and-deployment) -- [6.8.9 - 2020/05/13](#689---20200513) -- [7.6.2 - 2020/03/31](#762---20200331) - - [Kibana default resources](#kibana-default-resources) -- [7.6.0 - 2020/02/11](#760---20200211) - - [Elasticsearch default resources](#elasticsearch-default-resources) -- [7.5.0 - 2019/12/02](#750---20191202) - - [Metricbeat kube-state-metrics upgrade](#metricbeat-kube-state-metrics-upgrade) -- [7.0.0-alpha1 - 2019/04/17](#700-alpha1---20190417) - - [Elasticsearch upgrade from 6.x](#elasticsearch-upgrade-from-6x) - - - - - - -## 7.7.0 - 2020/05/13 - -### Known Issues - -Elasticsearch nodes could be restarted too quickly during an upgrade or rolling restart, potentially resulting in service disruption. -This is due to a bug introduced by the changes to the Elasticsearch `readinessProbe` in [#586][]. - -### GA support - -Elasticsearch, Kibana, Filebeat and Metricbeat are moving from beta to GA and -are supported by Elastic following these limitations: -- only released charts coming from [Elastic Helm repo][] or -[GitHub releases][] are supported. -- released charts are only supported when using the same chart version and -application version (ie: using 7.7.0 chart with 6.8.8 or 7.6.2 application is -not supported). - -### New branching model - -Elastic Helm charts repository is now following a [new branching model][]: -- `master` branch is now a development branch for next major release. -- new `7.x` branch is a development branch for next minor release using SNAPSHOT -Docker images. -- new `7.7` branch is a development branch for next patch release using SNAPSHOT -Docker images - -### Filebeat container inputs - -Filebeat chart default config is now using [container input][] instead of -[docker input][] in [#568][]. - -### Metricbeat upgrade issue - -Metricbeat upgrade are failing with -`spec.selector: Invalid value: ... field is immutable` error. This is related to -Metricbeat deployment selector including chart version which is not immutable. -You should use `helm upgrade --force` to upgrade Metricbeat. See [#621][] for -more details. - -### Metricbeat split values for daemonset and deployment - -Metricbeat is now using dedicated values for daemonset and deployment config. -The old values are still working but are now deprecated. See [#572][] for more -details. - -Warning: When upgrading Metricbeat while using custom `metricbeatConfig` value -for `kube-state-metrics-metricbeat.yml`, Metricbeat deployment fails with -`missing field accessing 'metricbeat.modules.0.hosts.0' (source:'metricbeat.yml')`. - -In this case `metricbeatConfig.kube-state-metrics-metricbeat.yml` value should -be migrated to `deployment.metricbeatConfig.metricbeat.yml`. See [#623][] for -more details. - -## 6.8.9 - 2020/05/13 - -See [7.7.0 Breaking changes](#770---20200513) - - -## 7.6.2 - 2020/03/31 - -### Kibana default resources - -Kibana default resources (cpu/memory requests and limits) are increased in -[#540][]. - -This change may impact cpu/memory available resources capacity in your -Kubernetes cluster. - -To come back to former default values, use the following values: - -```yaml -extraEnvs: -- name: "NODE_OPTIONS" - value: "" -resources: - requests: - cpu: "100m" - memory: "500Mi" - limits: - cpu: "1000m" - memory: "1Gi" -``` - - -## 7.6.0 - 2020/02/11 - -### Elasticsearch default resources - -Elasticsearch default cpu requests is increased in [#458][] following our -recommendation that resources requests and limits should have the same values. - -This change may impact available cpu capacity in your Kubernetes cluster. - -To come back to former default values, use the following values: - -```yaml -resources: - requests: - cpu: "100m" -``` - - -## 7.5.0 - 2019/12/02 - -### Metricbeat kube-state-metrics upgrade - -[kube-state-metrics][] chart dependency is upgraded from 1.6.0 to 2.4.1 in -[#352][]. This is causing Metricbeat chart upgrade from versions < 7.5.0 failing -with the following error: - -``` -UPGRADE FAILED -Error: Deployment.apps "metricbeat-kube-state-metrics" is 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 && Deployment.apps "metricbeat-metricbeat-metrics" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"app":"metricbeat-metricbeat-metrics", "chart":"metricbeat-7.5.0", "heritage":"Tiller", "release":"metricbeat"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable -Error: UPGRADE FAILED: Deployment.apps "metricbeat-kube-state-metrics" is 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 && Deployment.apps "metricbeat-metricbeat-metrics" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"app":"metricbeat-metricbeat-metrics", "chart":"metricbeat-7.5.0", "heritage":"Tiller", "release":"metricbeat"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable -``` - -The workaround is to use `--force` argument for `helm upgrade` command which -will force Metricbeat resources update through delete/recreate. - - -## 7.0.0-alpha1 - 2019/04/17 - -### Elasticsearch upgrade from 6.x - -If you were using the default Elasticsearch version from the previous release -(6.6.2-alpha1) you will first need to upgrade to Elasticsearch 6.7.1 before -being able to upgrade to 7.0.0. You can do this by adding this to your values -file: - -```yaml -esMajorVersion: 6 -imageTag: 6.7.1 -``` - -If you are upgrading an existing cluster that did not override the default -`storageClassName` you will now need to specify the `storageClassName`. This -only affects existing clusters and was changed in [#94][]. The advantage of this -is that now the Helm chart will just use the default `storageClassName` rather -than needing to override it for any providers where it is not called `standard`. - -``` -volumeClaimTemplate: - storageClassName: "standard" -``` - - -[#94]: https://github.com/elastic/helm-charts/pull/94 -[#352]: https://github.com/elastic/helm-charts/pull/352 -[#458]: https://github.com/elastic/helm-charts/pull/458 -[#540]: https://github.com/elastic/helm-charts/pull/540 -[#568]: https://github.com/elastic/helm-charts/pull/568 -[#572]: https://github.com/elastic/helm-charts/pull/572 -[#586]: https://github.com/elastic/helm-charts/pull/586 -[#621]: https://github.com/elastic/helm-charts/pull/621 -[#623]: https://github.com/elastic/helm-charts/pull/623 -[container input]: https://www.elastic.co/guide/en/beats/filebeat/7.7/filebeat-input-container.html -[docker input]: https://www.elastic.co/guide/en/beats/filebeat/7.7/filebeat-input-docker.html -[elastic helm repo]: https://helm.elastic.co -[github releases]: https://github.com/elastic/helm-charts/releases -[new branching model]: https://github.com/elastic/helm-charts/blob/master/CONTRIBUTING.md#branching -[kube-state-metrics]: https://github.com/helm/charts/tree/master/stable/kube-state-metrics diff --git a/README.md b/README.md index 18bb592bc..24206e092 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,20 @@ # Elastic Stack Kubernetes Helm Charts -[![Build Status](https://img.shields.io/jenkins/s/https/devops-ci.elastic.co/job/elastic+helm-charts+7.x.svg)](https://devops-ci.elastic.co/job/elastic+helm-charts+7.x/) +[![Build Status](https://img.shields.io/jenkins/s/https/devops-ci.elastic.co/job/elastic+helm-charts+7.8.svg)](https://devops-ci.elastic.co/job/elastic+helm-charts+7.8/) + + + + + +- [Charts](#charts) +- [Supported Configurations](#supported-configurations) + - [Support Matrix](#support-matrix) + - [Kubernetes Versions](#kubernetes-versions) + - [Helm versions](#helm-versions) +- [ECK](#eck) + + -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. ## Charts @@ -23,13 +32,34 @@ added below. | [Logstash](./logstash/README.md) | https://www.elastic.co/guide/en/logstash/7.8/docker.html | | [Metricbeat](./metricbeat/README.md) | https://www.elastic.co/guide/en/beats/metricbeat/7.8/running-on-docker.html | -## Kubernetes Versions +## Supported Configurations + +Starting with 7.7.0 release, some charts are reaching GA. + +Note that only the released charts coming from [Elastic Helm repo][] or +[GitHub releases][] are supported. + +### Support Matrix + +| | Elasticsearch | Kibana | Logstash | Filebeat | Metricbeat | APM Server | +|-----|---------------|--------|----------|----------|------------|------------| +| 7.0 | Alpha | Alpha | / | / | / | / | +| 7.1 | Beta | Beta | / | Beta | / | / | +| 7.2 | Beta | Beta | / | Beta | Beta | / | +| 7.3 | Beta | Beta | / | Beta | Beta | / | +| 7.4 | Beta | Beta | / | Beta | Beta | / | +| 7.5 | Beta | Beta | Beta | Beta | Beta | Alpha | +| 7.6 | Beta | Beta | Beta | Beta | Beta | Alpha | +| 7.7 | GA | GA | Beta | GA | GA | Beta | +| 7.8 | GA | GA | Beta | GA | GA | Beta | + +### Kubernetes Versions The charts are [currently tested][] against all GKE versions available. The exact versions are defined under `KUBERNETES_VERSIONS` in [helpers/matrix.yml][]. -## Helm versions +### Helm versions While we are checking backward compatibility, the charts are only tested with Helm version mentioned in [helm-tester Dockerfile][] (currently 2.16.8). @@ -43,9 +73,11 @@ Elastic recommended way to deploy Elasticsearch, Kibana and APM Server on Kubernetes. -[currently tested]: https://devops-ci.elastic.co/job/elastic+helm-charts+7.x/ +[currently tested]: https://devops-ci.elastic.co/job/elastic+helm-charts+7.8/ [elastic cloud on kubernetes]: https://github.com/elastic/cloud-on-k8s +[elastic helm repo]: https://helm.elastic.co +[github releases]: https://github.com/elastic/helm-charts/releases [helm 3]: https://v3.helm.sh -[helm-tester Dockerfile]: https://github.com/elastic/helm-charts/blob/7.x/helpers/helm-tester/Dockerfile -[helpers/matrix.yml]: https://github.com/elastic/helm-charts/blob/7.x/helpers/matrix.yml +[helm-tester Dockerfile]: https://github.com/elastic/helm-charts/blob/7.8/helpers/helm-tester/Dockerfile +[helpers/matrix.yml]: https://github.com/elastic/helm-charts/blob/7.8/helpers/matrix.yml [operator pattern]: https://kubernetes.io/docs/concepts/extend-kubernetes/operator/ diff --git a/apm-server/README.md b/apm-server/README.md index d8d83142a..aef3faee3 100644 --- a/apm-server/README.md +++ b/apm-server/README.md @@ -1,12 +1,25 @@ # APM Server Helm Chart + +This Helm chart is a lightweight way to configure and run our official +[APM Server Docker image][]. + +**Warning**: This functionality is in alpha 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. Alpha features are not subject to the support +SLA of official GA features (see [supported configurations][] for more details). + +**Warning**: This branch is used for development, please use [7.7.1][] release +for released version. + + - [Requirements](#requirements) - [Installing](#installing) - - [Using Helm repository](#using-helm-repository) - - [Using the 7.x branch](#using-the-7x-branch) + - [Install released version using Helm repository](#install-released-version-using-helm-repository) + - [Install development version using 7.8 branch and 7.8.0-SNAPSHOT versions](#install-development-version-using-78-branch-and-780-snapshot-versions) - [Upgrading](#upgrading) - [Usage notes](#usage-notes) - [Configuration](#configuration) @@ -20,45 +33,31 @@ -This functionality is in alpha 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. Alpha 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 -[APM Server Docker image][]. - - ## Requirements * Kubernetes >= 1.9 * [Helm][] >= 2.8.0 +See [supported configurations][] for more details. + ## Installing This chart is tested with the latest 7.8.0-SNAPSHOT versions. -### Using Helm repository +### Install released version using Helm repository * Add the Elastic Helm charts repo: `helm repo add elastic https://helm.elastic.co` -* Install the latest 7.8 release: -`helm install --name apm-server elastic/apm-server --version=7.8.0` - -### Using the 7.x branch +* Install the latest 7.7 release: +`helm install --name apm-server elastic/apm-server` -* Clone the git repo and checkout the right branch: +### Install development version using 7.8 branch and 7.8.0-SNAPSHOT versions - ```shell - git clone git@github.com:elastic/helm-charts.git - cd helm-charts - git checkout -b 7.x origin/7.x - ```` +* Clone the git repo: `git clone git@github.com:elastic/helm-charts.git` -* Install the latest 7.8.0-SNAPSHOT: -`helm install --name apm-server ./helm-charts/apm-server` +* Install it: `helm install --name apm-server ./helm-charts/apm-server` ## Upgrading @@ -144,6 +143,7 @@ Please check [CONTRIBUTING.md][] before any contribution or for any questions about our development and testing process. +[7.7.1]: https://github.com/elastic/helm-charts/blob/7.7.1/apm-server/README.md [BREAKING_CHANGES.md]: https://github.com/elastic/helm-charts/blob/master/BREAKING_CHANGES.md [CHANGELOG.md]: https://github.com/elastic/helm-charts/blob/master/CHANGELOG.md [CONTRIBUTING.md]: https://github.com/elastic/helm-charts/blob/master/CONTRIBUTING.md @@ -151,12 +151,12 @@ about our development and testing process. [annotations]: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ [apm server docker image]: https://www.elastic.co/guide/en/apm/server/7.8/running-on-docker.html [apm server oss docker image]: https://www.docker.elastic.co/#apm-server-7-8-0-oss -[default elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/README.md#default +[default elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/README.md#default [environment variables]: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config [environment from variables]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables -[examples]: https://github.com/elastic/helm-charts/tree/7.x/apm-server/examples -[examples/oss]: https://github.com/elastic/helm-charts/tree/7.x/apm-server/examples/oss -[examples/security]: https://github.com/elastic/helm-charts/tree/7.x/apm-server/examples/security +[examples]: https://github.com/elastic/helm-charts/tree/7.8/apm-server/examples +[examples/oss]: https://github.com/elastic/helm-charts/tree/7.8/apm-server/examples/oss +[examples/security]: https://github.com/elastic/helm-charts/tree/7.8/apm-server/examples/security [helm]: https://helm.sh [horizontal pod autoscaler]: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/ [imagePullPolicy]: https://kubernetes.io/docs/concepts/containers/images/#updating-images @@ -172,6 +172,7 @@ about our development and testing process. [resources]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ [service]: https://kubernetes.io/docs/concepts/services-networking/service/ [serviceAccount]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ +[supported configurations]: https://github.com/elastic/helm-charts/tree/7.8/README.md#supported-configurations [tolerations]: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ [updateStrategy]: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#updating-a-deployment -[values.yaml]: https://github.com/elastic/helm-charts/tree/7.x/apm-server/values.yaml +[values.yaml]: https://github.com/elastic/helm-charts/tree/7.8/apm-server/values.yaml diff --git a/apm-server/examples/default/README.md b/apm-server/examples/default/README.md index 1533f4561..39aa514e1 100644 --- a/apm-server/examples/default/README.md +++ b/apm-server/examples/default/README.md @@ -22,6 +22,6 @@ This example deploy APM Server 7.8.0-SNAPSHOT using [default values][]. You can also run [goss integration tests][] using `make test` -[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/default/ -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/apm-server/examples/default/test/goss.yaml -[default values]: https://github.com/elastic/helm-charts/tree/7.x/apm-server/values.yaml +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/default/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.8/apm-server/examples/default/test/goss.yaml +[default values]: https://github.com/elastic/helm-charts/tree/7.8/apm-server/values.yaml diff --git a/apm-server/examples/oss/README.md b/apm-server/examples/oss/README.md index 01320a2fa..5f48d5ab5 100644 --- a/apm-server/examples/oss/README.md +++ b/apm-server/examples/oss/README.md @@ -23,5 +23,5 @@ You can also run [goss integration tests][] using `make test` [apm server oss]: https://www.elastic.co/downloads/apm-oss -[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/oss/ -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/apm-server/examples/oss/test/goss.yaml +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/oss/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.8/apm-server/examples/oss/test/goss.yaml diff --git a/apm-server/examples/security/README.md b/apm-server/examples/security/README.md index 0282838be..615986fb3 100644 --- a/apm-server/examples/security/README.md +++ b/apm-server/examples/security/README.md @@ -23,6 +23,6 @@ Elasticsearch (see [values][]). You can also run [goss integration tests][] using `make test` -[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/security/ -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/apm-server/examples/security/test/goss.yaml -[values]: https://github.com/elastic/helm-charts/tree/7.x/apm-server/examples/security/values.yaml +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/security/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.8/apm-server/examples/security/test/goss.yaml +[values]: https://github.com/elastic/helm-charts/tree/7.8/apm-server/examples/security/values.yaml diff --git a/elasticsearch/README.md b/elasticsearch/README.md index db5470df2..cff03d296 100644 --- a/elasticsearch/README.md +++ b/elasticsearch/README.md @@ -1,12 +1,20 @@ # Elasticsearch Helm Chart + +This Helm chart is a lightweight way to configure and run our official +[Elasticsearch Docker image][]. + +**Warning**: This branch is used for development, please use [7.7.1][] release +for released version. + + - [Requirements](#requirements) - [Installing](#installing) - - [Using Helm repository](#using-helm-repository) - - [Using the 7.x branch](#using-the-7x-branch) + - [Install released version using Helm repository](#install-released-version-using-helm-repository) + - [Install development version using 7.8 branch and 7.8.0-SNAPSHOT versions](#install-development-version-using-78-branch-and-780-snapshot-versions) - [Upgrading](#upgrading) - [Usage notes](#usage-notes) - [Configuration](#configuration) @@ -32,49 +40,34 @@ -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][]. - - ## Requirements -* [Helm][] >=2.8.0 and <3.0.0 (see [parent README][] for more details) +* [Helm][] >=2.8.0 and <3.0.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 +See [supported configurations][] for more details. ## Installing This chart is tested with the latest 7.8.0-SNAPSHOT versions. -### Using Helm repository +### Install released version using Helm repository * Add the Elastic Helm charts repo: `helm repo add elastic https://helm.elastic.co` -* Install the latest 7.8 release: -`helm install --name elasticsearch elastic/elasticsearch --version=7.8.0` +* Install the latest 7.7 release: +`helm install --name elasticsearch elastic/elasticsearch` -### Using the 7.x branch +### Install development version using 7.8 branch and 7.8.0-SNAPSHOT versions -* Clone the git repo and checkout the right branch: +* Clone the git repo: `git clone git@github.com:elastic/helm-charts.git` - ```shell - git clone git@github.com:elastic/helm-charts.git - cd helm-charts - git checkout -b 7.x origin/7.x - ```` - -* Install the latest 7.8.0-SNAPSHOT: -`helm install --name elasticsearch ./helm-charts/elasticsearch` +* Install it: `helm install --name elasticsearch ./helm-charts/elasticsearch` ## Upgrading @@ -390,60 +383,60 @@ Please check [CONTRIBUTING.md][] before any contribution or for any questions about our development and testing process. +[#63]: https://github.com/elastic/helm-charts/issues/63 +[7.7.1]: https://github.com/elastic/helm-charts/blob/7.7.1/elasticsearch/README.md [BREAKING_CHANGES.md]: https://github.com/elastic/helm-charts/blob/master/BREAKING_CHANGES.md [CHANGELOG.md]: https://github.com/elastic/helm-charts/blob/master/CHANGELOG.md [CONTRIBUTING.md]: https://github.com/elastic/helm-charts/blob/master/CONTRIBUTING.md -[#63]: https://github.com/elastic/helm-charts/issues/63 [alternate scheduler]: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/#specify-schedulers-for-pods [annotations]: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ [anti-affinity]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity [cluster.name]: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/cluster.name.html -[clustering and node discovery]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/README.md#clustering-and-node-discovery -[config example]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/config/values.yaml +[clustering and node discovery]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/README.md#clustering-and-node-discovery +[config example]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/config/values.yaml [curator]: https://www.elastic.co/guide/en/elasticsearch/client/curator/7.8/snapshot.html [custom docker image]: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/docker.html#_c_customized_image [deploys statefulsets serially]: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies [discovery.zen.minimum_master_nodes]: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/discovery-settings.html#minimum_master_nodes -[docker for mac]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/docker-for-mac +[docker for mac]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/docker-for-mac [elasticsearch cluster health status params]: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/cluster-health.html#request-params [elasticsearch docker image]: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/docker.html [elasticsearch oss docker image]: https://www.docker.elastic.co/#elasticsearch-7-8-0-oss [environment variables]: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config [environment from variables]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables -[examples]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/ -[examples/multi]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/multi -[examples/oss]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/oss -[examples/security]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/security +[examples]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/ +[examples/multi]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/multi +[examples/oss]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/oss +[examples/security]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/security [gke]: https://cloud.google.com/kubernetes-engine [helm]: https://helm.sh [helm/charts stable]: https://github.com/helm/charts/tree/master/stable/elasticsearch/ -[how to install plugins guide]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/README.md#how-to-install-plugins -[how to use the keystore]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/README.md#how-to-use-the-keystore +[how to install plugins guide]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/README.md#how-to-install-plugins +[how to use the keystore]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/README.md#how-to-use-the-keystore [http.port]: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/modules-http.html#_settings [imagePullPolicy]: https://kubernetes.io/docs/concepts/containers/images/#updating-images [imagePullSecrets]: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret [ingress]: https://kubernetes.io/docs/concepts/services-networking/ingress/ [java options]: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/jvm-options.html [jvm heap size]: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/heap-size.html -[kind]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/kubernetes-kind +[kind]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/kubernetes-kind [kubernetes secrets]: https://kubernetes.io/docs/concepts/configuration/secret/ [labels]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ [lifecycle hooks]: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/ [loadBalancer annotations]: https://kubernetes.io/docs/concepts/services-networking/service/#ssl-support-on-aws [loadBalancer]: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer [maxUnavailable]: https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget -[migration guide]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/migration/README.md -[minikube]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/minikube -[microk8s]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/microk8s -[multi]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/multi/ +[migration guide]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/migration/README.md +[minikube]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/minikube +[microk8s]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/microk8s +[multi]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/multi/ [network.host elasticsearch setting]: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/network.host.html [node affinity settings]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature [node-certificates]: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/configuring-tls.html#node-certificates [nodePort]: https://kubernetes.io/docs/concepts/services-networking/service/#nodeport [nodes types]: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/modules-node.html [nodeSelector]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector -[openshift]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/openshift -[parent readme]: https://github.com/elastic/helm-charts/tree/7.x/README.md +[openshift]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/openshift [priorityClass]: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass [probe]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/ [resources]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ @@ -454,10 +447,11 @@ about our development and testing process. [snapshot lifecycle management]: https://github.com/elastic/elasticsearch/issues/38461 [snapshot plugin]: https://www.elastic.co/guide/en/elasticsearch/plugins/7.8/repository.html [snapshot repository]: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/modules-snapshots.html +[supported configurations]: https://github.com/elastic/helm-charts/tree/7.8/README.md#supported-configurations [sysctl vm.max_map_count]: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/vm-max-map-count.html#vm-max-map-count [terminationGracePeriod]: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods [tolerations]: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ [transport port configuration]: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/modules-transport.html#_transport_settings [updateStrategy]: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/ -[values.yaml]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/values.yaml +[values.yaml]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/values.yaml [volumeClaimTemplate for statefulsets]: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#stable-storage diff --git a/elasticsearch/examples/config/README.md b/elasticsearch/examples/config/README.md index 0c479605b..6afce9349 100644 --- a/elasticsearch/examples/config/README.md +++ b/elasticsearch/examples/config/README.md @@ -23,5 +23,5 @@ custom [values][]. You can also run [goss integration tests][] using `make test` -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/config/test/goss.yaml -[values]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/config/values.yaml +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/config/test/goss.yaml +[values]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/config/values.yaml diff --git a/elasticsearch/examples/default/README.md b/elasticsearch/examples/default/README.md index 81dc68211..92f814d30 100644 --- a/elasticsearch/examples/default/README.md +++ b/elasticsearch/examples/default/README.md @@ -21,5 +21,5 @@ This example deploy a 3 nodes Elasticsearch 7.8.0-SNAPSHOT cluster using You can also run [goss integration tests][] using `make test` -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/default/test/goss.yaml -[default values]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/values.yaml +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/default/test/goss.yaml +[default values]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/values.yaml diff --git a/elasticsearch/examples/docker-for-mac/README.md b/elasticsearch/examples/docker-for-mac/README.md index 3ce68ea30..7becc7d27 100644 --- a/elasticsearch/examples/docker-for-mac/README.md +++ b/elasticsearch/examples/docker-for-mac/README.md @@ -19,5 +19,5 @@ for production. ``` -[custom values]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/docker-for-mac/values.yaml +[custom values]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/docker-for-mac/values.yaml [docker for mac]: https://docs.docker.com/docker-for-mac/kubernetes/ diff --git a/elasticsearch/examples/kubernetes-kind/README.md b/elasticsearch/examples/kubernetes-kind/README.md index 7373d75b6..838da4c6f 100644 --- a/elasticsearch/examples/kubernetes-kind/README.md +++ b/elasticsearch/examples/kubernetes-kind/README.md @@ -30,9 +30,9 @@ Elasticsearch volumes (see [Makefile][] instructions). ``` -[custom values]: https://github.com/elastic/helm-charts/blob/7.x/elasticsearch/examples/kubernetes-kind/values.yaml +[custom values]: https://github.com/elastic/helm-charts/blob/7.8/elasticsearch/examples/kubernetes-kind/values.yaml [kind]: https://kind.sigs.k8s.io/ [kind issue]: https://github.com/kubernetes-sigs/kind/issues/830 [kubernetes-sigs/kind#1157]: https://github.com/kubernetes-sigs/kind/pull/1157 [rancher local path provisioner]: https://github.com/rancher/local-path-provisioner -[Makefile]: https://github.com/elastic/helm-charts/blob/7.x/elasticsearch/examples/kubernetes-kind/Makefile#L5 +[Makefile]: https://github.com/elastic/helm-charts/blob/7.8/elasticsearch/examples/kubernetes-kind/Makefile#L5 diff --git a/elasticsearch/examples/microk8s/README.md b/elasticsearch/examples/microk8s/README.md index 8cc3dcfa5..485248c96 100644 --- a/elasticsearch/examples/microk8s/README.md +++ b/elasticsearch/examples/microk8s/README.md @@ -28,5 +28,5 @@ The following MicroK8S [addons][] need to be enabled: [addons]: https://microk8s.io/docs/addons -[custom values]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/microk8s/values.yaml +[custom values]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/microk8s/values.yaml [MicroK8S]: https://microk8s.io diff --git a/elasticsearch/examples/migration/README.md b/elasticsearch/examples/migration/README.md index 59e07e21d..ef53664e2 100644 --- a/elasticsearch/examples/migration/README.md +++ b/elasticsearch/examples/migration/README.md @@ -160,8 +160,8 @@ client nodes: working correctly you can cleanup leftover resources from your old cluster. [basic license]: https://www.elastic.co/subscriptions -[data.yml]: https://github.com/elastic/helm-charts/blob/7.x/elasticsearch/examples/migration/data.yml +[data.yml]: https://github.com/elastic/helm-charts/blob/7.8/elasticsearch/examples/migration/data.yml [helm/charts]: https://github.com/helm/charts/tree/master/stable/elasticsearch -[master.yml]: https://github.com/elastic/helm-charts/blob/7.x/elasticsearch/examples/migration/master.yml +[master.yml]: https://github.com/elastic/helm-charts/blob/7.8/elasticsearch/examples/migration/master.yml [restoring to a different cluster guide]: https://www.elastic.co/guide/en/elasticsearch/reference/6.6/modules-snapshots.html#_restoring_to_a_different_cluster [rolling upgrades guide]: https://www.elastic.co/guide/en/elasticsearch/reference/6.6/rolling-upgrades.html diff --git a/elasticsearch/examples/minikube/README.md b/elasticsearch/examples/minikube/README.md index d01e0ba9f..ae914e271 100644 --- a/elasticsearch/examples/minikube/README.md +++ b/elasticsearch/examples/minikube/README.md @@ -34,5 +34,5 @@ minikube addons enable storage-provisioner ``` -[custom values]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/minikube/values.yaml +[custom values]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/minikube/values.yaml [minikube]: https://minikube.sigs.k8s.io/docs/ diff --git a/elasticsearch/examples/multi/README.md b/elasticsearch/examples/multi/README.md index e8f569ab1..b696d1d76 100644 --- a/elasticsearch/examples/multi/README.md +++ b/elasticsearch/examples/multi/README.md @@ -22,6 +22,6 @@ releases: You can also run [goss integration tests][] using `make test` -[data values]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/multi/data.yml -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/multi/test/goss.yaml -[master values]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/multi/master.yml +[data values]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/multi/data.yml +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/multi/test/goss.yaml +[master values]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/multi/master.yml diff --git a/elasticsearch/examples/openshift/README.md b/elasticsearch/examples/openshift/README.md index 4799efb7e..6cd6a8a85 100644 --- a/elasticsearch/examples/openshift/README.md +++ b/elasticsearch/examples/openshift/README.md @@ -19,6 +19,6 @@ using [custom values][]. You can also run [goss integration tests][] using `make test` -[custom values]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/openshift/values.yaml -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/openshift/test/goss.yaml +[custom values]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/openshift/values.yaml +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/openshift/test/goss.yaml [openshift]: https://www.openshift.com/ diff --git a/elasticsearch/examples/oss/README.md b/elasticsearch/examples/oss/README.md index 78cd5ffa0..b46f23a63 100644 --- a/elasticsearch/examples/oss/README.md +++ b/elasticsearch/examples/oss/README.md @@ -20,4 +20,4 @@ You can also run [goss integration tests][] using `make test` [elasticsearch oss]: https://www.elastic.co/downloads/elasticsearch-oss -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/oss/test/goss.yaml +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/oss/test/goss.yaml diff --git a/elasticsearch/examples/security/README.md b/elasticsearch/examples/security/README.md index 7e69fb284..ef2bc8408 100644 --- a/elasticsearch/examples/security/README.md +++ b/elasticsearch/examples/security/README.md @@ -24,6 +24,6 @@ deployment you should generate SSL certificates following the [official docs][]. You can also run [goss integration tests][] using `make test` -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/security/test/goss.yaml +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/security/test/goss.yaml [official docs]: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/configuring-tls.html#node-certificates -[values]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/security/security.yaml +[values]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/security/security.yaml diff --git a/elasticsearch/examples/upgrade/README.md b/elasticsearch/examples/upgrade/README.md index 402979b55..2f5d0aa16 100644 --- a/elasticsearch/examples/upgrade/README.md +++ b/elasticsearch/examples/upgrade/README.md @@ -23,5 +23,5 @@ You can also run [goss integration tests][] using `make test`. [7.0.0-alpha1]: https://github.com/elastic/helm-charts/releases/tag/7.0.0-alpha1 [7.4.0]: https://github.com/elastic/helm-charts/releases/tag/7.4.0 -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/upgrade/test/goss.yaml +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/upgrade/test/goss.yaml [jq]: https://stedolan.github.io/jq/ diff --git a/filebeat/README.md b/filebeat/README.md index ae9d87383..d7f037bed 100644 --- a/filebeat/README.md +++ b/filebeat/README.md @@ -1,12 +1,20 @@ # Filebeat Helm Chart + +This Helm chart is a lightweight way to configure and run our official +[Filebeat Docker image][]. + +**Warning**: This branch is used for development, please use [7.7.1][] release +for released version. + + - [Requirements](#requirements) - [Installing](#installing) - - [Using Helm repository](#using-helm-repository) - - [Using the 7.x branch](#using-the-7x-branch) + - [Install released version using Helm repository](#install-released-version-using-helm-repository) + - [Install development version using 7.8 branch and 7.8.0-SNAPSHOT versions](#install-development-version-using-78-branch-and-780-snapshot-versions) - [Upgrading](#upgrading) - [Usage notes](#usage-notes) - [Configuration](#configuration) @@ -21,45 +29,31 @@ -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 -[Filebeat Docker image][]. - - ## Requirements -* [Helm][] >=2.8.0 and <3.0.0 (see [parent README][] for more details) +* [Helm][] >=2.8.0 and <3.0.0 * Kubernetes >=1.9 +See [supported configurations][] for more details. + ## Installing This chart is tested with the latest 7.8.0-SNAPSHOT versions. -### Using Helm repository +### Install released version using Helm repository * Add the Elastic Helm charts repo: `helm repo add elastic https://helm.elastic.co` -* Install the latest 7.8 release: -`helm install --name filebeat elastic/filebeat --version=7.8.0` - -### Using the 7.x branch +* Install the latest 7.7 release: +`helm install --name filebeat elastic/filebeat` -* Clone the git repo and checkout the right branch: +### Install development version using 7.8 branch and 7.8.0-SNAPSHOT versions - ```shell - git clone git@github.com:elastic/helm-charts.git - cd helm-charts - git checkout -b 7.x origin/7.x - ```` +* Clone the git repo: `git clone git@github.com:elastic/helm-charts.git` -* Install the latest 7.8.0-SNAPSHOT: -`helm install --name filebeat ./helm-charts/filebeat` +* Install it: `helm install --name filebeat ./helm-charts/filebeat` ## Upgrading @@ -164,17 +158,18 @@ Please check [CONTRIBUTING.md][] before any contribution or for any questions about our development and testing process. +[7.7.1]: https://github.com/elastic/helm-charts/blob/7.7.1/filebeat/README.md [BREAKING_CHANGES.md]: https://github.com/elastic/helm-charts/blob/master/BREAKING_CHANGES.md [CHANGELOG.md]: https://github.com/elastic/helm-charts/blob/master/CHANGELOG.md [CONTRIBUTING.md]: https://github.com/elastic/helm-charts/blob/master/CONTRIBUTING.md [affinity]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity [annotations]: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ -[default Filebeat Helm chart]: https://github.com/elastic/helm-charts/tree/7.x/filebeat/README.md#default +[default Filebeat Helm chart]: https://github.com/elastic/helm-charts/tree/7.8/filebeat/README.md#default [environment variables]: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config [environment from variables]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables -[examples]: https://github.com/elastic/helm-charts/tree/7.x/filebeat/examples -[examples/oss]: https://github.com/elastic/helm-charts/tree/7.x/filebeat/examples/oss -[examples/security]: https://github.com/elastic/helm-charts/tree/7.x/filebeat/examples/security +[examples]: https://github.com/elastic/helm-charts/tree/7.8/filebeat/examples +[examples/oss]: https://github.com/elastic/helm-charts/tree/7.8/filebeat/examples/oss +[examples/security]: https://github.com/elastic/helm-charts/tree/7.8/filebeat/examples/security [filebeat docker image]: https://www.elastic.co/guide/en/beats/filebeat/7.8/running-on-docker.html [filebeat oss docker image]: https://www.docker.elastic.co/#filebeat-7-8-0-oss [helm]: https://helm.sh @@ -184,13 +179,13 @@ about our development and testing process. [imagePullSecrets]: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret [kubernetes secrets]: https://kubernetes.io/docs/concepts/configuration/secret/ [labels]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ -[parent readme]: https://github.com/elastic/helm-charts/tree/7.x/README.md [nodeSelector]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector [podSecurityContext]: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ [priorityClass]: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass [probe]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/ [resources]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ +[supported configurations]: https://github.com/elastic/helm-charts/tree/7.8/README.md#supported-configurations [serviceAccount]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ [tolerations]: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ [updateStrategy]: https://kubernetes.io/docs/tasks/manage-daemon/update-daemon-set/#daemonset-update-strategy -[values.yaml]: https://github.com/elastic/helm-charts/tree/7.x/filebeat/values.yaml +[values.yaml]: https://github.com/elastic/helm-charts/tree/7.8/filebeat/values.yaml diff --git a/filebeat/examples/default/README.md b/filebeat/examples/default/README.md index ef694b8f5..9773681c4 100644 --- a/filebeat/examples/default/README.md +++ b/filebeat/examples/default/README.md @@ -22,6 +22,6 @@ This example deploy Filebeat 7.8.0-SNAPSHOT using [default values][]. You can also run [goss integration tests][] using `make test` -[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/default/ -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/filebeat/examples/default/test/goss.yaml -[default values]: https://github.com/elastic/helm-charts/tree/7.x/filebeat/values.yaml +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/default/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.8/filebeat/examples/default/test/goss.yaml +[default values]: https://github.com/elastic/helm-charts/tree/7.8/filebeat/values.yaml diff --git a/filebeat/examples/oss/README.md b/filebeat/examples/oss/README.md index c64a94a5f..959e8192c 100644 --- a/filebeat/examples/oss/README.md +++ b/filebeat/examples/oss/README.md @@ -23,5 +23,5 @@ You can also run [goss integration tests][] using `make test` [filebeat oss]: https://www.elastic.co/downloads/beats/filebeat-oss -[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/oss/ -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/filebeat/examples/oss/test/goss.yaml +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/oss/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.8/filebeat/examples/oss/test/goss.yaml diff --git a/filebeat/examples/security/README.md b/filebeat/examples/security/README.md index 566974823..fcacc2210 100644 --- a/filebeat/examples/security/README.md +++ b/filebeat/examples/security/README.md @@ -23,6 +23,6 @@ Elasticsearch (see [values][]). You can also run [goss integration tests][] using `make test` -[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/security/ -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/filebeat/examples/security/test/goss.yaml -[values]: https://github.com/elastic/helm-charts/tree/7.x/filebeat/examples/security/values.yaml +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/security/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.8/filebeat/examples/security/test/goss.yaml +[values]: https://github.com/elastic/helm-charts/tree/7.8/filebeat/examples/security/values.yaml diff --git a/helpers/bumper.py b/helpers/bumper.py index b5333a515..caa86648a 100755 --- a/helpers/bumper.py +++ b/helpers/bumper.py @@ -6,7 +6,7 @@ # # Configurable environment variables: # - BUMPER_VERSION_6 overrides the 6.x.x version. -# - BUMPER_VERSION_7 overrides the 7.x.x version. +# - BUMPER_VERSION_7 overrides the 7.8.x version. # - BUMPER_USE_STAGING_IMAGES set to "true" causes the # docker.elastic.co/staging/ docker registry namespace to be used. # diff --git a/kibana/README.md b/kibana/README.md index 03df5fea0..8153829af 100644 --- a/kibana/README.md +++ b/kibana/README.md @@ -1,12 +1,20 @@ # Kibana Helm Chart + +This Helm chart is a lightweight way to configure and run our official +[Kibana Docker image][]. + +**Warning**: This branch is used for development, please use [7.7.1][] release +for released version. + + - [Requirements](#requirements) - [Installing](#installing) - - [Using Helm repository](#using-helm-repository) - - [Using the 7.x branch](#using-the-7x-branch) + - [Install released version using Helm repository](#install-released-version-using-helm-repository) + - [Install development version using 7.8 branch and 7.8.0-SNAPSHOT versions](#install-development-version-using-78-branch-and-780-snapshot-versions) - [Upgrading](#upgrading) - [Usage notes](#usage-notes) - [Configuration](#configuration) @@ -24,45 +32,30 @@ -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 -[Kibana Docker image][]. - - ## Requirements -* [Helm][] >=2.8.0 and <3.0.0 (see [parent README][] for more details) +* [Helm][] >=2.8.0 and <3.0.0 * Kubernetes >=1.9 +See [supported configurations][] for more details. ## Installing This chart is tested with the latest 7.8.0-SNAPSHOT versions. -### Using Helm repository +### Install released version using Helm repository * Add the Elastic Helm charts repo: `helm repo add elastic https://helm.elastic.co` -* Install the latest 7.8 release: -`helm install --name kibana elastic/kibana --version=7.8.0` - -### Using the 7.x branch +* Install the latest 7.7 release: +`helm install --name kibana elastic/kibana` -* Clone the git repo and checkout the right branch: +### Install development version using 7.8 branch and 7.8.0-SNAPSHOT versions - ```shell - git clone git@github.com:elastic/helm-charts.git - cd helm-charts - git checkout -b 7.x origin/7.x - ```` +* Clone the git repo: `git clone git@github.com:elastic/helm-charts.git` -* Install the latest 7.8.0-SNAPSHOT: -`helm install --name kibana ./helm-charts/kibana` +* Install it: `helm install --name kibana ./helm-charts/kibana` ## Upgrading @@ -207,17 +200,18 @@ Please check [CONTRIBUTING.md][] before any contribution or for any questions about our development and testing process. +[7.7.1]: https://github.com/elastic/helm-charts/blob/7.7.1/kibana/README.md [BREAKING_CHANGES.md]: https://github.com/elastic/helm-charts/blob/master/BREAKING_CHANGES.md [CHANGELOG.md]: https://github.com/elastic/helm-charts/blob/master/CHANGELOG.md [CONTRIBUTING.md]: https://github.com/elastic/helm-charts/blob/master/CONTRIBUTING.md [affinity]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity [annotations]: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ -[default elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/README.md#default +[default elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/README.md#default [environment variables]: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config [environment from variables]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables -[examples]: https://github.com/elastic/helm-charts/tree/7.x/kibana/examples -[examples/oss]: https://github.com/elastic/helm-charts/tree/7.x/kibana/examples/oss -[examples/security]: https://github.com/elastic/helm-charts/tree/7.x/kibana/examples/security +[examples]: https://github.com/elastic/helm-charts/tree/7.8/kibana/examples +[examples/oss]: https://github.com/elastic/helm-charts/tree/7.8/kibana/examples/oss +[examples/security]: https://github.com/elastic/helm-charts/tree/7.8/kibana/examples/security [helm]: https://helm.sh [imagePullPolicy]: https://kubernetes.io/docs/concepts/containers/images/#updating-images [imagePullSecrets]: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret @@ -228,17 +222,17 @@ about our development and testing process. [labels]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ [lifecycle hooks]: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/ [nodeSelector]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector -[openshift]: https://github.com/elastic/helm-charts/tree/7.x/kibana/examples/openshift -[parent readme]: https://github.com/elastic/helm-charts/tree/7.x/README.md +[openshift]: https://github.com/elastic/helm-charts/tree/7.8/kibana/examples/openshift [priorityClass]: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass [probe]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/ [resources]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ -[security enabled elasticsearch cluster]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/README.md#security +[security enabled elasticsearch cluster]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/README.md#security [securityContext]: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod [server.host]: https://www.elastic.co/guide/en/kibana/7.8/settings.html [service]: https://kubernetes.io/docs/concepts/services-networking/service/ [serviceAccount]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ [standard upgrade]: https://www.elastic.co/guide/en/kibana/7.8/upgrade-standard.html +[supported configurations]: https://github.com/elastic/helm-charts/tree/7.8/README.md#supported-configurations [tolerations]: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ [updateStrategy]: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#updating-a-deployment -[values.yaml]: https://github.com/elastic/helm-charts/tree/7.x/kibana/values.yaml +[values.yaml]: https://github.com/elastic/helm-charts/tree/7.8/kibana/values.yaml diff --git a/kibana/examples/default/README.md b/kibana/examples/default/README.md index ec6bea41c..26b70cc14 100644 --- a/kibana/examples/default/README.md +++ b/kibana/examples/default/README.md @@ -22,6 +22,6 @@ This example deploy Kibana 7.8.0-SNAPSHOT using [default values][]. You can also run [goss integration tests][] using `make test` -[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/default/ -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/kibana/examples/default/test/goss.yaml -[default values]: https://github.com/elastic/helm-charts/tree/7.x/kibana/values.yaml +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/default/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.8/kibana/examples/default/test/goss.yaml +[default values]: https://github.com/elastic/helm-charts/tree/7.8/kibana/values.yaml diff --git a/kibana/examples/openshift/README.md b/kibana/examples/openshift/README.md index 56c553086..8c511593b 100644 --- a/kibana/examples/openshift/README.md +++ b/kibana/examples/openshift/README.md @@ -20,7 +20,7 @@ This example deploy Kibana 7.8.0-SNAPSHOT on [OpenShift][] using [custom values] You can also run [goss integration tests][] using `make test` -[custom values]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/openshift/values.yaml -[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/openshift/ -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/openshift/test/goss.yaml +[custom values]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/openshift/values.yaml +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/openshift/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/openshift/test/goss.yaml [openshift]: https://www.openshift.com/ diff --git a/kibana/examples/oss/README.md b/kibana/examples/oss/README.md index 4cb2b9351..f6f32380a 100644 --- a/kibana/examples/oss/README.md +++ b/kibana/examples/oss/README.md @@ -23,5 +23,5 @@ You can also run [goss integration tests][] using `make test` [kibana oss]: https://www.elastic.co/downloads/kibana-oss -[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/oss/ -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/kibana/examples/oss/test/goss.yaml +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/oss/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.8/kibana/examples/oss/test/goss.yaml diff --git a/kibana/examples/security/README.md b/kibana/examples/security/README.md index c84451934..354626ee1 100644 --- a/kibana/examples/security/README.md +++ b/kibana/examples/security/README.md @@ -23,6 +23,6 @@ Elasticsearch (see [values][]). You can also run [goss integration tests][] using `make test` -[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/security/ -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/kibana/examples/security/test/goss.yaml -[values]: https://github.com/elastic/helm-charts/tree/7.x/kibana/examples/security/security.yaml +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/security/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.8/kibana/examples/security/test/goss.yaml +[values]: https://github.com/elastic/helm-charts/tree/7.8/kibana/examples/security/security.yaml diff --git a/logstash/README.md b/logstash/README.md index 26319e538..17b61c01f 100644 --- a/logstash/README.md +++ b/logstash/README.md @@ -1,12 +1,25 @@ # Logstash Helm Chart + +This Helm chart is a lightweight way to configure and run our official +[Logstash Docker image][]. + +**Warning**: 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. Alpha features are not subject to the support +SLA of official GA features (see [supported configurations][] for more details). + +**Warning**: This branch is used for development, please use [7.7.1][] release +for released version. + + - [Requirements](#requirements) - [Installing](#installing) - - [Using Helm repository](#using-helm-repository) - - [Using the 7.x branch](#using-the-7x-branch) + - [Install released version using Helm repository](#install-released-version-using-helm-repository) + - [Install development version using 7.8 branch and 7.8.0-SNAPSHOT versions](#install-development-version-using-78-branch-and-780-snapshot-versions) - [Upgrading](#upgrading) - [Usage notes](#usage-notes) - [Configuration](#configuration) @@ -20,45 +33,31 @@ -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 -[Logstash Docker image][]. - - ## Requirements -* [Helm][] >=2.8.0 and <3.0.0 (see [parent README][] for more details) +* [Helm][] >=2.8.0 and <3.0.0 * Kubernetes >=1.8 +See [supported configurations][] for more details. + ## Installing This chart is tested with the latest 7.8.0-SNAPSHOT versions. -### Using Helm repository +### Install released version using Helm repository * Add the Elastic Helm charts repo: `helm repo add elastic https://helm.elastic.co` -* Install the latest 7.8 release: -`helm install --name logstash elastic/logstash --version=7.8.0` - -### Using the 7.x branch +* Install the latest 7.7 release: +`helm install --name logstash elastic/logstash` -* Clone the git repo and checkout the right branch: +### Install development version using 7.8 branch and 7.8.0-SNAPSHOT versions - ```shell - git clone git@github.com:elastic/helm-charts.git - cd helm-charts - git checkout -b 7.x origin/7.x - ```` +* Clone the git repo: `git clone git@github.com:elastic/helm-charts.git` -* Install the latest 7.8.0-SNAPSHOT: -`helm install --name logstash ./helm-charts/logstash` +* Install it: `helm install --name logstash ./helm-charts/logstash` ## Upgrading @@ -185,6 +184,7 @@ Please check [CONTRIBUTING.md][] before any contribution or for any questions about our development and testing process. +[7.7.1]: https://github.com/elastic/helm-charts/blob/7.7.1/logstash/README.md [BREAKING_CHANGES.md]: https://github.com/elastic/helm-charts/blob/master/BREAKING_CHANGES.md [CHANGELOG.md]: https://github.com/elastic/helm-charts/blob/master/CHANGELOG.md [CONTRIBUTING.md]: https://github.com/elastic/helm-charts/blob/master/CONTRIBUTING.md @@ -195,8 +195,8 @@ about our development and testing process. [custom docker image]: https://www.elastic.co/guide/en/logstash/7.8/docker-config.html#_custom_images [environment variables]: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config [environment from variables]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables -[examples]: https://github.com/elastic/helm-charts/tree/7.x/logstash/examples -[examples/oss]: https://github.com/elastic/helm-charts/tree/7.x/logstash/examples/oss +[examples]: https://github.com/elastic/helm-charts/tree/7.8/logstash/examples +[examples/oss]: https://github.com/elastic/helm-charts/tree/7.8/logstash/examples/oss [helm]: https://helm.sh [imagePullPolicy]: https://kubernetes.io/docs/concepts/containers/images/#updating-images [imagePullSecrets]: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret @@ -208,14 +208,14 @@ about our development and testing process. [node affinity settings]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature [nodeSelector]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector [note]: https://www.elastic.co/guide/en/logstash/7.8/docker-config.html#docker-env-config -[parent readme]: https://github.com/elastic/helm-charts/tree/7.x/README.md [priorityClass]: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass [probe]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/ [resources]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ [updateStrategy]: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/ [securityContext]: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod [service]: https://kubernetes.io/docs/concepts/services-networking/service/ +[supported configurations]: https://github.com/elastic/helm-charts/tree/7.8/README.md#supported-configurations [terminationGracePeriod]: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods [tolerations]: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ -[values.yaml]: https://github.com/elastic/helm-charts/tree/7.x/logstash/values.yaml +[values.yaml]: https://github.com/elastic/helm-charts/tree/7.8/logstash/values.yaml [volumeClaimTemplate for statefulsets]: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#stable-storage diff --git a/logstash/examples/default/README.md b/logstash/examples/default/README.md index 27acaab55..07348bf93 100644 --- a/logstash/examples/default/README.md +++ b/logstash/examples/default/README.md @@ -13,5 +13,5 @@ This example deploy Logstash 7.8.0-SNAPSHOT using [default values][]. You can also run [goss integration tests][] using `make test` -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/logstash/examples/default/test/goss.yaml -[default values]: https://github.com/elastic/helm-charts/tree/7.x/logstash/values.yaml +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.8/logstash/examples/default/test/goss.yaml +[default values]: https://github.com/elastic/helm-charts/tree/7.8/logstash/values.yaml diff --git a/logstash/examples/elasticsearch/README.md b/logstash/examples/elasticsearch/README.md index 965cbf750..b7ab22edc 100644 --- a/logstash/examples/elasticsearch/README.md +++ b/logstash/examples/elasticsearch/README.md @@ -23,6 +23,6 @@ This example deploy Logstash 7.8.0-SNAPSHOT which connects to Elasticsearch (see You can also run [goss integration tests][] using `make test` -[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/default/ -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/logstash/examples/elasticsearch/test/goss.yaml -[values]: https://github.com/elastic/helm-charts/tree/7.x/logstash/examples/elasticsearch/values.yaml +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/default/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.8/logstash/examples/elasticsearch/test/goss.yaml +[values]: https://github.com/elastic/helm-charts/tree/7.8/logstash/examples/elasticsearch/values.yaml diff --git a/logstash/examples/oss/README.md b/logstash/examples/oss/README.md index 54069f2f2..b7a83148e 100644 --- a/logstash/examples/oss/README.md +++ b/logstash/examples/oss/README.md @@ -14,4 +14,4 @@ You can also run [goss integration tests][] using `make test` [logstash oss]: https://www.elastic.co/downloads/logstash-oss -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/logstash/examples/oss/test/goss.yaml +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.8/logstash/examples/oss/test/goss.yaml diff --git a/metricbeat/README.md b/metricbeat/README.md index 4bffdbc08..2f44dfa97 100644 --- a/metricbeat/README.md +++ b/metricbeat/README.md @@ -1,12 +1,20 @@ # Metricbeat Helm Chart + +This Helm chart is a lightweight way to configure and run our official +[Metricbeat Docker image][]. + +**Warning**: This branch is used for development, please use [7.7.1][] release +for released version. + + - [Requirements](#requirements) - [Installing](#installing) - - [Using Helm repository](#using-helm-repository) - - [Using the 7.x branch](#using-the-7x-branch) + - [Install released version using Helm repository](#install-released-version-using-helm-repository) + - [Install development version using 7.8 branch and 7.8.0-SNAPSHOT versions](#install-development-version-using-78-branch-and-780-snapshot-versions) - [Upgrading](#upgrading) - [Usage notes](#usage-notes) - [Configuration](#configuration) @@ -23,45 +31,30 @@ -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 -[Metricbeat Docker image][]. - - ## Requirements -* [Helm][] >=2.8.0 and <3.0.0 (see [parent README][] for more details) +* [Helm][] >=2.8.0 and <3.0.0 * Kubernetes >=1.9 +See [supported configurations][] for more details. ## Installing This chart is tested with the latest 7.8.0-SNAPSHOT versions. -### Using Helm repository +### Install released version using Helm repository * Add the Elastic Helm charts repo: `helm repo add elastic https://helm.elastic.co` -* Install the latest 7.8 release: -`helm install --name metricbeat elastic/metricbeat --version=7.8.0` - -### Using the 7.x branch +* Install the latest 7.7 release: +`helm install --name metricbeat elastic/metricbeat` -* Clone the git repo and checkout the right branch: +### Install development version using 7.8 branch and 7.8.0-SNAPSHOT versions - ```shell - git clone git@github.com:elastic/helm-charts.git - cd helm-charts - git checkout -b 7.x origin/7.x - ```` +* Clone the git repo: `git clone git@github.com:elastic/helm-charts.git` -* Install the latest 7.8.0-SNAPSHOT: -`helm install --name metricbeat ./helm-charts/metricbeat` +* Install it: `helm install --name metricbeat ./helm-charts/metricbeat` ## Upgrading @@ -204,34 +197,36 @@ Please check [CONTRIBUTING.md][] before any contribution or for any questions about our development and testing process. +[#471]: https://github.com/elastic/helm-charts/pull/471 +[7.7.1]: https://github.com/elastic/helm-charts/blob/7.7.1/metricbeat/README.md [BREAKING_CHANGES.md]: https://github.com/elastic/helm-charts/blob/master/BREAKING_CHANGES.md [CHANGELOG.md]: https://github.com/elastic/helm-charts/blob/master/CHANGELOG.md [CONTRIBUTING.md]: https://github.com/elastic/helm-charts/blob/master/CONTRIBUTING.md [affinity]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity [annotations]: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ -[default elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/README.md#default +[default elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/README.md#default [cluster role rules]: https://kubernetes.io/docs/reference/access-authn-authz/rbac/#role-and-clusterrole [environment variables]: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config [environment from variables]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables -[examples]: https://github.com/elastic/helm-charts/tree/7.x/metricbeat/examples -[examples/oss]: https://github.com/elastic/helm-charts/tree/7.x/metricbeat/examples/oss -[examples/security]: https://github.com/elastic/helm-charts/tree/7.x/metricbeat/examples/security +[examples]: https://github.com/elastic/helm-charts/tree/7.8/metricbeat/examples +[examples/oss]: https://github.com/elastic/helm-charts/tree/7.8/metricbeat/examples/oss +[examples/security]: https://github.com/elastic/helm-charts/tree/7.8/metricbeat/examples/security [helm]: https://helm.sh [hostPath]: https://kubernetes.io/docs/concepts/storage/volumes/#hostpath [hostNetwork]: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#host-namespaces [imagePullPolicy]: https://kubernetes.io/docs/concepts/containers/images/#updating-images [imagePullSecrets]: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret -[kube-state-metrics]: https://github.com/helm/charts/tree/7.x/stable/kube-state-metrics +[kube-state-metrics]: https://github.com/helm/charts/tree/7.8/stable/kube-state-metrics [kubernetes secrets]: https://kubernetes.io/docs/concepts/configuration/secret/ [labels]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ [metricbeat docker image]: https://www.elastic.co/guide/en/beats/metricbeat/7.8/running-on-docker.html [priorityClass]: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass [nodeSelector]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector -[parent readme]: https://github.com/elastic/helm-charts/tree/7.x/README.md [probe]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes [resources]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ [securityContext]: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ [serviceAccount]: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ +[supported configurations]: https://github.com/elastic/helm-charts/tree/7.8/README.md#supported-configurations [tolerations]: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ [updateStrategy]: https://kubernetes.io/docs/tasks/manage-daemon/update-daemon-set/#daemonset-update-strategy -[values.yaml]: https://github.com/elastic/helm-charts/tree/7.x/metricbeat/values.yaml +[values.yaml]: https://github.com/elastic/helm-charts/tree/7.8/metricbeat/values.yaml diff --git a/metricbeat/examples/default/README.md b/metricbeat/examples/default/README.md index ad2538354..a152a3550 100644 --- a/metricbeat/examples/default/README.md +++ b/metricbeat/examples/default/README.md @@ -22,6 +22,6 @@ This example deploy Metricbeat 7.8.0-SNAPSHOT using [default values][]. You can also run [goss integration tests][] using `make test` -[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/default/ -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/metricbeat/examples/default/test/goss.yaml -[default values]: https://github.com/elastic/helm-charts/tree/7.x/metricbeat/values.yaml +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/default/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.8/metricbeat/examples/default/test/goss.yaml +[default values]: https://github.com/elastic/helm-charts/tree/7.8/metricbeat/values.yaml diff --git a/metricbeat/examples/oss/README.md b/metricbeat/examples/oss/README.md index 66d300eb7..d5d964856 100644 --- a/metricbeat/examples/oss/README.md +++ b/metricbeat/examples/oss/README.md @@ -23,5 +23,5 @@ You can also run [goss integration tests][] using `make test` [metricbeat oss]: https://www.elastic.co/downloads/beats/metricbeat-oss -[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/oss/ -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/metricbeat/examples/oss/test/goss.yaml +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/oss/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.8/metricbeat/examples/oss/test/goss.yaml diff --git a/metricbeat/examples/security/README.md b/metricbeat/examples/security/README.md index 85d8ee505..9c1a553b7 100644 --- a/metricbeat/examples/security/README.md +++ b/metricbeat/examples/security/README.md @@ -23,6 +23,6 @@ Elasticsearch (see [values][]). You can also run [goss integration tests][] using `make test` -[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.x/elasticsearch/examples/security/ -[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.x/metricbeat/examples/security/test/goss.yaml -[values]: https://github.com/elastic/helm-charts/tree/7.x/metricbeat/examples/security/values.yaml +[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/7.8/elasticsearch/examples/security/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/7.8/metricbeat/examples/security/test/goss.yaml +[values]: https://github.com/elastic/helm-charts/tree/7.8/metricbeat/examples/security/values.yaml From 4b686898d20f007b4c17524e974ba854abe7fd27 Mon Sep 17 00:00:00 2001 From: Julien Mailleret <8582351+jmlrt@users.noreply.github.com> Date: Mon, 15 Jun 2020 08:40:23 +0200 Subject: [PATCH 37/44] [apm-server] increase memory limit (#664) --- apm-server/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apm-server/values.yaml b/apm-server/values.yaml index ee2564043..ab08055e2 100755 --- a/apm-server/values.yaml +++ b/apm-server/values.yaml @@ -97,7 +97,7 @@ resources: memory: "100Mi" limits: cpu: "1000m" - memory: "200Mi" + memory: "512Mi" # Custom service account override that the pod will use serviceAccount: "" From 839881a9ec0119f151c28e717ffe4f8eb243f970 Mon Sep 17 00:00:00 2001 From: Florian Loretan Date: Wed, 17 Jun 2020 14:09:16 +0200 Subject: [PATCH 38/44] [elasticsearch] Disable service links to prevent very long startup times (#542) Prevents very long startup times when the namespace contains many services. Only valid for kubernetes versions >1.13 --- elasticsearch/README.md | 1 + elasticsearch/templates/statefulset.yaml | 3 +++ elasticsearch/values.yaml | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/elasticsearch/README.md b/elasticsearch/README.md index cff03d296..73b09c0c7 100644 --- a/elasticsearch/README.md +++ b/elasticsearch/README.md @@ -109,6 +109,7 @@ support multiple versions with minimal changes. | `antiAffinity` | Setting this to hard enforces the [anti-affinity][] rules. If it is set to soft it will be done "best effort". Other values will be ignored | `hard` | | `clusterHealthCheckParams` | The [Elasticsearch cluster health status params][] that will be used by readiness [probe][] command | `wait_for_status=green&timeout=1s` | | `clusterName` | This will be used as the Elasticsearch [cluster.name][] and should be unique per cluster in the namespace | `elasticsearch` | +| `enableServiceLinks` | Set to false to disabling service links, which can cause slow pod startup times when there are many services in the current namespace. | `true` | | `envFrom` | Templatable string to be passed to the [environment from variables][] which will be appended to the `envFrom:` definition for the container | `[]` | | `esConfig` | Allows you to add any config files in `/usr/share/elasticsearch/config/` such as `elasticsearch.yml` and `log4j2.properties`. See [values.yaml][] for an example of the formatting | `{}` | | `esJavaOpts` | [Java options][] for Elasticsearch. This is where you should configure the [jvm heap size][] | `-Xmx1g -Xms1g` | diff --git a/elasticsearch/templates/statefulset.yaml b/elasticsearch/templates/statefulset.yaml index acb1afbc8..f79b8f48f 100644 --- a/elasticsearch/templates/statefulset.yaml +++ b/elasticsearch/templates/statefulset.yaml @@ -143,6 +143,9 @@ spec: {{- if .Values.imagePullSecrets }} imagePullSecrets: {{ toYaml .Values.imagePullSecrets | indent 8 }} + {{- end }} + {{- if semverCompare ">1.13" .Capabilities.KubeVersion.GitVersion }} + enableServiceLinks: {{ .Values.enableServiceLinks }} {{- end }} initContainers: {{- if .Values.sysctlInitContainer.enabled }} diff --git a/elasticsearch/values.yaml b/elasticsearch/values.yaml index 4c1526e62..e7b2731cc 100755 --- a/elasticsearch/values.yaml +++ b/elasticsearch/values.yaml @@ -159,6 +159,11 @@ nodeAffinity: {} # the same time when bootstrapping the cluster podManagementPolicy: "Parallel" +# The environment variables injected by service links are not used, but can lead to slow Elasticsearch boot times when +# there are many services in the current namespace. +# If you experience slow pod startups you probably want to set this to `false`. +enableServiceLinks: true + protocol: http httpPort: 9200 transportPort: 9300 From 2dc6fc2a3a36260c088f07e2f5e5769a9c707b16 Mon Sep 17 00:00:00 2001 From: Julien Mailleret <8582351+jmlrt@users.noreply.github.com> Date: Thu, 18 Jun 2020 13:12:37 +0200 Subject: [PATCH 39/44] [apm-server] allow customizing probes (#671) This commit makes probes customizable using values. The values where already partly existing but weren't used in the deployment template. --- apm-server/templates/deployment.yaml | 12 +++--------- apm-server/values.yaml | 8 ++++++++ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/apm-server/templates/deployment.yaml b/apm-server/templates/deployment.yaml index 87a1bc085..8ffd5ee39 100644 --- a/apm-server/templates/deployment.yaml +++ b/apm-server/templates/deployment.yaml @@ -88,15 +88,9 @@ spec: {{ toYaml .Values.podSecurityContext | indent 10 }} {{- end }} livenessProbe: - httpGet: - path: / - port: http - initialDelaySeconds: 30 +{{ toYaml .Values.livenessProbe | indent 10 }} readinessProbe: - httpGet: - path: / - port: http - initialDelaySeconds: 30 +{{ toYaml .Values.readinessProbe | indent 10 }} ports: - containerPort: {{ .Values.service.port }} name: http @@ -125,4 +119,4 @@ spec: {{- end }} {{- if .Values.extraContainers }} {{ tpl .Values.extraContainers . | indent 6 }} - {{- end }} \ No newline at end of file + {{- end }} diff --git a/apm-server/values.yaml b/apm-server/values.yaml index ab08055e2..6b3a6184e 100755 --- a/apm-server/values.yaml +++ b/apm-server/values.yaml @@ -80,12 +80,20 @@ podSecurityContext: privileged: false livenessProbe: + httpGet: + path: / + port: http + initialDelaySeconds: 30 failureThreshold: 3 initialDelaySeconds: 10 periodSeconds: 10 timeoutSeconds: 5 readinessProbe: + httpGet: + path: / + port: http + initialDelaySeconds: 30 failureThreshold: 3 initialDelaySeconds: 10 periodSeconds: 10 From 950e6c52788ac31cee1b16cde3225ee38e3f6f2d Mon Sep 17 00:00:00 2001 From: Julien Mailleret <8582351+jmlrt@users.noreply.github.com> Date: Thu, 18 Jun 2020 13:32:58 +0200 Subject: [PATCH 40/44] [elasticsearch] update kind example for version >= 0.7.0 (#669) --- .../examples/kubernetes-kind/Makefile | 5 +++- .../examples/kubernetes-kind/README.md | 14 +++++------ .../kubernetes-kind/values-local-path.yaml | 23 +++++++++++++++++++ 3 files changed, 33 insertions(+), 9 deletions(-) create mode 100644 elasticsearch/examples/kubernetes-kind/values-local-path.yaml diff --git a/elasticsearch/examples/kubernetes-kind/Makefile b/elasticsearch/examples/kubernetes-kind/Makefile index 9dad380be..af816a9d8 100644 --- a/elasticsearch/examples/kubernetes-kind/Makefile +++ b/elasticsearch/examples/kubernetes-kind/Makefile @@ -3,9 +3,12 @@ default: test RELEASE := helm-es-kind install: - kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml helm upgrade --wait --timeout=900 --install --values values.yaml $(RELEASE) ../../ +install-local-path: + kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml + helm upgrade --wait --timeout=900 --install --values values-local-path.yaml $(RELEASE) ../../ + test: install helm test $(RELEASE) diff --git a/elasticsearch/examples/kubernetes-kind/README.md b/elasticsearch/examples/kubernetes-kind/README.md index 838da4c6f..384b58832 100644 --- a/elasticsearch/examples/kubernetes-kind/README.md +++ b/elasticsearch/examples/kubernetes-kind/README.md @@ -6,21 +6,19 @@ using [custom values][]. Note that this configuration should be used for test only and isn't recommended for production. +Note that Kind < 0.7.0 are affected by a [kind issue][] with mount points +created from PVCs not writable by non-root users. [kubernetes-sigs/kind#1157][] +fix it in Kind 0.7.0. -## Requirements - -There is currently an [kind issue][] with mount points created from PVCs not -writable by non-root users. [kubernetes-sigs/kind#1157][] should fix it in a -future release. - -Meanwhile, the workaround is to install manually +The workaround for Kind < 0.7.0 is to install manually [Rancher Local Path Provisioner][] and use `local-path` storage class for Elasticsearch volumes (see [Makefile][] instructions). ## Usage -* Deploy Elasticsearch chart with the default values: `make install` +* For Kind >= 0.7.0: Deploy Elasticsearch chart with the default values: `make install` +* For Kind < 0.7.0: Deploy Elasticsearch chart with `local-path` storage class: `make install-local-path` * You can now setup a port forward to query Elasticsearch API: diff --git a/elasticsearch/examples/kubernetes-kind/values-local-path.yaml b/elasticsearch/examples/kubernetes-kind/values-local-path.yaml new file mode 100644 index 000000000..500ad4b14 --- /dev/null +++ b/elasticsearch/examples/kubernetes-kind/values-local-path.yaml @@ -0,0 +1,23 @@ +--- +# 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: "local-path" + resources: + requests: + storage: 100M From 0f7aed907d76378f1730675460a555c6798424bf Mon Sep 17 00:00:00 2001 From: Julien Mailleret <8582351+jmlrt@users.noreply.github.com> Date: Thu, 18 Jun 2020 13:33:41 +0200 Subject: [PATCH 41/44] [helm] bump helm version to 2.16.9 (#667) --- README.md | 2 +- helpers/helm-tester/Dockerfile | 2 +- helpers/terraform/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 24206e092..c205bca45 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ exact versions are defined under `KUBERNETES_VERSIONS` in ### Helm versions While we are checking backward compatibility, the charts are only tested with -Helm version mentioned in [helm-tester Dockerfile][] (currently 2.16.8). +Helm version mentioned in [helm-tester Dockerfile][] (currently 2.16.9). Note that we don't support [Helm 3][] version. ## ECK diff --git a/helpers/helm-tester/Dockerfile b/helpers/helm-tester/Dockerfile index 9640c9d69..50536ca3e 100644 --- a/helpers/helm-tester/Dockerfile +++ b/helpers/helm-tester/Dockerfile @@ -1,6 +1,6 @@ FROM python:3.7 -ENV HELM_VERSION=2.16.8 +ENV HELM_VERSION=2.16.9 RUN wget --no-verbose https://storage.googleapis.com/kubernetes-helm/helm-v${HELM_VERSION}-linux-amd64.tar.gz && \ tar xfv helm-v${HELM_VERSION}-linux-amd64.tar.gz && \ diff --git a/helpers/terraform/Dockerfile b/helpers/terraform/Dockerfile index b921c97de..a6f87a3bd 100644 --- a/helpers/terraform/Dockerfile +++ b/helpers/terraform/Dockerfile @@ -3,7 +3,7 @@ FROM centos:7 ENV VAULT_VERSION 0.9.3 ENV TERRAFORM_VERSION=0.11.7 ENV KUBECTL_VERSION=1.16.10 -ENV HELM_VERSION=2.16.8 +ENV HELM_VERSION=2.16.9 ENV DOCKER_VERSION=18.09.7 ENV JQ_VERSION=1.6 From 936900252a2512d5f2c0690a1a8b85afc050bbdb Mon Sep 17 00:00:00 2001 From: Julien Mailleret <8582351+jmlrt@users.noreply.github.com> Date: Thu, 18 Jun 2020 14:33:31 +0200 Subject: [PATCH 42/44] [logstash] add security example (#392) This commit add a security example to use Logstash Helm chart and Elasticsearch Helm chart with TLS encryption. --- elasticsearch/examples/security/Makefile | 6 ++- helpers/matrix.yml | 1 + logstash/examples/security/Makefile | 14 +++++ logstash/examples/security/README.md | 28 ++++++++++ logstash/examples/security/test/goss.yaml | 64 +++++++++++++++++++++++ logstash/examples/security/values.yaml | 40 ++++++++++++++ 6 files changed, 151 insertions(+), 2 deletions(-) create mode 100644 logstash/examples/security/Makefile create mode 100644 logstash/examples/security/README.md create mode 100644 logstash/examples/security/test/goss.yaml create mode 100644 logstash/examples/security/values.yaml diff --git a/elasticsearch/examples/security/Makefile b/elasticsearch/examples/security/Makefile index d8c6f11c7..46f0ee783 100644 --- a/elasticsearch/examples/security/Makefile +++ b/elasticsearch/examples/security/Makefile @@ -19,7 +19,7 @@ pull-elasticsearch-image: secrets: docker rm -f elastic-helm-charts-certs || true - rm -f elastic-certificates.p12 elastic-certificate.pem elastic-stack-ca.p12 || true + rm -f elastic-certificates.p12 elastic-certificate.pem elastic-certificate.crt elastic-stack-ca.p12 || true password=$$([ ! -z "$$ELASTIC_PASSWORD" ] && echo $$ELASTIC_PASSWORD || echo $$(docker run --rm busybox:1.31.1 /bin/sh -c "< /dev/urandom tr -cd '[:alnum:]' | head -c20")) && \ docker run --name elastic-helm-charts-certs -i -w /app \ $(ELASTICSEARCH_IMAGE) \ @@ -29,7 +29,9 @@ secrets: 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 && \ + openssl x509 -outform der -in elastic-certificate.pem -out elastic-certificate.crt && \ 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-certificate-crt --from-file=elastic-certificate.crt && \ 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 + rm -f elastic-certificates.p12 elastic-certificate.pem elastic-certificate.crt elastic-stack-ca.p12 diff --git a/helpers/matrix.yml b/helpers/matrix.yml index aaba651f9..f51901f09 100644 --- a/helpers/matrix.yml +++ b/helpers/matrix.yml @@ -27,6 +27,7 @@ LOGSTASH_SUITE: - default - oss - elasticsearch + - security APM_SERVER_SUITE: - default - oss diff --git a/logstash/examples/security/Makefile b/logstash/examples/security/Makefile new file mode 100644 index 000000000..8bfee0711 --- /dev/null +++ b/logstash/examples/security/Makefile @@ -0,0 +1,14 @@ +default: test + +include ../../../helpers/examples.mk + +RELEASE := helm-logstash-security + +install: + helm upgrade --wait --timeout=900 --install $(RELEASE) --values values.yaml ../../ + +test: install goss + +purge: + helm del --purge $(RELEASE) + kubectl delete $$(kubectl get pvc -l release=$(RELEASE) -o name) diff --git a/logstash/examples/security/README.md b/logstash/examples/security/README.md new file mode 100644 index 000000000..0f9af83dd --- /dev/null +++ b/logstash/examples/security/README.md @@ -0,0 +1,28 @@ +# Security + +This example deploy Logstash 7.7.1 which connects to Elasticsearch using TLS +(see [values][]). + + +## Usage + +* Deploy [Elasticsearch Helm chart with security][]. + +* Deploy Logstash chart: `make install` + +* You can now setup a port forward to query Logstash indices: + + ``` + kubectl port-forward svc/elasticsearch-master 9200 + curl localhost:9200/_cat/indices + ``` + + +## Testing + +You can also run [goss integration tests][] using `make test` + + +[elasticsearch helm chart with security]: https://github.com/elastic/helm-charts/tree/master/elasticsearch/examples/security/ +[goss integration tests]: https://github.com/elastic/helm-charts/tree/master/logstash/examples/security/test/goss.yaml +[values]: https://github.com/elastic/helm-charts/tree/master/logstash/examples/security/values.yaml diff --git a/logstash/examples/security/test/goss.yaml b/logstash/examples/security/test/goss.yaml new file mode 100644 index 000000000..0102ad0d1 --- /dev/null +++ b/logstash/examples/security/test/goss.yaml @@ -0,0 +1,64 @@ +mount: + /usr/share/logstash/data: + exists: true + /usr/share/logstash/config/logstash.yml: + exists: true + opts: + - ro + /usr/share/logstash/pipeline/uptime.conf: + exists: true + opts: + - ro + +user: + logstash: + exists: true + uid: 1000 + gid: 1000 + +http: + http://localhost:9600?pretty: + status: 200 + timeout: 2000 + body: + - '"host" : "helm-logstash-security-logstash-0"' + - '"version" : "7.7.1"' + - '"http_address" : "0.0.0.0:9600"' + - '"name" : "helm-logstash-security-logstash-0"' + - '"status" : "green"' + - '"workers" : 1' + - '"batch_size" : 125' + - '"batch_delay" : 50' + https://security-master:9200/_cat/indices: + status: 200 + timeout: 2000 + body: + - 'logstash' + allow-insecure: true + username: '{{ .Env.ELASTICSEARCH_USERNAME }}' + password: '{{ .Env.ELASTICSEARCH_PASSWORD }}' + +file: + /usr/share/logstash/config/logstash.yml: + exists: true + mode: "0644" + owner: root + group: logstash + filetype: file + contains: + - 'http.host: 0.0.0.0' + - 'xpack.monitoring.enabled: true' + - 'xpack.monitoring.elasticsearch.hosts: ["https://security-master:9200"]' + - 'xpack.monitoring.elasticsearch.ssl.certificate_authority: /usr/share/logstash/config/certs/elastic-certificate.crt' + /usr/share/logstash/pipeline/uptime.conf: + exists: true + mode: "0644" + owner: root + group: logstash + filetype: file + contains: + - 'input { exec { command => "uptime" interval => 30 } }' + - 'output { elasticsearch {' + - 'hosts => ["https://security-master:9200"]' + - 'cacert => "/usr/share/logstash/config/certs/elastic-certificate.crt"' + - 'index => "logstash"' diff --git a/logstash/examples/security/values.yaml b/logstash/examples/security/values.yaml new file mode 100644 index 000000000..1457d7865 --- /dev/null +++ b/logstash/examples/security/values.yaml @@ -0,0 +1,40 @@ +persistence: + enabled: true + +logstashConfig: + logstash.yml: | + http.host: 0.0.0.0 + xpack.monitoring.enabled: true + xpack.monitoring.elasticsearch.username: '${ELASTICSEARCH_USERNAME}' + xpack.monitoring.elasticsearch.password: '${ELASTICSEARCH_PASSWORD}' + xpack.monitoring.elasticsearch.hosts: ["https://security-master:9200"] + xpack.monitoring.elasticsearch.ssl.certificate_authority: /usr/share/logstash/config/certs/elastic-certificate.crt + +logstashPipeline: + uptime.conf: | + input { exec { command => "uptime" interval => 30 } } + output { elasticsearch { + hosts => ["https://security-master:9200"] + cacert => "/usr/share/logstash/config/certs/elastic-certificate.crt" + user => '${ELASTICSEARCH_USERNAME}' + password => '${ELASTICSEARCH_PASSWORD}' + index => "logstash" + } + } + +secretMounts: + - name: elastic-certificate-crt + secretName: elastic-certificate-crt + path: /usr/share/logstash/config/certs + +extraEnvs: + - name: 'ELASTICSEARCH_USERNAME' + valueFrom: + secretKeyRef: + name: elastic-credentials + key: username + - name: 'ELASTICSEARCH_PASSWORD' + valueFrom: + secretKeyRef: + name: elastic-credentials + key: password From 94e94e1d68a91a4d7564592ef899d6dd9a90d132 Mon Sep 17 00:00:00 2001 From: Julien Mailleret <8582351+jmlrt@users.noreply.github.com> Date: Thu, 18 Jun 2020 15:47:26 +0200 Subject: [PATCH 43/44] [meta] bump to 7.8.0 --- apm-server/Chart.yaml | 4 ++-- apm-server/README.md | 8 ++++---- apm-server/examples/default/README.md | 2 +- apm-server/examples/oss/README.md | 2 +- apm-server/examples/security/README.md | 2 +- apm-server/values.yaml | 2 +- elasticsearch/Chart.yaml | 4 ++-- elasticsearch/README.md | 8 ++++---- elasticsearch/examples/config/README.md | 2 +- elasticsearch/examples/default/README.md | 2 +- elasticsearch/examples/default/test/goss.yaml | 2 +- elasticsearch/examples/docker-for-mac/README.md | 2 +- elasticsearch/examples/kubernetes-kind/README.md | 2 +- elasticsearch/examples/microk8s/README.md | 2 +- elasticsearch/examples/minikube/README.md | 2 +- elasticsearch/examples/multi/README.md | 2 +- elasticsearch/examples/openshift/README.md | 2 +- elasticsearch/examples/oss/README.md | 2 +- elasticsearch/examples/oss/test/goss.yaml | 2 +- elasticsearch/examples/security/README.md | 2 +- elasticsearch/examples/upgrade/README.md | 4 ++-- elasticsearch/examples/upgrade/test/goss.yaml | 2 +- elasticsearch/values.yaml | 2 +- filebeat/Chart.yaml | 4 ++-- filebeat/README.md | 8 ++++---- filebeat/examples/default/README.md | 2 +- filebeat/examples/oss/README.md | 2 +- filebeat/examples/security/README.md | 2 +- filebeat/values.yaml | 2 +- helpers/bumper.py | 2 +- helpers/examples.mk | 2 +- kibana/Chart.yaml | 4 ++-- kibana/README.md | 8 ++++---- kibana/examples/default/README.md | 2 +- kibana/examples/openshift/README.md | 2 +- kibana/examples/oss/README.md | 2 +- kibana/examples/security/README.md | 2 +- kibana/values.yaml | 2 +- logstash/Chart.yaml | 4 ++-- logstash/README.md | 8 ++++---- logstash/examples/default/README.md | 2 +- logstash/examples/elasticsearch/README.md | 2 +- logstash/examples/oss/README.md | 2 +- logstash/values.yaml | 2 +- metricbeat/Chart.yaml | 4 ++-- metricbeat/README.md | 8 ++++---- metricbeat/examples/default/README.md | 2 +- metricbeat/examples/oss/README.md | 2 +- metricbeat/examples/security/README.md | 2 +- metricbeat/values.yaml | 2 +- 50 files changed, 75 insertions(+), 75 deletions(-) diff --git a/apm-server/Chart.yaml b/apm-server/Chart.yaml index 6a023e4ba..eb10409a8 100755 --- a/apm-server/Chart.yaml +++ b/apm-server/Chart.yaml @@ -5,8 +5,8 @@ maintainers: - email: helm-charts@elastic.co name: Elastic name: apm-server -version: 7.8.0-SNAPSHOT -appVersion: 7.8.0-SNAPSHOT +version: 7.8.0 +appVersion: 7.8.0 sources: - https://github.com/elastic/apm icon: https://helm.elastic.co/icons/apm.png diff --git a/apm-server/README.md b/apm-server/README.md index aef3faee3..1ff77832e 100644 --- a/apm-server/README.md +++ b/apm-server/README.md @@ -19,7 +19,7 @@ for released version. - [Requirements](#requirements) - [Installing](#installing) - [Install released version using Helm repository](#install-released-version-using-helm-repository) - - [Install development version using 7.8 branch and 7.8.0-SNAPSHOT versions](#install-development-version-using-78-branch-and-780-snapshot-versions) + - [Install development version using 7.8 branch and 7.8.0 versions](#install-development-version-using-78-branch-and-780-snapshot-versions) - [Upgrading](#upgrading) - [Usage notes](#usage-notes) - [Configuration](#configuration) @@ -43,7 +43,7 @@ See [supported configurations][] for more details. ## Installing -This chart is tested with the latest 7.8.0-SNAPSHOT versions. +This chart is tested with the latest 7.8.0 versions. ### Install released version using Helm repository @@ -53,7 +53,7 @@ This chart is tested with the latest 7.8.0-SNAPSHOT versions. * Install the latest 7.7 release: `helm install --name apm-server elastic/apm-server` -### Install development version using 7.8 branch and 7.8.0-SNAPSHOT versions +### Install development version using 7.8 branch and 7.8.0 versions * Clone the git repo: `git clone git@github.com:elastic/helm-charts.git` @@ -95,7 +95,7 @@ as a reference. They are also used in the automated testing of this chart. | `fullnameOverride` | Overrides the full name of the resources. If not set the name will default to `.Release.Name` - `.Values.nameOverride` or `.Chart.Name` | `""` | | `imagePullPolicy` | The Kubernetes [imagePullPolicy][] value | `IfNotPresent` | | `imagePullSecrets` | Configuration for [imagePullSecrets][] so that you can use a private registry for your image | `[]` | -| `imageTag` | The APM Server Docker image tag | `7.8.0-SNAPSHOT` | +| `imageTag` | The APM Server Docker image tag | `7.8.0` | | `image` | The APM Server Docker image | `docker.elastic.co/apm/apm-server` | | `ingress` | Configurable [ingress][] to expose the APM Server service | see [values.yaml][] | | `labels` | Configurable [labels][] applied to all APM server pods | `{}` | diff --git a/apm-server/examples/default/README.md b/apm-server/examples/default/README.md index 39aa514e1..638bf4344 100644 --- a/apm-server/examples/default/README.md +++ b/apm-server/examples/default/README.md @@ -1,6 +1,6 @@ # Default -This example deploy APM Server 7.8.0-SNAPSHOT using [default values][]. +This example deploy APM Server 7.8.0 using [default values][]. ## Usage diff --git a/apm-server/examples/oss/README.md b/apm-server/examples/oss/README.md index 5f48d5ab5..2637d874e 100644 --- a/apm-server/examples/oss/README.md +++ b/apm-server/examples/oss/README.md @@ -1,6 +1,6 @@ # OSS -This example deploy APM Server 7.8.0-SNAPSHOT using [APM Server OSS][] version. +This example deploy APM Server 7.8.0 using [APM Server OSS][] version. ## Usage diff --git a/apm-server/examples/security/README.md b/apm-server/examples/security/README.md index 615986fb3..93b52b3cd 100644 --- a/apm-server/examples/security/README.md +++ b/apm-server/examples/security/README.md @@ -1,6 +1,6 @@ # Security -This example deploy APM Server 7.8.0-SNAPSHOT using authentication and TLS to connect to +This example deploy APM Server 7.8.0 using authentication and TLS to connect to Elasticsearch (see [values][]). diff --git a/apm-server/values.yaml b/apm-server/values.yaml index 6b3a6184e..33bc0054d 100755 --- a/apm-server/values.yaml +++ b/apm-server/values.yaml @@ -62,7 +62,7 @@ extraVolumes: [] # emptyDir: {} image: "docker.elastic.co/apm/apm-server" -imageTag: "7.8.0-SNAPSHOT" +imageTag: "7.8.0" imagePullPolicy: "IfNotPresent" imagePullSecrets: [] diff --git a/elasticsearch/Chart.yaml b/elasticsearch/Chart.yaml index 5945eae05..19003660c 100755 --- a/elasticsearch/Chart.yaml +++ b/elasticsearch/Chart.yaml @@ -5,8 +5,8 @@ maintainers: - email: helm-charts@elastic.co name: Elastic name: elasticsearch -version: 7.8.0-SNAPSHOT -appVersion: 7.8.0-SNAPSHOT +version: 7.8.0 +appVersion: 7.8.0 sources: - https://github.com/elastic/elasticsearch icon: https://helm.elastic.co/icons/elasticsearch.png diff --git a/elasticsearch/README.md b/elasticsearch/README.md index 73b09c0c7..03369de20 100644 --- a/elasticsearch/README.md +++ b/elasticsearch/README.md @@ -14,7 +14,7 @@ for released version. - [Requirements](#requirements) - [Installing](#installing) - [Install released version using Helm repository](#install-released-version-using-helm-repository) - - [Install development version using 7.8 branch and 7.8.0-SNAPSHOT versions](#install-development-version-using-78-branch-and-780-snapshot-versions) + - [Install development version using 7.8 branch and 7.8.0 versions](#install-development-version-using-78-branch-and-780-snapshot-versions) - [Upgrading](#upgrading) - [Usage notes](#usage-notes) - [Configuration](#configuration) @@ -53,7 +53,7 @@ See [supported configurations][] for more details. ## Installing -This chart is tested with the latest 7.8.0-SNAPSHOT versions. +This chart is tested with the latest 7.8.0 versions. ### Install released version using Helm repository @@ -63,7 +63,7 @@ This chart is tested with the latest 7.8.0-SNAPSHOT versions. * Install the latest 7.7 release: `helm install --name elasticsearch elastic/elasticsearch` -### Install development version using 7.8 branch and 7.8.0-SNAPSHOT versions +### Install development version using 7.8 branch and 7.8.0 versions * Clone the git repo: `git clone git@github.com:elastic/helm-charts.git` @@ -123,7 +123,7 @@ support multiple versions with minimal changes. | `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][] in `extraEnvs` | `9200` | | `imagePullPolicy` | The Kubernetes [imagePullPolicy][] value | `IfNotPresent` | | `imagePullSecrets` | Configuration for [imagePullSecrets][] so that you can use a private registry for your image | `[]` | -| `imageTag` | The Elasticsearch Docker image tag | `7.8.0-SNAPSHOT` | +| `imageTag` | The Elasticsearch Docker image tag | `7.8.0` | | `image` | The Elasticsearch Docker image | `docker.elastic.co/elasticsearch/elasticsearch` | | `ingress` | Configurable [ingress][] to expose the Elasticsearch service. See [values.yaml][] for an example | see [values.yaml][] | | `initResources` | Allows you to set the [resources][] for the `initContainer` in the StatefulSet | `{}` | diff --git a/elasticsearch/examples/config/README.md b/elasticsearch/examples/config/README.md index 6afce9349..4be1621e8 100644 --- a/elasticsearch/examples/config/README.md +++ b/elasticsearch/examples/config/README.md @@ -1,6 +1,6 @@ # Config -This example deploy a single node Elasticsearch 7.8.0-SNAPSHOT with authentication and +This example deploy a single node Elasticsearch 7.8.0 with authentication and custom [values][]. diff --git a/elasticsearch/examples/default/README.md b/elasticsearch/examples/default/README.md index 92f814d30..0ed9cec73 100644 --- a/elasticsearch/examples/default/README.md +++ b/elasticsearch/examples/default/README.md @@ -1,6 +1,6 @@ # Default -This example deploy a 3 nodes Elasticsearch 7.8.0-SNAPSHOT cluster using +This example deploy a 3 nodes Elasticsearch 7.8.0 cluster using [default values][]. diff --git a/elasticsearch/examples/default/test/goss.yaml b/elasticsearch/examples/default/test/goss.yaml index c8b2c0c25..563760470 100644 --- a/elasticsearch/examples/default/test/goss.yaml +++ b/elasticsearch/examples/default/test/goss.yaml @@ -15,7 +15,7 @@ http: status: 200 timeout: 2000 body: - - '"number" : "7.8.0-SNAPSHOT"' + - '"number" : "7.8.0"' - '"cluster_name" : "elasticsearch"' - '"name" : "elasticsearch-master-0"' - 'You Know, for Search' diff --git a/elasticsearch/examples/docker-for-mac/README.md b/elasticsearch/examples/docker-for-mac/README.md index 7becc7d27..063dbef6f 100644 --- a/elasticsearch/examples/docker-for-mac/README.md +++ b/elasticsearch/examples/docker-for-mac/README.md @@ -1,6 +1,6 @@ # Docker for Mac -This example deploy a 3 nodes Elasticsearch 7.8.0-SNAPSHOT cluster on [Docker for Mac][] +This example deploy a 3 nodes Elasticsearch 7.8.0 cluster on [Docker for Mac][] using [custom values][]. Note that this configuration should be used for test only and isn't recommended diff --git a/elasticsearch/examples/kubernetes-kind/README.md b/elasticsearch/examples/kubernetes-kind/README.md index 384b58832..2e0a362ea 100644 --- a/elasticsearch/examples/kubernetes-kind/README.md +++ b/elasticsearch/examples/kubernetes-kind/README.md @@ -1,6 +1,6 @@ # KIND -This example deploy a 3 nodes Elasticsearch 7.8.0-SNAPSHOT cluster on [Kind][] +This example deploy a 3 nodes Elasticsearch 7.8.0 cluster on [Kind][] using [custom values][]. Note that this configuration should be used for test only and isn't recommended diff --git a/elasticsearch/examples/microk8s/README.md b/elasticsearch/examples/microk8s/README.md index 485248c96..6d4ca56a3 100644 --- a/elasticsearch/examples/microk8s/README.md +++ b/elasticsearch/examples/microk8s/README.md @@ -1,6 +1,6 @@ # MicroK8S -This example deploy a 3 nodes Elasticsearch 7.8.0-SNAPSHOT cluster on [MicroK8S][] +This example deploy a 3 nodes Elasticsearch 7.8.0 cluster on [MicroK8S][] using [custom values][]. Note that this configuration should be used for test only and isn't recommended diff --git a/elasticsearch/examples/minikube/README.md b/elasticsearch/examples/minikube/README.md index ae914e271..2444ccf7e 100644 --- a/elasticsearch/examples/minikube/README.md +++ b/elasticsearch/examples/minikube/README.md @@ -1,6 +1,6 @@ # Minikube -This example deploy a 3 nodes Elasticsearch 7.8.0-SNAPSHOT cluster on [Minikube][] +This example deploy a 3 nodes Elasticsearch 7.8.0 cluster on [Minikube][] using [custom values][]. If helm or kubectl timeouts occur, you may consider creating a minikube VM with diff --git a/elasticsearch/examples/multi/README.md b/elasticsearch/examples/multi/README.md index b696d1d76..4ee24a823 100644 --- a/elasticsearch/examples/multi/README.md +++ b/elasticsearch/examples/multi/README.md @@ -1,6 +1,6 @@ # Multi -This example deploy an Elasticsearch 7.8.0-SNAPSHOT cluster composed of 2 different Helm +This example deploy an Elasticsearch 7.8.0 cluster composed of 2 different Helm releases: - `helm-es-multi-master` for the 3 master nodes using [master values][] diff --git a/elasticsearch/examples/openshift/README.md b/elasticsearch/examples/openshift/README.md index 6cd6a8a85..9706bb9e0 100644 --- a/elasticsearch/examples/openshift/README.md +++ b/elasticsearch/examples/openshift/README.md @@ -1,6 +1,6 @@ # OpenShift -This example deploy a 3 nodes Elasticsearch 7.8.0-SNAPSHOT cluster on [OpenShift][] +This example deploy a 3 nodes Elasticsearch 7.8.0 cluster on [OpenShift][] using [custom values][]. ## Usage diff --git a/elasticsearch/examples/oss/README.md b/elasticsearch/examples/oss/README.md index b46f23a63..da82f243a 100644 --- a/elasticsearch/examples/oss/README.md +++ b/elasticsearch/examples/oss/README.md @@ -1,6 +1,6 @@ # OSS -This example deploy a 3 nodes Elasticsearch 7.8.0-SNAPSHOT cluster using +This example deploy a 3 nodes Elasticsearch 7.8.0 cluster using [Elasticsearch OSS][] version. ## Usage diff --git a/elasticsearch/examples/oss/test/goss.yaml b/elasticsearch/examples/oss/test/goss.yaml index 30c179d51..f94274cc7 100644 --- a/elasticsearch/examples/oss/test/goss.yaml +++ b/elasticsearch/examples/oss/test/goss.yaml @@ -11,7 +11,7 @@ http: status: 200 timeout: 2000 body: - - '"number" : "7.8.0-SNAPSHOT"' + - '"number" : "7.8.0"' - '"cluster_name" : "oss"' - '"name" : "oss-master-0"' - 'You Know, for Search' diff --git a/elasticsearch/examples/security/README.md b/elasticsearch/examples/security/README.md index ef2bc8408..49047d28c 100644 --- a/elasticsearch/examples/security/README.md +++ b/elasticsearch/examples/security/README.md @@ -1,6 +1,6 @@ # Security -This example deploy a 3 nodes Elasticsearch 7.8.0-SNAPSHOT with authentication and +This example deploy a 3 nodes Elasticsearch 7.8.0 with authentication and autogenerated certificates for TLS (see [values][]). Note that this configuration should be used for test only. For a production diff --git a/elasticsearch/examples/upgrade/README.md b/elasticsearch/examples/upgrade/README.md index 2f5d0aa16..bd467e4c9 100644 --- a/elasticsearch/examples/upgrade/README.md +++ b/elasticsearch/examples/upgrade/README.md @@ -1,7 +1,7 @@ # Upgrade This example will deploy a 3 node Elasticsearch cluster using an old chart version, -then upgrade it to version 7.8.0-SNAPSHOT. +then upgrade it to version 7.8.0. The following upgrades are tested: - Upgrade from [7.0.0-alpha1][] version on K8S <1.16 @@ -11,7 +11,7 @@ not compatible with K8S >= 1.16) ## Usage -Running `make install` command will do first install and 7.8.0-SNAPSHOT upgrade. +Running `make install` command will do first install and 7.8.0 upgrade. Note: [jq][] is a requirement for this make target. diff --git a/elasticsearch/examples/upgrade/test/goss.yaml b/elasticsearch/examples/upgrade/test/goss.yaml index b99d4e4f8..f319de7a5 100644 --- a/elasticsearch/examples/upgrade/test/goss.yaml +++ b/elasticsearch/examples/upgrade/test/goss.yaml @@ -11,7 +11,7 @@ http: status: 200 timeout: 2000 body: - - '"number" : "7.8.0-SNAPSHOT"' + - '"number" : "7.8.0"' - '"cluster_name" : "upgrade"' - '"name" : "upgrade-master-0"' - 'You Know, for Search' diff --git a/elasticsearch/values.yaml b/elasticsearch/values.yaml index e7b2731cc..bbe004ab0 100755 --- a/elasticsearch/values.yaml +++ b/elasticsearch/values.yaml @@ -51,7 +51,7 @@ secretMounts: [] # defaultMode: 0755 image: "docker.elastic.co/elasticsearch/elasticsearch" -imageTag: "7.8.0-SNAPSHOT" +imageTag: "7.8.0" imagePullPolicy: "IfNotPresent" podAnnotations: {} diff --git a/filebeat/Chart.yaml b/filebeat/Chart.yaml index 843f7f70c..5959c1389 100755 --- a/filebeat/Chart.yaml +++ b/filebeat/Chart.yaml @@ -5,8 +5,8 @@ maintainers: - email: helm-charts@elastic.co name: Elastic name: filebeat -version: 7.8.0-SNAPSHOT -appVersion: 7.8.0-SNAPSHOT +version: 7.8.0 +appVersion: 7.8.0 sources: - https://github.com/elastic/beats icon: https://helm.elastic.co/icons/beats.png diff --git a/filebeat/README.md b/filebeat/README.md index d7f037bed..ba633b023 100644 --- a/filebeat/README.md +++ b/filebeat/README.md @@ -14,7 +14,7 @@ for released version. - [Requirements](#requirements) - [Installing](#installing) - [Install released version using Helm repository](#install-released-version-using-helm-repository) - - [Install development version using 7.8 branch and 7.8.0-SNAPSHOT versions](#install-development-version-using-78-branch-and-780-snapshot-versions) + - [Install development version using 7.8 branch and 7.8.0 versions](#install-development-version-using-78-branch-and-780-snapshot-versions) - [Upgrading](#upgrading) - [Usage notes](#usage-notes) - [Configuration](#configuration) @@ -39,7 +39,7 @@ See [supported configurations][] for more details. ## Installing -This chart is tested with the latest 7.8.0-SNAPSHOT versions. +This chart is tested with the latest 7.8.0 versions. ### Install released version using Helm repository @@ -49,7 +49,7 @@ This chart is tested with the latest 7.8.0-SNAPSHOT versions. * Install the latest 7.7 release: `helm install --name filebeat elastic/filebeat` -### Install development version using 7.8 branch and 7.8.0-SNAPSHOT versions +### Install development version using 7.8 branch and 7.8.0 versions * Clone the git repo: `git clone git@github.com:elastic/helm-charts.git` @@ -101,7 +101,7 @@ as a reference. They are also used in the automated testing of this chart. | `hostPathRoot` | Fully-qualified [hostPath][] that will be used to persist Filebeat registry data | `/var/lib` | | `imagePullPolicy` | The Kubernetes [imagePullPolicy][] value | `IfNotPresent` | | `imagePullSecrets` | Configuration for [imagePullSecrets][] so that you can use a private registry for your image | `[]` | -| `imageTag` | The Filebeat Docker image tag | `7.8.0-SNAPSHOT` | +| `imageTag` | The Filebeat Docker image tag | `7.8.0` | | `image` | The Filebeat Docker image | `docker.elastic.co/beats/filebeat` | | `labels` | Configurable [labels][] applied to all Filebeat pods | `{}` | | `livenessProbe` | Parameters to pass to liveness [probe][] checks for values such as timeouts and thresholds | see [values.yaml][] | diff --git a/filebeat/examples/default/README.md b/filebeat/examples/default/README.md index 9773681c4..d108d3550 100644 --- a/filebeat/examples/default/README.md +++ b/filebeat/examples/default/README.md @@ -1,6 +1,6 @@ # Default -This example deploy Filebeat 7.8.0-SNAPSHOT using [default values][]. +This example deploy Filebeat 7.8.0 using [default values][]. ## Usage diff --git a/filebeat/examples/oss/README.md b/filebeat/examples/oss/README.md index 959e8192c..a840691ed 100644 --- a/filebeat/examples/oss/README.md +++ b/filebeat/examples/oss/README.md @@ -1,6 +1,6 @@ # OSS -This example deploy Filebeat 7.8.0-SNAPSHOT using [Filebeat OSS][] version. +This example deploy Filebeat 7.8.0 using [Filebeat OSS][] version. ## Usage diff --git a/filebeat/examples/security/README.md b/filebeat/examples/security/README.md index fcacc2210..677cf7e3f 100644 --- a/filebeat/examples/security/README.md +++ b/filebeat/examples/security/README.md @@ -1,6 +1,6 @@ # Security -This example deploy Filebeat 7.8.0-SNAPSHOT using authentication and TLS to connect to +This example deploy Filebeat 7.8.0 using authentication and TLS to connect to Elasticsearch (see [values][]). diff --git a/filebeat/values.yaml b/filebeat/values.yaml index a723aed13..378ba402b 100755 --- a/filebeat/values.yaml +++ b/filebeat/values.yaml @@ -52,7 +52,7 @@ envFrom: [] hostPathRoot: /var/lib hostNetworking: false image: "docker.elastic.co/beats/filebeat" -imageTag: "7.8.0-SNAPSHOT" +imageTag: "7.8.0" imagePullPolicy: "IfNotPresent" imagePullSecrets: [] diff --git a/helpers/bumper.py b/helpers/bumper.py index caa86648a..1034e5d9a 100755 --- a/helpers/bumper.py +++ b/helpers/bumper.py @@ -20,7 +20,7 @@ os.chdir(os.path.join(os.path.dirname(__file__), "..")) versions = { - 7: os.environ.get("BUMPER_VERSION_7", "7.8.0-SNAPSHOT"), + 7: os.environ.get("BUMPER_VERSION_7", "7.8.0"), } chart_version = versions[7] diff --git a/helpers/examples.mk b/helpers/examples.mk index 4b8da463c..6e141fe35 100644 --- a/helpers/examples.mk +++ b/helpers/examples.mk @@ -1,7 +1,7 @@ GOSS_VERSION := v0.3.6 GOSS_FILE ?= goss.yaml GOSS_SELECTOR ?= release=$(RELEASE) -STACK_VERSION := 7.8.0-SNAPSHOT +STACK_VERSION := 7.8.0 .PHONY: help help: ## Display this help diff --git a/kibana/Chart.yaml b/kibana/Chart.yaml index 722b9688f..32cc4d826 100755 --- a/kibana/Chart.yaml +++ b/kibana/Chart.yaml @@ -5,8 +5,8 @@ maintainers: - email: helm-charts@elastic.co name: Elastic name: kibana -version: 7.8.0-SNAPSHOT -appVersion: 7.8.0-SNAPSHOT +version: 7.8.0 +appVersion: 7.8.0 sources: - https://github.com/elastic/kibana icon: https://helm.elastic.co/icons/kibana.png diff --git a/kibana/README.md b/kibana/README.md index 8153829af..718dfef8c 100644 --- a/kibana/README.md +++ b/kibana/README.md @@ -14,7 +14,7 @@ for released version. - [Requirements](#requirements) - [Installing](#installing) - [Install released version using Helm repository](#install-released-version-using-helm-repository) - - [Install development version using 7.8 branch and 7.8.0-SNAPSHOT versions](#install-development-version-using-78-branch-and-780-snapshot-versions) + - [Install development version using 7.8 branch and 7.8.0 versions](#install-development-version-using-78-branch-and-780-snapshot-versions) - [Upgrading](#upgrading) - [Usage notes](#usage-notes) - [Configuration](#configuration) @@ -41,7 +41,7 @@ See [supported configurations][] for more details. ## Installing -This chart is tested with the latest 7.8.0-SNAPSHOT versions. +This chart is tested with the latest 7.8.0 versions. ### Install released version using Helm repository @@ -51,7 +51,7 @@ This chart is tested with the latest 7.8.0-SNAPSHOT versions. * Install the latest 7.7 release: `helm install --name kibana elastic/kibana` -### Install development version using 7.8 branch and 7.8.0-SNAPSHOT versions +### Install development version using 7.8 branch and 7.8.0 versions * Clone the git repo: `git clone git@github.com:elastic/helm-charts.git` @@ -88,7 +88,7 @@ as a reference. They are also used in the automated testing of this chart. | `httpPort` | The http port that Kubernetes will use for the healthchecks and the service | `5601` | | `imagePullPolicy` | The Kubernetes [imagePullPolicy][]value | `IfNotPresent` | | `imagePullSecrets` | Configuration for [imagePullSecrets][] so that you can use a private registry for your image | `[]` | -| `imageTag` | The Kibana Docker image tag | `7.8.0-SNAPSHOT` | +| `imageTag` | The Kibana Docker image tag | `7.8.0` | | `image` | The Kibana Docker image | `docker.elastic.co/kibana/kibana` | | `ingress` | Configurable [ingress][] to expose the Kibana service. | see [values.yaml][] | | `kibanaConfig` | Allows you to add any config files in `/usr/share/kibana/config/` such as `kibana.yml` See [values.yaml][] for an example of the formatting | `{}` | diff --git a/kibana/examples/default/README.md b/kibana/examples/default/README.md index 26b70cc14..e2e8fa32d 100644 --- a/kibana/examples/default/README.md +++ b/kibana/examples/default/README.md @@ -1,6 +1,6 @@ # Default -This example deploy Kibana 7.8.0-SNAPSHOT using [default values][]. +This example deploy Kibana 7.8.0 using [default values][]. ## Usage diff --git a/kibana/examples/openshift/README.md b/kibana/examples/openshift/README.md index 8c511593b..e096e920d 100644 --- a/kibana/examples/openshift/README.md +++ b/kibana/examples/openshift/README.md @@ -1,6 +1,6 @@ # OpenShift -This example deploy Kibana 7.8.0-SNAPSHOT on [OpenShift][] using [custom values][]. +This example deploy Kibana 7.8.0 on [OpenShift][] using [custom values][]. ## Usage diff --git a/kibana/examples/oss/README.md b/kibana/examples/oss/README.md index f6f32380a..eb3f99c2c 100644 --- a/kibana/examples/oss/README.md +++ b/kibana/examples/oss/README.md @@ -1,6 +1,6 @@ # OSS -This example deploy Kibana 7.8.0-SNAPSHOT using [Kibana OSS][] version. +This example deploy Kibana 7.8.0 using [Kibana OSS][] version. ## Usage diff --git a/kibana/examples/security/README.md b/kibana/examples/security/README.md index 354626ee1..f1461a837 100644 --- a/kibana/examples/security/README.md +++ b/kibana/examples/security/README.md @@ -1,6 +1,6 @@ # Security -This example deploy Kibana 7.8.0-SNAPSHOT using authentication and TLS to connect to +This example deploy Kibana 7.8.0 using authentication and TLS to connect to Elasticsearch (see [values][]). diff --git a/kibana/values.yaml b/kibana/values.yaml index e357f4fc8..91021e27d 100755 --- a/kibana/values.yaml +++ b/kibana/values.yaml @@ -29,7 +29,7 @@ secretMounts: [] # subPath: kibana.keystore # optional image: "docker.elastic.co/kibana/kibana" -imageTag: "7.8.0-SNAPSHOT" +imageTag: "7.8.0" imagePullPolicy: "IfNotPresent" # additionals labels diff --git a/logstash/Chart.yaml b/logstash/Chart.yaml index 05e2de6ea..841f72d1f 100755 --- a/logstash/Chart.yaml +++ b/logstash/Chart.yaml @@ -5,8 +5,8 @@ maintainers: - email: helm-charts@elastic.co name: Elastic name: logstash -version: 7.8.0-SNAPSHOT -appVersion: 7.8.0-SNAPSHOT +version: 7.8.0 +appVersion: 7.8.0 sources: - https://github.com/elastic/logstash icon: https://helm.elastic.co/icons/logstash.png diff --git a/logstash/README.md b/logstash/README.md index 17b61c01f..8756ade3e 100644 --- a/logstash/README.md +++ b/logstash/README.md @@ -19,7 +19,7 @@ for released version. - [Requirements](#requirements) - [Installing](#installing) - [Install released version using Helm repository](#install-released-version-using-helm-repository) - - [Install development version using 7.8 branch and 7.8.0-SNAPSHOT versions](#install-development-version-using-78-branch-and-780-snapshot-versions) + - [Install development version using 7.8 branch and 7.8.0 versions](#install-development-version-using-78-branch-and-780-snapshot-versions) - [Upgrading](#upgrading) - [Usage notes](#usage-notes) - [Configuration](#configuration) @@ -43,7 +43,7 @@ See [supported configurations][] for more details. ## Installing -This chart is tested with the latest 7.8.0-SNAPSHOT versions. +This chart is tested with the latest 7.8.0 versions. ### Install released version using Helm repository @@ -53,7 +53,7 @@ This chart is tested with the latest 7.8.0-SNAPSHOT versions. * Install the latest 7.7 release: `helm install --name logstash elastic/logstash` -### Install development version using 7.8 branch and 7.8.0-SNAPSHOT versions +### Install development version using 7.8 branch and 7.8.0 versions * Clone the git repo: `git clone git@github.com:elastic/helm-charts.git` @@ -111,7 +111,7 @@ using `http.host: 127.0.0.1`, default probes should be disabled or overrided | `httpPort` | The http port that Kubernetes will use for the healthchecks and the service | `9600` | | `imagePullPolicy` | The Kubernetes [imagePullPolicy][] value | `IfNotPresent` | | `imagePullSecrets` | Configuration for [imagePullSecrets][] so that you can use a private registry for your image | `[]` | -| `imageTag` | The Logstash Docker image tag | `7.8.0-SNAPSHOT` | +| `imageTag` | The Logstash Docker image tag | `7.8.0` | | `image` | The Logstash Docker image | `docker.elastic.co/logstash/logstash` | | `labels` | Configurable [labels][] applied to all Logstash pods | `{}` | | `lifecycle` | Allows you to add lifecycle configuration. See [values.yaml][] for an example of the formatting | `{}` | diff --git a/logstash/examples/default/README.md b/logstash/examples/default/README.md index 07348bf93..36c959349 100644 --- a/logstash/examples/default/README.md +++ b/logstash/examples/default/README.md @@ -1,6 +1,6 @@ # Default -This example deploy Logstash 7.8.0-SNAPSHOT using [default values][]. +This example deploy Logstash 7.8.0 using [default values][]. ## Usage diff --git a/logstash/examples/elasticsearch/README.md b/logstash/examples/elasticsearch/README.md index b7ab22edc..8a7c29873 100644 --- a/logstash/examples/elasticsearch/README.md +++ b/logstash/examples/elasticsearch/README.md @@ -1,6 +1,6 @@ # Elasticsearch -This example deploy Logstash 7.8.0-SNAPSHOT which connects to Elasticsearch (see +This example deploy Logstash 7.8.0 which connects to Elasticsearch (see [values][]). diff --git a/logstash/examples/oss/README.md b/logstash/examples/oss/README.md index b7a83148e..2d5551fb2 100644 --- a/logstash/examples/oss/README.md +++ b/logstash/examples/oss/README.md @@ -1,6 +1,6 @@ # OSS -This example deploy Logstash 7.8.0-SNAPSHOT using [Logstash OSS][] version. +This example deploy Logstash 7.8.0 using [Logstash OSS][] version. ## Usage diff --git a/logstash/values.yaml b/logstash/values.yaml index 8fd6a4789..181f9e571 100755 --- a/logstash/values.yaml +++ b/logstash/values.yaml @@ -43,7 +43,7 @@ envFrom: [] secretMounts: [] image: "docker.elastic.co/logstash/logstash" -imageTag: "7.8.0-SNAPSHOT" +imageTag: "7.8.0" imagePullPolicy: "IfNotPresent" imagePullSecrets: [] diff --git a/metricbeat/Chart.yaml b/metricbeat/Chart.yaml index 1d42f81d0..c8eb88bfb 100755 --- a/metricbeat/Chart.yaml +++ b/metricbeat/Chart.yaml @@ -5,8 +5,8 @@ maintainers: - email: helm-charts@elastic.co name: Elastic name: metricbeat -version: 7.8.0-SNAPSHOT -appVersion: 7.8.0-SNAPSHOT +version: 7.8.0 +appVersion: 7.8.0 sources: - https://github.com/elastic/beats icon: https://helm.elastic.co/icons/beats.png diff --git a/metricbeat/README.md b/metricbeat/README.md index 2f44dfa97..c803739b6 100644 --- a/metricbeat/README.md +++ b/metricbeat/README.md @@ -14,7 +14,7 @@ for released version. - [Requirements](#requirements) - [Installing](#installing) - [Install released version using Helm repository](#install-released-version-using-helm-repository) - - [Install development version using 7.8 branch and 7.8.0-SNAPSHOT versions](#install-development-version-using-78-branch-and-780-snapshot-versions) + - [Install development version using 7.8 branch and 7.8.0 versions](#install-development-version-using-78-branch-and-780-snapshot-versions) - [Upgrading](#upgrading) - [Usage notes](#usage-notes) - [Configuration](#configuration) @@ -40,7 +40,7 @@ See [supported configurations][] for more details. ## Installing -This chart is tested with the latest 7.8.0-SNAPSHOT versions. +This chart is tested with the latest 7.8.0 versions. ### Install released version using Helm repository @@ -50,7 +50,7 @@ This chart is tested with the latest 7.8.0-SNAPSHOT versions. * Install the latest 7.7 release: `helm install --name metricbeat elastic/metricbeat` -### Install development version using 7.8 branch and 7.8.0-SNAPSHOT versions +### Install development version using 7.8 branch and 7.8.0 versions * Clone the git repo: `git clone git@github.com:elastic/helm-charts.git` @@ -116,7 +116,7 @@ as a reference. They are also used in the automated testing of this chart. | `hostPathRoot` | Fully-qualified [hostPath][] that will be used to persist Metricbeat registry data | `/var/lib` | | `imagePullPolicy` | The Kubernetes [imagePullPolicy][] value | `IfNotPresent` | | `imagePullSecrets` | Configuration for [imagePullSecrets][] so that you can use a private registry for your image | `[]` | -| `imageTag` | The Metricbeat Docker image tag | `7.8.0-SNAPSHOT` | +| `imageTag` | The Metricbeat Docker image tag | `7.8.0` | | `image` | The Metricbeat Docker image | `docker.elastic.co/beats/metricbeat` | | `labels` | Configurable [labels][] applied to all Metricbeat pods | `{}` | | `livenessProbe` | Parameters to pass to liveness [probe][] checks for values such as timeouts and thresholds | see [values.yaml][] | diff --git a/metricbeat/examples/default/README.md b/metricbeat/examples/default/README.md index a152a3550..7513f7491 100644 --- a/metricbeat/examples/default/README.md +++ b/metricbeat/examples/default/README.md @@ -1,6 +1,6 @@ # Default -This example deploy Metricbeat 7.8.0-SNAPSHOT using [default values][]. +This example deploy Metricbeat 7.8.0 using [default values][]. ## Usage diff --git a/metricbeat/examples/oss/README.md b/metricbeat/examples/oss/README.md index d5d964856..85ff6d608 100644 --- a/metricbeat/examples/oss/README.md +++ b/metricbeat/examples/oss/README.md @@ -1,6 +1,6 @@ # OSS -This example deploy Metricbeat 7.8.0-SNAPSHOT using [Metricbeat OSS][] version. +This example deploy Metricbeat 7.8.0 using [Metricbeat OSS][] version. ## Usage diff --git a/metricbeat/examples/security/README.md b/metricbeat/examples/security/README.md index 9c1a553b7..0255dc291 100644 --- a/metricbeat/examples/security/README.md +++ b/metricbeat/examples/security/README.md @@ -1,6 +1,6 @@ # Security -This example deploy Metricbeat 7.8.0-SNAPSHOT using authentication and TLS to connect to +This example deploy Metricbeat 7.8.0 using authentication and TLS to connect to Elasticsearch (see [values][]). diff --git a/metricbeat/values.yaml b/metricbeat/values.yaml index 783a09bb8..8aaa8735c 100755 --- a/metricbeat/values.yaml +++ b/metricbeat/values.yaml @@ -159,7 +159,7 @@ extraInitContainers: "" hostPathRoot: /var/lib image: "docker.elastic.co/beats/metricbeat" -imageTag: "7.8.0-SNAPSHOT" +imageTag: "7.8.0" imagePullPolicy: "IfNotPresent" imagePullSecrets: [] From 0ddfef05ce1dc7183c2fca049077d32b475200a5 Mon Sep 17 00:00:00 2001 From: Julien Mailleret <8582351+jmlrt@users.noreply.github.com> Date: Thu, 18 Jun 2020 15:56:38 +0200 Subject: [PATCH 44/44] [meta] remove dev version mention --- apm-server/README.md | 20 +++----------------- elasticsearch/README.md | 21 ++++----------------- filebeat/README.md | 20 +++----------------- kibana/README.md | 21 ++++----------------- logstash/README.md | 20 +++----------------- logstash/examples/security/README.md | 2 +- logstash/examples/security/test/goss.yaml | 2 +- metricbeat/README.md | 21 ++++----------------- 8 files changed, 23 insertions(+), 104 deletions(-) diff --git a/apm-server/README.md b/apm-server/README.md index 1ff77832e..3dde0a6ec 100644 --- a/apm-server/README.md +++ b/apm-server/README.md @@ -8,9 +8,6 @@ The design and code is less mature than official GA features and is being provided as-is with no warranties. Alpha features are not subject to the support SLA of official GA features (see [supported configurations][] for more details). -**Warning**: This branch is used for development, please use [7.7.1][] release -for released version. - @@ -18,8 +15,6 @@ for released version. - [Requirements](#requirements) - [Installing](#installing) - - [Install released version using Helm repository](#install-released-version-using-helm-repository) - - [Install development version using 7.8 branch and 7.8.0 versions](#install-development-version-using-78-branch-and-780-snapshot-versions) - [Upgrading](#upgrading) - [Usage notes](#usage-notes) - [Configuration](#configuration) @@ -43,21 +38,13 @@ See [supported configurations][] for more details. ## Installing -This chart is tested with the latest 7.8.0 versions. - -### Install released version using Helm repository +This chart is tested with 7.8.0 version. * Add the Elastic Helm charts repo: `helm repo add elastic https://helm.elastic.co` -* Install the latest 7.7 release: -`helm install --name apm-server elastic/apm-server` - -### Install development version using 7.8 branch and 7.8.0 versions - -* Clone the git repo: `git clone git@github.com:elastic/helm-charts.git` - -* Install it: `helm install --name apm-server ./helm-charts/apm-server` +* Install 7.8.0 release: +`helm install --name apm-server --version 7.8.0 elastic/apm-server` ## Upgrading @@ -143,7 +130,6 @@ Please check [CONTRIBUTING.md][] before any contribution or for any questions about our development and testing process. -[7.7.1]: https://github.com/elastic/helm-charts/blob/7.7.1/apm-server/README.md [BREAKING_CHANGES.md]: https://github.com/elastic/helm-charts/blob/master/BREAKING_CHANGES.md [CHANGELOG.md]: https://github.com/elastic/helm-charts/blob/master/CHANGELOG.md [CONTRIBUTING.md]: https://github.com/elastic/helm-charts/blob/master/CONTRIBUTING.md diff --git a/elasticsearch/README.md b/elasticsearch/README.md index 03369de20..31006234a 100644 --- a/elasticsearch/README.md +++ b/elasticsearch/README.md @@ -3,9 +3,6 @@ This Helm chart is a lightweight way to configure and run our official [Elasticsearch Docker image][]. -**Warning**: This branch is used for development, please use [7.7.1][] release -for released version. - @@ -13,8 +10,6 @@ for released version. - [Requirements](#requirements) - [Installing](#installing) - - [Install released version using Helm repository](#install-released-version-using-helm-repository) - - [Install development version using 7.8 branch and 7.8.0 versions](#install-development-version-using-78-branch-and-780-snapshot-versions) - [Upgrading](#upgrading) - [Usage notes](#usage-notes) - [Configuration](#configuration) @@ -51,23 +46,16 @@ default settings. All of these settings are configurable. See [supported configurations][] for more details. -## Installing -This chart is tested with the latest 7.8.0 versions. +## Installing -### Install released version using Helm repository +This chart is tested with 7.8.0 version. * Add the Elastic Helm charts repo: `helm repo add elastic https://helm.elastic.co` -* Install the latest 7.7 release: -`helm install --name elasticsearch elastic/elasticsearch` - -### Install development version using 7.8 branch and 7.8.0 versions - -* Clone the git repo: `git clone git@github.com:elastic/helm-charts.git` - -* Install it: `helm install --name elasticsearch ./helm-charts/elasticsearch` +* Install 7.8.0 release: +`helm install --name apm-server --version 7.8.0 elastic/elasticsearch` ## Upgrading @@ -385,7 +373,6 @@ about our development and testing process. [#63]: https://github.com/elastic/helm-charts/issues/63 -[7.7.1]: https://github.com/elastic/helm-charts/blob/7.7.1/elasticsearch/README.md [BREAKING_CHANGES.md]: https://github.com/elastic/helm-charts/blob/master/BREAKING_CHANGES.md [CHANGELOG.md]: https://github.com/elastic/helm-charts/blob/master/CHANGELOG.md [CONTRIBUTING.md]: https://github.com/elastic/helm-charts/blob/master/CONTRIBUTING.md diff --git a/filebeat/README.md b/filebeat/README.md index ba633b023..5922ff7da 100644 --- a/filebeat/README.md +++ b/filebeat/README.md @@ -3,9 +3,6 @@ This Helm chart is a lightweight way to configure and run our official [Filebeat Docker image][]. -**Warning**: This branch is used for development, please use [7.7.1][] release -for released version. - @@ -13,8 +10,6 @@ for released version. - [Requirements](#requirements) - [Installing](#installing) - - [Install released version using Helm repository](#install-released-version-using-helm-repository) - - [Install development version using 7.8 branch and 7.8.0 versions](#install-development-version-using-78-branch-and-780-snapshot-versions) - [Upgrading](#upgrading) - [Usage notes](#usage-notes) - [Configuration](#configuration) @@ -39,21 +34,13 @@ See [supported configurations][] for more details. ## Installing -This chart is tested with the latest 7.8.0 versions. - -### Install released version using Helm repository +This chart is tested with 7.8.0 version. * Add the Elastic Helm charts repo: `helm repo add elastic https://helm.elastic.co` -* Install the latest 7.7 release: -`helm install --name filebeat elastic/filebeat` - -### Install development version using 7.8 branch and 7.8.0 versions - -* Clone the git repo: `git clone git@github.com:elastic/helm-charts.git` - -* Install it: `helm install --name filebeat ./helm-charts/filebeat` +* Install 7.8.0 release: +`helm install --name apm-server --version 7.8.0 elastic/filebeat` ## Upgrading @@ -158,7 +145,6 @@ Please check [CONTRIBUTING.md][] before any contribution or for any questions about our development and testing process. -[7.7.1]: https://github.com/elastic/helm-charts/blob/7.7.1/filebeat/README.md [BREAKING_CHANGES.md]: https://github.com/elastic/helm-charts/blob/master/BREAKING_CHANGES.md [CHANGELOG.md]: https://github.com/elastic/helm-charts/blob/master/CHANGELOG.md [CONTRIBUTING.md]: https://github.com/elastic/helm-charts/blob/master/CONTRIBUTING.md diff --git a/kibana/README.md b/kibana/README.md index 718dfef8c..f8ff28723 100644 --- a/kibana/README.md +++ b/kibana/README.md @@ -3,9 +3,6 @@ This Helm chart is a lightweight way to configure and run our official [Kibana Docker image][]. -**Warning**: This branch is used for development, please use [7.7.1][] release -for released version. - @@ -13,8 +10,6 @@ for released version. - [Requirements](#requirements) - [Installing](#installing) - - [Install released version using Helm repository](#install-released-version-using-helm-repository) - - [Install development version using 7.8 branch and 7.8.0 versions](#install-development-version-using-78-branch-and-780-snapshot-versions) - [Upgrading](#upgrading) - [Usage notes](#usage-notes) - [Configuration](#configuration) @@ -39,23 +34,16 @@ for released version. See [supported configurations][] for more details. -## Installing -This chart is tested with the latest 7.8.0 versions. +## Installing -### Install released version using Helm repository +This chart is tested with 7.8.0 version. * Add the Elastic Helm charts repo: `helm repo add elastic https://helm.elastic.co` -* Install the latest 7.7 release: -`helm install --name kibana elastic/kibana` - -### Install development version using 7.8 branch and 7.8.0 versions - -* Clone the git repo: `git clone git@github.com:elastic/helm-charts.git` - -* Install it: `helm install --name kibana ./helm-charts/kibana` +* Install 7.8.0 release: +`helm install --name apm-server --version 7.8.0 elastic/kibana` ## Upgrading @@ -200,7 +188,6 @@ Please check [CONTRIBUTING.md][] before any contribution or for any questions about our development and testing process. -[7.7.1]: https://github.com/elastic/helm-charts/blob/7.7.1/kibana/README.md [BREAKING_CHANGES.md]: https://github.com/elastic/helm-charts/blob/master/BREAKING_CHANGES.md [CHANGELOG.md]: https://github.com/elastic/helm-charts/blob/master/CHANGELOG.md [CONTRIBUTING.md]: https://github.com/elastic/helm-charts/blob/master/CONTRIBUTING.md diff --git a/logstash/README.md b/logstash/README.md index 8756ade3e..c7a20ab59 100644 --- a/logstash/README.md +++ b/logstash/README.md @@ -8,9 +8,6 @@ The design and code is less mature than official GA features and is being provided as-is with no warranties. Alpha features are not subject to the support SLA of official GA features (see [supported configurations][] for more details). -**Warning**: This branch is used for development, please use [7.7.1][] release -for released version. - @@ -18,8 +15,6 @@ for released version. - [Requirements](#requirements) - [Installing](#installing) - - [Install released version using Helm repository](#install-released-version-using-helm-repository) - - [Install development version using 7.8 branch and 7.8.0 versions](#install-development-version-using-78-branch-and-780-snapshot-versions) - [Upgrading](#upgrading) - [Usage notes](#usage-notes) - [Configuration](#configuration) @@ -43,21 +38,13 @@ See [supported configurations][] for more details. ## Installing -This chart is tested with the latest 7.8.0 versions. - -### Install released version using Helm repository +This chart is tested with 7.8.0 version. * Add the Elastic Helm charts repo: `helm repo add elastic https://helm.elastic.co` -* Install the latest 7.7 release: -`helm install --name logstash elastic/logstash` - -### Install development version using 7.8 branch and 7.8.0 versions - -* Clone the git repo: `git clone git@github.com:elastic/helm-charts.git` - -* Install it: `helm install --name logstash ./helm-charts/logstash` +* Install 7.8.0 release: +`helm install --name apm-server --version 7.8.0 elastic/logstash` ## Upgrading @@ -184,7 +171,6 @@ Please check [CONTRIBUTING.md][] before any contribution or for any questions about our development and testing process. -[7.7.1]: https://github.com/elastic/helm-charts/blob/7.7.1/logstash/README.md [BREAKING_CHANGES.md]: https://github.com/elastic/helm-charts/blob/master/BREAKING_CHANGES.md [CHANGELOG.md]: https://github.com/elastic/helm-charts/blob/master/CHANGELOG.md [CONTRIBUTING.md]: https://github.com/elastic/helm-charts/blob/master/CONTRIBUTING.md diff --git a/logstash/examples/security/README.md b/logstash/examples/security/README.md index 0f9af83dd..a041ca682 100644 --- a/logstash/examples/security/README.md +++ b/logstash/examples/security/README.md @@ -1,6 +1,6 @@ # Security -This example deploy Logstash 7.7.1 which connects to Elasticsearch using TLS +This example deploy Logstash 7.8.0 which connects to Elasticsearch using TLS (see [values][]). diff --git a/logstash/examples/security/test/goss.yaml b/logstash/examples/security/test/goss.yaml index 0102ad0d1..2bf128743 100644 --- a/logstash/examples/security/test/goss.yaml +++ b/logstash/examples/security/test/goss.yaml @@ -22,7 +22,7 @@ http: timeout: 2000 body: - '"host" : "helm-logstash-security-logstash-0"' - - '"version" : "7.7.1"' + - '"version" : "7.8.0"' - '"http_address" : "0.0.0.0:9600"' - '"name" : "helm-logstash-security-logstash-0"' - '"status" : "green"' diff --git a/metricbeat/README.md b/metricbeat/README.md index c803739b6..34b8d6691 100644 --- a/metricbeat/README.md +++ b/metricbeat/README.md @@ -3,9 +3,6 @@ This Helm chart is a lightweight way to configure and run our official [Metricbeat Docker image][]. -**Warning**: This branch is used for development, please use [7.7.1][] release -for released version. - @@ -13,8 +10,6 @@ for released version. - [Requirements](#requirements) - [Installing](#installing) - - [Install released version using Helm repository](#install-released-version-using-helm-repository) - - [Install development version using 7.8 branch and 7.8.0 versions](#install-development-version-using-78-branch-and-780-snapshot-versions) - [Upgrading](#upgrading) - [Usage notes](#usage-notes) - [Configuration](#configuration) @@ -38,23 +33,16 @@ for released version. See [supported configurations][] for more details. -## Installing -This chart is tested with the latest 7.8.0 versions. +## Installing -### Install released version using Helm repository +This chart is tested with 7.8.0 version. * Add the Elastic Helm charts repo: `helm repo add elastic https://helm.elastic.co` -* Install the latest 7.7 release: -`helm install --name metricbeat elastic/metricbeat` - -### Install development version using 7.8 branch and 7.8.0 versions - -* Clone the git repo: `git clone git@github.com:elastic/helm-charts.git` - -* Install it: `helm install --name metricbeat ./helm-charts/metricbeat` +* Install 7.8.0 release: +`helm install --name apm-server --version 7.8.0 elastic/metricbeat` ## Upgrading @@ -198,7 +186,6 @@ about our development and testing process. [#471]: https://github.com/elastic/helm-charts/pull/471 -[7.7.1]: https://github.com/elastic/helm-charts/blob/7.7.1/metricbeat/README.md [BREAKING_CHANGES.md]: https://github.com/elastic/helm-charts/blob/master/BREAKING_CHANGES.md [CHANGELOG.md]: https://github.com/elastic/helm-charts/blob/master/CHANGELOG.md [CONTRIBUTING.md]: https://github.com/elastic/helm-charts/blob/master/CONTRIBUTING.md