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 monitored entity reconciler #3447

Merged
merged 16 commits into from
Jul 23, 2024
Merged

Conversation

waodim
Copy link
Contributor

@waodim waodim commented Jul 11, 2024

Description

With this a new reconciler is added that deals with the monitored entity from the cluster. It will be stored in the dynakube status from now on, such that if we need to store the value we can guarantee that it is stored somewhere.

Because of this I removed the API call which was inside the settings enrichment reconciler, as it is unneeded as the main purpose was to get the entityID. From now on the ID is simply taken from the dynakube status.

JIRA-ticket: https://dt-rnd.atlassian.net/browse/K8S-9857

How can this be tested?

Deploy the operator and a dynakube with metadata enrichment enabled. Check the logs, also check the dynakube status.

@waodim waodim added the core Changes to core functionality of the Operator label Jul 11, 2024
@waodim waodim requested a review from a team as a code owner July 11, 2024 12:00
@codecov-commenter
Copy link

codecov-commenter commented Jul 11, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 60.00000% with 24 lines in your changes missing coverage. Please review.

Project coverage is 57.71%. Comparing base (5f87f92) to head (d3fedb2).
Report is 1 commits behind head on main.

Files Patch % Lines
test/mocks/pkg/clients/dynatrace/client.go 15.38% 8 Missing and 3 partials ⚠️
...g/controllers/dynakube/apimonitoring/reconciler.go 60.00% 5 Missing and 1 partial ⚠️
...ntrollers/dynakube/monitoredentities/reconciler.go 77.27% 3 Missing and 2 partials ⚠️
pkg/controllers/dynakube/controller.go 50.00% 1 Missing and 1 partial ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3447      +/-   ##
==========================================
- Coverage   57.77%   57.71%   -0.06%     
==========================================
  Files         371      372       +1     
  Lines       20162    20181      +19     
==========================================
- Hits        11649    11648       -1     
- Misses       7277     7290      +13     
- Partials     1236     1243       +7     
Flag Coverage Δ
unittests 57.71% <60.00%> (-0.06%) ⬇️

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

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

Copy link
Contributor

@0sewa0 0sewa0 left a comment

Choose a reason for hiding this comment

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

1 final nitpick, otherwise looks good, tested it and works as expected (noticed the nitpick during the tests)

pkg/controllers/dynakube/monitoredentities/reconciler.go Outdated Show resolved Hide resolved
Copy link
Contributor

@0sewa0 0sewa0 left a comment

Choose a reason for hiding this comment

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

1 final nitpick, otherwise looks good, tested it and works as expected (noticed the nitpick during the tests)

0sewa0
0sewa0 previously approved these changes Jul 22, 2024
@0sewa0 0sewa0 dismissed their stale review July 22, 2024 12:08

CRD needs to be regenerated

@0sewa0
Copy link
Contributor

0sewa0 commented Jul 22, 2024

CRD needs to be regenerated:

> git status        
On branch feature/add-monitored-entity-reconciler
Your branch is up to date with 'origin/feature/add-monitored-entity-reconciler'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   config/crd/bases/dynatrace.com_dynakubes.yaml
        modified:   config/helm/chart/default/templates/Common/crd/dynatrace-operator-crd.yaml

no changes added to commit (use "git add" and/or "git commit -a")

Copy link
Collaborator

@luhi-DT luhi-DT left a comment

Choose a reason for hiding this comment

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

LGTM

@waodim waodim enabled auto-merge (squash) July 22, 2024 13:36
@waodim waodim merged commit 2cd356e into main Jul 23, 2024
12 checks passed
@waodim waodim deleted the feature/add-monitored-entity-reconciler branch July 23, 2024 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Changes to core functionality of the Operator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants