|
|
|
@ -215,14 +215,14 @@ const defaultIgnore = `# Patterns to ignore when building packages.
|
|
|
|
|
const defaultIngress = `{{- if .Values.ingress.enabled -}}
|
|
|
|
|
{{- $fullName := include "<CHARTNAME>.fullname" . -}}
|
|
|
|
|
{{- $svcPort := .Values.service.port -}}
|
|
|
|
|
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
|
|
|
|
|
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.Version)) }}
|
|
|
|
|
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
|
|
|
|
|
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
|
|
|
|
|
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version -}}
|
|
|
|
|
apiVersion: networking.k8s.io/v1
|
|
|
|
|
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
|
|
|
|
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.Version -}}
|
|
|
|
|
apiVersion: networking.k8s.io/v1beta1
|
|
|
|
|
{{- else -}}
|
|
|
|
|
apiVersion: extensions/v1beta1
|
|
|
|
@ -237,7 +237,7 @@ metadata:
|
|
|
|
|
{{- toYaml . | nindent 4 }}
|
|
|
|
|
{{- end }}
|
|
|
|
|
spec:
|
|
|
|
|
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
|
|
|
|
|
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.Version) }}
|
|
|
|
|
ingressClassName: {{ .Values.ingress.className }}
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{- if .Values.ingress.tls }}
|
|
|
|
@ -257,11 +257,11 @@ spec:
|
|
|
|
|
paths:
|
|
|
|
|
{{- range .paths }}
|
|
|
|
|
- path: {{ .path }}
|
|
|
|
|
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
|
|
|
|
|
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.Version) }}
|
|
|
|
|
pathType: {{ .pathType }}
|
|
|
|
|
{{- end }}
|
|
|
|
|
backend:
|
|
|
|
|
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
|
|
|
|
|
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.Version }}
|
|
|
|
|
service:
|
|
|
|
|
name: {{ $fullName }}
|
|
|
|
|
port:
|
|
|
|
|