Skip to content

ODC-7790: Remove ODO download link #987

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

Merged
merged 1 commit into from
May 28, 2025
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
1 change: 0 additions & 1 deletion pkg/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const (
OAuthConfigMapName = "oauth-openshift"
OAuthServingCertConfigMapName = "oauth-serving-cert"
OCCLIDownloadsCustomResourceName = "oc-cli-downloads"
ODOCLIDownloadsCustomResourceName = "odo-cli-downloads"
OLMConfigGroup = "operators.coreos.com"
OLMConfigResource = "olmconfigs"
OLMConfigVersion = "v1"
Expand Down
28 changes: 0 additions & 28 deletions pkg/console/controllers/clidownloads/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,20 +155,13 @@ func (c *CLIDownloadsSyncController) Sync(ctx context.Context, controllerContext
return statusHandler.FlushAndReturn(ocCLIDownloadsErr)
}

_, odoCLIDownloadsErrReason, odoCLIDownloadsErr := ApplyCLIDownloads(ctx, c.consoleCliDownloadsClient, ODOConsoleCLIDownloads())
statusHandler.AddCondition(status.HandleDegraded("ODODownloadsSync", odoCLIDownloadsErrReason, odoCLIDownloadsErr))
if odoCLIDownloadsErr != nil {
return statusHandler.FlushAndReturn(odoCLIDownloadsErr)
}

return statusHandler.FlushAndReturn(nil)
}

func (c *CLIDownloadsSyncController) removeCLIDownloads(ctx context.Context) error {
defer klog.V(4).Info("finished deleting ConsoleCliDownloads custom resources")
var errs []error
errs = append(errs, c.consoleCliDownloadsClient.Delete(ctx, api.OCCLIDownloadsCustomResourceName, metav1.DeleteOptions{}))
errs = append(errs, c.consoleCliDownloadsClient.Delete(ctx, api.ODOCLIDownloadsCustomResourceName, metav1.DeleteOptions{}))
return utilerrors.FilterOut(utilerrors.NewAggregate(errs), errors.IsNotFound)
}

Expand Down Expand Up @@ -220,27 +213,6 @@ The oc binary offers the same capabilities as the kubectl binary, but it is furt
}
}

func ODOConsoleCLIDownloads() *v1.ConsoleCLIDownload {
return &v1.ConsoleCLIDownload{
ObjectMeta: metav1.ObjectMeta{
Name: api.ODOCLIDownloadsCustomResourceName,
},
Spec: v1.ConsoleCLIDownloadSpec{
Description: `odo is a fast, iterative, and straightforward CLI tool for developers who write, build, and deploy applications on OpenShift.

odo abstracts away complex Kubernetes and OpenShift concepts, thus allowing developers to focus on what is most important to them: code.
`,
DisplayName: "odo - Developer-focused CLI for OpenShift (Community Support)",
Links: []v1.CLIDownloadLink{
{
Href: "https://developers.redhat.com/content-gateway/rest/mirror/pub/openshift-v4/clients/odo/latest",
Text: "Download odo",
},
},
},
}
}

// TODO: All the custom `Apply*` functions should be at some point be placed into:
// openshift/library-go/pkg/console/resource/resourceapply/core.go
func ApplyCLIDownloads(ctx context.Context, consoleClient consoleclientv1.ConsoleCLIDownloadInterface, requiredCLIDownloads *v1.ConsoleCLIDownload) (*v1.ConsoleCLIDownload, string, error) {
Expand Down
2 changes: 2 additions & 0 deletions pkg/console/starter/starter.go
Original file line number Diff line number Diff line change
Expand Up @@ -493,10 +493,12 @@ func RunOperator(ctx context.Context, controllerContext *controllercmd.Controlle
// we are need to backport the removal of these conditions all the way down to 4.10
// since we only remove them in https://github.com/openshift/console-operator/pull/662
// and its causing upgrade issues to the customers
// in 4.20 we removed ODOConsoleCLIDownloads and can remove ODODownloadsSyncDegraded in 4.21
"CustomRouteSyncDegraded",
"CustomRouteSyncProgressing",
"DefaultRouteSyncDegraded",
"DefaultRouteSyncProgressing",
"ODODownloadsSyncDegraded",
},
operatorClient,
controllerContext.EventRecorder,
Expand Down
1 change: 0 additions & 1 deletion test/e2e/framework/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ func getTestingResources() []TestingResource {
return []TestingResource{
{"ConfigMap", consoleapi.OpenShiftConsoleConfigMapName, consoleapi.OpenShiftConsoleNamespace},
{"ConsoleCLIDownloads", consoleapi.OCCLIDownloadsCustomResourceName, ""},
{"ConsoleCLIDownloads", consoleapi.ODOCLIDownloadsCustomResourceName, ""},
{"Deployment", consoleapi.OpenShiftConsoleDeploymentName, consoleapi.OpenShiftConsoleNamespace},
{"Deployment", consoleapi.OpenShiftConsoleDownloadsDeploymentName, consoleapi.OpenShiftConsoleNamespace},
{"Route", consoleapi.OpenShiftConsoleRouteName, consoleapi.OpenShiftConsoleNamespace},
Expand Down
1 change: 0 additions & 1 deletion test/e2e/managed_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ func TestEditManagedConsoleCLIDownloads(t *testing.T) {
t.Fatalf("error: %s", err)
}

err = patchAndCheckConsoleCLIDownloads(t, client, true, api.ODOCLIDownloadsCustomResourceName)
if err != nil {
t.Fatalf("error: %s", err)
}
Expand Down
1 change: 0 additions & 1 deletion test/e2e/unmanaged_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ func TestEditUnmanagedConsoleCLIDownloads(t *testing.T) {
t.Fatalf("error: %s", err)
}

err = patchAndCheckConsoleCLIDownloads(t, client, false, api.ODOCLIDownloadsCustomResourceName)
if err != nil {
t.Fatalf("error: %s", err)
}
Expand Down