Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReconcilerStatus attribute naming #1786

Open
pebrc opened this issue Sep 25, 2019 · 2 comments
Open

ReconcilerStatus attribute naming #1786

pebrc opened this issue Sep 25, 2019 · 2 comments
Labels
discuss We need to figure this out

Comments

@pebrc
Copy link
Collaborator

pebrc commented Sep 25, 2019

Part of #1141

// ReconcilerStatus represents status information about desired/available nodes.
type ReconcilerStatus struct {
	AvailableNodes int `json:"availableNodes,omitempty"`
}

It was suggested by @nkvoll to rename this attribute to ReadyPods instead of AvailableNodes because the latter is imprecise as it is not clear what is meant with nodes and what available means.

The suggestion is also to add an additional attribute representing the desired pods e.g. pods so that we can generate a print column similar to what built-in resources have:

NAME                   HEALTH    READY     VERSION   PHASE               AGE
elasticsearch-sample   green     2/3         7.3.0   ApplyingChanges     12h
@pebrc pebrc added the discuss We need to figure this out label Sep 25, 2019
@pebrc pebrc self-assigned this Oct 2, 2019
@pebrc pebrc removed their assignment Oct 16, 2019
@pebrc
Copy link
Collaborator Author

pebrc commented Oct 16, 2019

additionalPrinterColumns can only be simple JSON path expressions so the suggested fractional syntax is not possible it seems.

@thbkrkr
Copy link
Contributor

thbkrkr commented Oct 16, 2019

additionalPrinterColumns can only be simple JSON path expressions so the suggested fractional syntax is not possible it seems.

What if we maintain a string field in the ReconcilerStatus computed from the number of ready pods and desired pods:

type ReconcilerStatus struct {
	AvailableNodes int32  `json:"availableNodes,omitempty"`
	ReadyPods      int32  `json:"readyPods,omitempty"`
	DesiredPods    int32  `json:"desiredPods,omitempty"`
	PodCounter     string `json:"podCounter,omitempty"` # <---
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss We need to figure this out
Projects
None yet
Development

No branches or pull requests

2 participants