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

[release-4.12] OCPBUGS-14273: Add PerformanceProfiles to 'oc adm must-gather' #667

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 10 additions & 1 deletion pkg/operator/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (

tunedv1 "github.com/openshift/cluster-node-tuning-operator/pkg/apis/tuned/v1"
"github.com/openshift/cluster-node-tuning-operator/pkg/clusteroperator"
ntoconfig "github.com/openshift/cluster-node-tuning-operator/pkg/config"
ntomf "github.com/openshift/cluster-node-tuning-operator/pkg/manifests"
"github.com/openshift/cluster-node-tuning-operator/pkg/metrics"
)
Expand Down Expand Up @@ -310,14 +311,22 @@ func getRelatedObjects() []configv1.ObjectReference {
tunedMf := ntomf.TunedCustomResource()
dsMf := ntomf.TunedDaemonSet()

return []configv1.ObjectReference{
ret := []configv1.ObjectReference{
// The `resource` property of `relatedObjects` stanza should be the lowercase, plural value like `daemonsets`.
// See BZ1851214
{Group: "", Resource: "namespaces", Name: tunedMf.Namespace},
{Group: "tuned.openshift.io", Resource: "profiles", Name: "", Namespace: tunedMf.Namespace},
{Group: "tuned.openshift.io", Resource: "tuneds", Name: "", Namespace: tunedMf.Namespace},
{Group: "apps", Resource: "daemonsets", Name: dsMf.Name, Namespace: dsMf.Namespace},
}

if !ntoconfig.InHyperShift() {
ret = append(ret, configv1.ObjectReference{
Group: "performance.openshift.io", Resource: "performanceprofiles", Name: "",
})
}

return ret
}

func conditionTrue(conditions []configv1.ClusterOperatorStatusCondition, condType configv1.ClusterStatusConditionType) bool {
Expand Down