Skip to content

Commit

Permalink
Remove redundant database phase
Browse files Browse the repository at this point in the history
Signed-off-by: Tapajit Chandra Paul <[email protected]>
  • Loading branch information
tapojit047 committed Dec 11, 2024
1 parent 5c754b0 commit 9c2cfd2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 24 deletions.
12 changes: 1 addition & 11 deletions apis/kubedb/v1alpha2/druid_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ type ZookeeperRef struct {
type DruidStatus struct {
// Specifies the current phase of the database
// +optional
Phase DruidPhase `json:"phase,omitempty"`
Phase DatabasePhase `json:"phase,omitempty"`
// observedGeneration is the most recent generation observed for this resource. It corresponds to the
// resource's generation, which is updated on mutation by the API Server.
// +optional
Expand All @@ -242,16 +242,6 @@ type DruidList struct {
Items []Druid `json:"items"`
}

// +kubebuilder:validation:Enum=Provisioning;Ready;NotReady;Critical
type DruidPhase string

const (
DruidPhaseProvisioning DruidPhase = "Provisioning"
DruidPhaseReady DruidPhase = "Ready"
DruidPhaseNotReady DruidPhase = "NotReady"
DruidPhaseCritical DruidPhase = "Critical"
)

// +kubebuilder:validation:Enum=coordinators;overlords;brokers;routers;middleManagers;historicals
type DruidNodeRoleType string

Expand Down
12 changes: 1 addition & 11 deletions apis/kubedb/v1alpha2/rabbitmq_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ type RabbitMQSpec struct {
type RabbitMQStatus struct {
// Specifies the current phase of the database
// +optional
Phase RabbitMQPhase `json:"phase,omitempty"`
Phase DatabasePhase `json:"phase,omitempty"`
// observedGeneration is the most recent generation observed for this resource. It corresponds to the
// resource's generation, which is updated on mutation by the API Server.
// +optional
Expand All @@ -132,16 +132,6 @@ type RabbitMQStatus struct {
Conditions []kmapi.Condition `json:"conditions,omitempty"`
}

// +kubebuilder:validation:Enum=Provisioning;Ready;NotReady;Critical
type RabbitMQPhase string

const (
RabbitmqProvisioning RabbitMQPhase = "Provisioning"
RabbitmqReady RabbitMQPhase = "Ready"
RabbitmqNotReady RabbitMQPhase = "NotReady"
RabbitmqCritical RabbitMQPhase = "Critical"
)

// +kubebuilder:validation:Enum=ca;client;server
type RabbitMQCertificateAlias string

Expand Down
5 changes: 4 additions & 1 deletion crds/kubedb.com_druids.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20246,9 +20246,12 @@ spec:
phase:
enum:
- Provisioning
- DataRestoring
- Ready
- NotReady
- Critical
- NotReady
- Halted
- Unknown
type: string
type: object
type: object
Expand Down
5 changes: 4 additions & 1 deletion crds/kubedb.com_rabbitmqs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3684,9 +3684,12 @@ spec:
phase:
enum:
- Provisioning
- DataRestoring
- Ready
- NotReady
- Critical
- NotReady
- Halted
- Unknown
type: string
type: object
type: object
Expand Down

0 comments on commit 9c2cfd2

Please sign in to comment.