-
Notifications
You must be signed in to change notification settings - Fork 708
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
Persist one CA per cluster #467
Conversation
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.
LGTM.
Left some nits.
operators/pkg/controller/elasticsearch/nodecerts/ca_secrets_test.go
Outdated
Show resolved
Hide resolved
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.
We're missing a part where time triggers a reconciliation loop iteration here. If everything is static, the certs will now silently expire and the cluster will enter the unknown
state.
I think we also need two followup-issues:
- Re-use private keys if possible when renewing?
- Key wrapping.
- (this is not new from this PR, but) we still need to deal with overlaps in the ca file. E.g have both old/new certs available for a certain duration (or cross-sign?).
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.
I think the review got borked a little by my use of the back-button. Comments are in the previous review
operators/pkg/controller/elasticsearch/nodecerts/ca_secrets_test.go
Outdated
Show resolved
Hide resolved
operators/pkg/controller/elasticsearch/nodecerts/ca_secrets_test.go
Outdated
Show resolved
Hide resolved
@nkvoll Re: trigger reconciliation loop before expiration. I think the controller-runtime defaults to triggering a reconciliation execution every 10 hours. I was implicitly relying on that to make sure certs do not expire. Edit: handled with |
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.
LGTM
-rotate-before
etc doesn't sound like the best name, but since we couldn't come up with anything better, let's go with it. It should be easy to change if something more fitting pops up.
This PR sets up reconciliation for one CA per cluster, used to issue certificates to the cluster.
What we had before this PR:
What we have with this PR:
make run
, the CA cert will expire in 10 hours. Otherwise, default to 1 year.Related to #399, #459.
Fixes #457.