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

Added ability to select AZ #256

Merged
merged 1 commit into from Aug 11, 2019

Conversation

@soggiest
Copy link
Contributor

commented Aug 3, 2019

What this PR does / why we need it:
This PR adds a config option to the machine spec to select Availability Zones.

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

Special notes for your reviewer:

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

Release note:

Allows user to specify the availability zones their machines will be deployed into via the machine manifest file.
Copy link
Member

left a comment

Few comments, otherwise changes LGTM

pkg/apis/azureprovider/v1alpha1/types.go Outdated Show resolved Hide resolved

if r.scope.MachineConfig.AZ == "" {
klog.Info("No availability zone set, seletecting random availability zone")
vmZone, zoneErr = r.getVirtualMachineZone(ctx)

This comment has been minimized.

Copy link
@vincepri

vincepri Aug 8, 2019

Member

zoneErr could be declared above here, reducing its scope

This comment has been minimized.

Copy link
@soggiest

soggiest Aug 10, 2019

Author Contributor

I'm not sure what you mean here. zoneErr is declared just above this (line 495 after rebase)

This comment has been minimized.

Copy link
@vincepri

vincepri Aug 10, 2019

Member

I was suggesting to add a line before here like var err error to reduce the scope of the error :). Not really necessary, just a little nit because the error isn't actually used anywhere else within the function

pkg/cloud/azure/actuators/machine/reconciler.go Outdated Show resolved Hide resolved
@soggiest soggiest force-pushed the soggiest:az-env-variable branch from 78563d4 to 0154a9d Aug 10, 2019
@soggiest soggiest force-pushed the soggiest:az-env-variable branch from 0154a9d to 49a3a47 Aug 10, 2019
@k8s-ci-robot k8s-ci-robot added size/M and removed size/S labels Aug 10, 2019
@justaugustus

This comment has been minimized.

Copy link
Member

commented Aug 11, 2019

Thanks @soggiest and @vincepri!
/lgtm
/approve

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented Aug 11, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justaugustus, soggiest

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:
  • OWNERS [justaugustus,soggiest]

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 merged commit 4a1ad34 into kubernetes-sigs:master Aug 11, 2019
5 of 6 checks passed
5 of 6 checks passed
tide Not mergeable. Needs lgtm label.
Details
cla/linuxfoundation soggiest authorized
Details
pull-cluster-api-provider-azure-bazel-build Job succeeded.
Details
pull-cluster-api-provider-azure-bazel-test Job succeeded.
Details
pull-cluster-api-provider-azure-bazel-verify Job succeeded.
Details
pull-cluster-api-provider-azure-verify-boilerplate Job succeeded.
Details
@justaugustus justaugustus added this to Done (2019 - Q3) in Cluster API Azure Aug 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Cluster API Azure
  
Done (2019 - Q3)
4 participants
You can’t perform that action at this time.