openyurtio / yurt-app-manager

The workload controller manager from NodePool level in OpenYurt cluster
Apache License 2.0
6 stars 1 forks source link

feat: add NodePool.Spec.Type to NodePool labels #126

Closed donychen1134 closed 2 years ago

donychen1134 commented 2 years ago

What type of PR is this?

/kind feature

What this PR does / why we need it:

The type of NodePool is not a label. So it cannot be selected easily. When NodePool being created, we can mutate it to add a label which is same as the NodePool.Spec.Type. Then different type of NodePool could be selected by k8s label selector.

Which issue(s) this PR fixes:

Fixes #125

Special notes for your reviewer:

@rambohe-ch @kadisi

Does this PR introduce a user-facing change?

The NodePool.Spec.Type will be added to NodePool.Labels and user can select different NodePool easily.

other Note

openyurt-bot commented 2 years ago

@donychen1134: GitHub didn't allow me to assign the following users: your_reviewer.

Note that only openyurtio members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. For more information please see the contributor guide

In response to [this](https://github.com/openyurtio/yurt-app-manager/pull/126): > > > >#### What type of PR is this? >/kind feature > > >#### What this PR does / why we need it: >The type of NodePool is not a label. So it cannot be selected easily. >When NodePool being created, we can mutate it to add a label which is same as the NodePool.Spec.Type. >Then different type of NodePool could be selected by k8s label selector. > >#### Which issue(s) this PR fixes: > >Fixes #125 > >#### Special notes for your reviewer: > >@rambohe-ch @kadisi > >#### Does this PR introduce a user-facing change? > >```release-note >The NodePool.Spec.Type will be added to NodePool.Labels and user can select different NodePool easily. >``` > >#### other Note > > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
openyurt-bot commented 2 years ago

Welcome @donychen1134! It looks like this is your first PR to openyurtio/yurt-app-manager 🎉

codecov[bot] commented 2 years ago

Codecov Report

Merging #126 (c9da758) into master (1c77dce) will increase coverage by 0.07%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #126      +/-   ##
==========================================
+ Coverage   38.27%   38.35%   +0.07%     
==========================================
  Files          42       42              
  Lines        4776     4782       +6     
==========================================
+ Hits         1828     1834       +6     
  Misses       2704     2704              
  Partials      244      244              
Flag Coverage Δ
unittests 38.35% <100.00%> (+0.07%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...urtappmanager/webhook/nodepool/nodepool_webhook.go 47.16% <100.00%> (+6.74%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

rambohe-ch commented 2 years ago

/lgtm /approve

openyurt-bot commented 2 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: donychen1134, rambohe-ch

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

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/openyurtio/yurt-app-manager/blob/master/OWNERS)~~ [rambohe-ch] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment