Skip to content
This repository has been archived by the owner on Feb 10, 2022. It is now read-only.

Commit

Permalink
Use spec.ip for node name
Browse files Browse the repository at this point in the history
[#139275251]
  • Loading branch information
mkjelland authored and jhvhs committed Apr 21, 2017
1 parent 87407fd commit f274dd1
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion jobs/kubelet/templates/bin/drain.erb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ check_if_pidfile_exists() {
}

drain_kubelet() {
kubectl --kubeconfig /var/vcap/jobs/kubeconfig/config/kubeconfig drain <%= spec.address %> --grace-period 10 --force --delete-local-data
kubectl --kubeconfig /var/vcap/jobs/kubeconfig/config/kubeconfig drain <%= spec.ip %> --grace-period 10 --force --delete-local-data
}

kill_node() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[ -z "$DEBUG" ] || set -x

kubectl="/var/vcap/packages/kubernetes/bin/kubectl --kubeconfig=/var/vcap/jobs/kubeconfig/config/kubeconfig"
node_name=<%= spec.address %>
node_name=<%= spec.ip %>

# Wait for kubelet to become Ready before we move on to the next node.
# Scheduling might not be enabled at this time.
Expand Down
2 changes: 1 addition & 1 deletion jobs/kubelet/templates/bin/kubelet_ctl.erb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ start_kubelet() {
--container-runtime=docker \
--docker="${DOCKER_SOCKET}" \
--docker-endpoint="${DOCKER_SOCKET}" \
--hostname-override="<%= spec.address %>" \
--hostname-override="<%= spec.ip %>" \
--kubeconfig=/var/vcap/jobs/kubeconfig/config/kubeconfig \
--non-masquerade-cidr 10.200.0.0/16 \
--serialize-image-pulls=false \
Expand Down
2 changes: 1 addition & 1 deletion jobs/kubelet/templates/bin/post-start.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[ -z "$DEBUG" ] || set -x

kubectl="/var/vcap/packages/kubernetes/bin/kubectl --kubeconfig=/var/vcap/jobs/kubeconfig/config/kubeconfig"
node_name=<%= spec.address %>
node_name=<%= spec.ip %>

# Deleting docker0 route as a workaround to a routing conflict
# between the docker0 bridge and the CNI interface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ start_kubernetes_proxy() {


kube-proxy \
--hostname-override=<%= spec.address %> \
--hostname-override=<%= spec.ip %> \
--master=<%= p("kubernetes-api-url") %> \
--kubeconfig=/var/vcap/jobs/kubeconfig/config/kubeconfig \
--proxy-mode=iptables \
Expand Down

0 comments on commit f274dd1

Please sign in to comment.