Class CustomResourceConversion
- java.lang.Object
-
- com.marcnuri.yakc.model.io.k8s.apiextensionsapiserver.pkg.apis.apiextensions.v1beta1.CustomResourceConversion
-
- All Implemented Interfaces:
com.marcnuri.yakc.model.Model
public class CustomResourceConversion extends java.lang.Object implements com.marcnuri.yakc.model.Model
CustomResourceConversion describes how to convert different versions of a CR.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CustomResourceConversion.Builder
-
Constructor Summary
Constructors Constructor Description CustomResourceConversion()
CustomResourceConversion(java.util.List<java.lang.String> conversionReviewVersions, @NonNull java.lang.String strategy, WebhookClientConfig webhookClientConfig)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CustomResourceConversion.Builder
builder()
protected boolean
canEqual(java.lang.Object other)
boolean
equals(java.lang.Object o)
java.util.List<java.lang.String>
getConversionReviewVersions()
conversionReviewVersions is an ordered list of preferred `ConversionReview` versions the Webhook expects.@NonNull java.lang.String
getStrategy()
strategy specifies how custom resources are converted between versions.WebhookClientConfig
getWebhookClientConfig()
int
hashCode()
void
setConversionReviewVersions(java.util.List<java.lang.String> conversionReviewVersions)
conversionReviewVersions is an ordered list of preferred `ConversionReview` versions the Webhook expects.void
setStrategy(@NonNull java.lang.String strategy)
strategy specifies how custom resources are converted between versions.void
setWebhookClientConfig(WebhookClientConfig webhookClientConfig)
CustomResourceConversion.Builder
toBuilder()
java.lang.String
toString()
-
-
-
Constructor Detail
-
CustomResourceConversion
public CustomResourceConversion(java.util.List<java.lang.String> conversionReviewVersions, @NonNull @NonNull java.lang.String strategy, WebhookClientConfig webhookClientConfig)
-
CustomResourceConversion
public CustomResourceConversion()
-
-
Method Detail
-
builder
public static CustomResourceConversion.Builder builder()
-
toBuilder
public CustomResourceConversion.Builder toBuilder()
-
getConversionReviewVersions
public java.util.List<java.lang.String> getConversionReviewVersions()
conversionReviewVersions is an ordered list of preferred `ConversionReview` versions the Webhook expects. The API server will use the first version in the list which it supports. If none of the versions specified in this list are supported by API server, conversion will fail for the custom resource. If a persisted Webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail. Defaults to `["v1beta1"]`.
-
getStrategy
@NonNull public @NonNull java.lang.String getStrategy()
strategy specifies how custom resources are converted between versions. Allowed values are: - `None`: The converter only change the apiVersion and would not touch any other field in the custom resource. - `Webhook`: API Server will call to an external webhook to do the conversion. Additional informationis needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhookClientConfig to be set.
-
getWebhookClientConfig
public WebhookClientConfig getWebhookClientConfig()
-
setConversionReviewVersions
public void setConversionReviewVersions(java.util.List<java.lang.String> conversionReviewVersions)
conversionReviewVersions is an ordered list of preferred `ConversionReview` versions the Webhook expects. The API server will use the first version in the list which it supports. If none of the versions specified in this list are supported by API server, conversion will fail for the custom resource. If a persisted Webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail. Defaults to `["v1beta1"]`.
-
setStrategy
public void setStrategy(@NonNull @NonNull java.lang.String strategy)
strategy specifies how custom resources are converted between versions. Allowed values are: - `None`: The converter only change the apiVersion and would not touch any other field in the custom resource. - `Webhook`: API Server will call to an external webhook to do the conversion. Additional informationis needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhookClientConfig to be set.
-
setWebhookClientConfig
public void setWebhookClientConfig(WebhookClientConfig webhookClientConfig)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-