Dynatrace / dynatrace-operator

Automate Kubernetes observability with Dynatrace
https://www.dynatrace.com
Apache License 2.0
169 stars 138 forks source link

Add extra env vars to OtelC pod #3733

Closed andriisoldatenko closed 1 month ago

andriisoldatenko commented 1 month ago

Description

Add extra env vars to OtelC pod

K8S-11073

How can this be tested?

Deploy dynakube:

apiVersion: dynatrace.com/v1beta3
kind: DynaKube
metadata:
  name: dynakube
  namespace: dynatrace
spec:
  apiUrl: https://hbc47170.dev.dynatracelabs.com/api
  customPullSecret: <pull-secret-name>
  extensions:
    prometheus:
      enabled: true
  templates:
    extensionExecutionController:
      imageRef:
        repository: extk8sregistry.azurecr.io/eec/dynatrace-eec
        tag: 1.301.0.20240823-092629

Describe pod and grep env vars and you should see 3 new env vars:

k describe pod dynatrace-extensions-collector-0 -n dynatrace | grep -A11 Env
    Environment:
..
      K8S_CLUSTER_NAME:              dynakube
      K8S_CLUSTER_UID:               e0837908-640a-4ce7-ba4e-89f47a961063
      DT_ENTITY_KUBERNETES_CLUSTER:  KUBERNETES_CLUSTER-DBF1C308DC3F5DBC
codecov-commenter commented 1 month ago

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

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 64.89%. Comparing base (e1b5e13) to head (5185675). Report is 1 commits behind head on main.

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

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #3733 +/- ## ======================================= Coverage 64.88% 64.89% ======================================= Files 386 386 Lines 21117 21120 +3 ======================================= + Hits 13702 13705 +3 Misses 6098 6098 Partials 1317 1317 ``` | [Flag](https://app.codecov.io/gh/Dynatrace/dynatrace-operator/pull/3733/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Dynatrace) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/Dynatrace/dynatrace-operator/pull/3733/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Dynatrace) | `64.89% <100.00%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Dynatrace#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.