Skip to content

Commit

Permalink
sync
Browse files Browse the repository at this point in the history
  • Loading branch information
rphillips committed Apr 5, 2024
1 parent 720278d commit 3f73cc4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pkg/monitortests/node/kubeletselinuxlabels/monitortest.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"github.com/openshift/origin/pkg/test/ginkgo/junitapi"
corev1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/client-go/kubernetes"
Expand Down Expand Up @@ -80,6 +81,18 @@ func (lw *selinuxLabelWatcher) StartCollection(ctx context.Context, adminRESTCon
}
lw.namespaceName = actualNamespace.Name

// wait for pull secret to show up
oc := exutil.NewCLIWithoutNamespace("operators")
if err := wait.PollUntilContextTimeout(ctx, 10*time.Second, 400*time.Second, true, func(ctx context.Context) (bool, error) {
_, err := oc.KubeFramework().ClientSet.CoreV1().Secrets("openshift-config").Get(context.Background(), "pull-secret", metav1.GetOptions{})
if err != nil {
return false, err
}
return true, nil
}); err != nil {
return err
}

for i, val := range nodes.Items {
podWithNodeName := selinuxPodSpec(fmt.Sprintf("label-%d", i), actualNamespace.Name, val.Name)
_, err := lw.kubeClient.CoreV1().Pods(lw.namespaceName).Create(ctx, podWithNodeName, v1.CreateOptions{})
Expand Down

0 comments on commit 3f73cc4

Please sign in to comment.