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

WIP Automate creation of Otel collector Service #4333

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aorcholski
Copy link
Contributor

@aorcholski aorcholski commented Jan 22, 2025

JIRA

Description

Adds Otel collector service reconciler. The service is created if dynakube.spec.telemetryService is enabled.

How can this be tested?

  1. unittests
  2. install dynakube
spec:
  apiUrl: https://....  
  telemetryService: {}
  1. check services
[]$ kubectl -n dynatrace get services

NAME                 TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                                                                     AGE
dynakube-telemetry   ClusterIP   3.....           <none>        4317/TCP,4318/TCP,9411/TCP,14250/TCP,6832/TCP,6831/TCP,14268/TCP,8125/TCP   4m41s
  1. check conditions
[]$ kubectl -n dynatrace describe dynakube.dynatrace.com/dynakube

Status:
  ...
  Conditions:
    ...
    Last Transition Time:  2025-01-22T17:01:40Z
    Message:               dynakube-telemetry created
    Reason:                ServiceCreated
    Status:                True
    Type:                  OTELCService
  1. disable telemetryService
 kubectl -n dynatrace patch dynakube.dynatrace.com/dynakube --type=json -p="[{'op': 'remove', 'path': '/spec/telemetryService'}]" 
  1. check services - dynakube-telemetry service should be deleted
  2. check conditions - OTELCService condition should be removed

@aorcholski aorcholski added the core Changes to core functionality of the Operator label Jan 22, 2025
@codecov-commenter
Copy link

codecov-commenter commented Jan 22, 2025

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

Codecov Report

Attention: Patch coverage is 82.31707% with 29 lines in your changes missing coverage. Please review.

Project coverage is 64.28%. Comparing base (111fac0) to head (0c8d3da).

Files with missing lines Patch % Lines
...g/controllers/dynakube/otelc/service/reconciler.go 79.52% 21 Missing and 5 partials ⚠️
pkg/controllers/dynakube/otelc/reconciler.go 50.00% 2 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    #4333      +/-   ##
==========================================
+ Coverage   64.18%   64.28%   +0.10%     
==========================================
  Files         401      402       +1     
  Lines       26318    26461     +143     
==========================================
+ Hits        16892    17011     +119     
- Misses       8121     8140      +19     
- Partials     1305     1310       +5     
Flag Coverage Δ
unittests 64.28% <82.31%> (+0.10%) ⬆️

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.

@aorcholski aorcholski force-pushed the feature/otelc-service branch 7 times, most recently from ad4ece2 to 2b339bd Compare January 23, 2025 12:03
@aorcholski aorcholski force-pushed the feature/otelc-service branch from 2b339bd to 0c8d3da Compare January 23, 2025 12:06
@aorcholski aorcholski changed the title WIP Automate creation of Otel collector Service Automate creation of Otel collector Service Jan 23, 2025
@aorcholski aorcholski marked this pull request as ready for review January 23, 2025 12:09
@aorcholski aorcholski requested a review from a team as a code owner January 23, 2025 12:09
@aorcholski aorcholski changed the title Automate creation of Otel collector Service WIP Automate creation of Otel collector Service Jan 23, 2025
@andriisoldatenko andriisoldatenko marked this pull request as draft January 23, 2025 13:40
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.

2 participants