Skip to content

Commit 8c575e2

Browse files
committed
Decouple uni07eta network stage from control plane stage
1 parent 44608a4 commit 8c575e2

File tree

12 files changed

+113
-20
lines changed

12 files changed

+113
-20
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
vas:
3+
uni07eta-adoption:
4+
stages:
5+
- path: examples/dt/un07eta/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/un07eta/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: networking.yaml

automation/vars/uni07eta.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
vas:
33
uni07eta:
44
stages:
5-
- path: examples/dt/uni07eta/control-plane/nncp
5+
- path: examples/dt/uni07eta/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/dt/uni07eta/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/uni07eta/control-plane
1830
wait_conditions:
1931
- >-
@@ -23,7 +35,7 @@ vas:
2335
--timeout=60m
2436
values:
2537
- name: network-values
26-
src_file: nncp/values.yaml
38+
src_file: networking/nncp/values.yaml
2739
- name: service-values
2840
src_file: service-values.yaml
2941
build_output: control-plane.yaml

dt/uni07eta/kustomization.yaml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ 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:
@@ -344,13 +341,14 @@ replacements:
344341
options:
345342
create: true
346343

347-
- source:
348-
kind: ConfigMap
349-
name: network-values
350-
fieldPath: data.octavia.net-attach-def
351-
targets:
352-
- select:
353-
kind: NetworkAttachmentDefinition
354-
name: octavia
355-
fieldPaths:
356-
- spec.config
344+
# # TODO: check this again
345+
# - source:
346+
# kind: ConfigMap
347+
# name: network-values
348+
# fieldPath: data.octavia.net-attach-def
349+
# targets:
350+
# - select:
351+
# kind: NetworkAttachmentDefinition
352+
# name: octavia
353+
# fieldPaths:
354+
# - spec.config
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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

dt/uni07eta/nncp/kustomization.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,3 +185,14 @@ replacements:
185185
name: master-2
186186
fieldPaths:
187187
- spec.desiredState.interfaces.[name=octavia].vlan.id
188+
189+
- source:
190+
kind: ConfigMap
191+
name: network-values
192+
fieldPath: data.octavia.net-attach-def
193+
targets:
194+
- select:
195+
kind: NetworkAttachmentDefinition
196+
name: octavia
197+
fieldPaths:
198+
- spec.config

examples/dt/uni07eta/control-plane.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ cd architecture/examples/dt/uni07eta
2828
```
2929

3030
Edit [control-plane/service-values.yaml](control-plane/service-values.yaml) and
31-
[control-plane/nncp/values.yaml](control-plane/nncp/values.yaml).
31+
[control-plane/networking/nncp/values.yaml](control-plane/networking/nncp/values.yaml).
3232

3333
Apply node network configuration
3434

3535
```bash
36-
pushd control-plane/nncp
36+
pushd control-plane/networking/nncp
3737
kustomize build > nncp.yaml
3838
oc apply -f nncp.yaml
3939
oc wait nncp \
@@ -43,6 +43,18 @@ oc wait nncp \
4343
popd
4444
```
4545

46+
## Apply remaining networking configuration
47+
48+
Generate the reminaing networking configuration
49+
```
50+
kustomize build control-plane/networking > networking.yaml
51+
```
52+
Apply the networking CRs
53+
```
54+
oc apply -f networking.yaml
55+
```
56+
57+
4658
Generate the control-plane and networking CRs.
4759

4860
```bash

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
33
kind: Kustomization
44

55
components:
6-
- ../../../../../dt/uni07eta/nncp
6+
- ../../../../../../dt/uni07eta/nncp
77

88
resources:
99
- values.yaml

examples/dt/uni07eta/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ components:
66
- ../../../dt/uni07eta/edpm
77

88
resources:
9+
- control-plane/networking/nncp/values.yaml
910
- values.yaml

zuul.d/validations.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,8 @@
312312
- dt/uni07eta
313313
- examples/dt/uni07eta
314314
- examples/dt/uni07eta/control-plane
315-
- examples/dt/uni07eta/control-plane/nncp
315+
- examples/dt/uni07eta/control-plane/networking
316+
- examples/dt/uni07eta/control-plane/networking/nncp
316317
- examples/dt/uni07eta/edpm
317318
- examples/dt/uni07eta/networker
318319
- examples/dt/uni07eta/networker/nodeset

0 commit comments

Comments
 (0)