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 for passing additional args to API server, controller manager, and scheduler #3162

Merged

Conversation

ahmedwaleedmalik
Copy link
Member

@ahmedwaleedmalik ahmedwaleedmalik commented Apr 29, 2024

What this PR does / why we need it:
This PR adds support in KubeOne to configure additional flags and feature gates for the following components:

  1. API server
  2. Controller Manager
  3. Scheduler

KubeOne also configures flags and crucial feature gates that are essential for the working of the underlying Kubernetes cluster. Due to this these flags and feature gates are always merged with what KubeOne configures. Since it's easy to misconfigure feature gates, we have prohibited users from specifying them with flags and instead created a dedicated featureGates field.

Which issue(s) this PR fixes:

Fixes #2275 #2431
xref #3143

What type of PR is this?

/kind feature

Special notes for your reviewer:
Resurrection of #3074

Does this PR introduce a user-facing change? Then add your Release Note here:

Support for passing additional args to the API server, controller manager, and scheduler

Documentation:

TBD

/assign @kron4eg

@kubermatic-bot kubermatic-bot added docs/tbd Denotes a PR that needs documentation (change) that will be done later. kind/feature Categorizes issue or PR as related to a new feature. release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. do-not-merge/code-freeze Indicates that a PR should not merge because it has not been approved for code freeze yet. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Apr 29, 2024
@ahmedwaleedmalik
Copy link
Member Author

/cc @kron4eg
/assign

@scheeles scheeles added this to the KubeOne 1.9 milestone May 8, 2024
@xrstf xrstf modified the milestones: KubeOne 1.9, KubeOne 1.8 May 8, 2024
@cnvergence
Copy link
Member

/assign cnvergence

@cnvergence
Copy link
Member

cnvergence commented May 10, 2024

I am not sure how I feel about allowing all of them while enabling support in these components seems to be non-breaking, fiddling with configuration files, for instance providing the wrong path for TLS cert, is breaking cluster with manual cluster repair required, if you try to rollback it with KubeOne.

Copy link
Member

@cnvergence cnvergence left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested it with the AWS cluster, this configuration seems like it covers most of the options and they are being applied properly.

@ahmedwaleedmalik
Copy link
Member Author

ahmedwaleedmalik commented May 10, 2024

I am not sure how I feel about allowing all of them while enabling support in these components seems to be non-breaking, fiddling with configuration files, for instance providing the wrong path for TLS cert, breaking cluster with manual cluster repair required, if you try to rollback it with KubeOne.

Hey @cnvergence, this has been quite thoroughly discussed internally. We are aware of the risks, as mentioned in the documentation of the structs/fields. However, we don't want to block users from overriding these values since sometimes it's essential for their workflows.

cc @xmudrii @moadqassem

@cnvergence
Copy link
Member

Understood, for that extensibility I am all for it, as it is a strong feature request
Just would love to have this process well explained and easier to mitigate

Copy link
Member

@xmudrii xmudrii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good in majority, I left some comments, I'll take a look at them later today and try to get this PR merged.

pkg/apis/kubeone/config/config.go Outdated Show resolved Hide resolved
pkg/apis/kubeone/config/config.go Outdated Show resolved Hide resolved
pkg/templates/kubeadm/v1beta3/kubeadm.go Outdated Show resolved Hide resolved
xmudrii added 2 commits May 10, 2024 17:43
Signed-off-by: Marko Mudrinić <[email protected]>
Copy link
Member

@xmudrii xmudrii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label May 10, 2024
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 28c6bd50f771ee79f92ef47d4d200c2a1fad9665

@kubermatic-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: xmudrii

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:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubermatic-bot kubermatic-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 10, 2024
@xmudrii xmudrii added the code-freeze-approved Indicates a PR has been approved by release managers during code freeze. label May 10, 2024
@kubermatic-bot kubermatic-bot removed the do-not-merge/code-freeze Indicates that a PR should not merge because it has not been approved for code freeze yet. label May 10, 2024
@kubermatic-bot kubermatic-bot merged commit e073c4b into kubermatic:main May 10, 2024
14 checks passed
@ahmedwaleedmalik ahmedwaleedmalik deleted the api-server-flags-cont branch May 12, 2024 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. code-freeze-approved Indicates a PR has been approved by release managers during code freeze. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. docs/tbd Denotes a PR that needs documentation (change) that will be done later. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to override arbitary apiserver args
7 participants