Skip to content

Commit

Permalink
Decouple uni06zeta network stage from control plane stage
Browse files Browse the repository at this point in the history
Also Add automation file for uni06zeta-adoption
  • Loading branch information
fyanac committed Feb 5, 2025
1 parent 44608a4 commit 738c8f6
Show file tree
Hide file tree
Showing 14 changed files with 106 additions and 30 deletions.
28 changes: 28 additions & 0 deletions automation/vars/uni06zeta-adoption.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
vas:
uni06zeta-adoption:
stages:
- path: examples/dt/uni06zeta/control-plane/networking/nncp
wait_conditions:
- >-
oc -n openstack wait nncp
-l osp/nncm-config-type=standard
--for jsonpath='{.status.conditions[0].reason}'=SuccessfullyConfigured
--timeout=5m
values:
- name: network-values
src_file: values.yaml
build_output: nncp.yaml

- path: examples/dt/uni06zeta/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: control-plane.yaml
16 changes: 14 additions & 2 deletions automation/vars/uni06zeta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
vas:
uni06zeta:
stages:
- path: examples/dt/uni06zeta/control-plane/nncp
- path: examples/dt/uni06zeta/control-plane/networking/nncp
wait_conditions:
- >-
oc -n openstack wait nncp
Expand All @@ -15,6 +15,18 @@ vas:
src_file: values.yaml
build_output: nncp.yaml

- path: examples/dt/uni06zeta/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/uni06zeta/control-plane
wait_conditions:
- >-
Expand All @@ -25,7 +37,7 @@ vas:
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
16 changes: 1 addition & 15 deletions dt/uni06zeta/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,10 @@ transformers:
create: true
components:
- ../../lib/networking/metallb
- ../../lib/networking/netconfig
- ../../lib/networking/nad
- ../../lib/control-plane

resources:
- resources/octavia-network-attachment-definition.yaml
- networking/resources/octavia-network-attachment-definition.yaml

replacements:
- source:
Expand Down Expand Up @@ -259,14 +256,3 @@ replacements:
- spec.neutron.template.customServiceConfig
options:
create: true

- source:
kind: ConfigMap
name: network-values
fieldPath: data.octavia.net-attach-def
targets:
- select:
kind: NetworkAttachmentDefinition
name: octavia
fieldPaths:
- spec.config
37 changes: 37 additions & 0 deletions dt/uni06zeta/networking/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
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

resources:
- resources/octavia-network-attachment-definition.yaml

replacements:
- source:
kind: ConfigMap
name: network-values
fieldPath: data.octavia.net-attach-def
targets:
- select:
kind: NetworkAttachmentDefinition
name: octavia
fieldPaths:
- spec.config

This file was deleted.

4 changes: 2 additions & 2 deletions examples/dt/uni06zeta/control-plane.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ cd architecture/examples/dt/uni06zeta
```

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 Down
2 changes: 1 addition & 1 deletion examples/dt/uni06zeta/control-plane/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ components:
- ../../../../dt/uni06zeta

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/uni06zeta/networking/

resources:
- nncp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ transformers:
create: true
components:
- ../../../../../dt/uni06zeta/nncp
- ../../../../../../dt/uni06zeta/nncp

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

resources:
- control-plane/networking/nncp/values.yaml
- values.yaml
1 change: 1 addition & 0 deletions zuul.d/projects.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
- rhoso-architecture-validate-uni04delta-ipv6
- rhoso-architecture-validate-uni05epsilon
- rhoso-architecture-validate-uni06zeta
- rhoso-architecture-validate-uni06zeta-adoption
- rhoso-architecture-validate-uni07eta
github-experimental-trigger:
jobs:
Expand Down
12 changes: 11 additions & 1 deletion zuul.d/validations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -299,13 +299,23 @@
- dt/uni06zeta
- examples/dt/uni06zeta
- examples/dt/uni06zeta/control-plane
- examples/dt/uni06zeta/control-plane/nncp
- examples/dt/uni06zeta/control-plane/networking
- examples/dt/uni06zeta/control-plane/networking/nncp
- lib
name: rhoso-architecture-validate-uni06zeta
parent: rhoso-architecture-base-job
vars:
cifmw_architecture_scenario: uni06zeta
cifmw_networking_env_def_file: automation/net-env/uni06zeta.yaml
- job:
files:
- examples/dt/uni06zeta/control-plane/networking
- examples/dt/uni06zeta/control-plane/networking/nncp
- lib
name: rhoso-architecture-validate-uni06zeta-adoption
parent: rhoso-architecture-base-job
vars:
cifmw_architecture_scenario: uni06zeta-adoption
- job:
files:
- automation/net-env/uni07eta.yaml
Expand Down

0 comments on commit 738c8f6

Please sign in to comment.