From 78fda64b282336d3ab4558d301f9433c96e3f644 Mon Sep 17 00:00:00 2001 From: Andrii Vakarev Date: Thu, 20 Apr 2023 23:33:51 +0200 Subject: [PATCH] Support ingress extra labels --- helm/oauth2-proxy/README.md | 1 + helm/oauth2-proxy/templates/ingress.yaml | 5 ++++- helm/oauth2-proxy/values.yaml | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/helm/oauth2-proxy/README.md b/helm/oauth2-proxy/README.md index 1c721b7d..3f2f214c 100644 --- a/helm/oauth2-proxy/README.md +++ b/helm/oauth2-proxy/README.md @@ -137,6 +137,7 @@ Parameter | Description | Default `ingress.path` | Ingress accepted path | `/` `ingress.pathType` | Ingress [path type](https://kubernetes.io/docs/concepts/services-networking/ingress/#path-types) | `ImplementationSpecific` `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). | `[]` +`ingress.labels` | Ingress extra labels | `{}` `ingress.annotations` | Ingress annotations | `nil` `ingress.hosts` | Ingress accepted hostnames | `nil` `ingress.tls` | Ingress TLS configuration | `nil` diff --git a/helm/oauth2-proxy/templates/ingress.yaml b/helm/oauth2-proxy/templates/ingress.yaml index 5702fe36..53238204 100644 --- a/helm/oauth2-proxy/templates/ingress.yaml +++ b/helm/oauth2-proxy/templates/ingress.yaml @@ -9,7 +9,10 @@ kind: Ingress metadata: labels: app: {{ template "oauth2-proxy.name" . }} -{{- include "oauth2-proxy.labels" . | indent 4 }} + {{- include "oauth2-proxy.labels" . | indent 4 }} +{{- if .Values.ingress.labels }} +{{ toYaml .Values.ingress.labels | indent 4 }} +{{- end }} name: {{ template "oauth2-proxy.fullname" . }} namespace: {{ template "oauth2-proxy.namespace" $ }} {{- with .Values.ingress.annotations }} diff --git a/helm/oauth2-proxy/values.yaml b/helm/oauth2-proxy/values.yaml index e7e46b0c..5ec29dab 100644 --- a/helm/oauth2-proxy/values.yaml +++ b/helm/oauth2-proxy/values.yaml @@ -153,6 +153,7 @@ ingress: # name: ssl-redirect # port: # name: use-annotation + labels: {} # annotations: # kubernetes.io/ingress.class: nginx # kubernetes.io/tls-acme: "true"