Skip to content

Commit 3f7fbbd

Browse files
committed
Merge main
2 parents 235a50d + 3014159 commit 3f7fbbd

37 files changed

+1255
-87
lines changed

api/bases/ironic.openstack.org_ironicapis.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,23 @@ spec:
394394
bundle file
395395
type: string
396396
type: object
397+
topologyRef:
398+
description: |-
399+
TopologyRef to apply the Topology defined by the associated CR referenced
400+
by name
401+
properties:
402+
name:
403+
description: Name - The Topology CR name that the Service references
404+
type: string
405+
namespace:
406+
description: |-
407+
Namespace - The Namespace to fetch the Topology CR referenced
408+
NOTE: Namespace currently points by default to the same namespace where
409+
the Service is deployed. Customizing the namespace is not supported and
410+
webhooks prevent editing this field to a value different from the
411+
current project
412+
type: string
413+
type: object
397414
transportURLSecret:
398415
description: Secret containing RabbitMq transport URL
399416
type: string
@@ -457,6 +474,9 @@ spec:
457474
type: string
458475
description: Map of hashes to track e.g. job status
459476
type: object
477+
lastAppliedTopology:
478+
description: LastAppliedTopology - the last applied Topology
479+
type: string
460480
networkAttachments:
461481
additionalProperties:
462482
items:

api/bases/ironic.openstack.org_ironicconductors.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,23 @@ spec:
265265
bundle file
266266
type: string
267267
type: object
268+
topologyRef:
269+
description: |-
270+
TopologyRef to apply the Topology defined by the associated CR referenced
271+
by name
272+
properties:
273+
name:
274+
description: Name - The Topology CR name that the Service references
275+
type: string
276+
namespace:
277+
description: |-
278+
Namespace - The Namespace to fetch the Topology CR referenced
279+
NOTE: Namespace currently points by default to the same namespace where
280+
the Service is deployed. Customizing the namespace is not supported and
281+
webhooks prevent editing this field to a value different from the
282+
current project
283+
type: string
284+
type: object
268285
transportURLSecret:
269286
description: TransportURLSecret - Secret containing RabbitMQ transportURL
270287
type: string
@@ -323,6 +340,9 @@ spec:
323340
type: string
324341
description: Map of hashes to track e.g. job status
325342
type: object
343+
lastAppliedTopology:
344+
description: LastAppliedTopology - the last applied Topology
345+
type: string
326346
networkAttachments:
327347
additionalProperties:
328348
items:

api/bases/ironic.openstack.org_ironicinspectors.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,23 @@ spec:
451451
bundle file
452452
type: string
453453
type: object
454+
topologyRef:
455+
description: |-
456+
TopologyRef to apply the Topology defined by the associated CR referenced
457+
by name
458+
properties:
459+
name:
460+
description: Name - The Topology CR name that the Service references
461+
type: string
462+
namespace:
463+
description: |-
464+
Namespace - The Namespace to fetch the Topology CR referenced
465+
NOTE: Namespace currently points by default to the same namespace where
466+
the Service is deployed. Customizing the namespace is not supported and
467+
webhooks prevent editing this field to a value different from the
468+
current project
469+
type: string
470+
type: object
454471
type: object
455472
status:
456473
description: IronicInspectorStatus defines the observed state of IronicInspector
@@ -512,6 +529,9 @@ spec:
512529
type: string
513530
description: Map of hashes to track e.g. job status
514531
type: object
532+
lastAppliedTopology:
533+
description: LastAppliedTopology - the last applied Topology
534+
type: string
515535
networkAttachments:
516536
additionalProperties:
517537
items:

api/bases/ironic.openstack.org_ironicneutronagents.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,23 @@ spec:
179179
bundle file
180180
type: string
181181
type: object
182+
topologyRef:
183+
description: |-
184+
TopologyRef to apply the Topology defined by the associated CR referenced
185+
by name
186+
properties:
187+
name:
188+
description: Name - The Topology CR name that the Service references
189+
type: string
190+
namespace:
191+
description: |-
192+
Namespace - The Namespace to fetch the Topology CR referenced
193+
NOTE: Namespace currently points by default to the same namespace where
194+
the Service is deployed. Customizing the namespace is not supported and
195+
webhooks prevent editing this field to a value different from the
196+
current project
197+
type: string
198+
type: object
182199
type: object
183200
status:
184201
description: IronicNeutronAgentStatus defines the observed state of ML2
@@ -231,6 +248,9 @@ spec:
231248
type: string
232249
description: Map of hashes to track e.g. job status
233250
type: object
251+
lastAppliedTopology:
252+
description: LastAppliedTopology - the last applied Topology
253+
type: string
234254
observedGeneration:
235255
description: |-
236256
ObservedGeneration - the most recent generation observed for this

api/bases/ironic.openstack.org_ironics.yaml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,24 @@ spec:
392392
a pre-created bundle file
393393
type: string
394394
type: object
395+
topologyRef:
396+
description: |-
397+
TopologyRef to apply the Topology defined by the associated CR referenced
398+
by name
399+
properties:
400+
name:
401+
description: Name - The Topology CR name that the Service
402+
references
403+
type: string
404+
namespace:
405+
description: |-
406+
Namespace - The Namespace to fetch the Topology CR referenced
407+
NOTE: Namespace currently points by default to the same namespace where
408+
the Service is deployed. Customizing the namespace is not supported and
409+
webhooks prevent editing this field to a value different from the
410+
current project
411+
type: string
412+
type: object
395413
type: object
396414
ironicConductors:
397415
description: IronicConductors - Spec definitions for the conductor
@@ -541,6 +559,24 @@ spec:
541559
storageRequest:
542560
description: StorageRequest
543561
type: string
562+
topologyRef:
563+
description: |-
564+
TopologyRef to apply the Topology defined by the associated CR referenced
565+
by name
566+
properties:
567+
name:
568+
description: Name - The Topology CR name that the Service
569+
references
570+
type: string
571+
namespace:
572+
description: |-
573+
Namespace - The Namespace to fetch the Topology CR referenced
574+
NOTE: Namespace currently points by default to the same namespace where
575+
the Service is deployed. Customizing the namespace is not supported and
576+
webhooks prevent editing this field to a value different from the
577+
current project
578+
type: string
579+
type: object
544580
required:
545581
- storageClass
546582
- storageRequest
@@ -902,6 +938,24 @@ spec:
902938
a pre-created bundle file
903939
type: string
904940
type: object
941+
topologyRef:
942+
description: |-
943+
TopologyRef to apply the Topology defined by the associated CR referenced
944+
by name
945+
properties:
946+
name:
947+
description: Name - The Topology CR name that the Service
948+
references
949+
type: string
950+
namespace:
951+
description: |-
952+
Namespace - The Namespace to fetch the Topology CR referenced
953+
NOTE: Namespace currently points by default to the same namespace where
954+
the Service is deployed. Customizing the namespace is not supported and
955+
webhooks prevent editing this field to a value different from the
956+
current project
957+
type: string
958+
type: object
905959
type: object
906960
ironicNeutronAgent:
907961
description: |-
@@ -1000,6 +1054,24 @@ spec:
10001054
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
10011055
type: object
10021056
type: object
1057+
topologyRef:
1058+
description: |-
1059+
TopologyRef to apply the Topology defined by the associated CR referenced
1060+
by name
1061+
properties:
1062+
name:
1063+
description: Name - The Topology CR name that the Service
1064+
references
1065+
type: string
1066+
namespace:
1067+
description: |-
1068+
Namespace - The Namespace to fetch the Topology CR referenced
1069+
NOTE: Namespace currently points by default to the same namespace where
1070+
the Service is deployed. Customizing the namespace is not supported and
1071+
webhooks prevent editing this field to a value different from the
1072+
current project
1073+
type: string
1074+
type: object
10031075
type: object
10041076
nodeSelector:
10051077
additionalProperties:
@@ -1058,6 +1130,23 @@ spec:
10581130
Storage class to host data. This is passed to IronicConductors unless
10591131
storageClass is explicitly set for the conductor.
10601132
type: string
1133+
topologyRef:
1134+
description: |-
1135+
TopologyRef to apply the Topology defined by the associated CR referenced
1136+
by name
1137+
properties:
1138+
name:
1139+
description: Name - The Topology CR name that the Service references
1140+
type: string
1141+
namespace:
1142+
description: |-
1143+
Namespace - The Namespace to fetch the Topology CR referenced
1144+
NOTE: Namespace currently points by default to the same namespace where
1145+
the Service is deployed. Customizing the namespace is not supported and
1146+
webhooks prevent editing this field to a value different from the
1147+
current project
1148+
type: string
1149+
type: object
10611150
required:
10621151
- databaseInstance
10631152
- ironicAPI

api/go.mod

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ go 1.21
55
require (
66
github.com/onsi/ginkgo/v2 v2.20.1
77
github.com/onsi/gomega v1.34.1
8-
github.com/openstack-k8s-operators/lib-common/modules/common v0.5.1-0.20241216113837-d172b3ac0f4e
9-
k8s.io/api v0.29.12
10-
k8s.io/apimachinery v0.29.12
11-
k8s.io/client-go v0.29.12
8+
github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20250210183624-a8bf66784d6d
9+
github.com/openstack-k8s-operators/lib-common/modules/common v0.5.1-0.20250205143454-43504d7ad19a
10+
k8s.io/api v0.29.13
11+
k8s.io/apimachinery v0.29.13
12+
k8s.io/client-go v0.29.13
1213
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8
1314
sigs.k8s.io/controller-runtime v0.17.6
1415
)
@@ -18,7 +19,6 @@ require (
1819
github.com/cespare/xxhash/v2 v2.2.0 // indirect
1920
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
2021
github.com/emicklei/go-restful/v3 v3.12.0 // indirect
21-
github.com/evanphx/json-patch v5.7.0+incompatible // indirect
2222
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
2323
github.com/fsnotify/fsnotify v1.7.0 // indirect
2424
github.com/go-logr/logr v1.4.2 // indirect
@@ -65,8 +65,8 @@ require (
6565
gopkg.in/inf.v0 v0.9.1 // indirect
6666
gopkg.in/yaml.v2 v2.4.0 // indirect
6767
gopkg.in/yaml.v3 v3.0.1 // indirect
68-
k8s.io/apiextensions-apiserver v0.29.12 // indirect
69-
k8s.io/component-base v0.29.12 // indirect
68+
k8s.io/apiextensions-apiserver v0.29.13 // indirect
69+
k8s.io/component-base v0.29.13 // indirect
7070
k8s.io/klog/v2 v2.120.1 // indirect
7171
k8s.io/kube-openapi v0.0.0-20240322212309-b815d8309940 // indirect
7272
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect

api/go.sum

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,10 @@ github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k=
7474
github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY=
7575
github.com/openshift/api v0.0.0-20240830023148-b7d0481c9094 h1:J1wuGhVxpsHykZBa6Beb1gQ96Ptej9AE/BvwCBiRj1E=
7676
github.com/openshift/api v0.0.0-20240830023148-b7d0481c9094/go.mod h1:CxgbWAlvu2iQB0UmKTtRu1YfepRg1/vJ64n2DlIEVz4=
77-
github.com/openstack-k8s-operators/lib-common/modules/common v0.5.1-0.20241216113837-d172b3ac0f4e h1:hf4kVQBkyG79WcHBxdQ25QrDBbGFdarebS1Tc0Xclq4=
78-
github.com/openstack-k8s-operators/lib-common/modules/common v0.5.1-0.20241216113837-d172b3ac0f4e/go.mod h1:YpNTuJhDWhbXM50O3qBkhO7M+OOyRmWkNVmJ4y3cyFs=
77+
github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20250210183624-a8bf66784d6d h1:JuIcZjfFUH9G68MR9F62xBK4eS5F2P5nKVCoDXFrvQM=
78+
github.com/openstack-k8s-operators/infra-operator/apis v0.5.1-0.20250210183624-a8bf66784d6d/go.mod h1:kkjcOSZ7jkHbVzxJd0nDQzjB+vqafuAMgSf7AnEXydw=
79+
github.com/openstack-k8s-operators/lib-common/modules/common v0.5.1-0.20250205143454-43504d7ad19a h1:3LuUgB85VxGD6lmVOeZelYEASmytkrzaudU014PN7xw=
80+
github.com/openstack-k8s-operators/lib-common/modules/common v0.5.1-0.20250205143454-43504d7ad19a/go.mod h1:KxnNSUk15llkKTSq/bQEE7pnc0IMk44fxhoBRpimMa8=
7981
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
8082
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
8183
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
@@ -178,16 +180,16 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
178180
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
179181
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
180182
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
181-
k8s.io/api v0.29.12 h1:SsEEMtFupOAt3pAAtAz0PDu+54g3L5rwbSCi0xQzAJM=
182-
k8s.io/api v0.29.12/go.mod h1:QFwqOP+7LNoAG1RI3vKAFxjKSLQTCamcPzAQ0Z/Yhuk=
183-
k8s.io/apiextensions-apiserver v0.29.12 h1:xoQfYPwAzfcoH/MVuQiSPTWmFrmblvYbUMODpfYyyw8=
184-
k8s.io/apiextensions-apiserver v0.29.12/go.mod h1:L1GHiWK2bkYrZOkFtChfkVpPUh9Ogr6gmShM28Yhqk0=
185-
k8s.io/apimachinery v0.29.12 h1:k6OdfK9xaNANQvWkl1pSICJGLjB4jSuJ3gGP9hBKOhE=
186-
k8s.io/apimachinery v0.29.12/go.mod h1:i3FJVwhvSp/6n8Fl4K97PJEP8C+MM+aoDq4+ZJBf70Y=
187-
k8s.io/client-go v0.29.12 h1:PjwJXavmpAqOWBRy4U5V/g3JQBpclIHEn5dvfTfsY+w=
188-
k8s.io/client-go v0.29.12/go.mod h1:hRHG6tAKxaLVKF5SlMqgXrbqPEoUcUpJGFFrC3jU69A=
189-
k8s.io/component-base v0.29.12 h1:NuFNzBSF3Iopih6VpvYmtjpdN1MLc9PcByl60fcJ0tQ=
190-
k8s.io/component-base v0.29.12/go.mod h1:YHua3E5Lvnva6dXqGqiuRj8CxhBw7g6KgYV/dcS7LBU=
183+
k8s.io/api v0.29.13 h1:VkMIbjJw1t2VgTatg8ggzI93LOfFa8z8SzAYzXtWuEg=
184+
k8s.io/api v0.29.13/go.mod h1:fBWhXqqE25b46PZEVA2DXN2EuhNg1ZT3VRyb5JitLG8=
185+
k8s.io/apiextensions-apiserver v0.29.13 h1:3xsTohNwndx4NJjgqoi5VuBPWeG4yY4VXOF62ugXvhU=
186+
k8s.io/apiextensions-apiserver v0.29.13/go.mod h1:plxNh3qMNsiMo4svQtkVp47n+2/rwm/c8FTJYR6rikQ=
187+
k8s.io/apimachinery v0.29.13 h1:a7I4uQtlfaL+UTRGFhl8lLd2nHBR7qt+axhQLtpLYMg=
188+
k8s.io/apimachinery v0.29.13/go.mod h1:i3FJVwhvSp/6n8Fl4K97PJEP8C+MM+aoDq4+ZJBf70Y=
189+
k8s.io/client-go v0.29.13 h1:M2scR9NWGlzI2YoIxTgwx2N3OA+dXqN87zsM4tvewmA=
190+
k8s.io/client-go v0.29.13/go.mod h1:BBzF0Pr78Y8DM20j22E6tOMwTBpFaKnSnn6N0pNe4VE=
191+
k8s.io/component-base v0.29.13 h1:RbksXVzXYYYvmOCArMKIkxna5eTt6DjI4Zy/4H3JFLo=
192+
k8s.io/component-base v0.29.13/go.mod h1:pjMLwLNxDg0JvXRc69GIFUEawiZEtDzm0yAJ5+Naj9s=
191193
k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw=
192194
k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
193195
k8s.io/kube-openapi v0.0.0-20240322212309-b815d8309940 h1:qVoMaQV5t62UUvHe16Q3eb2c5HPzLHYzsi0Tu/xLndo=

api/v1beta1/common_types.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package v1beta1
1818

1919
import (
2020
corev1 "k8s.io/api/core/v1"
21+
topologyv1 "github.com/openstack-k8s-operators/infra-operator/apis/topology/v1beta1"
2122
)
2223

2324
// IronicServiceTemplate defines the common input parameters for Ironic services
@@ -51,6 +52,11 @@ type IronicServiceTemplate struct {
5152
// But can also be used to add additional files. Those get added to the service config dir in /etc/<service> .
5253
// TODO: -> implement
5354
DefaultConfigOverwrite map[string]string `json:"defaultConfigOverwrite,omitempty"`
55+
56+
// +kubebuilder:validation:Optional
57+
// TopologyRef to apply the Topology defined by the associated CR referenced
58+
// by name
59+
TopologyRef *topologyv1.TopoRef `json:"topologyRef,omitempty"`
5460
}
5561

5662
// PasswordSelector to identify the AdminUser password from the Secret

api/v1beta1/ironic_types.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ limitations under the License.
1717
package v1beta1
1818

1919
import (
20+
topologyv1 "github.com/openstack-k8s-operators/infra-operator/apis/topology/v1beta1"
2021
condition "github.com/openstack-k8s-operators/lib-common/modules/common/condition"
2122
"github.com/openstack-k8s-operators/lib-common/modules/common/util"
2223
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -155,6 +156,11 @@ type IronicSpecCore struct {
155156
// +kubebuilder:validation:Minimum=10
156157
// APITimeout for HAProxy, Apache
157158
APITimeout int `json:"apiTimeout"`
159+
160+
// +kubebuilder:validation:Optional
161+
// TopologyRef to apply the Topology defined by the associated CR referenced
162+
// by name
163+
TopologyRef *topologyv1.TopoRef `json:"topologyRef,omitempty"`
158164
}
159165

160166
// IronicImages to specify container images required by all ironic services

0 commit comments

Comments
 (0)