Skip to content

Commit

Permalink
fix: Install fails with int commit hash (kserve#473)
Browse files Browse the repository at this point in the history
Wrap commit short hash in quotes

Resolves kserve#472

---------

Signed-off-by: Christian Kadner <[email protected]>
  • Loading branch information
ckadner authored Jan 11, 2024
1 parent b3c8f08 commit 5f9c6f7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/fvt-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,16 @@ jobs:
kubectl get pods -n kube-system
- name: Set controller image tag
run: echo "IMAGE_TAG=$(date +'%Y%m%dT%H%M%S%Z')" >> $GITHUB_ENV
run: |
echo "IMAGE_TAG=$(date +'%Y%m%dT%H%M%S%Z')" >> $GITHUB_ENV
- name: Update configs
# Update the image tag and reduce some resource request amounts to allow FVTs to run
# on reduced resource environments. The RollingUpdate strategy for Runtime deployments
# is also adjusted for these environments.
# Disable the torchserve ServingRuntime for now (insufficient resources to run them all).
run: |
sed -i 's/newTag:.*$/newTag: '"${{ env.IMAGE_TAG }}"'/' config/manager/kustomization.yaml
sed -i 's/newTag:.*$/newTag: "'${{ env.IMAGE_TAG }}'"/' config/manager/kustomization.yaml
sed -i '0,/cpu:.*$/s/cpu:.*$/cpu: 100m/' \
config/default/config-defaults.yaml \
config/runtimes/mlserver-1.x.yaml \
Expand Down
3 changes: 2 additions & 1 deletion scripts/deploy/iks/deploy-mm-serving.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack
mv kustomize /usr/local/bin/kustomize

# Update target tag and namespace/organization
sed -i.bak 's/newTag:.*$/newTag: '"$GIT_COMMIT_SHORT"'/' config/manager/kustomization.yaml
# enclose commit short hash in quotes to avoid it being interpreted as an int
sed -i.bak 's/newTag:.*$/newTag: "'${GIT_COMMIT_SHORT}'"/' config/manager/kustomization.yaml
sed -i.bak 's/newName:.*$/newName: '"$DOCKERSANDBOX_NAMESPACE\/modelmesh-controller"'/' config/manager/kustomization.yaml
rm config/manager/kustomization.yaml.bak

Expand Down
1 change: 1 addition & 0 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ if [[ $enable_self_signed_ca == "true" ]]; then
rm default/kustomization.yaml.bak
fi

info "kustomize build default"
kustomize build default | kubectl apply -f -

if [[ $dev_mode_logging == "true" ]]; then
Expand Down

0 comments on commit 5f9c6f7

Please sign in to comment.