Skip to content

Commit

Permalink
feat(helm): allow to configure the container port (#868)
Browse files Browse the repository at this point in the history
  • Loading branch information
coibib committed Jan 31, 2024
1 parent f7662db commit 2dd3b92
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions charts/mercure/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ To install the chart with the release name `my-release`, run the following comma
| securityContext | object | `{}` | Container [security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container). See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context-1) for details. |
| service.annotations | object | `{}` | |
| service.port | int | `80` | Service port. |
| service.targetPort | int | `80` | Service target port. |
| service.type | string | `"ClusterIP"` | Kubernetes [service type](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types). |
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account. |
| serviceAccount.create | bool | `true` | Specifies whether a service account should be created. |
Expand Down
4 changes: 2 additions & 2 deletions charts/mercure/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: SERVER_NAME
value: :80
value: :{{ .Values.service.targetPort }}
- name: GLOBAL_OPTIONS
valueFrom:
configMapKeyRef:
Expand Down Expand Up @@ -94,7 +94,7 @@ spec:
{{- end }}
ports:
- name: http
containerPort: 80
containerPort: {{ .Values.service.targetPort }}
protocol: TCP
livenessProbe:
httpGet:
Expand Down
2 changes: 1 addition & 1 deletion charts/mercure/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
targetPort: {{ .Values.service.targetPort }}
protocol: TCP
name: http
selector:
Expand Down
2 changes: 2 additions & 0 deletions charts/mercure/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ service:
type: ClusterIP
# -- Service port.
port: 80
# -- Service target port.
targetPort: 80
annotations: {}

ingress:
Expand Down

0 comments on commit 2dd3b92

Please sign in to comment.