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

[clusterctl] add phases for apply-machines and apply-cluster #581

Merged
merged 2 commits into from
Nov 16, 2018

Conversation

detiber
Copy link
Member

@detiber detiber commented Nov 9, 2018

What this PR does / why we need it:

  • Add clusterctl alpha phase apply-cluster
  • Add clusterctl alpha phase apply-machines

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Related to #554

Release note:

clusterctl now has an alpha phases apply-cluster subcommand
clusterctl now has an alpha phases apply-machines subcommand

@k8s-ci-robot k8s-ci-robot added 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. labels Nov 9, 2018
@detiber detiber mentioned this pull request Nov 9, 2018
11 tasks
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 9, 2018
Copy link
Contributor

@roberthbailey roberthbailey left a comment

Choose a reason for hiding this comment

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

I left a couple of nits and one actual question.

pkg/util/util.go Outdated Show resolved Hide resolved
pkg/util/util.go Outdated Show resolved Hide resolved
if err != nil {
return fmt.Errorf("unable to ensure namespace %q in bootstrap cluster: %v", cluster.Namespace, err)
}

glog.Info("Applying Cluster API stack to bootstrap cluster")
if err := phases.ApplyClusterAPIComponents(bootstrapClient, d.providerComponents); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

ApplyClusterAPIComponents doesn't include the client.EnsureNamespace(namespace) call which used to proceed it. Will it now fail if the namespace doesn't exist? Does it also need to include that call in it's phase?

Copy link
Member Author

Choose a reason for hiding this comment

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

This gets a bit tricky, since post-CRD migration we are not deploying the cluster-api (or provider) components in the default namespace and the namespace creation is added as part of the manager config (at least for the common cluster-api components, aws provider, and gcp provider).

I'm good with re-adding it if there is a provider that depends on this behavior or if there is another use case that I am missing where it is relied upon, but afaict the default/cluster namespace validation is only needed for the cluster, machine creation, and possibly the provider-components config map steps at this point.

Copy link
Contributor

Choose a reason for hiding this comment

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

sgtm to remove it for now, and we can re-add if we need to.

@detiber detiber force-pushed the phases4 branch 2 times, most recently from 5231079 to 42a4020 Compare November 15, 2018 09:34
@roberthbailey
Copy link
Contributor

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: detiber, roberthbailey

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 Nov 16, 2018
@k8s-ci-robot k8s-ci-robot merged commit 0734939 into kubernetes-sigs:master Nov 16, 2018
@detiber detiber deleted the phases4 branch April 2, 2019 17:44
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. 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.

3 participants