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

feat: Add replicas info item to ReplicaSet node (#16769) #16782

Closed
wants to merge 12 commits into from

Conversation

zhammer
Copy link

@zhammer zhammer commented Jan 8, 2024

Closes #16769 by adding a Replicas info item for ReplicaSet nodes.

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

Signed-off-by: Zach Hammer <zhammer@seatgeek.com>
@zhammer zhammer requested a review from a team as a code owner January 8, 2024 18:40
func populateReplicaSetInfo(un *unstructured.Unstructured, res *ResourceInfo) {
replicas, ok, err := unstructured.NestedInt64(un.Object, "spec", "replicas")
if err == nil && ok {
res.Info = append(res.Info, v1alpha1.InfoItem{Name: "Replicas", Value: fmt.Sprintf("Replicas:%d", replicas)})
Copy link
Author

@zhammer zhammer Jan 8, 2024

Choose a reason for hiding this comment

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

I use Replicas:%d as the value here for a clearer label on the UI. Could also do %d replicas, like the %d days ago label

@zhammer
Copy link
Author

zhammer commented Jan 8, 2024

hm, it seems like at least the unit test is broken due to a bug in the yaml library used: kubernetes-sigs/yaml#45

Signed-off-by: Zach Hammer <zhammer@seatgeek.com>
Copy link

codecov bot commented Jan 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.49%. Comparing base (52ffd7d) to head (96b34d2).
Report is 270 commits behind head on master.

❗ Current head 96b34d2 differs from pull request most recent head 93fe112. Consider uploading reports for the commit 93fe112 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #16782      +/-   ##
==========================================
+ Coverage   49.25%   49.49%   +0.24%     
==========================================
  Files         274      271       -3     
  Lines       48170    47845     -325     
==========================================
- Hits        23724    23679      -45     
+ Misses      22099    21824     -275     
+ Partials     2347     2342       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zhammer
Copy link
Author

zhammer commented Feb 15, 2024

We talked about this today in the argo contributor meeting and there were no objections.

@zhammer
Copy link
Author

zhammer commented Feb 20, 2024

Hi @alexmt - this was 👍’d in the last contributor meeting that you led. Would appreciate a review from a maintainer whenever there is time. Thanks again!

zhammer and others added 7 commits April 26, 2024 07:52
Signed-off-by: Zach Hammer <zhammer@seatgeek.com>
Signed-off-by: Zach Hammer <zhammer@seatgeek.com>
change sync strategy for rollback
Set field managers for server side apply
@zhammer
Copy link
Author

zhammer commented May 6, 2024

closing in favor of #18092 18092

@zhammer zhammer closed this May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add replicas field to ReplicaSet info collection on resource tree
2 participants