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

[TT-13680] feat: support reading headers from Kubernetes Secrets #375

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

buraksekili
Copy link
Member

Add support for reading opentelemetry header values from k8s secrets while maintaining backward compatibility with direct header values.
This enables secure management of sensitive header values like authentication tokens.

Changes:

  • Headers can now be specified either as direct string values or references to Secret values
  • Support mixing both direct values and Secret references in the same headers map
  • Updated values.yaml documentation with examples of both approaches
  • Headers continue to be formatted as "key1:value1,key2:value2" in final output

Example:

headers:
  X-Custom-Header: "direct-value"
  Authorization:
    fromSecret:
      name: "auth-secret"
      key: "auth-token"

Description

Related Issue

Resolves #363
https://tyktech.atlassian.net/browse/TT-13680

Motivation and Context

Test Coverage For This Change

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactoring or add test (improvements in base code or adds test coverage to functionality)
  • Documentation updates or improvements.

Checklist

  • Make sure you are requesting to pull a topic/feature/bugfix branch (right side). If PRing from your fork, don't come from your master!
  • Make sure you are making a pull request against our master branch (left side). Also, it would be best if you started your change off our latest master.
  • My change requires a change to the documentation.
    • I have manually updated the README(s)/documentation accordingly.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Add support for reading opentelemetry header values from k8s secrets while maintaining
backward compatibility with direct header values.
This enables secure management of sensitive header values like authentication tokens.

Changes:
- Headers can now be specified either as direct string values or references to
  Secret values
- Support mixing both direct values and Secret references in the same headers map
- Updated values.yaml documentation with examples of both approaches
- Headers continue to be formatted as "key1:value1,key2:value2" in final output

Example:
```
headers:
  X-Custom-Header: "direct-value"
  Authorization:
    fromSecret:
      name: "auth-secret"
      key: "auth-token"
```

Signed-off-by: Burak Sekili <[email protected]>
@buraksekili buraksekili requested a review from a team as a code owner December 19, 2024 18:31
@buraksekili buraksekili requested review from olamilekan000 and removed request for a team December 19, 2024 18:31
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.

Configuring OpenTelemetry via tyk-stack Helm chart exposes Authorization token
2 participants