Skip to content

Commit d0c6386

Browse files
authored
CSPL-4715: fix empty pod name in ClusterManager bundle push (#1849)
Set targetPodName when creating podExecClient in ApplyClusterManager so PerformCmBundlePush resolves the correct pod even when addTelApp is skipped (telAppInstalled == true).
1 parent f4484a2 commit d0c6386

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

pkg/splunk/enterprise/clustermanager.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,8 @@ func ApplyClusterManager(ctx context.Context, client splcommon.ControllerClient,
227227

228228
// Create podExecClient (use injected one if provided, otherwise create real one)
229229
if podExecClient == nil {
230-
podExecClient = splutil.GetPodExecClient(client, cr, "")
230+
cmPodName := GetSplunkStatefulsetPodName(SplunkClusterManager, cr.GetName(), 0)
231+
podExecClient = splutil.GetPodExecClient(client, cr, cmPodName)
231232
}
232233

233234
// Add a splunk operator telemetry app

pkg/splunk/enterprise/names.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ version = 1.0.0
210210
`
211211

212212
telAppDefMetaConfString = `[]
213-
access = read : [ * ], write : [ admin ]
213+
access = read : [ * ], write : [ admin ]
214214
`
215215

216216
// Command to create telemetry app on non SHC scenarios

0 commit comments

Comments
 (0)