Skip to content

Commit

Permalink
Merge pull request openstack-k8s-operators#211 from hjensas/uni01alph…
Browse files Browse the repository at this point in the history
…a-ironic

Add ironic config to uni01alpha

Reviewed-by: Steve Baker <[email protected]>
Reviewed-by: Harald <[email protected]>
Reviewed-by: Pragadeeswaran Sathyanarayanan <[email protected]>
Reviewed-by: John Fulton <[email protected]>
Reviewed-by: Balazs Gibizer <[email protected]>
Reviewed-by: Andrew Bays <[email protected]>
  • Loading branch information
softwarefactory-project-zuul[bot] authored Jul 10, 2024
2 parents 67c89bd + 3074913 commit 1e2ed2b
Show file tree
Hide file tree
Showing 9 changed files with 716 additions and 8 deletions.
116 changes: 114 additions & 2 deletions dt/uni01alpha/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ transformers:
components:
- ../../lib/networking/metallb
- ../../lib/networking/netconfig
- netconfig
- ../../lib/networking/nad
- ../../lib/control-plane

resources:
- ocp_networks_octavia_netattach.yaml
- nad.yaml

replacements:
- source:
Expand Down Expand Up @@ -153,6 +153,18 @@ replacements:
options:
create: true

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

- source:
kind: ConfigMap
name: service-values
Expand Down Expand Up @@ -357,6 +369,95 @@ replacements:
options:
create: true

- source:
kind: ConfigMap
name: network-values
fieldPath: data.ctlplane.endpoint_annotations
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.ironic.template.ironicAPI.override.service.internal.metadata.annotations
options:
create: true

- source:
kind: ConfigMap
name: network-values
fieldPath: data.ctlplane.endpoint_annotations
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.ironic.template.ironicInspector.override.service.internal.metadata.annotations
options:
create: true

- source:
kind: ConfigMap
name: network-values
fieldPath: data.lbServiceType
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.ironic.template.ironicAPI.override.service.internal.spec.type
- spec.ironic.template.ironicInspector.override.service.internal.spec.type
options:
create: true

- source:
kind: ConfigMap
name: network-values
fieldPath: data.ironic.iface
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.ironic.template.ironicConductors.0.networkAttachments.0
- spec.ironic.template.ironicConductors.0.provisionNetwork
- spec.ironic.template.ironicInspector.inspectionNetwork
- spec.ironic.template.ironicInspector.networkAttachments.0
- spec.ovn.template.ovnController.nicMappings.ironic
options:
create: true

- source:
kind: ConfigMap
name: service-values
fieldPath: data.ironic.ironicConductors.0.customServiceConfig
targets:
- select:
kind: OpenStackControlPlane
fieldPaths:
- spec.ironic.template.ironicConductors.0.customServiceConfig
options:
create: true

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

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

- source:
kind: ConfigMap
name: network-values
Expand All @@ -367,3 +468,14 @@ replacements:
name: octavia
fieldPaths:
- spec.config

- source:
kind: ConfigMap
name: network-values
fieldPath: data.ironic.net-attach-def
targets:
- select:
kind: NetworkAttachmentDefinition
name: ironic
fieldPaths:
- spec.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,11 @@ metadata:
labels:
osp/net: octavia
osp/net-attach-def-type: standard
---
apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
name: ironic
labels:
osp/net: ironic
osp/net-attach-def-type: standard
121 changes: 121 additions & 0 deletions dt/uni01alpha/netconfig/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

resources:
- netconfig.yaml

replacements:
# NetConfig dnsDomain
- source:
kind: ConfigMap
name: network-values
fieldPath: data.ctlplane.dnsDomain
targets:
- select:
kind: NetConfig
fieldPaths:
- spec.networks.[name=ctlplane].dnsDomain
- source:
kind: ConfigMap
name: network-values
fieldPath: data.internalapi.dnsDomain
targets:
- select:
kind: NetConfig
fieldPaths:
- spec.networks.[name=internalapi].dnsDomain
- source:
kind: ConfigMap
name: network-values
fieldPath: data.storage.dnsDomain
targets:
- select:
kind: NetConfig
fieldPaths:
- spec.networks.[name=storage].dnsDomain
- source:
kind: ConfigMap
name: network-values
fieldPath: data.tenant.dnsDomain
targets:
- select:
kind: NetConfig
fieldPaths:
- spec.networks.[name=tenant].dnsDomain

# NetConfig MTU
- source:
kind: ConfigMap
name: network-values
fieldPath: data.ctlplane.mtu
targets:
- select:
kind: NetConfig
fieldPaths:
- spec.networks.[name=ctlplane].mtu
- source:
kind: ConfigMap
name: network-values
fieldPath: data.internalapi.mtu
targets:
- select:
kind: NetConfig
fieldPaths:
- spec.networks.[name=internalapi].mtu
- source:
kind: ConfigMap
name: network-values
fieldPath: data.storage.mtu
targets:
- select:
kind: NetConfig
fieldPaths:
- spec.networks.[name=storage].mtu
- source:
kind: ConfigMap
name: network-values
fieldPath: data.tenant.mtu
targets:
- select:
kind: NetConfig
fieldPaths:
- spec.networks.[name=tenant].mtu

# NetConfig subnets
- source:
kind: ConfigMap
name: network-values
fieldPath: data.ctlplane.subnets
targets:
- select:
kind: NetConfig
fieldPaths:
- spec.networks.[name=ctlplane].subnets
- source:
kind: ConfigMap
name: network-values
fieldPath: data.internalapi.subnets
targets:
- select:
kind: NetConfig
fieldPaths:
- spec.networks.[name=internalapi].subnets
- source:
kind: ConfigMap
name: network-values
fieldPath: data.storage.subnets
targets:
- select:
kind: NetConfig
fieldPaths:
- spec.networks.[name=storage].subnets
- source:
kind: ConfigMap
name: network-values
fieldPath: data.tenant.subnets
targets:
- select:
kind: NetConfig
fieldPaths:
- spec.networks.[name=tenant].subnets
28 changes: 28 additions & 0 deletions dt/uni01alpha/netconfig/netconfig.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
apiVersion: network.openstack.org/v1beta1
kind: NetConfig
metadata:
name: netconfig
namespace: openstack
spec:
networks:
- dnsDomain: _replaced_
name: ctlplane
subnets:
- _replaced_
mtu: 1500
- dnsDomain: _replaced_
name: internalapi
subnets:
- _replaced_
mtu: 1500
- dnsDomain: _replaced_
name: storage
subnets:
- _replaced_
mtu: 1500
- dnsDomain: _replaced_
name: tenant
subnets:
- _replaced_
mtu: 1500
Loading

0 comments on commit 1e2ed2b

Please sign in to comment.