-
Couldn't load subscription status.
- Fork 17
feat: add cert-manager support as an option #145
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
Conversation
d126ec8 to
ba972a2
Compare
Signed-off-by: Kang Zhang <[email protected]>
Signed-off-by: Kang Zhang <[email protected]>
Signed-off-by: Kang Zhang <[email protected]>
Signed-off-by: kangclzjc <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a good idea to add some flexibility around certificate generation, however I'd recommend we simplify this. Rather than have flags to enable certmanager, I'd recommend allowing the operator to provide a secret which contains a the certficate, the associated CA bundle. Basically the approach described her in the Elastic Cloud helm chart here.
Rationale:
it's even more flexible, perhaps someone wants to use a different cert manager that build themselves for... reasons
any operators who want to provide certmanager, they generally know what they're trying to accomplish and how. All they need is a way to point grove in the right direction
99.9% of deployments won't ever provide this and want to involved minimally in its internal operations, so no need to complicate everything for the small edge cases who do
It's a good idea, maybe it doesn't have conflict with current implementation. I just give a internal example here. For externel mode, we can allow the operator to provide a secret which contains a certficate. Because for some cases, customer may want to easily deploy it in develop mode for internal use/developement. In internal mode, we can hide the complexity of certificate generation for developer. |
I see this from two different angles and arrive at the same conclusion. I think we're already agreed on 1, but I think I can communicate 2 better.
|
Well, for short term we will be using the cert-controller but it has several issues which i shared on the slack. I will add those points here as well.
While we see dev activity on this project but these are minor fixes. Tickets that highlight a bigger gap are open for more than 2-3 years. This is not a very good sign for a project that we wish to have dependency on. Others like |
|
In my opinion there is no harm in adding support for Cert manager. The reference that you have given above (https://www.elastic.co/guide/en/cloud-on-k8s/2.12/k8s-webhook.html) provides 3 options as well (including support for cert-manager). For production systems you should ideally have certificate rotation in place for all your webhooks. Not every consumer would like to re-invent the wheel to rotate the certificates without impacting availability (zero-down-time). So while that option can be provided to be complete not everyone would prefer that. |
|
I definitely think cert-manager support is a good idea. But let's just keep it simple. Optional CA/Secet helm values should do the trick. It's shame that cert-controller isn't seeing much investment... Looks like another approach is to use kube-webhook-certgen |
We will be investing into creating something that resolves all issues of cert-controller soon. |
kube-webhook-certgen seems not be updated for 4 years. I guess maybe we can add cert-manager support first, at least give customer a basic way to manage certs. What do you think @gflarity ? |
|
@kangclzjc yes, we should definitely support external certificate management. What did you think about the approach I mentioned? https://www.elastic.co/guide/en/cloud-on-k8s/2.12/k8s-webhook.html. I'm happy to jump on a video chat this week to discuss moving forward. I'll ping you on slack. |
The approach you mentioned is great to me. And just as @unmarshall said, I can add k8s-webhook feature in other PR. It should be separated with this cert-manager PR. |
|
Totally agree with @gflarity's suggestion. We should simply allow for external management of these secrets. How the user achieves that, should not be our concern. The approach suggested in #145 (comment) looks good to me. We should emulate that. |
yeah, that's good. Based on this, I draft a PR, after PR's ready, please help to review this PR. In this PR, we can mount |
Currently we do the certificate generation ourselves. If they already have integrated cert-manager into their cluster, then Grove should give them an option to depend on that, instead
Now if I have cert-manager installed in my cluster, it works. I will add another PR to complete Makefile and related shell script. Currently, I can use
helm install grove-operator . --set enableCertManager=true --set certManager.mode=internalto use cert-manager and manage cert/caBundle.