-
Notifications
You must be signed in to change notification settings - Fork 140
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
Cert fix #2775
Cert fix #2775
Conversation
6524240
to
461d480
Compare
- Only require key usage for certain secret certs - Compliance: order dependencies so certificates are updated before pods are updated.
@@ -85,6 +87,14 @@ var ( | |||
ComplianceReporterSourceEntityRule = networkpolicy.CreateSourceEntityRule(ComplianceNamespace, ComplianceReporterName) | |||
) | |||
|
|||
// Register secret/certs that need Server and Client Key usage | |||
func init() { | |||
certkeyusage.SetCertKeyUsage(ComplianceServerCertSecret, []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth, x509.ExtKeyUsageServerAuth}) |
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.
When considering the init function, what made you decide to do it in the render file, rather than the controller?
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.
Mainly because that is where the secret name is defined.
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 can justify it as the render is where we define the state/configuration of components, so it makes sense that we define the state/configuration of the secrets. But I'm sure we could come up with rationale that it should be in the controller.
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
[pick #2775] Recreate certificates that are only specified to be used as server certs [r1.31]
[Pick #2775] Recreate certificates that are only specified to be used as server certs [r1.30]
Description
For PR author
make gen-files
make gen-versions
For PR reviewers
A note for code reviewers - all pull requests must have the following:
kind/bug
if this is a bugfix.kind/enhancement
if this is a a new feature.enterprise
if this PR applies to Calico Enterprise only.