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

Add enricher to storageclass metricset #33032

Merged

Conversation

tetianakravchenko
Copy link
Contributor

Signed-off-by: Tetiana Kravchenko [email protected]

What does this PR do?

Add missing orchestrator.cluster.name and orchestrator.cluster.url fields to state_storageclass metricset.

Why is it important?

orchestrator.cluster.name is used for kubernetes dashboards

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Use cases

Screenshots

Screenshot 2022-09-09 at 11 35 21

Logs

Signed-off-by: Tetiana Kravchenko <[email protected]>
@tetianakravchenko tetianakravchenko requested review from a team as code owners September 9, 2022 09:45
@tetianakravchenko tetianakravchenko requested review from rdner and fearful-symmetry and removed request for a team September 9, 2022 09:45
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Sep 9, 2022
@mergify
Copy link
Contributor

mergify bot commented Sep 9, 2022

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @tetianakravchenko? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

@tetianakravchenko tetianakravchenko added the Team:Cloudnative-Monitoring Label for the Cloud Native Monitoring team label Sep 9, 2022
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Sep 9, 2022
@tetianakravchenko tetianakravchenko added backport-v8.3.0 Automated backport with mergify backport-v8.4.0 Automated backport with mergify labels Sep 9, 2022
Signed-off-by: Tetiana Kravchenko <[email protected]>
@elasticmachine
Copy link
Collaborator

elasticmachine commented Sep 9, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-09-09T19:44:14.932+0000

  • Duration: 117 min 35 sec

Test stats 🧪

Test Results
Failed 0
Passed 22717
Skipped 1802
Total 24519

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

"reclaimPolicy": p.Label("reclaim_policy"),
"reclaim_policy": p.Label("reclaim_policy"),
"volumeBindingMode": p.Label("volume_binding_mode"),
"volume_binding_mode": p.Label("volume_binding_mode"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this here? Is it different than volumeBindingMode?

Copy link
Contributor Author

@tetianakravchenko tetianakravchenko Sep 9, 2022

Choose a reason for hiding this comment

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

yes, it was changed in kube-state-metrics v2 - https://github.com/kubernetes/kube-state-metrics/pull/1107/files and reclaimPolicy was renamed to reclaim_policy, and volumeBindingMode to volume_binding_mode

to support both versions of kube-state-metrics I've added this to mapping (< 2.0 - used reclaimPolicy and volumeBindingMode, example - https://github.com/elastic/beats/blob/main/metricbeat/module/kubernetes/_meta/test/ksm.v1.8.0#L1370, versions > 2.0 - https://github.com/elastic/beats/blob/main/metricbeat/module/kubernetes/_meta/test/ksm.v2.0.0#L1545)

Signed-off-by: Tetiana Kravchenko <[email protected]>
Signed-off-by: Tetiana Kravchenko <[email protected]>
Signed-off-by: Tetiana Kravchenko <[email protected]>
@mergify
Copy link
Contributor

mergify bot commented Sep 9, 2022

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b add-orchestrator-field upstream/add-orchestrator-field
git merge upstream/main
git push upstream add-orchestrator-field

@tetianakravchenko tetianakravchenko merged commit d20fff4 into elastic:main Sep 12, 2022
mergify bot pushed a commit that referenced this pull request Sep 12, 2022
* add enricher for storageclass

Signed-off-by: Tetiana Kravchenko <[email protected]>

* add pr number

Signed-off-by: Tetiana Kravchenko <[email protected]>

* fix check-no-changes] Error 1

Signed-off-by: Tetiana Kravchenko <[email protected]>

* generate notice file

Signed-off-by: Tetiana Kravchenko <[email protected]>

* readd removed metric from test file

Signed-off-by: Tetiana Kravchenko <[email protected]>

Signed-off-by: Tetiana Kravchenko <[email protected]>
(cherry picked from commit d20fff4)

# Conflicts:
#	NOTICE.txt
#	go.mod
#	go.sum
mergify bot pushed a commit that referenced this pull request Sep 12, 2022
* add enricher for storageclass

Signed-off-by: Tetiana Kravchenko <[email protected]>

* add pr number

Signed-off-by: Tetiana Kravchenko <[email protected]>

* fix check-no-changes] Error 1

Signed-off-by: Tetiana Kravchenko <[email protected]>

* generate notice file

Signed-off-by: Tetiana Kravchenko <[email protected]>

* readd removed metric from test file

Signed-off-by: Tetiana Kravchenko <[email protected]>

Signed-off-by: Tetiana Kravchenko <[email protected]>
(cherry picked from commit d20fff4)

# Conflicts:
#	go.mod
#	go.sum
tetianakravchenko added a commit that referenced this pull request Sep 13, 2022
* Add enricher to storageclass metricset (#33032)

* add enricher for storageclass

Signed-off-by: Tetiana Kravchenko <[email protected]>

* add pr number

Signed-off-by: Tetiana Kravchenko <[email protected]>

* fix check-no-changes] Error 1

Signed-off-by: Tetiana Kravchenko <[email protected]>

* generate notice file

Signed-off-by: Tetiana Kravchenko <[email protected]>

* readd removed metric from test file

Signed-off-by: Tetiana Kravchenko <[email protected]>

Signed-off-by: Tetiana Kravchenko <[email protected]>
(cherry picked from commit d20fff4)

# Conflicts:
#	go.mod
#	go.sum

* Update go.mod

* Update go.sum

* update elastic-agent-libs to pass tests

Signed-off-by: Tetiana Kravchenko <[email protected]>

* run make check-default

Signed-off-by: Tetiana Kravchenko <[email protected]>

Signed-off-by: Tetiana Kravchenko <[email protected]>
Co-authored-by: Tetiana Kravchenko <[email protected]>
tetianakravchenko added a commit that referenced this pull request Sep 13, 2022
* Add enricher to storageclass metricset (#33032)

* add enricher for storageclass

Signed-off-by: Tetiana Kravchenko <[email protected]>

* add pr number

Signed-off-by: Tetiana Kravchenko <[email protected]>

* fix check-no-changes] Error 1

Signed-off-by: Tetiana Kravchenko <[email protected]>

* generate notice file

Signed-off-by: Tetiana Kravchenko <[email protected]>

* readd removed metric from test file

Signed-off-by: Tetiana Kravchenko <[email protected]>

Signed-off-by: Tetiana Kravchenko <[email protected]>
(cherry picked from commit d20fff4)

# Conflicts:
#	NOTICE.txt
#	go.mod
#	go.sum

* fix conflicts

Signed-off-by: Tetiana Kravchenko <[email protected]>

* run make check-default; replace mod.GetMetricsRepo -> mod.GetPerfMetricsCache

Signed-off-by: Tetiana Kravchenko <[email protected]>

Signed-off-by: Tetiana Kravchenko <[email protected]>
Co-authored-by: Tetiana Kravchenko <[email protected]>
chrisberkhout pushed a commit that referenced this pull request Jun 1, 2023
* add enricher for storageclass

Signed-off-by: Tetiana Kravchenko <[email protected]>

* add pr number

Signed-off-by: Tetiana Kravchenko <[email protected]>

* fix check-no-changes] Error 1

Signed-off-by: Tetiana Kravchenko <[email protected]>

* generate notice file

Signed-off-by: Tetiana Kravchenko <[email protected]>

* readd removed metric from test file

Signed-off-by: Tetiana Kravchenko <[email protected]>

Signed-off-by: Tetiana Kravchenko <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v8.3.0 Automated backport with mergify backport-v8.4.0 Automated backport with mergify Team:Cloudnative-Monitoring Label for the Cloud Native Monitoring team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[K8s] cluster metadata not added on all metrics
3 participants