Skip to content

Commit

Permalink
Helm 3 (#516)
Browse files Browse the repository at this point in the history
* bump helm version to helm 3.4.1
* update doc to make helm 3 the recommended version
* update helm commands arguments for helm 3
* remove helm init and tiller install commands
* add stable repo for metricbeat dependencies
* remove the charts dance in helmignore (related to elastic/helm-charts#127)
* optimize docker images
* replace deprecated gitversion capability (related to helm/helm#5601)
* remove some heritage labels in immutable fields
  • Loading branch information
jmlrt committed Nov 17, 2020
1 parent 0384727 commit e46ea17
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 30 deletions.
9 changes: 4 additions & 5 deletions elasticsearch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,17 @@ See [supported configurations][] for more details.
`helm repo add elastic https://helm.elastic.co`

* Install it:
- with Helm 2: `helm install --name elasticsearch elastic/elasticsearch`
- with [Helm 3 (beta)][]: `helm install elasticsearch elastic/elasticsearch`
- with Helm 3: `helm install elasticsearch elastic/elasticsearch`
- with Helm 2 (deprecated): `helm install --name elasticsearch elastic/elasticsearch`


### Install development version using master branch

* Clone the git repo: `git clone git@github.com:elastic/helm-charts.git`

* Install it:
- with Helm 2: `helm install --name elasticsearch ./helm-charts/elasticsearch --set imageTag=8.0.0-SNAPSHOT`
- with [Helm 3 (beta)][]: `helm install elasticsearch ./helm-charts/elasticsearch --set imageTag=8.0.0-SNAPSHOT`
- with Helm 3: `helm install elasticsearch ./helm-charts/elasticsearch --set imageTag=8.0.0-SNAPSHOT`
- with Helm 2 (deprecated): `helm install --name elasticsearch ./helm-charts/elasticsearch --set imageTag=8.0.0-SNAPSHOT`


## Upgrading
Expand Down Expand Up @@ -413,7 +413,6 @@ about our development and testing process.
[examples/security]: https://github.com/elastic/helm-charts/tree/master/elasticsearch/examples/security
[gke]: https://cloud.google.com/kubernetes-engine
[helm]: https://helm.sh
[helm 3 (beta)]: https://github.com/elastic/helm-charts/tree/master/README.md#helm-3-beta
[helm/charts stable]: https://github.com/helm/charts/tree/master/stable/elasticsearch/
[how to install plugins guide]: https://github.com/elastic/helm-charts/tree/master/elasticsearch/README.md#how-to-install-plugins
[how to use the keystore]: https://github.com/elastic/helm-charts/tree/master/elasticsearch/README.md#how-to-use-the-keystore
Expand Down
2 changes: 1 addition & 1 deletion elasticsearch/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -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 }} --cleanup
$ helm test {{ .Release.Name }}
4 changes: 2 additions & 2 deletions elasticsearch/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
Return the appropriate apiVersion for statefulset.
*/}}
{{- define "elasticsearch.statefulset.apiVersion" -}}
{{- if semverCompare "<1.9-0" .Capabilities.KubeVersion.GitVersion -}}
{{- if semverCompare "<1.9-0" .Capabilities.KubeVersion.Version -}}
{{- print "apps/v1beta2" -}}
{{- else -}}
{{- print "apps/v1" -}}
Expand All @@ -79,7 +79,7 @@ Return the appropriate apiVersion for statefulset.
Return the appropriate apiVersion for ingress.
*/}}
{{- define "elasticsearch.ingress.apiVersion" -}}
{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}}
{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.Version -}}
{{- print "extensions/v1beta1" -}}
{{- else -}}
{{- print "networking.k8s.io/v1beta1" -}}
Expand Down
4 changes: 1 addition & 3 deletions elasticsearch/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ spec:
name: {{ template "elasticsearch.uname" . }}
{{- if .Values.persistence.labels.enabled }}
labels:
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
chart: "{{ .Chart.Name }}"
app: "{{ template "elasticsearch.uname" . }}"
Expand All @@ -47,7 +46,6 @@ spec:
metadata:
name: "{{ template "elasticsearch.uname" . }}"
labels:
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
chart: "{{ .Chart.Name }}"
app: "{{ template "elasticsearch.uname" . }}"
Expand Down Expand Up @@ -154,7 +152,7 @@ spec:
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 8 }}
{{- end }}
{{- if semverCompare ">1.13-0" .Capabilities.KubeVersion.GitVersion }}
{{- if semverCompare ">1.13-0" .Capabilities.KubeVersion.Version }}
enableServiceLinks: {{ .Values.enableServiceLinks }}
{{- end }}
initContainers:
Expand Down
9 changes: 4 additions & 5 deletions filebeat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,17 @@ See [supported configurations][] for more details.
`helm repo add elastic https://helm.elastic.co`

* Install it:
- with Helm 2: `helm install --name filebeat elastic/filebeat`
- with [Helm 3 (beta)][]: `helm install filebeat elastic/filebeat`
- with Helm 3: `helm install filebeat elastic/filebeat`
- with Helm 2 (deprecated): `helm install --name filebeat elastic/filebeat`


### Install development version using master branch

* Clone the git repo: `git clone git@github.com:elastic/helm-charts.git`

* Install it:
- with Helm 2: `helm install --name filebeat ./helm-charts/filebeat --set imageTag=8.0.0-SNAPSHOT`
- with [Helm 3 (beta)][]: `helm install filebeat ./helm-charts/filebeat --set imageTag=8.0.0-SNAPSHOT`
- with Helm 3: `helm install filebeat ./helm-charts/filebeat --set imageTag=8.0.0-SNAPSHOT`
- with Helm 2 (deprecated): `helm install --name filebeat ./helm-charts/filebeat --set imageTag=8.0.0-SNAPSHOT`


## Upgrading
Expand Down Expand Up @@ -200,7 +200,6 @@ about our development and testing process.
[filebeat oss docker image]: https://www.docker.elastic.co/r/beats/filebeat-oss
[filebeat outputs]: https://www.elastic.co/guide/en/beats/filebeat/current/configuring-output.html
[helm]: https://helm.sh
[helm 3 (beta)]: https://github.com/elastic/helm-charts/tree/master/README.md#helm-3-beta
[hostNetwork]: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#host-namespaces
[dnsConfig]: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/
[hostPath]: https://kubernetes.io/docs/concepts/storage/volumes/#hostpath
Expand Down
9 changes: 4 additions & 5 deletions kibana/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,17 @@ See [supported configurations][] for more details.
`helm repo add elastic https://helm.elastic.co`

* Install it:
- with Helm 2: `helm install --name kibana elastic/kibana`
- with [Helm 3 (beta)][]: `helm install kibana elastic/kibana`
- with Helm 3: `helm install kibana elastic/kibana`
- with Helm 2 (deprecated): `helm install --name kibana elastic/kibana`


### Install development version using master branch

* Clone the git repo: `git clone git@github.com:elastic/helm-charts.git`

* Install it:
- with Helm 2: `helm install --name kibana ./helm-charts/kibana --set imageTag=8.0.0-SNAPSHOT`
- with [Helm 3 (beta)][]: `helm install kibana ./helm-charts/kibana --set imageTag=8.0.0-SNAPSHOT`
- with Helm 3: `helm install kibana ./helm-charts/kibana --set imageTag=8.0.0-SNAPSHOT`
- with Helm 2 (deprecated): `helm install --name kibana ./helm-charts/kibana --set imageTag=8.0.0-SNAPSHOT`


## Upgrading
Expand Down Expand Up @@ -216,7 +216,6 @@ about our development and testing process.
[examples/security]: https://github.com/elastic/helm-charts/tree/master/kibana/examples/security
[gke]: https://cloud.google.com/kubernetes-engine
[helm]: https://helm.sh
[helm 3 (beta)]: https://github.com/elastic/helm-charts/tree/master/README.md#helm-3-beta
[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/
Expand Down
2 changes: 1 addition & 1 deletion kibana/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
Return the appropriate apiVersion for ingress.
*/}}
{{- define "kibana.ingress.apiVersion" -}}
{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}}
{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.Version -}}
{{- print "extensions/v1beta1" -}}
{{- else -}}
{{- print "networking.k8s.io/v1beta1" -}}
Expand Down
9 changes: 4 additions & 5 deletions logstash/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,17 @@ See [supported configurations][] for more details.
`helm repo add elastic https://helm.elastic.co`

* Install it:
- with Helm 2: `helm install --name logstash elastic/logstash`
- with [Helm 3 (beta)][]: `helm install logstash elastic/logstash`
- with Helm 3: `helm install logstash elastic/logstash`
- with Helm 2 (deprecated): `helm install --name logstash elastic/logstash`


### Install development version using master branch

* Clone the git repo: `git clone git@github.com:elastic/helm-charts.git`

* Install it:
- with Helm 2: `helm install --name logstash ./helm-charts/logstash --set imageTag=8.0.0-SNAPSHOT`
- with [Helm 3 (beta)][]: `helm install logstash ./helm-charts/logstash --set imageTag=8.0.0-SNAPSHOT`
- with Helm 3: `helm install logstash ./helm-charts/logstash --set imageTag=8.0.0-SNAPSHOT`
- with Helm 2 (deprecated): `helm install --name logstash ./helm-charts/logstash --set imageTag=8.0.0-SNAPSHOT`


## Upgrading
Expand Down Expand Up @@ -202,7 +202,6 @@ about our development and testing process.
[examples]: https://github.com/elastic/helm-charts/tree/master/logstash/examples
[examples/oss]: https://github.com/elastic/helm-charts/tree/master/logstash/examples/oss
[helm]: https://helm.sh
[helm 3 (beta)]: https://github.com/elastic/helm-charts/tree/master/README.md#helm-3-beta
[http input plugin]: https://www.elastic.co/guide/en/logstash/current/plugins-inputs-http.html
[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
Expand Down
4 changes: 2 additions & 2 deletions logstash/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
Return the appropriate apiVersion for statefulset.
*/}}
{{- define "logstash.statefulset.apiVersion" -}}
{{- if semverCompare "<1.9-0" .Capabilities.KubeVersion.GitVersion -}}
{{- if semverCompare "<1.9-0" .Capabilities.KubeVersion.Version -}}
{{- print "apps/v1beta2" -}}
{{- else -}}
{{- print "apps/v1" -}}
Expand All @@ -34,7 +34,7 @@ Return the appropriate apiVersion for statefulset.
Return the appropriate apiVersion for ingress.
*/}}
{{- define "logstash.ingress.apiVersion" -}}
{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}}
{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.Version -}}
{{- print "extensions/v1beta1" -}}
{{- else -}}
{{- print "networking.k8s.io/v1beta1" -}}
Expand Down
1 change: 0 additions & 1 deletion logstash/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ spec:
selector:
app: "{{ template "logstash.fullname" . }}"
chart: "{{ .Chart.Name }}"
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
ports:
{{ toYaml .Values.service.ports | indent 4 }}
Expand Down

0 comments on commit e46ea17

Please sign in to comment.