diff --git a/docs/Examples.md b/docs/Examples.md index 53f96152d..6e81d13c7 100644 --- a/docs/Examples.md +++ b/docs/Examples.md @@ -843,3 +843,22 @@ Use the kubectl command to update the global kubernetes secret object: Use the kubectl command to delete the global kubernetes secret object: `kubectl delete secret splunk--secret` + +## Creating Custom Probe Scripts + +The default liveness, readiness, and startup probe scripts are housed in the tools/k8_probes/ directory. During the creation of a CR, the Splunk Operator will create a configmap named `splunk--probe-configmap` in the namespace of the CR with these scripts to mount to the pod for the liveness probe, readiness probe, and startup probe. If you would like to use a custom probe script, there are two options to edit these scripts. + +NOTE: Liveness, readiness, and startup probe scripts must be used by all CRs in the same namespace. Different namespaces can have different probe scripts. + +### Edit the configmap after it is automatically created + +When a CR is created for the first time in a specific namespace, and the probe configmap for that namespace is not yet created, the Splunk Operator will automatically create the `splunk--probe-configmap` configmap with the default scripts from the tools/k8_probes/ directory. Once it is created, you can edit the data in the configmap manually. The operator will not overwrite the data in the configmap if it is changed. + +### Create the configmap before deploying CRs + +Before deploying any Custom Resources to a specific namespace, you can manually create the configmap with your unique scripts as the data. All three scripts must be included in the configmap whether you are using a custom script for one or all of the probes. The scripts must be named exactly `livenessProbe.sh`, `readinessProbe.sh`, and `startupProbe.sh`. If you only require a custom script for one or two probes, please make sure to add the default script for the other probes to your configmap. **The operator will never overwrite the data in the existing `splunk--probe-configmap` configmap.** Only a user can manually update the scripts if needed. + +To create the configmap, run the following command: +``` +kubectl create configmap splunk--probe-configmap --from-file=livenessProbe.sh,readinessProbe.sh,startupProbe.sh -n +``` \ No newline at end of file diff --git a/pkg/splunk/enterprise/clustermanager_test.go b/pkg/splunk/enterprise/clustermanager_test.go index e967883d7..c8705ad42 100644 --- a/pkg/splunk/enterprise/clustermanager_test.go +++ b/pkg/splunk/enterprise/clustermanager_test.go @@ -64,6 +64,7 @@ func TestApplyClusterManager(t *testing.T) { {MetaName: "*v1.StatefulSet-test-splunk-stack1-cluster-manager"}, {MetaName: "*v1.ConfigMap-test-splunk-test-probe-configmap"}, {MetaName: "*v1.ConfigMap-test-splunk-test-probe-configmap"}, + {MetaName: "*v1.ConfigMap-test-splunk-test-probe-configmap"}, {MetaName: "*v1.Secret-test-splunk-test-secret"}, {MetaName: "*v1.Secret-test-splunk-stack1-cluster-manager-secret-v1"}, {MetaName: "*v1.ConfigMap-test-splunk-stack1-clustermanager-smartstore"}, @@ -101,7 +102,7 @@ func TestApplyClusterManager(t *testing.T) { } listmockCall := []spltest.MockFuncCall{ {ListOpts: listOpts}} - createCalls := map[string][]spltest.MockFuncCall{"Get": funcCalls, "Create": {funcCalls[0], funcCalls[3], funcCalls[4], funcCalls[6], funcCalls[9], funcCalls[5]}, "List": {listmockCall[0]}, "Update": {funcCalls[0]}} + createCalls := map[string][]spltest.MockFuncCall{"Get": funcCalls, "Create": {funcCalls[0], funcCalls[3], funcCalls[4], funcCalls[6], funcCalls[10], funcCalls[5]}, "List": {listmockCall[0]}, "Update": {funcCalls[0]}} updateCalls := map[string][]spltest.MockFuncCall{"Get": updateFuncCalls, "Update": {funcCalls[5]}, "List": {listmockCall[0]}} current := enterpriseApi.ClusterManager{ @@ -515,6 +516,7 @@ func TestApplyClusterManagerWithSmartstore(t *testing.T) { {MetaName: "*v1.StatefulSet-test-splunk-stack1-cluster-manager"}, {MetaName: "*v1.ConfigMap-test-splunk-test-probe-configmap"}, {MetaName: "*v1.ConfigMap-test-splunk-test-probe-configmap"}, + {MetaName: "*v1.ConfigMap-test-splunk-test-probe-configmap"}, {MetaName: "*v1.Secret-test-splunk-test-secret"}, {MetaName: "*v1.Secret-test-splunk-stack1-cluster-manager-secret-v1"}, {MetaName: "*v1.ConfigMap-test-splunk-stack1-clustermanager-smartstore"}, @@ -563,7 +565,7 @@ func TestApplyClusterManagerWithSmartstore(t *testing.T) { {ListOpts: listOpts}, {ListOpts: listOpts1}, } - createCalls := map[string][]spltest.MockFuncCall{"Get": funcCalls, "Create": {funcCalls[7], funcCalls[8], funcCalls[11], funcCalls[13]}, "List": {listmockCall[0], listmockCall[0], listmockCall[1]}, "Update": {funcCalls[0], funcCalls[3], funcCalls[14]}} + createCalls := map[string][]spltest.MockFuncCall{"Get": funcCalls, "Create": {funcCalls[7], funcCalls[8], funcCalls[12], funcCalls[14]}, "List": {listmockCall[0], listmockCall[0], listmockCall[1]}, "Update": {funcCalls[0], funcCalls[3], funcCalls[15]}} updateCalls := map[string][]spltest.MockFuncCall{"Get": updateFuncCalls, "Update": {funcCalls[9]}, "List": {listmockCall[0]}} current := enterpriseApi.ClusterManager{ diff --git a/pkg/splunk/enterprise/clustermaster_test.go b/pkg/splunk/enterprise/clustermaster_test.go index f2f0e9fea..3e075ce02 100644 --- a/pkg/splunk/enterprise/clustermaster_test.go +++ b/pkg/splunk/enterprise/clustermaster_test.go @@ -63,6 +63,7 @@ func TestApplyClusterMaster(t *testing.T) { {MetaName: "*v1.StatefulSet-test-splunk-stack1-cluster-master"}, {MetaName: "*v1.ConfigMap-test-splunk-test-probe-configmap"}, {MetaName: "*v1.ConfigMap-test-splunk-test-probe-configmap"}, + {MetaName: "*v1.ConfigMap-test-splunk-test-probe-configmap"}, {MetaName: "*v1.Secret-test-splunk-test-secret"}, {MetaName: "*v1.Secret-test-splunk-stack1-cluster-master-secret-v1"}, {MetaName: "*v1.ConfigMap-test-splunk-stack1-clustermaster-smartstore"}, @@ -101,7 +102,7 @@ func TestApplyClusterMaster(t *testing.T) { } listmockCall := []spltest.MockFuncCall{ {ListOpts: listOpts}} - createCalls := map[string][]spltest.MockFuncCall{"Get": funcCalls, "Create": {funcCalls[0], funcCalls[3], funcCalls[4], funcCalls[5], funcCalls[8], funcCalls[10], funcCalls[6]}, "List": {listmockCall[0]}, "Update": {funcCalls[0]}} + createCalls := map[string][]spltest.MockFuncCall{"Get": funcCalls, "Create": {funcCalls[0], funcCalls[3], funcCalls[4], funcCalls[5], funcCalls[9], funcCalls[11], funcCalls[6]}, "List": {listmockCall[0]}, "Update": {funcCalls[0]}} updateCalls := map[string][]spltest.MockFuncCall{"Get": updateFuncCalls, "Update": {funcCalls[6]}, "List": {listmockCall[0]}} current := enterpriseApiV3.ClusterMaster{ @@ -217,6 +218,7 @@ func TestApplyClusterMasterWithSmartstore(t *testing.T) { {MetaName: "*v1.StatefulSet-test-splunk-stack1-cluster-master"}, {MetaName: "*v1.ConfigMap-test-splunk-test-probe-configmap"}, {MetaName: "*v1.ConfigMap-test-splunk-test-probe-configmap"}, + {MetaName: "*v1.ConfigMap-test-splunk-test-probe-configmap"}, {MetaName: "*v1.Secret-test-splunk-test-secret"}, {MetaName: "*v1.Secret-test-splunk-stack1-cluster-master-secret-v1"}, {MetaName: "*v1.ConfigMap-test-splunk-stack1-clustermaster-smartstore"}, @@ -261,7 +263,7 @@ func TestApplyClusterMasterWithSmartstore(t *testing.T) { } listmockCall := []spltest.MockFuncCall{ {ListOpts: listOpts}} - createCalls := map[string][]spltest.MockFuncCall{"Get": funcCalls, "Create": {funcCalls[7], funcCalls[8], funcCalls[9], funcCalls[12], funcCalls[14]}, "List": {listmockCall[0], listmockCall[0]}, "Update": {funcCalls[0], funcCalls[3], funcCalls[15]}} + createCalls := map[string][]spltest.MockFuncCall{"Get": funcCalls, "Create": {funcCalls[7], funcCalls[8], funcCalls[9], funcCalls[13], funcCalls[15]}, "List": {listmockCall[0], listmockCall[0]}, "Update": {funcCalls[0], funcCalls[3], funcCalls[16]}} updateCalls := map[string][]spltest.MockFuncCall{"Get": updateFuncCalls, "Update": {funcCalls[10]}, "List": {listmockCall[0]}} current := enterpriseApiV3.ClusterMaster{ diff --git a/pkg/splunk/enterprise/configuration.go b/pkg/splunk/enterprise/configuration.go index 7987a2ea1..7429fbb10 100644 --- a/pkg/splunk/enterprise/configuration.go +++ b/pkg/splunk/enterprise/configuration.go @@ -602,10 +602,32 @@ func addStorageVolumes(ctx context.Context, cr splcommon.MetaObject, client splc func getProbeConfigMap(ctx context.Context, client splcommon.ControllerClient, cr splcommon.MetaObject) (*corev1.ConfigMap, error) { - configMap := corev1.ConfigMap{ + reqLogger := log.FromContext(ctx) + scopedLog := reqLogger.WithName("getProbeConfigMap").WithValues("namespace", cr.GetNamespace()) + + configMapName := GetProbeConfigMapName(cr.GetNamespace()) + configMapNamespace := cr.GetNamespace() + namespacedName := types.NamespacedName{Namespace: configMapNamespace, Name: configMapName} + + // Check if the config map already exists + scopedLog.Info("Checking for existing config map", "configMapName", configMapName, "configMapNamespace", configMapNamespace) + var configMap corev1.ConfigMap + err := client.Get(ctx, namespacedName, &configMap) + + if err == nil { + scopedLog.Info("Retrieved existing config map", "configMapName", configMapName, "configMapNamespace", configMapNamespace) + return &configMap, nil + } else if !k8serrors.IsNotFound(err) { + scopedLog.Error(err, "Error retrieving config map", "configMapName", configMapName, "configMapNamespace", configMapNamespace) + return nil, err + } + + // Existing config map not found, create one for the probes + scopedLog.Info("Creating new config map", "configMapName", configMapName, "configMapNamespace", configMapNamespace) + configMap = corev1.ConfigMap{ ObjectMeta: metav1.ObjectMeta{ - Name: GetProbeConfigMapName(cr.GetNamespace()), - Namespace: cr.GetNamespace(), + Name: configMapName, + Namespace: configMapNamespace, }, } diff --git a/pkg/splunk/enterprise/indexercluster_test.go b/pkg/splunk/enterprise/indexercluster_test.go index 8ddec18e0..8947127e6 100644 --- a/pkg/splunk/enterprise/indexercluster_test.go +++ b/pkg/splunk/enterprise/indexercluster_test.go @@ -160,6 +160,7 @@ func TestApplyIndexerCluster(t *testing.T) { {MetaName: "*v1.StatefulSet-test-splunk-stack1-indexer"}, {MetaName: "*v1.ConfigMap-test-splunk-test-probe-configmap"}, {MetaName: "*v1.ConfigMap-test-splunk-test-probe-configmap"}, + {MetaName: "*v1.ConfigMap-test-splunk-test-probe-configmap"}, {MetaName: "*v1.Secret-test-splunk-test-secret"}, {MetaName: "*v1.Secret-test-splunk-stack1-indexer-secret-v1"}, {MetaName: "*v4.ClusterManager-test-manager1"}, @@ -197,7 +198,7 @@ func TestApplyIndexerCluster(t *testing.T) { {ListOpts: listOpts}, {ListOpts: listOpts1}, } - createCalls := map[string][]spltest.MockFuncCall{"Get": funcCalls, "Create": {funcCalls[0], funcCalls[3], funcCalls[5], funcCalls[6], funcCalls[9], funcCalls[11]}, "Update": {funcCalls[0]}, "List": {listmockCall[0], listmockCall[1]}} + createCalls := map[string][]spltest.MockFuncCall{"Get": funcCalls, "Create": {funcCalls[0], funcCalls[3], funcCalls[5], funcCalls[6], funcCalls[10], funcCalls[12]}, "Update": {funcCalls[0]}, "List": {listmockCall[0], listmockCall[1]}} updateCalls := map[string][]spltest.MockFuncCall{"Get": updateFuncCalls, "List": {listmockCall[0], listmockCall[1]}} current := enterpriseApi.IndexerCluster{ diff --git a/pkg/splunk/enterprise/licensemanager_test.go b/pkg/splunk/enterprise/licensemanager_test.go index 6529d57fd..02c8357d5 100644 --- a/pkg/splunk/enterprise/licensemanager_test.go +++ b/pkg/splunk/enterprise/licensemanager_test.go @@ -55,6 +55,7 @@ func TestApplyLicenseManager(t *testing.T) { {MetaName: "*v1.StatefulSet-test-splunk-stack1-license-manager"}, {MetaName: "*v1.ConfigMap-test-splunk-test-probe-configmap"}, {MetaName: "*v1.ConfigMap-test-splunk-test-probe-configmap"}, + {MetaName: "*v1.ConfigMap-test-splunk-test-probe-configmap"}, {MetaName: "*v1.Secret-test-splunk-test-secret"}, {MetaName: "*v1.Secret-test-splunk-stack1-license-manager-secret-v1"}, {MetaName: "*v1.StatefulSet-test-splunk-stack1-license-manager"}, @@ -74,8 +75,8 @@ func TestApplyLicenseManager(t *testing.T) { listmockCall := []spltest.MockFuncCall{ {ListOpts: listOpts}, } - createCalls := map[string][]spltest.MockFuncCall{"Get": funcCalls, "Create": {funcCalls[0], funcCalls[3], funcCalls[4], funcCalls[6], funcCalls[9], funcCalls[10]}, "Update": {funcCalls[0]}, "List": {listmockCall[0]}} - updateFuncCalls := []spltest.MockFuncCall{funcCalls[0], funcCalls[1], funcCalls[3], funcCalls[4], funcCalls[5], funcCalls[6], funcCalls[8], funcCalls[9], funcCalls[10], funcCalls[11], funcCalls[10], funcCalls[12], funcCalls[12]} + createCalls := map[string][]spltest.MockFuncCall{"Get": funcCalls, "Create": {funcCalls[0], funcCalls[3], funcCalls[4], funcCalls[6], funcCalls[10], funcCalls[11]}, "Update": {funcCalls[0]}, "List": {listmockCall[0]}} + updateFuncCalls := []spltest.MockFuncCall{funcCalls[0], funcCalls[1], funcCalls[3], funcCalls[4], funcCalls[5], funcCalls[6], funcCalls[9], funcCalls[10], funcCalls[11], funcCalls[12], funcCalls[11], funcCalls[13], funcCalls[13]} updateCalls := map[string][]spltest.MockFuncCall{"Get": updateFuncCalls, "Update": {funcCalls[5]}, "List": {listmockCall[0]}} current := enterpriseApi.LicenseManager{ TypeMeta: metav1.TypeMeta{ diff --git a/pkg/splunk/enterprise/licensemaster_test.go b/pkg/splunk/enterprise/licensemaster_test.go index 568c81655..2daaf48b8 100644 --- a/pkg/splunk/enterprise/licensemaster_test.go +++ b/pkg/splunk/enterprise/licensemaster_test.go @@ -71,6 +71,7 @@ func TestApplyLicenseMaster(t *testing.T) { {MetaName: "*v1." + splcommon.TestStack1LicenseManagerStatefulSet}, {MetaName: "*v1.ConfigMap-test-splunk-test-probe-configmap"}, {MetaName: "*v1.ConfigMap-test-splunk-test-probe-configmap"}, + {MetaName: "*v1.ConfigMap-test-splunk-test-probe-configmap"}, {MetaName: "*v1.Secret-test-splunk-test-secret"}, {MetaName: "*v1.Secret-test-splunk-stack1-license-master-secret-v1"}, {MetaName: "*v1.StatefulSet-test-splunk-stack1-license-master"}, @@ -90,9 +91,9 @@ func TestApplyLicenseMaster(t *testing.T) { listmockCall := []spltest.MockFuncCall{ {ListOpts: listOpts}} - createCalls := map[string][]spltest.MockFuncCall{"Get": funcCalls, "Create": {funcCalls[0], funcCalls[3], funcCalls[4], funcCalls[7], funcCalls[9], funcCalls[11]}, "Update": {funcCalls[0]}, "List": {listmockCall[0]}} - updateFuncCalls := []spltest.MockFuncCall{funcCalls[0], funcCalls[1], funcCalls[3], funcCalls[4], funcCalls[5], funcCalls[6], funcCalls[8], funcCalls[9], funcCalls[10], funcCalls[11], funcCalls[10], funcCalls[12], funcCalls[13]} - updateCalls := map[string][]spltest.MockFuncCall{"Get": updateFuncCalls, "Update": {funcCalls[10]}, "List": {listmockCall[0]}} + createCalls := map[string][]spltest.MockFuncCall{"Get": funcCalls, "Create": {funcCalls[0], funcCalls[3], funcCalls[4], funcCalls[7], funcCalls[10], funcCalls[12]}, "Update": {funcCalls[0]}, "List": {listmockCall[0]}} + updateFuncCalls := []spltest.MockFuncCall{funcCalls[0], funcCalls[1], funcCalls[3], funcCalls[4], funcCalls[5], funcCalls[6], funcCalls[9], funcCalls[10], funcCalls[11], funcCalls[12], funcCalls[11], funcCalls[13], funcCalls[14]} + updateCalls := map[string][]spltest.MockFuncCall{"Get": updateFuncCalls, "Update": {funcCalls[11]}, "List": {listmockCall[0]}} current := enterpriseApiV3.LicenseMaster{ TypeMeta: metav1.TypeMeta{ Kind: "LicenseMaster", diff --git a/pkg/splunk/enterprise/monitoringconsole_test.go b/pkg/splunk/enterprise/monitoringconsole_test.go index 226d9a9a7..8b7ebed24 100644 --- a/pkg/splunk/enterprise/monitoringconsole_test.go +++ b/pkg/splunk/enterprise/monitoringconsole_test.go @@ -68,6 +68,7 @@ func TestApplyMonitoringConsole(t *testing.T) { {MetaName: "*v1.StatefulSet-test-splunk-stack1-monitoring-console"}, {MetaName: "*v1.ConfigMap-test-splunk-test-probe-configmap"}, {MetaName: "*v1.ConfigMap-test-splunk-test-probe-configmap"}, + {MetaName: "*v1.ConfigMap-test-splunk-test-probe-configmap"}, {MetaName: "*v1.Secret-test-splunk-test-secret"}, {MetaName: "*v1.Secret-test-splunk-stack1-monitoring-console-secret-v1"}, {MetaName: "*v1.ConfigMap-test-splunk-stack1-monitoring-console"}, @@ -115,7 +116,7 @@ func TestApplyMonitoringConsole(t *testing.T) { {ListOpts: listOpts2}, } - createCalls := map[string][]spltest.MockFuncCall{"Get": funcCalls, "Create": {funcCalls[0], funcCalls[3], funcCalls[4], funcCalls[5], funcCalls[8], funcCalls[10], funcCalls[11], funcCalls[6]}, "Update": {funcCalls[0], funcCalls[11]}, "List": {listmockCall[0]}} + createCalls := map[string][]spltest.MockFuncCall{"Get": funcCalls, "Create": {funcCalls[0], funcCalls[3], funcCalls[4], funcCalls[5], funcCalls[9], funcCalls[11], funcCalls[12], funcCalls[6]}, "Update": {funcCalls[0], funcCalls[12]}, "List": {listmockCall[0]}} updateCalls := map[string][]spltest.MockFuncCall{"Get": updateFuncCalls, "Update": {updateFuncCalls[5]}, "List": {listmockCall[0]}} current := enterpriseApi.MonitoringConsole{ diff --git a/pkg/splunk/enterprise/searchheadcluster_test.go b/pkg/splunk/enterprise/searchheadcluster_test.go index 8562d4fd3..c0c4cfdbd 100644 --- a/pkg/splunk/enterprise/searchheadcluster_test.go +++ b/pkg/splunk/enterprise/searchheadcluster_test.go @@ -80,6 +80,7 @@ func TestApplySearchHeadCluster(t *testing.T) { {MetaName: "*v1.Service-test-splunk-stack1-deployer-service"}, {MetaName: "*v1.StatefulSet-test-splunk-stack1-deployer"}, + {MetaName: "*v1.ConfigMap-test-splunk-test-probe-configmap"}, {MetaName: "*v1.ConfigMap-test-splunk-test-probe-configmap"}, {MetaName: "*v1.ConfigMap-test-splunk-test-probe-configmap"}, @@ -140,8 +141,8 @@ func TestApplySearchHeadCluster(t *testing.T) { listmockCall := []spltest.MockFuncCall{ {ListOpts: listOpts}} - createCalls := map[string][]spltest.MockFuncCall{"Get": funcCalls, "Create": {funcCalls[0], funcCalls[3], funcCalls[4], funcCalls[5], funcCalls[6], funcCalls[9], funcCalls[11], funcCalls[12], funcCalls[16], funcCalls[18]}, "Update": {funcCalls[0]}, "List": {listmockCall[0], listmockCall[0]}} - updateCalls := map[string][]spltest.MockFuncCall{"Get": createFuncCalls, "Update": {createFuncCalls[6], createFuncCalls[16]}, "List": {listmockCall[0], listmockCall[0]}} + createCalls := map[string][]spltest.MockFuncCall{"Get": funcCalls, "Create": {funcCalls[0], funcCalls[3], funcCalls[4], funcCalls[5], funcCalls[6], funcCalls[10], funcCalls[12], funcCalls[13], funcCalls[17], funcCalls[19]}, "Update": {funcCalls[0]}, "List": {listmockCall[0], listmockCall[0]}} + updateCalls := map[string][]spltest.MockFuncCall{"Get": createFuncCalls, "Update": {createFuncCalls[6], createFuncCalls[18]}, "List": {listmockCall[0], listmockCall[0]}} statefulSet := enterpriseApi.SearchHeadCluster{ TypeMeta: metav1.TypeMeta{ Kind: "SearchHeadCluster", diff --git a/pkg/splunk/enterprise/standalone_test.go b/pkg/splunk/enterprise/standalone_test.go index 0953c393e..86a6c0493 100644 --- a/pkg/splunk/enterprise/standalone_test.go +++ b/pkg/splunk/enterprise/standalone_test.go @@ -70,6 +70,7 @@ func TestApplyStandalone(t *testing.T) { {MetaName: "*v1.StatefulSet-test-splunk-stack1-standalone"}, {MetaName: "*v1.ConfigMap-test-splunk-test-probe-configmap"}, {MetaName: "*v1.ConfigMap-test-splunk-test-probe-configmap"}, + {MetaName: "*v1.ConfigMap-test-splunk-test-probe-configmap"}, {MetaName: "*v1.Secret-test-splunk-test-secret"}, {MetaName: "*v1.Secret-test-splunk-stack1-standalone-secret-v1"}, {MetaName: "*v1.ConfigMap-test-splunk-stack1-standalone-smartstore"}, @@ -113,8 +114,8 @@ func TestApplyStandalone(t *testing.T) { listmockCall := []spltest.MockFuncCall{ {ListOpts: listOpts}} - createCalls := map[string][]spltest.MockFuncCall{"Get": funcCalls, "Create": {funcCalls[0], funcCalls[3], funcCalls[4], funcCalls[5], funcCalls[8], funcCalls[10], funcCalls[13]}, "Update": {funcCalls[0]}, "List": {listmockCall[0]}} - updateCalls := map[string][]spltest.MockFuncCall{"Get": updateFuncCalls, "Update": {funcCalls[13]}, "List": {listmockCall[0]}} + createCalls := map[string][]spltest.MockFuncCall{"Get": funcCalls, "Create": {funcCalls[0], funcCalls[3], funcCalls[4], funcCalls[5], funcCalls[8], funcCalls[11], funcCalls[14]}, "Update": {funcCalls[0]}, "List": {listmockCall[0]}} + updateCalls := map[string][]spltest.MockFuncCall{"Get": updateFuncCalls, "Update": {funcCalls[14]}, "List": {listmockCall[0]}} current := enterpriseApi.Standalone{ TypeMeta: metav1.TypeMeta{ Kind: "Standalone", @@ -237,6 +238,7 @@ func TestApplyStandaloneWithSmartstore(t *testing.T) { {MetaName: "*v1.StatefulSet-test-splunk-stack1-standalone"}, {MetaName: "*v1.ConfigMap-test-splunk-test-probe-configmap"}, {MetaName: "*v1.ConfigMap-test-splunk-test-probe-configmap"}, + {MetaName: "*v1.ConfigMap-test-splunk-test-probe-configmap"}, {MetaName: "*v1.Secret-test-splunk-test-secret"}, {MetaName: "*v1.Secret-test-splunk-stack1-standalone-secret-v1"}, {MetaName: "*v1.ConfigMap-test-splunk-stack1-standalone-smartstore"},