Skip to content

Commit f3ceca0

Browse files
committed
fix(chart): add parameter for service.targetPort, sets APP_PORT var for nginx
1 parent 6de3922 commit f3ceca0

File tree

5 files changed

+8
-2
lines changed

5 files changed

+8
-2
lines changed

charts/pixelfed/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ A Helm chart for deploying Pixelfed on Kubernetes
162162
| resources | object | `{}` | |
163163
| securityContext | object | `{}` | |
164164
| service.port | int | `80` | This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports |
165+
| service.targetPort | int | `80` | Port to attach to on the pods. Also sets what port nginx listens on inside the container. |
165166
| service.type | string | `"ClusterIP"` | This sets the service type more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types |
166167
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account |
167168
| serviceAccount.automount | bool | `true` | Automatically mount a ServiceAccount's API credentials? |

charts/pixelfed/templates/configmap.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ data:
88
# app config vars
99
APP_NAME={{ .Values.pixelfed.app.name }}
1010
APP_ENV={{ .Values.pixelfed.app.env }}
11+
APP_PORT={{ .Values.service.targetPort }}
1112
APP_URL={{ .Values.pixelfed.app.url }}
1213
APP_LOCALE={{ .Values.pixelfed.app.locale }}
1314
{{- with .Values.pixelfed.app.domain }}

charts/pixelfed/templates/deployment.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,16 @@ spec:
3838
imagePullPolicy: {{ .Values.image.pullPolicy }}
3939
ports:
4040
- name: http
41-
containerPort: {{ .Values.service.port }}
41+
containerPort: {{ .Values.service.targetPort }}
4242
protocol: TCP
4343
env:
4444
# app data
4545
- name: APP_NAME
4646
value: {{ .Values.pixelfed.app.name }}
4747
- name: APP_ENV
4848
value: {{ .Values.pixelfed.app.env }}
49+
- name: APP_PORT
50+
value: {{ .Values.service.targetPort | quote}}
4951
- name: APP_URL
5052
value: {{ .Values.pixelfed.app.url }}
5153
- name: APP_LOCALE

charts/pixelfed/templates/service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ spec:
88
type: {{ .Values.service.type }}
99
ports:
1010
- port: {{ .Values.service.port }}
11-
targetPort: http
11+
targetPort: {{ .Values.service.targetPort }}
1212
protocol: TCP
1313
name: http
1414
selector:

charts/pixelfed/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ service:
5656
type: ClusterIP
5757
# -- This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports
5858
port: 80
59+
# -- Port to attach to on the pods. Also sets what port nginx listens on inside the container.
60+
targetPort: 80
5961

6062
# This block is for setting up the ingress for more information can be found here: https://kubernetes.io/docs/concepts/services-networking/ingress/
6163
ingress:

0 commit comments

Comments
 (0)