2

I intend to add additional error message fields to a custom resource status. The fields are marked as

ErrMsg string `json:"errmsg,omitempty"`

Does adding these fields require a new API version, or is is safe to just change the managing operator to fill these fields with values?

chris_f
  • 1,081
  • 8
  • 17
  • Could you add more details? Which version of Kubernetes did you use? Did you use bare metal installation or some cloud provider? Are you familiar with [this](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/) and [this](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning/) documentation? – kkopczak Dec 07 '21 at 09:08
  • I'm using Kubernetes 1.19 - 1.22 (in various environments), and I am aware of the documentations about CRD versioning when changing the `spec` element of the CRD. But - I only want to extend the `status` element. Does extending the `status` part of a CRD require a new version? – chris_f Dec 07 '21 at 09:35

1 Answers1

2

According to this

Additional fields may be added in the future.

If your controller is only ever writing to status then you don't need to bump the CRD version.

It also depends what sort of validation you have on the CRD - like if the structural schema is validating the status.

Here are conventions for multiple API versions (although there isn't much on status)

Galletti_Lance
  • 509
  • 2
  • 4
  • 15