Skip to content

Commit

Permalink
Designate-operator integration
Browse files Browse the repository at this point in the history
  • Loading branch information
dkehn committed Oct 24, 2023
1 parent c1ac26e commit 58a31d9
Show file tree
Hide file tree
Showing 18 changed files with 1,841 additions and 0 deletions.
769 changes: 769 additions & 0 deletions apis/bases/core.openstack.org_openstackcontrolplanes.yaml

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions apis/core/v1beta1/conditions.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,17 @@ const (
// OpenStackControlPlaneOctaviaReadyCondition Status=True condition which indicates if Octavia is configured and operational
OpenStackControlPlaneOctaviaReadyCondition condition.Type = "OpenStackControlPlaneOctaviaReady"

// OpenStackControlPlaneDesignateReadyCondition Status=True condition which indicates if Designate is configured and operational
OpenStackControlPlaneDesignateReadyCondition condition.Type = "OpenStackControlPlaneDesignateReady"

// OpenStackControlPlaneRedisReadyCondition Status=True condition which indicates if Redis is configured and operational
OpenStackControlPlaneRedisReadyCondition condition.Type = "OpenStackControlPlaneRedisReady"

// OpenStackControlPlaneExposeOctaviaReadyCondition Status=True condition which indicates if Octavia is exposed via a route
OpenStackControlPlaneExposeOctaviaReadyCondition condition.Type = "OpenStackControlPlaneExposeOctaviaReady"

// OpenStackControlPlaneExposeDesignateReadyCondition Status=True condition which indicates if Designate is exposed via a route
OpenStackControlPlaneExposeDesignateReadyCondition condition.Type = "OpenStackControlPlaneExposeDesignateReady"
)

// OpenStackControlPlane Reasons used by API objects.
Expand Down Expand Up @@ -364,6 +370,18 @@ const (
// OpenStackControlPlaneOctaviaReadyErrorMessage
OpenStackControlPlaneOctaviaReadyErrorMessage = "OpenStackControlPlane Octavia error occured %s"

// OpenStackControlPlaneDesignateReadyInitMessage
OpenStackControlPlaneDesignateReadyInitMessage = "OpenStackControlPlane Designate not started"

// OpenStackControlPlaneDesignateReadyMessage
OpenStackControlPlaneDesignateReadyMessage = "OpenStackControlPlane Designate completed"

// OpenStackControlPlaneDesignateReadyRunningMessage
OpenStackControlPlaneDesignateReadyRunningMessage = "OpenStackControlPlane Designate in progress"

// OpenStackControlPlaneDesignateReadyErrorMessage
OpenStackControlPlaneDesignateReadyErrorMessage = "OpenStackControlPlane Designate error occured %s"

// OpenStackControlPlaneRedisReadyInitMessage
OpenStackControlPlaneRedisReadyInitMessage = "OpenStackControlPlane Redis not started"

Expand Down
24 changes: 24 additions & 0 deletions apis/core/v1beta1/openstackcontrolplane_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import (
neutronv1 "github.com/openstack-k8s-operators/neutron-operator/api/v1beta1"
novav1 "github.com/openstack-k8s-operators/nova-operator/api/v1beta1"
octaviav1 "github.com/openstack-k8s-operators/octavia-operator/api/v1beta1"
designatev1 "github.com/openstack-k8s-operators/designate-operator/api/v1beta1"
ovnv1 "github.com/openstack-k8s-operators/ovn-operator/api/v1beta1"
placementv1 "github.com/openstack-k8s-operators/placement-operator/api/v1beta1"
swiftv1 "github.com/openstack-k8s-operators/swift-operator/api/v1beta1"
Expand Down Expand Up @@ -155,6 +156,9 @@ type OpenStackControlPlaneSpec struct {
// Octavia - Parameters related to the Octavia service
Octavia OctaviaSection `json:"octavia,omitempty"`

// Designate - Parameters related to the Designate service
Designate DesignateSection `json:"designate,omitempty"`

// Redis - Parameters related to the Redis service
Redis RedisSection `json:"redis,omitempty"`

Expand Down Expand Up @@ -547,6 +551,25 @@ type OctaviaSection struct {
APIOverride Override `json:"apiOverride,omitempty"`
}

// DesignateSection defines the desired state of the Designate service
type DesignateSection struct {
// +kubebuilder:validation:Optional
// Enabled - Whether the Designate service should be deployed and managed
// +kubebuilder:default=false
// +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:booleanSwitch"}
Enabled bool `json:"enabled"`

// +kubebuilder:valdiation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
// Template - Overrides to use when creating Designate Resources
Template designatev1.DesignateSpec `json:"template,omitempty"`

// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
// APIOverride, provides the ability to override the generated manifest of several child resources.
APIOverride Override `json:"apiOverride,omitempty"`
}

// RedisSection defines the desired state of the Redis service
type RedisSection struct {
// +kubebuilder:validation:Optional
Expand Down Expand Up @@ -641,6 +664,7 @@ func (instance *OpenStackControlPlane) InitConditions() {
condition.UnknownCondition(OpenStackControlPlaneHeatReadyCondition, condition.InitReason, OpenStackControlPlaneHeatReadyInitMessage),
condition.UnknownCondition(OpenStackControlPlaneSwiftReadyCondition, condition.InitReason, OpenStackControlPlaneSwiftReadyInitMessage),
condition.UnknownCondition(OpenStackControlPlaneOctaviaReadyCondition, condition.InitReason, OpenStackControlPlaneOctaviaReadyInitMessage),
condition.UnknownCondition(OpenStackControlPlaneDesignateReadyCondition, condition.InitReason, OpenStackControlPlaneDesignateReadyInitMessage),
condition.UnknownCondition(OpenStackControlPlaneRedisReadyCondition, condition.InitReason, OpenStackControlPlaneRedisReadyInitMessage),

// Also add the overall status condition as Unknown
Expand Down
18 changes: 18 additions & 0 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.

1 change: 1 addition & 0 deletions apis/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ require (
github.com/onsi/ginkgo/v2 v2.13.0
github.com/onsi/gomega v1.28.0
github.com/openstack-k8s-operators/cinder-operator/api v0.3.1-0.20231018031823-48a662e6dcfe
github.com/openstack-k8s-operators/designate-operator/api v0.0.0-20231005181456-cbf92d9662db
github.com/openstack-k8s-operators/glance-operator/api v0.3.1-0.20231013112543-a07d8273b82d
github.com/openstack-k8s-operators/heat-operator/api v0.3.1-0.20231016213913-eacfd44e505f
github.com/openstack-k8s-operators/horizon-operator/api v0.3.1-0.20231015112558-692aca16f97d
Expand Down
2 changes: 2 additions & 0 deletions apis/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ github.com/openshift/api v0.0.0-20230414143018-3367bc7e6ac7 h1:rncLxJBpFGqBztyxC
github.com/openshift/api v0.0.0-20230414143018-3367bc7e6ac7/go.mod h1:ctXNyWanKEjGj8sss1KjjHQ3ENKFm33FFnS5BKaIPh4=
github.com/openstack-k8s-operators/cinder-operator/api v0.3.1-0.20231018031823-48a662e6dcfe h1:5lAcgOSjDrh0HrJa2w3l9rOJBaH8iSP6Bth169XI7Nw=
github.com/openstack-k8s-operators/cinder-operator/api v0.3.1-0.20231018031823-48a662e6dcfe/go.mod h1:8NFIyjXZeC+T2UBcmTDTfSatRdhi2eaZlaAuzcT2rNk=
github.com/openstack-k8s-operators/designate-operator/api v0.0.0-20231005181456-cbf92d9662db h1:p30j9aOE336NfA/cTvyd+d0t1B/PTzcyghwtVCKN3OQ=
github.com/openstack-k8s-operators/designate-operator/api v0.0.0-20231005181456-cbf92d9662db/go.mod h1:fNgVy3LvqYF2jTelcaJKaWT0agEwBtJ++MXSdPT/BF4=
github.com/openstack-k8s-operators/glance-operator/api v0.3.1-0.20231013112543-a07d8273b82d h1:WEG0KPgsujhwVh7W/IbJ8I8JTDUuJj6V5rWD6L+KzbI=
github.com/openstack-k8s-operators/glance-operator/api v0.3.1-0.20231013112543-a07d8273b82d/go.mod h1:D+c4nLxVzSZDeYqAGrfD5po2+udzVkF5M5SCF9QeMMY=
github.com/openstack-k8s-operators/heat-operator/api v0.3.1-0.20231016213913-eacfd44e505f h1:MhyMr9IHMv4olsjinXziGebJAFSj9EJhXKIp6f+Y8aA=
Expand Down
Loading

0 comments on commit 58a31d9

Please sign in to comment.