Skip to content

Commit 06aa473

Browse files
Merge pull request #987 from vikram-raj/odc-7790
ODC-7790: Remove ODO download link
2 parents a7e77dd + 8207afb commit 06aa473

File tree

6 files changed

+2
-32
lines changed

6 files changed

+2
-32
lines changed

pkg/api/api.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ const (
1919
OAuthConfigMapName = "oauth-openshift"
2020
OAuthServingCertConfigMapName = "oauth-serving-cert"
2121
OCCLIDownloadsCustomResourceName = "oc-cli-downloads"
22-
ODOCLIDownloadsCustomResourceName = "odo-cli-downloads"
2322
OLMConfigGroup = "operators.coreos.com"
2423
OLMConfigResource = "olmconfigs"
2524
OLMConfigVersion = "v1"

pkg/console/controllers/clidownloads/controller.go

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -155,20 +155,13 @@ func (c *CLIDownloadsSyncController) Sync(ctx context.Context, controllerContext
155155
return statusHandler.FlushAndReturn(ocCLIDownloadsErr)
156156
}
157157

158-
_, odoCLIDownloadsErrReason, odoCLIDownloadsErr := ApplyCLIDownloads(ctx, c.consoleCliDownloadsClient, ODOConsoleCLIDownloads())
159-
statusHandler.AddCondition(status.HandleDegraded("ODODownloadsSync", odoCLIDownloadsErrReason, odoCLIDownloadsErr))
160-
if odoCLIDownloadsErr != nil {
161-
return statusHandler.FlushAndReturn(odoCLIDownloadsErr)
162-
}
163-
164158
return statusHandler.FlushAndReturn(nil)
165159
}
166160

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

@@ -220,27 +213,6 @@ The oc binary offers the same capabilities as the kubectl binary, but it is furt
220213
}
221214
}
222215

223-
func ODOConsoleCLIDownloads() *v1.ConsoleCLIDownload {
224-
return &v1.ConsoleCLIDownload{
225-
ObjectMeta: metav1.ObjectMeta{
226-
Name: api.ODOCLIDownloadsCustomResourceName,
227-
},
228-
Spec: v1.ConsoleCLIDownloadSpec{
229-
Description: `odo is a fast, iterative, and straightforward CLI tool for developers who write, build, and deploy applications on OpenShift.
230-
231-
odo abstracts away complex Kubernetes and OpenShift concepts, thus allowing developers to focus on what is most important to them: code.
232-
`,
233-
DisplayName: "odo - Developer-focused CLI for OpenShift (Community Support)",
234-
Links: []v1.CLIDownloadLink{
235-
{
236-
Href: "https://developers.redhat.com/content-gateway/rest/mirror/pub/openshift-v4/clients/odo/latest",
237-
Text: "Download odo",
238-
},
239-
},
240-
},
241-
}
242-
}
243-
244216
// TODO: All the custom `Apply*` functions should be at some point be placed into:
245217
// openshift/library-go/pkg/console/resource/resourceapply/core.go
246218
func ApplyCLIDownloads(ctx context.Context, consoleClient consoleclientv1.ConsoleCLIDownloadInterface, requiredCLIDownloads *v1.ConsoleCLIDownload) (*v1.ConsoleCLIDownload, string, error) {

pkg/console/starter/starter.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,10 +493,12 @@ func RunOperator(ctx context.Context, controllerContext *controllercmd.Controlle
493493
// we are need to backport the removal of these conditions all the way down to 4.10
494494
// since we only remove them in https://github.com/openshift/console-operator/pull/662
495495
// and its causing upgrade issues to the customers
496+
// in 4.20 we removed ODOConsoleCLIDownloads and can remove ODODownloadsSyncDegraded in 4.21
496497
"CustomRouteSyncDegraded",
497498
"CustomRouteSyncProgressing",
498499
"DefaultRouteSyncDegraded",
499500
"DefaultRouteSyncProgressing",
501+
"ODODownloadsSyncDegraded",
500502
},
501503
operatorClient,
502504
controllerContext.EventRecorder,

test/e2e/framework/framework.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ func getTestingResources() []TestingResource {
4747
return []TestingResource{
4848
{"ConfigMap", consoleapi.OpenShiftConsoleConfigMapName, consoleapi.OpenShiftConsoleNamespace},
4949
{"ConsoleCLIDownloads", consoleapi.OCCLIDownloadsCustomResourceName, ""},
50-
{"ConsoleCLIDownloads", consoleapi.ODOCLIDownloadsCustomResourceName, ""},
5150
{"Deployment", consoleapi.OpenShiftConsoleDeploymentName, consoleapi.OpenShiftConsoleNamespace},
5251
{"Deployment", consoleapi.OpenShiftConsoleDownloadsDeploymentName, consoleapi.OpenShiftConsoleNamespace},
5352
{"Route", consoleapi.OpenShiftConsoleRouteName, consoleapi.OpenShiftConsoleNamespace},

test/e2e/managed_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ func TestEditManagedConsoleCLIDownloads(t *testing.T) {
7070
t.Fatalf("error: %s", err)
7171
}
7272

73-
err = patchAndCheckConsoleCLIDownloads(t, client, true, api.ODOCLIDownloadsCustomResourceName)
7473
if err != nil {
7574
t.Fatalf("error: %s", err)
7675
}

test/e2e/unmanaged_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ func TestEditUnmanagedConsoleCLIDownloads(t *testing.T) {
7575
t.Fatalf("error: %s", err)
7676
}
7777

78-
err = patchAndCheckConsoleCLIDownloads(t, client, false, api.ODOCLIDownloadsCustomResourceName)
7978
if err != nil {
8079
t.Fatalf("error: %s", err)
8180
}

0 commit comments

Comments
 (0)