Annotation Type Version


  • @Target(TYPE)
    @Retention(RUNTIME)
    public @interface Version
    Allows to specify which version of the API the annotated class is defined under. Together with Group, this allows to determine the apiVersion field associated with the annotated resource. See API versioning for more details.
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      String value
      The name of this version.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      boolean deprecated
      Whether this version is deprecated.
      String deprecationWarning
      The warning message to indicate the deprecation.
      boolean served
      Whether this version is served (i.e. enabled for consumption from the REST API) or not.
      boolean storage
      Whether this version corresponds to the persisted version for the associated CRD.
    • Element Detail

      • value

        String value
        The name of this version.
        Returns:
        the name of this version
      • storage

        boolean storage
        Whether this version corresponds to the persisted version for the associated CRD. Note that only one version can set storage to true for a given CRD.
        Returns:
        true if this version corresponds to the persisted version for the associated CRD, false otherwise
        Default:
        true
      • served

        boolean served
        Whether this version is served (i.e. enabled for consumption from the REST API) or not.
        Returns:
        true if this version is served by the REST API, false otherwise
        Default:
        true
      • deprecated

        boolean deprecated
        Whether this version is deprecated. When API requests to a resource which is deprecated are made, a warning message is returned in the API response as a header. The warning message for this version can be customized by defining a deprecationWarning() if desired.
        Returns:
        true if this version is deprecated.
        Default:
        false
      • deprecationWarning

        String deprecationWarning
        The warning message to indicate the deprecation. Note that this message is only used if deprecated() is true. The warning message should indicate the deprecated API group, version, and kind, and should indicate what API group, version, and kind should be used instead, if applicable.
        Returns:
        the deprecation warning
        Default:
        ""