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 Dynamic Admission Control for ComponentDefinition #1648
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1648 +/- ##
==========================================
+ Coverage 62.46% 62.59% +0.12%
==========================================
Files 120 122 +2
Lines 11952 12027 +75
==========================================
+ Hits 7466 7528 +62
- Misses 3722 3732 +10
- Partials 764 767 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
pkg/webhook/core.oam.dev/v1alpha2/componentdefinition/validating_handler.go
Outdated
Show resolved
Hide resolved
pkg/webhook/core.oam.dev/v1alpha2/componentdefinition/mutating_handler.go
Outdated
Show resolved
Hide resolved
I fix the webhook. please \cc @captainroy-hy |
47dc3e1
to
255c9e8
Compare
8efc219
to
f7d1049
Compare
LGTM. |
fix #1473, align with #1563
Add dynamic admission control for ComponentDefinition.
MutatingWebhook
MutatingWebhook
will generate WorkloadDefinition based on theSpec.Workload.Definition
field(if workloaddefinition does not exist), and fill in theSpec.Workload.Type
field to point to the created workloaddefinition.After being processed by
MutatingWebhook
Generate a
WorkloadDefinition
nameddeployments.app
(If it doesn't exist).ValidatingWebhook check
Type
andDefinition
fields inSpec.Workload
:ValidatingWebhook
will reject;Type
andDefinition
don‘t point to the same workloaddefinition,ValidatingWebhook
will also reject.for details, please see:
https://github.com/oam-dev/spec/blob/master/3.component_model.md
https://github.com/oam-dev/spec/blob/master/4.workload_types.md