https://pulumi.com logo
#kubernetes
Title
# kubernetes
q

quiet-leather-94755

11/05/2021, 12:57 PM
While setting up an AWS EKS cluster, I've tried using https://www.pulumi.com/blog/full-access-to-helm-features-through-new-helm-release-resource-for-kubernetes/ to install the
aws-load-balancer-controller
, but it doesn't seem to pass values properly.. I'm trying to override
image.repository
to use a repo in eu-west-1, but it's still using the default us-west-2 region (and failing to pull images).. Any ideas? Possibly a bug, or am I just not passing the value in the right way?
FYI, this works, using
helm
directly:
Copy code
helm upgrade -i aws-load-balancer-controller \
    eks/aws-load-balancer-controller \
    -n kube-system \
    --set clusterName=my-cluster \
    --set image.repository=<http://602401143452.dkr.ecr.eu-west-1.amazonaws.com/amazon/aws-load-balancer-controller|602401143452.dkr.ecr.eu-west-1.amazonaws.com/amazon/aws-load-balancer-controller>
However, this doesn't work:
Copy code
alb_ingress_controller = Release(
    "alb-controller",
    ReleaseArgs(
        chart="aws-load-balancer-controller",
        version="1.3.2",
        namespace="kube-system",
        repository_opts=RepositoryOptsArgs(
            repo="<https://aws.github.io/eks-charts>",
        ),
        values={
            "clusterName": cluster.eks_cluster.name,
            "image.repository": alb_repository,
        },
    ),
    opts=pulumi.ResourceOptions(
        provider=k8s_provider,
        depends_on=[node_instancerole_attachment],
    ),
)
f

future-refrigerator-88869

11/05/2021, 12:59 PM
Can you try using it as object instead of
image.repository
? So something like this:
Copy code
values = {clusterName: ..., image: {repository: ...} }
q

quiet-leather-94755

11/05/2021, 1:06 PM
Hmm, interesting.. yeah, I'll try that 🙂
b

billowy-army-68599

11/05/2021, 1:20 PM
@future-refrigerator-88869 is correct, it's a nested object
the helm
--set
flag does't support nested objects because it's bash and yaml 🙂
q

quiet-leather-94755

11/05/2021, 4:33 PM
It worked as expected, once I passed it as an object 😁
6 Views