Skip to content
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

Support custom env in kubeadm ControlPlaneComponent #2845

Closed
chenk008 opened this issue Mar 22, 2023 · 12 comments
Closed

Support custom env in kubeadm ControlPlaneComponent #2845

chenk008 opened this issue Mar 22, 2023 · 12 comments
Assignees
Labels
area/kubeadm kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence.
Milestone

Comments

@chenk008
Copy link

chenk008 commented Mar 22, 2023

What would you like to be added?

https://github.com/kubernetes/kubernetes/blob/7537cec567e01172c1d95b3559085d794cb2afbd/cmd/kubeadm/app/apis/kubeadm/types.go#L142-L153

For now, the ControlPlaneComponent contains ExtraArgs and ExtraVolumes. How about add custom env?

// ControlPlaneComponent holds settings common to control plane component of the cluster
type ControlPlaneComponent struct {
	// ExtraArgs is an extra set of flags to pass to the control plane component.
	// TODO: This is temporary and ideally we would like to switch all components to
	// use ComponentConfig + ConfigMaps.
	ExtraArgs map[string]string `json:"extraArgs,omitempty"`

	// ExtraVolumes is an extra set of host volumes, mounted to the control plane component.
	ExtraVolumes []HostPathMount `json:"extraVolumes,omitempty"`

        ExtraEnvs map[string]string `json:"extraEnvs,omitempty"`
}

Why is this needed?

Support custom environment variables, facilitate our control over the behavior of components and Golang runtime(e.g. GOMAXPROCS).

@chenk008 chenk008 added the kind/feature Categorizes issue or PR as related to a new feature. label Mar 22, 2023
@k8s-ci-robot k8s-ci-robot added the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Mar 22, 2023
@k8s-ci-robot
Copy link
Contributor

There are no sig labels on this issue. Please add an appropriate label by using one of the following commands:

  • /sig <group-name>
  • /wg <group-name>
  • /committee <group-name>

Please see the group list for a listing of the SIGs, working groups, and committees available.

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/test-infra repository.

@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Mar 22, 2023
@Ritikaa96
Copy link

/area kubeadm

@neolit123
Copy link
Member

/transfer kubeadm

@k8s-ci-robot k8s-ci-robot transferred this issue from kubernetes/kubernetes Mar 22, 2023
@neolit123 neolit123 added priority/backlog Higher priority than priority/awaiting-more-evidence. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Mar 22, 2023
@neolit123
Copy link
Member

i don't remember if we discussed this before but it seems ok to add for the next api v1beta4 or v1.

notably this functionality is possible with --patches today

@pacoxu
Copy link
Member

pacoxu commented Mar 22, 2023

I added it to the candidate list for v1beta4 in kubernetes/enhancements#970 (comment).

notably this functionality is possible with --patches today

@chenk008 have you tried the --patches workaround?

@chendave chendave mentioned this issue Jun 9, 2023
26 tasks
@chendave
Copy link
Member

+1 to make this in v1beta4, the request sound reasonable to me.

If no one own this, I will take over this.

/assign

feel free to take over if anyone else want to help.

@pacoxu
Copy link
Member

pacoxu commented Jun 12, 2023

For GOMAXPROCS, there is a recent update in kubernetes/kubernetes#117016.

BTW, only some golang default env like GOGC\ GOTRACEBACK will be used for this.

https://github.com/kubernetes/kubernetes/blob/af99df6a6bead927d61746dc431fc1b526af55a0/cmd/kube-apiserver/app/server.go#L158-L159

@pacoxu
Copy link
Member

pacoxu commented Jun 12, 2023

For tuning GOGC, see kubernetes/kubernetes#112408 (comment). This may be a use case.

@neolit123 neolit123 added this to the v1.28 milestone Jun 23, 2023
@pacoxu
Copy link
Member

pacoxu commented Jun 25, 2023

https://tip.golang.org/doc/go1.19#runtime

  • GOMEMLIMIT is a use case. We use it to tune the apiserver/KCM memory with GOGC in some clusters.

@chendave
Copy link
Member

chendave commented Jul 5, 2023

/close

implemented via kubernetes/kubernetes#118867

@k8s-ci-robot
Copy link
Contributor

@chendave: Closing this issue.

In response to this:

/close

implemented via kubernetes/kubernetes#118867

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/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubeadm kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

No branches or pull requests

6 participants