From a11f3f640baa270972221a17fe6516db8f962db4 Mon Sep 17 00:00:00 2001 From: Armand Grillet Date: Tue, 14 Jan 2020 17:46:45 +0100 Subject: [PATCH] traefik: remove useless objects if useCertManager --- 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 62afccd95b..5dbb664b51 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 28754300a4..4540b1d84e 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 de9bfb9ce3..80cc6e1842 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 }}