mirror of https://github.com/openkruise/kruise.git
16 lines
533 B
Bash
Executable File
16 lines
533 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
if [ -z "$IMG" ]; then
|
|
echo "no found IMG env"
|
|
exit 1
|
|
fi
|
|
|
|
set -e
|
|
|
|
make kustomize
|
|
KUSTOMIZE=$(pwd)/bin/kustomize
|
|
(cd config/manager && "${KUSTOMIZE}" edit set image controller="${IMG}")
|
|
"${KUSTOMIZE}" build config/default | sed -e 's/imagePullPolicy: Always/imagePullPolicy: IfNotPresent/g' > /tmp/kruise-kustomization.yaml
|
|
echo -e "# Adds namespace to all resources.\nnamespace: kruise-system\n\nresources:\n- manager.yaml" > config/manager/kustomization.yaml
|
|
kubectl apply -f /tmp/kruise-kustomization.yaml
|