From f4ce1c8681f392801a6ecc4b19b4b3b8e4f518fd Mon Sep 17 00:00:00 2001 From: "Gupta, Sangeet (sg774j)" Date: Thu, 25 Mar 2021 22:16:18 +0000 Subject: [PATCH] HTK: Override the expiry of Ingress TLS certificate v1.2.0 of cert-manager noew supports overriding the default value of ingress certificate expiry via annotations. This PS add the required annotation. Change-Id: Ic81e47f24d4e488eb4fc09688c36a6cea324e9e2 --- helm-toolkit/Chart.yaml | 2 +- helm-toolkit/templates/manifests/_ingress.tpl | 4 ++++ releasenotes/notes/helm-toolkit.yaml | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/helm-toolkit/Chart.yaml b/helm-toolkit/Chart.yaml index fd184d924..2df7ddd5e 100644 --- a/helm-toolkit/Chart.yaml +++ b/helm-toolkit/Chart.yaml @@ -15,7 +15,7 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Helm-Toolkit name: helm-toolkit -version: 0.2.7 +version: 0.2.8 home: https://docs.openstack.org/openstack-helm icon: https://www.openstack.org/themes/openstack/images/project-mascots/OpenStack-Helm/OpenStack_Project_OpenStackHelm_vertical.png sources: diff --git a/helm-toolkit/templates/manifests/_ingress.tpl b/helm-toolkit/templates/manifests/_ingress.tpl index 853aa23e4..2d62a1701 100644 --- a/helm-toolkit/templates/manifests/_ingress.tpl +++ b/helm-toolkit/templates/manifests/_ingress.tpl @@ -573,6 +573,10 @@ metadata: {{- if $certIssuer }} cert-manager.io/{{ $certIssuerType }}: {{ $certIssuer }} certmanager.k8s.io/{{ $certIssuerType }}: {{ $certIssuer }} +{{- $slice := index $envAll.Values.endpoints $backendServiceType "host_fqdn_override" "default" "tls" -}} +{{- if (hasKey $slice "duration") }} + cert-manager.io/duration: {{ index $slice "duration" }} +{{- end }} {{- end }} {{ toYaml (index $envAll.Values.network $backendService "ingress" "annotations") | indent 4 }} spec: diff --git a/releasenotes/notes/helm-toolkit.yaml b/releasenotes/notes/helm-toolkit.yaml index 5e04cb949..243cf3eca 100644 --- a/releasenotes/notes/helm-toolkit.yaml +++ b/releasenotes/notes/helm-toolkit.yaml @@ -14,4 +14,5 @@ helm-toolkit: - 0.2.5 Added logic to support cert-manager versioning - 0.2.6 Add metadata in job templates - 0.2.7 Replace brace expansion with more standardized Posix approach + - 0.2.8 Override the expiry of Ingress TLS certificate ...