Skip to content
Snippets Groups Projects
Verified Commit 8477b491 authored by David Hoese's avatar David Hoese
Browse files

Update ingress definition from v1beta1 to v1 specification

parent 6498dbf8
No related branches found
No related tags found
No related merge requests found
{{- if .Values.ingress.enabled -}} {{- if .Values.ingress.enabled -}}
{{- $fullName := include "helm-nginx-example.fullname" . -}} {{- $fullName := include "helm-nginx-example.fullname" . -}}
{{- $svcPort := .Values.service.port -}} {{- $svcPort := .Values.service.port -}}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} apiVersion: networking.k8s.io/v1
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress kind: Ingress
metadata: metadata:
name: {{ $fullName }} name: {{ $fullName }}
...@@ -33,9 +29,12 @@ spec: ...@@ -33,9 +29,12 @@ spec:
paths: paths:
{{- range .paths }} {{- range .paths }}
- path: {{ .path }} - path: {{ .path }}
pathType: Prefix
backend: backend:
serviceName: {{ $fullName }} service:
servicePort: {{ $svcPort }} name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end }} {{- end }}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment