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

Adds support for provisioning single master clusters on Azure through clusterctl #2

Merged
merged 17 commits into from
Aug 10, 2018

Conversation

Meegul
Copy link
Contributor

@Meegul Meegul commented Aug 8, 2018

No description provided.

Meegul added 15 commits July 19, 2018 15:50
The wrappers have been moved into their own directory so it's more clear
that they're for testing purposes and do not have to do with the actual
functionality of the components they used share files with.

More unit tests have been added for VMs/deployments, and existing unit
tests have been refactored to use the wrappers.
this is to make upstreaming the azure provider easier, as it better
follows the skeleton's structure
@Meegul Meegul requested a review from vannrt August 8, 2018 20:37
Copy link
Contributor

@vannrt vannrt left a comment

Choose a reason for hiding this comment

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

Hi Michael,

Sorry it took me a while to look at this PR. I have several comments and you may not be able to address all of them by tomorrow. Please create issues for them (if necessary).

@@ -81,6 +77,10 @@
"startup_script": {
"defaultValue": null,
"type": "string"
},
"sshKeyData": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you rename this to sshPublicKey? Or is it ssh_public_key?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed to sshPublicKey

"provisioningState": "Succeeded",
"protocol": "TCP",
"sourcePortRange": "*",
"destinationPortRange": "6443",
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this port for? Can you add a comment? Would this be something that a user might want to configure?

machine.ObjectMeta.Annotations = make(map[string]string)
}
if azure.v1Alpha1Client != nil {
machine.ObjectMeta.Annotations["dummy"] = "dummy"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this still necessary? I thought this was for testing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The Cluster API currently determines that a machine's been created/updated by whether an annotation has been set, so rather than "dummy", some useful information could be put there instead, like the machine name. Changing to include some relevant info.

return "", fmt.Errorf("Error setting sftp client: %s", err)
}

remoteFile := "/home/ClusterAPI/.kube/config"
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you make this parameterized with the SSHUser constant?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

"value": *base64EncodeCommand("echo 'Hello world!'"),
"value": *base64EncodeCommand(startupScript),
},
"sshKeyData": map[string]interface{}{
Copy link
Contributor

Choose a reason for hiding this comment

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

sshPublicKey or ssh_public_key

apt-get update
apt-get install -y kubelet kubeadm kubectl

CLUSTER_DNS_SERVER=$(prips "10.96.0.0/12" | head -n 11 | tail -n 1)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this something that can be taken from cluster.yaml?

apt-get install -y kubelet kubeadm kubectl

CLUSTER_DNS_SERVER=$(prips "10.96.0.0/12" | head -n 11 | tail -n 1)
CLUSTER_DNS_DOMAIN="cluster.local"
Copy link
Contributor

Choose a reason for hiding this comment

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

Same with this, can we get this from cluster.yaml?

serviceSubnet: "10.96.0.0/12"
token: "testtoken"
controllerManagerExtraArgs:
cluster-cidr: "192.168.0.0/16"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this something that can be taken from cluster.yaml?

@@ -153,7 +218,62 @@ func TestBase64Encoding(t *testing.T) {
}

func TestGetStartupScript(t *testing.T) {
expectedStartupScript := "echo 'Hello world!'"
expectedStartupScript := `(
Copy link
Contributor

Choose a reason for hiding this comment

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

Can place the startup script to a file and just read it from here? That way we don't have to do a copy and paste.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried making this change but was running into some issues where creating the azure deployment would silently fail. Don't think I'll have time to work through it today.

# limitations under the License.

# Reproducible builder image
FROM golang:1.10.0 as builder
Copy link
Contributor

Choose a reason for hiding this comment

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

The tests are using 1.10.2. Should this be built with 1.10.2 as well? Or can the test use 1.10.0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've decided to just set the tests to use 1.10.0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like travis doesn't support 1.10.0, but it does support 1.10.2. So I switched the build to 1.10.2.

@Meegul Meegul merged commit ad7b001 into master Aug 10, 2018
@vannrt vannrt deleted the make-it-work branch November 2, 2018 22:26
@jsturtevant jsturtevant mentioned this pull request May 3, 2021
3 tasks
JoelSpeed pushed a commit to JoelSpeed/cluster-api-provider-azure that referenced this pull request Jan 31, 2022
Rename module to machine-api-provider-azure
luthermonson added a commit to luthermonson/cluster-api-provider-azure that referenced this pull request Jun 23, 2022
# This is the 1st commit message:

adding *.yaml to .gitattributes for easier WSL development with autocrlf

# The commit message kubernetes-sigs#2 will be skipped:

# adding *.yaml to .gitattributes for easier WSL development with autocrlf
luthermonson pushed a commit to luthermonson/cluster-api-provider-azure that referenced this pull request May 1, 2023
nellyk referenced this pull request in nellyk/cluster-api-provider-azure Apr 16, 2024
� This is the 1st commit message:

add helm chart

� The commit message #2 will be skipped:

� Expose AKS Preview Features
�
� Co-authored-by: Jon Huhn <[email protected]>
nellyk referenced this pull request in nellyk/cluster-api-provider-azure Apr 16, 2024
� This is the 1st commit message:

add helm chart

� The commit message #2 will be skipped:

� Expose AKS Preview Features
�
� Co-authored-by: Jon Huhn <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants