While setting up an AWS EKS cluster, I've tried us...
# kubernetes
q
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
Can you try using it as object instead of
image.repository
? So something like this:
Copy code
values = {clusterName: ..., image: {repository: ...} }
q
Hmm, interesting.. yeah, I'll try that 🙂
b
@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
It worked as expected, once I passed it as an object 😁