Skip to content

Commit a501b0a

Browse files
Merge pull request #157 from pierluigilenoci/fix_155_eks_bugs_workaround
Workaround for EKS bug
2 parents 2e5ec0d + 6e2c6e1 commit a501b0a

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

helm/oauth2-proxy/Chart.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: oauth2-proxy
2-
version: 6.15.0
2+
version: 6.15.1
33
apiVersion: v2
44
appVersion: 7.4.0
55
home: https://oauth2-proxy.github.io/oauth2-proxy/
@@ -34,10 +34,10 @@ maintainers:
3434
kubeVersion: ">=1.9.0-0"
3535
annotations:
3636
artifacthub.io/changes: |
37-
- kind: added
38-
description: optional init container to wait for redis subchart's master pod to be ready
37+
- kind: fixed
38+
description: Created a workaround to fix the EKS bug related to Capabilities.KubeVersion.Minor in clusters with version 1.25+
3939
links:
4040
- name: Github Issue
41-
url: https://github.com/oauth2-proxy/manifests/issues/91
41+
url: https://github.com/oauth2-proxy/manifests/issues/155
4242
- name: Github PR
43-
url: https://github.com/oauth2-proxy/manifests/pull/92
43+
url: https://github.com/oauth2-proxy/manifests/pull/157

helm/oauth2-proxy/templates/_helpers.tpl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,15 @@ Returns the version
119119
{{- define "oauth2-proxy.version" -}}
120120
{{ trimPrefix "v" (lower (.Values.image.tag | default (printf "v%s" .Chart.AppVersion))) }}
121121
{{- end -}}
122+
123+
{{/*
124+
Returns the kubectl version
125+
Workaround for EKS https://github.com/aws/eks-distro/issues/1128
126+
*/}}
127+
{{- define "kubectl.version" -}}
128+
{{- if .Values.initContainers.waitForRedis.kubectlVersion -}}
129+
{{ .Values.initContainers.waitForRedis.kubectlVersion }}
130+
{{- else -}}
131+
{{- printf "%s.%s" .Capabilities.KubeVersion.Major (.Capabilities.KubeVersion.Minor | replace "+" "") -}}
132+
{{- end -}}
133+
{{- end -}}

helm/oauth2-proxy/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ spec:
6060
initContainers:
6161
{{- if and .Values.redis.enabled .Values.initContainers.waitForRedis.enabled }}
6262
- name: wait-for-redis
63-
image: "docker.io/bitnami/kubectl:{{ default (printf "%s.%s" .Capabilities.KubeVersion.Major .Capabilities.KubeVersion.Minor) .Values.initContainers.waitForRedis.kubectlVersion }}"
63+
image: "docker.io/bitnami/kubectl:{{ include "kubectl.version" . }}"
6464
args:
6565
- wait
6666
- pod/{{ include "oauth2-proxy.redis.fullname" . }}-master-0

0 commit comments

Comments
 (0)