-
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
Prototype of named machines for vsphere #110
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: karan 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 |
/assign @krousey |
@@ -23,7 +23,7 @@ COPY . . | |||
RUN CGO_ENABLED=0 GOOS=linux go install -a -ldflags '-extldflags "-static"' sigs.k8s.io/cluster-api/cloud/terraform/cmd/terraform-machine-controller | |||
|
|||
# Final container | |||
FROM alpine3.7 | |||
FROM golang:alpine3.7 |
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.
Why is golang needed?
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.
As in the PR description: Side note: I'm using golang:alpine because when trying to use just alpine image, I get this error: pull access denied for alpine3.7, repository does not exist or may require 'docker login'.
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.
Ah. I think it's alpine:3.7
. Sorry I didn't read the PR first.
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.
That worked. I fixed it. Thanks!
) | ||
|
||
// Config Watch holds the path to the named machines yaml file. | ||
// This is used during bootstrap when the apiserver does not yet exist. |
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.
Isn't it also used in the machine controller to? If so, this is misleading.
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.
True. It's a lie.
@@ -32,7 +32,7 @@ import ( | |||
"sigs.k8s.io/cluster-api/cloud/terraform/config" | |||
) | |||
|
|||
var apiServerImage = "gcr.io/k8s-cluster-api/cluster-apiserver:0.0.1" | |||
var apiServerImage = "gcr.io/k8s-cluster-api/cluster-apiserver:0.0.2" | |||
var controllerManagerImage = "gcr.io/k8s-cluster-api/controller-manager:0.0.1" | |||
var machineControllerImage = "gcr.io/karangoel-gke-1/terraform-machine-controller:0.0.1-dev" |
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.
Are you just overwriting this for now? Should we find it a more permanent place?
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.
Yeah. For now, until I have a better plan (WIP) I prefer to not host non-dev images.
/lgtm |
/lgtm |
…adm-yaml chore: get kubeadm yaml rather than json
…esolution Overload the VMTemplate parameter for search purposes
Current implementation for vSphere is to let the customer specify the raw Terraform config (in Hashicorp Config Language) in the Machine spec yaml, in the providerConfig section. While this works, it does not make the spec maintainable (the user needs to encoded back and forth between the HCL and the string).
Effectively, we create some “standard”, templated VMs that represent the configuration of machines in HCL. The customer then only needs to reference one of those and provide variables to complete the VM config. The definition of the machines is configured using a ConfigMap.
General design
A file named
vsphere_named_machines.yaml
contains a map of machine name and the HCL config for that machine. This file is mounted in the master as a ConfigMap (similar to #104). The controller reads from this map and tries to find a machine by name referenced inmachines.yaml
.I have tested this change in a vSphere lab.
@kubernetes/kube-deploy-reviewers