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

Update CA insert method in webhooks. #2463

Merged
merged 1 commit into from
Aug 27, 2022

Conversation

jiangkaihua
Copy link
Contributor

@jiangkaihua jiangkaihua commented Aug 26, 2022

Current method addCaCertForWebhook() only added CA cert for webhooks listed in validatingWebhooksName and mutatingWebhooksName

var (
validatingWebhooksName = []string{
"volcano-admission-service-jobs-validate",
"volcano-admission-service-pods-validate",
"volcano-admission-service-queues-validate",
}
mutatingWebhooksName = []string{
"volcano-admission-service-pods-mutate",
"volcano-admission-service-queues-mutate",
"volcano-admission-service-podgroups-mutate",
"volcano-admission-service-jobs-mutate",
}
)

Which is inconvenient for new webhook registration. For example, when user registered new webhook by arg --enabled-admission, new webhook would not get certs since the original method only go through slices above.
So this pr make addCaCertForWebhook() to go through all webhooks registered in volcano admission by arg --enabled-admission.

#2464

Signed-off-by: jiangkaihua jiangkaihua1@huawei.com

@volcano-sh-bot volcano-sh-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 26, 2022
@jiangkaihua jiangkaihua force-pushed the update-cacert-insert branch from 1185d67 to 852810b Compare August 26, 2022 07:56
@william-wang william-wang requested review from william-wang and removed request for kevin-wangzefeng August 26, 2022 08:07
@jiangkaihua jiangkaihua force-pushed the update-cacert-insert branch 5 times, most recently from 81300f9 to 011f5f9 Compare August 26, 2022 13:55
@volcano-sh-bot volcano-sh-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 Aug 26, 2022
Signed-off-by: jiangkaihua <jiangkaihua1@huawei.com>
@jiangkaihua jiangkaihua force-pushed the update-cacert-insert branch from 011f5f9 to fe6234c Compare August 26, 2022 13:57
Copy link
Member

@william-wang william-wang left a comment

Choose a reason for hiding this comment

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

/lgtm

@volcano-sh-bot volcano-sh-bot added the lgtm Indicates that a PR is ready to be merged. label Aug 27, 2022
@volcano-sh-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: william-wang

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

@volcano-sh-bot volcano-sh-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 27, 2022
@william-wang william-wang merged commit 4a8e600 into volcano-sh:master Aug 27, 2022
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. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants