From 8dc44ddb025d5eeccfb85638f0af8aad9568a3a7 Mon Sep 17 00:00:00 2001 From: James Ritter Date: Wed, 18 Sep 2019 10:54:22 -0500 Subject: [PATCH] Update values file and added templates to both services The helm lint tests were failing because the httpPortName and transportPortName key value were missing from the values.yaml file. Also update both services to include the port name template. --- elasticsearch/README.md | 4 ++-- elasticsearch/templates/service.yaml | 8 ++++---- elasticsearch/values.yaml | 2 ++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/elasticsearch/README.md b/elasticsearch/README.md index 78c6c4271..e89f8a87b 100644 --- a/elasticsearch/README.md +++ b/elasticsearch/README.md @@ -90,12 +90,12 @@ helm install --name elasticsearch elastic/elasticsearch --set imageTag=7.3.0 | `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` | -| `httpPortName` | The name of the http port within the service | `http` | | `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` | -| `transportPortName` | The name of the transport port within the service | `transport` | | `service.type` | Type of elasticsearch service. [Service Types](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) | `ClusterIP` | | `service.nodePort` | Custom [nodePort](https://kubernetes.io/docs/concepts/services-networking/service/#nodeport) port that can be set if you are using `service.type: nodePort`. | `` | | `service.annotations` | Annotations that Kubernetes will use for the service. This will configure load balancer if `service.type` is `LoadBalancer` [Annotations](https://kubernetes.io/docs/concepts/services-networking/service/#ssl-support-on-aws) | `{}` | +| `service.httpPortName` | The name of the http port within the service | `http` | +| `service.transportPortName` | The name of the transport port within the service | `transport` | | `updateStrategy` | The [updateStrategy](https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#updating-statefulsets) for the statefulset. By default Kubernetes will wait for the cluster to be green after upgrading each pod. Setting this to `OnDelete` will allow you to manually delete each pod during upgrades | `RollingUpdate` | | `maxUnavailable` | The [maxUnavailable](https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget) value for the pod disruption budget. By default this will prevent Kubernetes from having more than 1 unhealthy pod in the node group | `1` | | `fsGroup (DEPRECATED)` | The Group ID (GID) for [securityContext.fsGroup](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) so that the Elasticsearch user can read from the persistent volume | `` | diff --git a/elasticsearch/templates/service.yaml b/elasticsearch/templates/service.yaml index e574ad415..073ae7f9a 100644 --- a/elasticsearch/templates/service.yaml +++ b/elasticsearch/templates/service.yaml @@ -18,13 +18,13 @@ spec: chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" app: "{{ template "uname" . }}" ports: - - name: {{ .Values.httpPortName | default "http" }} + - name: {{ .Values.service.httpPortName | default "http" }} protocol: TCP port: {{ .Values.httpPort }} {{- if .Values.service.nodePort }} nodePort: {{ .Values.service.nodePort }} {{- end }} - - name: {{ .Values.transportPortName | default "transport" }} + - name: {{ .Values.service.transportPortName | default "transport" }} protocol: TCP port: {{ .Values.transportPort }} --- @@ -46,7 +46,7 @@ spec: selector: app: "{{ template "uname" . }}" ports: - - name: http + - name: {{ .Values.service.httpPortName | default "http" }} port: {{ .Values.httpPort }} - - name: transport + - name: {{ .Values.service.transportPortName | default "transport" }} port: {{ .Values.transportPort }} diff --git a/elasticsearch/values.yaml b/elasticsearch/values.yaml index 7ce13c314..78f208849 100755 --- a/elasticsearch/values.yaml +++ b/elasticsearch/values.yaml @@ -132,6 +132,8 @@ service: type: ClusterIP nodePort: annotations: {} + httpPortName: http + transportPortName: transport updateStrategy: RollingUpdate