Skip to content

Commit

Permalink
kube-proxy should be a daemonset
Browse files Browse the repository at this point in the history
  • Loading branch information
alkar committed Oct 18, 2017
1 parent c7daa6d commit 82f250f
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 116 deletions.
20 changes: 0 additions & 20 deletions master.tf
Original file line number Diff line number Diff line change
Expand Up @@ -66,25 +66,6 @@ data "ignition_systemd_unit" "master-kubelet" {
content = "${data.template_file.master-kubelet.rendered}"
}

data "template_file" "master-kube-proxy" {
template = "${file("${path.module}/resources/master-kube-proxy.yaml")}"

vars {
hyperkube_image_url = "${var.hyperkube_image_url}"
hyperkube_image_tag = "${var.hyperkube_image_tag}"
}
}

data "ignition_file" "master-kube-proxy" {
mode = 0644
filesystem = "root"
path = "/etc/kubernetes/manifests/kube-proxy.yaml"

content {
content = "${data.template_file.master-kube-proxy.rendered}"
}
}

data "ignition_file" "master-kubeconfig" {
mode = 0644
filesystem = "root"
Expand Down Expand Up @@ -180,7 +161,6 @@ data "ignition_config" "master" {
data.ignition_file.master-cfssl-sk-get.id,
data.ignition_file.master-prom-machine-role.id,
data.ignition_file.master-kubeconfig.id,
data.ignition_file.master-kube-proxy.id,
data.ignition_file.kube-apiserver.id,
data.ignition_file.kube-scheduler.id,
data.ignition_file.kube-controller-manager.id,
Expand Down
28 changes: 0 additions & 28 deletions resources/master-kube-proxy.yaml

This file was deleted.

45 changes: 0 additions & 45 deletions resources/worker-kube-proxy.yaml

This file was deleted.

1 change: 0 additions & 1 deletion resources/worker-kubelet.service
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ ExecStartPre=/usr/bin/mkdir -p /opt/cni/bin
ExecStartPre=/usr/bin/mkdir -p /var/lib/cni
ExecStartPre=/usr/bin/mkdir -p /etc/cni/net.d
ExecStartPre=/opt/bin/cfssl-new-cert
ExecStartPre=-/bin/sh -c "docker restart $(docker ps --no-trunc | grep '/hyperkube proxy' | awk '{ print $1; }')"
ExecStartPre=-/usr/bin/rkt rm --uuid-file=/var/run/kubelet-pod.uuid
ExecStart=/usr/lib/coreos/kubelet-wrapper \
--kubeconfig=/var/lib/kubelet/kubeconfig \
Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ variable "cluster_dns" {
}

variable "master_address" {
description = "The address of the kubernetes API server, typically of their load balancer. Used by kube-proxy."
description = "The address of the kubernetes API server, typically of their load balancer. Used by the worker kubelet."
}

variable "cloud_provider" {
Expand Down
21 changes: 0 additions & 21 deletions worker.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,6 @@ data "ignition_systemd_unit" "worker-kubelet" {
content = "${data.template_file.worker-kubelet.rendered}"
}

data "template_file" "worker-kube-proxy" {
template = "${file("${path.module}/resources/worker-kube-proxy.yaml")}"

vars {
hyperkube_image_url = "${var.hyperkube_image_url}"
hyperkube_image_tag = "${var.hyperkube_image_tag}"
master_address = "${var.master_address}"
}
}

data "ignition_file" "worker-kube-proxy" {
mode = 0644
filesystem = "root"
path = "/etc/kubernetes/manifests/kube-proxy.yaml"

content {
content = "${data.template_file.worker-kube-proxy.rendered}"
}
}

data "template_file" "worker-kubeconfig" {
template = "${file("${path.module}/resources/worker-kubeconfig")}"

Expand Down Expand Up @@ -106,7 +86,6 @@ data "ignition_config" "worker" {
data.ignition_file.worker-cfssl-new-cert.id,
data.ignition_file.worker-prom-machine-role.id,
data.ignition_file.worker-kubeconfig.id,
data.ignition_file.worker-kube-proxy.id,
data.ignition_file.worker-sysctl-vm.id,
),
var.worker_additional_files
Expand Down

0 comments on commit 82f250f

Please sign in to comment.