List components from other sources (#4742)

* List components from other sources

* Rename OdoManagedBy and OdoVersion to ManagedBy and ManagerVersion

* Add tests

* Add deployment and deploymentconfig manifests

* Move tests

* Test case

* Add cleaner tests

* Add comments

* Cleanup and fix tests

* Add comment

* Fix CI failures

* Change error check

* Add unit tests for ConvertLabelToSelector

* Fix unit test CI failure
This commit is contained in:
Parthvi Vala
2021-06-15 07:24:13 +05:30
committed by GitHub
parent c5728e02e7
commit 7232538f87
35 changed files with 454 additions and 94 deletions

View File

@@ -8,7 +8,15 @@ import (
// GetSelector returns a selector to filter resource under the current project created by odo
func GetSelector() string {
labels := map[string]string{
applabels.OdoManagedBy: "odo",
applabels.ManagedBy: "odo",
}
return util.ConvertLabelsToSelector(labels)
}
func GetNonOdoSelector() string {
labels := map[string]string{
applabels.ManagedBy: "!odo",
}
return util.ConvertLabelsToSelector(labels)