Skip to content
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

Fix certificate bootstrap for non-kops-controller-bootstrap cloud providers #12019

Merged
merged 2 commits into from
Jul 19, 2021

Conversation

johngmyers
Copy link
Member

No description provided.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 18, 2021
@johngmyers
Copy link
Member Author

/test pull-kops-e2e-kubernetes-do-kubetest2

@k8s-ci-robot k8s-ci-robot added area/provider/aws Issues or PRs related to aws provider area/provider/azure Issues or PRs related to azure provider area/provider/openstack Issues or PRs related to openstack provider size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 18, 2021
@johngmyers
Copy link
Member Author

/test pull-kops-e2e-kubernetes-do-kubetest2

@johngmyers
Copy link
Member Author

/test pull-kops-e2e-kubernetes-do-kubetest2

@johngmyers
Copy link
Member Author

/test pull-kops-e2e-kubernetes-do-kubetest2

@johngmyers
Copy link
Member Author

/area provider/digitalocean

@k8s-ci-robot k8s-ci-robot added the area/provider/digitalocean Issues or PRs related to digitalocean provider label Jul 18, 2021
Copy link
Member

@olemarkus olemarkus left a comment

Choose a reason for hiding this comment

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

This code is getting a bit convoluted ... and the cyclomatic complexity makes it a bit hard to reason about.
In particular, I think we need to have a think about apply_cluster.go soon.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 19, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: olemarkus

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 Jul 19, 2021
@johngmyers
Copy link
Member Author

/retest

@johngmyers
Copy link
Member Author

@olemarkus

There are the various model builders which have to decide whether or not to create tasks.

There is BootstrapScriptBuilder.ResourceNodeUp() which has to decide which of those tasks to record as dependencies of the BootstrapScript task for the instance group.

Then there is apply_cluster.go's nodeUpConfigBuilder.BuildConfig() which has to put the data from those dependencies into the nodeup.Config and nodeup.BootConfig structs.

Finally, there are the nodeup tasks which consume the data from the NodeupConfig and BootConfig.

I've tried to push NodeupConfig data that doesn't come from dependent tasks down into nodeup.NewConfig(). I've also tried to have nodeUpConfigBuilder.BuildConfig() defer to BootstrapScriptBuilder.ResourceNodeUp() as to whether or not data should be included for a given instance group by testing whether or not the source task is listed as a dependency.

But yes, I think you've correctly identified nodeUpConfigBuilder.BuildConfig() as something we should try to figure out how to move logic out of.

@k8s-ci-robot k8s-ci-robot merged commit 34ce86a into kubernetes:master Jul 19, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.22 milestone Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/provider/aws Issues or PRs related to aws provider area/provider/azure Issues or PRs related to azure provider area/provider/digitalocean Issues or PRs related to digitalocean provider area/provider/openstack Issues or PRs related to openstack provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants