Skip to content

Commit 4fa444a

Browse files
committed
Decouple nova04delta network stage from control plane stage
Separate the networking components MetalLB NetConfig and Net-attach-def for the control plane stage. This allows to apply Day 2 operattions smoothly, including potential adoption jobs, where it only deploys networking omitting control plane. Inspired by the similar work done for uni04delta DT. Also fix relative paths in examples/dt to point the main dt dir. Signed-off-by: Bohdan Dobrelia <[email protected]>
1 parent abfd05b commit 4fa444a

File tree

15 files changed

+136
-19
lines changed

15 files changed

+136
-19
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
vas:
3+
nova04delta-adoption:
4+
stages:
5+
- name: nncp-configuration
6+
path: examples/dt/nova/nova04delta/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/nova/nova04delta/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=5min
26+
values:
27+
- name: network-values
28+
src_file: nncp/values.yaml
29+
build_output: networking.yaml

automation/vars/nova04delta.yaml

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,48 @@
22
vas:
33
nova04delta:
44
stages:
5-
- path: examples/dt/nova/nova04delta/nncp
5+
- name: nncp-configuration
6+
path: examples/dt/nova/nova04delta/control-plane/networking/nncp
67
wait_conditions:
78
- >-
89
oc -n openstack wait nncp
910
-l osp/nncm-config-type=standard
1011
--for jsonpath='{.status.conditions[0].reason}'=SuccessfullyConfigured
11-
--timeout=60s
12+
--timeout=5m
1213
values:
1314
- name: network-values
1415
src_file: values.yaml
1516
build_output: nncp.yaml
1617

17-
- path: examples/dt/nova/nova04delta
18+
- name: network-configuration
19+
path: examples/dt/nova/nova04delta/control-plane/networking
1820
wait_conditions:
1921
- >-
20-
oc -n openstack wait osctlplane controlplane --for condition=Ready
21-
--timeout=600s
22+
oc -n metallb-system wait pod
23+
-l app=metallb -l component=speaker
24+
--for condition=Ready
25+
--timeout=5m
2226
values:
2327
- name: network-values
2428
src_file: nncp/values.yaml
25-
- name: service-values
29+
build_output: network.yaml
30+
31+
- name: control-plane
32+
path: examples/dt/nova/nova04delta/control-plane
33+
wait_conditions:
34+
- >-
35+
oc -n openstack wait osctlplane controlplane
36+
--for condition=Ready
37+
--timeout=60m
38+
values:
39+
- name: network-values
40+
src_file: networking/nncp/values.yaml
41+
- name: service-values.yaml
2642
src_file: service-values.yaml
2743
build_output: control-plane.yaml
2844

29-
- path: examples/dt/nova/nova04delta/edpm/nodeset
45+
- name: nodeset 1
46+
path: examples/dt/nova/nova04delta/edpm/nodeset
3047
wait_conditions:
3148
- >-
3249
oc -n openstack wait
@@ -37,7 +54,8 @@ vas:
3754
src_file: values.yaml
3855
build_output: nodeset.yaml
3956

40-
- path: examples/dt/nova/nova04delta/edpm/nodeset2
57+
- name: nodeset 2
58+
path: examples/dt/nova/nova04delta/edpm/nodeset2
4159
wait_conditions:
4260
- >-
4361
oc -n openstack wait
@@ -48,7 +66,8 @@ vas:
4866
src_file: values.yaml
4967
build_output: nodeset2.yaml
5068

51-
- path: examples/dt/nova/nova04delta/edpm/deployment
69+
- name: deployment
70+
path: examples/dt/nova/nova04delta/edpm/deployment
5271
wait_conditions:
5372
- >-
5473
oc -n openstack wait
@@ -59,7 +78,8 @@ vas:
5978
src_file: values.yaml
6079
build_output: deployment.yaml
6180

62-
- path: examples/dt/nova/nova04delta/edpm-post-driver/deployment
81+
- name: post deployment
82+
path: examples/dt/nova/nova04delta/edpm-post-driver/deployment
6383
wait_conditions:
6484
- >-
6585
oc -n openstack wait

dt/nova/nova04delta/kustomization.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ transformers:
1818
create: true
1919
2020
components:
21-
- ../../../lib/networking/metallb
22-
- ../../../lib/networking/netconfig
23-
- ../../../lib/networking/nad
2421
- ../../../lib/control-plane
2522

2623
replacements:
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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

examples/dt/nova/nova04delta/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ through `resources:VGPU=X` flavor extra specs.
3535
That is a contrary to the legacy mode where PCI devices used to be requested through
3636
`pci_passthrough:alias` flavor extra specs.
3737

38-
### Control Plane (`examples/dt/nova/nova04delta/service-values.yaml`)
38+
### Control Plane (`examples/dt/nova/nova04delta/control-plane/service-values.yaml`)
3939

4040
* `[pci]alias`: Creates an alias for a specific GPU type. This allows users to request a GPU by a friendly name (e.g., `nvidia_a2`) when creating a VM. This configuration should match the configuration found on the compute nodes.
4141
```yaml

examples/dt/nova/nova04delta/control-plane.md renamed to examples/dt/nova/nova04delta/control-plane/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ Switch to the "openstack" namespace
1010
```
1111
oc project openstack
1212
```
13-
Change to the nfv/sriov directory
13+
Change to the nova/nova04delta directory
1414
```
15-
cd architecture/examples/va/nfv/sriov
15+
cd architecture/examples/dt/nova/nova04delta
1616
```
1717
Edit the [nncp/values.yaml](nncp/values.yaml) and
1818
[service-values.yaml](service-values.yaml) files to suit
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
apiVersion: kustomize.config.k8s.io/v1beta1
3+
kind: Kustomization
4+
5+
components:
6+
- ../../../../../dt/nova/nova04delta/edpm/nodeset
7+
8+
resources:
9+
- control-plane/networking/nncp/values.yaml
10+
- control-plane/service-values.yaml
11+
- edpm/nodeset/values.yaml
12+
---
13+
apiVersion: kustomize.config.k8s.io/v1beta1
14+
kind: Kustomization
15+
16+
components:
17+
- ../../../../../dt/nova/nova04delta/
18+
19+
resources:
20+
- networking/nncp/values.yaml
21+
- service-values.yaml

examples/dt/nova/nova04delta/kustomization.yaml renamed to examples/dt/nova/nova04delta/control-plane/networking/kustomization.yaml

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

55
components:
6-
- ../../../../dt/nova/nova04delta/
6+
- ../../../../../../dt/nova/nova04delta/networking
77

88
resources:
99
- nncp/values.yaml
10-
- service-values.yaml
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Generated files
2+
nncp.yaml

examples/dt/nova/nova04delta/nncp/kustomization.yaml renamed to examples/dt/nova/nova04delta/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

0 commit comments

Comments
 (0)