Major version release of Chart

This commit is contained in:
Skyler Mäntysaari 2023-03-04 01:52:18 +02:00
parent 47f493949d
commit 3c9966560d
18 changed files with 524 additions and 117 deletions

View file

@ -4,10 +4,10 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "ytproxy.names.fullname" . }}
{{- with (merge (.Values.ytproxy.labels | default dict) (include "common.labels" $ | fromYaml)) }}
{{- with (merge (.Values.ytproxy.labels | default dict) (include "bjw-s.common.lib.metadata.allLabels" $ | fromYaml)) }}
labels: {{- toYaml . | nindent 4 }}
{{- end }}
{{- with (merge (.Values.ytproxy.annotations | default dict) (include "common.annotations" $ | fromYaml)) }}
{{- with (merge (.Values.ytproxy.annotations | default dict) (include "bjw-s.common.lib.metadata.globalAnnotations" $ | fromYaml)) }}
annotations: {{- toYaml . | nindent 4 }}
{{- end }}
spec:

View file

@ -16,61 +16,53 @@
{{- $primaryService := .Values.ytproxy.service.main -}}
{{- $defaultServiceName := "piped-ytproxy" -}}
{{- $defaultServicePort := get $primaryService.ports (include "common.classes.service.ports.primary" (dict "values" $primaryService)) -}}
{{- $isStable := include "common.capabilities.ingress.isStable" . }}
{{- $defaultServicePort := get $primaryService.ports (include "bjw-s.common.lib.service.primaryPort" (dict "values" $primaryService)) -}}
---
apiVersion: {{ include "common.capabilities.ingress.apiVersion" . }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $ingressName }}-ytproxy
{{- with (merge ($values.labels | default dict) (include "common.labels" $ | fromYaml)) }}
{{- with (merge ($values.labels | default dict) (include "bjw-s.common.lib.metadata.allLabels" $ | fromYaml)) }}
labels: {{- toYaml . | nindent 4 }}
{{- end }}
{{- with (merge ($values.annotations | default dict)) }}
{{- with (merge ($values.annotations | default dict) (include "bjw-s.common.lib.metadata.globalAnnotations" $ | fromYaml)) }}
annotations: {{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if and $isStable $values.ingressClassName }}
{{- if $values.ingressClassName }}
ingressClassName: {{ $values.ingressClassName }}
{{- end }}
{{- if $values.tls }}
{{- end }}
{{- if $values.tls }}
tls:
{{- range $values.tls }}
{{- range $values.tls }}
- hosts:
{{- range .hosts }}
{{- range .hosts }}
- {{ tpl . $ | quote }}
{{- end }}
{{- if .secretName }}
{{- end }}
{{- if .secretName }}
secretName: {{ tpl .secretName $ | quote}}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
rules:
{{- range $values.hosts }}
{{- range $values.hosts }}
- host: {{ tpl .host $ | quote }}
http:
paths:
{{- range .paths }}
{{- $service := $defaultServiceName -}}
{{- $port := $defaultServicePort.port -}}
{{- if .service -}}
{{- $service = default $service .service.name -}}
{{- $port = default $port .service.port -}}
{{- end }}
- path: {{ tpl .path $ | quote }}
{{- if $isStable }}
pathType: {{ default "Prefix" .pathType }}
{{- range .paths }}
{{- $service := $defaultServiceName -}}
{{- $port := $defaultServicePort.port -}}
{{- if .service -}}
{{- $service = default $service .service.name -}}
{{- $port = default $port .service.port -}}
{{- end }}
- path: {{ tpl .path $ | quote }}
pathType: {{ default "Prefix" .pathType }}
backend:
{{- if $isStable }}
service:
name: {{ $service }}
port:
number: {{ $port }}
{{- else }}
serviceName: {{ $service }}
servicePort: {{ $port }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}