From 67618474ce5f0adbbbe30b2d7b22b88127ef5070 Mon Sep 17 00:00:00 2001 From: jh629g Date: Mon, 21 Dec 2020 12:46:39 -0600 Subject: [PATCH] Update default Kubernetes API for use with Helm v3 Updated Kubernetes api from extensions/v1beta1 to networking.k8s.io/v1beta1 per docs[0] for kubernetes 1.16 deprecations as helm v3 linting will fail when it parses extensions/v1beta1 seen here[1] [0] https://kubernetes.io/blog/2019/07/18/api-deprecations-in-1-16/ [1] https://zuul.opendev.org/t/openstack/build/82f92508fb31418aa377f91d62e0d42e Change-Id: I0439272587a2afbccc4d7c49ef6ad053c8b305e7 --- helm-toolkit/Chart.yaml | 2 +- helm-toolkit/templates/manifests/_ingress.tpl | 22 +++++++++---------- ingress/Chart.yaml | 2 +- ingress/templates/ingress.yaml | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/helm-toolkit/Chart.yaml b/helm-toolkit/Chart.yaml index 322313ab9..ffb8cf39e 100644 --- a/helm-toolkit/Chart.yaml +++ b/helm-toolkit/Chart.yaml @@ -15,7 +15,7 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Helm-Toolkit name: helm-toolkit -version: 0.1.5 +version: 0.2.0 home: https://docs.openstack.org/openstack-helm icon: https://www.openstack.org/themes/openstack/images/project-mascots/OpenStack-Helm/OpenStack_Project_OpenStackHelm_vertical.png sources: diff --git a/helm-toolkit/templates/manifests/_ingress.tpl b/helm-toolkit/templates/manifests/_ingress.tpl index 236ff2551..e2426d3e4 100644 --- a/helm-toolkit/templates/manifests/_ingress.tpl +++ b/helm-toolkit/templates/manifests/_ingress.tpl @@ -62,7 +62,7 @@ examples: {{- include "helm-toolkit.manifests.ingress" ( dict "envAll" . "backendServiceType" "key-manager" "backendPort" "b-api" "endpoint" "public" ) -}} return: | --- - apiVersion: extensions/v1beta1 + apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: barbican @@ -94,7 +94,7 @@ examples: serviceName: barbican-api servicePort: b-api --- - apiVersion: extensions/v1beta1 + apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: barbican-namespace-fqdn @@ -116,7 +116,7 @@ examples: serviceName: barbican-api servicePort: b-api --- - apiVersion: extensions/v1beta1 + apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: barbican-cluster-fqdn @@ -182,7 +182,7 @@ examples: {{- include "helm-toolkit.manifests.ingress" ( dict "envAll" . "backendServiceType" "key-manager" "backendPort" "b-api" "endpoint" "public" ) -}} return: | --- - apiVersion: extensions/v1beta1 + apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: barbican @@ -272,7 +272,7 @@ examples: {{- include "helm-toolkit.manifests.ingress" ( dict "envAll" . "backendServiceType" "key-manager" "backendPort" "b-api" "endpoint" "public" "certIssuer" "ca-issuer" ) -}} return: | --- - apiVersion: extensions/v1beta1 + apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: barbican @@ -365,7 +365,7 @@ examples: {{- include "helm-toolkit.manifests.ingress" ( dict "envAll" . "backendServiceType" "key-manager" "backendPort" "b-api" "endpoint" "public" "certIssuer" "ca-issuer" "certIssuer" "cluster-issuer") -}} return: | --- - apiVersion: extensions/v1beta1 + apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: barbican @@ -440,7 +440,7 @@ examples: {{ $ingressOpts | include "helm-toolkit.manifests.ingress" }} return: | --- - apiVersion: extensions/v1beta1 + apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: grafana @@ -472,7 +472,7 @@ examples: serviceName: grafana-dashboard servicePort: dashboard --- - apiVersion: extensions/v1beta1 + apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: grafana-namespace-fqdn @@ -502,7 +502,7 @@ examples: serviceName: grafana-dashboard servicePort: dashboard --- - apiVersion: extensions/v1beta1 + apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: grafana-cluster-fqdn @@ -563,7 +563,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: extensions/v1beta1 +apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: {{ $ingressName }} @@ -613,7 +613,7 @@ spec: {{- range $key2, $ingressController := tuple "namespace" "cluster" }} {{- $vHosts := list $hostNameFull }} --- -apiVersion: extensions/v1beta1 +apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: {{ printf "%s-%s-%s" $ingressName $ingressController "fqdn" }} diff --git a/ingress/Chart.yaml b/ingress/Chart.yaml index 040456fc6..4a5632645 100644 --- a/ingress/Chart.yaml +++ b/ingress/Chart.yaml @@ -15,7 +15,7 @@ apiVersion: v1 appVersion: v0.32.0 description: OpenStack-Helm Ingress Controller name: ingress -version: 0.1.2 +version: 0.2.0 home: https://github.com/kubernetes/ingress sources: - https://github.com/kubernetes/ingress diff --git a/ingress/templates/ingress.yaml b/ingress/templates/ingress.yaml index a7bcc2ce4..ecc275e86 100644 --- a/ingress/templates/ingress.yaml +++ b/ingress/templates/ingress.yaml @@ -19,7 +19,7 @@ limitations under the License. {{- $_ := set .Values.network.ingress.annotations "kubernetes.io/ingress.class" .Values.deployment.cluster.class -}} {{- end -}} --- -apiVersion: extensions/v1beta1 +apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: {{ .Release.Namespace }}-{{ .Release.Name }}