-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Handling configurable machine setup/installation #104
Conversation
- Rename GCEProviderConfig.Image field to OS - Remove call to preloaded script in generate-image - Create a machine-setup ConfigMap to mount the yaml file
Hi @kcoronado. Thanks for your PR. I'm waiting for a kubernetes or kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/assign @krousey @jessicaochen |
cloud/google/machineactuator.go
Outdated
@@ -50,7 +54,12 @@ const ( | |||
ZoneAnnotationKey = "gcp-zone" | |||
NameAnnotationKey = "gcp-name" | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, I think you may need to rebase. You are re-adding the uid logic variable that was removed in another change.
cloud/google/machineactuator.go
Outdated
} else { | ||
return nil, fmt.Errorf("Instance %v %v %v is missing uid label.", config.Project, config.Zone, identifyingMachine.ObjectMeta.Name) | ||
} | ||
} else if uid != fmt.Sprintf("%v", machine.ObjectMeta.UID) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another section of re-added logic that was removed.
Sorry about that! I originally just copied and pasted the whole file from the old repo because I thought it was up to date. I went and double checked the diffs from this PR and the old PR and got rid of any additions that weren't in the old one (it was just the UID logic). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
/ok-to-test |
/test pull-cluster-api-test |
"testing" | ||
|
||
clustercommon "k8s.io/kube-deploy/cluster-api/pkg/apis/cluster/common" | ||
clusterv1 "k8s.io/kube-deploy/cluster-api/pkg/apis/cluster/v1alpha1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New repo
I thought I ran the tests when I migrated but I guess not :\ I fixed the paths so it's passing now. |
The problem is since you have the old repo in your go path, it was able to
find it locally.
…On Fri, Apr 20, 2018, 14:58 Katie Coronado ***@***.***> wrote:
I thought I ran the tests when I migrated but I guess not :\ I fixed the
paths so it's passing now.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#104 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJlmxotWzp0Cg-tuVv5cMg1_Z8WbotRks5tqln7gaJpZM4TcKMn>
.
|
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kcoronado, krousey 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 |
if configListPath != "" { | ||
configWatch, err = machinesetup.NewConfigWatch(configListPath) | ||
if err != nil { | ||
glog.Errorf("Error creating config watch: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was it deliberate that this is swallowing the error instead of returning it? If so, I think it's worth a comment why, because that's usually an anti-pattern and could use justification.
@@ -103,6 +112,15 @@ func NewMachineActuator(kubeadmToken string, machineClient client.MachineInterfa | |||
} | |||
} | |||
|
|||
// TODO: get rid of empty string check when we switch to the new bootstrapping method. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For each of these TODOs, it would be great to create a tracking issue with all the necessary context, and link to them in these comments. Otherwise, the actual meaning of "new bootstrapping method," and why an empty string check can be removed, etc. will slowly fade from people's memory.
return err | ||
} | ||
configMap := corev1.ConfigMap{ | ||
ObjectMeta: metav1.ObjectMeta{Name: "machine-setup"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This magic string is used in a few places. Is it possible to move it to a shared constant, and reference that instead?
actually run push images
Update Makefile that runs generates to use the generate boilerplate instead of the go boilerplate
What this PR does / why we need it:
This PR modifies the GCE actuator to handle configurable Kubernetes versions, OS image, and startup scripts when creating clusters and starting up machines. It creates a new machine setup configmap that contains the different configurations that the GCE actuator can handle.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):#85
Special notes for your reviewer:
This PR was migrated from kubernetes-retired/kube-deploy#664.
Release note:
@kubernetes/kube-deploy-reviewers