diff --git a/charts/simple-app/CHANGELOG.md b/charts/simple-app/CHANGELOG.md index c75ca70..a14137b 100644 --- a/charts/simple-app/CHANGELOG.md +++ b/charts/simple-app/CHANGELOG.md @@ -1,3 +1,12 @@ +# 0.9.0 + +* Add `.servicePorts` + +## Backwards incompatibility + +* Add `.livenessProbe.enabled` +* Add `.readinessProbe.enabled` + # 0.8.0 * Add `.shmSize` to diff --git a/charts/simple-app/Chart.yaml b/charts/simple-app/Chart.yaml index a33cc85..219a85a 100644 --- a/charts/simple-app/Chart.yaml +++ b/charts/simple-app/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: "0.8.0" +version: "0.9.0" # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/simple-app/templates/deployment.yaml b/charts/simple-app/templates/deployment.yaml index e769cdf..1cc9734 100644 --- a/charts/simple-app/templates/deployment.yaml +++ b/charts/simple-app/templates/deployment.yaml @@ -68,6 +68,12 @@ spec: - name: http containerPort: {{ .Values.port }} protocol: TCP + {{- range .Values.servicePorts }} + - name: {{ .name }} + containerPort: {{ .port }} + protocol: {{ .protocol | default "TCP" }} + {{- end }} + {{- if .Values.livenessProbe.enabled }} livenessProbe: httpGet: path: {{ .Values.probe.httpGet.path }} @@ -84,6 +90,8 @@ spec: {{- if .Values.livenessProbe.failureThreshold }} failureThreshold: {{ .Values.livenessProbe.failureThreshold }} {{- end }} + {{- end }} + {{- if .Values.readinessProbe.enabled }} readinessProbe: httpGet: path: {{ .Values.probe.httpGet.path }} @@ -100,6 +108,7 @@ spec: {{- if .Values.readinessProbe.failureThreshold }} failureThreshold: {{ .Values.readinessProbe.failureThreshold }} {{- end }} + {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: diff --git a/charts/simple-app/templates/service.yaml b/charts/simple-app/templates/service.yaml index 44a4c86..661a387 100644 --- a/charts/simple-app/templates/service.yaml +++ b/charts/simple-app/templates/service.yaml @@ -11,5 +11,11 @@ spec: targetPort: http protocol: TCP name: http + {{- range .Values.servicePorts}} + - port: {{ .port }} + targetPort: {{ .name }} + protocol: {{ .protocol | default "TCP" }} + name: {{ .name }} + {{- end }} selector: {{- include "simple-app.selectorLabels" . | nindent 4 }} diff --git a/charts/simple-app/values.yaml b/charts/simple-app/values.yaml index 9e537a9..e3b3f47 100644 --- a/charts/simple-app/values.yaml +++ b/charts/simple-app/values.yaml @@ -18,6 +18,12 @@ imagePullSecrets: [] # Port that container is using port: 80 +# Ports to be exposed on the service +servicePorts: [] + # - name: grpc + # port: 50051 # both containerPort and service port + # protocol: TCP + # Environment variables for container env: {} @@ -49,7 +55,8 @@ probe: httpGet: path: / -livenessProbe: {} +livenessProbe: + enabled: true # httpGet: # path: / # port: http @@ -59,7 +66,8 @@ livenessProbe: {} # successThreshold: 1 # failureThreshold: 3 -readinessProbe: {} +readinessProbe: + enabled: true # httpGet: # path: / # port: http