Skip to content

Enable octavia in uni02beta #536

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
104 changes: 104 additions & 0 deletions dt/uni02beta/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

secretGenerator:
- name: octavia-ca-passphrase
literals:
- server-ca-passphrase=12345678
options:
disableNameSuffixHash: true

transformers:
- |-
apiVersion: builtin
Expand Down Expand Up @@ -271,3 +278,100 @@ replacements:
- spec.heat.enabled
options:
create: true

# Octavia
- source:
kind: ConfigMap
name: service-values
fieldPath: data.octavia.enabled
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.octavia.enabled
options:
create: true

- source:
kind: ConfigMap
name: service-values
fieldPath: data.octavia.amphoraImageContainerImage
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.octavia.template.amphoraImageContainerImage
options:
create: true

- source:
kind: ConfigMap
name: service-values
fieldPath: data.octavia.apacheContainerImage
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.octavia.template.apacheContainerImage
options:
create: true

- source:
kind: ConfigMap
name: service-values
fieldPath: data.octavia.octaviaAPI.networkAttachments
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.octavia.template.octaviaAPI.networkAttachments
options:
create: true

- source:
kind: ConfigMap
name: service-values
fieldPath: data.octavia.octaviaHousekeeping.networkAttachments
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.octavia.template.octaviaHousekeeping.networkAttachments
options:
create: true

- source:
kind: ConfigMap
name: service-values
fieldPath: data.octavia.octaviaHealthManager.networkAttachments
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.octavia.template.octaviaHealthManager.networkAttachments
options:
create: true

- source:
kind: ConfigMap
name: service-values
fieldPath: data.octavia.octaviaWorker.networkAttachments
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.octavia.template.octaviaWorker.networkAttachments
options:
create: true

- source:
kind: ConfigMap
name: service-values
fieldPath: data.ovn.ovnController.nicMappings
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.ovn.template.ovnController.nicMappings
options:
create: true
18 changes: 16 additions & 2 deletions dt/uni02beta/networking/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,21 @@ transformers:
- path: metadata/name
kind: Namespace
create: true

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

resources:
- nad.yaml

replacements:
- source:
kind: ConfigMap
name: network-values
fieldPath: data.octavia.net-attach-def
targets:
- select:
kind: NetworkAttachmentDefinition
name: octavia
fieldPaths:
- spec.config
8 changes: 8 additions & 0 deletions dt/uni02beta/networking/nad.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
name: octavia
labels:
osp/net: octavia
osp/net-attach-def-type: standard
187 changes: 187 additions & 0 deletions dt/uni02beta/networking/nncp/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
---
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/nncp

patches:
- target:
kind: NodeNetworkConfigurationPolicy
name: master-0
patch: |-
- op: add
path: /spec/desiredState/interfaces/-
value:
description: Octavia vlan host interface
name: octavia
state: up
type: vlan
vlan:
base-iface: _replaced_
id: _replaced_

- target:
kind: NodeNetworkConfigurationPolicy
name: master-0
patch: |-
- op: add
path: /spec/desiredState/interfaces/-
value:
description: Octavia bridge
mtu: 1500
name: octbr
type: linux-bridge
bridge:
options:
stp:
enabled: false
port:
- name: octavia

- target:
kind: NodeNetworkConfigurationPolicy
name: master-1
patch: |-
- op: add
path: /spec/desiredState/interfaces/-
value:
description: Octavia vlan host interface
name: octavia
state: up
type: vlan
vlan:
base-iface: _replaced_
id: _replaced_

- target:
kind: NodeNetworkConfigurationPolicy
name: master-1
patch: |-
- op: add
path: /spec/desiredState/interfaces/-
value:
description: Octavia bridge
mtu: 1500
name: octbr
type: linux-bridge
bridge:
options:
stp:
enabled: false
port:
- name: octavia

- target:
kind: NodeNetworkConfigurationPolicy
name: master-2
patch: |-
- op: add
path: /spec/desiredState/interfaces/-
value:
description: Octavia vlan host interface
name: octavia
state: up
type: vlan
vlan:
base-iface: _replaced_
id: _replaced_

- target:
kind: NodeNetworkConfigurationPolicy
name: master-2
patch: |-
- op: add
path: /spec/desiredState/interfaces/-
value:
description: Octavia bridge
mtu: 1500
name: octbr
type: linux-bridge
bridge:
options:
stp:
enabled: false
port:
- name: octavia

replacements:
- source:
kind: ConfigMap
name: network-values
fieldPath: data.octavia.base_iface
targets:
- select:
kind: NodeNetworkConfigurationPolicy
name: master-0
fieldPaths:
- spec.desiredState.interfaces.[name=octavia].vlan.base-iface

- source:
kind: ConfigMap
name: network-values
fieldPath: data.octavia.vlan
targets:
- select:
kind: NodeNetworkConfigurationPolicy
name: master-0
fieldPaths:
- spec.desiredState.interfaces.[name=octavia].vlan.id

- source:
kind: ConfigMap
name: network-values
fieldPath: data.octavia.base_iface
targets:
- select:
kind: NodeNetworkConfigurationPolicy
name: master-1
fieldPaths:
- spec.desiredState.interfaces.[name=octavia].vlan.base-iface

- source:
kind: ConfigMap
name: network-values
fieldPath: data.octavia.vlan
targets:
- select:
kind: NodeNetworkConfigurationPolicy
name: master-1
fieldPaths:
- spec.desiredState.interfaces.[name=octavia].vlan.id

- source:
kind: ConfigMap
name: network-values
fieldPath: data.octavia.base_iface
targets:
- select:
kind: NodeNetworkConfigurationPolicy
name: master-2
fieldPaths:
- spec.desiredState.interfaces.[name=octavia].vlan.base-iface

- source:
kind: ConfigMap
name: network-values
fieldPath: data.octavia.vlan
targets:
- select:
kind: NodeNetworkConfigurationPolicy
name: master-2
fieldPaths:
- spec.desiredState.interfaces.[name=octavia].vlan.id
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ transformers:
create: true

components:
- ../../../../../../lib/nncp
- ../../../../../../dt/uni02beta/networking/nncp

resources:
- values.yaml
Expand Down
24 changes: 24 additions & 0 deletions examples/dt/uni02beta/control-plane/networking/nncp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,30 @@ data:
"range_end": "172.19.0.70"
}
}
octavia:
dnsDomain: octavia.openstack.lab
mtu: 1500
vlan: 23
base_iface: enp7s0
net-attach-def: |
{
"cniVersion": "0.3.1",
"name": "octavia",
"type": "bridge",
"bridge": "octbr",
"ipam": {
"type": "whereabouts",
"range": "172.23.0.0/24",
"range_start": "172.23.0.30",
"range_end": "172.23.0.70",
"routes": [
{
"dst": "172.24.0.0/16",
"gw": "172.23.0.150"
}
]
}
}
external:
dnsDomain: external.example.com
subnets:
Expand Down
Loading