kubernetes-sigs / aws-load-balancer-controller

A Kubernetes controller for Elastic Load Balancers
https://kubernetes-sigs.github.io/aws-load-balancer-controller/
Apache License 2.0
3.9k stars 1.45k forks source link

[helm chart] Allow passing template values for clusterName, region and vpcId #3664

Closed adriananeci closed 4 months ago

adriananeci commented 5 months ago

Issue

Helm doesn't support currently passing user parameters of the parent chart to the subchart (without using global) See https://github.com/helm/helm/issues/6699 and https://github.com/helm/helm/pull/6876 for more context

Description of changes

While using the aws-load-balancer-controller as a dependency for another chart , I found it difficult to pass a global or a dynamic value for the clusterName, vpcId, region and other fields.

This PR adds support for passing a template as value for the clusterName, vpcId and region field.

Initial PR was raised in https://github.com/aws/eks-charts/pull/911

Checklist

Testing

I've tested it by passing both static value and dynamic ones as follow:

Error: execution error at (test-chart/charts/aws-load-balancer-controller/templates/deployment.yaml:61:28): Chart cannot be installed without a valid clusterName! helm.go:84: [debug] execution error at (/test-chart/charts/aws-load-balancer-controller/templates/deployment.yaml:61:28): Chart cannot be installed without a valid clusterName!



By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
adriananeci commented 5 months ago

Dependency Review / govulncheck (pull_request) PR check failure doesn't seem related to changes from this PR if I read the logs right

adriananeci commented 5 months ago

/assign @M00nF1sh

shraddhabang commented 5 months ago

/lgtm

oliviassss commented 4 months ago

Dependency Review / govulncheck (pull_request) PR check failure doesn't seem related to changes from this PR if I read the logs right

@adriananeci, correct, it's another issue we will address later. can you please address the comments so we can merge your PR?

adriananeci commented 4 months ago

Dependency Review / govulncheck (pull_request) PR check failure doesn't seem related to changes from this PR if I read the logs right

@adriananeci, correct, it's another issue we will address later. can you please address the comments so we can merge your PR?

Done

oliviassss commented 4 months ago

thanks for your contribution.

/lgtm /approve

k8s-ci-robot commented 4 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adriananeci, oliviassss

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-sigs/aws-load-balancer-controller/blob/main/OWNERS)~~ [oliviassss] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment