Skip to content

Commit

Permalink
remove image pull from node-init daemonset
Browse files Browse the repository at this point in the history
  • Loading branch information
danisla committed Aug 20, 2020
1 parent e713e29 commit 24a8373
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ spec:
app.broker/user: "{{.User}}"
spec:
nodeSelector:
app.broker/initialized: "true"
app.broker/tier: {{ .NodeTier.NodeLabel }}
cloud.google.com/gke-nodepool: "{{ .NodeTier.NodeLabel }}"
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
Expand Down
29 changes: 1 addition & 28 deletions setup/manifests/base/node/node-init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,39 +86,13 @@ spec:
operator: "Exists"
volumes:
###
# Local docker socket for pulling images
###
- name: docker
hostPath:
path: /var/run/docker.sock
type: File
###
# Root filesystem from host
###
- name: hostfs
hostPath:
path: /
initContainers:
###
# Pull images
# This helps to speed up container startup with large images.
###
- name: pull-images
image: gcr.io/cloud-solutions-images/kube-pod-broker-controller:latest
command: ["/usr/local/bin/image-puller"]
env:
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
volumeMounts:
- name: docker
mountPath: /var/run/docker.sock
###
# node init, set inotify limits, update node taint and label.
###
- name: node-init
Expand Down Expand Up @@ -186,8 +160,7 @@ spec:
chmod +x /tmp/init.sh
while true; do
# Run init script in chroot
/tmp/init.sh
/tmp/init.sh | grep -qv "not labeled" || true
sleep 10
done
env:
Expand Down
2 changes: 1 addition & 1 deletion setup/scripts/selkies_cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ APP=${APP,,}

[[ "${ACTION}" != "list" && -z "${APP}" ]] && echo "ERROR: missing app name for action: ${ACTION}" && exit 1

ACCOUNT=$(gcloud config get-value account)
ACCOUNT=${ACCOUNT:-$(gcloud config get-value account)}
[[ -z "${ACCOUNT}" ]] && echo "ERROR: Failed to get gcloud account, did you run 'gcloud auth login'?" && exit 1

case $ACTION in
Expand Down

0 comments on commit 24a8373

Please sign in to comment.