Class 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.
    • 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

      • 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 information

        is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhookClientConfig to be set.

      • 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 information

        is 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 class java.lang.Object
      • canEqual

        protected boolean canEqual​(java.lang.Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object