From fb7e8ddf6535c3c53b4093eed39a00cfaa15351b Mon Sep 17 00:00:00 2001 From: Tapajit Chandra Paul <33987732+tapojit047@users.noreply.github.com> Date: Wed, 11 Dec 2024 15:34:59 +0600 Subject: [PATCH] Remove redundant database phase (#1358) * Remove redundant database phase Signed-off-by: Tapajit Chandra Paul --- apis/kubedb/v1alpha2/druid_types.go | 12 +----------- apis/kubedb/v1alpha2/rabbitmq_types.go | 12 +----------- crds/kubedb.com_druids.yaml | 5 ++++- crds/kubedb.com_rabbitmqs.yaml | 5 ++++- go.mod | 2 +- go.sum | 4 ++-- vendor/modules.txt | 2 +- 7 files changed, 14 insertions(+), 28 deletions(-) diff --git a/apis/kubedb/v1alpha2/druid_types.go b/apis/kubedb/v1alpha2/druid_types.go index 3ffd2dedee..fbca1a0570 100644 --- a/apis/kubedb/v1alpha2/druid_types.go +++ b/apis/kubedb/v1alpha2/druid_types.go @@ -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 @@ -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 diff --git a/apis/kubedb/v1alpha2/rabbitmq_types.go b/apis/kubedb/v1alpha2/rabbitmq_types.go index bb42ff5a79..f360bf5564 100644 --- a/apis/kubedb/v1alpha2/rabbitmq_types.go +++ b/apis/kubedb/v1alpha2/rabbitmq_types.go @@ -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 @@ -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 diff --git a/crds/kubedb.com_druids.yaml b/crds/kubedb.com_druids.yaml index ae2e6e6e7a..07ba49b0d0 100644 --- a/crds/kubedb.com_druids.yaml +++ b/crds/kubedb.com_druids.yaml @@ -20246,9 +20246,12 @@ spec: phase: enum: - Provisioning + - DataRestoring - Ready - - NotReady - Critical + - NotReady + - Halted + - Unknown type: string type: object type: object diff --git a/crds/kubedb.com_rabbitmqs.yaml b/crds/kubedb.com_rabbitmqs.yaml index 3071bd071c..396e2d7f0b 100644 --- a/crds/kubedb.com_rabbitmqs.yaml +++ b/crds/kubedb.com_rabbitmqs.yaml @@ -3684,9 +3684,12 @@ spec: phase: enum: - Provisioning + - DataRestoring - Ready - - NotReady - Critical + - NotReady + - Halted + - Unknown type: string type: object type: object diff --git a/go.mod b/go.mod index 61c3e10bd1..c5c62bb535 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index 2b99e73651..25b2e2a2f8 100644 --- a/go.sum +++ b/go.sum @@ -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= diff --git a/vendor/modules.txt b/vendor/modules.txt index 6ee06b4ac0..c3deb5b640 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -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