From 24a8373e8b6b6b515f52bd12145bdf9996f4e2f6 Mon Sep 17 00:00:00 2001 From: Dan Isla Date: Thu, 20 Aug 2020 23:08:07 +0000 Subject: [PATCH] remove image pull from node-init daemonset --- .../bundle-manifests/patch-user-pod.yaml.tmpl | 2 +- setup/manifests/base/node/node-init.yaml | 29 +------------------ setup/scripts/selkies_cli.sh | 2 +- 3 files changed, 3 insertions(+), 30 deletions(-) diff --git a/examples/jupyter-notebook/bundle-manifests/patch-user-pod.yaml.tmpl b/examples/jupyter-notebook/bundle-manifests/patch-user-pod.yaml.tmpl index 3fd2b24..8bda358 100644 --- a/examples/jupyter-notebook/bundle-manifests/patch-user-pod.yaml.tmpl +++ b/examples/jupyter-notebook/bundle-manifests/patch-user-pod.yaml.tmpl @@ -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: diff --git a/setup/manifests/base/node/node-init.yaml b/setup/manifests/base/node/node-init.yaml index 1dad13d..a9fe09d 100644 --- a/setup/manifests/base/node/node-init.yaml +++ b/setup/manifests/base/node/node-init.yaml @@ -86,13 +86,6 @@ 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 @@ -100,25 +93,6 @@ spec: 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 @@ -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: diff --git a/setup/scripts/selkies_cli.sh b/setup/scripts/selkies_cli.sh index dbc5b30..488a474 100755 --- a/setup/scripts/selkies_cli.sh +++ b/setup/scripts/selkies_cli.sh @@ -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