https://garden.io logo
#🌱|help-and-getting-started
How does garden determine when to update helm charts
m

mammoth-flag-56137

12/07/2022, 12:39 AM
I can't seem to figure out how garden determines when it needs to deploy an update to a helm chart, as far as I can tell there should be no change but every deployment causes a new revision to the helm chart release in k8s
for example, this is our test env that auto updates on commits to master:
redis garden.yml
Copy code
kind: Module
description: In-cluster Redis for glx-connect
type: helm
name: redis
chartPath: ./redis
values:
  architecture: 'standalone'
  auth:
    enabled: false
  master:
    resources:
      limits:
        cpu: 500m
        memory: 256Mi
      requests:
        cpu: 50m
        memory: 128Mi
keycloak-pg garden.yml
Copy code
kind: Module
description: In-cluster PostgreSQL for Keycloak
disabled: ${var.keycloak.database.rds} # if rds is enabled, see infrastructure-aws
type: helm
name: keycloak-pg
chartPath: ./postgresql
dependencies: 
  - infrastructure-aws
values:
  architecture: 'standalone'
  auth:
    database: ${var.keycloak.database.name}
    username: ${var.keycloak.database.username}
    password: "${runtime.services.infrastructure-aws.outputs.keycloak_db_password}"
is it because theres variables?
b

bright-policeman-43626

12/09/2022, 5:11 PM
well, if you are updating your service image each time you deploy, that will likely also cause the chart to get an upgrade I think?
m

mammoth-flag-56137

12/10/2022, 4:04 AM
the image is the same as far as i can tell
especially the postgres images
q

quaint-dress-831

12/21/2022, 8:37 AM
@mammoth-flag-56137 is this still an issue?
m

mammoth-flag-56137

12/21/2022, 8:37 AM
yes
q

quaint-dress-831

12/22/2022, 6:44 PM
@mammoth-flag-56137 I can write up a GitHub issue for this as it's also something I am facing with my own chart deployments but it's going to be after the holidays. You're welcome to write one before me, otherwise I'll be back on the 4th 😊
@big-spring-14945 suggested it may be related to this issue which asks for caching output of commands for the exec module: https://github.com/garden-io/garden/issues/3463
m

mammoth-flag-56137

12/23/2022, 6:34 AM
Same, I won't be back til then either
q

quaint-dress-831

12/30/2022, 2:52 PM
Hey @mammoth-flag-56137 I have submitted our issue: https://github.com/garden-io/garden/issues/3473
m

mammoth-flag-56137

12/30/2022, 3:18 PM
Oh cool so you confirmed it's a bug?
q

quaint-dress-831

12/30/2022, 3:28 PM
I don't see why it wouldn't be since nothing is changed at the Helm chart level for me anyway (I'm using the CockroachDB Helm chart in my example) but the devs might have a different opinion, let's see 👀
Please feel free to add your own example to the issue! 😄
m

mammoth-flag-56137

01/01/2023, 3:47 PM
I think it happens if any of the chart values are garden variables, our redis chart has no garden variables and doesnt get updated
q

quaint-dress-831

01/01/2023, 7:28 PM
Can I ask you to add that to the GH issue? Great find
m

mammoth-flag-56137

01/02/2023, 7:50 AM
will do
done
@quaint-dress-831 it looks like your db has a static setup but does it redeploy every time?
Copy code
kind: Module
type: helm
name: my-cockroachdb
repo: https://charts.cockroachdb.com/
chart: cockroachdb
version: 10.0.0
atomicInstall: false
values:
  storage:
    persistentVolume:
      size: "25Gi"
  tls:
    enabled: false
q

quaint-dress-831

01/05/2023, 2:20 AM
It redeploys not every time but often
If I redeploy up to a few minutes after it doesn't redeploy but anything longer it cuts a new version and redeploys
It's a big chart that makes use of Job hooks so it may be the causes of our issues are different with the same outcome