add extra ingress option for apis and test ct-values.yaml

This commit is contained in:
Nicholas St. Germain 2020-09-05 19:49:12 -05:00
parent 5705371a35
commit 107e53d3b7
No known key found for this signature in database
GPG Key ID: 7221152119DAB1E6
3 changed files with 63 additions and 1 deletions

View File

@ -0,0 +1,7 @@
image:
organization: itscontained
repository: radarr
pullPolicy: IfNotPresent
tag: latest
service:
port: 7878

View File

@ -38,4 +38,44 @@ spec:
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- range $index, $ingress := .Values.ingress.extraIngresses }}
---
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ $fullName }}-{{ $ingress.nameSuffix | default $index }}
labels:
{{- include "media-common.labels" . | nindent 4 }}
{{- with $ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if $ingress.tls }}
tls:
{{- range $ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range $ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ . }}
backend:
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

View File

@ -53,6 +53,21 @@ ingress:
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
extraIngresses:
# - enabled: false
# nameSuffix: "api"
# annotations: {}
# # kubernetes.io/ingress.class: nginx
# # kubernetes.io/tls-acme: "true"
# labels: {}
# hosts:
# - host: chart-example.local
# paths:
# - /api
# tls: []
# # - secretName: chart-example-tls
# # hosts:
# # - chart-example.local
persistence:
# type: options are statefulset or deployment