-
Notifications
You must be signed in to change notification settings - Fork 38
feat: Enabled webhook in upstream & prod via config. #330
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
Merged
Merged
Changes from all commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
89fbb8a
Added new option for webhook client connection type.
a0c80b4
Refactored validation of webhook client connection type string and us…
6f8a0b8
Set default value to be AKS Production friendly.
c53fa3f
Exposed webhook path constants.
b313c8b
Added func to create client configs dynamically.
04b7cdd
WIP
c7736ba
Fixed lookup. Fixed interface arguments.
463afba
Removed dead code comment. Cleaned up cert details.
3de6f36
Updated deployment values to match AKS production expectations. Updat…
7ee54c7
Updated deployment values to match AKS production expectations. Updat…
5a049d3
Temp - Removed WIP webhook e2e test.
8064042
Set webhook to enabled by default
1b25682
Fixed variable names, and usage
6fd521b
Merge branch 'Azure:main' into feat-webhook-connectiontype
Ealianis fb4db6d
WIP - E2E Test for pod validation webhook.
411f305
linted code
b429d2e
Updated webhook test to be more thorough.
c6a8202
Merge branch 'Azure:main' into feat-webhook-connectiontype
Ealianis 73ff928
Removed verification of downstream implementation.
2099392
Added error type & message check. Removed false positive checks.
e50b251
Merge branch 'Azure:main' into feat-webhook-connectiontype
Ealianis 51aa998
Updated It block text.
43e9555
Merge branch 'Azure:main' into feat-webhook-connectiontype
Ealianis 6c01af4
Updated webhook to only listen for create requests. Updated tests.
466df97
Fixed comments.
287cf37
Upgraded golang.org/x/text 0.3.7 -> 0.4.0
206726a
Simplified pod e2e tests.
fa3bf41
Removed unused constants.
f1af660
Put pod constructor inline.
0720c38
Change chart to default to service.
799f6c9
WIP = CRP e2e tests
cb4377c
CRP Webhook tests.
134f0de
Merge branch 'Azure:main' into feat-webhook-connectiontype
Ealianis 811074c
Reverted change to webhook events.
65f2f95
Updated webhook tests for CRP.
13f5d49
Removed constants that existed in test utils.
0254bb3
Small fixes.
50ab130
Small fixes.
6e650ba
Merge branch 'Azure:main' into feat-webhook-connectiontype
Ealianis 0277a4f
Small fixes.
255154d
PR comment fixes.
6c52a11
Refactor to of webhook.go.
4d7521d
Merge branch 'Azure:main' into feat-webhook-connectiontype
Ealianis 9af6ecf
Typo.
d8ab0bf
Merge remote-tracking branch 'origin/feat-webhook-connectiontype' int…
f1339ca
Reduced webhook operation calls. Removed duplicate code and missed st…
8bdaa22
Restructured test cases. Added update to each create denial test.
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| /* | ||
| Copyright (c) Microsoft Corporation. | ||
| Licensed under the MIT license. | ||
| */ | ||
|
|
||
| package options | ||
|
|
||
| import ( | ||
| "errors" | ||
| "strings" | ||
| ) | ||
|
|
||
| type WebhookClientConnectionType string | ||
|
|
||
| const ( | ||
| URL WebhookClientConnectionType = "url" | ||
Ealianis marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Service WebhookClientConnectionType = "service" | ||
| ) | ||
|
|
||
| var ( | ||
| capabilitiesMap = map[string]WebhookClientConnectionType{ | ||
| "service": Service, | ||
| "url": URL, | ||
| } | ||
| ) | ||
|
|
||
| func parseWebhookClientConnectionString(str string) (WebhookClientConnectionType, error) { | ||
| t, ok := capabilitiesMap[strings.ToLower(str)] | ||
| if !ok { | ||
| return "", errors.New("must be \"service\" or \"url\"") | ||
| } | ||
| return t, nil | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.