Skip to content

Commit 1483b29

Browse files
Merge pull request #89 from endakelly/ek-patch-1
Add logic for customising service.targetPort
2 parents 8c39083 + 5d8f2d2 commit 1483b29

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

helm/oauth2-proxy/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: oauth2-proxy
2-
version: 6.6.2
2+
version: 6.7.0
33
apiVersion: v2
44
appVersion: 7.4.0
55
home: https://oauth2-proxy.github.io/oauth2-proxy/

helm/oauth2-proxy/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ Parameter | Description | Default
113113
`config.google.serviceAccountJson` | google service account json contents | `""`
114114
`config.google.existingConfig` | existing Kubernetes configmap to use for the service account file. See [google secret template](https://github.com/oauth2-proxy/manifests/blob/master/helm/oauth2-proxy/templates/google-secret.yaml) for the required values | `nil`
115115
`config.google.groups` | restrict logins to members of these google groups | `[]`
116+
`containerPort` | used to customise port on the deployment | `""`
116117
`extraArgs` | key:value list of extra arguments to give the binary | `{}`
117118
`extraEnv` | key:value list of extra environment variables to give the binary | `[]`
118119
`extraVolumes` | list of extra volumes | `[]`

helm/oauth2-proxy/templates/deployment.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,14 @@ spec:
167167
{{ tpl (toYaml .Values.extraEnv) . | indent 8 }}
168168
{{- end }}
169169
ports:
170-
{{- if eq .Values.httpScheme "http" }}
170+
{{- if .Values.containerPort }}
171+
- containerPort: {{ .Values.containerPort }}
172+
{{- else if (and (eq .Values.httpScheme "http") (empty .Values.containerPort)) }}
171173
- containerPort: 4180
172-
{{- else }}
174+
{{- else if (and (eq .Values.httpScheme "https") (empty .Values.containerPort)) }}
173175
- containerPort: 4443
174-
{{- end }}
176+
{{- else }}
177+
{{- end}}
175178
name: {{ .Values.httpScheme }}
176179
protocol: TCP
177180
{{- if .Values.metrics.enabled }}

helm/oauth2-proxy/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ image:
6767
# imagePullSecrets:
6868
# - name: myRegistryKeySecretName
6969

70+
# Set a custom containerPort if required.
71+
# This will default to 4180 if this value is not set and the httpScheme set to http
72+
# This will default to 4443 if this value is not set and the httpScheme set to https
73+
# containerPort: 4180
74+
7075
extraArgs: {}
7176
extraEnv: []
7277

0 commit comments

Comments
 (0)