Cast manage_replicas to bool (#1893)

This commit is contained in:
Ricardo Carrillo Cruz
2024-06-06 14:43:20 +02:00
committed by GitHub
parent c696eda50a
commit 01bde2cebb
2 changed files with 4 additions and 4 deletions

View File

@@ -8,9 +8,9 @@ metadata:
{{ lookup("template", "../common/templates/labels/common.yaml.j2") | indent(width=4) | trim }} {{ lookup("template", "../common/templates/labels/common.yaml.j2") | indent(width=4) | trim }}
{{ lookup("template", "../common/templates/labels/version.yaml.j2") | indent(width=4) | trim }} {{ lookup("template", "../common/templates/labels/version.yaml.j2") | indent(width=4) | trim }}
spec: spec:
{% if task_replicas != '' and task_manage_replicas is true %} {% if task_replicas != '' and task_manage_replicas | bool %}
replicas: {{ task_replicas }} replicas: {{ task_replicas }}
{% elif replicas != '' and task_manage_replicas is true %} {% elif replicas != '' and task_manage_replicas | bool %}
replicas: {{ replicas }} replicas: {{ replicas }}
{% endif %} {% endif %}
selector: selector:

View File

@@ -9,9 +9,9 @@ metadata:
{{ lookup("template", "../common/templates/labels/common.yaml.j2") | indent(width=4) | trim }} {{ lookup("template", "../common/templates/labels/common.yaml.j2") | indent(width=4) | trim }}
{{ lookup("template", "../common/templates/labels/version.yaml.j2") | indent(width=4) | trim }} {{ lookup("template", "../common/templates/labels/version.yaml.j2") | indent(width=4) | trim }}
spec: spec:
{% if web_replicas != '' and web_manage_replicas is true %} {% if web_replicas != '' and web_manage_replicas | bool %}
replicas: {{ web_replicas }} replicas: {{ web_replicas }}
{% elif replicas != '' and web_manage_replicas is true %} {% elif replicas != '' and web_manage_replicas | bool %}
replicas: {{ replicas }} replicas: {{ replicas }}
{% endif %} {% endif %}
selector: selector: