Skip to content

Commit 1e4345f

Browse files
committed
Decouple uni04delta network stage from control plane stage
1 parent b773b51 commit 1e4345f

File tree

12 files changed

+138
-57
lines changed

12 files changed

+138
-57
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
vas:
3+
uni04delta-adoption:
4+
stages:
5+
- path: examples/dt/uni04delta/control-plane/networking/nncp
6+
wait_conditions:
7+
- >-
8+
oc -n openstack wait nncp
9+
-l osp/nncm-config-type=standard
10+
--for jsonpath='{.status.conditions[0].reason}'=SuccessfullyConfigured
11+
--timeout=5m
12+
values:
13+
- name: network-values
14+
src_file: values.yaml
15+
build_output: nncp.yaml
16+
17+
- path: examples/dt/uni04delta/control-plane/networking
18+
wait_condition:
19+
- >-
20+
oc -n metallb-system wait pod
21+
-l app=metallb -l component=speaker
22+
--for condition=Ready
23+
--timeout=5min
24+
values:
25+
- name: network-values
26+
src_file: nncp/values.yaml
27+
build_output: networking.yaml

automation/vars/uni04delta.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,18 @@ vas:
1414
src_file: values.yaml
1515
build_output: nncp.yaml
1616

17+
- path: examples/dt/uni04delta/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/dt/uni04delta/control-plane
1830
wait_conditions:
1931
- >-
@@ -22,7 +34,7 @@ vas:
2234
--timeout=60m
2335
values:
2436
- name: network-values
25-
src_file: nncp/values.yaml
37+
src_file: networking/nncp/values.yaml
2638
- name: service-values.yaml
2739
src_file: service-values.yaml
2840
build_output: control-plane.yaml

dt/uni04delta/kustomization.yaml

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -17,57 +17,9 @@ transformers:
1717
create: true
1818
1919
components:
20-
- ../../lib/networking/metallb
21-
- ../../lib/networking/netconfig
22-
- ../../lib/networking/nad
2320
- ../../lib/control-plane
2421

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

examples/dt/uni04delta/control-plane.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,14 @@ Change to uni04delta directory
1818
cd architecture/examples/dt/uni04delta
1919
```
2020

21-
Apply the required network configurations.
21+
# Apply the required node network configurations.
22+
```bash
23+
vi control-plane/networking/nncp/values.yaml
24+
```
2225

2326
```bash
2427
# Change the Node Network Configuration folder.
25-
pushd control-plane/nncp
28+
pushd control-plane/networking/nncp
2629

2730
# Generate the configuration
2831
kustomize build > nncp.yaml
@@ -38,8 +41,18 @@ oc wait nncp -l osp/nncm-config-type=standard \
3841
# change the working directory
3942
popd
4043
```
44+
# Apply remainig networking configuration
45+
46+
Generate the remaining networking configuration
47+
```bash
48+
kustomize build control-plane/networking > networking.yaml
49+
```
50+
Apply the networking CRs
51+
```bash
52+
oc apply -f networking.yaml
53+
```
4154

42-
Generate and apply the control-plane configurations.
55+
# Generate and apply the control-plane configurations.
4356

4457
```bash
4558
# Navigate to control-panel
@@ -56,4 +69,3 @@ oc wait openstackcontrolplane --for condition=Ready --timeout=600s
5669

5770
# change the work_dir
5871
popd
59-
```

examples/dt/uni04delta/control-plane/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ components:
66
- ../../../../dt/uni04delta/
77

88
resources:
9-
- nncp/values.yaml
9+
- networking/nncp/values.yaml
1010
- 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+
- ../../../../../dt/uni04delta/networking
7+
8+
resources:
9+
- nncp/values.yaml

examples/dt/uni04delta/control-plane/nncp/kustomization.yaml renamed to examples/dt/uni04delta/control-plane/networking/nncp/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ transformers:
1717
create: true
1818
1919
components:
20-
- ../../../../../lib/nncp
20+
- ../../../../../../lib/nncp
2121

2222
resources:
2323
- values.yaml

examples/dt/uni04delta/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ components:
66
- ../../../dt/uni04delta/edpm/nodeset
77

88
resources:
9-
- control-plane/nncp/values.yaml
9+
- control-plane/networking/nncp/values.yaml
1010
- control-plane/service-values.yaml
1111
- values.yaml

zuul.d/validations.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,8 @@
247247
- dt/uni04delta
248248
- examples/dt/uni04delta
249249
- examples/dt/uni04delta/control-plane
250-
- examples/dt/uni04delta/control-plane/nncp
250+
- examples/dt/uni04delta/control-plane/networking
251+
- examples/dt/uni04delta/control-plane/networking/nncp
251252
- examples/dt/uni04delta/deployment
252253
- examples/dt/uni04delta/edpm-pre-ceph
253254
- examples/dt/uni04delta/edpm-pre-ceph/nodeset

0 commit comments

Comments
 (0)