From d62fc7ca36b3698fff48fadfe14bc27b9e7b2b6c Mon Sep 17 00:00:00 2001 From: Armand Grillet Date: Tue, 14 Jan 2020 17:46:45 +0100 Subject: [PATCH] traefik: add objects depending on useCertManager The certificate and associated jobs do not need to be created if we do not use cert-manager. --- staging/traefik/Chart.yaml | 2 +- staging/traefik/templates/certificate.yaml | 3 ++- staging/traefik/templates/init-cert-job.yaml | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/staging/traefik/Chart.yaml b/staging/traefik/Chart.yaml index 62afccd95..5dbb664b5 100644 --- a/staging/traefik/Chart.yaml +++ b/staging/traefik/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: traefik -version: 1.72.10 +version: 1.72.11 appVersion: 1.7.12 description: A Traefik based Kubernetes ingress controller with Let's Encrypt support keywords: diff --git a/staging/traefik/templates/certificate.yaml b/staging/traefik/templates/certificate.yaml index 28754300a..4540b1d84 100644 --- a/staging/traefik/templates/certificate.yaml +++ b/staging/traefik/templates/certificate.yaml @@ -1,3 +1,4 @@ +{{- if .Values.ssl.useCertManager }} apiVersion: certmanager.k8s.io/v1alpha1 kind: Certificate metadata: @@ -31,4 +32,4 @@ spec: # The commonName will get replaced by kubeaddons-config # init-container for traefik commonName: traefik.localhost.localdomain - +{{- end }} diff --git a/staging/traefik/templates/init-cert-job.yaml b/staging/traefik/templates/init-cert-job.yaml index de9bfb9ce..80cc6e184 100644 --- a/staging/traefik/templates/init-cert-job.yaml +++ b/staging/traefik/templates/init-cert-job.yaml @@ -1,3 +1,4 @@ +{{- if .Values.ssl.useCertManager }} apiVersion: batch/v1 kind: Job metadata: @@ -39,3 +40,4 @@ spec: value: "konvoyconfig-kubeaddons" - name: "TRAEFIK_CLUSTER_HOSTNAME_KEY" value: "clusterHostname" +{{- end }}