kuberay icon indicating copy to clipboard operation
kuberay copied to clipboard

[Doc] Deprecate `ServiceUnhealthySecondThreshold` and `DeploymentUnhealthySecondThreshold`

Open rueian opened this issue 2 years ago • 0 comments

As per https://github.com/ray-project/kuberay/pull/1664 and https://github.com/ray-project/kuberay/pull/1665, the latest kuberay operator will not respect DeploymentUnhealthySecondThreshold and ServiceUnhealthySecondThreshold fields at all.

Ideally, we should inform users that these fields are deprecated, and we thought that the kubebuilder could do this for us by using the +kubebuilder:deprecatedversion marker. However, it turns out that this marker doesn't work for us because it only works at the CRD root level, and no similar marker works at the field level.

Here, in this issue, I'd like to discuss alternatives to kubebuilder code generation:

  1. Deprecate these fields in our go source code.
  2. Deprecate or hide these fields in the generated document.
  3. Emit warning messages as kubernetes event when these fields are set by users.
  4. Use validation webhook to return warnings. This will introduce new complexity for installing and maintaining the webhook.

I believe the first option is trivial, and the second option is a must.

How about the third and the fourth? Are they good to have?

cc @kevin85421

rueian avatar Nov 23 '23 15:11 rueian