Azure / draft

A day 0 tool for getting your app on k8s fast
MIT License
493 stars 58 forks source link

`draft generate-workflow` drops tag when updating the deployment manifest #229

Closed smurawski closed 10 months ago

smurawski commented 10 months ago

Describe the bug

When using draft generate-workflow, the deployment manifest created by draft create is updated based on the ACR specified and container image name supplied, but the tag is not requested and therefore lost when the manifest is rewritten.

Mention the platform you are using

Using draft CLI

> draft version  
version:  0.0.33
runtime SHA:  2142dbc745ac8284999f3384358680c7bc6f8570

To Reproduce

git clone https://github.com/smurawski/drafttesting
cd drafttesting
git checkout draft_create

draft generate-workflow -b main \
  -x . \
  -c aks1 \
  --container-name drafttesting \
  --deploy-type manifest \
  --registry-name acrxms72d \
  --resource-group drafttesting

The ./manifests/deployment.yaml file will be updated and the tag for the image lost.

Expected behavior

Ideally, draft would read the existing manifest and default the container registry prompt and image name, as well as offer a prompt for tag with the default of what was in the existing YAML file.

A sufficient result would be achieved if the tag was prompted for and filled in for the deployment.yaml file.

Desktop (please complete the following information):

smurawski commented 10 months ago

Disregard - the build task passes in the image from the build.

It feels a bit odd to have to enter it into the template with the image and tag are generated and supplied in the build making the information prompted for irrelevent.