Dynatrace / dynatrace-operator

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

Mount certificate for extension signature verification #3740

Closed andriisoldatenko closed 6 days ago

andriisoldatenko commented 1 week ago

Description

This PR mount custom certificates for extension signature verification

K8S-9688

How can this be tested?

  1. Create a secret based on any kind of certificate:
kubectl create secret tls custom-tls-cert --cert=cert.pem --key=key.pem
  1. Apply dk and ref this secret as custom certificates customExtensionCertificates:
apiVersion: dynatrace.com/v1beta3
kind: DynaKube
metadata:
  name: dynakube
  namespace: dynatrace
spec:
  apiUrl: https://<tenant>.dev.dynatracelabs.com/api
  customPullSecret: <pull secret>
  extensions:
    prometheus:
      enabled: true
  templates:
    extensionExecutionController:
      customExtensionCertificates: custom-tls-cert
      imageRef:
        repository: extk8sregistry.azurecr.io/eec/dynatrace-eec
        tag: 1.301.0.20240823-092629
codecov-commenter commented 1 week 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.96%. Comparing base (91b797d) to head (62224bb). 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 #3740 +/- ## ========================================== + Coverage 64.93% 64.96% +0.02% ========================================== Files 387 387 Lines 21153 21170 +17 ========================================== + Hits 13736 13753 +17 Misses 6100 6100 Partials 1317 1317 ``` | [Flag](https://app.codecov.io/gh/Dynatrace/dynatrace-operator/pull/3740/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/3740/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Dynatrace) | `64.96% <100.00%> (+0.02%)` | :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.