-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
feat(crd-generator): Add support for WebhookConversion and NonConversion #5875
Conversation
This approach introduces two new annotations WebhookConversion@Group("sample.fabric8.io")
@Version("v2")
@Kind("WebhookConversion")
@WebhookConversion(versions = { "v2", "v1" }, svcName = "conversion-webhook", svcNamespace = "my-namespace")
public class WebhookConversionExample extends CustomResource<WebhookConversionSpec, Void> {
} apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: webhookconversions.sample.fabric8.io
spec:
conversion:
strategy: Webhook
webhook:
clientConfig:
service:
name: conversion-webhook
namespace: my-namespace
conversionReviewVersions:
- v2
- v1
group: sample.fabric8.io
names:
kind: WebhookConversion
plural: webhookconversions
singular: webhookconversion
scope: Cluster
[...] NoneConversion@Group("sample.fabric8.io")
@Version("v1")
@Kind("NoneConversion")
@NoneConversion
public class NoneConversionExample extends CustomResource<NonConversionSpec, Void> {
} apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: noneconversions.sample.fabric8.io
spec:
conversion:
strategy: None
group: sample.fabric8.io
names:
kind: NoneConversion
plural: noneconversions
singular: noneconversion
scope: Cluster
[...] Additional Notes
|
@andreaTP Can you (or someone else like @csviri) give me a first feedback on this? (any feedback is welcome..) I will create in parallel another PR to prepare the test environment (Approval Tests and the test module improvements we talked about last week). After this is merged I will add to this PR additional tests. TBD:
|
I think that @csviri is much more familiar than me with the subject, and I would appreciate his input on this one. Quick answers meanwhile:
I'm, personally, fine with it
I think that we are using long names across the codebase, I would keep the current style, e.g.: |
Quality Gate passedIssues Measures |
Can probably be closed. See #5885 (comment) |
Yes, maybe close it. |
Description
Adds support for WebhookConversion and NonConversion to the CRDGenerator.
Refers to #5794
Type of change
test, version modification, documentation, etc.)
Checklist
TODO
(see feat(crd-generator): Add support for WebhookConversion and NonConversion #5875 (comment))