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 option for selfregistering activegate #423

Merged
merged 12 commits into from
Jan 10, 2022

Conversation

fabwer
Copy link
Contributor

@fabwer fabwer commented Dec 23, 2021

This PR adds the Kubernetes endpoint configuration creation logic to the Dynatrace operator to be available in the release 0.4.0 as an opt-in feature.

  • Checks for existing monitored entities settings using the Dynatrace API
  • Adds a reconciler to trigger the automatic Kubernetes API monitoring and to ensure settings exist in Dynatrace for the given kube-system-uuid
  • Adds conditions on when the reconciler should take action
  • Adds appropriate tests

src/dtclient/kubernetes_settings.go Outdated Show resolved Hide resolved
src/testing/e2e/statefulset.go Outdated Show resolved Hide resolved
src/testing/e2e/statefulset.go Outdated Show resolved Hide resolved
src/dtclient/kubernetes_settings.go Show resolved Hide resolved
src/dtclient/kubernetes_settings.go Outdated Show resolved Hide resolved
@fabwer fabwer force-pushed the feature/selfregistering-activegate branch from 2ebfe56 to be7d0ef Compare December 23, 2021 15:14
@chrismuellner chrismuellner changed the title Feature/selfregistering activegate Add option for selfregistering activegate Jan 3, 2022
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.

Just a few nitpicks about unnecessary checks, otherwise looks great, lots of tests ❤️

src/controllers/dynakube/dynakube_controller.go Outdated Show resolved Hide resolved
src/dtclient/kubernetes_settings.go Outdated Show resolved Hide resolved
@fabwer fabwer requested a review from 0sewa0 January 4, 2022 07:51
@chrismuellner
Copy link
Collaborator

Please rebase on master so you have the Github Actions run.

@0sewa0
Copy link
Contributor

0sewa0 commented Jan 4, 2022

You should update the tests, now that you removed the checks I asked some of your tests are failing.
Stuff like: TestReconcileErrors/don't_create_setting_when_no_name_is_given (where you test if the check that was just removed works 😅 )

@fabwer fabwer closed this Jan 4, 2022
@fabwer fabwer reopened this Jan 4, 2022
chrismuellner and others added 5 commits January 4, 2022 10:05
- Added api client for monitored entities and settings
- Added reconciler to trigger the automatic kubernetes api monitoring to create kubernetes settings for the given kube-system uuid
- Added conditions (annotation and capabilities) to check whether automatic api monitoring should be executed
- Added appropriate tests
- Adapted PR according to the requested changes
- Removes unnecessary checks
- Removes unnecessary tests
@fabwer fabwer force-pushed the feature/selfregistering-activegate branch from 900f96e to 4dea336 Compare January 4, 2022 09:06
@fabwer
Copy link
Contributor Author

fabwer commented Jan 4, 2022

Unfortunate misclick 😅
Updated tests @0sewa0 and rebase should also be done @chrismuellner

- Move method to appropriate test file
# Conflicts:
#	src/controllers/dynakube/dynakube_controller_test.go
- Update test to use new test setup methods
- Refactors method to better reflect the usage
@fabwer fabwer force-pushed the feature/selfregistering-activegate branch from e576ae7 to 226d754 Compare January 5, 2022 11:01
0sewa0
0sewa0 previously approved these changes Jan 5, 2022
- Improves logging
- Refactors method to better reflect the functionality
@fabwer fabwer merged commit 1b8c0a4 into master Jan 10, 2022
@chrismuellner chrismuellner deleted the feature/selfregistering-activegate branch January 10, 2022 11:40
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.

None yet

3 participants