From c4d15cc903717bb6b2277cef0d60deb89f6edfc7 Mon Sep 17 00:00:00 2001 From: pritamdas99 Date: Fri, 13 Dec 2024 12:31:00 +0600 Subject: [PATCH 1/2] Add condition for patch config Signed-off-by: pritamdas99 --- apis/ops/v1alpha1/constant.go | 1 + 1 file changed, 1 insertion(+) diff --git a/apis/ops/v1alpha1/constant.go b/apis/ops/v1alpha1/constant.go index 5294fbc0df..4ccc60179c 100644 --- a/apis/ops/v1alpha1/constant.go +++ b/apis/ops/v1alpha1/constant.go @@ -111,6 +111,7 @@ const ( BasicAuthNextPasswordKey = "password.next" SecretAlreadyUpdatedAnnotation = "secret-already-updated" AuthDataPreviousKey = "authData.prev" + PatchDefaultConfig = "PatchDefaultConfig" ) // Restart From b6d79ac440f35e0097f9309c5dff296e4f390262 Mon Sep 17 00:00:00 2001 From: pritamdas99 Date: Tue, 17 Dec 2024 20:27:25 +0600 Subject: [PATCH 2/2] Export internal user defaulting method Signed-off-by: pritamdas99 --- apis/kubedb/v1/elasticsearch_helpers.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apis/kubedb/v1/elasticsearch_helpers.go b/apis/kubedb/v1/elasticsearch_helpers.go index 82c6857275..2a2a6d69ce 100644 --- a/apis/kubedb/v1/elasticsearch_helpers.go +++ b/apis/kubedb/v1/elasticsearch_helpers.go @@ -705,7 +705,7 @@ func (e *Elasticsearch) SetDefaults(esVersion *catalog.ElasticsearchVersion) { } } - e.setDefaultInternalUsersAndRoleMappings(esVersion) + e.SetDefaultInternalUsersAndRoleMappings(esVersion) e.SetMetricsExporterDefaults(esVersion) e.SetTLSDefaults(esVersion) } @@ -723,7 +723,7 @@ func (e *Elasticsearch) SetMetricsExporterDefaults(esVersion *catalog.Elasticsea } // Set Default internal users settings -func (e *Elasticsearch) setDefaultInternalUsersAndRoleMappings(esVersion *catalog.ElasticsearchVersion) { +func (e *Elasticsearch) SetDefaultInternalUsersAndRoleMappings(esVersion *catalog.ElasticsearchVersion) { // If security is disabled (ie. DisableSecurity: true), ignore. if e.Spec.DisableSecurity { return