diff --git a/elasticsearch/Chart.yaml b/elasticsearch/Chart.yaml index 29883446e..7558aad7c 100755 --- a/elasticsearch/Chart.yaml +++ b/elasticsearch/Chart.yaml @@ -4,8 +4,8 @@ maintainers: - email: helm-charts@elastic.co name: Elastic name: elasticsearch -version: 6.6.2-alpha1 -appVersion: 6.6.2 +version: 7.0.0-alpha1 +appVersion: 7.0.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 89f523fed..c74039360 100644 --- a/elasticsearch/README.md +++ b/elasticsearch/README.md @@ -7,7 +7,7 @@ This helm chart is a lightweight way to configure and run our official [Elastics ## Requirements * [Helm](https://helm.sh/) >= 2.8.0 -* Kubernetes 1.8/1.9/1.10/1.11/1.12. +* 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 @@ -33,9 +33,25 @@ If you currently have a cluster deployed with the [helm/charts stable](https://g ``` * Install it ``` - helm install --name elasticsearch elastic/elasticsearch --version 6.6.2-alpha1 + helm install --name elasticsearch elastic/elasticsearch --version 7.0.0-alpha1 ``` +## Compatibility + +This chart is tested with the latest supported versions. The currently tested versions are: + +| 5.x | 6.x | 7.x | +| ------ | ----- | ----- | +| 5.6.16 | 6.7.1 | 7.0.0 | + +Examples of installing older major versions can be found in the [examples](./examples) directory. + +While only the latest releases are tested, it is possible to easily install old or new releases by overriding the `imageTag`. To install version `7.0.0` of Elasticsearch it would look like this: + +``` +helm install --name elasticsearch elastic/elasticsearch --set imageTag=7.0.0 +``` + ## Configuration @@ -47,7 +63,7 @@ If you currently have a cluster deployed with the [helm/charts stable](https://g | `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. Will set `discovery.zen.minimum_master_nodes` by default and `cluster.initial_master_nodes` for versions >= 7 | `6` | +| `esMajorVersion` | Used to set major version specific configuration | `7` | | `esConfig` | Allows you to add any config files in `/usr/share/elasticsearch/config/` such as `elasticsearch.yml` and `log4j2.properties`. See [values.yaml](./values.yaml) for an example of the formatting. | `{}` | | `extraEnvs` | Extra [environment variables](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config) which will be appended to the `env:` definition for the container | `{}` | | `extraVolumes` | Additional volumes to be passed to the `tpl` function | | @@ -55,15 +71,15 @@ If you currently have a cluster deployed with the [helm/charts stable](https://g | `extraInitContainers` | Additional init containers to be passed to the `tpl` function | | | `secretMounts` | Allows you easily mount a secret as a file inside the statefulset. Useful for mounting certificates and other secrets. See [values.yaml](./values.yaml) for an example | `{}` | | `image` | The Elasticsearch docker image | `docker.elastic.co/elasticsearch/elasticsearch` | -| `imageTag` | The Elasticsearch docker image tag | `6.6.2` | +| `imageTag` | The Elasticsearch docker image tag | `7.0.0` | | `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 | `{}` | | `esJavaOpts` | [Java options](https://www.elastic.co/guide/en/elasticsearch/reference/current/jvm-options.html) for Elasticsearch. This is where you should configure the [jvm heap size](https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html) | `-Xmx1g -Xms1g` | | `resources` | Allows you to set the [resources](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/) for the statefulset | `requests.cpu: 100m`
`requests.memory: 2Gi`
`limits.cpu: 1000m`
`limits.memory: 2Gi` | | `initResources` | Allows you to set the [resources](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/) for the initContainer in the statefulset | {} | | `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` | `{}` | +| `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` | `{}` | | `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) | `{}` | diff --git a/elasticsearch/examples/5.x/test/goss.yaml b/elasticsearch/examples/5.x/test/goss.yaml index 0ef004651..f9afdeb74 100644 --- a/elasticsearch/examples/5.x/test/goss.yaml +++ b/elasticsearch/examples/5.x/test/goss.yaml @@ -15,7 +15,7 @@ http: username: '{{ .Env.ELASTIC_USERNAME }}' password: '{{ .Env.ELASTIC_PASSWORD }}' body: - - '"number" : "5.6.15"' + - '"number" : "5.6.16"' - '"cluster_name" : "fivex"' - '"name" : "fivex-master-0"' - 'You Know, for Search' diff --git a/elasticsearch/examples/5.x/values.yaml b/elasticsearch/examples/5.x/values.yaml index 57824ca77..6736b650e 100644 --- a/elasticsearch/examples/5.x/values.yaml +++ b/elasticsearch/examples/5.x/values.yaml @@ -1,7 +1,7 @@ --- clusterName: "fivex" -imageTag: "5.6.15" +imageTag: "5.6.16" esMajorVersion: 5 extraEnvs: diff --git a/elasticsearch/examples/7.0.x/Makefile b/elasticsearch/examples/6.x/Makefile similarity index 93% rename from elasticsearch/examples/7.0.x/Makefile rename to elasticsearch/examples/6.x/Makefile index f334eb826..2c3811c73 100644 --- a/elasticsearch/examples/7.0.x/Makefile +++ b/elasticsearch/examples/6.x/Makefile @@ -1,7 +1,7 @@ default: test include ../../../helpers/examples.mk -RELEASE := helm-es-seven +RELEASE := helm-es-six install: helm upgrade --wait --timeout=600 --install $(RELEASE) --values ./values.yaml ../../ ; \ diff --git a/elasticsearch/examples/7.0.x/test/goss.yaml b/elasticsearch/examples/6.x/test/goss.yaml similarity index 73% rename from elasticsearch/examples/7.0.x/test/goss.yaml rename to elasticsearch/examples/6.x/test/goss.yaml index 67958d3e7..bb7289fe9 100644 --- a/elasticsearch/examples/7.0.x/test/goss.yaml +++ b/elasticsearch/examples/6.x/test/goss.yaml @@ -11,7 +11,7 @@ http: status: 200 timeout: 2000 body: - - '"number" : "7.0.0"' - - '"cluster_name" : "seven"' - - '"name" : "seven-master-0"' + - '"number" : "6.7.1"' + - '"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 new file mode 100644 index 000000000..1109970dc --- /dev/null +++ b/elasticsearch/examples/6.x/values.yaml @@ -0,0 +1,5 @@ +--- + +clusterName: "six" +imageTag: "6.7.1" +esMajorVersion: 6 diff --git a/elasticsearch/examples/7.0.x/values.yaml b/elasticsearch/examples/7.0.x/values.yaml deleted file mode 100644 index c08bc7b7f..000000000 --- a/elasticsearch/examples/7.0.x/values.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- - -clusterName: "seven" -imageTag: "7.0.0" -esMajorVersion: 7 diff --git a/elasticsearch/examples/7.1.x/Makefile b/elasticsearch/examples/7.1.x/Makefile deleted file mode 100644 index fc047d109..000000000 --- a/elasticsearch/examples/7.1.x/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -default: test -include ../../../helpers/examples.mk - -RELEASE := helm-es-seven-one - -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/7.1.x/test/goss.yaml b/elasticsearch/examples/7.1.x/test/goss.yaml deleted file mode 100644 index 3aac68b17..000000000 --- a/elasticsearch/examples/7.1.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" : "7.1.0-SNAPSHOT"' - - '"cluster_name" : "seven-one"' - - '"name" : "seven-one-master-0"' - - 'You Know, for Search' diff --git a/elasticsearch/examples/7.1.x/values.yaml b/elasticsearch/examples/7.1.x/values.yaml deleted file mode 100644 index 2fe0faa5d..000000000 --- a/elasticsearch/examples/7.1.x/values.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- - -clusterName: "seven-one" -masterService: "seven-one-master" -imageTag: "7.1.0-SNAPSHOT" -esMajorVersion: 7 diff --git a/elasticsearch/examples/default/test/goss.yaml b/elasticsearch/examples/default/test/goss.yaml index 6079b6d06..20506f13b 100644 --- a/elasticsearch/examples/default/test/goss.yaml +++ b/elasticsearch/examples/default/test/goss.yaml @@ -21,7 +21,7 @@ http: status: 200 timeout: 2000 body: - - '"number" : "6.6.2"' + - '"number" : "7.0.0"' - '"cluster_name" : "elasticsearch"' - '"name" : "elasticsearch-master-0"' - 'You Know, for Search' @@ -34,7 +34,7 @@ file: group: elasticsearch filetype: directory -mount: +mount: /usr/share/elasticsearch/data: exists: true diff --git a/elasticsearch/examples/migration/client.yml b/elasticsearch/examples/migration/client.yml index e7e6cdc60..d5dd372ac 100644 --- a/elasticsearch/examples/migration/client.yml +++ b/elasticsearch/examples/migration/client.yml @@ -5,6 +5,8 @@ replicas: 2 clusterName: "elasticsearch" nodeGroup: "client" +esMajorVersion: 6 + roles: master: "false" ingest: "false" diff --git a/elasticsearch/examples/migration/data.yml b/elasticsearch/examples/migration/data.yml index ae0b8ab09..eedcbb063 100644 --- a/elasticsearch/examples/migration/data.yml +++ b/elasticsearch/examples/migration/data.yml @@ -2,6 +2,8 @@ replicas: 2 +esMajorVersion: 6 + extraEnvs: - name: discovery.zen.ping.unicast.hosts value: "my-release-elasticsearch-discovery" diff --git a/elasticsearch/examples/migration/master.yml b/elasticsearch/examples/migration/master.yml index ac2e2a5dc..3e3a2f172 100644 --- a/elasticsearch/examples/migration/master.yml +++ b/elasticsearch/examples/migration/master.yml @@ -4,6 +4,8 @@ # one at a time whilst always keeping 3 masters running replicas: 1 +esMajorVersion: 6 + extraEnvs: - name: discovery.zen.ping.unicast.hosts value: "my-release-elasticsearch-discovery" diff --git a/elasticsearch/examples/security/test/goss.yaml b/elasticsearch/examples/security/test/goss.yaml index e6d3cd29a..6a4841af7 100644 --- a/elasticsearch/examples/security/test/goss.yaml +++ b/elasticsearch/examples/security/test/goss.yaml @@ -17,7 +17,6 @@ http: username: '{{ .Env.ELASTIC_USERNAME }}' password: '{{ .Env.ELASTIC_PASSWORD }}' body: - - '"number" : "6.6.2"' - '"cluster_name" : "security"' - '"name" : "security-master-0"' - 'You Know, for Search' diff --git a/elasticsearch/tests/elasticsearch_test.py b/elasticsearch/tests/elasticsearch_test.py index 1606a297e..428e398a3 100755 --- a/elasticsearch/tests/elasticsearch_test.py +++ b/elasticsearch/tests/elasticsearch_test.py @@ -48,8 +48,10 @@ def test_defaults(): } }, { - 'name': 'discovery.zen.minimum_master_nodes', - 'value': '2' + 'name': 'cluster.initial_master_nodes', + 'value': uname + '-0,' + + uname + '-1,' + + uname + '-2,' }, { 'name': 'discovery.zen.ping.unicast.hosts', diff --git a/elasticsearch/values.yaml b/elasticsearch/values.yaml index 6e12f7397..57ebe9f47 100755 --- a/elasticsearch/values.yaml +++ b/elasticsearch/values.yaml @@ -16,7 +16,7 @@ roles: replicas: 3 minimumMasterNodes: 2 -esMajorVersion: 6 +esMajorVersion: 7 # Allows you to add any config files in /usr/share/elasticsearch/config/ # such as elasticsearch.yml and log4j2.properties @@ -43,7 +43,7 @@ secretMounts: [] # path: /usr/share/elasticsearch/config/certs image: "docker.elastic.co/elasticsearch/elasticsearch" -imageTag: "6.6.2" +imageTag: "7.0.0" imagePullPolicy: "IfNotPresent" podAnnotations: {} @@ -78,16 +78,16 @@ volumeClaimTemplate: persistence: annotations: {} -extraVolumes: | +extraVolumes: [] # - name: extras # emptyDir: {} -extraVolumeMounts: | +extraVolumeMounts: [] # - name: extras # mountPath: /usr/share/extras # readOnly: true -extraInitContainers: | +extraInitContainers: [] # - name: do-something # image: busybox # command: ['do', 'something'] diff --git a/helpers/bumper.py b/helpers/bumper.py new file mode 100755 index 000000000..1d0e78142 --- /dev/null +++ b/helpers/bumper.py @@ -0,0 +1,30 @@ +#!/usr/bin/env python2 +import re +import os +import glob +import subprocess +import fileinput + +os.chdir('../') + +versions = { + 5: '5.6.16', + 6: '6.7.1', + 7: '7.0.0', +} + +file_patterns = [ + '*/examples/*/test/goss.y*ml', + '*/examples/*/*.y*ml', + '*/README.md', + '*/values.y*ml', + '*/Chart.y*ml', +] + +for major, version in versions.iteritems(): + r = re.compile(r"{0}\.[0-9]*\.[0-9]*".format(major)) + for pattern in file_patterns: + for f in glob.glob(pattern): + print(f) + for line in fileinput.input([f], inplace=True): + print r.sub(version, line.rstrip()) diff --git a/helpers/matrix.yml b/helpers/matrix.yml index 0592f6c52..7bbc177e5 100644 --- a/helpers/matrix.yml +++ b/helpers/matrix.yml @@ -5,13 +5,13 @@ ES_SUITE: - default - multi - security - - 7.0.x - 5.x + - 6.x KIBANA_SUITE: - default - security - - 7.0.x - 5.x + - 6.x KUBERNETES_VERSION: - '1.10' - '1.11' diff --git a/helpers/terraform/Dockerfile b/helpers/terraform/Dockerfile index 7ebd42dee..697a4ebae 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.10.7 -ENV HELM_VERSION=2.8.2 +ENV HELM_VERSION=2.13.1 RUN yum -y install \ make \ diff --git a/kibana/Chart.yaml b/kibana/Chart.yaml index ab76430a6..6a24c30d8 100755 --- a/kibana/Chart.yaml +++ b/kibana/Chart.yaml @@ -4,8 +4,8 @@ maintainers: - email: helm-charts@elastic.co name: Elastic name: kibana -version: 6.6.2-alpha1 -appVersion: 6.6.2 +version: 7.0.0-alpha1 +appVersion: 7.0.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 2cf003f02..b0b757361 100644 --- a/kibana/README.md +++ b/kibana/README.md @@ -6,8 +6,8 @@ This helm chart is a lightweight way to configure and run our official [Kibana d ## Requirements -* Kubernetes 1.8/1.9/1.10/1.11/1.12 -* [Helm](https://helm.sh/) +* Kubernetes >= 1.8 +* [Helm](https://helm.sh/) >= 2.8.0 ## Installing @@ -17,26 +17,42 @@ This helm chart is a lightweight way to configure and run our official [Kibana d ``` * Install it ``` - helm install --name kibana elastic/kibana --version 6.6.2-alpha1 + helm install --name kibana elastic/kibana --version 7.0.0-alpha1 ``` +## Compatibility + +This chart is tested with the latest supported versions. The currently tested versions are: + +| 5.x | 6.x | 7.x | +| ------ | ----- | ----- | +| 5.6.16 | 6.7.1 | 7.0.0 | + +Examples of installing older major versions can be found in the [examples](./examples) directory. + +While only the latest releases are tested, it is possible to easily install old or new releases by overriding the `imageTag`. To install version `7.0.0` of Kibana it would look like this: + +``` +helm install --name kibana elastic/kibana --set imageTag=7.0.0 +``` + ## Configuration | Parameter | Description | Default | -|---------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------| -| `elasticsearchURL` | The URL used to connect to Elasticsearch. Deprecated in Kibana 7.0.0 and up. -| `elasticsearchHosts` | The URLs used to connect to Elasticsearch. Supported in Kibana 6.6.0 and up. | `http://elasticsearch-master:9200` | +| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | +| `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 | `{}` | | `secretMounts` | Allows you easily mount a secret as a file inside the deployment. Useful for mounting certificates and other secrets. See [values.yaml](./values.yaml) for an example | `{}` | | `image` | The Kibana docker image | `docker.elastic.co/kibana/kibana` | -| `imageTag` | The Kibana docker image tag | `6.6.2` | +| `imageTag` | The Kibana docker image tag | `7.0.0` | | `imagePullPolicy` | The Kubernetes [imagePullPolicy](https://kubernetes.io/docs/concepts/containers/images/#updating-images) value | `IfNotPresent` | | `resources` | Allows you to set the [resources](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/) for the statefulset | `requests.cpu: 100m`
`requests.memory: 2Gi`
`limits.cpu: 1000m`
`limits.memory: 2Gi` | | `protocol` | The protocol that will be used for the readinessProbe. Change this to `https` if you have `server.ssl.enabled: true` set | `http` | | `kibanaConfig` | Allows you to add any config files in `/usr/share/kibana/config/` such as `kibana.yml`. See [values.yaml](./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 | `{}` | -| `serviceAccount` | Allows you to overwite the "default" [serviceAccount](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/) for the pod | `[]` | +| `serviceAccount` | Allows you to overwrite the "default" [serviceAccount](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/) for the pod | `[]` | | `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 Kibana instances 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" | `hard` | | `httpPort` | The http port that Kubernetes will use for the healthchecks and the service. | `5601` | diff --git a/kibana/examples/5.x/test/goss.yaml b/kibana/examples/5.x/test/goss.yaml index f05294ee2..0756b9f4a 100644 --- a/kibana/examples/5.x/test/goss.yaml +++ b/kibana/examples/5.x/test/goss.yaml @@ -3,7 +3,7 @@ http: status: 200 timeout: 2000 body: - - '"version":"5.6.15"' + - '"version":"5.6.16"' username: '{{ .Env.ELASTICSEARCH_USERNAME }}' password: '{{ .Env.ELASTICSEARCH_PASSWORD }}' diff --git a/kibana/examples/5.x/values.yml b/kibana/examples/5.x/values.yml index 6a0d67362..226dd60f6 100644 --- a/kibana/examples/5.x/values.yml +++ b/kibana/examples/5.x/values.yml @@ -1,6 +1,6 @@ --- -imageTag: 5.6.15 +imageTag: 5.6.16 elasticsearchURL: "http://fivex-master:9200" extraEnvs: diff --git a/kibana/examples/7.0.x/Makefile b/kibana/examples/6.x/Makefile similarity index 87% rename from kibana/examples/7.0.x/Makefile rename to kibana/examples/6.x/Makefile index 1831575f1..6d9ca5ff3 100644 --- a/kibana/examples/7.0.x/Makefile +++ b/kibana/examples/6.x/Makefile @@ -1,7 +1,7 @@ default: test include ../../../helpers/examples.mk -RELEASE := helm-kibana-seven +RELEASE := helm-kibana-six install: helm upgrade --wait --timeout=600 --install --values ./values.yml $(RELEASE) ../../ ; \ diff --git a/kibana/examples/7.1.x/test/goss.yaml b/kibana/examples/6.x/test/goss.yaml similarity index 85% rename from kibana/examples/7.1.x/test/goss.yaml rename to kibana/examples/6.x/test/goss.yaml index 0e298f24b..1143d1f68 100644 --- a/kibana/examples/7.1.x/test/goss.yaml +++ b/kibana/examples/6.x/test/goss.yaml @@ -3,7 +3,7 @@ http: status: 200 timeout: 2000 body: - - '"number":"7.1.0"' + - '"number":"6.7.1"' http://localhost:5601/app/kibana: status: 200 diff --git a/kibana/examples/6.x/values.yml b/kibana/examples/6.x/values.yml new file mode 100644 index 000000000..afe36e91a --- /dev/null +++ b/kibana/examples/6.x/values.yml @@ -0,0 +1,4 @@ +--- + +imageTag: 6.7.1 +elasticsearchHosts: "http://six-master:9200" diff --git a/kibana/examples/7.0.x/test/goss.yaml b/kibana/examples/7.0.x/test/goss.yaml deleted file mode 100644 index 77c2499f1..000000000 --- a/kibana/examples/7.0.x/test/goss.yaml +++ /dev/null @@ -1,10 +0,0 @@ -http: - http://localhost:5601/api/status: - status: 200 - timeout: 2000 - body: - - '"number":"7.0.0"' - - http://localhost:5601/app/kibana: - status: 200 - timeout: 2000 diff --git a/kibana/examples/7.0.x/values.yml b/kibana/examples/7.0.x/values.yml deleted file mode 100644 index d9a8714c1..000000000 --- a/kibana/examples/7.0.x/values.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- - -imageTag: 7.0.0 -elasticsearchHosts: "http://seven-master:9200" diff --git a/kibana/examples/7.1.x/Makefile b/kibana/examples/7.1.x/Makefile deleted file mode 100644 index c6d091967..000000000 --- a/kibana/examples/7.1.x/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -default: test -include ../../../helpers/examples.mk - -RELEASE := helm-kibana-seven-one - -install: - helm upgrade --wait --timeout=600 --install --values ./values.yml $(RELEASE) ../../ ; \ - -purge: - helm del --purge $(RELEASE) - -test: install goss diff --git a/kibana/examples/7.1.x/values.yml b/kibana/examples/7.1.x/values.yml deleted file mode 100644 index 151ba2f6a..000000000 --- a/kibana/examples/7.1.x/values.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- - -imageTag: 7.1.0-SNAPSHOT -elasticsearchHosts: "http://seven-one-master:9200" diff --git a/kibana/examples/default/test/goss.yaml b/kibana/examples/default/test/goss.yaml index 371da2e5d..77c2499f1 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":"6.6.2"' + - '"number":"7.0.0"' http://localhost:5601/app/kibana: status: 200 diff --git a/kibana/examples/security/security.yml b/kibana/examples/security/security.yml index 09da73f74..3517ed8e3 100644 --- a/kibana/examples/security/security.yml +++ b/kibana/examples/security/security.yml @@ -1,6 +1,6 @@ --- -elasticsearchURL: "https://security-master:9200" +elasticsearchHosts: "https://security-master:9200" extraEnvs: - name: 'ELASTICSEARCH_USERNAME' diff --git a/kibana/templates/deployment.yaml b/kibana/templates/deployment.yaml index ef7cea41a..8bf51c46d 100644 --- a/kibana/templates/deployment.yaml +++ b/kibana/templates/deployment.yaml @@ -62,13 +62,12 @@ spec: - name: kibana image: "{{ .Values.image }}:{{ .Values.imageTag }}" env: - {{- if .Values.elasticsearchHosts }} - - name: ELASTICSEARCH_HOSTS - value: "{{ .Values.elasticsearchHosts }}" - {{- end }} {{- if .Values.elasticsearchURL }} - name: ELASTICSEARCH_URL value: "{{ .Values.elasticsearchURL }}" + {{- else if .Values.elasticsearchHosts }} + - name: ELASTICSEARCH_HOSTS + value: "{{ .Values.elasticsearchHosts }}" {{- end }} {{- if .Values.extraEnvs }} {{ toYaml .Values.extraEnvs | indent 10 }} diff --git a/kibana/tests/kibana_test.py b/kibana/tests/kibana_test.py index ab4b4e248..62909c54a 100644 --- a/kibana/tests/kibana_test.py +++ b/kibana/tests/kibana_test.py @@ -5,8 +5,7 @@ import yaml name = 'RELEASE-NAME-kibana' -version = '6.6.2' -elasticsearchURL = 'http://elasticsearch-master:9200' +elasticsearchHosts = 'http://elasticsearch-master:9200' def test_defaults(): @@ -25,11 +24,11 @@ def test_defaults(): c = r['deployment'][name]['spec']['template']['spec']['containers'][0] assert c['name'] == 'kibana' - assert c['image'] == 'docker.elastic.co/kibana/kibana:' + version + assert c['image'].startswith('docker.elastic.co/kibana/kibana:') assert c['ports'][0]['containerPort'] == 5601 - assert c['env'][0]['name'] == 'ELASTICSEARCH_URL' - assert c['env'][0]['value'] == elasticsearchURL + assert c['env'][0]['name'] == 'ELASTICSEARCH_HOSTS' + assert c['env'][0]['value'] == elasticsearchHosts # Empty customizable defaults assert 'imagePullSecrets' not in r['deployment'][name]['spec']['template']['spec'] diff --git a/kibana/values.yaml b/kibana/values.yaml index ca6b1ff60..299f5e7c4 100755 --- a/kibana/values.yaml +++ b/kibana/values.yaml @@ -1,7 +1,7 @@ --- -elasticsearchURL: "http://elasticsearch-master:9200" -elasticsearchHosts: "" # "http://elasticsearch-master:9200" +elasticsearchURL: "" # "http://elasticsearch-master:9200" +elasticsearchHosts: "http://elasticsearch-master:9200" replicas: 1 @@ -21,7 +21,7 @@ secretMounts: [] # path: /usr/share/elasticsearch/config/certs image: "docker.elastic.co/kibana/kibana" -imageTag: "6.6.2" +imageTag: "7.0.0" imagePullPolicy: "IfNotPresent" resources: @@ -45,12 +45,12 @@ kibanaConfig: {} podSecurityContext: {} #runAsUser: "place the user id here" #fsGroup: "place the group id here" - + serviceAccount: "" # By default this will make sure two pods don't end up on the same node # Changing this to a region would allow you to spread pods across regions -antiAffinityTopologyKey: "kubernetes.io/hostname" +antiAffinityTopologyKey: "kubernetes.io/hostname" # Hard means that by default pods will only be scheduled if there are enough nodes for them # and that they will never end up on the same node. Setting this to soft will do this "best effort"