Skip to content

Commit 93789fa

Browse files
committed
Decouple uni06zeta network stage from control plane stage
Also Add automation file for uni06zeta-adoption
1 parent 32d7703 commit 93789fa

File tree

14 files changed

+117
-32
lines changed

14 files changed

+117
-32
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
vas:
3+
uni06zeta-adoption:
4+
stages:
5+
- path: examples/dt/uni06zeta/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/uni06zeta/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

automation/vars/uni06zeta.yaml

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

18+
- path: examples/dt/uni06zeta/control-plane/networking
19+
wait_conditions:
20+
- >-
21+
oc -n metallb-system wait pod
22+
-l app=metallb -l component=speaker
23+
--for condition=Ready
24+
--timeout=5m
25+
values:
26+
- name: network-values
27+
src_file: nncp/values.yaml
28+
build_output: network.yaml
29+
1830
- path: examples/dt/uni06zeta/control-plane
1931
wait_conditions:
2032
- >-
@@ -25,7 +37,7 @@ vas:
2537
2638
values:
2739
- name: network-values
28-
src_file: nncp/values.yaml
40+
src_file: networking/nncp/values.yaml
2941
- name: service-values
3042
src_file: service-values.yaml
3143
build_output: control-plane.yaml

dt/uni06zeta/kustomization.yaml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,10 @@ transformers:
2424
create: true
2525
2626
components:
27-
- ../../lib/networking/metallb
28-
- ../../lib/networking/netconfig
29-
- ../../lib/networking/nad
3027
- ../../lib/control-plane
3128

3229
resources:
33-
- resources/octavia-network-attachment-definition.yaml
30+
- networking/resources/octavia-network-attachment-definition.yaml
3431

3532
replacements:
3633
- source:
@@ -259,14 +256,3 @@ replacements:
259256
- spec.neutron.template.customServiceConfig
260257
options:
261258
create: true
262-
263-
- source:
264-
kind: ConfigMap
265-
name: network-values
266-
fieldPath: data.octavia.net-attach-def
267-
targets:
268-
- select:
269-
kind: NetworkAttachmentDefinition
270-
name: octavia
271-
fieldPaths:
272-
- spec.config
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
components:
19+
- ../../../lib/networking/metallb
20+
- ../../../lib/networking/netconfig
21+
- ../../../lib/networking/nad
22+
23+
resources:
24+
- resources/octavia-network-attachment-definition.yaml
25+
26+
replacements:
27+
- source:
28+
kind: ConfigMap
29+
name: network-values
30+
fieldPath: data.octavia.net-attach-def
31+
targets:
32+
- select:
33+
kind: NetworkAttachmentDefinition
34+
name: octavia
35+
fieldPaths:
36+
- spec.config

dt/uni06zeta/resources/octavia-network-attachment-defintion.yaml

Lines changed: 0 additions & 8 deletions
This file was deleted.

examples/dt/uni06zeta/control-plane.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ cd architecture/examples/dt/uni06zeta
1919
```
2020

2121
Edit [control-plane/service-values.yaml](control-plane/service-values.yaml) and
22-
[control-plane/nncp/values.yaml](control-plane/nncp/values.yaml).
22+
[control-plane/networking/nncp/values.yaml](control-plane/networking/nncp/values.yaml).
2323

2424
Apply node network configuration
2525

2626
```bash
27-
pushd control-plane/nncp
27+
pushd control-plane/networking/nncp
2828
kustomize build > nncp.yaml
2929
oc apply -f nncp.yaml
3030
oc wait nncp \
@@ -34,14 +34,25 @@ oc wait nncp \
3434
popd
3535
```
3636

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

3950
```bash
4051
pushd control-plane
4152
kustomize build > control-plane.yaml
4253
```
4354

44-
## Create CRs
55+
## Create CR
4556

4657
```bash
4758
oc apply -f control-plane.yaml

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

examples/dt/uni06zeta/control-plane/nncp/kustomization.yaml renamed to examples/dt/uni06zeta/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-
- ../../../../../dt/uni06zeta/nncp
20+
- ../../../../../../dt/uni06zeta/nncp
2121

2222
resources:
2323
- values.yaml

0 commit comments

Comments
 (0)