Closed kundeng closed 1 month ago
here is the plan that used to work:
parameters:
cluster: devk
domain: bayeslearner.org
#number: 2
network: devk
cidr: 192.168.123.0/24
{{ network }}:
type: network
cidr: {{ cidr }}
{% set num = 0 %}
{% set api_ip = cidr|network_ip(200 + num ) %}
{% set cluster = 'devk' %}
{{cluster}}:
cluster: {{cluster}}
type: cluster
kubetype: openshift
domain: {{ domain }}
ctlplanes: 3
workers: 0 # single node
disk_size: 100
#extra_ctlplane_disks: [50]
#extra_disks: [50]
api_ip: {{ api_ip }}
numcpus: 4
memory: 20480
nfs_sc: True
network: {{network}}
apps:
- nfs
api-{{cluster}}:
type: dns
net: {{ network }}
ip: {{ api_ip }}
alias:
- api.{{ cluster }}.{{ domain }}
- api-int.{{ cluster }}.{{ domain }}
{% if num == 0 %}
apps-{{cluster}}:
type: dns
net: {{ network }}
ip: {{ api_ip }}
alias:
- console-openshift-console.apps.{{ cluster }}.{{ domain }}
- oauth-openshift.apps.{{ cluster }}.{{ domain }}
- prometheus-k8s-openshift-monitoring.apps.{{ cluster }}.{{ domain }}
- canary-openshift-ingress-canary.apps.{{ cluster }}.{{ domain }}
- multicloud-console.apps.{{ cluster }}.{{ domain }}
{% endif %}
fixed here
(side note: your old plan didnt fully work in the past, because you had the same key used twice. This works now because we allow the same key to be repeated when the type is different)
What key? key in the env variables or in the kcli plan?
in your example, you set cluster and network variables to both devk. So it means you rendered plan has devk repeated. In such a case, old behaviour was to silently ignore one of the entries (probably the first one), because that's how default yaml parser handles this. But I was asked to change this behaviour since it's fine to reuse the same key when the type is different
Also note I reverted for complete this env functionality. This looked appealing, but I think it's confusing for the user to have all the env variables as extra variables instead of picking selective ones
I'm getting the following error when trying to apply it: