https://pulumi.com logo
c

cool-egg-852

07/18/2019, 11:42 PM
Is there any way to get pulumi to auto update helm repos?
Or is it just expected to have to
helm update
and
helm repo add
and all that all the time?
w

white-balloon-205

07/18/2019, 11:43 PM
Not sure exactly what you mean? I don't think you should have to do either of these.
c

cool-egg-852

07/18/2019, 11:43 PM
Pulumi never updates the repo, therefore if I specify a new version of a chart, it won’t work.
Error: chart "memcached" matching version "2.9.0" not found in stable index. (try 'helm repo update'). No chart version found for memcached-2.9.0
for example
error: Error: Command failed: helm fetch stable/memcached --untar --version 2.9.0 --destination /tmp/tmp-2634JcP47N5dmFKY
w

white-balloon-205

07/18/2019, 11:44 PM
Could you share a snippet of how you are specifying the chart?
c

cool-egg-852

07/19/2019, 8:08 PM
Sure.
Copy code
export const memcached = new k8s.helm.v2.Chart('memcached', {
  repo: 'stable',
  chart: 'memcached',
  version: '2.9.0',
  namespace: namespace.metadata.name,
  values: {
    fullNameOverride: 'memcached',
    memcached: {
      maxItemMemory: 4096,
      extraArgs: ['-c 20240', '-I 1m', '-t 48']
    },
    imagePullPolicy: 'IfNotPresent'
  },
  transformations: [
    (resource: any) => {
      if (resource != null && resource.metadata != null) {
        resource.metadata.namespace = namespace.metadata.name;
      }
    }
  ]
});