Skip to content

Commit

Permalink
add comment for downloading rbacs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayush Rangwala committed Apr 26, 2021
1 parent c96e68a commit c8ecbb5
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions deploy/util/deploy-hostpath.sh
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,15 @@ for component in CSI_PROVISIONER CSI_ATTACHER CSI_SNAPSHOTTER CSI_RESIZER CSI_EX
fi

echo "adding labels to rbac"

# using kustomize kubectl plugin to add labels to he rbac files.
# since we are deploying rbas directly with the url, the kustomize plugin only works with the local files
# we need to add the files locally in temp folder and using kustomize adding labels it will be applied
if [[ "${current}" =~ ^http:// ]] || [[ "${current}" =~ ^https:// ]]; then
curl "${current}" --output "${TEMP_DIR}"/rbac.yaml --silent --location
current=./rbac.yaml
fi

cat <<- EOF > "${TEMP_DIR}"/kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
Expand All @@ -182,10 +191,6 @@ resources:
- ${current}
EOF

if [[ "${current}" =~ ^http:// ]] || [[ "${current}" =~ ^https:// ]]; then
curl "${current}" --output rbac.yaml --silent --location
fi

run kubectl apply --kustomize "${TEMP_DIR}"
done

Expand Down

0 comments on commit c8ecbb5

Please sign in to comment.