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

Automatic CRD registration #139

Closed
mikewied opened this issue Mar 28, 2018 · 8 comments
Closed

Automatic CRD registration #139

mikewied opened this issue Mar 28, 2018 · 8 comments
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. needs discussion

Comments

@mikewied
Copy link

CRD registration can be easily performed in the SDK by generating a few extra fields in register.go in the api folder, creating the CRD in the codebase, and then pushing it to Kubernetes when the operator starts up. This is a nice usability feature because people deploying the operator no longer need to worry about pushing the CRD into Kubernetes before starting the operator.

Ideally this would be a separate API so that users who prefer manually pushing the CRD to Kubernetes are still able to get that behavior.

@fanminshi
Copy link
Contributor

seems like a good idea; we have the crd registration inside etcd-operator as well
https://github.com/coreos/etcd-operator/blob/master/pkg/controller/controller.go#L128

@ecordell
Copy link
Member

ecordell commented May 8, 2018

The sdk should probably support creating the CRDs as an option, but OLM will create the CRDs on behalf of an operator, and the sdk at some point should generate manifests for OLM as well.

The advantage of doing that is that operators can run with reduced permissions - since CRD-creation is currently a cluster-level operation.

@devlounge
Copy link

I also believe one should always decouple the crd registration from the operator deployment.
This way, for example, the cluster admins will register the CRDs, but the operator could be deployed by anyone having the permission to deploy in a given namespace. Otherwise we need to grant to many permissions via RBAC.

@kfox1111
Copy link

I wonder if this is a good time to bring up the idea of CRD's that are namespace(/tenant), not cluster specific? CRD's that an end user in a multitenant environment could create/consume.

IE, if the operator is being deployed for all tenants, then it probably should have permissions to look at all tenants anyway.

While a user might want to deploy it themselves but would need CRD's that match and they probably should be able to create those too for themselves.

@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci-robot openshift-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 9, 2019
@openshift-bot
Copy link

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten
/remove-lifecycle stale

@openshift-ci-robot openshift-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jun 8, 2019
@openshift-bot
Copy link

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

@openshift-ci-robot
Copy link

@openshift-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. needs discussion
Projects
None yet
Development

No branches or pull requests

8 participants