Skip to content

Commit 0ab253b

Browse files
authored
update sleep to deploy to non-default namespace (#122)
* update sleep to deploy to non-default namespace Signed-off-by: Michael Kalantar <[email protected]> * add annotation Signed-off-by: Michael Kalantar <[email protected]> --------- Signed-off-by: Michael Kalantar <[email protected]>
1 parent 88a897b commit 0ab253b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

samples/kserve-serving/sleep.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ if [ -z ${SERVICE_MESH+x} ]; then
77
SERVICE_MESH="istio"
88
fi
99

10+
if [ -z ${NS+x} ]; then
11+
NS="default"
12+
fi
13+
1014
MANIFEST=/tmp/manifest.$$
1115
cat <<EOF > $MANIFEST
1216
apiVersion: apps/v1
@@ -32,6 +36,11 @@ cat <<EOF >> $MANIFEST
3236
annotations:
3337
sidecar.istio.io/inject: "true"
3438
EOF
39+
elif [ "${SERVICE_MESH}" = "linkerd" ]; then
40+
cat <<EOF >> $MANIFEST
41+
annotations:
42+
linkerd.io/inject: enabled
43+
EOF
3544
fi
3645
cat <<EOF >> $MANIFEST
3746
spec:
@@ -81,5 +90,5 @@ data:
8190
| grep -e HTTP -e app-version
8291
EOF
8392

84-
kubectl apply -f $MANIFEST
93+
kubectl -n $NS apply -f $MANIFEST
8594
rm -f $MANIFEST

0 commit comments

Comments
 (0)