kube-state-metrics icon indicating copy to clipboard operation
kube-state-metrics copied to clipboard

refactor: move discovery and util under package app/customresource to make packages highly cohesive

Open CatherineF-dev opened this issue 2 years ago • 8 comments

What this PR does / why we need it:

How does this change affect the cardinality of KSM: (increases, decreases or does not change cardinality)

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged): Fixes #2103

CatherineF-dev avatar Jun 27 '23 14:06 CatherineF-dev

Ready for reviewing~

CatherineF-dev avatar Jun 27 '23 21:06 CatherineF-dev

/hold

I find it still has these newly added dependencies. Will try to remove these as well.

v2/pkg/customresourcestate
├──v2/pkg/metricshandler
├──v2/pkg/options
├──v2/internal/store

CatherineF-dev avatar Jun 28 '23 00:06 CatherineF-dev

/unhold

Current godepgraph is

v2/pkg/builder/types
├──v2/pkg/metric_generator
├──v2/pkg/options
├──v2/pkg/metrics_store
└──v2/pkg/customresource
v2/pkg/metric_generator
└──v2/pkg/metric
v2/pkg/options
v2/tests/e2e/framework
v2/pkg/builder
├──v2/pkg/builder/types
├──v2/pkg/metric_generator
├──v2/internal/store
├──v2/pkg/customresource
├──v2/pkg/metrics_store
└──v2/pkg/options
v2/pkg/customresource
└──v2/pkg/metric_generator
v2/pkg/customresourcestate
├──v2/pkg/metric
├──v2/pkg/metric_generator
├──v2/internal/discovery
├──v2/pkg/customresource
└──v2/internal/store
v2/pkg/watch
v2/pkg/sharding
v2/pkg/util/proc
v2/internal
├──v2/pkg/options
└──v2/pkg/app
v2/internal/store
├──v2/pkg/metrics_store
├──v2/pkg/sharding
├──v2/pkg/watch
├──v2/pkg/metric_generator
├──v2/pkg/builder/types
├──v2/pkg/constant
├──v2/pkg/customresource
├──v2/pkg/metric
└──v2/pkg/options
v2/pkg/allow
v2/pkg/allowdenylist
└──v2/pkg/metric_generator
v2/pkg/metricshandler
├──v2/pkg/options
├──v2/pkg/metrics_store
└──v2/pkg/builder/types
v2/pkg/optin
└──v2/pkg/metric_generator
v2
├──v2/internal
└──v2/pkg/options
v2/internal/discovery
v2/pkg/app
├──v2/pkg/optin
├──v2/pkg/customresource
├──v2/pkg/allowdenylist
├──v2/pkg/util/proc
├──v2/pkg/customresourcestate
├──v2/pkg/options
├──v2/pkg/metric_generator
├──v2/internal/store
├──v2/internal/discovery
└──v2/pkg/metricshandler
v2/pkg/metric
v2/pkg/metrics_store/metricsstore
└──v2/pkg/metric
v2/tools

Before: https://github.com/kubernetes/kube-state-metrics/issues/2103

CatherineF-dev avatar Jun 28 '23 12:06 CatherineF-dev

/triage accepted /assign @rexagod @mrueg

dgrisonnet avatar Jun 29 '23 16:06 dgrisonnet

Ping ~ @rexagod @mrueg

CatherineF-dev avatar Jul 06 '23 22:07 CatherineF-dev

Sorry for the delay here, I got caught up, will review before end of the day. 🙂

rexagod avatar Jul 07 '23 11:07 rexagod

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: CatherineF-dev Once this PR has been reviewed and has the lgtm label, please ask for approval from mrueg. 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

k8s-ci-robot avatar Jul 08 '23 15:07 k8s-ci-robot

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Jan 21 '24 22:01 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle rotten
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Feb 20 '24 22:02 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Reopen this PR with /reopen
  • Mark this PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

k8s-triage-robot avatar Mar 26 '24 20:03 k8s-triage-robot

@k8s-triage-robot: Closed this PR.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Reopen this PR with /reopen
  • Mark this PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Mar 26 '24 20:03 k8s-ci-robot