-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* GEO-6100: add ingress * Remove versions crap * Spec ingress enabled per service * Use dollar as scope * Fix tests
- Loading branch information
Showing
4 changed files
with
163 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{{- if eq $.Values.ingress.enabled true -}} | ||
{{- $fullName := include "common.fullname" ( dict "root" $ "service" $.Values ) -}} | ||
{{- range $hostGroupName, $hostGroupDefinition := $.Values.ingress.hostGroups }} | ||
--- | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: {{ $fullName }}-{{ $hostGroupName }} | ||
{{- include "common.metadata" ( dict "root" $ "service" $.Values ) | nindent 2 }} | ||
spec: | ||
# Add tls only if ingress.tls.enabled is set to true and the other fields are complete. | ||
{{- if and ( hasKey $hostGroupDefinition "tls" ) ( eq $hostGroupDefinition.tls.enabled true ) }} | ||
tls: | ||
- hosts: | ||
{{- range $hostGroupDefinition.hosts }} | ||
- {{ . | quote }} | ||
{{- end }} | ||
{{- if $hostGroupDefinition.tls.secretName }} | ||
secretName: {{ $hostGroupDefinition.tls.secretName }} | ||
{{- else }} | ||
secretName: {{ $fullName }}-{{ $hostGroupName }} | ||
{{- end }} | ||
{{- end }} | ||
rules: | ||
{{- range $hostGroupDefinition.hosts }} | ||
- host: {{ . | quote }} | ||
http: | ||
paths: | ||
{{- range $serviceName, $serviceDefinition := $.Values.services }} | ||
{{- if and (eq $serviceDefinition.enabled true) (eq $serviceDefinition.ingress.enabled true) }} | ||
- path: "{{ $serviceDefinition.ingress.path }}" | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: {{ include "common.fullname" ( dict "root" $ "service" $serviceDefinition "serviceName" $serviceName ) }} | ||
port: | ||
number: {{ $serviceDefinition.service.servicePort | default 80 }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
{{- 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
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