keptn / lifecycle-toolkit

Toolkit for cloud-native application lifecycle management
https://keptn.sh
Apache License 2.0
290 stars 119 forks source link

Document how to create/manage secrets for protected data source #2136

Closed StackScribe closed 9 months ago

StackScribe commented 11 months ago

Goal

Document how to use secrets to access each supported data source (Prometheus, Dynatrace, Datadog)

Problem

Dynatrace and Datadog have worked with secrets for some time; https://github.com/keptn/lifecycle-toolkit/issues/2128 adds support for using secrets to access a Prometheus data source. The KeptnMetricsProvider CRD reference page shows the syntax for using secrets but we do not document how to implement the secrets.

The process is different for each data provider and we will need to add this information for other data providers we may support in the future.

Options:

  1. ~Add a page to the "User guides" section that explains how to add secrets for all supported data providers~
  2. Add section "Metric Providers" to "Implementing Keptn applications" section about implementing secrets for data providers with subpages for each supported data provider with these instructions
    • This option has the advantage of giving us a place to document other information that may be needed for each data provider, such as which version of the data provider works with which versions of Keptn, known issues, maybe information about forming queries (or a pointer to the provider's documentation about forming queries)
    • Also gives a descrete file that a data provider contributor can modify without impacting information about other data providers

DoD

odubajDT commented 9 months ago

The secrets for the providers should look the following:

apiVersion: v1
kind: Secret
metadata:
  name: prometheus
data:
  password: password
  user: user
type: Opaque
---
apiVersion: v1
kind: Secret
metadata:
  name: datadog
data:
  DD_CLIENT_API_KEY: api-key
  DD_CLIENT_APP_KEY: app-key
type: Opaque
---
apiVersion: v1
kind: Secret
metadata:
  name: dynatrace
data:
  myCustomKey: my-token
type: Opaque