-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(helm): custom arguments #7423
base: master
Are you sure you want to change the base?
Conversation
Welcome @nicolas-laduguie! |
Hi @nicolas-laduguie. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@gjtempleton @jackfrancis this PR is ready for review 👍 |
@@ -421,6 +421,7 @@ vpa: | |||
| clusterAPIMode | string | `"incluster-incluster"` | Cluster API mode, see https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/clusterapi/README.md#connecting-cluster-autoscaler-to-cluster-api-management-and-workload-clusters Syntax: workloadClusterMode-ManagementClusterMode for `kubeconfig-kubeconfig`, `incluster-kubeconfig` and `single-kubeconfig` you always must mount the external kubeconfig using either `extraVolumeSecrets` or `extraMounts` and `extraVolumes` if you dont set `clusterAPIKubeconfigSecret`and thus use an in-cluster config or want to use a non capi generated kubeconfig you must do so for the workload kubeconfig as well | | |||
| clusterAPIWorkloadKubeconfigPath | string | `"/etc/kubernetes/value"` | Path to kubeconfig for connecting to Cluster API managed workloadcluster, only used if `clusterAPIMode=kubeconfig-kubeconfig or kubeconfig-incluster` | | |||
| containerSecurityContext | object | `{}` | [Security context for container](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) | | |||
| customArgs | list | `[]` | Additional custom container arguments. Refer to https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-the-parameters-to-ca for the full list of cluster autoscaler parameters and their default values. List of arguments as strings. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the idea is to have a sort of backdoor to pass any --foo=bar
configs that the helm chart doesn't yet have native support for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
But the main goal is to be able to inject a set of arguments coming from secrets or config maps through environment variables mounted from those secrets/config maps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't fully understand this use-case end-to-end. How are we doing this without helm today?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Say you mount a env variable called EXTRA_ARGS from a secret, containing multiple args and values.
You can provide $EXTRA_ARGS to cluster autoscaler command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this scenario and it works fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OOPS. fixed now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @nicolas-laduguie, for this PR, seems good to me also
/lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be great to document this use case in greater detail detail as the motivator behind this new helm value. Otherwise folks might be confused how to use it, and start using it for literal key=val options (which may be fine in a sense, but might disincentivize us from maintaining the helm chart values as the safest way to declare configuration).
Another use case for this would be where the key in the key / value pair for extraargs is overwritten for arguments which can be repeated, such as balancing-ignore-label
and balancing-label
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@orangenagy this is already covered by https://github.com/kubernetes/autoscaler/blob/59aefbcd5e95c90530559038ae1d58fdde5381ea/charts/cluster-autoscaler/templates/deployment.yaml#L130C27-L130C40 providing "_0" extra arguments names.
Example here
# balancing-ignore-label_1: first-label-to-ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
6430688
to
7d46122
Compare
7d46122
to
b7c4bb2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
to @gjtempleton for approval
There are more than one helm chart updates in flight so depending on which lands first you may need a rebase and I'll re-apply lgtm
FYI!
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jackfrancis, nicolas-laduguie The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/assign @gjtempleton |
/ok-to-test |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Add custom arguments feature to helm chart.
Which issue(s) this PR fixes:
Fixes #7422
Special notes for your reviewer:
Does this PR introduce a user-facing change?