Skip to content

Commit

Permalink
Remove redundant database phase (#1358)
Browse files Browse the repository at this point in the history
* Remove redundant database phase

Signed-off-by: Tapajit Chandra Paul <[email protected]>
  • Loading branch information
tapojit047 authored Dec 11, 2024
1 parent 5c754b0 commit fb7e8dd
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 28 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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ require (
github.com/pkg/errors v0.9.1
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.75.2
github.com/prometheus-operator/prometheus-operator/pkg/client v0.75.2
go.bytebuilders.dev/audit v0.0.38
go.bytebuilders.dev/audit v0.0.39-0.20241023005507-ce9c08eef49b
gomodules.xyz/encoding v0.0.8
gomodules.xyz/pointer v0.1.0
gomodules.xyz/runtime v0.3.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,8 @@ github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ=
github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0=
github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0=
github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA=
go.bytebuilders.dev/audit v0.0.38 h1:4DEYVfBNeAfI9rctVWmpDOvEExh3gIuPsXVAg4Z3FWA=
go.bytebuilders.dev/audit v0.0.38/go.mod h1:6RC3gMMFpAzTzGJuJg8Ghgvebde4vvXkmDtUo11ypQw=
go.bytebuilders.dev/audit v0.0.39-0.20241023005507-ce9c08eef49b h1:9yQB4XNdxXrc0v6nNTvMI8zm9n/OmJfG/HrvXHq1SxU=
go.bytebuilders.dev/audit v0.0.39-0.20241023005507-ce9c08eef49b/go.mod h1:6RC3gMMFpAzTzGJuJg8Ghgvebde4vvXkmDtUo11ypQw=
go.bytebuilders.dev/license-proxyserver v0.0.19-0.20241022124046-544efbfc2bc4 h1:B5OO9DFYMmFUBPyo0xFFQmn/AEK+GNXWDMPYXpjJlAg=
go.bytebuilders.dev/license-proxyserver v0.0.19-0.20241022124046-544efbfc2bc4/go.mod h1:7wLFkvqfHwmB6MHcdTHB72M8+b63jApS59efrqZlY1E=
go.bytebuilders.dev/license-verifier v0.14.3 h1:5BTwmFEgCjSlAs2Nzh3/7+u//VoF93xjqywrJiqmZsg=
Expand Down
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ github.com/yudai/golcs
# github.com/zeebo/xxh3 v1.0.2
## explicit; go 1.17
github.com/zeebo/xxh3
# go.bytebuilders.dev/audit v0.0.38
# go.bytebuilders.dev/audit v0.0.39-0.20241023005507-ce9c08eef49b
## explicit; go 1.22.1
go.bytebuilders.dev/audit/api/v1
go.bytebuilders.dev/audit/lib
Expand Down

0 comments on commit fb7e8dd

Please sign in to comment.