Skip to content

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

Closed
wants to merge 1 commit into from

Conversation

mengqiy
Copy link
Member

@mengqiy mengqiy commented Jul 16, 2018

No description provided.

@mengqiy mengqiy requested review from droot and Liujingfang1 July 16, 2018 18:19
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 16, 2018
@mengqiy
Copy link
Member Author

mengqiy commented Jul 16, 2018

cc @anfernee

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 16, 2018
@@ -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)
Copy link
Contributor

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) {
Copy link
Contributor

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
Copy link
Contributor

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?

Copy link
Contributor

@droot droot left a 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.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mengqiy
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approvers:

If they are not already assigned, you can assign the PR to them by writing /assign in a comment when ready.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mengqiy mengqiy closed this Sep 14, 2018
@mengqiy mengqiy deleted the syncCert branch September 14, 2018 20:41
DirectXMan12 pushed a commit that referenced this pull request Jan 31, 2020
build: wrap binaries in bin/ directories
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants