pkg/upgrade: remove watson-studio dashboard application (#959) #241
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For the coming requirement to remove resources not just by their names but a field inside of spec, abstract the existing deleteDeprecatedResources/deleteDeprecatedServiceMonitors to take a resource to delete description as
TODO: This patch just adds new functionality without changing the existing calls of deleteDeprecatedResources and
deleteDeprecatedServiceMonitors yet.
The function fetches UnstructuredList by gvk/namespace and uses public unstructured.NestedString() to access the field by path. It should work for ServiceMonitor, where ServiceMonitorList contains list of the pointers, as well.
Ignore NoKindMatchError. CRD may not exist on fresh installation for example.
Make a wrapper which takes an array of them for convenience and avoid one indentation level and simplifies multierror wrapping a bit.
It requires to have a library of GroupVersionKinds which is a future work to make common for the whole project.
Signed-off-by: Yauheni Kaliuta [email protected]
schema.GroupVersionKind objects are used around the code, introduce a common global place for it.
Add Odh GVKs to be used in the next patch.
Signed-off-by: Yauheni Kaliuta [email protected]
Jira: https://issues.redhat.com/browse/RHOAIENG-4764
Remove deprecated dashboard resources.
Reuse existing infra just make the array of resources in a separate function to avoid growing of CleanupExistingResource().
Signed-off-by: Yauheni Kaliuta [email protected]
Signed-off-by: Yauheni Kaliuta [email protected]
(cherry picked from commit 23280e7)