Skip to content

Commit 09f1a9a

Browse files
Merge pull request #489 from abays/hci_va_network_reorg
Decouple VA1 network stage from control plane stage This removes the networking components... MetalLB NetConfig Net-attach-def ...from the control plane stage of VA1 and gives them their own separate stage in between the NNCP stage and the control plane stage. This is needed for the UniGamma adoption job, which relies upon this VA. They want to create the NNCPs, MetalLB CRs, NetConfig CR and Net-attach-defs, but do NOT want to create the OpenStackControlPlane. Now they can do so by creating an automation file with only two stages, one for NNCPs and the other for the other networking components. I have tested this in my local env and the VA deployed successfully via CIFMW. Reviewed-by: Andrew Bays <[email protected]> Reviewed-by: Harald <[email protected]> Reviewed-by: John Fulton <[email protected]>
2 parents 0046952 + 3105c9e commit 09f1a9a

File tree

12 files changed

+124
-71
lines changed

12 files changed

+124
-71
lines changed

automation/vars/hci-adoption.yaml

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

17-
- path: examples/va/hci/control-plane
17+
- path: examples/va/hci/control-plane/networking
1818
wait_conditions:
1919
- >-
20-
oc -n openstack wait nncp
21-
-l osp/nncm-config-type=standard
22-
--for jsonpath='{.status.conditions[0].reason}'=SuccessfullyConfigured
20+
oc -n metallb-system wait pod
21+
-l app=metallb -l component=speaker
22+
--for condition=Ready
2323
--timeout=5m
2424
values:
2525
- name: network-values

automation/vars/hci.yaml

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

2941
- path: examples/va/hci/edpm-pre-ceph/nodeset

examples/va/hci/control-plane.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ Change to the hci directory
1414
```
1515
cd architecture/examples/va/hci
1616
```
17-
Edit the [control-plane/nncp/values.yaml](control-plane/nncp/values.yaml) file to suit your environment.
17+
Edit the [control-plane/networking/nncp/values.yaml](control-plane/networking/nncp/values.yaml) file to suit your environment.
1818
```
19-
vi control-plane/nncp/values.yaml
19+
vi control-plane/networking/nncp/values.yaml
2020
```
2121

2222
## Apply node network configuration
2323

2424
Generate the node network configuration
2525
```
26-
kustomize build control-plane/nncp > nncp.yaml
26+
kustomize build control-plane/networking/nncp > nncp.yaml
2727
```
2828
Apply the NNCP CRs
2929
```
@@ -34,13 +34,24 @@ Wait for NNCPs to be available
3434
oc wait nncp -l osp/nncm-config-type=standard --for jsonpath='{.status.conditions[0].reason}'=SuccessfullyConfigured --timeout=300s
3535
```
3636

37-
## Apply networking and control-plane configuration
37+
## Apply remaining networking configuration
3838

39-
Generate the control-plane and networking CRs.
39+
Generate the reminaing networking configuration
40+
```
41+
kustomize build control-plane/networking > networking.yaml
42+
```
43+
Apply the networking CRs
44+
```
45+
oc apply -f networking.yaml
46+
```
47+
48+
## Apply control-plane configuration
49+
50+
Generate the control-plane CR.
4051
```
4152
kustomize build control-plane > control-plane.yaml
4253
```
43-
Apply the CRs
54+
Apply the CR
4455
```
4556
oc apply -f control-plane.yaml
4657
```

examples/va/hci/control-plane/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ components:
99
## https://github.com/kubernetes-sigs/kustomize/blob/master/examples/remoteBuild.md
1010

1111
resources:
12-
- nncp/values.yaml
12+
- networking/nncp/values.yaml
1313
- 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+
- ../../../../../va/hci/networking
7+
8+
resources:
9+
- nncp/values.yaml

examples/va/hci/control-plane/nncp/kustomization.yaml renamed to examples/va/hci/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

examples/va/hci/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ components:
1010
## https://github.com/kubernetes-sigs/kustomize/blob/master/examples/remoteBuild.md
1111

1212
resources:
13-
- control-plane/nncp/values.yaml
13+
- control-plane/networking/nncp/values.yaml
1414
- edpm-pre-ceph/nodeset/values.yaml
1515
- service-values.yaml
1616
- values.yaml

va/hci/kustomization.yaml

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -18,56 +18,4 @@ transformers:
1818
create: true
1919
2020
components:
21-
- ../../lib/networking/metallb
22-
- ../../lib/networking/netconfig
23-
- ../../lib/networking/nad
2421
- ../../lib/control-plane
25-
26-
# Add storagemgmt network template, as it is needed for CephHCI
27-
patches:
28-
- target:
29-
version: v1beta1
30-
kind: NetConfig
31-
name: netconfig
32-
patch: |-
33-
- op: add
34-
path: /spec/networks/-
35-
value:
36-
dnsDomain: _replaced_
37-
name: storagemgmt
38-
subnets:
39-
- _replaced_
40-
mtu: 1500
41-
42-
# Add storagemgmt network replacements
43-
replacements:
44-
# NetConfig dnsDomain specific to this VA
45-
- source:
46-
kind: ConfigMap
47-
name: network-values
48-
fieldPath: data.storagemgmt.dnsDomain
49-
targets:
50-
- select:
51-
kind: NetConfig
52-
fieldPaths:
53-
- spec.networks.[name=storagemgmt].dnsDomain
54-
# NetConfig MTU specific to this VA
55-
- source:
56-
kind: ConfigMap
57-
name: network-values
58-
fieldPath: data.storagemgmt.mtu
59-
targets:
60-
- select:
61-
kind: NetConfig
62-
fieldPaths:
63-
- spec.networks.[name=storagemgmt].mtu
64-
# NetConfig subnets specific to this VA
65-
- source:
66-
kind: ConfigMap
67-
name: network-values
68-
fieldPath: data.storagemgmt.subnets
69-
targets:
70-
- select:
71-
kind: NetConfig
72-
fieldPaths:
73-
- spec.networks.[name=storagemgmt].subnets

0 commit comments

Comments
 (0)