adding conditional to checksum template and removing default for public_base_url to fix undefined variable

This commit is contained in:
aknochow
2024-12-02 10:27:45 -05:00
committed by Dimitri Savineau
parent 6ab32a42cf
commit 5d0f91ec13
2 changed files with 3 additions and 2 deletions

View File

@@ -2012,7 +2012,6 @@ spec:
public_base_url:
description: Public base URL
type: string
default: ''
type: object
status:
properties:

View File

@@ -29,12 +29,14 @@ spec:
kubectl.kubernetes.io/default-container: '{{ ansible_operator_meta.name }}-web'
{% for template in [
"configmaps/config.yaml",
"configmaps/redirect-page.configmap.html",
"secrets/app_credentials.yaml",
"storage/persistent.yaml",
] %}
checksum-{{ template | replace('/', '-') }}: "{{ lookup('template', template + '.j2') | sha1 }}"
{% endfor %}
{% if public_base_url is defined %}
checksum-configmaps-redirect-page.configmap.html: "{{ lookup('template', 'configmaps/redirect-page.configmap.html.j2') | sha1 }}"
{% endif %}
{% for secret in [
"bundle_cacert",
"route_tls",