Skip to content

Commit

Permalink
Switch to "Core" API version without container images
Browse files Browse the repository at this point in the history
  • Loading branch information
dprince committed Mar 15, 2024
1 parent e9c8b3b commit b1645b0
Show file tree
Hide file tree
Showing 29 changed files with 201 additions and 547 deletions.
263 changes: 30 additions & 233 deletions apis/bases/core.openstack.org_openstackcontrolplanes.yaml

Large diffs are not rendered by default.

42 changes: 21 additions & 21 deletions apis/core/v1beta1/openstackcontrolplane_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ type KeystoneSection struct {
// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
// Template - Overrides to use when creating the Keystone service
Template keystonev1.KeystoneAPISpec `json:"template,omitempty"`
Template keystonev1.KeystoneAPISpecCore `json:"template,omitempty"`

// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
Expand Down Expand Up @@ -330,7 +330,7 @@ type PlacementSection struct {
// +kubebuilder:validation:Optional
//+operator-sdk:csv:customresourcedefinitions:type=spec
// Template - Overrides to use when creating the Placement API
Template placementv1.PlacementAPISpec `json:"template,omitempty"`
Template placementv1.PlacementAPISpecCore `json:"template,omitempty"`

// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
Expand All @@ -349,7 +349,7 @@ type GlanceSection struct {
// +kubebuilder:validation:Optional
//+operator-sdk:csv:customresourcedefinitions:type=spec
// Template - Overrides to use when creating the Glance Service
Template glancev1.GlanceSpec `json:"template,omitempty"`
Template glancev1.GlanceSpecCore `json:"template,omitempty"`

// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
Expand All @@ -368,7 +368,7 @@ type CinderSection struct {
// +kubebuilder:validation:Optional
//+operator-sdk:csv:customresourcedefinitions:type=spec
// Template - Overrides to use when creating Cinder Resources
Template cinderv1.CinderSpec `json:"template,omitempty"`
Template cinderv1.CinderSpecCore `json:"template,omitempty"`

// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
Expand All @@ -387,7 +387,7 @@ type GaleraSection struct {
// +kubebuilder:validation:Optional
//+operator-sdk:csv:customresourcedefinitions:type=spec
// Templates - Overrides to use when creating the Galera databases
Templates map[string]mariadbv1.GaleraSpec `json:"templates,omitempty"`
Templates map[string]mariadbv1.GaleraSpecCore `json:"templates,omitempty"`
}

// RabbitmqSection defines the desired state of RabbitMQ service
Expand Down Expand Up @@ -415,15 +415,15 @@ type MemcachedSection struct {
// +kubebuilder:validation:Optional
//+operator-sdk:csv:customresourcedefinitions:type=spec
// Templates - Overrides to use when creating the Memcached databases
Templates map[string]memcachedv1.MemcachedSpec `json:"templates,omitempty"`
Templates map[string]memcachedv1.MemcachedSpecCore `json:"templates,omitempty"`
}

// RabbitmqTemplate definition
type RabbitmqTemplate struct {
// +kubebuilder:validation:Required
//+operator-sdk:csv:customresourcedefinitions:type=spec
// Overrides to use when creating the Rabbitmq clusters
rabbitmqv2.RabbitmqClusterSpec `json:",inline"`
rabbitmqv2.RabbitmqClusterSpecCore `json:",inline"`
}

// OvnSection defines the desired state of OVN services
Expand All @@ -445,17 +445,17 @@ type OvnResources struct {
// +kubebuilder:validation:Optional
//+operator-sdk:csv:customresourcedefinitions:type=spec
// OVNDBCluster - Overrides to use when creating the OVNDBCluster services
OVNDBCluster map[string]ovnv1.OVNDBClusterSpec `json:"ovnDBCluster,omitempty"`
OVNDBCluster map[string]ovnv1.OVNDBClusterSpecCore `json:"ovnDBCluster,omitempty"`

// +kubebuilder:validation:Optional
//+operator-sdk:csv:customresourcedefinitions:type=spec
// OVNNorthd - Overrides to use when creating the OVNNorthd service
OVNNorthd ovnv1.OVNNorthdSpec `json:"ovnNorthd,omitempty"`
OVNNorthd ovnv1.OVNNorthdSpecCore `json:"ovnNorthd,omitempty"`

// +kubebuilder:validation:Optional
//+operator-sdk:csv:customresourcedefinitions:type=spec
// OVNController - Overrides to use when creating the OVNController service
OVNController ovnv1.OVNControllerSpec `json:"ovnController,omitempty"`
OVNController ovnv1.OVNControllerSpecCore `json:"ovnController,omitempty"`
}

// NeutronSection defines the desired state of Neutron service
Expand All @@ -469,7 +469,7 @@ type NeutronSection struct {
// +kubebuilder:validation:Optional
//+operator-sdk:csv:customresourcedefinitions:type=spec
// Template - Overrides to use when creating the Neutron Service
Template neutronv1.NeutronAPISpec `json:"template,omitempty"`
Template neutronv1.NeutronAPISpecCore `json:"template,omitempty"`

// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
Expand Down Expand Up @@ -520,7 +520,7 @@ type HeatSection struct {
// +kubebuilder:validation:Optional
//+operator-sdk:csv:customresourcedefinitions:type=spec
// Template - Overrides to use when creating the Heat services
Template heatv1.HeatSpec `json:"template,omitempty"`
Template heatv1.HeatSpecCore `json:"template,omitempty"`

// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
Expand All @@ -544,7 +544,7 @@ type IronicSection struct {
// +kubebuilder:validation:Optional
//+operator-sdk:csv:customresourcedefinitions:type=spec
// Template - Overrides to use when creating the Ironic services
Template ironicv1.IronicSpec `json:"template,omitempty"`
Template ironicv1.IronicSpecCore `json:"template,omitempty"`

// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
Expand All @@ -567,7 +567,7 @@ type ManilaSection struct {

// +kubebuilder:validation:Optional
// Template - Overrides to use when creating Manila Resources
Template manilav1.ManilaSpec `json:"template,omitempty"`
Template manilav1.ManilaSpecCore `json:"template,omitempty"`

// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
Expand All @@ -584,7 +584,7 @@ type HorizonSection struct {

// +kubebuilder:validation:Optional
// Template - Overrides to use when creating the Horizon services
Template horizonv1.HorizonSpec `json:"template,omitempty"`
Template horizonv1.HorizonSpecCore `json:"template,omitempty"`

// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
Expand All @@ -603,7 +603,7 @@ type TelemetrySection struct {
// +kubebuilder:validation:Optional
//+operator-sdk:csv:customresourcedefinitions:type=spec
// Template - Overrides to use when creating the OpenStack Telemetry services
Template telemetryv1.TelemetrySpec `json:"template,omitempty"`
Template telemetryv1.TelemetrySpecCore `json:"template,omitempty"`

// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
Expand All @@ -622,7 +622,7 @@ type SwiftSection struct {
// +kubebuilder:validation:Optional
//+operator-sdk:csv:customresourcedefinitions:type=spec
// Template - Overrides to use when creating Swift Resources
Template swiftv1.SwiftSpec `json:"template,omitempty"`
Template swiftv1.SwiftSpecCore `json:"template,omitempty"`

// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
Expand All @@ -641,7 +641,7 @@ type OctaviaSection struct {
// +kubebuilder:valdiation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
// Template - Overrides to use when creating Octavia Resources
Template octaviav1.OctaviaSpec `json:"template,omitempty"`
Template octaviav1.OctaviaSpecCore `json:"template,omitempty"`

// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
Expand All @@ -660,7 +660,7 @@ type DesignateSection struct {
// +kubebuilder:valdiation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
// Template - Overrides to use when creating Designate Resources
Template designatev1.DesignateSpec `json:"template,omitempty"`
Template designatev1.DesignateSpecCore `json:"template,omitempty"`

// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
Expand All @@ -679,7 +679,7 @@ type BarbicanSection struct {
// +kubebuilder:validation:Optional
//+operator-sdk:csv:customresourcedefinitions:type=spec
// Template - Overrides to use when creating the Barbican Service
Template barbicanv1.BarbicanSpec `json:"template,omitempty"`
Template barbicanv1.BarbicanSpecCore `json:"template,omitempty"`

// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
Expand All @@ -698,7 +698,7 @@ type RedisSection struct {
// +kubebuilder:validation:Optional
//+operator-sdk:csv:customresourcedefinitions:type=spec
// Templates - Overrides to use when creating the Redis Resources
Templates map[string]redisv1.RedisSpec `json:"templates,omitempty"`
Templates map[string]redisv1.RedisSpecCore `json:"templates,omitempty"`
}

// OpenStackClientSection defines the desired state of the OpenStackClient
Expand Down
15 changes: 2 additions & 13 deletions apis/core/v1beta1/openstackcontrolplane_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,18 +320,6 @@ func (r *OpenStackControlPlane) Default() {

// DefaultServices - common function for calling individual services' defaulting functions
func (r *OpenStackControlPlane) DefaultServices() {
// RabbitMQ
// This is a special case in that we don't own the RabbitMQ operator,
// so we aren't able to add and call a Default function on its spec.
// Instead we just directly set the defaults we need.
for key, template := range r.Spec.Rabbitmq.Templates {
if template.Image == "" {
template.Image = openstackControlPlaneDefaults.RabbitMqImageURL
// By-value copy, need to update
r.Spec.Rabbitmq.Templates[key] = template
}
}

// Cinder
r.Spec.Cinder.Template.Default()

Expand Down Expand Up @@ -405,7 +393,8 @@ func (r *OpenStackControlPlane) DefaultServices() {
r.Spec.Telemetry.Template.Default()

// Heat
r.Spec.Heat.Template.Default()
// FIXME: https://github.com/openstack-k8s-operators/heat-operator/pull/331
//r.Spec.Heat.Template.Default()

// Swift
if r.Spec.Swift.Template.SwiftStorage.StorageClass == "" {
Expand Down
10 changes: 5 additions & 5 deletions apis/core/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions apis/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
github.com/openstack-k8s-operators/ironic-operator/api v0.3.1-0.20240312152017-4d67fa54c3a9
github.com/openstack-k8s-operators/keystone-operator/api v0.3.1-0.20240310093110-b4b2614f40ba
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240306153230-dc65ab49ebc0
github.com/openstack-k8s-operators/lib-common/modules/storage v0.3.1-0.20240306153230-dc65ab49ebc0
github.com/openstack-k8s-operators/lib-common/modules/storage v0.3.1-0.20240312080627-e9273d3dae5b
github.com/openstack-k8s-operators/manila-operator/api v0.3.1-0.20240309120128-0ac0e425b7e6
github.com/openstack-k8s-operators/mariadb-operator/api v0.3.1-0.20240308170012-6b04e3e9b9ee
github.com/openstack-k8s-operators/neutron-operator/api v0.3.1-0.20240311052159-d5b7c8a0ad97
Expand Down Expand Up @@ -85,7 +85,7 @@ require (
golang.org/x/tools v0.18.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/protobuf v1.32.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand All @@ -102,3 +102,6 @@ require (
// mschuppert: map to latest commit from release-4.13 tag
// must consistent within modules and service operators
replace github.com/openshift/api => github.com/openshift/api v0.0.0-20230414143018-3367bc7e6ac7 //allow-merging

// custom RabbitmqClusterSpecCore for OpenStackControlplane (v2.6.0_patches_tag)
replace github.com/rabbitmq/cluster-operator/v2 => github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20240313124519-961a0ee8bf7f //allow-merging
12 changes: 6 additions & 6 deletions apis/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.2024030615
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240306153230-dc65ab49ebc0/go.mod h1:R2plZL2JdwDMJwv9+pkPmCB1Mww81J75G0MxRzi2Kug=
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.3.1-0.20240306153230-dc65ab49ebc0 h1:HRoVOnK5nOSvYKU3Y2N8Ed2SikuRQYSRESeo/ILv0vM=
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.3.1-0.20240306153230-dc65ab49ebc0/go.mod h1:vD2gy8bM6HkEY2unmpOXtwza515tUUucRP2IR0nffmU=
github.com/openstack-k8s-operators/lib-common/modules/storage v0.3.1-0.20240306153230-dc65ab49ebc0 h1:9o0nbX808wq5ksmDCPG9tiuv9tYukCDpxXAAVsT55Nc=
github.com/openstack-k8s-operators/lib-common/modules/storage v0.3.1-0.20240306153230-dc65ab49ebc0/go.mod h1:hKoDyLpp/Hc6fE1rYhlgXw8pYUPyRDKLgBrkAda5IPA=
github.com/openstack-k8s-operators/lib-common/modules/storage v0.3.1-0.20240312080627-e9273d3dae5b h1:i0Z7bbWulR3A9AWOO3kEA6vkiBTosk9djc9OaSz34bs=
github.com/openstack-k8s-operators/lib-common/modules/storage v0.3.1-0.20240312080627-e9273d3dae5b/go.mod h1:hKoDyLpp/Hc6fE1rYhlgXw8pYUPyRDKLgBrkAda5IPA=
github.com/openstack-k8s-operators/manila-operator/api v0.3.1-0.20240309120128-0ac0e425b7e6 h1:gUzGiW2tp2NxTV7EzVxoi78UZooK+WuWEtsuw36b414=
github.com/openstack-k8s-operators/manila-operator/api v0.3.1-0.20240309120128-0ac0e425b7e6/go.mod h1:ZRSi1HlG67VxoFOKFZKRZSXZnJR5fE8UiaIlEQaUYnQ=
github.com/openstack-k8s-operators/mariadb-operator/api v0.3.1-0.20240308170012-6b04e3e9b9ee h1:UYxzWJ1HixHQ+jPoZ/PeTqCUxVr1+kha4YJpV/UwL64=
Expand All @@ -111,6 +111,8 @@ github.com/openstack-k8s-operators/ovn-operator/api v0.3.1-0.20240307150054-826f
github.com/openstack-k8s-operators/ovn-operator/api v0.3.1-0.20240307150054-826f3260f9aa/go.mod h1:m7Hx4s5C6dubXQ2Qz8TH3SAj8SwdmrPSS5eKTDHb8gg=
github.com/openstack-k8s-operators/placement-operator/api v0.3.1-0.20240312081116-71131dc061ff h1:L1h/BkVVNQ0I52Q0eziRhTalT+1PHbQPspA6/K5uEmM=
github.com/openstack-k8s-operators/placement-operator/api v0.3.1-0.20240312081116-71131dc061ff/go.mod h1:x8DjaFvcJ1zDP/AzFjDaMO7jTZTTCSsnFxJX405UsKc=
github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20240313124519-961a0ee8bf7f h1:wWaOCAkCym4t+NZWXYT/LErGhKujDdKgc7Qy/3vX4uU=
github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20240313124519-961a0ee8bf7f/go.mod h1:Zryxg5YgbPUFcLSCcKpf10il8kIRAK5HloNo6khhdis=
github.com/openstack-k8s-operators/swift-operator/api v0.3.1-0.20240311072010-dd13276c41a8 h1:mzrm+Ez3n6XJDo+XXxJgMBmsbDPJ7yKioKKVC1RBJKc=
github.com/openstack-k8s-operators/swift-operator/api v0.3.1-0.20240311072010-dd13276c41a8/go.mod h1:ckSYEGMc8XehwBCJxY+m8l1VaGBz8tj2PK6k0yjvvhE=
github.com/openstack-k8s-operators/telemetry-operator/api v0.3.1-0.20240312112359-8df1a7d51831 h1:YPMFypZgNrLIToDov/JQDZ2XB/fHhYrjKZY3msqbgns=
Expand All @@ -127,8 +129,6 @@ github.com/prometheus/common v0.46.0 h1:doXzt5ybi1HBKpsZOL0sSkaNHJJqkyfEWZGGqqSc
github.com/prometheus/common v0.46.0/go.mod h1:Tp0qkxpb9Jsg54QMe+EAmqXkSV7Evdy1BTn+g2pa/hQ=
github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo=
github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo=
github.com/rabbitmq/cluster-operator/v2 v2.6.0 h1:pr42elurQgi4DVmLTI1cOh8VZRNkfFKZK9+FgQuM/8w=
github.com/rabbitmq/cluster-operator/v2 v2.6.0/go.mod h1:Zryxg5YgbPUFcLSCcKpf10il8kIRAK5HloNo6khhdis=
github.com/rhobs/obo-prometheus-operator/pkg/apis/monitoring v0.64.1-rhobs3 h1:vy4ElN2RHyrIzzPn5b8vKuQLg4ZofuUAz65eLqLqloA=
github.com/rhobs/obo-prometheus-operator/pkg/apis/monitoring v0.64.1-rhobs3/go.mod h1:p+YsgXodntOtgwXKTpWrJzVS7QmMfZlGDG0v6Noze7s=
github.com/rhobs/observability-operator v0.0.20 h1:u4Ejzq/Yt3rY4b/apKhpgYIvmp+MpcV9hhEzhzedpk4=
Expand Down Expand Up @@ -215,8 +215,8 @@ google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAs
google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=
google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
Expand Down
Loading

0 comments on commit b1645b0

Please sign in to comment.