-
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
Set up node and storage management for vsphere #212
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 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 |
/cc @rsdcastro @roberthbailey @spew |
/assign @spew |
/hold |
template = <<EOF | ||
[Global] | ||
datacenters = "$${datacenter}" | ||
insecure-flag = "1" #set to 1 if the vCenter uses a self-signed cert |
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.
Do we expect any usage of non-self-signed certs? If so, both here and allow_unverified_ssl = true
above would need to be changed together, right? Probably not worth changing until we need to, but seems like a sharp edge we are leaving for the first person that wants to bring a real cert.
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.
I think we might see that, but I don't see this as being incompatible with that. This just disables verification of the certificate chain and host name. This should still work with a proper cert, it just won't be checked.
The reason to change this is to harden against man in the middle attacks, which we'll probably want to do.
I can't find any mistakes. Looks good. /lgtm |
@@ -53,19 +53,60 @@ items: | |||
datacenter_id = "${data.vsphere_datacenter.dc.id}" | |||
} | |||
|
|||
data "template_file" "cloud_provider_config" { |
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.
Can you point me to some documentation that can help me understand what's going on here?
EDIT: nvm I see the doc you linked in the PR description.
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.
Linked in the PR description
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.
Or did you mean this: https://www.terraform.io/docs/providers/template/index.html
@@ -213,7 +213,11 @@ sysctl net.bridge.bridge-nf-call-iptables=1 | |||
# kubeadm uses 10th IP as DNS server | |||
CLUSTER_DNS_SERVER=$(prips ${SERVICE_CIDR} | head -n 11 | tail -n 1) | |||
|
|||
sed -i "s/KUBELET_DNS_ARGS=[^\"]*/KUBELET_DNS_ARGS=--cluster-dns=${CLUSTER_DNS_SERVER} --cluster-domain=${CLUSTER_DNS_DOMAIN}/" /etc/systemd/system/kubelet.service.d/10-kubeadm.conf | |||
cat > /etc/systemd/system/kubelet.service.d/20-cloud.conf << EOF | |||
[Service] |
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 this needed? (it seems difficult to track down on google what exactly this block enables)
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.
These are part of the systemd configuration files for kubelet that are installed as part of the kubeadm package. We were sed editing an existing one, but it's cleaner to write a new file with a higher number to
override things.
These are ultimately kubelet flags. The gce startup scripts switched to this approach as well. https://github.com/kubernetes-sigs/cluster-api/blob/master/gcp-deployer/machine_setup_configs.yaml#L74-L79
/lgtm |
/hold cancel
…On Thu, May 24, 2018, 23:11 Robert Bailey ***@***.***> wrote:
/lgtm
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#212 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJlm76hi-j9XiWAspPrHUReqrkCSZBiks5t16CHgaJpZM4UNDx->
.
|
@krousey Will vsphere-volume-manager register storage class by it's own or it's need to be added to manifests? |
Fixup YAML for kustomize v3.1.x
…on (kubernetes-sigs#213) See https://code.vmware.com/doc/preview?id=4206#/doc/vim.vm.RelocateSpec.DiskMoveOptions.html for more details Resolves kubernetes-sigs#212 Change-Id: Ic62701aabc134a3e5038d440eccf902e52bd3351
What this PR does / why we need it:
This PR enables vsphere cloud provider management of node and storage objects. This ensures node objects are deleted when their VM is deleted. It also enables the vsphere-volume manager to dynamically provision and attach storage.
Special notes for your reviewer:
set up according to this guide