Skip to content

Update relatedObjects #353

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

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
6 changes: 6 additions & 0 deletions pkg/controller/status/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,12 @@ func (c *Controller) merge(existing *configv1.ClusterOperator) *configv1.Cluster
existing.Status.RelatedObjects = []configv1.ObjectReference{
{Resource: "namespaces", Name: c.namespace},
{Group: "apps", Resource: "deployments", Namespace: c.namespace, Name: "insights-operator"},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well I think we can keep this one...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can keep it if you like, but deployments that live in referenced namespaces are covered too.

{Resource: "secrets", Namespace: "openshift-config", Name: "pull-secret"},
{Resource: "secrets", Namespace: "openshift-config", Name: "support"},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is kinda optional, but we try to read it so I think it makes sense to include it.

{Resource: "serviceaccounts", Namespace: c.namespace, Name: "gather"},
{Resource: "serviceaccounts", Namespace: c.namespace, Name: "operator"},
{Resource: "services", Namespace: c.namespace, Name: "metrics"},
{Resource: "configmaps", Namespace: c.namespace, Name: "service-ca-bundle"},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}
}
reported := Reported{LastReportTime: metav1.Time{Time: c.LastReportedTime()}}
Expand Down