And this is what I want to achieve: ```apiVersion:...
# general
l
And this is what I want to achieve:
Copy code
apiVersion: <http://argoproj.io/v1alpha1|argoproj.io/v1alpha1>
kind: Application
metadata:
  name: alb-controller
  namespace: argocd
  finalizers:
    - <http://resources-finalizer.argocd.argoproj.io|resources-finalizer.argocd.argoproj.io>
spec:
  project: default
  # Source of the application manifests
  source:
    repoURL: <https://bitbucket.org/mycharts/infra.git>
    targetRevision: main
    path: k8s/charts/alb-controller
    # helm specific config
    helm:
      values: |
        image: 
          repository: <http://123456789.dkr.ecr.eu-west-1.amazonaws.com/backend|123456789.dkr.ecr.eu-west-1.amazonaws.com/backend>
          pullPolicy: IfNotPresent
          tag: latest
b
@limited-army-96747 are you struggling with the helm values part?
l
@billowy-army-68599 that is correct
b
I would use
json.stringify
here:
Copy code
let helm_values = JSON.stringify({
  image: {
    repository: "<http://123456789.dkr.ecr.eu-west-1.amazonaws.com/backend|123456789.dkr.ecr.eu-west-1.amazonaws.com/backend>"
  }
})

const albController = new k8s.apiextensions.CustomResource('alb-controller', {
  apiVersion: '<http://argoproj.io/v1alpha1|argoproj.io/v1alpha1>',
  kind: 'Application',
  metadata: {
    name: 'alb-controller',
    namespace: 'argocd',
    finalizers: ['<http://resources-finalizer.argocd.argoproj.io|resources-finalizer.argocd.argoproj.io>'],
  },
  spec: {
    project: 'default',
    source: {
      repoURL: '<https://bitbucket.org/mycharts/infra.git>',
      targetRevision: 'main',
      path: 'k8s/charts/alb-controller',
      helm: helm_values
      },
    },
  },
}, { dependsOn: [argocd] })
l
that did not work 😞 But I have found a different way to pass the values to argo Thanks anyway
b
@limited-army-96747 mind sharing your solution?
l
@billowy-army-68599
Copy code
helm: {
        parameters: [
          {
            name: 'clusterName',
            value: `eks-${pulumi.getStack()}`,
          },
          {
            name: 'vpcId',
            value: vpc.id,
          },
          {
            name: 'region',
            value: 'eu-central-1',
          },
          {
            name: 'serviceAccount.create',
            value: 'true',
          },
          {
            name: 'roleArn"',
            value: albPodRole.arn,
          },
          {
            name: 'computeType',
            value: 'fargate',
          },
          {
            name: 'fargateProfile',
            value: fargateProfile.arn,
          },
        ],
      },
that is not ideal, because I can't pass eks annotations that uses
.
I was unable to find a way to escape it. So I had to tweak the chart a little
but it is working