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

Generalize default webhook message #50696

Merged
merged 3 commits into from
May 2, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion operator/cmd/mesh/install.go
Expand Up @@ -208,7 +208,7 @@ func Install(kubeClient kube.CLIClient, rootArgs *RootArgs, iArgs *InstallArgs,
if processed, err := helmreconciler.ProcessDefaultWebhook(kubeClient, iop, exists, opts); err != nil {
return fmt.Errorf("failed to process default webhook: %v", err)
} else if processed {
p.Println("Made this installation the default for injection and validation.")
p.Println("Made this installation the default for cluster-wide operations.")
}

if iArgs.Verify {
Expand All @@ -230,6 +230,10 @@ func Install(kubeClient kube.CLIClient, rootArgs *RootArgs, iArgs *InstallArgs,
}
}

// Post-install message
if profile == "ambient" {
p.Println("The ambient profile has been installed successfully, enjoy Istio without sidecars!")
}
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/operator/install_test.go
Expand Up @@ -82,7 +82,7 @@ func TestReInstallAfterFailure(t *testing.T) {
// Here we should have two activated webhooks, but dry-run should not report any error, which
// means the re-installation can be done successfully.
output, outErr := istioCtl.InvokeOrFail(t, []string{"install", "--dry-run"})
if !strings.Contains(output, "Made this installation the default for injection and validation.") {
if !strings.Contains(output, "Made this installation the default for cluster-wide operations.") {
t.Errorf("install expects to succeed but didn't")
}
assert.Equal(t, "", outErr)
Expand Down