Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Switch to 7.x as the default version #96

Merged
merged 4 commits into from
Apr 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions elasticsearch/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
26 changes: 21 additions & 5 deletions elasticsearch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -47,23 +63,23 @@ 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`<br>`data: true`<br>`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 | |
| `extraVolumeMounts` | Additional volumeMounts to be passed to the `tpl` function | |
| `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`<br>`requests.memory: 2Gi`<br>`limits.cpu: 1000m`<br>`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" ]`<br>`storageClassName: standard`<br>`resources.requests.storage: 30Gi` |
| `persistence.annotations` | Additional persistence annotations for the `volumeClaimTemplate` | `{}` |
| `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) | `{}` |
Expand Down
2 changes: 1 addition & 1 deletion elasticsearch/examples/5.x/test/goss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
2 changes: 1 addition & 1 deletion elasticsearch/examples/5.x/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

clusterName: "fivex"
imageTag: "5.6.15"
imageTag: "5.6.16"
esMajorVersion: 5

extraEnvs:
Expand Down
Original file line number Diff line number Diff line change
@@ -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 ../../ ; \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
5 changes: 5 additions & 0 deletions elasticsearch/examples/6.x/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---

clusterName: "six"
imageTag: "6.7.1"
esMajorVersion: 6
5 changes: 0 additions & 5 deletions elasticsearch/examples/7.0.x/values.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions elasticsearch/examples/7.1.x/Makefile

This file was deleted.

17 changes: 0 additions & 17 deletions elasticsearch/examples/7.1.x/test/goss.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions elasticsearch/examples/7.1.x/values.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions elasticsearch/examples/default/test/goss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -34,7 +34,7 @@ file:
group: elasticsearch
filetype: directory

mount:
mount:
/usr/share/elasticsearch/data:
exists: true

Expand Down
2 changes: 2 additions & 0 deletions elasticsearch/examples/migration/client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ replicas: 2
clusterName: "elasticsearch"
nodeGroup: "client"

esMajorVersion: 6

roles:
master: "false"
ingest: "false"
Expand Down
2 changes: 2 additions & 0 deletions elasticsearch/examples/migration/data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

replicas: 2

esMajorVersion: 6

extraEnvs:
- name: discovery.zen.ping.unicast.hosts
value: "my-release-elasticsearch-discovery"
Expand Down
2 changes: 2 additions & 0 deletions elasticsearch/examples/migration/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion elasticsearch/examples/security/test/goss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
6 changes: 4 additions & 2 deletions elasticsearch/tests/elasticsearch_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
10 changes: 5 additions & 5 deletions elasticsearch/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: {}
Expand Down Expand Up @@ -79,16 +79,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']
Expand Down
30 changes: 30 additions & 0 deletions helpers/bumper.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env python2
import re
import os
import glob
import subprocess
import fileinput

os.chdir('../')
Crazybus marked this conversation as resolved.
Show resolved Hide resolved

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())
4 changes: 2 additions & 2 deletions helpers/matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion helpers/terraform/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
4 changes: 2 additions & 2 deletions kibana/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading