diff --git a/deploy/charts/rook-ceph-cluster/templates/_helpers.tpl b/deploy/charts/rook-ceph-cluster/templates/_helpers.tpl index dbb065ffa..6f0a0f9a2 100644 --- a/deploy/charts/rook-ceph-cluster/templates/_helpers.tpl +++ b/deploy/charts/rook-ceph-cluster/templates/_helpers.tpl @@ -11,14 +11,3 @@ Return the target Kubernetes version. {{- define "capabilities.kubeVersion" -}} {{- default .Capabilities.KubeVersion.Version .Values.kubeVersion -}} {{- end }} - -{{/* -Return the appropriate apiVersion for ingress. -*/}} -{{- define "capabilities.ingress.apiVersion" -}} -{{- if semverCompare "<1.19-0" (include "capabilities.kubeVersion" .) -}} -{{- print "networking.k8s.io/v1beta1" -}} -{{- else -}} -{{- print "networking.k8s.io/v1" -}} -{{- end }} -{{- end }} diff --git a/deploy/charts/rook-ceph-cluster/templates/cephobjectstore-ingress.yaml b/deploy/charts/rook-ceph-cluster/templates/cephobjectstore-ingress.yaml index bb0934124..c86ed9ba3 100644 --- a/deploy/charts/rook-ceph-cluster/templates/cephobjectstore-ingress.yaml +++ b/deploy/charts/rook-ceph-cluster/templates/cephobjectstore-ingress.yaml @@ -1,7 +1,7 @@ {{- range .Values.cephObjectStores }} {{- if dig "ingress" "enabled" false . }} --- -apiVersion: {{ include "capabilities.ingress.apiVersion" $ }} +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ .name }} @@ -16,16 +16,11 @@ spec: paths: - path: {{ .ingress.host.path | default "/" }} backend: -{{- if (eq "networking.k8s.io/v1" (include "capabilities.ingress.apiVersion" $)) }} service: name: rook-ceph-rgw-{{ .name }} port: number: {{ .spec.gateway.securePort | default .spec.gateway.port }} pathType: {{ .ingress.host.pathType | default "Prefix" }} -{{- else }} - serviceName: rook-ceph-rgw-{{ .name }} - servicePort: {{ .spec.gateway.securePort | default .spec.gateway.port }} -{{- end }} {{- with .ingress.ingressClassName }} ingressClassName: {{ . }} {{- end }} diff --git a/deploy/charts/rook-ceph-cluster/templates/ingress.yaml b/deploy/charts/rook-ceph-cluster/templates/ingress.yaml index f915575f4..ecfb7c470 100644 --- a/deploy/charts/rook-ceph-cluster/templates/ingress.yaml +++ b/deploy/charts/rook-ceph-cluster/templates/ingress.yaml @@ -1,6 +1,6 @@ {{- if .Values.ingress.dashboard.host }} --- -apiVersion: {{ include "capabilities.ingress.apiVersion" . }} +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ template "clusterName" . }}-dashboard @@ -15,7 +15,6 @@ spec: paths: - path: {{ .Values.ingress.dashboard.host.path | default "/" }} backend: -{{- if (eq "networking.k8s.io/v1" (include "capabilities.ingress.apiVersion" .)) }} service: name: rook-ceph-mgr-dashboard port: @@ -25,14 +24,6 @@ spec: name: http-dashboard {{- end }} pathType: {{ .Values.ingress.dashboard.host.pathType | default "Prefix" }} -{{- else }} - serviceName: rook-ceph-mgr-dashboard - {{- if .Values.cephClusterSpec.dashboard.ssl }} - servicePort: https-dashboard - {{- else }} - servicePort: http-dashboard - {{- end }} -{{- end }} {{- if .Values.ingress.dashboard.ingressClassName }} ingressClassName: {{ .Values.ingress.dashboard.ingressClassName }} {{- end }}