Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

feat: able to specify api server flags #46

Merged
merged 4 commits into from
Mar 26, 2023
Merged

Conversation

csviri
Copy link
Collaborator

@csviri csviri commented Mar 24, 2023

No description provided.

@csviri csviri self-assigned this Mar 24, 2023
@csviri csviri linked an issue Mar 24, 2023 that may be closed by this pull request
@csviri csviri force-pushed the specify-api-server-flag_ branch from 7c6a61c to 4de5cf2 Compare March 24, 2023 14:28
Copy link
Contributor

@metacosm metacosm left a comment

Choose a reason for hiding this comment

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

Added some comments, mostly about design around flags but it's probably also just fine how it currently is :)

apiServerFlags.add(key);
}

private void checkKeyPrefix(String key) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it'd be better to issue a warning and add the prefix automatically if it's missing to be more user-friendly?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

actually yes, was thinking to ask for the flag without the flag

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it's a problem with the list of flags. I will merge this simple form, and we can do impovements in a subsequent PR.

private final List<String> apiServerFlags;

KubeAPIServerConfig(String jenvtestDir, String apiServerVersion, boolean offlineMode,
List<String> apiServerFlags) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it could be useful to have a Flag class that would encapsulate things instead of just relying on String pairs (similarly to what's done for micrometer tags)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ahh not sure, it is also some time not a pair, just a single flag name

"--disable-admission-plugins", "ServiceAccount",
"--client-ca-file", certManager.getClientCertPath(),
"--service-cluster-ip-range", "10.0.0.0/24",
"--allow-privileged"));
Copy link
Contributor

Choose a reason for hiding this comment

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

How would one capture such a parameter if you're supposed to pass pairs?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

there is also api for that. in the builder

@csviri csviri merged commit a876a55 into main Mar 26, 2023
@csviri csviri deleted the specify-api-server-flag_ branch March 26, 2023 14:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Custom Flags for API Server
2 participants