Skip to content
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.

Commit

Permalink
Merge pull request #1402 from HotelsDotCom/remove-dependency-on-aline…
Browse files Browse the repository at this point in the history
…-latest-0.10.x

0.10.x Remove dependency on alpine:latest
  • Loading branch information
mumoshu committed Jul 13, 2018
2 parents 75a0235 + 845e310 commit a0cb160
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions core/controlplane/config/templates/cloud-config-controller
Expand Up @@ -1232,7 +1232,7 @@ write_files:
terminationGracePeriodSeconds: 0
initContainers:
- name: remove-cni-networks
image: alpine:latest
image: {{.HyperkubeImage.RepoWithTag}}
command:
- /bin/rm
- -rf
Expand All @@ -1242,7 +1242,7 @@ write_files:
- mountPath: /etc/kubernetes/cni/net.d
name: cni-net-dir
- name: net-migration
image: alpine:latest
image: {{.HyperkubeImage.RepoWithTag}}
command:
- /bin/touch
- /etc/kubernetes/cni/net.d/net-migration
Expand Down Expand Up @@ -1441,7 +1441,7 @@ write_files:
terminationGracePeriodSeconds: 0
initContainers:
- name: remove-cni-networks
image: alpine:latest
image: {{.HyperkubeImage.RepoWithTag}}
command:
- /bin/rm
- -rf
Expand All @@ -1451,7 +1451,7 @@ write_files:
- mountPath: /etc/kubernetes/cni/net.d
name: cni-net-dir
- name: net-migration
image: alpine:latest
image: {{.HyperkubeImage.RepoWithTag}}
command:
- /bin/touch
- /etc/kubernetes/cni/net.d/net-migration
Expand Down Expand Up @@ -1943,7 +1943,7 @@ write_files:
terminationGracePeriodSeconds: 0
initContainers:
- name: remove-cni-networks
image: alpine:latest
image: {{.HyperkubeImage.RepoWithTag}}
command:
- /bin/rm
- -rf
Expand All @@ -1953,7 +1953,7 @@ write_files:
- mountPath: /etc/kubernetes/cni/net.d
name: cni-net-dir
- name: net-migration
image: alpine:latest
image: {{.HyperkubeImage.RepoWithTag}}
command:
- /bin/touch
- /etc/kubernetes/cni/net.d/net-migration
Expand Down Expand Up @@ -2108,7 +2108,7 @@ write_files:
terminationGracePeriodSeconds: 0
initContainers:
- name: remove-cni-networks
image: alpine:latest
image: {{.HyperkubeImage.RepoWithTag}}
command:
- /bin/rm
- -rf
Expand Down Expand Up @@ -4508,7 +4508,7 @@ write_files:

log "Running a pod on node ${node} to determine pod ip address..."
local selector="{ \"apiVersion\": \"v1\", \"spec\": { \"nodeSelector\": { \"kubernetes.io/hostname\": \"${node}\" }, \"tolerations\": [ { \"effect\": \"NoSchedule\", \"operator\": \"Exists\" }, { \"effect\": \"NoExecute\", \"operator\": \"Exists\" } ] } }"
ipaddress=$(kubectl -n kube-system run find-pod-ip-${node%%.*} --pod-running-timeout=1m -i -t --image=alpine:latest --restart=Never --overrides="${selector}" -- /bin/sh -c "cat /proc/net/fib_trie | awk '/32 host/ {print f} {f=\$2}' | grep -v 127.0.0.1 | uniq") || return 1
ipaddress=$(kubectl -n kube-system run find-pod-ip-${node%%.*} --pod-running-timeout=1m -i -t --image={{.HyperkubeImage.RepoWithTag}} --restart=Never --overrides="${selector}" -- /bin/sh -c "cat /proc/net/fib_trie | awk '/32 host/ {print f} {f=\$2}' | grep -v 127.0.0.1 | uniq") || return 1
kubectl -n kube-system delete pod find-pod-ip-${node%%.*} 2>&1 >/dev/null

if [[ -n "${ipaddress}" ]]; then
Expand Down

0 comments on commit a0cb160

Please sign in to comment.