diff --git a/tautulli/templates/ingress.yaml b/tautulli/templates/ingress.yaml index 43cd5a0..1935c5e 100644 --- a/tautulli/templates/ingress.yaml +++ b/tautulli/templates/ingress.yaml @@ -1,11 +1,7 @@ -{{- if .Values.ingress.enabled -}} +{{- if .Values.ingress.enabled }} {{- $fullName := include "tautulli.fullname" . -}} {{- $svcPort := .Values.service.port -}} -{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ $fullName }} @@ -16,26 +12,34 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: -{{- if .Values.ingress.tls }} + {{- with .Values.ingress.className }} + ingressClassName: {{ . }} + {{- end }} + {{- if .Values.ingress.tls }} tls: - {{- range .Values.ingress.tls }} + {{- range .Values.ingress.tls }} - hosts: - {{- range .hosts }} + {{- range .hosts }} - {{ . | quote }} - {{- end }} + {{- end }} secretName: {{ .secretName }} + {{- end }} {{- end }} -{{- end }} rules: - {{- range .Values.ingress.hosts }} + {{- range .Values.ingress.hosts }} - host: {{ .host | quote }} http: paths: - {{- range .paths }} - - path: {{ . }} + {{- range .paths }} + - path: {{ .path }} + {{- with .pathType }} + pathType: {{ . }} + {{- end }} backend: - serviceName: {{ $fullName }} - servicePort: {{ $svcPort }} - {{- end }} - {{- end }} + service: + name: {{ $fullName }} + port: + number: {{ $svcPort }} + {{- end }} + {{- end }} {{- end }} diff --git a/tautulli/values.yaml b/tautulli/values.yaml index 6f3f5f6..4470afc 100644 --- a/tautulli/values.yaml +++ b/tautulli/values.yaml @@ -35,17 +35,18 @@ service: port: 8181 ingress: - enabled: false + enabled: true + className: traefik annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" hosts: - - host: chart-example.local - paths: [] - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local + - host: tautulli.ervine.cloud + paths: + - path: / + pathType: Prefix + tls: + - secretName: tautulli-ervine-cloud-tls + hosts: + - tautulli.ervine.cloud resources: # We usually recommend not to specify default resources and to leave this as a conscious