Skip to content

Commit

Permalink
Designate-operator integration
Browse files Browse the repository at this point in the history
  • Loading branch information
dkehn authored and dprince committed Oct 26, 2023
1 parent 8c479ca commit 3c7eddf
Show file tree
Hide file tree
Showing 18 changed files with 1,851 additions and 0 deletions.
774 changes: 774 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 @@ -144,11 +144,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 @@ -367,6 +373,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 @@ -38,6 +38,7 @@ import (
novav1 "github.com/openstack-k8s-operators/nova-operator/api/v1beta1"
octaviav1 "github.com/openstack-k8s-operators/octavia-operator/api/v1beta1"
"github.com/openstack-k8s-operators/openstack-operator/apis/client/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 @@ -164,6 +165,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 @@ -598,6 +602,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 @@ -700,6 +723,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),
condition.UnknownCondition(OpenStackControlPlaneCAReadyCondition, condition.InitReason, OpenStackControlPlaneCAReadyInitMessage),

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.1
github.com/openstack-k8s-operators/cinder-operator/api v0.3.1-0.20231020183900-9e910befd6b1
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.20231025155817-d0678103cc7d
github.com/openstack-k8s-operators/heat-operator/api v0.3.1-0.20231024034110-9dd57dde400d
github.com/openstack-k8s-operators/horizon-operator/api v0.3.1-0.20231025072835-a16aa54e25d7
Expand Down
2 changes: 2 additions & 0 deletions apis/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,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.20231020183900-9e910befd6b1 h1:Ord99cl5+efbXF37fMvfN2BTtIWWwgA+kh23M1hTGqs=
github.com/openstack-k8s-operators/cinder-operator/api v0.3.1-0.20231020183900-9e910befd6b1/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.20231025155817-d0678103cc7d h1:kXfQipImtqUAYiOgor4zGk429gqrlDXijjefkdgnccI=
github.com/openstack-k8s-operators/glance-operator/api v0.3.1-0.20231025155817-d0678103cc7d/go.mod h1:asptFTi7IHWlynNSuSpPSglQaS2lghZWweYcb+zl/CM=
github.com/openstack-k8s-operators/heat-operator/api v0.3.1-0.20231024034110-9dd57dde400d h1:TUyytjG3MT7mxGu9FGq+F+cbnbpyCqrUmSHxXCA8bBw=
Expand Down
Loading

0 comments on commit 3c7eddf

Please sign in to comment.