Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no-jira: e2e: check for deployer RB only when DeploymentConfig is enabled #28941

Merged
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
4 changes: 3 additions & 1 deletion test/extended/util/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,11 +355,13 @@ func (c *CLI) setupProject() string {
"default",
"builder",
}
defaultRoleBindings := []string{"system:image-pullers", "system:image-builders"}
dcEnabled, err := IsCapabilityEnabled(c, configv1.ClusterVersionCapabilityDeploymentConfig)
o.Expect(err).NotTo(o.HaveOccurred())
if dcEnabled {
framework.Logf("%v capability is enabled, adding 'deployer' SA to the list of default SAs", configv1.ClusterVersionCapabilityDeploymentConfig)
DefaultServiceAccounts = append(DefaultServiceAccounts, "deployer")
defaultRoleBindings = append(defaultRoleBindings, "system:deployers")
}
for _, sa := range DefaultServiceAccounts {
framework.Logf("Waiting for ServiceAccount %q to be provisioned...", sa)
Expand All @@ -371,7 +373,7 @@ func (c *CLI) setupProject() string {
cancel := func() {}
defer func() { cancel() }()
// Wait for default role bindings for those SAs
for _, name := range []string{"system:image-pullers", "system:image-builders", "system:deployers"} {
for _, name := range defaultRoleBindings {
framework.Logf("Waiting for RoleBinding %q to be provisioned...", name)

ctx, cancel = watchtools.ContextWithOptionalTimeout(context.Background(), 3*time.Minute)
Expand Down