Files
dokku/plugins/scheduler-k3s/templates/chart/certificate.yaml
T
Jose Diaz-Gonzalez f5f583b12b feat: add support for specifying annotations
As the command contains a colon, it must be handled in the commands binary as opposed to subcommands.

Also include a simple bats test.
2024-02-06 13:54:53 -05:00

41 lines
1.4 KiB
YAML

{{- $processName := "PROCESS_NAME" }}
{{- $config := index .Values.processes "PROCESS_NAME" }}
{{- if and $config.web.tls.enabled $config.web.domains }}
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
annotations:
dokku.com/managed: "true"
{{- if and $.Values.global.annotations $.Values.global.annotations.certificate }}
{{- range $k, $v := $.Values.global.annotations.certificate }}
{{ $k }}: {{ $v | quote }}
{{- end }}
{{- end }}
{{- if and $config.annotations $config.annotations.certificate }}
{{- range $k, $v := $config.annotations.certificate }}
{{ $k }}: {{ $v | quote }}
{{- end }}
{{- end }}
labels:
app.kubernetes.io/name: {{ $.Values.global.app_name }}-{{ $processName }}
app.kubernetes.io/part-of: {{ $.Values.global.app_name }}
name: {{ $.Values.global.app_name }}-{{ $processName }}
namespace: {{ $.Values.global.namespace }}
spec:
issuerRef:
kind: ClusterIssuer
name: {{ $config.web.tls.issuer_name }}
secretName: tls-{{ $.Values.global.app_name }}-{{ $processName }}
secretTemplate:
annotations:
dokku.com/managed: "true"
labels:
app.kubernetes.io/name: {{ $.Values.global.app_name }}-{{ $processName }}
app.kubernetes.io/part-of: {{ $.Values.global.app_name }}
dnsNames:
{{- range $config.web.domains }}
- {{ . }}
{{- end }}
{{- end }}