From 1e91d6af9d94803345cbbaff703000d5ea7d8c26 Mon Sep 17 00:00:00 2001 From: Pierluigi Lenoci Date: Wed, 28 Aug 2024 16:50:53 +0200 Subject: [PATCH 1/4] Added the ability to specify a command for the container --- helm/oauth2-proxy/Chart.yaml | 8 ++++---- helm/oauth2-proxy/templates/deployment.yaml | 3 +++ helm/oauth2-proxy/values.yaml | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/helm/oauth2-proxy/Chart.yaml b/helm/oauth2-proxy/Chart.yaml index b60fb40..5761e92 100644 --- a/helm/oauth2-proxy/Chart.yaml +++ b/helm/oauth2-proxy/Chart.yaml @@ -1,5 +1,5 @@ name: oauth2-proxy -version: 7.7.11 +version: 7.7.12 apiVersion: v2 appVersion: 7.6.0 home: https://oauth2-proxy.github.io/oauth2-proxy/ @@ -34,8 +34,8 @@ maintainers: kubeVersion: ">=1.9.0-0" annotations: artifacthub.io/changes: | - - kind: fixed - description: Updated the Redis chart to the latest version + - kind: added + description: Added the ability to specify a command for the container. links: - name: Github PR - url: https://github.com/oauth2-proxy/manifests/pull/223 + url: https://github.com/oauth2-proxy/manifests/pull/224 diff --git a/helm/oauth2-proxy/templates/deployment.yaml b/helm/oauth2-proxy/templates/deployment.yaml index a303dd6..cae3ccb 100644 --- a/helm/oauth2-proxy/templates/deployment.yaml +++ b/helm/oauth2-proxy/templates/deployment.yaml @@ -104,6 +104,9 @@ spec: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ include "oauth2-proxy.version" . }}" imagePullPolicy: {{ .Values.image.pullPolicy }} + {{- if .Values.image.command }} + command: {{ .Values.image.command | toYaml }} + {{- end }} args: {{- if .Values.alphaConfig.enabled }} - --alpha-config=/etc/oauth2_proxy/oauth2_proxy.yml diff --git a/helm/oauth2-proxy/values.yaml b/helm/oauth2-proxy/values.yaml index d898743..c9ef103 100644 --- a/helm/oauth2-proxy/values.yaml +++ b/helm/oauth2-proxy/values.yaml @@ -78,6 +78,7 @@ image: # appVersion is used by default tag: "" pullPolicy: "IfNotPresent" + command: [] # Optionally specify an array of imagePullSecrets. # Secrets must be manually created in the namespace. From 7aea1c78cffff0a61da32e998eb5cd1864fc4fdc Mon Sep 17 00:00:00 2001 From: Pierluigi Lenoci Date: Wed, 28 Aug 2024 20:27:09 +0200 Subject: [PATCH 2/4] Improved the template and added the parameter in the README --- helm/oauth2-proxy/README.md | 1 + helm/oauth2-proxy/templates/deployment.yaml | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/helm/oauth2-proxy/README.md b/helm/oauth2-proxy/README.md index 5fee925..f7f3bd7 100644 --- a/helm/oauth2-proxy/README.md +++ b/helm/oauth2-proxy/README.md @@ -147,6 +147,7 @@ The following table lists the configurable parameters of the oauth2-proxy chart | `htpasswdFile.existingSecret` | existing Kubernetes secret to use for OAuth2 htpasswd file | `""` | | `httpScheme` | `http` or `https`. `name` used for the port on the deployment. `httpGet` port `name` and `scheme` used for `liveness`- and `readinessProbes`. `name` and `targetPort` used for the service. | `http` | | `image.pullPolicy` | Image pull policy | `IfNotPresent` | +| `image.command` | Define command to be executed by grafana container at startup | `[]` | | `image.repository` | Image repository | `quay.io/oauth2-proxy/oauth2-proxy` | | `image.tag` | Image tag | `""` (defaults to appVersion) | | `imagePullSecrets` | Specify image pull secrets | `nil` (does not add image pull secrets to deployed pods) | diff --git a/helm/oauth2-proxy/templates/deployment.yaml b/helm/oauth2-proxy/templates/deployment.yaml index cae3ccb..95a2359 100644 --- a/helm/oauth2-proxy/templates/deployment.yaml +++ b/helm/oauth2-proxy/templates/deployment.yaml @@ -105,7 +105,10 @@ spec: image: "{{ .Values.image.repository }}:{{ include "oauth2-proxy.version" . }}" imagePullPolicy: {{ .Values.image.pullPolicy }} {{- if .Values.image.command }} - command: {{ .Values.image.command | toYaml }} + command: + {{- range .Values.image.command }} + - {{ . | quote }} + {{- end }} {{- end }} args: {{- if .Values.alphaConfig.enabled }} From 081eed07820b88101e247e247268f4b13a962671 Mon Sep 17 00:00:00 2001 From: Pierluigi Lenoci Date: Wed, 28 Aug 2024 20:28:11 +0200 Subject: [PATCH 3/4] Artifacthub fix --- helm/oauth2-proxy/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/oauth2-proxy/Chart.yaml b/helm/oauth2-proxy/Chart.yaml index 352fcad..eec24ed 100644 --- a/helm/oauth2-proxy/Chart.yaml +++ b/helm/oauth2-proxy/Chart.yaml @@ -38,4 +38,4 @@ annotations: description: Added the ability to specify a command for the container. links: - name: Github PR - url: https://github.com/oauth2-proxy/manifests/pull/224 + url: https://github.com/oauth2-proxy/manifests/pull/230 From a509ffd8e89c78d98215c4fbc7ef38c749196bfa Mon Sep 17 00:00:00 2001 From: Pierluigi Lenoci Date: Wed, 28 Aug 2024 20:29:03 +0200 Subject: [PATCH 4/4] Chart bump --- helm/oauth2-proxy/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/oauth2-proxy/Chart.yaml b/helm/oauth2-proxy/Chart.yaml index eec24ed..71045b2 100644 --- a/helm/oauth2-proxy/Chart.yaml +++ b/helm/oauth2-proxy/Chart.yaml @@ -1,5 +1,5 @@ name: oauth2-proxy -version: 7.7.12 +version: 7.7.13 apiVersion: v2 appVersion: 7.6.0 home: https://oauth2-proxy.github.io/oauth2-proxy/