If provide the branch name, git-clone.sh will throw error:
Cloning into '/antidote'...
fatal: ambiguous argument 'lesson-24': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
Seems git reset supports existing refs only
Suggest modify to git checkout --force $REF so that we can provide either commit id or branch name in the initContainers args.
After the modification, the syringe pod starts successfully and clones the non-default branch of my git repo.
Similar modification should apply to file syringe/scheduler/scheduler.go also
https://github.com/nre-learning/antidote-selfmedicate/blob/af911038605a3a7309173872cc6b5908d3c6cb56/syringe.yml#L23-L25
If provide the branch name, git-clone.sh will throw error:
Seems
git reset
supports existing refs only Suggest modify togit checkout --force $REF
so that we can provide either commit id or branch name in the initContainers args.After the modification, the syringe pod starts successfully and clones the non-default branch of my git repo.
Similar modification should apply to file
syringe/scheduler/scheduler.go
also