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

Update RSCT operator status #51

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

manju956
Copy link

@manju956 manju956 commented Oct 1, 2024

  • Update RSCT operator status based on observed status of pods spun by the operator
  • Address requirements of the issue Release RSCT Operator  #44
  • Add required Cluster Service Version fields

@ppc64le-cloud-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: manju956
Once this PR has been reviewed and has the lgtm label, please assign mkumatag for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ppc64le-cloud-bot
Copy link
Contributor

Welcome @manju956! It looks like this is your first PR to ocp-power-automation/rsct-operator 🎉

@manju956 manju956 force-pushed the rsct-operator-status branch 5 times, most recently from 9544aa3 to c8774a0 Compare October 9, 2024 06:10
internal/controller/status.go Outdated Show resolved Hide resolved
internal/controller/status.go Outdated Show resolved Hide resolved
pods := &corev1.PodList{}

labelSelector := labels.SelectorFromSet(map[string]string{"app": currentDaemonSet.Name})
listOpts := &client.ListOptions{Namespace: rsct.Namespace, LabelSelector: labelSelector}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of reading the pods, wondering if we can read the state of the daemonset itself and its healthiness

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the reason for choosing to inspect pod(s) status instead of daemonset state is because it carries multiple detailed states which are not useful. below is the RSCT daemonset state when its in running condition.

status: currentNumberScheduled: 1 desiredNumberScheduled: 1 numberAvailable: 1 numberMisscheduled: 0 numberReady: 1 observedGeneration: 1 updatedNumberScheduled: 1

api/v1alpha1/rsct_types.go Outdated Show resolved Hide resolved
@manju956 manju956 force-pushed the rsct-operator-status branch 3 times, most recently from c4f36e5 to e16b880 Compare October 24, 2024 06:30
Signed-off-by: manju956 <[email protected]>

Address review comments

Signed-off-by: manju956 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants