[WIP] Introducing v1experimental#4279
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: slinkydeveloper The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov Report
@@ Coverage Diff @@
## master #4279 +/- ##
=======================================
Coverage 80.36% 80.37%
=======================================
Files 288 289 +1
Lines 7910 7912 +2
=======================================
+ Hits 6357 6359 +2
Misses 1172 1172
Partials 381 381
Continue to review full report at Codecov.
|
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
c95f5e6 to
0c66be1
Compare
|
The following is the coverage report on the affected files.
|
|
@slinkydeveloper: PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
This Pull Request is stale because it has been open for 90 days with |
|
@slinkydeveloper: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
Can we close this one since we've adopted #5404? |
Signed-off-by: Francesco Guardiani francescoguard@gmail.com
Testing the feasibility of the idea from https://docs.google.com/document/d/1jluAYCJi6kq6HBmR7uMRUB7Zxcf1v6qjR3-pw0gMTRU/edit?usp=sharing
This PR introduces a new api group version called
v1experimental. This api group is not stored and the webhook converts it back tov1, in order to avoid duplicating controller code. Experimental code, through api conversion, can retrieve the experimental fields. This PR implements the "compile time feature gates" aka the experimental features code is not compiled in stable releases.This is how you use the experimental feature in the controller https://github.com/knative/eventing/pull/4279/files#diff-8ae7187e03db920a4f61e06aa3bcbbbe
This is how the v1experimental looks like when it's stored:
Name: my-service-trigger Namespace: default Labels: eventing.knative.dev/broker=default Annotations: eventing.knative.dev/creator: kubernetes-admin eventing.knative.dev/lastModifier: kubernetes-admin v1experimental/expression: helloworld API Version: eventing.knative.dev/v1 Kind: Trigger Metadata: Creation Timestamp: 2020-10-12T08:39:35Z Generation: 1 Managed Fields: API Version: eventing.knative.dev/v1experimental Fields Type: FieldsV1 fieldsV1: f:metadata: f:annotations: .: f:kubectl.kubernetes.io/last-applied-configuration: f:spec: .: f:broker: f:filter: .: f:expression: f:subscriber: .: f:ref: .: f:apiVersion: f:kind: f:name: Manager: kubectl-client-side-apply Operation: Update Time: 2020-10-12T08:39:35Z API Version: eventing.knative.dev/v1 Fields Type: FieldsV1 fieldsV1: f:status: f:conditions: f:observedGeneration: Manager: mtchannel_broker Operation: Update Time: 2020-10-12T08:39:35Z Resource Version: 16802 Self Link: /apis/eventing.knative.dev/v1/namespaces/default/triggers/my-service-trigger UID: 6503fe3e-0e14-4ab9-bca7-02dde28f5325 Spec: Broker: default Filter: Subscriber: Ref: API Version: serving.knative.dev/v1 Kind: Service Name: my-service Namespace: defaultAs you can see, annotations are used to store v1experimental fields
Proposed Changes
v1experimentaljs_trigger_filter(just for demonstration purpose)Problems
deepcopy-gendoesn't like golang tags. This has to be fixed before shipping this PRDocs
TBD