https://garden.io logo
#🌱|help-and-getting-started
Deploy only part of Helm templates
# 🌱|help-and-getting-started
p

proud-river-11384

09/22/2023, 9:24 PM
I have two helm template files:
Copy code
api-deployment.yaml
worker-deployment.yaml
Initially I'm trying to only deploy the worker, so I added an exclude clause in my garden.yaml for the helm deployment:
Copy code
exclude:
  - 'api-deployment.yaml'
This works at excluding the file; I can see in the debug logs
Found 5 files in Deploy action worker-deploy root /Users/mark/workspace/policies/.k8s/helm
, where previously it found 6. However, the deployment still attempts to deploy the api application. I'm assuming this is something to do with how Helm works and is called under the hood. Is there a way to do what I'm trying to do? Maybe it's just too far outside of a reasonable usecase?
q

quaint-dress-831

09/25/2023, 10:36 AM
Hi @proud-river-11384 a few things to try: - Helm itself may already have the deployment in-cluster and won't pick up on these changes. What happens if you uninstall the Helm release and run
garden deploy --force-refresh
? - are there any dependencies between the two inside your Helm chart? - finally, you could write in a Helm value that conditionally wraps the the API deployment, then pass in that key to the
helm
action. That would work.
p

proud-river-11384

09/25/2023, 10:41 AM
> Helm itself may already have the deployment in-cluster I think it's likely this one, I'm trying to use garden to replace the worker in an already existing cluster. Is there a way to tell garden to ignore the existing api application? Or will I need to modify my helm chart?
q

quaint-dress-831

09/25/2023, 2:52 PM
Let me know what ends up working for you!