-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the ingress host field optional (#94)
* Make the ingress host field optional * Bump chart version to 0.1.26 * Remove leftover labels * Fix blobvault ingress annotation * Make TLS depend on hostnameEnabled * Fix comparator
- Loading branch information
Showing
4 changed files
with
63 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{{- if .Values.global.ingress.enabled -}} | ||
{{- if and .Values.global.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} | ||
{{- if not (hasKey .Values.global.ingress.annotations "kubernetes.io/ingress.class") }} | ||
{{- $_ := set .Values.global.ingress.annotations "kubernetes.io/ingress.class" .Values.global.ingress.className}} | ||
{{- end }} | ||
{{- end }} | ||
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} | ||
apiVersion: networking.k8s.io/v1 | ||
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} | ||
apiVersion: networking.k8s.io/v1beta1 | ||
{{- else -}} | ||
apiVersion: extensions/v1beta1 | ||
{{- end }} | ||
kind: Ingress | ||
metadata: | ||
name: blobvault | ||
annotations: | ||
nginx.ingress.kubernetes.io/rewrite-target: /$2 | ||
{{- with .Values.global.ingress.annotations }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
{{- if and .Values.global.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} | ||
ingressClassName: {{ .Values.global.ingress.className }} | ||
{{- end }} | ||
{{- if and .Values.global.ingress.tlsEnabled .Values.global.ingress.hostnameEnabled }} | ||
tls: | ||
- hosts: | ||
- {{ .Values.global.host }} | ||
secretName: {{ .Values.global.ingress.tlsSecretName }} | ||
{{- end }} | ||
rules: | ||
- http: | ||
paths: | ||
- path: /blobvault(/|$)(.*) | ||
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }} | ||
pathType: ImplementationSpecific | ||
{{- end }} | ||
backend: | ||
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }} | ||
service: | ||
name: {{ .Release.Name }}-nginx | ||
port: | ||
name: http | ||
{{- else }} | ||
serviceName: {{ .Release.Name }}-nginx | ||
servicePort: 80 | ||
{{- end }} | ||
{{- if .Values.global.ingress.hostnameEnabled }} | ||
host: {{ .Values.global.host }} | ||
{{- end }} | ||
{{- end }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters