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 19, 2024
1 parent dad7488 commit 444c7bc
Show file tree
Hide file tree
Showing 32 changed files with 141 additions and 495 deletions.
201 changes: 0 additions & 201 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 @@ -305,7 +305,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 @@ -345,7 +345,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 @@ -364,7 +364,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 @@ -383,7 +383,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 @@ -402,7 +402,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 @@ -430,15 +430,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 @@ -460,17 +460,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 @@ -484,7 +484,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 @@ -535,7 +535,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 @@ -559,7 +559,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 @@ -582,7 +582,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 @@ -599,7 +599,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 @@ -618,7 +618,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 @@ -637,7 +637,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 @@ -656,7 +656,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 @@ -675,7 +675,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 @@ -694,7 +694,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 @@ -713,7 +713,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.

3 changes: 3 additions & 0 deletions apis/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions apis/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ github.com/openstack-k8s-operators/ovn-operator/api v0.3.1-0.20240318052728-f132
github.com/openstack-k8s-operators/ovn-operator/api v0.3.1-0.20240318052728-f132fab5c943/go.mod h1:dcKA0ZNATdkWVmltQQX8jYpEzM89FRIvzlo9Byj8H04=
github.com/openstack-k8s-operators/placement-operator/api v0.3.1-0.20240313145348-1dd69c7bc338 h1:4px3BVSfWmfvJf+Nurf0EJb4ViKHW4qM8ocDqH0u8C4=
github.com/openstack-k8s-operators/placement-operator/api v0.3.1-0.20240313145348-1dd69c7bc338/go.mod h1:i7bl0Vg4iyaOR4GCfduMWq0V9k5h9ltKDnx0hZg1JDE=
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.20240315154317-8b38ff1e6a8d h1:O4nJMsX3pS3X3CUw7/wjgJXoTIPA68pJowA1CfQP6IM=
github.com/openstack-k8s-operators/swift-operator/api v0.3.1-0.20240315154317-8b38ff1e6a8d/go.mod h1:/7+Ld3BHb9RDaHhXKEtCiWQmhVwpRLVeLutZxyHRPpM=
github.com/openstack-k8s-operators/telemetry-operator/api v0.3.1-0.20240311060559-4ecd4f5c3961 h1:YYeHx9q2/ohmCwezfdw+qDJywpSZVgo9Ud24Oyie2J4=
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
Loading

0 comments on commit 444c7bc

Please sign in to comment.