Skip to content

Commit

Permalink
downgrade ingress to networking.k8s.io/v1beta1
Browse files Browse the repository at this point in the history
  • Loading branch information
zubenkoivan committed Dec 9, 2021
1 parent 8e49cda commit 0038436
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
10 changes: 0 additions & 10 deletions charts/platform-storage/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,3 @@ chart: {{ include "platformStorage.chart" . }}
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
{{- end -}}

{{- define "platformStorage.ingress.apiVersion" -}}
{{- if and (.Capabilities.APIVersions.Has "networking.k8s.io/v1") (semverCompare ">= 1.19-0" .Capabilities.KubeVersion.Version) -}}
{{- print "networking.k8s.io/v1" -}}
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}}
{{- print "networking.k8s.io/v1beta1" -}}
{{- else -}}
{{- print "extensions/v1beta1" -}}
{{- end -}}
{{- end -}}
2 changes: 1 addition & 1 deletion charts/platform-storage/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if .Values.ingress.enabled }}
apiVersion: {{ include "platformStorage.ingress.apiVersion" . }}
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: {{ include "platformStorage.fullname" . }}
Expand Down

0 comments on commit 0038436

Please sign in to comment.