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

Add api server extra args map to cluster spec #7755

Merged
merged 9 commits into from
Mar 20, 2024

Conversation

sp1999
Copy link
Member

@sp1999 sp1999 commented Feb 29, 2024

Issue #, if available:
#2091

Description of changes:
Design doc: #7853

These changes allow for custom configuration of the api server flags in the cluster spec through spec.controlPlaneConfiguration.APIServerExtraArgs. If specified, this will be added to apiServerExtraArgs for the kubeadm cluster configuration in kcp object. A feature flag needs to be enabled in order to configure the api server flags. No validations are done for any of the flags configured. It is expected from the users that if they are enabling the feature flag, they know what values to configure for the flags.

Testing (if applicable):

  • Tested locally for create and upgrade operations with the api-server flags
  • Unit tests are added for APIServerExtraArgs and other functions
  • E2E tests for creating and upgrading cluster with ApiServerExtraArgs are added for vSphere and CloudStack providers

Documentation added/planned (if applicable):
EKS-A docs need to be updated to add spec.controlPlaneConfiguration.apiServerExtraArgs as an optional configuration for the cluster spec

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@eks-distro-bot eks-distro-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 29, 2024
@sp1999 sp1999 force-pushed the add-apiserver-flags branch from 98d06c4 to 9b88b86 Compare February 29, 2024 23:59
Copy link

codecov bot commented Mar 1, 2024

Codecov Report

Attention: Patch coverage is 92.45283% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 73.43%. Comparing base (0e02f8e) to head (0a7452c).
Report is 13 commits behind head on main.

Files Patch % Lines
pkg/api/v1alpha1/cluster.go 80.00% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7755      +/-   ##
==========================================
+ Coverage   73.39%   73.43%   +0.03%     
==========================================
  Files         576      576              
  Lines       35622    35667      +45     
==========================================
+ Hits        26144    26191      +47     
+ Misses       7826     7823       -3     
- Partials     1652     1653       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sp1999 sp1999 force-pushed the add-apiserver-flags branch from 9b88b86 to 75e50bd Compare March 1, 2024 01:46
@eks-distro-bot eks-distro-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 1, 2024
@sp1999
Copy link
Member Author

sp1999 commented Mar 1, 2024

/hold

@sp1999 sp1999 force-pushed the add-apiserver-flags branch from 75e50bd to 772f9a5 Compare March 2, 2024 22:31
@eks-distro-bot eks-distro-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 3, 2024
@sp1999 sp1999 force-pushed the add-apiserver-flags branch 5 times, most recently from 78b7228 to 07f965f Compare March 4, 2024 05:34
@eks-distro-bot eks-distro-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 4, 2024
@sp1999
Copy link
Member Author

sp1999 commented Mar 4, 2024

/unhold

pkg/api/v1alpha1/cluster.go Outdated Show resolved Hide resolved
pkg/providers/vsphere/template.go Show resolved Hide resolved
test/e2e/apiserverextraargs.go Outdated Show resolved Hide resolved
Comment on lines 53 to 61
runApiServerExtraArgsUpgradeFlow(
test,
addApiServerExtraArgsclusterOpts,
removeApiServerExtraArgsclusterOpts,
)
Copy link
Member

Choose a reason for hiding this comment

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

Good design of specifying multiple upgrades 💯

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you

test/e2e/cloudstack_test.go Outdated Show resolved Hide resolved
internal/pkg/api/cluster.go Outdated Show resolved Hide resolved
@sp1999 sp1999 force-pushed the add-apiserver-flags branch 2 times, most recently from 1e0a265 to abc6e97 Compare March 5, 2024 08:44
@sp1999 sp1999 force-pushed the add-apiserver-flags branch from d0d64e4 to afb2396 Compare March 6, 2024 01:45
@sp1999 sp1999 force-pushed the add-apiserver-flags branch 3 times, most recently from 5fca95d to 2ce3376 Compare March 15, 2024 18:48
@sp1999 sp1999 force-pushed the add-apiserver-flags branch from 2ce3376 to d3ebbd1 Compare March 15, 2024 22:12
@sp1999 sp1999 force-pushed the add-apiserver-flags branch from d3ebbd1 to 443db14 Compare March 15, 2024 22:22
@sp1999 sp1999 force-pushed the add-apiserver-flags branch from 443db14 to 5da79a7 Compare March 15, 2024 22:25
@sp1999 sp1999 force-pushed the add-apiserver-flags branch from 5da79a7 to a8b6a35 Compare March 19, 2024 18:51
internal/pkg/api/cluster.go Show resolved Hide resolved
pkg/api/v1alpha1/cluster.go Outdated Show resolved Hide resolved
pkg/api/v1alpha1/cluster.go Outdated Show resolved Hide resolved
test/framework/cluster/validations/cluster.go Outdated Show resolved Hide resolved
@chrisdoherty4
Copy link
Contributor

/lgtm

@sp1999
Copy link
Member Author

sp1999 commented Mar 20, 2024

/approve

@eks-distro-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sp1999

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

@eks-distro-bot eks-distro-bot merged commit 6c07643 into aws:main Mar 20, 2024
11 checks passed
@sp1999 sp1999 deleted the add-apiserver-flags branch March 20, 2024 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm 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.

4 participants