Skip to content

Commit 61c908b

Browse files
evallespdanpawlik
authored andcommitted
Make worker-Nodes take preference in nncp ci_kustomize
As for example in 3+3 scenarios, we want to run all openstack namespaces pods in the worker nodes. As we have different type of nodes: ocp, crc and ocp-worker; we want to select the nodes by taking precedende to worker nodes if defined. If not, we want to check if it's a SNO crc deployment, and lastly, we'll go by typical scenarios where the control-plane, master and workers in the same nodes.
1 parent 26f3988 commit 61c908b

File tree

16 files changed

+125
-15
lines changed

16 files changed

+125
-15
lines changed

roles/ci_dcn_site/templates/network-values/values.yaml.j2

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
{% set ns = namespace(interfaces={},
44
ocp_index=0,
55
lb_tools={}) %}
6+
{% if cifmw_networking_env_definition.instances.keys() | select('match', '^ocp-worker') | list | length > 0 %}
7+
{% set filter="^ocp-worker" %}
8+
{% elif cifmw_networking_env_definition.instances.keys() | select('match', 'crc') | list | length > 0 %}
9+
{% set filter="^crc" %}
10+
{% else %}
11+
{% set filter="^ocp" %}
12+
{% endif %}
613
data:
714
{% for host in cifmw_networking_env_definition.instances.keys() -%}
815
{% for network in cifmw_networking_env_definition.instances[host]['networks'].values() -%}
@@ -13,7 +20,7 @@ data:
1320
},
1421
recursive=true) -%}
1522
{% endfor -%}
16-
{% if host is match('^(ocp|crc).*') %}
23+
{% if host is match(filter) %}
1724
node_{{ ns.ocp_index }}:
1825
{% set ns.ocp_index = ns.ocp_index+1 %}
1926
name: {{ cifmw_networking_env_definition.instances[host]['hostname'] }}

roles/ci_gen_kustomize_values/templates/bgp-l3-xl/network-values/values.yaml.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
{% set ns = namespace(interfaces={},
44
ocp_index=0,
55
lb_tools={}) %}
6+
67
data:
78
{% set node_groups = groups if 'rhoso-architecture-validate' not in ((zuul | default({})).job | default('')) else test_groups %}
89
{% for host in cifmw_networking_env_definition.instances.keys() -%}

roles/ci_gen_kustomize_values/templates/bgp_dt01/network-values/values.yaml.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
{% set ns = namespace(interfaces={},
44
ocp_index=0,
55
lb_tools={}) %}
6+
67
data:
78
{% set node_groups = groups if 'rhoso-architecture-validate' not in ((zuul | default({})).job | default('')) else test_groups %}
89
{% for host in cifmw_networking_env_definition.instances.keys() -%}

roles/ci_gen_kustomize_values/templates/bmo01/network-values/values.yaml.j2

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,17 @@
22
# source: bmo01/network-values/values.yaml.j2
33
{% set _ipv = cifmw_ci_gen_kustomize_values_ip_version_var_mapping %}
44
{% set ns = namespace(ocp_index=0) %}
5+
6+
{% if cifmw_networking_env_definition.instances.keys() | select('match', '^ocp-worker') | list | length > 0 %}
7+
{% set filter="^ocp-worker" %}
8+
{% elif cifmw_networking_env_definition.instances.keys() | select('match', 'crc') | list | length > 0 %}
9+
{% set filter="^crc" %}
10+
{% else %}
11+
{% set filter="^ocp" %}
12+
{% endif %}
513
data:
614
{% for host in cifmw_networking_env_definition.instances.keys() -%}
7-
{% if host is match('^(ocp|crc).*') %}
15+
{% if host is match(filter) %}
816
node_{{ ns.ocp_index }}:
917
{% set ns.ocp_index = ns.ocp_index+1 %}
1018
name: {{ cifmw_networking_env_definition.instances[host]['hostname'] }}

roles/ci_gen_kustomize_values/templates/common/network-values/values.yaml.j2

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,18 @@
44
{% set ns = namespace(interfaces={},
55
ocp_index=0,
66
lb_tools={}) %}
7+
8+
{% if cifmw_networking_env_definition.instances.keys() | select('match', '^ocp-worker') | list | length > 0 %}
9+
{% set filter="^ocp-worker" %}
10+
{% elif cifmw_networking_env_definition.instances.keys() | select('match', 'crc') | list | length > 0 %}
11+
{% set filter="^crc" %}
12+
{% else %}
13+
{% set filter="^ocp" %}
14+
{% endif %}
15+
716
data:
817
{% for host in cifmw_networking_env_definition.instances.keys() -%}
9-
{% if host is match('^(ocp|crc).*') %}
18+
{% if host is match(filter) %}
1019
node_{{ ns.ocp_index }}:
1120
{% set ns.ocp_index = ns.ocp_index+1 %}
1221
name: {{ cifmw_networking_env_definition.instances[host]['hostname'] }}

roles/ci_gen_kustomize_values/templates/dcn/network-values/values.yaml.j2

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
{% set ns = namespace(interfaces={},
44
ocp_index=0,
55
lb_tools={}) %}
6+
7+
{% if cifmw_networking_env_definition.instances.keys() | select('match', '^ocp-worker') | list | length > 0 %}
8+
{% set filter="^ocp-worker" %}
9+
{% elif cifmw_networking_env_definition.instances.keys() | select('match', 'crc') | list | length > 0 %}
10+
{% set filter="^crc" %}
11+
{% else %}
12+
{% set filter="^ocp" %}
13+
{% endif %}
614
data:
715
{% for host in cifmw_networking_env_definition.instances.keys() -%}
816
{% for network in cifmw_networking_env_definition.instances[host]['networks'].values() -%}
@@ -13,7 +21,7 @@ data:
1321
},
1422
recursive=true) -%}
1523
{% endfor -%}
16-
{% if host is match('^(ocp|crc).*') %}
24+
{% if host is match(filter) %}
1725
node_{{ ns.ocp_index }}:
1826
{% set ns.ocp_index = ns.ocp_index+1 %}
1927
name: {{ cifmw_networking_env_definition.instances[host]['hostname'] }}

roles/ci_gen_kustomize_values/templates/multi-namespace/network-values2/values.yaml.j2

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,17 @@
44
{% set ns = namespace(interfaces={},
55
ocp_index=0,
66
lb_tools={}) %}
7+
8+
{% if cifmw_networking_env_definition.instances.keys() | select('match', '^ocp-worker') | list | length > 0 %}
9+
{% set filter="^ocp-worker" %}
10+
{% elif cifmw_networking_env_definition.instances.keys() | select('match', 'crc') | list | length > 0 %}
11+
{% set filter="^crc" %}
12+
{% else %}
13+
{% set filter="^ocp" %}
14+
{% endif %}
715
data:
816
{% for host in cifmw_networking_env_definition.instances.keys() -%}
9-
{% if host is match('^(ocp|crc).*') %}
17+
{% if host is match(filter) %}
1018
node_{{ ns.ocp_index }}:
1119
{% set ns.ocp_index = ns.ocp_index+1 %}
1220
name: {{ cifmw_networking_env_definition.instances[host]['hostname'] }}

roles/ci_gen_kustomize_values/templates/osasinfra-ipv6/network-values/values.yaml.j2

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,17 @@
44
{% set ns = namespace(interfaces={},
55
ocp_index=0,
66
lb_tools={}) %}
7+
8+
{% if cifmw_networking_env_definition.instances.keys() | select('match', '^ocp-worker') | list | length > 0 %}
9+
{% set filter="^ocp-worker" %}
10+
{% elif cifmw_networking_env_definition.instances.keys() | select('match', 'crc') | list | length > 0 %}
11+
{% set filter="^crc" %}
12+
{% else %}
13+
{% set filter="^ocp" %}
14+
{% endif %}
715
data:
816
{% for host in cifmw_networking_env_definition.instances.keys() -%}
9-
{% if host is match('^(ocp|crc).*') %}
17+
{% if host is match(filter) %}
1018
node_{{ ns.ocp_index }}:
1119
{% set ns.ocp_index = ns.ocp_index+1 %}
1220
name: {{ cifmw_networking_env_definition.instances[host]['hostname'] }}

roles/ci_gen_kustomize_values/templates/shiftstack/network-values/values.yaml.j2

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
---
22
# source: shiftstack/network-values/values.yaml.j2
33
{% set ns = namespace(interfaces={}, ocp_index=0, lb_tools={}) %}
4-
4+
{% if cifmw_networking_env_definition.instances.keys() | select('match', '^ocp-worker') | list | length > 0 %}
5+
{% set filter="^ocp-worker" %}
6+
{% elif cifmw_networking_env_definition.instances.keys() | select('match', 'crc') | list | length > 0 %}
7+
{% set filter="^crc" %}
8+
{% else %}
9+
{% set filter="^ocp" %}
10+
{% endif %}
511
data:
612
{% for host in cifmw_networking_env_definition.instances.keys() -%}
7-
{% if host is match('^(ocp|crc).*') %}
13+
{% if host is match(filter) %}
814
node_{{ ns.ocp_index }}:
915
{% set ns.ocp_index = ns.ocp_index+1 %}
1016
name: {{ cifmw_networking_env_definition.instances[host]['hostname'] }}

roles/ci_gen_kustomize_values/templates/uni01alpha-adoption/network-values/values.yaml.j2

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,16 @@
44
{% set ns = namespace(interfaces={},
55
ocp_index=0,
66
lb_tools={}) %}
7+
{% if cifmw_networking_env_definition.instances.keys() | select('match', '^ocp-worker') | list | length > 0 %}
8+
{% set filter="^ocp-worker" %}
9+
{% elif cifmw_networking_env_definition.instances.keys() | select('match', 'crc') | list | length > 0 %}
10+
{% set filter="^crc" %}
11+
{% else %}
12+
{% set filter="^ocp" %}
13+
{% endif %}
714
data:
815
{% for host in cifmw_networking_env_definition.instances.keys() -%}
9-
{% if host is match('^(ocp|crc).*') %}
16+
{% if host is match(filter) %}
1017
node_{{ ns.ocp_index }}:
1118
{% set ns.ocp_index = ns.ocp_index+1 %}
1219
name: {{ cifmw_networking_env_definition.instances[host]['hostname'] }}

0 commit comments

Comments
 (0)