+ set -e
+ set -o pipefail
++ dirname deploy.sh
+ BASE_DIR=.
++ mktemp -d
+ TEMP_DIR=/tmp/tmp.Lrsz8v4q8l
+ trap 'rm -rf ${TEMP_DIR}' EXIT
+ default_kubelet_data_dir=/var/lib/kubelet
+ : /var/lib/kubelet
+ : true
+ SNAPSHOTTER_RBAC_RELATIVE_PATH=rbac.yaml
++ rbac_version ./hostpath/csi-hostpath-plugin.yaml csi-snapshotter true
++ yaml=./hostpath/csi-hostpath-plugin.yaml
++ image=csi-snapshotter
++ update_rbac=true
+++ sed -e 's/ *#.*$//' ./hostpath/csi-hostpath-plugin.yaml
+++ grep 'image:.*csi-snapshotter'
+++ sed -e 's/ *#.*//' -e 's/.*://'
++ version=v6.1.0
++ true
+++ echo csi-snapshotter
+++ tr - _
+++ tr a-z A-Z
++ varname=CSI_SNAPSHOTTER
++ eval 'version=${CSI_SNAPSHOTTER_TAG:-${IMAGE_TAG:-$version}}'
+++ version=v6.1.0
++ case "$version" in
++ echo v6.1.0
+ version_gt v6.1.0 v1.255.255
++ for ver in "$@"
++ ver=v6.1.0
++ ver=v6.1.0
++ echo 6.1.0
++ for ver in "$@"
++ ver=v1.255.255
++ ver=v1.255.255
++ echo 1.255.255
+ versions='6.1.0
1.255.255'
+ greaterVersion=v6.1.0
+ greaterVersion=v6.1.0
+ greaterVersion=6.1.0
++ printf %s '6.1.0
1.255.255'
++ sort -V
++ head -n 1
+ test 1.255.255 '!=' 6.1.0
+ SNAPSHOTTER_RBAC_RELATIVE_PATH=csi-snapshotter/rbac-csi-snapshotter.yaml
++ rbac_version ./hostpath/csi-hostpath-plugin.yaml csi-provisioner false
++ yaml=./hostpath/csi-hostpath-plugin.yaml
++ image=csi-provisioner
++ update_rbac=false
+++ sed -e 's/ *#.*$//' ./hostpath/csi-hostpath-plugin.yaml
+++ grep 'image:.*csi-provisioner'
+++ sed -e 's/ *#.*//' -e 's/.*://'
++ version=v3.3.0
++ false
++ case "$version" in
++ echo v3.3.0
+ CSI_PROVISIONER_RBAC_YAML=https://raw.githubusercontent.com/kubernetes-csi/external-provisioner/v3.3.0/deploy/kubernetes/rbac.yaml
++ rbac_version ./hostpath/csi-hostpath-plugin.yaml csi-provisioner true
++ yaml=./hostpath/csi-hostpath-plugin.yaml
++ image=csi-provisioner
++ update_rbac=true
+++ sed -e 's/ *#.*$//' ./hostpath/csi-hostpath-plugin.yaml
+++ grep 'image:.*csi-provisioner'
+++ sed -e 's/ *#.*//' -e 's/.*://'
++ version=v3.3.0
++ true
+++ echo csi-provisioner
+++ tr - _
+++ tr a-z A-Z
++ varname=CSI_PROVISIONER
++ eval 'version=${CSI_PROVISIONER_TAG:-${IMAGE_TAG:-$version}}'
+++ version=v3.3.0
++ case "$version" in
++ echo v3.3.0
+ : https://raw.githubusercontent.com/kubernetes-csi/external-provisioner/v3.3.0/deploy/kubernetes/rbac.yaml
++ rbac_version ./hostpath/csi-hostpath-plugin.yaml csi-snapshotter false
++ yaml=./hostpath/csi-hostpath-plugin.yaml
++ image=csi-snapshotter
++ update_rbac=false
+++ sed -e 's/ *#.*$//' ./hostpath/csi-hostpath-plugin.yaml
+++ grep 'image:.*csi-snapshotter'
+++ sed -e 's/ *#.*//' -e 's/.*://'
++ version=v6.1.0
++ false
++ case "$version" in
++ echo v6.1.0
+ CSI_SNAPSHOTTER_RBAC_YAML=https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/v6.1.0/deploy/kubernetes/csi-snapshotter/rbac-csi-snapshotter.yaml
++ rbac_version ./hostpath/csi-hostpath-plugin.yaml csi-snapshotter true
++ yaml=./hostpath/csi-hostpath-plugin.yaml
++ image=csi-snapshotter
++ update_rbac=true
+++ sed -e 's/ *#.*$//' ./hostpath/csi-hostpath-plugin.yaml
+++ grep 'image:.*csi-snapshotter'
+++ sed -e 's/ *#.*//' -e 's/.*://'
++ version=v6.1.0
++ true
+++ echo csi-snapshotter
+++ tr - _
+++ tr a-z A-Z
++ varname=CSI_SNAPSHOTTER
++ eval 'version=${CSI_SNAPSHOTTER_TAG:-${IMAGE_TAG:-$version}}'
+++ version=v6.1.0
++ case "$version" in
++ echo v6.1.0
+ : https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/v6.1.0/deploy/kubernetes/csi-snapshotter/rbac-csi-snapshotter.yaml
+ echo 'applying RBAC rules'
applying RBAC rules
+ for component in CSI_PROVISIONER CSI_SNAPSHOTTER
+ eval 'current=${CSI_PROVISIONER_RBAC}'
++ current=https://raw.githubusercontent.com/kubernetes-csi/external-provisioner/v3.3.0/deploy/kubernetes/rbac.yaml
+ eval 'original=${CSI_PROVISIONER_RBAC_YAML}'
++ original=https://raw.githubusercontent.com/kubernetes-csi/external-provisioner/v3.3.0/deploy/kubernetes/rbac.yaml
+ '[' https://raw.githubusercontent.com/kubernetes-csi/external-provisioner/v3.3.0/deploy/kubernetes/rbac.yaml '!=' https://raw.githubusercontent.com/kubernetes-csi/external-provisioner/v3.3.0/deploy/kubernetes/rbac.yaml ']'
+ [[ https://raw.githubusercontent.com/kubernetes-csi/external-provisioner/v3.3.0/deploy/kubernetes/rbac.yaml =~ ^http:// ]]
+ [[ https://raw.githubusercontent.com/kubernetes-csi/external-provisioner/v3.3.0/deploy/kubernetes/rbac.yaml =~ ^https:// ]]
+ run curl https://raw.githubusercontent.com/kubernetes-csi/external-provisioner/v3.3.0/deploy/kubernetes/rbac.yaml --output /tmp/tmp.Lrsz8v4q8l/rbac.yaml --silent --location
+ echo curl https://raw.githubusercontent.com/kubernetes-csi/external-provisioner/v3.3.0/deploy/kubernetes/rbac.yaml --output /tmp/tmp.Lrsz8v4q8l/rbac.yaml --silent --location
curl https://raw.githubusercontent.com/kubernetes-csi/external-provisioner/v3.3.0/deploy/kubernetes/rbac.yaml --output /tmp/tmp.Lrsz8v4q8l/rbac.yaml --silent --location
+ curl https://raw.githubusercontent.com/kubernetes-csi/external-provisioner/v3.3.0/deploy/kubernetes/rbac.yaml --output /tmp/tmp.Lrsz8v4q8l/rbac.yaml --silent --location
+ cat
+ run kubectl apply --kustomize /tmp/tmp.Lrsz8v4q8l
+ echo kubectl apply --kustomize /tmp/tmp.Lrsz8v4q8l
kubectl apply --kustomize /tmp/tmp.Lrsz8v4q8l
+ kubectl apply --kustomize /tmp/tmp.Lrsz8v4q8l
serviceaccount/csi-provisioner created
role.rbac.authorization.k8s.io/external-provisioner-cfg created
clusterrole.rbac.authorization.k8s.io/external-provisioner-runner created
rolebinding.rbac.authorization.k8s.io/csi-provisioner-role-cfg created
clusterrolebinding.rbac.authorization.k8s.io/csi-provisioner-role created
+ for component in CSI_PROVISIONER CSI_SNAPSHOTTER
+ eval 'current=${CSI_SNAPSHOTTER_RBAC}'
++ current=https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/v6.1.0/deploy/kubernetes/csi-snapshotter/rbac-csi-snapshotter.yaml
+ eval 'original=${CSI_SNAPSHOTTER_RBAC_YAML}'
++ original=https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/v6.1.0/deploy/kubernetes/csi-snapshotter/rbac-csi-snapshotter.yaml
+ '[' https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/v6.1.0/deploy/kubernetes/csi-snapshotter/rbac-csi-snapshotter.yaml '!=' https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/v6.1.0/deploy/kubernetes/csi-snapshotter/rbac-csi-snapshotter.yaml ']'
+ [[ https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/v6.1.0/deploy/kubernetes/csi-snapshotter/rbac-csi-snapshotter.yaml =~ ^http:// ]]
+ [[ https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/v6.1.0/deploy/kubernetes/csi-snapshotter/rbac-csi-snapshotter.yaml =~ ^https:// ]]
+ run curl https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/v6.1.0/deploy/kubernetes/csi-snapshotter/rbac-csi-snapshotter.yaml --output /tmp/tmp.Lrsz8v4q8l/rbac.yaml --silent --location
+ echo curl https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/v6.1.0/deploy/kubernetes/csi-snapshotter/rbac-csi-snapshotter.yaml --output /tmp/tmp.Lrsz8v4q8l/rbac.yaml --silent --location
curl https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/v6.1.0/deploy/kubernetes/csi-snapshotter/rbac-csi-snapshotter.yaml --output /tmp/tmp.Lrsz8v4q8l/rbac.yaml --silent --location
+ curl https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/v6.1.0/deploy/kubernetes/csi-snapshotter/rbac-csi-snapshotter.yaml --output /tmp/tmp.Lrsz8v4q8l/rbac.yaml --silent --location
+ cat
+ run kubectl apply --kustomize /tmp/tmp.Lrsz8v4q8l
+ echo kubectl apply --kustomize /tmp/tmp.Lrsz8v4q8l
kubectl apply --kustomize /tmp/tmp.Lrsz8v4q8l
+ kubectl apply --kustomize /tmp/tmp.Lrsz8v4q8l
serviceaccount/csi-snapshotter created
role.rbac.authorization.k8s.io/external-snapshotter-leaderelection created
clusterrole.rbac.authorization.k8s.io/external-snapshotter-runner created
rolebinding.rbac.authorization.k8s.io/external-snapshotter-leaderelection created
clusterrolebinding.rbac.authorization.k8s.io/csi-snapshotter-role created
+ case "$CSI_PROVISIONER_TAG" in
+ csistoragecapacities_api=v1
++ kubectl get csistoragecapacities.v1.storage.k8s.io
+ get_csistoragecapacities='No resources found in default namespace.'
+ echo 'No resources found in default namespace.'
+ grep -q 'the server doesn'\''t have a resource type'
+ have_csistoragecapacity=true
+ echo csistoragecapacities.v1.storage.k8s.io:
csistoragecapacities.v1.storage.k8s.io:
+ show_lines=4
+ echo 'No resources found in default namespace.'
+ head -n 4
+ sed -e 's/^/   /'
   No resources found in default namespace.
++ echo 'No resources found in default namespace.'
++ wc -l
+ '[' 1 -gt 4 ']'
+ echo 'deploying with CSIStorageCapacity v1: true'
deploying with CSIStorageCapacity v1: true
+ echo 'deploying hostpath components'
deploying hostpath components
++ sort
++ ls ./hostpath/csi-hostpath-driverinfo.yaml ./hostpath/csi-hostpath-plugin.yaml ./hostpath/csi-hostpath-snapshotclass.yaml ./hostpath/csi-hostpath-storageclass-fast.yaml ./hostpath/csi-hostpath-storageclass-slow.yaml ./hostpath/csi-hostpath-testing.yaml
+ for i in $(ls ${BASE_DIR}/hostpath/*.yaml | sort)
+ echo '   ./hostpath/csi-hostpath-driverinfo.yaml'
   ./hostpath/csi-hostpath-driverinfo.yaml
++ cat ./hostpath/csi-hostpath-driverinfo.yaml
++ sed -e 's;/var/lib/kubelet/;/var/lib/kubelet/;'
++ IFS=
++ read -r line
+++ echo 'apiVersion: storage.k8s.io/v1'
+++ sed -e 's/ *#.*$//'
++ nocomments='apiVersion: storage.k8s.io/v1'
++ echo 'apiVersion: storage.k8s.io/v1'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo 'apiVersion: storage.k8s.io/v1'
++ IFS=
++ read -r line
+++ echo 'kind: CSIDriver'
+++ sed -e 's/ *#.*$//'
++ nocomments='kind: CSIDriver'
++ echo 'kind: CSIDriver'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo 'kind: CSIDriver'
++ IFS=
++ read -r line
+++ echo metadata:
+++ sed -e 's/ *#.*$//'
++ nocomments=metadata:
++ echo metadata:
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo metadata:
++ IFS=
++ read -r line
+++ echo '  name: hostpath.csi.k8s.io'
+++ sed -e 's/ *#.*$//'
++ nocomments='  name: hostpath.csi.k8s.io'
++ echo '  name: hostpath.csi.k8s.io'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  name: hostpath.csi.k8s.io'
++ IFS=
++ read -r line
+++ echo '  labels:'
+++ sed -e 's/ *#.*$//'
++ nocomments='  labels:'
++ echo '  labels:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  labels:'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/part-of: csi-driver-host-path'
++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/name: hostpath.csi.k8s.io'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/name: hostpath.csi.k8s.io'
++ echo '    app.kubernetes.io/name: hostpath.csi.k8s.io'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/name: hostpath.csi.k8s.io'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/component: csi-driver'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/component: csi-driver'
++ echo '    app.kubernetes.io/component: csi-driver'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/component: csi-driver'
++ IFS=
++ read -r line
+++ echo spec:
+++ sed -e 's/ *#.*$//'
++ nocomments=spec:
++ echo spec:
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo spec:
++ IFS=
++ read -r line
+++ echo '  # Supports persistent and ephemeral inline volumes.'
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  # Supports persistent and ephemeral inline volumes.'
++ IFS=
++ read -r line
+++ echo '  volumeLifecycleModes:'
+++ sed -e 's/ *#.*$//'
++ nocomments='  volumeLifecycleModes:'
++ echo '  volumeLifecycleModes:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  volumeLifecycleModes:'
++ IFS=
++ read -r line
+++ echo '  - Persistent'
+++ sed -e 's/ *#.*$//'
++ nocomments='  - Persistent'
++ echo '  - Persistent'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  - Persistent'
++ IFS=
++ read -r line
+++ echo '  - Ephemeral'
+++ sed -e 's/ *#.*$//'
++ nocomments='  - Ephemeral'
++ echo '  - Ephemeral'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  - Ephemeral'
++ IFS=
++ read -r line
+++ echo '  # To determine at runtime which mode a volume uses, pod info and its'
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  # To determine at runtime which mode a volume uses, pod info and its'
++ IFS=
++ read -r line
+++ echo '  # "csi.storage.k8s.io/ephemeral" entry are needed.'
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  # "csi.storage.k8s.io/ephemeral" entry are needed.'
++ IFS=
++ read -r line
+++ echo '  podInfoOnMount: true'
+++ sed -e 's/ *#.*$//'
++ nocomments='  podInfoOnMount: true'
++ echo '  podInfoOnMount: true'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  podInfoOnMount: true'
++ IFS=
++ read -r line
+++ echo '  # No attacher needed.'
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  # No attacher needed.'
++ IFS=
++ read -r line
+++ echo '  attachRequired: false'
+++ sed -e 's/ *#.*$//'
++ nocomments='  attachRequired: false'
++ echo '  attachRequired: false'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  attachRequired: false'
++ IFS=
++ read -r line
+++ echo '  storageCapacity: true'
+++ sed -e 's/ *#.*$//'
++ nocomments='  storageCapacity: true'
++ echo '  storageCapacity: true'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  storageCapacity: true'
++ IFS=
++ read -r line
+++ echo '  # Kubernetes may use fsGroup to change permissions and ownership '
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  # Kubernetes may use fsGroup to change permissions and ownership '
++ IFS=
++ read -r line
+++ echo '  # of the volume to match user requested fsGroup in the pod'\''s SecurityPolicy'
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  # of the volume to match user requested fsGroup in the pod'\''s SecurityPolicy'
++ IFS=
++ read -r line
+++ echo '  fsGroupPolicy: File'
+++ sed -e 's/ *#.*$//'
++ nocomments='  fsGroupPolicy: File'
++ echo '  fsGroupPolicy: File'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  fsGroupPolicy: File'
++ IFS=
++ read -r line
+ modified='apiVersion: storage.k8s.io/v1
kind: CSIDriver
metadata:
  name: hostpath.csi.k8s.io
  labels:
    app.kubernetes.io/instance: hostpath.csi.k8s.io
    app.kubernetes.io/part-of: csi-driver-host-path
    app.kubernetes.io/name: hostpath.csi.k8s.io
    app.kubernetes.io/component: csi-driver
spec:
  # Supports persistent and ephemeral inline volumes.
  volumeLifecycleModes:
  - Persistent
  - Ephemeral
  # To determine at runtime which mode a volume uses, pod info and its
  # "csi.storage.k8s.io/ephemeral" entry are needed.
  podInfoOnMount: true
  # No attacher needed.
  attachRequired: false
  storageCapacity: true
  # Kubernetes may use fsGroup to change permissions and ownership 
  # of the volume to match user requested fsGroup in the pod'\''s SecurityPolicy
  fsGroupPolicy: File'
+ echo 'apiVersion: storage.k8s.io/v1
kind: CSIDriver
metadata:
  name: hostpath.csi.k8s.io
  labels:
    app.kubernetes.io/instance: hostpath.csi.k8s.io
    app.kubernetes.io/part-of: csi-driver-host-path
    app.kubernetes.io/name: hostpath.csi.k8s.io
    app.kubernetes.io/component: csi-driver
spec:
  # Supports persistent and ephemeral inline volumes.
  volumeLifecycleModes:
  - Persistent
  - Ephemeral
  # To determine at runtime which mode a volume uses, pod info and its
  # "csi.storage.k8s.io/ephemeral" entry are needed.
  podInfoOnMount: true
  # No attacher needed.
  attachRequired: false
  storageCapacity: true
  # Kubernetes may use fsGroup to change permissions and ownership 
  # of the volume to match user requested fsGroup in the pod'\''s SecurityPolicy
  fsGroupPolicy: File'
+ kubectl apply -f -
csidriver.storage.k8s.io/hostpath.csi.k8s.io created
+ for i in $(ls ${BASE_DIR}/hostpath/*.yaml | sort)
+ echo '   ./hostpath/csi-hostpath-plugin.yaml'
   ./hostpath/csi-hostpath-plugin.yaml
++ cat ./hostpath/csi-hostpath-plugin.yaml
++ sed -e 's;/var/lib/kubelet/;/var/lib/kubelet/;'
++ IFS=
++ read -r line
+++ echo '# All of the individual sidecar RBAC roles get bound'
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '# All of the individual sidecar RBAC roles get bound'
++ IFS=
++ read -r line
+++ echo '# to this account.'
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '# to this account.'
++ IFS=
++ read -r line
+++ echo 'kind: ServiceAccount'
+++ sed -e 's/ *#.*$//'
++ nocomments='kind: ServiceAccount'
++ echo 'kind: ServiceAccount'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo 'kind: ServiceAccount'
++ IFS=
++ read -r line
+++ echo 'apiVersion: v1'
+++ sed -e 's/ *#.*$//'
++ nocomments='apiVersion: v1'
++ echo 'apiVersion: v1'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo 'apiVersion: v1'
++ IFS=
++ read -r line
+++ echo metadata:
+++ sed -e 's/ *#.*$//'
++ nocomments=metadata:
++ echo metadata:
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo metadata:
++ IFS=
++ read -r line
+++ echo '  name: csi-hostpathplugin-sa'
+++ sed -e 's/ *#.*$//'
++ nocomments='  name: csi-hostpathplugin-sa'
++ echo '  name: csi-hostpathplugin-sa'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  name: csi-hostpathplugin-sa'
++ IFS=
++ read -r line
+++ echo '  namespace: default'
+++ sed -e 's/ *#.*$//'
++ nocomments='  namespace: default'
++ echo '  namespace: default'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  namespace: default'
++ IFS=
++ read -r line
+++ echo '  labels:'
+++ sed -e 's/ *#.*$//'
++ nocomments='  labels:'
++ echo '  labels:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  labels:'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/part-of: csi-driver-host-path'
++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/name: csi-hostpathplugin'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/name: csi-hostpathplugin'
++ echo '    app.kubernetes.io/name: csi-hostpathplugin'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/name: csi-hostpathplugin'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/component: serviceaccount'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/component: serviceaccount'
++ echo '    app.kubernetes.io/component: serviceaccount'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/component: serviceaccount'
++ IFS=
++ read -r line
+++ echo ---
+++ sed -e 's/ *#.*$//'
++ nocomments=---
++ echo ---
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo ---
++ IFS=
++ read -r line
+++ echo 'apiVersion: rbac.authorization.k8s.io/v1'
+++ sed -e 's/ *#.*$//'
++ nocomments='apiVersion: rbac.authorization.k8s.io/v1'
++ echo 'apiVersion: rbac.authorization.k8s.io/v1'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo 'apiVersion: rbac.authorization.k8s.io/v1'
++ IFS=
++ read -r line
+++ echo 'kind: ClusterRoleBinding'
+++ sed -e 's/ *#.*$//'
++ nocomments='kind: ClusterRoleBinding'
++ echo 'kind: ClusterRoleBinding'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo 'kind: ClusterRoleBinding'
++ IFS=
++ read -r line
+++ echo metadata:
+++ sed -e 's/ *#.*$//'
++ nocomments=metadata:
++ echo metadata:
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo metadata:
++ IFS=
++ read -r line
+++ echo '  labels:'
+++ sed -e 's/ *#.*$//'
++ nocomments='  labels:'
++ echo '  labels:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  labels:'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/part-of: csi-driver-host-path'
++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/name: csi-hostpathplugin'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/name: csi-hostpathplugin'
++ echo '    app.kubernetes.io/name: csi-hostpathplugin'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/name: csi-hostpathplugin'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/component: provisioner-cluster-role'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/component: provisioner-cluster-role'
++ echo '    app.kubernetes.io/component: provisioner-cluster-role'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/component: provisioner-cluster-role'
++ IFS=
++ read -r line
+++ echo '  name: csi-hostpathplugin-provisioner-cluster-role'
+++ sed -e 's/ *#.*$//'
++ nocomments='  name: csi-hostpathplugin-provisioner-cluster-role'
++ echo '  name: csi-hostpathplugin-provisioner-cluster-role'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  name: csi-hostpathplugin-provisioner-cluster-role'
++ IFS=
++ read -r line
+++ echo roleRef:
+++ sed -e 's/ *#.*$//'
++ nocomments=roleRef:
++ echo roleRef:
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo roleRef:
++ IFS=
++ read -r line
+++ echo '  apiGroup: rbac.authorization.k8s.io'
+++ sed -e 's/ *#.*$//'
++ nocomments='  apiGroup: rbac.authorization.k8s.io'
++ echo '  apiGroup: rbac.authorization.k8s.io'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  apiGroup: rbac.authorization.k8s.io'
++ IFS=
++ read -r line
+++ echo '  kind: ClusterRole'
+++ sed -e 's/ *#.*$//'
++ nocomments='  kind: ClusterRole'
++ echo '  kind: ClusterRole'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  kind: ClusterRole'
++ IFS=
++ read -r line
+++ echo '  name: external-provisioner-runner'
+++ sed -e 's/ *#.*$//'
++ nocomments='  name: external-provisioner-runner'
++ echo '  name: external-provisioner-runner'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  name: external-provisioner-runner'
++ IFS=
++ read -r line
+++ echo subjects:
+++ sed -e 's/ *#.*$//'
++ nocomments=subjects:
++ echo subjects:
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo subjects:
++ IFS=
++ read -r line
+++ echo '- kind: ServiceAccount'
+++ sed -e 's/ *#.*$//'
++ nocomments='- kind: ServiceAccount'
++ echo '- kind: ServiceAccount'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '- kind: ServiceAccount'
++ IFS=
++ read -r line
+++ echo '  name: csi-hostpathplugin-sa'
+++ sed -e 's/ *#.*$//'
++ nocomments='  name: csi-hostpathplugin-sa'
++ echo '  name: csi-hostpathplugin-sa'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  name: csi-hostpathplugin-sa'
++ IFS=
++ read -r line
+++ echo '  namespace: default'
+++ sed -e 's/ *#.*$//'
++ nocomments='  namespace: default'
++ echo '  namespace: default'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  namespace: default'
++ IFS=
++ read -r line
+++ echo ---
+++ sed -e 's/ *#.*$//'
++ nocomments=---
++ echo ---
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo ---
++ IFS=
++ read -r line
+++ echo 'apiVersion: rbac.authorization.k8s.io/v1'
+++ sed -e 's/ *#.*$//'
++ nocomments='apiVersion: rbac.authorization.k8s.io/v1'
++ echo 'apiVersion: rbac.authorization.k8s.io/v1'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo 'apiVersion: rbac.authorization.k8s.io/v1'
++ IFS=
++ read -r line
+++ echo 'kind: ClusterRoleBinding'
+++ sed -e 's/ *#.*$//'
++ nocomments='kind: ClusterRoleBinding'
++ echo 'kind: ClusterRoleBinding'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo 'kind: ClusterRoleBinding'
++ IFS=
++ read -r line
+++ echo metadata:
+++ sed -e 's/ *#.*$//'
++ nocomments=metadata:
++ echo metadata:
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo metadata:
++ IFS=
++ read -r line
+++ echo '  labels:'
+++ sed -e 's/ *#.*$//'
++ nocomments='  labels:'
++ echo '  labels:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  labels:'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/part-of: csi-driver-host-path'
++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/name: csi-hostpathplugin'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/name: csi-hostpathplugin'
++ echo '    app.kubernetes.io/name: csi-hostpathplugin'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/name: csi-hostpathplugin'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/component: snapshotter-cluster-role'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/component: snapshotter-cluster-role'
++ echo '    app.kubernetes.io/component: snapshotter-cluster-role'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/component: snapshotter-cluster-role'
++ IFS=
++ read -r line
+++ echo '  name: csi-hostpathplugin-snapshotter-cluster-role'
+++ sed -e 's/ *#.*$//'
++ nocomments='  name: csi-hostpathplugin-snapshotter-cluster-role'
++ echo '  name: csi-hostpathplugin-snapshotter-cluster-role'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  name: csi-hostpathplugin-snapshotter-cluster-role'
++ IFS=
++ read -r line
+++ echo roleRef:
+++ sed -e 's/ *#.*$//'
++ nocomments=roleRef:
++ echo roleRef:
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo roleRef:
++ IFS=
++ read -r line
+++ echo '  apiGroup: rbac.authorization.k8s.io'
+++ sed -e 's/ *#.*$//'
++ nocomments='  apiGroup: rbac.authorization.k8s.io'
++ echo '  apiGroup: rbac.authorization.k8s.io'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  apiGroup: rbac.authorization.k8s.io'
++ IFS=
++ read -r line
+++ echo '  kind: ClusterRole'
+++ sed -e 's/ *#.*$//'
++ nocomments='  kind: ClusterRole'
++ echo '  kind: ClusterRole'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  kind: ClusterRole'
++ IFS=
++ read -r line
+++ echo '  name: external-snapshotter-runner'
+++ sed -e 's/ *#.*$//'
++ nocomments='  name: external-snapshotter-runner'
++ echo '  name: external-snapshotter-runner'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  name: external-snapshotter-runner'
++ IFS=
++ read -r line
+++ echo subjects:
+++ sed -e 's/ *#.*$//'
++ nocomments=subjects:
++ echo subjects:
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo subjects:
++ IFS=
++ read -r line
+++ echo '- kind: ServiceAccount'
+++ sed -e 's/ *#.*$//'
++ nocomments='- kind: ServiceAccount'
++ echo '- kind: ServiceAccount'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '- kind: ServiceAccount'
++ IFS=
++ read -r line
+++ echo '  name: csi-hostpathplugin-sa'
+++ sed -e 's/ *#.*$//'
++ nocomments='  name: csi-hostpathplugin-sa'
++ echo '  name: csi-hostpathplugin-sa'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  name: csi-hostpathplugin-sa'
++ IFS=
++ read -r line
+++ echo '  namespace: default'
+++ sed -e 's/ *#.*$//'
++ nocomments='  namespace: default'
++ echo '  namespace: default'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  namespace: default'
++ IFS=
++ read -r line
+++ echo ---
+++ sed -e 's/ *#.*$//'
++ nocomments=---
++ echo ---
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo ---
++ IFS=
++ read -r line
+++ echo 'apiVersion: rbac.authorization.k8s.io/v1'
+++ sed -e 's/ *#.*$//'
++ nocomments='apiVersion: rbac.authorization.k8s.io/v1'
++ echo 'apiVersion: rbac.authorization.k8s.io/v1'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo 'apiVersion: rbac.authorization.k8s.io/v1'
++ IFS=
++ read -r line
+++ echo 'kind: RoleBinding'
+++ sed -e 's/ *#.*$//'
++ nocomments='kind: RoleBinding'
++ echo 'kind: RoleBinding'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo 'kind: RoleBinding'
++ IFS=
++ read -r line
+++ echo metadata:
+++ sed -e 's/ *#.*$//'
++ nocomments=metadata:
++ echo metadata:
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo metadata:
++ IFS=
++ read -r line
+++ echo '  labels:'
+++ sed -e 's/ *#.*$//'
++ nocomments='  labels:'
++ echo '  labels:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  labels:'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/part-of: csi-driver-host-path'
++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/name: csi-hostpathplugin'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/name: csi-hostpathplugin'
++ echo '    app.kubernetes.io/name: csi-hostpathplugin'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/name: csi-hostpathplugin'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/component: provisioner-role'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/component: provisioner-role'
++ echo '    app.kubernetes.io/component: provisioner-role'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/component: provisioner-role'
++ IFS=
++ read -r line
+++ echo '  name: csi-hostpathplugin-provisioner-role'
+++ sed -e 's/ *#.*$//'
++ nocomments='  name: csi-hostpathplugin-provisioner-role'
++ echo '  name: csi-hostpathplugin-provisioner-role'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  name: csi-hostpathplugin-provisioner-role'
++ IFS=
++ read -r line
+++ echo roleRef:
+++ sed -e 's/ *#.*$//'
++ nocomments=roleRef:
++ echo roleRef:
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo roleRef:
++ IFS=
++ read -r line
+++ echo '  apiGroup: rbac.authorization.k8s.io'
+++ sed -e 's/ *#.*$//'
++ nocomments='  apiGroup: rbac.authorization.k8s.io'
++ echo '  apiGroup: rbac.authorization.k8s.io'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  apiGroup: rbac.authorization.k8s.io'
++ IFS=
++ read -r line
+++ echo '  kind: Role'
+++ sed -e 's/ *#.*$//'
++ nocomments='  kind: Role'
++ echo '  kind: Role'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  kind: Role'
++ IFS=
++ read -r line
+++ echo '  name: external-provisioner-cfg'
+++ sed -e 's/ *#.*$//'
++ nocomments='  name: external-provisioner-cfg'
++ echo '  name: external-provisioner-cfg'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  name: external-provisioner-cfg'
++ IFS=
++ read -r line
+++ echo subjects:
+++ sed -e 's/ *#.*$//'
++ nocomments=subjects:
++ echo subjects:
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo subjects:
++ IFS=
++ read -r line
+++ echo '- kind: ServiceAccount'
+++ sed -e 's/ *#.*$//'
++ nocomments='- kind: ServiceAccount'
++ echo '- kind: ServiceAccount'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '- kind: ServiceAccount'
++ IFS=
++ read -r line
+++ echo '  name: csi-hostpathplugin-sa'
+++ sed -e 's/ *#.*$//'
++ nocomments='  name: csi-hostpathplugin-sa'
++ echo '  name: csi-hostpathplugin-sa'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  name: csi-hostpathplugin-sa'
++ IFS=
++ read -r line
+++ echo ---
+++ sed -e 's/ *#.*$//'
++ nocomments=---
++ echo ---
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo ---
++ IFS=
++ read -r line
+++ echo 'apiVersion: rbac.authorization.k8s.io/v1'
+++ sed -e 's/ *#.*$//'
++ nocomments='apiVersion: rbac.authorization.k8s.io/v1'
++ echo 'apiVersion: rbac.authorization.k8s.io/v1'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo 'apiVersion: rbac.authorization.k8s.io/v1'
++ IFS=
++ read -r line
+++ echo 'kind: RoleBinding'
+++ sed -e 's/ *#.*$//'
++ nocomments='kind: RoleBinding'
++ echo 'kind: RoleBinding'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo 'kind: RoleBinding'
++ IFS=
++ read -r line
+++ echo metadata:
+++ sed -e 's/ *#.*$//'
++ nocomments=metadata:
++ echo metadata:
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo metadata:
++ IFS=
++ read -r line
+++ echo '  labels:'
+++ sed -e 's/ *#.*$//'
++ nocomments='  labels:'
++ echo '  labels:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  labels:'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/part-of: csi-driver-host-path'
++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/name: csi-hostpathplugin'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/name: csi-hostpathplugin'
++ echo '    app.kubernetes.io/name: csi-hostpathplugin'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/name: csi-hostpathplugin'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/component: snapshotter-role'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/component: snapshotter-role'
++ echo '    app.kubernetes.io/component: snapshotter-role'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/component: snapshotter-role'
++ IFS=
++ read -r line
+++ echo '  name: csi-hostpathplugin-snapshotter-role'
+++ sed -e 's/ *#.*$//'
++ nocomments='  name: csi-hostpathplugin-snapshotter-role'
++ echo '  name: csi-hostpathplugin-snapshotter-role'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  name: csi-hostpathplugin-snapshotter-role'
++ IFS=
++ read -r line
+++ echo roleRef:
+++ sed -e 's/ *#.*$//'
++ nocomments=roleRef:
++ echo roleRef:
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo roleRef:
++ IFS=
++ read -r line
+++ echo '  apiGroup: rbac.authorization.k8s.io'
+++ sed -e 's/ *#.*$//'
++ nocomments='  apiGroup: rbac.authorization.k8s.io'
++ echo '  apiGroup: rbac.authorization.k8s.io'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  apiGroup: rbac.authorization.k8s.io'
++ IFS=
++ read -r line
+++ echo '  kind: Role'
+++ sed -e 's/ *#.*$//'
++ nocomments='  kind: Role'
++ echo '  kind: Role'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  kind: Role'
++ IFS=
++ read -r line
+++ echo '  name: external-snapshotter-leaderelection'
+++ sed -e 's/ *#.*$//'
++ nocomments='  name: external-snapshotter-leaderelection'
++ echo '  name: external-snapshotter-leaderelection'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  name: external-snapshotter-leaderelection'
++ IFS=
++ read -r line
+++ echo subjects:
+++ sed -e 's/ *#.*$//'
++ nocomments=subjects:
++ echo subjects:
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo subjects:
++ IFS=
++ read -r line
+++ echo '- kind: ServiceAccount'
+++ sed -e 's/ *#.*$//'
++ nocomments='- kind: ServiceAccount'
++ echo '- kind: ServiceAccount'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '- kind: ServiceAccount'
++ IFS=
++ read -r line
+++ echo '  name: csi-hostpathplugin-sa'
+++ sed -e 's/ *#.*$//'
++ nocomments='  name: csi-hostpathplugin-sa'
++ echo '  name: csi-hostpathplugin-sa'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  name: csi-hostpathplugin-sa'
++ IFS=
++ read -r line
+++ echo ---
+++ sed -e 's/ *#.*$//'
++ nocomments=---
++ echo ---
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo ---
++ IFS=
++ read -r line
+++ echo 'kind: DaemonSet'
+++ sed -e 's/ *#.*$//'
++ nocomments='kind: DaemonSet'
++ echo 'kind: DaemonSet'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo 'kind: DaemonSet'
++ IFS=
++ read -r line
+++ echo 'apiVersion: apps/v1'
+++ sed -e 's/ *#.*$//'
++ nocomments='apiVersion: apps/v1'
++ echo 'apiVersion: apps/v1'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo 'apiVersion: apps/v1'
++ IFS=
++ read -r line
+++ echo metadata:
+++ sed -e 's/ *#.*$//'
++ nocomments=metadata:
++ echo metadata:
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo metadata:
++ IFS=
++ read -r line
+++ echo '  name: csi-hostpathplugin'
+++ sed -e 's/ *#.*$//'
++ nocomments='  name: csi-hostpathplugin'
++ echo '  name: csi-hostpathplugin'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  name: csi-hostpathplugin'
++ IFS=
++ read -r line
+++ echo '  labels:'
+++ sed -e 's/ *#.*$//'
++ nocomments='  labels:'
++ echo '  labels:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  labels:'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/part-of: csi-driver-host-path'
++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/name: csi-hostpathplugin'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/name: csi-hostpathplugin'
++ echo '    app.kubernetes.io/name: csi-hostpathplugin'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/name: csi-hostpathplugin'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/component: plugin'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/component: plugin'
++ echo '    app.kubernetes.io/component: plugin'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/component: plugin'
++ IFS=
++ read -r line
+++ echo spec:
+++ sed -e 's/ *#.*$//'
++ nocomments=spec:
++ echo spec:
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo spec:
++ IFS=
++ read -r line
+++ echo '  selector:'
+++ sed -e 's/ *#.*$//'
++ nocomments='  selector:'
++ echo '  selector:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  selector:'
++ IFS=
++ read -r line
+++ echo '    matchLabels:'
+++ sed -e 's/ *#.*$//'
++ nocomments='    matchLabels:'
++ echo '    matchLabels:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    matchLabels:'
++ IFS=
++ read -r line
+++ echo '      app.kubernetes.io/instance: hostpath.csi.k8s.io'
+++ sed -e 's/ *#.*$//'
++ nocomments='      app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ echo '      app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '      app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ IFS=
++ read -r line
+++ echo '      app.kubernetes.io/part-of: csi-driver-host-path'
+++ sed -e 's/ *#.*$//'
++ nocomments='      app.kubernetes.io/part-of: csi-driver-host-path'
++ echo '      app.kubernetes.io/part-of: csi-driver-host-path'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '      app.kubernetes.io/part-of: csi-driver-host-path'
++ IFS=
++ read -r line
+++ echo '      app.kubernetes.io/name: csi-hostpathplugin'
+++ sed -e 's/ *#.*$//'
++ nocomments='      app.kubernetes.io/name: csi-hostpathplugin'
++ echo '      app.kubernetes.io/name: csi-hostpathplugin'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '      app.kubernetes.io/name: csi-hostpathplugin'
++ IFS=
++ read -r line
+++ echo '      app.kubernetes.io/component: plugin'
+++ sed -e 's/ *#.*$//'
++ nocomments='      app.kubernetes.io/component: plugin'
++ echo '      app.kubernetes.io/component: plugin'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '      app.kubernetes.io/component: plugin'
++ IFS=
++ read -r line
+++ echo '  template:'
+++ sed -e 's/ *#.*$//'
++ nocomments='  template:'
++ echo '  template:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  template:'
++ IFS=
++ read -r line
+++ echo '    metadata:'
+++ sed -e 's/ *#.*$//'
++ nocomments='    metadata:'
++ echo '    metadata:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    metadata:'
++ IFS=
++ read -r line
+++ echo '      labels:'
+++ sed -e 's/ *#.*$//'
++ nocomments='      labels:'
++ echo '      labels:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '      labels:'
++ IFS=
++ read -r line
+++ echo '        app.kubernetes.io/instance: hostpath.csi.k8s.io'
+++ sed -e 's/ *#.*$//'
++ nocomments='        app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ echo '        app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '        app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ IFS=
++ read -r line
+++ echo '        app.kubernetes.io/part-of: csi-driver-host-path'
+++ sed -e 's/ *#.*$//'
++ nocomments='        app.kubernetes.io/part-of: csi-driver-host-path'
++ echo '        app.kubernetes.io/part-of: csi-driver-host-path'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '        app.kubernetes.io/part-of: csi-driver-host-path'
++ IFS=
++ read -r line
+++ echo '        app.kubernetes.io/name: csi-hostpathplugin'
+++ sed -e 's/ *#.*$//'
++ nocomments='        app.kubernetes.io/name: csi-hostpathplugin'
++ echo '        app.kubernetes.io/name: csi-hostpathplugin'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '        app.kubernetes.io/name: csi-hostpathplugin'
++ IFS=
++ read -r line
+++ echo '        app.kubernetes.io/component: plugin'
+++ sed -e 's/ *#.*$//'
++ nocomments='        app.kubernetes.io/component: plugin'
++ echo '        app.kubernetes.io/component: plugin'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '        app.kubernetes.io/component: plugin'
++ IFS=
++ read -r line
+++ echo '    spec:'
+++ sed -e 's/ *#.*$//'
++ nocomments='    spec:'
++ echo '    spec:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    spec:'
++ IFS=
++ read -r line
+++ echo '      serviceAccountName: csi-hostpathplugin-sa'
+++ sed -e 's/ *#.*$//'
++ nocomments='      serviceAccountName: csi-hostpathplugin-sa'
++ echo '      serviceAccountName: csi-hostpathplugin-sa'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '      serviceAccountName: csi-hostpathplugin-sa'
++ IFS=
++ read -r line
+++ echo '      containers:'
+++ sed -e 's/ *#.*$//'
++ nocomments='      containers:'
++ echo '      containers:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '      containers:'
++ IFS=
++ read -r line
+++ echo '        - name: csi-provisioner'
+++ sed -e 's/ *#.*$//'
++ nocomments='        - name: csi-provisioner'
++ echo '        - name: csi-provisioner'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '        - name: csi-provisioner'
++ IFS=
++ read -r line
+++ echo '          image: registry.k8s.io/sig-storage/csi-provisioner:v3.3.0'
+++ sed -e 's/ *#.*$//'
++ nocomments='          image: registry.k8s.io/sig-storage/csi-provisioner:v3.3.0'
++ echo '          image: registry.k8s.io/sig-storage/csi-provisioner:v3.3.0'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
+++ echo '          image: registry.k8s.io/sig-storage/csi-provisioner:v3.3.0'
+++ sed -e 's;.*image:[[:space:]]*;;'
++ image=registry.k8s.io/sig-storage/csi-provisioner:v3.3.0
+++ echo registry.k8s.io/sig-storage/csi-provisioner:v3.3.0
+++ sed -e 's;\(.*\)/.*;\1;'
++ registry=registry.k8s.io/sig-storage
+++ echo registry.k8s.io/sig-storage/csi-provisioner:v3.3.0
+++ sed -e 's;.*/\([^:]*\).*;\1;'
++ name=csi-provisioner
+++ echo registry.k8s.io/sig-storage/csi-provisioner:v3.3.0
+++ sed -e 's;.*:;;'
++ tag=v3.3.0
+++ echo csi-provisioner
+++ tr - _
+++ tr a-z A-Z
++ varname=CSI_PROVISIONER
++ update_image csi-provisioner
++ case "$1" in
+++ eval echo '${CSI_PROVISIONER_REGISTRY:-registry.k8s.io/sig-storage}/'
++++ echo registry.k8s.io/sig-storage/
+++ sed -e 's;none/;;'
++ prefix=registry.k8s.io/sig-storage/
++ '[' '' = canary ']'
+++ eval echo ':${CSI_PROVISIONER_TAG:-v3.3.0}'
++++ echo :v3.3.0
++ suffix=:v3.3.0
+++ echo '          image: registry.k8s.io/sig-storage/csi-provisioner:v3.3.0'
+++ sed -e 's;registry.k8s.io/sig-storage/csi-provisioner:v3.3.0;registry.k8s.io/sig-storage/csi-provisioner:v3.3.0;'
++ line='          image: registry.k8s.io/sig-storage/csi-provisioner:v3.3.0'
++ echo '        using           image: registry.k8s.io/sig-storage/csi-provisioner:v3.3.0'
        using           image: registry.k8s.io/sig-storage/csi-provisioner:v3.3.0
++ true
++ echo '          image: registry.k8s.io/sig-storage/csi-provisioner:v3.3.0'
++ IFS=
++ read -r line
+++ echo '          args:'
+++ sed -e 's/ *#.*$//'
++ nocomments='          args:'
++ echo '          args:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          args:'
++ IFS=
++ read -r line
+++ echo '            - -v=5'
+++ sed -e 's/ *#.*$//'
++ nocomments='            - -v=5'
++ echo '            - -v=5'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            - -v=5'
++ IFS=
++ read -r line
+++ echo '            - --csi-address=/csi/csi.sock'
+++ sed -e 's/ *#.*$//'
++ nocomments='            - --csi-address=/csi/csi.sock'
++ echo '            - --csi-address=/csi/csi.sock'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            - --csi-address=/csi/csi.sock'
++ IFS=
++ read -r line
+++ echo '            - --feature-gates=Topology=true'
+++ sed -e 's/ *#.*$//'
++ nocomments='            - --feature-gates=Topology=true'
++ echo '            - --feature-gates=Topology=true'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            - --feature-gates=Topology=true'
++ IFS=
++ read -r line
+++ echo '            - --enable-capacity'
+++ sed -e 's/ *#.*$//'
++ nocomments='            - --enable-capacity'
++ echo '            - --enable-capacity'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            - --enable-capacity'
++ IFS=
++ read -r line
+++ echo '            - --capacity-ownerref-level=0 # pod is owner'
+++ sed -e 's/ *#.*$//'
++ nocomments='            - --capacity-ownerref-level=0'
++ echo '            - --capacity-ownerref-level=0'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            - --capacity-ownerref-level=0 # pod is owner'
++ IFS=
++ read -r line
+++ echo '            - --node-deployment=true'
+++ sed -e 's/ *#.*$//'
++ nocomments='            - --node-deployment=true'
++ echo '            - --node-deployment=true'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            - --node-deployment=true'
++ IFS=
++ read -r line
+++ echo '            - --strict-topology=true'
+++ sed -e 's/ *#.*$//'
++ nocomments='            - --strict-topology=true'
++ echo '            - --strict-topology=true'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            - --strict-topology=true'
++ IFS=
++ read -r line
+++ echo '            - --immediate-topology=false'
+++ sed -e 's/ *#.*$//'
++ nocomments='            - --immediate-topology=false'
++ echo '            - --immediate-topology=false'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            - --immediate-topology=false'
++ IFS=
++ read -r line
+++ echo '            - --worker-threads=5'
+++ sed -e 's/ *#.*$//'
++ nocomments='            - --worker-threads=5'
++ echo '            - --worker-threads=5'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            - --worker-threads=5'
++ IFS=
++ read -r line
+++ echo '          env:'
+++ sed -e 's/ *#.*$//'
++ nocomments='          env:'
++ echo '          env:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          env:'
++ IFS=
++ read -r line
+++ echo '          - name: NODE_NAME'
+++ sed -e 's/ *#.*$//'
++ nocomments='          - name: NODE_NAME'
++ echo '          - name: NODE_NAME'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          - name: NODE_NAME'
++ IFS=
++ read -r line
+++ echo '            valueFrom:'
+++ sed -e 's/ *#.*$//'
++ nocomments='            valueFrom:'
++ echo '            valueFrom:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            valueFrom:'
++ IFS=
++ read -r line
+++ echo '              fieldRef:'
+++ sed -e 's/ *#.*$//'
++ nocomments='              fieldRef:'
++ echo '              fieldRef:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '              fieldRef:'
++ IFS=
++ read -r line
+++ echo '                apiVersion: v1'
+++ sed -e 's/ *#.*$//'
++ nocomments='                apiVersion: v1'
++ echo '                apiVersion: v1'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '                apiVersion: v1'
++ IFS=
++ read -r line
+++ echo '                fieldPath: spec.nodeName'
+++ sed -e 's/ *#.*$//'
++ nocomments='                fieldPath: spec.nodeName'
++ echo '                fieldPath: spec.nodeName'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '                fieldPath: spec.nodeName'
++ IFS=
++ read -r line
+++ echo '          - name: NAMESPACE'
+++ sed -e 's/ *#.*$//'
++ nocomments='          - name: NAMESPACE'
++ echo '          - name: NAMESPACE'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          - name: NAMESPACE'
++ IFS=
++ read -r line
+++ echo '            valueFrom:'
+++ sed -e 's/ *#.*$//'
++ nocomments='            valueFrom:'
++ echo '            valueFrom:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            valueFrom:'
++ IFS=
++ read -r line
+++ echo '              fieldRef:'
+++ sed -e 's/ *#.*$//'
++ nocomments='              fieldRef:'
++ echo '              fieldRef:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '              fieldRef:'
++ IFS=
++ read -r line
+++ echo '                fieldPath: metadata.namespace'
+++ sed -e 's/ *#.*$//'
++ nocomments='                fieldPath: metadata.namespace'
++ echo '                fieldPath: metadata.namespace'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '                fieldPath: metadata.namespace'
++ IFS=
++ read -r line
+++ echo '          - name: POD_NAME'
+++ sed -e 's/ *#.*$//'
++ nocomments='          - name: POD_NAME'
++ echo '          - name: POD_NAME'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          - name: POD_NAME'
++ IFS=
++ read -r line
+++ echo '            valueFrom:'
+++ sed -e 's/ *#.*$//'
++ nocomments='            valueFrom:'
++ echo '            valueFrom:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            valueFrom:'
++ IFS=
++ read -r line
+++ echo '              fieldRef:'
+++ sed -e 's/ *#.*$//'
++ nocomments='              fieldRef:'
++ echo '              fieldRef:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '              fieldRef:'
++ IFS=
++ read -r line
+++ echo '                fieldPath: metadata.name'
+++ sed -e 's/ *#.*$//'
++ nocomments='                fieldPath: metadata.name'
++ echo '                fieldPath: metadata.name'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '                fieldPath: metadata.name'
++ IFS=
++ read -r line
+++ echo '          securityContext:'
+++ sed -e 's/ *#.*$//'
++ nocomments='          securityContext:'
++ echo '          securityContext:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          securityContext:'
++ IFS=
++ read -r line
+++ echo '            # This is necessary only for systems with SELinux, where'
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            # This is necessary only for systems with SELinux, where'
++ IFS=
++ read -r line
+++ echo '            # non-privileged sidecar containers cannot access unix domain socket'
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            # non-privileged sidecar containers cannot access unix domain socket'
++ IFS=
++ read -r line
+++ echo '            # created by privileged CSI driver container.'
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            # created by privileged CSI driver container.'
++ IFS=
++ read -r line
+++ echo '            privileged: true'
+++ sed -e 's/ *#.*$//'
++ nocomments='            privileged: true'
++ echo '            privileged: true'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            privileged: true'
++ IFS=
++ read -r line
+++ echo '          volumeMounts:'
+++ sed -e 's/ *#.*$//'
++ nocomments='          volumeMounts:'
++ echo '          volumeMounts:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          volumeMounts:'
++ IFS=
++ read -r line
+++ echo '            - mountPath: /csi'
+++ sed -e 's/ *#.*$//'
++ nocomments='            - mountPath: /csi'
++ echo '            - mountPath: /csi'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            - mountPath: /csi'
++ IFS=
++ read -r line
+++ echo '              name: socket-dir'
+++ sed -e 's/ *#.*$//'
++ nocomments='              name: socket-dir'
++ echo '              name: socket-dir'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '              name: socket-dir'
++ IFS=
++ read -r line
+++ echo ''
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo ''
++ IFS=
++ read -r line
+++ echo '        - name: node-driver-registrar'
+++ sed -e 's/ *#.*$//'
++ nocomments='        - name: node-driver-registrar'
++ echo '        - name: node-driver-registrar'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '        - name: node-driver-registrar'
++ IFS=
++ read -r line
+++ echo '          image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.6.0'
+++ sed -e 's/ *#.*$//'
++ nocomments='          image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.6.0'
++ echo '          image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.6.0'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
+++ echo '          image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.6.0'
+++ sed -e 's;.*image:[[:space:]]*;;'
++ image=registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.6.0
+++ echo registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.6.0
+++ sed -e 's;\(.*\)/.*;\1;'
++ registry=registry.k8s.io/sig-storage
+++ echo registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.6.0
+++ sed -e 's;.*/\([^:]*\).*;\1;'
++ name=csi-node-driver-registrar
+++ echo registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.6.0
+++ sed -e 's;.*:;;'
++ tag=v2.6.0
+++ echo csi-node-driver-registrar
+++ tr - _
+++ tr a-z A-Z
++ varname=CSI_NODE_DRIVER_REGISTRAR
++ update_image csi-node-driver-registrar
++ case "$1" in
+++ eval echo '${CSI_NODE_DRIVER_REGISTRAR_REGISTRY:-registry.k8s.io/sig-storage}/'
++++ echo registry.k8s.io/sig-storage/
+++ sed -e 's;none/;;'
++ prefix=registry.k8s.io/sig-storage/
++ '[' '' = canary ']'
+++ eval echo ':${CSI_NODE_DRIVER_REGISTRAR_TAG:-v2.6.0}'
++++ echo :v2.6.0
++ suffix=:v2.6.0
+++ echo '          image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.6.0'
+++ sed -e 's;registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.6.0;registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.6.0;'
++ line='          image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.6.0'
++ echo '        using           image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.6.0'
        using           image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.6.0
++ true
++ echo '          image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.6.0'
++ IFS=
++ read -r line
+++ echo '          args:'
+++ sed -e 's/ *#.*$//'
++ nocomments='          args:'
++ echo '          args:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          args:'
++ IFS=
++ read -r line
+++ echo '            - --v=5'
+++ sed -e 's/ *#.*$//'
++ nocomments='            - --v=5'
++ echo '            - --v=5'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            - --v=5'
++ IFS=
++ read -r line
+++ echo '            - --csi-address=/csi/csi.sock'
+++ sed -e 's/ *#.*$//'
++ nocomments='            - --csi-address=/csi/csi.sock'
++ echo '            - --csi-address=/csi/csi.sock'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            - --csi-address=/csi/csi.sock'
++ IFS=
++ read -r line
+++ echo '            - --kubelet-registration-path=/var/lib/kubelet/plugins/csi-hostpath/csi.sock'
+++ sed -e 's/ *#.*$//'
++ nocomments='            - --kubelet-registration-path=/var/lib/kubelet/plugins/csi-hostpath/csi.sock'
++ echo '            - --kubelet-registration-path=/var/lib/kubelet/plugins/csi-hostpath/csi.sock'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            - --kubelet-registration-path=/var/lib/kubelet/plugins/csi-hostpath/csi.sock'
++ IFS=
++ read -r line
+++ echo '          securityContext:'
+++ sed -e 's/ *#.*$//'
++ nocomments='          securityContext:'
++ echo '          securityContext:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          securityContext:'
++ IFS=
++ read -r line
+++ echo '            # This is necessary only for systems with SELinux, where'
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            # This is necessary only for systems with SELinux, where'
++ IFS=
++ read -r line
+++ echo '            # non-privileged sidecar containers cannot access unix domain socket'
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            # non-privileged sidecar containers cannot access unix domain socket'
++ IFS=
++ read -r line
+++ echo '            # created by privileged CSI driver container.'
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            # created by privileged CSI driver container.'
++ IFS=
++ read -r line
+++ echo '            privileged: true'
+++ sed -e 's/ *#.*$//'
++ nocomments='            privileged: true'
++ echo '            privileged: true'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            privileged: true'
++ IFS=
++ read -r line
+++ echo '          env:'
+++ sed -e 's/ *#.*$//'
++ nocomments='          env:'
++ echo '          env:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          env:'
++ IFS=
++ read -r line
+++ echo '            - name: KUBE_NODE_NAME'
+++ sed -e 's/ *#.*$//'
++ nocomments='            - name: KUBE_NODE_NAME'
++ echo '            - name: KUBE_NODE_NAME'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            - name: KUBE_NODE_NAME'
++ IFS=
++ read -r line
+++ echo '              valueFrom:'
+++ sed -e 's/ *#.*$//'
++ nocomments='              valueFrom:'
++ echo '              valueFrom:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '              valueFrom:'
++ IFS=
++ read -r line
+++ echo '                fieldRef:'
+++ sed -e 's/ *#.*$//'
++ nocomments='                fieldRef:'
++ echo '                fieldRef:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '                fieldRef:'
++ IFS=
++ read -r line
+++ echo '                  apiVersion: v1'
+++ sed -e 's/ *#.*$//'
++ nocomments='                  apiVersion: v1'
++ echo '                  apiVersion: v1'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '                  apiVersion: v1'
++ IFS=
++ read -r line
+++ echo '                  fieldPath: spec.nodeName'
+++ sed -e 's/ *#.*$//'
++ nocomments='                  fieldPath: spec.nodeName'
++ echo '                  fieldPath: spec.nodeName'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '                  fieldPath: spec.nodeName'
++ IFS=
++ read -r line
+++ echo '          volumeMounts:'
+++ sed -e 's/ *#.*$//'
++ nocomments='          volumeMounts:'
++ echo '          volumeMounts:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          volumeMounts:'
++ IFS=
++ read -r line
+++ echo '          - mountPath: /csi'
+++ sed -e 's/ *#.*$//'
++ nocomments='          - mountPath: /csi'
++ echo '          - mountPath: /csi'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          - mountPath: /csi'
++ IFS=
++ read -r line
+++ echo '            name: socket-dir'
+++ sed -e 's/ *#.*$//'
++ nocomments='            name: socket-dir'
++ echo '            name: socket-dir'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            name: socket-dir'
++ IFS=
++ read -r line
+++ echo '          - mountPath: /registration'
+++ sed -e 's/ *#.*$//'
++ nocomments='          - mountPath: /registration'
++ echo '          - mountPath: /registration'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          - mountPath: /registration'
++ IFS=
++ read -r line
+++ echo '            name: registration-dir'
+++ sed -e 's/ *#.*$//'
++ nocomments='            name: registration-dir'
++ echo '            name: registration-dir'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            name: registration-dir'
++ IFS=
++ read -r line
+++ echo '          - mountPath: /csi-data-dir'
+++ sed -e 's/ *#.*$//'
++ nocomments='          - mountPath: /csi-data-dir'
++ echo '          - mountPath: /csi-data-dir'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          - mountPath: /csi-data-dir'
++ IFS=
++ read -r line
+++ echo '            name: csi-data-dir'
+++ sed -e 's/ *#.*$//'
++ nocomments='            name: csi-data-dir'
++ echo '            name: csi-data-dir'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            name: csi-data-dir'
++ IFS=
++ read -r line
+++ echo ''
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo ''
++ IFS=
++ read -r line
+++ echo '        - name: hostpath'
+++ sed -e 's/ *#.*$//'
++ nocomments='        - name: hostpath'
++ echo '        - name: hostpath'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '        - name: hostpath'
++ IFS=
++ read -r line
+++ echo '          image: registry.k8s.io/sig-storage/hostpathplugin:v1.7.3'
+++ sed -e 's/ *#.*$//'
++ nocomments='          image: registry.k8s.io/sig-storage/hostpathplugin:v1.7.3'
++ echo '          image: registry.k8s.io/sig-storage/hostpathplugin:v1.7.3'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
+++ echo '          image: registry.k8s.io/sig-storage/hostpathplugin:v1.7.3'
+++ sed -e 's;.*image:[[:space:]]*;;'
++ image=registry.k8s.io/sig-storage/hostpathplugin:v1.7.3
+++ echo registry.k8s.io/sig-storage/hostpathplugin:v1.7.3
+++ sed -e 's;\(.*\)/.*;\1;'
++ registry=registry.k8s.io/sig-storage
+++ echo registry.k8s.io/sig-storage/hostpathplugin:v1.7.3
+++ sed -e 's;.*/\([^:]*\).*;\1;'
++ name=hostpathplugin
+++ echo registry.k8s.io/sig-storage/hostpathplugin:v1.7.3
+++ sed -e 's;.*:;;'
++ tag=v1.7.3
+++ echo hostpathplugin
+++ tr - _
+++ tr a-z A-Z
++ varname=HOSTPATHPLUGIN
++ update_image hostpathplugin
++ case "$1" in
+++ eval echo '${HOSTPATHPLUGIN_REGISTRY:-registry.k8s.io/sig-storage}/'
++++ echo registry.k8s.io/sig-storage/
+++ sed -e 's;none/;;'
++ prefix=registry.k8s.io/sig-storage/
++ '[' '' = canary ']'
+++ eval echo ':${HOSTPATHPLUGIN_TAG:-v1.7.3}'
++++ echo :v1.7.3
++ suffix=:v1.7.3
+++ echo '          image: registry.k8s.io/sig-storage/hostpathplugin:v1.7.3'
+++ sed -e 's;registry.k8s.io/sig-storage/hostpathplugin:v1.7.3;registry.k8s.io/sig-storage/hostpathplugin:v1.7.3;'
++ line='          image: registry.k8s.io/sig-storage/hostpathplugin:v1.7.3'
++ echo '        using           image: registry.k8s.io/sig-storage/hostpathplugin:v1.7.3'
        using           image: registry.k8s.io/sig-storage/hostpathplugin:v1.7.3
++ true
++ echo '          image: registry.k8s.io/sig-storage/hostpathplugin:v1.7.3'
++ IFS=
++ read -r line
+++ echo '          args:'
+++ sed -e 's/ *#.*$//'
++ nocomments='          args:'
++ echo '          args:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          args:'
++ IFS=
++ read -r line
+++ echo '            - --drivername=hostpath.csi.k8s.io'
+++ sed -e 's/ *#.*$//'
++ nocomments='            - --drivername=hostpath.csi.k8s.io'
++ echo '            - --drivername=hostpath.csi.k8s.io'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            - --drivername=hostpath.csi.k8s.io'
++ IFS=
++ read -r line
+++ echo '            - --v=5'
+++ sed -e 's/ *#.*$//'
++ nocomments='            - --v=5'
++ echo '            - --v=5'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            - --v=5'
++ IFS=
++ read -r line
+++ echo '            - --endpoint=$(CSI_ENDPOINT)'
+++ sed -e 's/ *#.*$//'
++ nocomments='            - --endpoint=$(CSI_ENDPOINT)'
++ echo '            - --endpoint=$(CSI_ENDPOINT)'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            - --endpoint=$(CSI_ENDPOINT)'
++ IFS=
++ read -r line
+++ echo '            - --nodeid=$(KUBE_NODE_NAME)'
+++ sed -e 's/ *#.*$//'
++ nocomments='            - --nodeid=$(KUBE_NODE_NAME)'
++ echo '            - --nodeid=$(KUBE_NODE_NAME)'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            - --nodeid=$(KUBE_NODE_NAME)'
++ IFS=
++ read -r line
+++ echo '            - --capacity=slow=10Gi'
+++ sed -e 's/ *#.*$//'
++ nocomments='            - --capacity=slow=10Gi'
++ echo '            - --capacity=slow=10Gi'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            - --capacity=slow=10Gi'
++ IFS=
++ read -r line
+++ echo '            - --capacity=fast=100Gi'
+++ sed -e 's/ *#.*$//'
++ nocomments='            - --capacity=fast=100Gi'
++ echo '            - --capacity=fast=100Gi'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            - --capacity=fast=100Gi'
++ IFS=
++ read -r line
+++ echo '          env:'
+++ sed -e 's/ *#.*$//'
++ nocomments='          env:'
++ echo '          env:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          env:'
++ IFS=
++ read -r line
+++ echo '            - name: CSI_ENDPOINT'
+++ sed -e 's/ *#.*$//'
++ nocomments='            - name: CSI_ENDPOINT'
++ echo '            - name: CSI_ENDPOINT'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            - name: CSI_ENDPOINT'
++ IFS=
++ read -r line
+++ echo '              value: unix:///csi/csi.sock'
+++ sed -e 's/ *#.*$//'
++ nocomments='              value: unix:///csi/csi.sock'
++ echo '              value: unix:///csi/csi.sock'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '              value: unix:///csi/csi.sock'
++ IFS=
++ read -r line
+++ echo '            - name: KUBE_NODE_NAME'
+++ sed -e 's/ *#.*$//'
++ nocomments='            - name: KUBE_NODE_NAME'
++ echo '            - name: KUBE_NODE_NAME'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            - name: KUBE_NODE_NAME'
++ IFS=
++ read -r line
+++ echo '              valueFrom:'
+++ sed -e 's/ *#.*$//'
++ nocomments='              valueFrom:'
++ echo '              valueFrom:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '              valueFrom:'
++ IFS=
++ read -r line
+++ echo '                fieldRef:'
+++ sed -e 's/ *#.*$//'
++ nocomments='                fieldRef:'
++ echo '                fieldRef:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '                fieldRef:'
++ IFS=
++ read -r line
+++ echo '                  apiVersion: v1'
+++ sed -e 's/ *#.*$//'
++ nocomments='                  apiVersion: v1'
++ echo '                  apiVersion: v1'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '                  apiVersion: v1'
++ IFS=
++ read -r line
+++ echo '                  fieldPath: spec.nodeName'
+++ sed -e 's/ *#.*$//'
++ nocomments='                  fieldPath: spec.nodeName'
++ echo '                  fieldPath: spec.nodeName'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '                  fieldPath: spec.nodeName'
++ IFS=
++ read -r line
+++ echo '          securityContext:'
+++ sed -e 's/ *#.*$//'
++ nocomments='          securityContext:'
++ echo '          securityContext:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          securityContext:'
++ IFS=
++ read -r line
+++ echo '            privileged: true'
+++ sed -e 's/ *#.*$//'
++ nocomments='            privileged: true'
++ echo '            privileged: true'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            privileged: true'
++ IFS=
++ read -r line
+++ echo '          ports:'
+++ sed -e 's/ *#.*$//'
++ nocomments='          ports:'
++ echo '          ports:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          ports:'
++ IFS=
++ read -r line
+++ echo '          - containerPort: 9898'
+++ sed -e 's/ *#.*$//'
++ nocomments='          - containerPort: 9898'
++ echo '          - containerPort: 9898'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          - containerPort: 9898'
++ IFS=
++ read -r line
+++ echo '            name: healthz'
+++ sed -e 's/ *#.*$//'
++ nocomments='            name: healthz'
++ echo '            name: healthz'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            name: healthz'
++ IFS=
++ read -r line
+++ echo '            protocol: TCP'
+++ sed -e 's/ *#.*$//'
++ nocomments='            protocol: TCP'
++ echo '            protocol: TCP'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            protocol: TCP'
++ IFS=
++ read -r line
+++ echo '          livenessProbe:'
+++ sed -e 's/ *#.*$//'
++ nocomments='          livenessProbe:'
++ echo '          livenessProbe:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          livenessProbe:'
++ IFS=
++ read -r line
+++ echo '            failureThreshold: 5'
+++ sed -e 's/ *#.*$//'
++ nocomments='            failureThreshold: 5'
++ echo '            failureThreshold: 5'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            failureThreshold: 5'
++ IFS=
++ read -r line
+++ echo '            httpGet:'
+++ sed -e 's/ *#.*$//'
++ nocomments='            httpGet:'
++ echo '            httpGet:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            httpGet:'
++ IFS=
++ read -r line
+++ echo '              path: /healthz'
+++ sed -e 's/ *#.*$//'
++ nocomments='              path: /healthz'
++ echo '              path: /healthz'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '              path: /healthz'
++ IFS=
++ read -r line
+++ echo '              port: healthz'
+++ sed -e 's/ *#.*$//'
++ nocomments='              port: healthz'
++ echo '              port: healthz'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '              port: healthz'
++ IFS=
++ read -r line
+++ echo '            initialDelaySeconds: 10'
+++ sed -e 's/ *#.*$//'
++ nocomments='            initialDelaySeconds: 10'
++ echo '            initialDelaySeconds: 10'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            initialDelaySeconds: 10'
++ IFS=
++ read -r line
+++ echo '            timeoutSeconds: 3'
+++ sed -e 's/ *#.*$//'
++ nocomments='            timeoutSeconds: 3'
++ echo '            timeoutSeconds: 3'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            timeoutSeconds: 3'
++ IFS=
++ read -r line
+++ echo '            periodSeconds: 2'
+++ sed -e 's/ *#.*$//'
++ nocomments='            periodSeconds: 2'
++ echo '            periodSeconds: 2'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            periodSeconds: 2'
++ IFS=
++ read -r line
+++ echo '          volumeMounts:'
+++ sed -e 's/ *#.*$//'
++ nocomments='          volumeMounts:'
++ echo '          volumeMounts:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          volumeMounts:'
++ IFS=
++ read -r line
+++ echo '            - mountPath: /csi'
+++ sed -e 's/ *#.*$//'
++ nocomments='            - mountPath: /csi'
++ echo '            - mountPath: /csi'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            - mountPath: /csi'
++ IFS=
++ read -r line
+++ echo '              name: socket-dir'
+++ sed -e 's/ *#.*$//'
++ nocomments='              name: socket-dir'
++ echo '              name: socket-dir'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '              name: socket-dir'
++ IFS=
++ read -r line
+++ echo '            - mountPath: /var/lib/kubelet/pods'
+++ sed -e 's/ *#.*$//'
++ nocomments='            - mountPath: /var/lib/kubelet/pods'
++ echo '            - mountPath: /var/lib/kubelet/pods'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            - mountPath: /var/lib/kubelet/pods'
++ IFS=
++ read -r line
+++ echo '              mountPropagation: Bidirectional'
+++ sed -e 's/ *#.*$//'
++ nocomments='              mountPropagation: Bidirectional'
++ echo '              mountPropagation: Bidirectional'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '              mountPropagation: Bidirectional'
++ IFS=
++ read -r line
+++ echo '              name: mountpoint-dir'
+++ sed -e 's/ *#.*$//'
++ nocomments='              name: mountpoint-dir'
++ echo '              name: mountpoint-dir'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '              name: mountpoint-dir'
++ IFS=
++ read -r line
+++ echo '            - mountPath: /var/lib/kubelet/plugins'
+++ sed -e 's/ *#.*$//'
++ nocomments='            - mountPath: /var/lib/kubelet/plugins'
++ echo '            - mountPath: /var/lib/kubelet/plugins'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            - mountPath: /var/lib/kubelet/plugins'
++ IFS=
++ read -r line
+++ echo '              mountPropagation: Bidirectional'
+++ sed -e 's/ *#.*$//'
++ nocomments='              mountPropagation: Bidirectional'
++ echo '              mountPropagation: Bidirectional'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '              mountPropagation: Bidirectional'
++ IFS=
++ read -r line
+++ echo '              name: plugins-dir'
+++ sed -e 's/ *#.*$//'
++ nocomments='              name: plugins-dir'
++ echo '              name: plugins-dir'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '              name: plugins-dir'
++ IFS=
++ read -r line
+++ echo '            - mountPath: /csi-data-dir'
+++ sed -e 's/ *#.*$//'
++ nocomments='            - mountPath: /csi-data-dir'
++ echo '            - mountPath: /csi-data-dir'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            - mountPath: /csi-data-dir'
++ IFS=
++ read -r line
+++ echo '              name: csi-data-dir'
+++ sed -e 's/ *#.*$//'
++ nocomments='              name: csi-data-dir'
++ echo '              name: csi-data-dir'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '              name: csi-data-dir'
++ IFS=
++ read -r line
+++ echo '            - mountPath: /dev'
+++ sed -e 's/ *#.*$//'
++ nocomments='            - mountPath: /dev'
++ echo '            - mountPath: /dev'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            - mountPath: /dev'
++ IFS=
++ read -r line
+++ echo '              name: dev-dir'
+++ sed -e 's/ *#.*$//'
++ nocomments='              name: dev-dir'
++ echo '              name: dev-dir'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '              name: dev-dir'
++ IFS=
++ read -r line
+++ echo ''
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo ''
++ IFS=
++ read -r line
+++ echo '        - name: liveness-probe'
+++ sed -e 's/ *#.*$//'
++ nocomments='        - name: liveness-probe'
++ echo '        - name: liveness-probe'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '        - name: liveness-probe'
++ IFS=
++ read -r line
+++ echo '          volumeMounts:'
+++ sed -e 's/ *#.*$//'
++ nocomments='          volumeMounts:'
++ echo '          volumeMounts:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          volumeMounts:'
++ IFS=
++ read -r line
+++ echo '          - mountPath: /csi'
+++ sed -e 's/ *#.*$//'
++ nocomments='          - mountPath: /csi'
++ echo '          - mountPath: /csi'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          - mountPath: /csi'
++ IFS=
++ read -r line
+++ echo '            name: socket-dir'
+++ sed -e 's/ *#.*$//'
++ nocomments='            name: socket-dir'
++ echo '            name: socket-dir'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            name: socket-dir'
++ IFS=
++ read -r line
+++ echo '          image: registry.k8s.io/sig-storage/livenessprobe:v2.8.0'
+++ sed -e 's/ *#.*$//'
++ nocomments='          image: registry.k8s.io/sig-storage/livenessprobe:v2.8.0'
++ echo '          image: registry.k8s.io/sig-storage/livenessprobe:v2.8.0'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
+++ echo '          image: registry.k8s.io/sig-storage/livenessprobe:v2.8.0'
+++ sed -e 's;.*image:[[:space:]]*;;'
++ image=registry.k8s.io/sig-storage/livenessprobe:v2.8.0
+++ echo registry.k8s.io/sig-storage/livenessprobe:v2.8.0
+++ sed -e 's;\(.*\)/.*;\1;'
++ registry=registry.k8s.io/sig-storage
+++ echo registry.k8s.io/sig-storage/livenessprobe:v2.8.0
+++ sed -e 's;.*/\([^:]*\).*;\1;'
++ name=livenessprobe
+++ echo registry.k8s.io/sig-storage/livenessprobe:v2.8.0
+++ sed -e 's;.*:;;'
++ tag=v2.8.0
+++ echo livenessprobe
+++ tr - _
+++ tr a-z A-Z
++ varname=LIVENESSPROBE
++ update_image livenessprobe
++ case "$1" in
+++ eval echo '${LIVENESSPROBE_REGISTRY:-registry.k8s.io/sig-storage}/'
++++ echo registry.k8s.io/sig-storage/
+++ sed -e 's;none/;;'
++ prefix=registry.k8s.io/sig-storage/
++ '[' '' = canary ']'
+++ eval echo ':${LIVENESSPROBE_TAG:-v2.8.0}'
++++ echo :v2.8.0
++ suffix=:v2.8.0
+++ echo '          image: registry.k8s.io/sig-storage/livenessprobe:v2.8.0'
+++ sed -e 's;registry.k8s.io/sig-storage/livenessprobe:v2.8.0;registry.k8s.io/sig-storage/livenessprobe:v2.8.0;'
++ line='          image: registry.k8s.io/sig-storage/livenessprobe:v2.8.0'
++ echo '        using           image: registry.k8s.io/sig-storage/livenessprobe:v2.8.0'
        using           image: registry.k8s.io/sig-storage/livenessprobe:v2.8.0
++ true
++ echo '          image: registry.k8s.io/sig-storage/livenessprobe:v2.8.0'
++ IFS=
++ read -r line
+++ echo '          args:'
+++ sed -e 's/ *#.*$//'
++ nocomments='          args:'
++ echo '          args:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          args:'
++ IFS=
++ read -r line
+++ echo '          - --csi-address=/csi/csi.sock'
+++ sed -e 's/ *#.*$//'
++ nocomments='          - --csi-address=/csi/csi.sock'
++ echo '          - --csi-address=/csi/csi.sock'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          - --csi-address=/csi/csi.sock'
++ IFS=
++ read -r line
+++ echo '          - --health-port=9898'
+++ sed -e 's/ *#.*$//'
++ nocomments='          - --health-port=9898'
++ echo '          - --health-port=9898'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          - --health-port=9898'
++ IFS=
++ read -r line
+++ echo ''
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo ''
++ IFS=
++ read -r line
+++ echo '        - name: csi-snapshotter'
+++ sed -e 's/ *#.*$//'
++ nocomments='        - name: csi-snapshotter'
++ echo '        - name: csi-snapshotter'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '        - name: csi-snapshotter'
++ IFS=
++ read -r line
+++ echo '          image: registry.k8s.io/sig-storage/csi-snapshotter:v6.1.0'
+++ sed -e 's/ *#.*$//'
++ nocomments='          image: registry.k8s.io/sig-storage/csi-snapshotter:v6.1.0'
++ echo '          image: registry.k8s.io/sig-storage/csi-snapshotter:v6.1.0'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
+++ echo '          image: registry.k8s.io/sig-storage/csi-snapshotter:v6.1.0'
+++ sed -e 's;.*image:[[:space:]]*;;'
++ image=registry.k8s.io/sig-storage/csi-snapshotter:v6.1.0
+++ echo registry.k8s.io/sig-storage/csi-snapshotter:v6.1.0
+++ sed -e 's;\(.*\)/.*;\1;'
++ registry=registry.k8s.io/sig-storage
+++ echo registry.k8s.io/sig-storage/csi-snapshotter:v6.1.0
+++ sed -e 's;.*/\([^:]*\).*;\1;'
++ name=csi-snapshotter
+++ echo registry.k8s.io/sig-storage/csi-snapshotter:v6.1.0
+++ sed -e 's;.*:;;'
++ tag=v6.1.0
+++ echo csi-snapshotter
+++ tr - _
+++ tr a-z A-Z
++ varname=CSI_SNAPSHOTTER
++ update_image csi-snapshotter
++ case "$1" in
+++ eval echo '${CSI_SNAPSHOTTER_REGISTRY:-registry.k8s.io/sig-storage}/'
++++ echo registry.k8s.io/sig-storage/
+++ sed -e 's;none/;;'
++ prefix=registry.k8s.io/sig-storage/
++ '[' '' = canary ']'
+++ eval echo ':${CSI_SNAPSHOTTER_TAG:-v6.1.0}'
++++ echo :v6.1.0
++ suffix=:v6.1.0
+++ echo '          image: registry.k8s.io/sig-storage/csi-snapshotter:v6.1.0'
+++ sed -e 's;registry.k8s.io/sig-storage/csi-snapshotter:v6.1.0;registry.k8s.io/sig-storage/csi-snapshotter:v6.1.0;'
++ line='          image: registry.k8s.io/sig-storage/csi-snapshotter:v6.1.0'
++ echo '        using           image: registry.k8s.io/sig-storage/csi-snapshotter:v6.1.0'
        using           image: registry.k8s.io/sig-storage/csi-snapshotter:v6.1.0
++ true
++ echo '          image: registry.k8s.io/sig-storage/csi-snapshotter:v6.1.0'
++ IFS=
++ read -r line
+++ echo '          args:'
+++ sed -e 's/ *#.*$//'
++ nocomments='          args:'
++ echo '          args:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          args:'
++ IFS=
++ read -r line
+++ echo '            - -v=5'
+++ sed -e 's/ *#.*$//'
++ nocomments='            - -v=5'
++ echo '            - -v=5'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            - -v=5'
++ IFS=
++ read -r line
+++ echo '            - --csi-address=/csi/csi.sock'
+++ sed -e 's/ *#.*$//'
++ nocomments='            - --csi-address=/csi/csi.sock'
++ echo '            - --csi-address=/csi/csi.sock'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            - --csi-address=/csi/csi.sock'
++ IFS=
++ read -r line
+++ echo '            - --node-deployment'
+++ sed -e 's/ *#.*$//'
++ nocomments='            - --node-deployment'
++ echo '            - --node-deployment'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            - --node-deployment'
++ IFS=
++ read -r line
+++ echo '          env:'
+++ sed -e 's/ *#.*$//'
++ nocomments='          env:'
++ echo '          env:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          env:'
++ IFS=
++ read -r line
+++ echo '            - name: NODE_NAME'
+++ sed -e 's/ *#.*$//'
++ nocomments='            - name: NODE_NAME'
++ echo '            - name: NODE_NAME'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            - name: NODE_NAME'
++ IFS=
++ read -r line
+++ echo '              valueFrom:'
+++ sed -e 's/ *#.*$//'
++ nocomments='              valueFrom:'
++ echo '              valueFrom:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '              valueFrom:'
++ IFS=
++ read -r line
+++ echo '                fieldRef:'
+++ sed -e 's/ *#.*$//'
++ nocomments='                fieldRef:'
++ echo '                fieldRef:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '                fieldRef:'
++ IFS=
++ read -r line
+++ echo '                  apiVersion: v1'
+++ sed -e 's/ *#.*$//'
++ nocomments='                  apiVersion: v1'
++ echo '                  apiVersion: v1'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '                  apiVersion: v1'
++ IFS=
++ read -r line
+++ echo '                  fieldPath: spec.nodeName'
+++ sed -e 's/ *#.*$//'
++ nocomments='                  fieldPath: spec.nodeName'
++ echo '                  fieldPath: spec.nodeName'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '                  fieldPath: spec.nodeName'
++ IFS=
++ read -r line
+++ echo '          securityContext:'
+++ sed -e 's/ *#.*$//'
++ nocomments='          securityContext:'
++ echo '          securityContext:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          securityContext:'
++ IFS=
++ read -r line
+++ echo '            # This is necessary only for systems with SELinux, where'
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            # This is necessary only for systems with SELinux, where'
++ IFS=
++ read -r line
+++ echo '            # non-privileged sidecar containers cannot access unix domain socket'
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            # non-privileged sidecar containers cannot access unix domain socket'
++ IFS=
++ read -r line
+++ echo '            # created by privileged CSI driver container.'
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            # created by privileged CSI driver container.'
++ IFS=
++ read -r line
+++ echo '            privileged: true'
+++ sed -e 's/ *#.*$//'
++ nocomments='            privileged: true'
++ echo '            privileged: true'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            privileged: true'
++ IFS=
++ read -r line
+++ echo '          volumeMounts:'
+++ sed -e 's/ *#.*$//'
++ nocomments='          volumeMounts:'
++ echo '          volumeMounts:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          volumeMounts:'
++ IFS=
++ read -r line
+++ echo '            - mountPath: /csi'
+++ sed -e 's/ *#.*$//'
++ nocomments='            - mountPath: /csi'
++ echo '            - mountPath: /csi'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            - mountPath: /csi'
++ IFS=
++ read -r line
+++ echo '              name: socket-dir'
+++ sed -e 's/ *#.*$//'
++ nocomments='              name: socket-dir'
++ echo '              name: socket-dir'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '              name: socket-dir'
++ IFS=
++ read -r line
+++ echo ''
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo ''
++ IFS=
++ read -r line
+++ echo '      volumes:'
+++ sed -e 's/ *#.*$//'
++ nocomments='      volumes:'
++ echo '      volumes:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '      volumes:'
++ IFS=
++ read -r line
+++ echo '        - hostPath:'
+++ sed -e 's/ *#.*$//'
++ nocomments='        - hostPath:'
++ echo '        - hostPath:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '        - hostPath:'
++ IFS=
++ read -r line
+++ echo '            path: /var/lib/kubelet/plugins/csi-hostpath'
+++ sed -e 's/ *#.*$//'
++ nocomments='            path: /var/lib/kubelet/plugins/csi-hostpath'
++ echo '            path: /var/lib/kubelet/plugins/csi-hostpath'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            path: /var/lib/kubelet/plugins/csi-hostpath'
++ IFS=
++ read -r line
+++ echo '            type: DirectoryOrCreate'
+++ sed -e 's/ *#.*$//'
++ nocomments='            type: DirectoryOrCreate'
++ echo '            type: DirectoryOrCreate'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            type: DirectoryOrCreate'
++ IFS=
++ read -r line
+++ echo '          name: socket-dir'
+++ sed -e 's/ *#.*$//'
++ nocomments='          name: socket-dir'
++ echo '          name: socket-dir'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          name: socket-dir'
++ IFS=
++ read -r line
+++ echo '        - hostPath:'
+++ sed -e 's/ *#.*$//'
++ nocomments='        - hostPath:'
++ echo '        - hostPath:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '        - hostPath:'
++ IFS=
++ read -r line
+++ echo '            path: /var/lib/kubelet/pods'
+++ sed -e 's/ *#.*$//'
++ nocomments='            path: /var/lib/kubelet/pods'
++ echo '            path: /var/lib/kubelet/pods'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            path: /var/lib/kubelet/pods'
++ IFS=
++ read -r line
+++ echo '            type: DirectoryOrCreate'
+++ sed -e 's/ *#.*$//'
++ nocomments='            type: DirectoryOrCreate'
++ echo '            type: DirectoryOrCreate'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            type: DirectoryOrCreate'
++ IFS=
++ read -r line
+++ echo '          name: mountpoint-dir'
+++ sed -e 's/ *#.*$//'
++ nocomments='          name: mountpoint-dir'
++ echo '          name: mountpoint-dir'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          name: mountpoint-dir'
++ IFS=
++ read -r line
+++ echo '        - hostPath:'
+++ sed -e 's/ *#.*$//'
++ nocomments='        - hostPath:'
++ echo '        - hostPath:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '        - hostPath:'
++ IFS=
++ read -r line
+++ echo '            path: /var/lib/kubelet/plugins_registry'
+++ sed -e 's/ *#.*$//'
++ nocomments='            path: /var/lib/kubelet/plugins_registry'
++ echo '            path: /var/lib/kubelet/plugins_registry'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            path: /var/lib/kubelet/plugins_registry'
++ IFS=
++ read -r line
+++ echo '            type: Directory'
+++ sed -e 's/ *#.*$//'
++ nocomments='            type: Directory'
++ echo '            type: Directory'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            type: Directory'
++ IFS=
++ read -r line
+++ echo '          name: registration-dir'
+++ sed -e 's/ *#.*$//'
++ nocomments='          name: registration-dir'
++ echo '          name: registration-dir'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          name: registration-dir'
++ IFS=
++ read -r line
+++ echo '        - hostPath:'
+++ sed -e 's/ *#.*$//'
++ nocomments='        - hostPath:'
++ echo '        - hostPath:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '        - hostPath:'
++ IFS=
++ read -r line
+++ echo '            path: /var/lib/kubelet/plugins'
+++ sed -e 's/ *#.*$//'
++ nocomments='            path: /var/lib/kubelet/plugins'
++ echo '            path: /var/lib/kubelet/plugins'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            path: /var/lib/kubelet/plugins'
++ IFS=
++ read -r line
+++ echo '            type: Directory'
+++ sed -e 's/ *#.*$//'
++ nocomments='            type: Directory'
++ echo '            type: Directory'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            type: Directory'
++ IFS=
++ read -r line
+++ echo '          name: plugins-dir'
+++ sed -e 's/ *#.*$//'
++ nocomments='          name: plugins-dir'
++ echo '          name: plugins-dir'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          name: plugins-dir'
++ IFS=
++ read -r line
+++ echo '        - hostPath:'
+++ sed -e 's/ *#.*$//'
++ nocomments='        - hostPath:'
++ echo '        - hostPath:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '        - hostPath:'
++ IFS=
++ read -r line
+++ echo '            # '\''path'\'' is where PV data is persisted on host.'
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            # '\''path'\'' is where PV data is persisted on host.'
++ IFS=
++ read -r line
+++ echo '            # using /tmp is also possible while the PVs will not available after plugin container recreation or host reboot'
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            # using /tmp is also possible while the PVs will not available after plugin container recreation or host reboot'
++ IFS=
++ read -r line
+++ echo '            path: /var/lib/csi-hostpath-data/'
+++ sed -e 's/ *#.*$//'
++ nocomments='            path: /var/lib/csi-hostpath-data/'
++ echo '            path: /var/lib/csi-hostpath-data/'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            path: /var/lib/csi-hostpath-data/'
++ IFS=
++ read -r line
+++ echo '            type: DirectoryOrCreate'
+++ sed -e 's/ *#.*$//'
++ nocomments='            type: DirectoryOrCreate'
++ echo '            type: DirectoryOrCreate'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            type: DirectoryOrCreate'
++ IFS=
++ read -r line
+++ echo '          name: csi-data-dir'
+++ sed -e 's/ *#.*$//'
++ nocomments='          name: csi-data-dir'
++ echo '          name: csi-data-dir'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          name: csi-data-dir'
++ IFS=
++ read -r line
+++ echo '        - hostPath:'
+++ sed -e 's/ *#.*$//'
++ nocomments='        - hostPath:'
++ echo '        - hostPath:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '        - hostPath:'
++ IFS=
++ read -r line
+++ echo '            path: /dev'
+++ sed -e 's/ *#.*$//'
++ nocomments='            path: /dev'
++ echo '            path: /dev'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            path: /dev'
++ IFS=
++ read -r line
+++ echo '            type: Directory'
+++ sed -e 's/ *#.*$//'
++ nocomments='            type: Directory'
++ echo '            type: Directory'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            type: Directory'
++ IFS=
++ read -r line
+++ echo '          name: dev-dir'
+++ sed -e 's/ *#.*$//'
++ nocomments='          name: dev-dir'
++ echo '          name: dev-dir'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          name: dev-dir'
++ IFS=
++ read -r line
+ modified='# All of the individual sidecar RBAC roles get bound
# to this account.
kind: ServiceAccount
apiVersion: v1
metadata:
  name: csi-hostpathplugin-sa
  namespace: default
  labels:
    app.kubernetes.io/instance: hostpath.csi.k8s.io
    app.kubernetes.io/part-of: csi-driver-host-path
    app.kubernetes.io/name: csi-hostpathplugin
    app.kubernetes.io/component: serviceaccount
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  labels:
    app.kubernetes.io/instance: hostpath.csi.k8s.io
    app.kubernetes.io/part-of: csi-driver-host-path
    app.kubernetes.io/name: csi-hostpathplugin
    app.kubernetes.io/component: provisioner-cluster-role
  name: csi-hostpathplugin-provisioner-cluster-role
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: external-provisioner-runner
subjects:
- kind: ServiceAccount
  name: csi-hostpathplugin-sa
  namespace: default
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  labels:
    app.kubernetes.io/instance: hostpath.csi.k8s.io
    app.kubernetes.io/part-of: csi-driver-host-path
    app.kubernetes.io/name: csi-hostpathplugin
    app.kubernetes.io/component: snapshotter-cluster-role
  name: csi-hostpathplugin-snapshotter-cluster-role
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: external-snapshotter-runner
subjects:
- kind: ServiceAccount
  name: csi-hostpathplugin-sa
  namespace: default
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  labels:
    app.kubernetes.io/instance: hostpath.csi.k8s.io
    app.kubernetes.io/part-of: csi-driver-host-path
    app.kubernetes.io/name: csi-hostpathplugin
    app.kubernetes.io/component: provisioner-role
  name: csi-hostpathplugin-provisioner-role
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: external-provisioner-cfg
subjects:
- kind: ServiceAccount
  name: csi-hostpathplugin-sa
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  labels:
    app.kubernetes.io/instance: hostpath.csi.k8s.io
    app.kubernetes.io/part-of: csi-driver-host-path
    app.kubernetes.io/name: csi-hostpathplugin
    app.kubernetes.io/component: snapshotter-role
  name: csi-hostpathplugin-snapshotter-role
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: external-snapshotter-leaderelection
subjects:
- kind: ServiceAccount
  name: csi-hostpathplugin-sa
---
kind: DaemonSet
apiVersion: apps/v1
metadata:
  name: csi-hostpathplugin
  labels:
    app.kubernetes.io/instance: hostpath.csi.k8s.io
    app.kubernetes.io/part-of: csi-driver-host-path
    app.kubernetes.io/name: csi-hostpathplugin
    app.kubernetes.io/component: plugin
spec:
  selector:
    matchLabels:
      app.kubernetes.io/instance: hostpath.csi.k8s.io
      app.kubernetes.io/part-of: csi-driver-host-path
      app.kubernetes.io/name: csi-hostpathplugin
      app.kubernetes.io/component: plugin
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: hostpath.csi.k8s.io
        app.kubernetes.io/part-of: csi-driver-host-path
        app.kubernetes.io/name: csi-hostpathplugin
        app.kubernetes.io/component: plugin
    spec:
      serviceAccountName: csi-hostpathplugin-sa
      containers:
        - name: csi-provisioner
          image: registry.k8s.io/sig-storage/csi-provisioner:v3.3.0
          args:
            - -v=5
            - --csi-address=/csi/csi.sock
            - --feature-gates=Topology=true
            - --enable-capacity
            - --capacity-ownerref-level=0 # pod is owner
            - --node-deployment=true
            - --strict-topology=true
            - --immediate-topology=false
            - --worker-threads=5
          env:
          - name: NODE_NAME
            valueFrom:
              fieldRef:
                apiVersion: v1
                fieldPath: spec.nodeName
          - name: NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
          - name: POD_NAME
            valueFrom:
              fieldRef:
                fieldPath: metadata.name
          securityContext:
            # This is necessary only for systems with SELinux, where
            # non-privileged sidecar containers cannot access unix domain socket
            # created by privileged CSI driver container.
            privileged: true
          volumeMounts:
            - mountPath: /csi
              name: socket-dir

        - name: node-driver-registrar
          image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.6.0
          args:
            - --v=5
            - --csi-address=/csi/csi.sock
            - --kubelet-registration-path=/var/lib/kubelet/plugins/csi-hostpath/csi.sock
          securityContext:
            # This is necessary only for systems with SELinux, where
            # non-privileged sidecar containers cannot access unix domain socket
            # created by privileged CSI driver container.
            privileged: true
          env:
            - name: KUBE_NODE_NAME
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: spec.nodeName
          volumeMounts:
          - mountPath: /csi
            name: socket-dir
          - mountPath: /registration
            name: registration-dir
          - mountPath: /csi-data-dir
            name: csi-data-dir

        - name: hostpath
          image: registry.k8s.io/sig-storage/hostpathplugin:v1.7.3
          args:
            - --drivername=hostpath.csi.k8s.io
            - --v=5
            - --endpoint=$(CSI_ENDPOINT)
            - --nodeid=$(KUBE_NODE_NAME)
            - --capacity=slow=10Gi
            - --capacity=fast=100Gi
          env:
            - name: CSI_ENDPOINT
              value: unix:///csi/csi.sock
            - name: KUBE_NODE_NAME
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: spec.nodeName
          securityContext:
            privileged: true
          ports:
          - containerPort: 9898
            name: healthz
            protocol: TCP
          livenessProbe:
            failureThreshold: 5
            httpGet:
              path: /healthz
              port: healthz
            initialDelaySeconds: 10
            timeoutSeconds: 3
            periodSeconds: 2
          volumeMounts:
            - mountPath: /csi
              name: socket-dir
            - mountPath: /var/lib/kubelet/pods
              mountPropagation: Bidirectional
              name: mountpoint-dir
            - mountPath: /var/lib/kubelet/plugins
              mountPropagation: Bidirectional
              name: plugins-dir
            - mountPath: /csi-data-dir
              name: csi-data-dir
            - mountPath: /dev
              name: dev-dir

        - name: liveness-probe
          volumeMounts:
          - mountPath: /csi
            name: socket-dir
          image: registry.k8s.io/sig-storage/livenessprobe:v2.8.0
          args:
          - --csi-address=/csi/csi.sock
          - --health-port=9898

        - name: csi-snapshotter
          image: registry.k8s.io/sig-storage/csi-snapshotter:v6.1.0
          args:
            - -v=5
            - --csi-address=/csi/csi.sock
            - --node-deployment
          env:
            - name: NODE_NAME
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: spec.nodeName
          securityContext:
            # This is necessary only for systems with SELinux, where
            # non-privileged sidecar containers cannot access unix domain socket
            # created by privileged CSI driver container.
            privileged: true
          volumeMounts:
            - mountPath: /csi
              name: socket-dir

      volumes:
        - hostPath:
            path: /var/lib/kubelet/plugins/csi-hostpath
            type: DirectoryOrCreate
          name: socket-dir
        - hostPath:
            path: /var/lib/kubelet/pods
            type: DirectoryOrCreate
          name: mountpoint-dir
        - hostPath:
            path: /var/lib/kubelet/plugins_registry
            type: Directory
          name: registration-dir
        - hostPath:
            path: /var/lib/kubelet/plugins
            type: Directory
          name: plugins-dir
        - hostPath:
            # '\''path'\'' is where PV data is persisted on host.
            # using /tmp is also possible while the PVs will not available after plugin container recreation or host reboot
            path: /var/lib/csi-hostpath-data/
            type: DirectoryOrCreate
          name: csi-data-dir
        - hostPath:
            path: /dev
            type: Directory
          name: dev-dir'
+ kubectl apply -f -
+ echo '# All of the individual sidecar RBAC roles get bound
# to this account.
kind: ServiceAccount
apiVersion: v1
metadata:
  name: csi-hostpathplugin-sa
  namespace: default
  labels:
    app.kubernetes.io/instance: hostpath.csi.k8s.io
    app.kubernetes.io/part-of: csi-driver-host-path
    app.kubernetes.io/name: csi-hostpathplugin
    app.kubernetes.io/component: serviceaccount
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  labels:
    app.kubernetes.io/instance: hostpath.csi.k8s.io
    app.kubernetes.io/part-of: csi-driver-host-path
    app.kubernetes.io/name: csi-hostpathplugin
    app.kubernetes.io/component: provisioner-cluster-role
  name: csi-hostpathplugin-provisioner-cluster-role
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: external-provisioner-runner
subjects:
- kind: ServiceAccount
  name: csi-hostpathplugin-sa
  namespace: default
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  labels:
    app.kubernetes.io/instance: hostpath.csi.k8s.io
    app.kubernetes.io/part-of: csi-driver-host-path
    app.kubernetes.io/name: csi-hostpathplugin
    app.kubernetes.io/component: snapshotter-cluster-role
  name: csi-hostpathplugin-snapshotter-cluster-role
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: external-snapshotter-runner
subjects:
- kind: ServiceAccount
  name: csi-hostpathplugin-sa
  namespace: default
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  labels:
    app.kubernetes.io/instance: hostpath.csi.k8s.io
    app.kubernetes.io/part-of: csi-driver-host-path
    app.kubernetes.io/name: csi-hostpathplugin
    app.kubernetes.io/component: provisioner-role
  name: csi-hostpathplugin-provisioner-role
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: external-provisioner-cfg
subjects:
- kind: ServiceAccount
  name: csi-hostpathplugin-sa
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  labels:
    app.kubernetes.io/instance: hostpath.csi.k8s.io
    app.kubernetes.io/part-of: csi-driver-host-path
    app.kubernetes.io/name: csi-hostpathplugin
    app.kubernetes.io/component: snapshotter-role
  name: csi-hostpathplugin-snapshotter-role
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: external-snapshotter-leaderelection
subjects:
- kind: ServiceAccount
  name: csi-hostpathplugin-sa
---
kind: DaemonSet
apiVersion: apps/v1
metadata:
  name: csi-hostpathplugin
  labels:
    app.kubernetes.io/instance: hostpath.csi.k8s.io
    app.kubernetes.io/part-of: csi-driver-host-path
    app.kubernetes.io/name: csi-hostpathplugin
    app.kubernetes.io/component: plugin
spec:
  selector:
    matchLabels:
      app.kubernetes.io/instance: hostpath.csi.k8s.io
      app.kubernetes.io/part-of: csi-driver-host-path
      app.kubernetes.io/name: csi-hostpathplugin
      app.kubernetes.io/component: plugin
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: hostpath.csi.k8s.io
        app.kubernetes.io/part-of: csi-driver-host-path
        app.kubernetes.io/name: csi-hostpathplugin
        app.kubernetes.io/component: plugin
    spec:
      serviceAccountName: csi-hostpathplugin-sa
      containers:
        - name: csi-provisioner
          image: registry.k8s.io/sig-storage/csi-provisioner:v3.3.0
          args:
            - -v=5
            - --csi-address=/csi/csi.sock
            - --feature-gates=Topology=true
            - --enable-capacity
            - --capacity-ownerref-level=0 # pod is owner
            - --node-deployment=true
            - --strict-topology=true
            - --immediate-topology=false
            - --worker-threads=5
          env:
          - name: NODE_NAME
            valueFrom:
              fieldRef:
                apiVersion: v1
                fieldPath: spec.nodeName
          - name: NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
          - name: POD_NAME
            valueFrom:
              fieldRef:
                fieldPath: metadata.name
          securityContext:
            # This is necessary only for systems with SELinux, where
            # non-privileged sidecar containers cannot access unix domain socket
            # created by privileged CSI driver container.
            privileged: true
          volumeMounts:
            - mountPath: /csi
              name: socket-dir

        - name: node-driver-registrar
          image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.6.0
          args:
            - --v=5
            - --csi-address=/csi/csi.sock
            - --kubelet-registration-path=/var/lib/kubelet/plugins/csi-hostpath/csi.sock
          securityContext:
            # This is necessary only for systems with SELinux, where
            # non-privileged sidecar containers cannot access unix domain socket
            # created by privileged CSI driver container.
            privileged: true
          env:
            - name: KUBE_NODE_NAME
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: spec.nodeName
          volumeMounts:
          - mountPath: /csi
            name: socket-dir
          - mountPath: /registration
            name: registration-dir
          - mountPath: /csi-data-dir
            name: csi-data-dir

        - name: hostpath
          image: registry.k8s.io/sig-storage/hostpathplugin:v1.7.3
          args:
            - --drivername=hostpath.csi.k8s.io
            - --v=5
            - --endpoint=$(CSI_ENDPOINT)
            - --nodeid=$(KUBE_NODE_NAME)
            - --capacity=slow=10Gi
            - --capacity=fast=100Gi
          env:
            - name: CSI_ENDPOINT
              value: unix:///csi/csi.sock
            - name: KUBE_NODE_NAME
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: spec.nodeName
          securityContext:
            privileged: true
          ports:
          - containerPort: 9898
            name: healthz
            protocol: TCP
          livenessProbe:
            failureThreshold: 5
            httpGet:
              path: /healthz
              port: healthz
            initialDelaySeconds: 10
            timeoutSeconds: 3
            periodSeconds: 2
          volumeMounts:
            - mountPath: /csi
              name: socket-dir
            - mountPath: /var/lib/kubelet/pods
              mountPropagation: Bidirectional
              name: mountpoint-dir
            - mountPath: /var/lib/kubelet/plugins
              mountPropagation: Bidirectional
              name: plugins-dir
            - mountPath: /csi-data-dir
              name: csi-data-dir
            - mountPath: /dev
              name: dev-dir

        - name: liveness-probe
          volumeMounts:
          - mountPath: /csi
            name: socket-dir
          image: registry.k8s.io/sig-storage/livenessprobe:v2.8.0
          args:
          - --csi-address=/csi/csi.sock
          - --health-port=9898

        - name: csi-snapshotter
          image: registry.k8s.io/sig-storage/csi-snapshotter:v6.1.0
          args:
            - -v=5
            - --csi-address=/csi/csi.sock
            - --node-deployment
          env:
            - name: NODE_NAME
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: spec.nodeName
          securityContext:
            # This is necessary only for systems with SELinux, where
            # non-privileged sidecar containers cannot access unix domain socket
            # created by privileged CSI driver container.
            privileged: true
          volumeMounts:
            - mountPath: /csi
              name: socket-dir

      volumes:
        - hostPath:
            path: /var/lib/kubelet/plugins/csi-hostpath
            type: DirectoryOrCreate
          name: socket-dir
        - hostPath:
            path: /var/lib/kubelet/pods
            type: DirectoryOrCreate
          name: mountpoint-dir
        - hostPath:
            path: /var/lib/kubelet/plugins_registry
            type: Directory
          name: registration-dir
        - hostPath:
            path: /var/lib/kubelet/plugins
            type: Directory
          name: plugins-dir
        - hostPath:
            # '\''path'\'' is where PV data is persisted on host.
            # using /tmp is also possible while the PVs will not available after plugin container recreation or host reboot
            path: /var/lib/csi-hostpath-data/
            type: DirectoryOrCreate
          name: csi-data-dir
        - hostPath:
            path: /dev
            type: Directory
          name: dev-dir'
serviceaccount/csi-hostpathplugin-sa created
clusterrolebinding.rbac.authorization.k8s.io/csi-hostpathplugin-provisioner-cluster-role created
clusterrolebinding.rbac.authorization.k8s.io/csi-hostpathplugin-snapshotter-cluster-role created
rolebinding.rbac.authorization.k8s.io/csi-hostpathplugin-provisioner-role created
rolebinding.rbac.authorization.k8s.io/csi-hostpathplugin-snapshotter-role created
Warning: would violate PodSecurity "restricted:latest": privileged (containers "csi-provisioner", "node-driver-registrar", "hostpath", "csi-snapshotter" must not set securityContext.privileged=true), allowPrivilegeEscalation != false (containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.allowPrivilegeEscalation=false), unrestricted capabilities (containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.capabilities.drop=["ALL"]), restricted volume types (volumes "socket-dir", "mountpoint-dir", "registration-dir", "plugins-dir", "csi-data-dir", "dev-dir" use restricted volume type "hostPath"), runAsNonRoot != true (pod or containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.runAsNonRoot=true), seccompProfile (pod or containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost")
daemonset.apps/csi-hostpathplugin created
+ for i in $(ls ${BASE_DIR}/hostpath/*.yaml | sort)
+ echo '   ./hostpath/csi-hostpath-snapshotclass.yaml'
   ./hostpath/csi-hostpath-snapshotclass.yaml
++ cat ./hostpath/csi-hostpath-snapshotclass.yaml
++ sed -e 's;/var/lib/kubelet/;/var/lib/kubelet/;'
++ IFS=
++ read -r line
+++ echo '# Usage of the v1 API implies that the cluster must have'
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '# Usage of the v1 API implies that the cluster must have'
++ IFS=
++ read -r line
+++ echo '# external-snapshotter v4.x installed.'
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '# external-snapshotter v4.x installed.'
++ IFS=
++ read -r line
+++ echo 'apiVersion: snapshot.storage.k8s.io/v1'
+++ sed -e 's/ *#.*$//'
++ nocomments='apiVersion: snapshot.storage.k8s.io/v1'
++ echo 'apiVersion: snapshot.storage.k8s.io/v1'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo 'apiVersion: snapshot.storage.k8s.io/v1'
++ IFS=
++ read -r line
+++ echo 'kind: VolumeSnapshotClass'
+++ sed -e 's/ *#.*$//'
++ nocomments='kind: VolumeSnapshotClass'
++ echo 'kind: VolumeSnapshotClass'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo 'kind: VolumeSnapshotClass'
++ IFS=
++ read -r line
+++ echo metadata:
+++ sed -e 's/ *#.*$//'
++ nocomments=metadata:
++ echo metadata:
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo metadata:
++ IFS=
++ read -r line
+++ echo '  name: csi-hostpath-snapclass'
+++ sed -e 's/ *#.*$//'
++ nocomments='  name: csi-hostpath-snapclass'
++ echo '  name: csi-hostpath-snapclass'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  name: csi-hostpath-snapclass'
++ IFS=
++ read -r line
+++ echo '  labels:'
+++ sed -e 's/ *#.*$//'
++ nocomments='  labels:'
++ echo '  labels:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  labels:'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/part-of: csi-driver-host-path'
++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/name: csi-hostpath-snapclass'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/name: csi-hostpath-snapclass'
++ echo '    app.kubernetes.io/name: csi-hostpath-snapclass'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/name: csi-hostpath-snapclass'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/component: volumesnapshotclass'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/component: volumesnapshotclass'
++ echo '    app.kubernetes.io/component: volumesnapshotclass'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/component: volumesnapshotclass'
++ IFS=
++ read -r line
+++ echo 'driver: hostpath.csi.k8s.io #csi-hostpath'
+++ sed -e 's/ *#.*$//'
++ nocomments='driver: hostpath.csi.k8s.io'
++ echo 'driver: hostpath.csi.k8s.io'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo 'driver: hostpath.csi.k8s.io #csi-hostpath'
++ IFS=
++ read -r line
+++ echo 'deletionPolicy: Delete'
+++ sed -e 's/ *#.*$//'
++ nocomments='deletionPolicy: Delete'
++ echo 'deletionPolicy: Delete'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo 'deletionPolicy: Delete'
++ IFS=
++ read -r line
+ modified='# Usage of the v1 API implies that the cluster must have
# external-snapshotter v4.x installed.
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
metadata:
  name: csi-hostpath-snapclass
  labels:
    app.kubernetes.io/instance: hostpath.csi.k8s.io
    app.kubernetes.io/part-of: csi-driver-host-path
    app.kubernetes.io/name: csi-hostpath-snapclass
    app.kubernetes.io/component: volumesnapshotclass
driver: hostpath.csi.k8s.io #csi-hostpath
deletionPolicy: Delete'
+ echo '# Usage of the v1 API implies that the cluster must have
# external-snapshotter v4.x installed.
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
metadata:
  name: csi-hostpath-snapclass
  labels:
    app.kubernetes.io/instance: hostpath.csi.k8s.io
    app.kubernetes.io/part-of: csi-driver-host-path
    app.kubernetes.io/name: csi-hostpath-snapclass
    app.kubernetes.io/component: volumesnapshotclass
driver: hostpath.csi.k8s.io #csi-hostpath
deletionPolicy: Delete'
+ kubectl apply -f -
volumesnapshotclass.snapshot.storage.k8s.io/csi-hostpath-snapclass created
+ for i in $(ls ${BASE_DIR}/hostpath/*.yaml | sort)
+ echo '   ./hostpath/csi-hostpath-storageclass-fast.yaml'
   ./hostpath/csi-hostpath-storageclass-fast.yaml
++ cat ./hostpath/csi-hostpath-storageclass-fast.yaml
++ sed -e 's;/var/lib/kubelet/;/var/lib/kubelet/;'
++ IFS=
++ read -r line
+++ echo 'apiVersion: storage.k8s.io/v1'
+++ sed -e 's/ *#.*$//'
++ nocomments='apiVersion: storage.k8s.io/v1'
++ echo 'apiVersion: storage.k8s.io/v1'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo 'apiVersion: storage.k8s.io/v1'
++ IFS=
++ read -r line
+++ echo 'kind: StorageClass'
+++ sed -e 's/ *#.*$//'
++ nocomments='kind: StorageClass'
++ echo 'kind: StorageClass'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo 'kind: StorageClass'
++ IFS=
++ read -r line
+++ echo metadata:
+++ sed -e 's/ *#.*$//'
++ nocomments=metadata:
++ echo metadata:
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo metadata:
++ IFS=
++ read -r line
+++ echo '  name: csi-hostpath-fast'
+++ sed -e 's/ *#.*$//'
++ nocomments='  name: csi-hostpath-fast'
++ echo '  name: csi-hostpath-fast'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  name: csi-hostpath-fast'
++ IFS=
++ read -r line
+++ echo '  labels:'
+++ sed -e 's/ *#.*$//'
++ nocomments='  labels:'
++ echo '  labels:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  labels:'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/part-of: csi-driver-host-path'
++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/name: csi-hostpath-fast'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/name: csi-hostpath-fast'
++ echo '    app.kubernetes.io/name: csi-hostpath-fast'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/name: csi-hostpath-fast'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/component: storageclass'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/component: storageclass'
++ echo '    app.kubernetes.io/component: storageclass'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/component: storageclass'
++ IFS=
++ read -r line
+++ echo 'provisioner: hostpath.csi.k8s.io'
+++ sed -e 's/ *#.*$//'
++ nocomments='provisioner: hostpath.csi.k8s.io'
++ echo 'provisioner: hostpath.csi.k8s.io'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo 'provisioner: hostpath.csi.k8s.io'
++ IFS=
++ read -r line
+++ echo 'volumeBindingMode: WaitForFirstConsumer'
+++ sed -e 's/ *#.*$//'
++ nocomments='volumeBindingMode: WaitForFirstConsumer'
++ echo 'volumeBindingMode: WaitForFirstConsumer'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo 'volumeBindingMode: WaitForFirstConsumer'
++ IFS=
++ read -r line
+++ echo parameters:
+++ sed -e 's/ *#.*$//'
++ nocomments=parameters:
++ echo parameters:
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo parameters:
++ IFS=
++ read -r line
+++ echo '  kind: fast'
+++ sed -e 's/ *#.*$//'
++ nocomments='  kind: fast'
++ echo '  kind: fast'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  kind: fast'
++ IFS=
++ read -r line
+ modified='apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: csi-hostpath-fast
  labels:
    app.kubernetes.io/instance: hostpath.csi.k8s.io
    app.kubernetes.io/part-of: csi-driver-host-path
    app.kubernetes.io/name: csi-hostpath-fast
    app.kubernetes.io/component: storageclass
provisioner: hostpath.csi.k8s.io
volumeBindingMode: WaitForFirstConsumer
parameters:
  kind: fast'
+ echo 'apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: csi-hostpath-fast
  labels:
    app.kubernetes.io/instance: hostpath.csi.k8s.io
    app.kubernetes.io/part-of: csi-driver-host-path
    app.kubernetes.io/name: csi-hostpath-fast
    app.kubernetes.io/component: storageclass
provisioner: hostpath.csi.k8s.io
volumeBindingMode: WaitForFirstConsumer
parameters:
  kind: fast'
+ kubectl apply -f -
storageclass.storage.k8s.io/csi-hostpath-fast created
+ for i in $(ls ${BASE_DIR}/hostpath/*.yaml | sort)
+ echo '   ./hostpath/csi-hostpath-storageclass-slow.yaml'
   ./hostpath/csi-hostpath-storageclass-slow.yaml
++ cat ./hostpath/csi-hostpath-storageclass-slow.yaml
++ sed -e 's;/var/lib/kubelet/;/var/lib/kubelet/;'
++ IFS=
++ read -r line
+++ echo 'apiVersion: storage.k8s.io/v1'
+++ sed -e 's/ *#.*$//'
++ nocomments='apiVersion: storage.k8s.io/v1'
++ echo 'apiVersion: storage.k8s.io/v1'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo 'apiVersion: storage.k8s.io/v1'
++ IFS=
++ read -r line
+++ echo 'kind: StorageClass'
+++ sed -e 's/ *#.*$//'
++ nocomments='kind: StorageClass'
++ echo 'kind: StorageClass'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo 'kind: StorageClass'
++ IFS=
++ read -r line
+++ echo metadata:
+++ sed -e 's/ *#.*$//'
++ nocomments=metadata:
++ echo metadata:
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo metadata:
++ IFS=
++ read -r line
+++ echo '  name: csi-hostpath-slow'
+++ sed -e 's/ *#.*$//'
++ nocomments='  name: csi-hostpath-slow'
++ echo '  name: csi-hostpath-slow'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  name: csi-hostpath-slow'
++ IFS=
++ read -r line
+++ echo '  labels:'
+++ sed -e 's/ *#.*$//'
++ nocomments='  labels:'
++ echo '  labels:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  labels:'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/part-of: csi-driver-host-path'
++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/name: csi-hostpath-slow'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/name: csi-hostpath-slow'
++ echo '    app.kubernetes.io/name: csi-hostpath-slow'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/name: csi-hostpath-slow'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/component: storageclass'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/component: storageclass'
++ echo '    app.kubernetes.io/component: storageclass'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/component: storageclass'
++ IFS=
++ read -r line
+++ echo 'provisioner: hostpath.csi.k8s.io'
+++ sed -e 's/ *#.*$//'
++ nocomments='provisioner: hostpath.csi.k8s.io'
++ echo 'provisioner: hostpath.csi.k8s.io'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo 'provisioner: hostpath.csi.k8s.io'
++ IFS=
++ read -r line
+++ echo 'volumeBindingMode: WaitForFirstConsumer'
+++ sed -e 's/ *#.*$//'
++ nocomments='volumeBindingMode: WaitForFirstConsumer'
++ echo 'volumeBindingMode: WaitForFirstConsumer'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo 'volumeBindingMode: WaitForFirstConsumer'
++ IFS=
++ read -r line
+++ echo parameters:
+++ sed -e 's/ *#.*$//'
++ nocomments=parameters:
++ echo parameters:
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo parameters:
++ IFS=
++ read -r line
+++ echo '  kind: slow'
+++ sed -e 's/ *#.*$//'
++ nocomments='  kind: slow'
++ echo '  kind: slow'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  kind: slow'
++ IFS=
++ read -r line
+ modified='apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: csi-hostpath-slow
  labels:
    app.kubernetes.io/instance: hostpath.csi.k8s.io
    app.kubernetes.io/part-of: csi-driver-host-path
    app.kubernetes.io/name: csi-hostpath-slow
    app.kubernetes.io/component: storageclass
provisioner: hostpath.csi.k8s.io
volumeBindingMode: WaitForFirstConsumer
parameters:
  kind: slow'
+ echo 'apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: csi-hostpath-slow
  labels:
    app.kubernetes.io/instance: hostpath.csi.k8s.io
    app.kubernetes.io/part-of: csi-driver-host-path
    app.kubernetes.io/name: csi-hostpath-slow
    app.kubernetes.io/component: storageclass
provisioner: hostpath.csi.k8s.io
volumeBindingMode: WaitForFirstConsumer
parameters:
  kind: slow'
+ kubectl apply -f -
storageclass.storage.k8s.io/csi-hostpath-slow created
+ for i in $(ls ${BASE_DIR}/hostpath/*.yaml | sort)
+ echo '   ./hostpath/csi-hostpath-testing.yaml'
   ./hostpath/csi-hostpath-testing.yaml
++ cat ./hostpath/csi-hostpath-testing.yaml
++ sed -e 's;/var/lib/kubelet/;/var/lib/kubelet/;'
++ IFS=
++ read -r line
+++ echo '# WARNING: this is only for testing purposes. Do not install in a production'
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '# WARNING: this is only for testing purposes. Do not install in a production'
++ IFS=
++ read -r line
+++ echo '# cluster.'
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '# cluster.'
++ IFS=
++ read -r line
+++ echo '#'
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '#'
++ IFS=
++ read -r line
+++ echo '# This exposes the hostpath'\''s Unix domain csi.sock as a TCP port to the'
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '# This exposes the hostpath'\''s Unix domain csi.sock as a TCP port to the'
++ IFS=
++ read -r line
+++ echo '# outside world. The mapping from Unix domain socket to TCP is done'
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '# outside world. The mapping from Unix domain socket to TCP is done'
++ IFS=
++ read -r line
+++ echo '# by socat.'
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '# by socat.'
++ IFS=
++ read -r line
+++ echo '#'
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '#'
++ IFS=
++ read -r line
+++ echo '# This is useful for testing with csi-sanity or csc.'
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '# This is useful for testing with csi-sanity or csc.'
++ IFS=
++ read -r line
+++ echo ''
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo ''
++ IFS=
++ read -r line
+++ echo 'apiVersion: v1'
+++ sed -e 's/ *#.*$//'
++ nocomments='apiVersion: v1'
++ echo 'apiVersion: v1'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo 'apiVersion: v1'
++ IFS=
++ read -r line
+++ echo 'kind: Service'
+++ sed -e 's/ *#.*$//'
++ nocomments='kind: Service'
++ echo 'kind: Service'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo 'kind: Service'
++ IFS=
++ read -r line
+++ echo metadata:
+++ sed -e 's/ *#.*$//'
++ nocomments=metadata:
++ echo metadata:
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo metadata:
++ IFS=
++ read -r line
+++ echo '  name: hostpath-service'
+++ sed -e 's/ *#.*$//'
++ nocomments='  name: hostpath-service'
++ echo '  name: hostpath-service'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  name: hostpath-service'
++ IFS=
++ read -r line
+++ echo '  labels:'
+++ sed -e 's/ *#.*$//'
++ nocomments='  labels:'
++ echo '  labels:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  labels:'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/part-of: csi-driver-host-path'
++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/name: csi-hostpath-socat'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/name: csi-hostpath-socat'
++ echo '    app.kubernetes.io/name: csi-hostpath-socat'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/name: csi-hostpath-socat'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/component: socat'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/component: socat'
++ echo '    app.kubernetes.io/component: socat'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/component: socat'
++ IFS=
++ read -r line
+++ echo spec:
+++ sed -e 's/ *#.*$//'
++ nocomments=spec:
++ echo spec:
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo spec:
++ IFS=
++ read -r line
+++ echo '  type: NodePort'
+++ sed -e 's/ *#.*$//'
++ nocomments='  type: NodePort'
++ echo '  type: NodePort'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  type: NodePort'
++ IFS=
++ read -r line
+++ echo '  selector:'
+++ sed -e 's/ *#.*$//'
++ nocomments='  selector:'
++ echo '  selector:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  selector:'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/part-of: csi-driver-host-path'
++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/name: csi-hostpath-socat'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/name: csi-hostpath-socat'
++ echo '    app.kubernetes.io/name: csi-hostpath-socat'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/name: csi-hostpath-socat'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/component: socat'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/component: socat'
++ echo '    app.kubernetes.io/component: socat'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/component: socat'
++ IFS=
++ read -r line
+++ echo '  ports:'
+++ sed -e 's/ *#.*$//'
++ nocomments='  ports:'
++ echo '  ports:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  ports:'
++ IFS=
++ read -r line
+++ echo '  - port: 10000 # fixed port inside the pod, dynamically allocated port outside'
+++ sed -e 's/ *#.*$//'
++ nocomments='  - port: 10000'
++ echo '  - port: 10000'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  - port: 10000 # fixed port inside the pod, dynamically allocated port outside'
++ IFS=
++ read -r line
+++ echo ---
+++ sed -e 's/ *#.*$//'
++ nocomments=---
++ echo ---
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo ---
++ IFS=
++ read -r line
+++ echo 'kind: StatefulSet'
+++ sed -e 's/ *#.*$//'
++ nocomments='kind: StatefulSet'
++ echo 'kind: StatefulSet'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo 'kind: StatefulSet'
++ IFS=
++ read -r line
+++ echo 'apiVersion: apps/v1'
+++ sed -e 's/ *#.*$//'
++ nocomments='apiVersion: apps/v1'
++ echo 'apiVersion: apps/v1'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo 'apiVersion: apps/v1'
++ IFS=
++ read -r line
+++ echo metadata:
+++ sed -e 's/ *#.*$//'
++ nocomments=metadata:
++ echo metadata:
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo metadata:
++ IFS=
++ read -r line
+++ echo '  name: csi-hostpath-socat'
+++ sed -e 's/ *#.*$//'
++ nocomments='  name: csi-hostpath-socat'
++ echo '  name: csi-hostpath-socat'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  name: csi-hostpath-socat'
++ IFS=
++ read -r line
+++ echo '  labels:'
+++ sed -e 's/ *#.*$//'
++ nocomments='  labels:'
++ echo '  labels:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  labels:'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/part-of: csi-driver-host-path'
++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/part-of: csi-driver-host-path'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/name: csi-hostpath-socat'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/name: csi-hostpath-socat'
++ echo '    app.kubernetes.io/name: csi-hostpath-socat'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/name: csi-hostpath-socat'
++ IFS=
++ read -r line
+++ echo '    app.kubernetes.io/component: socat'
+++ sed -e 's/ *#.*$//'
++ nocomments='    app.kubernetes.io/component: socat'
++ echo '    app.kubernetes.io/component: socat'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    app.kubernetes.io/component: socat'
++ IFS=
++ read -r line
+++ echo spec:
+++ sed -e 's/ *#.*$//'
++ nocomments=spec:
++ echo spec:
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo spec:
++ IFS=
++ read -r line
+++ echo '  serviceName: "csi-hostpath-socat"'
+++ sed -e 's/ *#.*$//'
++ nocomments='  serviceName: "csi-hostpath-socat"'
++ echo '  serviceName: "csi-hostpath-socat"'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  serviceName: "csi-hostpath-socat"'
++ IFS=
++ read -r line
+++ echo '  replicas: 1'
+++ sed -e 's/ *#.*$//'
++ nocomments='  replicas: 1'
++ echo '  replicas: 1'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  replicas: 1'
++ IFS=
++ read -r line
+++ echo '  selector:'
+++ sed -e 's/ *#.*$//'
++ nocomments='  selector:'
++ echo '  selector:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  selector:'
++ IFS=
++ read -r line
+++ echo '    matchLabels:'
+++ sed -e 's/ *#.*$//'
++ nocomments='    matchLabels:'
++ echo '    matchLabels:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    matchLabels:'
++ IFS=
++ read -r line
+++ echo '      app.kubernetes.io/instance: hostpath.csi.k8s.io'
+++ sed -e 's/ *#.*$//'
++ nocomments='      app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ echo '      app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '      app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ IFS=
++ read -r line
+++ echo '      app.kubernetes.io/part-of: csi-driver-host-path'
+++ sed -e 's/ *#.*$//'
++ nocomments='      app.kubernetes.io/part-of: csi-driver-host-path'
++ echo '      app.kubernetes.io/part-of: csi-driver-host-path'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '      app.kubernetes.io/part-of: csi-driver-host-path'
++ IFS=
++ read -r line
+++ echo '      app.kubernetes.io/name: csi-hostpath-socat'
+++ sed -e 's/ *#.*$//'
++ nocomments='      app.kubernetes.io/name: csi-hostpath-socat'
++ echo '      app.kubernetes.io/name: csi-hostpath-socat'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '      app.kubernetes.io/name: csi-hostpath-socat'
++ IFS=
++ read -r line
+++ echo '      app.kubernetes.io/component: socat'
+++ sed -e 's/ *#.*$//'
++ nocomments='      app.kubernetes.io/component: socat'
++ echo '      app.kubernetes.io/component: socat'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '      app.kubernetes.io/component: socat'
++ IFS=
++ read -r line
+++ echo '  template:'
+++ sed -e 's/ *#.*$//'
++ nocomments='  template:'
++ echo '  template:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '  template:'
++ IFS=
++ read -r line
+++ echo '    metadata:'
+++ sed -e 's/ *#.*$//'
++ nocomments='    metadata:'
++ echo '    metadata:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    metadata:'
++ IFS=
++ read -r line
+++ echo '      labels:'
+++ sed -e 's/ *#.*$//'
++ nocomments='      labels:'
++ echo '      labels:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '      labels:'
++ IFS=
++ read -r line
+++ echo '        app.kubernetes.io/instance: hostpath.csi.k8s.io'
+++ sed -e 's/ *#.*$//'
++ nocomments='        app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ echo '        app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '        app.kubernetes.io/instance: hostpath.csi.k8s.io'
++ IFS=
++ read -r line
+++ echo '        app.kubernetes.io/part-of: csi-driver-host-path'
+++ sed -e 's/ *#.*$//'
++ nocomments='        app.kubernetes.io/part-of: csi-driver-host-path'
++ echo '        app.kubernetes.io/part-of: csi-driver-host-path'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '        app.kubernetes.io/part-of: csi-driver-host-path'
++ IFS=
++ read -r line
+++ echo '        app.kubernetes.io/name: csi-hostpath-socat'
+++ sed -e 's/ *#.*$//'
++ nocomments='        app.kubernetes.io/name: csi-hostpath-socat'
++ echo '        app.kubernetes.io/name: csi-hostpath-socat'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '        app.kubernetes.io/name: csi-hostpath-socat'
++ IFS=
++ read -r line
+++ echo '        app.kubernetes.io/component: socat'
+++ sed -e 's/ *#.*$//'
++ nocomments='        app.kubernetes.io/component: socat'
++ echo '        app.kubernetes.io/component: socat'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '        app.kubernetes.io/component: socat'
++ IFS=
++ read -r line
+++ echo '    spec:'
+++ sed -e 's/ *#.*$//'
++ nocomments='    spec:'
++ echo '    spec:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '    spec:'
++ IFS=
++ read -r line
+++ echo '      affinity:'
+++ sed -e 's/ *#.*$//'
++ nocomments='      affinity:'
++ echo '      affinity:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '      affinity:'
++ IFS=
++ read -r line
+++ echo '        podAffinity:'
+++ sed -e 's/ *#.*$//'
++ nocomments='        podAffinity:'
++ echo '        podAffinity:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '        podAffinity:'
++ IFS=
++ read -r line
+++ echo '          requiredDuringSchedulingIgnoredDuringExecution:'
+++ sed -e 's/ *#.*$//'
++ nocomments='          requiredDuringSchedulingIgnoredDuringExecution:'
++ echo '          requiredDuringSchedulingIgnoredDuringExecution:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          requiredDuringSchedulingIgnoredDuringExecution:'
++ IFS=
++ read -r line
+++ echo '          - labelSelector:'
+++ sed -e 's/ *#.*$//'
++ nocomments='          - labelSelector:'
++ echo '          - labelSelector:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          - labelSelector:'
++ IFS=
++ read -r line
+++ echo '              matchExpressions:'
+++ sed -e 's/ *#.*$//'
++ nocomments='              matchExpressions:'
++ echo '              matchExpressions:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '              matchExpressions:'
++ IFS=
++ read -r line
+++ echo '              - key: app.kubernetes.io/instance'
+++ sed -e 's/ *#.*$//'
++ nocomments='              - key: app.kubernetes.io/instance'
++ echo '              - key: app.kubernetes.io/instance'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '              - key: app.kubernetes.io/instance'
++ IFS=
++ read -r line
+++ echo '                operator: In'
+++ sed -e 's/ *#.*$//'
++ nocomments='                operator: In'
++ echo '                operator: In'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '                operator: In'
++ IFS=
++ read -r line
+++ echo '                values:'
+++ sed -e 's/ *#.*$//'
++ nocomments='                values:'
++ echo '                values:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '                values:'
++ IFS=
++ read -r line
+++ echo '                  - hostpath.csi.k8s.io'
+++ sed -e 's/ *#.*$//'
++ nocomments='                  - hostpath.csi.k8s.io'
++ echo '                  - hostpath.csi.k8s.io'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '                  - hostpath.csi.k8s.io'
++ IFS=
++ read -r line
+++ echo '            topologyKey: kubernetes.io/hostname'
+++ sed -e 's/ *#.*$//'
++ nocomments='            topologyKey: kubernetes.io/hostname'
++ echo '            topologyKey: kubernetes.io/hostname'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            topologyKey: kubernetes.io/hostname'
++ IFS=
++ read -r line
+++ echo '      containers:'
+++ sed -e 's/ *#.*$//'
++ nocomments='      containers:'
++ echo '      containers:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '      containers:'
++ IFS=
++ read -r line
+++ echo '        - name: socat'
+++ sed -e 's/ *#.*$//'
++ nocomments='        - name: socat'
++ echo '        - name: socat'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '        - name: socat'
++ IFS=
++ read -r line
+++ echo '          image: docker.io/alpine/socat:1.7.4.3-r0'
+++ sed -e 's/ *#.*$//'
++ nocomments='          image: docker.io/alpine/socat:1.7.4.3-r0'
++ echo '          image: docker.io/alpine/socat:1.7.4.3-r0'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
+++ echo '          image: docker.io/alpine/socat:1.7.4.3-r0'
+++ sed -e 's;.*image:[[:space:]]*;;'
++ image=docker.io/alpine/socat:1.7.4.3-r0
+++ echo docker.io/alpine/socat:1.7.4.3-r0
+++ sed -e 's;\(.*\)/.*;\1;'
++ registry=docker.io/alpine
+++ echo docker.io/alpine/socat:1.7.4.3-r0
+++ sed -e 's;.*/\([^:]*\).*;\1;'
++ name=socat
+++ echo docker.io/alpine/socat:1.7.4.3-r0
+++ sed -e 's;.*:;;'
++ tag=1.7.4.3-r0
+++ echo socat
+++ tr - _
+++ tr a-z A-Z
++ varname=SOCAT
++ update_image socat
++ case "$1" in
++ return 1
++ echo '        using           image: docker.io/alpine/socat:1.7.4.3-r0'
        using           image: docker.io/alpine/socat:1.7.4.3-r0
++ true
++ echo '          image: docker.io/alpine/socat:1.7.4.3-r0'
++ IFS=
++ read -r line
+++ echo '          args:'
+++ sed -e 's/ *#.*$//'
++ nocomments='          args:'
++ echo '          args:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          args:'
++ IFS=
++ read -r line
+++ echo '            - tcp-listen:10000,fork,reuseaddr'
+++ sed -e 's/ *#.*$//'
++ nocomments='            - tcp-listen:10000,fork,reuseaddr'
++ echo '            - tcp-listen:10000,fork,reuseaddr'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            - tcp-listen:10000,fork,reuseaddr'
++ IFS=
++ read -r line
+++ echo '            - unix-connect:/csi/csi.sock'
+++ sed -e 's/ *#.*$//'
++ nocomments='            - unix-connect:/csi/csi.sock'
++ echo '            - unix-connect:/csi/csi.sock'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            - unix-connect:/csi/csi.sock'
++ IFS=
++ read -r line
+++ echo '          securityContext:'
+++ sed -e 's/ *#.*$//'
++ nocomments='          securityContext:'
++ echo '          securityContext:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          securityContext:'
++ IFS=
++ read -r line
+++ echo '            # This is necessary only for systems with SELinux, where'
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            # This is necessary only for systems with SELinux, where'
++ IFS=
++ read -r line
+++ echo '            # non-privileged sidecar containers cannot access unix domain socket'
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            # non-privileged sidecar containers cannot access unix domain socket'
++ IFS=
++ read -r line
+++ echo '            # created by privileged CSI driver container.'
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            # created by privileged CSI driver container.'
++ IFS=
++ read -r line
+++ echo '            privileged: true'
+++ sed -e 's/ *#.*$//'
++ nocomments='            privileged: true'
++ echo '            privileged: true'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            privileged: true'
++ IFS=
++ read -r line
+++ echo '          volumeMounts:'
+++ sed -e 's/ *#.*$//'
++ nocomments='          volumeMounts:'
++ echo '          volumeMounts:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          volumeMounts:'
++ IFS=
++ read -r line
+++ echo '          - mountPath: /csi'
+++ sed -e 's/ *#.*$//'
++ nocomments='          - mountPath: /csi'
++ echo '          - mountPath: /csi'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          - mountPath: /csi'
++ IFS=
++ read -r line
+++ echo '            name: socket-dir'
+++ sed -e 's/ *#.*$//'
++ nocomments='            name: socket-dir'
++ echo '            name: socket-dir'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            name: socket-dir'
++ IFS=
++ read -r line
+++ echo '          # This is used for sanity testing because the pod name of the'
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          # This is used for sanity testing because the pod name of the'
++ IFS=
++ read -r line
+++ echo '          # driver itself is non-deterministic when using a daemonset.'
+++ sed -e 's/ *#.*$//'
++ nocomments=
++ echo ''
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          # driver itself is non-deterministic when using a daemonset.'
++ IFS=
++ read -r line
+++ echo '          - mountPath: /var/lib/kubelet/pods'
+++ sed -e 's/ *#.*$//'
++ nocomments='          - mountPath: /var/lib/kubelet/pods'
++ echo '          - mountPath: /var/lib/kubelet/pods'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          - mountPath: /var/lib/kubelet/pods'
++ IFS=
++ read -r line
+++ echo '            mountPropagation: Bidirectional'
+++ sed -e 's/ *#.*$//'
++ nocomments='            mountPropagation: Bidirectional'
++ echo '            mountPropagation: Bidirectional'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            mountPropagation: Bidirectional'
++ IFS=
++ read -r line
+++ echo '            name: mountpoint-dir'
+++ sed -e 's/ *#.*$//'
++ nocomments='            name: mountpoint-dir'
++ echo '            name: mountpoint-dir'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            name: mountpoint-dir'
++ IFS=
++ read -r line
+++ echo '      volumes:'
+++ sed -e 's/ *#.*$//'
++ nocomments='      volumes:'
++ echo '      volumes:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '      volumes:'
++ IFS=
++ read -r line
+++ echo '        - hostPath:'
+++ sed -e 's/ *#.*$//'
++ nocomments='        - hostPath:'
++ echo '        - hostPath:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '        - hostPath:'
++ IFS=
++ read -r line
+++ echo '            path: /var/lib/kubelet/plugins/csi-hostpath'
+++ sed -e 's/ *#.*$//'
++ nocomments='            path: /var/lib/kubelet/plugins/csi-hostpath'
++ echo '            path: /var/lib/kubelet/plugins/csi-hostpath'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            path: /var/lib/kubelet/plugins/csi-hostpath'
++ IFS=
++ read -r line
+++ echo '            type: DirectoryOrCreate'
+++ sed -e 's/ *#.*$//'
++ nocomments='            type: DirectoryOrCreate'
++ echo '            type: DirectoryOrCreate'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            type: DirectoryOrCreate'
++ IFS=
++ read -r line
+++ echo '          name: socket-dir'
+++ sed -e 's/ *#.*$//'
++ nocomments='          name: socket-dir'
++ echo '          name: socket-dir'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          name: socket-dir'
++ IFS=
++ read -r line
+++ echo '        - hostPath:'
+++ sed -e 's/ *#.*$//'
++ nocomments='        - hostPath:'
++ echo '        - hostPath:'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '        - hostPath:'
++ IFS=
++ read -r line
+++ echo '            path: /var/lib/kubelet/pods'
+++ sed -e 's/ *#.*$//'
++ nocomments='            path: /var/lib/kubelet/pods'
++ echo '            path: /var/lib/kubelet/pods'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            path: /var/lib/kubelet/pods'
++ IFS=
++ read -r line
+++ echo '            type: DirectoryOrCreate'
+++ sed -e 's/ *#.*$//'
++ nocomments='            type: DirectoryOrCreate'
++ echo '            type: DirectoryOrCreate'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '            type: DirectoryOrCreate'
++ IFS=
++ read -r line
+++ echo '          name: mountpoint-dir'
+++ sed -e 's/ *#.*$//'
++ nocomments='          name: mountpoint-dir'
++ echo '          name: mountpoint-dir'
++ grep -q '^[[:space:]]*image:[[:space:]]*'
++ true
++ echo '          name: mountpoint-dir'
++ IFS=
++ read -r line
+ modified='# WARNING: this is only for testing purposes. Do not install in a production
# cluster.
#
# This exposes the hostpath'\''s Unix domain csi.sock as a TCP port to the
# outside world. The mapping from Unix domain socket to TCP is done
# by socat.
#
# This is useful for testing with csi-sanity or csc.

apiVersion: v1
kind: Service
metadata:
  name: hostpath-service
  labels:
    app.kubernetes.io/instance: hostpath.csi.k8s.io
    app.kubernetes.io/part-of: csi-driver-host-path
    app.kubernetes.io/name: csi-hostpath-socat
    app.kubernetes.io/component: socat
spec:
  type: NodePort
  selector:
    app.kubernetes.io/instance: hostpath.csi.k8s.io
    app.kubernetes.io/part-of: csi-driver-host-path
    app.kubernetes.io/name: csi-hostpath-socat
    app.kubernetes.io/component: socat
  ports:
  - port: 10000 # fixed port inside the pod, dynamically allocated port outside
---
kind: StatefulSet
apiVersion: apps/v1
metadata:
  name: csi-hostpath-socat
  labels:
    app.kubernetes.io/instance: hostpath.csi.k8s.io
    app.kubernetes.io/part-of: csi-driver-host-path
    app.kubernetes.io/name: csi-hostpath-socat
    app.kubernetes.io/component: socat
spec:
  serviceName: "csi-hostpath-socat"
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/instance: hostpath.csi.k8s.io
      app.kubernetes.io/part-of: csi-driver-host-path
      app.kubernetes.io/name: csi-hostpath-socat
      app.kubernetes.io/component: socat
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: hostpath.csi.k8s.io
        app.kubernetes.io/part-of: csi-driver-host-path
        app.kubernetes.io/name: csi-hostpath-socat
        app.kubernetes.io/component: socat
    spec:
      affinity:
        podAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
          - labelSelector:
              matchExpressions:
              - key: app.kubernetes.io/instance
                operator: In
                values:
                  - hostpath.csi.k8s.io
            topologyKey: kubernetes.io/hostname
      containers:
        - name: socat
          image: docker.io/alpine/socat:1.7.4.3-r0
          args:
            - tcp-listen:10000,fork,reuseaddr
            - unix-connect:/csi/csi.sock
          securityContext:
            # This is necessary only for systems with SELinux, where
            # non-privileged sidecar containers cannot access unix domain socket
            # created by privileged CSI driver container.
            privileged: true
          volumeMounts:
          - mountPath: /csi
            name: socket-dir
          # This is used for sanity testing because the pod name of the
          # driver itself is non-deterministic when using a daemonset.
          - mountPath: /var/lib/kubelet/pods
            mountPropagation: Bidirectional
            name: mountpoint-dir
      volumes:
        - hostPath:
            path: /var/lib/kubelet/plugins/csi-hostpath
            type: DirectoryOrCreate
          name: socket-dir
        - hostPath:
            path: /var/lib/kubelet/pods
            type: DirectoryOrCreate
          name: mountpoint-dir'
+ echo '# WARNING: this is only for testing purposes. Do not install in a production
# cluster.
#
# This exposes the hostpath'\''s Unix domain csi.sock as a TCP port to the
# outside world. The mapping from Unix domain socket to TCP is done
# by socat.
#
# This is useful for testing with csi-sanity or csc.

apiVersion: v1
kind: Service
metadata:
  name: hostpath-service
  labels:
    app.kubernetes.io/instance: hostpath.csi.k8s.io
    app.kubernetes.io/part-of: csi-driver-host-path
    app.kubernetes.io/name: csi-hostpath-socat
    app.kubernetes.io/component: socat
spec:
  type: NodePort
  selector:
    app.kubernetes.io/instance: hostpath.csi.k8s.io
    app.kubernetes.io/part-of: csi-driver-host-path
    app.kubernetes.io/name: csi-hostpath-socat
    app.kubernetes.io/component: socat
  ports:
  - port: 10000 # fixed port inside the pod, dynamically allocated port outside
---
kind: StatefulSet
apiVersion: apps/v1
metadata:
  name: csi-hostpath-socat
  labels:
    app.kubernetes.io/instance: hostpath.csi.k8s.io
    app.kubernetes.io/part-of: csi-driver-host-path
    app.kubernetes.io/name: csi-hostpath-socat
    app.kubernetes.io/component: socat
spec:
  serviceName: "csi-hostpath-socat"
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/instance: hostpath.csi.k8s.io
      app.kubernetes.io/part-of: csi-driver-host-path
      app.kubernetes.io/name: csi-hostpath-socat
      app.kubernetes.io/component: socat
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: hostpath.csi.k8s.io
        app.kubernetes.io/part-of: csi-driver-host-path
        app.kubernetes.io/name: csi-hostpath-socat
        app.kubernetes.io/component: socat
    spec:
      affinity:
        podAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
          - labelSelector:
              matchExpressions:
              - key: app.kubernetes.io/instance
                operator: In
                values:
                  - hostpath.csi.k8s.io
            topologyKey: kubernetes.io/hostname
      containers:
        - name: socat
          image: docker.io/alpine/socat:1.7.4.3-r0
          args:
            - tcp-listen:10000,fork,reuseaddr
            - unix-connect:/csi/csi.sock
          securityContext:
            # This is necessary only for systems with SELinux, where
            # non-privileged sidecar containers cannot access unix domain socket
            # created by privileged CSI driver container.
            privileged: true
          volumeMounts:
          - mountPath: /csi
            name: socket-dir
          # This is used for sanity testing because the pod name of the
          # driver itself is non-deterministic when using a daemonset.
          - mountPath: /var/lib/kubelet/pods
            mountPropagation: Bidirectional
            name: mountpoint-dir
      volumes:
        - hostPath:
            path: /var/lib/kubelet/plugins/csi-hostpath
            type: DirectoryOrCreate
          name: socket-dir
        - hostPath:
            path: /var/lib/kubelet/pods
            type: DirectoryOrCreate
          name: mountpoint-dir'
+ kubectl apply -f -
service/hostpath-service created
Warning: would violate PodSecurity "restricted:latest": privileged (container "socat" must not set securityContext.privileged=true), allowPrivilegeEscalation != false (container "socat" must set securityContext.allowPrivilegeEscalation=false), unrestricted capabilities (container "socat" must set securityContext.capabilities.drop=["ALL"]), restricted volume types (volumes "socket-dir", "mountpoint-dir" use restricted volume type "hostPath"), runAsNonRoot != true (pod or container "socat" must set securityContext.runAsNonRoot=true), seccompProfile (pod or container "socat" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost")
statefulset.apps/csi-hostpath-socat created
+ wait_for_daemonset default csi-hostpathplugin
+ retries=10
+ '[' 10 -ge 0 ']'
++ kubectl get -n default daemonset csi-hostpathplugin -o 'jsonpath={.status.numberReady}'
+ ready=0
++ kubectl get -n default daemonset csi-hostpathplugin -o 'jsonpath={.status.desiredNumberScheduled}'
+ required=3
+ '[' 0 -gt 0 ']'
+ retries=9
+ sleep 3
+ '[' 9 -ge 0 ']'
++ kubectl get -n default daemonset csi-hostpathplugin -o 'jsonpath={.status.numberReady}'
+ ready=0
++ kubectl get -n default daemonset csi-hostpathplugin -o 'jsonpath={.status.desiredNumberScheduled}'
+ required=3
+ '[' 0 -gt 0 ']'
+ retries=8
+ sleep 3
+ '[' 8 -ge 0 ']'
++ kubectl get -n default daemonset csi-hostpathplugin -o 'jsonpath={.status.numberReady}'
+ ready=0
++ kubectl get -n default daemonset csi-hostpathplugin -o 'jsonpath={.status.desiredNumberScheduled}'
+ required=3
+ '[' 0 -gt 0 ']'
+ retries=7
+ sleep 3
+ '[' 7 -ge 0 ']'
++ kubectl get -n default daemonset csi-hostpathplugin -o 'jsonpath={.status.numberReady}'
+ ready=0
++ kubectl get -n default daemonset csi-hostpathplugin -o 'jsonpath={.status.desiredNumberScheduled}'
+ required=3
+ '[' 0 -gt 0 ']'
+ retries=6
+ sleep 3
+ '[' 6 -ge 0 ']'
++ kubectl get -n default daemonset csi-hostpathplugin -o 'jsonpath={.status.numberReady}'
+ ready=0
++ kubectl get -n default daemonset csi-hostpathplugin -o 'jsonpath={.status.desiredNumberScheduled}'
+ required=3
+ '[' 0 -gt 0 ']'
+ retries=5
+ sleep 3
+ '[' 5 -ge 0 ']'
++ kubectl get -n default daemonset csi-hostpathplugin -o 'jsonpath={.status.numberReady}'
+ ready=0
++ kubectl get -n default daemonset csi-hostpathplugin -o 'jsonpath={.status.desiredNumberScheduled}'
+ required=3
+ '[' 0 -gt 0 ']'
+ retries=4
+ sleep 3
+ '[' 4 -ge 0 ']'
++ kubectl get -n default daemonset csi-hostpathplugin -o 'jsonpath={.status.numberReady}'
+ ready=0
++ kubectl get -n default daemonset csi-hostpathplugin -o 'jsonpath={.status.desiredNumberScheduled}'
+ required=3
+ '[' 0 -gt 0 ']'
+ retries=3
+ sleep 3
+ '[' 3 -ge 0 ']'
++ kubectl get -n default daemonset csi-hostpathplugin -o 'jsonpath={.status.numberReady}'
+ ready=0
++ kubectl get -n default daemonset csi-hostpathplugin -o 'jsonpath={.status.desiredNumberScheduled}'
+ required=3
+ '[' 0 -gt 0 ']'
+ retries=2
+ sleep 3
+ '[' 2 -ge 0 ']'
++ kubectl get -n default daemonset csi-hostpathplugin -o 'jsonpath={.status.numberReady}'
+ ready=0
++ kubectl get -n default daemonset csi-hostpathplugin -o 'jsonpath={.status.desiredNumberScheduled}'
+ required=3
+ '[' 0 -gt 0 ']'
+ retries=1
+ sleep 3
+ '[' 1 -ge 0 ']'
++ kubectl get -n default daemonset csi-hostpathplugin -o 'jsonpath={.status.numberReady}'
+ ready=0
++ kubectl get -n default daemonset csi-hostpathplugin -o 'jsonpath={.status.desiredNumberScheduled}'
+ required=3
+ '[' 0 -gt 0 ']'
+ retries=0
+ sleep 3
+ '[' 0 -ge 0 ']'
++ kubectl get -n default daemonset csi-hostpathplugin -o 'jsonpath={.status.numberReady}'
+ ready=0
++ kubectl get -n default daemonset csi-hostpathplugin -o 'jsonpath={.status.desiredNumberScheduled}'
+ required=3
+ '[' 0 -gt 0 ']'
+ retries=-1
+ sleep 3
+ '[' -1 -ge 0 ']'
+ return 1
+ echo

+ echo 'driver not ready'
driver not ready
+ echo Deployment:
Deployment:
+ set +e
+ set -x
+ kubectl describe all,role,clusterrole,rolebinding,clusterrolebinding,serviceaccount,storageclass,csidriver --all-namespaces -l app.kubernetes.io/instance=hostpath.csi.k8s.io
Name:                     hostpath-service
Namespace:                default
Labels:                   app.kubernetes.io/component=socat
                          app.kubernetes.io/instance=hostpath.csi.k8s.io
                          app.kubernetes.io/name=csi-hostpath-socat
                          app.kubernetes.io/part-of=csi-driver-host-path
Annotations:              <none>
Selector:                 app.kubernetes.io/component=socat,app.kubernetes.io/instance=hostpath.csi.k8s.io,app.kubernetes.io/name=csi-hostpath-socat,app.kubernetes.io/part-of=csi-driver-host-path
Type:                     NodePort
IP Family Policy:         SingleStack
IP Families:              IPv4
IP:                       172.30.239.64
IPs:                      172.30.239.64
Port:                     <unset>  10000/TCP
TargetPort:               10000/TCP
NodePort:                 <unset>  30916/TCP
Endpoints:                <none>
Session Affinity:         None
External Traffic Policy:  Cluster
Events:                   <none>


Name:           csi-hostpathplugin
Selector:       app.kubernetes.io/component=plugin,app.kubernetes.io/instance=hostpath.csi.k8s.io,app.kubernetes.io/name=csi-hostpathplugin,app.kubernetes.io/part-of=csi-driver-host-path
Node-Selector:  <none>
Labels:         app.kubernetes.io/component=plugin
                app.kubernetes.io/instance=hostpath.csi.k8s.io
                app.kubernetes.io/name=csi-hostpathplugin
                app.kubernetes.io/part-of=csi-driver-host-path
Annotations:    deprecated.daemonset.template.generation: 1
Desired Number of Nodes Scheduled: 3
Current Number of Nodes Scheduled: 0
Number of Nodes Scheduled with Up-to-date Pods: 0
Number of Nodes Scheduled with Available Pods: 0
Number of Nodes Misscheduled: 0
Pods Status:  0 Running / 0 Waiting / 0 Succeeded / 0 Failed
Pod Template:
  Labels:           app.kubernetes.io/component=plugin
                    app.kubernetes.io/instance=hostpath.csi.k8s.io
                    app.kubernetes.io/name=csi-hostpathplugin
                    app.kubernetes.io/part-of=csi-driver-host-path
  Service Account:  csi-hostpathplugin-sa
  Containers:
   csi-provisioner:
    Image:      registry.k8s.io/sig-storage/csi-provisioner:v3.3.0
    Port:       <none>
    Host Port:  <none>
    Args:
      -v=5
      --csi-address=/csi/csi.sock
      --feature-gates=Topology=true
      --enable-capacity
      --capacity-ownerref-level=0
      --node-deployment=true
      --strict-topology=true
      --immediate-topology=false
      --worker-threads=5
    Environment:
      NODE_NAME:   (v1:spec.nodeName)
      NAMESPACE:   (v1:metadata.namespace)
      POD_NAME:    (v1:metadata.name)
    Mounts:
      /csi from socket-dir (rw)
   node-driver-registrar:
    Image:      registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.6.0
    Port:       <none>
    Host Port:  <none>
    Args:
      --v=5
      --csi-address=/csi/csi.sock
      --kubelet-registration-path=/var/lib/kubelet/plugins/csi-hostpath/csi.sock
    Environment:
      KUBE_NODE_NAME:   (v1:spec.nodeName)
    Mounts:
      /csi from socket-dir (rw)
      /csi-data-dir from csi-data-dir (rw)
      /registration from registration-dir (rw)
   hostpath:
    Image:      registry.k8s.io/sig-storage/hostpathplugin:v1.7.3
    Port:       9898/TCP
    Host Port:  0/TCP
    Args:
      --drivername=hostpath.csi.k8s.io
      --v=5
      --endpoint=$(CSI_ENDPOINT)
      --nodeid=$(KUBE_NODE_NAME)
      --capacity=slow=10Gi
      --capacity=fast=100Gi
    Liveness:  http-get http://:healthz/healthz delay=10s timeout=3s period=2s #success=1 #failure=5
    Environment:
      CSI_ENDPOINT:    unix:///csi/csi.sock
      KUBE_NODE_NAME:   (v1:spec.nodeName)
    Mounts:
      /csi from socket-dir (rw)
      /csi-data-dir from csi-data-dir (rw)
      /dev from dev-dir (rw)
      /var/lib/kubelet/plugins from plugins-dir (rw)
      /var/lib/kubelet/pods from mountpoint-dir (rw)
   liveness-probe:
    Image:      registry.k8s.io/sig-storage/livenessprobe:v2.8.0
    Port:       <none>
    Host Port:  <none>
    Args:
      --csi-address=/csi/csi.sock
      --health-port=9898
    Environment:  <none>
    Mounts:
      /csi from socket-dir (rw)
   csi-snapshotter:
    Image:      registry.k8s.io/sig-storage/csi-snapshotter:v6.1.0
    Port:       <none>
    Host Port:  <none>
    Args:
      -v=5
      --csi-address=/csi/csi.sock
      --node-deployment
    Environment:
      NODE_NAME:   (v1:spec.nodeName)
    Mounts:
      /csi from socket-dir (rw)
  Volumes:
   socket-dir:
    Type:          HostPath (bare host directory volume)
    Path:          /var/lib/kubelet/plugins/csi-hostpath
    HostPathType:  DirectoryOrCreate
   mountpoint-dir:
    Type:          HostPath (bare host directory volume)
    Path:          /var/lib/kubelet/pods
    HostPathType:  DirectoryOrCreate
   registration-dir:
    Type:          HostPath (bare host directory volume)
    Path:          /var/lib/kubelet/plugins_registry
    HostPathType:  Directory
   plugins-dir:
    Type:          HostPath (bare host directory volume)
    Path:          /var/lib/kubelet/plugins
    HostPathType:  Directory
   csi-data-dir:
    Type:          HostPath (bare host directory volume)
    Path:          /var/lib/csi-hostpath-data/
    HostPathType:  DirectoryOrCreate
   dev-dir:
    Type:          HostPath (bare host directory volume)
    Path:          /dev
    HostPathType:  Directory
Events:
  Type     Reason        Age                From                  Message
  ----     ------        ----               ----                  -------
  Warning  FailedCreate  53s                daemonset-controller  Error creating: pods "csi-hostpathplugin-cbkkn" is forbidden: violates PodSecurity "restricted:latest": privileged (containers "csi-provisioner", "node-driver-registrar", "hostpath", "csi-snapshotter" must not set securityContext.privileged=true), allowPrivilegeEscalation != false (containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.allowPrivilegeEscalation=false), unrestricted capabilities (containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.capabilities.drop=["ALL"]), restricted volume types (volumes "socket-dir", "mountpoint-dir", "registration-dir", "plugins-dir", "csi-data-dir", "dev-dir" use restricted volume type "hostPath"), runAsNonRoot != true (pod or containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.runAsNonRoot=true), seccompProfile (pod or containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost")
  Warning  FailedCreate  53s                daemonset-controller  Error creating: pods "csi-hostpathplugin-dkkqg" is forbidden: violates PodSecurity "restricted:latest": privileged (containers "csi-provisioner", "node-driver-registrar", "hostpath", "csi-snapshotter" must not set securityContext.privileged=true), allowPrivilegeEscalation != false (containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.allowPrivilegeEscalation=false), unrestricted capabilities (containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.capabilities.drop=["ALL"]), restricted volume types (volumes "socket-dir", "mountpoint-dir", "registration-dir", "plugins-dir", "csi-data-dir", "dev-dir" use restricted volume type "hostPath"), runAsNonRoot != true (pod or containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.runAsNonRoot=true), seccompProfile (pod or containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost")
  Warning  FailedCreate  53s                daemonset-controller  Error creating: pods "csi-hostpathplugin-tkkgz" is forbidden: violates PodSecurity "restricted:latest": privileged (containers "csi-provisioner", "node-driver-registrar", "hostpath", "csi-snapshotter" must not set securityContext.privileged=true), allowPrivilegeEscalation != false (containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.allowPrivilegeEscalation=false), unrestricted capabilities (containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.capabilities.drop=["ALL"]), restricted volume types (volumes "socket-dir", "mountpoint-dir", "registration-dir", "plugins-dir", "csi-data-dir", "dev-dir" use restricted volume type "hostPath"), runAsNonRoot != true (pod or containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.runAsNonRoot=true), seccompProfile (pod or containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost")
  Warning  FailedCreate  53s                daemonset-controller  Error creating: pods "csi-hostpathplugin-fsp66" is forbidden: violates PodSecurity "restricted:latest": privileged (containers "csi-provisioner", "node-driver-registrar", "hostpath", "csi-snapshotter" must not set securityContext.privileged=true), allowPrivilegeEscalation != false (containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.allowPrivilegeEscalation=false), unrestricted capabilities (containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.capabilities.drop=["ALL"]), restricted volume types (volumes "socket-dir", "mountpoint-dir", "registration-dir", "plugins-dir", "csi-data-dir", "dev-dir" use restricted volume type "hostPath"), runAsNonRoot != true (pod or containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.runAsNonRoot=true), seccompProfile (pod or containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost")
  Warning  FailedCreate  53s                daemonset-controller  Error creating: pods "csi-hostpathplugin-9vxj2" is forbidden: violates PodSecurity "restricted:latest": privileged (containers "csi-provisioner", "node-driver-registrar", "hostpath", "csi-snapshotter" must not set securityContext.privileged=true), allowPrivilegeEscalation != false (containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.allowPrivilegeEscalation=false), unrestricted capabilities (containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.capabilities.drop=["ALL"]), restricted volume types (volumes "socket-dir", "mountpoint-dir", "registration-dir", "plugins-dir", "csi-data-dir", "dev-dir" use restricted volume type "hostPath"), runAsNonRoot != true (pod or containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.runAsNonRoot=true), seccompProfile (pod or containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost")
  Warning  FailedCreate  53s                daemonset-controller  Error creating: pods "csi-hostpathplugin-lpjbf" is forbidden: violates PodSecurity "restricted:latest": privileged (containers "csi-provisioner", "node-driver-registrar", "hostpath", "csi-snapshotter" must not set securityContext.privileged=true), allowPrivilegeEscalation != false (containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.allowPrivilegeEscalation=false), unrestricted capabilities (containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.capabilities.drop=["ALL"]), restricted volume types (volumes "socket-dir", "mountpoint-dir", "registration-dir", "plugins-dir", "csi-data-dir", "dev-dir" use restricted volume type "hostPath"), runAsNonRoot != true (pod or containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.runAsNonRoot=true), seccompProfile (pod or containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost")
  Warning  FailedCreate  53s                daemonset-controller  Error creating: pods "csi-hostpathplugin-f5mtp" is forbidden: violates PodSecurity "restricted:latest": privileged (containers "csi-provisioner", "node-driver-registrar", "hostpath", "csi-snapshotter" must not set securityContext.privileged=true), allowPrivilegeEscalation != false (containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.allowPrivilegeEscalation=false), unrestricted capabilities (containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.capabilities.drop=["ALL"]), restricted volume types (volumes "socket-dir", "mountpoint-dir", "registration-dir", "plugins-dir", "csi-data-dir", "dev-dir" use restricted volume type "hostPath"), runAsNonRoot != true (pod or containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.runAsNonRoot=true), seccompProfile (pod or containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost")
  Warning  FailedCreate  52s                daemonset-controller  Error creating: pods "csi-hostpathplugin-jjlmv" is forbidden: violates PodSecurity "restricted:latest": privileged (containers "csi-provisioner", "node-driver-registrar", "hostpath", "csi-snapshotter" must not set securityContext.privileged=true), allowPrivilegeEscalation != false (containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.allowPrivilegeEscalation=false), unrestricted capabilities (containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.capabilities.drop=["ALL"]), restricted volume types (volumes "socket-dir", "mountpoint-dir", "registration-dir", "plugins-dir", "csi-data-dir", "dev-dir" use restricted volume type "hostPath"), runAsNonRoot != true (pod or containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.runAsNonRoot=true), seccompProfile (pod or containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost")
  Warning  FailedCreate  52s                daemonset-controller  Error creating: pods "csi-hostpathplugin-lpxqj" is forbidden: violates PodSecurity "restricted:latest": privileged (containers "csi-provisioner", "node-driver-registrar", "hostpath", "csi-snapshotter" must not set securityContext.privileged=true), allowPrivilegeEscalation != false (containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.allowPrivilegeEscalation=false), unrestricted capabilities (containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.capabilities.drop=["ALL"]), restricted volume types (volumes "socket-dir", "mountpoint-dir", "registration-dir", "plugins-dir", "csi-data-dir", "dev-dir" use restricted volume type "hostPath"), runAsNonRoot != true (pod or containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.runAsNonRoot=true), seccompProfile (pod or containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost")
  Warning  FailedCreate  12s (x5 over 50s)  daemonset-controller  (combined from similar events): Error creating: pods "csi-hostpathplugin-x7zgx" is forbidden: violates PodSecurity "restricted:latest": privileged (containers "csi-provisioner", "node-driver-registrar", "hostpath", "csi-snapshotter" must not set securityContext.privileged=true), allowPrivilegeEscalation != false (containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.allowPrivilegeEscalation=false), unrestricted capabilities (containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.capabilities.drop=["ALL"]), restricted volume types (volumes "socket-dir", "mountpoint-dir", "registration-dir", "plugins-dir", "csi-data-dir", "dev-dir" use restricted volume type "hostPath"), runAsNonRoot != true (pod or containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.runAsNonRoot=true), seccompProfile (pod or containers "csi-provisioner", "node-driver-registrar", "hostpath", "liveness-probe", "csi-snapshotter" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost")


Name:               csi-hostpath-socat
Namespace:          default
CreationTimestamp:  Wed, 12 Jul 2023 10:54:04 +0200
Selector:           app.kubernetes.io/component=socat,app.kubernetes.io/instance=hostpath.csi.k8s.io,app.kubernetes.io/name=csi-hostpath-socat,app.kubernetes.io/part-of=csi-driver-host-path
Labels:             app.kubernetes.io/component=socat
                    app.kubernetes.io/instance=hostpath.csi.k8s.io
                    app.kubernetes.io/name=csi-hostpath-socat
                    app.kubernetes.io/part-of=csi-driver-host-path
Annotations:        <none>
Replicas:           1 desired | 0 total
Update Strategy:    RollingUpdate
  Partition:        0
  MaxUnavailable:   1
Pods Status:        0 Running / 0 Waiting / 0 Succeeded / 0 Failed
Pod Template:
  Labels:  app.kubernetes.io/component=socat
           app.kubernetes.io/instance=hostpath.csi.k8s.io
           app.kubernetes.io/name=csi-hostpath-socat
           app.kubernetes.io/part-of=csi-driver-host-path
  Containers:
   socat:
    Image:      docker.io/alpine/socat:1.7.4.3-r0
    Port:       <none>
    Host Port:  <none>
    Args:
      tcp-listen:10000,fork,reuseaddr
      unix-connect:/csi/csi.sock
    Environment:  <none>
    Mounts:
      /csi from socket-dir (rw)
      /var/lib/kubelet/pods from mountpoint-dir (rw)
  Volumes:
   socket-dir:
    Type:          HostPath (bare host directory volume)
    Path:          /var/lib/kubelet/plugins/csi-hostpath
    HostPathType:  DirectoryOrCreate
   mountpoint-dir:
    Type:          HostPath (bare host directory volume)
    Path:          /var/lib/kubelet/pods
    HostPathType:  DirectoryOrCreate
Volume Claims:     <none>
Events:
  Type     Reason        Age                From                    Message
  ----     ------        ----               ----                    -------
  Warning  FailedCreate  6s (x14 over 47s)  statefulset-controller  create Pod csi-hostpath-socat-0 in StatefulSet csi-hostpath-socat failed error: pods "csi-hostpath-socat-0" is forbidden: violates PodSecurity "restricted:latest": privileged (container "socat" must not set securityContext.privileged=true), allowPrivilegeEscalation != false (container "socat" must set securityContext.allowPrivilegeEscalation=false), unrestricted capabilities (container "socat" must set securityContext.capabilities.drop=["ALL"]), restricted volume types (volumes "socket-dir", "mountpoint-dir" use restricted volume type "hostPath"), runAsNonRoot != true (pod or container "socat" must set securityContext.runAsNonRoot=true), seccompProfile (pod or container "socat" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost")


Name:         external-provisioner-cfg
Labels:       app.kubernetes.io/instance=hostpath.csi.k8s.io
              app.kubernetes.io/part-of=csi-driver-host-path
Annotations:  <none>
PolicyRule:
  Resources                            Non-Resource URLs  Resource Names  Verbs
  ---------                            -----------------  --------------  -----
  csistoragecapacities.storage.k8s.io  []                 []              [get list watch create update patch delete]
  leases.coordination.k8s.io           []                 []              [get watch list delete update create]
  pods                                 []                 []              [get]
  replicasets.apps                     []                 []              [get]


Name:         external-snapshotter-leaderelection
Labels:       app.kubernetes.io/instance=hostpath.csi.k8s.io
              app.kubernetes.io/part-of=csi-driver-host-path
Annotations:  <none>
PolicyRule:
  Resources                   Non-Resource URLs  Resource Names  Verbs
  ---------                   -----------------  --------------  -----
  leases.coordination.k8s.io  []                 []              [get watch list delete update create]


Name:         external-provisioner-runner
Labels:       app.kubernetes.io/instance=hostpath.csi.k8s.io
              app.kubernetes.io/part-of=csi-driver-host-path
Annotations:  <none>
PolicyRule:
  Resources                                       Non-Resource URLs  Resource Names  Verbs
  ---------                                       -----------------  --------------  -----
  persistentvolumes                               []                 []              [get list watch create delete]
  persistentvolumeclaims                          []                 []              [get list watch update]
  nodes                                           []                 []              [get list watch]
  csinodes.storage.k8s.io                         []                 []              [get list watch]
  storageclasses.storage.k8s.io                   []                 []              [get list watch]
  volumeattachments.storage.k8s.io                []                 []              [get list watch]
  volumesnapshotcontents.snapshot.storage.k8s.io  []                 []              [get list]
  volumesnapshots.snapshot.storage.k8s.io         []                 []              [get list]
  events                                          []                 []              [list watch create update patch]


Name:         external-snapshotter-runner
Labels:       app.kubernetes.io/instance=hostpath.csi.k8s.io
              app.kubernetes.io/part-of=csi-driver-host-path
Annotations:  <none>
PolicyRule:
  Resources                                              Non-Resource URLs  Resource Names  Verbs
  ---------                                              -----------------  --------------  -----
  volumesnapshotcontents.snapshot.storage.k8s.io         []                 []              [get list watch update patch]
  volumesnapshotclasses.snapshot.storage.k8s.io          []                 []              [get list watch]
  events                                                 []                 []              [list watch create update patch]
  volumesnapshotcontents.snapshot.storage.k8s.io/status  []                 []              [update patch]


Name:         csi-hostpathplugin-provisioner-role
Labels:       app.kubernetes.io/component=provisioner-role
              app.kubernetes.io/instance=hostpath.csi.k8s.io
              app.kubernetes.io/name=csi-hostpathplugin
              app.kubernetes.io/part-of=csi-driver-host-path
Annotations:  <none>
Role:
  Kind:  Role
  Name:  external-provisioner-cfg
Subjects:
  Kind            Name                   Namespace
  ----            ----                   ---------
  ServiceAccount  csi-hostpathplugin-sa  


Name:         csi-hostpathplugin-snapshotter-role
Labels:       app.kubernetes.io/component=snapshotter-role
              app.kubernetes.io/instance=hostpath.csi.k8s.io
              app.kubernetes.io/name=csi-hostpathplugin
              app.kubernetes.io/part-of=csi-driver-host-path
Annotations:  <none>
Role:
  Kind:  Role
  Name:  external-snapshotter-leaderelection
Subjects:
  Kind            Name                   Namespace
  ----            ----                   ---------
  ServiceAccount  csi-hostpathplugin-sa  


Name:         csi-provisioner-role-cfg
Labels:       app.kubernetes.io/instance=hostpath.csi.k8s.io
              app.kubernetes.io/part-of=csi-driver-host-path
Annotations:  <none>
Role:
  Kind:  Role
  Name:  external-provisioner-cfg
Subjects:
  Kind            Name             Namespace
  ----            ----             ---------
  ServiceAccount  csi-provisioner  default


Name:         external-snapshotter-leaderelection
Labels:       app.kubernetes.io/instance=hostpath.csi.k8s.io
              app.kubernetes.io/part-of=csi-driver-host-path
Annotations:  <none>
Role:
  Kind:  Role
  Name:  external-snapshotter-leaderelection
Subjects:
  Kind            Name             Namespace
  ----            ----             ---------
  ServiceAccount  csi-snapshotter  default


Name:         csi-hostpathplugin-provisioner-cluster-role
Labels:       app.kubernetes.io/component=provisioner-cluster-role
              app.kubernetes.io/instance=hostpath.csi.k8s.io
              app.kubernetes.io/name=csi-hostpathplugin
              app.kubernetes.io/part-of=csi-driver-host-path
Annotations:  <none>
Role:
  Kind:  ClusterRole
  Name:  external-provisioner-runner
Subjects:
  Kind            Name                   Namespace
  ----            ----                   ---------
  ServiceAccount  csi-hostpathplugin-sa  default


Name:         csi-hostpathplugin-snapshotter-cluster-role
Labels:       app.kubernetes.io/component=snapshotter-cluster-role
              app.kubernetes.io/instance=hostpath.csi.k8s.io
              app.kubernetes.io/name=csi-hostpathplugin
              app.kubernetes.io/part-of=csi-driver-host-path
Annotations:  <none>
Role:
  Kind:  ClusterRole
  Name:  external-snapshotter-runner
Subjects:
  Kind            Name                   Namespace
  ----            ----                   ---------
  ServiceAccount  csi-hostpathplugin-sa  default


Name:         csi-provisioner-role
Labels:       app.kubernetes.io/instance=hostpath.csi.k8s.io
              app.kubernetes.io/part-of=csi-driver-host-path
Annotations:  <none>
Role:
  Kind:  ClusterRole
  Name:  external-provisioner-runner
Subjects:
  Kind            Name             Namespace
  ----            ----             ---------
  ServiceAccount  csi-provisioner  default


Name:         csi-snapshotter-role
Labels:       app.kubernetes.io/instance=hostpath.csi.k8s.io
              app.kubernetes.io/part-of=csi-driver-host-path
Annotations:  <none>
Role:
  Kind:  ClusterRole
  Name:  external-snapshotter-runner
Subjects:
  Kind            Name             Namespace
  ----            ----             ---------
  ServiceAccount  csi-snapshotter  default


Name:                csi-hostpathplugin-sa
Namespace:           default
Labels:              app.kubernetes.io/component=serviceaccount
                     app.kubernetes.io/instance=hostpath.csi.k8s.io
                     app.kubernetes.io/name=csi-hostpathplugin
                     app.kubernetes.io/part-of=csi-driver-host-path
Annotations:         <none>
Image pull secrets:  csi-hostpathplugin-sa-dockercfg-c6k4k
Mountable secrets:   csi-hostpathplugin-sa-dockercfg-c6k4k
Tokens:              csi-hostpathplugin-sa-token-trnhr
Events:              <none>


Name:                csi-provisioner
Namespace:           default
Labels:              app.kubernetes.io/instance=hostpath.csi.k8s.io
                     app.kubernetes.io/part-of=csi-driver-host-path
Annotations:         <none>
Image pull secrets:  csi-provisioner-dockercfg-k44gr
Mountable secrets:   csi-provisioner-dockercfg-k44gr
Tokens:              csi-provisioner-token-hbqqs
Events:              <none>


Name:                csi-snapshotter
Namespace:           default
Labels:              app.kubernetes.io/instance=hostpath.csi.k8s.io
                     app.kubernetes.io/part-of=csi-driver-host-path
Annotations:         <none>
Image pull secrets:  csi-snapshotter-dockercfg-2frhr
Mountable secrets:   csi-snapshotter-dockercfg-2frhr
Tokens:              csi-snapshotter-token-9vcls
Events:              <none>


Name:            csi-hostpath-fast
IsDefaultClass:  No
Annotations:     kubectl.kubernetes.io/last-applied-configuration={"apiVersion":"storage.k8s.io/v1","kind":"StorageClass","metadata":{"annotations":{},"labels":{"app.kubernetes.io/component":"storageclass","app.kubernetes.io/instance":"hostpath.csi.k8s.io","app.kubernetes.io/name":"csi-hostpath-fast","app.kubernetes.io/part-of":"csi-driver-host-path"},"name":"csi-hostpath-fast"},"parameters":{"kind":"fast"},"provisioner":"hostpath.csi.k8s.io","volumeBindingMode":"WaitForFirstConsumer"}

Provisioner:           hostpath.csi.k8s.io
Parameters:            kind=fast
AllowVolumeExpansion:  <unset>
MountOptions:          <none>
ReclaimPolicy:         Delete
VolumeBindingMode:     WaitForFirstConsumer
Events:                <none>


Name:            csi-hostpath-slow
IsDefaultClass:  No
Annotations:     kubectl.kubernetes.io/last-applied-configuration={"apiVersion":"storage.k8s.io/v1","kind":"StorageClass","metadata":{"annotations":{},"labels":{"app.kubernetes.io/component":"storageclass","app.kubernetes.io/instance":"hostpath.csi.k8s.io","app.kubernetes.io/name":"csi-hostpath-slow","app.kubernetes.io/part-of":"csi-driver-host-path"},"name":"csi-hostpath-slow"},"parameters":{"kind":"slow"},"provisioner":"hostpath.csi.k8s.io","volumeBindingMode":"WaitForFirstConsumer"}

Provisioner:           hostpath.csi.k8s.io
Parameters:            kind=slow
AllowVolumeExpansion:  <unset>
MountOptions:          <none>
ReclaimPolicy:         Delete
VolumeBindingMode:     WaitForFirstConsumer
Events:                <none>


Name:         hostpath.csi.k8s.io
Namespace:    
Labels:       app.kubernetes.io/component=csi-driver
              app.kubernetes.io/instance=hostpath.csi.k8s.io
              app.kubernetes.io/name=hostpath.csi.k8s.io
              app.kubernetes.io/part-of=csi-driver-host-path
Annotations:  <none>
API Version:  storage.k8s.io/v1
Kind:         CSIDriver
Metadata:
  Creation Timestamp:  2023-07-12T08:53:55Z
  Resource Version:    35672
  UID:                 3d646fe0-edf5-4e43-93c1-864b7d0f84a7
Spec:
  Attach Required:     false
  Fs Group Policy:     File
  Pod Info On Mount:   true
  Requires Republish:  false
  Storage Capacity:    true
  Volume Lifecycle Modes:
    Persistent
    Ephemeral
Events:  <none>
+ echo

+ echo 'Pod logs:'
Pod logs:
+ kubectl get pods -l app.kubernetes.io/instance=hostpath.csi.k8s.io --all-namespaces '-o=jsonpath={range .items[*]}{.metadata.name}{" "}{range .spec.containers[*]}{.name}{" "}{end}{"\n"}{end}'
+ read -r pod containers
+ exit 1
+ rm -rf /tmp/tmp.Lrsz8v4q8l
