From b84c1dcab95deedbc637382154bc76e1d925e6c8 Mon Sep 17 00:00:00 2001 From: jingyim Date: Wed, 21 Jan 2026 13:46:04 -0800 Subject: [PATCH 1/5] first commit --- pkg/splunk/enterprise/configuration.go | 24 +++++++++++++++++++++ pkg/splunk/enterprise/configuration_test.go | 16 ++++++++++++++ pkg/splunk/enterprise/names.go | 5 +++++ pkg/splunk/enterprise/util.go | 5 ----- 4 files changed, 45 insertions(+), 5 deletions(-) diff --git a/pkg/splunk/enterprise/configuration.go b/pkg/splunk/enterprise/configuration.go index a0d90b354..00191d851 100644 --- a/pkg/splunk/enterprise/configuration.go +++ b/pkg/splunk/enterprise/configuration.go @@ -970,6 +970,15 @@ func updateSplunkPodTemplateWithConfig(ctx context.Context, client splcommon.Con }) } + // append KVService connection string, if KVService is ready + kvConnStr := getKVServiceConnectionString(ctx, client, cr.GetNamespace()) + if kvConnStr != "" { + env = append(env, corev1.EnvVar{ + Name: "KVSERVICE_CONNECTION_STRING", + Value: kvConnStr, + }) + } + // append URL for cluster manager, if configured var clusterManagerURL string if isCMDeployed(instanceType) { @@ -2114,3 +2123,18 @@ func validateSplunkGeneralTerms() error { } return fmt.Errorf("license not accepted, please adjust SPLUNK_GENERAL_TERMS to indicate you have accepted the current/latest version of the license. See README file for additional information") } + +// getKVServiceConnectionString returns the connection string for KVService +func getKVServiceConnectionString(ctx context.Context, client splcommon.ControllerClient, namespace string) string { + // TODO: + // wait until the KVService is ready + + // Derive connection string from fixed KVService name + // Format: splunk-kvservice.{namespace}.svc.cluster.local:{port} + kvServiceName := splcommon.KVServiceCrName + url := splcommon.GetServiceFQDN(namespace, kvServiceName) + // TODO: Define KVService port constant? configurable? + // 443 placeholder for https + + return fmt.Sprintf("%s:%d", url, 443) +} diff --git a/pkg/splunk/enterprise/configuration_test.go b/pkg/splunk/enterprise/configuration_test.go index 3be6d0393..0dc480b82 100644 --- a/pkg/splunk/enterprise/configuration_test.go +++ b/pkg/splunk/enterprise/configuration_test.go @@ -1816,3 +1816,19 @@ func TestValidateLivenessProbe(t *testing.T) { t.Errorf("Unexpected error when less than deault values passed for livenessProbe InitialDelaySeconds %d, TimeoutSeconds %d, PeriodSeconds %d. Error %s", livenessProbe.InitialDelaySeconds, livenessProbe.TimeoutSeconds, livenessProbe.PeriodSeconds, err) } } + +func TestGetKVServiceConnectionString(t *testing.T) { + ctx := context.TODO() + client := spltest.NewMockClient() + namespace := "test-namespace" + + // Test that the connection string is correctly formatted + result := getKVServiceConnectionString(ctx, client, namespace) + + // Expected format: splunk-kvservice.test-namespace.svc.cluster.local:443 + expected := fmt.Sprintf("%s.%s.svc.cluster.local:%d", splcommon.KVServiceCrName, namespace, 443) + + if result != expected { + t.Errorf("getKVServiceConnectionString() = %s; want %s", result, expected) + } +} diff --git a/pkg/splunk/enterprise/names.go b/pkg/splunk/enterprise/names.go index 3d0439db7..ddf5c1440 100644 --- a/pkg/splunk/enterprise/names.go +++ b/pkg/splunk/enterprise/names.go @@ -363,3 +363,8 @@ func GetLivenessDriverFileDir() string { func GetStartupScriptName() string { return startupScriptName } + +// GetKVServiceName returns the fixed KVService CR name +func GetKVServiceName() string { + return splcommon.KVServiceCrName +} diff --git a/pkg/splunk/enterprise/util.go b/pkg/splunk/enterprise/util.go index e643eca7a..588350a99 100644 --- a/pkg/splunk/enterprise/util.go +++ b/pkg/splunk/enterprise/util.go @@ -2618,11 +2618,6 @@ func DeleteKVServiceCR(ctx context.Context, c splcommon.ControllerClient, cr spl return nil } -// GetKVServiceName returns the fixed KVService CR name -func GetKVServiceName() string { - return splcommon.KVServiceCrName -} - // hasOwnerReference checks if the given CR is already an owner func hasOwnerReference(ownerRefs []metav1.OwnerReference, cr splcommon.MetaObject) bool { for _, ref := range ownerRefs { From a78f7016b5d595ced9d65033335567c43aec70a9 Mon Sep 17 00:00:00 2001 From: jingyim Date: Wed, 21 Jan 2026 17:19:26 -0800 Subject: [PATCH 2/5] fix unit tests --- .../fixtures/statefulset_stack1_cluster_manager_base.json | 4 ++++ .../fixtures/statefulset_stack1_cluster_manager_base_1.json | 6 +++++- .../fixtures/statefulset_stack1_cluster_manager_base_2.json | 6 +++++- .../statefulset_stack1_cluster_manager_with_apps.json | 6 +++++- ...efulset_stack1_cluster_manager_with_service_account.json | 6 +++++- ...ulset_stack1_cluster_manager_with_service_account_1.json | 6 +++++- ...ulset_stack1_cluster_manager_with_service_account_2.json | 6 +++++- .../fixtures/statefulset_stack1_cluster_master_base.json | 4 ++++ .../fixtures/statefulset_stack1_cluster_master_base_1.json | 6 +++++- .../fixtures/statefulset_stack1_cluster_master_base_2.json | 6 +++++- .../statefulset_stack1_cluster_master_with_apps.json | 6 +++++- ...tefulset_stack1_cluster_master_with_service_account.json | 6 +++++- ...fulset_stack1_cluster_master_with_service_account_1.json | 6 +++++- ...fulset_stack1_cluster_master_with_service_account_2.json | 6 +++++- .../testdata/fixtures/statefulset_stack1_deployer_base.json | 4 ++++ .../fixtures/statefulset_stack1_deployer_with_apps.json | 4 ++++ .../statefulset_stack1_deployer_with_service_account.json | 4 ++++ .../testdata/fixtures/statefulset_stack1_indexer_base.json | 6 +++++- .../fixtures/statefulset_stack1_indexer_base_1.json | 6 +++++- .../fixtures/statefulset_stack1_indexer_base_2.json | 6 +++++- .../fixtures/statefulset_stack1_indexer_base_3.json | 6 +++++- .../statefulset_stack1_indexer_with_service_account.json | 6 +++++- .../statefulset_stack1_indexer_with_service_account_1.json | 6 +++++- .../statefulset_stack1_indexer_with_service_account_2.json | 6 +++++- .../fixtures/statefulset_stack1_license_manager_base.json | 4 ++++ .../fixtures/statefulset_stack1_license_manager_base_1.json | 6 +++++- .../statefulset_stack1_license_manager_with_apps.json | 6 +++++- ...efulset_stack1_license_manager_with_service_account.json | 6 +++++- ...ulset_stack1_license_manager_with_service_account_1.json | 6 +++++- ...ulset_stack1_license_manager_with_service_account_2.json | 6 +++++- .../fixtures/statefulset_stack1_license_master_base.json | 4 ++++ .../fixtures/statefulset_stack1_license_master_base_1.json | 6 +++++- .../statefulset_stack1_license_master_with_apps.json | 6 +++++- ...tefulset_stack1_license_master_with_service_account.json | 6 +++++- ...fulset_stack1_license_master_with_service_account_1.json | 6 +++++- ...fulset_stack1_license_master_with_service_account_2.json | 6 +++++- .../statefulset_stack1_monitoring_console_base.json | 4 ++++ .../statefulset_stack1_monitoring_console_base_1.json | 4 ++++ .../statefulset_stack1_monitoring_console_with_apps.json | 4 ++++ ...statefulset_stack1_monitoring_console_with_defaults.json | 4 ++++ ...lset_stack1_monitoring_console_with_service_account.json | 4 ++++ ...et_stack1_monitoring_console_with_service_account_1.json | 4 ++++ ...et_stack1_monitoring_console_with_service_account_2.json | 4 ++++ .../fixtures/statefulset_stack1_search_head_base.json | 4 ++++ .../fixtures/statefulset_stack1_search_head_base_1.json | 4 ++++ .../fixtures/statefulset_stack1_search_head_base_2.json | 4 ++++ .../fixtures/statefulset_stack1_search_head_base_3.json | 4 ++++ .../fixtures/statefulset_stack1_search_head_base_4.json | 4 ++++ .../fixtures/statefulset_stack1_search_head_base_5.json | 4 ++++ ...statefulset_stack1_search_head_with_service_account.json | 4 ++++ ...atefulset_stack1_search_head_with_service_account_1.json | 4 ++++ ...atefulset_stack1_search_head_with_service_account_2.json | 4 ++++ .../fixtures/statefulset_stack1_standalone_base.json | 4 ++++ .../fixtures/statefulset_stack1_standalone_base_1.json | 4 ++++ .../fixtures/statefulset_stack1_standalone_with_apps.json | 4 ++++ .../statefulset_stack1_standalone_with_defaults.json | 4 ++++ .../statefulset_stack1_standalone_with_service_account.json | 4 ++++ ...tatefulset_stack1_standalone_with_service_account_1.json | 4 ++++ ...tatefulset_stack1_standalone_with_service_account_2.json | 4 ++++ 59 files changed, 265 insertions(+), 29 deletions(-) diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_manager_base.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_manager_base.json index ce3aeea59..7454f2549 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_manager_base.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_manager_base.json @@ -121,6 +121,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_manager_base_1.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_manager_base_1.json index 32b2066a9..fd768087d 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_manager_base_1.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_manager_base_1.json @@ -125,6 +125,10 @@ { "name": "SPLUNK_LICENSE_MASTER_URL", "value": "splunk-stack1-license-manager-service.test.svc.cluster.local" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { @@ -302,4 +306,4 @@ "replicas": 0, "availableReplicas": 0 } -} \ No newline at end of file +} diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_manager_base_2.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_manager_base_2.json index f280b0c79..79b8b4789 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_manager_base_2.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_manager_base_2.json @@ -125,6 +125,10 @@ { "name": "SPLUNK_LICENSE_URI", "value": "/mnt/splunk.lic" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { @@ -302,4 +306,4 @@ "replicas": 0, "availableReplicas": 0 } -} \ No newline at end of file +} diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_manager_with_apps.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_manager_with_apps.json index 22d811186..651ea3348 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_manager_with_apps.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_manager_with_apps.json @@ -125,6 +125,10 @@ { "name": "SPLUNK_LICENSE_URI", "value": "/mnt/splunk.lic" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { @@ -302,4 +306,4 @@ "replicas": 0, "availableReplicas": 0 } -} \ No newline at end of file +} diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_manager_with_service_account.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_manager_with_service_account.json index 2db816afd..a3e54b54b 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_manager_with_service_account.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_manager_with_service_account.json @@ -125,6 +125,10 @@ { "name": "SPLUNK_LICENSE_URI", "value": "/mnt/splunk.lic" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { @@ -303,4 +307,4 @@ "replicas": 0, "availableReplicas": 0 } -} \ No newline at end of file +} diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_manager_with_service_account_1.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_manager_with_service_account_1.json index a7e37445e..f50fa17a3 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_manager_with_service_account_1.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_manager_with_service_account_1.json @@ -129,6 +129,10 @@ { "name": "SPLUNK_LICENSE_URI", "value": "/mnt/splunk.lic" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { @@ -307,4 +311,4 @@ "replicas": 0, "availableReplicas": 0 } -} \ No newline at end of file +} diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_manager_with_service_account_2.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_manager_with_service_account_2.json index 1577cbcac..03db58853 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_manager_with_service_account_2.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_manager_with_service_account_2.json @@ -131,6 +131,10 @@ { "name": "SPLUNK_LICENSE_URI", "value": "/mnt/splunk.lic" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { @@ -311,4 +315,4 @@ "replicas": 0, "availableReplicas": 0 } -} \ No newline at end of file +} diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_master_base.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_master_base.json index dc9814261..df94925bf 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_master_base.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_master_base.json @@ -121,6 +121,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_master_base_1.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_master_base_1.json index 28c6d235d..4bca6d455 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_master_base_1.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_master_base_1.json @@ -125,6 +125,10 @@ { "name": "SPLUNK_LICENSE_MASTER_URL", "value": "splunk-stack1-license-manager-service.test.svc.cluster.local" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { @@ -302,4 +306,4 @@ "replicas": 0, "availableReplicas": 0 } -} \ No newline at end of file +} diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_master_base_2.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_master_base_2.json index d3a67e360..248d07f7c 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_master_base_2.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_master_base_2.json @@ -125,6 +125,10 @@ { "name": "SPLUNK_LICENSE_URI", "value": "/mnt/splunk.lic" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { @@ -302,4 +306,4 @@ "replicas": 0, "availableReplicas": 0 } -} \ No newline at end of file +} diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_master_with_apps.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_master_with_apps.json index d6935325a..c733671a2 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_master_with_apps.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_master_with_apps.json @@ -125,6 +125,10 @@ { "name": "SPLUNK_LICENSE_URI", "value": "/mnt/splunk.lic" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { @@ -302,4 +306,4 @@ "replicas": 0, "availableReplicas": 0 } -} \ No newline at end of file +} diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_master_with_service_account.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_master_with_service_account.json index 686817216..be0e752f9 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_master_with_service_account.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_master_with_service_account.json @@ -125,6 +125,10 @@ { "name": "SPLUNK_LICENSE_URI", "value": "/mnt/splunk.lic" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { @@ -303,4 +307,4 @@ "replicas": 0, "availableReplicas": 0 } -} \ No newline at end of file +} diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_master_with_service_account_1.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_master_with_service_account_1.json index 61b885a42..09602cc9e 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_master_with_service_account_1.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_master_with_service_account_1.json @@ -129,6 +129,10 @@ { "name": "SPLUNK_LICENSE_URI", "value": "/mnt/splunk.lic" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { @@ -307,4 +311,4 @@ "replicas": 0, "availableReplicas": 0 } -} \ No newline at end of file +} diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_master_with_service_account_2.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_master_with_service_account_2.json index b1742607e..aae4a9f4a 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_master_with_service_account_2.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_cluster_master_with_service_account_2.json @@ -131,6 +131,10 @@ { "name": "SPLUNK_LICENSE_URI", "value": "/mnt/splunk.lic" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { @@ -311,4 +315,4 @@ "replicas": 0, "availableReplicas": 0 } -} \ No newline at end of file +} diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_deployer_base.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_deployer_base.json index 536c28e4e..b5f13c3c6 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_deployer_base.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_deployer_base.json @@ -125,6 +125,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_deployer_with_apps.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_deployer_with_apps.json index 9e0385c23..d55de4fd1 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_deployer_with_apps.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_deployer_with_apps.json @@ -125,6 +125,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_deployer_with_service_account.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_deployer_with_service_account.json index bcce50564..5472eed57 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_deployer_with_service_account.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_deployer_with_service_account.json @@ -125,6 +125,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_indexer_base.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_indexer_base.json index 3853a51cc..2ee761f98 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_indexer_base.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_indexer_base.json @@ -131,6 +131,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { @@ -308,4 +312,4 @@ "replicas": 0, "availableReplicas": 0 } -} \ No newline at end of file +} diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_indexer_base_1.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_indexer_base_1.json index 3853a51cc..2ee761f98 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_indexer_base_1.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_indexer_base_1.json @@ -131,6 +131,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { @@ -308,4 +312,4 @@ "replicas": 0, "availableReplicas": 0 } -} \ No newline at end of file +} diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_indexer_base_2.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_indexer_base_2.json index 356099083..3e4fb4655 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_indexer_base_2.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_indexer_base_2.json @@ -136,6 +136,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { @@ -313,4 +317,4 @@ "replicas": 0, "availableReplicas": 0 } -} \ No newline at end of file +} diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_indexer_base_3.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_indexer_base_3.json index 356099083..3e4fb4655 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_indexer_base_3.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_indexer_base_3.json @@ -136,6 +136,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { @@ -313,4 +317,4 @@ "replicas": 0, "availableReplicas": 0 } -} \ No newline at end of file +} diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_indexer_with_service_account.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_indexer_with_service_account.json index 328004d6d..bec1fdc33 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_indexer_with_service_account.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_indexer_with_service_account.json @@ -136,6 +136,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { @@ -314,4 +318,4 @@ "replicas": 0, "availableReplicas": 0 } -} \ No newline at end of file +} diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_indexer_with_service_account_1.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_indexer_with_service_account_1.json index 72a160663..143999e84 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_indexer_with_service_account_1.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_indexer_with_service_account_1.json @@ -140,6 +140,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { @@ -318,4 +322,4 @@ "replicas": 0, "availableReplicas": 0 } -} \ No newline at end of file +} diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_indexer_with_service_account_2.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_indexer_with_service_account_2.json index ec2bb71d7..2de2c6d1d 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_indexer_with_service_account_2.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_indexer_with_service_account_2.json @@ -142,6 +142,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { @@ -322,4 +326,4 @@ "replicas": 0, "availableReplicas": 0 } -} \ No newline at end of file +} diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_manager_base.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_manager_base.json index 2fe22aa99..5716ade81 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_manager_base.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_manager_base.json @@ -117,6 +117,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_manager_base_1.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_manager_base_1.json index cd5c854bf..7863d37a7 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_manager_base_1.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_manager_base_1.json @@ -121,6 +121,10 @@ { "name": "SPLUNK_LICENSE_URI", "value": "/mnt/splunk.lic" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { @@ -298,4 +302,4 @@ "replicas": 0, "availableReplicas": 0 } -} \ No newline at end of file +} diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_manager_with_apps.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_manager_with_apps.json index 40a3f1afb..919989172 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_manager_with_apps.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_manager_with_apps.json @@ -121,6 +121,10 @@ { "name": "SPLUNK_LICENSE_URI", "value": "/mnt/splunk.lic" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { @@ -298,4 +302,4 @@ "replicas": 0, "availableReplicas": 0 } -} \ No newline at end of file +} diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_manager_with_service_account.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_manager_with_service_account.json index d9eaf1b86..2a18d14bd 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_manager_with_service_account.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_manager_with_service_account.json @@ -121,6 +121,10 @@ { "name": "SPLUNK_LICENSE_URI", "value": "/mnt/splunk.lic" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { @@ -299,4 +303,4 @@ "replicas": 0, "availableReplicas": 0 } -} \ No newline at end of file +} diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_manager_with_service_account_1.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_manager_with_service_account_1.json index d344d4ee9..df23af39c 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_manager_with_service_account_1.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_manager_with_service_account_1.json @@ -125,6 +125,10 @@ { "name": "SPLUNK_LICENSE_URI", "value": "/mnt/splunk.lic" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { @@ -303,4 +307,4 @@ "replicas": 0, "availableReplicas": 0 } -} \ No newline at end of file +} diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_manager_with_service_account_2.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_manager_with_service_account_2.json index 00904a1f2..6a82d2791 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_manager_with_service_account_2.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_manager_with_service_account_2.json @@ -127,6 +127,10 @@ { "name": "SPLUNK_LICENSE_URI", "value": "/mnt/splunk.lic" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { @@ -307,4 +311,4 @@ "replicas": 0, "availableReplicas": 0 } -} \ No newline at end of file +} diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_master_base.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_master_base.json index 766fee177..e5d31f533 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_master_base.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_master_base.json @@ -117,6 +117,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_master_base_1.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_master_base_1.json index d3083fc3d..a77e60a3d 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_master_base_1.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_master_base_1.json @@ -121,6 +121,10 @@ { "name": "SPLUNK_LICENSE_URI", "value": "/mnt/splunk.lic" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { @@ -298,4 +302,4 @@ "replicas": 0, "availableReplicas": 0 } -} \ No newline at end of file +} diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_master_with_apps.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_master_with_apps.json index ba6e50b75..896916eda 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_master_with_apps.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_master_with_apps.json @@ -121,6 +121,10 @@ { "name": "SPLUNK_LICENSE_URI", "value": "/mnt/splunk.lic" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { @@ -298,4 +302,4 @@ "replicas": 0, "availableReplicas": 0 } -} \ No newline at end of file +} diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_master_with_service_account.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_master_with_service_account.json index 9bb6fbb12..aa973266f 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_master_with_service_account.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_master_with_service_account.json @@ -121,6 +121,10 @@ { "name": "SPLUNK_LICENSE_URI", "value": "/mnt/splunk.lic" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { @@ -299,4 +303,4 @@ "replicas": 0, "availableReplicas": 0 } -} \ No newline at end of file +} diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_master_with_service_account_1.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_master_with_service_account_1.json index 5a2aa9de3..ac2e5842d 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_master_with_service_account_1.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_master_with_service_account_1.json @@ -125,6 +125,10 @@ { "name": "SPLUNK_LICENSE_URI", "value": "/mnt/splunk.lic" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { @@ -303,4 +307,4 @@ "replicas": 0, "availableReplicas": 0 } -} \ No newline at end of file +} diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_master_with_service_account_2.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_master_with_service_account_2.json index 0da2339fe..db7545922 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_master_with_service_account_2.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_license_master_with_service_account_2.json @@ -127,6 +127,10 @@ { "name": "SPLUNK_LICENSE_URI", "value": "/mnt/splunk.lic" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { @@ -307,4 +311,4 @@ "replicas": 0, "availableReplicas": 0 } -} \ No newline at end of file +} diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_monitoring_console_base.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_monitoring_console_base.json index b8637e02f..e19613072 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_monitoring_console_base.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_monitoring_console_base.json @@ -149,6 +149,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_monitoring_console_base_1.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_monitoring_console_base_1.json index 575e0b774..171293ae7 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_monitoring_console_base_1.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_monitoring_console_base_1.json @@ -149,6 +149,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_monitoring_console_with_apps.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_monitoring_console_with_apps.json index 2fe9dcb12..bf2f57378 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_monitoring_console_with_apps.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_monitoring_console_with_apps.json @@ -143,6 +143,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_monitoring_console_with_defaults.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_monitoring_console_with_defaults.json index 17cff62f0..bdc04b891 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_monitoring_console_with_defaults.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_monitoring_console_with_defaults.json @@ -135,6 +135,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_monitoring_console_with_service_account.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_monitoring_console_with_service_account.json index 450968c85..e7e0aae86 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_monitoring_console_with_service_account.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_monitoring_console_with_service_account.json @@ -153,6 +153,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_monitoring_console_with_service_account_1.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_monitoring_console_with_service_account_1.json index e3fb99601..0930a348e 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_monitoring_console_with_service_account_1.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_monitoring_console_with_service_account_1.json @@ -155,6 +155,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_monitoring_console_with_service_account_2.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_monitoring_console_with_service_account_2.json index 088071c37..15a562dbf 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_monitoring_console_with_service_account_2.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_monitoring_console_with_service_account_2.json @@ -149,6 +149,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_base.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_base.json index b99dfe27e..e708f415d 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_base.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_base.json @@ -129,6 +129,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_base_1.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_base_1.json index 279240914..97d82c0dc 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_base_1.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_base_1.json @@ -129,6 +129,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_base_2.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_base_2.json index 9d260cb1e..35b15c505 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_base_2.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_base_2.json @@ -133,6 +133,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_base_3.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_base_3.json index 9e16b0ff9..9045fe18f 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_base_3.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_base_3.json @@ -133,6 +133,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_base_4.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_base_4.json index 9e16b0ff9..9045fe18f 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_base_4.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_base_4.json @@ -133,6 +133,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_base_5.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_base_5.json index 9e16b0ff9..9045fe18f 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_base_5.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_base_5.json @@ -133,6 +133,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_with_service_account.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_with_service_account.json index 19902d0c5..b13514732 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_with_service_account.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_with_service_account.json @@ -133,6 +133,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_with_service_account_1.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_with_service_account_1.json index 254e6b3e5..307b01d28 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_with_service_account_1.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_with_service_account_1.json @@ -137,6 +137,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_with_service_account_2.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_with_service_account_2.json index bfeece12b..cb2d857e6 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_with_service_account_2.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_search_head_with_service_account_2.json @@ -139,6 +139,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_standalone_base.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_standalone_base.json index 53ebd48d4..aba35b9de 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_standalone_base.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_standalone_base.json @@ -127,6 +127,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_standalone_base_1.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_standalone_base_1.json index cc78c8b17..5009000f1 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_standalone_base_1.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_standalone_base_1.json @@ -135,6 +135,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_standalone_with_apps.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_standalone_with_apps.json index 1f458c7d6..62399b05f 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_standalone_with_apps.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_standalone_with_apps.json @@ -141,6 +141,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_standalone_with_defaults.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_standalone_with_defaults.json index 2cff57c5d..97b1a1bcc 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_standalone_with_defaults.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_standalone_with_defaults.json @@ -141,6 +141,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_standalone_with_service_account.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_standalone_with_service_account.json index 62e93dfe9..1633cec37 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_standalone_with_service_account.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_standalone_with_service_account.json @@ -141,6 +141,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_standalone_with_service_account_1.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_standalone_with_service_account_1.json index f52bd4fb5..905d5bb01 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_standalone_with_service_account_1.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_standalone_with_service_account_1.json @@ -145,6 +145,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { diff --git a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_standalone_with_service_account_2.json b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_standalone_with_service_account_2.json index d94fc0819..3b8594aa0 100644 --- a/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_standalone_with_service_account_2.json +++ b/pkg/splunk/enterprise/testdata/fixtures/statefulset_stack1_standalone_with_service_account_2.json @@ -147,6 +147,10 @@ { "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" + }, + { + "name": "KVSERVICE_CONNECTION_STRING", + "value": "splunk-kvservice.test.svc.cluster.local:443" } ], "resources": { From fe3668b488341cef519d5bade8a2ec56a1527bd4 Mon Sep 17 00:00:00 2001 From: jingyim Date: Thu, 22 Jan 2026 14:15:55 -0800 Subject: [PATCH 3/5] rebase and change --- pkg/splunk/enterprise/clustermanager.go | 4 ++-- pkg/splunk/enterprise/licensemanager.go | 4 ++-- pkg/splunk/enterprise/monitoringconsole.go | 4 ++-- pkg/splunk/enterprise/searchheadcluster.go | 4 ++-- pkg/splunk/enterprise/standalone.go | 4 ++-- pkg/splunk/enterprise/util.go | 6 +++--- pkg/splunk/enterprise/util_test.go | 14 +++++++------- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/pkg/splunk/enterprise/clustermanager.go b/pkg/splunk/enterprise/clustermanager.go index b097ca019..42b7beb57 100644 --- a/pkg/splunk/enterprise/clustermanager.go +++ b/pkg/splunk/enterprise/clustermanager.go @@ -188,9 +188,9 @@ func ApplyClusterManager(ctx context.Context, client splcommon.ControllerClient, } // create or update KVService CR with owner reference - err = ApplyKVServiceCR(ctx, client, cr) + err = createKVServiceCR(ctx, client, cr) if err != nil { - eventPublisher.Warning(ctx, "ApplyKVServiceCR", fmt.Sprintf("apply KVService CR failed %s", err.Error())) + eventPublisher.Warning(ctx, "createKVServiceCR", fmt.Sprintf("apply KVService CR failed %s", err.Error())) return result, err } diff --git a/pkg/splunk/enterprise/licensemanager.go b/pkg/splunk/enterprise/licensemanager.go index 4dfc32045..bd6cfc165 100644 --- a/pkg/splunk/enterprise/licensemanager.go +++ b/pkg/splunk/enterprise/licensemanager.go @@ -137,9 +137,9 @@ func ApplyLicenseManager(ctx context.Context, client splcommon.ControllerClient, } // create or update KVService CR with owner reference - err = ApplyKVServiceCR(ctx, client, cr) + err = createKVServiceCR(ctx, client, cr) if err != nil { - eventPublisher.Warning(ctx, "ApplyKVServiceCR", fmt.Sprintf("apply KVService CR failed %s", err.Error())) + eventPublisher.Warning(ctx, "createKVServiceCR", fmt.Sprintf("apply KVService CR failed %s", err.Error())) return result, err } diff --git a/pkg/splunk/enterprise/monitoringconsole.go b/pkg/splunk/enterprise/monitoringconsole.go index eaa76bbc9..823af6645 100644 --- a/pkg/splunk/enterprise/monitoringconsole.go +++ b/pkg/splunk/enterprise/monitoringconsole.go @@ -143,9 +143,9 @@ func ApplyMonitoringConsole(ctx context.Context, client splcommon.ControllerClie } // create or update KVService CR with owner reference - err = ApplyKVServiceCR(ctx, client, cr) + err = createKVServiceCR(ctx, client, cr) if err != nil { - eventPublisher.Warning(ctx, "ApplyKVServiceCR", fmt.Sprintf("apply KVService CR failed %s", err.Error())) + eventPublisher.Warning(ctx, "createKVServiceCR", fmt.Sprintf("apply KVService CR failed %s", err.Error())) return result, err } diff --git a/pkg/splunk/enterprise/searchheadcluster.go b/pkg/splunk/enterprise/searchheadcluster.go index 95a409b8c..5e759827d 100644 --- a/pkg/splunk/enterprise/searchheadcluster.go +++ b/pkg/splunk/enterprise/searchheadcluster.go @@ -171,9 +171,9 @@ func ApplySearchHeadCluster(ctx context.Context, client splcommon.ControllerClie } // create or update KVService CR with owner reference - err = ApplyKVServiceCR(ctx, client, cr) + err = createKVServiceCR(ctx, client, cr) if err != nil { - eventPublisher.Warning(ctx, "ApplyKVServiceCR", fmt.Sprintf("apply KVService CR failed %s", err.Error())) + eventPublisher.Warning(ctx, "createKVServiceCR", fmt.Sprintf("apply KVService CR failed %s", err.Error())) return result, err } diff --git a/pkg/splunk/enterprise/standalone.go b/pkg/splunk/enterprise/standalone.go index e606764e5..bbba0b63f 100644 --- a/pkg/splunk/enterprise/standalone.go +++ b/pkg/splunk/enterprise/standalone.go @@ -173,9 +173,9 @@ func ApplyStandalone(ctx context.Context, client splcommon.ControllerClient, cr } // create or update KVService CR with owner reference - err = ApplyKVServiceCR(ctx, client, cr) + err = createKVServiceCR(ctx, client, cr) if err != nil { - eventPublisher.Warning(ctx, "ApplyKVServiceCR", fmt.Sprintf("apply KVService CR failed %s", err.Error())) + eventPublisher.Warning(ctx, "createKVServiceCR", fmt.Sprintf("apply KVService CR failed %s", err.Error())) return result, err } diff --git a/pkg/splunk/enterprise/util.go b/pkg/splunk/enterprise/util.go index 588350a99..576e38663 100644 --- a/pkg/splunk/enterprise/util.go +++ b/pkg/splunk/enterprise/util.go @@ -2494,12 +2494,12 @@ func changeAnnotations(ctx context.Context, c splcommon.ControllerClient, image return err } -// ApplyKVServiceCR ensures the KVService CR exists with the current CR as an owner. +// createKVServiceCR ensures the KVService CR exists with the current CR as an owner. // - If KVService doesn't exist, create it with the current CR as owner // - If KVService exists but current CR is not an owner, add owner reference -func ApplyKVServiceCR(ctx context.Context, c splcommon.ControllerClient, cr splcommon.MetaObject) error { +func createKVServiceCR(ctx context.Context, c splcommon.ControllerClient, cr splcommon.MetaObject) error { reqLogger := log.FromContext(ctx) - scopedLog := reqLogger.WithName("ApplyKVServiceCR").WithValues( + scopedLog := reqLogger.WithName("createKVServiceCR").WithValues( "kind", cr.GetObjectKind().GroupVersionKind().Kind, "name", cr.GetName(), "namespace", cr.GetNamespace()) diff --git a/pkg/splunk/enterprise/util_test.go b/pkg/splunk/enterprise/util_test.go index 4bdbf9fa1..915df7311 100644 --- a/pkg/splunk/enterprise/util_test.go +++ b/pkg/splunk/enterprise/util_test.go @@ -3279,7 +3279,7 @@ func TestGetCurrentImage(t *testing.T) { } -func TestApplyKVServiceCR(t *testing.T) { +func TestcreateKVServiceCR(t *testing.T) { ctx := context.TODO() // Setup scheme @@ -3303,9 +3303,9 @@ func TestApplyKVServiceCR(t *testing.T) { t.Run("creates KVService when it doesn't exist", func(t *testing.T) { client := fake.NewClientBuilder().WithScheme(sch).Build() - err := ApplyKVServiceCR(ctx, client, standalone) + err := createKVServiceCR(ctx, client, standalone) if err != nil { - t.Errorf("ApplyKVServiceCR should not return error: %v", err) + t.Errorf("createKVServiceCR should not return error: %v", err) } // Verify KVService was created @@ -3358,9 +3358,9 @@ func TestApplyKVServiceCR(t *testing.T) { client := fake.NewClientBuilder().WithScheme(sch).WithObjects(existingKVService).Build() // Add second owner - err := ApplyKVServiceCR(ctx, client, standalone2) + err := createKVServiceCR(ctx, client, standalone2) if err != nil { - t.Errorf("ApplyKVServiceCR should not return error: %v", err) + t.Errorf("createKVServiceCR should not return error: %v", err) } // Verify both owner references exist @@ -3394,9 +3394,9 @@ func TestApplyKVServiceCR(t *testing.T) { client := fake.NewClientBuilder().WithScheme(sch).WithObjects(existingKVService).Build() // Call again with same owner - err := ApplyKVServiceCR(ctx, client, standalone) + err := createKVServiceCR(ctx, client, standalone) if err != nil { - t.Errorf("ApplyKVServiceCR should not return error: %v", err) + t.Errorf("createKVServiceCR should not return error: %v", err) } // Verify still only 1 owner reference From f5f486091b9c0e76660dfb7fd67e6fbb91bca869 Mon Sep 17 00:00:00 2001 From: jingyim Date: Thu, 22 Jan 2026 14:27:00 -0800 Subject: [PATCH 4/5] fix --- pkg/splunk/enterprise/indexercluster.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/splunk/enterprise/indexercluster.go b/pkg/splunk/enterprise/indexercluster.go index f08cb3bf2..3341e73ce 100644 --- a/pkg/splunk/enterprise/indexercluster.go +++ b/pkg/splunk/enterprise/indexercluster.go @@ -163,9 +163,9 @@ func ApplyIndexerClusterManager(ctx context.Context, client splcommon.Controller } // create or update KVService CR with owner reference - err = ApplyKVServiceCR(ctx, client, cr) + err = createKVServiceCR(ctx, client, cr) if err != nil { - eventPublisher.Warning(ctx, "ApplyKVServiceCR", fmt.Sprintf("apply KVService CR failed %s", err.Error())) + eventPublisher.Warning(ctx, "createKVServiceCR", fmt.Sprintf("apply KVService CR failed %s", err.Error())) return result, err } From 97537de79017f32d3fc5ebbce2d91e1785c65003 Mon Sep 17 00:00:00 2001 From: jingyim Date: Thu, 22 Jan 2026 14:30:34 -0800 Subject: [PATCH 5/5] fix --- pkg/splunk/enterprise/util_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/splunk/enterprise/util_test.go b/pkg/splunk/enterprise/util_test.go index 915df7311..0ce167817 100644 --- a/pkg/splunk/enterprise/util_test.go +++ b/pkg/splunk/enterprise/util_test.go @@ -3279,7 +3279,7 @@ func TestGetCurrentImage(t *testing.T) { } -func TestcreateKVServiceCR(t *testing.T) { +func TestCreateKVServiceCR(t *testing.T) { ctx := context.TODO() // Setup scheme