Browse Source

move sentry from code to ENV (#10)

pull/12/head
Vladimir Smagin 1 year ago
committed by GitHub
parent
commit
e5b7e1f122
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 1 deletions
  1. +2
    -0
      deploy/deploy-operator-debug/operator-debug.yaml
  2. +2
    -0
      deploy/deploy-operator-default/operator.yaml
  3. +5
    -1
      pkg/controller/rabbitmq/rabbitmq_controller.go

+ 2
- 0
deploy/deploy-operator-debug/operator-debug.yaml View File

@@ -23,6 +23,8 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: SENTRY_DSN
value: "https://983d2bf5d8f247e98b89d179b737a48d:f3133ece803044fa8491775da2d56cf5@sentry.tools.improvado.io/37"
- name: OPERATOR_NAME
value: "rabbitmq-operator"
- name: WATCH_NAMESPACE


+ 2
- 0
deploy/deploy-operator-default/operator.yaml View File

@@ -23,6 +23,8 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: SENTRY_DSN
value: "https://983d2bf5d8f247e98b89d179b737a48d:f3133ece803044fa8491775da2d56cf5@sentry.tools.improvado.io/37"
- name: OPERATOR_NAME
value: "rabbitmq-operator"
- name: WATCH_NAMESPACE


+ 5
- 1
pkg/controller/rabbitmq/rabbitmq_controller.go View File

@@ -2,6 +2,7 @@ package rabbitmq

import (
"context"
"os"
"reflect"
"strconv"
"time"
@@ -27,7 +28,10 @@ import (
)

func init() {
raven.SetDSN("https://983d2bf5d8f247e98b89d179b737a48d:f3133ece803044fa8491775da2d56cf5@sentry.tools.improvado.io/37")
sentryDSN := os.Getenv("SENTRY_DSN")
if sentryDSN != "" {
raven.SetDSN(sentryDSN)
}
}

var log = logf.Log.WithName("controller_rabbitmq")


Loading…
Cancel
Save