Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNM - Decouple uni07eta network stage from control plane stage #490

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions automation/vars/uni07eta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
vas:
uni07eta:
stages:
- path: examples/dt/uni07eta/control-plane/nncp
- path: examples/dt/uni07eta/control-plane/networking/nncp
wait_conditions:
- >-
oc -n openstack wait nncp
Expand All @@ -14,6 +14,18 @@ vas:
src_file: values.yaml
build_output: nncp.yaml

- path: examples/dt/uni07eta/control-plane/networking
wait_conditions:
- >-
oc -n metallb-system wait pod
-l app=metallb -l component=speaker
--for condition=Ready
--timeout=5m
values:
- name: network-values
src_file: nncp/values.yaml
build_output: network.yaml

- path: examples/dt/uni07eta/control-plane
wait_conditions:
- >-
Expand All @@ -23,7 +35,7 @@ vas:
--timeout=60m
values:
- name: network-values
src_file: nncp/values.yaml
src_file: networking/nncp/values.yaml
- name: service-values
src_file: service-values.yaml
build_output: control-plane.yaml
Expand Down
24 changes: 11 additions & 13 deletions dt/uni07eta/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ transformers:
create: true

components:
- ../../lib/networking/metallb
- ../../lib/networking/netconfig
- ../../lib/networking/nad
- ../../lib/control-plane

resources:
Expand Down Expand Up @@ -344,13 +341,14 @@ replacements:
options:
create: true

- source:
kind: ConfigMap
name: network-values
fieldPath: data.octavia.net-attach-def
targets:
- select:
kind: NetworkAttachmentDefinition
name: octavia
fieldPaths:
- spec.config
# TODO: check this again
# - source:
# kind: ConfigMap
# name: network-values
# fieldPath: data.octavia.net-attach-def
# targets:
# - select:
# kind: NetworkAttachmentDefinition
# name: octavia
# fieldPaths:
# - spec.config
22 changes: 22 additions & 0 deletions dt/uni07eta/network/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

transformers:
- |-
apiVersion: builtin
kind: NamespaceTransformer
metadata:
name: _ignored_
namespace: openstack
setRoleBindingSubjects: none
unsetOnly: true
fieldSpecs:
- path: metadata/name
kind: Namespace
create: true
components:
- ../../../lib/networking/metallb
- ../../../lib/networking/netconfig
- ../../../lib/networking/nad
16 changes: 14 additions & 2 deletions examples/dt/uni07eta/control-plane.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ cd architecture/examples/dt/uni07eta
```

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

Apply node network configuration

```bash
pushd control-plane/nncp
pushd control-plane/networking/nncp
kustomize build > nncp.yaml
oc apply -f nncp.yaml
oc wait nncp \
Expand All @@ -43,6 +43,18 @@ oc wait nncp \
popd
```

## Apply remaining networking configuration

Generate the reminaing networking configuration
```
kustomize build control-plane/networking > networking.yaml
```
Apply the networking CRs
```
oc apply -f networking.yaml
```


Generate the control-plane and networking CRs.

```bash
Expand Down
2 changes: 1 addition & 1 deletion examples/dt/uni07eta/control-plane/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ components:
- ../../../../dt/uni07eta

resources:
- nncp/values.yaml
- networking/nncp/values.yaml
- service-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

components:
- ../../../../../dt/uni07eta/network

resources:
- nncp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

components:
- ../../../../../dt/uni07eta/nncp
- ../../../../../../dt/uni07eta/nncp

resources:
- values.yaml
1 change: 1 addition & 0 deletions examples/dt/uni07eta/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ components:
- ../../../dt/uni07eta/edpm

resources:
- control-plane/networking/nncp/values.yaml
- values.yaml
3 changes: 2 additions & 1 deletion zuul.d/validations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,8 @@
- dt/uni07eta
- examples/dt/uni07eta
- examples/dt/uni07eta/control-plane
- examples/dt/uni07eta/control-plane/nncp
- examples/dt/uni07eta/control-plane/networking
- examples/dt/uni07eta/control-plane/networking/nncp
- examples/dt/uni07eta/edpm
- examples/dt/uni07eta/networker
- examples/dt/uni07eta/networker/nodeset
Expand Down