-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support to basic ingress controller
Ingress controller support for the stardog helm chart. (Issue #79)
- Loading branch information
1 parent
4017033
commit 79f58a0
Showing
2 changed files
with
83 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,65 @@ | ||
{{- if .Values.ingress.enabled -}} | ||
{{- $fullName := include "stardog.fullname" . -}} | ||
{{- $httpPort := .Values.ports.server -}} | ||
{{- $pathtype := .Values.ingress.pathtype -}} | ||
{{- $ingressPath := .Values.ingress.path -}} | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: {{ $fullName }}-ingress | ||
namespace: {{ include "stardog.namespace" . }} | ||
labels: | ||
app: {{ .Chart.Name }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
{{- with .Values.ingress.annotations }} | ||
annotations: | ||
{{ toYaml . | indent 4 }} | ||
{{- end }} | ||
spec: | ||
{{- if .Values.ingress.className }} | ||
ingressClassName: {{ .Values.ingress.className | quote }} | ||
{{- end }} | ||
{{- if .Values.ingress.tls }} | ||
tls: | ||
{{- if .ingressPath }} | ||
{{- range .Values.ingress.tls }} | ||
- hosts: | ||
{{- range .hosts }} | ||
- {{ . }} | ||
{{- end }} | ||
secretName: {{ .secretName }} | ||
{{- end }} | ||
{{- else }} | ||
{{ toYaml .Values.ingress.tls | indent 4 }} | ||
{{- end }} | ||
{{- end}} | ||
rules: | ||
{{- range .Values.ingress.hosts }} | ||
{{- if $ingressPath }} | ||
- host: {{ . }} | ||
http: | ||
paths: | ||
- path: {{ $ingressPath }} | ||
pathType: {{ $pathtype }} | ||
backend: | ||
service: | ||
name: {{ $fullName }} | ||
port: | ||
number: {{ $httpPort }} | ||
{{- else }} | ||
- host: {{ .host }} | ||
http: | ||
paths: | ||
{{- range .paths }} | ||
- path: {{ .path }} | ||
pathType: {{ $pathtype }} | ||
backend: | ||
service: | ||
name: {{ $fullName }} | ||
port: | ||
number: {{ $httpPort }} | ||
{{- 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