cli: skip NodeTuning CRDs when cluster capabilities set to None
@@ -148,9 +148,6 @@ var (
{Group: "quota.openshift.io", Version: "v1", Resource: "clusterresourcequotas"},
{Group: "samples.operator.openshift.io", Version: "v1", Resource: "configs"},
-
- {Group: "tuned.openshift.io", Version: "v1", Resource: "profiles"},
- {Group: "tuned.openshift.io", Version: "v1", Resource: "tuneds"},
}
mcoTypes = []schema.GroupVersionResource{
{Group: "machineconfiguration.openshift.io", Version: "v1", Resource: "containerruntimeconfigs"},
@@ -188,6 +185,14 @@ var (
{Group: "metal3.io", Version: "v1alpha1", Resource: "provisionings"},
}
+ nodeTuningTypes = []schema.GroupVersionResource{
+ {Group: "tuned.openshift.io", Version: "v1", Resource: "profiles"},
+ {Group: "tuned.openshift.io", Version: "v1", Resource: "tuneds"},
+ {Group: "performance.openshift.io", Version: "v1alpha1", Resource: "performanceprofiles"},
+ {Group: "performance.openshift.io", Version: "v1", Resource: "performanceprofiles"},
+ {Group: "performance.openshift.io", Version: "v2", Resource: "performanceprofiles"},
+ }
+
specialTypes = map[string][]explainExceptions{
"apps.openshift.io": {
{
@@ -487,6 +492,8 @@ func getCrdTypes(oc *exutil.CLI) []schema.GroupVersionResource {
crdTypes = append(crdTypes, marketplaceTypes...)
case configv1.ClusterVersionCapabilityBaremetal:
crdTypes = append(crdTypes, metal3Types...)
+ case configv1.ClusterVersionCapabilityNodeTuning:
+ crdTypes = append(crdTypes, nodeTuningTypes...)
}
}
}
