open-cluster-management-io / community

open-cluster-management governance material.
https://open-cluster-management.io
Apache License 2.0
61 stars 23 forks source link

Have a common policy repository to make creating policy controllers easier #150

Closed JustinKuli closed 1 year ago

JustinKuli commented 2 years ago

Although the policy framework is built to be extended, we haven't maintained documentation around how to integrate with it. Someone writing a new policy controller might have a hard time understanding what events the framework is looking for, and what fields need to be in their APIs.

For example, the .spec.remediationAction is required in all policy types (even if it doesn't do anything), so that it can be inherited from the parent policy. Similarly, all policy types should have a .spec.namespaceSelector with a consistent format to increase usability. There are also optional fields like .status.relatedObjects which would help usability, but just be a best practice, not a requirement.

A common repository with these types, and implementations around common uses (like generating compliance events) would assist policy controller authors.

JustinKuli commented 2 years ago

/kind feature /assign JustinKuli

qiujian16 commented 1 year ago

I think this one is already finished /close

openshift-ci[bot] commented 1 year ago

@qiujian16: Closing this issue.

In response to [this](https://github.com/open-cluster-management-io/community/issues/150#issuecomment-1612387727): >I think this one is already finished >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.