Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions test/extended/operators/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ import (
e2e "k8s.io/kubernetes/test/e2e/framework"
)

const (
// From https://github.com/eparis/ssh-bastion/blob/master/deploy/namespace.yaml
sshBastionNamespace = "openshift-ssh-bastion"
)

var _ = Describe("[Feature:Platform][Smoke] Managed cluster", func() {
oc := exutil.NewCLIWithoutNamespace("operators")

Expand Down Expand Up @@ -81,12 +86,19 @@ var _ = Describe("[Feature:Platform][Smoke] Managed cluster", func() {
// a pod in a namespace that begins with kube-* or openshift-* must come from our release payload
// TODO components in openshift-operators may not come from our payload, may want to weaken restriction
namespacePrefixes := sets.NewString("kube-", "openshift-")
ignoredNamespaces := sets.NewString()
if bastion := os.Getenv("KUBE_SSH_BASTION"); bastion != "" {
ignoredNamespaces.Insert(sshBastionNamespace)
}
for i := range pods.Items {
pod := pods.Items[i]
for _, prefix := range namespacePrefixes.List() {
if !strings.HasPrefix(pod.Namespace, prefix) {
continue
}
if ignoredNamespaces.Has(pod.Namespace) {
continue
}
containersToInspect := []v1.Container{}
for j := range pod.Spec.InitContainers {
containersToInspect = append(containersToInspect, pod.Spec.InitContainers[j])
Expand Down
2 changes: 1 addition & 1 deletion test/extended/operators/qos.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ var _ = Describe("[Feature:Platform][Smoke] Managed cluster should", func() {
// a pod in a namespace that begins with kube-* or openshift-* must come from our release payload
// TODO components in openshift-operators may not come from our payload, may want to weaken restriction
namespacePrefixes := sets.NewString("kube-", "openshift-")
excludeNamespaces := sets.NewString("openshift-marketplace", "openshift-operator-lifecycle-manager")
excludeNamespaces := sets.NewString("openshift-marketplace", "openshift-operator-lifecycle-manager", sshBastionNamespace)
excludePodPrefix := sets.NewString("revision-pruner-", "installer-")
for _, pod := range pods.Items {
// exclude non-control plane namespaces
Expand Down