Hi
I am working with the API versions and I have not understood what was the served and storage versions mean, could you explain the differences ?
Hi
I am working with the API versions and I have not understood what was the served and storage versions mean, could you explain the differences ?
To this point, I have never created my own API add-in that requires a CRD but as I understand it, it works like this.
The storage version is the version of the schema that will be stored in etcd when a resource defined by the CRD is created.
The served versions are the versions that will be accepted for apiVersion
when creating a resource that is defined by the CRD.
Only one version in the CRD may be marked as the storage version.
In order to follow the rules for API version deprecation, it is necessary to support (i.e. serve) more than one apiVersion
for your custom resource as it matures.
So, as you fix bugs along the maturity path of your custom resource, the apiVersion
will progress through v1alpha
, v1beta1
etc, but the resource schema may not change, so the storage version can remain unchanged. If you add to the resource schema in e.g. v1beta1
, then you’ll need to set storage: true
on this version and require your users to upgrade their deployed resources to the new schema.
Ideally when a custom resource reaches “beta”, then the schema should be stable, and not require changing again before “v1”. “alpha” versions are considered as still subject to change and refinement, and as such are directed at the community that tests new features and should never be used in production.