Skip to content

Commit 6ac61dd

Browse files
committed
Decouple VA1 network stage from control plane stage
1 parent 44608a4 commit 6ac61dd

File tree

12 files changed

+121
-68
lines changed

12 files changed

+121
-68
lines changed

automation/vars/hci-adoption.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
vas:
33
hci-adoption:
44
stages:
5-
- path: examples/va/hci/control-plane/nncp
5+
- path: examples/va/hci/control-plane/networking/nncp
66
wait_conditions:
77
- >-
88
oc -n openstack wait nncp
@@ -14,12 +14,12 @@ vas:
1414
src_file: values.yaml
1515
build_output: nncp.yaml
1616

17-
- path: examples/va/hci/control-plane
17+
- path: examples/va/hci/control-plane/networking
1818
wait_conditions:
1919
- >-
20-
oc -n openstack wait nncp
21-
-l osp/nncm-config-type=standard
22-
--for jsonpath='{.status.conditions[0].reason}'=SuccessfullyConfigured
20+
oc -n metallb-system wait pod
21+
-l app=metallb -l component=speaker
22+
--for condition=Ready
2323
--timeout=5m
2424
values:
2525
- name: network-values

automation/vars/hci.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
vas:
33
hci:
44
stages:
5-
- path: examples/va/hci/control-plane/nncp
5+
- path: examples/va/hci/control-plane/networking/nncp
66
wait_conditions:
77
- >-
88
oc -n openstack wait nncp
@@ -14,6 +14,18 @@ vas:
1414
src_file: values.yaml
1515
build_output: nncp.yaml
1616

17+
- path: examples/va/hci/control-plane/networking
18+
wait_conditions:
19+
- >-
20+
oc -n metallb-system wait pod
21+
-l app=metallb -l component=speaker
22+
--for condition=Ready
23+
--timeout=5m
24+
values:
25+
- name: network-values
26+
src_file: nncp/values.yaml
27+
build_output: network.yaml
28+
1729
- path: examples/va/hci/control-plane
1830
wait_conditions:
1931
- >-
@@ -23,7 +35,7 @@ vas:
2335
- name: service-values
2436
src_file: service-values.yaml
2537
- name: network-values
26-
src_file: nncp/values.yaml
38+
src_file: networking/nncp/values.yaml
2739
build_output: ../control-plane.yaml
2840

2941
- path: examples/va/hci/edpm-pre-ceph/nodeset

examples/va/hci/control-plane.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ Change to the hci directory
1414
```
1515
cd architecture/examples/va/hci
1616
```
17-
Edit the [control-plane/nncp/values.yaml](control-plane/nncp/values.yaml) file to suit your environment.
17+
Edit the [control-plane/networking/nncp/values.yaml](control-plane/networking/nncp/values.yaml) file to suit your environment.
1818
```
19-
vi control-plane/nncp/values.yaml
19+
vi control-plane/networking/nncp/values.yaml
2020
```
2121

2222
## Apply node network configuration
2323

2424
Generate the node network configuration
2525
```
26-
kustomize build control-plane/nncp > nncp.yaml
26+
kustomize build control-plane/networking/nncp > nncp.yaml
2727
```
2828
Apply the NNCP CRs
2929
```
@@ -34,6 +34,17 @@ Wait for NNCPs to be available
3434
oc wait nncp -l osp/nncm-config-type=standard --for jsonpath='{.status.conditions[0].reason}'=SuccessfullyConfigured --timeout=300s
3535
```
3636

37+
## Apply remaining networking configuration
38+
39+
Generate the reminaing networking configuration
40+
```
41+
kustomize build control-plane/networking > networking.yaml
42+
```
43+
Apply the networking CRs
44+
```
45+
oc apply -f networking.yaml
46+
```
47+
3748
## Apply networking and control-plane configuration
3849

3950
Generate the control-plane and networking CRs.

examples/va/hci/control-plane/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ components:
99
## https://github.com/kubernetes-sigs/kustomize/blob/master/examples/remoteBuild.md
1010

1111
resources:
12-
- nncp/values.yaml
12+
- networking/nncp/values.yaml
1313
- service-values.yaml
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
apiVersion: kustomize.config.k8s.io/v1beta1
3+
kind: Kustomization
4+
5+
components:
6+
- ../../../../../va/hci/networking
7+
8+
resources:
9+
- nncp/values.yaml

examples/va/hci/control-plane/nncp/kustomization.yaml renamed to examples/va/hci/control-plane/networking/nncp/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ transformers:
1818
create: true
1919
2020
components:
21-
- ../../../../../lib/nncp
21+
- ../../../../../../lib/nncp
2222

2323
resources:
2424
- values.yaml

examples/va/hci/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ components:
1010
## https://github.com/kubernetes-sigs/kustomize/blob/master/examples/remoteBuild.md
1111

1212
resources:
13-
- control-plane/nncp/values.yaml
13+
- control-plane/networking/nncp/values.yaml
1414
- edpm-pre-ceph/nodeset/values.yaml
1515
- service-values.yaml
1616
- values.yaml

va/hci/kustomization.yaml

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -18,56 +18,4 @@ transformers:
1818
create: true
1919
2020
components:
21-
- ../../lib/networking/metallb
22-
- ../../lib/networking/netconfig
23-
- ../../lib/networking/nad
2421
- ../../lib/control-plane
25-
26-
# Add storagemgmt network template, as it is needed for CephHCI
27-
patches:
28-
- target:
29-
version: v1beta1
30-
kind: NetConfig
31-
name: netconfig
32-
patch: |-
33-
- op: add
34-
path: /spec/networks/-
35-
value:
36-
dnsDomain: _replaced_
37-
name: storagemgmt
38-
subnets:
39-
- _replaced_
40-
mtu: 1500
41-
42-
# Add storagemgmt network replacements
43-
replacements:
44-
# NetConfig dnsDomain specific to this VA
45-
- source:
46-
kind: ConfigMap
47-
name: network-values
48-
fieldPath: data.storagemgmt.dnsDomain
49-
targets:
50-
- select:
51-
kind: NetConfig
52-
fieldPaths:
53-
- spec.networks.[name=storagemgmt].dnsDomain
54-
# NetConfig MTU specific to this VA
55-
- source:
56-
kind: ConfigMap
57-
name: network-values
58-
fieldPath: data.storagemgmt.mtu
59-
targets:
60-
- select:
61-
kind: NetConfig
62-
fieldPaths:
63-
- spec.networks.[name=storagemgmt].mtu
64-
# NetConfig subnets specific to this VA
65-
- source:
66-
kind: ConfigMap
67-
name: network-values
68-
fieldPath: data.storagemgmt.subnets
69-
targets:
70-
- select:
71-
kind: NetConfig
72-
fieldPaths:
73-
- spec.networks.[name=storagemgmt].subnets

va/hci/networking/kustomization.yaml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
apiVersion: kustomize.config.k8s.io/v1alpha1
3+
kind: Component
4+
5+
transformers:
6+
# Set namespace to OpenStack on all namespaced objects without a namespace
7+
- |-
8+
apiVersion: builtin
9+
kind: NamespaceTransformer
10+
metadata:
11+
name: _ignored_
12+
namespace: openstack
13+
setRoleBindingSubjects: none
14+
unsetOnly: true
15+
fieldSpecs:
16+
- path: metadata/name
17+
kind: Namespace
18+
create: true
19+
20+
components:
21+
- ../../../lib/networking/metallb
22+
- ../../../lib/networking/netconfig
23+
- ../../../lib/networking/nad
24+
25+
# Add storagemgmt network template, as it is needed for CephHCI
26+
patches:
27+
- target:
28+
version: v1beta1
29+
kind: NetConfig
30+
name: netconfig
31+
patch: |-
32+
- op: add
33+
path: /spec/networks/-
34+
value:
35+
dnsDomain: _replaced_
36+
name: storagemgmt
37+
subnets:
38+
- _replaced_
39+
mtu: 1500
40+
41+
# Add storagemgmt network replacements
42+
replacements:
43+
# NetConfig dnsDomain specific to this VA
44+
- source:
45+
kind: ConfigMap
46+
name: network-values
47+
fieldPath: data.storagemgmt.dnsDomain
48+
targets:
49+
- select:
50+
kind: NetConfig
51+
fieldPaths:
52+
- spec.networks.[name=storagemgmt].dnsDomain
53+
# NetConfig MTU specific to this VA
54+
- source:
55+
kind: ConfigMap
56+
name: network-values
57+
fieldPath: data.storagemgmt.mtu
58+
targets:
59+
- select:
60+
kind: NetConfig
61+
fieldPaths:
62+
- spec.networks.[name=storagemgmt].mtu
63+
# NetConfig subnets specific to this VA
64+
- source:
65+
kind: ConfigMap
66+
name: network-values
67+
fieldPath: data.storagemgmt.subnets
68+
targets:
69+
- select:
70+
kind: NetConfig
71+
fieldPaths:
72+
- spec.networks.[name=storagemgmt].subnets

zuul.d/validations.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@
5858
files:
5959
- examples/va/hci
6060
- examples/va/hci/control-plane
61-
- examples/va/hci/control-plane/nncp
61+
- examples/va/hci/control-plane/networking
62+
- examples/va/hci/control-plane/networking/nncp
6263
- examples/va/hci/deployment
6364
- examples/va/hci/edpm-pre-ceph/deployment
6465
- examples/va/hci/edpm-pre-ceph/nodeset
@@ -70,8 +71,8 @@
7071
cifmw_architecture_scenario: hci
7172
- job:
7273
files:
73-
- examples/va/hci/control-plane
74-
- examples/va/hci/control-plane/nncp
74+
- examples/va/hci/control-plane/networking
75+
- examples/va/hci/control-plane/networking/nncp
7576
- lib
7677
name: rhoso-architecture-validate-hci-adoption
7778
parent: rhoso-architecture-base-job

0 commit comments

Comments
 (0)