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

Refactor cluster and machine actuators #68

Merged
merged 7 commits into from
Jan 29, 2019

Conversation

justaugustus
Copy link
Member

@justaugustus justaugustus commented Jan 23, 2019

What this PR does / why we need it:

This re-approaches some of the changes in #42 in smaller chunks.

  • Add Azure clients to actuator package
  • Implement unified scope in actuator
  • Wire services to use actuator scope clients
  • Wire cluster and machine actuators to use scope clients
  • Update clusterctl, manager, and dependencies
  • Update cluster generation tools, manifests, and instructions

Closes #10, closes #19

This also moves the project to using kind, instead of minikube. Huzzah! (thanks @BenTheElder)

Special notes for your reviewer:

Currently a work-in-progress, but it could use a first-pass review.
/assign @tariq1890

Release note:

Refactor cluster and machine actuators

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jan 23, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justaugustus

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 Jan 23, 2019
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 23, 2019
@justaugustus
Copy link
Member Author

justaugustus commented Jan 23, 2019

The next step I'll be doing here is modifying the existing functions within the actuator package to use the Azure clients instantiated in scope.go, instead of the referencing the old ones in pkg/cloud/azure/services/{compute,network,resources}/.

@justaugustus
Copy link
Member Author

(As a note, there are several types in pkg/apis/azureprovider/v1alpha1/types.go that reference AWS-specific properties. I've marked them as TODOs and will clean that up with a follow-up PR.)

@justaugustus
Copy link
Member Author

/assign @marwanad

Copy link
Member

@marwanad marwanad left a comment

Choose a reason for hiding this comment

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

One minor comment but looks good overall.

pkg/apis/azureprovider/v1alpha1/types.go Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 24, 2019
@k8s-ci-robot k8s-ci-robot added area/provider/azure Issues or PRs related to azure provider and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jan 26, 2019
Signed-off-by: Stephen Augustus <saugustus@vmware.com>
Signed-off-by: Stephen Augustus <saugustus@vmware.com>
Makefile Show resolved Hide resolved
./generate-yaml.sh
```

<<<<<<< HEAD
Copy link
Contributor

Choose a reason for hiding this comment

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

Unresolved merge conflict?

Copy link
Member Author

Choose a reason for hiding this comment

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

Weird this didn't show on my local. Will fix.

pkg/deployer/deployer.go Outdated Show resolved Hide resolved
Copy link
Member

@feiskyer feiskyer left a comment

Choose a reason for hiding this comment

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

lgtm

README.md Outdated

- Linux or MacOS (Windows isn't supported at the moment)
- A set of Azure credentials sufficient to bootstrap the cluster (an Azure service principal with Collaborator rights).
- [KIND](https://sigs.k8s.io/kind)
Copy link
Contributor

Choose a reason for hiding this comment

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

In the interest of consistency, let's move the url below the list and add the url reference here instead.

README.md Outdated

- [Homebrew][brew] (MacOS)
- [jq][jq]
- [Go](https://golang.org/dl/)
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as previous comment

README.md Outdated
-c cmd/clusterctl/examples/azure/out/cluster.yaml \
-p cmd/clusterctl/examples/azure/out/provider-components.yaml \
--vm-driver kvm2 --minikube kubernetes-version=v1.12.2
./bin/clusterctl create cluster -v 3 \
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like the commands are the same for both mac and linux now. (Thanks to Kind!) . Let's just keep one :)

README.md Show resolved Hide resolved
@tariq1890
Copy link
Contributor

Thanks for this @justaugustus . I'm done with my review. This should be good to go after the comments are addressed.

@tariq1890
Copy link
Contributor

After this PR is merged, we need to add tests back. Let's add an issue to track that and treat it as high priority.

@justaugustus
Copy link
Member Author

@tariq1890 -- I've addressed all the comments, this is ready for a /lgtm now!
/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 29, 2019
@justaugustus
Copy link
Member Author

(Added an issue to rewrite the cluster and machine actuator tests: #68)

- generation script
- Makefile
- addons
- example templates
- kustomize templates
- README.md

Signed-off-by: Stephen Augustus <saugustus@vmware.com>
@tariq1890
Copy link
Contributor

/lgtm

Copy link
Contributor

@tariq1890 tariq1890 left a comment

Choose a reason for hiding this comment

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

Thanks @justaugustus :)

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 29, 2019
@k8s-ci-robot k8s-ci-robot merged commit 2c3c12e into kubernetes-sigs:master Jan 29, 2019
@justaugustus justaugustus mentioned this pull request Feb 25, 2019
20 tasks
luthermonson pushed a commit to luthermonson/cluster-api-provider-azure that referenced this pull request Jun 16, 2023
Ignore error for other future types in delete functionality
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/azure Issues or PRs related to azure 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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor loading credentials to actuator Implement MachineStatus for the machine actuator
10 participants