From 74f3eb5824f7c52173088d63297f36769ed77a4e Mon Sep 17 00:00:00 2001 From: Steve Wilkerson Date: Mon, 28 Oct 2019 10:54:56 -0500 Subject: [PATCH] Ingress: Move ingress objects back to the extensions api This updates the ingress objects to move them back to the extensions API. While 1.16 moves them under the networking api, they're still rendered and deployed as extensions/ objects. This move prevents issues from arising where older versions of kubernetes might still be deployed during an upgrade, as the move to the networking API is nonfunctional at this time Change-Id: I814bbc833b5b9f79f34aefc60b9c1f9890bca826 Signed-off-by: Steve Wilkerson --- helm-toolkit/templates/manifests/_ingress.tpl | 12 ++++++------ ingress/templates/deployment-ingress.yaml | 1 - ingress/templates/ingress.yaml | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/helm-toolkit/templates/manifests/_ingress.tpl b/helm-toolkit/templates/manifests/_ingress.tpl index 0c0d395cd1..f0c37fd196 100644 --- a/helm-toolkit/templates/manifests/_ingress.tpl +++ b/helm-toolkit/templates/manifests/_ingress.tpl @@ -64,7 +64,7 @@ examples: {{- include "helm-toolkit.manifests.ingress" ( dict "envAll" . "backendServiceType" "key-manager" "backendPort" "b-api" "endpoint" "public" ) -}} return: | --- - apiVersion: networking.k8s.io/v1beta1 + apiVersion: extensions/v1beta1 kind: Ingress metadata: name: barbican @@ -96,7 +96,7 @@ examples: serviceName: barbican-api servicePort: b-api --- - apiVersion: networking.k8s.io/v1beta1 + apiVersion: extensions/v1beta1 kind: Ingress metadata: name: barbican-namespace-fqdn @@ -118,7 +118,7 @@ examples: serviceName: barbican-api servicePort: b-api --- - apiVersion: networking.k8s.io/v1beta1 + apiVersion: extensions/v1beta1 kind: Ingress metadata: name: barbican-cluster-fqdn @@ -184,7 +184,7 @@ examples: {{- include "helm-toolkit.manifests.ingress" ( dict "envAll" . "backendServiceType" "key-manager" "backendPort" "b-api" "endpoint" "public" ) -}} return: | --- - apiVersion: networking.k8s.io/v1beta1 + apiVersion: extensions/v1beta1 kind: Ingress metadata: name: barbican @@ -247,7 +247,7 @@ examples: {{- $hostName := tuple $backendServiceType $endpoint $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} {{- $hostNameFull := tuple $backendServiceType $endpoint $envAll | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }} --- -apiVersion: networking.k8s.io/v1beta1 +apiVersion: extensions/v1beta1 kind: Ingress metadata: name: {{ $ingressName }} @@ -282,7 +282,7 @@ spec: {{- range $key2, $ingressController := tuple "namespace" "cluster" }} {{- $hostNameFullRules := dict "vHost" $hostNameFull "backendName" $backendName "backendPort" $backendPort }} --- -apiVersion: networking.k8s.io/v1beta1 +apiVersion: extensions/v1beta1 kind: Ingress metadata: name: {{ printf "%s-%s-%s" $ingressName $ingressController "fqdn" }} diff --git a/ingress/templates/deployment-ingress.yaml b/ingress/templates/deployment-ingress.yaml index 8ff7ccc3c2..c9977e14f3 100644 --- a/ingress/templates/deployment-ingress.yaml +++ b/ingress/templates/deployment-ingress.yaml @@ -60,7 +60,6 @@ rules: - watch - apiGroups: - "extensions" - - "networking.k8s.io" resources: - ingresses verbs: diff --git a/ingress/templates/ingress.yaml b/ingress/templates/ingress.yaml index 16e62ac6ab..16ebaab3d5 100644 --- a/ingress/templates/ingress.yaml +++ b/ingress/templates/ingress.yaml @@ -21,7 +21,7 @@ limitations under the License. {{- $_ := set .Values.network.ingress.annotations "kubernetes.io/ingress.class" .Values.deployment.cluster.class -}} {{- end -}} --- -apiVersion: networking.k8s.io/v1beta1 +apiVersion: extensions/v1beta1 kind: Ingress metadata: name: {{ .Release.Namespace }}-{{ .Release.Name }}