mirror of
https://github.com/truecharts/library-charts.git
synced 2026-07-03 16:39:14 -03:00
init certManager
This commit is contained in:
@@ -21,6 +21,8 @@ tests:
|
||||
global:
|
||||
traefik:
|
||||
addIngressAnnotations: false
|
||||
certManager:
|
||||
addIngressAnnotations: false
|
||||
ingress:
|
||||
my-ingress1:
|
||||
enabled: true
|
||||
|
||||
@@ -16,6 +16,8 @@ tests:
|
||||
global:
|
||||
traefik:
|
||||
addIngressAnnotations: false
|
||||
certManager:
|
||||
addIngressAnnotations: false
|
||||
labels:
|
||||
g_label1: global_label1
|
||||
g_label2: "{{ .Values.label2 }}"
|
||||
|
||||
@@ -20,7 +20,7 @@ objectData: The object data to be used to render the Ingress.
|
||||
{{- $_ := set $objectData "annotations" dict -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* include "tc.v1.common.lib.ingress.integration.certManager" (dict "rootCtx" $rootCtx "objectData" $objectData) */ -}}
|
||||
{{- include "tc.v1.common.lib.ingress.integration.certManager" (dict "rootCtx" $rootCtx "objectData" $objectData) -}}
|
||||
{{- include "tc.v1.common.lib.ingress.integration.traefik" (dict "rootCtx" $rootCtx "objectData" $objectData) -}}
|
||||
{{- include "tc.v1.common.lib.ingress.integration.homepage" (dict "rootCtx" $rootCtx "objectData" $objectData) -}}
|
||||
{{/* TODO: fix last - */}}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
{{- define "tc.v1.common.lib.ingress.integration.certManager" -}}
|
||||
{{- $objectData := .objectData -}}
|
||||
{{- $rootCtx := .rootCtx -}}
|
||||
|
||||
{{- $certManager := $objectData.integrations.certManager -}}
|
||||
|
||||
{{- $enabled := false -}}
|
||||
{{- if (hasKey $rootCtx.Values.global "certManager") -}}
|
||||
{{- $enabled = $rootCtx.Values.global.certManager.addIngressAnnotations -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if and $certManager (kindIs "bool" $certManager.enabled) -}}
|
||||
{{- $enabled = $certManager.enabled -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if $enabled -}}
|
||||
{{- include "tc.v1.common.lib.ingress.integration.certManager.validate" (dict "objectData" $objectData) -}}
|
||||
|
||||
{{- $_ := set $objectData.annotations "cert-manager.io/cluster-issuer" "TODO:" -}}
|
||||
{{- $_ := set $objectData.annotations "cert-manager.io/private-key-rotation-policy" "Always" -}}
|
||||
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "tc.v1.common.lib.ingress.integration.certManager.validate" -}}
|
||||
{{- $objectData := .objectData -}}
|
||||
|
||||
{{- $certManager := $objectData.integrations.certManager -}}
|
||||
|
||||
{{- if $certManager -}}
|
||||
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -10,6 +10,9 @@ global:
|
||||
metallb:
|
||||
# -- Adds metalLB annotations to services
|
||||
addServiceAnnotations: true
|
||||
certManager:
|
||||
# -- Adds cert-manager annotations to ingresses
|
||||
addIngressAnnotations: true
|
||||
traefik:
|
||||
# -- Adds traefik annotations to services (when needed)
|
||||
addServiceAnnotations: true
|
||||
|
||||
Reference in New Issue
Block a user