Skip to content

Commit df3cb20

Browse files
authored
Decouple uni07eta network stage from control plane stage (#490)
Also, uni07eta-adoption.yaml was added. OSPNW-913
1 parent 9fb42e2 commit df3cb20

File tree

14 files changed

+130
-22
lines changed

14 files changed

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

automation/vars/uni07eta.yaml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ vas:
33
uni07eta:
44
stages:
55
- name: nncp-configuration
6-
path: examples/dt/uni07eta/control-plane/nncp
6+
path: examples/dt/uni07eta/control-plane/networking/nncp
77
wait_conditions:
88
- >-
99
oc -n openstack wait nncp
@@ -15,6 +15,19 @@ vas:
1515
src_file: values.yaml
1616
build_output: nncp.yaml
1717

18+
- name: network-configuration
19+
path: examples/dt/uni07eta/control-plane/networking
20+
wait_conditions:
21+
- >-
22+
oc -n metallb-system wait pod
23+
-l app=metallb -l component=speaker
24+
--for condition=Ready
25+
--timeout=5m
26+
values:
27+
- name: network-values
28+
src_file: nncp/values.yaml
29+
build_output: networking.yaml
30+
1831
- name: control-plane
1932
path: examples/dt/uni07eta/control-plane
2033
wait_conditions:
@@ -25,7 +38,7 @@ vas:
2538
--timeout=60m
2639
values:
2740
- name: network-values
28-
src_file: nncp/values.yaml
41+
src_file: networking/nncp/values.yaml
2942
- name: service-values
3043
src_file: service-values.yaml
3144
build_output: control-plane.yaml

dt/uni07eta/kustomization.yaml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +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:
3330
- cinder-volume-ontap-secrets.yaml
34-
- ocp-networks-octavia-netattach.yaml
3531

3632
replacements:
3733
# Cinder
@@ -343,14 +339,3 @@ replacements:
343339
- spec.neutron.template.customServiceConfig
344340
options:
345341
create: true
346-
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
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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+
resources:
25+
- ocp-networks-octavia-netattach.yaml
26+
27+
28+
replacements:
29+
- source:
30+
kind: ConfigMap
31+
name: network-values
32+
fieldPath: data.octavia.net-attach-def
33+
targets:
34+
- select:
35+
kind: NetworkAttachmentDefinition
36+
name: octavia
37+
fieldPaths:
38+
- spec.config

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

0 commit comments

Comments
 (0)