Azure / draft

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

Specify individual manifest paths for workflow #325

Open peterbom opened 1 week ago

peterbom commented 1 week ago

Is your feature request related to a problem? Please describe.

When using Automated Deployments in the Azure Portal, I can select manifest files (e.g. deployment.yaml, service.yaml) individually (and they can be located anywhere in my repository). Draft is more limited, because it expects:

This means it doesn't easily support repositories containing more than one service, or project structures which don't conform to the folder structure generated by draft create.

We can almost manage individual file selection like this:

draft generate-workflow \
  --branch main \
  --build-context-path ./src/order-service \
  --cluster-name testcluster \
  --container-name order-service \
  --deploy-type manifests \
  --destination ./src/order-service \
  --registry-name testacr \
  --resource-group test-rg \
  --variable DEPLOYMENTMANIFESTPATH=./src/order-service/manifests/deployment.yaml\n./src/order-service/manifests/service.yaml \
  --variable BUILDCONTEXTPATH=./src/order-service

(I believe the Azure/k8s-deploy GitHub action supports newline-separated manifest paths, because that's what Automated Deployments generates.)

But this approach:

Describe the solution you'd like

It would be great if Draft could:

Additional context

This would be really useful for the AKS VS Code extension. Along with #324, I think this would bring enable the extension to provide an experience equivalent to Automated Deployments and still use Draft under the hood (currently it needs to use its own templates to support that experience).