Skip to content
This repository was archived by the owner on Jul 30, 2021. It is now read-only.

🐛 Test and logic fixes #211

Merged
merged 1 commit into from
Sep 9, 2019

Conversation

chuckha
Copy link
Contributor

@chuckha chuckha commented Sep 5, 2019

Signed-off-by: Chuck Ha [email protected]

What this PR does / why we need it:
Some more test clean ups and the discovery of a bug where the user could not set UnsafeSkipCAVerification even if they wanted to. In addition, this adds error handling for a missed error check.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 5, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chuckha

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 5, 2019
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 5, 2019
@chuckha
Copy link
Contributor Author

chuckha commented Sep 6, 2019

/assign @fabriziopandini @detiber

return ctrl.Result{}, err
}
if hashes != nil {
if config.Spec.JoinConfiguration.Discovery.BootstrapToken == nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO this piece of code should be moved into reconcileDiscovery , so all the logics impaction JoinConfiguration.Discovery are in the same place.
Nb. the bit of code for creating BootstrapToken if nil is already implemented there as well

Copy link
Contributor Author

@chuckha chuckha Sep 9, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it makes sense to add this check to reconcileDiscovery unless you are also suggesting to add certificates into the reconcileDiscovery method. We look up certificates to see if we have a CACertHash to use. If we do then reconcileDiscovery does something different than if it didn't have a CACertHash. Therefore reconcileDiscovery depends on looking up certificates. Either certificates becomes part of reconcileDiscovery or we will have to live with not all defaults ending up in reconcileDiscovery

If we want to refactor it that's fine but I think that's out of scope for this PR.

Copy link
Contributor

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chuckha thanks!
IMO we should move all the logic for defaulting JoinConfiguration.Discovery in the reconcileDiscovery func. Everything else looks great

Copy link
Contributor

@vincepri vincepri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Signed-off-by: Chuck Ha <[email protected]>
@liztio
Copy link

liztio commented Sep 9, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 9, 2019
@k8s-ci-robot k8s-ci-robot merged commit 08364d5 into kubernetes-retired:master Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm Indicates that a PR is ready to be merged. 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.

6 participants