Skip to content

Commit 8ff1364

Browse files
committed
templating ingress api version
Signed-off-by: Caio Almeida <[email protected]>
1 parent 4551e12 commit 8ff1364

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

helm/oauth2-proxy/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ Parameter | Description | Default
9696
`imagePullSecrets` | Specify image pull secrets | `nil` (does not add image pull secrets to deployed pods)
9797
`ingress.enabled` | Enable Ingress | `false`
9898
`ingress.path` | Ingress accepted path | `/`
99+
`ingress.pathType` | Ingress [path type](https://kubernetes.io/docs/concepts/services-networking/ingress/#path-types) | `ImplementationSpecific`
100+
`ingress.apiVersion` | Ingress api version | `nil`
99101
`ingress.extraPaths` | Ingress extra paths to prepend to every host configuration. Useful when configuring [custom actions with AWS ALB Ingress Controller](https://kubernetes-sigs.github.io/aws-alb-ingress-controller/guide/ingress/annotation/#actions). | `[]`
100102
`ingress.annotations` | Ingress annotations | `nil`
101103
`ingress.hosts` | Ingress accepted hostnames | `nil`

helm/oauth2-proxy/templates/ingress.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
{{- $ingressPathType := .Values.ingress.pathType -}}
66
{{- $extraPaths := .Values.ingress.extraPaths -}}
77
{{- $apiV1 := false -}}
8-
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1" -}}
8+
{{- if .Values.ingress.apiVersion -}}
9+
apiVersion: {{ .Values.ingress.apiVersion }}
10+
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1" -}}
911
apiVersion: networking.k8s.io/v1
1012
{{- $apiV1 = true -}}
1113
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}}

helm/oauth2-proxy/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ ingress:
9191
path: /
9292
# Only used if API capabilities (networking.k8s.io/v1) allow it
9393
pathType: ImplementationSpecific
94+
# define the ingress api version (e.g. networking.k8s.io/v1)
95+
# apiVersion: networking.k8s.io/v1
9496
# Used to create an Ingress record.
9597
# hosts:
9698
# - chart-example.local

0 commit comments

Comments
 (0)