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 12, 2023
1 parent 7f3f15a commit 8b4ad2b
Show file tree
Hide file tree
Showing 16 changed files with 1,822 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 @@ -7,6 +7,7 @@ require (
github.com/onsi/gomega v1.28.0
github.com/openstack-k8s-operators/cinder-operator/api v0.3.1-0.20231006133827-ce89e0fd01f2
github.com/openstack-k8s-operators/glance-operator/api v0.3.1-0.20231010130554-ab1baca2edc1
github.com/openstack-k8s-operators/designate-operator/api v0.0.0-20231005181456-cbf92d9662db
github.com/openstack-k8s-operators/heat-operator/api v0.3.1-0.20231009062722-38938dcb2b5b
github.com/openstack-k8s-operators/horizon-operator/api v0.3.1-0.20231009062721-cda11ea96e2b
github.com/openstack-k8s-operators/infra-operator/apis v0.1.1-0.20231001103054-f74a88ed4971
Expand Down
2 changes: 2 additions & 0 deletions apis/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ github.com/openstack-k8s-operators/heat-operator/api v0.3.1-0.20231009062722-389
github.com/openstack-k8s-operators/heat-operator/api v0.3.1-0.20231009062722-38938dcb2b5b/go.mod h1:WPQCwaFKWwIEgqXjZRvJ7+bRUXF5Y/eAqKpBiCEe/Q4=
github.com/openstack-k8s-operators/horizon-operator/api v0.3.1-0.20231009062721-cda11ea96e2b h1:nA/cI+2fPqcBvM0jCo/WsrngfQQEd8RSGBY7xdFMC+o=
github.com/openstack-k8s-operators/horizon-operator/api v0.3.1-0.20231009062721-cda11ea96e2b/go.mod h1:fzzPZamjlU4RmXNBkTdV3zmuXQhRhzebC45OakaOZA0=
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/infra-operator/apis v0.1.1-0.20231001103054-f74a88ed4971 h1:5kNS+gseixkgRhYPukQVJyewPTM0lfUOmKP0A03wFFY=
github.com/openstack-k8s-operators/infra-operator/apis v0.1.1-0.20231001103054-f74a88ed4971/go.mod h1:zqFs5MrBKeaE4HQroUgMWwIkBwmmcygg6sghcidSdCA=
github.com/openstack-k8s-operators/ironic-operator/api v0.3.1-0.20231006045519-4d73854cb09a h1:22mc3Inf0bn4RYy6lnx4rT/wb21KVF8O6bFwyf+sTU8=
Expand Down
Loading

0 comments on commit 8b4ad2b

Please sign in to comment.