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 withGroup
, this allows to determine theapiVersion
field associated with the annotated resource. See API versioning for more details.
-
-
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
-
-
-
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 adeprecationWarning()
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 ifdeprecated()
istrue
. 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:
- ""
-
-