Closed sivchari closed 2 months ago
This issue is currently awaiting triage.
If CAPI contributors determine this is a relevant issue, they will accept it by applying the triage/accepted
label and provide further guidance.
The triage/accepted
label can be added by org members by writing /triage accepted
in a comment.
@sivchari which phases do you envision for KCP? how they are defined?
I want Scaling Up
, Scaling Down
and Running
phase. This phase is changed following and changing by replicas and other field.
You should be able to take a look at the ResizedCondition of a KCP:
It is getting set here:
And from quickly reading it, the condition should either be:
controlplanev1.ScalingUpReason
for scaling up.controlplanev1.ScalingDownReason
for scaling down.I didn't know this condition so far, thanks. Then why does MachineDeployment has conditions and phase ?
Good question, maybe searching the PRs which introduced the one or the other or the ones for the proposals and reading through them may have context on that.
I was looking into API conventions and they are stating:
Some resources in the v1 API contain fields called phase, and associated message, reason, and other status fields. The pattern of using phase is deprecated. Newer API types should use conditions instead. Phase was essentially a state-machine enumeration field, that contradicted system-design principles and hampered evolution, since adding new enum values breaks backward compatibility. Rather than encouraging clients to infer implicit properties from phases, we prefer to explicitly expose the individual conditions that clients need to monitor. Conditions also have the benefit that it is possible to create some conditions with uniform meaning across all resource types, while still exposing others that are unique to specific resource types. See #7856 for more details and discussion.
So I think we should close this issue because we should align to API conventions (that' means also dropping existing phase fields from other resources in a future API version)
/close
@fabriziopandini: Closing this issue.
What would you like to be added (User Story)?
I suggest to add KubeadmControlPlanePhase to CRD. Currently, Cluster and MachineDeployment has individual phase, but KCP doesn't have it. KCP is same as MachineDeployment, because ControlPlane is machine, too.
Detailed Description
TBW
Anything else you would like to add?
No response
Label(s) to be applied
/kind feature One or more /area label. See https://github.com/kubernetes-sigs/cluster-api/labels?q=area for the list of labels.