Skip to content

Commit 7908da9

Browse files
author
Pablo Garcia Miranda
committed
Removing unnecessary code & comments
1 parent c2fdea6 commit 7908da9

File tree

1 file changed

+4
-19
lines changed

1 file changed

+4
-19
lines changed

kind/deploy-netbox.sh

+4-19
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ fi
8787

8888
if $IS_VCLUSTER; then
8989
echo "[Running in vCluster mode] skipping docker pull and kind load for remote images."
90-
sleep 15
9190
else
9291
echo "[Running in Kind mode] pulling and loading remote images into kind cluster..."
9392
for img in "${Remote_Images[@]}"; do
@@ -101,7 +100,6 @@ cd "$(dirname "$0")/load-data-job"
101100
docker build -t netbox-load-local-data:1.0 --load --no-cache --progress=plain -f ./dockerfile .
102101
cd -
103102

104-
# Load local images into Kind only if not vCluster
105103
if ! $IS_VCLUSTER; then
106104
echo "Loading local images into kind cluster..."
107105
declare -a Local_Images=( \
@@ -132,23 +130,10 @@ echo "loading demo-data into NetBox…"
132130
# the ConfigMap manifest locally (no cluster connection needed), then pipe
133131
# that YAML into `${KUBECTL} apply` so it’s applied against the selected
134132
# target (Kind or vCluster) via our `${KUBECTL}` wrapper.
135-
if $IS_VCLUSTER; then
136-
# — vCluster —
137-
echo " → inside the vcluster"
138-
kubectl create configmap netbox-demo-data-load-job-scripts \
139-
--from-file="$(dirname "$0")/load-data-job" \
140-
--dry-run=client -o yaml \
141-
| ${KUBECTL} apply -n "${NAMESPACE}" -f -
142-
143-
else
144-
# — Kind —
145-
echo " → on the Kind cluster (${NAMESPACE})"
146-
${KUBECTL} create configmap netbox-demo-data-load-job-scripts \
147-
--from-file="$(dirname "$0")/load-data-job" \
148-
--namespace="${NAMESPACE}" \
149-
--dry-run=client -o yaml \
150-
| ${KUBECTL} apply -f -
151-
fi
133+
kubectl create configmap netbox-demo-data-load-job-scripts \
134+
--from-file="$(dirname "$0")/load-data-job" \
135+
--dry-run=client -o yaml \
136+
| ${KUBECTL} apply -n "${NAMESPACE}" -f -
152137

153138
${KUBECTL} apply -n "${NAMESPACE}" \
154139
-f "$(dirname "$0")/load-data-job.yaml"

0 commit comments

Comments
 (0)