Skip to content

Commit 80a3474

Browse files
committed
Allow override CtlplaneInterface in nodeset node
Allow overriding the CtlplaneInterface in the nodeset Nodes, this will allow nodesets where one or more nodes use different interfaces for the ctlplane interface.
1 parent 7deacf8 commit 80a3474

File tree

9 files changed

+17
-6
lines changed

9 files changed

+17
-6
lines changed

apis/bases/dataplane.openstack.org_openstackdataplanenodesets.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,8 @@ spec:
813813
additionalProperties:
814814
type: string
815815
type: object
816+
ctlplaneInterface:
817+
type: string
816818
hostName:
817819
type: string
818820
managementNetwork:

apis/dataplane/v1beta1/common.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ type NodeSection struct {
130130
// ManagementNetwork - Name of network to use for management (SSH/Ansible)
131131
// +kubebuilder:validation:Optional
132132
ManagementNetwork string `json:"managementNetwork,omitempty"`
133+
134+
// CtlplaneInterface - Interface on the provisioned nodes to use for ctlplane network
135+
// +kubebuilder:validation:Optional
136+
CtlplaneInterface string `json:"ctlplaneInterface,omitempty"`
133137
}
134138

135139
// NodeTemplate is a specification of the node attributes that override top level attributes.

apis/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ require (
8585
github.com/prometheus/procfs v0.13.0 // indirect
8686
github.com/rabbitmq/cluster-operator/v2 v2.11.0 // indirect
8787
github.com/robfig/cron/v3 v3.0.1 // indirect
88-
github.com/spf13/pflag v1.0.5 // indirect
88+
github.com/spf13/pflag v1.0.6 // indirect
8989
golang.org/x/crypto v0.33.0 // indirect
9090
golang.org/x/net v0.34.0 // indirect
9191
golang.org/x/oauth2 v0.18.0 // indirect

apis/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
161161
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
162162
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
163163
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
164-
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
165-
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
164+
github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
165+
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
166166
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
167167
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
168168
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=

bindata/crds/crds.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18816,6 +18816,8 @@ spec:
1881618816
additionalProperties:
1881718817
type: string
1881818818
type: object
18819+
ctlplaneInterface:
18820+
type: string
1881918821
hostName:
1882018822
type: string
1882118823
managementNetwork:

config/crd/bases/dataplane.openstack.org_openstackdataplanenodesets.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,8 @@ spec:
813813
additionalProperties:
814814
type: string
815815
type: object
816+
ctlplaneInterface:
817+
type: string
816818
hostName:
817819
type: string
818820
managementNetwork:

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ require (
9191
github.com/rhobs/obo-prometheus-operator/pkg/apis/monitoring v0.71.0-rhobs1 // indirect
9292
github.com/rhobs/observability-operator v0.3.1 // indirect
9393
github.com/robfig/cron/v3 v3.0.1 // indirect
94-
github.com/spf13/pflag v1.0.5 // indirect
94+
github.com/spf13/pflag v1.0.6 // indirect
9595
go.uber.org/multierr v1.11.0 // indirect
9696
golang.org/x/crypto v0.33.0 // indirect
9797
golang.org/x/mod v0.20.0 // indirect

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
173173
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
174174
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
175175
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
176-
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
177-
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
176+
github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
177+
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
178178
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
179179
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
180180
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=

pkg/dataplane/baremetal.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ func DeployBaremetalSet(
8383
instanceSpec.BmhLabelSelector = node.BmhLabelSelector
8484
instanceSpec.UserData = node.UserData
8585
instanceSpec.NetworkData = node.NetworkData
86+
instanceSpec.CtlplaneInterface = node.CtlplaneInterface
8687
for _, res := range ipSet.Status.Reservation {
8788
if strings.ToLower(string(res.Network)) == dataplanev1.CtlPlaneNetwork {
8889
_, ipNet, err := net.ParseCIDR(res.Cidr)

0 commit comments

Comments
 (0)