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

Fix cleanup of ODHApplications #914

Merged
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: 2 additions & 2 deletions pkg/upgrade/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ func CleanupExistingResource(ctx context.Context, cli client.Client, platform de
JupyterhubApp := schema.GroupVersionKind{
Group: "dashboard.opendatahub.io",
Version: "v1",
Kind: "odhapplications",
Kind: "OdhApplication",
}
multiErr = multierror.Append(multiErr, removOdhApplicationsCR(ctx, cli, JupyterhubApp, "jupyterhub", dscApplicationsNamespace))
return multiErr.ErrorOrNil()
Expand Down Expand Up @@ -541,7 +541,7 @@ func deleteDeprecatedServiceMonitors(ctx context.Context, cli client.Client, nam
func removOdhApplicationsCR(ctx context.Context, cli client.Client, gvk schema.GroupVersionKind, instanceName string, applicationNS string) error {
// first check if CRD in cluster
crd := &apiextv1.CustomResourceDefinition{}
if err := cli.Get(ctx, client.ObjectKey{Name: fmt.Sprintf("%s.%s", gvk.Kind, gvk.Group)}, crd); err != nil {
if err := cli.Get(ctx, client.ObjectKey{Name: "odhapplications.dashboard.opendatahub.io"}, crd); err != nil {
return client.IgnoreNotFound(err)
}

Expand Down
Loading