From 6532841323f481613e0335868b78f9c9337f1fa8 Mon Sep 17 00:00:00 2001 From: Murad Biashimov Date: Wed, 27 Mar 2024 12:42:34 +0100 Subject: [PATCH] fix: no_secret is inverted --- CHANGELOG.md | 1 + api/v1alpha1/clickhousedatabase_types.go | 2 +- api/v1alpha1/database_types.go | 2 +- api/v1alpha1/kafkaacl_types.go | 2 +- api/v1alpha1/kafkaconnect_types.go | 2 +- api/v1alpha1/kafkaconnector_types.go | 2 +- api/v1alpha1/kafkaschema_types.go | 2 +- api/v1alpha1/kafkatopic_types.go | 2 +- api/v1alpha1/projectvpc_types.go | 2 +- api/v1alpha1/serviceintegration_types.go | 2 +- 10 files changed, 10 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a5b4d67..4d662acd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## [MAJOR.MINOR.PATCH] - YYYY-MM-DD - Add `ClickhouseDatabase` kind +- Fix secret creation for kinds with no secrets - Replace `Database` kind validations and default values with CRD validation rules - Perform upgrade tasks to check if PG service can be upgraded before updating the service - Expose project CA certificate to service secrets: `REDIS_CA_CERT`, `MYSQL_CA_CERT`, etc. diff --git a/api/v1alpha1/clickhousedatabase_types.go b/api/v1alpha1/clickhousedatabase_types.go index bbe140d6..c28e1778 100644 --- a/api/v1alpha1/clickhousedatabase_types.go +++ b/api/v1alpha1/clickhousedatabase_types.go @@ -51,7 +51,7 @@ type ClickhouseDatabase struct { var _ AivenManagedObject = &ClickhouseDatabase{} func (*ClickhouseDatabase) NoSecret() bool { - return false + return true } func (in *ClickhouseDatabase) AuthSecretRef() *AuthSecretReference { diff --git a/api/v1alpha1/database_types.go b/api/v1alpha1/database_types.go index 3ecb3885..0e7ecec7 100644 --- a/api/v1alpha1/database_types.go +++ b/api/v1alpha1/database_types.go @@ -63,7 +63,7 @@ type Database struct { var _ AivenManagedObject = &Database{} func (*Database) NoSecret() bool { - return false + return true } func (in *Database) AuthSecretRef() *AuthSecretReference { diff --git a/api/v1alpha1/kafkaacl_types.go b/api/v1alpha1/kafkaacl_types.go index 1ad2dd7d..e63138bd 100644 --- a/api/v1alpha1/kafkaacl_types.go +++ b/api/v1alpha1/kafkaacl_types.go @@ -68,7 +68,7 @@ func (in *KafkaACL) Conditions() *[]metav1.Condition { } func (*KafkaACL) NoSecret() bool { - return false + return true } // +kubebuilder:object:root=true diff --git a/api/v1alpha1/kafkaconnect_types.go b/api/v1alpha1/kafkaconnect_types.go index 223e4737..df8a7d57 100644 --- a/api/v1alpha1/kafkaconnect_types.go +++ b/api/v1alpha1/kafkaconnect_types.go @@ -35,7 +35,7 @@ type KafkaConnect struct { var _ AivenManagedObject = &KafkaConnect{} func (*KafkaConnect) NoSecret() bool { - return false + return true } func (in *KafkaConnect) AuthSecretRef() *AuthSecretReference { diff --git a/api/v1alpha1/kafkaconnector_types.go b/api/v1alpha1/kafkaconnector_types.go index 0d2dc393..a7af7f77 100644 --- a/api/v1alpha1/kafkaconnector_types.go +++ b/api/v1alpha1/kafkaconnector_types.go @@ -95,7 +95,7 @@ func (in *KafkaConnector) Conditions() *[]metav1.Condition { } func (*KafkaConnector) NoSecret() bool { - return false + return true } //+kubebuilder:object:root=true diff --git a/api/v1alpha1/kafkaschema_types.go b/api/v1alpha1/kafkaschema_types.go index 6288b353..238f54e7 100644 --- a/api/v1alpha1/kafkaschema_types.go +++ b/api/v1alpha1/kafkaschema_types.go @@ -61,7 +61,7 @@ type KafkaSchema struct { var _ AivenManagedObject = &KafkaSchema{} func (*KafkaSchema) NoSecret() bool { - return false + return true } func (in *KafkaSchema) AuthSecretRef() *AuthSecretReference { diff --git a/api/v1alpha1/kafkatopic_types.go b/api/v1alpha1/kafkatopic_types.go index 21c233de..ef67da14 100644 --- a/api/v1alpha1/kafkatopic_types.go +++ b/api/v1alpha1/kafkatopic_types.go @@ -185,7 +185,7 @@ func (in *KafkaTopic) Conditions() *[]metav1.Condition { } func (*KafkaTopic) NoSecret() bool { - return false + return true } // +kubebuilder:object:root=true diff --git a/api/v1alpha1/projectvpc_types.go b/api/v1alpha1/projectvpc_types.go index b3343b71..08e3842c 100644 --- a/api/v1alpha1/projectvpc_types.go +++ b/api/v1alpha1/projectvpc_types.go @@ -59,7 +59,7 @@ type ProjectVPC struct { var _ AivenManagedObject = &ProjectVPC{} func (*ProjectVPC) NoSecret() bool { - return false + return true } func (in *ProjectVPC) AuthSecretRef() *AuthSecretReference { diff --git a/api/v1alpha1/serviceintegration_types.go b/api/v1alpha1/serviceintegration_types.go index 1cf134ad..af06c484 100644 --- a/api/v1alpha1/serviceintegration_types.go +++ b/api/v1alpha1/serviceintegration_types.go @@ -123,7 +123,7 @@ type ServiceIntegration struct { var _ AivenManagedObject = &ServiceIntegration{} func (*ServiceIntegration) NoSecret() bool { - return false + return true } func (in *ServiceIntegration) AuthSecretRef() *AuthSecretReference {