Skip to content

Commit

Permalink
Merge pull request #9 from epoch8/service-ports
Browse files Browse the repository at this point in the history
simple-app: Service ports
  • Loading branch information
elephantum authored May 16, 2023
2 parents c258353 + 04c4b09 commit f0827a4
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 3 deletions.
9 changes: 9 additions & 0 deletions charts/simple-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# 0.9.0

* Add `.servicePorts`

## Backwards incompatibility

* Add `.livenessProbe.enabled`
* Add `.readinessProbe.enabled`

# 0.8.0

* Add `.shmSize` to
Expand Down
2 changes: 1 addition & 1 deletion charts/simple-app/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions charts/simple-app/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -100,6 +108,7 @@ spec:
{{- if .Values.readinessProbe.failureThreshold }}
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
{{- end }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
Expand Down
6 changes: 6 additions & 0 deletions charts/simple-app/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
12 changes: 10 additions & 2 deletions charts/simple-app/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: {}

Expand Down Expand Up @@ -49,7 +55,8 @@ probe:
httpGet:
path: /

livenessProbe: {}
livenessProbe:
enabled: true
# httpGet:
# path: /
# port: http
Expand All @@ -59,7 +66,8 @@ livenessProbe: {}
# successThreshold: 1
# failureThreshold: 3

readinessProbe: {}
readinessProbe:
enabled: true
# httpGet:
# path: /
# port: http
Expand Down

0 comments on commit f0827a4

Please sign in to comment.