Add env to chart options to be used for Slack and Teams URLs

This commit is contained in:
stefanprodan
2019-10-09 16:53:34 +03:00
parent faae6a7c3b
commit 1cb09890fb
3 changed files with 18 additions and 1 deletions
+4
View File
@@ -102,6 +102,10 @@ spec:
- --spider
- http://localhost:8080/healthz
timeoutSeconds: 5
{{- if .Values.env }}
env:
{{ toYaml .Values.env | indent 12 }}
{{- end }}
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.nodeSelector }}
+13
View File
@@ -32,6 +32,19 @@ msteams:
# MS Teams incoming webhook URL
url:
#env:
#- name: SLACK_URL
# valueFrom:
# secretKeyRef:
# name: slack
# key: url
#- name: MSTEAMS_URL
# valueFrom:
# secretKeyRef:
# name: msteams
# key: url
env: []
leaderElection:
enabled: false
replicaCount: 1
+1 -1
View File
@@ -287,7 +287,7 @@ func startLeaderElection(ctx context.Context, run func(), ns string, kubeClient
func initNotifier(logger *zap.SugaredLogger) (client notifier.Interface) {
provider := "slack"
notifierURL := fromEnv("SLACK_URL", slackURL)
if msteamsURL != "" {
if msteamsURL != "" || os.Getenv("MSTEAMS_URL") != "" {
provider = "msteams"
notifierURL = fromEnv("MSTEAMS_URL", msteamsURL)
}