-
Notifications
You must be signed in to change notification settings - Fork 1.2k
return an additional bool in EnsureCerts #79
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
cc @anfernee |
@@ -45,7 +45,7 @@ const ( | |||
// CertWriter provides method to handle webhooks. | |||
type CertWriter interface { | |||
// EnsureCert ensures that the webhooks have proper certificates. | |||
EnsureCerts(runtime.Object) error | |||
EnsureCerts(runtime.Object) (bool, error) |
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.
Maybe add some comments here for the return values
} | ||
|
||
func createIfNotExists(webhookName string, ch certReadWriter) (*generator.Artifacts, error) { | ||
func createIfNotExists(webhookName string, ch certReadWriter) (*generator.Artifacts, bool, error) { |
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.
What does this bool
indicate? Seems to be inconsistent with changed
.
if err != nil { | ||
return certs, err | ||
} | ||
return certs, true, err |
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.
Should this be return certs, false, err
?
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.
Looks good once @Liujingfang1 comments addressed.
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mengqiy If they are not already assigned, you can assign the PR to them by writing The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
build: wrap binaries in bin/ directories
No description provided.