Skip to content

Commit

Permalink
add debugging statement
Browse files Browse the repository at this point in the history
  • Loading branch information
AlisonB319 committed Dec 4, 2024
1 parent a5be281 commit 665e82c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions e2e/kube.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ func getClusterKubeconfigBytes(ctx context.Context, resourceGroupName, clusterNa

// this is a bit ugly, but we don't want to execute this piece concurrently with other tests
func ensureDebugDaemonsets(ctx context.Context, t *testing.T, kube *Kubeclient, isAirgap bool) error {
ds := daemonsetDebug(hostNetworkDebugAppLabel, "nodepool1", true, isAirgap)
ds := daemonsetDebug(t, hostNetworkDebugAppLabel, "nodepool1", true, isAirgap)
err := createDaemonset(ctx, kube, ds)
if err != nil {
return err
}

nonHostDS := daemonsetDebug(podNetworkDebugAppLabel, "nodepool2", false, isAirgap)
nonHostDS := daemonsetDebug(t, podNetworkDebugAppLabel, "nodepool2", false, isAirgap)
err = createDaemonset(ctx, kube, nonHostDS)
if err != nil {
return err
Expand All @@ -121,11 +121,12 @@ func createDaemonset(ctx context.Context, kube *Kubeclient, ds *appsv1.DaemonSet
return nil
}

func daemonsetDebug(deploymentName, targetNodeLabel string, isHostNetwork, isAirgap bool) *appsv1.DaemonSet {
func daemonsetDebug(t *testing.T, deploymentName, targetNodeLabel string, isHostNetwork, isAirgap bool) *appsv1.DaemonSet {
image := "mcr.microsoft.com/cbl-mariner/base/core:2.0"
if isAirgap {
image = fmt.Sprintf("%s.azurecr.io/cbl-mariner/base/core:2.0", config.PrivateACRName)
}
t.Logf("Creating daemonset %s with image %s", deploymentName, image)

return &appsv1.DaemonSet{
TypeMeta: metav1.TypeMeta{
Expand Down

0 comments on commit 665e82c

Please sign in to comment.