Migrate Ingress resources to networking.k8s.io/v1
This change updates the helm-toolkit and ingress charts to migrate Ingress resources to the networking.k8s.io/v1 API version, available since v1.19. [0] 0: https://kubernetes.io/docs/reference/using-api/deprecation-guide/#ingress-v122 Change-Id: Ic6bd6d158b1294da26c165797c90107831dcb508
This commit is contained in:
parent
f38880b26e
commit
f4972121bc
@ -15,7 +15,7 @@ apiVersion: v1
|
||||
appVersion: v1.0.0
|
||||
description: OpenStack-Helm Helm-Toolkit
|
||||
name: helm-toolkit
|
||||
version: 0.2.23
|
||||
version: 0.2.24
|
||||
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:
|
||||
|
@ -62,7 +62,7 @@ examples:
|
||||
{{- include "helm-toolkit.manifests.ingress" ( dict "envAll" . "backendServiceType" "key-manager" "backendPort" "b-api" "endpoint" "public" ) -}}
|
||||
return: |
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: barbican
|
||||
@ -76,25 +76,34 @@ examples:
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
serviceName: barbican-api
|
||||
servicePort: b-api
|
||||
service:
|
||||
name: barbican-api
|
||||
port:
|
||||
name: b-api
|
||||
- host: barbican.default
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
serviceName: barbican-api
|
||||
servicePort: b-api
|
||||
service:
|
||||
name: barbican-api
|
||||
port:
|
||||
name: b-api
|
||||
- host: barbican.default.svc.cluster.local
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
serviceName: barbican-api
|
||||
servicePort: b-api
|
||||
service:
|
||||
name: barbican-api
|
||||
port:
|
||||
name: b-api
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: barbican-namespace-fqdn
|
||||
@ -112,11 +121,14 @@ examples:
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
serviceName: barbican-api
|
||||
servicePort: b-api
|
||||
service:
|
||||
name: barbican-api
|
||||
port:
|
||||
name: b-api
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: barbican-cluster-fqdn
|
||||
@ -134,9 +146,12 @@ examples:
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
serviceName: barbican-api
|
||||
servicePort: b-api
|
||||
service:
|
||||
name: barbican-api
|
||||
port:
|
||||
name: b-api
|
||||
- values: |
|
||||
network:
|
||||
api:
|
||||
@ -182,7 +197,7 @@ examples:
|
||||
{{- include "helm-toolkit.manifests.ingress" ( dict "envAll" . "backendServiceType" "key-manager" "backendPort" "b-api" "endpoint" "public" ) -}}
|
||||
return: |
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: barbican
|
||||
@ -202,23 +217,32 @@ examples:
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
serviceName: barbican-api
|
||||
servicePort: b-api
|
||||
service:
|
||||
name: barbican-api
|
||||
port:
|
||||
name: b-api
|
||||
- host: barbican.default
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
serviceName: barbican-api
|
||||
servicePort: b-api
|
||||
service:
|
||||
name: barbican-api
|
||||
port:
|
||||
name: b-api
|
||||
- host: barbican.default.svc.cluster.local
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
serviceName: barbican-api
|
||||
servicePort: b-api
|
||||
service:
|
||||
name: barbican-api
|
||||
port:
|
||||
name: b-api
|
||||
- values: |
|
||||
cert_issuer_type: issuer
|
||||
network:
|
||||
@ -273,7 +297,7 @@ examples:
|
||||
{{- include "helm-toolkit.manifests.ingress" ( dict "envAll" . "backendServiceType" "key-manager" "backendPort" "b-api" "endpoint" "public" "certIssuer" "ca-issuer" ) -}}
|
||||
return: |
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: barbican
|
||||
@ -295,23 +319,32 @@ examples:
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
serviceName: barbican-api
|
||||
servicePort: b-api
|
||||
service:
|
||||
name: barbican-api
|
||||
port:
|
||||
name: b-api
|
||||
- host: barbican.default
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
serviceName: barbican-api
|
||||
servicePort: b-api
|
||||
service:
|
||||
name: barbican-api
|
||||
port:
|
||||
name: b-api
|
||||
- host: barbican.default.svc.cluster.local
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
serviceName: barbican-api
|
||||
servicePort: b-api
|
||||
service:
|
||||
name: barbican-api
|
||||
port:
|
||||
name: b-api
|
||||
|
||||
- values: |
|
||||
network:
|
||||
@ -366,7 +399,7 @@ examples:
|
||||
{{- include "helm-toolkit.manifests.ingress" ( dict "envAll" . "backendServiceType" "key-manager" "backendPort" "b-api" "endpoint" "public" "certIssuer" "ca-issuer") -}}
|
||||
return: |
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: barbican
|
||||
@ -388,23 +421,32 @@ examples:
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
serviceName: barbican-api
|
||||
servicePort: b-api
|
||||
service:
|
||||
name: barbican-api
|
||||
port:
|
||||
name: b-api
|
||||
- host: barbican.default
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
serviceName: barbican-api
|
||||
servicePort: b-api
|
||||
service:
|
||||
name: barbican-api
|
||||
port:
|
||||
name: b-api
|
||||
- host: barbican.default.svc.cluster.local
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
serviceName: barbican-api
|
||||
servicePort: b-api
|
||||
service:
|
||||
name: barbican-api
|
||||
port:
|
||||
name: b-api
|
||||
# Sample usage for multiple DNS names associated with the same public
|
||||
# endpoint and certificate
|
||||
- values: |
|
||||
@ -441,7 +483,7 @@ examples:
|
||||
{{ $ingressOpts | include "helm-toolkit.manifests.ingress" }}
|
||||
return: |
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: grafana
|
||||
@ -455,25 +497,34 @@ examples:
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
serviceName: grafana-dashboard
|
||||
servicePort: dashboard
|
||||
service:
|
||||
name: grafana-dashboard
|
||||
port:
|
||||
name: dashboard
|
||||
- host: grafana.default
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
serviceName: grafana-dashboard
|
||||
servicePort: dashboard
|
||||
service:
|
||||
name: grafana-dashboard
|
||||
port:
|
||||
name: dashboard
|
||||
- host: grafana.default.svc.cluster.local
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
serviceName: grafana-dashboard
|
||||
servicePort: dashboard
|
||||
service:
|
||||
name: grafana-dashboard
|
||||
port:
|
||||
name: dashboard
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: grafana-namespace-fqdn
|
||||
@ -492,18 +543,24 @@ examples:
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
serviceName: grafana-dashboard
|
||||
servicePort: dashboard
|
||||
service:
|
||||
name: grafana-dashboard
|
||||
port:
|
||||
name: dashboard
|
||||
- host: grafana-alt.openstackhelm.example
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
serviceName: grafana-dashboard
|
||||
servicePort: dashboard
|
||||
service:
|
||||
name: grafana-dashboard
|
||||
port:
|
||||
name: dashboard
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: grafana-cluster-fqdn
|
||||
@ -522,16 +579,22 @@ examples:
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
serviceName: grafana-dashboard
|
||||
servicePort: dashboard
|
||||
service:
|
||||
name: grafana-dashboard
|
||||
port:
|
||||
name: dashboard
|
||||
- host: grafana-alt.openstackhelm.example
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
serviceName: grafana-dashboard
|
||||
servicePort: dashboard
|
||||
service:
|
||||
name: grafana-dashboard
|
||||
port:
|
||||
name: dashboard
|
||||
|
||||
*/}}
|
||||
|
||||
@ -543,9 +606,16 @@ examples:
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
serviceName: {{ $backendName }}
|
||||
servicePort: {{ $backendPort }}
|
||||
service:
|
||||
name: {{ $backendName }}
|
||||
port:
|
||||
{{- if or (kindIs "int" $backendPort) (regexMatch "^[0-9]{1,5}$" $backendPort) }}
|
||||
number: {{ $backendPort | int }}
|
||||
{{- else }}
|
||||
name: {{ $backendPort | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "helm-toolkit.manifests.ingress" -}}
|
||||
@ -564,7 +634,7 @@ examples:
|
||||
{{- $certIssuerType = $envAll.Values.cert_issuer_type }}
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ $ingressName }}
|
||||
@ -618,7 +688,7 @@ spec:
|
||||
{{- range $key2, $ingressController := tuple "namespace" "cluster" }}
|
||||
{{- $vHosts := list $hostNameFull }}
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ printf "%s-%s-%s" $ingressName $ingressController "fqdn" }}
|
||||
|
@ -15,7 +15,7 @@ apiVersion: v1
|
||||
appVersion: v0.42.0
|
||||
description: OpenStack-Helm Ingress Controller
|
||||
name: ingress
|
||||
version: 0.2.4
|
||||
version: 0.2.5
|
||||
home: https://github.com/kubernetes/ingress
|
||||
sources:
|
||||
- https://github.com/kubernetes/ingress
|
||||
|
@ -18,8 +18,10 @@ limitations under the License.
|
||||
{{- if empty (index .Values.network.ingress.annotations "kubernetes.io/ingress.class") -}}
|
||||
{{- $_ := set .Values.network.ingress.annotations "kubernetes.io/ingress.class" .Values.deployment.cluster.class -}}
|
||||
{{- end -}}
|
||||
{{- $serviceName := tuple "ingress" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" -}}
|
||||
{{- $servicePort := tuple "ingress" "internal" "http" . | include "helm-toolkit.endpoints.endpoint_port_lookup" -}}
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ .Release.Namespace }}-{{ .Release.Name }}
|
||||
@ -31,8 +33,15 @@ spec:
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
serviceName: {{ tuple "ingress" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
|
||||
servicePort: {{ tuple "ingress" "internal" "http" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
service:
|
||||
name: {{ $serviceName }}
|
||||
port:
|
||||
{{- if or (kindIs "int" $servicePort) (regexMatch "^[0-9]{1,5}$" $servicePort) }}
|
||||
number: {{ $servicePort | int }}
|
||||
{{- else }}
|
||||
name: {{ $servicePort | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
@ -30,4 +30,5 @@ helm-toolkit:
|
||||
- 0.2.21 Fix issue with db backup error return code being eaten
|
||||
- 0.2.22 Add ability to set labels to add to resources
|
||||
- 0.2.23 Helm 3 - Fix Job labels
|
||||
- 0.2.24 Migrate Ingress resources to networking.k8s.io/v1
|
||||
...
|
||||
|
@ -8,4 +8,5 @@ ingress:
|
||||
- 0.2.2 Use full image ref for docker official images
|
||||
- 0.2.3 Uplift ingress to 0.42.0
|
||||
- 0.2.4 Update htk requirements
|
||||
- 0.2.5 Migrate Ingress resources to networking.k8s.io/v1
|
||||
...
|
||||
|
Loading…
x
Reference in New Issue
Block a user