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

release-1.28: provisioner: Use separate flag for each disabled feature #6414

Merged
Merged
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
4 changes: 3 additions & 1 deletion internal/provisioner/objects/deployment/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ func DesiredDeployment(contour *model.Contour, image string) *appsv1.Deployment
}

if contour.Spec.DisabledFeatures != nil && len(contour.Spec.DisabledFeatures) > 0 {
args = append(args, fmt.Sprintf("--disable-feature=%s", strings.Join(model.FeaturesToStrings(contour.Spec.DisabledFeatures), ",")))
for _, f := range contour.Spec.DisabledFeatures {
args = append(args, fmt.Sprintf("--disable-feature=%s", string(f)))
}
}

// Pass the insecure/secure flags to Contour if using non-default ports.
Expand Down
6 changes: 4 additions & 2 deletions internal/provisioner/objects/deployment/deployment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,10 @@ func TestDesiredDeploymentWhenSettingDisabledFeature(t *testing.T) {
// Change the Contour watch namespaces flag
deploy := DesiredDeployment(cntr, "ghcr.io/projectcontour/contour:test")
container := checkDeploymentHasContainer(t, deploy, contourContainerName, true)
arg := fmt.Sprintf("--disable-feature=%s", strings.Join(model.FeaturesToStrings(tc.disabledFeatures), ","))
checkContainerHasArg(t, container, arg)
for _, f := range tc.disabledFeatures {
arg := fmt.Sprintf("--disable-feature=%s", string(f))
checkContainerHasArg(t, container, arg)
}
})
}
}
Loading