-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Description
Currently, an error is reported to the correct DNS in Sentry, however it uses the environment set in SENTRY_ENVIRONMENT. This is very inflexible and limits you to a single environment.
We'd like the ability override the default environment and enable custom environment overrides akin to the SENTRY_K8S_CUSTOM_DSNS setting by adding a newSENTRY_K8S_CUSTOM_ENVIRONMENTS variable.
New Configuration Variable
SENTRY_K8S_CUSTOM_ENVIRONMENTS- if set to 1, enables custom environments to be specified in the annotations with keyk8s.sentry.io/environmentwhich would take precedence overSENTRY_ENVIRONMENT. Disabled by default.
Example resource using SENTRY_K8S_CUSTOM_DSNS and SENTRY_K8S_CUSTOM_ENVIRONMENTS via annotations:
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: null
labels:
run: pod-crashloop
type: test-pod
name: pod-crashloop
annotations:
k8s.sentry.io/dsn: "https://[email protected]/xxxx"
k8s.sentry.io/environment: "staging"
spec:
containers:
- image: alpine:3
name: pod-crashloop
command:
- sh
- "-c"
- |
sleep 1
invalid_command
dnsPolicy: ClusterFirst
restartPolicy: Alwaysseanhoughtonatvi
Metadata
Metadata
Assignees
Labels
No labels