Skip to content

Commit

Permalink
commented kubectl top
Browse files Browse the repository at this point in the history
  • Loading branch information
vivekr-splunk committed Feb 27, 2024
1 parent 2ad2e22 commit 7be1896
Showing 1 changed file with 42 additions and 42 deletions.
84 changes: 42 additions & 42 deletions test/testenv/verificationutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ func VerifyMonitoringConsoleReady(ctx context.Context, deployment *Deployment, m
}
testenvInstance.Log.Info("Waiting for Monitoring Console phase to be ready", "instance", monitoringConsole.ObjectMeta.Name, "Phase", monitoringConsole.Status.Phase)
DumpGetPods(testenvInstance.GetName())
DumpGetTopPods(testenvInstance.GetName())
DumpGetTopNodes()
// DumpGetTopPods(testenvInstance.GetName())
// DumpGetTopNodes()
return monitoringConsole.Status.Phase
}, deployment.GetTimeout(), PollInterval).Should(gomega.Equal(enterpriseApi.PhaseReady))

Expand All @@ -94,8 +94,8 @@ func StandaloneReady(ctx context.Context, deployment *Deployment, deploymentName
}
testenvInstance.Log.Info("Waiting for Standalone phase to be ready", "instance", standalone.ObjectMeta.Name, "Phase", standalone.Status.Phase)
DumpGetPods(testenvInstance.GetName())
DumpGetTopPods(testenvInstance.GetName())
DumpGetTopNodes()
// DumpGetTopPods(testenvInstance.GetName())
// DumpGetTopNodes()
return standalone.Status.Phase
}, deployment.GetTimeout(), PollInterval).Should(gomega.Equal(enterpriseApi.PhaseReady))

Expand All @@ -118,8 +118,8 @@ func SearchHeadClusterReady(ctx context.Context, deployment *Deployment, testenv
}
testenvInstance.Log.Info("Waiting for Search head cluster phase to be ready", "instance", shc.ObjectMeta.Name, "Phase", shc.Status.Phase)
DumpGetPods(testenvInstance.GetName())
DumpGetTopPods(testenvInstance.GetName())
DumpGetTopNodes()
// DumpGetTopPods(testenvInstance.GetName())
// DumpGetTopNodes()
return shc.Status.Phase
}, deployment.GetTimeout(), PollInterval).Should(gomega.Equal(enterpriseApi.PhaseReady))

Expand All @@ -130,8 +130,8 @@ func SearchHeadClusterReady(ctx context.Context, deployment *Deployment, testenv
}
testenvInstance.Log.Info("Waiting for Deployer phase to be ready", "instance", shc.ObjectMeta.Name, "Phase", shc.Status.DeployerPhase)
DumpGetPods(testenvInstance.GetName())
DumpGetTopPods(testenvInstance.GetName())
DumpGetTopNodes()
// DumpGetTopPods(testenvInstance.GetName())
// DumpGetTopNodes()
return shc.Status.DeployerPhase
}, deployment.GetTimeout(), PollInterval).Should(gomega.Equal(enterpriseApi.PhaseReady))

Expand All @@ -142,8 +142,8 @@ func SearchHeadClusterReady(ctx context.Context, deployment *Deployment, testenv
}
testenvInstance.Log.Info("Waiting for Search Head Cluster phase to be ready", "instance", shc.ObjectMeta.Name, "Phase", shc.Status.Phase)
DumpGetPods(testenvInstance.GetName())
DumpGetTopPods(testenvInstance.GetName())
DumpGetTopNodes()
// DumpGetTopPods(testenvInstance.GetName())
// DumpGetTopNodes()
DumpGetSplunkVersion(ctx, testenvInstance.GetName(), deployment, "-shc-")
return shc.Status.Phase
}, deployment.GetTimeout(), PollInterval).Should(gomega.Equal(enterpriseApi.PhaseReady))
Expand All @@ -167,8 +167,8 @@ func SingleSiteIndexersReady(ctx context.Context, deployment *Deployment, testen
}
testenvInstance.Log.Info("Waiting for indexer instance's phase to be ready", "instance", instanceName, "Phase", idc.Status.Phase)
DumpGetPods(testenvInstance.GetName())
DumpGetTopPods(testenvInstance.GetName())
DumpGetTopNodes()
// DumpGetTopPods(testenvInstance.GetName())
// DumpGetTopNodes()
return idc.Status.Phase
}, deployment.GetTimeout(), PollInterval).Should(gomega.Equal(enterpriseApi.PhaseReady))

Expand All @@ -192,8 +192,8 @@ func ClusterManagerReady(ctx context.Context, deployment *Deployment, testenvIns
}
testenvInstance.Log.Info("Waiting for cluster-manager phase to be ready", "instance", cm.ObjectMeta.Name, "Phase", cm.Status.Phase)
DumpGetPods(testenvInstance.GetName())
DumpGetTopPods(testenvInstance.GetName())
DumpGetTopNodes()
// DumpGetTopPods(testenvInstance.GetName())
// DumpGetTopNodes()
// Test ClusterManager Phase to see if its ready
return cm.Status.Phase
}, deployment.GetTimeout(), PollInterval).Should(gomega.Equal(enterpriseApi.PhaseReady))
Expand All @@ -219,8 +219,8 @@ func ClusterMasterReady(ctx context.Context, deployment *Deployment, testenvInst
}
testenvInstance.Log.Info("Waiting for cluster-master phase to be ready", "instance", cm.ObjectMeta.Name, "Phase", cm.Status.Phase)
DumpGetPods(testenvInstance.GetName())
DumpGetTopPods(testenvInstance.GetName())
DumpGetTopNodes()
// DumpGetTopPods(testenvInstance.GetName())
// DumpGetTopNodes()
// Test ClusterMaster Phase to see if its ready
return cm.Status.Phase
}, deployment.GetTimeout(), PollInterval).Should(gomega.Equal(enterpriseApi.PhaseReady))
Expand Down Expand Up @@ -249,8 +249,8 @@ func IndexersReady(ctx context.Context, deployment *Deployment, testenvInstance
}
testenvInstance.Log.Info("Waiting for indexer site instance phase to be ready", "instance", instanceName, "Phase", idc.Status.Phase)
DumpGetPods(testenvInstance.GetName())
DumpGetTopPods(testenvInstance.GetName())
DumpGetTopNodes()
// DumpGetTopPods(testenvInstance.GetName())
// DumpGetTopNodes()
return idc.Status.Phase
}, deployment.GetTimeout(), PollInterval).Should(gomega.Equal(enterpriseApi.PhaseReady))

Expand Down Expand Up @@ -340,8 +340,8 @@ func LicenseManagerReady(ctx context.Context, deployment *Deployment, testenvIns
testenvInstance.Log.Info("Waiting for License Manager instance status to be ready",
"instance", LicenseManager.ObjectMeta.Name, "Phase", LicenseManager.Status.Phase)
DumpGetPods(testenvInstance.GetName())
DumpGetTopPods(testenvInstance.GetName())
DumpGetTopNodes()
// DumpGetTopPods(testenvInstance.GetName())
// DumpGetTopNodes()

return LicenseManager.Status.Phase
}, deployment.GetTimeout(), PollInterval).Should(gomega.Equal(enterpriseApi.PhaseReady))
Expand All @@ -366,8 +366,8 @@ func LicenseMasterReady(ctx context.Context, deployment *Deployment, testenvInst
testenvInstance.Log.Info("Waiting for License Master instance status to be ready",
"instance", LicenseMaster.ObjectMeta.Name, "Phase", LicenseMaster.Status.Phase)
DumpGetPods(testenvInstance.GetName())
DumpGetTopPods(testenvInstance.GetName())
DumpGetTopNodes()
// DumpGetTopPods(testenvInstance.GetName())
// DumpGetTopNodes()

return LicenseMaster.Status.Phase
}, deployment.GetTimeout(), PollInterval).Should(gomega.Equal(enterpriseApi.PhaseReady))
Expand Down Expand Up @@ -482,8 +482,8 @@ func VerifySearchHeadClusterPhase(ctx context.Context, deployment *Deployment, t
}
testenvInstance.Log.Info("Waiting for Search Head Cluster Phase", "instance", shc.ObjectMeta.Name, "Expected", phase, "Phase", shc.Status.Phase)
DumpGetPods(testenvInstance.GetName())
DumpGetTopPods(testenvInstance.GetName())
DumpGetTopNodes()
// DumpGetTopPods(testenvInstance.GetName())
// DumpGetTopNodes()
return shc.Status.Phase
}, deployment.GetTimeout(), PollInterval).Should(gomega.Equal(enterpriseApi.PhaseScalingUp))
}
Expand All @@ -498,8 +498,8 @@ func VerifyIndexerClusterPhase(ctx context.Context, deployment *Deployment, test
}
testenvInstance.Log.Info("Waiting for Indexer Cluster Phase", "instance", idxc.ObjectMeta.Name, "Expected", phase, "Phase", idxc.Status.Phase)
DumpGetPods(testenvInstance.GetName())
DumpGetTopPods(testenvInstance.GetName())
DumpGetTopNodes()
// DumpGetTopPods(testenvInstance.GetName())
// DumpGetTopNodes()
return idxc.Status.Phase
}, deployment.GetTimeout(), PollInterval).Should(gomega.Equal(phase))
}
Expand All @@ -514,8 +514,8 @@ func VerifyStandalonePhase(ctx context.Context, deployment *Deployment, testenvI
}
testenvInstance.Log.Info("Waiting for Standalone status", "instance", standalone.ObjectMeta.Name, "Expected", phase, " Actual Phase", standalone.Status.Phase)
DumpGetPods(testenvInstance.GetName())
DumpGetTopPods(testenvInstance.GetName())
DumpGetTopNodes()
// DumpGetTopPods(testenvInstance.GetName())
// DumpGetTopNodes()
return standalone.Status.Phase
}, deployment.GetTimeout(), PollInterval).Should(gomega.Equal(phase))
}
Expand All @@ -530,8 +530,8 @@ func VerifyMonitoringConsolePhase(ctx context.Context, deployment *Deployment, t
}
testenvInstance.Log.Info("Waiting for Monitoring Console CR status", "instance", mc.ObjectMeta.Name, "Expected", phase, " Actual Phase", mc.Status.Phase)
DumpGetPods(testenvInstance.GetName())
DumpGetTopPods(testenvInstance.GetName())
DumpGetTopNodes()
// DumpGetTopPods(testenvInstance.GetName())
// DumpGetTopNodes()
return mc.Status.Phase
}, deployment.GetTimeout(), PollInterval).Should(gomega.Equal(phase))
}
Expand Down Expand Up @@ -626,8 +626,8 @@ func VerifyCustomResourceVersionChanged(ctx context.Context, deployment *Deploym
}
testenvInstance.Log.Info("Waiting for ", kind, " CR status", "instance", name, "Not Expected", resourceVersion, " Actual Resource Version", newResourceVersion)
DumpGetPods(testenvInstance.GetName())
DumpGetTopPods(testenvInstance.GetName())
DumpGetTopNodes()
// DumpGetTopPods(testenvInstance.GetName())
// DumpGetTopNodes()
return newResourceVersion
}, deployment.GetTimeout(), PollInterval).ShouldNot(gomega.Equal(resourceVersion))
}
Expand Down Expand Up @@ -669,8 +669,8 @@ func VerifyClusterManagerPhase(ctx context.Context, deployment *Deployment, test
}
testenvInstance.Log.Info("Waiting for cluster-manager Phase", "instance", cm.ObjectMeta.Name, "Phase", cm.Status.Phase, "Expected", phase)
DumpGetPods(testenvInstance.GetName())
DumpGetTopPods(testenvInstance.GetName())
DumpGetTopNodes()
// DumpGetTopPods(testenvInstance.GetName())
// DumpGetTopNodes()
// Test ClusterManager Phase to see if its ready
return cm.Status.Phase
}, deployment.GetTimeout(), PollInterval).Should(gomega.Equal(phase))
Expand All @@ -686,8 +686,8 @@ func VerifyClusterMasterPhase(ctx context.Context, deployment *Deployment, teste
}
testenvInstance.Log.Info("Waiting for cluster-manager Phase", "instance", cm.ObjectMeta.Name, "Phase", cm.Status.Phase, "Expected", phase)
DumpGetPods(testenvInstance.GetName())
DumpGetTopPods(testenvInstance.GetName())
DumpGetTopNodes()
// DumpGetTopPods(testenvInstance.GetName())
// DumpGetTopNodes()
// Test ClusterManager Phase to see if its ready
return cm.Status.Phase
}, deployment.GetTimeout(), PollInterval).Should(gomega.Equal(phase))
Expand Down Expand Up @@ -1051,8 +1051,8 @@ func VerifyClusterManagerBundlePush(ctx context.Context, deployment *Deployment,
return false
}
clusterPodNames := DumpGetPods(testenvInstance.GetName())
DumpGetTopPods(testenvInstance.GetName())
DumpGetTopNodes()
// DumpGetTopPods(testenvInstance.GetName())
// DumpGetTopNodes()
for _, podName := range clusterPodNames {
if strings.Contains(podName, "-indexer-") {
if _, present := clusterManagerBundleStatus[podName]; present {
Expand All @@ -1077,16 +1077,16 @@ func VerifyDeployerBundlePush(ctx context.Context, deployment *Deployment, teste
if len(deployerAppPushStatus) == 0 {
testenvInstance.Log.Info("Bundle push not complete on all pods")
DumpGetPods(testenvInstance.GetName())
DumpGetTopPods(testenvInstance.GetName())
DumpGetTopNodes()
// DumpGetTopPods(testenvInstance.GetName())
// DumpGetTopNodes()
return false
}
for appName, val := range deployerAppPushStatus {
if val < replicas {
testenvInstance.Log.Info("Bundle push not complete on all pods for", "AppName", appName)
DumpGetPods(testenvInstance.GetName())
DumpGetTopPods(testenvInstance.GetName())
DumpGetTopNodes()
// DumpGetTopPods(testenvInstance.GetName())
// DumpGetTopNodes()
return false
}
}
Expand Down

0 comments on commit 7be1896

Please sign in to comment.