-
Notifications
You must be signed in to change notification settings - Fork 0
/
custom_resource_conversion.cr
31 lines (26 loc) · 1.76 KB
/
custom_resource_conversion.cr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# THIS FILE WAS AUTO GENERATED FROM THE K8S SWAGGER SPEC
require "yaml"
require "json"
module K8S
# CustomResourceConversion describes how to convert different versions of a CR.
@[::K8S::Properties(
strategy: {type: String, nilable: false, key: "strategy", getter: false, setter: false},
webhook_client_config: {type: ApiextensionsApiserver::Apis::Apiextensions::V1beta1::WebhookClientConfig, nilable: true, key: "webhookClientConfig", getter: false, setter: false},
)]
class ApiextensionsApiserver::Apis::Apiextensions::V1beta1::CustomResourceConversion
include ::JSON::Serializable
include ::JSON::Serializable::Unmapped
include ::YAML::Serializable
include ::YAML::Serializable::Unmapped
# `strategy` specifies the conversion strategy. Allowed values are: - `None`: The converter only change the apiVersion and would not touch any other field in the CR. - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information is needed for this option.
@[::JSON::Field(key: "strategy", emit_null: true)]
@[::YAML::Field(key: "strategy", emit_null: true)]
property strategy : String
# `webhookClientConfig` is the instructions for how to call the webhook if strategy is `Webhook`. This field is alpha-level and is only honored by servers that enable the CustomResourceWebhookConversion feature.
@[::JSON::Field(key: "webhookClientConfig", emit_null: false)]
@[::YAML::Field(key: "webhookClientConfig", emit_null: false)]
property webhook_client_config : ApiextensionsApiserver::Apis::Apiextensions::V1beta1::WebhookClientConfig | Nil
def initialize(*, @strategy : String, @webhook_client_config : ApiextensionsApiserver::Apis::Apiextensions::V1beta1::WebhookClientConfig | Nil = nil)
end
end
end